diff --git a/qt-extras/scintillaedit/gen_ScintillaEdit.cpp b/qt-extras/scintillaedit/gen_ScintillaEdit.cpp index cb1fbf71..ff24427b 100644 --- a/qt-extras/scintillaedit/gen_ScintillaEdit.cpp +++ b/qt-extras/scintillaedit/gen_ScintillaEdit.cpp @@ -64,24 +64,20 @@ #include "gen_ScintillaEdit.h" #include "_cgo_export.h" -void Scintilla__Internal__Point_new(Scintilla__Internal__Point** outptr_Scintilla__Internal__Point) { - Scintilla::Internal::Point* ret = new Scintilla::Internal::Point(); - *outptr_Scintilla__Internal__Point = ret; +Scintilla__Internal__Point* Scintilla__Internal__Point_new() { + return new Scintilla::Internal::Point(); } -void Scintilla__Internal__Point_new2(Scintilla__Internal__Point* param1, Scintilla__Internal__Point** outptr_Scintilla__Internal__Point) { - Scintilla::Internal::Point* ret = new Scintilla::Internal::Point(*param1); - *outptr_Scintilla__Internal__Point = ret; +Scintilla__Internal__Point* Scintilla__Internal__Point_new2(Scintilla__Internal__Point* param1) { + return new Scintilla::Internal::Point(*param1); } -void Scintilla__Internal__Point_new3(double x_, Scintilla__Internal__Point** outptr_Scintilla__Internal__Point) { - Scintilla::Internal::Point* ret = new Scintilla::Internal::Point(static_cast(x_)); - *outptr_Scintilla__Internal__Point = ret; +Scintilla__Internal__Point* Scintilla__Internal__Point_new3(double x_) { + return new Scintilla::Internal::Point(static_cast(x_)); } -void Scintilla__Internal__Point_new4(double x_, double y_, Scintilla__Internal__Point** outptr_Scintilla__Internal__Point) { - Scintilla::Internal::Point* ret = new Scintilla::Internal::Point(static_cast(x_), static_cast(y_)); - *outptr_Scintilla__Internal__Point = ret; +Scintilla__Internal__Point* Scintilla__Internal__Point_new4(double x_, double y_) { + return new Scintilla::Internal::Point(static_cast(x_), static_cast(y_)); } Scintilla__Internal__Point* Scintilla__Internal__Point_FromInts(int x_, int y_) { @@ -141,34 +137,28 @@ void Scintilla__Internal__Interval_Delete(Scintilla__Internal__Interval* self, b } } -void Scintilla__Internal__PRectangle_new(Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle) { - Scintilla::Internal::PRectangle* ret = new Scintilla::Internal::PRectangle(); - *outptr_Scintilla__Internal__PRectangle = ret; +Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new() { + return new Scintilla::Internal::PRectangle(); } -void Scintilla__Internal__PRectangle_new2(Scintilla__Internal__PRectangle* param1, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle) { - Scintilla::Internal::PRectangle* ret = new Scintilla::Internal::PRectangle(*param1); - *outptr_Scintilla__Internal__PRectangle = ret; +Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new2(Scintilla__Internal__PRectangle* param1) { + return new Scintilla::Internal::PRectangle(*param1); } -void Scintilla__Internal__PRectangle_new3(double left_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle) { - Scintilla::Internal::PRectangle* ret = new Scintilla::Internal::PRectangle(static_cast(left_)); - *outptr_Scintilla__Internal__PRectangle = ret; +Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new3(double left_) { + return new Scintilla::Internal::PRectangle(static_cast(left_)); } -void Scintilla__Internal__PRectangle_new4(double left_, double top_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle) { - Scintilla::Internal::PRectangle* ret = new Scintilla::Internal::PRectangle(static_cast(left_), static_cast(top_)); - *outptr_Scintilla__Internal__PRectangle = ret; +Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new4(double left_, double top_) { + return new Scintilla::Internal::PRectangle(static_cast(left_), static_cast(top_)); } -void Scintilla__Internal__PRectangle_new5(double left_, double top_, double right_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle) { - Scintilla::Internal::PRectangle* ret = new Scintilla::Internal::PRectangle(static_cast(left_), static_cast(top_), static_cast(right_)); - *outptr_Scintilla__Internal__PRectangle = ret; +Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new5(double left_, double top_, double right_) { + return new Scintilla::Internal::PRectangle(static_cast(left_), static_cast(top_), static_cast(right_)); } -void Scintilla__Internal__PRectangle_new6(double left_, double top_, double right_, double bottom_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle) { - Scintilla::Internal::PRectangle* ret = new Scintilla::Internal::PRectangle(static_cast(left_), static_cast(top_), static_cast(right_), static_cast(bottom_)); - *outptr_Scintilla__Internal__PRectangle = ret; +Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new6(double left_, double top_, double right_, double bottom_) { + return new Scintilla::Internal::PRectangle(static_cast(left_), static_cast(top_), static_cast(right_), static_cast(bottom_)); } Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_FromInts(int left_, int top_, int right_, int bottom_) { @@ -241,34 +231,28 @@ void Scintilla__Internal__PRectangle_Delete(Scintilla__Internal__PRectangle* sel } } -void Scintilla__Internal__ColourRGBA_new(Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA) { - Scintilla::Internal::ColourRGBA* ret = new Scintilla::Internal::ColourRGBA(); - *outptr_Scintilla__Internal__ColourRGBA = ret; +Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new() { + return new Scintilla::Internal::ColourRGBA(); } -void Scintilla__Internal__ColourRGBA_new2(unsigned int red, unsigned int green, unsigned int blue, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA) { - Scintilla::Internal::ColourRGBA* ret = new Scintilla::Internal::ColourRGBA(static_cast(red), static_cast(green), static_cast(blue)); - *outptr_Scintilla__Internal__ColourRGBA = ret; +Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new2(unsigned int red, unsigned int green, unsigned int blue) { + return new Scintilla::Internal::ColourRGBA(static_cast(red), static_cast(green), static_cast(blue)); } -void Scintilla__Internal__ColourRGBA_new3(Scintilla__Internal__ColourRGBA* cd, unsigned int alpha, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA) { - Scintilla::Internal::ColourRGBA* ret = new Scintilla::Internal::ColourRGBA(*cd, static_cast(alpha)); - *outptr_Scintilla__Internal__ColourRGBA = ret; +Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new3(Scintilla__Internal__ColourRGBA* cd, unsigned int alpha) { + return new Scintilla::Internal::ColourRGBA(*cd, static_cast(alpha)); } -void Scintilla__Internal__ColourRGBA_new4(Scintilla__Internal__ColourRGBA* param1, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA) { - Scintilla::Internal::ColourRGBA* ret = new Scintilla::Internal::ColourRGBA(*param1); - *outptr_Scintilla__Internal__ColourRGBA = ret; +Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new4(Scintilla__Internal__ColourRGBA* param1) { + return new Scintilla::Internal::ColourRGBA(*param1); } -void Scintilla__Internal__ColourRGBA_new5(int co_, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA) { - Scintilla::Internal::ColourRGBA* ret = new Scintilla::Internal::ColourRGBA(static_cast(co_)); - *outptr_Scintilla__Internal__ColourRGBA = ret; +Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new5(int co_) { + return new Scintilla::Internal::ColourRGBA(static_cast(co_)); } -void Scintilla__Internal__ColourRGBA_new6(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA) { - Scintilla::Internal::ColourRGBA* ret = new Scintilla::Internal::ColourRGBA(static_cast(red), static_cast(green), static_cast(blue), static_cast(alpha)); - *outptr_Scintilla__Internal__ColourRGBA = ret; +Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new6(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha) { + return new Scintilla::Internal::ColourRGBA(static_cast(red), static_cast(green), static_cast(blue), static_cast(alpha)); } Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_FromRGB(int co_) { @@ -363,19 +347,16 @@ void Scintilla__Internal__ColourRGBA_Delete(Scintilla__Internal__ColourRGBA* sel } } -void Scintilla__Internal__Stroke_new(Scintilla__Internal__ColourRGBA* colour_, Scintilla__Internal__Stroke** outptr_Scintilla__Internal__Stroke) { - Scintilla::Internal::Stroke* ret = new Scintilla::Internal::Stroke(*colour_); - *outptr_Scintilla__Internal__Stroke = ret; +Scintilla__Internal__Stroke* Scintilla__Internal__Stroke_new(Scintilla__Internal__ColourRGBA* colour_) { + return new Scintilla::Internal::Stroke(*colour_); } -void Scintilla__Internal__Stroke_new2(Scintilla__Internal__Stroke* param1, Scintilla__Internal__Stroke** outptr_Scintilla__Internal__Stroke) { - Scintilla::Internal::Stroke* ret = new Scintilla::Internal::Stroke(*param1); - *outptr_Scintilla__Internal__Stroke = ret; +Scintilla__Internal__Stroke* Scintilla__Internal__Stroke_new2(Scintilla__Internal__Stroke* param1) { + return new Scintilla::Internal::Stroke(*param1); } -void Scintilla__Internal__Stroke_new3(Scintilla__Internal__ColourRGBA* colour_, double width_, Scintilla__Internal__Stroke** outptr_Scintilla__Internal__Stroke) { - Scintilla::Internal::Stroke* ret = new Scintilla::Internal::Stroke(*colour_, static_cast(width_)); - *outptr_Scintilla__Internal__Stroke = ret; +Scintilla__Internal__Stroke* Scintilla__Internal__Stroke_new3(Scintilla__Internal__ColourRGBA* colour_, double width_) { + return new Scintilla::Internal::Stroke(*colour_, static_cast(width_)); } float Scintilla__Internal__Stroke_WidthF(const Scintilla__Internal__Stroke* self) { @@ -390,14 +371,12 @@ void Scintilla__Internal__Stroke_Delete(Scintilla__Internal__Stroke* self, bool } } -void Scintilla__Internal__Fill_new(Scintilla__Internal__ColourRGBA* colour_, Scintilla__Internal__Fill** outptr_Scintilla__Internal__Fill) { - Scintilla::Internal::Fill* ret = new Scintilla::Internal::Fill(*colour_); - *outptr_Scintilla__Internal__Fill = ret; +Scintilla__Internal__Fill* Scintilla__Internal__Fill_new(Scintilla__Internal__ColourRGBA* colour_) { + return new Scintilla::Internal::Fill(*colour_); } -void Scintilla__Internal__Fill_new2(Scintilla__Internal__Fill* param1, Scintilla__Internal__Fill** outptr_Scintilla__Internal__Fill) { - Scintilla::Internal::Fill* ret = new Scintilla::Internal::Fill(*param1); - *outptr_Scintilla__Internal__Fill = ret; +Scintilla__Internal__Fill* Scintilla__Internal__Fill_new2(Scintilla__Internal__Fill* param1) { + return new Scintilla::Internal::Fill(*param1); } void Scintilla__Internal__Fill_Delete(Scintilla__Internal__Fill* self, bool isSubclass) { @@ -408,24 +387,20 @@ void Scintilla__Internal__Fill_Delete(Scintilla__Internal__Fill* self, bool isSu } } -void Scintilla__Internal__FillStroke_new(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke) { - Scintilla::Internal::FillStroke* ret = new Scintilla::Internal::FillStroke(*colourFill_, *colourStroke_); - *outptr_Scintilla__Internal__FillStroke = ret; +Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_) { + return new Scintilla::Internal::FillStroke(*colourFill_, *colourStroke_); } -void Scintilla__Internal__FillStroke_new2(Scintilla__Internal__ColourRGBA* colourBoth, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke) { - Scintilla::Internal::FillStroke* ret = new Scintilla::Internal::FillStroke(*colourBoth); - *outptr_Scintilla__Internal__FillStroke = ret; +Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new2(Scintilla__Internal__ColourRGBA* colourBoth) { + return new Scintilla::Internal::FillStroke(*colourBoth); } -void Scintilla__Internal__FillStroke_new3(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_, double widthStroke_, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke) { - Scintilla::Internal::FillStroke* ret = new Scintilla::Internal::FillStroke(*colourFill_, *colourStroke_, static_cast(widthStroke_)); - *outptr_Scintilla__Internal__FillStroke = ret; +Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new3(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_, double widthStroke_) { + return new Scintilla::Internal::FillStroke(*colourFill_, *colourStroke_, static_cast(widthStroke_)); } -void Scintilla__Internal__FillStroke_new4(Scintilla__Internal__ColourRGBA* colourBoth, double widthStroke_, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke) { - Scintilla::Internal::FillStroke* ret = new Scintilla::Internal::FillStroke(*colourBoth, static_cast(widthStroke_)); - *outptr_Scintilla__Internal__FillStroke = ret; +Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new4(Scintilla__Internal__ColourRGBA* colourBoth, double widthStroke_) { + return new Scintilla::Internal::FillStroke(*colourBoth, static_cast(widthStroke_)); } void Scintilla__Internal__FillStroke_Delete(Scintilla__Internal__FillStroke* self, bool isSubclass) { @@ -436,9 +411,8 @@ void Scintilla__Internal__FillStroke_Delete(Scintilla__Internal__FillStroke* sel } } -void Scintilla__Internal__ColourStop_new(double position_, Scintilla__Internal__ColourRGBA* colour_, Scintilla__Internal__ColourStop** outptr_Scintilla__Internal__ColourStop) { - Scintilla::Internal::ColourStop* ret = new Scintilla::Internal::ColourStop(static_cast(position_), *colour_); - *outptr_Scintilla__Internal__ColourStop = ret; +Scintilla__Internal__ColourStop* Scintilla__Internal__ColourStop_new(double position_, Scintilla__Internal__ColourRGBA* colour_) { + return new Scintilla::Internal::ColourStop(static_cast(position_), *colour_); } void Scintilla__Internal__ColourStop_Delete(Scintilla__Internal__ColourStop* self, bool isSubclass) { @@ -537,49 +511,40 @@ void Scintilla__NotificationData_Delete(Scintilla__NotificationData* self, bool } } -void Scintilla__Internal__FontParameters_new(const char* faceName_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { - Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_); - *outptr_Scintilla__Internal__FontParameters = ret; +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new(const char* faceName_) { + return new Scintilla::Internal::FontParameters(faceName_); } -void Scintilla__Internal__FontParameters_new2(const char* faceName_, double size_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { - Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_)); - *outptr_Scintilla__Internal__FontParameters = ret; +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new2(const char* faceName_, double size_) { + return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_)); } -void Scintilla__Internal__FontParameters_new3(const char* faceName_, double size_, int weight_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { - Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_)); - *outptr_Scintilla__Internal__FontParameters = ret; +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new3(const char* faceName_, double size_, int weight_) { + return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_)); } -void Scintilla__Internal__FontParameters_new4(const char* faceName_, double size_, int weight_, bool italic_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { - Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_); - *outptr_Scintilla__Internal__FontParameters = ret; +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new4(const char* faceName_, double size_, int weight_, bool italic_) { + return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_); } -void Scintilla__Internal__FontParameters_new5(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { - Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_)); - *outptr_Scintilla__Internal__FontParameters = ret; +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new5(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_) { + return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_)); } -void Scintilla__Internal__FontParameters_new6(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { - Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_)); - *outptr_Scintilla__Internal__FontParameters = ret; +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new6(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_) { + return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_)); } -void Scintilla__Internal__FontParameters_new7(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { - Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_), static_cast(characterSet_)); - *outptr_Scintilla__Internal__FontParameters = ret; +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new7(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_) { + return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_), static_cast(characterSet_)); } -void Scintilla__Internal__FontParameters_new8(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { - Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_), static_cast(characterSet_), localeName_); - *outptr_Scintilla__Internal__FontParameters = ret; +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new8(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_) { + return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_), static_cast(characterSet_), localeName_); } -void Scintilla__Internal__FontParameters_new9(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_, int stretch_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters) { - Scintilla::Internal::FontParameters* ret = new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_), static_cast(characterSet_), localeName_, static_cast(stretch_)); - *outptr_Scintilla__Internal__FontParameters = ret; +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new9(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_, int stretch_) { + return new Scintilla::Internal::FontParameters(faceName_, static_cast(size_), static_cast(weight_), italic_, static_cast(extraFontFlag_), static_cast(technology_), static_cast(characterSet_), localeName_, static_cast(stretch_)); } void Scintilla__Internal__FontParameters_Delete(Scintilla__Internal__FontParameters* self, bool isSubclass) { @@ -590,9 +555,8 @@ void Scintilla__Internal__FontParameters_Delete(Scintilla__Internal__FontParamet } } -void Scintilla__Internal__Font_new(Scintilla__Internal__Font** outptr_Scintilla__Internal__Font) { - Scintilla::Internal::Font* ret = new Scintilla::Internal::Font(); - *outptr_Scintilla__Internal__Font = ret; +Scintilla__Internal__Font* Scintilla__Internal__Font_new() { + return new Scintilla::Internal::Font(); } void Scintilla__Internal__Font_Delete(Scintilla__Internal__Font* self, bool isSubclass) { @@ -678,14 +642,12 @@ void Scintilla__Internal__IScreenLineLayout_Delete(Scintilla__Internal__IScreenL } } -void Scintilla__Internal__SurfaceMode_new(Scintilla__Internal__SurfaceMode** outptr_Scintilla__Internal__SurfaceMode) { - Scintilla::Internal::SurfaceMode* ret = new Scintilla::Internal::SurfaceMode(); - *outptr_Scintilla__Internal__SurfaceMode = ret; +Scintilla__Internal__SurfaceMode* Scintilla__Internal__SurfaceMode_new() { + return new Scintilla::Internal::SurfaceMode(); } -void Scintilla__Internal__SurfaceMode_new2(int codePage_, bool bidiR2L_, Scintilla__Internal__SurfaceMode** outptr_Scintilla__Internal__SurfaceMode) { - Scintilla::Internal::SurfaceMode* ret = new Scintilla::Internal::SurfaceMode(static_cast(codePage_), bidiR2L_); - *outptr_Scintilla__Internal__SurfaceMode = ret; +Scintilla__Internal__SurfaceMode* Scintilla__Internal__SurfaceMode_new2(int codePage_, bool bidiR2L_) { + return new Scintilla::Internal::SurfaceMode(static_cast(codePage_), bidiR2L_); } void Scintilla__Internal__SurfaceMode_Delete(Scintilla__Internal__SurfaceMode* self, bool isSubclass) { @@ -1243,9 +1205,8 @@ public: }; -void Scintilla__Internal__Surface_new(Scintilla__Internal__Surface** outptr_Scintilla__Internal__Surface) { - MiqtVirtualScintillaInternalSurface* ret = new MiqtVirtualScintillaInternalSurface(); - *outptr_Scintilla__Internal__Surface = ret; +Scintilla__Internal__Surface* Scintilla__Internal__Surface_new() { + return new MiqtVirtualScintillaInternalSurface(); } void Scintilla__Internal__Surface_Init(Scintilla__Internal__Surface* self, void* wid) { @@ -1517,9 +1478,8 @@ void Scintilla__Internal__Surface_Delete(Scintilla__Internal__Surface* self, boo } } -void Scintilla__Internal__Window_new(Scintilla__Internal__Window** outptr_Scintilla__Internal__Window) { - Scintilla::Internal::Window* ret = new Scintilla::Internal::Window(); - *outptr_Scintilla__Internal__Window = ret; +Scintilla__Internal__Window* Scintilla__Internal__Window_new() { + return new Scintilla::Internal::Window(); } void Scintilla__Internal__Window_OperatorAssign(Scintilla__Internal__Window* self, void* wid_) { @@ -1587,9 +1547,8 @@ void Scintilla__Internal__Window_Delete(Scintilla__Internal__Window* self, bool } } -void Scintilla__Internal__ListBoxEvent_new(int event_, Scintilla__Internal__ListBoxEvent** outptr_Scintilla__Internal__ListBoxEvent) { - Scintilla::Internal::ListBoxEvent* ret = new Scintilla::Internal::ListBoxEvent(static_cast(event_)); - *outptr_Scintilla__Internal__ListBoxEvent = ret; +Scintilla__Internal__ListBoxEvent* Scintilla__Internal__ListBoxEvent_new(int event_) { + return new Scintilla::Internal::ListBoxEvent(static_cast(event_)); } void Scintilla__Internal__ListBoxEvent_Delete(Scintilla__Internal__ListBoxEvent* self, bool isSubclass) { @@ -1945,10 +1904,12 @@ public: }; -void Scintilla__Internal__ListBox_new(Scintilla__Internal__ListBox** outptr_Scintilla__Internal__ListBox, Scintilla__Internal__Window** outptr_Scintilla__Internal__Window) { - MiqtVirtualScintillaInternalListBox* ret = new MiqtVirtualScintillaInternalListBox(); - *outptr_Scintilla__Internal__ListBox = ret; - *outptr_Scintilla__Internal__Window = static_cast(ret); +Scintilla__Internal__ListBox* Scintilla__Internal__ListBox_new() { + return new MiqtVirtualScintillaInternalListBox(); +} + +void Scintilla__Internal__ListBox_virtbase(Scintilla__Internal__ListBox* src, Scintilla::Internal::Window** outptr_Scintilla__Internal__Window) { + *outptr_Scintilla__Internal__Window = static_cast(src); } void Scintilla__Internal__ListBox_SetFont(Scintilla__Internal__ListBox* self, Scintilla__Internal__Font* font) { @@ -2111,9 +2072,8 @@ void Scintilla__Internal__ListBox_Delete(Scintilla__Internal__ListBox* self, boo } } -void Scintilla__Internal__Menu_new(Scintilla__Internal__Menu** outptr_Scintilla__Internal__Menu) { - Scintilla::Internal::Menu* ret = new Scintilla::Internal::Menu(); - *outptr_Scintilla__Internal__Menu = ret; +Scintilla__Internal__Menu* Scintilla__Internal__Menu_new() { + return new Scintilla::Internal::Menu(); } void* Scintilla__Internal__Menu_GetID(const Scintilla__Internal__Menu* self) { @@ -2887,24 +2847,16 @@ public: }; -void ScintillaEditBase_new(QWidget* parent, ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualScintillaEditBase* ret = new MiqtVirtualScintillaEditBase(parent); - *outptr_ScintillaEditBase = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +ScintillaEditBase* ScintillaEditBase_new(QWidget* parent) { + return new MiqtVirtualScintillaEditBase(parent); } -void ScintillaEditBase_new2(ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualScintillaEditBase* ret = new MiqtVirtualScintillaEditBase(); - *outptr_ScintillaEditBase = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +ScintillaEditBase* ScintillaEditBase_new2() { + return new MiqtVirtualScintillaEditBase(); +} + +void ScintillaEditBase_virtbase(ScintillaEditBase* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); } QMetaObject* ScintillaEditBase_MetaObject(const ScintillaEditBase* self) { @@ -3884,22 +3836,20 @@ public: }; -void ScintillaDocument_new(ScintillaDocument** outptr_ScintillaDocument, QObject** outptr_QObject) { - MiqtVirtualScintillaDocument* ret = new MiqtVirtualScintillaDocument(); - *outptr_ScintillaDocument = ret; - *outptr_QObject = static_cast(ret); +ScintillaDocument* ScintillaDocument_new() { + return new MiqtVirtualScintillaDocument(); } -void ScintillaDocument_new2(QObject* parent, ScintillaDocument** outptr_ScintillaDocument, QObject** outptr_QObject) { - MiqtVirtualScintillaDocument* ret = new MiqtVirtualScintillaDocument(parent); - *outptr_ScintillaDocument = ret; - *outptr_QObject = static_cast(ret); +ScintillaDocument* ScintillaDocument_new2(QObject* parent) { + return new MiqtVirtualScintillaDocument(parent); } -void ScintillaDocument_new3(QObject* parent, void* pdoc_, ScintillaDocument** outptr_ScintillaDocument, QObject** outptr_QObject) { - MiqtVirtualScintillaDocument* ret = new MiqtVirtualScintillaDocument(parent, pdoc_); - *outptr_ScintillaDocument = ret; - *outptr_QObject = static_cast(ret); +ScintillaDocument* ScintillaDocument_new3(QObject* parent, void* pdoc_) { + return new MiqtVirtualScintillaDocument(parent, pdoc_); +} + +void ScintillaDocument_virtbase(ScintillaDocument* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* ScintillaDocument_MetaObject(const ScintillaDocument* self) { @@ -4798,26 +4748,16 @@ public: }; -void ScintillaEdit_new(QWidget* parent, ScintillaEdit** outptr_ScintillaEdit, ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualScintillaEdit* ret = new MiqtVirtualScintillaEdit(parent); - *outptr_ScintillaEdit = ret; - *outptr_ScintillaEditBase = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +ScintillaEdit* ScintillaEdit_new(QWidget* parent) { + return new MiqtVirtualScintillaEdit(parent); } -void ScintillaEdit_new2(ScintillaEdit** outptr_ScintillaEdit, ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualScintillaEdit* ret = new MiqtVirtualScintillaEdit(); - *outptr_ScintillaEdit = ret; - *outptr_ScintillaEditBase = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +ScintillaEdit* ScintillaEdit_new2() { + return new MiqtVirtualScintillaEdit(); +} + +void ScintillaEdit_virtbase(ScintillaEdit* src, ScintillaEditBase** outptr_ScintillaEditBase) { + *outptr_ScintillaEditBase = static_cast(src); } QMetaObject* ScintillaEdit_MetaObject(const ScintillaEdit* self) { diff --git a/qt-extras/scintillaedit/gen_ScintillaEdit.go b/qt-extras/scintillaedit/gen_ScintillaEdit.go index 4f6e7dc0..c4454f3a 100644 --- a/qt-extras/scintillaedit/gen_ScintillaEdit.go +++ b/qt-extras/scintillaedit/gen_ScintillaEdit.go @@ -1730,54 +1730,43 @@ func newScintilla__Internal__Point(h *C.Scintilla__Internal__Point) *Scintilla__ if h == nil { return nil } + return &Scintilla__Internal__Point{h: h} } // UnsafeNewScintilla__Internal__Point constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Point(h unsafe.Pointer) *Scintilla__Internal__Point { - if h == nil { - return nil - } - - return &Scintilla__Internal__Point{h: (*C.Scintilla__Internal__Point)(h)} + return newScintilla__Internal__Point((*C.Scintilla__Internal__Point)(h)) } // NewScintilla__Internal__Point constructs a new Scintilla::Internal::Point object. func NewScintilla__Internal__Point() *Scintilla__Internal__Point { - var outptr_Scintilla__Internal__Point *C.Scintilla__Internal__Point = nil - C.Scintilla__Internal__Point_new(&outptr_Scintilla__Internal__Point) - ret := newScintilla__Internal__Point(outptr_Scintilla__Internal__Point) + ret := newScintilla__Internal__Point(C.Scintilla__Internal__Point_new()) ret.isSubclass = true return ret } // NewScintilla__Internal__Point2 constructs a new Scintilla::Internal::Point object. func NewScintilla__Internal__Point2(param1 *Scintilla__Internal__Point) *Scintilla__Internal__Point { - var outptr_Scintilla__Internal__Point *C.Scintilla__Internal__Point = nil - C.Scintilla__Internal__Point_new2(param1.cPointer(), &outptr_Scintilla__Internal__Point) - ret := newScintilla__Internal__Point(outptr_Scintilla__Internal__Point) + ret := newScintilla__Internal__Point(C.Scintilla__Internal__Point_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewScintilla__Internal__Point3 constructs a new Scintilla::Internal::Point object. func NewScintilla__Internal__Point3(x_ float64) *Scintilla__Internal__Point { - var outptr_Scintilla__Internal__Point *C.Scintilla__Internal__Point = nil - C.Scintilla__Internal__Point_new3((C.double)(x_), &outptr_Scintilla__Internal__Point) - ret := newScintilla__Internal__Point(outptr_Scintilla__Internal__Point) + ret := newScintilla__Internal__Point(C.Scintilla__Internal__Point_new3((C.double)(x_))) ret.isSubclass = true return ret } // NewScintilla__Internal__Point4 constructs a new Scintilla::Internal::Point object. func NewScintilla__Internal__Point4(x_ float64, y_ float64) *Scintilla__Internal__Point { - var outptr_Scintilla__Internal__Point *C.Scintilla__Internal__Point = nil - C.Scintilla__Internal__Point_new4((C.double)(x_), (C.double)(y_), &outptr_Scintilla__Internal__Point) - ret := newScintilla__Internal__Point(outptr_Scintilla__Internal__Point) + ret := newScintilla__Internal__Point(C.Scintilla__Internal__Point_new4((C.double)(x_), (C.double)(y_))) ret.isSubclass = true return ret } @@ -1846,16 +1835,13 @@ func newScintilla__Internal__Interval(h *C.Scintilla__Internal__Interval) *Scint if h == nil { return nil } + return &Scintilla__Internal__Interval{h: h} } // UnsafeNewScintilla__Internal__Interval constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Interval(h unsafe.Pointer) *Scintilla__Internal__Interval { - if h == nil { - return nil - } - - return &Scintilla__Internal__Interval{h: (*C.Scintilla__Internal__Interval)(h)} + return newScintilla__Internal__Interval((*C.Scintilla__Internal__Interval)(h)) } func (this *Scintilla__Internal__Interval) OperatorEqual(other *Scintilla__Internal__Interval) bool { @@ -1918,74 +1904,59 @@ func newScintilla__Internal__PRectangle(h *C.Scintilla__Internal__PRectangle) *S if h == nil { return nil } + return &Scintilla__Internal__PRectangle{h: h} } // UnsafeNewScintilla__Internal__PRectangle constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__PRectangle(h unsafe.Pointer) *Scintilla__Internal__PRectangle { - if h == nil { - return nil - } - - return &Scintilla__Internal__PRectangle{h: (*C.Scintilla__Internal__PRectangle)(h)} + return newScintilla__Internal__PRectangle((*C.Scintilla__Internal__PRectangle)(h)) } // NewScintilla__Internal__PRectangle constructs a new Scintilla::Internal::PRectangle object. func NewScintilla__Internal__PRectangle() *Scintilla__Internal__PRectangle { - var outptr_Scintilla__Internal__PRectangle *C.Scintilla__Internal__PRectangle = nil - C.Scintilla__Internal__PRectangle_new(&outptr_Scintilla__Internal__PRectangle) - ret := newScintilla__Internal__PRectangle(outptr_Scintilla__Internal__PRectangle) + ret := newScintilla__Internal__PRectangle(C.Scintilla__Internal__PRectangle_new()) ret.isSubclass = true return ret } // NewScintilla__Internal__PRectangle2 constructs a new Scintilla::Internal::PRectangle object. func NewScintilla__Internal__PRectangle2(param1 *Scintilla__Internal__PRectangle) *Scintilla__Internal__PRectangle { - var outptr_Scintilla__Internal__PRectangle *C.Scintilla__Internal__PRectangle = nil - C.Scintilla__Internal__PRectangle_new2(param1.cPointer(), &outptr_Scintilla__Internal__PRectangle) - ret := newScintilla__Internal__PRectangle(outptr_Scintilla__Internal__PRectangle) + ret := newScintilla__Internal__PRectangle(C.Scintilla__Internal__PRectangle_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewScintilla__Internal__PRectangle3 constructs a new Scintilla::Internal::PRectangle object. func NewScintilla__Internal__PRectangle3(left_ float64) *Scintilla__Internal__PRectangle { - var outptr_Scintilla__Internal__PRectangle *C.Scintilla__Internal__PRectangle = nil - C.Scintilla__Internal__PRectangle_new3((C.double)(left_), &outptr_Scintilla__Internal__PRectangle) - ret := newScintilla__Internal__PRectangle(outptr_Scintilla__Internal__PRectangle) + ret := newScintilla__Internal__PRectangle(C.Scintilla__Internal__PRectangle_new3((C.double)(left_))) ret.isSubclass = true return ret } // NewScintilla__Internal__PRectangle4 constructs a new Scintilla::Internal::PRectangle object. func NewScintilla__Internal__PRectangle4(left_ float64, top_ float64) *Scintilla__Internal__PRectangle { - var outptr_Scintilla__Internal__PRectangle *C.Scintilla__Internal__PRectangle = nil - C.Scintilla__Internal__PRectangle_new4((C.double)(left_), (C.double)(top_), &outptr_Scintilla__Internal__PRectangle) - ret := newScintilla__Internal__PRectangle(outptr_Scintilla__Internal__PRectangle) + ret := newScintilla__Internal__PRectangle(C.Scintilla__Internal__PRectangle_new4((C.double)(left_), (C.double)(top_))) ret.isSubclass = true return ret } // NewScintilla__Internal__PRectangle5 constructs a new Scintilla::Internal::PRectangle object. func NewScintilla__Internal__PRectangle5(left_ float64, top_ float64, right_ float64) *Scintilla__Internal__PRectangle { - var outptr_Scintilla__Internal__PRectangle *C.Scintilla__Internal__PRectangle = nil - C.Scintilla__Internal__PRectangle_new5((C.double)(left_), (C.double)(top_), (C.double)(right_), &outptr_Scintilla__Internal__PRectangle) - ret := newScintilla__Internal__PRectangle(outptr_Scintilla__Internal__PRectangle) + ret := newScintilla__Internal__PRectangle(C.Scintilla__Internal__PRectangle_new5((C.double)(left_), (C.double)(top_), (C.double)(right_))) ret.isSubclass = true return ret } // NewScintilla__Internal__PRectangle6 constructs a new Scintilla::Internal::PRectangle object. func NewScintilla__Internal__PRectangle6(left_ float64, top_ float64, right_ float64, bottom_ float64) *Scintilla__Internal__PRectangle { - var outptr_Scintilla__Internal__PRectangle *C.Scintilla__Internal__PRectangle = nil - C.Scintilla__Internal__PRectangle_new6((C.double)(left_), (C.double)(top_), (C.double)(right_), (C.double)(bottom_), &outptr_Scintilla__Internal__PRectangle) - ret := newScintilla__Internal__PRectangle(outptr_Scintilla__Internal__PRectangle) + ret := newScintilla__Internal__PRectangle(C.Scintilla__Internal__PRectangle_new6((C.double)(left_), (C.double)(top_), (C.double)(right_), (C.double)(bottom_))) ret.isSubclass = true return ret } @@ -2098,74 +2069,59 @@ func newScintilla__Internal__ColourRGBA(h *C.Scintilla__Internal__ColourRGBA) *S if h == nil { return nil } + return &Scintilla__Internal__ColourRGBA{h: h} } // UnsafeNewScintilla__Internal__ColourRGBA constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__ColourRGBA(h unsafe.Pointer) *Scintilla__Internal__ColourRGBA { - if h == nil { - return nil - } - - return &Scintilla__Internal__ColourRGBA{h: (*C.Scintilla__Internal__ColourRGBA)(h)} + return newScintilla__Internal__ColourRGBA((*C.Scintilla__Internal__ColourRGBA)(h)) } // NewScintilla__Internal__ColourRGBA constructs a new Scintilla::Internal::ColourRGBA object. func NewScintilla__Internal__ColourRGBA() *Scintilla__Internal__ColourRGBA { - var outptr_Scintilla__Internal__ColourRGBA *C.Scintilla__Internal__ColourRGBA = nil - C.Scintilla__Internal__ColourRGBA_new(&outptr_Scintilla__Internal__ColourRGBA) - ret := newScintilla__Internal__ColourRGBA(outptr_Scintilla__Internal__ColourRGBA) + ret := newScintilla__Internal__ColourRGBA(C.Scintilla__Internal__ColourRGBA_new()) ret.isSubclass = true return ret } // NewScintilla__Internal__ColourRGBA2 constructs a new Scintilla::Internal::ColourRGBA object. func NewScintilla__Internal__ColourRGBA2(red uint, green uint, blue uint) *Scintilla__Internal__ColourRGBA { - var outptr_Scintilla__Internal__ColourRGBA *C.Scintilla__Internal__ColourRGBA = nil - C.Scintilla__Internal__ColourRGBA_new2((C.uint)(red), (C.uint)(green), (C.uint)(blue), &outptr_Scintilla__Internal__ColourRGBA) - ret := newScintilla__Internal__ColourRGBA(outptr_Scintilla__Internal__ColourRGBA) + ret := newScintilla__Internal__ColourRGBA(C.Scintilla__Internal__ColourRGBA_new2((C.uint)(red), (C.uint)(green), (C.uint)(blue))) ret.isSubclass = true return ret } // NewScintilla__Internal__ColourRGBA3 constructs a new Scintilla::Internal::ColourRGBA object. func NewScintilla__Internal__ColourRGBA3(cd Scintilla__Internal__ColourRGBA, alpha uint) *Scintilla__Internal__ColourRGBA { - var outptr_Scintilla__Internal__ColourRGBA *C.Scintilla__Internal__ColourRGBA = nil - C.Scintilla__Internal__ColourRGBA_new3(cd.cPointer(), (C.uint)(alpha), &outptr_Scintilla__Internal__ColourRGBA) - ret := newScintilla__Internal__ColourRGBA(outptr_Scintilla__Internal__ColourRGBA) + ret := newScintilla__Internal__ColourRGBA(C.Scintilla__Internal__ColourRGBA_new3(cd.cPointer(), (C.uint)(alpha))) ret.isSubclass = true return ret } // NewScintilla__Internal__ColourRGBA4 constructs a new Scintilla::Internal::ColourRGBA object. func NewScintilla__Internal__ColourRGBA4(param1 *Scintilla__Internal__ColourRGBA) *Scintilla__Internal__ColourRGBA { - var outptr_Scintilla__Internal__ColourRGBA *C.Scintilla__Internal__ColourRGBA = nil - C.Scintilla__Internal__ColourRGBA_new4(param1.cPointer(), &outptr_Scintilla__Internal__ColourRGBA) - ret := newScintilla__Internal__ColourRGBA(outptr_Scintilla__Internal__ColourRGBA) + ret := newScintilla__Internal__ColourRGBA(C.Scintilla__Internal__ColourRGBA_new4(param1.cPointer())) ret.isSubclass = true return ret } // NewScintilla__Internal__ColourRGBA5 constructs a new Scintilla::Internal::ColourRGBA object. func NewScintilla__Internal__ColourRGBA5(co_ int) *Scintilla__Internal__ColourRGBA { - var outptr_Scintilla__Internal__ColourRGBA *C.Scintilla__Internal__ColourRGBA = nil - C.Scintilla__Internal__ColourRGBA_new5((C.int)(co_), &outptr_Scintilla__Internal__ColourRGBA) - ret := newScintilla__Internal__ColourRGBA(outptr_Scintilla__Internal__ColourRGBA) + ret := newScintilla__Internal__ColourRGBA(C.Scintilla__Internal__ColourRGBA_new5((C.int)(co_))) ret.isSubclass = true return ret } // NewScintilla__Internal__ColourRGBA6 constructs a new Scintilla::Internal::ColourRGBA object. func NewScintilla__Internal__ColourRGBA6(red uint, green uint, blue uint, alpha uint) *Scintilla__Internal__ColourRGBA { - var outptr_Scintilla__Internal__ColourRGBA *C.Scintilla__Internal__ColourRGBA = nil - C.Scintilla__Internal__ColourRGBA_new6((C.uint)(red), (C.uint)(green), (C.uint)(blue), (C.uint)(alpha), &outptr_Scintilla__Internal__ColourRGBA) - ret := newScintilla__Internal__ColourRGBA(outptr_Scintilla__Internal__ColourRGBA) + ret := newScintilla__Internal__ColourRGBA(C.Scintilla__Internal__ColourRGBA_new6((C.uint)(red), (C.uint)(green), (C.uint)(blue), (C.uint)(alpha))) ret.isSubclass = true return ret } @@ -2308,44 +2264,35 @@ func newScintilla__Internal__Stroke(h *C.Scintilla__Internal__Stroke) *Scintilla if h == nil { return nil } + return &Scintilla__Internal__Stroke{h: h} } // UnsafeNewScintilla__Internal__Stroke constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Stroke(h unsafe.Pointer) *Scintilla__Internal__Stroke { - if h == nil { - return nil - } - - return &Scintilla__Internal__Stroke{h: (*C.Scintilla__Internal__Stroke)(h)} + return newScintilla__Internal__Stroke((*C.Scintilla__Internal__Stroke)(h)) } // NewScintilla__Internal__Stroke constructs a new Scintilla::Internal::Stroke object. func NewScintilla__Internal__Stroke(colour_ Scintilla__Internal__ColourRGBA) *Scintilla__Internal__Stroke { - var outptr_Scintilla__Internal__Stroke *C.Scintilla__Internal__Stroke = nil - C.Scintilla__Internal__Stroke_new(colour_.cPointer(), &outptr_Scintilla__Internal__Stroke) - ret := newScintilla__Internal__Stroke(outptr_Scintilla__Internal__Stroke) + ret := newScintilla__Internal__Stroke(C.Scintilla__Internal__Stroke_new(colour_.cPointer())) ret.isSubclass = true return ret } // NewScintilla__Internal__Stroke2 constructs a new Scintilla::Internal::Stroke object. func NewScintilla__Internal__Stroke2(param1 *Scintilla__Internal__Stroke) *Scintilla__Internal__Stroke { - var outptr_Scintilla__Internal__Stroke *C.Scintilla__Internal__Stroke = nil - C.Scintilla__Internal__Stroke_new2(param1.cPointer(), &outptr_Scintilla__Internal__Stroke) - ret := newScintilla__Internal__Stroke(outptr_Scintilla__Internal__Stroke) + ret := newScintilla__Internal__Stroke(C.Scintilla__Internal__Stroke_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewScintilla__Internal__Stroke3 constructs a new Scintilla::Internal::Stroke object. func NewScintilla__Internal__Stroke3(colour_ Scintilla__Internal__ColourRGBA, width_ float64) *Scintilla__Internal__Stroke { - var outptr_Scintilla__Internal__Stroke *C.Scintilla__Internal__Stroke = nil - C.Scintilla__Internal__Stroke_new3(colour_.cPointer(), (C.double)(width_), &outptr_Scintilla__Internal__Stroke) - ret := newScintilla__Internal__Stroke(outptr_Scintilla__Internal__Stroke) + ret := newScintilla__Internal__Stroke(C.Scintilla__Internal__Stroke_new3(colour_.cPointer(), (C.double)(width_))) ret.isSubclass = true return ret } @@ -2392,34 +2339,27 @@ func newScintilla__Internal__Fill(h *C.Scintilla__Internal__Fill) *Scintilla__In if h == nil { return nil } + return &Scintilla__Internal__Fill{h: h} } // UnsafeNewScintilla__Internal__Fill constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Fill(h unsafe.Pointer) *Scintilla__Internal__Fill { - if h == nil { - return nil - } - - return &Scintilla__Internal__Fill{h: (*C.Scintilla__Internal__Fill)(h)} + return newScintilla__Internal__Fill((*C.Scintilla__Internal__Fill)(h)) } // NewScintilla__Internal__Fill constructs a new Scintilla::Internal::Fill object. func NewScintilla__Internal__Fill(colour_ Scintilla__Internal__ColourRGBA) *Scintilla__Internal__Fill { - var outptr_Scintilla__Internal__Fill *C.Scintilla__Internal__Fill = nil - C.Scintilla__Internal__Fill_new(colour_.cPointer(), &outptr_Scintilla__Internal__Fill) - ret := newScintilla__Internal__Fill(outptr_Scintilla__Internal__Fill) + ret := newScintilla__Internal__Fill(C.Scintilla__Internal__Fill_new(colour_.cPointer())) ret.isSubclass = true return ret } // NewScintilla__Internal__Fill2 constructs a new Scintilla::Internal::Fill object. func NewScintilla__Internal__Fill2(param1 *Scintilla__Internal__Fill) *Scintilla__Internal__Fill { - var outptr_Scintilla__Internal__Fill *C.Scintilla__Internal__Fill = nil - C.Scintilla__Internal__Fill_new2(param1.cPointer(), &outptr_Scintilla__Internal__Fill) - ret := newScintilla__Internal__Fill(outptr_Scintilla__Internal__Fill) + ret := newScintilla__Internal__Fill(C.Scintilla__Internal__Fill_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -2462,54 +2402,43 @@ func newScintilla__Internal__FillStroke(h *C.Scintilla__Internal__FillStroke) *S if h == nil { return nil } + return &Scintilla__Internal__FillStroke{h: h} } // UnsafeNewScintilla__Internal__FillStroke constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__FillStroke(h unsafe.Pointer) *Scintilla__Internal__FillStroke { - if h == nil { - return nil - } - - return &Scintilla__Internal__FillStroke{h: (*C.Scintilla__Internal__FillStroke)(h)} + return newScintilla__Internal__FillStroke((*C.Scintilla__Internal__FillStroke)(h)) } // NewScintilla__Internal__FillStroke constructs a new Scintilla::Internal::FillStroke object. func NewScintilla__Internal__FillStroke(colourFill_ Scintilla__Internal__ColourRGBA, colourStroke_ Scintilla__Internal__ColourRGBA) *Scintilla__Internal__FillStroke { - var outptr_Scintilla__Internal__FillStroke *C.Scintilla__Internal__FillStroke = nil - C.Scintilla__Internal__FillStroke_new(colourFill_.cPointer(), colourStroke_.cPointer(), &outptr_Scintilla__Internal__FillStroke) - ret := newScintilla__Internal__FillStroke(outptr_Scintilla__Internal__FillStroke) + ret := newScintilla__Internal__FillStroke(C.Scintilla__Internal__FillStroke_new(colourFill_.cPointer(), colourStroke_.cPointer())) ret.isSubclass = true return ret } // NewScintilla__Internal__FillStroke2 constructs a new Scintilla::Internal::FillStroke object. func NewScintilla__Internal__FillStroke2(colourBoth Scintilla__Internal__ColourRGBA) *Scintilla__Internal__FillStroke { - var outptr_Scintilla__Internal__FillStroke *C.Scintilla__Internal__FillStroke = nil - C.Scintilla__Internal__FillStroke_new2(colourBoth.cPointer(), &outptr_Scintilla__Internal__FillStroke) - ret := newScintilla__Internal__FillStroke(outptr_Scintilla__Internal__FillStroke) + ret := newScintilla__Internal__FillStroke(C.Scintilla__Internal__FillStroke_new2(colourBoth.cPointer())) ret.isSubclass = true return ret } // NewScintilla__Internal__FillStroke3 constructs a new Scintilla::Internal::FillStroke object. func NewScintilla__Internal__FillStroke3(colourFill_ Scintilla__Internal__ColourRGBA, colourStroke_ Scintilla__Internal__ColourRGBA, widthStroke_ float64) *Scintilla__Internal__FillStroke { - var outptr_Scintilla__Internal__FillStroke *C.Scintilla__Internal__FillStroke = nil - C.Scintilla__Internal__FillStroke_new3(colourFill_.cPointer(), colourStroke_.cPointer(), (C.double)(widthStroke_), &outptr_Scintilla__Internal__FillStroke) - ret := newScintilla__Internal__FillStroke(outptr_Scintilla__Internal__FillStroke) + ret := newScintilla__Internal__FillStroke(C.Scintilla__Internal__FillStroke_new3(colourFill_.cPointer(), colourStroke_.cPointer(), (C.double)(widthStroke_))) ret.isSubclass = true return ret } // NewScintilla__Internal__FillStroke4 constructs a new Scintilla::Internal::FillStroke object. func NewScintilla__Internal__FillStroke4(colourBoth Scintilla__Internal__ColourRGBA, widthStroke_ float64) *Scintilla__Internal__FillStroke { - var outptr_Scintilla__Internal__FillStroke *C.Scintilla__Internal__FillStroke = nil - C.Scintilla__Internal__FillStroke_new4(colourBoth.cPointer(), (C.double)(widthStroke_), &outptr_Scintilla__Internal__FillStroke) - ret := newScintilla__Internal__FillStroke(outptr_Scintilla__Internal__FillStroke) + ret := newScintilla__Internal__FillStroke(C.Scintilla__Internal__FillStroke_new4(colourBoth.cPointer(), (C.double)(widthStroke_))) ret.isSubclass = true return ret } @@ -2552,24 +2481,19 @@ func newScintilla__Internal__ColourStop(h *C.Scintilla__Internal__ColourStop) *S if h == nil { return nil } + return &Scintilla__Internal__ColourStop{h: h} } // UnsafeNewScintilla__Internal__ColourStop constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__ColourStop(h unsafe.Pointer) *Scintilla__Internal__ColourStop { - if h == nil { - return nil - } - - return &Scintilla__Internal__ColourStop{h: (*C.Scintilla__Internal__ColourStop)(h)} + return newScintilla__Internal__ColourStop((*C.Scintilla__Internal__ColourStop)(h)) } // NewScintilla__Internal__ColourStop constructs a new Scintilla::Internal::ColourStop object. func NewScintilla__Internal__ColourStop(position_ float64, colour_ Scintilla__Internal__ColourRGBA) *Scintilla__Internal__ColourStop { - var outptr_Scintilla__Internal__ColourStop *C.Scintilla__Internal__ColourStop = nil - C.Scintilla__Internal__ColourStop_new((C.double)(position_), colour_.cPointer(), &outptr_Scintilla__Internal__ColourStop) - ret := newScintilla__Internal__ColourStop(outptr_Scintilla__Internal__ColourStop) + ret := newScintilla__Internal__ColourStop(C.Scintilla__Internal__ColourStop_new((C.double)(position_), colour_.cPointer())) ret.isSubclass = true return ret } @@ -2612,16 +2536,13 @@ func newScintilla__CharacterRange(h *C.Scintilla__CharacterRange) *Scintilla__Ch if h == nil { return nil } + return &Scintilla__CharacterRange{h: h} } // UnsafeNewScintilla__CharacterRange constructs the type using only unsafe pointers. func UnsafeNewScintilla__CharacterRange(h unsafe.Pointer) *Scintilla__CharacterRange { - if h == nil { - return nil - } - - return &Scintilla__CharacterRange{h: (*C.Scintilla__CharacterRange)(h)} + return newScintilla__CharacterRange((*C.Scintilla__CharacterRange)(h)) } // Delete this object from C++ memory. @@ -2662,16 +2583,13 @@ func newScintilla__CharacterRangeFull(h *C.Scintilla__CharacterRangeFull) *Scint if h == nil { return nil } + return &Scintilla__CharacterRangeFull{h: h} } // UnsafeNewScintilla__CharacterRangeFull constructs the type using only unsafe pointers. func UnsafeNewScintilla__CharacterRangeFull(h unsafe.Pointer) *Scintilla__CharacterRangeFull { - if h == nil { - return nil - } - - return &Scintilla__CharacterRangeFull{h: (*C.Scintilla__CharacterRangeFull)(h)} + return newScintilla__CharacterRangeFull((*C.Scintilla__CharacterRangeFull)(h)) } // Delete this object from C++ memory. @@ -2712,16 +2630,13 @@ func newScintilla__TextRange(h *C.Scintilla__TextRange) *Scintilla__TextRange { if h == nil { return nil } + return &Scintilla__TextRange{h: h} } // UnsafeNewScintilla__TextRange constructs the type using only unsafe pointers. func UnsafeNewScintilla__TextRange(h unsafe.Pointer) *Scintilla__TextRange { - if h == nil { - return nil - } - - return &Scintilla__TextRange{h: (*C.Scintilla__TextRange)(h)} + return newScintilla__TextRange((*C.Scintilla__TextRange)(h)) } // Delete this object from C++ memory. @@ -2762,16 +2677,13 @@ func newScintilla__TextRangeFull(h *C.Scintilla__TextRangeFull) *Scintilla__Text if h == nil { return nil } + return &Scintilla__TextRangeFull{h: h} } // UnsafeNewScintilla__TextRangeFull constructs the type using only unsafe pointers. func UnsafeNewScintilla__TextRangeFull(h unsafe.Pointer) *Scintilla__TextRangeFull { - if h == nil { - return nil - } - - return &Scintilla__TextRangeFull{h: (*C.Scintilla__TextRangeFull)(h)} + return newScintilla__TextRangeFull((*C.Scintilla__TextRangeFull)(h)) } // Delete this object from C++ memory. @@ -2812,16 +2724,13 @@ func newScintilla__TextToFind(h *C.Scintilla__TextToFind) *Scintilla__TextToFind if h == nil { return nil } + return &Scintilla__TextToFind{h: h} } // UnsafeNewScintilla__TextToFind constructs the type using only unsafe pointers. func UnsafeNewScintilla__TextToFind(h unsafe.Pointer) *Scintilla__TextToFind { - if h == nil { - return nil - } - - return &Scintilla__TextToFind{h: (*C.Scintilla__TextToFind)(h)} + return newScintilla__TextToFind((*C.Scintilla__TextToFind)(h)) } // Delete this object from C++ memory. @@ -2862,16 +2771,13 @@ func newScintilla__TextToFindFull(h *C.Scintilla__TextToFindFull) *Scintilla__Te if h == nil { return nil } + return &Scintilla__TextToFindFull{h: h} } // UnsafeNewScintilla__TextToFindFull constructs the type using only unsafe pointers. func UnsafeNewScintilla__TextToFindFull(h unsafe.Pointer) *Scintilla__TextToFindFull { - if h == nil { - return nil - } - - return &Scintilla__TextToFindFull{h: (*C.Scintilla__TextToFindFull)(h)} + return newScintilla__TextToFindFull((*C.Scintilla__TextToFindFull)(h)) } // Delete this object from C++ memory. @@ -2912,16 +2818,13 @@ func newScintilla__Rectangle(h *C.Scintilla__Rectangle) *Scintilla__Rectangle { if h == nil { return nil } + return &Scintilla__Rectangle{h: h} } // UnsafeNewScintilla__Rectangle constructs the type using only unsafe pointers. func UnsafeNewScintilla__Rectangle(h unsafe.Pointer) *Scintilla__Rectangle { - if h == nil { - return nil - } - - return &Scintilla__Rectangle{h: (*C.Scintilla__Rectangle)(h)} + return newScintilla__Rectangle((*C.Scintilla__Rectangle)(h)) } // Delete this object from C++ memory. @@ -2962,16 +2865,13 @@ func newScintilla__RangeToFormat(h *C.Scintilla__RangeToFormat) *Scintilla__Rang if h == nil { return nil } + return &Scintilla__RangeToFormat{h: h} } // UnsafeNewScintilla__RangeToFormat constructs the type using only unsafe pointers. func UnsafeNewScintilla__RangeToFormat(h unsafe.Pointer) *Scintilla__RangeToFormat { - if h == nil { - return nil - } - - return &Scintilla__RangeToFormat{h: (*C.Scintilla__RangeToFormat)(h)} + return newScintilla__RangeToFormat((*C.Scintilla__RangeToFormat)(h)) } // Delete this object from C++ memory. @@ -3012,16 +2912,13 @@ func newScintilla__RangeToFormatFull(h *C.Scintilla__RangeToFormatFull) *Scintil if h == nil { return nil } + return &Scintilla__RangeToFormatFull{h: h} } // UnsafeNewScintilla__RangeToFormatFull constructs the type using only unsafe pointers. func UnsafeNewScintilla__RangeToFormatFull(h unsafe.Pointer) *Scintilla__RangeToFormatFull { - if h == nil { - return nil - } - - return &Scintilla__RangeToFormatFull{h: (*C.Scintilla__RangeToFormatFull)(h)} + return newScintilla__RangeToFormatFull((*C.Scintilla__RangeToFormatFull)(h)) } // Delete this object from C++ memory. @@ -3062,16 +2959,13 @@ func newScintilla__NotifyHeader(h *C.Scintilla__NotifyHeader) *Scintilla__Notify if h == nil { return nil } + return &Scintilla__NotifyHeader{h: h} } // UnsafeNewScintilla__NotifyHeader constructs the type using only unsafe pointers. func UnsafeNewScintilla__NotifyHeader(h unsafe.Pointer) *Scintilla__NotifyHeader { - if h == nil { - return nil - } - - return &Scintilla__NotifyHeader{h: (*C.Scintilla__NotifyHeader)(h)} + return newScintilla__NotifyHeader((*C.Scintilla__NotifyHeader)(h)) } // Delete this object from C++ memory. @@ -3112,16 +3006,13 @@ func newScintilla__NotificationData(h *C.Scintilla__NotificationData) *Scintilla if h == nil { return nil } + return &Scintilla__NotificationData{h: h} } // UnsafeNewScintilla__NotificationData constructs the type using only unsafe pointers. func UnsafeNewScintilla__NotificationData(h unsafe.Pointer) *Scintilla__NotificationData { - if h == nil { - return nil - } - - return &Scintilla__NotificationData{h: (*C.Scintilla__NotificationData)(h)} + return newScintilla__NotificationData((*C.Scintilla__NotificationData)(h)) } // Delete this object from C++ memory. @@ -3162,26 +3053,21 @@ func newScintilla__Internal__FontParameters(h *C.Scintilla__Internal__FontParame if h == nil { return nil } + return &Scintilla__Internal__FontParameters{h: h} } // UnsafeNewScintilla__Internal__FontParameters constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__FontParameters(h unsafe.Pointer) *Scintilla__Internal__FontParameters { - if h == nil { - return nil - } - - return &Scintilla__Internal__FontParameters{h: (*C.Scintilla__Internal__FontParameters)(h)} + return newScintilla__Internal__FontParameters((*C.Scintilla__Internal__FontParameters)(h)) } // NewScintilla__Internal__FontParameters constructs a new Scintilla::Internal::FontParameters object. func NewScintilla__Internal__FontParameters(faceName_ string) *Scintilla__Internal__FontParameters { faceName__Cstring := C.CString(faceName_) defer C.free(unsafe.Pointer(faceName__Cstring)) - var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil - C.Scintilla__Internal__FontParameters_new(faceName__Cstring, &outptr_Scintilla__Internal__FontParameters) - ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(C.Scintilla__Internal__FontParameters_new(faceName__Cstring)) ret.isSubclass = true return ret } @@ -3190,10 +3076,8 @@ func NewScintilla__Internal__FontParameters(faceName_ string) *Scintilla__Intern func NewScintilla__Internal__FontParameters2(faceName_ string, size_ float64) *Scintilla__Internal__FontParameters { faceName__Cstring := C.CString(faceName_) defer C.free(unsafe.Pointer(faceName__Cstring)) - var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil - C.Scintilla__Internal__FontParameters_new2(faceName__Cstring, (C.double)(size_), &outptr_Scintilla__Internal__FontParameters) - ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(C.Scintilla__Internal__FontParameters_new2(faceName__Cstring, (C.double)(size_))) ret.isSubclass = true return ret } @@ -3202,10 +3086,8 @@ func NewScintilla__Internal__FontParameters2(faceName_ string, size_ float64) *S func NewScintilla__Internal__FontParameters3(faceName_ string, size_ float64, weight_ Scintilla__FontWeight) *Scintilla__Internal__FontParameters { faceName__Cstring := C.CString(faceName_) defer C.free(unsafe.Pointer(faceName__Cstring)) - var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil - C.Scintilla__Internal__FontParameters_new3(faceName__Cstring, (C.double)(size_), (C.int)(weight_), &outptr_Scintilla__Internal__FontParameters) - ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(C.Scintilla__Internal__FontParameters_new3(faceName__Cstring, (C.double)(size_), (C.int)(weight_))) ret.isSubclass = true return ret } @@ -3214,10 +3096,8 @@ func NewScintilla__Internal__FontParameters3(faceName_ string, size_ float64, we func NewScintilla__Internal__FontParameters4(faceName_ string, size_ float64, weight_ Scintilla__FontWeight, italic_ bool) *Scintilla__Internal__FontParameters { faceName__Cstring := C.CString(faceName_) defer C.free(unsafe.Pointer(faceName__Cstring)) - var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil - C.Scintilla__Internal__FontParameters_new4(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), &outptr_Scintilla__Internal__FontParameters) - ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(C.Scintilla__Internal__FontParameters_new4(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_))) ret.isSubclass = true return ret } @@ -3226,10 +3106,8 @@ func NewScintilla__Internal__FontParameters4(faceName_ string, size_ float64, we func NewScintilla__Internal__FontParameters5(faceName_ string, size_ float64, weight_ Scintilla__FontWeight, italic_ bool, extraFontFlag_ Scintilla__FontQuality) *Scintilla__Internal__FontParameters { faceName__Cstring := C.CString(faceName_) defer C.free(unsafe.Pointer(faceName__Cstring)) - var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil - C.Scintilla__Internal__FontParameters_new5(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), &outptr_Scintilla__Internal__FontParameters) - ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(C.Scintilla__Internal__FontParameters_new5(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_))) ret.isSubclass = true return ret } @@ -3238,10 +3116,8 @@ func NewScintilla__Internal__FontParameters5(faceName_ string, size_ float64, we func NewScintilla__Internal__FontParameters6(faceName_ string, size_ float64, weight_ Scintilla__FontWeight, italic_ bool, extraFontFlag_ Scintilla__FontQuality, technology_ Scintilla__Technology) *Scintilla__Internal__FontParameters { faceName__Cstring := C.CString(faceName_) defer C.free(unsafe.Pointer(faceName__Cstring)) - var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil - C.Scintilla__Internal__FontParameters_new6(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_), &outptr_Scintilla__Internal__FontParameters) - ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(C.Scintilla__Internal__FontParameters_new6(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_))) ret.isSubclass = true return ret } @@ -3250,10 +3126,8 @@ func NewScintilla__Internal__FontParameters6(faceName_ string, size_ float64, we func NewScintilla__Internal__FontParameters7(faceName_ string, size_ float64, weight_ Scintilla__FontWeight, italic_ bool, extraFontFlag_ Scintilla__FontQuality, technology_ Scintilla__Technology, characterSet_ Scintilla__CharacterSet) *Scintilla__Internal__FontParameters { faceName__Cstring := C.CString(faceName_) defer C.free(unsafe.Pointer(faceName__Cstring)) - var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil - C.Scintilla__Internal__FontParameters_new7(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_), (C.int)(characterSet_), &outptr_Scintilla__Internal__FontParameters) - ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(C.Scintilla__Internal__FontParameters_new7(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_), (C.int)(characterSet_))) ret.isSubclass = true return ret } @@ -3264,10 +3138,8 @@ func NewScintilla__Internal__FontParameters8(faceName_ string, size_ float64, we defer C.free(unsafe.Pointer(faceName__Cstring)) localeName__Cstring := C.CString(localeName_) defer C.free(unsafe.Pointer(localeName__Cstring)) - var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil - C.Scintilla__Internal__FontParameters_new8(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_), (C.int)(characterSet_), localeName__Cstring, &outptr_Scintilla__Internal__FontParameters) - ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(C.Scintilla__Internal__FontParameters_new8(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_), (C.int)(characterSet_), localeName__Cstring)) ret.isSubclass = true return ret } @@ -3278,10 +3150,8 @@ func NewScintilla__Internal__FontParameters9(faceName_ string, size_ float64, we defer C.free(unsafe.Pointer(faceName__Cstring)) localeName__Cstring := C.CString(localeName_) defer C.free(unsafe.Pointer(localeName__Cstring)) - var outptr_Scintilla__Internal__FontParameters *C.Scintilla__Internal__FontParameters = nil - C.Scintilla__Internal__FontParameters_new9(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_), (C.int)(characterSet_), localeName__Cstring, (C.int)(stretch_), &outptr_Scintilla__Internal__FontParameters) - ret := newScintilla__Internal__FontParameters(outptr_Scintilla__Internal__FontParameters) + ret := newScintilla__Internal__FontParameters(C.Scintilla__Internal__FontParameters_new9(faceName__Cstring, (C.double)(size_), (C.int)(weight_), (C.bool)(italic_), (C.int)(extraFontFlag_), (C.int)(technology_), (C.int)(characterSet_), localeName__Cstring, (C.int)(stretch_))) ret.isSubclass = true return ret } @@ -3324,24 +3194,19 @@ func newScintilla__Internal__Font(h *C.Scintilla__Internal__Font) *Scintilla__In if h == nil { return nil } + return &Scintilla__Internal__Font{h: h} } // UnsafeNewScintilla__Internal__Font constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Font(h unsafe.Pointer) *Scintilla__Internal__Font { - if h == nil { - return nil - } - - return &Scintilla__Internal__Font{h: (*C.Scintilla__Internal__Font)(h)} + return newScintilla__Internal__Font((*C.Scintilla__Internal__Font)(h)) } // NewScintilla__Internal__Font constructs a new Scintilla::Internal::Font object. func NewScintilla__Internal__Font() *Scintilla__Internal__Font { - var outptr_Scintilla__Internal__Font *C.Scintilla__Internal__Font = nil - C.Scintilla__Internal__Font_new(&outptr_Scintilla__Internal__Font) - ret := newScintilla__Internal__Font(outptr_Scintilla__Internal__Font) + ret := newScintilla__Internal__Font(C.Scintilla__Internal__Font_new()) ret.isSubclass = true return ret } @@ -3384,16 +3249,13 @@ func newScintilla__Internal__IScreenLine(h *C.Scintilla__Internal__IScreenLine) if h == nil { return nil } + return &Scintilla__Internal__IScreenLine{h: h} } // UnsafeNewScintilla__Internal__IScreenLine constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__IScreenLine(h unsafe.Pointer) *Scintilla__Internal__IScreenLine { - if h == nil { - return nil - } - - return &Scintilla__Internal__IScreenLine{h: (*C.Scintilla__Internal__IScreenLine)(h)} + return newScintilla__Internal__IScreenLine((*C.Scintilla__Internal__IScreenLine)(h)) } func (this *Scintilla__Internal__IScreenLine) Length() uint64 { @@ -3474,16 +3336,13 @@ func newScintilla__Internal__IScreenLineLayout(h *C.Scintilla__Internal__IScreen if h == nil { return nil } + return &Scintilla__Internal__IScreenLineLayout{h: h} } // UnsafeNewScintilla__Internal__IScreenLineLayout constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__IScreenLineLayout(h unsafe.Pointer) *Scintilla__Internal__IScreenLineLayout { - if h == nil { - return nil - } - - return &Scintilla__Internal__IScreenLineLayout{h: (*C.Scintilla__Internal__IScreenLineLayout)(h)} + return newScintilla__Internal__IScreenLineLayout((*C.Scintilla__Internal__IScreenLineLayout)(h)) } func (this *Scintilla__Internal__IScreenLineLayout) PositionFromX(xDistance float64, charPosition bool) uint64 { @@ -3536,34 +3395,27 @@ func newScintilla__Internal__SurfaceMode(h *C.Scintilla__Internal__SurfaceMode) if h == nil { return nil } + return &Scintilla__Internal__SurfaceMode{h: h} } // UnsafeNewScintilla__Internal__SurfaceMode constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__SurfaceMode(h unsafe.Pointer) *Scintilla__Internal__SurfaceMode { - if h == nil { - return nil - } - - return &Scintilla__Internal__SurfaceMode{h: (*C.Scintilla__Internal__SurfaceMode)(h)} + return newScintilla__Internal__SurfaceMode((*C.Scintilla__Internal__SurfaceMode)(h)) } // NewScintilla__Internal__SurfaceMode constructs a new Scintilla::Internal::SurfaceMode object. func NewScintilla__Internal__SurfaceMode() *Scintilla__Internal__SurfaceMode { - var outptr_Scintilla__Internal__SurfaceMode *C.Scintilla__Internal__SurfaceMode = nil - C.Scintilla__Internal__SurfaceMode_new(&outptr_Scintilla__Internal__SurfaceMode) - ret := newScintilla__Internal__SurfaceMode(outptr_Scintilla__Internal__SurfaceMode) + ret := newScintilla__Internal__SurfaceMode(C.Scintilla__Internal__SurfaceMode_new()) ret.isSubclass = true return ret } // NewScintilla__Internal__SurfaceMode2 constructs a new Scintilla::Internal::SurfaceMode object. func NewScintilla__Internal__SurfaceMode2(codePage_ int, bidiR2L_ bool) *Scintilla__Internal__SurfaceMode { - var outptr_Scintilla__Internal__SurfaceMode *C.Scintilla__Internal__SurfaceMode = nil - C.Scintilla__Internal__SurfaceMode_new2((C.int)(codePage_), (C.bool)(bidiR2L_), &outptr_Scintilla__Internal__SurfaceMode) - ret := newScintilla__Internal__SurfaceMode(outptr_Scintilla__Internal__SurfaceMode) + ret := newScintilla__Internal__SurfaceMode(C.Scintilla__Internal__SurfaceMode_new2((C.int)(codePage_), (C.bool)(bidiR2L_))) ret.isSubclass = true return ret } @@ -3606,24 +3458,19 @@ func newScintilla__Internal__Surface(h *C.Scintilla__Internal__Surface) *Scintil if h == nil { return nil } + return &Scintilla__Internal__Surface{h: h} } // UnsafeNewScintilla__Internal__Surface constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Surface(h unsafe.Pointer) *Scintilla__Internal__Surface { - if h == nil { - return nil - } - - return &Scintilla__Internal__Surface{h: (*C.Scintilla__Internal__Surface)(h)} + return newScintilla__Internal__Surface((*C.Scintilla__Internal__Surface)(h)) } // NewScintilla__Internal__Surface constructs a new Scintilla::Internal::Surface object. func NewScintilla__Internal__Surface() *Scintilla__Internal__Surface { - var outptr_Scintilla__Internal__Surface *C.Scintilla__Internal__Surface = nil - C.Scintilla__Internal__Surface_new(&outptr_Scintilla__Internal__Surface) - ret := newScintilla__Internal__Surface(outptr_Scintilla__Internal__Surface) + ret := newScintilla__Internal__Surface(C.Scintilla__Internal__Surface_new()) ret.isSubclass = true return ret } @@ -4533,24 +4380,19 @@ func newScintilla__Internal__Window(h *C.Scintilla__Internal__Window) *Scintilla if h == nil { return nil } + return &Scintilla__Internal__Window{h: h} } // UnsafeNewScintilla__Internal__Window constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Window(h unsafe.Pointer) *Scintilla__Internal__Window { - if h == nil { - return nil - } - - return &Scintilla__Internal__Window{h: (*C.Scintilla__Internal__Window)(h)} + return newScintilla__Internal__Window((*C.Scintilla__Internal__Window)(h)) } // NewScintilla__Internal__Window constructs a new Scintilla::Internal::Window object. func NewScintilla__Internal__Window() *Scintilla__Internal__Window { - var outptr_Scintilla__Internal__Window *C.Scintilla__Internal__Window = nil - C.Scintilla__Internal__Window_new(&outptr_Scintilla__Internal__Window) - ret := newScintilla__Internal__Window(outptr_Scintilla__Internal__Window) + ret := newScintilla__Internal__Window(C.Scintilla__Internal__Window_new()) ret.isSubclass = true return ret } @@ -4655,24 +4497,19 @@ func newScintilla__Internal__ListBoxEvent(h *C.Scintilla__Internal__ListBoxEvent if h == nil { return nil } + return &Scintilla__Internal__ListBoxEvent{h: h} } // UnsafeNewScintilla__Internal__ListBoxEvent constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__ListBoxEvent(h unsafe.Pointer) *Scintilla__Internal__ListBoxEvent { - if h == nil { - return nil - } - - return &Scintilla__Internal__ListBoxEvent{h: (*C.Scintilla__Internal__ListBoxEvent)(h)} + return newScintilla__Internal__ListBoxEvent((*C.Scintilla__Internal__ListBoxEvent)(h)) } // NewScintilla__Internal__ListBoxEvent constructs a new Scintilla::Internal::ListBoxEvent object. func NewScintilla__Internal__ListBoxEvent(event_ Scintilla__Internal__ListBoxEvent__EventType) *Scintilla__Internal__ListBoxEvent { - var outptr_Scintilla__Internal__ListBoxEvent *C.Scintilla__Internal__ListBoxEvent = nil - C.Scintilla__Internal__ListBoxEvent_new((C.int)(event_), &outptr_Scintilla__Internal__ListBoxEvent) - ret := newScintilla__Internal__ListBoxEvent(outptr_Scintilla__Internal__ListBoxEvent) + ret := newScintilla__Internal__ListBoxEvent(C.Scintilla__Internal__ListBoxEvent_new((C.int)(event_))) ret.isSubclass = true return ret } @@ -4715,16 +4552,13 @@ func newScintilla__Internal__IListBoxDelegate(h *C.Scintilla__Internal__IListBox if h == nil { return nil } + return &Scintilla__Internal__IListBoxDelegate{h: h} } // UnsafeNewScintilla__Internal__IListBoxDelegate constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__IListBoxDelegate(h unsafe.Pointer) *Scintilla__Internal__IListBoxDelegate { - if h == nil { - return nil - } - - return &Scintilla__Internal__IListBoxDelegate{h: (*C.Scintilla__Internal__IListBoxDelegate)(h)} + return newScintilla__Internal__IListBoxDelegate((*C.Scintilla__Internal__IListBoxDelegate)(h)) } func (this *Scintilla__Internal__IListBoxDelegate) ListNotify(plbe *Scintilla__Internal__ListBoxEvent) { @@ -4773,16 +4607,13 @@ func newScintilla__Internal__ListOptions(h *C.Scintilla__Internal__ListOptions) if h == nil { return nil } + return &Scintilla__Internal__ListOptions{h: h} } // UnsafeNewScintilla__Internal__ListOptions constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__ListOptions(h unsafe.Pointer) *Scintilla__Internal__ListOptions { - if h == nil { - return nil - } - - return &Scintilla__Internal__ListOptions{h: (*C.Scintilla__Internal__ListOptions)(h)} + return newScintilla__Internal__ListOptions((*C.Scintilla__Internal__ListOptions)(h)) } // Delete this object from C++ memory. @@ -4820,31 +4651,26 @@ func (this *Scintilla__Internal__ListBox) UnsafePointer() unsafe.Pointer { } // newScintilla__Internal__ListBox constructs the type using only CGO pointers. -func newScintilla__Internal__ListBox(h *C.Scintilla__Internal__ListBox, h_Scintilla__Internal__Window *C.Scintilla__Internal__Window) *Scintilla__Internal__ListBox { +func newScintilla__Internal__ListBox(h *C.Scintilla__Internal__ListBox) *Scintilla__Internal__ListBox { if h == nil { return nil } + var outptr_Scintilla__Internal__Window *C.Scintilla__Internal__Window = nil + C.Scintilla__Internal__ListBox_virtbase(h, &outptr_Scintilla__Internal__Window) + return &Scintilla__Internal__ListBox{h: h, - Scintilla__Internal__Window: newScintilla__Internal__Window(h_Scintilla__Internal__Window)} + Scintilla__Internal__Window: newScintilla__Internal__Window(outptr_Scintilla__Internal__Window)} } // UnsafeNewScintilla__Internal__ListBox constructs the type using only unsafe pointers. -func UnsafeNewScintilla__Internal__ListBox(h unsafe.Pointer, h_Scintilla__Internal__Window unsafe.Pointer) *Scintilla__Internal__ListBox { - if h == nil { - return nil - } - - return &Scintilla__Internal__ListBox{h: (*C.Scintilla__Internal__ListBox)(h), - Scintilla__Internal__Window: UnsafeNewScintilla__Internal__Window(h_Scintilla__Internal__Window)} +func UnsafeNewScintilla__Internal__ListBox(h unsafe.Pointer) *Scintilla__Internal__ListBox { + return newScintilla__Internal__ListBox((*C.Scintilla__Internal__ListBox)(h)) } // NewScintilla__Internal__ListBox constructs a new Scintilla::Internal::ListBox object. func NewScintilla__Internal__ListBox() *Scintilla__Internal__ListBox { - var outptr_Scintilla__Internal__ListBox *C.Scintilla__Internal__ListBox = nil - var outptr_Scintilla__Internal__Window *C.Scintilla__Internal__Window = nil - C.Scintilla__Internal__ListBox_new(&outptr_Scintilla__Internal__ListBox, &outptr_Scintilla__Internal__Window) - ret := newScintilla__Internal__ListBox(outptr_Scintilla__Internal__ListBox, outptr_Scintilla__Internal__Window) + ret := newScintilla__Internal__ListBox(C.Scintilla__Internal__ListBox_new()) ret.isSubclass = true return ret } @@ -5376,24 +5202,19 @@ func newScintilla__Internal__Menu(h *C.Scintilla__Internal__Menu) *Scintilla__In if h == nil { return nil } + return &Scintilla__Internal__Menu{h: h} } // UnsafeNewScintilla__Internal__Menu constructs the type using only unsafe pointers. func UnsafeNewScintilla__Internal__Menu(h unsafe.Pointer) *Scintilla__Internal__Menu { - if h == nil { - return nil - } - - return &Scintilla__Internal__Menu{h: (*C.Scintilla__Internal__Menu)(h)} + return newScintilla__Internal__Menu((*C.Scintilla__Internal__Menu)(h)) } // NewScintilla__Internal__Menu constructs a new Scintilla::Internal::Menu object. func NewScintilla__Internal__Menu() *Scintilla__Internal__Menu { - var outptr_Scintilla__Internal__Menu *C.Scintilla__Internal__Menu = nil - C.Scintilla__Internal__Menu_new(&outptr_Scintilla__Internal__Menu) - ret := newScintilla__Internal__Menu(outptr_Scintilla__Internal__Menu) + ret := newScintilla__Internal__Menu(C.Scintilla__Internal__Menu_new()) ret.isSubclass = true return ret } @@ -5452,16 +5273,13 @@ func newSci_CharacterRange(h *C.Sci_CharacterRange) *Sci_CharacterRange { if h == nil { return nil } + return &Sci_CharacterRange{h: h} } // UnsafeNewSci_CharacterRange constructs the type using only unsafe pointers. func UnsafeNewSci_CharacterRange(h unsafe.Pointer) *Sci_CharacterRange { - if h == nil { - return nil - } - - return &Sci_CharacterRange{h: (*C.Sci_CharacterRange)(h)} + return newSci_CharacterRange((*C.Sci_CharacterRange)(h)) } // Delete this object from C++ memory. @@ -5502,16 +5320,13 @@ func newSci_CharacterRangeFull(h *C.Sci_CharacterRangeFull) *Sci_CharacterRangeF if h == nil { return nil } + return &Sci_CharacterRangeFull{h: h} } // UnsafeNewSci_CharacterRangeFull constructs the type using only unsafe pointers. func UnsafeNewSci_CharacterRangeFull(h unsafe.Pointer) *Sci_CharacterRangeFull { - if h == nil { - return nil - } - - return &Sci_CharacterRangeFull{h: (*C.Sci_CharacterRangeFull)(h)} + return newSci_CharacterRangeFull((*C.Sci_CharacterRangeFull)(h)) } // Delete this object from C++ memory. @@ -5552,16 +5367,13 @@ func newSci_TextRange(h *C.Sci_TextRange) *Sci_TextRange { if h == nil { return nil } + return &Sci_TextRange{h: h} } // UnsafeNewSci_TextRange constructs the type using only unsafe pointers. func UnsafeNewSci_TextRange(h unsafe.Pointer) *Sci_TextRange { - if h == nil { - return nil - } - - return &Sci_TextRange{h: (*C.Sci_TextRange)(h)} + return newSci_TextRange((*C.Sci_TextRange)(h)) } // Delete this object from C++ memory. @@ -5602,16 +5414,13 @@ func newSci_TextRangeFull(h *C.Sci_TextRangeFull) *Sci_TextRangeFull { if h == nil { return nil } + return &Sci_TextRangeFull{h: h} } // UnsafeNewSci_TextRangeFull constructs the type using only unsafe pointers. func UnsafeNewSci_TextRangeFull(h unsafe.Pointer) *Sci_TextRangeFull { - if h == nil { - return nil - } - - return &Sci_TextRangeFull{h: (*C.Sci_TextRangeFull)(h)} + return newSci_TextRangeFull((*C.Sci_TextRangeFull)(h)) } // Delete this object from C++ memory. @@ -5652,16 +5461,13 @@ func newSci_TextToFind(h *C.Sci_TextToFind) *Sci_TextToFind { if h == nil { return nil } + return &Sci_TextToFind{h: h} } // UnsafeNewSci_TextToFind constructs the type using only unsafe pointers. func UnsafeNewSci_TextToFind(h unsafe.Pointer) *Sci_TextToFind { - if h == nil { - return nil - } - - return &Sci_TextToFind{h: (*C.Sci_TextToFind)(h)} + return newSci_TextToFind((*C.Sci_TextToFind)(h)) } // Delete this object from C++ memory. @@ -5702,16 +5508,13 @@ func newSci_TextToFindFull(h *C.Sci_TextToFindFull) *Sci_TextToFindFull { if h == nil { return nil } + return &Sci_TextToFindFull{h: h} } // UnsafeNewSci_TextToFindFull constructs the type using only unsafe pointers. func UnsafeNewSci_TextToFindFull(h unsafe.Pointer) *Sci_TextToFindFull { - if h == nil { - return nil - } - - return &Sci_TextToFindFull{h: (*C.Sci_TextToFindFull)(h)} + return newSci_TextToFindFull((*C.Sci_TextToFindFull)(h)) } // Delete this object from C++ memory. @@ -5752,16 +5555,13 @@ func newSci_Rectangle(h *C.Sci_Rectangle) *Sci_Rectangle { if h == nil { return nil } + return &Sci_Rectangle{h: h} } // UnsafeNewSci_Rectangle constructs the type using only unsafe pointers. func UnsafeNewSci_Rectangle(h unsafe.Pointer) *Sci_Rectangle { - if h == nil { - return nil - } - - return &Sci_Rectangle{h: (*C.Sci_Rectangle)(h)} + return newSci_Rectangle((*C.Sci_Rectangle)(h)) } // Delete this object from C++ memory. @@ -5802,16 +5602,13 @@ func newSci_RangeToFormat(h *C.Sci_RangeToFormat) *Sci_RangeToFormat { if h == nil { return nil } + return &Sci_RangeToFormat{h: h} } // UnsafeNewSci_RangeToFormat constructs the type using only unsafe pointers. func UnsafeNewSci_RangeToFormat(h unsafe.Pointer) *Sci_RangeToFormat { - if h == nil { - return nil - } - - return &Sci_RangeToFormat{h: (*C.Sci_RangeToFormat)(h)} + return newSci_RangeToFormat((*C.Sci_RangeToFormat)(h)) } // Delete this object from C++ memory. @@ -5852,16 +5649,13 @@ func newSci_RangeToFormatFull(h *C.Sci_RangeToFormatFull) *Sci_RangeToFormatFull if h == nil { return nil } + return &Sci_RangeToFormatFull{h: h} } // UnsafeNewSci_RangeToFormatFull constructs the type using only unsafe pointers. func UnsafeNewSci_RangeToFormatFull(h unsafe.Pointer) *Sci_RangeToFormatFull { - if h == nil { - return nil - } - - return &Sci_RangeToFormatFull{h: (*C.Sci_RangeToFormatFull)(h)} + return newSci_RangeToFormatFull((*C.Sci_RangeToFormatFull)(h)) } // Delete this object from C++ memory. @@ -5902,16 +5696,13 @@ func newSci_NotifyHeader(h *C.Sci_NotifyHeader) *Sci_NotifyHeader { if h == nil { return nil } + return &Sci_NotifyHeader{h: h} } // UnsafeNewSci_NotifyHeader constructs the type using only unsafe pointers. func UnsafeNewSci_NotifyHeader(h unsafe.Pointer) *Sci_NotifyHeader { - if h == nil { - return nil - } - - return &Sci_NotifyHeader{h: (*C.Sci_NotifyHeader)(h)} + return newSci_NotifyHeader((*C.Sci_NotifyHeader)(h)) } // Delete this object from C++ memory. @@ -5952,16 +5743,13 @@ func newSCNotification(h *C.SCNotification) *SCNotification { if h == nil { return nil } + return &SCNotification{h: h} } // UnsafeNewSCNotification constructs the type using only unsafe pointers. func UnsafeNewSCNotification(h unsafe.Pointer) *SCNotification { - if h == nil { - return nil - } - - return &SCNotification{h: (*C.SCNotification)(h)} + return newSCNotification((*C.SCNotification)(h)) } // Delete this object from C++ memory. @@ -5999,50 +5787,34 @@ func (this *ScintillaEditBase) UnsafePointer() unsafe.Pointer { } // newScintillaEditBase constructs the type using only CGO pointers. -func newScintillaEditBase(h *C.ScintillaEditBase, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *ScintillaEditBase { +func newScintillaEditBase(h *C.ScintillaEditBase) *ScintillaEditBase { if h == nil { return nil } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.ScintillaEditBase_virtbase(h, &outptr_QAbstractScrollArea) + return &ScintillaEditBase{h: h, - QAbstractScrollArea: qt.UnsafeNewQAbstractScrollArea(unsafe.Pointer(h_QAbstractScrollArea), unsafe.Pointer(h_QFrame), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QAbstractScrollArea: qt.UnsafeNewQAbstractScrollArea(unsafe.Pointer(outptr_QAbstractScrollArea))} } // UnsafeNewScintillaEditBase constructs the type using only unsafe pointers. -func UnsafeNewScintillaEditBase(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *ScintillaEditBase { - if h == nil { - return nil - } - - return &ScintillaEditBase{h: (*C.ScintillaEditBase)(h), - QAbstractScrollArea: qt.UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewScintillaEditBase(h unsafe.Pointer) *ScintillaEditBase { + return newScintillaEditBase((*C.ScintillaEditBase)(h)) } // NewScintillaEditBase constructs a new ScintillaEditBase object. func NewScintillaEditBase(parent *qt.QWidget) *ScintillaEditBase { - var outptr_ScintillaEditBase *C.ScintillaEditBase = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.ScintillaEditBase_new((*C.QWidget)(parent.UnsafePointer()), &outptr_ScintillaEditBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newScintillaEditBase(outptr_ScintillaEditBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newScintillaEditBase(C.ScintillaEditBase_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewScintillaEditBase2 constructs a new ScintillaEditBase object. func NewScintillaEditBase2() *ScintillaEditBase { - var outptr_ScintillaEditBase *C.ScintillaEditBase = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.ScintillaEditBase_new2(&outptr_ScintillaEditBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newScintillaEditBase(outptr_ScintillaEditBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newScintillaEditBase(C.ScintillaEditBase_new2()) ret.isSubclass = true return ret } @@ -6237,7 +6009,7 @@ func miqt_exec_callback_ScintillaEditBase_AboutToCopy(cb C.intptr_t, data *C.QMi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(data), nil) + slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(data)) gofunc(slotval1) } @@ -6821,7 +6593,7 @@ func miqt_exec_callback_ScintillaEditBase_ButtonPressed(cb C.intptr_t, event *C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc(slotval1) } @@ -6841,7 +6613,7 @@ func miqt_exec_callback_ScintillaEditBase_ButtonReleased(cb C.intptr_t, event *C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc(slotval1) } @@ -6861,7 +6633,7 @@ func miqt_exec_callback_ScintillaEditBase_KeyPressed(cb C.intptr_t, event *C.QKe } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc(slotval1) } @@ -7042,7 +6814,7 @@ func miqt_exec_callback_ScintillaEditBase_PaintEvent(self *C.ScintillaEditBase, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -7068,7 +6840,7 @@ func miqt_exec_callback_ScintillaEditBase_WheelEvent(self *C.ScintillaEditBase, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -7094,7 +6866,7 @@ func miqt_exec_callback_ScintillaEditBase_FocusInEvent(self *C.ScintillaEditBase } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -7120,7 +6892,7 @@ func miqt_exec_callback_ScintillaEditBase_FocusOutEvent(self *C.ScintillaEditBas } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -7146,7 +6918,7 @@ func miqt_exec_callback_ScintillaEditBase_ResizeEvent(self *C.ScintillaEditBase, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -7172,7 +6944,7 @@ func miqt_exec_callback_ScintillaEditBase_KeyPressEvent(self *C.ScintillaEditBas } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -7198,7 +6970,7 @@ func miqt_exec_callback_ScintillaEditBase_MousePressEvent(self *C.ScintillaEditB } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -7224,7 +6996,7 @@ func miqt_exec_callback_ScintillaEditBase_MouseReleaseEvent(self *C.ScintillaEdi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -7250,7 +7022,7 @@ func miqt_exec_callback_ScintillaEditBase_MouseDoubleClickEvent(self *C.Scintill } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -7276,7 +7048,7 @@ func miqt_exec_callback_ScintillaEditBase_MouseMoveEvent(self *C.ScintillaEditBa } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -7302,7 +7074,7 @@ func miqt_exec_callback_ScintillaEditBase_ContextMenuEvent(self *C.ScintillaEdit } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -7328,7 +7100,7 @@ func miqt_exec_callback_ScintillaEditBase_DragEnterEvent(self *C.ScintillaEditBa } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -7354,7 +7126,7 @@ func miqt_exec_callback_ScintillaEditBase_DragLeaveEvent(self *C.ScintillaEditBa } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -7380,7 +7152,7 @@ func miqt_exec_callback_ScintillaEditBase_DragMoveEvent(self *C.ScintillaEditBas } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -7406,7 +7178,7 @@ func miqt_exec_callback_ScintillaEditBase_DropEvent(self *C.ScintillaEditBase, c } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_DropEvent, slotval1) @@ -7432,7 +7204,7 @@ func miqt_exec_callback_ScintillaEditBase_InputMethodEvent(self *C.ScintillaEdit } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(event)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -7570,7 +7342,7 @@ func miqt_exec_callback_ScintillaEditBase_SetupViewport(self *C.ScintillaEditBas } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) + slotval1 := qt.UnsafeNewQWidget(unsafe.Pointer(viewport)) gofunc((&ScintillaEditBase{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -7696,53 +7468,42 @@ func (this *ScintillaDocument) UnsafePointer() unsafe.Pointer { } // newScintillaDocument constructs the type using only CGO pointers. -func newScintillaDocument(h *C.ScintillaDocument, h_QObject *C.QObject) *ScintillaDocument { +func newScintillaDocument(h *C.ScintillaDocument) *ScintillaDocument { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.ScintillaDocument_virtbase(h, &outptr_QObject) + return &ScintillaDocument{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewScintillaDocument constructs the type using only unsafe pointers. -func UnsafeNewScintillaDocument(h unsafe.Pointer, h_QObject unsafe.Pointer) *ScintillaDocument { - if h == nil { - return nil - } - - return &ScintillaDocument{h: (*C.ScintillaDocument)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewScintillaDocument(h unsafe.Pointer) *ScintillaDocument { + return newScintillaDocument((*C.ScintillaDocument)(h)) } // NewScintillaDocument constructs a new ScintillaDocument object. func NewScintillaDocument() *ScintillaDocument { - var outptr_ScintillaDocument *C.ScintillaDocument = nil - var outptr_QObject *C.QObject = nil - C.ScintillaDocument_new(&outptr_ScintillaDocument, &outptr_QObject) - ret := newScintillaDocument(outptr_ScintillaDocument, outptr_QObject) + ret := newScintillaDocument(C.ScintillaDocument_new()) ret.isSubclass = true return ret } // NewScintillaDocument2 constructs a new ScintillaDocument object. func NewScintillaDocument2(parent *qt.QObject) *ScintillaDocument { - var outptr_ScintillaDocument *C.ScintillaDocument = nil - var outptr_QObject *C.QObject = nil - C.ScintillaDocument_new2((*C.QObject)(parent.UnsafePointer()), &outptr_ScintillaDocument, &outptr_QObject) - ret := newScintillaDocument(outptr_ScintillaDocument, outptr_QObject) + ret := newScintillaDocument(C.ScintillaDocument_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewScintillaDocument3 constructs a new ScintillaDocument object. func NewScintillaDocument3(parent *qt.QObject, pdoc_ unsafe.Pointer) *ScintillaDocument { - var outptr_ScintillaDocument *C.ScintillaDocument = nil - var outptr_QObject *C.QObject = nil - C.ScintillaDocument_new3((*C.QObject)(parent.UnsafePointer()), pdoc_, &outptr_ScintillaDocument, &outptr_QObject) - ret := newScintillaDocument(outptr_ScintillaDocument, outptr_QObject) + ret := newScintillaDocument(C.ScintillaDocument_new3((*C.QObject)(parent.UnsafePointer()), pdoc_)) ret.isSubclass = true return ret } @@ -8183,7 +7944,7 @@ func miqt_exec_callback_ScintillaDocument_TimerEvent(self *C.ScintillaDocument, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&ScintillaDocument{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -8209,7 +7970,7 @@ func miqt_exec_callback_ScintillaDocument_ChildEvent(self *C.ScintillaDocument, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&ScintillaDocument{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -8328,52 +8089,34 @@ func (this *ScintillaEdit) UnsafePointer() unsafe.Pointer { } // newScintillaEdit constructs the type using only CGO pointers. -func newScintillaEdit(h *C.ScintillaEdit, h_ScintillaEditBase *C.ScintillaEditBase, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *ScintillaEdit { +func newScintillaEdit(h *C.ScintillaEdit) *ScintillaEdit { if h == nil { return nil } + var outptr_ScintillaEditBase *C.ScintillaEditBase = nil + C.ScintillaEdit_virtbase(h, &outptr_ScintillaEditBase) + return &ScintillaEdit{h: h, - ScintillaEditBase: newScintillaEditBase(h_ScintillaEditBase, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + ScintillaEditBase: newScintillaEditBase(outptr_ScintillaEditBase)} } // UnsafeNewScintillaEdit constructs the type using only unsafe pointers. -func UnsafeNewScintillaEdit(h unsafe.Pointer, h_ScintillaEditBase unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *ScintillaEdit { - if h == nil { - return nil - } - - return &ScintillaEdit{h: (*C.ScintillaEdit)(h), - ScintillaEditBase: UnsafeNewScintillaEditBase(h_ScintillaEditBase, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewScintillaEdit(h unsafe.Pointer) *ScintillaEdit { + return newScintillaEdit((*C.ScintillaEdit)(h)) } // NewScintillaEdit constructs a new ScintillaEdit object. func NewScintillaEdit(parent *qt.QWidget) *ScintillaEdit { - var outptr_ScintillaEdit *C.ScintillaEdit = nil - var outptr_ScintillaEditBase *C.ScintillaEditBase = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.ScintillaEdit_new((*C.QWidget)(parent.UnsafePointer()), &outptr_ScintillaEdit, &outptr_ScintillaEditBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newScintillaEdit(outptr_ScintillaEdit, outptr_ScintillaEditBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newScintillaEdit(C.ScintillaEdit_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewScintillaEdit2 constructs a new ScintillaEdit object. func NewScintillaEdit2() *ScintillaEdit { - var outptr_ScintillaEdit *C.ScintillaEdit = nil - var outptr_ScintillaEditBase *C.ScintillaEditBase = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.ScintillaEdit_new2(&outptr_ScintillaEdit, &outptr_ScintillaEditBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newScintillaEdit(outptr_ScintillaEdit, outptr_ScintillaEditBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newScintillaEdit(C.ScintillaEdit_new2()) ret.isSubclass = true return ret } @@ -8440,7 +8183,7 @@ func (this *ScintillaEdit) GetTextRange(start int, end int) []byte { } func (this *ScintillaEdit) GetDoc() *ScintillaDocument { - return newScintillaDocument(C.ScintillaEdit_GetDoc(this.h), nil) + return newScintillaDocument(C.ScintillaEdit_GetDoc(this.h)) } func (this *ScintillaEdit) SetDoc(pdoc_ *ScintillaDocument) { @@ -12062,7 +11805,7 @@ func miqt_exec_callback_ScintillaEdit_PaintEvent(self *C.ScintillaEdit, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -12088,7 +11831,7 @@ func miqt_exec_callback_ScintillaEdit_WheelEvent(self *C.ScintillaEdit, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -12114,7 +11857,7 @@ func miqt_exec_callback_ScintillaEdit_FocusInEvent(self *C.ScintillaEdit, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -12140,7 +11883,7 @@ func miqt_exec_callback_ScintillaEdit_FocusOutEvent(self *C.ScintillaEdit, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -12166,7 +11909,7 @@ func miqt_exec_callback_ScintillaEdit_ResizeEvent(self *C.ScintillaEdit, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -12192,7 +11935,7 @@ func miqt_exec_callback_ScintillaEdit_KeyPressEvent(self *C.ScintillaEdit, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -12218,7 +11961,7 @@ func miqt_exec_callback_ScintillaEdit_MousePressEvent(self *C.ScintillaEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -12244,7 +11987,7 @@ func miqt_exec_callback_ScintillaEdit_MouseReleaseEvent(self *C.ScintillaEdit, c } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -12270,7 +12013,7 @@ func miqt_exec_callback_ScintillaEdit_MouseDoubleClickEvent(self *C.ScintillaEdi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -12296,7 +12039,7 @@ func miqt_exec_callback_ScintillaEdit_MouseMoveEvent(self *C.ScintillaEdit, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -12322,7 +12065,7 @@ func miqt_exec_callback_ScintillaEdit_ContextMenuEvent(self *C.ScintillaEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -12348,7 +12091,7 @@ func miqt_exec_callback_ScintillaEdit_DragEnterEvent(self *C.ScintillaEdit, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -12374,7 +12117,7 @@ func miqt_exec_callback_ScintillaEdit_DragLeaveEvent(self *C.ScintillaEdit, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -12400,7 +12143,7 @@ func miqt_exec_callback_ScintillaEdit_DragMoveEvent(self *C.ScintillaEdit, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -12426,7 +12169,7 @@ func miqt_exec_callback_ScintillaEdit_DropEvent(self *C.ScintillaEdit, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_DropEvent, slotval1) @@ -12452,7 +12195,7 @@ func miqt_exec_callback_ScintillaEdit_InputMethodEvent(self *C.ScintillaEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(event)) gofunc((&ScintillaEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt-extras/scintillaedit/gen_ScintillaEdit.h b/qt-extras/scintillaedit/gen_ScintillaEdit.h index 88325ef7..55f0df87 100644 --- a/qt-extras/scintillaedit/gen_ScintillaEdit.h +++ b/qt-extras/scintillaedit/gen_ScintillaEdit.h @@ -284,10 +284,10 @@ typedef struct ScintillaEdit ScintillaEdit; typedef struct ScintillaEditBase ScintillaEditBase; #endif -void Scintilla__Internal__Point_new(Scintilla__Internal__Point** outptr_Scintilla__Internal__Point); -void Scintilla__Internal__Point_new2(Scintilla__Internal__Point* param1, Scintilla__Internal__Point** outptr_Scintilla__Internal__Point); -void Scintilla__Internal__Point_new3(double x_, Scintilla__Internal__Point** outptr_Scintilla__Internal__Point); -void Scintilla__Internal__Point_new4(double x_, double y_, Scintilla__Internal__Point** outptr_Scintilla__Internal__Point); +Scintilla__Internal__Point* Scintilla__Internal__Point_new(); +Scintilla__Internal__Point* Scintilla__Internal__Point_new2(Scintilla__Internal__Point* param1); +Scintilla__Internal__Point* Scintilla__Internal__Point_new3(double x_); +Scintilla__Internal__Point* Scintilla__Internal__Point_new4(double x_, double y_); Scintilla__Internal__Point* Scintilla__Internal__Point_FromInts(int x_, int y_); bool Scintilla__Internal__Point_OperatorEqual(const Scintilla__Internal__Point* self, Scintilla__Internal__Point* other); bool Scintilla__Internal__Point_OperatorNotEqual(const Scintilla__Internal__Point* self, Scintilla__Internal__Point* other); @@ -302,12 +302,12 @@ bool Scintilla__Internal__Interval_Intersects(const Scintilla__Internal__Interva Scintilla__Internal__Interval* Scintilla__Internal__Interval_Offset(const Scintilla__Internal__Interval* self, double offset); void Scintilla__Internal__Interval_Delete(Scintilla__Internal__Interval* self, bool isSubclass); -void Scintilla__Internal__PRectangle_new(Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle); -void Scintilla__Internal__PRectangle_new2(Scintilla__Internal__PRectangle* param1, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle); -void Scintilla__Internal__PRectangle_new3(double left_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle); -void Scintilla__Internal__PRectangle_new4(double left_, double top_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle); -void Scintilla__Internal__PRectangle_new5(double left_, double top_, double right_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle); -void Scintilla__Internal__PRectangle_new6(double left_, double top_, double right_, double bottom_, Scintilla__Internal__PRectangle** outptr_Scintilla__Internal__PRectangle); +Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new(); +Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new2(Scintilla__Internal__PRectangle* param1); +Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new3(double left_); +Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new4(double left_, double top_); +Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new5(double left_, double top_, double right_); +Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_new6(double left_, double top_, double right_, double bottom_); Scintilla__Internal__PRectangle* Scintilla__Internal__PRectangle_FromInts(int left_, int top_, int right_, int bottom_); bool Scintilla__Internal__PRectangle_OperatorEqual(const Scintilla__Internal__PRectangle* self, Scintilla__Internal__PRectangle* rc); bool Scintilla__Internal__PRectangle_Contains(const Scintilla__Internal__PRectangle* self, Scintilla__Internal__Point* pt); @@ -325,12 +325,12 @@ double Scintilla__Internal__PRectangle_Height(const Scintilla__Internal__PRectan bool Scintilla__Internal__PRectangle_Empty(const Scintilla__Internal__PRectangle* self); void Scintilla__Internal__PRectangle_Delete(Scintilla__Internal__PRectangle* self, bool isSubclass); -void Scintilla__Internal__ColourRGBA_new(Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA); -void Scintilla__Internal__ColourRGBA_new2(unsigned int red, unsigned int green, unsigned int blue, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA); -void Scintilla__Internal__ColourRGBA_new3(Scintilla__Internal__ColourRGBA* cd, unsigned int alpha, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA); -void Scintilla__Internal__ColourRGBA_new4(Scintilla__Internal__ColourRGBA* param1, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA); -void Scintilla__Internal__ColourRGBA_new5(int co_, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA); -void Scintilla__Internal__ColourRGBA_new6(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha, Scintilla__Internal__ColourRGBA** outptr_Scintilla__Internal__ColourRGBA); +Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new(); +Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new2(unsigned int red, unsigned int green, unsigned int blue); +Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new3(Scintilla__Internal__ColourRGBA* cd, unsigned int alpha); +Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new4(Scintilla__Internal__ColourRGBA* param1); +Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new5(int co_); +Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_new6(unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha); Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_FromRGB(int co_); Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_Grey(unsigned int grey); Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_FromIpRGB(intptr_t co_); @@ -354,23 +354,23 @@ void Scintilla__Internal__ColourRGBA_OperatorAssign(Scintilla__Internal__ColourR Scintilla__Internal__ColourRGBA* Scintilla__Internal__ColourRGBA_Grey2(unsigned int grey, unsigned int alpha); void Scintilla__Internal__ColourRGBA_Delete(Scintilla__Internal__ColourRGBA* self, bool isSubclass); -void Scintilla__Internal__Stroke_new(Scintilla__Internal__ColourRGBA* colour_, Scintilla__Internal__Stroke** outptr_Scintilla__Internal__Stroke); -void Scintilla__Internal__Stroke_new2(Scintilla__Internal__Stroke* param1, Scintilla__Internal__Stroke** outptr_Scintilla__Internal__Stroke); -void Scintilla__Internal__Stroke_new3(Scintilla__Internal__ColourRGBA* colour_, double width_, Scintilla__Internal__Stroke** outptr_Scintilla__Internal__Stroke); +Scintilla__Internal__Stroke* Scintilla__Internal__Stroke_new(Scintilla__Internal__ColourRGBA* colour_); +Scintilla__Internal__Stroke* Scintilla__Internal__Stroke_new2(Scintilla__Internal__Stroke* param1); +Scintilla__Internal__Stroke* Scintilla__Internal__Stroke_new3(Scintilla__Internal__ColourRGBA* colour_, double width_); float Scintilla__Internal__Stroke_WidthF(const Scintilla__Internal__Stroke* self); void Scintilla__Internal__Stroke_Delete(Scintilla__Internal__Stroke* self, bool isSubclass); -void Scintilla__Internal__Fill_new(Scintilla__Internal__ColourRGBA* colour_, Scintilla__Internal__Fill** outptr_Scintilla__Internal__Fill); -void Scintilla__Internal__Fill_new2(Scintilla__Internal__Fill* param1, Scintilla__Internal__Fill** outptr_Scintilla__Internal__Fill); +Scintilla__Internal__Fill* Scintilla__Internal__Fill_new(Scintilla__Internal__ColourRGBA* colour_); +Scintilla__Internal__Fill* Scintilla__Internal__Fill_new2(Scintilla__Internal__Fill* param1); void Scintilla__Internal__Fill_Delete(Scintilla__Internal__Fill* self, bool isSubclass); -void Scintilla__Internal__FillStroke_new(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke); -void Scintilla__Internal__FillStroke_new2(Scintilla__Internal__ColourRGBA* colourBoth, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke); -void Scintilla__Internal__FillStroke_new3(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_, double widthStroke_, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke); -void Scintilla__Internal__FillStroke_new4(Scintilla__Internal__ColourRGBA* colourBoth, double widthStroke_, Scintilla__Internal__FillStroke** outptr_Scintilla__Internal__FillStroke); +Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_); +Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new2(Scintilla__Internal__ColourRGBA* colourBoth); +Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new3(Scintilla__Internal__ColourRGBA* colourFill_, Scintilla__Internal__ColourRGBA* colourStroke_, double widthStroke_); +Scintilla__Internal__FillStroke* Scintilla__Internal__FillStroke_new4(Scintilla__Internal__ColourRGBA* colourBoth, double widthStroke_); void Scintilla__Internal__FillStroke_Delete(Scintilla__Internal__FillStroke* self, bool isSubclass); -void Scintilla__Internal__ColourStop_new(double position_, Scintilla__Internal__ColourRGBA* colour_, Scintilla__Internal__ColourStop** outptr_Scintilla__Internal__ColourStop); +Scintilla__Internal__ColourStop* Scintilla__Internal__ColourStop_new(double position_, Scintilla__Internal__ColourRGBA* colour_); void Scintilla__Internal__ColourStop_Delete(Scintilla__Internal__ColourStop* self, bool isSubclass); void Scintilla__CharacterRange_Delete(Scintilla__CharacterRange* self, bool isSubclass); @@ -395,18 +395,18 @@ void Scintilla__NotifyHeader_Delete(Scintilla__NotifyHeader* self, bool isSubcla void Scintilla__NotificationData_Delete(Scintilla__NotificationData* self, bool isSubclass); -void Scintilla__Internal__FontParameters_new(const char* faceName_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); -void Scintilla__Internal__FontParameters_new2(const char* faceName_, double size_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); -void Scintilla__Internal__FontParameters_new3(const char* faceName_, double size_, int weight_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); -void Scintilla__Internal__FontParameters_new4(const char* faceName_, double size_, int weight_, bool italic_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); -void Scintilla__Internal__FontParameters_new5(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); -void Scintilla__Internal__FontParameters_new6(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); -void Scintilla__Internal__FontParameters_new7(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); -void Scintilla__Internal__FontParameters_new8(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); -void Scintilla__Internal__FontParameters_new9(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_, int stretch_, Scintilla__Internal__FontParameters** outptr_Scintilla__Internal__FontParameters); +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new(const char* faceName_); +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new2(const char* faceName_, double size_); +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new3(const char* faceName_, double size_, int weight_); +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new4(const char* faceName_, double size_, int weight_, bool italic_); +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new5(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_); +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new6(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_); +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new7(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_); +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new8(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_); +Scintilla__Internal__FontParameters* Scintilla__Internal__FontParameters_new9(const char* faceName_, double size_, int weight_, bool italic_, int extraFontFlag_, int technology_, int characterSet_, const char* localeName_, int stretch_); void Scintilla__Internal__FontParameters_Delete(Scintilla__Internal__FontParameters* self, bool isSubclass); -void Scintilla__Internal__Font_new(Scintilla__Internal__Font** outptr_Scintilla__Internal__Font); +Scintilla__Internal__Font* Scintilla__Internal__Font_new(); void Scintilla__Internal__Font_Delete(Scintilla__Internal__Font* self, bool isSubclass); size_t Scintilla__Internal__IScreenLine_Length(const Scintilla__Internal__IScreenLine* self); @@ -426,11 +426,11 @@ double Scintilla__Internal__IScreenLineLayout_XFromPosition(Scintilla__Internal_ void Scintilla__Internal__IScreenLineLayout_OperatorAssign(Scintilla__Internal__IScreenLineLayout* self, Scintilla__Internal__IScreenLineLayout* param1); void Scintilla__Internal__IScreenLineLayout_Delete(Scintilla__Internal__IScreenLineLayout* self, bool isSubclass); -void Scintilla__Internal__SurfaceMode_new(Scintilla__Internal__SurfaceMode** outptr_Scintilla__Internal__SurfaceMode); -void Scintilla__Internal__SurfaceMode_new2(int codePage_, bool bidiR2L_, Scintilla__Internal__SurfaceMode** outptr_Scintilla__Internal__SurfaceMode); +Scintilla__Internal__SurfaceMode* Scintilla__Internal__SurfaceMode_new(); +Scintilla__Internal__SurfaceMode* Scintilla__Internal__SurfaceMode_new2(int codePage_, bool bidiR2L_); void Scintilla__Internal__SurfaceMode_Delete(Scintilla__Internal__SurfaceMode* self, bool isSubclass); -void Scintilla__Internal__Surface_new(Scintilla__Internal__Surface** outptr_Scintilla__Internal__Surface); +Scintilla__Internal__Surface* Scintilla__Internal__Surface_new(); void Scintilla__Internal__Surface_Init(Scintilla__Internal__Surface* self, void* wid); void Scintilla__Internal__Surface_Init2(Scintilla__Internal__Surface* self, void* sid, void* wid); void Scintilla__Internal__Surface_SetMode(Scintilla__Internal__Surface* self, Scintilla__Internal__SurfaceMode* mode); @@ -529,7 +529,7 @@ void Scintilla__Internal__Surface_override_virtual_FlushDrawing(void* self, intp void Scintilla__Internal__Surface_virtualbase_FlushDrawing(void* self); void Scintilla__Internal__Surface_Delete(Scintilla__Internal__Surface* self, bool isSubclass); -void Scintilla__Internal__Window_new(Scintilla__Internal__Window** outptr_Scintilla__Internal__Window); +Scintilla__Internal__Window* Scintilla__Internal__Window_new(); void Scintilla__Internal__Window_OperatorAssign(Scintilla__Internal__Window* self, void* wid_); void* Scintilla__Internal__Window_GetID(const Scintilla__Internal__Window* self); bool Scintilla__Internal__Window_Created(const Scintilla__Internal__Window* self); @@ -546,7 +546,7 @@ Scintilla__Internal__PRectangle* Scintilla__Internal__Window_GetMonitorRect(Scin void Scintilla__Internal__Window_Show1(Scintilla__Internal__Window* self, bool show); void Scintilla__Internal__Window_Delete(Scintilla__Internal__Window* self, bool isSubclass); -void Scintilla__Internal__ListBoxEvent_new(int event_, Scintilla__Internal__ListBoxEvent** outptr_Scintilla__Internal__ListBoxEvent); +Scintilla__Internal__ListBoxEvent* Scintilla__Internal__ListBoxEvent_new(int event_); void Scintilla__Internal__ListBoxEvent_Delete(Scintilla__Internal__ListBoxEvent* self, bool isSubclass); void Scintilla__Internal__IListBoxDelegate_ListNotify(Scintilla__Internal__IListBoxDelegate* self, Scintilla__Internal__ListBoxEvent* plbe); @@ -555,7 +555,8 @@ void Scintilla__Internal__IListBoxDelegate_Delete(Scintilla__Internal__IListBoxD void Scintilla__Internal__ListOptions_Delete(Scintilla__Internal__ListOptions* self, bool isSubclass); -void Scintilla__Internal__ListBox_new(Scintilla__Internal__ListBox** outptr_Scintilla__Internal__ListBox, Scintilla__Internal__Window** outptr_Scintilla__Internal__Window); +Scintilla__Internal__ListBox* Scintilla__Internal__ListBox_new(); +void Scintilla__Internal__ListBox_virtbase(Scintilla__Internal__ListBox* src, Scintilla__Internal__Window** outptr_Scintilla__Internal__Window); void Scintilla__Internal__ListBox_SetFont(Scintilla__Internal__ListBox* self, Scintilla__Internal__Font* font); void Scintilla__Internal__ListBox_Create(Scintilla__Internal__ListBox* self, Scintilla__Internal__Window* parent, int ctrlID, Scintilla__Internal__Point* location, int lineHeight_, bool unicodeMode_, int technology_); void Scintilla__Internal__ListBox_SetAverageCharWidth(Scintilla__Internal__ListBox* self, int width); @@ -615,7 +616,7 @@ void Scintilla__Internal__ListBox_override_virtual_SetOptions(void* self, intptr void Scintilla__Internal__ListBox_virtualbase_SetOptions(void* self, Scintilla__Internal__ListOptions* options_); void Scintilla__Internal__ListBox_Delete(Scintilla__Internal__ListBox* self, bool isSubclass); -void Scintilla__Internal__Menu_new(Scintilla__Internal__Menu** outptr_Scintilla__Internal__Menu); +Scintilla__Internal__Menu* Scintilla__Internal__Menu_new(); void* Scintilla__Internal__Menu_GetID(const Scintilla__Internal__Menu* self); void Scintilla__Internal__Menu_CreatePopUp(Scintilla__Internal__Menu* self); void Scintilla__Internal__Menu_Destroy(Scintilla__Internal__Menu* self); @@ -644,8 +645,9 @@ void Sci_NotifyHeader_Delete(Sci_NotifyHeader* self, bool isSubclass); void SCNotification_Delete(SCNotification* self, bool isSubclass); -void ScintillaEditBase_new(QWidget* parent, ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void ScintillaEditBase_new2(ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +ScintillaEditBase* ScintillaEditBase_new(QWidget* parent); +ScintillaEditBase* ScintillaEditBase_new2(); +void ScintillaEditBase_virtbase(ScintillaEditBase* src, QAbstractScrollArea** outptr_QAbstractScrollArea); QMetaObject* ScintillaEditBase_MetaObject(const ScintillaEditBase* self); void* ScintillaEditBase_Metacast(ScintillaEditBase* self, const char* param1); struct miqt_string ScintillaEditBase_Tr(const char* s); @@ -809,9 +811,10 @@ void ScintillaEditBase_override_virtual_ViewportSizeHint(void* self, intptr_t sl QSize* ScintillaEditBase_virtualbase_ViewportSizeHint(const void* self); void ScintillaEditBase_Delete(ScintillaEditBase* self, bool isSubclass); -void ScintillaDocument_new(ScintillaDocument** outptr_ScintillaDocument, QObject** outptr_QObject); -void ScintillaDocument_new2(QObject* parent, ScintillaDocument** outptr_ScintillaDocument, QObject** outptr_QObject); -void ScintillaDocument_new3(QObject* parent, void* pdoc_, ScintillaDocument** outptr_ScintillaDocument, QObject** outptr_QObject); +ScintillaDocument* ScintillaDocument_new(); +ScintillaDocument* ScintillaDocument_new2(QObject* parent); +ScintillaDocument* ScintillaDocument_new3(QObject* parent, void* pdoc_); +void ScintillaDocument_virtbase(ScintillaDocument* src, QObject** outptr_QObject); QMetaObject* ScintillaDocument_MetaObject(const ScintillaDocument* self); void* ScintillaDocument_Metacast(ScintillaDocument* self, const char* param1); struct miqt_string ScintillaDocument_Tr(const char* s); @@ -887,8 +890,9 @@ void ScintillaDocument_override_virtual_DisconnectNotify(void* self, intptr_t sl void ScintillaDocument_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void ScintillaDocument_Delete(ScintillaDocument* self, bool isSubclass); -void ScintillaEdit_new(QWidget* parent, ScintillaEdit** outptr_ScintillaEdit, ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void ScintillaEdit_new2(ScintillaEdit** outptr_ScintillaEdit, ScintillaEditBase** outptr_ScintillaEditBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +ScintillaEdit* ScintillaEdit_new(QWidget* parent); +ScintillaEdit* ScintillaEdit_new2(); +void ScintillaEdit_virtbase(ScintillaEdit* src, ScintillaEditBase** outptr_ScintillaEditBase); QMetaObject* ScintillaEdit_MetaObject(const ScintillaEdit* self); void* ScintillaEdit_Metacast(ScintillaEdit* self, const char* param1); struct miqt_string ScintillaEdit_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.cpp b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.cpp index beda3260..33e53c1c 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.cpp +++ b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.cpp @@ -325,10 +325,12 @@ public: }; -void QsciAbstractAPIs_new(QsciLexer* lexer, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject) { - MiqtVirtualQsciAbstractAPIs* ret = new MiqtVirtualQsciAbstractAPIs(lexer); - *outptr_QsciAbstractAPIs = ret; - *outptr_QObject = static_cast(ret); +QsciAbstractAPIs* QsciAbstractAPIs_new(QsciLexer* lexer) { + return new MiqtVirtualQsciAbstractAPIs(lexer); +} + +void QsciAbstractAPIs_virtbase(QsciAbstractAPIs* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QsciAbstractAPIs_MetaObject(const QsciAbstractAPIs* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.go b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.go index a75ce63f..6df99846 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.go +++ b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.go @@ -36,31 +36,26 @@ func (this *QsciAbstractAPIs) UnsafePointer() unsafe.Pointer { } // newQsciAbstractAPIs constructs the type using only CGO pointers. -func newQsciAbstractAPIs(h *C.QsciAbstractAPIs, h_QObject *C.QObject) *QsciAbstractAPIs { +func newQsciAbstractAPIs(h *C.QsciAbstractAPIs) *QsciAbstractAPIs { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QsciAbstractAPIs_virtbase(h, &outptr_QObject) + return &QsciAbstractAPIs{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQsciAbstractAPIs constructs the type using only unsafe pointers. -func UnsafeNewQsciAbstractAPIs(h unsafe.Pointer, h_QObject unsafe.Pointer) *QsciAbstractAPIs { - if h == nil { - return nil - } - - return &QsciAbstractAPIs{h: (*C.QsciAbstractAPIs)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQsciAbstractAPIs(h unsafe.Pointer) *QsciAbstractAPIs { + return newQsciAbstractAPIs((*C.QsciAbstractAPIs)(h)) } // NewQsciAbstractAPIs constructs a new QsciAbstractAPIs object. func NewQsciAbstractAPIs(lexer *QsciLexer) *QsciAbstractAPIs { - var outptr_QsciAbstractAPIs *C.QsciAbstractAPIs = nil - var outptr_QObject *C.QObject = nil - C.QsciAbstractAPIs_new(lexer.cPointer(), &outptr_QsciAbstractAPIs, &outptr_QObject) - ret := newQsciAbstractAPIs(outptr_QsciAbstractAPIs, outptr_QObject) + ret := newQsciAbstractAPIs(C.QsciAbstractAPIs_new(lexer.cPointer())) ret.isSubclass = true return ret } @@ -94,7 +89,7 @@ func QsciAbstractAPIs_TrUtf8(s string) string { } func (this *QsciAbstractAPIs) Lexer() *QsciLexer { - return newQsciLexer(C.QsciAbstractAPIs_Lexer(this.h), nil) + return newQsciLexer(C.QsciAbstractAPIs_Lexer(this.h)) } func (this *QsciAbstractAPIs) UpdateAutoCompletionList(context []string, list []string) { @@ -406,7 +401,7 @@ func miqt_exec_callback_QsciAbstractAPIs_TimerEvent(self *C.QsciAbstractAPIs, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QsciAbstractAPIs{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -432,7 +427,7 @@ func miqt_exec_callback_QsciAbstractAPIs_ChildEvent(self *C.QsciAbstractAPIs, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QsciAbstractAPIs{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.h b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.h index bfd37af2..c3384a9c 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciabstractapis.h +++ b/qt-restricted-extras/qscintilla/gen_qsciabstractapis.h @@ -34,7 +34,8 @@ typedef struct QsciAbstractAPIs QsciAbstractAPIs; typedef struct QsciLexer QsciLexer; #endif -void QsciAbstractAPIs_new(QsciLexer* lexer, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject); +QsciAbstractAPIs* QsciAbstractAPIs_new(QsciLexer* lexer); +void QsciAbstractAPIs_virtbase(QsciAbstractAPIs* src, QObject** outptr_QObject); QMetaObject* QsciAbstractAPIs_MetaObject(const QsciAbstractAPIs* self); void* QsciAbstractAPIs_Metacast(QsciAbstractAPIs* self, const char* param1); struct miqt_string QsciAbstractAPIs_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qsciapis.cpp b/qt-restricted-extras/qscintilla/gen_qsciapis.cpp index 4022f42b..51d135ed 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciapis.cpp +++ b/qt-restricted-extras/qscintilla/gen_qsciapis.cpp @@ -232,11 +232,12 @@ public: }; -void QsciAPIs_new(QsciLexer* lexer, QsciAPIs** outptr_QsciAPIs, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject) { - MiqtVirtualQsciAPIs* ret = new MiqtVirtualQsciAPIs(lexer); - *outptr_QsciAPIs = ret; - *outptr_QsciAbstractAPIs = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciAPIs* QsciAPIs_new(QsciLexer* lexer) { + return new MiqtVirtualQsciAPIs(lexer); +} + +void QsciAPIs_virtbase(QsciAPIs* src, QsciAbstractAPIs** outptr_QsciAbstractAPIs) { + *outptr_QsciAbstractAPIs = static_cast(src); } QMetaObject* QsciAPIs_MetaObject(const QsciAPIs* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qsciapis.go b/qt-restricted-extras/qscintilla/gen_qsciapis.go index a4c692d8..383df06f 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciapis.go +++ b/qt-restricted-extras/qscintilla/gen_qsciapis.go @@ -36,32 +36,26 @@ func (this *QsciAPIs) UnsafePointer() unsafe.Pointer { } // newQsciAPIs constructs the type using only CGO pointers. -func newQsciAPIs(h *C.QsciAPIs, h_QsciAbstractAPIs *C.QsciAbstractAPIs, h_QObject *C.QObject) *QsciAPIs { +func newQsciAPIs(h *C.QsciAPIs) *QsciAPIs { if h == nil { return nil } + var outptr_QsciAbstractAPIs *C.QsciAbstractAPIs = nil + C.QsciAPIs_virtbase(h, &outptr_QsciAbstractAPIs) + return &QsciAPIs{h: h, - QsciAbstractAPIs: newQsciAbstractAPIs(h_QsciAbstractAPIs, h_QObject)} + QsciAbstractAPIs: newQsciAbstractAPIs(outptr_QsciAbstractAPIs)} } // UnsafeNewQsciAPIs constructs the type using only unsafe pointers. -func UnsafeNewQsciAPIs(h unsafe.Pointer, h_QsciAbstractAPIs unsafe.Pointer, h_QObject unsafe.Pointer) *QsciAPIs { - if h == nil { - return nil - } - - return &QsciAPIs{h: (*C.QsciAPIs)(h), - QsciAbstractAPIs: UnsafeNewQsciAbstractAPIs(h_QsciAbstractAPIs, h_QObject)} +func UnsafeNewQsciAPIs(h unsafe.Pointer) *QsciAPIs { + return newQsciAPIs((*C.QsciAPIs)(h)) } // NewQsciAPIs constructs a new QsciAPIs object. func NewQsciAPIs(lexer *QsciLexer) *QsciAPIs { - var outptr_QsciAPIs *C.QsciAPIs = nil - var outptr_QsciAbstractAPIs *C.QsciAbstractAPIs = nil - var outptr_QObject *C.QObject = nil - C.QsciAPIs_new(lexer.cPointer(), &outptr_QsciAPIs, &outptr_QsciAbstractAPIs, &outptr_QObject) - ret := newQsciAPIs(outptr_QsciAPIs, outptr_QsciAbstractAPIs, outptr_QObject) + ret := newQsciAPIs(C.QsciAPIs_new(lexer.cPointer())) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla/gen_qsciapis.h b/qt-restricted-extras/qscintilla/gen_qsciapis.h index 3b2cbdd5..6424a45e 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciapis.h +++ b/qt-restricted-extras/qscintilla/gen_qsciapis.h @@ -30,7 +30,8 @@ typedef struct QsciAbstractAPIs QsciAbstractAPIs; typedef struct QsciLexer QsciLexer; #endif -void QsciAPIs_new(QsciLexer* lexer, QsciAPIs** outptr_QsciAPIs, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject); +QsciAPIs* QsciAPIs_new(QsciLexer* lexer); +void QsciAPIs_virtbase(QsciAPIs* src, QsciAbstractAPIs** outptr_QsciAbstractAPIs); QMetaObject* QsciAPIs_MetaObject(const QsciAPIs* self); void* QsciAPIs_Metacast(QsciAPIs* self, const char* param1); struct miqt_string QsciAPIs_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscicommand.go b/qt-restricted-extras/qscintilla/gen_qscicommand.go index 2da612d0..0ee6a89a 100644 --- a/qt-restricted-extras/qscintilla/gen_qscicommand.go +++ b/qt-restricted-extras/qscintilla/gen_qscicommand.go @@ -141,16 +141,13 @@ func newQsciCommand(h *C.QsciCommand) *QsciCommand { if h == nil { return nil } + return &QsciCommand{h: h} } // UnsafeNewQsciCommand constructs the type using only unsafe pointers. func UnsafeNewQsciCommand(h unsafe.Pointer) *QsciCommand { - if h == nil { - return nil - } - - return &QsciCommand{h: (*C.QsciCommand)(h)} + return newQsciCommand((*C.QsciCommand)(h)) } func (this *QsciCommand) Command() QsciCommand__Command { diff --git a/qt-restricted-extras/qscintilla/gen_qscicommandset.go b/qt-restricted-extras/qscintilla/gen_qscicommandset.go index a989d2c9..d35e3706 100644 --- a/qt-restricted-extras/qscintilla/gen_qscicommandset.go +++ b/qt-restricted-extras/qscintilla/gen_qscicommandset.go @@ -37,16 +37,13 @@ func newQsciCommandSet(h *C.QsciCommandSet) *QsciCommandSet { if h == nil { return nil } + return &QsciCommandSet{h: h} } // UnsafeNewQsciCommandSet constructs the type using only unsafe pointers. func UnsafeNewQsciCommandSet(h unsafe.Pointer) *QsciCommandSet { - if h == nil { - return nil - } - - return &QsciCommandSet{h: (*C.QsciCommandSet)(h)} + return newQsciCommandSet((*C.QsciCommandSet)(h)) } func (this *QsciCommandSet) ReadSettings(qs *qt.QSettings) bool { diff --git a/qt-restricted-extras/qscintilla/gen_qscidocument.cpp b/qt-restricted-extras/qscintilla/gen_qscidocument.cpp index cd7559c4..cd729348 100644 --- a/qt-restricted-extras/qscintilla/gen_qscidocument.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscidocument.cpp @@ -2,14 +2,12 @@ #include "gen_qscidocument.h" #include "_cgo_export.h" -void QsciDocument_new(QsciDocument** outptr_QsciDocument) { - QsciDocument* ret = new QsciDocument(); - *outptr_QsciDocument = ret; +QsciDocument* QsciDocument_new() { + return new QsciDocument(); } -void QsciDocument_new2(QsciDocument* param1, QsciDocument** outptr_QsciDocument) { - QsciDocument* ret = new QsciDocument(*param1); - *outptr_QsciDocument = ret; +QsciDocument* QsciDocument_new2(QsciDocument* param1) { + return new QsciDocument(*param1); } void QsciDocument_OperatorAssign(QsciDocument* self, QsciDocument* param1) { diff --git a/qt-restricted-extras/qscintilla/gen_qscidocument.go b/qt-restricted-extras/qscintilla/gen_qscidocument.go index f8487c41..aee76e62 100644 --- a/qt-restricted-extras/qscintilla/gen_qscidocument.go +++ b/qt-restricted-extras/qscintilla/gen_qscidocument.go @@ -37,34 +37,27 @@ func newQsciDocument(h *C.QsciDocument) *QsciDocument { if h == nil { return nil } + return &QsciDocument{h: h} } // UnsafeNewQsciDocument constructs the type using only unsafe pointers. func UnsafeNewQsciDocument(h unsafe.Pointer) *QsciDocument { - if h == nil { - return nil - } - - return &QsciDocument{h: (*C.QsciDocument)(h)} + return newQsciDocument((*C.QsciDocument)(h)) } // NewQsciDocument constructs a new QsciDocument object. func NewQsciDocument() *QsciDocument { - var outptr_QsciDocument *C.QsciDocument = nil - C.QsciDocument_new(&outptr_QsciDocument) - ret := newQsciDocument(outptr_QsciDocument) + ret := newQsciDocument(C.QsciDocument_new()) ret.isSubclass = true return ret } // NewQsciDocument2 constructs a new QsciDocument object. func NewQsciDocument2(param1 *QsciDocument) *QsciDocument { - var outptr_QsciDocument *C.QsciDocument = nil - C.QsciDocument_new2(param1.cPointer(), &outptr_QsciDocument) - ret := newQsciDocument(outptr_QsciDocument) + ret := newQsciDocument(C.QsciDocument_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla/gen_qscidocument.h b/qt-restricted-extras/qscintilla/gen_qscidocument.h index d776cf65..b0c7b945 100644 --- a/qt-restricted-extras/qscintilla/gen_qscidocument.h +++ b/qt-restricted-extras/qscintilla/gen_qscidocument.h @@ -20,8 +20,8 @@ class QsciDocument; typedef struct QsciDocument QsciDocument; #endif -void QsciDocument_new(QsciDocument** outptr_QsciDocument); -void QsciDocument_new2(QsciDocument* param1, QsciDocument** outptr_QsciDocument); +QsciDocument* QsciDocument_new(); +QsciDocument* QsciDocument_new2(QsciDocument* param1); void QsciDocument_OperatorAssign(QsciDocument* self, QsciDocument* param1); void QsciDocument_Delete(QsciDocument* self, bool isSubclass); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexer.cpp b/qt-restricted-extras/qscintilla/gen_qscilexer.cpp index ccc631a2..08af2509 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexer.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexer.cpp @@ -1014,16 +1014,16 @@ public: }; -void QsciLexer_new(QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexer* ret = new MiqtVirtualQsciLexer(); - *outptr_QsciLexer = ret; - *outptr_QObject = static_cast(ret); +QsciLexer* QsciLexer_new() { + return new MiqtVirtualQsciLexer(); } -void QsciLexer_new2(QObject* parent, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexer* ret = new MiqtVirtualQsciLexer(parent); - *outptr_QsciLexer = ret; - *outptr_QObject = static_cast(ret); +QsciLexer* QsciLexer_new2(QObject* parent) { + return new MiqtVirtualQsciLexer(parent); +} + +void QsciLexer_virtbase(QsciLexer* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QsciLexer_MetaObject(const QsciLexer* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexer.go b/qt-restricted-extras/qscintilla/gen_qscilexer.go index 899284a5..61a25a96 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexer.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexer.go @@ -36,42 +36,34 @@ func (this *QsciLexer) UnsafePointer() unsafe.Pointer { } // newQsciLexer constructs the type using only CGO pointers. -func newQsciLexer(h *C.QsciLexer, h_QObject *C.QObject) *QsciLexer { +func newQsciLexer(h *C.QsciLexer) *QsciLexer { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QsciLexer_virtbase(h, &outptr_QObject) + return &QsciLexer{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQsciLexer constructs the type using only unsafe pointers. -func UnsafeNewQsciLexer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexer { - if h == nil { - return nil - } - - return &QsciLexer{h: (*C.QsciLexer)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQsciLexer(h unsafe.Pointer) *QsciLexer { + return newQsciLexer((*C.QsciLexer)(h)) } // NewQsciLexer constructs a new QsciLexer object. func NewQsciLexer() *QsciLexer { - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexer_new(&outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexer(outptr_QsciLexer, outptr_QObject) + ret := newQsciLexer(C.QsciLexer_new()) ret.isSubclass = true return ret } // NewQsciLexer2 constructs a new QsciLexer object. func NewQsciLexer2(parent *qt.QObject) *QsciLexer { - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexer(outptr_QsciLexer, outptr_QObject) + ret := newQsciLexer(C.QsciLexer_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -119,7 +111,7 @@ func (this *QsciLexer) LexerId() int { } func (this *QsciLexer) Apis() *QsciAbstractAPIs { - return newQsciAbstractAPIs(C.QsciLexer_Apis(this.h), nil) + return newQsciAbstractAPIs(C.QsciLexer_Apis(this.h)) } func (this *QsciLexer) AutoCompletionFillups() string { @@ -254,7 +246,7 @@ func (this *QsciLexer) DefaultPaperWithStyle(style int) *qt.QColor { } func (this *QsciLexer) Editor() *QsciScintilla { - return newQsciScintilla(C.QsciLexer_Editor(this.h), nil, nil, nil, nil, nil, nil) + return newQsciScintilla(C.QsciLexer_Editor(this.h)) } func (this *QsciLexer) SetAPIs(apis *QsciAbstractAPIs) { @@ -1167,7 +1159,7 @@ func miqt_exec_callback_QsciLexer_SetEditor(self *C.QsciLexer, cb C.intptr_t, ed } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexer{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1411,7 +1403,7 @@ func miqt_exec_callback_QsciLexer_ReadProperties(self *C.QsciLexer, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1448,7 +1440,7 @@ func miqt_exec_callback_QsciLexer_WriteProperties(self *C.QsciLexer, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1539,7 +1531,7 @@ func miqt_exec_callback_QsciLexer_TimerEvent(self *C.QsciLexer, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QsciLexer{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1565,7 +1557,7 @@ func miqt_exec_callback_QsciLexer_ChildEvent(self *C.QsciLexer, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QsciLexer{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexer.h b/qt-restricted-extras/qscintilla/gen_qscilexer.h index 4b848ce8..beb68e27 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexer.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexer.h @@ -42,8 +42,9 @@ typedef struct QsciLexer QsciLexer; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexer_new(QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexer_new2(QObject* parent, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexer* QsciLexer_new(); +QsciLexer* QsciLexer_new2(QObject* parent); +void QsciLexer_virtbase(QsciLexer* src, QObject** outptr_QObject); QMetaObject* QsciLexer_MetaObject(const QsciLexer* self); void* QsciLexer_Metacast(QsciLexer* self, const char* param1); struct miqt_string QsciLexer_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeravs.cpp b/qt-restricted-extras/qscintilla/gen_qscilexeravs.cpp index bfef421f..b39eb68b 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeravs.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexeravs.cpp @@ -887,18 +887,16 @@ public: }; -void QsciLexerAVS_new(QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerAVS* ret = new MiqtVirtualQsciLexerAVS(); - *outptr_QsciLexerAVS = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerAVS* QsciLexerAVS_new() { + return new MiqtVirtualQsciLexerAVS(); } -void QsciLexerAVS_new2(QObject* parent, QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerAVS* ret = new MiqtVirtualQsciLexerAVS(parent); - *outptr_QsciLexerAVS = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerAVS* QsciLexerAVS_new2(QObject* parent) { + return new MiqtVirtualQsciLexerAVS(parent); +} + +void QsciLexerAVS_virtbase(QsciLexerAVS* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerAVS_MetaObject(const QsciLexerAVS* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeravs.go b/qt-restricted-extras/qscintilla/gen_qscilexeravs.go index 68104c83..a132c671 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeravs.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexeravs.go @@ -56,44 +56,34 @@ func (this *QsciLexerAVS) UnsafePointer() unsafe.Pointer { } // newQsciLexerAVS constructs the type using only CGO pointers. -func newQsciLexerAVS(h *C.QsciLexerAVS, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerAVS { +func newQsciLexerAVS(h *C.QsciLexerAVS) *QsciLexerAVS { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerAVS_virtbase(h, &outptr_QsciLexer) + return &QsciLexerAVS{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerAVS constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerAVS(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerAVS { - if h == nil { - return nil - } - - return &QsciLexerAVS{h: (*C.QsciLexerAVS)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerAVS(h unsafe.Pointer) *QsciLexerAVS { + return newQsciLexerAVS((*C.QsciLexerAVS)(h)) } // NewQsciLexerAVS constructs a new QsciLexerAVS object. func NewQsciLexerAVS() *QsciLexerAVS { - var outptr_QsciLexerAVS *C.QsciLexerAVS = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerAVS_new(&outptr_QsciLexerAVS, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerAVS(outptr_QsciLexerAVS, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerAVS(C.QsciLexerAVS_new()) ret.isSubclass = true return ret } // NewQsciLexerAVS2 constructs a new QsciLexerAVS object. func NewQsciLexerAVS2(parent *qt.QObject) *QsciLexerAVS { - var outptr_QsciLexerAVS *C.QsciLexerAVS = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerAVS_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerAVS, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerAVS(outptr_QsciLexerAVS, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerAVS(C.QsciLexerAVS_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -962,7 +952,7 @@ func miqt_exec_callback_QsciLexerAVS_SetEditor(self *C.QsciLexerAVS, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1206,7 +1196,7 @@ func miqt_exec_callback_QsciLexerAVS_ReadProperties(self *C.QsciLexerAVS, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1243,7 +1233,7 @@ func miqt_exec_callback_QsciLexerAVS_WriteProperties(self *C.QsciLexerAVS, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeravs.h b/qt-restricted-extras/qscintilla/gen_qscilexeravs.h index f2e8d18c..e465dac8 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeravs.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexeravs.h @@ -34,8 +34,9 @@ typedef struct QsciLexerAVS QsciLexerAVS; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerAVS_new(QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerAVS_new2(QObject* parent, QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerAVS* QsciLexerAVS_new(); +QsciLexerAVS* QsciLexerAVS_new2(QObject* parent); +void QsciLexerAVS_virtbase(QsciLexerAVS* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerAVS_MetaObject(const QsciLexerAVS* self); void* QsciLexerAVS_Metacast(QsciLexerAVS* self, const char* param1); struct miqt_string QsciLexerAVS_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerbash.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerbash.cpp index caa647e7..f5422fbe 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerbash.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerbash.cpp @@ -887,18 +887,16 @@ public: }; -void QsciLexerBash_new(QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerBash* ret = new MiqtVirtualQsciLexerBash(); - *outptr_QsciLexerBash = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerBash* QsciLexerBash_new() { + return new MiqtVirtualQsciLexerBash(); } -void QsciLexerBash_new2(QObject* parent, QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerBash* ret = new MiqtVirtualQsciLexerBash(parent); - *outptr_QsciLexerBash = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerBash* QsciLexerBash_new2(QObject* parent) { + return new MiqtVirtualQsciLexerBash(parent); +} + +void QsciLexerBash_virtbase(QsciLexerBash* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerBash_MetaObject(const QsciLexerBash* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerbash.go b/qt-restricted-extras/qscintilla/gen_qscilexerbash.go index 97a48cd1..b9f046f1 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerbash.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerbash.go @@ -55,44 +55,34 @@ func (this *QsciLexerBash) UnsafePointer() unsafe.Pointer { } // newQsciLexerBash constructs the type using only CGO pointers. -func newQsciLexerBash(h *C.QsciLexerBash, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerBash { +func newQsciLexerBash(h *C.QsciLexerBash) *QsciLexerBash { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerBash_virtbase(h, &outptr_QsciLexer) + return &QsciLexerBash{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerBash constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerBash(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerBash { - if h == nil { - return nil - } - - return &QsciLexerBash{h: (*C.QsciLexerBash)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerBash(h unsafe.Pointer) *QsciLexerBash { + return newQsciLexerBash((*C.QsciLexerBash)(h)) } // NewQsciLexerBash constructs a new QsciLexerBash object. func NewQsciLexerBash() *QsciLexerBash { - var outptr_QsciLexerBash *C.QsciLexerBash = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerBash_new(&outptr_QsciLexerBash, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerBash(outptr_QsciLexerBash, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerBash(C.QsciLexerBash_new()) ret.isSubclass = true return ret } // NewQsciLexerBash2 constructs a new QsciLexerBash object. func NewQsciLexerBash2(parent *qt.QObject) *QsciLexerBash { - var outptr_QsciLexerBash *C.QsciLexerBash = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerBash_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerBash, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerBash(outptr_QsciLexerBash, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerBash(C.QsciLexerBash_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -971,7 +961,7 @@ func miqt_exec_callback_QsciLexerBash_SetEditor(self *C.QsciLexerBash, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1215,7 +1205,7 @@ func miqt_exec_callback_QsciLexerBash_ReadProperties(self *C.QsciLexerBash, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1252,7 +1242,7 @@ func miqt_exec_callback_QsciLexerBash_WriteProperties(self *C.QsciLexerBash, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerbash.h b/qt-restricted-extras/qscintilla/gen_qscilexerbash.h index 0fb9f0e4..a31847e7 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerbash.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerbash.h @@ -34,8 +34,9 @@ typedef struct QsciLexerBash QsciLexerBash; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerBash_new(QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerBash_new2(QObject* parent, QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerBash* QsciLexerBash_new(); +QsciLexerBash* QsciLexerBash_new2(QObject* parent); +void QsciLexerBash_virtbase(QsciLexerBash* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerBash_MetaObject(const QsciLexerBash* self); void* QsciLexerBash_Metacast(QsciLexerBash* self, const char* param1); struct miqt_string QsciLexerBash_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerbatch.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerbatch.cpp index d690666e..abbf8796 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerbatch.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerbatch.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerBatch_new(QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerBatch* ret = new MiqtVirtualQsciLexerBatch(); - *outptr_QsciLexerBatch = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerBatch* QsciLexerBatch_new() { + return new MiqtVirtualQsciLexerBatch(); } -void QsciLexerBatch_new2(QObject* parent, QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerBatch* ret = new MiqtVirtualQsciLexerBatch(parent); - *outptr_QsciLexerBatch = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerBatch* QsciLexerBatch_new2(QObject* parent) { + return new MiqtVirtualQsciLexerBatch(parent); +} + +void QsciLexerBatch_virtbase(QsciLexerBatch* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerBatch_MetaObject(const QsciLexerBatch* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerbatch.go b/qt-restricted-extras/qscintilla/gen_qscilexerbatch.go index 037c958e..3c7440c9 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerbatch.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerbatch.go @@ -49,44 +49,34 @@ func (this *QsciLexerBatch) UnsafePointer() unsafe.Pointer { } // newQsciLexerBatch constructs the type using only CGO pointers. -func newQsciLexerBatch(h *C.QsciLexerBatch, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerBatch { +func newQsciLexerBatch(h *C.QsciLexerBatch) *QsciLexerBatch { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerBatch_virtbase(h, &outptr_QsciLexer) + return &QsciLexerBatch{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerBatch constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerBatch(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerBatch { - if h == nil { - return nil - } - - return &QsciLexerBatch{h: (*C.QsciLexerBatch)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerBatch(h unsafe.Pointer) *QsciLexerBatch { + return newQsciLexerBatch((*C.QsciLexerBatch)(h)) } // NewQsciLexerBatch constructs a new QsciLexerBatch object. func NewQsciLexerBatch() *QsciLexerBatch { - var outptr_QsciLexerBatch *C.QsciLexerBatch = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerBatch_new(&outptr_QsciLexerBatch, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerBatch(outptr_QsciLexerBatch, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerBatch(C.QsciLexerBatch_new()) ret.isSubclass = true return ret } // NewQsciLexerBatch2 constructs a new QsciLexerBatch object. func NewQsciLexerBatch2(parent *qt.QObject) *QsciLexerBatch { - var outptr_QsciLexerBatch *C.QsciLexerBatch = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerBatch_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerBatch, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerBatch(outptr_QsciLexerBatch, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerBatch(C.QsciLexerBatch_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -893,7 +883,7 @@ func miqt_exec_callback_QsciLexerBatch_SetEditor(self *C.QsciLexerBatch, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerBatch{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1137,7 +1127,7 @@ func miqt_exec_callback_QsciLexerBatch_ReadProperties(self *C.QsciLexerBatch, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1174,7 +1164,7 @@ func miqt_exec_callback_QsciLexerBatch_WriteProperties(self *C.QsciLexerBatch, c } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerbatch.h b/qt-restricted-extras/qscintilla/gen_qscilexerbatch.h index 549de402..56fce44d 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerbatch.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerbatch.h @@ -34,8 +34,9 @@ typedef struct QsciLexerBatch QsciLexerBatch; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerBatch_new(QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerBatch_new2(QObject* parent, QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerBatch* QsciLexerBatch_new(); +QsciLexerBatch* QsciLexerBatch_new2(QObject* parent); +void QsciLexerBatch_virtbase(QsciLexerBatch* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerBatch_MetaObject(const QsciLexerBatch* self); void* QsciLexerBatch_Metacast(QsciLexerBatch* self, const char* param1); struct miqt_string QsciLexerBatch_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercmake.cpp b/qt-restricted-extras/qscintilla/gen_qscilexercmake.cpp index 62fb29e2..c3049c41 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercmake.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexercmake.cpp @@ -863,18 +863,16 @@ public: }; -void QsciLexerCMake_new(QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCMake* ret = new MiqtVirtualQsciLexerCMake(); - *outptr_QsciLexerCMake = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCMake* QsciLexerCMake_new() { + return new MiqtVirtualQsciLexerCMake(); } -void QsciLexerCMake_new2(QObject* parent, QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCMake* ret = new MiqtVirtualQsciLexerCMake(parent); - *outptr_QsciLexerCMake = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCMake* QsciLexerCMake_new2(QObject* parent) { + return new MiqtVirtualQsciLexerCMake(parent); +} + +void QsciLexerCMake_virtbase(QsciLexerCMake* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerCMake_MetaObject(const QsciLexerCMake* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercmake.go b/qt-restricted-extras/qscintilla/gen_qscilexercmake.go index ef2df62c..93def7b2 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercmake.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercmake.go @@ -56,44 +56,34 @@ func (this *QsciLexerCMake) UnsafePointer() unsafe.Pointer { } // newQsciLexerCMake constructs the type using only CGO pointers. -func newQsciLexerCMake(h *C.QsciLexerCMake, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCMake { +func newQsciLexerCMake(h *C.QsciLexerCMake) *QsciLexerCMake { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerCMake_virtbase(h, &outptr_QsciLexer) + return &QsciLexerCMake{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerCMake constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerCMake(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCMake { - if h == nil { - return nil - } - - return &QsciLexerCMake{h: (*C.QsciLexerCMake)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerCMake(h unsafe.Pointer) *QsciLexerCMake { + return newQsciLexerCMake((*C.QsciLexerCMake)(h)) } // NewQsciLexerCMake constructs a new QsciLexerCMake object. func NewQsciLexerCMake() *QsciLexerCMake { - var outptr_QsciLexerCMake *C.QsciLexerCMake = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCMake_new(&outptr_QsciLexerCMake, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCMake(outptr_QsciLexerCMake, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCMake(C.QsciLexerCMake_new()) ret.isSubclass = true return ret } // NewQsciLexerCMake2 constructs a new QsciLexerCMake object. func NewQsciLexerCMake2(parent *qt.QObject) *QsciLexerCMake { - var outptr_QsciLexerCMake *C.QsciLexerCMake = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCMake_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCMake, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCMake(outptr_QsciLexerCMake, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCMake(C.QsciLexerCMake_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -925,7 +915,7 @@ func miqt_exec_callback_QsciLexerCMake_SetEditor(self *C.QsciLexerCMake, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1169,7 +1159,7 @@ func miqt_exec_callback_QsciLexerCMake_ReadProperties(self *C.QsciLexerCMake, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1206,7 +1196,7 @@ func miqt_exec_callback_QsciLexerCMake_WriteProperties(self *C.QsciLexerCMake, c } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercmake.h b/qt-restricted-extras/qscintilla/gen_qscilexercmake.h index 0816a358..cc691588 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercmake.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexercmake.h @@ -34,8 +34,9 @@ typedef struct QsciLexerCMake QsciLexerCMake; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerCMake_new(QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerCMake_new2(QObject* parent, QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerCMake* QsciLexerCMake_new(); +QsciLexerCMake* QsciLexerCMake_new2(QObject* parent); +void QsciLexerCMake_virtbase(QsciLexerCMake* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerCMake_MetaObject(const QsciLexerCMake* self); void* QsciLexerCMake_Metacast(QsciLexerCMake* self, const char* param1); struct miqt_string QsciLexerCMake_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.cpp b/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.cpp index 20a5116b..7919eba1 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerCoffeeScript_new(QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCoffeeScript* ret = new MiqtVirtualQsciLexerCoffeeScript(); - *outptr_QsciLexerCoffeeScript = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCoffeeScript* QsciLexerCoffeeScript_new() { + return new MiqtVirtualQsciLexerCoffeeScript(); } -void QsciLexerCoffeeScript_new2(QObject* parent, QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCoffeeScript* ret = new MiqtVirtualQsciLexerCoffeeScript(parent); - *outptr_QsciLexerCoffeeScript = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCoffeeScript* QsciLexerCoffeeScript_new2(QObject* parent) { + return new MiqtVirtualQsciLexerCoffeeScript(parent); +} + +void QsciLexerCoffeeScript_virtbase(QsciLexerCoffeeScript* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerCoffeeScript_MetaObject(const QsciLexerCoffeeScript* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.go b/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.go index 38241c88..2ece2594 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.go @@ -65,44 +65,34 @@ func (this *QsciLexerCoffeeScript) UnsafePointer() unsafe.Pointer { } // newQsciLexerCoffeeScript constructs the type using only CGO pointers. -func newQsciLexerCoffeeScript(h *C.QsciLexerCoffeeScript, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCoffeeScript { +func newQsciLexerCoffeeScript(h *C.QsciLexerCoffeeScript) *QsciLexerCoffeeScript { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerCoffeeScript_virtbase(h, &outptr_QsciLexer) + return &QsciLexerCoffeeScript{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerCoffeeScript constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerCoffeeScript(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCoffeeScript { - if h == nil { - return nil - } - - return &QsciLexerCoffeeScript{h: (*C.QsciLexerCoffeeScript)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerCoffeeScript(h unsafe.Pointer) *QsciLexerCoffeeScript { + return newQsciLexerCoffeeScript((*C.QsciLexerCoffeeScript)(h)) } // NewQsciLexerCoffeeScript constructs a new QsciLexerCoffeeScript object. func NewQsciLexerCoffeeScript() *QsciLexerCoffeeScript { - var outptr_QsciLexerCoffeeScript *C.QsciLexerCoffeeScript = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCoffeeScript_new(&outptr_QsciLexerCoffeeScript, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCoffeeScript(outptr_QsciLexerCoffeeScript, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCoffeeScript(C.QsciLexerCoffeeScript_new()) ret.isSubclass = true return ret } // NewQsciLexerCoffeeScript2 constructs a new QsciLexerCoffeeScript object. func NewQsciLexerCoffeeScript2(parent *qt.QObject) *QsciLexerCoffeeScript { - var outptr_QsciLexerCoffeeScript *C.QsciLexerCoffeeScript = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCoffeeScript_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCoffeeScript, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCoffeeScript(outptr_QsciLexerCoffeeScript, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCoffeeScript(C.QsciLexerCoffeeScript_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -988,7 +978,7 @@ func miqt_exec_callback_QsciLexerCoffeeScript_SetEditor(self *C.QsciLexerCoffeeS } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1232,7 +1222,7 @@ func miqt_exec_callback_QsciLexerCoffeeScript_ReadProperties(self *C.QsciLexerCo } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1269,7 +1259,7 @@ func miqt_exec_callback_QsciLexerCoffeeScript_WriteProperties(self *C.QsciLexerC } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.h b/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.h index 7eb6d21b..0d4bb984 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexercoffeescript.h @@ -34,8 +34,9 @@ typedef struct QsciLexerCoffeeScript QsciLexerCoffeeScript; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerCoffeeScript_new(QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerCoffeeScript_new2(QObject* parent, QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerCoffeeScript* QsciLexerCoffeeScript_new(); +QsciLexerCoffeeScript* QsciLexerCoffeeScript_new2(QObject* parent); +void QsciLexerCoffeeScript_virtbase(QsciLexerCoffeeScript* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerCoffeeScript_MetaObject(const QsciLexerCoffeeScript* self); void* QsciLexerCoffeeScript_Metacast(QsciLexerCoffeeScript* self, const char* param1); struct miqt_string QsciLexerCoffeeScript_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercpp.cpp b/qt-restricted-extras/qscintilla/gen_qscilexercpp.cpp index fb9fa3dc..9c2e09b3 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercpp.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexercpp.cpp @@ -960,25 +960,20 @@ public: }; -void QsciLexerCPP_new(QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCPP* ret = new MiqtVirtualQsciLexerCPP(); - *outptr_QsciLexerCPP = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCPP* QsciLexerCPP_new() { + return new MiqtVirtualQsciLexerCPP(); } -void QsciLexerCPP_new2(QObject* parent, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCPP* ret = new MiqtVirtualQsciLexerCPP(parent); - *outptr_QsciLexerCPP = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCPP* QsciLexerCPP_new2(QObject* parent) { + return new MiqtVirtualQsciLexerCPP(parent); } -void QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCPP* ret = new MiqtVirtualQsciLexerCPP(parent, caseInsensitiveKeywords); - *outptr_QsciLexerCPP = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCPP* QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords) { + return new MiqtVirtualQsciLexerCPP(parent, caseInsensitiveKeywords); +} + +void QsciLexerCPP_virtbase(QsciLexerCPP* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerCPP_MetaObject(const QsciLexerCPP* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercpp.go b/qt-restricted-extras/qscintilla/gen_qscilexercpp.go index b961040c..4a4cb151 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercpp.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercpp.go @@ -97,56 +97,42 @@ func (this *QsciLexerCPP) UnsafePointer() unsafe.Pointer { } // newQsciLexerCPP constructs the type using only CGO pointers. -func newQsciLexerCPP(h *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCPP { +func newQsciLexerCPP(h *C.QsciLexerCPP) *QsciLexerCPP { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerCPP_virtbase(h, &outptr_QsciLexer) + return &QsciLexerCPP{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerCPP constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerCPP(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCPP { - if h == nil { - return nil - } - - return &QsciLexerCPP{h: (*C.QsciLexerCPP)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerCPP(h unsafe.Pointer) *QsciLexerCPP { + return newQsciLexerCPP((*C.QsciLexerCPP)(h)) } // NewQsciLexerCPP constructs a new QsciLexerCPP object. func NewQsciLexerCPP() *QsciLexerCPP { - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCPP_new(&outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCPP(outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCPP(C.QsciLexerCPP_new()) ret.isSubclass = true return ret } // NewQsciLexerCPP2 constructs a new QsciLexerCPP object. func NewQsciLexerCPP2(parent *qt.QObject) *QsciLexerCPP { - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCPP_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCPP(outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCPP(C.QsciLexerCPP_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQsciLexerCPP3 constructs a new QsciLexerCPP object. func NewQsciLexerCPP3(parent *qt.QObject, caseInsensitiveKeywords bool) *QsciLexerCPP { - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCPP_new3((*C.QObject)(parent.UnsafePointer()), (C.bool)(caseInsensitiveKeywords), &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCPP(outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCPP(C.QsciLexerCPP_new3((*C.QObject)(parent.UnsafePointer()), (C.bool)(caseInsensitiveKeywords))) ret.isSubclass = true return ret } @@ -1218,7 +1204,7 @@ func miqt_exec_callback_QsciLexerCPP_SetEditor(self *C.QsciLexerCPP, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1462,7 +1448,7 @@ func miqt_exec_callback_QsciLexerCPP_ReadProperties(self *C.QsciLexerCPP, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1499,7 +1485,7 @@ func miqt_exec_callback_QsciLexerCPP_WriteProperties(self *C.QsciLexerCPP, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercpp.h b/qt-restricted-extras/qscintilla/gen_qscilexercpp.h index c6913bd4..5924dc9c 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercpp.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexercpp.h @@ -34,9 +34,10 @@ typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerCPP_new(QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerCPP_new2(QObject* parent, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerCPP* QsciLexerCPP_new(); +QsciLexerCPP* QsciLexerCPP_new2(QObject* parent); +QsciLexerCPP* QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords); +void QsciLexerCPP_virtbase(QsciLexerCPP* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerCPP_MetaObject(const QsciLexerCPP* self); void* QsciLexerCPP_Metacast(QsciLexerCPP* self, const char* param1); struct miqt_string QsciLexerCPP_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercsharp.cpp b/qt-restricted-extras/qscintilla/gen_qscilexercsharp.cpp index 84b250b3..7dcc0c6e 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercsharp.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexercsharp.cpp @@ -139,20 +139,16 @@ public: }; -void QsciLexerCSharp_new(QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCSharp* ret = new MiqtVirtualQsciLexerCSharp(); - *outptr_QsciLexerCSharp = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCSharp* QsciLexerCSharp_new() { + return new MiqtVirtualQsciLexerCSharp(); } -void QsciLexerCSharp_new2(QObject* parent, QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCSharp* ret = new MiqtVirtualQsciLexerCSharp(parent); - *outptr_QsciLexerCSharp = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCSharp* QsciLexerCSharp_new2(QObject* parent) { + return new MiqtVirtualQsciLexerCSharp(parent); +} + +void QsciLexerCSharp_virtbase(QsciLexerCSharp* src, QsciLexerCPP** outptr_QsciLexerCPP) { + *outptr_QsciLexerCPP = static_cast(src); } QMetaObject* QsciLexerCSharp_MetaObject(const QsciLexerCSharp* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercsharp.go b/qt-restricted-extras/qscintilla/gen_qscilexercsharp.go index 79f1e23d..cddd6b4f 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercsharp.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercsharp.go @@ -36,46 +36,34 @@ func (this *QsciLexerCSharp) UnsafePointer() unsafe.Pointer { } // newQsciLexerCSharp constructs the type using only CGO pointers. -func newQsciLexerCSharp(h *C.QsciLexerCSharp, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCSharp { +func newQsciLexerCSharp(h *C.QsciLexerCSharp) *QsciLexerCSharp { if h == nil { return nil } + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + C.QsciLexerCSharp_virtbase(h, &outptr_QsciLexerCPP) + return &QsciLexerCSharp{h: h, - QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} + QsciLexerCPP: newQsciLexerCPP(outptr_QsciLexerCPP)} } // UnsafeNewQsciLexerCSharp constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerCSharp(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCSharp { - if h == nil { - return nil - } - - return &QsciLexerCSharp{h: (*C.QsciLexerCSharp)(h), - QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerCSharp(h unsafe.Pointer) *QsciLexerCSharp { + return newQsciLexerCSharp((*C.QsciLexerCSharp)(h)) } // NewQsciLexerCSharp constructs a new QsciLexerCSharp object. func NewQsciLexerCSharp() *QsciLexerCSharp { - var outptr_QsciLexerCSharp *C.QsciLexerCSharp = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCSharp_new(&outptr_QsciLexerCSharp, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCSharp(outptr_QsciLexerCSharp, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCSharp(C.QsciLexerCSharp_new()) ret.isSubclass = true return ret } // NewQsciLexerCSharp2 constructs a new QsciLexerCSharp object. func NewQsciLexerCSharp2(parent *qt.QObject) *QsciLexerCSharp { - var outptr_QsciLexerCSharp *C.QsciLexerCSharp = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCSharp_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCSharp, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCSharp(outptr_QsciLexerCSharp, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCSharp(C.QsciLexerCSharp_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercsharp.h b/qt-restricted-extras/qscintilla/gen_qscilexercsharp.h index 85d0d6c5..20461db5 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercsharp.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexercsharp.h @@ -32,8 +32,9 @@ typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerCSharp QsciLexerCSharp; #endif -void QsciLexerCSharp_new(QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerCSharp_new2(QObject* parent, QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerCSharp* QsciLexerCSharp_new(); +QsciLexerCSharp* QsciLexerCSharp_new2(QObject* parent); +void QsciLexerCSharp_virtbase(QsciLexerCSharp* src, QsciLexerCPP** outptr_QsciLexerCPP); QMetaObject* QsciLexerCSharp_MetaObject(const QsciLexerCSharp* self); void* QsciLexerCSharp_Metacast(QsciLexerCSharp* self, const char* param1); struct miqt_string QsciLexerCSharp_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercss.cpp b/qt-restricted-extras/qscintilla/gen_qscilexercss.cpp index b7138ed0..f03dba14 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercss.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexercss.cpp @@ -887,18 +887,16 @@ public: }; -void QsciLexerCSS_new(QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCSS* ret = new MiqtVirtualQsciLexerCSS(); - *outptr_QsciLexerCSS = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCSS* QsciLexerCSS_new() { + return new MiqtVirtualQsciLexerCSS(); } -void QsciLexerCSS_new2(QObject* parent, QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCSS* ret = new MiqtVirtualQsciLexerCSS(parent); - *outptr_QsciLexerCSS = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCSS* QsciLexerCSS_new2(QObject* parent) { + return new MiqtVirtualQsciLexerCSS(parent); +} + +void QsciLexerCSS_virtbase(QsciLexerCSS* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerCSS_MetaObject(const QsciLexerCSS* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercss.go b/qt-restricted-extras/qscintilla/gen_qscilexercss.go index d6a36f4b..f7fd98fc 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercss.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercss.go @@ -65,44 +65,34 @@ func (this *QsciLexerCSS) UnsafePointer() unsafe.Pointer { } // newQsciLexerCSS constructs the type using only CGO pointers. -func newQsciLexerCSS(h *C.QsciLexerCSS, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCSS { +func newQsciLexerCSS(h *C.QsciLexerCSS) *QsciLexerCSS { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerCSS_virtbase(h, &outptr_QsciLexer) + return &QsciLexerCSS{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerCSS constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerCSS(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCSS { - if h == nil { - return nil - } - - return &QsciLexerCSS{h: (*C.QsciLexerCSS)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerCSS(h unsafe.Pointer) *QsciLexerCSS { + return newQsciLexerCSS((*C.QsciLexerCSS)(h)) } // NewQsciLexerCSS constructs a new QsciLexerCSS object. func NewQsciLexerCSS() *QsciLexerCSS { - var outptr_QsciLexerCSS *C.QsciLexerCSS = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCSS_new(&outptr_QsciLexerCSS, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCSS(outptr_QsciLexerCSS, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCSS(C.QsciLexerCSS_new()) ret.isSubclass = true return ret } // NewQsciLexerCSS2 constructs a new QsciLexerCSS object. func NewQsciLexerCSS2(parent *qt.QObject) *QsciLexerCSS { - var outptr_QsciLexerCSS *C.QsciLexerCSS = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCSS_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCSS, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCSS(outptr_QsciLexerCSS, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCSS(C.QsciLexerCSS_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1011,7 +1001,7 @@ func miqt_exec_callback_QsciLexerCSS_SetEditor(self *C.QsciLexerCSS, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1255,7 +1245,7 @@ func miqt_exec_callback_QsciLexerCSS_ReadProperties(self *C.QsciLexerCSS, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1292,7 +1282,7 @@ func miqt_exec_callback_QsciLexerCSS_WriteProperties(self *C.QsciLexerCSS, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercss.h b/qt-restricted-extras/qscintilla/gen_qscilexercss.h index 4e1881b0..5621f680 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercss.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexercss.h @@ -34,8 +34,9 @@ typedef struct QsciLexerCSS QsciLexerCSS; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerCSS_new(QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerCSS_new2(QObject* parent, QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerCSS* QsciLexerCSS_new(); +QsciLexerCSS* QsciLexerCSS_new2(QObject* parent); +void QsciLexerCSS_virtbase(QsciLexerCSS* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerCSS_MetaObject(const QsciLexerCSS* self); void* QsciLexerCSS_Metacast(QsciLexerCSS* self, const char* param1); struct miqt_string QsciLexerCSS_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercustom.cpp b/qt-restricted-extras/qscintilla/gen_qscilexercustom.cpp index 14ada5ee..339e54ce 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercustom.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexercustom.cpp @@ -856,18 +856,16 @@ public: }; -void QsciLexerCustom_new(QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCustom* ret = new MiqtVirtualQsciLexerCustom(); - *outptr_QsciLexerCustom = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCustom* QsciLexerCustom_new() { + return new MiqtVirtualQsciLexerCustom(); } -void QsciLexerCustom_new2(QObject* parent, QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCustom* ret = new MiqtVirtualQsciLexerCustom(parent); - *outptr_QsciLexerCustom = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCustom* QsciLexerCustom_new2(QObject* parent) { + return new MiqtVirtualQsciLexerCustom(parent); +} + +void QsciLexerCustom_virtbase(QsciLexerCustom* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerCustom_MetaObject(const QsciLexerCustom* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercustom.go b/qt-restricted-extras/qscintilla/gen_qscilexercustom.go index b6458187..7156ba5b 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercustom.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexercustom.go @@ -36,44 +36,34 @@ func (this *QsciLexerCustom) UnsafePointer() unsafe.Pointer { } // newQsciLexerCustom constructs the type using only CGO pointers. -func newQsciLexerCustom(h *C.QsciLexerCustom, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCustom { +func newQsciLexerCustom(h *C.QsciLexerCustom) *QsciLexerCustom { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerCustom_virtbase(h, &outptr_QsciLexer) + return &QsciLexerCustom{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerCustom constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerCustom(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCustom { - if h == nil { - return nil - } - - return &QsciLexerCustom{h: (*C.QsciLexerCustom)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerCustom(h unsafe.Pointer) *QsciLexerCustom { + return newQsciLexerCustom((*C.QsciLexerCustom)(h)) } // NewQsciLexerCustom constructs a new QsciLexerCustom object. func NewQsciLexerCustom() *QsciLexerCustom { - var outptr_QsciLexerCustom *C.QsciLexerCustom = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCustom_new(&outptr_QsciLexerCustom, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCustom(outptr_QsciLexerCustom, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCustom(C.QsciLexerCustom_new()) ret.isSubclass = true return ret } // NewQsciLexerCustom2 constructs a new QsciLexerCustom object. func NewQsciLexerCustom2(parent *qt.QObject) *QsciLexerCustom { - var outptr_QsciLexerCustom *C.QsciLexerCustom = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCustom_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCustom, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCustom(outptr_QsciLexerCustom, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCustom(C.QsciLexerCustom_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -220,7 +210,7 @@ func miqt_exec_callback_QsciLexerCustom_SetEditor(self *C.QsciLexerCustom, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerCustom{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1121,7 +1111,7 @@ func miqt_exec_callback_QsciLexerCustom_ReadProperties(self *C.QsciLexerCustom, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1158,7 +1148,7 @@ func miqt_exec_callback_QsciLexerCustom_WriteProperties(self *C.QsciLexerCustom, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexercustom.h b/qt-restricted-extras/qscintilla/gen_qscilexercustom.h index 9f3787c5..7bea4aa1 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexercustom.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexercustom.h @@ -36,8 +36,9 @@ typedef struct QsciScintilla QsciScintilla; typedef struct QsciStyle QsciStyle; #endif -void QsciLexerCustom_new(QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerCustom_new2(QObject* parent, QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerCustom* QsciLexerCustom_new(); +QsciLexerCustom* QsciLexerCustom_new2(QObject* parent); +void QsciLexerCustom_virtbase(QsciLexerCustom* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerCustom_MetaObject(const QsciLexerCustom* self); void* QsciLexerCustom_Metacast(QsciLexerCustom* self, const char* param1); struct miqt_string QsciLexerCustom_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerd.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerd.cpp index ad9f6f12..310fd106 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerd.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerd.cpp @@ -911,18 +911,16 @@ public: }; -void QsciLexerD_new(QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerD* ret = new MiqtVirtualQsciLexerD(); - *outptr_QsciLexerD = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerD* QsciLexerD_new() { + return new MiqtVirtualQsciLexerD(); } -void QsciLexerD_new2(QObject* parent, QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerD* ret = new MiqtVirtualQsciLexerD(parent); - *outptr_QsciLexerD = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerD* QsciLexerD_new2(QObject* parent) { + return new MiqtVirtualQsciLexerD(parent); +} + +void QsciLexerD_virtbase(QsciLexerD* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerD_MetaObject(const QsciLexerD* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerd.go b/qt-restricted-extras/qscintilla/gen_qscilexerd.go index 1a3a73bb..da0fdf6f 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerd.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerd.go @@ -64,44 +64,34 @@ func (this *QsciLexerD) UnsafePointer() unsafe.Pointer { } // newQsciLexerD constructs the type using only CGO pointers. -func newQsciLexerD(h *C.QsciLexerD, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerD { +func newQsciLexerD(h *C.QsciLexerD) *QsciLexerD { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerD_virtbase(h, &outptr_QsciLexer) + return &QsciLexerD{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerD constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerD(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerD { - if h == nil { - return nil - } - - return &QsciLexerD{h: (*C.QsciLexerD)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerD(h unsafe.Pointer) *QsciLexerD { + return newQsciLexerD((*C.QsciLexerD)(h)) } // NewQsciLexerD constructs a new QsciLexerD object. func NewQsciLexerD() *QsciLexerD { - var outptr_QsciLexerD *C.QsciLexerD = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerD_new(&outptr_QsciLexerD, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerD(outptr_QsciLexerD, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerD(C.QsciLexerD_new()) ret.isSubclass = true return ret } // NewQsciLexerD2 constructs a new QsciLexerD object. func NewQsciLexerD2(parent *qt.QObject) *QsciLexerD { - var outptr_QsciLexerD *C.QsciLexerD = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerD_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerD, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerD(outptr_QsciLexerD, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerD(C.QsciLexerD_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1057,7 +1047,7 @@ func miqt_exec_callback_QsciLexerD_SetEditor(self *C.QsciLexerD, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerD{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1301,7 +1291,7 @@ func miqt_exec_callback_QsciLexerD_ReadProperties(self *C.QsciLexerD, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1338,7 +1328,7 @@ func miqt_exec_callback_QsciLexerD_WriteProperties(self *C.QsciLexerD, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerd.h b/qt-restricted-extras/qscintilla/gen_qscilexerd.h index b05cf2fe..3c0b60f5 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerd.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerd.h @@ -34,8 +34,9 @@ typedef struct QsciLexerD QsciLexerD; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerD_new(QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerD_new2(QObject* parent, QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerD* QsciLexerD_new(); +QsciLexerD* QsciLexerD_new2(QObject* parent); +void QsciLexerD_virtbase(QsciLexerD* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerD_MetaObject(const QsciLexerD* self); void* QsciLexerD_Metacast(QsciLexerD* self, const char* param1); struct miqt_string QsciLexerD_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerdiff.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerdiff.cpp index 3eae0911..6991db0c 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerdiff.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerdiff.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerDiff_new(QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerDiff* ret = new MiqtVirtualQsciLexerDiff(); - *outptr_QsciLexerDiff = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerDiff* QsciLexerDiff_new() { + return new MiqtVirtualQsciLexerDiff(); } -void QsciLexerDiff_new2(QObject* parent, QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerDiff* ret = new MiqtVirtualQsciLexerDiff(parent); - *outptr_QsciLexerDiff = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerDiff* QsciLexerDiff_new2(QObject* parent) { + return new MiqtVirtualQsciLexerDiff(parent); +} + +void QsciLexerDiff_virtbase(QsciLexerDiff* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerDiff_MetaObject(const QsciLexerDiff* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerdiff.go b/qt-restricted-extras/qscintilla/gen_qscilexerdiff.go index de199133..d91d7c9e 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerdiff.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerdiff.go @@ -53,44 +53,34 @@ func (this *QsciLexerDiff) UnsafePointer() unsafe.Pointer { } // newQsciLexerDiff constructs the type using only CGO pointers. -func newQsciLexerDiff(h *C.QsciLexerDiff, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerDiff { +func newQsciLexerDiff(h *C.QsciLexerDiff) *QsciLexerDiff { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerDiff_virtbase(h, &outptr_QsciLexer) + return &QsciLexerDiff{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerDiff constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerDiff(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerDiff { - if h == nil { - return nil - } - - return &QsciLexerDiff{h: (*C.QsciLexerDiff)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerDiff(h unsafe.Pointer) *QsciLexerDiff { + return newQsciLexerDiff((*C.QsciLexerDiff)(h)) } // NewQsciLexerDiff constructs a new QsciLexerDiff object. func NewQsciLexerDiff() *QsciLexerDiff { - var outptr_QsciLexerDiff *C.QsciLexerDiff = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerDiff_new(&outptr_QsciLexerDiff, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerDiff(outptr_QsciLexerDiff, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerDiff(C.QsciLexerDiff_new()) ret.isSubclass = true return ret } // NewQsciLexerDiff2 constructs a new QsciLexerDiff object. func NewQsciLexerDiff2(parent *qt.QObject) *QsciLexerDiff { - var outptr_QsciLexerDiff *C.QsciLexerDiff = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerDiff_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerDiff, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerDiff(outptr_QsciLexerDiff, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerDiff(C.QsciLexerDiff_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -872,7 +862,7 @@ func miqt_exec_callback_QsciLexerDiff_SetEditor(self *C.QsciLexerDiff, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerDiff{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1116,7 +1106,7 @@ func miqt_exec_callback_QsciLexerDiff_ReadProperties(self *C.QsciLexerDiff, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1153,7 +1143,7 @@ func miqt_exec_callback_QsciLexerDiff_WriteProperties(self *C.QsciLexerDiff, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerdiff.h b/qt-restricted-extras/qscintilla/gen_qscilexerdiff.h index 88e0602a..23a4df44 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerdiff.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerdiff.h @@ -34,8 +34,9 @@ typedef struct QsciLexerDiff QsciLexerDiff; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerDiff_new(QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerDiff_new2(QObject* parent, QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerDiff* QsciLexerDiff_new(); +QsciLexerDiff* QsciLexerDiff_new2(QObject* parent); +void QsciLexerDiff_virtbase(QsciLexerDiff* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerDiff_MetaObject(const QsciLexerDiff* self); void* QsciLexerDiff_Metacast(QsciLexerDiff* self, const char* param1); struct miqt_string QsciLexerDiff_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeredifact.cpp b/qt-restricted-extras/qscintilla/gen_qscilexeredifact.cpp index 8a18497c..30559fcc 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeredifact.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexeredifact.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerEDIFACT_new(QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerEDIFACT* ret = new MiqtVirtualQsciLexerEDIFACT(); - *outptr_QsciLexerEDIFACT = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerEDIFACT* QsciLexerEDIFACT_new() { + return new MiqtVirtualQsciLexerEDIFACT(); } -void QsciLexerEDIFACT_new2(QObject* parent, QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerEDIFACT* ret = new MiqtVirtualQsciLexerEDIFACT(parent); - *outptr_QsciLexerEDIFACT = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerEDIFACT* QsciLexerEDIFACT_new2(QObject* parent) { + return new MiqtVirtualQsciLexerEDIFACT(parent); +} + +void QsciLexerEDIFACT_virtbase(QsciLexerEDIFACT* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerEDIFACT_MetaObject(const QsciLexerEDIFACT* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeredifact.go b/qt-restricted-extras/qscintilla/gen_qscilexeredifact.go index f98c83da..96af0f8b 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeredifact.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexeredifact.go @@ -50,44 +50,34 @@ func (this *QsciLexerEDIFACT) UnsafePointer() unsafe.Pointer { } // newQsciLexerEDIFACT constructs the type using only CGO pointers. -func newQsciLexerEDIFACT(h *C.QsciLexerEDIFACT, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerEDIFACT { +func newQsciLexerEDIFACT(h *C.QsciLexerEDIFACT) *QsciLexerEDIFACT { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerEDIFACT_virtbase(h, &outptr_QsciLexer) + return &QsciLexerEDIFACT{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerEDIFACT constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerEDIFACT(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerEDIFACT { - if h == nil { - return nil - } - - return &QsciLexerEDIFACT{h: (*C.QsciLexerEDIFACT)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerEDIFACT(h unsafe.Pointer) *QsciLexerEDIFACT { + return newQsciLexerEDIFACT((*C.QsciLexerEDIFACT)(h)) } // NewQsciLexerEDIFACT constructs a new QsciLexerEDIFACT object. func NewQsciLexerEDIFACT() *QsciLexerEDIFACT { - var outptr_QsciLexerEDIFACT *C.QsciLexerEDIFACT = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerEDIFACT_new(&outptr_QsciLexerEDIFACT, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerEDIFACT(outptr_QsciLexerEDIFACT, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerEDIFACT(C.QsciLexerEDIFACT_new()) ret.isSubclass = true return ret } // NewQsciLexerEDIFACT2 constructs a new QsciLexerEDIFACT object. func NewQsciLexerEDIFACT2(parent *qt.QObject) *QsciLexerEDIFACT { - var outptr_QsciLexerEDIFACT *C.QsciLexerEDIFACT = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerEDIFACT_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerEDIFACT, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerEDIFACT(outptr_QsciLexerEDIFACT, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerEDIFACT(C.QsciLexerEDIFACT_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -864,7 +854,7 @@ func miqt_exec_callback_QsciLexerEDIFACT_SetEditor(self *C.QsciLexerEDIFACT, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1108,7 +1098,7 @@ func miqt_exec_callback_QsciLexerEDIFACT_ReadProperties(self *C.QsciLexerEDIFACT } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1145,7 +1135,7 @@ func miqt_exec_callback_QsciLexerEDIFACT_WriteProperties(self *C.QsciLexerEDIFAC } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeredifact.h b/qt-restricted-extras/qscintilla/gen_qscilexeredifact.h index b4d03e58..263cc69c 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeredifact.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexeredifact.h @@ -34,8 +34,9 @@ typedef struct QsciLexerEDIFACT QsciLexerEDIFACT; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerEDIFACT_new(QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerEDIFACT_new2(QObject* parent, QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerEDIFACT* QsciLexerEDIFACT_new(); +QsciLexerEDIFACT* QsciLexerEDIFACT_new2(QObject* parent); +void QsciLexerEDIFACT_virtbase(QsciLexerEDIFACT* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerEDIFACT_MetaObject(const QsciLexerEDIFACT* self); void* QsciLexerEDIFACT_Metacast(QsciLexerEDIFACT* self, const char* param1); struct miqt_string QsciLexerEDIFACT_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerfortran.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerfortran.cpp index ba37e2e0..203a9ba5 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerfortran.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerfortran.cpp @@ -41,20 +41,16 @@ public: }; -void QsciLexerFortran_new(QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerFortran* ret = new MiqtVirtualQsciLexerFortran(); - *outptr_QsciLexerFortran = ret; - *outptr_QsciLexerFortran77 = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerFortran* QsciLexerFortran_new() { + return new MiqtVirtualQsciLexerFortran(); } -void QsciLexerFortran_new2(QObject* parent, QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerFortran* ret = new MiqtVirtualQsciLexerFortran(parent); - *outptr_QsciLexerFortran = ret; - *outptr_QsciLexerFortran77 = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerFortran* QsciLexerFortran_new2(QObject* parent) { + return new MiqtVirtualQsciLexerFortran(parent); +} + +void QsciLexerFortran_virtbase(QsciLexerFortran* src, QsciLexerFortran77** outptr_QsciLexerFortran77) { + *outptr_QsciLexerFortran77 = static_cast(src); } QMetaObject* QsciLexerFortran_MetaObject(const QsciLexerFortran* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerfortran.go b/qt-restricted-extras/qscintilla/gen_qscilexerfortran.go index a4c19f19..9c06326a 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerfortran.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerfortran.go @@ -36,46 +36,34 @@ func (this *QsciLexerFortran) UnsafePointer() unsafe.Pointer { } // newQsciLexerFortran constructs the type using only CGO pointers. -func newQsciLexerFortran(h *C.QsciLexerFortran, h_QsciLexerFortran77 *C.QsciLexerFortran77, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerFortran { +func newQsciLexerFortran(h *C.QsciLexerFortran) *QsciLexerFortran { if h == nil { return nil } + var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil + C.QsciLexerFortran_virtbase(h, &outptr_QsciLexerFortran77) + return &QsciLexerFortran{h: h, - QsciLexerFortran77: newQsciLexerFortran77(h_QsciLexerFortran77, h_QsciLexer, h_QObject)} + QsciLexerFortran77: newQsciLexerFortran77(outptr_QsciLexerFortran77)} } // UnsafeNewQsciLexerFortran constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerFortran(h unsafe.Pointer, h_QsciLexerFortran77 unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerFortran { - if h == nil { - return nil - } - - return &QsciLexerFortran{h: (*C.QsciLexerFortran)(h), - QsciLexerFortran77: UnsafeNewQsciLexerFortran77(h_QsciLexerFortran77, h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerFortran(h unsafe.Pointer) *QsciLexerFortran { + return newQsciLexerFortran((*C.QsciLexerFortran)(h)) } // NewQsciLexerFortran constructs a new QsciLexerFortran object. func NewQsciLexerFortran() *QsciLexerFortran { - var outptr_QsciLexerFortran *C.QsciLexerFortran = nil - var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerFortran_new(&outptr_QsciLexerFortran, &outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerFortran(outptr_QsciLexerFortran, outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerFortran(C.QsciLexerFortran_new()) ret.isSubclass = true return ret } // NewQsciLexerFortran2 constructs a new QsciLexerFortran object. func NewQsciLexerFortran2(parent *qt.QObject) *QsciLexerFortran { - var outptr_QsciLexerFortran *C.QsciLexerFortran = nil - var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerFortran_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerFortran, &outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerFortran(outptr_QsciLexerFortran, outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerFortran(C.QsciLexerFortran_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerfortran.h b/qt-restricted-extras/qscintilla/gen_qscilexerfortran.h index 5784881e..6204c258 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerfortran.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerfortran.h @@ -28,8 +28,9 @@ typedef struct QsciLexerFortran QsciLexerFortran; typedef struct QsciLexerFortran77 QsciLexerFortran77; #endif -void QsciLexerFortran_new(QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerFortran_new2(QObject* parent, QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerFortran* QsciLexerFortran_new(); +QsciLexerFortran* QsciLexerFortran_new2(QObject* parent); +void QsciLexerFortran_virtbase(QsciLexerFortran* src, QsciLexerFortran77** outptr_QsciLexerFortran77); QMetaObject* QsciLexerFortran_MetaObject(const QsciLexerFortran* self); void* QsciLexerFortran_Metacast(QsciLexerFortran* self, const char* param1); struct miqt_string QsciLexerFortran_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.cpp index c849d4b3..a72c1c28 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.cpp @@ -863,18 +863,16 @@ public: }; -void QsciLexerFortran77_new(QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerFortran77* ret = new MiqtVirtualQsciLexerFortran77(); - *outptr_QsciLexerFortran77 = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerFortran77* QsciLexerFortran77_new() { + return new MiqtVirtualQsciLexerFortran77(); } -void QsciLexerFortran77_new2(QObject* parent, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerFortran77* ret = new MiqtVirtualQsciLexerFortran77(parent); - *outptr_QsciLexerFortran77 = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerFortran77* QsciLexerFortran77_new2(QObject* parent) { + return new MiqtVirtualQsciLexerFortran77(parent); +} + +void QsciLexerFortran77_virtbase(QsciLexerFortran77* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerFortran77_MetaObject(const QsciLexerFortran77* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.go b/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.go index 9c97c34d..30260d94 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.go @@ -56,44 +56,34 @@ func (this *QsciLexerFortran77) UnsafePointer() unsafe.Pointer { } // newQsciLexerFortran77 constructs the type using only CGO pointers. -func newQsciLexerFortran77(h *C.QsciLexerFortran77, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerFortran77 { +func newQsciLexerFortran77(h *C.QsciLexerFortran77) *QsciLexerFortran77 { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerFortran77_virtbase(h, &outptr_QsciLexer) + return &QsciLexerFortran77{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerFortran77 constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerFortran77(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerFortran77 { - if h == nil { - return nil - } - - return &QsciLexerFortran77{h: (*C.QsciLexerFortran77)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerFortran77(h unsafe.Pointer) *QsciLexerFortran77 { + return newQsciLexerFortran77((*C.QsciLexerFortran77)(h)) } // NewQsciLexerFortran77 constructs a new QsciLexerFortran77 object. func NewQsciLexerFortran77() *QsciLexerFortran77 { - var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerFortran77_new(&outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerFortran77(outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerFortran77(C.QsciLexerFortran77_new()) ret.isSubclass = true return ret } // NewQsciLexerFortran772 constructs a new QsciLexerFortran77 object. func NewQsciLexerFortran772(parent *qt.QObject) *QsciLexerFortran77 { - var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerFortran77_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerFortran77(outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerFortran77(C.QsciLexerFortran77_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -933,7 +923,7 @@ func miqt_exec_callback_QsciLexerFortran77_SetEditor(self *C.QsciLexerFortran77, } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1177,7 +1167,7 @@ func miqt_exec_callback_QsciLexerFortran77_ReadProperties(self *C.QsciLexerFortr } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1214,7 +1204,7 @@ func miqt_exec_callback_QsciLexerFortran77_WriteProperties(self *C.QsciLexerFort } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.h b/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.h index 0963a111..661382d0 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerfortran77.h @@ -34,8 +34,9 @@ typedef struct QsciLexerFortran77 QsciLexerFortran77; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerFortran77_new(QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerFortran77_new2(QObject* parent, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerFortran77* QsciLexerFortran77_new(); +QsciLexerFortran77* QsciLexerFortran77_new2(QObject* parent); +void QsciLexerFortran77_virtbase(QsciLexerFortran77* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerFortran77_MetaObject(const QsciLexerFortran77* self); void* QsciLexerFortran77_Metacast(QsciLexerFortran77* self, const char* param1); struct miqt_string QsciLexerFortran77_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerhtml.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerhtml.cpp index 2f104dc5..7441b8f8 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerhtml.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerhtml.cpp @@ -911,18 +911,16 @@ public: }; -void QsciLexerHTML_new(QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerHTML* ret = new MiqtVirtualQsciLexerHTML(); - *outptr_QsciLexerHTML = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerHTML* QsciLexerHTML_new() { + return new MiqtVirtualQsciLexerHTML(); } -void QsciLexerHTML_new2(QObject* parent, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerHTML* ret = new MiqtVirtualQsciLexerHTML(parent); - *outptr_QsciLexerHTML = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerHTML* QsciLexerHTML_new2(QObject* parent) { + return new MiqtVirtualQsciLexerHTML(parent); +} + +void QsciLexerHTML_virtbase(QsciLexerHTML* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerHTML_MetaObject(const QsciLexerHTML* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerhtml.go b/qt-restricted-extras/qscintilla/gen_qscilexerhtml.go index 750683f6..4049ebb2 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerhtml.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerhtml.go @@ -151,44 +151,34 @@ func (this *QsciLexerHTML) UnsafePointer() unsafe.Pointer { } // newQsciLexerHTML constructs the type using only CGO pointers. -func newQsciLexerHTML(h *C.QsciLexerHTML, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerHTML { +func newQsciLexerHTML(h *C.QsciLexerHTML) *QsciLexerHTML { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerHTML_virtbase(h, &outptr_QsciLexer) + return &QsciLexerHTML{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerHTML constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerHTML(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerHTML { - if h == nil { - return nil - } - - return &QsciLexerHTML{h: (*C.QsciLexerHTML)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerHTML(h unsafe.Pointer) *QsciLexerHTML { + return newQsciLexerHTML((*C.QsciLexerHTML)(h)) } // NewQsciLexerHTML constructs a new QsciLexerHTML object. func NewQsciLexerHTML() *QsciLexerHTML { - var outptr_QsciLexerHTML *C.QsciLexerHTML = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerHTML_new(&outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerHTML(outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerHTML(C.QsciLexerHTML_new()) ret.isSubclass = true return ret } // NewQsciLexerHTML2 constructs a new QsciLexerHTML object. func NewQsciLexerHTML2(parent *qt.QObject) *QsciLexerHTML { - var outptr_QsciLexerHTML *C.QsciLexerHTML = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerHTML_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerHTML(outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerHTML(C.QsciLexerHTML_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1134,7 +1124,7 @@ func miqt_exec_callback_QsciLexerHTML_SetEditor(self *C.QsciLexerHTML, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1378,7 +1368,7 @@ func miqt_exec_callback_QsciLexerHTML_ReadProperties(self *C.QsciLexerHTML, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1415,7 +1405,7 @@ func miqt_exec_callback_QsciLexerHTML_WriteProperties(self *C.QsciLexerHTML, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerhtml.h b/qt-restricted-extras/qscintilla/gen_qscilexerhtml.h index 9091caf9..cb73c0fe 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerhtml.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerhtml.h @@ -34,8 +34,9 @@ typedef struct QsciLexerHTML QsciLexerHTML; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerHTML_new(QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerHTML_new2(QObject* parent, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerHTML* QsciLexerHTML_new(); +QsciLexerHTML* QsciLexerHTML_new2(QObject* parent); +void QsciLexerHTML_virtbase(QsciLexerHTML* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerHTML_MetaObject(const QsciLexerHTML* self); void* QsciLexerHTML_Metacast(QsciLexerHTML* self, const char* param1); struct miqt_string QsciLexerHTML_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeridl.cpp b/qt-restricted-extras/qscintilla/gen_qscilexeridl.cpp index 202a5e60..dbdcf8c0 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeridl.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexeridl.cpp @@ -138,20 +138,16 @@ public: }; -void QsciLexerIDL_new(QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerIDL* ret = new MiqtVirtualQsciLexerIDL(); - *outptr_QsciLexerIDL = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerIDL* QsciLexerIDL_new() { + return new MiqtVirtualQsciLexerIDL(); } -void QsciLexerIDL_new2(QObject* parent, QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerIDL* ret = new MiqtVirtualQsciLexerIDL(parent); - *outptr_QsciLexerIDL = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerIDL* QsciLexerIDL_new2(QObject* parent) { + return new MiqtVirtualQsciLexerIDL(parent); +} + +void QsciLexerIDL_virtbase(QsciLexerIDL* src, QsciLexerCPP** outptr_QsciLexerCPP) { + *outptr_QsciLexerCPP = static_cast(src); } QMetaObject* QsciLexerIDL_MetaObject(const QsciLexerIDL* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeridl.go b/qt-restricted-extras/qscintilla/gen_qscilexeridl.go index dffdf7ea..d625abdf 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeridl.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexeridl.go @@ -36,46 +36,34 @@ func (this *QsciLexerIDL) UnsafePointer() unsafe.Pointer { } // newQsciLexerIDL constructs the type using only CGO pointers. -func newQsciLexerIDL(h *C.QsciLexerIDL, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerIDL { +func newQsciLexerIDL(h *C.QsciLexerIDL) *QsciLexerIDL { if h == nil { return nil } + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + C.QsciLexerIDL_virtbase(h, &outptr_QsciLexerCPP) + return &QsciLexerIDL{h: h, - QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} + QsciLexerCPP: newQsciLexerCPP(outptr_QsciLexerCPP)} } // UnsafeNewQsciLexerIDL constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerIDL(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerIDL { - if h == nil { - return nil - } - - return &QsciLexerIDL{h: (*C.QsciLexerIDL)(h), - QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerIDL(h unsafe.Pointer) *QsciLexerIDL { + return newQsciLexerIDL((*C.QsciLexerIDL)(h)) } // NewQsciLexerIDL constructs a new QsciLexerIDL object. func NewQsciLexerIDL() *QsciLexerIDL { - var outptr_QsciLexerIDL *C.QsciLexerIDL = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerIDL_new(&outptr_QsciLexerIDL, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerIDL(outptr_QsciLexerIDL, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerIDL(C.QsciLexerIDL_new()) ret.isSubclass = true return ret } // NewQsciLexerIDL2 constructs a new QsciLexerIDL object. func NewQsciLexerIDL2(parent *qt.QObject) *QsciLexerIDL { - var outptr_QsciLexerIDL *C.QsciLexerIDL = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerIDL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerIDL, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerIDL(outptr_QsciLexerIDL, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerIDL(C.QsciLexerIDL_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeridl.h b/qt-restricted-extras/qscintilla/gen_qscilexeridl.h index 10aa27fd..a14c4307 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeridl.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexeridl.h @@ -30,8 +30,9 @@ typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerIDL QsciLexerIDL; #endif -void QsciLexerIDL_new(QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerIDL_new2(QObject* parent, QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerIDL* QsciLexerIDL_new(); +QsciLexerIDL* QsciLexerIDL_new2(QObject* parent); +void QsciLexerIDL_virtbase(QsciLexerIDL* src, QsciLexerCPP** outptr_QsciLexerCPP); QMetaObject* QsciLexerIDL_MetaObject(const QsciLexerIDL* self); void* QsciLexerIDL_Metacast(QsciLexerIDL* self, const char* param1); struct miqt_string QsciLexerIDL_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjava.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerjava.cpp index 30285825..af1c63dd 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjava.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjava.cpp @@ -137,20 +137,16 @@ public: }; -void QsciLexerJava_new(QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerJava* ret = new MiqtVirtualQsciLexerJava(); - *outptr_QsciLexerJava = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerJava* QsciLexerJava_new() { + return new MiqtVirtualQsciLexerJava(); } -void QsciLexerJava_new2(QObject* parent, QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerJava* ret = new MiqtVirtualQsciLexerJava(parent); - *outptr_QsciLexerJava = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerJava* QsciLexerJava_new2(QObject* parent) { + return new MiqtVirtualQsciLexerJava(parent); +} + +void QsciLexerJava_virtbase(QsciLexerJava* src, QsciLexerCPP** outptr_QsciLexerCPP) { + *outptr_QsciLexerCPP = static_cast(src); } QMetaObject* QsciLexerJava_MetaObject(const QsciLexerJava* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjava.go b/qt-restricted-extras/qscintilla/gen_qscilexerjava.go index aed7a18f..20da1dcc 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjava.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjava.go @@ -36,46 +36,34 @@ func (this *QsciLexerJava) UnsafePointer() unsafe.Pointer { } // newQsciLexerJava constructs the type using only CGO pointers. -func newQsciLexerJava(h *C.QsciLexerJava, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerJava { +func newQsciLexerJava(h *C.QsciLexerJava) *QsciLexerJava { if h == nil { return nil } + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + C.QsciLexerJava_virtbase(h, &outptr_QsciLexerCPP) + return &QsciLexerJava{h: h, - QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} + QsciLexerCPP: newQsciLexerCPP(outptr_QsciLexerCPP)} } // UnsafeNewQsciLexerJava constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerJava(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerJava { - if h == nil { - return nil - } - - return &QsciLexerJava{h: (*C.QsciLexerJava)(h), - QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerJava(h unsafe.Pointer) *QsciLexerJava { + return newQsciLexerJava((*C.QsciLexerJava)(h)) } // NewQsciLexerJava constructs a new QsciLexerJava object. func NewQsciLexerJava() *QsciLexerJava { - var outptr_QsciLexerJava *C.QsciLexerJava = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerJava_new(&outptr_QsciLexerJava, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerJava(outptr_QsciLexerJava, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerJava(C.QsciLexerJava_new()) ret.isSubclass = true return ret } // NewQsciLexerJava2 constructs a new QsciLexerJava object. func NewQsciLexerJava2(parent *qt.QObject) *QsciLexerJava { - var outptr_QsciLexerJava *C.QsciLexerJava = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerJava_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerJava, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerJava(outptr_QsciLexerJava, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerJava(C.QsciLexerJava_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjava.h b/qt-restricted-extras/qscintilla/gen_qscilexerjava.h index b8a99b40..89489667 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjava.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjava.h @@ -28,8 +28,9 @@ typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerJava QsciLexerJava; #endif -void QsciLexerJava_new(QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerJava_new2(QObject* parent, QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerJava* QsciLexerJava_new(); +QsciLexerJava* QsciLexerJava_new2(QObject* parent); +void QsciLexerJava_virtbase(QsciLexerJava* src, QsciLexerCPP** outptr_QsciLexerCPP); QMetaObject* QsciLexerJava_MetaObject(const QsciLexerJava* self); void* QsciLexerJava_Metacast(QsciLexerJava* self, const char* param1); struct miqt_string QsciLexerJava_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.cpp index 3261db29..ec9418d6 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.cpp @@ -139,20 +139,16 @@ public: }; -void QsciLexerJavaScript_new(QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerJavaScript* ret = new MiqtVirtualQsciLexerJavaScript(); - *outptr_QsciLexerJavaScript = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerJavaScript* QsciLexerJavaScript_new() { + return new MiqtVirtualQsciLexerJavaScript(); } -void QsciLexerJavaScript_new2(QObject* parent, QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerJavaScript* ret = new MiqtVirtualQsciLexerJavaScript(parent); - *outptr_QsciLexerJavaScript = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerJavaScript* QsciLexerJavaScript_new2(QObject* parent) { + return new MiqtVirtualQsciLexerJavaScript(parent); +} + +void QsciLexerJavaScript_virtbase(QsciLexerJavaScript* src, QsciLexerCPP** outptr_QsciLexerCPP) { + *outptr_QsciLexerCPP = static_cast(src); } QMetaObject* QsciLexerJavaScript_MetaObject(const QsciLexerJavaScript* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.go b/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.go index 1f97c80e..250a442d 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.go @@ -36,46 +36,34 @@ func (this *QsciLexerJavaScript) UnsafePointer() unsafe.Pointer { } // newQsciLexerJavaScript constructs the type using only CGO pointers. -func newQsciLexerJavaScript(h *C.QsciLexerJavaScript, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerJavaScript { +func newQsciLexerJavaScript(h *C.QsciLexerJavaScript) *QsciLexerJavaScript { if h == nil { return nil } + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + C.QsciLexerJavaScript_virtbase(h, &outptr_QsciLexerCPP) + return &QsciLexerJavaScript{h: h, - QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} + QsciLexerCPP: newQsciLexerCPP(outptr_QsciLexerCPP)} } // UnsafeNewQsciLexerJavaScript constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerJavaScript(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerJavaScript { - if h == nil { - return nil - } - - return &QsciLexerJavaScript{h: (*C.QsciLexerJavaScript)(h), - QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerJavaScript(h unsafe.Pointer) *QsciLexerJavaScript { + return newQsciLexerJavaScript((*C.QsciLexerJavaScript)(h)) } // NewQsciLexerJavaScript constructs a new QsciLexerJavaScript object. func NewQsciLexerJavaScript() *QsciLexerJavaScript { - var outptr_QsciLexerJavaScript *C.QsciLexerJavaScript = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerJavaScript_new(&outptr_QsciLexerJavaScript, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerJavaScript(outptr_QsciLexerJavaScript, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerJavaScript(C.QsciLexerJavaScript_new()) ret.isSubclass = true return ret } // NewQsciLexerJavaScript2 constructs a new QsciLexerJavaScript object. func NewQsciLexerJavaScript2(parent *qt.QObject) *QsciLexerJavaScript { - var outptr_QsciLexerJavaScript *C.QsciLexerJavaScript = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerJavaScript_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerJavaScript, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerJavaScript(outptr_QsciLexerJavaScript, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerJavaScript(C.QsciLexerJavaScript_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.h b/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.h index b2fef5c7..33b28c5b 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjavascript.h @@ -32,8 +32,9 @@ typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerJavaScript QsciLexerJavaScript; #endif -void QsciLexerJavaScript_new(QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerJavaScript_new2(QObject* parent, QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerJavaScript* QsciLexerJavaScript_new(); +QsciLexerJavaScript* QsciLexerJavaScript_new2(QObject* parent); +void QsciLexerJavaScript_virtbase(QsciLexerJavaScript* src, QsciLexerCPP** outptr_QsciLexerCPP); QMetaObject* QsciLexerJavaScript_MetaObject(const QsciLexerJavaScript* self); void* QsciLexerJavaScript_Metacast(QsciLexerJavaScript* self, const char* param1); struct miqt_string QsciLexerJavaScript_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjson.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerjson.cpp index 91a8b20b..b9736307 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjson.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjson.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerJSON_new(QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerJSON* ret = new MiqtVirtualQsciLexerJSON(); - *outptr_QsciLexerJSON = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerJSON* QsciLexerJSON_new() { + return new MiqtVirtualQsciLexerJSON(); } -void QsciLexerJSON_new2(QObject* parent, QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerJSON* ret = new MiqtVirtualQsciLexerJSON(parent); - *outptr_QsciLexerJSON = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerJSON* QsciLexerJSON_new2(QObject* parent) { + return new MiqtVirtualQsciLexerJSON(parent); +} + +void QsciLexerJSON_virtbase(QsciLexerJSON* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerJSON_MetaObject(const QsciLexerJSON* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjson.go b/qt-restricted-extras/qscintilla/gen_qscilexerjson.go index 2ad96efd..c7955492 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjson.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjson.go @@ -55,44 +55,34 @@ func (this *QsciLexerJSON) UnsafePointer() unsafe.Pointer { } // newQsciLexerJSON constructs the type using only CGO pointers. -func newQsciLexerJSON(h *C.QsciLexerJSON, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerJSON { +func newQsciLexerJSON(h *C.QsciLexerJSON) *QsciLexerJSON { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerJSON_virtbase(h, &outptr_QsciLexer) + return &QsciLexerJSON{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerJSON constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerJSON(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerJSON { - if h == nil { - return nil - } - - return &QsciLexerJSON{h: (*C.QsciLexerJSON)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerJSON(h unsafe.Pointer) *QsciLexerJSON { + return newQsciLexerJSON((*C.QsciLexerJSON)(h)) } // NewQsciLexerJSON constructs a new QsciLexerJSON object. func NewQsciLexerJSON() *QsciLexerJSON { - var outptr_QsciLexerJSON *C.QsciLexerJSON = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerJSON_new(&outptr_QsciLexerJSON, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerJSON(outptr_QsciLexerJSON, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerJSON(C.QsciLexerJSON_new()) ret.isSubclass = true return ret } // NewQsciLexerJSON2 constructs a new QsciLexerJSON object. func NewQsciLexerJSON2(parent *qt.QObject) *QsciLexerJSON { - var outptr_QsciLexerJSON *C.QsciLexerJSON = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerJSON_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerJSON, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerJSON(outptr_QsciLexerJSON, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerJSON(C.QsciLexerJSON_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -918,7 +908,7 @@ func miqt_exec_callback_QsciLexerJSON_SetEditor(self *C.QsciLexerJSON, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerJSON{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1162,7 +1152,7 @@ func miqt_exec_callback_QsciLexerJSON_ReadProperties(self *C.QsciLexerJSON, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1199,7 +1189,7 @@ func miqt_exec_callback_QsciLexerJSON_WriteProperties(self *C.QsciLexerJSON, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerjson.h b/qt-restricted-extras/qscintilla/gen_qscilexerjson.h index 0031c355..28b28e4f 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerjson.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerjson.h @@ -34,8 +34,9 @@ typedef struct QsciLexerJSON QsciLexerJSON; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerJSON_new(QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerJSON_new2(QObject* parent, QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerJSON* QsciLexerJSON_new(); +QsciLexerJSON* QsciLexerJSON_new2(QObject* parent); +void QsciLexerJSON_virtbase(QsciLexerJSON* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerJSON_MetaObject(const QsciLexerJSON* self); void* QsciLexerJSON_Metacast(QsciLexerJSON* self, const char* param1); struct miqt_string QsciLexerJSON_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerlua.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerlua.cpp index e7f3efec..78841642 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerlua.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerlua.cpp @@ -863,18 +863,16 @@ public: }; -void QsciLexerLua_new(QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerLua* ret = new MiqtVirtualQsciLexerLua(); - *outptr_QsciLexerLua = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerLua* QsciLexerLua_new() { + return new MiqtVirtualQsciLexerLua(); } -void QsciLexerLua_new2(QObject* parent, QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerLua* ret = new MiqtVirtualQsciLexerLua(parent); - *outptr_QsciLexerLua = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerLua* QsciLexerLua_new2(QObject* parent) { + return new MiqtVirtualQsciLexerLua(parent); +} + +void QsciLexerLua_virtbase(QsciLexerLua* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerLua_MetaObject(const QsciLexerLua* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerlua.go b/qt-restricted-extras/qscintilla/gen_qscilexerlua.go index d4860a62..d2f2458f 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerlua.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerlua.go @@ -61,44 +61,34 @@ func (this *QsciLexerLua) UnsafePointer() unsafe.Pointer { } // newQsciLexerLua constructs the type using only CGO pointers. -func newQsciLexerLua(h *C.QsciLexerLua, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerLua { +func newQsciLexerLua(h *C.QsciLexerLua) *QsciLexerLua { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerLua_virtbase(h, &outptr_QsciLexer) + return &QsciLexerLua{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerLua constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerLua(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerLua { - if h == nil { - return nil - } - - return &QsciLexerLua{h: (*C.QsciLexerLua)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerLua(h unsafe.Pointer) *QsciLexerLua { + return newQsciLexerLua((*C.QsciLexerLua)(h)) } // NewQsciLexerLua constructs a new QsciLexerLua object. func NewQsciLexerLua() *QsciLexerLua { - var outptr_QsciLexerLua *C.QsciLexerLua = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerLua_new(&outptr_QsciLexerLua, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerLua(outptr_QsciLexerLua, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerLua(C.QsciLexerLua_new()) ret.isSubclass = true return ret } // NewQsciLexerLua2 constructs a new QsciLexerLua object. func NewQsciLexerLua2(parent *qt.QObject) *QsciLexerLua { - var outptr_QsciLexerLua *C.QsciLexerLua = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerLua_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerLua, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerLua(outptr_QsciLexerLua, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerLua(C.QsciLexerLua_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -961,7 +951,7 @@ func miqt_exec_callback_QsciLexerLua_SetEditor(self *C.QsciLexerLua, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1205,7 +1195,7 @@ func miqt_exec_callback_QsciLexerLua_ReadProperties(self *C.QsciLexerLua, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1242,7 +1232,7 @@ func miqt_exec_callback_QsciLexerLua_WriteProperties(self *C.QsciLexerLua, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerlua.h b/qt-restricted-extras/qscintilla/gen_qscilexerlua.h index d469e170..813ee6dc 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerlua.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerlua.h @@ -34,8 +34,9 @@ typedef struct QsciLexerLua QsciLexerLua; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerLua_new(QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerLua_new2(QObject* parent, QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerLua* QsciLexerLua_new(); +QsciLexerLua* QsciLexerLua_new2(QObject* parent); +void QsciLexerLua_virtbase(QsciLexerLua* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerLua_MetaObject(const QsciLexerLua* self); void* QsciLexerLua_Metacast(QsciLexerLua* self, const char* param1); struct miqt_string QsciLexerLua_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermakefile.cpp b/qt-restricted-extras/qscintilla/gen_qscilexermakefile.cpp index 90164543..659cb207 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermakefile.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexermakefile.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerMakefile_new(QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerMakefile* ret = new MiqtVirtualQsciLexerMakefile(); - *outptr_QsciLexerMakefile = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerMakefile* QsciLexerMakefile_new() { + return new MiqtVirtualQsciLexerMakefile(); } -void QsciLexerMakefile_new2(QObject* parent, QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerMakefile* ret = new MiqtVirtualQsciLexerMakefile(parent); - *outptr_QsciLexerMakefile = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerMakefile* QsciLexerMakefile_new2(QObject* parent) { + return new MiqtVirtualQsciLexerMakefile(parent); +} + +void QsciLexerMakefile_virtbase(QsciLexerMakefile* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerMakefile_MetaObject(const QsciLexerMakefile* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermakefile.go b/qt-restricted-extras/qscintilla/gen_qscilexermakefile.go index 5747df94..d8f26e92 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermakefile.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexermakefile.go @@ -48,44 +48,34 @@ func (this *QsciLexerMakefile) UnsafePointer() unsafe.Pointer { } // newQsciLexerMakefile constructs the type using only CGO pointers. -func newQsciLexerMakefile(h *C.QsciLexerMakefile, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerMakefile { +func newQsciLexerMakefile(h *C.QsciLexerMakefile) *QsciLexerMakefile { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerMakefile_virtbase(h, &outptr_QsciLexer) + return &QsciLexerMakefile{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerMakefile constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerMakefile(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerMakefile { - if h == nil { - return nil - } - - return &QsciLexerMakefile{h: (*C.QsciLexerMakefile)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerMakefile(h unsafe.Pointer) *QsciLexerMakefile { + return newQsciLexerMakefile((*C.QsciLexerMakefile)(h)) } // NewQsciLexerMakefile constructs a new QsciLexerMakefile object. func NewQsciLexerMakefile() *QsciLexerMakefile { - var outptr_QsciLexerMakefile *C.QsciLexerMakefile = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerMakefile_new(&outptr_QsciLexerMakefile, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerMakefile(outptr_QsciLexerMakefile, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerMakefile(C.QsciLexerMakefile_new()) ret.isSubclass = true return ret } // NewQsciLexerMakefile2 constructs a new QsciLexerMakefile object. func NewQsciLexerMakefile2(parent *qt.QObject) *QsciLexerMakefile { - var outptr_QsciLexerMakefile *C.QsciLexerMakefile = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerMakefile_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerMakefile, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerMakefile(outptr_QsciLexerMakefile, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerMakefile(C.QsciLexerMakefile_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -883,7 +873,7 @@ func miqt_exec_callback_QsciLexerMakefile_SetEditor(self *C.QsciLexerMakefile, c } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1127,7 +1117,7 @@ func miqt_exec_callback_QsciLexerMakefile_ReadProperties(self *C.QsciLexerMakefi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1164,7 +1154,7 @@ func miqt_exec_callback_QsciLexerMakefile_WriteProperties(self *C.QsciLexerMakef } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermakefile.h b/qt-restricted-extras/qscintilla/gen_qscilexermakefile.h index 4baac6fb..27418a79 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermakefile.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexermakefile.h @@ -34,8 +34,9 @@ typedef struct QsciLexerMakefile QsciLexerMakefile; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerMakefile_new(QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerMakefile_new2(QObject* parent, QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerMakefile* QsciLexerMakefile_new(); +QsciLexerMakefile* QsciLexerMakefile_new2(QObject* parent); +void QsciLexerMakefile_virtbase(QsciLexerMakefile* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerMakefile_MetaObject(const QsciLexerMakefile* self); void* QsciLexerMakefile_Metacast(QsciLexerMakefile* self, const char* param1); struct miqt_string QsciLexerMakefile_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.cpp b/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.cpp index 507126d9..4bb668e6 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerMarkdown_new(QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerMarkdown* ret = new MiqtVirtualQsciLexerMarkdown(); - *outptr_QsciLexerMarkdown = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerMarkdown* QsciLexerMarkdown_new() { + return new MiqtVirtualQsciLexerMarkdown(); } -void QsciLexerMarkdown_new2(QObject* parent, QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerMarkdown* ret = new MiqtVirtualQsciLexerMarkdown(parent); - *outptr_QsciLexerMarkdown = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerMarkdown* QsciLexerMarkdown_new2(QObject* parent) { + return new MiqtVirtualQsciLexerMarkdown(parent); +} + +void QsciLexerMarkdown_virtbase(QsciLexerMarkdown* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerMarkdown_MetaObject(const QsciLexerMarkdown* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.go b/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.go index 8b4c0192..e4d041f5 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.go @@ -63,44 +63,34 @@ func (this *QsciLexerMarkdown) UnsafePointer() unsafe.Pointer { } // newQsciLexerMarkdown constructs the type using only CGO pointers. -func newQsciLexerMarkdown(h *C.QsciLexerMarkdown, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerMarkdown { +func newQsciLexerMarkdown(h *C.QsciLexerMarkdown) *QsciLexerMarkdown { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerMarkdown_virtbase(h, &outptr_QsciLexer) + return &QsciLexerMarkdown{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerMarkdown constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerMarkdown(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerMarkdown { - if h == nil { - return nil - } - - return &QsciLexerMarkdown{h: (*C.QsciLexerMarkdown)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerMarkdown(h unsafe.Pointer) *QsciLexerMarkdown { + return newQsciLexerMarkdown((*C.QsciLexerMarkdown)(h)) } // NewQsciLexerMarkdown constructs a new QsciLexerMarkdown object. func NewQsciLexerMarkdown() *QsciLexerMarkdown { - var outptr_QsciLexerMarkdown *C.QsciLexerMarkdown = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerMarkdown_new(&outptr_QsciLexerMarkdown, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerMarkdown(outptr_QsciLexerMarkdown, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerMarkdown(C.QsciLexerMarkdown_new()) ret.isSubclass = true return ret } // NewQsciLexerMarkdown2 constructs a new QsciLexerMarkdown object. func NewQsciLexerMarkdown2(parent *qt.QObject) *QsciLexerMarkdown { - var outptr_QsciLexerMarkdown *C.QsciLexerMarkdown = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerMarkdown_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerMarkdown, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerMarkdown(outptr_QsciLexerMarkdown, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerMarkdown(C.QsciLexerMarkdown_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -889,7 +879,7 @@ func miqt_exec_callback_QsciLexerMarkdown_SetEditor(self *C.QsciLexerMarkdown, c } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1133,7 +1123,7 @@ func miqt_exec_callback_QsciLexerMarkdown_ReadProperties(self *C.QsciLexerMarkdo } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1170,7 +1160,7 @@ func miqt_exec_callback_QsciLexerMarkdown_WriteProperties(self *C.QsciLexerMarkd } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.h b/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.h index 164911e0..27b5dc82 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexermarkdown.h @@ -34,8 +34,9 @@ typedef struct QsciLexerMarkdown QsciLexerMarkdown; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerMarkdown_new(QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerMarkdown_new2(QObject* parent, QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerMarkdown* QsciLexerMarkdown_new(); +QsciLexerMarkdown* QsciLexerMarkdown_new2(QObject* parent); +void QsciLexerMarkdown_virtbase(QsciLexerMarkdown* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerMarkdown_MetaObject(const QsciLexerMarkdown* self); void* QsciLexerMarkdown_Metacast(QsciLexerMarkdown* self, const char* param1); struct miqt_string QsciLexerMarkdown_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermatlab.cpp b/qt-restricted-extras/qscintilla/gen_qscilexermatlab.cpp index 4dcc5d76..330fa505 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermatlab.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexermatlab.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerMatlab_new(QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerMatlab* ret = new MiqtVirtualQsciLexerMatlab(); - *outptr_QsciLexerMatlab = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerMatlab* QsciLexerMatlab_new() { + return new MiqtVirtualQsciLexerMatlab(); } -void QsciLexerMatlab_new2(QObject* parent, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerMatlab* ret = new MiqtVirtualQsciLexerMatlab(parent); - *outptr_QsciLexerMatlab = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerMatlab* QsciLexerMatlab_new2(QObject* parent) { + return new MiqtVirtualQsciLexerMatlab(parent); +} + +void QsciLexerMatlab_virtbase(QsciLexerMatlab* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerMatlab_MetaObject(const QsciLexerMatlab* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermatlab.go b/qt-restricted-extras/qscintilla/gen_qscilexermatlab.go index e959d214..882cf254 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermatlab.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexermatlab.go @@ -50,44 +50,34 @@ func (this *QsciLexerMatlab) UnsafePointer() unsafe.Pointer { } // newQsciLexerMatlab constructs the type using only CGO pointers. -func newQsciLexerMatlab(h *C.QsciLexerMatlab, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerMatlab { +func newQsciLexerMatlab(h *C.QsciLexerMatlab) *QsciLexerMatlab { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerMatlab_virtbase(h, &outptr_QsciLexer) + return &QsciLexerMatlab{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerMatlab constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerMatlab(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerMatlab { - if h == nil { - return nil - } - - return &QsciLexerMatlab{h: (*C.QsciLexerMatlab)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerMatlab(h unsafe.Pointer) *QsciLexerMatlab { + return newQsciLexerMatlab((*C.QsciLexerMatlab)(h)) } // NewQsciLexerMatlab constructs a new QsciLexerMatlab object. func NewQsciLexerMatlab() *QsciLexerMatlab { - var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerMatlab_new(&outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerMatlab(outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerMatlab(C.QsciLexerMatlab_new()) ret.isSubclass = true return ret } // NewQsciLexerMatlab2 constructs a new QsciLexerMatlab object. func NewQsciLexerMatlab2(parent *qt.QObject) *QsciLexerMatlab { - var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerMatlab_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerMatlab(outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerMatlab(C.QsciLexerMatlab_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -875,7 +865,7 @@ func miqt_exec_callback_QsciLexerMatlab_SetEditor(self *C.QsciLexerMatlab, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1119,7 +1109,7 @@ func miqt_exec_callback_QsciLexerMatlab_ReadProperties(self *C.QsciLexerMatlab, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1156,7 +1146,7 @@ func miqt_exec_callback_QsciLexerMatlab_WriteProperties(self *C.QsciLexerMatlab, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexermatlab.h b/qt-restricted-extras/qscintilla/gen_qscilexermatlab.h index f8183438..e3b28593 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexermatlab.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexermatlab.h @@ -34,8 +34,9 @@ typedef struct QsciLexerMatlab QsciLexerMatlab; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerMatlab_new(QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerMatlab_new2(QObject* parent, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerMatlab* QsciLexerMatlab_new(); +QsciLexerMatlab* QsciLexerMatlab_new2(QObject* parent); +void QsciLexerMatlab_virtbase(QsciLexerMatlab* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerMatlab_MetaObject(const QsciLexerMatlab* self); void* QsciLexerMatlab_Metacast(QsciLexerMatlab* self, const char* param1); struct miqt_string QsciLexerMatlab_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeroctave.cpp b/qt-restricted-extras/qscintilla/gen_qscilexeroctave.cpp index 9b659a77..82e349b3 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeroctave.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexeroctave.cpp @@ -7,20 +7,16 @@ #include "gen_qscilexeroctave.h" #include "_cgo_export.h" -void QsciLexerOctave_new(QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - QsciLexerOctave* ret = new QsciLexerOctave(); - *outptr_QsciLexerOctave = ret; - *outptr_QsciLexerMatlab = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerOctave* QsciLexerOctave_new() { + return new QsciLexerOctave(); } -void QsciLexerOctave_new2(QObject* parent, QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - QsciLexerOctave* ret = new QsciLexerOctave(parent); - *outptr_QsciLexerOctave = ret; - *outptr_QsciLexerMatlab = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerOctave* QsciLexerOctave_new2(QObject* parent) { + return new QsciLexerOctave(parent); +} + +void QsciLexerOctave_virtbase(QsciLexerOctave* src, QsciLexerMatlab** outptr_QsciLexerMatlab) { + *outptr_QsciLexerMatlab = static_cast(src); } QMetaObject* QsciLexerOctave_MetaObject(const QsciLexerOctave* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeroctave.go b/qt-restricted-extras/qscintilla/gen_qscilexeroctave.go index 0df3a0f7..80ecf9d4 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeroctave.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexeroctave.go @@ -35,46 +35,34 @@ func (this *QsciLexerOctave) UnsafePointer() unsafe.Pointer { } // newQsciLexerOctave constructs the type using only CGO pointers. -func newQsciLexerOctave(h *C.QsciLexerOctave, h_QsciLexerMatlab *C.QsciLexerMatlab, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerOctave { +func newQsciLexerOctave(h *C.QsciLexerOctave) *QsciLexerOctave { if h == nil { return nil } + var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil + C.QsciLexerOctave_virtbase(h, &outptr_QsciLexerMatlab) + return &QsciLexerOctave{h: h, - QsciLexerMatlab: newQsciLexerMatlab(h_QsciLexerMatlab, h_QsciLexer, h_QObject)} + QsciLexerMatlab: newQsciLexerMatlab(outptr_QsciLexerMatlab)} } // UnsafeNewQsciLexerOctave constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerOctave(h unsafe.Pointer, h_QsciLexerMatlab unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerOctave { - if h == nil { - return nil - } - - return &QsciLexerOctave{h: (*C.QsciLexerOctave)(h), - QsciLexerMatlab: UnsafeNewQsciLexerMatlab(h_QsciLexerMatlab, h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerOctave(h unsafe.Pointer) *QsciLexerOctave { + return newQsciLexerOctave((*C.QsciLexerOctave)(h)) } // NewQsciLexerOctave constructs a new QsciLexerOctave object. func NewQsciLexerOctave() *QsciLexerOctave { - var outptr_QsciLexerOctave *C.QsciLexerOctave = nil - var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerOctave_new(&outptr_QsciLexerOctave, &outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerOctave(outptr_QsciLexerOctave, outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerOctave(C.QsciLexerOctave_new()) ret.isSubclass = true return ret } // NewQsciLexerOctave2 constructs a new QsciLexerOctave object. func NewQsciLexerOctave2(parent *qt.QObject) *QsciLexerOctave { - var outptr_QsciLexerOctave *C.QsciLexerOctave = nil - var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerOctave_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerOctave, &outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerOctave(outptr_QsciLexerOctave, outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerOctave(C.QsciLexerOctave_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeroctave.h b/qt-restricted-extras/qscintilla/gen_qscilexeroctave.h index 52ad219e..3841269a 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeroctave.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexeroctave.h @@ -28,8 +28,9 @@ typedef struct QsciLexerMatlab QsciLexerMatlab; typedef struct QsciLexerOctave QsciLexerOctave; #endif -void QsciLexerOctave_new(QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerOctave_new2(QObject* parent, QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerOctave* QsciLexerOctave_new(); +QsciLexerOctave* QsciLexerOctave_new2(QObject* parent); +void QsciLexerOctave_virtbase(QsciLexerOctave* src, QsciLexerMatlab** outptr_QsciLexerMatlab); QMetaObject* QsciLexerOctave_MetaObject(const QsciLexerOctave* self); void* QsciLexerOctave_Metacast(QsciLexerOctave* self, const char* param1); struct miqt_string QsciLexerOctave_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpascal.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerpascal.cpp index 9879914a..d7c18366 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpascal.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpascal.cpp @@ -911,18 +911,16 @@ public: }; -void QsciLexerPascal_new(QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPascal* ret = new MiqtVirtualQsciLexerPascal(); - *outptr_QsciLexerPascal = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPascal* QsciLexerPascal_new() { + return new MiqtVirtualQsciLexerPascal(); } -void QsciLexerPascal_new2(QObject* parent, QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPascal* ret = new MiqtVirtualQsciLexerPascal(parent); - *outptr_QsciLexerPascal = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPascal* QsciLexerPascal_new2(QObject* parent) { + return new MiqtVirtualQsciLexerPascal(parent); +} + +void QsciLexerPascal_virtbase(QsciLexerPascal* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerPascal_MetaObject(const QsciLexerPascal* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpascal.go b/qt-restricted-extras/qscintilla/gen_qscilexerpascal.go index c27a0ec0..da2d5285 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpascal.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpascal.go @@ -56,44 +56,34 @@ func (this *QsciLexerPascal) UnsafePointer() unsafe.Pointer { } // newQsciLexerPascal constructs the type using only CGO pointers. -func newQsciLexerPascal(h *C.QsciLexerPascal, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPascal { +func newQsciLexerPascal(h *C.QsciLexerPascal) *QsciLexerPascal { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerPascal_virtbase(h, &outptr_QsciLexer) + return &QsciLexerPascal{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerPascal constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerPascal(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPascal { - if h == nil { - return nil - } - - return &QsciLexerPascal{h: (*C.QsciLexerPascal)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerPascal(h unsafe.Pointer) *QsciLexerPascal { + return newQsciLexerPascal((*C.QsciLexerPascal)(h)) } // NewQsciLexerPascal constructs a new QsciLexerPascal object. func NewQsciLexerPascal() *QsciLexerPascal { - var outptr_QsciLexerPascal *C.QsciLexerPascal = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPascal_new(&outptr_QsciLexerPascal, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPascal(outptr_QsciLexerPascal, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPascal(C.QsciLexerPascal_new()) ret.isSubclass = true return ret } // NewQsciLexerPascal2 constructs a new QsciLexerPascal object. func NewQsciLexerPascal2(parent *qt.QObject) *QsciLexerPascal { - var outptr_QsciLexerPascal *C.QsciLexerPascal = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPascal_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPascal, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPascal(outptr_QsciLexerPascal, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPascal(C.QsciLexerPascal_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1052,7 +1042,7 @@ func miqt_exec_callback_QsciLexerPascal_SetEditor(self *C.QsciLexerPascal, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1296,7 +1286,7 @@ func miqt_exec_callback_QsciLexerPascal_ReadProperties(self *C.QsciLexerPascal, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1333,7 +1323,7 @@ func miqt_exec_callback_QsciLexerPascal_WriteProperties(self *C.QsciLexerPascal, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpascal.h b/qt-restricted-extras/qscintilla/gen_qscilexerpascal.h index a0b5d760..c1cacc45 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpascal.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpascal.h @@ -34,8 +34,9 @@ typedef struct QsciLexerPascal QsciLexerPascal; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerPascal_new(QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerPascal_new2(QObject* parent, QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerPascal* QsciLexerPascal_new(); +QsciLexerPascal* QsciLexerPascal_new2(QObject* parent); +void QsciLexerPascal_virtbase(QsciLexerPascal* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerPascal_MetaObject(const QsciLexerPascal* self); void* QsciLexerPascal_Metacast(QsciLexerPascal* self, const char* param1); struct miqt_string QsciLexerPascal_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerperl.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerperl.cpp index 77835ff5..ebe91c1c 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerperl.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerperl.cpp @@ -887,18 +887,16 @@ public: }; -void QsciLexerPerl_new(QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPerl* ret = new MiqtVirtualQsciLexerPerl(); - *outptr_QsciLexerPerl = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPerl* QsciLexerPerl_new() { + return new MiqtVirtualQsciLexerPerl(); } -void QsciLexerPerl_new2(QObject* parent, QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPerl* ret = new MiqtVirtualQsciLexerPerl(parent); - *outptr_QsciLexerPerl = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPerl* QsciLexerPerl_new2(QObject* parent) { + return new MiqtVirtualQsciLexerPerl(parent); +} + +void QsciLexerPerl_virtbase(QsciLexerPerl* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerPerl_MetaObject(const QsciLexerPerl* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerperl.go b/qt-restricted-extras/qscintilla/gen_qscilexerperl.go index 1b2e1300..ea4656f1 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerperl.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerperl.go @@ -82,44 +82,34 @@ func (this *QsciLexerPerl) UnsafePointer() unsafe.Pointer { } // newQsciLexerPerl constructs the type using only CGO pointers. -func newQsciLexerPerl(h *C.QsciLexerPerl, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPerl { +func newQsciLexerPerl(h *C.QsciLexerPerl) *QsciLexerPerl { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerPerl_virtbase(h, &outptr_QsciLexer) + return &QsciLexerPerl{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerPerl constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerPerl(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPerl { - if h == nil { - return nil - } - - return &QsciLexerPerl{h: (*C.QsciLexerPerl)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerPerl(h unsafe.Pointer) *QsciLexerPerl { + return newQsciLexerPerl((*C.QsciLexerPerl)(h)) } // NewQsciLexerPerl constructs a new QsciLexerPerl object. func NewQsciLexerPerl() *QsciLexerPerl { - var outptr_QsciLexerPerl *C.QsciLexerPerl = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPerl_new(&outptr_QsciLexerPerl, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPerl(outptr_QsciLexerPerl, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPerl(C.QsciLexerPerl_new()) ret.isSubclass = true return ret } // NewQsciLexerPerl2 constructs a new QsciLexerPerl object. func NewQsciLexerPerl2(parent *qt.QObject) *QsciLexerPerl { - var outptr_QsciLexerPerl *C.QsciLexerPerl = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPerl_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPerl, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPerl(outptr_QsciLexerPerl, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPerl(C.QsciLexerPerl_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1055,7 +1045,7 @@ func miqt_exec_callback_QsciLexerPerl_SetEditor(self *C.QsciLexerPerl, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1299,7 +1289,7 @@ func miqt_exec_callback_QsciLexerPerl_ReadProperties(self *C.QsciLexerPerl, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1336,7 +1326,7 @@ func miqt_exec_callback_QsciLexerPerl_WriteProperties(self *C.QsciLexerPerl, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerperl.h b/qt-restricted-extras/qscintilla/gen_qscilexerperl.h index f5e44179..801a0d98 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerperl.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerperl.h @@ -34,8 +34,9 @@ typedef struct QsciLexerPerl QsciLexerPerl; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerPerl_new(QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerPerl_new2(QObject* parent, QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerPerl* QsciLexerPerl_new(); +QsciLexerPerl* QsciLexerPerl_new2(QObject* parent); +void QsciLexerPerl_virtbase(QsciLexerPerl* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerPerl_MetaObject(const QsciLexerPerl* self); void* QsciLexerPerl_Metacast(QsciLexerPerl* self, const char* param1); struct miqt_string QsciLexerPerl_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpo.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerpo.cpp index 6eb93e07..2c99415f 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpo.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpo.cpp @@ -887,18 +887,16 @@ public: }; -void QsciLexerPO_new(QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPO* ret = new MiqtVirtualQsciLexerPO(); - *outptr_QsciLexerPO = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPO* QsciLexerPO_new() { + return new MiqtVirtualQsciLexerPO(); } -void QsciLexerPO_new2(QObject* parent, QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPO* ret = new MiqtVirtualQsciLexerPO(parent); - *outptr_QsciLexerPO = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPO* QsciLexerPO_new2(QObject* parent) { + return new MiqtVirtualQsciLexerPO(parent); +} + +void QsciLexerPO_virtbase(QsciLexerPO* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerPO_MetaObject(const QsciLexerPO* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpo.go b/qt-restricted-extras/qscintilla/gen_qscilexerpo.go index d0ff4d55..bc28e872 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpo.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpo.go @@ -56,44 +56,34 @@ func (this *QsciLexerPO) UnsafePointer() unsafe.Pointer { } // newQsciLexerPO constructs the type using only CGO pointers. -func newQsciLexerPO(h *C.QsciLexerPO, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPO { +func newQsciLexerPO(h *C.QsciLexerPO) *QsciLexerPO { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerPO_virtbase(h, &outptr_QsciLexer) + return &QsciLexerPO{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerPO constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerPO(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPO { - if h == nil { - return nil - } - - return &QsciLexerPO{h: (*C.QsciLexerPO)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerPO(h unsafe.Pointer) *QsciLexerPO { + return newQsciLexerPO((*C.QsciLexerPO)(h)) } // NewQsciLexerPO constructs a new QsciLexerPO object. func NewQsciLexerPO() *QsciLexerPO { - var outptr_QsciLexerPO *C.QsciLexerPO = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPO_new(&outptr_QsciLexerPO, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPO(outptr_QsciLexerPO, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPO(C.QsciLexerPO_new()) ret.isSubclass = true return ret } // NewQsciLexerPO2 constructs a new QsciLexerPO object. func NewQsciLexerPO2(parent *qt.QObject) *QsciLexerPO { - var outptr_QsciLexerPO *C.QsciLexerPO = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPO_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPO, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPO(outptr_QsciLexerPO, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPO(C.QsciLexerPO_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -948,7 +938,7 @@ func miqt_exec_callback_QsciLexerPO_SetEditor(self *C.QsciLexerPO, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1192,7 +1182,7 @@ func miqt_exec_callback_QsciLexerPO_ReadProperties(self *C.QsciLexerPO, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1229,7 +1219,7 @@ func miqt_exec_callback_QsciLexerPO_WriteProperties(self *C.QsciLexerPO, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpo.h b/qt-restricted-extras/qscintilla/gen_qscilexerpo.h index b11894bf..b0f98ae6 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpo.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpo.h @@ -34,8 +34,9 @@ typedef struct QsciLexerPO QsciLexerPO; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerPO_new(QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerPO_new2(QObject* parent, QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerPO* QsciLexerPO_new(); +QsciLexerPO* QsciLexerPO_new2(QObject* parent); +void QsciLexerPO_virtbase(QsciLexerPO* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerPO_MetaObject(const QsciLexerPO* self); void* QsciLexerPO_Metacast(QsciLexerPO* self, const char* param1); struct miqt_string QsciLexerPO_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.cpp index b9d4a3dc..31093cd7 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.cpp @@ -935,18 +935,16 @@ public: }; -void QsciLexerPostScript_new(QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPostScript* ret = new MiqtVirtualQsciLexerPostScript(); - *outptr_QsciLexerPostScript = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPostScript* QsciLexerPostScript_new() { + return new MiqtVirtualQsciLexerPostScript(); } -void QsciLexerPostScript_new2(QObject* parent, QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPostScript* ret = new MiqtVirtualQsciLexerPostScript(parent); - *outptr_QsciLexerPostScript = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPostScript* QsciLexerPostScript_new2(QObject* parent) { + return new MiqtVirtualQsciLexerPostScript(parent); +} + +void QsciLexerPostScript_virtbase(QsciLexerPostScript* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerPostScript_MetaObject(const QsciLexerPostScript* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.go b/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.go index c33d23ae..11e180c7 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.go @@ -57,44 +57,34 @@ func (this *QsciLexerPostScript) UnsafePointer() unsafe.Pointer { } // newQsciLexerPostScript constructs the type using only CGO pointers. -func newQsciLexerPostScript(h *C.QsciLexerPostScript, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPostScript { +func newQsciLexerPostScript(h *C.QsciLexerPostScript) *QsciLexerPostScript { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerPostScript_virtbase(h, &outptr_QsciLexer) + return &QsciLexerPostScript{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerPostScript constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerPostScript(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPostScript { - if h == nil { - return nil - } - - return &QsciLexerPostScript{h: (*C.QsciLexerPostScript)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerPostScript(h unsafe.Pointer) *QsciLexerPostScript { + return newQsciLexerPostScript((*C.QsciLexerPostScript)(h)) } // NewQsciLexerPostScript constructs a new QsciLexerPostScript object. func NewQsciLexerPostScript() *QsciLexerPostScript { - var outptr_QsciLexerPostScript *C.QsciLexerPostScript = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPostScript_new(&outptr_QsciLexerPostScript, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPostScript(outptr_QsciLexerPostScript, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPostScript(C.QsciLexerPostScript_new()) ret.isSubclass = true return ret } // NewQsciLexerPostScript2 constructs a new QsciLexerPostScript object. func NewQsciLexerPostScript2(parent *qt.QObject) *QsciLexerPostScript { - var outptr_QsciLexerPostScript *C.QsciLexerPostScript = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPostScript_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPostScript, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPostScript(outptr_QsciLexerPostScript, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPostScript(C.QsciLexerPostScript_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1032,7 +1022,7 @@ func miqt_exec_callback_QsciLexerPostScript_SetEditor(self *C.QsciLexerPostScrip } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1276,7 +1266,7 @@ func miqt_exec_callback_QsciLexerPostScript_ReadProperties(self *C.QsciLexerPost } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1313,7 +1303,7 @@ func miqt_exec_callback_QsciLexerPostScript_WriteProperties(self *C.QsciLexerPos } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.h b/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.h index 22306d79..9f09e366 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpostscript.h @@ -34,8 +34,9 @@ typedef struct QsciLexerPostScript QsciLexerPostScript; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerPostScript_new(QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerPostScript_new2(QObject* parent, QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerPostScript* QsciLexerPostScript_new(); +QsciLexerPostScript* QsciLexerPostScript_new2(QObject* parent); +void QsciLexerPostScript_virtbase(QsciLexerPostScript* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerPostScript_MetaObject(const QsciLexerPostScript* self); void* QsciLexerPostScript_Metacast(QsciLexerPostScript* self, const char* param1); struct miqt_string QsciLexerPostScript_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpov.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerpov.cpp index 04f75d24..b4435e0d 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpov.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpov.cpp @@ -911,18 +911,16 @@ public: }; -void QsciLexerPOV_new(QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPOV* ret = new MiqtVirtualQsciLexerPOV(); - *outptr_QsciLexerPOV = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPOV* QsciLexerPOV_new() { + return new MiqtVirtualQsciLexerPOV(); } -void QsciLexerPOV_new2(QObject* parent, QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPOV* ret = new MiqtVirtualQsciLexerPOV(parent); - *outptr_QsciLexerPOV = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPOV* QsciLexerPOV_new2(QObject* parent) { + return new MiqtVirtualQsciLexerPOV(parent); +} + +void QsciLexerPOV_virtbase(QsciLexerPOV* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerPOV_MetaObject(const QsciLexerPOV* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpov.go b/qt-restricted-extras/qscintilla/gen_qscilexerpov.go index fe30e3cd..d676d6de 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpov.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpov.go @@ -58,44 +58,34 @@ func (this *QsciLexerPOV) UnsafePointer() unsafe.Pointer { } // newQsciLexerPOV constructs the type using only CGO pointers. -func newQsciLexerPOV(h *C.QsciLexerPOV, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPOV { +func newQsciLexerPOV(h *C.QsciLexerPOV) *QsciLexerPOV { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerPOV_virtbase(h, &outptr_QsciLexer) + return &QsciLexerPOV{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerPOV constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerPOV(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPOV { - if h == nil { - return nil - } - - return &QsciLexerPOV{h: (*C.QsciLexerPOV)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerPOV(h unsafe.Pointer) *QsciLexerPOV { + return newQsciLexerPOV((*C.QsciLexerPOV)(h)) } // NewQsciLexerPOV constructs a new QsciLexerPOV object. func NewQsciLexerPOV() *QsciLexerPOV { - var outptr_QsciLexerPOV *C.QsciLexerPOV = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPOV_new(&outptr_QsciLexerPOV, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPOV(outptr_QsciLexerPOV, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPOV(C.QsciLexerPOV_new()) ret.isSubclass = true return ret } // NewQsciLexerPOV2 constructs a new QsciLexerPOV object. func NewQsciLexerPOV2(parent *qt.QObject) *QsciLexerPOV { - var outptr_QsciLexerPOV *C.QsciLexerPOV = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPOV_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPOV, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPOV(outptr_QsciLexerPOV, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPOV(C.QsciLexerPOV_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1008,7 +998,7 @@ func miqt_exec_callback_QsciLexerPOV_SetEditor(self *C.QsciLexerPOV, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1252,7 +1242,7 @@ func miqt_exec_callback_QsciLexerPOV_ReadProperties(self *C.QsciLexerPOV, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1289,7 +1279,7 @@ func miqt_exec_callback_QsciLexerPOV_WriteProperties(self *C.QsciLexerPOV, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpov.h b/qt-restricted-extras/qscintilla/gen_qscilexerpov.h index 75835fae..0f00982e 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpov.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpov.h @@ -34,8 +34,9 @@ typedef struct QsciLexerPOV QsciLexerPOV; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerPOV_new(QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerPOV_new2(QObject* parent, QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerPOV* QsciLexerPOV_new(); +QsciLexerPOV* QsciLexerPOV_new2(QObject* parent); +void QsciLexerPOV_virtbase(QsciLexerPOV* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerPOV_MetaObject(const QsciLexerPOV* self); void* QsciLexerPOV_Metacast(QsciLexerPOV* self, const char* param1); struct miqt_string QsciLexerPOV_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerproperties.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerproperties.cpp index 88d230c7..513673f6 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerproperties.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerproperties.cpp @@ -863,18 +863,16 @@ public: }; -void QsciLexerProperties_new(QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerProperties* ret = new MiqtVirtualQsciLexerProperties(); - *outptr_QsciLexerProperties = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerProperties* QsciLexerProperties_new() { + return new MiqtVirtualQsciLexerProperties(); } -void QsciLexerProperties_new2(QObject* parent, QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerProperties* ret = new MiqtVirtualQsciLexerProperties(parent); - *outptr_QsciLexerProperties = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerProperties* QsciLexerProperties_new2(QObject* parent) { + return new MiqtVirtualQsciLexerProperties(parent); +} + +void QsciLexerProperties_virtbase(QsciLexerProperties* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerProperties_MetaObject(const QsciLexerProperties* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerproperties.go b/qt-restricted-extras/qscintilla/gen_qscilexerproperties.go index 1eff7e48..450b7089 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerproperties.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerproperties.go @@ -47,44 +47,34 @@ func (this *QsciLexerProperties) UnsafePointer() unsafe.Pointer { } // newQsciLexerProperties constructs the type using only CGO pointers. -func newQsciLexerProperties(h *C.QsciLexerProperties, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerProperties { +func newQsciLexerProperties(h *C.QsciLexerProperties) *QsciLexerProperties { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerProperties_virtbase(h, &outptr_QsciLexer) + return &QsciLexerProperties{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerProperties constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerProperties(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerProperties { - if h == nil { - return nil - } - - return &QsciLexerProperties{h: (*C.QsciLexerProperties)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerProperties(h unsafe.Pointer) *QsciLexerProperties { + return newQsciLexerProperties((*C.QsciLexerProperties)(h)) } // NewQsciLexerProperties constructs a new QsciLexerProperties object. func NewQsciLexerProperties() *QsciLexerProperties { - var outptr_QsciLexerProperties *C.QsciLexerProperties = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerProperties_new(&outptr_QsciLexerProperties, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerProperties(outptr_QsciLexerProperties, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerProperties(C.QsciLexerProperties_new()) ret.isSubclass = true return ret } // NewQsciLexerProperties2 constructs a new QsciLexerProperties object. func NewQsciLexerProperties2(parent *qt.QObject) *QsciLexerProperties { - var outptr_QsciLexerProperties *C.QsciLexerProperties = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerProperties_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerProperties, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerProperties(outptr_QsciLexerProperties, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerProperties(C.QsciLexerProperties_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -928,7 +918,7 @@ func miqt_exec_callback_QsciLexerProperties_SetEditor(self *C.QsciLexerPropertie } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1172,7 +1162,7 @@ func miqt_exec_callback_QsciLexerProperties_ReadProperties(self *C.QsciLexerProp } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1209,7 +1199,7 @@ func miqt_exec_callback_QsciLexerProperties_WriteProperties(self *C.QsciLexerPro } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerproperties.h b/qt-restricted-extras/qscintilla/gen_qscilexerproperties.h index b5a7068f..8ba83cf0 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerproperties.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerproperties.h @@ -34,8 +34,9 @@ typedef struct QsciLexerProperties QsciLexerProperties; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerProperties_new(QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerProperties_new2(QObject* parent, QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerProperties* QsciLexerProperties_new(); +QsciLexerProperties* QsciLexerProperties_new2(QObject* parent); +void QsciLexerProperties_virtbase(QsciLexerProperties* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerProperties_MetaObject(const QsciLexerProperties* self); void* QsciLexerProperties_Metacast(QsciLexerProperties* self, const char* param1); struct miqt_string QsciLexerProperties_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpython.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerpython.cpp index 1ee8230b..48b2ff1f 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpython.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpython.cpp @@ -912,18 +912,16 @@ public: }; -void QsciLexerPython_new(QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPython* ret = new MiqtVirtualQsciLexerPython(); - *outptr_QsciLexerPython = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPython* QsciLexerPython_new() { + return new MiqtVirtualQsciLexerPython(); } -void QsciLexerPython_new2(QObject* parent, QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPython* ret = new MiqtVirtualQsciLexerPython(parent); - *outptr_QsciLexerPython = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPython* QsciLexerPython_new2(QObject* parent) { + return new MiqtVirtualQsciLexerPython(parent); +} + +void QsciLexerPython_virtbase(QsciLexerPython* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerPython_MetaObject(const QsciLexerPython* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpython.go b/qt-restricted-extras/qscintilla/gen_qscilexerpython.go index b1d81c17..35cd6d90 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpython.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpython.go @@ -71,44 +71,34 @@ func (this *QsciLexerPython) UnsafePointer() unsafe.Pointer { } // newQsciLexerPython constructs the type using only CGO pointers. -func newQsciLexerPython(h *C.QsciLexerPython, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPython { +func newQsciLexerPython(h *C.QsciLexerPython) *QsciLexerPython { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerPython_virtbase(h, &outptr_QsciLexer) + return &QsciLexerPython{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerPython constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerPython(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPython { - if h == nil { - return nil - } - - return &QsciLexerPython{h: (*C.QsciLexerPython)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerPython(h unsafe.Pointer) *QsciLexerPython { + return newQsciLexerPython((*C.QsciLexerPython)(h)) } // NewQsciLexerPython constructs a new QsciLexerPython object. func NewQsciLexerPython() *QsciLexerPython { - var outptr_QsciLexerPython *C.QsciLexerPython = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPython_new(&outptr_QsciLexerPython, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPython(outptr_QsciLexerPython, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPython(C.QsciLexerPython_new()) ret.isSubclass = true return ret } // NewQsciLexerPython2 constructs a new QsciLexerPython object. func NewQsciLexerPython2(parent *qt.QObject) *QsciLexerPython { - var outptr_QsciLexerPython *C.QsciLexerPython = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPython_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPython, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPython(outptr_QsciLexerPython, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPython(C.QsciLexerPython_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1095,7 +1085,7 @@ func miqt_exec_callback_QsciLexerPython_SetEditor(self *C.QsciLexerPython, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1339,7 +1329,7 @@ func miqt_exec_callback_QsciLexerPython_ReadProperties(self *C.QsciLexerPython, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1376,7 +1366,7 @@ func miqt_exec_callback_QsciLexerPython_WriteProperties(self *C.QsciLexerPython, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerpython.h b/qt-restricted-extras/qscintilla/gen_qscilexerpython.h index febe4af6..3e7fdd5f 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerpython.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerpython.h @@ -34,8 +34,9 @@ typedef struct QsciLexerPython QsciLexerPython; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerPython_new(QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerPython_new2(QObject* parent, QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerPython* QsciLexerPython_new(); +QsciLexerPython* QsciLexerPython_new2(QObject* parent); +void QsciLexerPython_virtbase(QsciLexerPython* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerPython_MetaObject(const QsciLexerPython* self); void* QsciLexerPython_Metacast(QsciLexerPython* self, const char* param1); struct miqt_string QsciLexerPython_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerruby.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerruby.cpp index 2724d402..7af0c5ff 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerruby.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerruby.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerRuby_new(QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerRuby* ret = new MiqtVirtualQsciLexerRuby(); - *outptr_QsciLexerRuby = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerRuby* QsciLexerRuby_new() { + return new MiqtVirtualQsciLexerRuby(); } -void QsciLexerRuby_new2(QObject* parent, QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerRuby* ret = new MiqtVirtualQsciLexerRuby(parent); - *outptr_QsciLexerRuby = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerRuby* QsciLexerRuby_new2(QObject* parent) { + return new MiqtVirtualQsciLexerRuby(parent); +} + +void QsciLexerRuby_virtbase(QsciLexerRuby* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerRuby_MetaObject(const QsciLexerRuby* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerruby.go b/qt-restricted-extras/qscintilla/gen_qscilexerruby.go index 39438934..c1049a9d 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerruby.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerruby.go @@ -72,44 +72,34 @@ func (this *QsciLexerRuby) UnsafePointer() unsafe.Pointer { } // newQsciLexerRuby constructs the type using only CGO pointers. -func newQsciLexerRuby(h *C.QsciLexerRuby, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerRuby { +func newQsciLexerRuby(h *C.QsciLexerRuby) *QsciLexerRuby { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerRuby_virtbase(h, &outptr_QsciLexer) + return &QsciLexerRuby{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerRuby constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerRuby(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerRuby { - if h == nil { - return nil - } - - return &QsciLexerRuby{h: (*C.QsciLexerRuby)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerRuby(h unsafe.Pointer) *QsciLexerRuby { + return newQsciLexerRuby((*C.QsciLexerRuby)(h)) } // NewQsciLexerRuby constructs a new QsciLexerRuby object. func NewQsciLexerRuby() *QsciLexerRuby { - var outptr_QsciLexerRuby *C.QsciLexerRuby = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerRuby_new(&outptr_QsciLexerRuby, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerRuby(outptr_QsciLexerRuby, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerRuby(C.QsciLexerRuby_new()) ret.isSubclass = true return ret } // NewQsciLexerRuby2 constructs a new QsciLexerRuby object. func NewQsciLexerRuby2(parent *qt.QObject) *QsciLexerRuby { - var outptr_QsciLexerRuby *C.QsciLexerRuby = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerRuby_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerRuby, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerRuby(outptr_QsciLexerRuby, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerRuby(C.QsciLexerRuby_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -961,7 +951,7 @@ func miqt_exec_callback_QsciLexerRuby_SetEditor(self *C.QsciLexerRuby, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerRuby{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1205,7 +1195,7 @@ func miqt_exec_callback_QsciLexerRuby_ReadProperties(self *C.QsciLexerRuby, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1242,7 +1232,7 @@ func miqt_exec_callback_QsciLexerRuby_WriteProperties(self *C.QsciLexerRuby, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerruby.h b/qt-restricted-extras/qscintilla/gen_qscilexerruby.h index 0816e599..229ac3cb 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerruby.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerruby.h @@ -34,8 +34,9 @@ typedef struct QsciLexerRuby QsciLexerRuby; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerRuby_new(QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerRuby_new2(QObject* parent, QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerRuby* QsciLexerRuby_new(); +QsciLexerRuby* QsciLexerRuby_new2(QObject* parent); +void QsciLexerRuby_virtbase(QsciLexerRuby* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerRuby_MetaObject(const QsciLexerRuby* self); void* QsciLexerRuby_Metacast(QsciLexerRuby* self, const char* param1); struct miqt_string QsciLexerRuby_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerspice.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerspice.cpp index a60905ee..113c45a2 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerspice.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerspice.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerSpice_new(QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerSpice* ret = new MiqtVirtualQsciLexerSpice(); - *outptr_QsciLexerSpice = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerSpice* QsciLexerSpice_new() { + return new MiqtVirtualQsciLexerSpice(); } -void QsciLexerSpice_new2(QObject* parent, QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerSpice* ret = new MiqtVirtualQsciLexerSpice(parent); - *outptr_QsciLexerSpice = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerSpice* QsciLexerSpice_new2(QObject* parent) { + return new MiqtVirtualQsciLexerSpice(parent); +} + +void QsciLexerSpice_virtbase(QsciLexerSpice* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerSpice_MetaObject(const QsciLexerSpice* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerspice.go b/qt-restricted-extras/qscintilla/gen_qscilexerspice.go index ac8418a6..fd93ce29 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerspice.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerspice.go @@ -50,44 +50,34 @@ func (this *QsciLexerSpice) UnsafePointer() unsafe.Pointer { } // newQsciLexerSpice constructs the type using only CGO pointers. -func newQsciLexerSpice(h *C.QsciLexerSpice, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerSpice { +func newQsciLexerSpice(h *C.QsciLexerSpice) *QsciLexerSpice { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerSpice_virtbase(h, &outptr_QsciLexer) + return &QsciLexerSpice{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerSpice constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerSpice(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerSpice { - if h == nil { - return nil - } - - return &QsciLexerSpice{h: (*C.QsciLexerSpice)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerSpice(h unsafe.Pointer) *QsciLexerSpice { + return newQsciLexerSpice((*C.QsciLexerSpice)(h)) } // NewQsciLexerSpice constructs a new QsciLexerSpice object. func NewQsciLexerSpice() *QsciLexerSpice { - var outptr_QsciLexerSpice *C.QsciLexerSpice = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerSpice_new(&outptr_QsciLexerSpice, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerSpice(outptr_QsciLexerSpice, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerSpice(C.QsciLexerSpice_new()) ret.isSubclass = true return ret } // NewQsciLexerSpice2 constructs a new QsciLexerSpice object. func NewQsciLexerSpice2(parent *qt.QObject) *QsciLexerSpice { - var outptr_QsciLexerSpice *C.QsciLexerSpice = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerSpice_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerSpice, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerSpice(outptr_QsciLexerSpice, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerSpice(C.QsciLexerSpice_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -879,7 +869,7 @@ func miqt_exec_callback_QsciLexerSpice_SetEditor(self *C.QsciLexerSpice, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerSpice{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1123,7 +1113,7 @@ func miqt_exec_callback_QsciLexerSpice_ReadProperties(self *C.QsciLexerSpice, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1160,7 +1150,7 @@ func miqt_exec_callback_QsciLexerSpice_WriteProperties(self *C.QsciLexerSpice, c } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerspice.h b/qt-restricted-extras/qscintilla/gen_qscilexerspice.h index d4d28838..2b4692b6 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerspice.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerspice.h @@ -34,8 +34,9 @@ typedef struct QsciLexerSpice QsciLexerSpice; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerSpice_new(QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerSpice_new2(QObject* parent, QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerSpice* QsciLexerSpice_new(); +QsciLexerSpice* QsciLexerSpice_new2(QObject* parent); +void QsciLexerSpice_virtbase(QsciLexerSpice* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerSpice_MetaObject(const QsciLexerSpice* self); void* QsciLexerSpice_Metacast(QsciLexerSpice* self, const char* param1); struct miqt_string QsciLexerSpice_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexersql.cpp b/qt-restricted-extras/qscintilla/gen_qscilexersql.cpp index f65d1bdd..775ab205 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexersql.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexersql.cpp @@ -911,18 +911,16 @@ public: }; -void QsciLexerSQL_new(QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerSQL* ret = new MiqtVirtualQsciLexerSQL(); - *outptr_QsciLexerSQL = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerSQL* QsciLexerSQL_new() { + return new MiqtVirtualQsciLexerSQL(); } -void QsciLexerSQL_new2(QObject* parent, QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerSQL* ret = new MiqtVirtualQsciLexerSQL(parent); - *outptr_QsciLexerSQL = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerSQL* QsciLexerSQL_new2(QObject* parent) { + return new MiqtVirtualQsciLexerSQL(parent); +} + +void QsciLexerSQL_virtbase(QsciLexerSQL* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerSQL_MetaObject(const QsciLexerSQL* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexersql.go b/qt-restricted-extras/qscintilla/gen_qscilexersql.go index b2d4a3fb..718de844 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexersql.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexersql.go @@ -63,44 +63,34 @@ func (this *QsciLexerSQL) UnsafePointer() unsafe.Pointer { } // newQsciLexerSQL constructs the type using only CGO pointers. -func newQsciLexerSQL(h *C.QsciLexerSQL, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerSQL { +func newQsciLexerSQL(h *C.QsciLexerSQL) *QsciLexerSQL { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerSQL_virtbase(h, &outptr_QsciLexer) + return &QsciLexerSQL{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerSQL constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerSQL(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerSQL { - if h == nil { - return nil - } - - return &QsciLexerSQL{h: (*C.QsciLexerSQL)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerSQL(h unsafe.Pointer) *QsciLexerSQL { + return newQsciLexerSQL((*C.QsciLexerSQL)(h)) } // NewQsciLexerSQL constructs a new QsciLexerSQL object. func NewQsciLexerSQL() *QsciLexerSQL { - var outptr_QsciLexerSQL *C.QsciLexerSQL = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerSQL_new(&outptr_QsciLexerSQL, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerSQL(outptr_QsciLexerSQL, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerSQL(C.QsciLexerSQL_new()) ret.isSubclass = true return ret } // NewQsciLexerSQL2 constructs a new QsciLexerSQL object. func NewQsciLexerSQL2(parent *qt.QObject) *QsciLexerSQL { - var outptr_QsciLexerSQL *C.QsciLexerSQL = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerSQL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerSQL, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerSQL(outptr_QsciLexerSQL, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerSQL(C.QsciLexerSQL_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1048,7 +1038,7 @@ func miqt_exec_callback_QsciLexerSQL_SetEditor(self *C.QsciLexerSQL, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1292,7 +1282,7 @@ func miqt_exec_callback_QsciLexerSQL_ReadProperties(self *C.QsciLexerSQL, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1329,7 +1319,7 @@ func miqt_exec_callback_QsciLexerSQL_WriteProperties(self *C.QsciLexerSQL, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexersql.h b/qt-restricted-extras/qscintilla/gen_qscilexersql.h index 2db98949..93e0d4d6 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexersql.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexersql.h @@ -34,8 +34,9 @@ typedef struct QsciLexerSQL QsciLexerSQL; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerSQL_new(QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerSQL_new2(QObject* parent, QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerSQL* QsciLexerSQL_new(); +QsciLexerSQL* QsciLexerSQL_new2(QObject* parent); +void QsciLexerSQL_virtbase(QsciLexerSQL* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerSQL_MetaObject(const QsciLexerSQL* self); void* QsciLexerSQL_Metacast(QsciLexerSQL* self, const char* param1); struct miqt_string QsciLexerSQL_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexertcl.cpp b/qt-restricted-extras/qscintilla/gen_qscilexertcl.cpp index 5f4921ce..65a66d25 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexertcl.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexertcl.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerTCL_new(QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerTCL* ret = new MiqtVirtualQsciLexerTCL(); - *outptr_QsciLexerTCL = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerTCL* QsciLexerTCL_new() { + return new MiqtVirtualQsciLexerTCL(); } -void QsciLexerTCL_new2(QObject* parent, QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerTCL* ret = new MiqtVirtualQsciLexerTCL(parent); - *outptr_QsciLexerTCL = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerTCL* QsciLexerTCL_new2(QObject* parent) { + return new MiqtVirtualQsciLexerTCL(parent); +} + +void QsciLexerTCL_virtbase(QsciLexerTCL* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerTCL_MetaObject(const QsciLexerTCL* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexertcl.go b/qt-restricted-extras/qscintilla/gen_qscilexertcl.go index a317cf00..83eaf560 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexertcl.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexertcl.go @@ -63,44 +63,34 @@ func (this *QsciLexerTCL) UnsafePointer() unsafe.Pointer { } // newQsciLexerTCL constructs the type using only CGO pointers. -func newQsciLexerTCL(h *C.QsciLexerTCL, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerTCL { +func newQsciLexerTCL(h *C.QsciLexerTCL) *QsciLexerTCL { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerTCL_virtbase(h, &outptr_QsciLexer) + return &QsciLexerTCL{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerTCL constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerTCL(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerTCL { - if h == nil { - return nil - } - - return &QsciLexerTCL{h: (*C.QsciLexerTCL)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerTCL(h unsafe.Pointer) *QsciLexerTCL { + return newQsciLexerTCL((*C.QsciLexerTCL)(h)) } // NewQsciLexerTCL constructs a new QsciLexerTCL object. func NewQsciLexerTCL() *QsciLexerTCL { - var outptr_QsciLexerTCL *C.QsciLexerTCL = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerTCL_new(&outptr_QsciLexerTCL, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerTCL(outptr_QsciLexerTCL, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerTCL(C.QsciLexerTCL_new()) ret.isSubclass = true return ret } // NewQsciLexerTCL2 constructs a new QsciLexerTCL object. func NewQsciLexerTCL2(parent *qt.QObject) *QsciLexerTCL { - var outptr_QsciLexerTCL *C.QsciLexerTCL = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerTCL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerTCL, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerTCL(outptr_QsciLexerTCL, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerTCL(C.QsciLexerTCL_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -914,7 +904,7 @@ func miqt_exec_callback_QsciLexerTCL_SetEditor(self *C.QsciLexerTCL, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerTCL{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1158,7 +1148,7 @@ func miqt_exec_callback_QsciLexerTCL_ReadProperties(self *C.QsciLexerTCL, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1195,7 +1185,7 @@ func miqt_exec_callback_QsciLexerTCL_WriteProperties(self *C.QsciLexerTCL, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexertcl.h b/qt-restricted-extras/qscintilla/gen_qscilexertcl.h index 0c21f228..9e8bdbf3 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexertcl.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexertcl.h @@ -34,8 +34,9 @@ typedef struct QsciLexerTCL QsciLexerTCL; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerTCL_new(QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerTCL_new2(QObject* parent, QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerTCL* QsciLexerTCL_new(); +QsciLexerTCL* QsciLexerTCL_new2(QObject* parent); +void QsciLexerTCL_virtbase(QsciLexerTCL* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerTCL_MetaObject(const QsciLexerTCL* self); void* QsciLexerTCL_Metacast(QsciLexerTCL* self, const char* param1); struct miqt_string QsciLexerTCL_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexertex.cpp b/qt-restricted-extras/qscintilla/gen_qscilexertex.cpp index 7e645b91..6a24b374 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexertex.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexertex.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerTeX_new(QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerTeX* ret = new MiqtVirtualQsciLexerTeX(); - *outptr_QsciLexerTeX = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerTeX* QsciLexerTeX_new() { + return new MiqtVirtualQsciLexerTeX(); } -void QsciLexerTeX_new2(QObject* parent, QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerTeX* ret = new MiqtVirtualQsciLexerTeX(parent); - *outptr_QsciLexerTeX = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerTeX* QsciLexerTeX_new2(QObject* parent) { + return new MiqtVirtualQsciLexerTeX(parent); +} + +void QsciLexerTeX_virtbase(QsciLexerTeX* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerTeX_MetaObject(const QsciLexerTeX* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexertex.go b/qt-restricted-extras/qscintilla/gen_qscilexertex.go index 2b942201..c5c934dd 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexertex.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexertex.go @@ -47,44 +47,34 @@ func (this *QsciLexerTeX) UnsafePointer() unsafe.Pointer { } // newQsciLexerTeX constructs the type using only CGO pointers. -func newQsciLexerTeX(h *C.QsciLexerTeX, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerTeX { +func newQsciLexerTeX(h *C.QsciLexerTeX) *QsciLexerTeX { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerTeX_virtbase(h, &outptr_QsciLexer) + return &QsciLexerTeX{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerTeX constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerTeX(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerTeX { - if h == nil { - return nil - } - - return &QsciLexerTeX{h: (*C.QsciLexerTeX)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerTeX(h unsafe.Pointer) *QsciLexerTeX { + return newQsciLexerTeX((*C.QsciLexerTeX)(h)) } // NewQsciLexerTeX constructs a new QsciLexerTeX object. func NewQsciLexerTeX() *QsciLexerTeX { - var outptr_QsciLexerTeX *C.QsciLexerTeX = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerTeX_new(&outptr_QsciLexerTeX, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerTeX(outptr_QsciLexerTeX, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerTeX(C.QsciLexerTeX_new()) ret.isSubclass = true return ret } // NewQsciLexerTeX2 constructs a new QsciLexerTeX object. func NewQsciLexerTeX2(parent *qt.QObject) *QsciLexerTeX { - var outptr_QsciLexerTeX *C.QsciLexerTeX = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerTeX_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerTeX, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerTeX(outptr_QsciLexerTeX, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerTeX(C.QsciLexerTeX_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -907,7 +897,7 @@ func miqt_exec_callback_QsciLexerTeX_SetEditor(self *C.QsciLexerTeX, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerTeX{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1151,7 +1141,7 @@ func miqt_exec_callback_QsciLexerTeX_ReadProperties(self *C.QsciLexerTeX, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1188,7 +1178,7 @@ func miqt_exec_callback_QsciLexerTeX_WriteProperties(self *C.QsciLexerTeX, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexertex.h b/qt-restricted-extras/qscintilla/gen_qscilexertex.h index 875eb929..c25a7ed6 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexertex.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexertex.h @@ -34,8 +34,9 @@ typedef struct QsciLexerTeX QsciLexerTeX; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerTeX_new(QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerTeX_new2(QObject* parent, QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerTeX* QsciLexerTeX_new(); +QsciLexerTeX* QsciLexerTeX_new2(QObject* parent); +void QsciLexerTeX_virtbase(QsciLexerTeX* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerTeX_MetaObject(const QsciLexerTeX* self); void* QsciLexerTeX_Metacast(QsciLexerTeX* self, const char* param1); struct miqt_string QsciLexerTeX_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerverilog.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerverilog.cpp index e9416587..7f1be9e1 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerverilog.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerverilog.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerVerilog_new(QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerVerilog* ret = new MiqtVirtualQsciLexerVerilog(); - *outptr_QsciLexerVerilog = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerVerilog* QsciLexerVerilog_new() { + return new MiqtVirtualQsciLexerVerilog(); } -void QsciLexerVerilog_new2(QObject* parent, QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerVerilog* ret = new MiqtVirtualQsciLexerVerilog(parent); - *outptr_QsciLexerVerilog = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerVerilog* QsciLexerVerilog_new2(QObject* parent) { + return new MiqtVirtualQsciLexerVerilog(parent); +} + +void QsciLexerVerilog_virtbase(QsciLexerVerilog* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerVerilog_MetaObject(const QsciLexerVerilog* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerverilog.go b/qt-restricted-extras/qscintilla/gen_qscilexerverilog.go index 434716c7..22fdb3ce 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerverilog.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerverilog.go @@ -79,44 +79,34 @@ func (this *QsciLexerVerilog) UnsafePointer() unsafe.Pointer { } // newQsciLexerVerilog constructs the type using only CGO pointers. -func newQsciLexerVerilog(h *C.QsciLexerVerilog, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerVerilog { +func newQsciLexerVerilog(h *C.QsciLexerVerilog) *QsciLexerVerilog { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerVerilog_virtbase(h, &outptr_QsciLexer) + return &QsciLexerVerilog{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerVerilog constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerVerilog(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerVerilog { - if h == nil { - return nil - } - - return &QsciLexerVerilog{h: (*C.QsciLexerVerilog)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerVerilog(h unsafe.Pointer) *QsciLexerVerilog { + return newQsciLexerVerilog((*C.QsciLexerVerilog)(h)) } // NewQsciLexerVerilog constructs a new QsciLexerVerilog object. func NewQsciLexerVerilog() *QsciLexerVerilog { - var outptr_QsciLexerVerilog *C.QsciLexerVerilog = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerVerilog_new(&outptr_QsciLexerVerilog, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerVerilog(outptr_QsciLexerVerilog, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerVerilog(C.QsciLexerVerilog_new()) ret.isSubclass = true return ret } // NewQsciLexerVerilog2 constructs a new QsciLexerVerilog object. func NewQsciLexerVerilog2(parent *qt.QObject) *QsciLexerVerilog { - var outptr_QsciLexerVerilog *C.QsciLexerVerilog = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerVerilog_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerVerilog, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerVerilog(outptr_QsciLexerVerilog, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerVerilog(C.QsciLexerVerilog_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -967,7 +957,7 @@ func miqt_exec_callback_QsciLexerVerilog_SetEditor(self *C.QsciLexerVerilog, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1211,7 +1201,7 @@ func miqt_exec_callback_QsciLexerVerilog_ReadProperties(self *C.QsciLexerVerilog } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1248,7 +1238,7 @@ func miqt_exec_callback_QsciLexerVerilog_WriteProperties(self *C.QsciLexerVerilo } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerverilog.h b/qt-restricted-extras/qscintilla/gen_qscilexerverilog.h index b52a0ca0..df3aca3b 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerverilog.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerverilog.h @@ -34,8 +34,9 @@ typedef struct QsciLexerVerilog QsciLexerVerilog; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerVerilog_new(QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerVerilog_new2(QObject* parent, QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerVerilog* QsciLexerVerilog_new(); +QsciLexerVerilog* QsciLexerVerilog_new2(QObject* parent); +void QsciLexerVerilog_virtbase(QsciLexerVerilog* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerVerilog_MetaObject(const QsciLexerVerilog* self); void* QsciLexerVerilog_Metacast(QsciLexerVerilog* self, const char* param1); struct miqt_string QsciLexerVerilog_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexervhdl.cpp b/qt-restricted-extras/qscintilla/gen_qscilexervhdl.cpp index ca8eb589..9766185e 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexervhdl.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexervhdl.cpp @@ -959,18 +959,16 @@ public: }; -void QsciLexerVHDL_new(QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerVHDL* ret = new MiqtVirtualQsciLexerVHDL(); - *outptr_QsciLexerVHDL = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerVHDL* QsciLexerVHDL_new() { + return new MiqtVirtualQsciLexerVHDL(); } -void QsciLexerVHDL_new2(QObject* parent, QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerVHDL* ret = new MiqtVirtualQsciLexerVHDL(parent); - *outptr_QsciLexerVHDL = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerVHDL* QsciLexerVHDL_new2(QObject* parent) { + return new MiqtVirtualQsciLexerVHDL(parent); +} + +void QsciLexerVHDL_virtbase(QsciLexerVHDL* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerVHDL_MetaObject(const QsciLexerVHDL* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexervhdl.go b/qt-restricted-extras/qscintilla/gen_qscilexervhdl.go index 8a8d63df..02e2bf52 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexervhdl.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexervhdl.go @@ -57,44 +57,34 @@ func (this *QsciLexerVHDL) UnsafePointer() unsafe.Pointer { } // newQsciLexerVHDL constructs the type using only CGO pointers. -func newQsciLexerVHDL(h *C.QsciLexerVHDL, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerVHDL { +func newQsciLexerVHDL(h *C.QsciLexerVHDL) *QsciLexerVHDL { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerVHDL_virtbase(h, &outptr_QsciLexer) + return &QsciLexerVHDL{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerVHDL constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerVHDL(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerVHDL { - if h == nil { - return nil - } - - return &QsciLexerVHDL{h: (*C.QsciLexerVHDL)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerVHDL(h unsafe.Pointer) *QsciLexerVHDL { + return newQsciLexerVHDL((*C.QsciLexerVHDL)(h)) } // NewQsciLexerVHDL constructs a new QsciLexerVHDL object. func NewQsciLexerVHDL() *QsciLexerVHDL { - var outptr_QsciLexerVHDL *C.QsciLexerVHDL = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerVHDL_new(&outptr_QsciLexerVHDL, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerVHDL(outptr_QsciLexerVHDL, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerVHDL(C.QsciLexerVHDL_new()) ret.isSubclass = true return ret } // NewQsciLexerVHDL2 constructs a new QsciLexerVHDL object. func NewQsciLexerVHDL2(parent *qt.QObject) *QsciLexerVHDL { - var outptr_QsciLexerVHDL *C.QsciLexerVHDL = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerVHDL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerVHDL, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerVHDL(outptr_QsciLexerVHDL, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerVHDL(C.QsciLexerVHDL_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1070,7 +1060,7 @@ func miqt_exec_callback_QsciLexerVHDL_SetEditor(self *C.QsciLexerVHDL, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1314,7 +1304,7 @@ func miqt_exec_callback_QsciLexerVHDL_ReadProperties(self *C.QsciLexerVHDL, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1351,7 +1341,7 @@ func miqt_exec_callback_QsciLexerVHDL_WriteProperties(self *C.QsciLexerVHDL, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexervhdl.h b/qt-restricted-extras/qscintilla/gen_qscilexervhdl.h index 5e178323..459d7718 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexervhdl.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexervhdl.h @@ -34,8 +34,9 @@ typedef struct QsciLexerVHDL QsciLexerVHDL; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerVHDL_new(QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerVHDL_new2(QObject* parent, QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerVHDL* QsciLexerVHDL_new(); +QsciLexerVHDL* QsciLexerVHDL_new2(QObject* parent); +void QsciLexerVHDL_virtbase(QsciLexerVHDL* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerVHDL_MetaObject(const QsciLexerVHDL* self); void* QsciLexerVHDL_Metacast(QsciLexerVHDL* self, const char* param1); struct miqt_string QsciLexerVHDL_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerxml.cpp b/qt-restricted-extras/qscintilla/gen_qscilexerxml.cpp index 331c0d61..a9f81b19 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerxml.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexerxml.cpp @@ -91,20 +91,16 @@ public: }; -void QsciLexerXML_new(QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerXML* ret = new MiqtVirtualQsciLexerXML(); - *outptr_QsciLexerXML = ret; - *outptr_QsciLexerHTML = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerXML* QsciLexerXML_new() { + return new MiqtVirtualQsciLexerXML(); } -void QsciLexerXML_new2(QObject* parent, QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerXML* ret = new MiqtVirtualQsciLexerXML(parent); - *outptr_QsciLexerXML = ret; - *outptr_QsciLexerHTML = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerXML* QsciLexerXML_new2(QObject* parent) { + return new MiqtVirtualQsciLexerXML(parent); +} + +void QsciLexerXML_virtbase(QsciLexerXML* src, QsciLexerHTML** outptr_QsciLexerHTML) { + *outptr_QsciLexerHTML = static_cast(src); } QMetaObject* QsciLexerXML_MetaObject(const QsciLexerXML* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerxml.go b/qt-restricted-extras/qscintilla/gen_qscilexerxml.go index 102c65dc..79a21301 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerxml.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexerxml.go @@ -36,46 +36,34 @@ func (this *QsciLexerXML) UnsafePointer() unsafe.Pointer { } // newQsciLexerXML constructs the type using only CGO pointers. -func newQsciLexerXML(h *C.QsciLexerXML, h_QsciLexerHTML *C.QsciLexerHTML, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerXML { +func newQsciLexerXML(h *C.QsciLexerXML) *QsciLexerXML { if h == nil { return nil } + var outptr_QsciLexerHTML *C.QsciLexerHTML = nil + C.QsciLexerXML_virtbase(h, &outptr_QsciLexerHTML) + return &QsciLexerXML{h: h, - QsciLexerHTML: newQsciLexerHTML(h_QsciLexerHTML, h_QsciLexer, h_QObject)} + QsciLexerHTML: newQsciLexerHTML(outptr_QsciLexerHTML)} } // UnsafeNewQsciLexerXML constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerXML(h unsafe.Pointer, h_QsciLexerHTML unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerXML { - if h == nil { - return nil - } - - return &QsciLexerXML{h: (*C.QsciLexerXML)(h), - QsciLexerHTML: UnsafeNewQsciLexerHTML(h_QsciLexerHTML, h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerXML(h unsafe.Pointer) *QsciLexerXML { + return newQsciLexerXML((*C.QsciLexerXML)(h)) } // NewQsciLexerXML constructs a new QsciLexerXML object. func NewQsciLexerXML() *QsciLexerXML { - var outptr_QsciLexerXML *C.QsciLexerXML = nil - var outptr_QsciLexerHTML *C.QsciLexerHTML = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerXML_new(&outptr_QsciLexerXML, &outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerXML(outptr_QsciLexerXML, outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerXML(C.QsciLexerXML_new()) ret.isSubclass = true return ret } // NewQsciLexerXML2 constructs a new QsciLexerXML object. func NewQsciLexerXML2(parent *qt.QObject) *QsciLexerXML { - var outptr_QsciLexerXML *C.QsciLexerXML = nil - var outptr_QsciLexerHTML *C.QsciLexerHTML = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerXML_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerXML, &outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerXML(outptr_QsciLexerXML, outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerXML(C.QsciLexerXML_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla/gen_qscilexerxml.h b/qt-restricted-extras/qscintilla/gen_qscilexerxml.h index 7b8c6d04..c620bb6c 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexerxml.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexerxml.h @@ -32,8 +32,9 @@ typedef struct QsciLexerHTML QsciLexerHTML; typedef struct QsciLexerXML QsciLexerXML; #endif -void QsciLexerXML_new(QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerXML_new2(QObject* parent, QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerXML* QsciLexerXML_new(); +QsciLexerXML* QsciLexerXML_new2(QObject* parent); +void QsciLexerXML_virtbase(QsciLexerXML* src, QsciLexerHTML** outptr_QsciLexerHTML); QMetaObject* QsciLexerXML_MetaObject(const QsciLexerXML* self); void* QsciLexerXML_Metacast(QsciLexerXML* self, const char* param1); struct miqt_string QsciLexerXML_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeryaml.cpp b/qt-restricted-extras/qscintilla/gen_qscilexeryaml.cpp index 1ee12c67..fbeef604 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeryaml.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscilexeryaml.cpp @@ -863,18 +863,16 @@ public: }; -void QsciLexerYAML_new(QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerYAML* ret = new MiqtVirtualQsciLexerYAML(); - *outptr_QsciLexerYAML = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerYAML* QsciLexerYAML_new() { + return new MiqtVirtualQsciLexerYAML(); } -void QsciLexerYAML_new2(QObject* parent, QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerYAML* ret = new MiqtVirtualQsciLexerYAML(parent); - *outptr_QsciLexerYAML = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerYAML* QsciLexerYAML_new2(QObject* parent) { + return new MiqtVirtualQsciLexerYAML(parent); +} + +void QsciLexerYAML_virtbase(QsciLexerYAML* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerYAML_MetaObject(const QsciLexerYAML* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeryaml.go b/qt-restricted-extras/qscintilla/gen_qscilexeryaml.go index f91513d0..1e67b1b8 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeryaml.go +++ b/qt-restricted-extras/qscintilla/gen_qscilexeryaml.go @@ -51,44 +51,34 @@ func (this *QsciLexerYAML) UnsafePointer() unsafe.Pointer { } // newQsciLexerYAML constructs the type using only CGO pointers. -func newQsciLexerYAML(h *C.QsciLexerYAML, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerYAML { +func newQsciLexerYAML(h *C.QsciLexerYAML) *QsciLexerYAML { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerYAML_virtbase(h, &outptr_QsciLexer) + return &QsciLexerYAML{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerYAML constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerYAML(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerYAML { - if h == nil { - return nil - } - - return &QsciLexerYAML{h: (*C.QsciLexerYAML)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerYAML(h unsafe.Pointer) *QsciLexerYAML { + return newQsciLexerYAML((*C.QsciLexerYAML)(h)) } // NewQsciLexerYAML constructs a new QsciLexerYAML object. func NewQsciLexerYAML() *QsciLexerYAML { - var outptr_QsciLexerYAML *C.QsciLexerYAML = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerYAML_new(&outptr_QsciLexerYAML, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerYAML(outptr_QsciLexerYAML, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerYAML(C.QsciLexerYAML_new()) ret.isSubclass = true return ret } // NewQsciLexerYAML2 constructs a new QsciLexerYAML object. func NewQsciLexerYAML2(parent *qt.QObject) *QsciLexerYAML { - var outptr_QsciLexerYAML *C.QsciLexerYAML = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerYAML_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerYAML, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerYAML(outptr_QsciLexerYAML, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerYAML(C.QsciLexerYAML_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -924,7 +914,7 @@ func miqt_exec_callback_QsciLexerYAML_SetEditor(self *C.QsciLexerYAML, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1168,7 +1158,7 @@ func miqt_exec_callback_QsciLexerYAML_ReadProperties(self *C.QsciLexerYAML, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1205,7 +1195,7 @@ func miqt_exec_callback_QsciLexerYAML_WriteProperties(self *C.QsciLexerYAML, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla/gen_qscilexeryaml.h b/qt-restricted-extras/qscintilla/gen_qscilexeryaml.h index dd5dec7a..3337fe4d 100644 --- a/qt-restricted-extras/qscintilla/gen_qscilexeryaml.h +++ b/qt-restricted-extras/qscintilla/gen_qscilexeryaml.h @@ -34,8 +34,9 @@ typedef struct QsciLexerYAML QsciLexerYAML; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerYAML_new(QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerYAML_new2(QObject* parent, QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerYAML* QsciLexerYAML_new(); +QsciLexerYAML* QsciLexerYAML_new2(QObject* parent); +void QsciLexerYAML_virtbase(QsciLexerYAML* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerYAML_MetaObject(const QsciLexerYAML* self); void* QsciLexerYAML_Metacast(QsciLexerYAML* self, const char* param1); struct miqt_string QsciLexerYAML_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscimacro.cpp b/qt-restricted-extras/qscintilla/gen_qscimacro.cpp index a6a59752..6dcfb5d8 100644 --- a/qt-restricted-extras/qscintilla/gen_qscimacro.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscimacro.cpp @@ -261,17 +261,17 @@ public: }; -void QsciMacro_new(QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject) { - MiqtVirtualQsciMacro* ret = new MiqtVirtualQsciMacro(parent); - *outptr_QsciMacro = ret; - *outptr_QObject = static_cast(ret); +QsciMacro* QsciMacro_new(QsciScintilla* parent) { + return new MiqtVirtualQsciMacro(parent); } -void QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject) { +QsciMacro* QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent) { QString asc_QString = QString::fromUtf8(asc.data, asc.len); - MiqtVirtualQsciMacro* ret = new MiqtVirtualQsciMacro(asc_QString, parent); - *outptr_QsciMacro = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQsciMacro(asc_QString, parent); +} + +void QsciMacro_virtbase(QsciMacro* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QsciMacro_MetaObject(const QsciMacro* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qscimacro.go b/qt-restricted-extras/qscintilla/gen_qscimacro.go index 0aee4d09..22feda81 100644 --- a/qt-restricted-extras/qscintilla/gen_qscimacro.go +++ b/qt-restricted-extras/qscintilla/gen_qscimacro.go @@ -36,31 +36,26 @@ func (this *QsciMacro) UnsafePointer() unsafe.Pointer { } // newQsciMacro constructs the type using only CGO pointers. -func newQsciMacro(h *C.QsciMacro, h_QObject *C.QObject) *QsciMacro { +func newQsciMacro(h *C.QsciMacro) *QsciMacro { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QsciMacro_virtbase(h, &outptr_QObject) + return &QsciMacro{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQsciMacro constructs the type using only unsafe pointers. -func UnsafeNewQsciMacro(h unsafe.Pointer, h_QObject unsafe.Pointer) *QsciMacro { - if h == nil { - return nil - } - - return &QsciMacro{h: (*C.QsciMacro)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQsciMacro(h unsafe.Pointer) *QsciMacro { + return newQsciMacro((*C.QsciMacro)(h)) } // NewQsciMacro constructs a new QsciMacro object. func NewQsciMacro(parent *QsciScintilla) *QsciMacro { - var outptr_QsciMacro *C.QsciMacro = nil - var outptr_QObject *C.QObject = nil - C.QsciMacro_new(parent.cPointer(), &outptr_QsciMacro, &outptr_QObject) - ret := newQsciMacro(outptr_QsciMacro, outptr_QObject) + ret := newQsciMacro(C.QsciMacro_new(parent.cPointer())) ret.isSubclass = true return ret } @@ -71,11 +66,8 @@ func NewQsciMacro2(asc string, parent *QsciScintilla) *QsciMacro { asc_ms.data = C.CString(asc) asc_ms.len = C.size_t(len(asc)) defer C.free(unsafe.Pointer(asc_ms.data)) - var outptr_QsciMacro *C.QsciMacro = nil - var outptr_QObject *C.QObject = nil - C.QsciMacro_new2(asc_ms, parent.cPointer(), &outptr_QsciMacro, &outptr_QObject) - ret := newQsciMacro(outptr_QsciMacro, outptr_QObject) + ret := newQsciMacro(C.QsciMacro_new2(asc_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -330,7 +322,7 @@ func miqt_exec_callback_QsciMacro_TimerEvent(self *C.QsciMacro, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QsciMacro{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -356,7 +348,7 @@ func miqt_exec_callback_QsciMacro_ChildEvent(self *C.QsciMacro, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QsciMacro{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt-restricted-extras/qscintilla/gen_qscimacro.h b/qt-restricted-extras/qscintilla/gen_qscimacro.h index 4193e937..f4710aa5 100644 --- a/qt-restricted-extras/qscintilla/gen_qscimacro.h +++ b/qt-restricted-extras/qscintilla/gen_qscimacro.h @@ -34,8 +34,9 @@ typedef struct QsciMacro QsciMacro; typedef struct QsciScintilla QsciScintilla; #endif -void QsciMacro_new(QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject); -void QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject); +QsciMacro* QsciMacro_new(QsciScintilla* parent); +QsciMacro* QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent); +void QsciMacro_virtbase(QsciMacro* src, QObject** outptr_QObject); QMetaObject* QsciMacro_MetaObject(const QsciMacro* self); void* QsciMacro_Metacast(QsciMacro* self, const char* param1); struct miqt_string QsciMacro_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qsciprinter.cpp b/qt-restricted-extras/qscintilla/gen_qsciprinter.cpp index e258bce7..4cb45491 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciprinter.cpp +++ b/qt-restricted-extras/qscintilla/gen_qsciprinter.cpp @@ -320,20 +320,16 @@ public: }; -void QsciPrinter_new(QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQsciPrinter* ret = new MiqtVirtualQsciPrinter(); - *outptr_QsciPrinter = ret; - *outptr_QPrinter = static_cast(ret); - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QsciPrinter* QsciPrinter_new() { + return new MiqtVirtualQsciPrinter(); } -void QsciPrinter_new2(int mode, QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQsciPrinter* ret = new MiqtVirtualQsciPrinter(static_cast(mode)); - *outptr_QsciPrinter = ret; - *outptr_QPrinter = static_cast(ret); - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QsciPrinter* QsciPrinter_new2(int mode) { + return new MiqtVirtualQsciPrinter(static_cast(mode)); +} + +void QsciPrinter_virtbase(QsciPrinter* src, QPrinter** outptr_QPrinter) { + *outptr_QPrinter = static_cast(src); } void QsciPrinter_FormatPage(QsciPrinter* self, QPainter* painter, bool drawing, QRect* area, int pagenr) { diff --git a/qt-restricted-extras/qscintilla/gen_qsciprinter.go b/qt-restricted-extras/qscintilla/gen_qsciprinter.go index 7ea64628..4137e577 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciprinter.go +++ b/qt-restricted-extras/qscintilla/gen_qsciprinter.go @@ -37,46 +37,34 @@ func (this *QsciPrinter) UnsafePointer() unsafe.Pointer { } // newQsciPrinter constructs the type using only CGO pointers. -func newQsciPrinter(h *C.QsciPrinter, h_QPrinter *C.QPrinter, h_QPagedPaintDevice *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QsciPrinter { +func newQsciPrinter(h *C.QsciPrinter) *QsciPrinter { if h == nil { return nil } + var outptr_QPrinter *C.QPrinter = nil + C.QsciPrinter_virtbase(h, &outptr_QPrinter) + return &QsciPrinter{h: h, - QPrinter: printsupport.UnsafeNewQPrinter(unsafe.Pointer(h_QPrinter), unsafe.Pointer(h_QPagedPaintDevice), unsafe.Pointer(h_QPaintDevice))} + QPrinter: printsupport.UnsafeNewQPrinter(unsafe.Pointer(outptr_QPrinter))} } // UnsafeNewQsciPrinter constructs the type using only unsafe pointers. -func UnsafeNewQsciPrinter(h unsafe.Pointer, h_QPrinter unsafe.Pointer, h_QPagedPaintDevice unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QsciPrinter { - if h == nil { - return nil - } - - return &QsciPrinter{h: (*C.QsciPrinter)(h), - QPrinter: printsupport.UnsafeNewQPrinter(h_QPrinter, h_QPagedPaintDevice, h_QPaintDevice)} +func UnsafeNewQsciPrinter(h unsafe.Pointer) *QsciPrinter { + return newQsciPrinter((*C.QsciPrinter)(h)) } // NewQsciPrinter constructs a new QsciPrinter object. func NewQsciPrinter() *QsciPrinter { - var outptr_QsciPrinter *C.QsciPrinter = nil - var outptr_QPrinter *C.QPrinter = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QsciPrinter_new(&outptr_QsciPrinter, &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQsciPrinter(outptr_QsciPrinter, outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQsciPrinter(C.QsciPrinter_new()) ret.isSubclass = true return ret } // NewQsciPrinter2 constructs a new QsciPrinter object. func NewQsciPrinter2(mode printsupport.QPrinter__PrinterMode) *QsciPrinter { - var outptr_QsciPrinter *C.QsciPrinter = nil - var outptr_QPrinter *C.QPrinter = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QsciPrinter_new2((C.int)(mode), &outptr_QsciPrinter, &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQsciPrinter(outptr_QsciPrinter, outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQsciPrinter(C.QsciPrinter_new2((C.int)(mode))) ret.isSubclass = true return ret } @@ -187,7 +175,7 @@ func miqt_exec_callback_QsciPrinter_PrintRange(self *C.QsciPrinter, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintillaBase(qsb, nil, nil, nil, nil, nil) + slotval1 := newQsciScintillaBase(qsb) slotval2 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) @@ -221,7 +209,7 @@ func miqt_exec_callback_QsciPrinter_PrintRange2(self *C.QsciPrinter, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintillaBase(qsb, nil, nil, nil, nil, nil) + slotval1 := newQsciScintillaBase(qsb) slotval2 := (int)(from) diff --git a/qt-restricted-extras/qscintilla/gen_qsciprinter.h b/qt-restricted-extras/qscintilla/gen_qsciprinter.h index 89fa46bd..78d835dc 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciprinter.h +++ b/qt-restricted-extras/qscintilla/gen_qsciprinter.h @@ -42,8 +42,9 @@ typedef struct QsciPrinter QsciPrinter; typedef struct QsciScintillaBase QsciScintillaBase; #endif -void QsciPrinter_new(QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); -void QsciPrinter_new2(int mode, QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +QsciPrinter* QsciPrinter_new(); +QsciPrinter* QsciPrinter_new2(int mode); +void QsciPrinter_virtbase(QsciPrinter* src, QPrinter** outptr_QPrinter); void QsciPrinter_FormatPage(QsciPrinter* self, QPainter* painter, bool drawing, QRect* area, int pagenr); int QsciPrinter_Magnification(const QsciPrinter* self); void QsciPrinter_SetMagnification(QsciPrinter* self, int magnification); diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintilla.cpp b/qt-restricted-extras/qscintilla/gen_qsciscintilla.cpp index ecf8cfdb..67f2ee29 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciscintilla.cpp +++ b/qt-restricted-extras/qscintilla/gen_qsciscintilla.cpp @@ -2757,26 +2757,16 @@ public: }; -void QsciScintilla_new(QWidget* parent, QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQsciScintilla* ret = new MiqtVirtualQsciScintilla(parent); - *outptr_QsciScintilla = ret; - *outptr_QsciScintillaBase = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QsciScintilla* QsciScintilla_new(QWidget* parent) { + return new MiqtVirtualQsciScintilla(parent); } -void QsciScintilla_new2(QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQsciScintilla* ret = new MiqtVirtualQsciScintilla(); - *outptr_QsciScintilla = ret; - *outptr_QsciScintillaBase = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QsciScintilla* QsciScintilla_new2() { + return new MiqtVirtualQsciScintilla(); +} + +void QsciScintilla_virtbase(QsciScintilla* src, QsciScintillaBase** outptr_QsciScintillaBase) { + *outptr_QsciScintillaBase = static_cast(src); } QMetaObject* QsciScintilla_MetaObject(const QsciScintilla* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintilla.go b/qt-restricted-extras/qscintilla/gen_qsciscintilla.go index 37b355b4..6d6640d7 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciscintilla.go +++ b/qt-restricted-extras/qscintilla/gen_qsciscintilla.go @@ -240,52 +240,34 @@ func (this *QsciScintilla) UnsafePointer() unsafe.Pointer { } // newQsciScintilla constructs the type using only CGO pointers. -func newQsciScintilla(h *C.QsciScintilla, h_QsciScintillaBase *C.QsciScintillaBase, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QsciScintilla { +func newQsciScintilla(h *C.QsciScintilla) *QsciScintilla { if h == nil { return nil } + var outptr_QsciScintillaBase *C.QsciScintillaBase = nil + C.QsciScintilla_virtbase(h, &outptr_QsciScintillaBase) + return &QsciScintilla{h: h, - QsciScintillaBase: newQsciScintillaBase(h_QsciScintillaBase, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QsciScintillaBase: newQsciScintillaBase(outptr_QsciScintillaBase)} } // UnsafeNewQsciScintilla constructs the type using only unsafe pointers. -func UnsafeNewQsciScintilla(h unsafe.Pointer, h_QsciScintillaBase unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QsciScintilla { - if h == nil { - return nil - } - - return &QsciScintilla{h: (*C.QsciScintilla)(h), - QsciScintillaBase: UnsafeNewQsciScintillaBase(h_QsciScintillaBase, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQsciScintilla(h unsafe.Pointer) *QsciScintilla { + return newQsciScintilla((*C.QsciScintilla)(h)) } // NewQsciScintilla constructs a new QsciScintilla object. func NewQsciScintilla(parent *qt.QWidget) *QsciScintilla { - var outptr_QsciScintilla *C.QsciScintilla = nil - var outptr_QsciScintillaBase *C.QsciScintillaBase = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QsciScintilla_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QsciScintilla, &outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQsciScintilla(outptr_QsciScintilla, outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQsciScintilla(C.QsciScintilla_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQsciScintilla2 constructs a new QsciScintilla object. func NewQsciScintilla2() *QsciScintilla { - var outptr_QsciScintilla *C.QsciScintilla = nil - var outptr_QsciScintillaBase *C.QsciScintillaBase = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QsciScintilla_new2(&outptr_QsciScintilla, &outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQsciScintilla(outptr_QsciScintilla, outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQsciScintilla(C.QsciScintilla_new2()) ret.isSubclass = true return ret } @@ -474,7 +456,7 @@ func (this *QsciScintilla) ConvertEols(mode QsciScintilla__EolMode) { } func (this *QsciScintilla) CreateStandardContextMenu() *qt.QMenu { - return qt.UnsafeNewQMenu(unsafe.Pointer(C.QsciScintilla_CreateStandardContextMenu(this.h)), nil, nil, nil) + return qt.UnsafeNewQMenu(unsafe.Pointer(C.QsciScintilla_CreateStandardContextMenu(this.h))) } func (this *QsciScintilla) Document() *QsciDocument { @@ -646,7 +628,7 @@ func (this *QsciScintilla) Length() int { } func (this *QsciScintilla) Lexer() *QsciLexer { - return newQsciLexer(C.QsciScintilla_Lexer(this.h), nil) + return newQsciLexer(C.QsciScintilla_Lexer(this.h)) } func (this *QsciScintilla) MarginBackgroundColor(margin int) *qt.QColor { @@ -3380,7 +3362,7 @@ func miqt_exec_callback_QsciScintilla_SetLexer(self *C.QsciScintilla, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQsciLexer(lexer, nil) + slotval1 := newQsciLexer(lexer) gofunc((&QsciScintilla{h: self}).callVirtualBase_SetLexer, slotval1) @@ -4183,7 +4165,7 @@ func miqt_exec_callback_QsciScintilla_ContextMenuEvent(self *C.QsciScintilla, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -4209,7 +4191,7 @@ func miqt_exec_callback_QsciScintilla_WheelEvent(self *C.QsciScintilla, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -4235,7 +4217,7 @@ func miqt_exec_callback_QsciScintilla_CanInsertFromMimeData(self *C.QsciScintill } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(source)) virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) @@ -4265,7 +4247,7 @@ func miqt_exec_callback_QsciScintilla_FromMimeData(self *C.QsciScintilla, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(source)) slotval2 := (*bool)(unsafe.Pointer(rectangular)) @@ -4283,7 +4265,7 @@ func (this *QsciScintilla) callVirtualBase_ToMimeData(text []byte, rectangular b text_alias.data = (*C.char)(unsafe.Pointer(&text[0])) text_alias.len = C.size_t(len(text)) - return qt.UnsafeNewQMimeData(unsafe.Pointer(C.QsciScintilla_virtualbase_ToMimeData(unsafe.Pointer(this.h), text_alias, (C.bool)(rectangular))), nil) + return qt.UnsafeNewQMimeData(unsafe.Pointer(C.QsciScintilla_virtualbase_ToMimeData(unsafe.Pointer(this.h), text_alias, (C.bool)(rectangular)))) } func (this *QsciScintilla) OnToMimeData(slot func(super func(text []byte, rectangular bool) *qt.QMimeData, text []byte, rectangular bool) *qt.QMimeData) { @@ -4333,7 +4315,7 @@ func miqt_exec_callback_QsciScintilla_DragEnterEvent(self *C.QsciScintilla, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -4359,7 +4341,7 @@ func miqt_exec_callback_QsciScintilla_DragLeaveEvent(self *C.QsciScintilla, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -4385,7 +4367,7 @@ func miqt_exec_callback_QsciScintilla_DragMoveEvent(self *C.QsciScintilla, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -4411,7 +4393,7 @@ func miqt_exec_callback_QsciScintilla_DropEvent(self *C.QsciScintilla, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_DropEvent, slotval1) @@ -4437,7 +4419,7 @@ func miqt_exec_callback_QsciScintilla_FocusInEvent(self *C.QsciScintilla, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -4463,7 +4445,7 @@ func miqt_exec_callback_QsciScintilla_FocusOutEvent(self *C.QsciScintilla, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -4517,7 +4499,7 @@ func miqt_exec_callback_QsciScintilla_KeyPressEvent(self *C.QsciScintilla, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -4543,7 +4525,7 @@ func miqt_exec_callback_QsciScintilla_InputMethodEvent(self *C.QsciScintilla, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(event)) gofunc((&QsciScintilla{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -4599,7 +4581,7 @@ func miqt_exec_callback_QsciScintilla_MouseDoubleClickEvent(self *C.QsciScintill } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -4625,7 +4607,7 @@ func miqt_exec_callback_QsciScintilla_MouseMoveEvent(self *C.QsciScintilla, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -4651,7 +4633,7 @@ func miqt_exec_callback_QsciScintilla_MousePressEvent(self *C.QsciScintilla, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -4677,7 +4659,7 @@ func miqt_exec_callback_QsciScintilla_MouseReleaseEvent(self *C.QsciScintilla, c } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -4703,7 +4685,7 @@ func miqt_exec_callback_QsciScintilla_PaintEvent(self *C.QsciScintilla, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -4729,7 +4711,7 @@ func miqt_exec_callback_QsciScintilla_ResizeEvent(self *C.QsciScintilla, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_ResizeEvent, slotval1) diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintilla.h b/qt-restricted-extras/qscintilla/gen_qsciscintilla.h index f390e0d3..7f69de93 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciscintilla.h +++ b/qt-restricted-extras/qscintilla/gen_qsciscintilla.h @@ -88,8 +88,9 @@ typedef struct QsciStyle QsciStyle; typedef struct QsciStyledText QsciStyledText; #endif -void QsciScintilla_new(QWidget* parent, QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QsciScintilla_new2(QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QsciScintilla* QsciScintilla_new(QWidget* parent); +QsciScintilla* QsciScintilla_new2(); +void QsciScintilla_virtbase(QsciScintilla* src, QsciScintillaBase** outptr_QsciScintillaBase); QMetaObject* QsciScintilla_MetaObject(const QsciScintilla* self); void* QsciScintilla_Metacast(QsciScintilla* self, const char* param1); struct miqt_string QsciScintilla_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.cpp b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.cpp index dee7efe4..b4abd3ff 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.cpp +++ b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.cpp @@ -768,24 +768,16 @@ public: }; -void QsciScintillaBase_new(QWidget* parent, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQsciScintillaBase* ret = new MiqtVirtualQsciScintillaBase(parent); - *outptr_QsciScintillaBase = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QsciScintillaBase* QsciScintillaBase_new(QWidget* parent) { + return new MiqtVirtualQsciScintillaBase(parent); } -void QsciScintillaBase_new2(QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQsciScintillaBase* ret = new MiqtVirtualQsciScintillaBase(); - *outptr_QsciScintillaBase = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QsciScintillaBase* QsciScintillaBase_new2() { + return new MiqtVirtualQsciScintillaBase(); +} + +void QsciScintillaBase_virtbase(QsciScintillaBase* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); } QMetaObject* QsciScintillaBase_MetaObject(const QsciScintillaBase* self) { diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.go b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.go index 792bb9ba..92dd112a 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.go +++ b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.go @@ -1207,50 +1207,34 @@ func (this *QsciScintillaBase) UnsafePointer() unsafe.Pointer { } // newQsciScintillaBase constructs the type using only CGO pointers. -func newQsciScintillaBase(h *C.QsciScintillaBase, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QsciScintillaBase { +func newQsciScintillaBase(h *C.QsciScintillaBase) *QsciScintillaBase { if h == nil { return nil } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QsciScintillaBase_virtbase(h, &outptr_QAbstractScrollArea) + return &QsciScintillaBase{h: h, - QAbstractScrollArea: qt.UnsafeNewQAbstractScrollArea(unsafe.Pointer(h_QAbstractScrollArea), unsafe.Pointer(h_QFrame), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QAbstractScrollArea: qt.UnsafeNewQAbstractScrollArea(unsafe.Pointer(outptr_QAbstractScrollArea))} } // UnsafeNewQsciScintillaBase constructs the type using only unsafe pointers. -func UnsafeNewQsciScintillaBase(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QsciScintillaBase { - if h == nil { - return nil - } - - return &QsciScintillaBase{h: (*C.QsciScintillaBase)(h), - QAbstractScrollArea: qt.UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQsciScintillaBase(h unsafe.Pointer) *QsciScintillaBase { + return newQsciScintillaBase((*C.QsciScintillaBase)(h)) } // NewQsciScintillaBase constructs a new QsciScintillaBase object. func NewQsciScintillaBase(parent *qt.QWidget) *QsciScintillaBase { - var outptr_QsciScintillaBase *C.QsciScintillaBase = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QsciScintillaBase_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQsciScintillaBase(outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQsciScintillaBase(C.QsciScintillaBase_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQsciScintillaBase2 constructs a new QsciScintillaBase object. func NewQsciScintillaBase2() *QsciScintillaBase { - var outptr_QsciScintillaBase *C.QsciScintillaBase = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QsciScintillaBase_new2(&outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQsciScintillaBase(outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQsciScintillaBase(C.QsciScintillaBase_new2()) ret.isSubclass = true return ret } @@ -1284,7 +1268,7 @@ func QsciScintillaBase_TrUtf8(s string) string { } func QsciScintillaBase_Pool() *QsciScintillaBase { - return newQsciScintillaBase(C.QsciScintillaBase_Pool(), nil, nil, nil, nil, nil) + return newQsciScintillaBase(C.QsciScintillaBase_Pool()) } func (this *QsciScintillaBase) ReplaceHorizontalScrollBar(scrollBar *qt.QScrollBar) { @@ -2239,7 +2223,7 @@ func miqt_exec_callback_QsciScintillaBase_CanInsertFromMimeData(self *C.QsciScin } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(source)) virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) @@ -2269,7 +2253,7 @@ func miqt_exec_callback_QsciScintillaBase_FromMimeData(self *C.QsciScintillaBase } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + slotval1 := qt.UnsafeNewQMimeData(unsafe.Pointer(source)) slotval2 := (*bool)(unsafe.Pointer(rectangular)) @@ -2287,7 +2271,7 @@ func (this *QsciScintillaBase) callVirtualBase_ToMimeData(text []byte, rectangul text_alias.data = (*C.char)(unsafe.Pointer(&text[0])) text_alias.len = C.size_t(len(text)) - return qt.UnsafeNewQMimeData(unsafe.Pointer(C.QsciScintillaBase_virtualbase_ToMimeData(unsafe.Pointer(this.h), text_alias, (C.bool)(rectangular))), nil) + return qt.UnsafeNewQMimeData(unsafe.Pointer(C.QsciScintillaBase_virtualbase_ToMimeData(unsafe.Pointer(this.h), text_alias, (C.bool)(rectangular)))) } func (this *QsciScintillaBase) OnToMimeData(slot func(super func(text []byte, rectangular bool) *qt.QMimeData, text []byte, rectangular bool) *qt.QMimeData) { @@ -2363,7 +2347,7 @@ func miqt_exec_callback_QsciScintillaBase_ContextMenuEvent(self *C.QsciScintilla } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -2389,7 +2373,7 @@ func miqt_exec_callback_QsciScintillaBase_DragEnterEvent(self *C.QsciScintillaBa } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -2415,7 +2399,7 @@ func miqt_exec_callback_QsciScintillaBase_DragLeaveEvent(self *C.QsciScintillaBa } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -2441,7 +2425,7 @@ func miqt_exec_callback_QsciScintillaBase_DragMoveEvent(self *C.QsciScintillaBas } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -2467,7 +2451,7 @@ func miqt_exec_callback_QsciScintillaBase_DropEvent(self *C.QsciScintillaBase, c } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DropEvent, slotval1) @@ -2493,7 +2477,7 @@ func miqt_exec_callback_QsciScintillaBase_FocusInEvent(self *C.QsciScintillaBase } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -2519,7 +2503,7 @@ func miqt_exec_callback_QsciScintillaBase_FocusOutEvent(self *C.QsciScintillaBas } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -2573,7 +2557,7 @@ func miqt_exec_callback_QsciScintillaBase_KeyPressEvent(self *C.QsciScintillaBas } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -2599,7 +2583,7 @@ func miqt_exec_callback_QsciScintillaBase_InputMethodEvent(self *C.QsciScintilla } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(event)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -2655,7 +2639,7 @@ func miqt_exec_callback_QsciScintillaBase_MouseDoubleClickEvent(self *C.QsciScin } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -2681,7 +2665,7 @@ func miqt_exec_callback_QsciScintillaBase_MouseMoveEvent(self *C.QsciScintillaBa } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -2707,7 +2691,7 @@ func miqt_exec_callback_QsciScintillaBase_MousePressEvent(self *C.QsciScintillaB } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -2733,7 +2717,7 @@ func miqt_exec_callback_QsciScintillaBase_MouseReleaseEvent(self *C.QsciScintill } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -2759,7 +2743,7 @@ func miqt_exec_callback_QsciScintillaBase_PaintEvent(self *C.QsciScintillaBase, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -2785,7 +2769,7 @@ func miqt_exec_callback_QsciScintillaBase_ResizeEvent(self *C.QsciScintillaBase, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -2893,7 +2877,7 @@ func miqt_exec_callback_QsciScintillaBase_SetupViewport(self *C.QsciScintillaBas } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) + slotval1 := qt.UnsafeNewQWidget(unsafe.Pointer(viewport)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -3005,7 +2989,7 @@ func miqt_exec_callback_QsciScintillaBase_WheelEvent(self *C.QsciScintillaBase, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(param1)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_WheelEvent, slotval1) diff --git a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.h b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.h index 6cded339..3a0af0e2 100644 --- a/qt-restricted-extras/qscintilla/gen_qsciscintillabase.h +++ b/qt-restricted-extras/qscintilla/gen_qsciscintillabase.h @@ -78,8 +78,9 @@ typedef struct QWidget QWidget; typedef struct QsciScintillaBase QsciScintillaBase; #endif -void QsciScintillaBase_new(QWidget* parent, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QsciScintillaBase_new2(QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QsciScintillaBase* QsciScintillaBase_new(QWidget* parent); +QsciScintillaBase* QsciScintillaBase_new2(); +void QsciScintillaBase_virtbase(QsciScintillaBase* src, QAbstractScrollArea** outptr_QAbstractScrollArea); QMetaObject* QsciScintillaBase_MetaObject(const QsciScintillaBase* self); void* QsciScintillaBase_Metacast(QsciScintillaBase* self, const char* param1); struct miqt_string QsciScintillaBase_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla/gen_qscistyle.cpp b/qt-restricted-extras/qscintilla/gen_qscistyle.cpp index 629e0cf9..d768b5d2 100644 --- a/qt-restricted-extras/qscintilla/gen_qscistyle.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscistyle.cpp @@ -7,31 +7,26 @@ #include "gen_qscistyle.h" #include "_cgo_export.h" -void QsciStyle_new(QsciStyle** outptr_QsciStyle) { - QsciStyle* ret = new QsciStyle(); - *outptr_QsciStyle = ret; +QsciStyle* QsciStyle_new() { + return new QsciStyle(); } -void QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, QsciStyle** outptr_QsciStyle) { +QsciStyle* QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font) { QString description_QString = QString::fromUtf8(description.data, description.len); - QsciStyle* ret = new QsciStyle(static_cast(style), description_QString, *color, *paper, *font); - *outptr_QsciStyle = ret; + return new QsciStyle(static_cast(style), description_QString, *color, *paper, *font); } -void QsciStyle_new3(QsciStyle* param1, QsciStyle** outptr_QsciStyle) { - QsciStyle* ret = new QsciStyle(*param1); - *outptr_QsciStyle = ret; +QsciStyle* QsciStyle_new3(QsciStyle* param1) { + return new QsciStyle(*param1); } -void QsciStyle_new4(int style, QsciStyle** outptr_QsciStyle) { - QsciStyle* ret = new QsciStyle(static_cast(style)); - *outptr_QsciStyle = ret; +QsciStyle* QsciStyle_new4(int style) { + return new QsciStyle(static_cast(style)); } -void QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill, QsciStyle** outptr_QsciStyle) { +QsciStyle* QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill) { QString description_QString = QString::fromUtf8(description.data, description.len); - QsciStyle* ret = new QsciStyle(static_cast(style), description_QString, *color, *paper, *font, eolFill); - *outptr_QsciStyle = ret; + return new QsciStyle(static_cast(style), description_QString, *color, *paper, *font, eolFill); } void QsciStyle_Apply(const QsciStyle* self, QsciScintillaBase* sci) { diff --git a/qt-restricted-extras/qscintilla/gen_qscistyle.go b/qt-restricted-extras/qscintilla/gen_qscistyle.go index e8c85783..05f169e4 100644 --- a/qt-restricted-extras/qscintilla/gen_qscistyle.go +++ b/qt-restricted-extras/qscintilla/gen_qscistyle.go @@ -46,24 +46,19 @@ func newQsciStyle(h *C.QsciStyle) *QsciStyle { if h == nil { return nil } + return &QsciStyle{h: h} } // UnsafeNewQsciStyle constructs the type using only unsafe pointers. func UnsafeNewQsciStyle(h unsafe.Pointer) *QsciStyle { - if h == nil { - return nil - } - - return &QsciStyle{h: (*C.QsciStyle)(h)} + return newQsciStyle((*C.QsciStyle)(h)) } // NewQsciStyle constructs a new QsciStyle object. func NewQsciStyle() *QsciStyle { - var outptr_QsciStyle *C.QsciStyle = nil - C.QsciStyle_new(&outptr_QsciStyle) - ret := newQsciStyle(outptr_QsciStyle) + ret := newQsciStyle(C.QsciStyle_new()) ret.isSubclass = true return ret } @@ -74,30 +69,24 @@ func NewQsciStyle2(style int, description string, color *qt.QColor, paper *qt.QC description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - var outptr_QsciStyle *C.QsciStyle = nil - C.QsciStyle_new2((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer()), &outptr_QsciStyle) - ret := newQsciStyle(outptr_QsciStyle) + ret := newQsciStyle(C.QsciStyle_new2((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer()))) ret.isSubclass = true return ret } // NewQsciStyle3 constructs a new QsciStyle object. func NewQsciStyle3(param1 *QsciStyle) *QsciStyle { - var outptr_QsciStyle *C.QsciStyle = nil - C.QsciStyle_new3(param1.cPointer(), &outptr_QsciStyle) - ret := newQsciStyle(outptr_QsciStyle) + ret := newQsciStyle(C.QsciStyle_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQsciStyle4 constructs a new QsciStyle object. func NewQsciStyle4(style int) *QsciStyle { - var outptr_QsciStyle *C.QsciStyle = nil - C.QsciStyle_new4((C.int)(style), &outptr_QsciStyle) - ret := newQsciStyle(outptr_QsciStyle) + ret := newQsciStyle(C.QsciStyle_new4((C.int)(style))) ret.isSubclass = true return ret } @@ -108,10 +97,8 @@ func NewQsciStyle5(style int, description string, color *qt.QColor, paper *qt.QC description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - var outptr_QsciStyle *C.QsciStyle = nil - C.QsciStyle_new5((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer()), (C.bool)(eolFill), &outptr_QsciStyle) - ret := newQsciStyle(outptr_QsciStyle) + ret := newQsciStyle(C.QsciStyle_new5((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer()), (C.bool)(eolFill))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla/gen_qscistyle.h b/qt-restricted-extras/qscintilla/gen_qscistyle.h index 52064603..9ca6d310 100644 --- a/qt-restricted-extras/qscintilla/gen_qscistyle.h +++ b/qt-restricted-extras/qscintilla/gen_qscistyle.h @@ -26,11 +26,11 @@ typedef struct QsciScintillaBase QsciScintillaBase; typedef struct QsciStyle QsciStyle; #endif -void QsciStyle_new(QsciStyle** outptr_QsciStyle); -void QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, QsciStyle** outptr_QsciStyle); -void QsciStyle_new3(QsciStyle* param1, QsciStyle** outptr_QsciStyle); -void QsciStyle_new4(int style, QsciStyle** outptr_QsciStyle); -void QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill, QsciStyle** outptr_QsciStyle); +QsciStyle* QsciStyle_new(); +QsciStyle* QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font); +QsciStyle* QsciStyle_new3(QsciStyle* param1); +QsciStyle* QsciStyle_new4(int style); +QsciStyle* QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill); void QsciStyle_Apply(const QsciStyle* self, QsciScintillaBase* sci); void QsciStyle_SetStyle(QsciStyle* self, int style); int QsciStyle_Style(const QsciStyle* self); diff --git a/qt-restricted-extras/qscintilla/gen_qscistyledtext.cpp b/qt-restricted-extras/qscintilla/gen_qscistyledtext.cpp index ff148966..75ac117f 100644 --- a/qt-restricted-extras/qscintilla/gen_qscistyledtext.cpp +++ b/qt-restricted-extras/qscintilla/gen_qscistyledtext.cpp @@ -5,21 +5,18 @@ #include "gen_qscistyledtext.h" #include "_cgo_export.h" -void QsciStyledText_new(struct miqt_string text, int style, QsciStyledText** outptr_QsciStyledText) { +QsciStyledText* QsciStyledText_new(struct miqt_string text, int style) { QString text_QString = QString::fromUtf8(text.data, text.len); - QsciStyledText* ret = new QsciStyledText(text_QString, static_cast(style)); - *outptr_QsciStyledText = ret; + return new QsciStyledText(text_QString, static_cast(style)); } -void QsciStyledText_new2(struct miqt_string text, QsciStyle* style, QsciStyledText** outptr_QsciStyledText) { +QsciStyledText* QsciStyledText_new2(struct miqt_string text, QsciStyle* style) { QString text_QString = QString::fromUtf8(text.data, text.len); - QsciStyledText* ret = new QsciStyledText(text_QString, *style); - *outptr_QsciStyledText = ret; + return new QsciStyledText(text_QString, *style); } -void QsciStyledText_new3(QsciStyledText* param1, QsciStyledText** outptr_QsciStyledText) { - QsciStyledText* ret = new QsciStyledText(*param1); - *outptr_QsciStyledText = ret; +QsciStyledText* QsciStyledText_new3(QsciStyledText* param1) { + return new QsciStyledText(*param1); } void QsciStyledText_Apply(const QsciStyledText* self, QsciScintillaBase* sci) { diff --git a/qt-restricted-extras/qscintilla/gen_qscistyledtext.go b/qt-restricted-extras/qscintilla/gen_qscistyledtext.go index d1ca4b9c..c0eea240 100644 --- a/qt-restricted-extras/qscintilla/gen_qscistyledtext.go +++ b/qt-restricted-extras/qscintilla/gen_qscistyledtext.go @@ -37,16 +37,13 @@ func newQsciStyledText(h *C.QsciStyledText) *QsciStyledText { if h == nil { return nil } + return &QsciStyledText{h: h} } // UnsafeNewQsciStyledText constructs the type using only unsafe pointers. func UnsafeNewQsciStyledText(h unsafe.Pointer) *QsciStyledText { - if h == nil { - return nil - } - - return &QsciStyledText{h: (*C.QsciStyledText)(h)} + return newQsciStyledText((*C.QsciStyledText)(h)) } // NewQsciStyledText constructs a new QsciStyledText object. @@ -55,10 +52,8 @@ func NewQsciStyledText(text string, style int) *QsciStyledText { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QsciStyledText *C.QsciStyledText = nil - C.QsciStyledText_new(text_ms, (C.int)(style), &outptr_QsciStyledText) - ret := newQsciStyledText(outptr_QsciStyledText) + ret := newQsciStyledText(C.QsciStyledText_new(text_ms, (C.int)(style))) ret.isSubclass = true return ret } @@ -69,20 +64,16 @@ func NewQsciStyledText2(text string, style *QsciStyle) *QsciStyledText { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QsciStyledText *C.QsciStyledText = nil - C.QsciStyledText_new2(text_ms, style.cPointer(), &outptr_QsciStyledText) - ret := newQsciStyledText(outptr_QsciStyledText) + ret := newQsciStyledText(C.QsciStyledText_new2(text_ms, style.cPointer())) ret.isSubclass = true return ret } // NewQsciStyledText3 constructs a new QsciStyledText object. func NewQsciStyledText3(param1 *QsciStyledText) *QsciStyledText { - var outptr_QsciStyledText *C.QsciStyledText = nil - C.QsciStyledText_new3(param1.cPointer(), &outptr_QsciStyledText) - ret := newQsciStyledText(outptr_QsciStyledText) + ret := newQsciStyledText(C.QsciStyledText_new3(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla/gen_qscistyledtext.h b/qt-restricted-extras/qscintilla/gen_qscistyledtext.h index e534ea0e..c5aa47f2 100644 --- a/qt-restricted-extras/qscintilla/gen_qscistyledtext.h +++ b/qt-restricted-extras/qscintilla/gen_qscistyledtext.h @@ -24,9 +24,9 @@ typedef struct QsciStyle QsciStyle; typedef struct QsciStyledText QsciStyledText; #endif -void QsciStyledText_new(struct miqt_string text, int style, QsciStyledText** outptr_QsciStyledText); -void QsciStyledText_new2(struct miqt_string text, QsciStyle* style, QsciStyledText** outptr_QsciStyledText); -void QsciStyledText_new3(QsciStyledText* param1, QsciStyledText** outptr_QsciStyledText); +QsciStyledText* QsciStyledText_new(struct miqt_string text, int style); +QsciStyledText* QsciStyledText_new2(struct miqt_string text, QsciStyle* style); +QsciStyledText* QsciStyledText_new3(QsciStyledText* param1); void QsciStyledText_Apply(const QsciStyledText* self, QsciScintillaBase* sci); struct miqt_string QsciStyledText_Text(const QsciStyledText* self); int QsciStyledText_Style(const QsciStyledText* self); diff --git a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.cpp b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.cpp index 489fd0b5..8e98638d 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.cpp @@ -325,10 +325,12 @@ public: }; -void QsciAbstractAPIs_new(QsciLexer* lexer, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject) { - MiqtVirtualQsciAbstractAPIs* ret = new MiqtVirtualQsciAbstractAPIs(lexer); - *outptr_QsciAbstractAPIs = ret; - *outptr_QObject = static_cast(ret); +QsciAbstractAPIs* QsciAbstractAPIs_new(QsciLexer* lexer) { + return new MiqtVirtualQsciAbstractAPIs(lexer); +} + +void QsciAbstractAPIs_virtbase(QsciAbstractAPIs* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QsciAbstractAPIs_MetaObject(const QsciAbstractAPIs* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.go b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.go index 4565a961..f1edc7cd 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.go +++ b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.go @@ -36,31 +36,26 @@ func (this *QsciAbstractAPIs) UnsafePointer() unsafe.Pointer { } // newQsciAbstractAPIs constructs the type using only CGO pointers. -func newQsciAbstractAPIs(h *C.QsciAbstractAPIs, h_QObject *C.QObject) *QsciAbstractAPIs { +func newQsciAbstractAPIs(h *C.QsciAbstractAPIs) *QsciAbstractAPIs { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QsciAbstractAPIs_virtbase(h, &outptr_QObject) + return &QsciAbstractAPIs{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQsciAbstractAPIs constructs the type using only unsafe pointers. -func UnsafeNewQsciAbstractAPIs(h unsafe.Pointer, h_QObject unsafe.Pointer) *QsciAbstractAPIs { - if h == nil { - return nil - } - - return &QsciAbstractAPIs{h: (*C.QsciAbstractAPIs)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQsciAbstractAPIs(h unsafe.Pointer) *QsciAbstractAPIs { + return newQsciAbstractAPIs((*C.QsciAbstractAPIs)(h)) } // NewQsciAbstractAPIs constructs a new QsciAbstractAPIs object. func NewQsciAbstractAPIs(lexer *QsciLexer) *QsciAbstractAPIs { - var outptr_QsciAbstractAPIs *C.QsciAbstractAPIs = nil - var outptr_QObject *C.QObject = nil - C.QsciAbstractAPIs_new(lexer.cPointer(), &outptr_QsciAbstractAPIs, &outptr_QObject) - ret := newQsciAbstractAPIs(outptr_QsciAbstractAPIs, outptr_QObject) + ret := newQsciAbstractAPIs(C.QsciAbstractAPIs_new(lexer.cPointer())) ret.isSubclass = true return ret } @@ -85,7 +80,7 @@ func QsciAbstractAPIs_Tr(s string) string { } func (this *QsciAbstractAPIs) Lexer() *QsciLexer { - return newQsciLexer(C.QsciAbstractAPIs_Lexer(this.h), nil) + return newQsciLexer(C.QsciAbstractAPIs_Lexer(this.h)) } func (this *QsciAbstractAPIs) UpdateAutoCompletionList(context []string, list []string) { @@ -375,7 +370,7 @@ func miqt_exec_callback_QsciAbstractAPIs_TimerEvent(self *C.QsciAbstractAPIs, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QsciAbstractAPIs{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -401,7 +396,7 @@ func miqt_exec_callback_QsciAbstractAPIs_ChildEvent(self *C.QsciAbstractAPIs, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QsciAbstractAPIs{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.h b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.h index 2167818f..d2bad2bf 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.h +++ b/qt-restricted-extras/qscintilla6/gen_qsciabstractapis.h @@ -34,7 +34,8 @@ typedef struct QsciAbstractAPIs QsciAbstractAPIs; typedef struct QsciLexer QsciLexer; #endif -void QsciAbstractAPIs_new(QsciLexer* lexer, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject); +QsciAbstractAPIs* QsciAbstractAPIs_new(QsciLexer* lexer); +void QsciAbstractAPIs_virtbase(QsciAbstractAPIs* src, QObject** outptr_QObject); QMetaObject* QsciAbstractAPIs_MetaObject(const QsciAbstractAPIs* self); void* QsciAbstractAPIs_Metacast(QsciAbstractAPIs* self, const char* param1); struct miqt_string QsciAbstractAPIs_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qsciapis.cpp b/qt-restricted-extras/qscintilla6/gen_qsciapis.cpp index 5737de0a..ad9f68eb 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciapis.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qsciapis.cpp @@ -232,11 +232,12 @@ public: }; -void QsciAPIs_new(QsciLexer* lexer, QsciAPIs** outptr_QsciAPIs, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject) { - MiqtVirtualQsciAPIs* ret = new MiqtVirtualQsciAPIs(lexer); - *outptr_QsciAPIs = ret; - *outptr_QsciAbstractAPIs = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciAPIs* QsciAPIs_new(QsciLexer* lexer) { + return new MiqtVirtualQsciAPIs(lexer); +} + +void QsciAPIs_virtbase(QsciAPIs* src, QsciAbstractAPIs** outptr_QsciAbstractAPIs) { + *outptr_QsciAbstractAPIs = static_cast(src); } QMetaObject* QsciAPIs_MetaObject(const QsciAPIs* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qsciapis.go b/qt-restricted-extras/qscintilla6/gen_qsciapis.go index 96a6abeb..aaf6544f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciapis.go +++ b/qt-restricted-extras/qscintilla6/gen_qsciapis.go @@ -36,32 +36,26 @@ func (this *QsciAPIs) UnsafePointer() unsafe.Pointer { } // newQsciAPIs constructs the type using only CGO pointers. -func newQsciAPIs(h *C.QsciAPIs, h_QsciAbstractAPIs *C.QsciAbstractAPIs, h_QObject *C.QObject) *QsciAPIs { +func newQsciAPIs(h *C.QsciAPIs) *QsciAPIs { if h == nil { return nil } + var outptr_QsciAbstractAPIs *C.QsciAbstractAPIs = nil + C.QsciAPIs_virtbase(h, &outptr_QsciAbstractAPIs) + return &QsciAPIs{h: h, - QsciAbstractAPIs: newQsciAbstractAPIs(h_QsciAbstractAPIs, h_QObject)} + QsciAbstractAPIs: newQsciAbstractAPIs(outptr_QsciAbstractAPIs)} } // UnsafeNewQsciAPIs constructs the type using only unsafe pointers. -func UnsafeNewQsciAPIs(h unsafe.Pointer, h_QsciAbstractAPIs unsafe.Pointer, h_QObject unsafe.Pointer) *QsciAPIs { - if h == nil { - return nil - } - - return &QsciAPIs{h: (*C.QsciAPIs)(h), - QsciAbstractAPIs: UnsafeNewQsciAbstractAPIs(h_QsciAbstractAPIs, h_QObject)} +func UnsafeNewQsciAPIs(h unsafe.Pointer) *QsciAPIs { + return newQsciAPIs((*C.QsciAPIs)(h)) } // NewQsciAPIs constructs a new QsciAPIs object. func NewQsciAPIs(lexer *QsciLexer) *QsciAPIs { - var outptr_QsciAPIs *C.QsciAPIs = nil - var outptr_QsciAbstractAPIs *C.QsciAbstractAPIs = nil - var outptr_QObject *C.QObject = nil - C.QsciAPIs_new(lexer.cPointer(), &outptr_QsciAPIs, &outptr_QsciAbstractAPIs, &outptr_QObject) - ret := newQsciAPIs(outptr_QsciAPIs, outptr_QsciAbstractAPIs, outptr_QObject) + ret := newQsciAPIs(C.QsciAPIs_new(lexer.cPointer())) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla6/gen_qsciapis.h b/qt-restricted-extras/qscintilla6/gen_qsciapis.h index 0c6639d7..ed0e764e 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciapis.h +++ b/qt-restricted-extras/qscintilla6/gen_qsciapis.h @@ -30,7 +30,8 @@ typedef struct QsciAbstractAPIs QsciAbstractAPIs; typedef struct QsciLexer QsciLexer; #endif -void QsciAPIs_new(QsciLexer* lexer, QsciAPIs** outptr_QsciAPIs, QsciAbstractAPIs** outptr_QsciAbstractAPIs, QObject** outptr_QObject); +QsciAPIs* QsciAPIs_new(QsciLexer* lexer); +void QsciAPIs_virtbase(QsciAPIs* src, QsciAbstractAPIs** outptr_QsciAbstractAPIs); QMetaObject* QsciAPIs_MetaObject(const QsciAPIs* self); void* QsciAPIs_Metacast(QsciAPIs* self, const char* param1); struct miqt_string QsciAPIs_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscicommand.go b/qt-restricted-extras/qscintilla6/gen_qscicommand.go index 724f6f01..51ce91a1 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscicommand.go +++ b/qt-restricted-extras/qscintilla6/gen_qscicommand.go @@ -141,16 +141,13 @@ func newQsciCommand(h *C.QsciCommand) *QsciCommand { if h == nil { return nil } + return &QsciCommand{h: h} } // UnsafeNewQsciCommand constructs the type using only unsafe pointers. func UnsafeNewQsciCommand(h unsafe.Pointer) *QsciCommand { - if h == nil { - return nil - } - - return &QsciCommand{h: (*C.QsciCommand)(h)} + return newQsciCommand((*C.QsciCommand)(h)) } func (this *QsciCommand) Command() QsciCommand__Command { diff --git a/qt-restricted-extras/qscintilla6/gen_qscicommandset.go b/qt-restricted-extras/qscintilla6/gen_qscicommandset.go index b914da6b..66bb1e7f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscicommandset.go +++ b/qt-restricted-extras/qscintilla6/gen_qscicommandset.go @@ -37,16 +37,13 @@ func newQsciCommandSet(h *C.QsciCommandSet) *QsciCommandSet { if h == nil { return nil } + return &QsciCommandSet{h: h} } // UnsafeNewQsciCommandSet constructs the type using only unsafe pointers. func UnsafeNewQsciCommandSet(h unsafe.Pointer) *QsciCommandSet { - if h == nil { - return nil - } - - return &QsciCommandSet{h: (*C.QsciCommandSet)(h)} + return newQsciCommandSet((*C.QsciCommandSet)(h)) } func (this *QsciCommandSet) ReadSettings(qs *qt6.QSettings) bool { diff --git a/qt-restricted-extras/qscintilla6/gen_qscidocument.cpp b/qt-restricted-extras/qscintilla6/gen_qscidocument.cpp index cd7559c4..cd729348 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscidocument.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscidocument.cpp @@ -2,14 +2,12 @@ #include "gen_qscidocument.h" #include "_cgo_export.h" -void QsciDocument_new(QsciDocument** outptr_QsciDocument) { - QsciDocument* ret = new QsciDocument(); - *outptr_QsciDocument = ret; +QsciDocument* QsciDocument_new() { + return new QsciDocument(); } -void QsciDocument_new2(QsciDocument* param1, QsciDocument** outptr_QsciDocument) { - QsciDocument* ret = new QsciDocument(*param1); - *outptr_QsciDocument = ret; +QsciDocument* QsciDocument_new2(QsciDocument* param1) { + return new QsciDocument(*param1); } void QsciDocument_OperatorAssign(QsciDocument* self, QsciDocument* param1) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscidocument.go b/qt-restricted-extras/qscintilla6/gen_qscidocument.go index c40911d0..b6f99c71 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscidocument.go +++ b/qt-restricted-extras/qscintilla6/gen_qscidocument.go @@ -37,34 +37,27 @@ func newQsciDocument(h *C.QsciDocument) *QsciDocument { if h == nil { return nil } + return &QsciDocument{h: h} } // UnsafeNewQsciDocument constructs the type using only unsafe pointers. func UnsafeNewQsciDocument(h unsafe.Pointer) *QsciDocument { - if h == nil { - return nil - } - - return &QsciDocument{h: (*C.QsciDocument)(h)} + return newQsciDocument((*C.QsciDocument)(h)) } // NewQsciDocument constructs a new QsciDocument object. func NewQsciDocument() *QsciDocument { - var outptr_QsciDocument *C.QsciDocument = nil - C.QsciDocument_new(&outptr_QsciDocument) - ret := newQsciDocument(outptr_QsciDocument) + ret := newQsciDocument(C.QsciDocument_new()) ret.isSubclass = true return ret } // NewQsciDocument2 constructs a new QsciDocument object. func NewQsciDocument2(param1 *QsciDocument) *QsciDocument { - var outptr_QsciDocument *C.QsciDocument = nil - C.QsciDocument_new2(param1.cPointer(), &outptr_QsciDocument) - ret := newQsciDocument(outptr_QsciDocument) + ret := newQsciDocument(C.QsciDocument_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla6/gen_qscidocument.h b/qt-restricted-extras/qscintilla6/gen_qscidocument.h index f26d2e47..c309e910 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscidocument.h +++ b/qt-restricted-extras/qscintilla6/gen_qscidocument.h @@ -20,8 +20,8 @@ class QsciDocument; typedef struct QsciDocument QsciDocument; #endif -void QsciDocument_new(QsciDocument** outptr_QsciDocument); -void QsciDocument_new2(QsciDocument* param1, QsciDocument** outptr_QsciDocument); +QsciDocument* QsciDocument_new(); +QsciDocument* QsciDocument_new2(QsciDocument* param1); void QsciDocument_OperatorAssign(QsciDocument* self, QsciDocument* param1); void QsciDocument_Delete(QsciDocument* self, bool isSubclass); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexer.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexer.cpp index 815f1348..e73029f3 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexer.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexer.cpp @@ -1014,16 +1014,16 @@ public: }; -void QsciLexer_new(QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexer* ret = new MiqtVirtualQsciLexer(); - *outptr_QsciLexer = ret; - *outptr_QObject = static_cast(ret); +QsciLexer* QsciLexer_new() { + return new MiqtVirtualQsciLexer(); } -void QsciLexer_new2(QObject* parent, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexer* ret = new MiqtVirtualQsciLexer(parent); - *outptr_QsciLexer = ret; - *outptr_QObject = static_cast(ret); +QsciLexer* QsciLexer_new2(QObject* parent) { + return new MiqtVirtualQsciLexer(parent); +} + +void QsciLexer_virtbase(QsciLexer* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QsciLexer_MetaObject(const QsciLexer* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexer.go b/qt-restricted-extras/qscintilla6/gen_qscilexer.go index 27a5452b..0f50a2c7 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexer.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexer.go @@ -36,42 +36,34 @@ func (this *QsciLexer) UnsafePointer() unsafe.Pointer { } // newQsciLexer constructs the type using only CGO pointers. -func newQsciLexer(h *C.QsciLexer, h_QObject *C.QObject) *QsciLexer { +func newQsciLexer(h *C.QsciLexer) *QsciLexer { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QsciLexer_virtbase(h, &outptr_QObject) + return &QsciLexer{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQsciLexer constructs the type using only unsafe pointers. -func UnsafeNewQsciLexer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexer { - if h == nil { - return nil - } - - return &QsciLexer{h: (*C.QsciLexer)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQsciLexer(h unsafe.Pointer) *QsciLexer { + return newQsciLexer((*C.QsciLexer)(h)) } // NewQsciLexer constructs a new QsciLexer object. func NewQsciLexer() *QsciLexer { - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexer_new(&outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexer(outptr_QsciLexer, outptr_QObject) + ret := newQsciLexer(C.QsciLexer_new()) ret.isSubclass = true return ret } // NewQsciLexer2 constructs a new QsciLexer object. func NewQsciLexer2(parent *qt6.QObject) *QsciLexer { - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexer(outptr_QsciLexer, outptr_QObject) + ret := newQsciLexer(C.QsciLexer_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -110,7 +102,7 @@ func (this *QsciLexer) LexerId() int { } func (this *QsciLexer) Apis() *QsciAbstractAPIs { - return newQsciAbstractAPIs(C.QsciLexer_Apis(this.h), nil) + return newQsciAbstractAPIs(C.QsciLexer_Apis(this.h)) } func (this *QsciLexer) AutoCompletionFillups() string { @@ -245,7 +237,7 @@ func (this *QsciLexer) DefaultPaperWithStyle(style int) *qt6.QColor { } func (this *QsciLexer) Editor() *QsciScintilla { - return newQsciScintilla(C.QsciLexer_Editor(this.h), nil, nil, nil, nil, nil, nil) + return newQsciScintilla(C.QsciLexer_Editor(this.h)) } func (this *QsciLexer) SetAPIs(apis *QsciAbstractAPIs) { @@ -1136,7 +1128,7 @@ func miqt_exec_callback_QsciLexer_SetEditor(self *C.QsciLexer, cb C.intptr_t, ed } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexer{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1380,7 +1372,7 @@ func miqt_exec_callback_QsciLexer_ReadProperties(self *C.QsciLexer, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1417,7 +1409,7 @@ func miqt_exec_callback_QsciLexer_WriteProperties(self *C.QsciLexer, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1508,7 +1500,7 @@ func miqt_exec_callback_QsciLexer_TimerEvent(self *C.QsciLexer, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QsciLexer{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1534,7 +1526,7 @@ func miqt_exec_callback_QsciLexer_ChildEvent(self *C.QsciLexer, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QsciLexer{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexer.h b/qt-restricted-extras/qscintilla6/gen_qscilexer.h index c0f57f11..7f1beab4 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexer.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexer.h @@ -42,8 +42,9 @@ typedef struct QsciLexer QsciLexer; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexer_new(QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexer_new2(QObject* parent, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexer* QsciLexer_new(); +QsciLexer* QsciLexer_new2(QObject* parent); +void QsciLexer_virtbase(QsciLexer* src, QObject** outptr_QObject); QMetaObject* QsciLexer_MetaObject(const QsciLexer* self); void* QsciLexer_Metacast(QsciLexer* self, const char* param1); struct miqt_string QsciLexer_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeravs.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexeravs.cpp index 2bd98500..ed31dbd8 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeravs.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeravs.cpp @@ -887,18 +887,16 @@ public: }; -void QsciLexerAVS_new(QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerAVS* ret = new MiqtVirtualQsciLexerAVS(); - *outptr_QsciLexerAVS = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerAVS* QsciLexerAVS_new() { + return new MiqtVirtualQsciLexerAVS(); } -void QsciLexerAVS_new2(QObject* parent, QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerAVS* ret = new MiqtVirtualQsciLexerAVS(parent); - *outptr_QsciLexerAVS = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerAVS* QsciLexerAVS_new2(QObject* parent) { + return new MiqtVirtualQsciLexerAVS(parent); +} + +void QsciLexerAVS_virtbase(QsciLexerAVS* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerAVS_MetaObject(const QsciLexerAVS* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeravs.go b/qt-restricted-extras/qscintilla6/gen_qscilexeravs.go index 94f0c12a..ae925929 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeravs.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeravs.go @@ -56,44 +56,34 @@ func (this *QsciLexerAVS) UnsafePointer() unsafe.Pointer { } // newQsciLexerAVS constructs the type using only CGO pointers. -func newQsciLexerAVS(h *C.QsciLexerAVS, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerAVS { +func newQsciLexerAVS(h *C.QsciLexerAVS) *QsciLexerAVS { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerAVS_virtbase(h, &outptr_QsciLexer) + return &QsciLexerAVS{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerAVS constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerAVS(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerAVS { - if h == nil { - return nil - } - - return &QsciLexerAVS{h: (*C.QsciLexerAVS)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerAVS(h unsafe.Pointer) *QsciLexerAVS { + return newQsciLexerAVS((*C.QsciLexerAVS)(h)) } // NewQsciLexerAVS constructs a new QsciLexerAVS object. func NewQsciLexerAVS() *QsciLexerAVS { - var outptr_QsciLexerAVS *C.QsciLexerAVS = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerAVS_new(&outptr_QsciLexerAVS, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerAVS(outptr_QsciLexerAVS, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerAVS(C.QsciLexerAVS_new()) ret.isSubclass = true return ret } // NewQsciLexerAVS2 constructs a new QsciLexerAVS object. func NewQsciLexerAVS2(parent *qt6.QObject) *QsciLexerAVS { - var outptr_QsciLexerAVS *C.QsciLexerAVS = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerAVS_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerAVS, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerAVS(outptr_QsciLexerAVS, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerAVS(C.QsciLexerAVS_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -931,7 +921,7 @@ func miqt_exec_callback_QsciLexerAVS_SetEditor(self *C.QsciLexerAVS, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerAVS{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1175,7 +1165,7 @@ func miqt_exec_callback_QsciLexerAVS_ReadProperties(self *C.QsciLexerAVS, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1212,7 +1202,7 @@ func miqt_exec_callback_QsciLexerAVS_WriteProperties(self *C.QsciLexerAVS, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeravs.h b/qt-restricted-extras/qscintilla6/gen_qscilexeravs.h index 082bcdcf..02295fbf 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeravs.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeravs.h @@ -34,8 +34,9 @@ typedef struct QsciLexerAVS QsciLexerAVS; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerAVS_new(QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerAVS_new2(QObject* parent, QsciLexerAVS** outptr_QsciLexerAVS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerAVS* QsciLexerAVS_new(); +QsciLexerAVS* QsciLexerAVS_new2(QObject* parent); +void QsciLexerAVS_virtbase(QsciLexerAVS* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerAVS_MetaObject(const QsciLexerAVS* self); void* QsciLexerAVS_Metacast(QsciLexerAVS* self, const char* param1); struct miqt_string QsciLexerAVS_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerbash.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerbash.cpp index 9b3e19ff..fc92d989 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerbash.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerbash.cpp @@ -887,18 +887,16 @@ public: }; -void QsciLexerBash_new(QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerBash* ret = new MiqtVirtualQsciLexerBash(); - *outptr_QsciLexerBash = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerBash* QsciLexerBash_new() { + return new MiqtVirtualQsciLexerBash(); } -void QsciLexerBash_new2(QObject* parent, QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerBash* ret = new MiqtVirtualQsciLexerBash(parent); - *outptr_QsciLexerBash = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerBash* QsciLexerBash_new2(QObject* parent) { + return new MiqtVirtualQsciLexerBash(parent); +} + +void QsciLexerBash_virtbase(QsciLexerBash* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerBash_MetaObject(const QsciLexerBash* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerbash.go b/qt-restricted-extras/qscintilla6/gen_qscilexerbash.go index 0a1a9ddc..3df781ed 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerbash.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerbash.go @@ -55,44 +55,34 @@ func (this *QsciLexerBash) UnsafePointer() unsafe.Pointer { } // newQsciLexerBash constructs the type using only CGO pointers. -func newQsciLexerBash(h *C.QsciLexerBash, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerBash { +func newQsciLexerBash(h *C.QsciLexerBash) *QsciLexerBash { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerBash_virtbase(h, &outptr_QsciLexer) + return &QsciLexerBash{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerBash constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerBash(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerBash { - if h == nil { - return nil - } - - return &QsciLexerBash{h: (*C.QsciLexerBash)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerBash(h unsafe.Pointer) *QsciLexerBash { + return newQsciLexerBash((*C.QsciLexerBash)(h)) } // NewQsciLexerBash constructs a new QsciLexerBash object. func NewQsciLexerBash() *QsciLexerBash { - var outptr_QsciLexerBash *C.QsciLexerBash = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerBash_new(&outptr_QsciLexerBash, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerBash(outptr_QsciLexerBash, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerBash(C.QsciLexerBash_new()) ret.isSubclass = true return ret } // NewQsciLexerBash2 constructs a new QsciLexerBash object. func NewQsciLexerBash2(parent *qt6.QObject) *QsciLexerBash { - var outptr_QsciLexerBash *C.QsciLexerBash = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerBash_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerBash, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerBash(outptr_QsciLexerBash, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerBash(C.QsciLexerBash_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -940,7 +930,7 @@ func miqt_exec_callback_QsciLexerBash_SetEditor(self *C.QsciLexerBash, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerBash{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1184,7 +1174,7 @@ func miqt_exec_callback_QsciLexerBash_ReadProperties(self *C.QsciLexerBash, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1221,7 +1211,7 @@ func miqt_exec_callback_QsciLexerBash_WriteProperties(self *C.QsciLexerBash, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerbash.h b/qt-restricted-extras/qscintilla6/gen_qscilexerbash.h index 50720712..abe19ebe 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerbash.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerbash.h @@ -34,8 +34,9 @@ typedef struct QsciLexerBash QsciLexerBash; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerBash_new(QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerBash_new2(QObject* parent, QsciLexerBash** outptr_QsciLexerBash, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerBash* QsciLexerBash_new(); +QsciLexerBash* QsciLexerBash_new2(QObject* parent); +void QsciLexerBash_virtbase(QsciLexerBash* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerBash_MetaObject(const QsciLexerBash* self); void* QsciLexerBash_Metacast(QsciLexerBash* self, const char* param1); struct miqt_string QsciLexerBash_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.cpp index 9e4d4d2c..3541b4df 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerBatch_new(QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerBatch* ret = new MiqtVirtualQsciLexerBatch(); - *outptr_QsciLexerBatch = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerBatch* QsciLexerBatch_new() { + return new MiqtVirtualQsciLexerBatch(); } -void QsciLexerBatch_new2(QObject* parent, QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerBatch* ret = new MiqtVirtualQsciLexerBatch(parent); - *outptr_QsciLexerBatch = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerBatch* QsciLexerBatch_new2(QObject* parent) { + return new MiqtVirtualQsciLexerBatch(parent); +} + +void QsciLexerBatch_virtbase(QsciLexerBatch* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerBatch_MetaObject(const QsciLexerBatch* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.go b/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.go index 8b8829de..2576e16a 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.go @@ -49,44 +49,34 @@ func (this *QsciLexerBatch) UnsafePointer() unsafe.Pointer { } // newQsciLexerBatch constructs the type using only CGO pointers. -func newQsciLexerBatch(h *C.QsciLexerBatch, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerBatch { +func newQsciLexerBatch(h *C.QsciLexerBatch) *QsciLexerBatch { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerBatch_virtbase(h, &outptr_QsciLexer) + return &QsciLexerBatch{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerBatch constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerBatch(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerBatch { - if h == nil { - return nil - } - - return &QsciLexerBatch{h: (*C.QsciLexerBatch)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerBatch(h unsafe.Pointer) *QsciLexerBatch { + return newQsciLexerBatch((*C.QsciLexerBatch)(h)) } // NewQsciLexerBatch constructs a new QsciLexerBatch object. func NewQsciLexerBatch() *QsciLexerBatch { - var outptr_QsciLexerBatch *C.QsciLexerBatch = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerBatch_new(&outptr_QsciLexerBatch, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerBatch(outptr_QsciLexerBatch, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerBatch(C.QsciLexerBatch_new()) ret.isSubclass = true return ret } // NewQsciLexerBatch2 constructs a new QsciLexerBatch object. func NewQsciLexerBatch2(parent *qt6.QObject) *QsciLexerBatch { - var outptr_QsciLexerBatch *C.QsciLexerBatch = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerBatch_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerBatch, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerBatch(outptr_QsciLexerBatch, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerBatch(C.QsciLexerBatch_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -862,7 +852,7 @@ func miqt_exec_callback_QsciLexerBatch_SetEditor(self *C.QsciLexerBatch, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerBatch{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1106,7 +1096,7 @@ func miqt_exec_callback_QsciLexerBatch_ReadProperties(self *C.QsciLexerBatch, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1143,7 +1133,7 @@ func miqt_exec_callback_QsciLexerBatch_WriteProperties(self *C.QsciLexerBatch, c } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.h b/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.h index ecbc070d..fd955021 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerbatch.h @@ -34,8 +34,9 @@ typedef struct QsciLexerBatch QsciLexerBatch; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerBatch_new(QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerBatch_new2(QObject* parent, QsciLexerBatch** outptr_QsciLexerBatch, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerBatch* QsciLexerBatch_new(); +QsciLexerBatch* QsciLexerBatch_new2(QObject* parent); +void QsciLexerBatch_virtbase(QsciLexerBatch* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerBatch_MetaObject(const QsciLexerBatch* self); void* QsciLexerBatch_Metacast(QsciLexerBatch* self, const char* param1); struct miqt_string QsciLexerBatch_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercmake.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexercmake.cpp index 1e52fee9..f3acf3ee 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercmake.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercmake.cpp @@ -863,18 +863,16 @@ public: }; -void QsciLexerCMake_new(QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCMake* ret = new MiqtVirtualQsciLexerCMake(); - *outptr_QsciLexerCMake = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCMake* QsciLexerCMake_new() { + return new MiqtVirtualQsciLexerCMake(); } -void QsciLexerCMake_new2(QObject* parent, QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCMake* ret = new MiqtVirtualQsciLexerCMake(parent); - *outptr_QsciLexerCMake = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCMake* QsciLexerCMake_new2(QObject* parent) { + return new MiqtVirtualQsciLexerCMake(parent); +} + +void QsciLexerCMake_virtbase(QsciLexerCMake* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerCMake_MetaObject(const QsciLexerCMake* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercmake.go b/qt-restricted-extras/qscintilla6/gen_qscilexercmake.go index ba3ac92f..a9f9f201 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercmake.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercmake.go @@ -56,44 +56,34 @@ func (this *QsciLexerCMake) UnsafePointer() unsafe.Pointer { } // newQsciLexerCMake constructs the type using only CGO pointers. -func newQsciLexerCMake(h *C.QsciLexerCMake, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCMake { +func newQsciLexerCMake(h *C.QsciLexerCMake) *QsciLexerCMake { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerCMake_virtbase(h, &outptr_QsciLexer) + return &QsciLexerCMake{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerCMake constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerCMake(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCMake { - if h == nil { - return nil - } - - return &QsciLexerCMake{h: (*C.QsciLexerCMake)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerCMake(h unsafe.Pointer) *QsciLexerCMake { + return newQsciLexerCMake((*C.QsciLexerCMake)(h)) } // NewQsciLexerCMake constructs a new QsciLexerCMake object. func NewQsciLexerCMake() *QsciLexerCMake { - var outptr_QsciLexerCMake *C.QsciLexerCMake = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCMake_new(&outptr_QsciLexerCMake, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCMake(outptr_QsciLexerCMake, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCMake(C.QsciLexerCMake_new()) ret.isSubclass = true return ret } // NewQsciLexerCMake2 constructs a new QsciLexerCMake object. func NewQsciLexerCMake2(parent *qt6.QObject) *QsciLexerCMake { - var outptr_QsciLexerCMake *C.QsciLexerCMake = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCMake_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCMake, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCMake(outptr_QsciLexerCMake, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCMake(C.QsciLexerCMake_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -894,7 +884,7 @@ func miqt_exec_callback_QsciLexerCMake_SetEditor(self *C.QsciLexerCMake, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerCMake{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1138,7 +1128,7 @@ func miqt_exec_callback_QsciLexerCMake_ReadProperties(self *C.QsciLexerCMake, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1175,7 +1165,7 @@ func miqt_exec_callback_QsciLexerCMake_WriteProperties(self *C.QsciLexerCMake, c } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercmake.h b/qt-restricted-extras/qscintilla6/gen_qscilexercmake.h index c1ecc388..902dc317 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercmake.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercmake.h @@ -34,8 +34,9 @@ typedef struct QsciLexerCMake QsciLexerCMake; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerCMake_new(QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerCMake_new2(QObject* parent, QsciLexerCMake** outptr_QsciLexerCMake, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerCMake* QsciLexerCMake_new(); +QsciLexerCMake* QsciLexerCMake_new2(QObject* parent); +void QsciLexerCMake_virtbase(QsciLexerCMake* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerCMake_MetaObject(const QsciLexerCMake* self); void* QsciLexerCMake_Metacast(QsciLexerCMake* self, const char* param1); struct miqt_string QsciLexerCMake_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.cpp index d84c5d23..e8d61464 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerCoffeeScript_new(QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCoffeeScript* ret = new MiqtVirtualQsciLexerCoffeeScript(); - *outptr_QsciLexerCoffeeScript = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCoffeeScript* QsciLexerCoffeeScript_new() { + return new MiqtVirtualQsciLexerCoffeeScript(); } -void QsciLexerCoffeeScript_new2(QObject* parent, QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCoffeeScript* ret = new MiqtVirtualQsciLexerCoffeeScript(parent); - *outptr_QsciLexerCoffeeScript = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCoffeeScript* QsciLexerCoffeeScript_new2(QObject* parent) { + return new MiqtVirtualQsciLexerCoffeeScript(parent); +} + +void QsciLexerCoffeeScript_virtbase(QsciLexerCoffeeScript* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerCoffeeScript_MetaObject(const QsciLexerCoffeeScript* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.go b/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.go index e8097841..c6efbd72 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.go @@ -65,44 +65,34 @@ func (this *QsciLexerCoffeeScript) UnsafePointer() unsafe.Pointer { } // newQsciLexerCoffeeScript constructs the type using only CGO pointers. -func newQsciLexerCoffeeScript(h *C.QsciLexerCoffeeScript, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCoffeeScript { +func newQsciLexerCoffeeScript(h *C.QsciLexerCoffeeScript) *QsciLexerCoffeeScript { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerCoffeeScript_virtbase(h, &outptr_QsciLexer) + return &QsciLexerCoffeeScript{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerCoffeeScript constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerCoffeeScript(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCoffeeScript { - if h == nil { - return nil - } - - return &QsciLexerCoffeeScript{h: (*C.QsciLexerCoffeeScript)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerCoffeeScript(h unsafe.Pointer) *QsciLexerCoffeeScript { + return newQsciLexerCoffeeScript((*C.QsciLexerCoffeeScript)(h)) } // NewQsciLexerCoffeeScript constructs a new QsciLexerCoffeeScript object. func NewQsciLexerCoffeeScript() *QsciLexerCoffeeScript { - var outptr_QsciLexerCoffeeScript *C.QsciLexerCoffeeScript = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCoffeeScript_new(&outptr_QsciLexerCoffeeScript, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCoffeeScript(outptr_QsciLexerCoffeeScript, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCoffeeScript(C.QsciLexerCoffeeScript_new()) ret.isSubclass = true return ret } // NewQsciLexerCoffeeScript2 constructs a new QsciLexerCoffeeScript object. func NewQsciLexerCoffeeScript2(parent *qt6.QObject) *QsciLexerCoffeeScript { - var outptr_QsciLexerCoffeeScript *C.QsciLexerCoffeeScript = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCoffeeScript_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCoffeeScript, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCoffeeScript(outptr_QsciLexerCoffeeScript, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCoffeeScript(C.QsciLexerCoffeeScript_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -957,7 +947,7 @@ func miqt_exec_callback_QsciLexerCoffeeScript_SetEditor(self *C.QsciLexerCoffeeS } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerCoffeeScript{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1201,7 +1191,7 @@ func miqt_exec_callback_QsciLexerCoffeeScript_ReadProperties(self *C.QsciLexerCo } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1238,7 +1228,7 @@ func miqt_exec_callback_QsciLexerCoffeeScript_WriteProperties(self *C.QsciLexerC } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.h b/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.h index ca4d95c3..b16db868 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercoffeescript.h @@ -34,8 +34,9 @@ typedef struct QsciLexerCoffeeScript QsciLexerCoffeeScript; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerCoffeeScript_new(QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerCoffeeScript_new2(QObject* parent, QsciLexerCoffeeScript** outptr_QsciLexerCoffeeScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerCoffeeScript* QsciLexerCoffeeScript_new(); +QsciLexerCoffeeScript* QsciLexerCoffeeScript_new2(QObject* parent); +void QsciLexerCoffeeScript_virtbase(QsciLexerCoffeeScript* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerCoffeeScript_MetaObject(const QsciLexerCoffeeScript* self); void* QsciLexerCoffeeScript_Metacast(QsciLexerCoffeeScript* self, const char* param1); struct miqt_string QsciLexerCoffeeScript_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercpp.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexercpp.cpp index 880bdb49..e016fe72 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercpp.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercpp.cpp @@ -960,25 +960,20 @@ public: }; -void QsciLexerCPP_new(QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCPP* ret = new MiqtVirtualQsciLexerCPP(); - *outptr_QsciLexerCPP = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCPP* QsciLexerCPP_new() { + return new MiqtVirtualQsciLexerCPP(); } -void QsciLexerCPP_new2(QObject* parent, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCPP* ret = new MiqtVirtualQsciLexerCPP(parent); - *outptr_QsciLexerCPP = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCPP* QsciLexerCPP_new2(QObject* parent) { + return new MiqtVirtualQsciLexerCPP(parent); } -void QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCPP* ret = new MiqtVirtualQsciLexerCPP(parent, caseInsensitiveKeywords); - *outptr_QsciLexerCPP = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCPP* QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords) { + return new MiqtVirtualQsciLexerCPP(parent, caseInsensitiveKeywords); +} + +void QsciLexerCPP_virtbase(QsciLexerCPP* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerCPP_MetaObject(const QsciLexerCPP* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercpp.go b/qt-restricted-extras/qscintilla6/gen_qscilexercpp.go index f7355bd7..6771945b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercpp.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercpp.go @@ -97,56 +97,42 @@ func (this *QsciLexerCPP) UnsafePointer() unsafe.Pointer { } // newQsciLexerCPP constructs the type using only CGO pointers. -func newQsciLexerCPP(h *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCPP { +func newQsciLexerCPP(h *C.QsciLexerCPP) *QsciLexerCPP { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerCPP_virtbase(h, &outptr_QsciLexer) + return &QsciLexerCPP{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerCPP constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerCPP(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCPP { - if h == nil { - return nil - } - - return &QsciLexerCPP{h: (*C.QsciLexerCPP)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerCPP(h unsafe.Pointer) *QsciLexerCPP { + return newQsciLexerCPP((*C.QsciLexerCPP)(h)) } // NewQsciLexerCPP constructs a new QsciLexerCPP object. func NewQsciLexerCPP() *QsciLexerCPP { - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCPP_new(&outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCPP(outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCPP(C.QsciLexerCPP_new()) ret.isSubclass = true return ret } // NewQsciLexerCPP2 constructs a new QsciLexerCPP object. func NewQsciLexerCPP2(parent *qt6.QObject) *QsciLexerCPP { - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCPP_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCPP(outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCPP(C.QsciLexerCPP_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQsciLexerCPP3 constructs a new QsciLexerCPP object. func NewQsciLexerCPP3(parent *qt6.QObject, caseInsensitiveKeywords bool) *QsciLexerCPP { - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCPP_new3((*C.QObject)(parent.UnsafePointer()), (C.bool)(caseInsensitiveKeywords), &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCPP(outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCPP(C.QsciLexerCPP_new3((*C.QObject)(parent.UnsafePointer()), (C.bool)(caseInsensitiveKeywords))) ret.isSubclass = true return ret } @@ -1187,7 +1173,7 @@ func miqt_exec_callback_QsciLexerCPP_SetEditor(self *C.QsciLexerCPP, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerCPP{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1431,7 +1417,7 @@ func miqt_exec_callback_QsciLexerCPP_ReadProperties(self *C.QsciLexerCPP, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1468,7 +1454,7 @@ func miqt_exec_callback_QsciLexerCPP_WriteProperties(self *C.QsciLexerCPP, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercpp.h b/qt-restricted-extras/qscintilla6/gen_qscilexercpp.h index 0f2b6256..6d36630a 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercpp.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercpp.h @@ -34,9 +34,10 @@ typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerCPP_new(QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerCPP_new2(QObject* parent, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerCPP* QsciLexerCPP_new(); +QsciLexerCPP* QsciLexerCPP_new2(QObject* parent); +QsciLexerCPP* QsciLexerCPP_new3(QObject* parent, bool caseInsensitiveKeywords); +void QsciLexerCPP_virtbase(QsciLexerCPP* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerCPP_MetaObject(const QsciLexerCPP* self); void* QsciLexerCPP_Metacast(QsciLexerCPP* self, const char* param1); struct miqt_string QsciLexerCPP_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.cpp index 62c1face..345aa5f4 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.cpp @@ -139,20 +139,16 @@ public: }; -void QsciLexerCSharp_new(QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCSharp* ret = new MiqtVirtualQsciLexerCSharp(); - *outptr_QsciLexerCSharp = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCSharp* QsciLexerCSharp_new() { + return new MiqtVirtualQsciLexerCSharp(); } -void QsciLexerCSharp_new2(QObject* parent, QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCSharp* ret = new MiqtVirtualQsciLexerCSharp(parent); - *outptr_QsciLexerCSharp = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCSharp* QsciLexerCSharp_new2(QObject* parent) { + return new MiqtVirtualQsciLexerCSharp(parent); +} + +void QsciLexerCSharp_virtbase(QsciLexerCSharp* src, QsciLexerCPP** outptr_QsciLexerCPP) { + *outptr_QsciLexerCPP = static_cast(src); } QMetaObject* QsciLexerCSharp_MetaObject(const QsciLexerCSharp* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.go b/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.go index 0b6a0499..b0c78c80 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.go @@ -36,46 +36,34 @@ func (this *QsciLexerCSharp) UnsafePointer() unsafe.Pointer { } // newQsciLexerCSharp constructs the type using only CGO pointers. -func newQsciLexerCSharp(h *C.QsciLexerCSharp, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCSharp { +func newQsciLexerCSharp(h *C.QsciLexerCSharp) *QsciLexerCSharp { if h == nil { return nil } + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + C.QsciLexerCSharp_virtbase(h, &outptr_QsciLexerCPP) + return &QsciLexerCSharp{h: h, - QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} + QsciLexerCPP: newQsciLexerCPP(outptr_QsciLexerCPP)} } // UnsafeNewQsciLexerCSharp constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerCSharp(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCSharp { - if h == nil { - return nil - } - - return &QsciLexerCSharp{h: (*C.QsciLexerCSharp)(h), - QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerCSharp(h unsafe.Pointer) *QsciLexerCSharp { + return newQsciLexerCSharp((*C.QsciLexerCSharp)(h)) } // NewQsciLexerCSharp constructs a new QsciLexerCSharp object. func NewQsciLexerCSharp() *QsciLexerCSharp { - var outptr_QsciLexerCSharp *C.QsciLexerCSharp = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCSharp_new(&outptr_QsciLexerCSharp, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCSharp(outptr_QsciLexerCSharp, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCSharp(C.QsciLexerCSharp_new()) ret.isSubclass = true return ret } // NewQsciLexerCSharp2 constructs a new QsciLexerCSharp object. func NewQsciLexerCSharp2(parent *qt6.QObject) *QsciLexerCSharp { - var outptr_QsciLexerCSharp *C.QsciLexerCSharp = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCSharp_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCSharp, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCSharp(outptr_QsciLexerCSharp, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCSharp(C.QsciLexerCSharp_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.h b/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.h index 2fd95d24..6691fbba 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercsharp.h @@ -32,8 +32,9 @@ typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerCSharp QsciLexerCSharp; #endif -void QsciLexerCSharp_new(QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerCSharp_new2(QObject* parent, QsciLexerCSharp** outptr_QsciLexerCSharp, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerCSharp* QsciLexerCSharp_new(); +QsciLexerCSharp* QsciLexerCSharp_new2(QObject* parent); +void QsciLexerCSharp_virtbase(QsciLexerCSharp* src, QsciLexerCPP** outptr_QsciLexerCPP); QMetaObject* QsciLexerCSharp_MetaObject(const QsciLexerCSharp* self); void* QsciLexerCSharp_Metacast(QsciLexerCSharp* self, const char* param1); struct miqt_string QsciLexerCSharp_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercss.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexercss.cpp index 7b84e82d..7ee85c0f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercss.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercss.cpp @@ -887,18 +887,16 @@ public: }; -void QsciLexerCSS_new(QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCSS* ret = new MiqtVirtualQsciLexerCSS(); - *outptr_QsciLexerCSS = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCSS* QsciLexerCSS_new() { + return new MiqtVirtualQsciLexerCSS(); } -void QsciLexerCSS_new2(QObject* parent, QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCSS* ret = new MiqtVirtualQsciLexerCSS(parent); - *outptr_QsciLexerCSS = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCSS* QsciLexerCSS_new2(QObject* parent) { + return new MiqtVirtualQsciLexerCSS(parent); +} + +void QsciLexerCSS_virtbase(QsciLexerCSS* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerCSS_MetaObject(const QsciLexerCSS* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercss.go b/qt-restricted-extras/qscintilla6/gen_qscilexercss.go index 992ed633..924cd61c 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercss.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercss.go @@ -65,44 +65,34 @@ func (this *QsciLexerCSS) UnsafePointer() unsafe.Pointer { } // newQsciLexerCSS constructs the type using only CGO pointers. -func newQsciLexerCSS(h *C.QsciLexerCSS, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCSS { +func newQsciLexerCSS(h *C.QsciLexerCSS) *QsciLexerCSS { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerCSS_virtbase(h, &outptr_QsciLexer) + return &QsciLexerCSS{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerCSS constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerCSS(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCSS { - if h == nil { - return nil - } - - return &QsciLexerCSS{h: (*C.QsciLexerCSS)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerCSS(h unsafe.Pointer) *QsciLexerCSS { + return newQsciLexerCSS((*C.QsciLexerCSS)(h)) } // NewQsciLexerCSS constructs a new QsciLexerCSS object. func NewQsciLexerCSS() *QsciLexerCSS { - var outptr_QsciLexerCSS *C.QsciLexerCSS = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCSS_new(&outptr_QsciLexerCSS, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCSS(outptr_QsciLexerCSS, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCSS(C.QsciLexerCSS_new()) ret.isSubclass = true return ret } // NewQsciLexerCSS2 constructs a new QsciLexerCSS object. func NewQsciLexerCSS2(parent *qt6.QObject) *QsciLexerCSS { - var outptr_QsciLexerCSS *C.QsciLexerCSS = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCSS_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCSS, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCSS(outptr_QsciLexerCSS, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCSS(C.QsciLexerCSS_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -980,7 +970,7 @@ func miqt_exec_callback_QsciLexerCSS_SetEditor(self *C.QsciLexerCSS, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerCSS{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1224,7 +1214,7 @@ func miqt_exec_callback_QsciLexerCSS_ReadProperties(self *C.QsciLexerCSS, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1261,7 +1251,7 @@ func miqt_exec_callback_QsciLexerCSS_WriteProperties(self *C.QsciLexerCSS, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercss.h b/qt-restricted-extras/qscintilla6/gen_qscilexercss.h index 9d9c648f..41624861 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercss.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercss.h @@ -34,8 +34,9 @@ typedef struct QsciLexerCSS QsciLexerCSS; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerCSS_new(QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerCSS_new2(QObject* parent, QsciLexerCSS** outptr_QsciLexerCSS, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerCSS* QsciLexerCSS_new(); +QsciLexerCSS* QsciLexerCSS_new2(QObject* parent); +void QsciLexerCSS_virtbase(QsciLexerCSS* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerCSS_MetaObject(const QsciLexerCSS* self); void* QsciLexerCSS_Metacast(QsciLexerCSS* self, const char* param1); struct miqt_string QsciLexerCSS_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.cpp index 27696e08..f0b51372 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.cpp @@ -856,18 +856,16 @@ public: }; -void QsciLexerCustom_new(QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCustom* ret = new MiqtVirtualQsciLexerCustom(); - *outptr_QsciLexerCustom = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCustom* QsciLexerCustom_new() { + return new MiqtVirtualQsciLexerCustom(); } -void QsciLexerCustom_new2(QObject* parent, QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerCustom* ret = new MiqtVirtualQsciLexerCustom(parent); - *outptr_QsciLexerCustom = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerCustom* QsciLexerCustom_new2(QObject* parent) { + return new MiqtVirtualQsciLexerCustom(parent); +} + +void QsciLexerCustom_virtbase(QsciLexerCustom* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerCustom_MetaObject(const QsciLexerCustom* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.go b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.go index 024c4327..9ea5e71f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.go @@ -36,44 +36,34 @@ func (this *QsciLexerCustom) UnsafePointer() unsafe.Pointer { } // newQsciLexerCustom constructs the type using only CGO pointers. -func newQsciLexerCustom(h *C.QsciLexerCustom, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerCustom { +func newQsciLexerCustom(h *C.QsciLexerCustom) *QsciLexerCustom { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerCustom_virtbase(h, &outptr_QsciLexer) + return &QsciLexerCustom{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerCustom constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerCustom(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerCustom { - if h == nil { - return nil - } - - return &QsciLexerCustom{h: (*C.QsciLexerCustom)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerCustom(h unsafe.Pointer) *QsciLexerCustom { + return newQsciLexerCustom((*C.QsciLexerCustom)(h)) } // NewQsciLexerCustom constructs a new QsciLexerCustom object. func NewQsciLexerCustom() *QsciLexerCustom { - var outptr_QsciLexerCustom *C.QsciLexerCustom = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCustom_new(&outptr_QsciLexerCustom, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCustom(outptr_QsciLexerCustom, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCustom(C.QsciLexerCustom_new()) ret.isSubclass = true return ret } // NewQsciLexerCustom2 constructs a new QsciLexerCustom object. func NewQsciLexerCustom2(parent *qt6.QObject) *QsciLexerCustom { - var outptr_QsciLexerCustom *C.QsciLexerCustom = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerCustom_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerCustom, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerCustom(outptr_QsciLexerCustom, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerCustom(C.QsciLexerCustom_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -189,7 +179,7 @@ func miqt_exec_callback_QsciLexerCustom_SetEditor(self *C.QsciLexerCustom, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerCustom{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1090,7 +1080,7 @@ func miqt_exec_callback_QsciLexerCustom_ReadProperties(self *C.QsciLexerCustom, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1127,7 +1117,7 @@ func miqt_exec_callback_QsciLexerCustom_WriteProperties(self *C.QsciLexerCustom, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.h b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.h index 03abd91b..72ac8d38 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexercustom.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexercustom.h @@ -36,8 +36,9 @@ typedef struct QsciScintilla QsciScintilla; typedef struct QsciStyle QsciStyle; #endif -void QsciLexerCustom_new(QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerCustom_new2(QObject* parent, QsciLexerCustom** outptr_QsciLexerCustom, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerCustom* QsciLexerCustom_new(); +QsciLexerCustom* QsciLexerCustom_new2(QObject* parent); +void QsciLexerCustom_virtbase(QsciLexerCustom* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerCustom_MetaObject(const QsciLexerCustom* self); void* QsciLexerCustom_Metacast(QsciLexerCustom* self, const char* param1); struct miqt_string QsciLexerCustom_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerd.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerd.cpp index a237bb7f..7c2cee66 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerd.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerd.cpp @@ -911,18 +911,16 @@ public: }; -void QsciLexerD_new(QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerD* ret = new MiqtVirtualQsciLexerD(); - *outptr_QsciLexerD = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerD* QsciLexerD_new() { + return new MiqtVirtualQsciLexerD(); } -void QsciLexerD_new2(QObject* parent, QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerD* ret = new MiqtVirtualQsciLexerD(parent); - *outptr_QsciLexerD = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerD* QsciLexerD_new2(QObject* parent) { + return new MiqtVirtualQsciLexerD(parent); +} + +void QsciLexerD_virtbase(QsciLexerD* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerD_MetaObject(const QsciLexerD* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerd.go b/qt-restricted-extras/qscintilla6/gen_qscilexerd.go index aeb44ca5..a4bb7785 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerd.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerd.go @@ -64,44 +64,34 @@ func (this *QsciLexerD) UnsafePointer() unsafe.Pointer { } // newQsciLexerD constructs the type using only CGO pointers. -func newQsciLexerD(h *C.QsciLexerD, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerD { +func newQsciLexerD(h *C.QsciLexerD) *QsciLexerD { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerD_virtbase(h, &outptr_QsciLexer) + return &QsciLexerD{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerD constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerD(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerD { - if h == nil { - return nil - } - - return &QsciLexerD{h: (*C.QsciLexerD)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerD(h unsafe.Pointer) *QsciLexerD { + return newQsciLexerD((*C.QsciLexerD)(h)) } // NewQsciLexerD constructs a new QsciLexerD object. func NewQsciLexerD() *QsciLexerD { - var outptr_QsciLexerD *C.QsciLexerD = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerD_new(&outptr_QsciLexerD, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerD(outptr_QsciLexerD, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerD(C.QsciLexerD_new()) ret.isSubclass = true return ret } // NewQsciLexerD2 constructs a new QsciLexerD object. func NewQsciLexerD2(parent *qt6.QObject) *QsciLexerD { - var outptr_QsciLexerD *C.QsciLexerD = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerD_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerD, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerD(outptr_QsciLexerD, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerD(C.QsciLexerD_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1026,7 +1016,7 @@ func miqt_exec_callback_QsciLexerD_SetEditor(self *C.QsciLexerD, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerD{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1270,7 +1260,7 @@ func miqt_exec_callback_QsciLexerD_ReadProperties(self *C.QsciLexerD, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1307,7 +1297,7 @@ func miqt_exec_callback_QsciLexerD_WriteProperties(self *C.QsciLexerD, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerd.h b/qt-restricted-extras/qscintilla6/gen_qscilexerd.h index 5e403899..11d98c89 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerd.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerd.h @@ -34,8 +34,9 @@ typedef struct QsciLexerD QsciLexerD; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerD_new(QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerD_new2(QObject* parent, QsciLexerD** outptr_QsciLexerD, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerD* QsciLexerD_new(); +QsciLexerD* QsciLexerD_new2(QObject* parent); +void QsciLexerD_virtbase(QsciLexerD* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerD_MetaObject(const QsciLexerD* self); void* QsciLexerD_Metacast(QsciLexerD* self, const char* param1); struct miqt_string QsciLexerD_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.cpp index 8f7d7b74..52c892f1 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerDiff_new(QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerDiff* ret = new MiqtVirtualQsciLexerDiff(); - *outptr_QsciLexerDiff = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerDiff* QsciLexerDiff_new() { + return new MiqtVirtualQsciLexerDiff(); } -void QsciLexerDiff_new2(QObject* parent, QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerDiff* ret = new MiqtVirtualQsciLexerDiff(parent); - *outptr_QsciLexerDiff = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerDiff* QsciLexerDiff_new2(QObject* parent) { + return new MiqtVirtualQsciLexerDiff(parent); +} + +void QsciLexerDiff_virtbase(QsciLexerDiff* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerDiff_MetaObject(const QsciLexerDiff* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.go b/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.go index 903c5611..a45922d7 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.go @@ -53,44 +53,34 @@ func (this *QsciLexerDiff) UnsafePointer() unsafe.Pointer { } // newQsciLexerDiff constructs the type using only CGO pointers. -func newQsciLexerDiff(h *C.QsciLexerDiff, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerDiff { +func newQsciLexerDiff(h *C.QsciLexerDiff) *QsciLexerDiff { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerDiff_virtbase(h, &outptr_QsciLexer) + return &QsciLexerDiff{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerDiff constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerDiff(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerDiff { - if h == nil { - return nil - } - - return &QsciLexerDiff{h: (*C.QsciLexerDiff)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerDiff(h unsafe.Pointer) *QsciLexerDiff { + return newQsciLexerDiff((*C.QsciLexerDiff)(h)) } // NewQsciLexerDiff constructs a new QsciLexerDiff object. func NewQsciLexerDiff() *QsciLexerDiff { - var outptr_QsciLexerDiff *C.QsciLexerDiff = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerDiff_new(&outptr_QsciLexerDiff, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerDiff(outptr_QsciLexerDiff, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerDiff(C.QsciLexerDiff_new()) ret.isSubclass = true return ret } // NewQsciLexerDiff2 constructs a new QsciLexerDiff object. func NewQsciLexerDiff2(parent *qt6.QObject) *QsciLexerDiff { - var outptr_QsciLexerDiff *C.QsciLexerDiff = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerDiff_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerDiff, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerDiff(outptr_QsciLexerDiff, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerDiff(C.QsciLexerDiff_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -841,7 +831,7 @@ func miqt_exec_callback_QsciLexerDiff_SetEditor(self *C.QsciLexerDiff, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerDiff{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1085,7 +1075,7 @@ func miqt_exec_callback_QsciLexerDiff_ReadProperties(self *C.QsciLexerDiff, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1122,7 +1112,7 @@ func miqt_exec_callback_QsciLexerDiff_WriteProperties(self *C.QsciLexerDiff, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.h b/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.h index 7727e54c..8f07c90f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerdiff.h @@ -34,8 +34,9 @@ typedef struct QsciLexerDiff QsciLexerDiff; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerDiff_new(QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerDiff_new2(QObject* parent, QsciLexerDiff** outptr_QsciLexerDiff, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerDiff* QsciLexerDiff_new(); +QsciLexerDiff* QsciLexerDiff_new2(QObject* parent); +void QsciLexerDiff_virtbase(QsciLexerDiff* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerDiff_MetaObject(const QsciLexerDiff* self); void* QsciLexerDiff_Metacast(QsciLexerDiff* self, const char* param1); struct miqt_string QsciLexerDiff_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.cpp index b6d1ef4e..e1538a47 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerEDIFACT_new(QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerEDIFACT* ret = new MiqtVirtualQsciLexerEDIFACT(); - *outptr_QsciLexerEDIFACT = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerEDIFACT* QsciLexerEDIFACT_new() { + return new MiqtVirtualQsciLexerEDIFACT(); } -void QsciLexerEDIFACT_new2(QObject* parent, QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerEDIFACT* ret = new MiqtVirtualQsciLexerEDIFACT(parent); - *outptr_QsciLexerEDIFACT = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerEDIFACT* QsciLexerEDIFACT_new2(QObject* parent) { + return new MiqtVirtualQsciLexerEDIFACT(parent); +} + +void QsciLexerEDIFACT_virtbase(QsciLexerEDIFACT* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerEDIFACT_MetaObject(const QsciLexerEDIFACT* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.go b/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.go index ea6597a3..f1536c00 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.go @@ -50,44 +50,34 @@ func (this *QsciLexerEDIFACT) UnsafePointer() unsafe.Pointer { } // newQsciLexerEDIFACT constructs the type using only CGO pointers. -func newQsciLexerEDIFACT(h *C.QsciLexerEDIFACT, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerEDIFACT { +func newQsciLexerEDIFACT(h *C.QsciLexerEDIFACT) *QsciLexerEDIFACT { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerEDIFACT_virtbase(h, &outptr_QsciLexer) + return &QsciLexerEDIFACT{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerEDIFACT constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerEDIFACT(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerEDIFACT { - if h == nil { - return nil - } - - return &QsciLexerEDIFACT{h: (*C.QsciLexerEDIFACT)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerEDIFACT(h unsafe.Pointer) *QsciLexerEDIFACT { + return newQsciLexerEDIFACT((*C.QsciLexerEDIFACT)(h)) } // NewQsciLexerEDIFACT constructs a new QsciLexerEDIFACT object. func NewQsciLexerEDIFACT() *QsciLexerEDIFACT { - var outptr_QsciLexerEDIFACT *C.QsciLexerEDIFACT = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerEDIFACT_new(&outptr_QsciLexerEDIFACT, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerEDIFACT(outptr_QsciLexerEDIFACT, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerEDIFACT(C.QsciLexerEDIFACT_new()) ret.isSubclass = true return ret } // NewQsciLexerEDIFACT2 constructs a new QsciLexerEDIFACT object. func NewQsciLexerEDIFACT2(parent *qt6.QObject) *QsciLexerEDIFACT { - var outptr_QsciLexerEDIFACT *C.QsciLexerEDIFACT = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerEDIFACT_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerEDIFACT, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerEDIFACT(outptr_QsciLexerEDIFACT, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerEDIFACT(C.QsciLexerEDIFACT_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -833,7 +823,7 @@ func miqt_exec_callback_QsciLexerEDIFACT_SetEditor(self *C.QsciLexerEDIFACT, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerEDIFACT{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1077,7 +1067,7 @@ func miqt_exec_callback_QsciLexerEDIFACT_ReadProperties(self *C.QsciLexerEDIFACT } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1114,7 +1104,7 @@ func miqt_exec_callback_QsciLexerEDIFACT_WriteProperties(self *C.QsciLexerEDIFAC } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.h b/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.h index 79ac1e60..c79fed34 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeredifact.h @@ -34,8 +34,9 @@ typedef struct QsciLexerEDIFACT QsciLexerEDIFACT; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerEDIFACT_new(QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerEDIFACT_new2(QObject* parent, QsciLexerEDIFACT** outptr_QsciLexerEDIFACT, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerEDIFACT* QsciLexerEDIFACT_new(); +QsciLexerEDIFACT* QsciLexerEDIFACT_new2(QObject* parent); +void QsciLexerEDIFACT_virtbase(QsciLexerEDIFACT* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerEDIFACT_MetaObject(const QsciLexerEDIFACT* self); void* QsciLexerEDIFACT_Metacast(QsciLexerEDIFACT* self, const char* param1); struct miqt_string QsciLexerEDIFACT_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.cpp index 0f0e06d9..920d4dec 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.cpp @@ -41,20 +41,16 @@ public: }; -void QsciLexerFortran_new(QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerFortran* ret = new MiqtVirtualQsciLexerFortran(); - *outptr_QsciLexerFortran = ret; - *outptr_QsciLexerFortran77 = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerFortran* QsciLexerFortran_new() { + return new MiqtVirtualQsciLexerFortran(); } -void QsciLexerFortran_new2(QObject* parent, QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerFortran* ret = new MiqtVirtualQsciLexerFortran(parent); - *outptr_QsciLexerFortran = ret; - *outptr_QsciLexerFortran77 = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerFortran* QsciLexerFortran_new2(QObject* parent) { + return new MiqtVirtualQsciLexerFortran(parent); +} + +void QsciLexerFortran_virtbase(QsciLexerFortran* src, QsciLexerFortran77** outptr_QsciLexerFortran77) { + *outptr_QsciLexerFortran77 = static_cast(src); } QMetaObject* QsciLexerFortran_MetaObject(const QsciLexerFortran* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.go b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.go index 486d9857..f5bcfbcb 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.go @@ -36,46 +36,34 @@ func (this *QsciLexerFortran) UnsafePointer() unsafe.Pointer { } // newQsciLexerFortran constructs the type using only CGO pointers. -func newQsciLexerFortran(h *C.QsciLexerFortran, h_QsciLexerFortran77 *C.QsciLexerFortran77, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerFortran { +func newQsciLexerFortran(h *C.QsciLexerFortran) *QsciLexerFortran { if h == nil { return nil } + var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil + C.QsciLexerFortran_virtbase(h, &outptr_QsciLexerFortran77) + return &QsciLexerFortran{h: h, - QsciLexerFortran77: newQsciLexerFortran77(h_QsciLexerFortran77, h_QsciLexer, h_QObject)} + QsciLexerFortran77: newQsciLexerFortran77(outptr_QsciLexerFortran77)} } // UnsafeNewQsciLexerFortran constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerFortran(h unsafe.Pointer, h_QsciLexerFortran77 unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerFortran { - if h == nil { - return nil - } - - return &QsciLexerFortran{h: (*C.QsciLexerFortran)(h), - QsciLexerFortran77: UnsafeNewQsciLexerFortran77(h_QsciLexerFortran77, h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerFortran(h unsafe.Pointer) *QsciLexerFortran { + return newQsciLexerFortran((*C.QsciLexerFortran)(h)) } // NewQsciLexerFortran constructs a new QsciLexerFortran object. func NewQsciLexerFortran() *QsciLexerFortran { - var outptr_QsciLexerFortran *C.QsciLexerFortran = nil - var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerFortran_new(&outptr_QsciLexerFortran, &outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerFortran(outptr_QsciLexerFortran, outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerFortran(C.QsciLexerFortran_new()) ret.isSubclass = true return ret } // NewQsciLexerFortran2 constructs a new QsciLexerFortran object. func NewQsciLexerFortran2(parent *qt6.QObject) *QsciLexerFortran { - var outptr_QsciLexerFortran *C.QsciLexerFortran = nil - var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerFortran_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerFortran, &outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerFortran(outptr_QsciLexerFortran, outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerFortran(C.QsciLexerFortran_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.h b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.h index 350b1710..68b00598 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran.h @@ -28,8 +28,9 @@ typedef struct QsciLexerFortran QsciLexerFortran; typedef struct QsciLexerFortran77 QsciLexerFortran77; #endif -void QsciLexerFortran_new(QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerFortran_new2(QObject* parent, QsciLexerFortran** outptr_QsciLexerFortran, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerFortran* QsciLexerFortran_new(); +QsciLexerFortran* QsciLexerFortran_new2(QObject* parent); +void QsciLexerFortran_virtbase(QsciLexerFortran* src, QsciLexerFortran77** outptr_QsciLexerFortran77); QMetaObject* QsciLexerFortran_MetaObject(const QsciLexerFortran* self); void* QsciLexerFortran_Metacast(QsciLexerFortran* self, const char* param1); struct miqt_string QsciLexerFortran_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.cpp index 44805b6a..76921b56 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.cpp @@ -863,18 +863,16 @@ public: }; -void QsciLexerFortran77_new(QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerFortran77* ret = new MiqtVirtualQsciLexerFortran77(); - *outptr_QsciLexerFortran77 = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerFortran77* QsciLexerFortran77_new() { + return new MiqtVirtualQsciLexerFortran77(); } -void QsciLexerFortran77_new2(QObject* parent, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerFortran77* ret = new MiqtVirtualQsciLexerFortran77(parent); - *outptr_QsciLexerFortran77 = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerFortran77* QsciLexerFortran77_new2(QObject* parent) { + return new MiqtVirtualQsciLexerFortran77(parent); +} + +void QsciLexerFortran77_virtbase(QsciLexerFortran77* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerFortran77_MetaObject(const QsciLexerFortran77* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.go b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.go index 7f6de8cf..d2292e55 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.go @@ -56,44 +56,34 @@ func (this *QsciLexerFortran77) UnsafePointer() unsafe.Pointer { } // newQsciLexerFortran77 constructs the type using only CGO pointers. -func newQsciLexerFortran77(h *C.QsciLexerFortran77, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerFortran77 { +func newQsciLexerFortran77(h *C.QsciLexerFortran77) *QsciLexerFortran77 { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerFortran77_virtbase(h, &outptr_QsciLexer) + return &QsciLexerFortran77{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerFortran77 constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerFortran77(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerFortran77 { - if h == nil { - return nil - } - - return &QsciLexerFortran77{h: (*C.QsciLexerFortran77)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerFortran77(h unsafe.Pointer) *QsciLexerFortran77 { + return newQsciLexerFortran77((*C.QsciLexerFortran77)(h)) } // NewQsciLexerFortran77 constructs a new QsciLexerFortran77 object. func NewQsciLexerFortran77() *QsciLexerFortran77 { - var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerFortran77_new(&outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerFortran77(outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerFortran77(C.QsciLexerFortran77_new()) ret.isSubclass = true return ret } // NewQsciLexerFortran772 constructs a new QsciLexerFortran77 object. func NewQsciLexerFortran772(parent *qt6.QObject) *QsciLexerFortran77 { - var outptr_QsciLexerFortran77 *C.QsciLexerFortran77 = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerFortran77_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerFortran77, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerFortran77(outptr_QsciLexerFortran77, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerFortran77(C.QsciLexerFortran77_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -902,7 +892,7 @@ func miqt_exec_callback_QsciLexerFortran77_SetEditor(self *C.QsciLexerFortran77, } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerFortran77{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1146,7 +1136,7 @@ func miqt_exec_callback_QsciLexerFortran77_ReadProperties(self *C.QsciLexerFortr } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1183,7 +1173,7 @@ func miqt_exec_callback_QsciLexerFortran77_WriteProperties(self *C.QsciLexerFort } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.h b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.h index 79491f75..9eab2a4f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerfortran77.h @@ -34,8 +34,9 @@ typedef struct QsciLexerFortran77 QsciLexerFortran77; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerFortran77_new(QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerFortran77_new2(QObject* parent, QsciLexerFortran77** outptr_QsciLexerFortran77, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerFortran77* QsciLexerFortran77_new(); +QsciLexerFortran77* QsciLexerFortran77_new2(QObject* parent); +void QsciLexerFortran77_virtbase(QsciLexerFortran77* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerFortran77_MetaObject(const QsciLexerFortran77* self); void* QsciLexerFortran77_Metacast(QsciLexerFortran77* self, const char* param1); struct miqt_string QsciLexerFortran77_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.cpp index b9d7eaa1..b24d96be 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.cpp @@ -911,18 +911,16 @@ public: }; -void QsciLexerHTML_new(QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerHTML* ret = new MiqtVirtualQsciLexerHTML(); - *outptr_QsciLexerHTML = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerHTML* QsciLexerHTML_new() { + return new MiqtVirtualQsciLexerHTML(); } -void QsciLexerHTML_new2(QObject* parent, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerHTML* ret = new MiqtVirtualQsciLexerHTML(parent); - *outptr_QsciLexerHTML = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerHTML* QsciLexerHTML_new2(QObject* parent) { + return new MiqtVirtualQsciLexerHTML(parent); +} + +void QsciLexerHTML_virtbase(QsciLexerHTML* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerHTML_MetaObject(const QsciLexerHTML* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.go b/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.go index f48a1e19..1800e0c3 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.go @@ -151,44 +151,34 @@ func (this *QsciLexerHTML) UnsafePointer() unsafe.Pointer { } // newQsciLexerHTML constructs the type using only CGO pointers. -func newQsciLexerHTML(h *C.QsciLexerHTML, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerHTML { +func newQsciLexerHTML(h *C.QsciLexerHTML) *QsciLexerHTML { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerHTML_virtbase(h, &outptr_QsciLexer) + return &QsciLexerHTML{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerHTML constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerHTML(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerHTML { - if h == nil { - return nil - } - - return &QsciLexerHTML{h: (*C.QsciLexerHTML)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerHTML(h unsafe.Pointer) *QsciLexerHTML { + return newQsciLexerHTML((*C.QsciLexerHTML)(h)) } // NewQsciLexerHTML constructs a new QsciLexerHTML object. func NewQsciLexerHTML() *QsciLexerHTML { - var outptr_QsciLexerHTML *C.QsciLexerHTML = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerHTML_new(&outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerHTML(outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerHTML(C.QsciLexerHTML_new()) ret.isSubclass = true return ret } // NewQsciLexerHTML2 constructs a new QsciLexerHTML object. func NewQsciLexerHTML2(parent *qt6.QObject) *QsciLexerHTML { - var outptr_QsciLexerHTML *C.QsciLexerHTML = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerHTML_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerHTML(outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerHTML(C.QsciLexerHTML_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1103,7 +1093,7 @@ func miqt_exec_callback_QsciLexerHTML_SetEditor(self *C.QsciLexerHTML, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerHTML{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1347,7 +1337,7 @@ func miqt_exec_callback_QsciLexerHTML_ReadProperties(self *C.QsciLexerHTML, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1384,7 +1374,7 @@ func miqt_exec_callback_QsciLexerHTML_WriteProperties(self *C.QsciLexerHTML, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.h b/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.h index 6f6d2fd1..478b50d6 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerhtml.h @@ -34,8 +34,9 @@ typedef struct QsciLexerHTML QsciLexerHTML; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerHTML_new(QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerHTML_new2(QObject* parent, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerHTML* QsciLexerHTML_new(); +QsciLexerHTML* QsciLexerHTML_new2(QObject* parent); +void QsciLexerHTML_virtbase(QsciLexerHTML* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerHTML_MetaObject(const QsciLexerHTML* self); void* QsciLexerHTML_Metacast(QsciLexerHTML* self, const char* param1); struct miqt_string QsciLexerHTML_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeridl.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexeridl.cpp index 519b35d1..97f88b18 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeridl.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeridl.cpp @@ -138,20 +138,16 @@ public: }; -void QsciLexerIDL_new(QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerIDL* ret = new MiqtVirtualQsciLexerIDL(); - *outptr_QsciLexerIDL = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerIDL* QsciLexerIDL_new() { + return new MiqtVirtualQsciLexerIDL(); } -void QsciLexerIDL_new2(QObject* parent, QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerIDL* ret = new MiqtVirtualQsciLexerIDL(parent); - *outptr_QsciLexerIDL = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerIDL* QsciLexerIDL_new2(QObject* parent) { + return new MiqtVirtualQsciLexerIDL(parent); +} + +void QsciLexerIDL_virtbase(QsciLexerIDL* src, QsciLexerCPP** outptr_QsciLexerCPP) { + *outptr_QsciLexerCPP = static_cast(src); } QMetaObject* QsciLexerIDL_MetaObject(const QsciLexerIDL* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeridl.go b/qt-restricted-extras/qscintilla6/gen_qscilexeridl.go index c54d79a5..62dcc895 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeridl.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeridl.go @@ -36,46 +36,34 @@ func (this *QsciLexerIDL) UnsafePointer() unsafe.Pointer { } // newQsciLexerIDL constructs the type using only CGO pointers. -func newQsciLexerIDL(h *C.QsciLexerIDL, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerIDL { +func newQsciLexerIDL(h *C.QsciLexerIDL) *QsciLexerIDL { if h == nil { return nil } + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + C.QsciLexerIDL_virtbase(h, &outptr_QsciLexerCPP) + return &QsciLexerIDL{h: h, - QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} + QsciLexerCPP: newQsciLexerCPP(outptr_QsciLexerCPP)} } // UnsafeNewQsciLexerIDL constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerIDL(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerIDL { - if h == nil { - return nil - } - - return &QsciLexerIDL{h: (*C.QsciLexerIDL)(h), - QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerIDL(h unsafe.Pointer) *QsciLexerIDL { + return newQsciLexerIDL((*C.QsciLexerIDL)(h)) } // NewQsciLexerIDL constructs a new QsciLexerIDL object. func NewQsciLexerIDL() *QsciLexerIDL { - var outptr_QsciLexerIDL *C.QsciLexerIDL = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerIDL_new(&outptr_QsciLexerIDL, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerIDL(outptr_QsciLexerIDL, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerIDL(C.QsciLexerIDL_new()) ret.isSubclass = true return ret } // NewQsciLexerIDL2 constructs a new QsciLexerIDL object. func NewQsciLexerIDL2(parent *qt6.QObject) *QsciLexerIDL { - var outptr_QsciLexerIDL *C.QsciLexerIDL = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerIDL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerIDL, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerIDL(outptr_QsciLexerIDL, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerIDL(C.QsciLexerIDL_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeridl.h b/qt-restricted-extras/qscintilla6/gen_qscilexeridl.h index eff22ff4..a7fa990b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeridl.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeridl.h @@ -30,8 +30,9 @@ typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerIDL QsciLexerIDL; #endif -void QsciLexerIDL_new(QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerIDL_new2(QObject* parent, QsciLexerIDL** outptr_QsciLexerIDL, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerIDL* QsciLexerIDL_new(); +QsciLexerIDL* QsciLexerIDL_new2(QObject* parent); +void QsciLexerIDL_virtbase(QsciLexerIDL* src, QsciLexerCPP** outptr_QsciLexerCPP); QMetaObject* QsciLexerIDL_MetaObject(const QsciLexerIDL* self); void* QsciLexerIDL_Metacast(QsciLexerIDL* self, const char* param1); struct miqt_string QsciLexerIDL_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjava.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerjava.cpp index 9cb02bf0..38baa6ee 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjava.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjava.cpp @@ -137,20 +137,16 @@ public: }; -void QsciLexerJava_new(QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerJava* ret = new MiqtVirtualQsciLexerJava(); - *outptr_QsciLexerJava = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerJava* QsciLexerJava_new() { + return new MiqtVirtualQsciLexerJava(); } -void QsciLexerJava_new2(QObject* parent, QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerJava* ret = new MiqtVirtualQsciLexerJava(parent); - *outptr_QsciLexerJava = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerJava* QsciLexerJava_new2(QObject* parent) { + return new MiqtVirtualQsciLexerJava(parent); +} + +void QsciLexerJava_virtbase(QsciLexerJava* src, QsciLexerCPP** outptr_QsciLexerCPP) { + *outptr_QsciLexerCPP = static_cast(src); } QMetaObject* QsciLexerJava_MetaObject(const QsciLexerJava* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjava.go b/qt-restricted-extras/qscintilla6/gen_qscilexerjava.go index db36bb3a..94eec065 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjava.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjava.go @@ -36,46 +36,34 @@ func (this *QsciLexerJava) UnsafePointer() unsafe.Pointer { } // newQsciLexerJava constructs the type using only CGO pointers. -func newQsciLexerJava(h *C.QsciLexerJava, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerJava { +func newQsciLexerJava(h *C.QsciLexerJava) *QsciLexerJava { if h == nil { return nil } + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + C.QsciLexerJava_virtbase(h, &outptr_QsciLexerCPP) + return &QsciLexerJava{h: h, - QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} + QsciLexerCPP: newQsciLexerCPP(outptr_QsciLexerCPP)} } // UnsafeNewQsciLexerJava constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerJava(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerJava { - if h == nil { - return nil - } - - return &QsciLexerJava{h: (*C.QsciLexerJava)(h), - QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerJava(h unsafe.Pointer) *QsciLexerJava { + return newQsciLexerJava((*C.QsciLexerJava)(h)) } // NewQsciLexerJava constructs a new QsciLexerJava object. func NewQsciLexerJava() *QsciLexerJava { - var outptr_QsciLexerJava *C.QsciLexerJava = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerJava_new(&outptr_QsciLexerJava, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerJava(outptr_QsciLexerJava, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerJava(C.QsciLexerJava_new()) ret.isSubclass = true return ret } // NewQsciLexerJava2 constructs a new QsciLexerJava object. func NewQsciLexerJava2(parent *qt6.QObject) *QsciLexerJava { - var outptr_QsciLexerJava *C.QsciLexerJava = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerJava_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerJava, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerJava(outptr_QsciLexerJava, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerJava(C.QsciLexerJava_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjava.h b/qt-restricted-extras/qscintilla6/gen_qscilexerjava.h index 9ab458e2..a59059dd 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjava.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjava.h @@ -28,8 +28,9 @@ typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerJava QsciLexerJava; #endif -void QsciLexerJava_new(QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerJava_new2(QObject* parent, QsciLexerJava** outptr_QsciLexerJava, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerJava* QsciLexerJava_new(); +QsciLexerJava* QsciLexerJava_new2(QObject* parent); +void QsciLexerJava_virtbase(QsciLexerJava* src, QsciLexerCPP** outptr_QsciLexerCPP); QMetaObject* QsciLexerJava_MetaObject(const QsciLexerJava* self); void* QsciLexerJava_Metacast(QsciLexerJava* self, const char* param1); struct miqt_string QsciLexerJava_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.cpp index 4c6f39a3..94518f64 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.cpp @@ -139,20 +139,16 @@ public: }; -void QsciLexerJavaScript_new(QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerJavaScript* ret = new MiqtVirtualQsciLexerJavaScript(); - *outptr_QsciLexerJavaScript = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerJavaScript* QsciLexerJavaScript_new() { + return new MiqtVirtualQsciLexerJavaScript(); } -void QsciLexerJavaScript_new2(QObject* parent, QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerJavaScript* ret = new MiqtVirtualQsciLexerJavaScript(parent); - *outptr_QsciLexerJavaScript = ret; - *outptr_QsciLexerCPP = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerJavaScript* QsciLexerJavaScript_new2(QObject* parent) { + return new MiqtVirtualQsciLexerJavaScript(parent); +} + +void QsciLexerJavaScript_virtbase(QsciLexerJavaScript* src, QsciLexerCPP** outptr_QsciLexerCPP) { + *outptr_QsciLexerCPP = static_cast(src); } QMetaObject* QsciLexerJavaScript_MetaObject(const QsciLexerJavaScript* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.go b/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.go index 9e9dba51..0957707c 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.go @@ -36,46 +36,34 @@ func (this *QsciLexerJavaScript) UnsafePointer() unsafe.Pointer { } // newQsciLexerJavaScript constructs the type using only CGO pointers. -func newQsciLexerJavaScript(h *C.QsciLexerJavaScript, h_QsciLexerCPP *C.QsciLexerCPP, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerJavaScript { +func newQsciLexerJavaScript(h *C.QsciLexerJavaScript) *QsciLexerJavaScript { if h == nil { return nil } + var outptr_QsciLexerCPP *C.QsciLexerCPP = nil + C.QsciLexerJavaScript_virtbase(h, &outptr_QsciLexerCPP) + return &QsciLexerJavaScript{h: h, - QsciLexerCPP: newQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} + QsciLexerCPP: newQsciLexerCPP(outptr_QsciLexerCPP)} } // UnsafeNewQsciLexerJavaScript constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerJavaScript(h unsafe.Pointer, h_QsciLexerCPP unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerJavaScript { - if h == nil { - return nil - } - - return &QsciLexerJavaScript{h: (*C.QsciLexerJavaScript)(h), - QsciLexerCPP: UnsafeNewQsciLexerCPP(h_QsciLexerCPP, h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerJavaScript(h unsafe.Pointer) *QsciLexerJavaScript { + return newQsciLexerJavaScript((*C.QsciLexerJavaScript)(h)) } // NewQsciLexerJavaScript constructs a new QsciLexerJavaScript object. func NewQsciLexerJavaScript() *QsciLexerJavaScript { - var outptr_QsciLexerJavaScript *C.QsciLexerJavaScript = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerJavaScript_new(&outptr_QsciLexerJavaScript, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerJavaScript(outptr_QsciLexerJavaScript, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerJavaScript(C.QsciLexerJavaScript_new()) ret.isSubclass = true return ret } // NewQsciLexerJavaScript2 constructs a new QsciLexerJavaScript object. func NewQsciLexerJavaScript2(parent *qt6.QObject) *QsciLexerJavaScript { - var outptr_QsciLexerJavaScript *C.QsciLexerJavaScript = nil - var outptr_QsciLexerCPP *C.QsciLexerCPP = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerJavaScript_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerJavaScript, &outptr_QsciLexerCPP, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerJavaScript(outptr_QsciLexerJavaScript, outptr_QsciLexerCPP, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerJavaScript(C.QsciLexerJavaScript_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.h b/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.h index 28637ca7..f65af3df 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjavascript.h @@ -32,8 +32,9 @@ typedef struct QsciLexerCPP QsciLexerCPP; typedef struct QsciLexerJavaScript QsciLexerJavaScript; #endif -void QsciLexerJavaScript_new(QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerJavaScript_new2(QObject* parent, QsciLexerJavaScript** outptr_QsciLexerJavaScript, QsciLexerCPP** outptr_QsciLexerCPP, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerJavaScript* QsciLexerJavaScript_new(); +QsciLexerJavaScript* QsciLexerJavaScript_new2(QObject* parent); +void QsciLexerJavaScript_virtbase(QsciLexerJavaScript* src, QsciLexerCPP** outptr_QsciLexerCPP); QMetaObject* QsciLexerJavaScript_MetaObject(const QsciLexerJavaScript* self); void* QsciLexerJavaScript_Metacast(QsciLexerJavaScript* self, const char* param1); struct miqt_string QsciLexerJavaScript_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjson.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerjson.cpp index 80c2cadf..4caf27a5 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjson.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjson.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerJSON_new(QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerJSON* ret = new MiqtVirtualQsciLexerJSON(); - *outptr_QsciLexerJSON = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerJSON* QsciLexerJSON_new() { + return new MiqtVirtualQsciLexerJSON(); } -void QsciLexerJSON_new2(QObject* parent, QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerJSON* ret = new MiqtVirtualQsciLexerJSON(parent); - *outptr_QsciLexerJSON = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerJSON* QsciLexerJSON_new2(QObject* parent) { + return new MiqtVirtualQsciLexerJSON(parent); +} + +void QsciLexerJSON_virtbase(QsciLexerJSON* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerJSON_MetaObject(const QsciLexerJSON* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjson.go b/qt-restricted-extras/qscintilla6/gen_qscilexerjson.go index a83e70b7..6a6c6e23 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjson.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjson.go @@ -55,44 +55,34 @@ func (this *QsciLexerJSON) UnsafePointer() unsafe.Pointer { } // newQsciLexerJSON constructs the type using only CGO pointers. -func newQsciLexerJSON(h *C.QsciLexerJSON, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerJSON { +func newQsciLexerJSON(h *C.QsciLexerJSON) *QsciLexerJSON { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerJSON_virtbase(h, &outptr_QsciLexer) + return &QsciLexerJSON{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerJSON constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerJSON(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerJSON { - if h == nil { - return nil - } - - return &QsciLexerJSON{h: (*C.QsciLexerJSON)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerJSON(h unsafe.Pointer) *QsciLexerJSON { + return newQsciLexerJSON((*C.QsciLexerJSON)(h)) } // NewQsciLexerJSON constructs a new QsciLexerJSON object. func NewQsciLexerJSON() *QsciLexerJSON { - var outptr_QsciLexerJSON *C.QsciLexerJSON = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerJSON_new(&outptr_QsciLexerJSON, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerJSON(outptr_QsciLexerJSON, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerJSON(C.QsciLexerJSON_new()) ret.isSubclass = true return ret } // NewQsciLexerJSON2 constructs a new QsciLexerJSON object. func NewQsciLexerJSON2(parent *qt6.QObject) *QsciLexerJSON { - var outptr_QsciLexerJSON *C.QsciLexerJSON = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerJSON_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerJSON, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerJSON(outptr_QsciLexerJSON, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerJSON(C.QsciLexerJSON_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -887,7 +877,7 @@ func miqt_exec_callback_QsciLexerJSON_SetEditor(self *C.QsciLexerJSON, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerJSON{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1131,7 +1121,7 @@ func miqt_exec_callback_QsciLexerJSON_ReadProperties(self *C.QsciLexerJSON, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1168,7 +1158,7 @@ func miqt_exec_callback_QsciLexerJSON_WriteProperties(self *C.QsciLexerJSON, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerjson.h b/qt-restricted-extras/qscintilla6/gen_qscilexerjson.h index 29b3641e..141d0f31 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerjson.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerjson.h @@ -34,8 +34,9 @@ typedef struct QsciLexerJSON QsciLexerJSON; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerJSON_new(QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerJSON_new2(QObject* parent, QsciLexerJSON** outptr_QsciLexerJSON, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerJSON* QsciLexerJSON_new(); +QsciLexerJSON* QsciLexerJSON_new2(QObject* parent); +void QsciLexerJSON_virtbase(QsciLexerJSON* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerJSON_MetaObject(const QsciLexerJSON* self); void* QsciLexerJSON_Metacast(QsciLexerJSON* self, const char* param1); struct miqt_string QsciLexerJSON_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerlua.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerlua.cpp index 44fa2616..86e34251 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerlua.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerlua.cpp @@ -863,18 +863,16 @@ public: }; -void QsciLexerLua_new(QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerLua* ret = new MiqtVirtualQsciLexerLua(); - *outptr_QsciLexerLua = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerLua* QsciLexerLua_new() { + return new MiqtVirtualQsciLexerLua(); } -void QsciLexerLua_new2(QObject* parent, QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerLua* ret = new MiqtVirtualQsciLexerLua(parent); - *outptr_QsciLexerLua = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerLua* QsciLexerLua_new2(QObject* parent) { + return new MiqtVirtualQsciLexerLua(parent); +} + +void QsciLexerLua_virtbase(QsciLexerLua* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerLua_MetaObject(const QsciLexerLua* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerlua.go b/qt-restricted-extras/qscintilla6/gen_qscilexerlua.go index d55aecc8..01e899df 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerlua.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerlua.go @@ -61,44 +61,34 @@ func (this *QsciLexerLua) UnsafePointer() unsafe.Pointer { } // newQsciLexerLua constructs the type using only CGO pointers. -func newQsciLexerLua(h *C.QsciLexerLua, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerLua { +func newQsciLexerLua(h *C.QsciLexerLua) *QsciLexerLua { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerLua_virtbase(h, &outptr_QsciLexer) + return &QsciLexerLua{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerLua constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerLua(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerLua { - if h == nil { - return nil - } - - return &QsciLexerLua{h: (*C.QsciLexerLua)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerLua(h unsafe.Pointer) *QsciLexerLua { + return newQsciLexerLua((*C.QsciLexerLua)(h)) } // NewQsciLexerLua constructs a new QsciLexerLua object. func NewQsciLexerLua() *QsciLexerLua { - var outptr_QsciLexerLua *C.QsciLexerLua = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerLua_new(&outptr_QsciLexerLua, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerLua(outptr_QsciLexerLua, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerLua(C.QsciLexerLua_new()) ret.isSubclass = true return ret } // NewQsciLexerLua2 constructs a new QsciLexerLua object. func NewQsciLexerLua2(parent *qt6.QObject) *QsciLexerLua { - var outptr_QsciLexerLua *C.QsciLexerLua = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerLua_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerLua, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerLua(outptr_QsciLexerLua, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerLua(C.QsciLexerLua_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -930,7 +920,7 @@ func miqt_exec_callback_QsciLexerLua_SetEditor(self *C.QsciLexerLua, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerLua{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1174,7 +1164,7 @@ func miqt_exec_callback_QsciLexerLua_ReadProperties(self *C.QsciLexerLua, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1211,7 +1201,7 @@ func miqt_exec_callback_QsciLexerLua_WriteProperties(self *C.QsciLexerLua, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerlua.h b/qt-restricted-extras/qscintilla6/gen_qscilexerlua.h index 08bf6f81..509bbb3c 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerlua.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerlua.h @@ -34,8 +34,9 @@ typedef struct QsciLexerLua QsciLexerLua; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerLua_new(QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerLua_new2(QObject* parent, QsciLexerLua** outptr_QsciLexerLua, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerLua* QsciLexerLua_new(); +QsciLexerLua* QsciLexerLua_new2(QObject* parent); +void QsciLexerLua_virtbase(QsciLexerLua* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerLua_MetaObject(const QsciLexerLua* self); void* QsciLexerLua_Metacast(QsciLexerLua* self, const char* param1); struct miqt_string QsciLexerLua_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.cpp index b39fac79..43e5bb73 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerMakefile_new(QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerMakefile* ret = new MiqtVirtualQsciLexerMakefile(); - *outptr_QsciLexerMakefile = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerMakefile* QsciLexerMakefile_new() { + return new MiqtVirtualQsciLexerMakefile(); } -void QsciLexerMakefile_new2(QObject* parent, QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerMakefile* ret = new MiqtVirtualQsciLexerMakefile(parent); - *outptr_QsciLexerMakefile = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerMakefile* QsciLexerMakefile_new2(QObject* parent) { + return new MiqtVirtualQsciLexerMakefile(parent); +} + +void QsciLexerMakefile_virtbase(QsciLexerMakefile* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerMakefile_MetaObject(const QsciLexerMakefile* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.go b/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.go index a142af16..0ff6ef85 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.go @@ -48,44 +48,34 @@ func (this *QsciLexerMakefile) UnsafePointer() unsafe.Pointer { } // newQsciLexerMakefile constructs the type using only CGO pointers. -func newQsciLexerMakefile(h *C.QsciLexerMakefile, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerMakefile { +func newQsciLexerMakefile(h *C.QsciLexerMakefile) *QsciLexerMakefile { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerMakefile_virtbase(h, &outptr_QsciLexer) + return &QsciLexerMakefile{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerMakefile constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerMakefile(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerMakefile { - if h == nil { - return nil - } - - return &QsciLexerMakefile{h: (*C.QsciLexerMakefile)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerMakefile(h unsafe.Pointer) *QsciLexerMakefile { + return newQsciLexerMakefile((*C.QsciLexerMakefile)(h)) } // NewQsciLexerMakefile constructs a new QsciLexerMakefile object. func NewQsciLexerMakefile() *QsciLexerMakefile { - var outptr_QsciLexerMakefile *C.QsciLexerMakefile = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerMakefile_new(&outptr_QsciLexerMakefile, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerMakefile(outptr_QsciLexerMakefile, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerMakefile(C.QsciLexerMakefile_new()) ret.isSubclass = true return ret } // NewQsciLexerMakefile2 constructs a new QsciLexerMakefile object. func NewQsciLexerMakefile2(parent *qt6.QObject) *QsciLexerMakefile { - var outptr_QsciLexerMakefile *C.QsciLexerMakefile = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerMakefile_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerMakefile, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerMakefile(outptr_QsciLexerMakefile, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerMakefile(C.QsciLexerMakefile_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -852,7 +842,7 @@ func miqt_exec_callback_QsciLexerMakefile_SetEditor(self *C.QsciLexerMakefile, c } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerMakefile{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1096,7 +1086,7 @@ func miqt_exec_callback_QsciLexerMakefile_ReadProperties(self *C.QsciLexerMakefi } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1133,7 +1123,7 @@ func miqt_exec_callback_QsciLexerMakefile_WriteProperties(self *C.QsciLexerMakef } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.h b/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.h index 4cc54047..427a98c9 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermakefile.h @@ -34,8 +34,9 @@ typedef struct QsciLexerMakefile QsciLexerMakefile; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerMakefile_new(QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerMakefile_new2(QObject* parent, QsciLexerMakefile** outptr_QsciLexerMakefile, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerMakefile* QsciLexerMakefile_new(); +QsciLexerMakefile* QsciLexerMakefile_new2(QObject* parent); +void QsciLexerMakefile_virtbase(QsciLexerMakefile* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerMakefile_MetaObject(const QsciLexerMakefile* self); void* QsciLexerMakefile_Metacast(QsciLexerMakefile* self, const char* param1); struct miqt_string QsciLexerMakefile_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.cpp index 4b797839..74c632b4 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerMarkdown_new(QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerMarkdown* ret = new MiqtVirtualQsciLexerMarkdown(); - *outptr_QsciLexerMarkdown = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerMarkdown* QsciLexerMarkdown_new() { + return new MiqtVirtualQsciLexerMarkdown(); } -void QsciLexerMarkdown_new2(QObject* parent, QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerMarkdown* ret = new MiqtVirtualQsciLexerMarkdown(parent); - *outptr_QsciLexerMarkdown = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerMarkdown* QsciLexerMarkdown_new2(QObject* parent) { + return new MiqtVirtualQsciLexerMarkdown(parent); +} + +void QsciLexerMarkdown_virtbase(QsciLexerMarkdown* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerMarkdown_MetaObject(const QsciLexerMarkdown* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.go b/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.go index 89c5eec3..c26f32ea 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.go @@ -63,44 +63,34 @@ func (this *QsciLexerMarkdown) UnsafePointer() unsafe.Pointer { } // newQsciLexerMarkdown constructs the type using only CGO pointers. -func newQsciLexerMarkdown(h *C.QsciLexerMarkdown, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerMarkdown { +func newQsciLexerMarkdown(h *C.QsciLexerMarkdown) *QsciLexerMarkdown { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerMarkdown_virtbase(h, &outptr_QsciLexer) + return &QsciLexerMarkdown{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerMarkdown constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerMarkdown(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerMarkdown { - if h == nil { - return nil - } - - return &QsciLexerMarkdown{h: (*C.QsciLexerMarkdown)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerMarkdown(h unsafe.Pointer) *QsciLexerMarkdown { + return newQsciLexerMarkdown((*C.QsciLexerMarkdown)(h)) } // NewQsciLexerMarkdown constructs a new QsciLexerMarkdown object. func NewQsciLexerMarkdown() *QsciLexerMarkdown { - var outptr_QsciLexerMarkdown *C.QsciLexerMarkdown = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerMarkdown_new(&outptr_QsciLexerMarkdown, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerMarkdown(outptr_QsciLexerMarkdown, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerMarkdown(C.QsciLexerMarkdown_new()) ret.isSubclass = true return ret } // NewQsciLexerMarkdown2 constructs a new QsciLexerMarkdown object. func NewQsciLexerMarkdown2(parent *qt6.QObject) *QsciLexerMarkdown { - var outptr_QsciLexerMarkdown *C.QsciLexerMarkdown = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerMarkdown_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerMarkdown, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerMarkdown(outptr_QsciLexerMarkdown, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerMarkdown(C.QsciLexerMarkdown_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -858,7 +848,7 @@ func miqt_exec_callback_QsciLexerMarkdown_SetEditor(self *C.QsciLexerMarkdown, c } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerMarkdown{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1102,7 +1092,7 @@ func miqt_exec_callback_QsciLexerMarkdown_ReadProperties(self *C.QsciLexerMarkdo } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1139,7 +1129,7 @@ func miqt_exec_callback_QsciLexerMarkdown_WriteProperties(self *C.QsciLexerMarkd } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.h b/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.h index a554c29b..ce6593ad 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermarkdown.h @@ -34,8 +34,9 @@ typedef struct QsciLexerMarkdown QsciLexerMarkdown; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerMarkdown_new(QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerMarkdown_new2(QObject* parent, QsciLexerMarkdown** outptr_QsciLexerMarkdown, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerMarkdown* QsciLexerMarkdown_new(); +QsciLexerMarkdown* QsciLexerMarkdown_new2(QObject* parent); +void QsciLexerMarkdown_virtbase(QsciLexerMarkdown* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerMarkdown_MetaObject(const QsciLexerMarkdown* self); void* QsciLexerMarkdown_Metacast(QsciLexerMarkdown* self, const char* param1); struct miqt_string QsciLexerMarkdown_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.cpp index 92479e25..d1af2917 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerMatlab_new(QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerMatlab* ret = new MiqtVirtualQsciLexerMatlab(); - *outptr_QsciLexerMatlab = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerMatlab* QsciLexerMatlab_new() { + return new MiqtVirtualQsciLexerMatlab(); } -void QsciLexerMatlab_new2(QObject* parent, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerMatlab* ret = new MiqtVirtualQsciLexerMatlab(parent); - *outptr_QsciLexerMatlab = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerMatlab* QsciLexerMatlab_new2(QObject* parent) { + return new MiqtVirtualQsciLexerMatlab(parent); +} + +void QsciLexerMatlab_virtbase(QsciLexerMatlab* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerMatlab_MetaObject(const QsciLexerMatlab* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.go b/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.go index 298dc933..2ea68b94 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.go @@ -50,44 +50,34 @@ func (this *QsciLexerMatlab) UnsafePointer() unsafe.Pointer { } // newQsciLexerMatlab constructs the type using only CGO pointers. -func newQsciLexerMatlab(h *C.QsciLexerMatlab, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerMatlab { +func newQsciLexerMatlab(h *C.QsciLexerMatlab) *QsciLexerMatlab { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerMatlab_virtbase(h, &outptr_QsciLexer) + return &QsciLexerMatlab{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerMatlab constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerMatlab(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerMatlab { - if h == nil { - return nil - } - - return &QsciLexerMatlab{h: (*C.QsciLexerMatlab)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerMatlab(h unsafe.Pointer) *QsciLexerMatlab { + return newQsciLexerMatlab((*C.QsciLexerMatlab)(h)) } // NewQsciLexerMatlab constructs a new QsciLexerMatlab object. func NewQsciLexerMatlab() *QsciLexerMatlab { - var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerMatlab_new(&outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerMatlab(outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerMatlab(C.QsciLexerMatlab_new()) ret.isSubclass = true return ret } // NewQsciLexerMatlab2 constructs a new QsciLexerMatlab object. func NewQsciLexerMatlab2(parent *qt6.QObject) *QsciLexerMatlab { - var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerMatlab_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerMatlab(outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerMatlab(C.QsciLexerMatlab_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -844,7 +834,7 @@ func miqt_exec_callback_QsciLexerMatlab_SetEditor(self *C.QsciLexerMatlab, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerMatlab{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1088,7 +1078,7 @@ func miqt_exec_callback_QsciLexerMatlab_ReadProperties(self *C.QsciLexerMatlab, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1125,7 +1115,7 @@ func miqt_exec_callback_QsciLexerMatlab_WriteProperties(self *C.QsciLexerMatlab, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.h b/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.h index 88d74903..f8b0f177 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexermatlab.h @@ -34,8 +34,9 @@ typedef struct QsciLexerMatlab QsciLexerMatlab; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerMatlab_new(QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerMatlab_new2(QObject* parent, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerMatlab* QsciLexerMatlab_new(); +QsciLexerMatlab* QsciLexerMatlab_new2(QObject* parent); +void QsciLexerMatlab_virtbase(QsciLexerMatlab* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerMatlab_MetaObject(const QsciLexerMatlab* self); void* QsciLexerMatlab_Metacast(QsciLexerMatlab* self, const char* param1); struct miqt_string QsciLexerMatlab_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.cpp index eeb9fc02..a29d7e48 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.cpp @@ -7,20 +7,16 @@ #include "gen_qscilexeroctave.h" #include "_cgo_export.h" -void QsciLexerOctave_new(QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - QsciLexerOctave* ret = new QsciLexerOctave(); - *outptr_QsciLexerOctave = ret; - *outptr_QsciLexerMatlab = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerOctave* QsciLexerOctave_new() { + return new QsciLexerOctave(); } -void QsciLexerOctave_new2(QObject* parent, QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - QsciLexerOctave* ret = new QsciLexerOctave(parent); - *outptr_QsciLexerOctave = ret; - *outptr_QsciLexerMatlab = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerOctave* QsciLexerOctave_new2(QObject* parent) { + return new QsciLexerOctave(parent); +} + +void QsciLexerOctave_virtbase(QsciLexerOctave* src, QsciLexerMatlab** outptr_QsciLexerMatlab) { + *outptr_QsciLexerMatlab = static_cast(src); } QMetaObject* QsciLexerOctave_MetaObject(const QsciLexerOctave* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.go b/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.go index 8bbfc751..f8ab5be5 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.go @@ -35,46 +35,34 @@ func (this *QsciLexerOctave) UnsafePointer() unsafe.Pointer { } // newQsciLexerOctave constructs the type using only CGO pointers. -func newQsciLexerOctave(h *C.QsciLexerOctave, h_QsciLexerMatlab *C.QsciLexerMatlab, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerOctave { +func newQsciLexerOctave(h *C.QsciLexerOctave) *QsciLexerOctave { if h == nil { return nil } + var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil + C.QsciLexerOctave_virtbase(h, &outptr_QsciLexerMatlab) + return &QsciLexerOctave{h: h, - QsciLexerMatlab: newQsciLexerMatlab(h_QsciLexerMatlab, h_QsciLexer, h_QObject)} + QsciLexerMatlab: newQsciLexerMatlab(outptr_QsciLexerMatlab)} } // UnsafeNewQsciLexerOctave constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerOctave(h unsafe.Pointer, h_QsciLexerMatlab unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerOctave { - if h == nil { - return nil - } - - return &QsciLexerOctave{h: (*C.QsciLexerOctave)(h), - QsciLexerMatlab: UnsafeNewQsciLexerMatlab(h_QsciLexerMatlab, h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerOctave(h unsafe.Pointer) *QsciLexerOctave { + return newQsciLexerOctave((*C.QsciLexerOctave)(h)) } // NewQsciLexerOctave constructs a new QsciLexerOctave object. func NewQsciLexerOctave() *QsciLexerOctave { - var outptr_QsciLexerOctave *C.QsciLexerOctave = nil - var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerOctave_new(&outptr_QsciLexerOctave, &outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerOctave(outptr_QsciLexerOctave, outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerOctave(C.QsciLexerOctave_new()) ret.isSubclass = true return ret } // NewQsciLexerOctave2 constructs a new QsciLexerOctave object. func NewQsciLexerOctave2(parent *qt6.QObject) *QsciLexerOctave { - var outptr_QsciLexerOctave *C.QsciLexerOctave = nil - var outptr_QsciLexerMatlab *C.QsciLexerMatlab = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerOctave_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerOctave, &outptr_QsciLexerMatlab, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerOctave(outptr_QsciLexerOctave, outptr_QsciLexerMatlab, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerOctave(C.QsciLexerOctave_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.h b/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.h index f09975e8..45f85b62 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeroctave.h @@ -28,8 +28,9 @@ typedef struct QsciLexerMatlab QsciLexerMatlab; typedef struct QsciLexerOctave QsciLexerOctave; #endif -void QsciLexerOctave_new(QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerOctave_new2(QObject* parent, QsciLexerOctave** outptr_QsciLexerOctave, QsciLexerMatlab** outptr_QsciLexerMatlab, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerOctave* QsciLexerOctave_new(); +QsciLexerOctave* QsciLexerOctave_new2(QObject* parent); +void QsciLexerOctave_virtbase(QsciLexerOctave* src, QsciLexerMatlab** outptr_QsciLexerMatlab); QMetaObject* QsciLexerOctave_MetaObject(const QsciLexerOctave* self); void* QsciLexerOctave_Metacast(QsciLexerOctave* self, const char* param1); struct miqt_string QsciLexerOctave_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.cpp index de0cc922..287c865c 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.cpp @@ -911,18 +911,16 @@ public: }; -void QsciLexerPascal_new(QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPascal* ret = new MiqtVirtualQsciLexerPascal(); - *outptr_QsciLexerPascal = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPascal* QsciLexerPascal_new() { + return new MiqtVirtualQsciLexerPascal(); } -void QsciLexerPascal_new2(QObject* parent, QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPascal* ret = new MiqtVirtualQsciLexerPascal(parent); - *outptr_QsciLexerPascal = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPascal* QsciLexerPascal_new2(QObject* parent) { + return new MiqtVirtualQsciLexerPascal(parent); +} + +void QsciLexerPascal_virtbase(QsciLexerPascal* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerPascal_MetaObject(const QsciLexerPascal* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.go b/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.go index 43bdfac0..f6549991 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.go @@ -56,44 +56,34 @@ func (this *QsciLexerPascal) UnsafePointer() unsafe.Pointer { } // newQsciLexerPascal constructs the type using only CGO pointers. -func newQsciLexerPascal(h *C.QsciLexerPascal, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPascal { +func newQsciLexerPascal(h *C.QsciLexerPascal) *QsciLexerPascal { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerPascal_virtbase(h, &outptr_QsciLexer) + return &QsciLexerPascal{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerPascal constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerPascal(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPascal { - if h == nil { - return nil - } - - return &QsciLexerPascal{h: (*C.QsciLexerPascal)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerPascal(h unsafe.Pointer) *QsciLexerPascal { + return newQsciLexerPascal((*C.QsciLexerPascal)(h)) } // NewQsciLexerPascal constructs a new QsciLexerPascal object. func NewQsciLexerPascal() *QsciLexerPascal { - var outptr_QsciLexerPascal *C.QsciLexerPascal = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPascal_new(&outptr_QsciLexerPascal, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPascal(outptr_QsciLexerPascal, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPascal(C.QsciLexerPascal_new()) ret.isSubclass = true return ret } // NewQsciLexerPascal2 constructs a new QsciLexerPascal object. func NewQsciLexerPascal2(parent *qt6.QObject) *QsciLexerPascal { - var outptr_QsciLexerPascal *C.QsciLexerPascal = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPascal_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPascal, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPascal(outptr_QsciLexerPascal, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPascal(C.QsciLexerPascal_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1021,7 +1011,7 @@ func miqt_exec_callback_QsciLexerPascal_SetEditor(self *C.QsciLexerPascal, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerPascal{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1265,7 +1255,7 @@ func miqt_exec_callback_QsciLexerPascal_ReadProperties(self *C.QsciLexerPascal, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1302,7 +1292,7 @@ func miqt_exec_callback_QsciLexerPascal_WriteProperties(self *C.QsciLexerPascal, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.h b/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.h index 8a3137c0..628427f9 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpascal.h @@ -34,8 +34,9 @@ typedef struct QsciLexerPascal QsciLexerPascal; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerPascal_new(QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerPascal_new2(QObject* parent, QsciLexerPascal** outptr_QsciLexerPascal, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerPascal* QsciLexerPascal_new(); +QsciLexerPascal* QsciLexerPascal_new2(QObject* parent); +void QsciLexerPascal_virtbase(QsciLexerPascal* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerPascal_MetaObject(const QsciLexerPascal* self); void* QsciLexerPascal_Metacast(QsciLexerPascal* self, const char* param1); struct miqt_string QsciLexerPascal_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerperl.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerperl.cpp index a0ea58e8..df3d72e1 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerperl.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerperl.cpp @@ -887,18 +887,16 @@ public: }; -void QsciLexerPerl_new(QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPerl* ret = new MiqtVirtualQsciLexerPerl(); - *outptr_QsciLexerPerl = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPerl* QsciLexerPerl_new() { + return new MiqtVirtualQsciLexerPerl(); } -void QsciLexerPerl_new2(QObject* parent, QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPerl* ret = new MiqtVirtualQsciLexerPerl(parent); - *outptr_QsciLexerPerl = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPerl* QsciLexerPerl_new2(QObject* parent) { + return new MiqtVirtualQsciLexerPerl(parent); +} + +void QsciLexerPerl_virtbase(QsciLexerPerl* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerPerl_MetaObject(const QsciLexerPerl* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerperl.go b/qt-restricted-extras/qscintilla6/gen_qscilexerperl.go index 1f674923..e98d8db3 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerperl.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerperl.go @@ -82,44 +82,34 @@ func (this *QsciLexerPerl) UnsafePointer() unsafe.Pointer { } // newQsciLexerPerl constructs the type using only CGO pointers. -func newQsciLexerPerl(h *C.QsciLexerPerl, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPerl { +func newQsciLexerPerl(h *C.QsciLexerPerl) *QsciLexerPerl { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerPerl_virtbase(h, &outptr_QsciLexer) + return &QsciLexerPerl{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerPerl constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerPerl(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPerl { - if h == nil { - return nil - } - - return &QsciLexerPerl{h: (*C.QsciLexerPerl)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerPerl(h unsafe.Pointer) *QsciLexerPerl { + return newQsciLexerPerl((*C.QsciLexerPerl)(h)) } // NewQsciLexerPerl constructs a new QsciLexerPerl object. func NewQsciLexerPerl() *QsciLexerPerl { - var outptr_QsciLexerPerl *C.QsciLexerPerl = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPerl_new(&outptr_QsciLexerPerl, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPerl(outptr_QsciLexerPerl, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPerl(C.QsciLexerPerl_new()) ret.isSubclass = true return ret } // NewQsciLexerPerl2 constructs a new QsciLexerPerl object. func NewQsciLexerPerl2(parent *qt6.QObject) *QsciLexerPerl { - var outptr_QsciLexerPerl *C.QsciLexerPerl = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPerl_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPerl, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPerl(outptr_QsciLexerPerl, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPerl(C.QsciLexerPerl_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1024,7 +1014,7 @@ func miqt_exec_callback_QsciLexerPerl_SetEditor(self *C.QsciLexerPerl, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerPerl{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1268,7 +1258,7 @@ func miqt_exec_callback_QsciLexerPerl_ReadProperties(self *C.QsciLexerPerl, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1305,7 +1295,7 @@ func miqt_exec_callback_QsciLexerPerl_WriteProperties(self *C.QsciLexerPerl, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerperl.h b/qt-restricted-extras/qscintilla6/gen_qscilexerperl.h index d3a563ac..a1f572a5 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerperl.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerperl.h @@ -34,8 +34,9 @@ typedef struct QsciLexerPerl QsciLexerPerl; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerPerl_new(QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerPerl_new2(QObject* parent, QsciLexerPerl** outptr_QsciLexerPerl, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerPerl* QsciLexerPerl_new(); +QsciLexerPerl* QsciLexerPerl_new2(QObject* parent); +void QsciLexerPerl_virtbase(QsciLexerPerl* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerPerl_MetaObject(const QsciLexerPerl* self); void* QsciLexerPerl_Metacast(QsciLexerPerl* self, const char* param1); struct miqt_string QsciLexerPerl_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpo.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerpo.cpp index 7099faa8..4ad91c0e 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpo.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpo.cpp @@ -887,18 +887,16 @@ public: }; -void QsciLexerPO_new(QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPO* ret = new MiqtVirtualQsciLexerPO(); - *outptr_QsciLexerPO = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPO* QsciLexerPO_new() { + return new MiqtVirtualQsciLexerPO(); } -void QsciLexerPO_new2(QObject* parent, QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPO* ret = new MiqtVirtualQsciLexerPO(parent); - *outptr_QsciLexerPO = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPO* QsciLexerPO_new2(QObject* parent) { + return new MiqtVirtualQsciLexerPO(parent); +} + +void QsciLexerPO_virtbase(QsciLexerPO* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerPO_MetaObject(const QsciLexerPO* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpo.go b/qt-restricted-extras/qscintilla6/gen_qscilexerpo.go index 5e778a63..f941f838 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpo.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpo.go @@ -56,44 +56,34 @@ func (this *QsciLexerPO) UnsafePointer() unsafe.Pointer { } // newQsciLexerPO constructs the type using only CGO pointers. -func newQsciLexerPO(h *C.QsciLexerPO, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPO { +func newQsciLexerPO(h *C.QsciLexerPO) *QsciLexerPO { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerPO_virtbase(h, &outptr_QsciLexer) + return &QsciLexerPO{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerPO constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerPO(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPO { - if h == nil { - return nil - } - - return &QsciLexerPO{h: (*C.QsciLexerPO)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerPO(h unsafe.Pointer) *QsciLexerPO { + return newQsciLexerPO((*C.QsciLexerPO)(h)) } // NewQsciLexerPO constructs a new QsciLexerPO object. func NewQsciLexerPO() *QsciLexerPO { - var outptr_QsciLexerPO *C.QsciLexerPO = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPO_new(&outptr_QsciLexerPO, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPO(outptr_QsciLexerPO, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPO(C.QsciLexerPO_new()) ret.isSubclass = true return ret } // NewQsciLexerPO2 constructs a new QsciLexerPO object. func NewQsciLexerPO2(parent *qt6.QObject) *QsciLexerPO { - var outptr_QsciLexerPO *C.QsciLexerPO = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPO_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPO, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPO(outptr_QsciLexerPO, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPO(C.QsciLexerPO_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -917,7 +907,7 @@ func miqt_exec_callback_QsciLexerPO_SetEditor(self *C.QsciLexerPO, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerPO{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1161,7 +1151,7 @@ func miqt_exec_callback_QsciLexerPO_ReadProperties(self *C.QsciLexerPO, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1198,7 +1188,7 @@ func miqt_exec_callback_QsciLexerPO_WriteProperties(self *C.QsciLexerPO, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpo.h b/qt-restricted-extras/qscintilla6/gen_qscilexerpo.h index 217c5088..49af6c5e 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpo.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpo.h @@ -34,8 +34,9 @@ typedef struct QsciLexerPO QsciLexerPO; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerPO_new(QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerPO_new2(QObject* parent, QsciLexerPO** outptr_QsciLexerPO, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerPO* QsciLexerPO_new(); +QsciLexerPO* QsciLexerPO_new2(QObject* parent); +void QsciLexerPO_virtbase(QsciLexerPO* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerPO_MetaObject(const QsciLexerPO* self); void* QsciLexerPO_Metacast(QsciLexerPO* self, const char* param1); struct miqt_string QsciLexerPO_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.cpp index d0220663..b38a2270 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.cpp @@ -935,18 +935,16 @@ public: }; -void QsciLexerPostScript_new(QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPostScript* ret = new MiqtVirtualQsciLexerPostScript(); - *outptr_QsciLexerPostScript = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPostScript* QsciLexerPostScript_new() { + return new MiqtVirtualQsciLexerPostScript(); } -void QsciLexerPostScript_new2(QObject* parent, QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPostScript* ret = new MiqtVirtualQsciLexerPostScript(parent); - *outptr_QsciLexerPostScript = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPostScript* QsciLexerPostScript_new2(QObject* parent) { + return new MiqtVirtualQsciLexerPostScript(parent); +} + +void QsciLexerPostScript_virtbase(QsciLexerPostScript* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerPostScript_MetaObject(const QsciLexerPostScript* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.go b/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.go index bc450952..029e4fb4 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.go @@ -57,44 +57,34 @@ func (this *QsciLexerPostScript) UnsafePointer() unsafe.Pointer { } // newQsciLexerPostScript constructs the type using only CGO pointers. -func newQsciLexerPostScript(h *C.QsciLexerPostScript, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPostScript { +func newQsciLexerPostScript(h *C.QsciLexerPostScript) *QsciLexerPostScript { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerPostScript_virtbase(h, &outptr_QsciLexer) + return &QsciLexerPostScript{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerPostScript constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerPostScript(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPostScript { - if h == nil { - return nil - } - - return &QsciLexerPostScript{h: (*C.QsciLexerPostScript)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerPostScript(h unsafe.Pointer) *QsciLexerPostScript { + return newQsciLexerPostScript((*C.QsciLexerPostScript)(h)) } // NewQsciLexerPostScript constructs a new QsciLexerPostScript object. func NewQsciLexerPostScript() *QsciLexerPostScript { - var outptr_QsciLexerPostScript *C.QsciLexerPostScript = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPostScript_new(&outptr_QsciLexerPostScript, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPostScript(outptr_QsciLexerPostScript, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPostScript(C.QsciLexerPostScript_new()) ret.isSubclass = true return ret } // NewQsciLexerPostScript2 constructs a new QsciLexerPostScript object. func NewQsciLexerPostScript2(parent *qt6.QObject) *QsciLexerPostScript { - var outptr_QsciLexerPostScript *C.QsciLexerPostScript = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPostScript_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPostScript, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPostScript(outptr_QsciLexerPostScript, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPostScript(C.QsciLexerPostScript_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1001,7 +991,7 @@ func miqt_exec_callback_QsciLexerPostScript_SetEditor(self *C.QsciLexerPostScrip } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerPostScript{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1245,7 +1235,7 @@ func miqt_exec_callback_QsciLexerPostScript_ReadProperties(self *C.QsciLexerPost } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1282,7 +1272,7 @@ func miqt_exec_callback_QsciLexerPostScript_WriteProperties(self *C.QsciLexerPos } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.h b/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.h index 56a937ba..92ba7c58 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpostscript.h @@ -34,8 +34,9 @@ typedef struct QsciLexerPostScript QsciLexerPostScript; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerPostScript_new(QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerPostScript_new2(QObject* parent, QsciLexerPostScript** outptr_QsciLexerPostScript, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerPostScript* QsciLexerPostScript_new(); +QsciLexerPostScript* QsciLexerPostScript_new2(QObject* parent); +void QsciLexerPostScript_virtbase(QsciLexerPostScript* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerPostScript_MetaObject(const QsciLexerPostScript* self); void* QsciLexerPostScript_Metacast(QsciLexerPostScript* self, const char* param1); struct miqt_string QsciLexerPostScript_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpov.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerpov.cpp index dcd12509..31799ac5 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpov.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpov.cpp @@ -911,18 +911,16 @@ public: }; -void QsciLexerPOV_new(QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPOV* ret = new MiqtVirtualQsciLexerPOV(); - *outptr_QsciLexerPOV = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPOV* QsciLexerPOV_new() { + return new MiqtVirtualQsciLexerPOV(); } -void QsciLexerPOV_new2(QObject* parent, QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPOV* ret = new MiqtVirtualQsciLexerPOV(parent); - *outptr_QsciLexerPOV = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPOV* QsciLexerPOV_new2(QObject* parent) { + return new MiqtVirtualQsciLexerPOV(parent); +} + +void QsciLexerPOV_virtbase(QsciLexerPOV* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerPOV_MetaObject(const QsciLexerPOV* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpov.go b/qt-restricted-extras/qscintilla6/gen_qscilexerpov.go index 9869ed4d..1ea3c207 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpov.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpov.go @@ -58,44 +58,34 @@ func (this *QsciLexerPOV) UnsafePointer() unsafe.Pointer { } // newQsciLexerPOV constructs the type using only CGO pointers. -func newQsciLexerPOV(h *C.QsciLexerPOV, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPOV { +func newQsciLexerPOV(h *C.QsciLexerPOV) *QsciLexerPOV { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerPOV_virtbase(h, &outptr_QsciLexer) + return &QsciLexerPOV{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerPOV constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerPOV(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPOV { - if h == nil { - return nil - } - - return &QsciLexerPOV{h: (*C.QsciLexerPOV)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerPOV(h unsafe.Pointer) *QsciLexerPOV { + return newQsciLexerPOV((*C.QsciLexerPOV)(h)) } // NewQsciLexerPOV constructs a new QsciLexerPOV object. func NewQsciLexerPOV() *QsciLexerPOV { - var outptr_QsciLexerPOV *C.QsciLexerPOV = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPOV_new(&outptr_QsciLexerPOV, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPOV(outptr_QsciLexerPOV, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPOV(C.QsciLexerPOV_new()) ret.isSubclass = true return ret } // NewQsciLexerPOV2 constructs a new QsciLexerPOV object. func NewQsciLexerPOV2(parent *qt6.QObject) *QsciLexerPOV { - var outptr_QsciLexerPOV *C.QsciLexerPOV = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPOV_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPOV, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPOV(outptr_QsciLexerPOV, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPOV(C.QsciLexerPOV_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -977,7 +967,7 @@ func miqt_exec_callback_QsciLexerPOV_SetEditor(self *C.QsciLexerPOV, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerPOV{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1221,7 +1211,7 @@ func miqt_exec_callback_QsciLexerPOV_ReadProperties(self *C.QsciLexerPOV, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1258,7 +1248,7 @@ func miqt_exec_callback_QsciLexerPOV_WriteProperties(self *C.QsciLexerPOV, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpov.h b/qt-restricted-extras/qscintilla6/gen_qscilexerpov.h index 517359e4..6dea9006 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpov.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpov.h @@ -34,8 +34,9 @@ typedef struct QsciLexerPOV QsciLexerPOV; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerPOV_new(QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerPOV_new2(QObject* parent, QsciLexerPOV** outptr_QsciLexerPOV, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerPOV* QsciLexerPOV_new(); +QsciLexerPOV* QsciLexerPOV_new2(QObject* parent); +void QsciLexerPOV_virtbase(QsciLexerPOV* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerPOV_MetaObject(const QsciLexerPOV* self); void* QsciLexerPOV_Metacast(QsciLexerPOV* self, const char* param1); struct miqt_string QsciLexerPOV_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.cpp index e1f28f1c..a750d954 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.cpp @@ -863,18 +863,16 @@ public: }; -void QsciLexerProperties_new(QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerProperties* ret = new MiqtVirtualQsciLexerProperties(); - *outptr_QsciLexerProperties = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerProperties* QsciLexerProperties_new() { + return new MiqtVirtualQsciLexerProperties(); } -void QsciLexerProperties_new2(QObject* parent, QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerProperties* ret = new MiqtVirtualQsciLexerProperties(parent); - *outptr_QsciLexerProperties = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerProperties* QsciLexerProperties_new2(QObject* parent) { + return new MiqtVirtualQsciLexerProperties(parent); +} + +void QsciLexerProperties_virtbase(QsciLexerProperties* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerProperties_MetaObject(const QsciLexerProperties* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.go b/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.go index a0ab8c8d..c26fb09a 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.go @@ -47,44 +47,34 @@ func (this *QsciLexerProperties) UnsafePointer() unsafe.Pointer { } // newQsciLexerProperties constructs the type using only CGO pointers. -func newQsciLexerProperties(h *C.QsciLexerProperties, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerProperties { +func newQsciLexerProperties(h *C.QsciLexerProperties) *QsciLexerProperties { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerProperties_virtbase(h, &outptr_QsciLexer) + return &QsciLexerProperties{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerProperties constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerProperties(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerProperties { - if h == nil { - return nil - } - - return &QsciLexerProperties{h: (*C.QsciLexerProperties)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerProperties(h unsafe.Pointer) *QsciLexerProperties { + return newQsciLexerProperties((*C.QsciLexerProperties)(h)) } // NewQsciLexerProperties constructs a new QsciLexerProperties object. func NewQsciLexerProperties() *QsciLexerProperties { - var outptr_QsciLexerProperties *C.QsciLexerProperties = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerProperties_new(&outptr_QsciLexerProperties, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerProperties(outptr_QsciLexerProperties, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerProperties(C.QsciLexerProperties_new()) ret.isSubclass = true return ret } // NewQsciLexerProperties2 constructs a new QsciLexerProperties object. func NewQsciLexerProperties2(parent *qt6.QObject) *QsciLexerProperties { - var outptr_QsciLexerProperties *C.QsciLexerProperties = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerProperties_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerProperties, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerProperties(outptr_QsciLexerProperties, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerProperties(C.QsciLexerProperties_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -897,7 +887,7 @@ func miqt_exec_callback_QsciLexerProperties_SetEditor(self *C.QsciLexerPropertie } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerProperties{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1141,7 +1131,7 @@ func miqt_exec_callback_QsciLexerProperties_ReadProperties(self *C.QsciLexerProp } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1178,7 +1168,7 @@ func miqt_exec_callback_QsciLexerProperties_WriteProperties(self *C.QsciLexerPro } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.h b/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.h index 75c0ca6c..1bfd9128 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerproperties.h @@ -34,8 +34,9 @@ typedef struct QsciLexerProperties QsciLexerProperties; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerProperties_new(QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerProperties_new2(QObject* parent, QsciLexerProperties** outptr_QsciLexerProperties, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerProperties* QsciLexerProperties_new(); +QsciLexerProperties* QsciLexerProperties_new2(QObject* parent); +void QsciLexerProperties_virtbase(QsciLexerProperties* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerProperties_MetaObject(const QsciLexerProperties* self); void* QsciLexerProperties_Metacast(QsciLexerProperties* self, const char* param1); struct miqt_string QsciLexerProperties_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpython.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerpython.cpp index ab7c36e9..8dcdb6b1 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpython.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpython.cpp @@ -912,18 +912,16 @@ public: }; -void QsciLexerPython_new(QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPython* ret = new MiqtVirtualQsciLexerPython(); - *outptr_QsciLexerPython = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPython* QsciLexerPython_new() { + return new MiqtVirtualQsciLexerPython(); } -void QsciLexerPython_new2(QObject* parent, QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerPython* ret = new MiqtVirtualQsciLexerPython(parent); - *outptr_QsciLexerPython = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerPython* QsciLexerPython_new2(QObject* parent) { + return new MiqtVirtualQsciLexerPython(parent); +} + +void QsciLexerPython_virtbase(QsciLexerPython* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerPython_MetaObject(const QsciLexerPython* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpython.go b/qt-restricted-extras/qscintilla6/gen_qscilexerpython.go index 3bfee891..45cf16b2 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpython.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpython.go @@ -71,44 +71,34 @@ func (this *QsciLexerPython) UnsafePointer() unsafe.Pointer { } // newQsciLexerPython constructs the type using only CGO pointers. -func newQsciLexerPython(h *C.QsciLexerPython, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerPython { +func newQsciLexerPython(h *C.QsciLexerPython) *QsciLexerPython { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerPython_virtbase(h, &outptr_QsciLexer) + return &QsciLexerPython{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerPython constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerPython(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerPython { - if h == nil { - return nil - } - - return &QsciLexerPython{h: (*C.QsciLexerPython)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerPython(h unsafe.Pointer) *QsciLexerPython { + return newQsciLexerPython((*C.QsciLexerPython)(h)) } // NewQsciLexerPython constructs a new QsciLexerPython object. func NewQsciLexerPython() *QsciLexerPython { - var outptr_QsciLexerPython *C.QsciLexerPython = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPython_new(&outptr_QsciLexerPython, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPython(outptr_QsciLexerPython, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPython(C.QsciLexerPython_new()) ret.isSubclass = true return ret } // NewQsciLexerPython2 constructs a new QsciLexerPython object. func NewQsciLexerPython2(parent *qt6.QObject) *QsciLexerPython { - var outptr_QsciLexerPython *C.QsciLexerPython = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerPython_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerPython, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerPython(outptr_QsciLexerPython, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerPython(C.QsciLexerPython_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1064,7 +1054,7 @@ func miqt_exec_callback_QsciLexerPython_SetEditor(self *C.QsciLexerPython, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerPython{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1308,7 +1298,7 @@ func miqt_exec_callback_QsciLexerPython_ReadProperties(self *C.QsciLexerPython, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1345,7 +1335,7 @@ func miqt_exec_callback_QsciLexerPython_WriteProperties(self *C.QsciLexerPython, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerpython.h b/qt-restricted-extras/qscintilla6/gen_qscilexerpython.h index 99af75b5..4eea3508 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerpython.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerpython.h @@ -34,8 +34,9 @@ typedef struct QsciLexerPython QsciLexerPython; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerPython_new(QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerPython_new2(QObject* parent, QsciLexerPython** outptr_QsciLexerPython, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerPython* QsciLexerPython_new(); +QsciLexerPython* QsciLexerPython_new2(QObject* parent); +void QsciLexerPython_virtbase(QsciLexerPython* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerPython_MetaObject(const QsciLexerPython* self); void* QsciLexerPython_Metacast(QsciLexerPython* self, const char* param1); struct miqt_string QsciLexerPython_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerruby.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerruby.cpp index 51de4305..8cac4219 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerruby.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerruby.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerRuby_new(QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerRuby* ret = new MiqtVirtualQsciLexerRuby(); - *outptr_QsciLexerRuby = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerRuby* QsciLexerRuby_new() { + return new MiqtVirtualQsciLexerRuby(); } -void QsciLexerRuby_new2(QObject* parent, QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerRuby* ret = new MiqtVirtualQsciLexerRuby(parent); - *outptr_QsciLexerRuby = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerRuby* QsciLexerRuby_new2(QObject* parent) { + return new MiqtVirtualQsciLexerRuby(parent); +} + +void QsciLexerRuby_virtbase(QsciLexerRuby* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerRuby_MetaObject(const QsciLexerRuby* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerruby.go b/qt-restricted-extras/qscintilla6/gen_qscilexerruby.go index a578e1a2..79bfd43b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerruby.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerruby.go @@ -72,44 +72,34 @@ func (this *QsciLexerRuby) UnsafePointer() unsafe.Pointer { } // newQsciLexerRuby constructs the type using only CGO pointers. -func newQsciLexerRuby(h *C.QsciLexerRuby, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerRuby { +func newQsciLexerRuby(h *C.QsciLexerRuby) *QsciLexerRuby { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerRuby_virtbase(h, &outptr_QsciLexer) + return &QsciLexerRuby{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerRuby constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerRuby(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerRuby { - if h == nil { - return nil - } - - return &QsciLexerRuby{h: (*C.QsciLexerRuby)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerRuby(h unsafe.Pointer) *QsciLexerRuby { + return newQsciLexerRuby((*C.QsciLexerRuby)(h)) } // NewQsciLexerRuby constructs a new QsciLexerRuby object. func NewQsciLexerRuby() *QsciLexerRuby { - var outptr_QsciLexerRuby *C.QsciLexerRuby = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerRuby_new(&outptr_QsciLexerRuby, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerRuby(outptr_QsciLexerRuby, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerRuby(C.QsciLexerRuby_new()) ret.isSubclass = true return ret } // NewQsciLexerRuby2 constructs a new QsciLexerRuby object. func NewQsciLexerRuby2(parent *qt6.QObject) *QsciLexerRuby { - var outptr_QsciLexerRuby *C.QsciLexerRuby = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerRuby_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerRuby, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerRuby(outptr_QsciLexerRuby, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerRuby(C.QsciLexerRuby_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -930,7 +920,7 @@ func miqt_exec_callback_QsciLexerRuby_SetEditor(self *C.QsciLexerRuby, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerRuby{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1174,7 +1164,7 @@ func miqt_exec_callback_QsciLexerRuby_ReadProperties(self *C.QsciLexerRuby, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1211,7 +1201,7 @@ func miqt_exec_callback_QsciLexerRuby_WriteProperties(self *C.QsciLexerRuby, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerruby.h b/qt-restricted-extras/qscintilla6/gen_qscilexerruby.h index e23cb618..507693ff 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerruby.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerruby.h @@ -34,8 +34,9 @@ typedef struct QsciLexerRuby QsciLexerRuby; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerRuby_new(QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerRuby_new2(QObject* parent, QsciLexerRuby** outptr_QsciLexerRuby, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerRuby* QsciLexerRuby_new(); +QsciLexerRuby* QsciLexerRuby_new2(QObject* parent); +void QsciLexerRuby_virtbase(QsciLexerRuby* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerRuby_MetaObject(const QsciLexerRuby* self); void* QsciLexerRuby_Metacast(QsciLexerRuby* self, const char* param1); struct miqt_string QsciLexerRuby_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerspice.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerspice.cpp index 3b4d5004..cc3fe7bd 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerspice.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerspice.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerSpice_new(QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerSpice* ret = new MiqtVirtualQsciLexerSpice(); - *outptr_QsciLexerSpice = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerSpice* QsciLexerSpice_new() { + return new MiqtVirtualQsciLexerSpice(); } -void QsciLexerSpice_new2(QObject* parent, QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerSpice* ret = new MiqtVirtualQsciLexerSpice(parent); - *outptr_QsciLexerSpice = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerSpice* QsciLexerSpice_new2(QObject* parent) { + return new MiqtVirtualQsciLexerSpice(parent); +} + +void QsciLexerSpice_virtbase(QsciLexerSpice* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerSpice_MetaObject(const QsciLexerSpice* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerspice.go b/qt-restricted-extras/qscintilla6/gen_qscilexerspice.go index 27c562fe..ae3c4116 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerspice.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerspice.go @@ -50,44 +50,34 @@ func (this *QsciLexerSpice) UnsafePointer() unsafe.Pointer { } // newQsciLexerSpice constructs the type using only CGO pointers. -func newQsciLexerSpice(h *C.QsciLexerSpice, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerSpice { +func newQsciLexerSpice(h *C.QsciLexerSpice) *QsciLexerSpice { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerSpice_virtbase(h, &outptr_QsciLexer) + return &QsciLexerSpice{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerSpice constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerSpice(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerSpice { - if h == nil { - return nil - } - - return &QsciLexerSpice{h: (*C.QsciLexerSpice)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerSpice(h unsafe.Pointer) *QsciLexerSpice { + return newQsciLexerSpice((*C.QsciLexerSpice)(h)) } // NewQsciLexerSpice constructs a new QsciLexerSpice object. func NewQsciLexerSpice() *QsciLexerSpice { - var outptr_QsciLexerSpice *C.QsciLexerSpice = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerSpice_new(&outptr_QsciLexerSpice, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerSpice(outptr_QsciLexerSpice, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerSpice(C.QsciLexerSpice_new()) ret.isSubclass = true return ret } // NewQsciLexerSpice2 constructs a new QsciLexerSpice object. func NewQsciLexerSpice2(parent *qt6.QObject) *QsciLexerSpice { - var outptr_QsciLexerSpice *C.QsciLexerSpice = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerSpice_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerSpice, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerSpice(outptr_QsciLexerSpice, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerSpice(C.QsciLexerSpice_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -848,7 +838,7 @@ func miqt_exec_callback_QsciLexerSpice_SetEditor(self *C.QsciLexerSpice, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerSpice{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1092,7 +1082,7 @@ func miqt_exec_callback_QsciLexerSpice_ReadProperties(self *C.QsciLexerSpice, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1129,7 +1119,7 @@ func miqt_exec_callback_QsciLexerSpice_WriteProperties(self *C.QsciLexerSpice, c } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerspice.h b/qt-restricted-extras/qscintilla6/gen_qscilexerspice.h index a94ae16b..b26a45b8 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerspice.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerspice.h @@ -34,8 +34,9 @@ typedef struct QsciLexerSpice QsciLexerSpice; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerSpice_new(QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerSpice_new2(QObject* parent, QsciLexerSpice** outptr_QsciLexerSpice, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerSpice* QsciLexerSpice_new(); +QsciLexerSpice* QsciLexerSpice_new2(QObject* parent); +void QsciLexerSpice_virtbase(QsciLexerSpice* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerSpice_MetaObject(const QsciLexerSpice* self); void* QsciLexerSpice_Metacast(QsciLexerSpice* self, const char* param1); struct miqt_string QsciLexerSpice_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexersql.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexersql.cpp index 49c52cb0..8ea3d783 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexersql.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexersql.cpp @@ -911,18 +911,16 @@ public: }; -void QsciLexerSQL_new(QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerSQL* ret = new MiqtVirtualQsciLexerSQL(); - *outptr_QsciLexerSQL = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerSQL* QsciLexerSQL_new() { + return new MiqtVirtualQsciLexerSQL(); } -void QsciLexerSQL_new2(QObject* parent, QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerSQL* ret = new MiqtVirtualQsciLexerSQL(parent); - *outptr_QsciLexerSQL = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerSQL* QsciLexerSQL_new2(QObject* parent) { + return new MiqtVirtualQsciLexerSQL(parent); +} + +void QsciLexerSQL_virtbase(QsciLexerSQL* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerSQL_MetaObject(const QsciLexerSQL* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexersql.go b/qt-restricted-extras/qscintilla6/gen_qscilexersql.go index 0e0ddba2..e6b2a5e1 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexersql.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexersql.go @@ -63,44 +63,34 @@ func (this *QsciLexerSQL) UnsafePointer() unsafe.Pointer { } // newQsciLexerSQL constructs the type using only CGO pointers. -func newQsciLexerSQL(h *C.QsciLexerSQL, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerSQL { +func newQsciLexerSQL(h *C.QsciLexerSQL) *QsciLexerSQL { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerSQL_virtbase(h, &outptr_QsciLexer) + return &QsciLexerSQL{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerSQL constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerSQL(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerSQL { - if h == nil { - return nil - } - - return &QsciLexerSQL{h: (*C.QsciLexerSQL)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerSQL(h unsafe.Pointer) *QsciLexerSQL { + return newQsciLexerSQL((*C.QsciLexerSQL)(h)) } // NewQsciLexerSQL constructs a new QsciLexerSQL object. func NewQsciLexerSQL() *QsciLexerSQL { - var outptr_QsciLexerSQL *C.QsciLexerSQL = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerSQL_new(&outptr_QsciLexerSQL, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerSQL(outptr_QsciLexerSQL, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerSQL(C.QsciLexerSQL_new()) ret.isSubclass = true return ret } // NewQsciLexerSQL2 constructs a new QsciLexerSQL object. func NewQsciLexerSQL2(parent *qt6.QObject) *QsciLexerSQL { - var outptr_QsciLexerSQL *C.QsciLexerSQL = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerSQL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerSQL, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerSQL(outptr_QsciLexerSQL, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerSQL(C.QsciLexerSQL_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1017,7 +1007,7 @@ func miqt_exec_callback_QsciLexerSQL_SetEditor(self *C.QsciLexerSQL, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerSQL{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1261,7 +1251,7 @@ func miqt_exec_callback_QsciLexerSQL_ReadProperties(self *C.QsciLexerSQL, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1298,7 +1288,7 @@ func miqt_exec_callback_QsciLexerSQL_WriteProperties(self *C.QsciLexerSQL, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexersql.h b/qt-restricted-extras/qscintilla6/gen_qscilexersql.h index 590abc03..5de7ffb1 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexersql.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexersql.h @@ -34,8 +34,9 @@ typedef struct QsciLexerSQL QsciLexerSQL; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerSQL_new(QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerSQL_new2(QObject* parent, QsciLexerSQL** outptr_QsciLexerSQL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerSQL* QsciLexerSQL_new(); +QsciLexerSQL* QsciLexerSQL_new2(QObject* parent); +void QsciLexerSQL_virtbase(QsciLexerSQL* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerSQL_MetaObject(const QsciLexerSQL* self); void* QsciLexerSQL_Metacast(QsciLexerSQL* self, const char* param1); struct miqt_string QsciLexerSQL_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexertcl.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexertcl.cpp index 20cee6aa..e2e8d426 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexertcl.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexertcl.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerTCL_new(QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerTCL* ret = new MiqtVirtualQsciLexerTCL(); - *outptr_QsciLexerTCL = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerTCL* QsciLexerTCL_new() { + return new MiqtVirtualQsciLexerTCL(); } -void QsciLexerTCL_new2(QObject* parent, QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerTCL* ret = new MiqtVirtualQsciLexerTCL(parent); - *outptr_QsciLexerTCL = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerTCL* QsciLexerTCL_new2(QObject* parent) { + return new MiqtVirtualQsciLexerTCL(parent); +} + +void QsciLexerTCL_virtbase(QsciLexerTCL* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerTCL_MetaObject(const QsciLexerTCL* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexertcl.go b/qt-restricted-extras/qscintilla6/gen_qscilexertcl.go index 47f1c254..c6ae1479 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexertcl.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexertcl.go @@ -63,44 +63,34 @@ func (this *QsciLexerTCL) UnsafePointer() unsafe.Pointer { } // newQsciLexerTCL constructs the type using only CGO pointers. -func newQsciLexerTCL(h *C.QsciLexerTCL, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerTCL { +func newQsciLexerTCL(h *C.QsciLexerTCL) *QsciLexerTCL { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerTCL_virtbase(h, &outptr_QsciLexer) + return &QsciLexerTCL{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerTCL constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerTCL(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerTCL { - if h == nil { - return nil - } - - return &QsciLexerTCL{h: (*C.QsciLexerTCL)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerTCL(h unsafe.Pointer) *QsciLexerTCL { + return newQsciLexerTCL((*C.QsciLexerTCL)(h)) } // NewQsciLexerTCL constructs a new QsciLexerTCL object. func NewQsciLexerTCL() *QsciLexerTCL { - var outptr_QsciLexerTCL *C.QsciLexerTCL = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerTCL_new(&outptr_QsciLexerTCL, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerTCL(outptr_QsciLexerTCL, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerTCL(C.QsciLexerTCL_new()) ret.isSubclass = true return ret } // NewQsciLexerTCL2 constructs a new QsciLexerTCL object. func NewQsciLexerTCL2(parent *qt6.QObject) *QsciLexerTCL { - var outptr_QsciLexerTCL *C.QsciLexerTCL = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerTCL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerTCL, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerTCL(outptr_QsciLexerTCL, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerTCL(C.QsciLexerTCL_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -883,7 +873,7 @@ func miqt_exec_callback_QsciLexerTCL_SetEditor(self *C.QsciLexerTCL, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerTCL{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1127,7 +1117,7 @@ func miqt_exec_callback_QsciLexerTCL_ReadProperties(self *C.QsciLexerTCL, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1164,7 +1154,7 @@ func miqt_exec_callback_QsciLexerTCL_WriteProperties(self *C.QsciLexerTCL, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexertcl.h b/qt-restricted-extras/qscintilla6/gen_qscilexertcl.h index c2f28945..1ee73c7b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexertcl.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexertcl.h @@ -34,8 +34,9 @@ typedef struct QsciLexerTCL QsciLexerTCL; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerTCL_new(QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerTCL_new2(QObject* parent, QsciLexerTCL** outptr_QsciLexerTCL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerTCL* QsciLexerTCL_new(); +QsciLexerTCL* QsciLexerTCL_new2(QObject* parent); +void QsciLexerTCL_virtbase(QsciLexerTCL* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerTCL_MetaObject(const QsciLexerTCL* self); void* QsciLexerTCL_Metacast(QsciLexerTCL* self, const char* param1); struct miqt_string QsciLexerTCL_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexertex.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexertex.cpp index 29cd27f0..64c1762f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexertex.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexertex.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerTeX_new(QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerTeX* ret = new MiqtVirtualQsciLexerTeX(); - *outptr_QsciLexerTeX = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerTeX* QsciLexerTeX_new() { + return new MiqtVirtualQsciLexerTeX(); } -void QsciLexerTeX_new2(QObject* parent, QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerTeX* ret = new MiqtVirtualQsciLexerTeX(parent); - *outptr_QsciLexerTeX = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerTeX* QsciLexerTeX_new2(QObject* parent) { + return new MiqtVirtualQsciLexerTeX(parent); +} + +void QsciLexerTeX_virtbase(QsciLexerTeX* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerTeX_MetaObject(const QsciLexerTeX* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexertex.go b/qt-restricted-extras/qscintilla6/gen_qscilexertex.go index 6ed5fdf1..1e718e31 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexertex.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexertex.go @@ -47,44 +47,34 @@ func (this *QsciLexerTeX) UnsafePointer() unsafe.Pointer { } // newQsciLexerTeX constructs the type using only CGO pointers. -func newQsciLexerTeX(h *C.QsciLexerTeX, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerTeX { +func newQsciLexerTeX(h *C.QsciLexerTeX) *QsciLexerTeX { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerTeX_virtbase(h, &outptr_QsciLexer) + return &QsciLexerTeX{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerTeX constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerTeX(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerTeX { - if h == nil { - return nil - } - - return &QsciLexerTeX{h: (*C.QsciLexerTeX)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerTeX(h unsafe.Pointer) *QsciLexerTeX { + return newQsciLexerTeX((*C.QsciLexerTeX)(h)) } // NewQsciLexerTeX constructs a new QsciLexerTeX object. func NewQsciLexerTeX() *QsciLexerTeX { - var outptr_QsciLexerTeX *C.QsciLexerTeX = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerTeX_new(&outptr_QsciLexerTeX, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerTeX(outptr_QsciLexerTeX, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerTeX(C.QsciLexerTeX_new()) ret.isSubclass = true return ret } // NewQsciLexerTeX2 constructs a new QsciLexerTeX object. func NewQsciLexerTeX2(parent *qt6.QObject) *QsciLexerTeX { - var outptr_QsciLexerTeX *C.QsciLexerTeX = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerTeX_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerTeX, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerTeX(outptr_QsciLexerTeX, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerTeX(C.QsciLexerTeX_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -876,7 +866,7 @@ func miqt_exec_callback_QsciLexerTeX_SetEditor(self *C.QsciLexerTeX, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerTeX{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1120,7 +1110,7 @@ func miqt_exec_callback_QsciLexerTeX_ReadProperties(self *C.QsciLexerTeX, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1157,7 +1147,7 @@ func miqt_exec_callback_QsciLexerTeX_WriteProperties(self *C.QsciLexerTeX, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexertex.h b/qt-restricted-extras/qscintilla6/gen_qscilexertex.h index f797fdbc..654a258f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexertex.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexertex.h @@ -34,8 +34,9 @@ typedef struct QsciLexerTeX QsciLexerTeX; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerTeX_new(QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerTeX_new2(QObject* parent, QsciLexerTeX** outptr_QsciLexerTeX, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerTeX* QsciLexerTeX_new(); +QsciLexerTeX* QsciLexerTeX_new2(QObject* parent); +void QsciLexerTeX_virtbase(QsciLexerTeX* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerTeX_MetaObject(const QsciLexerTeX* self); void* QsciLexerTeX_Metacast(QsciLexerTeX* self, const char* param1); struct miqt_string QsciLexerTeX_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.cpp index 2d0f2876..8053dcf7 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.cpp @@ -839,18 +839,16 @@ public: }; -void QsciLexerVerilog_new(QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerVerilog* ret = new MiqtVirtualQsciLexerVerilog(); - *outptr_QsciLexerVerilog = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerVerilog* QsciLexerVerilog_new() { + return new MiqtVirtualQsciLexerVerilog(); } -void QsciLexerVerilog_new2(QObject* parent, QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerVerilog* ret = new MiqtVirtualQsciLexerVerilog(parent); - *outptr_QsciLexerVerilog = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerVerilog* QsciLexerVerilog_new2(QObject* parent) { + return new MiqtVirtualQsciLexerVerilog(parent); +} + +void QsciLexerVerilog_virtbase(QsciLexerVerilog* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerVerilog_MetaObject(const QsciLexerVerilog* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.go b/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.go index 6fdc2d9c..406bfced 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.go @@ -79,44 +79,34 @@ func (this *QsciLexerVerilog) UnsafePointer() unsafe.Pointer { } // newQsciLexerVerilog constructs the type using only CGO pointers. -func newQsciLexerVerilog(h *C.QsciLexerVerilog, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerVerilog { +func newQsciLexerVerilog(h *C.QsciLexerVerilog) *QsciLexerVerilog { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerVerilog_virtbase(h, &outptr_QsciLexer) + return &QsciLexerVerilog{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerVerilog constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerVerilog(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerVerilog { - if h == nil { - return nil - } - - return &QsciLexerVerilog{h: (*C.QsciLexerVerilog)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerVerilog(h unsafe.Pointer) *QsciLexerVerilog { + return newQsciLexerVerilog((*C.QsciLexerVerilog)(h)) } // NewQsciLexerVerilog constructs a new QsciLexerVerilog object. func NewQsciLexerVerilog() *QsciLexerVerilog { - var outptr_QsciLexerVerilog *C.QsciLexerVerilog = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerVerilog_new(&outptr_QsciLexerVerilog, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerVerilog(outptr_QsciLexerVerilog, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerVerilog(C.QsciLexerVerilog_new()) ret.isSubclass = true return ret } // NewQsciLexerVerilog2 constructs a new QsciLexerVerilog object. func NewQsciLexerVerilog2(parent *qt6.QObject) *QsciLexerVerilog { - var outptr_QsciLexerVerilog *C.QsciLexerVerilog = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerVerilog_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerVerilog, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerVerilog(outptr_QsciLexerVerilog, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerVerilog(C.QsciLexerVerilog_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -936,7 +926,7 @@ func miqt_exec_callback_QsciLexerVerilog_SetEditor(self *C.QsciLexerVerilog, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerVerilog{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1180,7 +1170,7 @@ func miqt_exec_callback_QsciLexerVerilog_ReadProperties(self *C.QsciLexerVerilog } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1217,7 +1207,7 @@ func miqt_exec_callback_QsciLexerVerilog_WriteProperties(self *C.QsciLexerVerilo } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.h b/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.h index 8f51b53b..e48e78a5 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerverilog.h @@ -34,8 +34,9 @@ typedef struct QsciLexerVerilog QsciLexerVerilog; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerVerilog_new(QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerVerilog_new2(QObject* parent, QsciLexerVerilog** outptr_QsciLexerVerilog, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerVerilog* QsciLexerVerilog_new(); +QsciLexerVerilog* QsciLexerVerilog_new2(QObject* parent); +void QsciLexerVerilog_virtbase(QsciLexerVerilog* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerVerilog_MetaObject(const QsciLexerVerilog* self); void* QsciLexerVerilog_Metacast(QsciLexerVerilog* self, const char* param1); struct miqt_string QsciLexerVerilog_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.cpp index 7c383531..dff241da 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.cpp @@ -959,18 +959,16 @@ public: }; -void QsciLexerVHDL_new(QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerVHDL* ret = new MiqtVirtualQsciLexerVHDL(); - *outptr_QsciLexerVHDL = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerVHDL* QsciLexerVHDL_new() { + return new MiqtVirtualQsciLexerVHDL(); } -void QsciLexerVHDL_new2(QObject* parent, QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerVHDL* ret = new MiqtVirtualQsciLexerVHDL(parent); - *outptr_QsciLexerVHDL = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerVHDL* QsciLexerVHDL_new2(QObject* parent) { + return new MiqtVirtualQsciLexerVHDL(parent); +} + +void QsciLexerVHDL_virtbase(QsciLexerVHDL* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerVHDL_MetaObject(const QsciLexerVHDL* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.go b/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.go index 7daa9a4d..a97bf00b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.go @@ -57,44 +57,34 @@ func (this *QsciLexerVHDL) UnsafePointer() unsafe.Pointer { } // newQsciLexerVHDL constructs the type using only CGO pointers. -func newQsciLexerVHDL(h *C.QsciLexerVHDL, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerVHDL { +func newQsciLexerVHDL(h *C.QsciLexerVHDL) *QsciLexerVHDL { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerVHDL_virtbase(h, &outptr_QsciLexer) + return &QsciLexerVHDL{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerVHDL constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerVHDL(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerVHDL { - if h == nil { - return nil - } - - return &QsciLexerVHDL{h: (*C.QsciLexerVHDL)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerVHDL(h unsafe.Pointer) *QsciLexerVHDL { + return newQsciLexerVHDL((*C.QsciLexerVHDL)(h)) } // NewQsciLexerVHDL constructs a new QsciLexerVHDL object. func NewQsciLexerVHDL() *QsciLexerVHDL { - var outptr_QsciLexerVHDL *C.QsciLexerVHDL = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerVHDL_new(&outptr_QsciLexerVHDL, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerVHDL(outptr_QsciLexerVHDL, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerVHDL(C.QsciLexerVHDL_new()) ret.isSubclass = true return ret } // NewQsciLexerVHDL2 constructs a new QsciLexerVHDL object. func NewQsciLexerVHDL2(parent *qt6.QObject) *QsciLexerVHDL { - var outptr_QsciLexerVHDL *C.QsciLexerVHDL = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerVHDL_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerVHDL, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerVHDL(outptr_QsciLexerVHDL, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerVHDL(C.QsciLexerVHDL_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1039,7 +1029,7 @@ func miqt_exec_callback_QsciLexerVHDL_SetEditor(self *C.QsciLexerVHDL, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerVHDL{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1283,7 +1273,7 @@ func miqt_exec_callback_QsciLexerVHDL_ReadProperties(self *C.QsciLexerVHDL, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1320,7 +1310,7 @@ func miqt_exec_callback_QsciLexerVHDL_WriteProperties(self *C.QsciLexerVHDL, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.h b/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.h index 22670105..ca6c4a68 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexervhdl.h @@ -34,8 +34,9 @@ typedef struct QsciLexerVHDL QsciLexerVHDL; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerVHDL_new(QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerVHDL_new2(QObject* parent, QsciLexerVHDL** outptr_QsciLexerVHDL, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerVHDL* QsciLexerVHDL_new(); +QsciLexerVHDL* QsciLexerVHDL_new2(QObject* parent); +void QsciLexerVHDL_virtbase(QsciLexerVHDL* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerVHDL_MetaObject(const QsciLexerVHDL* self); void* QsciLexerVHDL_Metacast(QsciLexerVHDL* self, const char* param1); struct miqt_string QsciLexerVHDL_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerxml.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexerxml.cpp index 113b0028..2555cbb4 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerxml.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerxml.cpp @@ -91,20 +91,16 @@ public: }; -void QsciLexerXML_new(QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerXML* ret = new MiqtVirtualQsciLexerXML(); - *outptr_QsciLexerXML = ret; - *outptr_QsciLexerHTML = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerXML* QsciLexerXML_new() { + return new MiqtVirtualQsciLexerXML(); } -void QsciLexerXML_new2(QObject* parent, QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerXML* ret = new MiqtVirtualQsciLexerXML(parent); - *outptr_QsciLexerXML = ret; - *outptr_QsciLexerHTML = static_cast(ret); - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerXML* QsciLexerXML_new2(QObject* parent) { + return new MiqtVirtualQsciLexerXML(parent); +} + +void QsciLexerXML_virtbase(QsciLexerXML* src, QsciLexerHTML** outptr_QsciLexerHTML) { + *outptr_QsciLexerHTML = static_cast(src); } QMetaObject* QsciLexerXML_MetaObject(const QsciLexerXML* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerxml.go b/qt-restricted-extras/qscintilla6/gen_qscilexerxml.go index ddae76b8..87e2d67b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerxml.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerxml.go @@ -36,46 +36,34 @@ func (this *QsciLexerXML) UnsafePointer() unsafe.Pointer { } // newQsciLexerXML constructs the type using only CGO pointers. -func newQsciLexerXML(h *C.QsciLexerXML, h_QsciLexerHTML *C.QsciLexerHTML, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerXML { +func newQsciLexerXML(h *C.QsciLexerXML) *QsciLexerXML { if h == nil { return nil } + var outptr_QsciLexerHTML *C.QsciLexerHTML = nil + C.QsciLexerXML_virtbase(h, &outptr_QsciLexerHTML) + return &QsciLexerXML{h: h, - QsciLexerHTML: newQsciLexerHTML(h_QsciLexerHTML, h_QsciLexer, h_QObject)} + QsciLexerHTML: newQsciLexerHTML(outptr_QsciLexerHTML)} } // UnsafeNewQsciLexerXML constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerXML(h unsafe.Pointer, h_QsciLexerHTML unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerXML { - if h == nil { - return nil - } - - return &QsciLexerXML{h: (*C.QsciLexerXML)(h), - QsciLexerHTML: UnsafeNewQsciLexerHTML(h_QsciLexerHTML, h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerXML(h unsafe.Pointer) *QsciLexerXML { + return newQsciLexerXML((*C.QsciLexerXML)(h)) } // NewQsciLexerXML constructs a new QsciLexerXML object. func NewQsciLexerXML() *QsciLexerXML { - var outptr_QsciLexerXML *C.QsciLexerXML = nil - var outptr_QsciLexerHTML *C.QsciLexerHTML = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerXML_new(&outptr_QsciLexerXML, &outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerXML(outptr_QsciLexerXML, outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerXML(C.QsciLexerXML_new()) ret.isSubclass = true return ret } // NewQsciLexerXML2 constructs a new QsciLexerXML object. func NewQsciLexerXML2(parent *qt6.QObject) *QsciLexerXML { - var outptr_QsciLexerXML *C.QsciLexerXML = nil - var outptr_QsciLexerHTML *C.QsciLexerHTML = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerXML_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerXML, &outptr_QsciLexerHTML, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerXML(outptr_QsciLexerXML, outptr_QsciLexerHTML, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerXML(C.QsciLexerXML_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexerxml.h b/qt-restricted-extras/qscintilla6/gen_qscilexerxml.h index c8f7ae3c..8d3c8fa3 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexerxml.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexerxml.h @@ -32,8 +32,9 @@ typedef struct QsciLexerHTML QsciLexerHTML; typedef struct QsciLexerXML QsciLexerXML; #endif -void QsciLexerXML_new(QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerXML_new2(QObject* parent, QsciLexerXML** outptr_QsciLexerXML, QsciLexerHTML** outptr_QsciLexerHTML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerXML* QsciLexerXML_new(); +QsciLexerXML* QsciLexerXML_new2(QObject* parent); +void QsciLexerXML_virtbase(QsciLexerXML* src, QsciLexerHTML** outptr_QsciLexerHTML); QMetaObject* QsciLexerXML_MetaObject(const QsciLexerXML* self); void* QsciLexerXML_Metacast(QsciLexerXML* self, const char* param1); struct miqt_string QsciLexerXML_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.cpp b/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.cpp index 7e23ef21..26efad2e 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.cpp @@ -863,18 +863,16 @@ public: }; -void QsciLexerYAML_new(QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerYAML* ret = new MiqtVirtualQsciLexerYAML(); - *outptr_QsciLexerYAML = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerYAML* QsciLexerYAML_new() { + return new MiqtVirtualQsciLexerYAML(); } -void QsciLexerYAML_new2(QObject* parent, QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject) { - MiqtVirtualQsciLexerYAML* ret = new MiqtVirtualQsciLexerYAML(parent); - *outptr_QsciLexerYAML = ret; - *outptr_QsciLexer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QsciLexerYAML* QsciLexerYAML_new2(QObject* parent) { + return new MiqtVirtualQsciLexerYAML(parent); +} + +void QsciLexerYAML_virtbase(QsciLexerYAML* src, QsciLexer** outptr_QsciLexer) { + *outptr_QsciLexer = static_cast(src); } QMetaObject* QsciLexerYAML_MetaObject(const QsciLexerYAML* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.go b/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.go index 5b621852..e3b9f384 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.go +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.go @@ -51,44 +51,34 @@ func (this *QsciLexerYAML) UnsafePointer() unsafe.Pointer { } // newQsciLexerYAML constructs the type using only CGO pointers. -func newQsciLexerYAML(h *C.QsciLexerYAML, h_QsciLexer *C.QsciLexer, h_QObject *C.QObject) *QsciLexerYAML { +func newQsciLexerYAML(h *C.QsciLexerYAML) *QsciLexerYAML { if h == nil { return nil } + var outptr_QsciLexer *C.QsciLexer = nil + C.QsciLexerYAML_virtbase(h, &outptr_QsciLexer) + return &QsciLexerYAML{h: h, - QsciLexer: newQsciLexer(h_QsciLexer, h_QObject)} + QsciLexer: newQsciLexer(outptr_QsciLexer)} } // UnsafeNewQsciLexerYAML constructs the type using only unsafe pointers. -func UnsafeNewQsciLexerYAML(h unsafe.Pointer, h_QsciLexer unsafe.Pointer, h_QObject unsafe.Pointer) *QsciLexerYAML { - if h == nil { - return nil - } - - return &QsciLexerYAML{h: (*C.QsciLexerYAML)(h), - QsciLexer: UnsafeNewQsciLexer(h_QsciLexer, h_QObject)} +func UnsafeNewQsciLexerYAML(h unsafe.Pointer) *QsciLexerYAML { + return newQsciLexerYAML((*C.QsciLexerYAML)(h)) } // NewQsciLexerYAML constructs a new QsciLexerYAML object. func NewQsciLexerYAML() *QsciLexerYAML { - var outptr_QsciLexerYAML *C.QsciLexerYAML = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerYAML_new(&outptr_QsciLexerYAML, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerYAML(outptr_QsciLexerYAML, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerYAML(C.QsciLexerYAML_new()) ret.isSubclass = true return ret } // NewQsciLexerYAML2 constructs a new QsciLexerYAML object. func NewQsciLexerYAML2(parent *qt6.QObject) *QsciLexerYAML { - var outptr_QsciLexerYAML *C.QsciLexerYAML = nil - var outptr_QsciLexer *C.QsciLexer = nil - var outptr_QObject *C.QObject = nil - C.QsciLexerYAML_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QsciLexerYAML, &outptr_QsciLexer, &outptr_QObject) - ret := newQsciLexerYAML(outptr_QsciLexerYAML, outptr_QsciLexer, outptr_QObject) + ret := newQsciLexerYAML(C.QsciLexerYAML_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -893,7 +883,7 @@ func miqt_exec_callback_QsciLexerYAML_SetEditor(self *C.QsciLexerYAML, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintilla(editor, nil, nil, nil, nil, nil, nil) + slotval1 := newQsciScintilla(editor) gofunc((&QsciLexerYAML{h: self}).callVirtualBase_SetEditor, slotval1) @@ -1137,7 +1127,7 @@ func miqt_exec_callback_QsciLexerYAML_ReadProperties(self *C.QsciLexerYAML, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) @@ -1174,7 +1164,7 @@ func miqt_exec_callback_QsciLexerYAML_WriteProperties(self *C.QsciLexerYAML, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs), nil) + slotval1 := qt6.UnsafeNewQSettings(unsafe.Pointer(qs)) var prefix_ms C.struct_miqt_string = prefix prefix_ret := C.GoStringN(prefix_ms.data, C.int(int64(prefix_ms.len))) diff --git a/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.h b/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.h index 0ca8d25c..c2368442 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.h +++ b/qt-restricted-extras/qscintilla6/gen_qscilexeryaml.h @@ -34,8 +34,9 @@ typedef struct QsciLexerYAML QsciLexerYAML; typedef struct QsciScintilla QsciScintilla; #endif -void QsciLexerYAML_new(QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); -void QsciLexerYAML_new2(QObject* parent, QsciLexerYAML** outptr_QsciLexerYAML, QsciLexer** outptr_QsciLexer, QObject** outptr_QObject); +QsciLexerYAML* QsciLexerYAML_new(); +QsciLexerYAML* QsciLexerYAML_new2(QObject* parent); +void QsciLexerYAML_virtbase(QsciLexerYAML* src, QsciLexer** outptr_QsciLexer); QMetaObject* QsciLexerYAML_MetaObject(const QsciLexerYAML* self); void* QsciLexerYAML_Metacast(QsciLexerYAML* self, const char* param1); struct miqt_string QsciLexerYAML_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscimacro.cpp b/qt-restricted-extras/qscintilla6/gen_qscimacro.cpp index feef8139..be874fdd 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscimacro.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscimacro.cpp @@ -261,17 +261,17 @@ public: }; -void QsciMacro_new(QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject) { - MiqtVirtualQsciMacro* ret = new MiqtVirtualQsciMacro(parent); - *outptr_QsciMacro = ret; - *outptr_QObject = static_cast(ret); +QsciMacro* QsciMacro_new(QsciScintilla* parent) { + return new MiqtVirtualQsciMacro(parent); } -void QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject) { +QsciMacro* QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent) { QString asc_QString = QString::fromUtf8(asc.data, asc.len); - MiqtVirtualQsciMacro* ret = new MiqtVirtualQsciMacro(asc_QString, parent); - *outptr_QsciMacro = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQsciMacro(asc_QString, parent); +} + +void QsciMacro_virtbase(QsciMacro* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QsciMacro_MetaObject(const QsciMacro* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscimacro.go b/qt-restricted-extras/qscintilla6/gen_qscimacro.go index 4f0542ea..c006bad0 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscimacro.go +++ b/qt-restricted-extras/qscintilla6/gen_qscimacro.go @@ -36,31 +36,26 @@ func (this *QsciMacro) UnsafePointer() unsafe.Pointer { } // newQsciMacro constructs the type using only CGO pointers. -func newQsciMacro(h *C.QsciMacro, h_QObject *C.QObject) *QsciMacro { +func newQsciMacro(h *C.QsciMacro) *QsciMacro { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QsciMacro_virtbase(h, &outptr_QObject) + return &QsciMacro{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQsciMacro constructs the type using only unsafe pointers. -func UnsafeNewQsciMacro(h unsafe.Pointer, h_QObject unsafe.Pointer) *QsciMacro { - if h == nil { - return nil - } - - return &QsciMacro{h: (*C.QsciMacro)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQsciMacro(h unsafe.Pointer) *QsciMacro { + return newQsciMacro((*C.QsciMacro)(h)) } // NewQsciMacro constructs a new QsciMacro object. func NewQsciMacro(parent *QsciScintilla) *QsciMacro { - var outptr_QsciMacro *C.QsciMacro = nil - var outptr_QObject *C.QObject = nil - C.QsciMacro_new(parent.cPointer(), &outptr_QsciMacro, &outptr_QObject) - ret := newQsciMacro(outptr_QsciMacro, outptr_QObject) + ret := newQsciMacro(C.QsciMacro_new(parent.cPointer())) ret.isSubclass = true return ret } @@ -71,11 +66,8 @@ func NewQsciMacro2(asc string, parent *QsciScintilla) *QsciMacro { asc_ms.data = C.CString(asc) asc_ms.len = C.size_t(len(asc)) defer C.free(unsafe.Pointer(asc_ms.data)) - var outptr_QsciMacro *C.QsciMacro = nil - var outptr_QObject *C.QObject = nil - C.QsciMacro_new2(asc_ms, parent.cPointer(), &outptr_QsciMacro, &outptr_QObject) - ret := newQsciMacro(outptr_QsciMacro, outptr_QObject) + ret := newQsciMacro(C.QsciMacro_new2(asc_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -299,7 +291,7 @@ func miqt_exec_callback_QsciMacro_TimerEvent(self *C.QsciMacro, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QsciMacro{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -325,7 +317,7 @@ func miqt_exec_callback_QsciMacro_ChildEvent(self *C.QsciMacro, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QsciMacro{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt-restricted-extras/qscintilla6/gen_qscimacro.h b/qt-restricted-extras/qscintilla6/gen_qscimacro.h index 991a9b15..5265e7b2 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscimacro.h +++ b/qt-restricted-extras/qscintilla6/gen_qscimacro.h @@ -34,8 +34,9 @@ typedef struct QsciMacro QsciMacro; typedef struct QsciScintilla QsciScintilla; #endif -void QsciMacro_new(QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject); -void QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent, QsciMacro** outptr_QsciMacro, QObject** outptr_QObject); +QsciMacro* QsciMacro_new(QsciScintilla* parent); +QsciMacro* QsciMacro_new2(struct miqt_string asc, QsciScintilla* parent); +void QsciMacro_virtbase(QsciMacro* src, QObject** outptr_QObject); QMetaObject* QsciMacro_MetaObject(const QsciMacro* self); void* QsciMacro_Metacast(QsciMacro* self, const char* param1); struct miqt_string QsciMacro_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qsciprinter.cpp b/qt-restricted-extras/qscintilla6/gen_qsciprinter.cpp index d3403b26..dab8bfce 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciprinter.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qsciprinter.cpp @@ -241,20 +241,16 @@ public: }; -void QsciPrinter_new(QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQsciPrinter* ret = new MiqtVirtualQsciPrinter(); - *outptr_QsciPrinter = ret; - *outptr_QPrinter = static_cast(ret); - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QsciPrinter* QsciPrinter_new() { + return new MiqtVirtualQsciPrinter(); } -void QsciPrinter_new2(int mode, QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQsciPrinter* ret = new MiqtVirtualQsciPrinter(static_cast(mode)); - *outptr_QsciPrinter = ret; - *outptr_QPrinter = static_cast(ret); - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QsciPrinter* QsciPrinter_new2(int mode) { + return new MiqtVirtualQsciPrinter(static_cast(mode)); +} + +void QsciPrinter_virtbase(QsciPrinter* src, QPrinter** outptr_QPrinter) { + *outptr_QPrinter = static_cast(src); } void QsciPrinter_FormatPage(QsciPrinter* self, QPainter* painter, bool drawing, QRect* area, int pagenr) { diff --git a/qt-restricted-extras/qscintilla6/gen_qsciprinter.go b/qt-restricted-extras/qscintilla6/gen_qsciprinter.go index 240e79c6..4fe4d753 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciprinter.go +++ b/qt-restricted-extras/qscintilla6/gen_qsciprinter.go @@ -37,46 +37,34 @@ func (this *QsciPrinter) UnsafePointer() unsafe.Pointer { } // newQsciPrinter constructs the type using only CGO pointers. -func newQsciPrinter(h *C.QsciPrinter, h_QPrinter *C.QPrinter, h_QPagedPaintDevice *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QsciPrinter { +func newQsciPrinter(h *C.QsciPrinter) *QsciPrinter { if h == nil { return nil } + var outptr_QPrinter *C.QPrinter = nil + C.QsciPrinter_virtbase(h, &outptr_QPrinter) + return &QsciPrinter{h: h, - QPrinter: printsupport.UnsafeNewQPrinter(unsafe.Pointer(h_QPrinter), unsafe.Pointer(h_QPagedPaintDevice), unsafe.Pointer(h_QPaintDevice))} + QPrinter: printsupport.UnsafeNewQPrinter(unsafe.Pointer(outptr_QPrinter))} } // UnsafeNewQsciPrinter constructs the type using only unsafe pointers. -func UnsafeNewQsciPrinter(h unsafe.Pointer, h_QPrinter unsafe.Pointer, h_QPagedPaintDevice unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QsciPrinter { - if h == nil { - return nil - } - - return &QsciPrinter{h: (*C.QsciPrinter)(h), - QPrinter: printsupport.UnsafeNewQPrinter(h_QPrinter, h_QPagedPaintDevice, h_QPaintDevice)} +func UnsafeNewQsciPrinter(h unsafe.Pointer) *QsciPrinter { + return newQsciPrinter((*C.QsciPrinter)(h)) } // NewQsciPrinter constructs a new QsciPrinter object. func NewQsciPrinter() *QsciPrinter { - var outptr_QsciPrinter *C.QsciPrinter = nil - var outptr_QPrinter *C.QPrinter = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QsciPrinter_new(&outptr_QsciPrinter, &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQsciPrinter(outptr_QsciPrinter, outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQsciPrinter(C.QsciPrinter_new()) ret.isSubclass = true return ret } // NewQsciPrinter2 constructs a new QsciPrinter object. func NewQsciPrinter2(mode printsupport.QPrinter__PrinterMode) *QsciPrinter { - var outptr_QsciPrinter *C.QsciPrinter = nil - var outptr_QPrinter *C.QPrinter = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QsciPrinter_new2((C.int)(mode), &outptr_QsciPrinter, &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQsciPrinter(outptr_QsciPrinter, outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQsciPrinter(C.QsciPrinter_new2((C.int)(mode))) ret.isSubclass = true return ret } @@ -187,7 +175,7 @@ func miqt_exec_callback_QsciPrinter_PrintRange(self *C.QsciPrinter, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintillaBase(qsb, nil, nil, nil, nil, nil) + slotval1 := newQsciScintillaBase(qsb) slotval2 := qt6.UnsafeNewQPainter(unsafe.Pointer(painter)) @@ -221,7 +209,7 @@ func miqt_exec_callback_QsciPrinter_PrintRange2(self *C.QsciPrinter, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQsciScintillaBase(qsb, nil, nil, nil, nil, nil) + slotval1 := newQsciScintillaBase(qsb) slotval2 := (int)(from) diff --git a/qt-restricted-extras/qscintilla6/gen_qsciprinter.h b/qt-restricted-extras/qscintilla6/gen_qsciprinter.h index 3ec6b0c0..e5bff78f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciprinter.h +++ b/qt-restricted-extras/qscintilla6/gen_qsciprinter.h @@ -34,8 +34,9 @@ typedef struct QsciPrinter QsciPrinter; typedef struct QsciScintillaBase QsciScintillaBase; #endif -void QsciPrinter_new(QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); -void QsciPrinter_new2(int mode, QsciPrinter** outptr_QsciPrinter, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +QsciPrinter* QsciPrinter_new(); +QsciPrinter* QsciPrinter_new2(int mode); +void QsciPrinter_virtbase(QsciPrinter* src, QPrinter** outptr_QPrinter); void QsciPrinter_FormatPage(QsciPrinter* self, QPainter* painter, bool drawing, QRect* area, int pagenr); int QsciPrinter_Magnification(const QsciPrinter* self); void QsciPrinter_SetMagnification(QsciPrinter* self, int magnification); diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintilla.cpp b/qt-restricted-extras/qscintilla6/gen_qsciscintilla.cpp index b77928ff..8662fc5b 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciscintilla.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintilla.cpp @@ -2757,26 +2757,16 @@ public: }; -void QsciScintilla_new(QWidget* parent, QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQsciScintilla* ret = new MiqtVirtualQsciScintilla(parent); - *outptr_QsciScintilla = ret; - *outptr_QsciScintillaBase = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QsciScintilla* QsciScintilla_new(QWidget* parent) { + return new MiqtVirtualQsciScintilla(parent); } -void QsciScintilla_new2(QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQsciScintilla* ret = new MiqtVirtualQsciScintilla(); - *outptr_QsciScintilla = ret; - *outptr_QsciScintillaBase = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QsciScintilla* QsciScintilla_new2() { + return new MiqtVirtualQsciScintilla(); +} + +void QsciScintilla_virtbase(QsciScintilla* src, QsciScintillaBase** outptr_QsciScintillaBase) { + *outptr_QsciScintillaBase = static_cast(src); } QMetaObject* QsciScintilla_MetaObject(const QsciScintilla* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintilla.go b/qt-restricted-extras/qscintilla6/gen_qsciscintilla.go index 67686252..ffe4b58c 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciscintilla.go +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintilla.go @@ -240,52 +240,34 @@ func (this *QsciScintilla) UnsafePointer() unsafe.Pointer { } // newQsciScintilla constructs the type using only CGO pointers. -func newQsciScintilla(h *C.QsciScintilla, h_QsciScintillaBase *C.QsciScintillaBase, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QsciScintilla { +func newQsciScintilla(h *C.QsciScintilla) *QsciScintilla { if h == nil { return nil } + var outptr_QsciScintillaBase *C.QsciScintillaBase = nil + C.QsciScintilla_virtbase(h, &outptr_QsciScintillaBase) + return &QsciScintilla{h: h, - QsciScintillaBase: newQsciScintillaBase(h_QsciScintillaBase, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QsciScintillaBase: newQsciScintillaBase(outptr_QsciScintillaBase)} } // UnsafeNewQsciScintilla constructs the type using only unsafe pointers. -func UnsafeNewQsciScintilla(h unsafe.Pointer, h_QsciScintillaBase unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QsciScintilla { - if h == nil { - return nil - } - - return &QsciScintilla{h: (*C.QsciScintilla)(h), - QsciScintillaBase: UnsafeNewQsciScintillaBase(h_QsciScintillaBase, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQsciScintilla(h unsafe.Pointer) *QsciScintilla { + return newQsciScintilla((*C.QsciScintilla)(h)) } // NewQsciScintilla constructs a new QsciScintilla object. func NewQsciScintilla(parent *qt6.QWidget) *QsciScintilla { - var outptr_QsciScintilla *C.QsciScintilla = nil - var outptr_QsciScintillaBase *C.QsciScintillaBase = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QsciScintilla_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QsciScintilla, &outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQsciScintilla(outptr_QsciScintilla, outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQsciScintilla(C.QsciScintilla_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQsciScintilla2 constructs a new QsciScintilla object. func NewQsciScintilla2() *QsciScintilla { - var outptr_QsciScintilla *C.QsciScintilla = nil - var outptr_QsciScintillaBase *C.QsciScintillaBase = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QsciScintilla_new2(&outptr_QsciScintilla, &outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQsciScintilla(outptr_QsciScintilla, outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQsciScintilla(C.QsciScintilla_new2()) ret.isSubclass = true return ret } @@ -465,7 +447,7 @@ func (this *QsciScintilla) ConvertEols(mode QsciScintilla__EolMode) { } func (this *QsciScintilla) CreateStandardContextMenu() *qt6.QMenu { - return qt6.UnsafeNewQMenu(unsafe.Pointer(C.QsciScintilla_CreateStandardContextMenu(this.h)), nil, nil, nil) + return qt6.UnsafeNewQMenu(unsafe.Pointer(C.QsciScintilla_CreateStandardContextMenu(this.h))) } func (this *QsciScintilla) Document() *QsciDocument { @@ -637,7 +619,7 @@ func (this *QsciScintilla) Length() int { } func (this *QsciScintilla) Lexer() *QsciLexer { - return newQsciLexer(C.QsciScintilla_Lexer(this.h), nil) + return newQsciLexer(C.QsciScintilla_Lexer(this.h)) } func (this *QsciScintilla) MarginBackgroundColor(margin int) *qt6.QColor { @@ -3349,7 +3331,7 @@ func miqt_exec_callback_QsciScintilla_SetLexer(self *C.QsciScintilla, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQsciLexer(lexer, nil) + slotval1 := newQsciLexer(lexer) gofunc((&QsciScintilla{h: self}).callVirtualBase_SetLexer, slotval1) @@ -4152,7 +4134,7 @@ func miqt_exec_callback_QsciScintilla_ContextMenuEvent(self *C.QsciScintilla, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -4178,7 +4160,7 @@ func miqt_exec_callback_QsciScintilla_WheelEvent(self *C.QsciScintilla, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(e), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -4204,7 +4186,7 @@ func miqt_exec_callback_QsciScintilla_CanInsertFromMimeData(self *C.QsciScintill } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(source)) virtualReturn := gofunc((&QsciScintilla{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) @@ -4234,7 +4216,7 @@ func miqt_exec_callback_QsciScintilla_FromMimeData(self *C.QsciScintilla, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(source)) slotval2 := (*bool)(unsafe.Pointer(rectangular)) @@ -4252,7 +4234,7 @@ func (this *QsciScintilla) callVirtualBase_ToMimeData(text []byte, rectangular b text_alias.data = (*C.char)(unsafe.Pointer(&text[0])) text_alias.len = C.size_t(len(text)) - return qt6.UnsafeNewQMimeData(unsafe.Pointer(C.QsciScintilla_virtualbase_ToMimeData(unsafe.Pointer(this.h), text_alias, (C.bool)(rectangular))), nil) + return qt6.UnsafeNewQMimeData(unsafe.Pointer(C.QsciScintilla_virtualbase_ToMimeData(unsafe.Pointer(this.h), text_alias, (C.bool)(rectangular)))) } func (this *QsciScintilla) OnToMimeData(slot func(super func(text []byte, rectangular bool) *qt6.QMimeData, text []byte, rectangular bool) *qt6.QMimeData) { @@ -4302,7 +4284,7 @@ func miqt_exec_callback_QsciScintilla_DragEnterEvent(self *C.QsciScintilla, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -4328,7 +4310,7 @@ func miqt_exec_callback_QsciScintilla_DragLeaveEvent(self *C.QsciScintilla, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -4354,7 +4336,7 @@ func miqt_exec_callback_QsciScintilla_DragMoveEvent(self *C.QsciScintilla, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -4380,7 +4362,7 @@ func miqt_exec_callback_QsciScintilla_DropEvent(self *C.QsciScintilla, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_DropEvent, slotval1) @@ -4406,7 +4388,7 @@ func miqt_exec_callback_QsciScintilla_FocusInEvent(self *C.QsciScintilla, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -4432,7 +4414,7 @@ func miqt_exec_callback_QsciScintilla_FocusOutEvent(self *C.QsciScintilla, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -4486,7 +4468,7 @@ func miqt_exec_callback_QsciScintilla_KeyPressEvent(self *C.QsciScintilla, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -4512,7 +4494,7 @@ func miqt_exec_callback_QsciScintilla_InputMethodEvent(self *C.QsciScintilla, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(event)) gofunc((&QsciScintilla{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -4568,7 +4550,7 @@ func miqt_exec_callback_QsciScintilla_MouseDoubleClickEvent(self *C.QsciScintill } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -4594,7 +4576,7 @@ func miqt_exec_callback_QsciScintilla_MouseMoveEvent(self *C.QsciScintilla, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -4620,7 +4602,7 @@ func miqt_exec_callback_QsciScintilla_MousePressEvent(self *C.QsciScintilla, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -4646,7 +4628,7 @@ func miqt_exec_callback_QsciScintilla_MouseReleaseEvent(self *C.QsciScintilla, c } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -4672,7 +4654,7 @@ func miqt_exec_callback_QsciScintilla_PaintEvent(self *C.QsciScintilla, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -4698,7 +4680,7 @@ func miqt_exec_callback_QsciScintilla_ResizeEvent(self *C.QsciScintilla, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(e)) gofunc((&QsciScintilla{h: self}).callVirtualBase_ResizeEvent, slotval1) diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintilla.h b/qt-restricted-extras/qscintilla6/gen_qsciscintilla.h index 97b3da35..9c5eb2f0 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciscintilla.h +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintilla.h @@ -88,8 +88,9 @@ typedef struct QsciStyle QsciStyle; typedef struct QsciStyledText QsciStyledText; #endif -void QsciScintilla_new(QWidget* parent, QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QsciScintilla_new2(QsciScintilla** outptr_QsciScintilla, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QsciScintilla* QsciScintilla_new(QWidget* parent); +QsciScintilla* QsciScintilla_new2(); +void QsciScintilla_virtbase(QsciScintilla* src, QsciScintillaBase** outptr_QsciScintillaBase); QMetaObject* QsciScintilla_MetaObject(const QsciScintilla* self); void* QsciScintilla_Metacast(QsciScintilla* self, const char* param1); struct miqt_string QsciScintilla_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.cpp b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.cpp index 0fdb376e..0ab16ab5 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.cpp @@ -768,24 +768,16 @@ public: }; -void QsciScintillaBase_new(QWidget* parent, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQsciScintillaBase* ret = new MiqtVirtualQsciScintillaBase(parent); - *outptr_QsciScintillaBase = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QsciScintillaBase* QsciScintillaBase_new(QWidget* parent) { + return new MiqtVirtualQsciScintillaBase(parent); } -void QsciScintillaBase_new2(QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQsciScintillaBase* ret = new MiqtVirtualQsciScintillaBase(); - *outptr_QsciScintillaBase = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QsciScintillaBase* QsciScintillaBase_new2() { + return new MiqtVirtualQsciScintillaBase(); +} + +void QsciScintillaBase_virtbase(QsciScintillaBase* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); } QMetaObject* QsciScintillaBase_MetaObject(const QsciScintillaBase* self) { diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.go b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.go index e10f916e..e4229772 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.go +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.go @@ -1207,50 +1207,34 @@ func (this *QsciScintillaBase) UnsafePointer() unsafe.Pointer { } // newQsciScintillaBase constructs the type using only CGO pointers. -func newQsciScintillaBase(h *C.QsciScintillaBase, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QsciScintillaBase { +func newQsciScintillaBase(h *C.QsciScintillaBase) *QsciScintillaBase { if h == nil { return nil } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QsciScintillaBase_virtbase(h, &outptr_QAbstractScrollArea) + return &QsciScintillaBase{h: h, - QAbstractScrollArea: qt6.UnsafeNewQAbstractScrollArea(unsafe.Pointer(h_QAbstractScrollArea), unsafe.Pointer(h_QFrame), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QAbstractScrollArea: qt6.UnsafeNewQAbstractScrollArea(unsafe.Pointer(outptr_QAbstractScrollArea))} } // UnsafeNewQsciScintillaBase constructs the type using only unsafe pointers. -func UnsafeNewQsciScintillaBase(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QsciScintillaBase { - if h == nil { - return nil - } - - return &QsciScintillaBase{h: (*C.QsciScintillaBase)(h), - QAbstractScrollArea: qt6.UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQsciScintillaBase(h unsafe.Pointer) *QsciScintillaBase { + return newQsciScintillaBase((*C.QsciScintillaBase)(h)) } // NewQsciScintillaBase constructs a new QsciScintillaBase object. func NewQsciScintillaBase(parent *qt6.QWidget) *QsciScintillaBase { - var outptr_QsciScintillaBase *C.QsciScintillaBase = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QsciScintillaBase_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQsciScintillaBase(outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQsciScintillaBase(C.QsciScintillaBase_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQsciScintillaBase2 constructs a new QsciScintillaBase object. func NewQsciScintillaBase2() *QsciScintillaBase { - var outptr_QsciScintillaBase *C.QsciScintillaBase = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QsciScintillaBase_new2(&outptr_QsciScintillaBase, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQsciScintillaBase(outptr_QsciScintillaBase, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQsciScintillaBase(C.QsciScintillaBase_new2()) ret.isSubclass = true return ret } @@ -1275,7 +1259,7 @@ func QsciScintillaBase_Tr(s string) string { } func QsciScintillaBase_Pool() *QsciScintillaBase { - return newQsciScintillaBase(C.QsciScintillaBase_Pool(), nil, nil, nil, nil, nil) + return newQsciScintillaBase(C.QsciScintillaBase_Pool()) } func (this *QsciScintillaBase) ReplaceHorizontalScrollBar(scrollBar *qt6.QScrollBar) { @@ -2208,7 +2192,7 @@ func miqt_exec_callback_QsciScintillaBase_CanInsertFromMimeData(self *C.QsciScin } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(source)) virtualReturn := gofunc((&QsciScintillaBase{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) @@ -2238,7 +2222,7 @@ func miqt_exec_callback_QsciScintillaBase_FromMimeData(self *C.QsciScintillaBase } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(source), nil) + slotval1 := qt6.UnsafeNewQMimeData(unsafe.Pointer(source)) slotval2 := (*bool)(unsafe.Pointer(rectangular)) @@ -2256,7 +2240,7 @@ func (this *QsciScintillaBase) callVirtualBase_ToMimeData(text []byte, rectangul text_alias.data = (*C.char)(unsafe.Pointer(&text[0])) text_alias.len = C.size_t(len(text)) - return qt6.UnsafeNewQMimeData(unsafe.Pointer(C.QsciScintillaBase_virtualbase_ToMimeData(unsafe.Pointer(this.h), text_alias, (C.bool)(rectangular))), nil) + return qt6.UnsafeNewQMimeData(unsafe.Pointer(C.QsciScintillaBase_virtualbase_ToMimeData(unsafe.Pointer(this.h), text_alias, (C.bool)(rectangular)))) } func (this *QsciScintillaBase) OnToMimeData(slot func(super func(text []byte, rectangular bool) *qt6.QMimeData, text []byte, rectangular bool) *qt6.QMimeData) { @@ -2332,7 +2316,7 @@ func miqt_exec_callback_QsciScintillaBase_ContextMenuEvent(self *C.QsciScintilla } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -2358,7 +2342,7 @@ func miqt_exec_callback_QsciScintillaBase_DragEnterEvent(self *C.QsciScintillaBa } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -2384,7 +2368,7 @@ func miqt_exec_callback_QsciScintillaBase_DragLeaveEvent(self *C.QsciScintillaBa } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -2410,7 +2394,7 @@ func miqt_exec_callback_QsciScintillaBase_DragMoveEvent(self *C.QsciScintillaBas } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -2436,7 +2420,7 @@ func miqt_exec_callback_QsciScintillaBase_DropEvent(self *C.QsciScintillaBase, c } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_DropEvent, slotval1) @@ -2462,7 +2446,7 @@ func miqt_exec_callback_QsciScintillaBase_FocusInEvent(self *C.QsciScintillaBase } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -2488,7 +2472,7 @@ func miqt_exec_callback_QsciScintillaBase_FocusOutEvent(self *C.QsciScintillaBas } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(e), nil) + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -2542,7 +2526,7 @@ func miqt_exec_callback_QsciScintillaBase_KeyPressEvent(self *C.QsciScintillaBas } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -2568,7 +2552,7 @@ func miqt_exec_callback_QsciScintillaBase_InputMethodEvent(self *C.QsciScintilla } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(event)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -2624,7 +2608,7 @@ func miqt_exec_callback_QsciScintillaBase_MouseDoubleClickEvent(self *C.QsciScin } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -2650,7 +2634,7 @@ func miqt_exec_callback_QsciScintillaBase_MouseMoveEvent(self *C.QsciScintillaBa } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -2676,7 +2660,7 @@ func miqt_exec_callback_QsciScintillaBase_MousePressEvent(self *C.QsciScintillaB } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -2702,7 +2686,7 @@ func miqt_exec_callback_QsciScintillaBase_MouseReleaseEvent(self *C.QsciScintill } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -2728,7 +2712,7 @@ func miqt_exec_callback_QsciScintillaBase_PaintEvent(self *C.QsciScintillaBase, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(e), nil) + slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -2754,7 +2738,7 @@ func miqt_exec_callback_QsciScintillaBase_ResizeEvent(self *C.QsciScintillaBase, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(e), nil) + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(e)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -2862,7 +2846,7 @@ func miqt_exec_callback_QsciScintillaBase_SetupViewport(self *C.QsciScintillaBas } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQWidget(unsafe.Pointer(viewport), nil, nil) + slotval1 := qt6.UnsafeNewQWidget(unsafe.Pointer(viewport)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -2974,7 +2958,7 @@ func miqt_exec_callback_QsciScintillaBase_WheelEvent(self *C.QsciScintillaBase, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(param1)) gofunc((&QsciScintillaBase{h: self}).callVirtualBase_WheelEvent, slotval1) diff --git a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.h b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.h index ebff7e8f..f73a93bc 100644 --- a/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.h +++ b/qt-restricted-extras/qscintilla6/gen_qsciscintillabase.h @@ -78,8 +78,9 @@ typedef struct QWidget QWidget; typedef struct QsciScintillaBase QsciScintillaBase; #endif -void QsciScintillaBase_new(QWidget* parent, QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QsciScintillaBase_new2(QsciScintillaBase** outptr_QsciScintillaBase, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QsciScintillaBase* QsciScintillaBase_new(QWidget* parent); +QsciScintillaBase* QsciScintillaBase_new2(); +void QsciScintillaBase_virtbase(QsciScintillaBase* src, QAbstractScrollArea** outptr_QAbstractScrollArea); QMetaObject* QsciScintillaBase_MetaObject(const QsciScintillaBase* self); void* QsciScintillaBase_Metacast(QsciScintillaBase* self, const char* param1); struct miqt_string QsciScintillaBase_Tr(const char* s); diff --git a/qt-restricted-extras/qscintilla6/gen_qscistyle.cpp b/qt-restricted-extras/qscintilla6/gen_qscistyle.cpp index 629e0cf9..d768b5d2 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscistyle.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscistyle.cpp @@ -7,31 +7,26 @@ #include "gen_qscistyle.h" #include "_cgo_export.h" -void QsciStyle_new(QsciStyle** outptr_QsciStyle) { - QsciStyle* ret = new QsciStyle(); - *outptr_QsciStyle = ret; +QsciStyle* QsciStyle_new() { + return new QsciStyle(); } -void QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, QsciStyle** outptr_QsciStyle) { +QsciStyle* QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font) { QString description_QString = QString::fromUtf8(description.data, description.len); - QsciStyle* ret = new QsciStyle(static_cast(style), description_QString, *color, *paper, *font); - *outptr_QsciStyle = ret; + return new QsciStyle(static_cast(style), description_QString, *color, *paper, *font); } -void QsciStyle_new3(QsciStyle* param1, QsciStyle** outptr_QsciStyle) { - QsciStyle* ret = new QsciStyle(*param1); - *outptr_QsciStyle = ret; +QsciStyle* QsciStyle_new3(QsciStyle* param1) { + return new QsciStyle(*param1); } -void QsciStyle_new4(int style, QsciStyle** outptr_QsciStyle) { - QsciStyle* ret = new QsciStyle(static_cast(style)); - *outptr_QsciStyle = ret; +QsciStyle* QsciStyle_new4(int style) { + return new QsciStyle(static_cast(style)); } -void QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill, QsciStyle** outptr_QsciStyle) { +QsciStyle* QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill) { QString description_QString = QString::fromUtf8(description.data, description.len); - QsciStyle* ret = new QsciStyle(static_cast(style), description_QString, *color, *paper, *font, eolFill); - *outptr_QsciStyle = ret; + return new QsciStyle(static_cast(style), description_QString, *color, *paper, *font, eolFill); } void QsciStyle_Apply(const QsciStyle* self, QsciScintillaBase* sci) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscistyle.go b/qt-restricted-extras/qscintilla6/gen_qscistyle.go index 4a667dba..d68841d9 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscistyle.go +++ b/qt-restricted-extras/qscintilla6/gen_qscistyle.go @@ -46,24 +46,19 @@ func newQsciStyle(h *C.QsciStyle) *QsciStyle { if h == nil { return nil } + return &QsciStyle{h: h} } // UnsafeNewQsciStyle constructs the type using only unsafe pointers. func UnsafeNewQsciStyle(h unsafe.Pointer) *QsciStyle { - if h == nil { - return nil - } - - return &QsciStyle{h: (*C.QsciStyle)(h)} + return newQsciStyle((*C.QsciStyle)(h)) } // NewQsciStyle constructs a new QsciStyle object. func NewQsciStyle() *QsciStyle { - var outptr_QsciStyle *C.QsciStyle = nil - C.QsciStyle_new(&outptr_QsciStyle) - ret := newQsciStyle(outptr_QsciStyle) + ret := newQsciStyle(C.QsciStyle_new()) ret.isSubclass = true return ret } @@ -74,30 +69,24 @@ func NewQsciStyle2(style int, description string, color *qt6.QColor, paper *qt6. description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - var outptr_QsciStyle *C.QsciStyle = nil - C.QsciStyle_new2((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer()), &outptr_QsciStyle) - ret := newQsciStyle(outptr_QsciStyle) + ret := newQsciStyle(C.QsciStyle_new2((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer()))) ret.isSubclass = true return ret } // NewQsciStyle3 constructs a new QsciStyle object. func NewQsciStyle3(param1 *QsciStyle) *QsciStyle { - var outptr_QsciStyle *C.QsciStyle = nil - C.QsciStyle_new3(param1.cPointer(), &outptr_QsciStyle) - ret := newQsciStyle(outptr_QsciStyle) + ret := newQsciStyle(C.QsciStyle_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQsciStyle4 constructs a new QsciStyle object. func NewQsciStyle4(style int) *QsciStyle { - var outptr_QsciStyle *C.QsciStyle = nil - C.QsciStyle_new4((C.int)(style), &outptr_QsciStyle) - ret := newQsciStyle(outptr_QsciStyle) + ret := newQsciStyle(C.QsciStyle_new4((C.int)(style))) ret.isSubclass = true return ret } @@ -108,10 +97,8 @@ func NewQsciStyle5(style int, description string, color *qt6.QColor, paper *qt6. description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - var outptr_QsciStyle *C.QsciStyle = nil - C.QsciStyle_new5((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer()), (C.bool)(eolFill), &outptr_QsciStyle) - ret := newQsciStyle(outptr_QsciStyle) + ret := newQsciStyle(C.QsciStyle_new5((C.int)(style), description_ms, (*C.QColor)(color.UnsafePointer()), (*C.QColor)(paper.UnsafePointer()), (*C.QFont)(font.UnsafePointer()), (C.bool)(eolFill))) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla6/gen_qscistyle.h b/qt-restricted-extras/qscintilla6/gen_qscistyle.h index 2d658afa..f70b205d 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscistyle.h +++ b/qt-restricted-extras/qscintilla6/gen_qscistyle.h @@ -26,11 +26,11 @@ typedef struct QsciScintillaBase QsciScintillaBase; typedef struct QsciStyle QsciStyle; #endif -void QsciStyle_new(QsciStyle** outptr_QsciStyle); -void QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, QsciStyle** outptr_QsciStyle); -void QsciStyle_new3(QsciStyle* param1, QsciStyle** outptr_QsciStyle); -void QsciStyle_new4(int style, QsciStyle** outptr_QsciStyle); -void QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill, QsciStyle** outptr_QsciStyle); +QsciStyle* QsciStyle_new(); +QsciStyle* QsciStyle_new2(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font); +QsciStyle* QsciStyle_new3(QsciStyle* param1); +QsciStyle* QsciStyle_new4(int style); +QsciStyle* QsciStyle_new5(int style, struct miqt_string description, QColor* color, QColor* paper, QFont* font, bool eolFill); void QsciStyle_Apply(const QsciStyle* self, QsciScintillaBase* sci); void QsciStyle_SetStyle(QsciStyle* self, int style); int QsciStyle_Style(const QsciStyle* self); diff --git a/qt-restricted-extras/qscintilla6/gen_qscistyledtext.cpp b/qt-restricted-extras/qscintilla6/gen_qscistyledtext.cpp index ff148966..75ac117f 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscistyledtext.cpp +++ b/qt-restricted-extras/qscintilla6/gen_qscistyledtext.cpp @@ -5,21 +5,18 @@ #include "gen_qscistyledtext.h" #include "_cgo_export.h" -void QsciStyledText_new(struct miqt_string text, int style, QsciStyledText** outptr_QsciStyledText) { +QsciStyledText* QsciStyledText_new(struct miqt_string text, int style) { QString text_QString = QString::fromUtf8(text.data, text.len); - QsciStyledText* ret = new QsciStyledText(text_QString, static_cast(style)); - *outptr_QsciStyledText = ret; + return new QsciStyledText(text_QString, static_cast(style)); } -void QsciStyledText_new2(struct miqt_string text, QsciStyle* style, QsciStyledText** outptr_QsciStyledText) { +QsciStyledText* QsciStyledText_new2(struct miqt_string text, QsciStyle* style) { QString text_QString = QString::fromUtf8(text.data, text.len); - QsciStyledText* ret = new QsciStyledText(text_QString, *style); - *outptr_QsciStyledText = ret; + return new QsciStyledText(text_QString, *style); } -void QsciStyledText_new3(QsciStyledText* param1, QsciStyledText** outptr_QsciStyledText) { - QsciStyledText* ret = new QsciStyledText(*param1); - *outptr_QsciStyledText = ret; +QsciStyledText* QsciStyledText_new3(QsciStyledText* param1) { + return new QsciStyledText(*param1); } void QsciStyledText_Apply(const QsciStyledText* self, QsciScintillaBase* sci) { diff --git a/qt-restricted-extras/qscintilla6/gen_qscistyledtext.go b/qt-restricted-extras/qscintilla6/gen_qscistyledtext.go index 14f27cc1..d2df9247 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscistyledtext.go +++ b/qt-restricted-extras/qscintilla6/gen_qscistyledtext.go @@ -37,16 +37,13 @@ func newQsciStyledText(h *C.QsciStyledText) *QsciStyledText { if h == nil { return nil } + return &QsciStyledText{h: h} } // UnsafeNewQsciStyledText constructs the type using only unsafe pointers. func UnsafeNewQsciStyledText(h unsafe.Pointer) *QsciStyledText { - if h == nil { - return nil - } - - return &QsciStyledText{h: (*C.QsciStyledText)(h)} + return newQsciStyledText((*C.QsciStyledText)(h)) } // NewQsciStyledText constructs a new QsciStyledText object. @@ -55,10 +52,8 @@ func NewQsciStyledText(text string, style int) *QsciStyledText { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QsciStyledText *C.QsciStyledText = nil - C.QsciStyledText_new(text_ms, (C.int)(style), &outptr_QsciStyledText) - ret := newQsciStyledText(outptr_QsciStyledText) + ret := newQsciStyledText(C.QsciStyledText_new(text_ms, (C.int)(style))) ret.isSubclass = true return ret } @@ -69,20 +64,16 @@ func NewQsciStyledText2(text string, style *QsciStyle) *QsciStyledText { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QsciStyledText *C.QsciStyledText = nil - C.QsciStyledText_new2(text_ms, style.cPointer(), &outptr_QsciStyledText) - ret := newQsciStyledText(outptr_QsciStyledText) + ret := newQsciStyledText(C.QsciStyledText_new2(text_ms, style.cPointer())) ret.isSubclass = true return ret } // NewQsciStyledText3 constructs a new QsciStyledText object. func NewQsciStyledText3(param1 *QsciStyledText) *QsciStyledText { - var outptr_QsciStyledText *C.QsciStyledText = nil - C.QsciStyledText_new3(param1.cPointer(), &outptr_QsciStyledText) - ret := newQsciStyledText(outptr_QsciStyledText) + ret := newQsciStyledText(C.QsciStyledText_new3(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt-restricted-extras/qscintilla6/gen_qscistyledtext.h b/qt-restricted-extras/qscintilla6/gen_qscistyledtext.h index 401c4840..800de59d 100644 --- a/qt-restricted-extras/qscintilla6/gen_qscistyledtext.h +++ b/qt-restricted-extras/qscintilla6/gen_qscistyledtext.h @@ -24,9 +24,9 @@ typedef struct QsciStyle QsciStyle; typedef struct QsciStyledText QsciStyledText; #endif -void QsciStyledText_new(struct miqt_string text, int style, QsciStyledText** outptr_QsciStyledText); -void QsciStyledText_new2(struct miqt_string text, QsciStyle* style, QsciStyledText** outptr_QsciStyledText); -void QsciStyledText_new3(QsciStyledText* param1, QsciStyledText** outptr_QsciStyledText); +QsciStyledText* QsciStyledText_new(struct miqt_string text, int style); +QsciStyledText* QsciStyledText_new2(struct miqt_string text, QsciStyle* style); +QsciStyledText* QsciStyledText_new3(QsciStyledText* param1); void QsciStyledText_Apply(const QsciStyledText* self, QsciScintillaBase* sci); struct miqt_string QsciStyledText_Text(const QsciStyledText* self); int QsciStyledText_Style(const QsciStyledText* self); diff --git a/qt/cbor/gen_qcborarray.cpp b/qt/cbor/gen_qcborarray.cpp index b41e9939..9adcfeef 100644 --- a/qt/cbor/gen_qcborarray.cpp +++ b/qt/cbor/gen_qcborarray.cpp @@ -12,14 +12,12 @@ #include "gen_qcborarray.h" #include "_cgo_export.h" -void QCborArray_new(QCborArray** outptr_QCborArray) { - QCborArray* ret = new QCborArray(); - *outptr_QCborArray = ret; +QCborArray* QCborArray_new() { + return new QCborArray(); } -void QCborArray_new2(QCborArray* other, QCborArray** outptr_QCborArray) { - QCborArray* ret = new QCborArray(*other); - *outptr_QCborArray = ret; +QCborArray* QCborArray_new2(QCborArray* other) { + return new QCborArray(*other); } void QCborArray_OperatorAssign(QCborArray* self, QCborArray* other) { @@ -250,14 +248,12 @@ void QCborArray_Delete(QCborArray* self, bool isSubclass) { } } -void QCborArray__Iterator_new(QCborArray__Iterator** outptr_QCborArray__Iterator) { - QCborArray::Iterator* ret = new QCborArray::Iterator(); - *outptr_QCborArray__Iterator = ret; +QCborArray__Iterator* QCborArray__Iterator_new() { + return new QCborArray::Iterator(); } -void QCborArray__Iterator_new2(QCborArray__Iterator* param1, QCborArray__Iterator** outptr_QCborArray__Iterator) { - QCborArray::Iterator* ret = new QCborArray::Iterator(*param1); - *outptr_QCborArray__Iterator = ret; +QCborArray__Iterator* QCborArray__Iterator_new2(QCborArray__Iterator* param1) { + return new QCborArray::Iterator(*param1); } void QCborArray__Iterator_OperatorAssign(QCborArray__Iterator* self, QCborArray__Iterator* other) { @@ -377,14 +373,12 @@ void QCborArray__Iterator_Delete(QCborArray__Iterator* self, bool isSubclass) { } } -void QCborArray__ConstIterator_new(QCborArray__ConstIterator** outptr_QCborArray__ConstIterator) { - QCborArray::ConstIterator* ret = new QCborArray::ConstIterator(); - *outptr_QCborArray__ConstIterator = ret; +QCborArray__ConstIterator* QCborArray__ConstIterator_new() { + return new QCborArray::ConstIterator(); } -void QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1, QCborArray__ConstIterator** outptr_QCborArray__ConstIterator) { - QCborArray::ConstIterator* ret = new QCborArray::ConstIterator(*param1); - *outptr_QCborArray__ConstIterator = ret; +QCborArray__ConstIterator* QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1) { + return new QCborArray::ConstIterator(*param1); } void QCborArray__ConstIterator_OperatorAssign(QCborArray__ConstIterator* self, QCborArray__ConstIterator* other) { diff --git a/qt/cbor/gen_qcborarray.go b/qt/cbor/gen_qcborarray.go index 12e748a6..ab15bb29 100644 --- a/qt/cbor/gen_qcborarray.go +++ b/qt/cbor/gen_qcborarray.go @@ -38,34 +38,27 @@ func newQCborArray(h *C.QCborArray) *QCborArray { if h == nil { return nil } + return &QCborArray{h: h} } // UnsafeNewQCborArray constructs the type using only unsafe pointers. func UnsafeNewQCborArray(h unsafe.Pointer) *QCborArray { - if h == nil { - return nil - } - - return &QCborArray{h: (*C.QCborArray)(h)} + return newQCborArray((*C.QCborArray)(h)) } // NewQCborArray constructs a new QCborArray object. func NewQCborArray() *QCborArray { - var outptr_QCborArray *C.QCborArray = nil - C.QCborArray_new(&outptr_QCborArray) - ret := newQCborArray(outptr_QCborArray) + ret := newQCborArray(C.QCborArray_new()) ret.isSubclass = true return ret } // NewQCborArray2 constructs a new QCborArray object. func NewQCborArray2(other *QCborArray) *QCborArray { - var outptr_QCborArray *C.QCborArray = nil - C.QCborArray_new2(other.cPointer(), &outptr_QCborArray) - ret := newQCborArray(outptr_QCborArray) + ret := newQCborArray(C.QCborArray_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -384,34 +377,27 @@ func newQCborArray__Iterator(h *C.QCborArray__Iterator) *QCborArray__Iterator { if h == nil { return nil } + return &QCborArray__Iterator{h: h} } // UnsafeNewQCborArray__Iterator constructs the type using only unsafe pointers. func UnsafeNewQCborArray__Iterator(h unsafe.Pointer) *QCborArray__Iterator { - if h == nil { - return nil - } - - return &QCborArray__Iterator{h: (*C.QCborArray__Iterator)(h)} + return newQCborArray__Iterator((*C.QCborArray__Iterator)(h)) } // NewQCborArray__Iterator constructs a new QCborArray::Iterator object. func NewQCborArray__Iterator() *QCborArray__Iterator { - var outptr_QCborArray__Iterator *C.QCborArray__Iterator = nil - C.QCborArray__Iterator_new(&outptr_QCborArray__Iterator) - ret := newQCborArray__Iterator(outptr_QCborArray__Iterator) + ret := newQCborArray__Iterator(C.QCborArray__Iterator_new()) ret.isSubclass = true return ret } // NewQCborArray__Iterator2 constructs a new QCborArray::Iterator object. func NewQCborArray__Iterator2(param1 *QCborArray__Iterator) *QCborArray__Iterator { - var outptr_QCborArray__Iterator *C.QCborArray__Iterator = nil - C.QCborArray__Iterator_new2(param1.cPointer(), &outptr_QCborArray__Iterator) - ret := newQCborArray__Iterator(outptr_QCborArray__Iterator) + ret := newQCborArray__Iterator(C.QCborArray__Iterator_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -566,34 +552,27 @@ func newQCborArray__ConstIterator(h *C.QCborArray__ConstIterator) *QCborArray__C if h == nil { return nil } + return &QCborArray__ConstIterator{h: h} } // UnsafeNewQCborArray__ConstIterator constructs the type using only unsafe pointers. func UnsafeNewQCborArray__ConstIterator(h unsafe.Pointer) *QCborArray__ConstIterator { - if h == nil { - return nil - } - - return &QCborArray__ConstIterator{h: (*C.QCborArray__ConstIterator)(h)} + return newQCborArray__ConstIterator((*C.QCborArray__ConstIterator)(h)) } // NewQCborArray__ConstIterator constructs a new QCborArray::ConstIterator object. func NewQCborArray__ConstIterator() *QCborArray__ConstIterator { - var outptr_QCborArray__ConstIterator *C.QCborArray__ConstIterator = nil - C.QCborArray__ConstIterator_new(&outptr_QCborArray__ConstIterator) - ret := newQCborArray__ConstIterator(outptr_QCborArray__ConstIterator) + ret := newQCborArray__ConstIterator(C.QCborArray__ConstIterator_new()) ret.isSubclass = true return ret } // NewQCborArray__ConstIterator2 constructs a new QCborArray::ConstIterator object. func NewQCborArray__ConstIterator2(param1 *QCborArray__ConstIterator) *QCborArray__ConstIterator { - var outptr_QCborArray__ConstIterator *C.QCborArray__ConstIterator = nil - C.QCborArray__ConstIterator_new2(param1.cPointer(), &outptr_QCborArray__ConstIterator) - ret := newQCborArray__ConstIterator(outptr_QCborArray__ConstIterator) + ret := newQCborArray__ConstIterator(C.QCborArray__ConstIterator_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/cbor/gen_qcborarray.h b/qt/cbor/gen_qcborarray.h index cefe413e..2857f08b 100644 --- a/qt/cbor/gen_qcborarray.h +++ b/qt/cbor/gen_qcborarray.h @@ -38,8 +38,8 @@ typedef struct QCborValueRef QCborValueRef; typedef struct QJsonArray QJsonArray; #endif -void QCborArray_new(QCborArray** outptr_QCborArray); -void QCborArray_new2(QCborArray* other, QCborArray** outptr_QCborArray); +QCborArray* QCborArray_new(); +QCborArray* QCborArray_new2(QCborArray* other); void QCborArray_OperatorAssign(QCborArray* self, QCborArray* other); void QCborArray_Swap(QCborArray* self, QCborArray* other); QCborValue* QCborArray_ToCborValue(const QCborArray* self); @@ -94,8 +94,8 @@ QCborArray* QCborArray_FromJsonArray(QJsonArray* array); QJsonArray* QCborArray_ToJsonArray(const QCborArray* self); void QCborArray_Delete(QCborArray* self, bool isSubclass); -void QCborArray__Iterator_new(QCborArray__Iterator** outptr_QCborArray__Iterator); -void QCborArray__Iterator_new2(QCborArray__Iterator* param1, QCborArray__Iterator** outptr_QCborArray__Iterator); +QCborArray__Iterator* QCborArray__Iterator_new(); +QCborArray__Iterator* QCborArray__Iterator_new2(QCborArray__Iterator* param1); void QCborArray__Iterator_OperatorAssign(QCborArray__Iterator* self, QCborArray__Iterator* other); QCborValueRef* QCborArray__Iterator_OperatorMultiply(const QCborArray__Iterator* self); QCborValueRef* QCborArray__Iterator_OperatorMinusGreater(const QCborArray__Iterator* self); @@ -123,8 +123,8 @@ QCborArray__Iterator* QCborArray__Iterator_OperatorMinus(const QCborArray__Itera ptrdiff_t QCborArray__Iterator_OperatorMinusWithQCborArrayIterator(const QCborArray__Iterator* self, QCborArray__Iterator* j); void QCborArray__Iterator_Delete(QCborArray__Iterator* self, bool isSubclass); -void QCborArray__ConstIterator_new(QCborArray__ConstIterator** outptr_QCborArray__ConstIterator); -void QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1, QCborArray__ConstIterator** outptr_QCborArray__ConstIterator); +QCborArray__ConstIterator* QCborArray__ConstIterator_new(); +QCborArray__ConstIterator* QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1); void QCborArray__ConstIterator_OperatorAssign(QCborArray__ConstIterator* self, QCborArray__ConstIterator* other); QCborValueRef* QCborArray__ConstIterator_OperatorMultiply(const QCborArray__ConstIterator* self); QCborValueRef* QCborArray__ConstIterator_OperatorMinusGreater(const QCborArray__ConstIterator* self); diff --git a/qt/cbor/gen_qcborcommon.go b/qt/cbor/gen_qcborcommon.go index 0d415e35..175078ab 100644 --- a/qt/cbor/gen_qcborcommon.go +++ b/qt/cbor/gen_qcborcommon.go @@ -98,16 +98,13 @@ func newQCborError(h *C.QCborError) *QCborError { if h == nil { return nil } + return &QCborError{h: h} } // UnsafeNewQCborError constructs the type using only unsafe pointers. func UnsafeNewQCborError(h unsafe.Pointer) *QCborError { - if h == nil { - return nil - } - - return &QCborError{h: (*C.QCborError)(h)} + return newQCborError((*C.QCborError)(h)) } func (this *QCborError) ToString() string { diff --git a/qt/cbor/gen_qcbormap.cpp b/qt/cbor/gen_qcbormap.cpp index a256fe07..cd4252e8 100644 --- a/qt/cbor/gen_qcbormap.cpp +++ b/qt/cbor/gen_qcbormap.cpp @@ -15,14 +15,12 @@ #include "gen_qcbormap.h" #include "_cgo_export.h" -void QCborMap_new(QCborMap** outptr_QCborMap) { - QCborMap* ret = new QCborMap(); - *outptr_QCborMap = ret; +QCborMap* QCborMap_new() { + return new QCborMap(); } -void QCborMap_new2(QCborMap* other, QCborMap** outptr_QCborMap) { - QCborMap* ret = new QCborMap(*other); - *outptr_QCborMap = ret; +QCborMap* QCborMap_new2(QCborMap* other) { + return new QCborMap(*other); } void QCborMap_OperatorAssign(QCborMap* self, QCborMap* other) { @@ -359,14 +357,12 @@ void QCborMap_Delete(QCborMap* self, bool isSubclass) { } } -void QCborMap__Iterator_new(QCborMap__Iterator** outptr_QCborMap__Iterator) { - QCborMap::Iterator* ret = new QCborMap::Iterator(); - *outptr_QCborMap__Iterator = ret; +QCborMap__Iterator* QCborMap__Iterator_new() { + return new QCborMap::Iterator(); } -void QCborMap__Iterator_new2(QCborMap__Iterator* param1, QCborMap__Iterator** outptr_QCborMap__Iterator) { - QCborMap::Iterator* ret = new QCborMap::Iterator(*param1); - *outptr_QCborMap__Iterator = ret; +QCborMap__Iterator* QCborMap__Iterator_new2(QCborMap__Iterator* param1) { + return new QCborMap::Iterator(*param1); } void QCborMap__Iterator_OperatorAssign(QCborMap__Iterator* self, QCborMap__Iterator* other) { @@ -500,14 +496,12 @@ void QCborMap__Iterator_Delete(QCborMap__Iterator* self, bool isSubclass) { } } -void QCborMap__ConstIterator_new(QCborMap__ConstIterator** outptr_QCborMap__ConstIterator) { - QCborMap::ConstIterator* ret = new QCborMap::ConstIterator(); - *outptr_QCborMap__ConstIterator = ret; +QCborMap__ConstIterator* QCborMap__ConstIterator_new() { + return new QCborMap::ConstIterator(); } -void QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1, QCborMap__ConstIterator** outptr_QCborMap__ConstIterator) { - QCborMap::ConstIterator* ret = new QCborMap::ConstIterator(*param1); - *outptr_QCborMap__ConstIterator = ret; +QCborMap__ConstIterator* QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1) { + return new QCborMap::ConstIterator(*param1); } void QCborMap__ConstIterator_OperatorAssign(QCborMap__ConstIterator* self, QCborMap__ConstIterator* other) { diff --git a/qt/cbor/gen_qcbormap.go b/qt/cbor/gen_qcbormap.go index 3a3f3913..d73c1419 100644 --- a/qt/cbor/gen_qcbormap.go +++ b/qt/cbor/gen_qcbormap.go @@ -38,34 +38,27 @@ func newQCborMap(h *C.QCborMap) *QCborMap { if h == nil { return nil } + return &QCborMap{h: h} } // UnsafeNewQCborMap constructs the type using only unsafe pointers. func UnsafeNewQCborMap(h unsafe.Pointer) *QCborMap { - if h == nil { - return nil - } - - return &QCborMap{h: (*C.QCborMap)(h)} + return newQCborMap((*C.QCborMap)(h)) } // NewQCborMap constructs a new QCborMap object. func NewQCborMap() *QCborMap { - var outptr_QCborMap *C.QCborMap = nil - C.QCborMap_new(&outptr_QCborMap) - ret := newQCborMap(outptr_QCborMap) + ret := newQCborMap(C.QCborMap_new()) ret.isSubclass = true return ret } // NewQCborMap2 constructs a new QCborMap object. func NewQCborMap2(other *QCborMap) *QCborMap { - var outptr_QCborMap *C.QCborMap = nil - C.QCborMap_new2(other.cPointer(), &outptr_QCborMap) - ret := newQCborMap(outptr_QCborMap) + ret := newQCborMap(C.QCborMap_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -566,34 +559,27 @@ func newQCborMap__Iterator(h *C.QCborMap__Iterator) *QCborMap__Iterator { if h == nil { return nil } + return &QCborMap__Iterator{h: h} } // UnsafeNewQCborMap__Iterator constructs the type using only unsafe pointers. func UnsafeNewQCborMap__Iterator(h unsafe.Pointer) *QCborMap__Iterator { - if h == nil { - return nil - } - - return &QCborMap__Iterator{h: (*C.QCborMap__Iterator)(h)} + return newQCborMap__Iterator((*C.QCborMap__Iterator)(h)) } // NewQCborMap__Iterator constructs a new QCborMap::Iterator object. func NewQCborMap__Iterator() *QCborMap__Iterator { - var outptr_QCborMap__Iterator *C.QCborMap__Iterator = nil - C.QCborMap__Iterator_new(&outptr_QCborMap__Iterator) - ret := newQCborMap__Iterator(outptr_QCborMap__Iterator) + ret := newQCborMap__Iterator(C.QCborMap__Iterator_new()) ret.isSubclass = true return ret } // NewQCborMap__Iterator2 constructs a new QCborMap::Iterator object. func NewQCborMap__Iterator2(param1 *QCborMap__Iterator) *QCborMap__Iterator { - var outptr_QCborMap__Iterator *C.QCborMap__Iterator = nil - C.QCborMap__Iterator_new2(param1.cPointer(), &outptr_QCborMap__Iterator) - ret := newQCborMap__Iterator(outptr_QCborMap__Iterator) + ret := newQCborMap__Iterator(C.QCborMap__Iterator_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -769,34 +755,27 @@ func newQCborMap__ConstIterator(h *C.QCborMap__ConstIterator) *QCborMap__ConstIt if h == nil { return nil } + return &QCborMap__ConstIterator{h: h} } // UnsafeNewQCborMap__ConstIterator constructs the type using only unsafe pointers. func UnsafeNewQCborMap__ConstIterator(h unsafe.Pointer) *QCborMap__ConstIterator { - if h == nil { - return nil - } - - return &QCborMap__ConstIterator{h: (*C.QCborMap__ConstIterator)(h)} + return newQCborMap__ConstIterator((*C.QCborMap__ConstIterator)(h)) } // NewQCborMap__ConstIterator constructs a new QCborMap::ConstIterator object. func NewQCborMap__ConstIterator() *QCborMap__ConstIterator { - var outptr_QCborMap__ConstIterator *C.QCborMap__ConstIterator = nil - C.QCborMap__ConstIterator_new(&outptr_QCborMap__ConstIterator) - ret := newQCborMap__ConstIterator(outptr_QCborMap__ConstIterator) + ret := newQCborMap__ConstIterator(C.QCborMap__ConstIterator_new()) ret.isSubclass = true return ret } // NewQCborMap__ConstIterator2 constructs a new QCborMap::ConstIterator object. func NewQCborMap__ConstIterator2(param1 *QCborMap__ConstIterator) *QCborMap__ConstIterator { - var outptr_QCborMap__ConstIterator *C.QCborMap__ConstIterator = nil - C.QCborMap__ConstIterator_new2(param1.cPointer(), &outptr_QCborMap__ConstIterator) - ret := newQCborMap__ConstIterator(outptr_QCborMap__ConstIterator) + ret := newQCborMap__ConstIterator(C.QCborMap__ConstIterator_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/cbor/gen_qcbormap.h b/qt/cbor/gen_qcbormap.h index 15da0222..583a1c26 100644 --- a/qt/cbor/gen_qcbormap.h +++ b/qt/cbor/gen_qcbormap.h @@ -40,8 +40,8 @@ typedef struct QJsonObject QJsonObject; typedef struct QVariant QVariant; #endif -void QCborMap_new(QCborMap** outptr_QCborMap); -void QCborMap_new2(QCborMap* other, QCborMap** outptr_QCborMap); +QCborMap* QCborMap_new(); +QCborMap* QCborMap_new2(QCborMap* other); void QCborMap_OperatorAssign(QCborMap* self, QCborMap* other); void QCborMap_Swap(QCborMap* self, QCborMap* other); QCborValue* QCborMap_ToCborValue(const QCborMap* self); @@ -105,8 +105,8 @@ struct miqt_map /* of struct miqt_string to QVariant* */ QCborMap_ToVariantHash QJsonObject* QCborMap_ToJsonObject(const QCborMap* self); void QCborMap_Delete(QCborMap* self, bool isSubclass); -void QCborMap__Iterator_new(QCborMap__Iterator** outptr_QCborMap__Iterator); -void QCborMap__Iterator_new2(QCborMap__Iterator* param1, QCborMap__Iterator** outptr_QCborMap__Iterator); +QCborMap__Iterator* QCborMap__Iterator_new(); +QCborMap__Iterator* QCborMap__Iterator_new2(QCborMap__Iterator* param1); void QCborMap__Iterator_OperatorAssign(QCborMap__Iterator* self, QCborMap__Iterator* other); struct miqt_map /* tuple of QCborValueRef* and QCborValueRef* */ QCborMap__Iterator_OperatorMultiply(const QCborMap__Iterator* self); QCborValueRef* QCborMap__Iterator_OperatorMinusGreater(const QCborMap__Iterator* self); @@ -135,8 +135,8 @@ QCborMap__Iterator* QCborMap__Iterator_OperatorMinus(const QCborMap__Iterator* s ptrdiff_t QCborMap__Iterator_OperatorMinusWithQCborMapIterator(const QCborMap__Iterator* self, QCborMap__Iterator* j); void QCborMap__Iterator_Delete(QCborMap__Iterator* self, bool isSubclass); -void QCborMap__ConstIterator_new(QCborMap__ConstIterator** outptr_QCborMap__ConstIterator); -void QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1, QCborMap__ConstIterator** outptr_QCborMap__ConstIterator); +QCborMap__ConstIterator* QCborMap__ConstIterator_new(); +QCborMap__ConstIterator* QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1); void QCborMap__ConstIterator_OperatorAssign(QCborMap__ConstIterator* self, QCborMap__ConstIterator* other); struct miqt_map /* tuple of QCborValueRef* and QCborValueRef* */ QCborMap__ConstIterator_OperatorMultiply(const QCborMap__ConstIterator* self); QCborValueRef* QCborMap__ConstIterator_OperatorMinusGreater(const QCborMap__ConstIterator* self); diff --git a/qt/cbor/gen_qcborstreamreader.cpp b/qt/cbor/gen_qcborstreamreader.cpp index d60e7de0..9c8c23d4 100644 --- a/qt/cbor/gen_qcborstreamreader.cpp +++ b/qt/cbor/gen_qcborstreamreader.cpp @@ -6,30 +6,25 @@ #include "gen_qcborstreamreader.h" #include "_cgo_export.h" -void QCborStreamReader_new(QCborStreamReader** outptr_QCborStreamReader) { - QCborStreamReader* ret = new QCborStreamReader(); - *outptr_QCborStreamReader = ret; +QCborStreamReader* QCborStreamReader_new() { + return new QCborStreamReader(); } -void QCborStreamReader_new2(const char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader) { - QCborStreamReader* ret = new QCborStreamReader(data, (qsizetype)(lenVal)); - *outptr_QCborStreamReader = ret; +QCborStreamReader* QCborStreamReader_new2(const char* data, ptrdiff_t lenVal) { + return new QCborStreamReader(data, (qsizetype)(lenVal)); } -void QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader) { - QCborStreamReader* ret = new QCborStreamReader(static_cast(data), (qsizetype)(lenVal)); - *outptr_QCborStreamReader = ret; +QCborStreamReader* QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal) { + return new QCborStreamReader(static_cast(data), (qsizetype)(lenVal)); } -void QCborStreamReader_new4(struct miqt_string data, QCborStreamReader** outptr_QCborStreamReader) { +QCborStreamReader* QCborStreamReader_new4(struct miqt_string data) { QByteArray data_QByteArray(data.data, data.len); - QCborStreamReader* ret = new QCborStreamReader(data_QByteArray); - *outptr_QCborStreamReader = ret; + return new QCborStreamReader(data_QByteArray); } -void QCborStreamReader_new5(QIODevice* device, QCborStreamReader** outptr_QCborStreamReader) { - QCborStreamReader* ret = new QCborStreamReader(device); - *outptr_QCborStreamReader = ret; +QCborStreamReader* QCborStreamReader_new5(QIODevice* device) { + return new QCborStreamReader(device); } void QCborStreamReader_SetDevice(QCborStreamReader* self, QIODevice* device) { diff --git a/qt/cbor/gen_qcborstreamreader.go b/qt/cbor/gen_qcborstreamreader.go index 6f78a40f..92d164df 100644 --- a/qt/cbor/gen_qcborstreamreader.go +++ b/qt/cbor/gen_qcborstreamreader.go @@ -66,24 +66,19 @@ func newQCborStreamReader(h *C.QCborStreamReader) *QCborStreamReader { if h == nil { return nil } + return &QCborStreamReader{h: h} } // UnsafeNewQCborStreamReader constructs the type using only unsafe pointers. func UnsafeNewQCborStreamReader(h unsafe.Pointer) *QCborStreamReader { - if h == nil { - return nil - } - - return &QCborStreamReader{h: (*C.QCborStreamReader)(h)} + return newQCborStreamReader((*C.QCborStreamReader)(h)) } // NewQCborStreamReader constructs a new QCborStreamReader object. func NewQCborStreamReader() *QCborStreamReader { - var outptr_QCborStreamReader *C.QCborStreamReader = nil - C.QCborStreamReader_new(&outptr_QCborStreamReader) - ret := newQCborStreamReader(outptr_QCborStreamReader) + ret := newQCborStreamReader(C.QCborStreamReader_new()) ret.isSubclass = true return ret } @@ -92,20 +87,16 @@ func NewQCborStreamReader() *QCborStreamReader { func NewQCborStreamReader2(data string, lenVal int64) *QCborStreamReader { data_Cstring := C.CString(data) defer C.free(unsafe.Pointer(data_Cstring)) - var outptr_QCborStreamReader *C.QCborStreamReader = nil - C.QCborStreamReader_new2(data_Cstring, (C.ptrdiff_t)(lenVal), &outptr_QCborStreamReader) - ret := newQCborStreamReader(outptr_QCborStreamReader) + ret := newQCborStreamReader(C.QCborStreamReader_new2(data_Cstring, (C.ptrdiff_t)(lenVal))) ret.isSubclass = true return ret } // NewQCborStreamReader3 constructs a new QCborStreamReader object. func NewQCborStreamReader3(data *byte, lenVal int64) *QCborStreamReader { - var outptr_QCborStreamReader *C.QCborStreamReader = nil - C.QCborStreamReader_new3((*C.uchar)(unsafe.Pointer(data)), (C.ptrdiff_t)(lenVal), &outptr_QCborStreamReader) - ret := newQCborStreamReader(outptr_QCborStreamReader) + ret := newQCborStreamReader(C.QCborStreamReader_new3((*C.uchar)(unsafe.Pointer(data)), (C.ptrdiff_t)(lenVal))) ret.isSubclass = true return ret } @@ -115,20 +106,16 @@ func NewQCborStreamReader4(data []byte) *QCborStreamReader { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QCborStreamReader *C.QCborStreamReader = nil - C.QCborStreamReader_new4(data_alias, &outptr_QCborStreamReader) - ret := newQCborStreamReader(outptr_QCborStreamReader) + ret := newQCborStreamReader(C.QCborStreamReader_new4(data_alias)) ret.isSubclass = true return ret } // NewQCborStreamReader5 constructs a new QCborStreamReader object. func NewQCborStreamReader5(device *qt.QIODevice) *QCborStreamReader { - var outptr_QCborStreamReader *C.QCborStreamReader = nil - C.QCborStreamReader_new5((*C.QIODevice)(device.UnsafePointer()), &outptr_QCborStreamReader) - ret := newQCborStreamReader(outptr_QCborStreamReader) + ret := newQCborStreamReader(C.QCborStreamReader_new5((*C.QIODevice)(device.UnsafePointer()))) ret.isSubclass = true return ret } @@ -138,7 +125,7 @@ func (this *QCborStreamReader) SetDevice(device *qt.QIODevice) { } func (this *QCborStreamReader) Device() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamReader_Device(this.h)), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamReader_Device(this.h))) } func (this *QCborStreamReader) AddData(data []byte) { diff --git a/qt/cbor/gen_qcborstreamreader.h b/qt/cbor/gen_qcborstreamreader.h index e5a3728a..70db1888 100644 --- a/qt/cbor/gen_qcborstreamreader.h +++ b/qt/cbor/gen_qcborstreamreader.h @@ -24,11 +24,11 @@ typedef struct QCborStreamReader QCborStreamReader; typedef struct QIODevice QIODevice; #endif -void QCborStreamReader_new(QCborStreamReader** outptr_QCborStreamReader); -void QCborStreamReader_new2(const char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader); -void QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader); -void QCborStreamReader_new4(struct miqt_string data, QCborStreamReader** outptr_QCborStreamReader); -void QCborStreamReader_new5(QIODevice* device, QCborStreamReader** outptr_QCborStreamReader); +QCborStreamReader* QCborStreamReader_new(); +QCborStreamReader* QCborStreamReader_new2(const char* data, ptrdiff_t lenVal); +QCborStreamReader* QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal); +QCborStreamReader* QCborStreamReader_new4(struct miqt_string data); +QCborStreamReader* QCborStreamReader_new5(QIODevice* device); void QCborStreamReader_SetDevice(QCborStreamReader* self, QIODevice* device); QIODevice* QCborStreamReader_Device(const QCborStreamReader* self); void QCborStreamReader_AddData(QCborStreamReader* self, struct miqt_string data); diff --git a/qt/cbor/gen_qcborstreamwriter.cpp b/qt/cbor/gen_qcborstreamwriter.cpp index a629cd9c..38e450b6 100644 --- a/qt/cbor/gen_qcborstreamwriter.cpp +++ b/qt/cbor/gen_qcborstreamwriter.cpp @@ -5,9 +5,8 @@ #include "gen_qcborstreamwriter.h" #include "_cgo_export.h" -void QCborStreamWriter_new(QIODevice* device, QCborStreamWriter** outptr_QCborStreamWriter) { - QCborStreamWriter* ret = new QCborStreamWriter(device); - *outptr_QCborStreamWriter = ret; +QCborStreamWriter* QCborStreamWriter_new(QIODevice* device) { + return new QCborStreamWriter(device); } void QCborStreamWriter_SetDevice(QCborStreamWriter* self, QIODevice* device) { diff --git a/qt/cbor/gen_qcborstreamwriter.go b/qt/cbor/gen_qcborstreamwriter.go index df4a57d2..62f14e67 100644 --- a/qt/cbor/gen_qcborstreamwriter.go +++ b/qt/cbor/gen_qcborstreamwriter.go @@ -38,24 +38,19 @@ func newQCborStreamWriter(h *C.QCborStreamWriter) *QCborStreamWriter { if h == nil { return nil } + return &QCborStreamWriter{h: h} } // UnsafeNewQCborStreamWriter constructs the type using only unsafe pointers. func UnsafeNewQCborStreamWriter(h unsafe.Pointer) *QCborStreamWriter { - if h == nil { - return nil - } - - return &QCborStreamWriter{h: (*C.QCborStreamWriter)(h)} + return newQCborStreamWriter((*C.QCborStreamWriter)(h)) } // NewQCborStreamWriter constructs a new QCborStreamWriter object. func NewQCborStreamWriter(device *qt.QIODevice) *QCborStreamWriter { - var outptr_QCborStreamWriter *C.QCborStreamWriter = nil - C.QCborStreamWriter_new((*C.QIODevice)(device.UnsafePointer()), &outptr_QCborStreamWriter) - ret := newQCborStreamWriter(outptr_QCborStreamWriter) + ret := newQCborStreamWriter(C.QCborStreamWriter_new((*C.QIODevice)(device.UnsafePointer()))) ret.isSubclass = true return ret } @@ -65,7 +60,7 @@ func (this *QCborStreamWriter) SetDevice(device *qt.QIODevice) { } func (this *QCborStreamWriter) Device() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamWriter_Device(this.h)), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamWriter_Device(this.h))) } func (this *QCborStreamWriter) Append(u uint64) { diff --git a/qt/cbor/gen_qcborstreamwriter.h b/qt/cbor/gen_qcborstreamwriter.h index 63c8c82c..650a6ef4 100644 --- a/qt/cbor/gen_qcborstreamwriter.h +++ b/qt/cbor/gen_qcborstreamwriter.h @@ -22,7 +22,7 @@ typedef struct QCborStreamWriter QCborStreamWriter; typedef struct QIODevice QIODevice; #endif -void QCborStreamWriter_new(QIODevice* device, QCborStreamWriter** outptr_QCborStreamWriter); +QCborStreamWriter* QCborStreamWriter_new(QIODevice* device); void QCborStreamWriter_SetDevice(QCborStreamWriter* self, QIODevice* device); QIODevice* QCborStreamWriter_Device(const QCborStreamWriter* self); void QCborStreamWriter_Append(QCborStreamWriter* self, unsigned long long u); diff --git a/qt/cbor/gen_qcborvalue.cpp b/qt/cbor/gen_qcborvalue.cpp index 412860ad..2bd2da3c 100644 --- a/qt/cbor/gen_qcborvalue.cpp +++ b/qt/cbor/gen_qcborvalue.cpp @@ -38,116 +38,94 @@ void QCborParserError_Delete(QCborParserError* self, bool isSubclass) { } } -void QCborValue_new(QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new() { + return new QCborValue(); } -void QCborValue_new2(int t_, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(t_)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new2(int t_) { + return new QCborValue(static_cast(t_)); } -void QCborValue_new3(bool b_, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(b_); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new3(bool b_) { + return new QCborValue(b_); } -void QCborValue_new4(int i, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(i)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new4(int i) { + return new QCborValue(static_cast(i)); } -void QCborValue_new5(unsigned int u, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(u)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new5(unsigned int u) { + return new QCborValue(static_cast(u)); } -void QCborValue_new6(long long i, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(i)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new6(long long i) { + return new QCborValue(static_cast(i)); } -void QCborValue_new7(double v, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(v)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new7(double v) { + return new QCborValue(static_cast(v)); } -void QCborValue_new8(uint8_t st, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(st)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new8(uint8_t st) { + return new QCborValue(static_cast(st)); } -void QCborValue_new9(struct miqt_string ba, QCborValue** outptr_QCborValue) { +QCborValue* QCborValue_new9(struct miqt_string ba) { QByteArray ba_QByteArray(ba.data, ba.len); - QCborValue* ret = new QCborValue(ba_QByteArray); - *outptr_QCborValue = ret; + return new QCborValue(ba_QByteArray); } -void QCborValue_new10(struct miqt_string s, QCborValue** outptr_QCborValue) { +QCborValue* QCborValue_new10(struct miqt_string s) { QString s_QString = QString::fromUtf8(s.data, s.len); - QCborValue* ret = new QCborValue(s_QString); - *outptr_QCborValue = ret; + return new QCborValue(s_QString); } -void QCborValue_new11(const char* s, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(s); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new11(const char* s) { + return new QCborValue(s); } -void QCborValue_new12(QCborArray* a, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(*a); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new12(QCborArray* a) { + return new QCborValue(*a); } -void QCborValue_new13(QCborMap* m, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(*m); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new13(QCborMap* m) { + return new QCborValue(*m); } -void QCborValue_new14(uint64_t tag, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(tag)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new14(uint64_t tag) { + return new QCborValue(static_cast(tag)); } -void QCborValue_new15(int t_, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(t_)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new15(int t_) { + return new QCborValue(static_cast(t_)); } -void QCborValue_new16(QDateTime* dt, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(*dt); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new16(QDateTime* dt) { + return new QCborValue(*dt); } -void QCborValue_new17(QUrl* url, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(*url); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new17(QUrl* url) { + return new QCborValue(*url); } -void QCborValue_new18(QRegularExpression* rx, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(*rx); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new18(QRegularExpression* rx) { + return new QCborValue(*rx); } -void QCborValue_new19(QUuid* uuid, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(*uuid); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new19(QUuid* uuid) { + return new QCborValue(*uuid); } -void QCborValue_new20(QCborValue* other, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(*other); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new20(QCborValue* other) { + return new QCborValue(*other); } -void QCborValue_new21(uint64_t tag, QCborValue* taggedValue, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(tag), *taggedValue); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new21(uint64_t tag, QCborValue* taggedValue) { + return new QCborValue(static_cast(tag), *taggedValue); } -void QCborValue_new22(int t_, QCborValue* tv, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(t_), *tv); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new22(int t_, QCborValue* tv) { + return new QCborValue(static_cast(t_), *tv); } void QCborValue_OperatorAssign(QCborValue* self, QCborValue* other) { @@ -523,9 +501,8 @@ void QCborValue_Delete(QCborValue* self, bool isSubclass) { } } -void QCborValueRef_new(QCborValueRef* param1, QCborValueRef** outptr_QCborValueRef) { - QCborValueRef* ret = new QCborValueRef(*param1); - *outptr_QCborValueRef = ret; +QCborValueRef* QCborValueRef_new(QCborValueRef* param1) { + return new QCborValueRef(*param1); } void QCborValueRef_OperatorAssign(QCborValueRef* self, QCborValue* other) { diff --git a/qt/cbor/gen_qcborvalue.go b/qt/cbor/gen_qcborvalue.go index ab1de27d..83f062a4 100644 --- a/qt/cbor/gen_qcborvalue.go +++ b/qt/cbor/gen_qcborvalue.go @@ -78,16 +78,13 @@ func newQCborParserError(h *C.QCborParserError) *QCborParserError { if h == nil { return nil } + return &QCborParserError{h: h} } // UnsafeNewQCborParserError constructs the type using only unsafe pointers. func UnsafeNewQCborParserError(h unsafe.Pointer) *QCborParserError { - if h == nil { - return nil - } - - return &QCborParserError{h: (*C.QCborParserError)(h)} + return newQCborParserError((*C.QCborParserError)(h)) } func (this *QCborParserError) ErrorString() string { @@ -135,94 +132,75 @@ func newQCborValue(h *C.QCborValue) *QCborValue { if h == nil { return nil } + return &QCborValue{h: h} } // UnsafeNewQCborValue constructs the type using only unsafe pointers. func UnsafeNewQCborValue(h unsafe.Pointer) *QCborValue { - if h == nil { - return nil - } - - return &QCborValue{h: (*C.QCborValue)(h)} + return newQCborValue((*C.QCborValue)(h)) } // NewQCborValue constructs a new QCborValue object. func NewQCborValue() *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new(&outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new()) ret.isSubclass = true return ret } // NewQCborValue2 constructs a new QCborValue object. func NewQCborValue2(t_ QCborValue__Type) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new2((C.int)(t_), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new2((C.int)(t_))) ret.isSubclass = true return ret } // NewQCborValue3 constructs a new QCborValue object. func NewQCborValue3(b_ bool) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new3((C.bool)(b_), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new3((C.bool)(b_))) ret.isSubclass = true return ret } // NewQCborValue4 constructs a new QCborValue object. func NewQCborValue4(i int) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new4((C.int)(i), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new4((C.int)(i))) ret.isSubclass = true return ret } // NewQCborValue5 constructs a new QCborValue object. func NewQCborValue5(u uint) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new5((C.uint)(u), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new5((C.uint)(u))) ret.isSubclass = true return ret } // NewQCborValue6 constructs a new QCborValue object. func NewQCborValue6(i int64) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new6((C.longlong)(i), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new6((C.longlong)(i))) ret.isSubclass = true return ret } // NewQCborValue7 constructs a new QCborValue object. func NewQCborValue7(v float64) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new7((C.double)(v), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new7((C.double)(v))) ret.isSubclass = true return ret } // NewQCborValue8 constructs a new QCborValue object. func NewQCborValue8(st QCborSimpleType) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new8((C.uint8_t)(st), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new8((C.uint8_t)(st))) ret.isSubclass = true return ret } @@ -232,10 +210,8 @@ func NewQCborValue9(ba []byte) *QCborValue { ba_alias := C.struct_miqt_string{} ba_alias.data = (*C.char)(unsafe.Pointer(&ba[0])) ba_alias.len = C.size_t(len(ba)) - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new9(ba_alias, &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new9(ba_alias)) ret.isSubclass = true return ret } @@ -246,10 +222,8 @@ func NewQCborValue10(s string) *QCborValue { s_ms.data = C.CString(s) s_ms.len = C.size_t(len(s)) defer C.free(unsafe.Pointer(s_ms.data)) - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new10(s_ms, &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new10(s_ms)) ret.isSubclass = true return ret } @@ -258,120 +232,96 @@ func NewQCborValue10(s string) *QCborValue { func NewQCborValue11(s string) *QCborValue { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new11(s_Cstring, &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new11(s_Cstring)) ret.isSubclass = true return ret } // NewQCborValue12 constructs a new QCborValue object. func NewQCborValue12(a *QCborArray) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new12(a.cPointer(), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new12(a.cPointer())) ret.isSubclass = true return ret } // NewQCborValue13 constructs a new QCborValue object. func NewQCborValue13(m *QCborMap) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new13(m.cPointer(), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new13(m.cPointer())) ret.isSubclass = true return ret } // NewQCborValue14 constructs a new QCborValue object. func NewQCborValue14(tag QCborTag) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new14((C.uint64_t)(tag), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new14((C.uint64_t)(tag))) ret.isSubclass = true return ret } // NewQCborValue15 constructs a new QCborValue object. func NewQCborValue15(t_ QCborKnownTags) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new15((C.int)(t_), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new15((C.int)(t_))) ret.isSubclass = true return ret } // NewQCborValue16 constructs a new QCborValue object. func NewQCborValue16(dt *qt.QDateTime) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new16((*C.QDateTime)(dt.UnsafePointer()), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new16((*C.QDateTime)(dt.UnsafePointer()))) ret.isSubclass = true return ret } // NewQCborValue17 constructs a new QCborValue object. func NewQCborValue17(url *qt.QUrl) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new17((*C.QUrl)(url.UnsafePointer()), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new17((*C.QUrl)(url.UnsafePointer()))) ret.isSubclass = true return ret } // NewQCborValue18 constructs a new QCborValue object. func NewQCborValue18(rx *qt.QRegularExpression) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new18((*C.QRegularExpression)(rx.UnsafePointer()), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new18((*C.QRegularExpression)(rx.UnsafePointer()))) ret.isSubclass = true return ret } // NewQCborValue19 constructs a new QCborValue object. func NewQCborValue19(uuid *qt.QUuid) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new19((*C.QUuid)(uuid.UnsafePointer()), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new19((*C.QUuid)(uuid.UnsafePointer()))) ret.isSubclass = true return ret } // NewQCborValue20 constructs a new QCborValue object. func NewQCborValue20(other *QCborValue) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new20(other.cPointer(), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new20(other.cPointer())) ret.isSubclass = true return ret } // NewQCborValue21 constructs a new QCborValue object. func NewQCborValue21(tag QCborTag, taggedValue *QCborValue) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new21((C.uint64_t)(tag), taggedValue.cPointer(), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new21((C.uint64_t)(tag), taggedValue.cPointer())) ret.isSubclass = true return ret } // NewQCborValue22 constructs a new QCborValue object. func NewQCborValue22(t_ QCborKnownTags, tv *QCborValue) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new22((C.int)(t_), tv.cPointer(), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new22((C.int)(t_), tv.cPointer())) ret.isSubclass = true return ret } @@ -825,24 +775,19 @@ func newQCborValueRef(h *C.QCborValueRef) *QCborValueRef { if h == nil { return nil } + return &QCborValueRef{h: h} } // UnsafeNewQCborValueRef constructs the type using only unsafe pointers. func UnsafeNewQCborValueRef(h unsafe.Pointer) *QCborValueRef { - if h == nil { - return nil - } - - return &QCborValueRef{h: (*C.QCborValueRef)(h)} + return newQCborValueRef((*C.QCborValueRef)(h)) } // NewQCborValueRef constructs a new QCborValueRef object. func NewQCborValueRef(param1 *QCborValueRef) *QCborValueRef { - var outptr_QCborValueRef *C.QCborValueRef = nil - C.QCborValueRef_new(param1.cPointer(), &outptr_QCborValueRef) - ret := newQCborValueRef(outptr_QCborValueRef) + ret := newQCborValueRef(C.QCborValueRef_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/cbor/gen_qcborvalue.h b/qt/cbor/gen_qcborvalue.h index 7c6fddde..fdb31380 100644 --- a/qt/cbor/gen_qcborvalue.h +++ b/qt/cbor/gen_qcborvalue.h @@ -47,28 +47,28 @@ typedef struct QVariant QVariant; struct miqt_string QCborParserError_ErrorString(const QCborParserError* self); void QCborParserError_Delete(QCborParserError* self, bool isSubclass); -void QCborValue_new(QCborValue** outptr_QCborValue); -void QCborValue_new2(int t_, QCborValue** outptr_QCborValue); -void QCborValue_new3(bool b_, QCborValue** outptr_QCborValue); -void QCborValue_new4(int i, QCborValue** outptr_QCborValue); -void QCborValue_new5(unsigned int u, QCborValue** outptr_QCborValue); -void QCborValue_new6(long long i, QCborValue** outptr_QCborValue); -void QCborValue_new7(double v, QCborValue** outptr_QCborValue); -void QCborValue_new8(uint8_t st, QCborValue** outptr_QCborValue); -void QCborValue_new9(struct miqt_string ba, QCborValue** outptr_QCborValue); -void QCborValue_new10(struct miqt_string s, QCborValue** outptr_QCborValue); -void QCborValue_new11(const char* s, QCborValue** outptr_QCborValue); -void QCborValue_new12(QCborArray* a, QCborValue** outptr_QCborValue); -void QCborValue_new13(QCborMap* m, QCborValue** outptr_QCborValue); -void QCborValue_new14(uint64_t tag, QCborValue** outptr_QCborValue); -void QCborValue_new15(int t_, QCborValue** outptr_QCborValue); -void QCborValue_new16(QDateTime* dt, QCborValue** outptr_QCborValue); -void QCborValue_new17(QUrl* url, QCborValue** outptr_QCborValue); -void QCborValue_new18(QRegularExpression* rx, QCborValue** outptr_QCborValue); -void QCborValue_new19(QUuid* uuid, QCborValue** outptr_QCborValue); -void QCborValue_new20(QCborValue* other, QCborValue** outptr_QCborValue); -void QCborValue_new21(uint64_t tag, QCborValue* taggedValue, QCborValue** outptr_QCborValue); -void QCborValue_new22(int t_, QCborValue* tv, QCborValue** outptr_QCborValue); +QCborValue* QCborValue_new(); +QCborValue* QCborValue_new2(int t_); +QCborValue* QCborValue_new3(bool b_); +QCborValue* QCborValue_new4(int i); +QCborValue* QCborValue_new5(unsigned int u); +QCborValue* QCborValue_new6(long long i); +QCborValue* QCborValue_new7(double v); +QCborValue* QCborValue_new8(uint8_t st); +QCborValue* QCborValue_new9(struct miqt_string ba); +QCborValue* QCborValue_new10(struct miqt_string s); +QCborValue* QCborValue_new11(const char* s); +QCborValue* QCborValue_new12(QCborArray* a); +QCborValue* QCborValue_new13(QCborMap* m); +QCborValue* QCborValue_new14(uint64_t tag); +QCborValue* QCborValue_new15(int t_); +QCborValue* QCborValue_new16(QDateTime* dt); +QCborValue* QCborValue_new17(QUrl* url); +QCborValue* QCborValue_new18(QRegularExpression* rx); +QCborValue* QCborValue_new19(QUuid* uuid); +QCborValue* QCborValue_new20(QCborValue* other); +QCborValue* QCborValue_new21(uint64_t tag, QCborValue* taggedValue); +QCborValue* QCborValue_new22(int t_, QCborValue* tv); void QCborValue_OperatorAssign(QCborValue* self, QCborValue* other); void QCborValue_Swap(QCborValue* self, QCborValue* other); int QCborValue_Type(const QCborValue* self); @@ -147,7 +147,7 @@ void QCborValue_ToCbor2(QCborValue* self, QCborStreamWriter* writer, int opt); struct miqt_string QCborValue_ToDiagnosticNotation1(const QCborValue* self, int opts); void QCborValue_Delete(QCborValue* self, bool isSubclass); -void QCborValueRef_new(QCborValueRef* param1, QCborValueRef** outptr_QCborValueRef); +QCborValueRef* QCborValueRef_new(QCborValueRef* param1); void QCborValueRef_OperatorAssign(QCborValueRef* self, QCborValue* other); void QCborValueRef_OperatorAssignWithOther(QCborValueRef* self, QCborValueRef* other); int QCborValueRef_Type(const QCborValueRef* self); diff --git a/qt/gen_qabstractanimation.cpp b/qt/gen_qabstractanimation.cpp index ca36dff6..0485b9d0 100644 --- a/qt/gen_qabstractanimation.cpp +++ b/qt/gen_qabstractanimation.cpp @@ -278,16 +278,16 @@ public: }; -void QAbstractAnimation_new(QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQAbstractAnimation* ret = new MiqtVirtualQAbstractAnimation(); - *outptr_QAbstractAnimation = ret; - *outptr_QObject = static_cast(ret); +QAbstractAnimation* QAbstractAnimation_new() { + return new MiqtVirtualQAbstractAnimation(); } -void QAbstractAnimation_new2(QObject* parent, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQAbstractAnimation* ret = new MiqtVirtualQAbstractAnimation(parent); - *outptr_QAbstractAnimation = ret; - *outptr_QObject = static_cast(ret); +QAbstractAnimation* QAbstractAnimation_new2(QObject* parent) { + return new MiqtVirtualQAbstractAnimation(parent); +} + +void QAbstractAnimation_virtbase(QAbstractAnimation* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAbstractAnimation_MetaObject(const QAbstractAnimation* self) { @@ -846,16 +846,16 @@ public: }; -void QAnimationDriver_new(QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject) { - MiqtVirtualQAnimationDriver* ret = new MiqtVirtualQAnimationDriver(); - *outptr_QAnimationDriver = ret; - *outptr_QObject = static_cast(ret); +QAnimationDriver* QAnimationDriver_new() { + return new MiqtVirtualQAnimationDriver(); } -void QAnimationDriver_new2(QObject* parent, QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject) { - MiqtVirtualQAnimationDriver* ret = new MiqtVirtualQAnimationDriver(parent); - *outptr_QAnimationDriver = ret; - *outptr_QObject = static_cast(ret); +QAnimationDriver* QAnimationDriver_new2(QObject* parent) { + return new MiqtVirtualQAnimationDriver(parent); +} + +void QAnimationDriver_virtbase(QAnimationDriver* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAnimationDriver_MetaObject(const QAnimationDriver* self) { diff --git a/qt/gen_qabstractanimation.go b/qt/gen_qabstractanimation.go index 75ecb4cc..04129004 100644 --- a/qt/gen_qabstractanimation.go +++ b/qt/gen_qabstractanimation.go @@ -57,42 +57,34 @@ func (this *QAbstractAnimation) UnsafePointer() unsafe.Pointer { } // newQAbstractAnimation constructs the type using only CGO pointers. -func newQAbstractAnimation(h *C.QAbstractAnimation, h_QObject *C.QObject) *QAbstractAnimation { +func newQAbstractAnimation(h *C.QAbstractAnimation) *QAbstractAnimation { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractAnimation_virtbase(h, &outptr_QObject) + return &QAbstractAnimation{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAbstractAnimation constructs the type using only unsafe pointers. -func UnsafeNewQAbstractAnimation(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractAnimation { - if h == nil { - return nil - } - - return &QAbstractAnimation{h: (*C.QAbstractAnimation)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractAnimation(h unsafe.Pointer) *QAbstractAnimation { + return newQAbstractAnimation((*C.QAbstractAnimation)(h)) } // NewQAbstractAnimation constructs a new QAbstractAnimation object. func NewQAbstractAnimation() *QAbstractAnimation { - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QAbstractAnimation_new(&outptr_QAbstractAnimation, &outptr_QObject) - ret := newQAbstractAnimation(outptr_QAbstractAnimation, outptr_QObject) + ret := newQAbstractAnimation(C.QAbstractAnimation_new()) ret.isSubclass = true return ret } // NewQAbstractAnimation2 constructs a new QAbstractAnimation object. func NewQAbstractAnimation2(parent *QObject) *QAbstractAnimation { - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QAbstractAnimation_new2(parent.cPointer(), &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQAbstractAnimation(outptr_QAbstractAnimation, outptr_QObject) + ret := newQAbstractAnimation(C.QAbstractAnimation_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -130,7 +122,7 @@ func (this *QAbstractAnimation) State() QAbstractAnimation__State { } func (this *QAbstractAnimation) Group() *QAnimationGroup { - return newQAnimationGroup(C.QAbstractAnimation_Group(this.h), nil, nil) + return newQAnimationGroup(C.QAbstractAnimation_Group(this.h)) } func (this *QAbstractAnimation) Direction() QAbstractAnimation__Direction { @@ -491,7 +483,7 @@ func miqt_exec_callback_QAbstractAnimation_TimerEvent(self *C.QAbstractAnimation } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAbstractAnimation{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -517,7 +509,7 @@ func miqt_exec_callback_QAbstractAnimation_ChildEvent(self *C.QAbstractAnimation } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAbstractAnimation{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -636,42 +628,34 @@ func (this *QAnimationDriver) UnsafePointer() unsafe.Pointer { } // newQAnimationDriver constructs the type using only CGO pointers. -func newQAnimationDriver(h *C.QAnimationDriver, h_QObject *C.QObject) *QAnimationDriver { +func newQAnimationDriver(h *C.QAnimationDriver) *QAnimationDriver { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAnimationDriver_virtbase(h, &outptr_QObject) + return &QAnimationDriver{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAnimationDriver constructs the type using only unsafe pointers. -func UnsafeNewQAnimationDriver(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAnimationDriver { - if h == nil { - return nil - } - - return &QAnimationDriver{h: (*C.QAnimationDriver)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAnimationDriver(h unsafe.Pointer) *QAnimationDriver { + return newQAnimationDriver((*C.QAnimationDriver)(h)) } // NewQAnimationDriver constructs a new QAnimationDriver object. func NewQAnimationDriver() *QAnimationDriver { - var outptr_QAnimationDriver *C.QAnimationDriver = nil - var outptr_QObject *C.QObject = nil - C.QAnimationDriver_new(&outptr_QAnimationDriver, &outptr_QObject) - ret := newQAnimationDriver(outptr_QAnimationDriver, outptr_QObject) + ret := newQAnimationDriver(C.QAnimationDriver_new()) ret.isSubclass = true return ret } // NewQAnimationDriver2 constructs a new QAnimationDriver object. func NewQAnimationDriver2(parent *QObject) *QAnimationDriver { - var outptr_QAnimationDriver *C.QAnimationDriver = nil - var outptr_QObject *C.QObject = nil - C.QAnimationDriver_new2(parent.cPointer(), &outptr_QAnimationDriver, &outptr_QObject) - ret := newQAnimationDriver(outptr_QAnimationDriver, outptr_QObject) + ret := newQAnimationDriver(C.QAnimationDriver_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -982,7 +966,7 @@ func miqt_exec_callback_QAnimationDriver_TimerEvent(self *C.QAnimationDriver, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAnimationDriver{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1008,7 +992,7 @@ func miqt_exec_callback_QAnimationDriver_ChildEvent(self *C.QAnimationDriver, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAnimationDriver{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qabstractanimation.h b/qt/gen_qabstractanimation.h index 080e51fb..fc025556 100644 --- a/qt/gen_qabstractanimation.h +++ b/qt/gen_qabstractanimation.h @@ -36,8 +36,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QAbstractAnimation_new(QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QAbstractAnimation_new2(QObject* parent, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +QAbstractAnimation* QAbstractAnimation_new(); +QAbstractAnimation* QAbstractAnimation_new2(QObject* parent); +void QAbstractAnimation_virtbase(QAbstractAnimation* src, QObject** outptr_QObject); QMetaObject* QAbstractAnimation_MetaObject(const QAbstractAnimation* self); void* QAbstractAnimation_Metacast(QAbstractAnimation* self, const char* param1); struct miqt_string QAbstractAnimation_Tr(const char* s); @@ -100,8 +101,9 @@ void QAbstractAnimation_override_virtual_DisconnectNotify(void* self, intptr_t s void QAbstractAnimation_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractAnimation_Delete(QAbstractAnimation* self, bool isSubclass); -void QAnimationDriver_new(QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject); -void QAnimationDriver_new2(QObject* parent, QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject); +QAnimationDriver* QAnimationDriver_new(); +QAnimationDriver* QAnimationDriver_new2(QObject* parent); +void QAnimationDriver_virtbase(QAnimationDriver* src, QObject** outptr_QObject); QMetaObject* QAnimationDriver_MetaObject(const QAnimationDriver* self); void* QAnimationDriver_Metacast(QAnimationDriver* self, const char* param1); struct miqt_string QAnimationDriver_Tr(const char* s); diff --git a/qt/gen_qabstractbutton.cpp b/qt/gen_qabstractbutton.cpp index 955e013a..5aeb6472 100644 --- a/qt/gen_qabstractbutton.cpp +++ b/qt/gen_qabstractbutton.cpp @@ -1111,20 +1111,16 @@ public: }; -void QAbstractButton_new(QWidget* parent, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractButton* ret = new MiqtVirtualQAbstractButton(parent); - *outptr_QAbstractButton = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractButton* QAbstractButton_new(QWidget* parent) { + return new MiqtVirtualQAbstractButton(parent); } -void QAbstractButton_new2(QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractButton* ret = new MiqtVirtualQAbstractButton(); - *outptr_QAbstractButton = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractButton* QAbstractButton_new2() { + return new MiqtVirtualQAbstractButton(); +} + +void QAbstractButton_virtbase(QAbstractButton* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QAbstractButton_MetaObject(const QAbstractButton* self) { diff --git a/qt/gen_qabstractbutton.go b/qt/gen_qabstractbutton.go index 863b0a54..d94d7118 100644 --- a/qt/gen_qabstractbutton.go +++ b/qt/gen_qabstractbutton.go @@ -35,46 +35,34 @@ func (this *QAbstractButton) UnsafePointer() unsafe.Pointer { } // newQAbstractButton constructs the type using only CGO pointers. -func newQAbstractButton(h *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractButton { +func newQAbstractButton(h *C.QAbstractButton) *QAbstractButton { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QAbstractButton_virtbase(h, &outptr_QWidget) + return &QAbstractButton{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQAbstractButton constructs the type using only unsafe pointers. -func UnsafeNewQAbstractButton(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractButton { - if h == nil { - return nil - } - - return &QAbstractButton{h: (*C.QAbstractButton)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQAbstractButton(h unsafe.Pointer) *QAbstractButton { + return newQAbstractButton((*C.QAbstractButton)(h)) } // NewQAbstractButton constructs a new QAbstractButton object. func NewQAbstractButton(parent *QWidget) *QAbstractButton { - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractButton_new(parent.cPointer(), &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractButton(outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractButton(C.QAbstractButton_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQAbstractButton2 constructs a new QAbstractButton object. func NewQAbstractButton2() *QAbstractButton { - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractButton_new2(&outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractButton(outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractButton(C.QAbstractButton_new2()) ret.isSubclass = true return ret } @@ -201,7 +189,7 @@ func (this *QAbstractButton) AutoExclusive() bool { } func (this *QAbstractButton) Group() *QButtonGroup { - return newQButtonGroup(C.QAbstractButton_Group(this.h), nil) + return newQButtonGroup(C.QAbstractButton_Group(this.h)) } func (this *QAbstractButton) SetIconSize(size *QSize) { @@ -378,7 +366,7 @@ func miqt_exec_callback_QAbstractButton_PaintEvent(self *C.QAbstractButton, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc(slotval1) @@ -506,7 +494,7 @@ func miqt_exec_callback_QAbstractButton_KeyPressEvent(self *C.QAbstractButton, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -532,7 +520,7 @@ func miqt_exec_callback_QAbstractButton_KeyReleaseEvent(self *C.QAbstractButton, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -558,7 +546,7 @@ func miqt_exec_callback_QAbstractButton_MousePressEvent(self *C.QAbstractButton, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -584,7 +572,7 @@ func miqt_exec_callback_QAbstractButton_MouseReleaseEvent(self *C.QAbstractButto } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -610,7 +598,7 @@ func miqt_exec_callback_QAbstractButton_MouseMoveEvent(self *C.QAbstractButton, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -636,7 +624,7 @@ func miqt_exec_callback_QAbstractButton_FocusInEvent(self *C.QAbstractButton, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -662,7 +650,7 @@ func miqt_exec_callback_QAbstractButton_FocusOutEvent(self *C.QAbstractButton, c } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -714,7 +702,7 @@ func miqt_exec_callback_QAbstractButton_TimerEvent(self *C.QAbstractButton, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -923,7 +911,7 @@ func miqt_exec_callback_QAbstractButton_MouseDoubleClickEvent(self *C.QAbstractB } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -949,7 +937,7 @@ func miqt_exec_callback_QAbstractButton_WheelEvent(self *C.QAbstractButton, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1027,7 +1015,7 @@ func miqt_exec_callback_QAbstractButton_MoveEvent(self *C.QAbstractButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1053,7 +1041,7 @@ func miqt_exec_callback_QAbstractButton_ResizeEvent(self *C.QAbstractButton, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1079,7 +1067,7 @@ func miqt_exec_callback_QAbstractButton_CloseEvent(self *C.QAbstractButton, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1105,7 +1093,7 @@ func miqt_exec_callback_QAbstractButton_ContextMenuEvent(self *C.QAbstractButton } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1131,7 +1119,7 @@ func miqt_exec_callback_QAbstractButton_TabletEvent(self *C.QAbstractButton, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1157,7 +1145,7 @@ func miqt_exec_callback_QAbstractButton_ActionEvent(self *C.QAbstractButton, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1183,7 +1171,7 @@ func miqt_exec_callback_QAbstractButton_DragEnterEvent(self *C.QAbstractButton, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1209,7 +1197,7 @@ func miqt_exec_callback_QAbstractButton_DragMoveEvent(self *C.QAbstractButton, c } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1235,7 +1223,7 @@ func miqt_exec_callback_QAbstractButton_DragLeaveEvent(self *C.QAbstractButton, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1261,7 +1249,7 @@ func miqt_exec_callback_QAbstractButton_DropEvent(self *C.QAbstractButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1287,7 +1275,7 @@ func miqt_exec_callback_QAbstractButton_ShowEvent(self *C.QAbstractButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1313,7 +1301,7 @@ func miqt_exec_callback_QAbstractButton_HideEvent(self *C.QAbstractButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1483,7 +1471,7 @@ func miqt_exec_callback_QAbstractButton_InputMethodEvent(self *C.QAbstractButton } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QAbstractButton{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qabstractbutton.h b/qt/gen_qabstractbutton.h index 37b9fae2..bac148b9 100644 --- a/qt/gen_qabstractbutton.h +++ b/qt/gen_qabstractbutton.h @@ -84,8 +84,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QAbstractButton_new(QWidget* parent, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QAbstractButton_new2(QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QAbstractButton* QAbstractButton_new(QWidget* parent); +QAbstractButton* QAbstractButton_new2(); +void QAbstractButton_virtbase(QAbstractButton* src, QWidget** outptr_QWidget); QMetaObject* QAbstractButton_MetaObject(const QAbstractButton* self); void* QAbstractButton_Metacast(QAbstractButton* self, const char* param1); struct miqt_string QAbstractButton_Tr(const char* s); diff --git a/qt/gen_qabstracteventdispatcher.cpp b/qt/gen_qabstracteventdispatcher.cpp index 631137dc..b5ceceba 100644 --- a/qt/gen_qabstracteventdispatcher.cpp +++ b/qt/gen_qabstracteventdispatcher.cpp @@ -14,6 +14,10 @@ #include "gen_qabstracteventdispatcher.h" #include "_cgo_export.h" +void QAbstractEventDispatcher_virtbase(QAbstractEventDispatcher* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QAbstractEventDispatcher_MetaObject(const QAbstractEventDispatcher* self) { return (QMetaObject*) self->metaObject(); } @@ -206,9 +210,8 @@ void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubc } } -void QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t, QAbstractEventDispatcher__TimerInfo** outptr_QAbstractEventDispatcher__TimerInfo) { - QAbstractEventDispatcher::TimerInfo* ret = new QAbstractEventDispatcher::TimerInfo(static_cast(id), static_cast(i), static_cast(t)); - *outptr_QAbstractEventDispatcher__TimerInfo = ret; +QAbstractEventDispatcher__TimerInfo* QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t) { + return new QAbstractEventDispatcher::TimerInfo(static_cast(id), static_cast(i), static_cast(t)); } void QAbstractEventDispatcher__TimerInfo_Delete(QAbstractEventDispatcher__TimerInfo* self, bool isSubclass) { diff --git a/qt/gen_qabstracteventdispatcher.go b/qt/gen_qabstracteventdispatcher.go index 021d0ef3..e0845fbc 100644 --- a/qt/gen_qabstracteventdispatcher.go +++ b/qt/gen_qabstracteventdispatcher.go @@ -35,22 +35,20 @@ func (this *QAbstractEventDispatcher) UnsafePointer() unsafe.Pointer { } // newQAbstractEventDispatcher constructs the type using only CGO pointers. -func newQAbstractEventDispatcher(h *C.QAbstractEventDispatcher, h_QObject *C.QObject) *QAbstractEventDispatcher { +func newQAbstractEventDispatcher(h *C.QAbstractEventDispatcher) *QAbstractEventDispatcher { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractEventDispatcher_virtbase(h, &outptr_QObject) + return &QAbstractEventDispatcher{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAbstractEventDispatcher constructs the type using only unsafe pointers. -func UnsafeNewQAbstractEventDispatcher(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractEventDispatcher { - if h == nil { - return nil - } - - return &QAbstractEventDispatcher{h: (*C.QAbstractEventDispatcher)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractEventDispatcher(h unsafe.Pointer) *QAbstractEventDispatcher { + return newQAbstractEventDispatcher((*C.QAbstractEventDispatcher)(h)) } func (this *QAbstractEventDispatcher) MetaObject() *QMetaObject { @@ -82,7 +80,7 @@ func QAbstractEventDispatcher_TrUtf8(s string) string { } func QAbstractEventDispatcher_Instance() *QAbstractEventDispatcher { - return newQAbstractEventDispatcher(C.QAbstractEventDispatcher_Instance(), nil) + return newQAbstractEventDispatcher(C.QAbstractEventDispatcher_Instance()) } func (this *QAbstractEventDispatcher) ProcessEvents(flags QEventLoop__ProcessEventsFlag) bool { @@ -247,7 +245,7 @@ func QAbstractEventDispatcher_TrUtf83(s string, c string, n int) string { } func QAbstractEventDispatcher_Instance1(thread *QThread) *QAbstractEventDispatcher { - return newQAbstractEventDispatcher(C.QAbstractEventDispatcher_Instance1(thread.cPointer()), nil) + return newQAbstractEventDispatcher(C.QAbstractEventDispatcher_Instance1(thread.cPointer())) } // Delete this object from C++ memory. @@ -288,24 +286,19 @@ func newQAbstractEventDispatcher__TimerInfo(h *C.QAbstractEventDispatcher__Timer if h == nil { return nil } + return &QAbstractEventDispatcher__TimerInfo{h: h} } // UnsafeNewQAbstractEventDispatcher__TimerInfo constructs the type using only unsafe pointers. func UnsafeNewQAbstractEventDispatcher__TimerInfo(h unsafe.Pointer) *QAbstractEventDispatcher__TimerInfo { - if h == nil { - return nil - } - - return &QAbstractEventDispatcher__TimerInfo{h: (*C.QAbstractEventDispatcher__TimerInfo)(h)} + return newQAbstractEventDispatcher__TimerInfo((*C.QAbstractEventDispatcher__TimerInfo)(h)) } // NewQAbstractEventDispatcher__TimerInfo constructs a new QAbstractEventDispatcher::TimerInfo object. func NewQAbstractEventDispatcher__TimerInfo(id int, i int, t TimerType) *QAbstractEventDispatcher__TimerInfo { - var outptr_QAbstractEventDispatcher__TimerInfo *C.QAbstractEventDispatcher__TimerInfo = nil - C.QAbstractEventDispatcher__TimerInfo_new((C.int)(id), (C.int)(i), (C.int)(t), &outptr_QAbstractEventDispatcher__TimerInfo) - ret := newQAbstractEventDispatcher__TimerInfo(outptr_QAbstractEventDispatcher__TimerInfo) + ret := newQAbstractEventDispatcher__TimerInfo(C.QAbstractEventDispatcher__TimerInfo_new((C.int)(id), (C.int)(i), (C.int)(t))) ret.isSubclass = true return ret } diff --git a/qt/gen_qabstracteventdispatcher.h b/qt/gen_qabstracteventdispatcher.h index a5729725..3a8f5285 100644 --- a/qt/gen_qabstracteventdispatcher.h +++ b/qt/gen_qabstracteventdispatcher.h @@ -36,6 +36,7 @@ typedef struct QSocketNotifier QSocketNotifier; typedef struct QThread QThread; #endif +void QAbstractEventDispatcher_virtbase(QAbstractEventDispatcher* src, QObject** outptr_QObject); QMetaObject* QAbstractEventDispatcher_MetaObject(const QAbstractEventDispatcher* self); void* QAbstractEventDispatcher_Metacast(QAbstractEventDispatcher* self, const char* param1); struct miqt_string QAbstractEventDispatcher_Tr(const char* s); @@ -70,7 +71,7 @@ struct miqt_string QAbstractEventDispatcher_TrUtf83(const char* s, const char* c QAbstractEventDispatcher* QAbstractEventDispatcher_Instance1(QThread* thread); void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubclass); -void QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t, QAbstractEventDispatcher__TimerInfo** outptr_QAbstractEventDispatcher__TimerInfo); +QAbstractEventDispatcher__TimerInfo* QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t); void QAbstractEventDispatcher__TimerInfo_Delete(QAbstractEventDispatcher__TimerInfo* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qabstractitemdelegate.cpp b/qt/gen_qabstractitemdelegate.cpp index 46f0b332..53d8a517 100644 --- a/qt/gen_qabstractitemdelegate.cpp +++ b/qt/gen_qabstractitemdelegate.cpp @@ -484,16 +484,16 @@ public: }; -void QAbstractItemDelegate_new(QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { - MiqtVirtualQAbstractItemDelegate* ret = new MiqtVirtualQAbstractItemDelegate(); - *outptr_QAbstractItemDelegate = ret; - *outptr_QObject = static_cast(ret); +QAbstractItemDelegate* QAbstractItemDelegate_new() { + return new MiqtVirtualQAbstractItemDelegate(); } -void QAbstractItemDelegate_new2(QObject* parent, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { - MiqtVirtualQAbstractItemDelegate* ret = new MiqtVirtualQAbstractItemDelegate(parent); - *outptr_QAbstractItemDelegate = ret; - *outptr_QObject = static_cast(ret); +QAbstractItemDelegate* QAbstractItemDelegate_new2(QObject* parent) { + return new MiqtVirtualQAbstractItemDelegate(parent); +} + +void QAbstractItemDelegate_virtbase(QAbstractItemDelegate* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAbstractItemDelegate_MetaObject(const QAbstractItemDelegate* self) { diff --git a/qt/gen_qabstractitemdelegate.go b/qt/gen_qabstractitemdelegate.go index 084b2bc2..370bc3cc 100644 --- a/qt/gen_qabstractitemdelegate.go +++ b/qt/gen_qabstractitemdelegate.go @@ -45,42 +45,34 @@ func (this *QAbstractItemDelegate) UnsafePointer() unsafe.Pointer { } // newQAbstractItemDelegate constructs the type using only CGO pointers. -func newQAbstractItemDelegate(h *C.QAbstractItemDelegate, h_QObject *C.QObject) *QAbstractItemDelegate { +func newQAbstractItemDelegate(h *C.QAbstractItemDelegate) *QAbstractItemDelegate { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractItemDelegate_virtbase(h, &outptr_QObject) + return &QAbstractItemDelegate{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAbstractItemDelegate constructs the type using only unsafe pointers. -func UnsafeNewQAbstractItemDelegate(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractItemDelegate { - if h == nil { - return nil - } - - return &QAbstractItemDelegate{h: (*C.QAbstractItemDelegate)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractItemDelegate(h unsafe.Pointer) *QAbstractItemDelegate { + return newQAbstractItemDelegate((*C.QAbstractItemDelegate)(h)) } // NewQAbstractItemDelegate constructs a new QAbstractItemDelegate object. func NewQAbstractItemDelegate() *QAbstractItemDelegate { - var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil - var outptr_QObject *C.QObject = nil - C.QAbstractItemDelegate_new(&outptr_QAbstractItemDelegate, &outptr_QObject) - ret := newQAbstractItemDelegate(outptr_QAbstractItemDelegate, outptr_QObject) + ret := newQAbstractItemDelegate(C.QAbstractItemDelegate_new()) ret.isSubclass = true return ret } // NewQAbstractItemDelegate2 constructs a new QAbstractItemDelegate object. func NewQAbstractItemDelegate2(parent *QObject) *QAbstractItemDelegate { - var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil - var outptr_QObject *C.QObject = nil - C.QAbstractItemDelegate_new2(parent.cPointer(), &outptr_QAbstractItemDelegate, &outptr_QObject) - ret := newQAbstractItemDelegate(outptr_QAbstractItemDelegate, outptr_QObject) + ret := newQAbstractItemDelegate(C.QAbstractItemDelegate_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -124,7 +116,7 @@ func (this *QAbstractItemDelegate) SizeHint(option *QStyleOptionViewItem, index } func (this *QAbstractItemDelegate) CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return newQWidget(C.QAbstractItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer()), nil, nil) + return newQWidget(C.QAbstractItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer())) } func (this *QAbstractItemDelegate) DestroyEditor(editor *QWidget, index *QModelIndex) { @@ -187,7 +179,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CommitData(cb C.intptr_t, editor * } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc(slotval1) } @@ -207,7 +199,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CloseEditor(cb C.intptr_t, editor } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc(slotval1) } @@ -291,7 +283,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CloseEditor2(cb C.intptr_t, editor } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) @@ -315,7 +307,7 @@ func miqt_exec_callback_QAbstractItemDelegate_Paint(self *C.QAbstractItemDelegat // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -337,7 +329,7 @@ func miqt_exec_callback_QAbstractItemDelegate_SizeHint(self *C.QAbstractItemDele } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) slotval2 := newQModelIndex(index) @@ -349,7 +341,7 @@ func miqt_exec_callback_QAbstractItemDelegate_SizeHint(self *C.QAbstractItemDele func (this *QAbstractItemDelegate) callVirtualBase_CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return newQWidget(C.QAbstractItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer()), nil, nil) + return newQWidget(C.QAbstractItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer())) } func (this *QAbstractItemDelegate) OnCreateEditor(slot func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) { @@ -367,9 +359,9 @@ func miqt_exec_callback_QAbstractItemDelegate_CreateEditor(self *C.QAbstractItem } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(parent, nil, nil) + slotval1 := newQWidget(parent) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -399,7 +391,7 @@ func miqt_exec_callback_QAbstractItemDelegate_DestroyEditor(self *C.QAbstractIte } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := newQModelIndex(index) @@ -427,7 +419,7 @@ func miqt_exec_callback_QAbstractItemDelegate_SetEditorData(self *C.QAbstractIte } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := newQModelIndex(index) @@ -455,9 +447,9 @@ func miqt_exec_callback_QAbstractItemDelegate_SetModelData(self *C.QAbstractItem } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) - slotval2 := newQAbstractItemModel(model, nil) + slotval2 := newQAbstractItemModel(model) slotval3 := newQModelIndex(index) @@ -485,9 +477,9 @@ func miqt_exec_callback_QAbstractItemDelegate_UpdateEditorGeometry(self *C.QAbst } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -517,9 +509,9 @@ func miqt_exec_callback_QAbstractItemDelegate_EditorEvent(self *C.QAbstractItemD // Convert all CABI parameters to Go parameters slotval1 := newQEvent(event) - slotval2 := newQAbstractItemModel(model, nil) + slotval2 := newQAbstractItemModel(model) - slotval3 := newQStyleOptionViewItem(option, nil) + slotval3 := newQStyleOptionViewItem(option) slotval4 := newQModelIndex(index) @@ -549,11 +541,11 @@ func miqt_exec_callback_QAbstractItemDelegate_HelpEvent(self *C.QAbstractItemDel } // Convert all CABI parameters to Go parameters - slotval1 := newQHelpEvent(event, nil) + slotval1 := newQHelpEvent(event) - slotval2 := newQAbstractItemView(view, nil, nil, nil, nil, nil) + slotval2 := newQAbstractItemView(view) - slotval3 := newQStyleOptionViewItem(option, nil) + slotval3 := newQStyleOptionViewItem(option) slotval4 := newQModelIndex(index) @@ -678,7 +670,7 @@ func miqt_exec_callback_QAbstractItemDelegate_TimerEvent(self *C.QAbstractItemDe } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAbstractItemDelegate{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -704,7 +696,7 @@ func miqt_exec_callback_QAbstractItemDelegate_ChildEvent(self *C.QAbstractItemDe } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAbstractItemDelegate{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qabstractitemdelegate.h b/qt/gen_qabstractitemdelegate.h index 3e53ac83..098838b9 100644 --- a/qt/gen_qabstractitemdelegate.h +++ b/qt/gen_qabstractitemdelegate.h @@ -50,8 +50,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QAbstractItemDelegate_new(QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); -void QAbstractItemDelegate_new2(QObject* parent, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); +QAbstractItemDelegate* QAbstractItemDelegate_new(); +QAbstractItemDelegate* QAbstractItemDelegate_new2(QObject* parent); +void QAbstractItemDelegate_virtbase(QAbstractItemDelegate* src, QObject** outptr_QObject); QMetaObject* QAbstractItemDelegate_MetaObject(const QAbstractItemDelegate* self); void* QAbstractItemDelegate_Metacast(QAbstractItemDelegate* self, const char* param1); struct miqt_string QAbstractItemDelegate_Tr(const char* s); diff --git a/qt/gen_qabstractitemmodel.cpp b/qt/gen_qabstractitemmodel.cpp index 7f25bccc..443d859d 100644 --- a/qt/gen_qabstractitemmodel.cpp +++ b/qt/gen_qabstractitemmodel.cpp @@ -22,14 +22,12 @@ #include "gen_qabstractitemmodel.h" #include "_cgo_export.h" -void QModelIndex_new(QModelIndex** outptr_QModelIndex) { - QModelIndex* ret = new QModelIndex(); - *outptr_QModelIndex = ret; +QModelIndex* QModelIndex_new() { + return new QModelIndex(); } -void QModelIndex_new2(QModelIndex* param1, QModelIndex** outptr_QModelIndex) { - QModelIndex* ret = new QModelIndex(*param1); - *outptr_QModelIndex = ret; +QModelIndex* QModelIndex_new2(QModelIndex* param1) { + return new QModelIndex(*param1); } int QModelIndex_Row(const QModelIndex* self) { @@ -110,19 +108,16 @@ void QModelIndex_Delete(QModelIndex* self, bool isSubclass) { } } -void QPersistentModelIndex_new(QPersistentModelIndex** outptr_QPersistentModelIndex) { - QPersistentModelIndex* ret = new QPersistentModelIndex(); - *outptr_QPersistentModelIndex = ret; +QPersistentModelIndex* QPersistentModelIndex_new() { + return new QPersistentModelIndex(); } -void QPersistentModelIndex_new2(QModelIndex* index, QPersistentModelIndex** outptr_QPersistentModelIndex) { - QPersistentModelIndex* ret = new QPersistentModelIndex(*index); - *outptr_QPersistentModelIndex = ret; +QPersistentModelIndex* QPersistentModelIndex_new2(QModelIndex* index) { + return new QPersistentModelIndex(*index); } -void QPersistentModelIndex_new3(QPersistentModelIndex* other, QPersistentModelIndex** outptr_QPersistentModelIndex) { - QPersistentModelIndex* ret = new QPersistentModelIndex(*other); - *outptr_QPersistentModelIndex = ret; +QPersistentModelIndex* QPersistentModelIndex_new3(QPersistentModelIndex* other) { + return new QPersistentModelIndex(*other); } bool QPersistentModelIndex_OperatorLesser(const QPersistentModelIndex* self, QPersistentModelIndex* other) { @@ -1369,16 +1364,16 @@ public: }; -void QAbstractItemModel_new(QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractItemModel* ret = new MiqtVirtualQAbstractItemModel(); - *outptr_QAbstractItemModel = ret; - *outptr_QObject = static_cast(ret); +QAbstractItemModel* QAbstractItemModel_new() { + return new MiqtVirtualQAbstractItemModel(); } -void QAbstractItemModel_new2(QObject* parent, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractItemModel* ret = new MiqtVirtualQAbstractItemModel(parent); - *outptr_QAbstractItemModel = ret; - *outptr_QObject = static_cast(ret); +QAbstractItemModel* QAbstractItemModel_new2(QObject* parent) { + return new MiqtVirtualQAbstractItemModel(parent); +} + +void QAbstractItemModel_virtbase(QAbstractItemModel* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAbstractItemModel_MetaObject(const QAbstractItemModel* self) { @@ -3173,18 +3168,16 @@ public: }; -void QAbstractTableModel_new(QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractTableModel* ret = new MiqtVirtualQAbstractTableModel(); - *outptr_QAbstractTableModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAbstractTableModel* QAbstractTableModel_new() { + return new MiqtVirtualQAbstractTableModel(); } -void QAbstractTableModel_new2(QObject* parent, QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractTableModel* ret = new MiqtVirtualQAbstractTableModel(parent); - *outptr_QAbstractTableModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAbstractTableModel* QAbstractTableModel_new2(QObject* parent) { + return new MiqtVirtualQAbstractTableModel(parent); +} + +void QAbstractTableModel_virtbase(QAbstractTableModel* src, QAbstractItemModel** outptr_QAbstractItemModel) { + *outptr_QAbstractItemModel = static_cast(src); } QMetaObject* QAbstractTableModel_MetaObject(const QAbstractTableModel* self) { @@ -4459,18 +4452,16 @@ public: }; -void QAbstractListModel_new(QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractListModel* ret = new MiqtVirtualQAbstractListModel(); - *outptr_QAbstractListModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAbstractListModel* QAbstractListModel_new() { + return new MiqtVirtualQAbstractListModel(); } -void QAbstractListModel_new2(QObject* parent, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractListModel* ret = new MiqtVirtualQAbstractListModel(parent); - *outptr_QAbstractListModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAbstractListModel* QAbstractListModel_new2(QObject* parent) { + return new MiqtVirtualQAbstractListModel(parent); +} + +void QAbstractListModel_virtbase(QAbstractListModel* src, QAbstractItemModel** outptr_QAbstractItemModel) { + *outptr_QAbstractItemModel = static_cast(src); } QMetaObject* QAbstractListModel_MetaObject(const QAbstractListModel* self) { diff --git a/qt/gen_qabstractitemmodel.go b/qt/gen_qabstractitemmodel.go index 31b59df6..f420b9ca 100644 --- a/qt/gen_qabstractitemmodel.go +++ b/qt/gen_qabstractitemmodel.go @@ -55,34 +55,27 @@ func newQModelIndex(h *C.QModelIndex) *QModelIndex { if h == nil { return nil } + return &QModelIndex{h: h} } // UnsafeNewQModelIndex constructs the type using only unsafe pointers. func UnsafeNewQModelIndex(h unsafe.Pointer) *QModelIndex { - if h == nil { - return nil - } - - return &QModelIndex{h: (*C.QModelIndex)(h)} + return newQModelIndex((*C.QModelIndex)(h)) } // NewQModelIndex constructs a new QModelIndex object. func NewQModelIndex() *QModelIndex { - var outptr_QModelIndex *C.QModelIndex = nil - C.QModelIndex_new(&outptr_QModelIndex) - ret := newQModelIndex(outptr_QModelIndex) + ret := newQModelIndex(C.QModelIndex_new()) ret.isSubclass = true return ret } // NewQModelIndex2 constructs a new QModelIndex object. func NewQModelIndex2(param1 *QModelIndex) *QModelIndex { - var outptr_QModelIndex *C.QModelIndex = nil - C.QModelIndex_new2(param1.cPointer(), &outptr_QModelIndex) - ret := newQModelIndex(outptr_QModelIndex) + ret := newQModelIndex(C.QModelIndex_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -144,7 +137,7 @@ func (this *QModelIndex) Flags() ItemFlag { } func (this *QModelIndex) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QModelIndex_Model(this.h), nil) + return newQAbstractItemModel(C.QModelIndex_Model(this.h)) } func (this *QModelIndex) IsValid() bool { @@ -207,44 +200,35 @@ func newQPersistentModelIndex(h *C.QPersistentModelIndex) *QPersistentModelIndex if h == nil { return nil } + return &QPersistentModelIndex{h: h} } // UnsafeNewQPersistentModelIndex constructs the type using only unsafe pointers. func UnsafeNewQPersistentModelIndex(h unsafe.Pointer) *QPersistentModelIndex { - if h == nil { - return nil - } - - return &QPersistentModelIndex{h: (*C.QPersistentModelIndex)(h)} + return newQPersistentModelIndex((*C.QPersistentModelIndex)(h)) } // NewQPersistentModelIndex constructs a new QPersistentModelIndex object. func NewQPersistentModelIndex() *QPersistentModelIndex { - var outptr_QPersistentModelIndex *C.QPersistentModelIndex = nil - C.QPersistentModelIndex_new(&outptr_QPersistentModelIndex) - ret := newQPersistentModelIndex(outptr_QPersistentModelIndex) + ret := newQPersistentModelIndex(C.QPersistentModelIndex_new()) ret.isSubclass = true return ret } // NewQPersistentModelIndex2 constructs a new QPersistentModelIndex object. func NewQPersistentModelIndex2(index *QModelIndex) *QPersistentModelIndex { - var outptr_QPersistentModelIndex *C.QPersistentModelIndex = nil - C.QPersistentModelIndex_new2(index.cPointer(), &outptr_QPersistentModelIndex) - ret := newQPersistentModelIndex(outptr_QPersistentModelIndex) + ret := newQPersistentModelIndex(C.QPersistentModelIndex_new2(index.cPointer())) ret.isSubclass = true return ret } // NewQPersistentModelIndex3 constructs a new QPersistentModelIndex object. func NewQPersistentModelIndex3(other *QPersistentModelIndex) *QPersistentModelIndex { - var outptr_QPersistentModelIndex *C.QPersistentModelIndex = nil - C.QPersistentModelIndex_new3(other.cPointer(), &outptr_QPersistentModelIndex) - ret := newQPersistentModelIndex(outptr_QPersistentModelIndex) + ret := newQPersistentModelIndex(C.QPersistentModelIndex_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -326,7 +310,7 @@ func (this *QPersistentModelIndex) Flags() ItemFlag { } func (this *QPersistentModelIndex) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QPersistentModelIndex_Model(this.h), nil) + return newQAbstractItemModel(C.QPersistentModelIndex_Model(this.h)) } func (this *QPersistentModelIndex) IsValid() bool { @@ -374,42 +358,34 @@ func (this *QAbstractItemModel) UnsafePointer() unsafe.Pointer { } // newQAbstractItemModel constructs the type using only CGO pointers. -func newQAbstractItemModel(h *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractItemModel { +func newQAbstractItemModel(h *C.QAbstractItemModel) *QAbstractItemModel { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractItemModel_virtbase(h, &outptr_QObject) + return &QAbstractItemModel{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAbstractItemModel constructs the type using only unsafe pointers. -func UnsafeNewQAbstractItemModel(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractItemModel { - if h == nil { - return nil - } - - return &QAbstractItemModel{h: (*C.QAbstractItemModel)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractItemModel(h unsafe.Pointer) *QAbstractItemModel { + return newQAbstractItemModel((*C.QAbstractItemModel)(h)) } // NewQAbstractItemModel constructs a new QAbstractItemModel object. func NewQAbstractItemModel() *QAbstractItemModel { - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractItemModel_new(&outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractItemModel(outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractItemModel(C.QAbstractItemModel_new()) ret.isSubclass = true return ret } // NewQAbstractItemModel2 constructs a new QAbstractItemModel object. func NewQAbstractItemModel2(parent *QObject) *QAbstractItemModel { - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractItemModel_new2(parent.cPointer(), &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractItemModel(outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractItemModel(C.QAbstractItemModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -552,7 +528,7 @@ func (this *QAbstractItemModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QAbstractItemModel_MimeData(this.h, indexes_ma), nil) + return newQMimeData(C.QAbstractItemModel_MimeData(this.h, indexes_ma)) } func (this *QAbstractItemModel) CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -1457,7 +1433,7 @@ func (this *QAbstractItemModel) callVirtualBase_MimeData(indexes []QModelIndex) } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QAbstractItemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QAbstractItemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QAbstractItemModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -1511,7 +1487,7 @@ func miqt_exec_callback_QAbstractItemModel_CanDropMimeData(self *C.QAbstractItem } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -1547,7 +1523,7 @@ func miqt_exec_callback_QAbstractItemModel_DropMimeData(self *C.QAbstractItemMod } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -2215,7 +2191,7 @@ func miqt_exec_callback_QAbstractItemModel_TimerEvent(self *C.QAbstractItemModel } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAbstractItemModel{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -2241,7 +2217,7 @@ func miqt_exec_callback_QAbstractItemModel_ChildEvent(self *C.QAbstractItemModel } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAbstractItemModel{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -2360,44 +2336,34 @@ func (this *QAbstractTableModel) UnsafePointer() unsafe.Pointer { } // newQAbstractTableModel constructs the type using only CGO pointers. -func newQAbstractTableModel(h *C.QAbstractTableModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractTableModel { +func newQAbstractTableModel(h *C.QAbstractTableModel) *QAbstractTableModel { if h == nil { return nil } + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + C.QAbstractTableModel_virtbase(h, &outptr_QAbstractItemModel) + return &QAbstractTableModel{h: h, - QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} + QAbstractItemModel: newQAbstractItemModel(outptr_QAbstractItemModel)} } // UnsafeNewQAbstractTableModel constructs the type using only unsafe pointers. -func UnsafeNewQAbstractTableModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractTableModel { - if h == nil { - return nil - } - - return &QAbstractTableModel{h: (*C.QAbstractTableModel)(h), - QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} +func UnsafeNewQAbstractTableModel(h unsafe.Pointer) *QAbstractTableModel { + return newQAbstractTableModel((*C.QAbstractTableModel)(h)) } // NewQAbstractTableModel constructs a new QAbstractTableModel object. func NewQAbstractTableModel() *QAbstractTableModel { - var outptr_QAbstractTableModel *C.QAbstractTableModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractTableModel_new(&outptr_QAbstractTableModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractTableModel(outptr_QAbstractTableModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractTableModel(C.QAbstractTableModel_new()) ret.isSubclass = true return ret } // NewQAbstractTableModel2 constructs a new QAbstractTableModel object. func NewQAbstractTableModel2(parent *QObject) *QAbstractTableModel { - var outptr_QAbstractTableModel *C.QAbstractTableModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractTableModel_new2(parent.cPointer(), &outptr_QAbstractTableModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractTableModel(outptr_QAbstractTableModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractTableModel(C.QAbstractTableModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -2582,7 +2548,7 @@ func miqt_exec_callback_QAbstractTableModel_DropMimeData(self *C.QAbstractTableM } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -2960,7 +2926,7 @@ func (this *QAbstractTableModel) callVirtualBase_MimeData(indexes []QModelIndex) } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QAbstractTableModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QAbstractTableModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QAbstractTableModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -3014,7 +2980,7 @@ func miqt_exec_callback_QAbstractTableModel_CanDropMimeData(self *C.QAbstractTab } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -3611,44 +3577,34 @@ func (this *QAbstractListModel) UnsafePointer() unsafe.Pointer { } // newQAbstractListModel constructs the type using only CGO pointers. -func newQAbstractListModel(h *C.QAbstractListModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractListModel { +func newQAbstractListModel(h *C.QAbstractListModel) *QAbstractListModel { if h == nil { return nil } + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + C.QAbstractListModel_virtbase(h, &outptr_QAbstractItemModel) + return &QAbstractListModel{h: h, - QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} + QAbstractItemModel: newQAbstractItemModel(outptr_QAbstractItemModel)} } // UnsafeNewQAbstractListModel constructs the type using only unsafe pointers. -func UnsafeNewQAbstractListModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractListModel { - if h == nil { - return nil - } - - return &QAbstractListModel{h: (*C.QAbstractListModel)(h), - QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} +func UnsafeNewQAbstractListModel(h unsafe.Pointer) *QAbstractListModel { + return newQAbstractListModel((*C.QAbstractListModel)(h)) } // NewQAbstractListModel constructs a new QAbstractListModel object. func NewQAbstractListModel() *QAbstractListModel { - var outptr_QAbstractListModel *C.QAbstractListModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractListModel_new(&outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractListModel(outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractListModel(C.QAbstractListModel_new()) ret.isSubclass = true return ret } // NewQAbstractListModel2 constructs a new QAbstractListModel object. func NewQAbstractListModel2(parent *QObject) *QAbstractListModel { - var outptr_QAbstractListModel *C.QAbstractListModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractListModel_new2(parent.cPointer(), &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractListModel(outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractListModel(C.QAbstractListModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -3833,7 +3789,7 @@ func miqt_exec_callback_QAbstractListModel_DropMimeData(self *C.QAbstractListMod } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -4189,7 +4145,7 @@ func (this *QAbstractListModel) callVirtualBase_MimeData(indexes []QModelIndex) } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QAbstractListModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QAbstractListModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QAbstractListModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -4243,7 +4199,7 @@ func miqt_exec_callback_QAbstractListModel_CanDropMimeData(self *C.QAbstractList } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt/gen_qabstractitemmodel.h b/qt/gen_qabstractitemmodel.h index dba66352..a2a8896a 100644 --- a/qt/gen_qabstractitemmodel.h +++ b/qt/gen_qabstractitemmodel.h @@ -46,8 +46,8 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -void QModelIndex_new(QModelIndex** outptr_QModelIndex); -void QModelIndex_new2(QModelIndex* param1, QModelIndex** outptr_QModelIndex); +QModelIndex* QModelIndex_new(); +QModelIndex* QModelIndex_new2(QModelIndex* param1); int QModelIndex_Row(const QModelIndex* self); int QModelIndex_Column(const QModelIndex* self); uintptr_t QModelIndex_InternalId(const QModelIndex* self); @@ -67,9 +67,9 @@ bool QModelIndex_OperatorLesser(const QModelIndex* self, QModelIndex* other); QVariant* QModelIndex_Data1(const QModelIndex* self, int role); void QModelIndex_Delete(QModelIndex* self, bool isSubclass); -void QPersistentModelIndex_new(QPersistentModelIndex** outptr_QPersistentModelIndex); -void QPersistentModelIndex_new2(QModelIndex* index, QPersistentModelIndex** outptr_QPersistentModelIndex); -void QPersistentModelIndex_new3(QPersistentModelIndex* other, QPersistentModelIndex** outptr_QPersistentModelIndex); +QPersistentModelIndex* QPersistentModelIndex_new(); +QPersistentModelIndex* QPersistentModelIndex_new2(QModelIndex* index); +QPersistentModelIndex* QPersistentModelIndex_new3(QPersistentModelIndex* other); bool QPersistentModelIndex_OperatorLesser(const QPersistentModelIndex* self, QPersistentModelIndex* other); bool QPersistentModelIndex_OperatorEqual(const QPersistentModelIndex* self, QPersistentModelIndex* other); bool QPersistentModelIndex_OperatorNotEqual(const QPersistentModelIndex* self, QPersistentModelIndex* other); @@ -92,8 +92,9 @@ bool QPersistentModelIndex_IsValid(const QPersistentModelIndex* self); QVariant* QPersistentModelIndex_Data1(const QPersistentModelIndex* self, int role); void QPersistentModelIndex_Delete(QPersistentModelIndex* self, bool isSubclass); -void QAbstractItemModel_new(QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QAbstractItemModel_new2(QObject* parent, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QAbstractItemModel* QAbstractItemModel_new(); +QAbstractItemModel* QAbstractItemModel_new2(QObject* parent); +void QAbstractItemModel_virtbase(QAbstractItemModel* src, QObject** outptr_QObject); QMetaObject* QAbstractItemModel_MetaObject(const QAbstractItemModel* self); void* QAbstractItemModel_Metacast(QAbstractItemModel* self, const char* param1); struct miqt_string QAbstractItemModel_Tr(const char* s); @@ -252,8 +253,9 @@ void QAbstractItemModel_override_virtual_DisconnectNotify(void* self, intptr_t s void QAbstractItemModel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractItemModel_Delete(QAbstractItemModel* self, bool isSubclass); -void QAbstractTableModel_new(QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QAbstractTableModel_new2(QObject* parent, QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QAbstractTableModel* QAbstractTableModel_new(); +QAbstractTableModel* QAbstractTableModel_new2(QObject* parent); +void QAbstractTableModel_virtbase(QAbstractTableModel* src, QAbstractItemModel** outptr_QAbstractItemModel); QMetaObject* QAbstractTableModel_MetaObject(const QAbstractTableModel* self); void* QAbstractTableModel_Metacast(QAbstractTableModel* self, const char* param1); struct miqt_string QAbstractTableModel_Tr(const char* s); @@ -332,8 +334,9 @@ void QAbstractTableModel_override_virtual_Revert(void* self, intptr_t slot); void QAbstractTableModel_virtualbase_Revert(void* self); void QAbstractTableModel_Delete(QAbstractTableModel* self, bool isSubclass); -void QAbstractListModel_new(QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QAbstractListModel_new2(QObject* parent, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QAbstractListModel* QAbstractListModel_new(); +QAbstractListModel* QAbstractListModel_new2(QObject* parent); +void QAbstractListModel_virtbase(QAbstractListModel* src, QAbstractItemModel** outptr_QAbstractItemModel); QMetaObject* QAbstractListModel_MetaObject(const QAbstractListModel* self); void* QAbstractListModel_Metacast(QAbstractListModel* self, const char* param1); struct miqt_string QAbstractListModel_Tr(const char* s); diff --git a/qt/gen_qabstractitemview.cpp b/qt/gen_qabstractitemview.cpp index 960e2246..d87922a1 100644 --- a/qt/gen_qabstractitemview.cpp +++ b/qt/gen_qabstractitemview.cpp @@ -1607,24 +1607,16 @@ public: }; -void QAbstractItemView_new(QWidget* parent, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractItemView* ret = new MiqtVirtualQAbstractItemView(parent); - *outptr_QAbstractItemView = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractItemView* QAbstractItemView_new(QWidget* parent) { + return new MiqtVirtualQAbstractItemView(parent); } -void QAbstractItemView_new2(QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractItemView* ret = new MiqtVirtualQAbstractItemView(); - *outptr_QAbstractItemView = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractItemView* QAbstractItemView_new2() { + return new MiqtVirtualQAbstractItemView(); +} + +void QAbstractItemView_virtbase(QAbstractItemView* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); } QMetaObject* QAbstractItemView_MetaObject(const QAbstractItemView* self) { diff --git a/qt/gen_qabstractitemview.go b/qt/gen_qabstractitemview.go index 84a09375..2d25e671 100644 --- a/qt/gen_qabstractitemview.go +++ b/qt/gen_qabstractitemview.go @@ -127,50 +127,34 @@ func (this *QAbstractItemView) UnsafePointer() unsafe.Pointer { } // newQAbstractItemView constructs the type using only CGO pointers. -func newQAbstractItemView(h *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractItemView { +func newQAbstractItemView(h *C.QAbstractItemView) *QAbstractItemView { if h == nil { return nil } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QAbstractItemView_virtbase(h, &outptr_QAbstractScrollArea) + return &QAbstractItemView{h: h, - QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractScrollArea: newQAbstractScrollArea(outptr_QAbstractScrollArea)} } // UnsafeNewQAbstractItemView constructs the type using only unsafe pointers. -func UnsafeNewQAbstractItemView(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractItemView { - if h == nil { - return nil - } - - return &QAbstractItemView{h: (*C.QAbstractItemView)(h), - QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQAbstractItemView(h unsafe.Pointer) *QAbstractItemView { + return newQAbstractItemView((*C.QAbstractItemView)(h)) } // NewQAbstractItemView constructs a new QAbstractItemView object. func NewQAbstractItemView(parent *QWidget) *QAbstractItemView { - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractItemView_new(parent.cPointer(), &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractItemView(outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractItemView(C.QAbstractItemView_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQAbstractItemView2 constructs a new QAbstractItemView object. func NewQAbstractItemView2() *QAbstractItemView { - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractItemView_new2(&outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractItemView(outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractItemView(C.QAbstractItemView_new2()) ret.isSubclass = true return ret } @@ -208,7 +192,7 @@ func (this *QAbstractItemView) SetModel(model *QAbstractItemModel) { } func (this *QAbstractItemView) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QAbstractItemView_Model(this.h), nil) + return newQAbstractItemModel(C.QAbstractItemView_Model(this.h)) } func (this *QAbstractItemView) SetSelectionModel(selectionModel *QItemSelectionModel) { @@ -216,7 +200,7 @@ func (this *QAbstractItemView) SetSelectionModel(selectionModel *QItemSelectionM } func (this *QAbstractItemView) SelectionModel() *QItemSelectionModel { - return newQItemSelectionModel(C.QAbstractItemView_SelectionModel(this.h), nil) + return newQItemSelectionModel(C.QAbstractItemView_SelectionModel(this.h)) } func (this *QAbstractItemView) SetItemDelegate(delegate *QAbstractItemDelegate) { @@ -224,7 +208,7 @@ func (this *QAbstractItemView) SetItemDelegate(delegate *QAbstractItemDelegate) } func (this *QAbstractItemView) ItemDelegate() *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegate(this.h), nil) + return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegate(this.h)) } func (this *QAbstractItemView) SetSelectionMode(mode QAbstractItemView__SelectionMode) { @@ -432,7 +416,7 @@ func (this *QAbstractItemView) SetIndexWidget(index *QModelIndex, widget *QWidge } func (this *QAbstractItemView) IndexWidget(index *QModelIndex) *QWidget { - return newQWidget(C.QAbstractItemView_IndexWidget(this.h, index.cPointer()), nil, nil) + return newQWidget(C.QAbstractItemView_IndexWidget(this.h, index.cPointer())) } func (this *QAbstractItemView) SetItemDelegateForRow(row int, delegate *QAbstractItemDelegate) { @@ -440,7 +424,7 @@ func (this *QAbstractItemView) SetItemDelegateForRow(row int, delegate *QAbstrac } func (this *QAbstractItemView) ItemDelegateForRow(row int) *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegateForRow(this.h, (C.int)(row)), nil) + return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegateForRow(this.h, (C.int)(row))) } func (this *QAbstractItemView) SetItemDelegateForColumn(column int, delegate *QAbstractItemDelegate) { @@ -448,11 +432,11 @@ func (this *QAbstractItemView) SetItemDelegateForColumn(column int, delegate *QA } func (this *QAbstractItemView) ItemDelegateForColumn(column int) *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegateForColumn(this.h, (C.int)(column)), nil) + return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegateForColumn(this.h, (C.int)(column))) } func (this *QAbstractItemView) ItemDelegateWithIndex(index *QModelIndex) *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegateWithIndex(this.h, index.cPointer()), nil) + return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegateWithIndex(this.h, index.cPointer())) } func (this *QAbstractItemView) InputMethodQuery(query InputMethodQuery) *QVariant { @@ -702,7 +686,7 @@ func miqt_exec_callback_QAbstractItemView_SetModel(self *C.QAbstractItemView, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc((&QAbstractItemView{h: self}).callVirtualBase_SetModel, slotval1) @@ -728,7 +712,7 @@ func miqt_exec_callback_QAbstractItemView_SetSelectionModel(self *C.QAbstractIte } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QAbstractItemView{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -1365,7 +1349,7 @@ func miqt_exec_callback_QAbstractItemView_CloseEditor(self *C.QAbstractItemView, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) @@ -1393,7 +1377,7 @@ func miqt_exec_callback_QAbstractItemView_CommitData(self *C.QAbstractItemView, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc((&QAbstractItemView{h: self}).callVirtualBase_CommitData, slotval1) @@ -1682,7 +1666,7 @@ func miqt_exec_callback_QAbstractItemView_StartDrag(self *C.QAbstractItemView, c func (this *QAbstractItemView) callVirtualBase_ViewOptions() *QStyleOptionViewItem { - _goptr := newQStyleOptionViewItem(C.QAbstractItemView_virtualbase_ViewOptions(unsafe.Pointer(this.h)), nil) + _goptr := newQStyleOptionViewItem(C.QAbstractItemView_virtualbase_ViewOptions(unsafe.Pointer(this.h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -1811,7 +1795,7 @@ func miqt_exec_callback_QAbstractItemView_MousePressEvent(self *C.QAbstractItemV } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1837,7 +1821,7 @@ func miqt_exec_callback_QAbstractItemView_MouseMoveEvent(self *C.QAbstractItemVi } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1863,7 +1847,7 @@ func miqt_exec_callback_QAbstractItemView_MouseReleaseEvent(self *C.QAbstractIte } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1889,7 +1873,7 @@ func miqt_exec_callback_QAbstractItemView_MouseDoubleClickEvent(self *C.QAbstrac } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1915,7 +1899,7 @@ func miqt_exec_callback_QAbstractItemView_DragEnterEvent(self *C.QAbstractItemVi } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1941,7 +1925,7 @@ func miqt_exec_callback_QAbstractItemView_DragMoveEvent(self *C.QAbstractItemVie } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1967,7 +1951,7 @@ func miqt_exec_callback_QAbstractItemView_DragLeaveEvent(self *C.QAbstractItemVi } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1993,7 +1977,7 @@ func miqt_exec_callback_QAbstractItemView_DropEvent(self *C.QAbstractItemView, c } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -2019,7 +2003,7 @@ func miqt_exec_callback_QAbstractItemView_FocusInEvent(self *C.QAbstractItemView } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -2045,7 +2029,7 @@ func miqt_exec_callback_QAbstractItemView_FocusOutEvent(self *C.QAbstractItemVie } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -2071,7 +2055,7 @@ func miqt_exec_callback_QAbstractItemView_KeyPressEvent(self *C.QAbstractItemVie } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -2097,7 +2081,7 @@ func miqt_exec_callback_QAbstractItemView_ResizeEvent(self *C.QAbstractItemView, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -2123,7 +2107,7 @@ func miqt_exec_callback_QAbstractItemView_TimerEvent(self *C.QAbstractItemView, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -2149,7 +2133,7 @@ func miqt_exec_callback_QAbstractItemView_InputMethodEvent(self *C.QAbstractItem } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -2286,7 +2270,7 @@ func miqt_exec_callback_QAbstractItemView_SetupViewport(self *C.QAbstractItemVie } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(viewport, nil, nil) + slotval1 := newQWidget(viewport) gofunc((&QAbstractItemView{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -2312,7 +2296,7 @@ func miqt_exec_callback_QAbstractItemView_PaintEvent(self *C.QAbstractItemView, } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QAbstractItemView{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -2338,7 +2322,7 @@ func miqt_exec_callback_QAbstractItemView_WheelEvent(self *C.QAbstractItemView, } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(param1, nil, nil) + slotval1 := newQWheelEvent(param1) gofunc((&QAbstractItemView{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -2364,7 +2348,7 @@ func miqt_exec_callback_QAbstractItemView_ContextMenuEvent(self *C.QAbstractItem } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QAbstractItemView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt/gen_qabstractitemview.h b/qt/gen_qabstractitemview.h index dbbbcafc..5cefb55c 100644 --- a/qt/gen_qabstractitemview.h +++ b/qt/gen_qabstractitemview.h @@ -82,8 +82,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QAbstractItemView_new(QWidget* parent, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QAbstractItemView_new2(QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QAbstractItemView* QAbstractItemView_new(QWidget* parent); +QAbstractItemView* QAbstractItemView_new2(); +void QAbstractItemView_virtbase(QAbstractItemView* src, QAbstractScrollArea** outptr_QAbstractScrollArea); QMetaObject* QAbstractItemView_MetaObject(const QAbstractItemView* self); void* QAbstractItemView_Metacast(QAbstractItemView* self, const char* param1); struct miqt_string QAbstractItemView_Tr(const char* s); diff --git a/qt/gen_qabstractnativeeventfilter.cpp b/qt/gen_qabstractnativeeventfilter.cpp index 1937aece..39231c5a 100644 --- a/qt/gen_qabstractnativeeventfilter.cpp +++ b/qt/gen_qabstractnativeeventfilter.cpp @@ -36,9 +36,8 @@ public: }; -void QAbstractNativeEventFilter_new(QAbstractNativeEventFilter** outptr_QAbstractNativeEventFilter) { - MiqtVirtualQAbstractNativeEventFilter* ret = new MiqtVirtualQAbstractNativeEventFilter(); - *outptr_QAbstractNativeEventFilter = ret; +QAbstractNativeEventFilter* QAbstractNativeEventFilter_new() { + return new MiqtVirtualQAbstractNativeEventFilter(); } bool QAbstractNativeEventFilter_NativeEventFilter(QAbstractNativeEventFilter* self, struct miqt_string eventType, void* message, long* result) { diff --git a/qt/gen_qabstractnativeeventfilter.go b/qt/gen_qabstractnativeeventfilter.go index 6c3bdaf2..a2f27330 100644 --- a/qt/gen_qabstractnativeeventfilter.go +++ b/qt/gen_qabstractnativeeventfilter.go @@ -38,24 +38,19 @@ func newQAbstractNativeEventFilter(h *C.QAbstractNativeEventFilter) *QAbstractNa if h == nil { return nil } + return &QAbstractNativeEventFilter{h: h} } // UnsafeNewQAbstractNativeEventFilter constructs the type using only unsafe pointers. func UnsafeNewQAbstractNativeEventFilter(h unsafe.Pointer) *QAbstractNativeEventFilter { - if h == nil { - return nil - } - - return &QAbstractNativeEventFilter{h: (*C.QAbstractNativeEventFilter)(h)} + return newQAbstractNativeEventFilter((*C.QAbstractNativeEventFilter)(h)) } // NewQAbstractNativeEventFilter constructs a new QAbstractNativeEventFilter object. func NewQAbstractNativeEventFilter() *QAbstractNativeEventFilter { - var outptr_QAbstractNativeEventFilter *C.QAbstractNativeEventFilter = nil - C.QAbstractNativeEventFilter_new(&outptr_QAbstractNativeEventFilter) - ret := newQAbstractNativeEventFilter(outptr_QAbstractNativeEventFilter) + ret := newQAbstractNativeEventFilter(C.QAbstractNativeEventFilter_new()) ret.isSubclass = true return ret } diff --git a/qt/gen_qabstractnativeeventfilter.h b/qt/gen_qabstractnativeeventfilter.h index dfb77400..be4b07c5 100644 --- a/qt/gen_qabstractnativeeventfilter.h +++ b/qt/gen_qabstractnativeeventfilter.h @@ -20,7 +20,7 @@ class QAbstractNativeEventFilter; typedef struct QAbstractNativeEventFilter QAbstractNativeEventFilter; #endif -void QAbstractNativeEventFilter_new(QAbstractNativeEventFilter** outptr_QAbstractNativeEventFilter); +QAbstractNativeEventFilter* QAbstractNativeEventFilter_new(); bool QAbstractNativeEventFilter_NativeEventFilter(QAbstractNativeEventFilter* self, struct miqt_string eventType, void* message, long* result); void QAbstractNativeEventFilter_override_virtual_NativeEventFilter(void* self, intptr_t slot); bool QAbstractNativeEventFilter_virtualbase_NativeEventFilter(void* self, struct miqt_string eventType, void* message, long* result); diff --git a/qt/gen_qabstractproxymodel.cpp b/qt/gen_qabstractproxymodel.cpp index c598ed6f..bb5ca629 100644 --- a/qt/gen_qabstractproxymodel.cpp +++ b/qt/gen_qabstractproxymodel.cpp @@ -1117,18 +1117,16 @@ public: }; -void QAbstractProxyModel_new(QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractProxyModel* ret = new MiqtVirtualQAbstractProxyModel(); - *outptr_QAbstractProxyModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAbstractProxyModel* QAbstractProxyModel_new() { + return new MiqtVirtualQAbstractProxyModel(); } -void QAbstractProxyModel_new2(QObject* parent, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractProxyModel* ret = new MiqtVirtualQAbstractProxyModel(parent); - *outptr_QAbstractProxyModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAbstractProxyModel* QAbstractProxyModel_new2(QObject* parent) { + return new MiqtVirtualQAbstractProxyModel(parent); +} + +void QAbstractProxyModel_virtbase(QAbstractProxyModel* src, QAbstractItemModel** outptr_QAbstractItemModel) { + *outptr_QAbstractItemModel = static_cast(src); } QMetaObject* QAbstractProxyModel_MetaObject(const QAbstractProxyModel* self) { diff --git a/qt/gen_qabstractproxymodel.go b/qt/gen_qabstractproxymodel.go index 6ecb39c7..4cdaa837 100644 --- a/qt/gen_qabstractproxymodel.go +++ b/qt/gen_qabstractproxymodel.go @@ -35,44 +35,34 @@ func (this *QAbstractProxyModel) UnsafePointer() unsafe.Pointer { } // newQAbstractProxyModel constructs the type using only CGO pointers. -func newQAbstractProxyModel(h *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractProxyModel { +func newQAbstractProxyModel(h *C.QAbstractProxyModel) *QAbstractProxyModel { if h == nil { return nil } + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + C.QAbstractProxyModel_virtbase(h, &outptr_QAbstractItemModel) + return &QAbstractProxyModel{h: h, - QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} + QAbstractItemModel: newQAbstractItemModel(outptr_QAbstractItemModel)} } // UnsafeNewQAbstractProxyModel constructs the type using only unsafe pointers. -func UnsafeNewQAbstractProxyModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractProxyModel { - if h == nil { - return nil - } - - return &QAbstractProxyModel{h: (*C.QAbstractProxyModel)(h), - QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} +func UnsafeNewQAbstractProxyModel(h unsafe.Pointer) *QAbstractProxyModel { + return newQAbstractProxyModel((*C.QAbstractProxyModel)(h)) } // NewQAbstractProxyModel constructs a new QAbstractProxyModel object. func NewQAbstractProxyModel() *QAbstractProxyModel { - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractProxyModel_new(&outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractProxyModel(outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractProxyModel(C.QAbstractProxyModel_new()) ret.isSubclass = true return ret } // NewQAbstractProxyModel2 constructs a new QAbstractProxyModel object. func NewQAbstractProxyModel2(parent *QObject) *QAbstractProxyModel { - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractProxyModel_new2(parent.cPointer(), &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractProxyModel(outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractProxyModel(C.QAbstractProxyModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -110,7 +100,7 @@ func (this *QAbstractProxyModel) SetSourceModel(sourceModel *QAbstractItemModel) } func (this *QAbstractProxyModel) SourceModel() *QAbstractItemModel { - return newQAbstractItemModel(C.QAbstractProxyModel_SourceModel(this.h), nil) + return newQAbstractItemModel(C.QAbstractProxyModel_SourceModel(this.h)) } func (this *QAbstractProxyModel) MapToSource(proxyIndex *QModelIndex) *QModelIndex { @@ -246,7 +236,7 @@ func (this *QAbstractProxyModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QAbstractProxyModel_MimeData(this.h, indexes_ma), nil) + return newQMimeData(C.QAbstractProxyModel_MimeData(this.h, indexes_ma)) } func (this *QAbstractProxyModel) CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -342,7 +332,7 @@ func miqt_exec_callback_QAbstractProxyModel_SetSourceModel(self *C.QAbstractProx } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(sourceModel, nil) + slotval1 := newQAbstractItemModel(sourceModel) gofunc((&QAbstractProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) @@ -986,7 +976,7 @@ func (this *QAbstractProxyModel) callVirtualBase_MimeData(indexes []QModelIndex) } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QAbstractProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QAbstractProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QAbstractProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -1040,7 +1030,7 @@ func miqt_exec_callback_QAbstractProxyModel_CanDropMimeData(self *C.QAbstractPro } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -1076,7 +1066,7 @@ func miqt_exec_callback_QAbstractProxyModel_DropMimeData(self *C.QAbstractProxyM } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt/gen_qabstractproxymodel.h b/qt/gen_qabstractproxymodel.h index a5a16d83..08e1f061 100644 --- a/qt/gen_qabstractproxymodel.h +++ b/qt/gen_qabstractproxymodel.h @@ -36,8 +36,9 @@ typedef struct QSize QSize; typedef struct QVariant QVariant; #endif -void QAbstractProxyModel_new(QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QAbstractProxyModel_new2(QObject* parent, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QAbstractProxyModel* QAbstractProxyModel_new(); +QAbstractProxyModel* QAbstractProxyModel_new2(QObject* parent); +void QAbstractProxyModel_virtbase(QAbstractProxyModel* src, QAbstractItemModel** outptr_QAbstractItemModel); QMetaObject* QAbstractProxyModel_MetaObject(const QAbstractProxyModel* self); void* QAbstractProxyModel_Metacast(QAbstractProxyModel* self, const char* param1); struct miqt_string QAbstractProxyModel_Tr(const char* s); diff --git a/qt/gen_qabstractscrollarea.cpp b/qt/gen_qabstractscrollarea.cpp index ed1f808b..19d66366 100644 --- a/qt/gen_qabstractscrollarea.cpp +++ b/qt/gen_qabstractscrollarea.cpp @@ -556,22 +556,16 @@ public: }; -void QAbstractScrollArea_new(QWidget* parent, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractScrollArea* ret = new MiqtVirtualQAbstractScrollArea(parent); - *outptr_QAbstractScrollArea = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractScrollArea* QAbstractScrollArea_new(QWidget* parent) { + return new MiqtVirtualQAbstractScrollArea(parent); } -void QAbstractScrollArea_new2(QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractScrollArea* ret = new MiqtVirtualQAbstractScrollArea(); - *outptr_QAbstractScrollArea = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractScrollArea* QAbstractScrollArea_new2() { + return new MiqtVirtualQAbstractScrollArea(); +} + +void QAbstractScrollArea_virtbase(QAbstractScrollArea* src, QFrame** outptr_QFrame) { + *outptr_QFrame = static_cast(src); } QMetaObject* QAbstractScrollArea_MetaObject(const QAbstractScrollArea* self) { diff --git a/qt/gen_qabstractscrollarea.go b/qt/gen_qabstractscrollarea.go index 98f61acf..b44e7e51 100644 --- a/qt/gen_qabstractscrollarea.go +++ b/qt/gen_qabstractscrollarea.go @@ -43,48 +43,34 @@ func (this *QAbstractScrollArea) UnsafePointer() unsafe.Pointer { } // newQAbstractScrollArea constructs the type using only CGO pointers. -func newQAbstractScrollArea(h *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractScrollArea { +func newQAbstractScrollArea(h *C.QAbstractScrollArea) *QAbstractScrollArea { if h == nil { return nil } + var outptr_QFrame *C.QFrame = nil + C.QAbstractScrollArea_virtbase(h, &outptr_QFrame) + return &QAbstractScrollArea{h: h, - QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QFrame: newQFrame(outptr_QFrame)} } // UnsafeNewQAbstractScrollArea constructs the type using only unsafe pointers. -func UnsafeNewQAbstractScrollArea(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractScrollArea { - if h == nil { - return nil - } - - return &QAbstractScrollArea{h: (*C.QAbstractScrollArea)(h), - QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQAbstractScrollArea(h unsafe.Pointer) *QAbstractScrollArea { + return newQAbstractScrollArea((*C.QAbstractScrollArea)(h)) } // NewQAbstractScrollArea constructs a new QAbstractScrollArea object. func NewQAbstractScrollArea(parent *QWidget) *QAbstractScrollArea { - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractScrollArea_new(parent.cPointer(), &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractScrollArea(outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractScrollArea(C.QAbstractScrollArea_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQAbstractScrollArea2 constructs a new QAbstractScrollArea object. func NewQAbstractScrollArea2() *QAbstractScrollArea { - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractScrollArea_new2(&outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractScrollArea(outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractScrollArea(C.QAbstractScrollArea_new2()) ret.isSubclass = true return ret } @@ -126,7 +112,7 @@ func (this *QAbstractScrollArea) SetVerticalScrollBarPolicy(verticalScrollBarPol } func (this *QAbstractScrollArea) VerticalScrollBar() *QScrollBar { - return newQScrollBar(C.QAbstractScrollArea_VerticalScrollBar(this.h), nil, nil, nil, nil) + return newQScrollBar(C.QAbstractScrollArea_VerticalScrollBar(this.h)) } func (this *QAbstractScrollArea) SetVerticalScrollBar(scrollbar *QScrollBar) { @@ -142,7 +128,7 @@ func (this *QAbstractScrollArea) SetHorizontalScrollBarPolicy(horizontalScrollBa } func (this *QAbstractScrollArea) HorizontalScrollBar() *QScrollBar { - return newQScrollBar(C.QAbstractScrollArea_HorizontalScrollBar(this.h), nil, nil, nil, nil) + return newQScrollBar(C.QAbstractScrollArea_HorizontalScrollBar(this.h)) } func (this *QAbstractScrollArea) SetHorizontalScrollBar(scrollbar *QScrollBar) { @@ -150,7 +136,7 @@ func (this *QAbstractScrollArea) SetHorizontalScrollBar(scrollbar *QScrollBar) { } func (this *QAbstractScrollArea) CornerWidget() *QWidget { - return newQWidget(C.QAbstractScrollArea_CornerWidget(this.h), nil, nil) + return newQWidget(C.QAbstractScrollArea_CornerWidget(this.h)) } func (this *QAbstractScrollArea) SetCornerWidget(widget *QWidget) { @@ -166,13 +152,13 @@ func (this *QAbstractScrollArea) ScrollBarWidgets(alignment AlignmentFlag) []*QW _ret := make([]*QWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQWidget(_outCast[i], nil, nil) + _ret[i] = newQWidget(_outCast[i]) } return _ret } func (this *QAbstractScrollArea) Viewport() *QWidget { - return newQWidget(C.QAbstractScrollArea_Viewport(this.h), nil, nil) + return newQWidget(C.QAbstractScrollArea_Viewport(this.h)) } func (this *QAbstractScrollArea) SetViewport(widget *QWidget) { @@ -327,7 +313,7 @@ func miqt_exec_callback_QAbstractScrollArea_SetupViewport(self *C.QAbstractScrol } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(viewport, nil, nil) + slotval1 := newQWidget(viewport) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -439,7 +425,7 @@ func miqt_exec_callback_QAbstractScrollArea_ResizeEvent(self *C.QAbstractScrollA } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -465,7 +451,7 @@ func miqt_exec_callback_QAbstractScrollArea_PaintEvent(self *C.QAbstractScrollAr } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -491,7 +477,7 @@ func miqt_exec_callback_QAbstractScrollArea_MousePressEvent(self *C.QAbstractScr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -517,7 +503,7 @@ func miqt_exec_callback_QAbstractScrollArea_MouseReleaseEvent(self *C.QAbstractS } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -543,7 +529,7 @@ func miqt_exec_callback_QAbstractScrollArea_MouseDoubleClickEvent(self *C.QAbstr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -569,7 +555,7 @@ func miqt_exec_callback_QAbstractScrollArea_MouseMoveEvent(self *C.QAbstractScro } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -595,7 +581,7 @@ func miqt_exec_callback_QAbstractScrollArea_WheelEvent(self *C.QAbstractScrollAr } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(param1, nil, nil) + slotval1 := newQWheelEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -621,7 +607,7 @@ func miqt_exec_callback_QAbstractScrollArea_ContextMenuEvent(self *C.QAbstractSc } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -647,7 +633,7 @@ func miqt_exec_callback_QAbstractScrollArea_DragEnterEvent(self *C.QAbstractScro } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(param1, nil, nil, nil) + slotval1 := newQDragEnterEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -673,7 +659,7 @@ func miqt_exec_callback_QAbstractScrollArea_DragMoveEvent(self *C.QAbstractScrol } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(param1, nil, nil) + slotval1 := newQDragMoveEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -699,7 +685,7 @@ func miqt_exec_callback_QAbstractScrollArea_DragLeaveEvent(self *C.QAbstractScro } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(param1, nil) + slotval1 := newQDragLeaveEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -725,7 +711,7 @@ func miqt_exec_callback_QAbstractScrollArea_DropEvent(self *C.QAbstractScrollAre } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(param1, nil) + slotval1 := newQDropEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DropEvent, slotval1) @@ -751,7 +737,7 @@ func miqt_exec_callback_QAbstractScrollArea_KeyPressEvent(self *C.QAbstractScrol } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_KeyPressEvent, slotval1) diff --git a/qt/gen_qabstractscrollarea.h b/qt/gen_qabstractscrollarea.h index 66dfd8a6..ca0a35f1 100644 --- a/qt/gen_qabstractscrollarea.h +++ b/qt/gen_qabstractscrollarea.h @@ -56,8 +56,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QAbstractScrollArea_new(QWidget* parent, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QAbstractScrollArea_new2(QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QAbstractScrollArea* QAbstractScrollArea_new(QWidget* parent); +QAbstractScrollArea* QAbstractScrollArea_new2(); +void QAbstractScrollArea_virtbase(QAbstractScrollArea* src, QFrame** outptr_QFrame); QMetaObject* QAbstractScrollArea_MetaObject(const QAbstractScrollArea* self); void* QAbstractScrollArea_Metacast(QAbstractScrollArea* self, const char* param1); struct miqt_string QAbstractScrollArea_Tr(const char* s); diff --git a/qt/gen_qabstractslider.cpp b/qt/gen_qabstractslider.cpp index d583f6f2..e278d1f6 100644 --- a/qt/gen_qabstractslider.cpp +++ b/qt/gen_qabstractslider.cpp @@ -1070,20 +1070,16 @@ public: }; -void QAbstractSlider_new(QWidget* parent, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractSlider* ret = new MiqtVirtualQAbstractSlider(parent); - *outptr_QAbstractSlider = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractSlider* QAbstractSlider_new(QWidget* parent) { + return new MiqtVirtualQAbstractSlider(parent); } -void QAbstractSlider_new2(QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractSlider* ret = new MiqtVirtualQAbstractSlider(); - *outptr_QAbstractSlider = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractSlider* QAbstractSlider_new2() { + return new MiqtVirtualQAbstractSlider(); +} + +void QAbstractSlider_virtbase(QAbstractSlider* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QAbstractSlider_MetaObject(const QAbstractSlider* self) { diff --git a/qt/gen_qabstractslider.go b/qt/gen_qabstractslider.go index 3c719401..cadb5e3d 100644 --- a/qt/gen_qabstractslider.go +++ b/qt/gen_qabstractslider.go @@ -57,46 +57,34 @@ func (this *QAbstractSlider) UnsafePointer() unsafe.Pointer { } // newQAbstractSlider constructs the type using only CGO pointers. -func newQAbstractSlider(h *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractSlider { +func newQAbstractSlider(h *C.QAbstractSlider) *QAbstractSlider { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QAbstractSlider_virtbase(h, &outptr_QWidget) + return &QAbstractSlider{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQAbstractSlider constructs the type using only unsafe pointers. -func UnsafeNewQAbstractSlider(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractSlider { - if h == nil { - return nil - } - - return &QAbstractSlider{h: (*C.QAbstractSlider)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQAbstractSlider(h unsafe.Pointer) *QAbstractSlider { + return newQAbstractSlider((*C.QAbstractSlider)(h)) } // NewQAbstractSlider constructs a new QAbstractSlider object. func NewQAbstractSlider(parent *QWidget) *QAbstractSlider { - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractSlider_new(parent.cPointer(), &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractSlider(outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractSlider(C.QAbstractSlider_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQAbstractSlider2 constructs a new QAbstractSlider object. func NewQAbstractSlider2() *QAbstractSlider { - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractSlider_new2(&outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractSlider(outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractSlider(C.QAbstractSlider_new2()) ret.isSubclass = true return ret } @@ -459,7 +447,7 @@ func miqt_exec_callback_QAbstractSlider_KeyPressEvent(self *C.QAbstractSlider, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(ev, nil, nil) + slotval1 := newQKeyEvent(ev) gofunc((&QAbstractSlider{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -485,7 +473,7 @@ func miqt_exec_callback_QAbstractSlider_TimerEvent(self *C.QAbstractSlider, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QAbstractSlider{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -511,7 +499,7 @@ func miqt_exec_callback_QAbstractSlider_WheelEvent(self *C.QAbstractSlider, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QAbstractSlider{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -746,7 +734,7 @@ func miqt_exec_callback_QAbstractSlider_MousePressEvent(self *C.QAbstractSlider, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -772,7 +760,7 @@ func miqt_exec_callback_QAbstractSlider_MouseReleaseEvent(self *C.QAbstractSlide } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -798,7 +786,7 @@ func miqt_exec_callback_QAbstractSlider_MouseDoubleClickEvent(self *C.QAbstractS } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -824,7 +812,7 @@ func miqt_exec_callback_QAbstractSlider_MouseMoveEvent(self *C.QAbstractSlider, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -850,7 +838,7 @@ func miqt_exec_callback_QAbstractSlider_KeyReleaseEvent(self *C.QAbstractSlider, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -876,7 +864,7 @@ func miqt_exec_callback_QAbstractSlider_FocusInEvent(self *C.QAbstractSlider, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -902,7 +890,7 @@ func miqt_exec_callback_QAbstractSlider_FocusOutEvent(self *C.QAbstractSlider, c } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -980,7 +968,7 @@ func miqt_exec_callback_QAbstractSlider_PaintEvent(self *C.QAbstractSlider, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1006,7 +994,7 @@ func miqt_exec_callback_QAbstractSlider_MoveEvent(self *C.QAbstractSlider, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1032,7 +1020,7 @@ func miqt_exec_callback_QAbstractSlider_ResizeEvent(self *C.QAbstractSlider, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1058,7 +1046,7 @@ func miqt_exec_callback_QAbstractSlider_CloseEvent(self *C.QAbstractSlider, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1084,7 +1072,7 @@ func miqt_exec_callback_QAbstractSlider_ContextMenuEvent(self *C.QAbstractSlider } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1110,7 +1098,7 @@ func miqt_exec_callback_QAbstractSlider_TabletEvent(self *C.QAbstractSlider, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1136,7 +1124,7 @@ func miqt_exec_callback_QAbstractSlider_ActionEvent(self *C.QAbstractSlider, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1162,7 +1150,7 @@ func miqt_exec_callback_QAbstractSlider_DragEnterEvent(self *C.QAbstractSlider, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1188,7 +1176,7 @@ func miqt_exec_callback_QAbstractSlider_DragMoveEvent(self *C.QAbstractSlider, c } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1214,7 +1202,7 @@ func miqt_exec_callback_QAbstractSlider_DragLeaveEvent(self *C.QAbstractSlider, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1240,7 +1228,7 @@ func miqt_exec_callback_QAbstractSlider_DropEvent(self *C.QAbstractSlider, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1266,7 +1254,7 @@ func miqt_exec_callback_QAbstractSlider_ShowEvent(self *C.QAbstractSlider, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1292,7 +1280,7 @@ func miqt_exec_callback_QAbstractSlider_HideEvent(self *C.QAbstractSlider, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1462,7 +1450,7 @@ func miqt_exec_callback_QAbstractSlider_InputMethodEvent(self *C.QAbstractSlider } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QAbstractSlider{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qabstractslider.h b/qt/gen_qabstractslider.h index e19f05f7..bc6cd2e7 100644 --- a/qt/gen_qabstractslider.h +++ b/qt/gen_qabstractslider.h @@ -78,8 +78,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QAbstractSlider_new(QWidget* parent, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QAbstractSlider_new2(QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QAbstractSlider* QAbstractSlider_new(QWidget* parent); +QAbstractSlider* QAbstractSlider_new2(); +void QAbstractSlider_virtbase(QAbstractSlider* src, QWidget** outptr_QWidget); QMetaObject* QAbstractSlider_MetaObject(const QAbstractSlider* self); void* QAbstractSlider_Metacast(QAbstractSlider* self, const char* param1); struct miqt_string QAbstractSlider_Tr(const char* s); diff --git a/qt/gen_qabstractspinbox.cpp b/qt/gen_qabstractspinbox.cpp index 9060d4c4..197c7132 100644 --- a/qt/gen_qabstractspinbox.cpp +++ b/qt/gen_qabstractspinbox.cpp @@ -1180,20 +1180,16 @@ public: }; -void QAbstractSpinBox_new(QWidget* parent, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractSpinBox* ret = new MiqtVirtualQAbstractSpinBox(parent); - *outptr_QAbstractSpinBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractSpinBox* QAbstractSpinBox_new(QWidget* parent) { + return new MiqtVirtualQAbstractSpinBox(parent); } -void QAbstractSpinBox_new2(QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractSpinBox* ret = new MiqtVirtualQAbstractSpinBox(); - *outptr_QAbstractSpinBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractSpinBox* QAbstractSpinBox_new2() { + return new MiqtVirtualQAbstractSpinBox(); +} + +void QAbstractSpinBox_virtbase(QAbstractSpinBox* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QAbstractSpinBox_MetaObject(const QAbstractSpinBox* self) { diff --git a/qt/gen_qabstractspinbox.go b/qt/gen_qabstractspinbox.go index f8193b54..1ed43212 100644 --- a/qt/gen_qabstractspinbox.go +++ b/qt/gen_qabstractspinbox.go @@ -65,46 +65,34 @@ func (this *QAbstractSpinBox) UnsafePointer() unsafe.Pointer { } // newQAbstractSpinBox constructs the type using only CGO pointers. -func newQAbstractSpinBox(h *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractSpinBox { +func newQAbstractSpinBox(h *C.QAbstractSpinBox) *QAbstractSpinBox { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QAbstractSpinBox_virtbase(h, &outptr_QWidget) + return &QAbstractSpinBox{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQAbstractSpinBox constructs the type using only unsafe pointers. -func UnsafeNewQAbstractSpinBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractSpinBox { - if h == nil { - return nil - } - - return &QAbstractSpinBox{h: (*C.QAbstractSpinBox)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQAbstractSpinBox(h unsafe.Pointer) *QAbstractSpinBox { + return newQAbstractSpinBox((*C.QAbstractSpinBox)(h)) } // NewQAbstractSpinBox constructs a new QAbstractSpinBox object. func NewQAbstractSpinBox(parent *QWidget) *QAbstractSpinBox { - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractSpinBox_new(parent.cPointer(), &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractSpinBox(outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractSpinBox(C.QAbstractSpinBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQAbstractSpinBox2 constructs a new QAbstractSpinBox object. func NewQAbstractSpinBox2() *QAbstractSpinBox { - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractSpinBox_new2(&outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractSpinBox(outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractSpinBox(C.QAbstractSpinBox_new2()) ret.isSubclass = true return ret } @@ -608,7 +596,7 @@ func miqt_exec_callback_QAbstractSpinBox_ResizeEvent(self *C.QAbstractSpinBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -634,7 +622,7 @@ func miqt_exec_callback_QAbstractSpinBox_KeyPressEvent(self *C.QAbstractSpinBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -660,7 +648,7 @@ func miqt_exec_callback_QAbstractSpinBox_KeyReleaseEvent(self *C.QAbstractSpinBo } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -686,7 +674,7 @@ func miqt_exec_callback_QAbstractSpinBox_WheelEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -712,7 +700,7 @@ func miqt_exec_callback_QAbstractSpinBox_FocusInEvent(self *C.QAbstractSpinBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -738,7 +726,7 @@ func miqt_exec_callback_QAbstractSpinBox_FocusOutEvent(self *C.QAbstractSpinBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -764,7 +752,7 @@ func miqt_exec_callback_QAbstractSpinBox_ContextMenuEvent(self *C.QAbstractSpinB } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -816,7 +804,7 @@ func miqt_exec_callback_QAbstractSpinBox_CloseEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -842,7 +830,7 @@ func miqt_exec_callback_QAbstractSpinBox_HideEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_HideEvent, slotval1) @@ -868,7 +856,7 @@ func miqt_exec_callback_QAbstractSpinBox_MousePressEvent(self *C.QAbstractSpinBo } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -894,7 +882,7 @@ func miqt_exec_callback_QAbstractSpinBox_MouseReleaseEvent(self *C.QAbstractSpin } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -920,7 +908,7 @@ func miqt_exec_callback_QAbstractSpinBox_MouseMoveEvent(self *C.QAbstractSpinBox } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -946,7 +934,7 @@ func miqt_exec_callback_QAbstractSpinBox_TimerEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -972,7 +960,7 @@ func miqt_exec_callback_QAbstractSpinBox_PaintEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -998,7 +986,7 @@ func miqt_exec_callback_QAbstractSpinBox_ShowEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1178,7 +1166,7 @@ func miqt_exec_callback_QAbstractSpinBox_MouseDoubleClickEvent(self *C.QAbstract } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1256,7 +1244,7 @@ func miqt_exec_callback_QAbstractSpinBox_MoveEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1282,7 +1270,7 @@ func miqt_exec_callback_QAbstractSpinBox_TabletEvent(self *C.QAbstractSpinBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1308,7 +1296,7 @@ func miqt_exec_callback_QAbstractSpinBox_ActionEvent(self *C.QAbstractSpinBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1334,7 +1322,7 @@ func miqt_exec_callback_QAbstractSpinBox_DragEnterEvent(self *C.QAbstractSpinBox } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1360,7 +1348,7 @@ func miqt_exec_callback_QAbstractSpinBox_DragMoveEvent(self *C.QAbstractSpinBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1386,7 +1374,7 @@ func miqt_exec_callback_QAbstractSpinBox_DragLeaveEvent(self *C.QAbstractSpinBox } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1412,7 +1400,7 @@ func miqt_exec_callback_QAbstractSpinBox_DropEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1582,7 +1570,7 @@ func miqt_exec_callback_QAbstractSpinBox_InputMethodEvent(self *C.QAbstractSpinB } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qabstractspinbox.h b/qt/gen_qabstractspinbox.h index 35418221..4fad22ef 100644 --- a/qt/gen_qabstractspinbox.h +++ b/qt/gen_qabstractspinbox.h @@ -78,8 +78,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QAbstractSpinBox_new(QWidget* parent, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QAbstractSpinBox_new2(QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QAbstractSpinBox* QAbstractSpinBox_new(QWidget* parent); +QAbstractSpinBox* QAbstractSpinBox_new2(); +void QAbstractSpinBox_virtbase(QAbstractSpinBox* src, QWidget** outptr_QWidget); QMetaObject* QAbstractSpinBox_MetaObject(const QAbstractSpinBox* self); void* QAbstractSpinBox_Metacast(QAbstractSpinBox* self, const char* param1); struct miqt_string QAbstractSpinBox_Tr(const char* s); diff --git a/qt/gen_qabstractstate.cpp b/qt/gen_qabstractstate.cpp index 754c1275..0c47d4da 100644 --- a/qt/gen_qabstractstate.cpp +++ b/qt/gen_qabstractstate.cpp @@ -11,6 +11,10 @@ #include "gen_qabstractstate.h" #include "_cgo_export.h" +void QAbstractState_virtbase(QAbstractState* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QAbstractState_MetaObject(const QAbstractState* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/gen_qabstractstate.go b/qt/gen_qabstractstate.go index 3f01508f..87848b57 100644 --- a/qt/gen_qabstractstate.go +++ b/qt/gen_qabstractstate.go @@ -35,22 +35,20 @@ func (this *QAbstractState) UnsafePointer() unsafe.Pointer { } // newQAbstractState constructs the type using only CGO pointers. -func newQAbstractState(h *C.QAbstractState, h_QObject *C.QObject) *QAbstractState { +func newQAbstractState(h *C.QAbstractState) *QAbstractState { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractState_virtbase(h, &outptr_QObject) + return &QAbstractState{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAbstractState constructs the type using only unsafe pointers. -func UnsafeNewQAbstractState(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractState { - if h == nil { - return nil - } - - return &QAbstractState{h: (*C.QAbstractState)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractState(h unsafe.Pointer) *QAbstractState { + return newQAbstractState((*C.QAbstractState)(h)) } func (this *QAbstractState) MetaObject() *QMetaObject { @@ -82,11 +80,11 @@ func QAbstractState_TrUtf8(s string) string { } func (this *QAbstractState) ParentState() *QState { - return newQState(C.QAbstractState_ParentState(this.h), nil, nil) + return newQState(C.QAbstractState_ParentState(this.h)) } func (this *QAbstractState) Machine() *QStateMachine { - return newQStateMachine(C.QAbstractState_Machine(this.h), nil, nil, nil) + return newQStateMachine(C.QAbstractState_Machine(this.h)) } func (this *QAbstractState) Active() bool { diff --git a/qt/gen_qabstractstate.h b/qt/gen_qabstractstate.h index dfa8b8e3..4a2cf566 100644 --- a/qt/gen_qabstractstate.h +++ b/qt/gen_qabstractstate.h @@ -30,6 +30,7 @@ typedef struct QState QState; typedef struct QStateMachine QStateMachine; #endif +void QAbstractState_virtbase(QAbstractState* src, QObject** outptr_QObject); QMetaObject* QAbstractState_MetaObject(const QAbstractState* self); void* QAbstractState_Metacast(QAbstractState* self, const char* param1); struct miqt_string QAbstractState_Tr(const char* s); diff --git a/qt/gen_qabstracttextdocumentlayout.cpp b/qt/gen_qabstracttextdocumentlayout.cpp index 7c53ab11..0d7c61f2 100644 --- a/qt/gen_qabstracttextdocumentlayout.cpp +++ b/qt/gen_qabstracttextdocumentlayout.cpp @@ -414,10 +414,12 @@ public: }; -void QAbstractTextDocumentLayout_new(QTextDocument* doc, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject) { - MiqtVirtualQAbstractTextDocumentLayout* ret = new MiqtVirtualQAbstractTextDocumentLayout(doc); - *outptr_QAbstractTextDocumentLayout = ret; - *outptr_QObject = static_cast(ret); +QAbstractTextDocumentLayout* QAbstractTextDocumentLayout_new(QTextDocument* doc) { + return new MiqtVirtualQAbstractTextDocumentLayout(doc); +} + +void QAbstractTextDocumentLayout_virtbase(QAbstractTextDocumentLayout* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAbstractTextDocumentLayout_MetaObject(const QAbstractTextDocumentLayout* self) { @@ -772,9 +774,8 @@ void QTextObjectInterface_Delete(QTextObjectInterface* self, bool isSubclass) { } } -void QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1, QAbstractTextDocumentLayout__Selection** outptr_QAbstractTextDocumentLayout__Selection) { - QAbstractTextDocumentLayout::Selection* ret = new QAbstractTextDocumentLayout::Selection(*param1); - *outptr_QAbstractTextDocumentLayout__Selection = ret; +QAbstractTextDocumentLayout__Selection* QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1) { + return new QAbstractTextDocumentLayout::Selection(*param1); } void QAbstractTextDocumentLayout__Selection_OperatorAssign(QAbstractTextDocumentLayout__Selection* self, QAbstractTextDocumentLayout__Selection* param1) { @@ -789,14 +790,12 @@ void QAbstractTextDocumentLayout__Selection_Delete(QAbstractTextDocumentLayout__ } } -void QAbstractTextDocumentLayout__PaintContext_new(QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext) { - QAbstractTextDocumentLayout::PaintContext* ret = new QAbstractTextDocumentLayout::PaintContext(); - *outptr_QAbstractTextDocumentLayout__PaintContext = ret; +QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new() { + return new QAbstractTextDocumentLayout::PaintContext(); } -void QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1, QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext) { - QAbstractTextDocumentLayout::PaintContext* ret = new QAbstractTextDocumentLayout::PaintContext(*param1); - *outptr_QAbstractTextDocumentLayout__PaintContext = ret; +QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1) { + return new QAbstractTextDocumentLayout::PaintContext(*param1); } void QAbstractTextDocumentLayout__PaintContext_OperatorAssign(QAbstractTextDocumentLayout__PaintContext* self, QAbstractTextDocumentLayout__PaintContext* param1) { diff --git a/qt/gen_qabstracttextdocumentlayout.go b/qt/gen_qabstracttextdocumentlayout.go index 0105121c..abd58fe4 100644 --- a/qt/gen_qabstracttextdocumentlayout.go +++ b/qt/gen_qabstracttextdocumentlayout.go @@ -35,31 +35,26 @@ func (this *QAbstractTextDocumentLayout) UnsafePointer() unsafe.Pointer { } // newQAbstractTextDocumentLayout constructs the type using only CGO pointers. -func newQAbstractTextDocumentLayout(h *C.QAbstractTextDocumentLayout, h_QObject *C.QObject) *QAbstractTextDocumentLayout { +func newQAbstractTextDocumentLayout(h *C.QAbstractTextDocumentLayout) *QAbstractTextDocumentLayout { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractTextDocumentLayout_virtbase(h, &outptr_QObject) + return &QAbstractTextDocumentLayout{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAbstractTextDocumentLayout constructs the type using only unsafe pointers. -func UnsafeNewQAbstractTextDocumentLayout(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractTextDocumentLayout { - if h == nil { - return nil - } - - return &QAbstractTextDocumentLayout{h: (*C.QAbstractTextDocumentLayout)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractTextDocumentLayout(h unsafe.Pointer) *QAbstractTextDocumentLayout { + return newQAbstractTextDocumentLayout((*C.QAbstractTextDocumentLayout)(h)) } // NewQAbstractTextDocumentLayout constructs a new QAbstractTextDocumentLayout object. func NewQAbstractTextDocumentLayout(doc *QTextDocument) *QAbstractTextDocumentLayout { - var outptr_QAbstractTextDocumentLayout *C.QAbstractTextDocumentLayout = nil - var outptr_QObject *C.QObject = nil - C.QAbstractTextDocumentLayout_new(doc.cPointer(), &outptr_QAbstractTextDocumentLayout, &outptr_QObject) - ret := newQAbstractTextDocumentLayout(outptr_QAbstractTextDocumentLayout, outptr_QObject) + ret := newQAbstractTextDocumentLayout(C.QAbstractTextDocumentLayout_new(doc.cPointer())) ret.isSubclass = true return ret } @@ -157,7 +152,7 @@ func (this *QAbstractTextDocumentLayout) PaintDevice() *QPaintDevice { } func (this *QAbstractTextDocumentLayout) Document() *QTextDocument { - return newQTextDocument(C.QAbstractTextDocumentLayout_Document(this.h), nil) + return newQTextDocument(C.QAbstractTextDocumentLayout_Document(this.h)) } func (this *QAbstractTextDocumentLayout) RegisterHandler(objectType int, component *QObject) { @@ -416,7 +411,7 @@ func miqt_exec_callback_QAbstractTextDocumentLayout_FrameBoundingRect(self *C.QA } // Convert all CABI parameters to Go parameters - slotval1 := newQTextFrame(frame, nil, nil) + slotval1 := newQTextFrame(frame) virtualReturn := gofunc(slotval1) @@ -648,7 +643,7 @@ func miqt_exec_callback_QAbstractTextDocumentLayout_TimerEvent(self *C.QAbstract } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -674,7 +669,7 @@ func miqt_exec_callback_QAbstractTextDocumentLayout_ChildEvent(self *C.QAbstract } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -796,16 +791,13 @@ func newQTextObjectInterface(h *C.QTextObjectInterface) *QTextObjectInterface { if h == nil { return nil } + return &QTextObjectInterface{h: h} } // UnsafeNewQTextObjectInterface constructs the type using only unsafe pointers. func UnsafeNewQTextObjectInterface(h unsafe.Pointer) *QTextObjectInterface { - if h == nil { - return nil - } - - return &QTextObjectInterface{h: (*C.QTextObjectInterface)(h)} + return newQTextObjectInterface((*C.QTextObjectInterface)(h)) } func (this *QTextObjectInterface) IntrinsicSize(doc *QTextDocument, posInDocument int, format *QTextFormat) *QSizeF { @@ -860,24 +852,19 @@ func newQAbstractTextDocumentLayout__Selection(h *C.QAbstractTextDocumentLayout_ if h == nil { return nil } + return &QAbstractTextDocumentLayout__Selection{h: h} } // UnsafeNewQAbstractTextDocumentLayout__Selection constructs the type using only unsafe pointers. func UnsafeNewQAbstractTextDocumentLayout__Selection(h unsafe.Pointer) *QAbstractTextDocumentLayout__Selection { - if h == nil { - return nil - } - - return &QAbstractTextDocumentLayout__Selection{h: (*C.QAbstractTextDocumentLayout__Selection)(h)} + return newQAbstractTextDocumentLayout__Selection((*C.QAbstractTextDocumentLayout__Selection)(h)) } // NewQAbstractTextDocumentLayout__Selection constructs a new QAbstractTextDocumentLayout::Selection object. func NewQAbstractTextDocumentLayout__Selection(param1 *QAbstractTextDocumentLayout__Selection) *QAbstractTextDocumentLayout__Selection { - var outptr_QAbstractTextDocumentLayout__Selection *C.QAbstractTextDocumentLayout__Selection = nil - C.QAbstractTextDocumentLayout__Selection_new(param1.cPointer(), &outptr_QAbstractTextDocumentLayout__Selection) - ret := newQAbstractTextDocumentLayout__Selection(outptr_QAbstractTextDocumentLayout__Selection) + ret := newQAbstractTextDocumentLayout__Selection(C.QAbstractTextDocumentLayout__Selection_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -924,34 +911,27 @@ func newQAbstractTextDocumentLayout__PaintContext(h *C.QAbstractTextDocumentLayo if h == nil { return nil } + return &QAbstractTextDocumentLayout__PaintContext{h: h} } // UnsafeNewQAbstractTextDocumentLayout__PaintContext constructs the type using only unsafe pointers. func UnsafeNewQAbstractTextDocumentLayout__PaintContext(h unsafe.Pointer) *QAbstractTextDocumentLayout__PaintContext { - if h == nil { - return nil - } - - return &QAbstractTextDocumentLayout__PaintContext{h: (*C.QAbstractTextDocumentLayout__PaintContext)(h)} + return newQAbstractTextDocumentLayout__PaintContext((*C.QAbstractTextDocumentLayout__PaintContext)(h)) } // NewQAbstractTextDocumentLayout__PaintContext constructs a new QAbstractTextDocumentLayout::PaintContext object. func NewQAbstractTextDocumentLayout__PaintContext() *QAbstractTextDocumentLayout__PaintContext { - var outptr_QAbstractTextDocumentLayout__PaintContext *C.QAbstractTextDocumentLayout__PaintContext = nil - C.QAbstractTextDocumentLayout__PaintContext_new(&outptr_QAbstractTextDocumentLayout__PaintContext) - ret := newQAbstractTextDocumentLayout__PaintContext(outptr_QAbstractTextDocumentLayout__PaintContext) + ret := newQAbstractTextDocumentLayout__PaintContext(C.QAbstractTextDocumentLayout__PaintContext_new()) ret.isSubclass = true return ret } // NewQAbstractTextDocumentLayout__PaintContext2 constructs a new QAbstractTextDocumentLayout::PaintContext object. func NewQAbstractTextDocumentLayout__PaintContext2(param1 *QAbstractTextDocumentLayout__PaintContext) *QAbstractTextDocumentLayout__PaintContext { - var outptr_QAbstractTextDocumentLayout__PaintContext *C.QAbstractTextDocumentLayout__PaintContext = nil - C.QAbstractTextDocumentLayout__PaintContext_new2(param1.cPointer(), &outptr_QAbstractTextDocumentLayout__PaintContext) - ret := newQAbstractTextDocumentLayout__PaintContext(outptr_QAbstractTextDocumentLayout__PaintContext) + ret := newQAbstractTextDocumentLayout__PaintContext(C.QAbstractTextDocumentLayout__PaintContext_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qabstracttextdocumentlayout.h b/qt/gen_qabstracttextdocumentlayout.h index 24414f5d..318649d6 100644 --- a/qt/gen_qabstracttextdocumentlayout.h +++ b/qt/gen_qabstracttextdocumentlayout.h @@ -66,7 +66,8 @@ typedef struct QTextObjectInterface QTextObjectInterface; typedef struct QTimerEvent QTimerEvent; #endif -void QAbstractTextDocumentLayout_new(QTextDocument* doc, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject); +QAbstractTextDocumentLayout* QAbstractTextDocumentLayout_new(QTextDocument* doc); +void QAbstractTextDocumentLayout_virtbase(QAbstractTextDocumentLayout* src, QObject** outptr_QObject); QMetaObject* QAbstractTextDocumentLayout_MetaObject(const QAbstractTextDocumentLayout* self); void* QAbstractTextDocumentLayout_Metacast(QAbstractTextDocumentLayout* self, const char* param1); struct miqt_string QAbstractTextDocumentLayout_Tr(const char* s); @@ -147,12 +148,12 @@ void QTextObjectInterface_DrawObject(QTextObjectInterface* self, QPainter* paint void QTextObjectInterface_OperatorAssign(QTextObjectInterface* self, QTextObjectInterface* param1); void QTextObjectInterface_Delete(QTextObjectInterface* self, bool isSubclass); -void QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1, QAbstractTextDocumentLayout__Selection** outptr_QAbstractTextDocumentLayout__Selection); +QAbstractTextDocumentLayout__Selection* QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1); void QAbstractTextDocumentLayout__Selection_OperatorAssign(QAbstractTextDocumentLayout__Selection* self, QAbstractTextDocumentLayout__Selection* param1); void QAbstractTextDocumentLayout__Selection_Delete(QAbstractTextDocumentLayout__Selection* self, bool isSubclass); -void QAbstractTextDocumentLayout__PaintContext_new(QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext); -void QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1, QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext); +QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new(); +QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1); void QAbstractTextDocumentLayout__PaintContext_OperatorAssign(QAbstractTextDocumentLayout__PaintContext* self, QAbstractTextDocumentLayout__PaintContext* param1); void QAbstractTextDocumentLayout__PaintContext_Delete(QAbstractTextDocumentLayout__PaintContext* self, bool isSubclass); diff --git a/qt/gen_qabstracttransition.cpp b/qt/gen_qabstracttransition.cpp index 3782c82c..8b5f5ffa 100644 --- a/qt/gen_qabstracttransition.cpp +++ b/qt/gen_qabstracttransition.cpp @@ -230,16 +230,16 @@ public: }; -void QAbstractTransition_new(QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQAbstractTransition* ret = new MiqtVirtualQAbstractTransition(); - *outptr_QAbstractTransition = ret; - *outptr_QObject = static_cast(ret); +QAbstractTransition* QAbstractTransition_new() { + return new MiqtVirtualQAbstractTransition(); } -void QAbstractTransition_new2(QState* sourceState, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQAbstractTransition* ret = new MiqtVirtualQAbstractTransition(sourceState); - *outptr_QAbstractTransition = ret; - *outptr_QObject = static_cast(ret); +QAbstractTransition* QAbstractTransition_new2(QState* sourceState) { + return new MiqtVirtualQAbstractTransition(sourceState); +} + +void QAbstractTransition_virtbase(QAbstractTransition* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAbstractTransition_MetaObject(const QAbstractTransition* self) { diff --git a/qt/gen_qabstracttransition.go b/qt/gen_qabstracttransition.go index e7655ce1..690da440 100644 --- a/qt/gen_qabstracttransition.go +++ b/qt/gen_qabstracttransition.go @@ -42,42 +42,34 @@ func (this *QAbstractTransition) UnsafePointer() unsafe.Pointer { } // newQAbstractTransition constructs the type using only CGO pointers. -func newQAbstractTransition(h *C.QAbstractTransition, h_QObject *C.QObject) *QAbstractTransition { +func newQAbstractTransition(h *C.QAbstractTransition) *QAbstractTransition { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractTransition_virtbase(h, &outptr_QObject) + return &QAbstractTransition{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAbstractTransition constructs the type using only unsafe pointers. -func UnsafeNewQAbstractTransition(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractTransition { - if h == nil { - return nil - } - - return &QAbstractTransition{h: (*C.QAbstractTransition)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractTransition(h unsafe.Pointer) *QAbstractTransition { + return newQAbstractTransition((*C.QAbstractTransition)(h)) } // NewQAbstractTransition constructs a new QAbstractTransition object. func NewQAbstractTransition() *QAbstractTransition { - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QAbstractTransition_new(&outptr_QAbstractTransition, &outptr_QObject) - ret := newQAbstractTransition(outptr_QAbstractTransition, outptr_QObject) + ret := newQAbstractTransition(C.QAbstractTransition_new()) ret.isSubclass = true return ret } // NewQAbstractTransition2 constructs a new QAbstractTransition object. func NewQAbstractTransition2(sourceState *QState) *QAbstractTransition { - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QAbstractTransition_new2(sourceState.cPointer(), &outptr_QAbstractTransition, &outptr_QObject) - ret := newQAbstractTransition(outptr_QAbstractTransition, outptr_QObject) + ret := newQAbstractTransition(C.QAbstractTransition_new2(sourceState.cPointer())) ret.isSubclass = true return ret } @@ -111,11 +103,11 @@ func QAbstractTransition_TrUtf8(s string) string { } func (this *QAbstractTransition) SourceState() *QState { - return newQState(C.QAbstractTransition_SourceState(this.h), nil, nil) + return newQState(C.QAbstractTransition_SourceState(this.h)) } func (this *QAbstractTransition) TargetState() *QAbstractState { - return newQAbstractState(C.QAbstractTransition_TargetState(this.h), nil) + return newQAbstractState(C.QAbstractTransition_TargetState(this.h)) } func (this *QAbstractTransition) SetTargetState(target *QAbstractState) { @@ -127,7 +119,7 @@ func (this *QAbstractTransition) TargetStates() []*QAbstractState { _ret := make([]*QAbstractState, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractState)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAbstractState(_outCast[i], nil) + _ret[i] = newQAbstractState(_outCast[i]) } return _ret } @@ -151,7 +143,7 @@ func (this *QAbstractTransition) SetTransitionType(typeVal QAbstractTransition__ } func (this *QAbstractTransition) Machine() *QStateMachine { - return newQStateMachine(C.QAbstractTransition_Machine(this.h), nil, nil, nil) + return newQStateMachine(C.QAbstractTransition_Machine(this.h)) } func (this *QAbstractTransition) AddAnimation(animation *QAbstractAnimation) { @@ -167,7 +159,7 @@ func (this *QAbstractTransition) Animations() []*QAbstractAnimation { _ret := make([]*QAbstractAnimation, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractAnimation)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAbstractAnimation(_outCast[i], nil) + _ret[i] = newQAbstractAnimation(_outCast[i]) } return _ret } @@ -336,7 +328,7 @@ func miqt_exec_callback_QAbstractTransition_TimerEvent(self *C.QAbstractTransiti } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAbstractTransition{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -362,7 +354,7 @@ func miqt_exec_callback_QAbstractTransition_ChildEvent(self *C.QAbstractTransiti } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAbstractTransition{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qabstracttransition.h b/qt/gen_qabstracttransition.h index 552c9329..fa00b55e 100644 --- a/qt/gen_qabstracttransition.h +++ b/qt/gen_qabstracttransition.h @@ -40,8 +40,9 @@ typedef struct QStateMachine QStateMachine; typedef struct QTimerEvent QTimerEvent; #endif -void QAbstractTransition_new(QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); -void QAbstractTransition_new2(QState* sourceState, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +QAbstractTransition* QAbstractTransition_new(); +QAbstractTransition* QAbstractTransition_new2(QState* sourceState); +void QAbstractTransition_virtbase(QAbstractTransition* src, QObject** outptr_QObject); QMetaObject* QAbstractTransition_MetaObject(const QAbstractTransition* self); void* QAbstractTransition_Metacast(QAbstractTransition* self, const char* param1); struct miqt_string QAbstractTransition_Tr(const char* s); diff --git a/qt/gen_qaccessible.cpp b/qt/gen_qaccessible.cpp index ad33294f..ccbbc6af 100644 --- a/qt/gen_qaccessible.cpp +++ b/qt/gen_qaccessible.cpp @@ -943,14 +943,12 @@ public: }; -void QAccessibleEvent_new(QObject* obj, int typ, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleEvent* ret = new MiqtVirtualQAccessibleEvent(obj, static_cast(typ)); - *outptr_QAccessibleEvent = ret; +QAccessibleEvent* QAccessibleEvent_new(QObject* obj, int typ) { + return new MiqtVirtualQAccessibleEvent(obj, static_cast(typ)); } -void QAccessibleEvent_new2(QAccessibleInterface* iface, int typ, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleEvent* ret = new MiqtVirtualQAccessibleEvent(iface, static_cast(typ)); - *outptr_QAccessibleEvent = ret; +QAccessibleEvent* QAccessibleEvent_new2(QAccessibleInterface* iface, int typ) { + return new MiqtVirtualQAccessibleEvent(iface, static_cast(typ)); } int QAccessibleEvent_Type(const QAccessibleEvent* self) { @@ -1027,16 +1025,16 @@ public: }; -void QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleStateChangeEvent* ret = new MiqtVirtualQAccessibleStateChangeEvent(obj, *state); - *outptr_QAccessibleStateChangeEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state) { + return new MiqtVirtualQAccessibleStateChangeEvent(obj, *state); } -void QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleStateChangeEvent* ret = new MiqtVirtualQAccessibleStateChangeEvent(iface, *state); - *outptr_QAccessibleStateChangeEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state) { + return new MiqtVirtualQAccessibleStateChangeEvent(iface, *state); +} + +void QAccessibleStateChangeEvent_virtbase(QAccessibleStateChangeEvent* src, QAccessibleEvent** outptr_QAccessibleEvent) { + *outptr_QAccessibleEvent = static_cast(src); } QAccessible__State* QAccessibleStateChangeEvent_ChangedStates(const QAccessibleStateChangeEvent* self) { @@ -1091,16 +1089,16 @@ public: }; -void QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleTextCursorEvent* ret = new MiqtVirtualQAccessibleTextCursorEvent(obj, static_cast(cursorPos)); - *outptr_QAccessibleTextCursorEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos) { + return new MiqtVirtualQAccessibleTextCursorEvent(obj, static_cast(cursorPos)); } -void QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleTextCursorEvent* ret = new MiqtVirtualQAccessibleTextCursorEvent(iface, static_cast(cursorPos)); - *outptr_QAccessibleTextCursorEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos) { + return new MiqtVirtualQAccessibleTextCursorEvent(iface, static_cast(cursorPos)); +} + +void QAccessibleTextCursorEvent_virtbase(QAccessibleTextCursorEvent* src, QAccessibleEvent** outptr_QAccessibleEvent) { + *outptr_QAccessibleEvent = static_cast(src); } void QAccessibleTextCursorEvent_SetCursorPosition(QAccessibleTextCursorEvent* self, int position) { @@ -1127,18 +1125,16 @@ void QAccessibleTextCursorEvent_Delete(QAccessibleTextCursorEvent* self, bool is } } -void QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - QAccessibleTextSelectionEvent* ret = new QAccessibleTextSelectionEvent(obj, static_cast(start), static_cast(end)); - *outptr_QAccessibleTextSelectionEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end) { + return new QAccessibleTextSelectionEvent(obj, static_cast(start), static_cast(end)); } -void QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - QAccessibleTextSelectionEvent* ret = new QAccessibleTextSelectionEvent(iface, static_cast(start), static_cast(end)); - *outptr_QAccessibleTextSelectionEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end) { + return new QAccessibleTextSelectionEvent(iface, static_cast(start), static_cast(end)); +} + +void QAccessibleTextSelectionEvent_virtbase(QAccessibleTextSelectionEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent) { + *outptr_QAccessibleTextCursorEvent = static_cast(src); } void QAccessibleTextSelectionEvent_SetSelection(QAccessibleTextSelectionEvent* self, int start, int end) { @@ -1161,20 +1157,18 @@ void QAccessibleTextSelectionEvent_Delete(QAccessibleTextSelectionEvent* self, b } } -void QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { +QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - QAccessibleTextInsertEvent* ret = new QAccessibleTextInsertEvent(obj, static_cast(position), text_QString); - *outptr_QAccessibleTextInsertEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); + return new QAccessibleTextInsertEvent(obj, static_cast(position), text_QString); } -void QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { +QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - QAccessibleTextInsertEvent* ret = new QAccessibleTextInsertEvent(iface, static_cast(position), text_QString); - *outptr_QAccessibleTextInsertEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); + return new QAccessibleTextInsertEvent(iface, static_cast(position), text_QString); +} + +void QAccessibleTextInsertEvent_virtbase(QAccessibleTextInsertEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent) { + *outptr_QAccessibleTextCursorEvent = static_cast(src); } struct miqt_string QAccessibleTextInsertEvent_TextInserted(const QAccessibleTextInsertEvent* self) { @@ -1200,20 +1194,18 @@ void QAccessibleTextInsertEvent_Delete(QAccessibleTextInsertEvent* self, bool is } } -void QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { +QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - QAccessibleTextRemoveEvent* ret = new QAccessibleTextRemoveEvent(obj, static_cast(position), text_QString); - *outptr_QAccessibleTextRemoveEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); + return new QAccessibleTextRemoveEvent(obj, static_cast(position), text_QString); } -void QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { +QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - QAccessibleTextRemoveEvent* ret = new QAccessibleTextRemoveEvent(iface, static_cast(position), text_QString); - *outptr_QAccessibleTextRemoveEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); + return new QAccessibleTextRemoveEvent(iface, static_cast(position), text_QString); +} + +void QAccessibleTextRemoveEvent_virtbase(QAccessibleTextRemoveEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent) { + *outptr_QAccessibleTextCursorEvent = static_cast(src); } struct miqt_string QAccessibleTextRemoveEvent_TextRemoved(const QAccessibleTextRemoveEvent* self) { @@ -1239,22 +1231,20 @@ void QAccessibleTextRemoveEvent_Delete(QAccessibleTextRemoveEvent* self, bool is } } -void QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { +QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text) { QString oldText_QString = QString::fromUtf8(oldText.data, oldText.len); QString text_QString = QString::fromUtf8(text.data, text.len); - QAccessibleTextUpdateEvent* ret = new QAccessibleTextUpdateEvent(obj, static_cast(position), oldText_QString, text_QString); - *outptr_QAccessibleTextUpdateEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); + return new QAccessibleTextUpdateEvent(obj, static_cast(position), oldText_QString, text_QString); } -void QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { +QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text) { QString oldText_QString = QString::fromUtf8(oldText.data, oldText.len); QString text_QString = QString::fromUtf8(text.data, text.len); - QAccessibleTextUpdateEvent* ret = new QAccessibleTextUpdateEvent(iface, static_cast(position), oldText_QString, text_QString); - *outptr_QAccessibleTextUpdateEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); + return new QAccessibleTextUpdateEvent(iface, static_cast(position), oldText_QString, text_QString); +} + +void QAccessibleTextUpdateEvent_virtbase(QAccessibleTextUpdateEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent) { + *outptr_QAccessibleTextCursorEvent = static_cast(src); } struct miqt_string QAccessibleTextUpdateEvent_TextRemoved(const QAccessibleTextUpdateEvent* self) { @@ -1323,16 +1313,16 @@ public: }; -void QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleValueChangeEvent* ret = new MiqtVirtualQAccessibleValueChangeEvent(obj, *val); - *outptr_QAccessibleValueChangeEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val) { + return new MiqtVirtualQAccessibleValueChangeEvent(obj, *val); } -void QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleValueChangeEvent* ret = new MiqtVirtualQAccessibleValueChangeEvent(iface, *val); - *outptr_QAccessibleValueChangeEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val) { + return new MiqtVirtualQAccessibleValueChangeEvent(iface, *val); +} + +void QAccessibleValueChangeEvent_virtbase(QAccessibleValueChangeEvent* src, QAccessibleEvent** outptr_QAccessibleEvent) { + *outptr_QAccessibleEvent = static_cast(src); } void QAccessibleValueChangeEvent_SetValue(QAccessibleValueChangeEvent* self, QVariant* val) { @@ -1391,16 +1381,16 @@ public: }; -void QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleTableModelChangeEvent* ret = new MiqtVirtualQAccessibleTableModelChangeEvent(obj, static_cast(changeType)); - *outptr_QAccessibleTableModelChangeEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType) { + return new MiqtVirtualQAccessibleTableModelChangeEvent(obj, static_cast(changeType)); } -void QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleTableModelChangeEvent* ret = new MiqtVirtualQAccessibleTableModelChangeEvent(iface, static_cast(changeType)); - *outptr_QAccessibleTableModelChangeEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType) { + return new MiqtVirtualQAccessibleTableModelChangeEvent(iface, static_cast(changeType)); +} + +void QAccessibleTableModelChangeEvent_virtbase(QAccessibleTableModelChangeEvent* src, QAccessibleEvent** outptr_QAccessibleEvent) { + *outptr_QAccessibleEvent = static_cast(src); } void QAccessibleTableModelChangeEvent_SetModelChangeType(QAccessibleTableModelChangeEvent* self, int changeType) { @@ -1460,14 +1450,12 @@ void QAccessibleTableModelChangeEvent_Delete(QAccessibleTableModelChangeEvent* s } } -void QAccessible__State_new(QAccessible__State** outptr_QAccessible__State) { - QAccessible::State* ret = new QAccessible::State(); - *outptr_QAccessible__State = ret; +QAccessible__State* QAccessible__State_new() { + return new QAccessible::State(); } -void QAccessible__State_new2(QAccessible__State* param1, QAccessible__State** outptr_QAccessible__State) { - QAccessible::State* ret = new QAccessible::State(*param1); - *outptr_QAccessible__State = ret; +QAccessible__State* QAccessible__State_new2(QAccessible__State* param1) { + return new QAccessible::State(*param1); } void QAccessible__State_Delete(QAccessible__State* self, bool isSubclass) { diff --git a/qt/gen_qaccessible.go b/qt/gen_qaccessible.go index 5c6b052a..a77c40e3 100644 --- a/qt/gen_qaccessible.go +++ b/qt/gen_qaccessible.go @@ -250,16 +250,13 @@ func newQAccessible(h *C.QAccessible) *QAccessible { if h == nil { return nil } + return &QAccessible{h: h} } // UnsafeNewQAccessible constructs the type using only unsafe pointers. func UnsafeNewQAccessible(h unsafe.Pointer) *QAccessible { - if h == nil { - return nil - } - - return &QAccessible{h: (*C.QAccessible)(h)} + return newQAccessible((*C.QAccessible)(h)) } func QAccessible_InstallActivationObserver(param1 *QAccessible__ActivationObserver) { @@ -365,16 +362,13 @@ func newQAccessibleInterface(h *C.QAccessibleInterface) *QAccessibleInterface { if h == nil { return nil } + return &QAccessibleInterface{h: h} } // UnsafeNewQAccessibleInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleInterface(h unsafe.Pointer) *QAccessibleInterface { - if h == nil { - return nil - } - - return &QAccessibleInterface{h: (*C.QAccessibleInterface)(h)} + return newQAccessibleInterface((*C.QAccessibleInterface)(h)) } func (this *QAccessibleInterface) IsValid() bool { @@ -386,7 +380,7 @@ func (this *QAccessibleInterface) Object() *QObject { } func (this *QAccessibleInterface) Window() *QWindow { - return newQWindow(C.QAccessibleInterface_Window(this.h), nil, nil) + return newQWindow(C.QAccessibleInterface_Window(this.h)) } func (this *QAccessibleInterface) Relations(match QAccessible__RelationFlag) []struct { @@ -542,16 +536,13 @@ func newQAccessibleTextInterface(h *C.QAccessibleTextInterface) *QAccessibleText if h == nil { return nil } + return &QAccessibleTextInterface{h: h} } // UnsafeNewQAccessibleTextInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleTextInterface(h unsafe.Pointer) *QAccessibleTextInterface { - if h == nil { - return nil - } - - return &QAccessibleTextInterface{h: (*C.QAccessibleTextInterface)(h)} + return newQAccessibleTextInterface((*C.QAccessibleTextInterface)(h)) } func (this *QAccessibleTextInterface) Selection(selectionIndex int, startOffset *int, endOffset *int) { @@ -677,16 +668,13 @@ func newQAccessibleEditableTextInterface(h *C.QAccessibleEditableTextInterface) if h == nil { return nil } + return &QAccessibleEditableTextInterface{h: h} } // UnsafeNewQAccessibleEditableTextInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleEditableTextInterface(h unsafe.Pointer) *QAccessibleEditableTextInterface { - if h == nil { - return nil - } - - return &QAccessibleEditableTextInterface{h: (*C.QAccessibleEditableTextInterface)(h)} + return newQAccessibleEditableTextInterface((*C.QAccessibleEditableTextInterface)(h)) } func (this *QAccessibleEditableTextInterface) DeleteText(startOffset int, endOffset int) { @@ -751,16 +739,13 @@ func newQAccessibleValueInterface(h *C.QAccessibleValueInterface) *QAccessibleVa if h == nil { return nil } + return &QAccessibleValueInterface{h: h} } // UnsafeNewQAccessibleValueInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleValueInterface(h unsafe.Pointer) *QAccessibleValueInterface { - if h == nil { - return nil - } - - return &QAccessibleValueInterface{h: (*C.QAccessibleValueInterface)(h)} + return newQAccessibleValueInterface((*C.QAccessibleValueInterface)(h)) } func (this *QAccessibleValueInterface) CurrentValue() *QVariant { @@ -833,16 +818,13 @@ func newQAccessibleTableCellInterface(h *C.QAccessibleTableCellInterface) *QAcce if h == nil { return nil } + return &QAccessibleTableCellInterface{h: h} } // UnsafeNewQAccessibleTableCellInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleTableCellInterface(h unsafe.Pointer) *QAccessibleTableCellInterface { - if h == nil { - return nil - } - - return &QAccessibleTableCellInterface{h: (*C.QAccessibleTableCellInterface)(h)} + return newQAccessibleTableCellInterface((*C.QAccessibleTableCellInterface)(h)) } func (this *QAccessibleTableCellInterface) IsSelected() bool { @@ -931,16 +913,13 @@ func newQAccessibleTableInterface(h *C.QAccessibleTableInterface) *QAccessibleTa if h == nil { return nil } + return &QAccessibleTableInterface{h: h} } // UnsafeNewQAccessibleTableInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleTableInterface(h unsafe.Pointer) *QAccessibleTableInterface { - if h == nil { - return nil - } - - return &QAccessibleTableInterface{h: (*C.QAccessibleTableInterface)(h)} + return newQAccessibleTableInterface((*C.QAccessibleTableInterface)(h)) } func (this *QAccessibleTableInterface) Caption() *QAccessibleInterface { @@ -1085,16 +1064,13 @@ func newQAccessibleActionInterface(h *C.QAccessibleActionInterface) *QAccessible if h == nil { return nil } + return &QAccessibleActionInterface{h: h} } // UnsafeNewQAccessibleActionInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleActionInterface(h unsafe.Pointer) *QAccessibleActionInterface { - if h == nil { - return nil - } - - return &QAccessibleActionInterface{h: (*C.QAccessibleActionInterface)(h)} + return newQAccessibleActionInterface((*C.QAccessibleActionInterface)(h)) } func QAccessibleActionInterface_Tr(sourceText string) string { @@ -1345,16 +1321,13 @@ func newQAccessibleImageInterface(h *C.QAccessibleImageInterface) *QAccessibleIm if h == nil { return nil } + return &QAccessibleImageInterface{h: h} } // UnsafeNewQAccessibleImageInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleImageInterface(h unsafe.Pointer) *QAccessibleImageInterface { - if h == nil { - return nil - } - - return &QAccessibleImageInterface{h: (*C.QAccessibleImageInterface)(h)} + return newQAccessibleImageInterface((*C.QAccessibleImageInterface)(h)) } func (this *QAccessibleImageInterface) ImageDescription() string { @@ -1418,34 +1391,27 @@ func newQAccessibleEvent(h *C.QAccessibleEvent) *QAccessibleEvent { if h == nil { return nil } + return &QAccessibleEvent{h: h} } // UnsafeNewQAccessibleEvent constructs the type using only unsafe pointers. func UnsafeNewQAccessibleEvent(h unsafe.Pointer) *QAccessibleEvent { - if h == nil { - return nil - } - - return &QAccessibleEvent{h: (*C.QAccessibleEvent)(h)} + return newQAccessibleEvent((*C.QAccessibleEvent)(h)) } // NewQAccessibleEvent constructs a new QAccessibleEvent object. func NewQAccessibleEvent(obj *QObject, typ QAccessible__Event) *QAccessibleEvent { - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleEvent_new(obj.cPointer(), (C.int)(typ), &outptr_QAccessibleEvent) - ret := newQAccessibleEvent(outptr_QAccessibleEvent) + ret := newQAccessibleEvent(C.QAccessibleEvent_new(obj.cPointer(), (C.int)(typ))) ret.isSubclass = true return ret } // NewQAccessibleEvent2 constructs a new QAccessibleEvent object. func NewQAccessibleEvent2(iface *QAccessibleInterface, typ QAccessible__Event) *QAccessibleEvent { - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleEvent_new2(iface.cPointer(), (C.int)(typ), &outptr_QAccessibleEvent) - ret := newQAccessibleEvent(outptr_QAccessibleEvent) + ret := newQAccessibleEvent(C.QAccessibleEvent_new2(iface.cPointer(), (C.int)(typ))) ret.isSubclass = true return ret } @@ -1534,42 +1500,34 @@ func (this *QAccessibleStateChangeEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleStateChangeEvent constructs the type using only CGO pointers. -func newQAccessibleStateChangeEvent(h *C.QAccessibleStateChangeEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleStateChangeEvent { +func newQAccessibleStateChangeEvent(h *C.QAccessibleStateChangeEvent) *QAccessibleStateChangeEvent { if h == nil { return nil } + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + C.QAccessibleStateChangeEvent_virtbase(h, &outptr_QAccessibleEvent) + return &QAccessibleStateChangeEvent{h: h, - QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} + QAccessibleEvent: newQAccessibleEvent(outptr_QAccessibleEvent)} } // UnsafeNewQAccessibleStateChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleStateChangeEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleStateChangeEvent { - if h == nil { - return nil - } - - return &QAccessibleStateChangeEvent{h: (*C.QAccessibleStateChangeEvent)(h), - QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} +func UnsafeNewQAccessibleStateChangeEvent(h unsafe.Pointer) *QAccessibleStateChangeEvent { + return newQAccessibleStateChangeEvent((*C.QAccessibleStateChangeEvent)(h)) } // NewQAccessibleStateChangeEvent constructs a new QAccessibleStateChangeEvent object. func NewQAccessibleStateChangeEvent(obj *QObject, state QAccessible__State) *QAccessibleStateChangeEvent { - var outptr_QAccessibleStateChangeEvent *C.QAccessibleStateChangeEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleStateChangeEvent_new(obj.cPointer(), state.cPointer(), &outptr_QAccessibleStateChangeEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleStateChangeEvent(outptr_QAccessibleStateChangeEvent, outptr_QAccessibleEvent) + ret := newQAccessibleStateChangeEvent(C.QAccessibleStateChangeEvent_new(obj.cPointer(), state.cPointer())) ret.isSubclass = true return ret } // NewQAccessibleStateChangeEvent2 constructs a new QAccessibleStateChangeEvent object. func NewQAccessibleStateChangeEvent2(iface *QAccessibleInterface, state QAccessible__State) *QAccessibleStateChangeEvent { - var outptr_QAccessibleStateChangeEvent *C.QAccessibleStateChangeEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleStateChangeEvent_new2(iface.cPointer(), state.cPointer(), &outptr_QAccessibleStateChangeEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleStateChangeEvent(outptr_QAccessibleStateChangeEvent, outptr_QAccessibleEvent) + ret := newQAccessibleStateChangeEvent(C.QAccessibleStateChangeEvent_new2(iface.cPointer(), state.cPointer())) ret.isSubclass = true return ret } @@ -1640,42 +1598,34 @@ func (this *QAccessibleTextCursorEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleTextCursorEvent constructs the type using only CGO pointers. -func newQAccessibleTextCursorEvent(h *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextCursorEvent { +func newQAccessibleTextCursorEvent(h *C.QAccessibleTextCursorEvent) *QAccessibleTextCursorEvent { if h == nil { return nil } + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + C.QAccessibleTextCursorEvent_virtbase(h, &outptr_QAccessibleEvent) + return &QAccessibleTextCursorEvent{h: h, - QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} + QAccessibleEvent: newQAccessibleEvent(outptr_QAccessibleEvent)} } // UnsafeNewQAccessibleTextCursorEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleTextCursorEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextCursorEvent { - if h == nil { - return nil - } - - return &QAccessibleTextCursorEvent{h: (*C.QAccessibleTextCursorEvent)(h), - QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} +func UnsafeNewQAccessibleTextCursorEvent(h unsafe.Pointer) *QAccessibleTextCursorEvent { + return newQAccessibleTextCursorEvent((*C.QAccessibleTextCursorEvent)(h)) } // NewQAccessibleTextCursorEvent constructs a new QAccessibleTextCursorEvent object. func NewQAccessibleTextCursorEvent(obj *QObject, cursorPos int) *QAccessibleTextCursorEvent { - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextCursorEvent_new(obj.cPointer(), (C.int)(cursorPos), &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextCursorEvent(C.QAccessibleTextCursorEvent_new(obj.cPointer(), (C.int)(cursorPos))) ret.isSubclass = true return ret } // NewQAccessibleTextCursorEvent2 constructs a new QAccessibleTextCursorEvent object. func NewQAccessibleTextCursorEvent2(iface *QAccessibleInterface, cursorPos int) *QAccessibleTextCursorEvent { - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextCursorEvent_new2(iface.cPointer(), (C.int)(cursorPos), &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextCursorEvent(C.QAccessibleTextCursorEvent_new2(iface.cPointer(), (C.int)(cursorPos))) ret.isSubclass = true return ret } @@ -1748,44 +1698,34 @@ func (this *QAccessibleTextSelectionEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleTextSelectionEvent constructs the type using only CGO pointers. -func newQAccessibleTextSelectionEvent(h *C.QAccessibleTextSelectionEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextSelectionEvent { +func newQAccessibleTextSelectionEvent(h *C.QAccessibleTextSelectionEvent) *QAccessibleTextSelectionEvent { if h == nil { return nil } + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + C.QAccessibleTextSelectionEvent_virtbase(h, &outptr_QAccessibleTextCursorEvent) + return &QAccessibleTextSelectionEvent{h: h, - QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent)} } // UnsafeNewQAccessibleTextSelectionEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleTextSelectionEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextSelectionEvent { - if h == nil { - return nil - } - - return &QAccessibleTextSelectionEvent{h: (*C.QAccessibleTextSelectionEvent)(h), - QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} +func UnsafeNewQAccessibleTextSelectionEvent(h unsafe.Pointer) *QAccessibleTextSelectionEvent { + return newQAccessibleTextSelectionEvent((*C.QAccessibleTextSelectionEvent)(h)) } // NewQAccessibleTextSelectionEvent constructs a new QAccessibleTextSelectionEvent object. func NewQAccessibleTextSelectionEvent(obj *QObject, start int, end int) *QAccessibleTextSelectionEvent { - var outptr_QAccessibleTextSelectionEvent *C.QAccessibleTextSelectionEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextSelectionEvent_new(obj.cPointer(), (C.int)(start), (C.int)(end), &outptr_QAccessibleTextSelectionEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextSelectionEvent(outptr_QAccessibleTextSelectionEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextSelectionEvent(C.QAccessibleTextSelectionEvent_new(obj.cPointer(), (C.int)(start), (C.int)(end))) ret.isSubclass = true return ret } // NewQAccessibleTextSelectionEvent2 constructs a new QAccessibleTextSelectionEvent object. func NewQAccessibleTextSelectionEvent2(iface *QAccessibleInterface, start int, end int) *QAccessibleTextSelectionEvent { - var outptr_QAccessibleTextSelectionEvent *C.QAccessibleTextSelectionEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextSelectionEvent_new2(iface.cPointer(), (C.int)(start), (C.int)(end), &outptr_QAccessibleTextSelectionEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextSelectionEvent(outptr_QAccessibleTextSelectionEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextSelectionEvent(C.QAccessibleTextSelectionEvent_new2(iface.cPointer(), (C.int)(start), (C.int)(end))) ret.isSubclass = true return ret } @@ -1837,22 +1777,20 @@ func (this *QAccessibleTextInsertEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleTextInsertEvent constructs the type using only CGO pointers. -func newQAccessibleTextInsertEvent(h *C.QAccessibleTextInsertEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextInsertEvent { +func newQAccessibleTextInsertEvent(h *C.QAccessibleTextInsertEvent) *QAccessibleTextInsertEvent { if h == nil { return nil } + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + C.QAccessibleTextInsertEvent_virtbase(h, &outptr_QAccessibleTextCursorEvent) + return &QAccessibleTextInsertEvent{h: h, - QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent)} } // UnsafeNewQAccessibleTextInsertEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleTextInsertEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextInsertEvent { - if h == nil { - return nil - } - - return &QAccessibleTextInsertEvent{h: (*C.QAccessibleTextInsertEvent)(h), - QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} +func UnsafeNewQAccessibleTextInsertEvent(h unsafe.Pointer) *QAccessibleTextInsertEvent { + return newQAccessibleTextInsertEvent((*C.QAccessibleTextInsertEvent)(h)) } // NewQAccessibleTextInsertEvent constructs a new QAccessibleTextInsertEvent object. @@ -1861,12 +1799,8 @@ func NewQAccessibleTextInsertEvent(obj *QObject, position int, text string) *QAc text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAccessibleTextInsertEvent *C.QAccessibleTextInsertEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextInsertEvent_new(obj.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextInsertEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextInsertEvent(outptr_QAccessibleTextInsertEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextInsertEvent(C.QAccessibleTextInsertEvent_new(obj.cPointer(), (C.int)(position), text_ms)) ret.isSubclass = true return ret } @@ -1877,12 +1811,8 @@ func NewQAccessibleTextInsertEvent2(iface *QAccessibleInterface, position int, t text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAccessibleTextInsertEvent *C.QAccessibleTextInsertEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextInsertEvent_new2(iface.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextInsertEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextInsertEvent(outptr_QAccessibleTextInsertEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextInsertEvent(C.QAccessibleTextInsertEvent_new2(iface.cPointer(), (C.int)(position), text_ms)) ret.isSubclass = true return ret } @@ -1933,22 +1863,20 @@ func (this *QAccessibleTextRemoveEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleTextRemoveEvent constructs the type using only CGO pointers. -func newQAccessibleTextRemoveEvent(h *C.QAccessibleTextRemoveEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextRemoveEvent { +func newQAccessibleTextRemoveEvent(h *C.QAccessibleTextRemoveEvent) *QAccessibleTextRemoveEvent { if h == nil { return nil } + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + C.QAccessibleTextRemoveEvent_virtbase(h, &outptr_QAccessibleTextCursorEvent) + return &QAccessibleTextRemoveEvent{h: h, - QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent)} } // UnsafeNewQAccessibleTextRemoveEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleTextRemoveEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextRemoveEvent { - if h == nil { - return nil - } - - return &QAccessibleTextRemoveEvent{h: (*C.QAccessibleTextRemoveEvent)(h), - QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} +func UnsafeNewQAccessibleTextRemoveEvent(h unsafe.Pointer) *QAccessibleTextRemoveEvent { + return newQAccessibleTextRemoveEvent((*C.QAccessibleTextRemoveEvent)(h)) } // NewQAccessibleTextRemoveEvent constructs a new QAccessibleTextRemoveEvent object. @@ -1957,12 +1885,8 @@ func NewQAccessibleTextRemoveEvent(obj *QObject, position int, text string) *QAc text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAccessibleTextRemoveEvent *C.QAccessibleTextRemoveEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextRemoveEvent_new(obj.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextRemoveEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextRemoveEvent(outptr_QAccessibleTextRemoveEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextRemoveEvent(C.QAccessibleTextRemoveEvent_new(obj.cPointer(), (C.int)(position), text_ms)) ret.isSubclass = true return ret } @@ -1973,12 +1897,8 @@ func NewQAccessibleTextRemoveEvent2(iface *QAccessibleInterface, position int, t text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAccessibleTextRemoveEvent *C.QAccessibleTextRemoveEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextRemoveEvent_new2(iface.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextRemoveEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextRemoveEvent(outptr_QAccessibleTextRemoveEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextRemoveEvent(C.QAccessibleTextRemoveEvent_new2(iface.cPointer(), (C.int)(position), text_ms)) ret.isSubclass = true return ret } @@ -2029,22 +1949,20 @@ func (this *QAccessibleTextUpdateEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleTextUpdateEvent constructs the type using only CGO pointers. -func newQAccessibleTextUpdateEvent(h *C.QAccessibleTextUpdateEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextUpdateEvent { +func newQAccessibleTextUpdateEvent(h *C.QAccessibleTextUpdateEvent) *QAccessibleTextUpdateEvent { if h == nil { return nil } + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + C.QAccessibleTextUpdateEvent_virtbase(h, &outptr_QAccessibleTextCursorEvent) + return &QAccessibleTextUpdateEvent{h: h, - QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent)} } // UnsafeNewQAccessibleTextUpdateEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleTextUpdateEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextUpdateEvent { - if h == nil { - return nil - } - - return &QAccessibleTextUpdateEvent{h: (*C.QAccessibleTextUpdateEvent)(h), - QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} +func UnsafeNewQAccessibleTextUpdateEvent(h unsafe.Pointer) *QAccessibleTextUpdateEvent { + return newQAccessibleTextUpdateEvent((*C.QAccessibleTextUpdateEvent)(h)) } // NewQAccessibleTextUpdateEvent constructs a new QAccessibleTextUpdateEvent object. @@ -2057,12 +1975,8 @@ func NewQAccessibleTextUpdateEvent(obj *QObject, position int, oldText string, t text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAccessibleTextUpdateEvent *C.QAccessibleTextUpdateEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextUpdateEvent_new(obj.cPointer(), (C.int)(position), oldText_ms, text_ms, &outptr_QAccessibleTextUpdateEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextUpdateEvent(outptr_QAccessibleTextUpdateEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextUpdateEvent(C.QAccessibleTextUpdateEvent_new(obj.cPointer(), (C.int)(position), oldText_ms, text_ms)) ret.isSubclass = true return ret } @@ -2077,12 +1991,8 @@ func NewQAccessibleTextUpdateEvent2(iface *QAccessibleInterface, position int, o text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAccessibleTextUpdateEvent *C.QAccessibleTextUpdateEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextUpdateEvent_new2(iface.cPointer(), (C.int)(position), oldText_ms, text_ms, &outptr_QAccessibleTextUpdateEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextUpdateEvent(outptr_QAccessibleTextUpdateEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextUpdateEvent(C.QAccessibleTextUpdateEvent_new2(iface.cPointer(), (C.int)(position), oldText_ms, text_ms)) ret.isSubclass = true return ret } @@ -2140,42 +2050,34 @@ func (this *QAccessibleValueChangeEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleValueChangeEvent constructs the type using only CGO pointers. -func newQAccessibleValueChangeEvent(h *C.QAccessibleValueChangeEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleValueChangeEvent { +func newQAccessibleValueChangeEvent(h *C.QAccessibleValueChangeEvent) *QAccessibleValueChangeEvent { if h == nil { return nil } + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + C.QAccessibleValueChangeEvent_virtbase(h, &outptr_QAccessibleEvent) + return &QAccessibleValueChangeEvent{h: h, - QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} + QAccessibleEvent: newQAccessibleEvent(outptr_QAccessibleEvent)} } // UnsafeNewQAccessibleValueChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleValueChangeEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleValueChangeEvent { - if h == nil { - return nil - } - - return &QAccessibleValueChangeEvent{h: (*C.QAccessibleValueChangeEvent)(h), - QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} +func UnsafeNewQAccessibleValueChangeEvent(h unsafe.Pointer) *QAccessibleValueChangeEvent { + return newQAccessibleValueChangeEvent((*C.QAccessibleValueChangeEvent)(h)) } // NewQAccessibleValueChangeEvent constructs a new QAccessibleValueChangeEvent object. func NewQAccessibleValueChangeEvent(obj *QObject, val *QVariant) *QAccessibleValueChangeEvent { - var outptr_QAccessibleValueChangeEvent *C.QAccessibleValueChangeEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleValueChangeEvent_new(obj.cPointer(), val.cPointer(), &outptr_QAccessibleValueChangeEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleValueChangeEvent(outptr_QAccessibleValueChangeEvent, outptr_QAccessibleEvent) + ret := newQAccessibleValueChangeEvent(C.QAccessibleValueChangeEvent_new(obj.cPointer(), val.cPointer())) ret.isSubclass = true return ret } // NewQAccessibleValueChangeEvent2 constructs a new QAccessibleValueChangeEvent object. func NewQAccessibleValueChangeEvent2(iface *QAccessibleInterface, val *QVariant) *QAccessibleValueChangeEvent { - var outptr_QAccessibleValueChangeEvent *C.QAccessibleValueChangeEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleValueChangeEvent_new2(iface.cPointer(), val.cPointer(), &outptr_QAccessibleValueChangeEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleValueChangeEvent(outptr_QAccessibleValueChangeEvent, outptr_QAccessibleEvent) + ret := newQAccessibleValueChangeEvent(C.QAccessibleValueChangeEvent_new2(iface.cPointer(), val.cPointer())) ret.isSubclass = true return ret } @@ -2250,42 +2152,34 @@ func (this *QAccessibleTableModelChangeEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleTableModelChangeEvent constructs the type using only CGO pointers. -func newQAccessibleTableModelChangeEvent(h *C.QAccessibleTableModelChangeEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTableModelChangeEvent { +func newQAccessibleTableModelChangeEvent(h *C.QAccessibleTableModelChangeEvent) *QAccessibleTableModelChangeEvent { if h == nil { return nil } + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + C.QAccessibleTableModelChangeEvent_virtbase(h, &outptr_QAccessibleEvent) + return &QAccessibleTableModelChangeEvent{h: h, - QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} + QAccessibleEvent: newQAccessibleEvent(outptr_QAccessibleEvent)} } // UnsafeNewQAccessibleTableModelChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleTableModelChangeEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTableModelChangeEvent { - if h == nil { - return nil - } - - return &QAccessibleTableModelChangeEvent{h: (*C.QAccessibleTableModelChangeEvent)(h), - QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} +func UnsafeNewQAccessibleTableModelChangeEvent(h unsafe.Pointer) *QAccessibleTableModelChangeEvent { + return newQAccessibleTableModelChangeEvent((*C.QAccessibleTableModelChangeEvent)(h)) } // NewQAccessibleTableModelChangeEvent constructs a new QAccessibleTableModelChangeEvent object. func NewQAccessibleTableModelChangeEvent(obj *QObject, changeType QAccessibleTableModelChangeEvent__ModelChangeType) *QAccessibleTableModelChangeEvent { - var outptr_QAccessibleTableModelChangeEvent *C.QAccessibleTableModelChangeEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTableModelChangeEvent_new(obj.cPointer(), (C.int)(changeType), &outptr_QAccessibleTableModelChangeEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTableModelChangeEvent(outptr_QAccessibleTableModelChangeEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTableModelChangeEvent(C.QAccessibleTableModelChangeEvent_new(obj.cPointer(), (C.int)(changeType))) ret.isSubclass = true return ret } // NewQAccessibleTableModelChangeEvent2 constructs a new QAccessibleTableModelChangeEvent object. func NewQAccessibleTableModelChangeEvent2(iface *QAccessibleInterface, changeType QAccessibleTableModelChangeEvent__ModelChangeType) *QAccessibleTableModelChangeEvent { - var outptr_QAccessibleTableModelChangeEvent *C.QAccessibleTableModelChangeEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTableModelChangeEvent_new2(iface.cPointer(), (C.int)(changeType), &outptr_QAccessibleTableModelChangeEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTableModelChangeEvent(outptr_QAccessibleTableModelChangeEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTableModelChangeEvent(C.QAccessibleTableModelChangeEvent_new2(iface.cPointer(), (C.int)(changeType))) ret.isSubclass = true return ret } @@ -2393,34 +2287,27 @@ func newQAccessible__State(h *C.QAccessible__State) *QAccessible__State { if h == nil { return nil } + return &QAccessible__State{h: h} } // UnsafeNewQAccessible__State constructs the type using only unsafe pointers. func UnsafeNewQAccessible__State(h unsafe.Pointer) *QAccessible__State { - if h == nil { - return nil - } - - return &QAccessible__State{h: (*C.QAccessible__State)(h)} + return newQAccessible__State((*C.QAccessible__State)(h)) } // NewQAccessible__State constructs a new QAccessible::State object. func NewQAccessible__State() *QAccessible__State { - var outptr_QAccessible__State *C.QAccessible__State = nil - C.QAccessible__State_new(&outptr_QAccessible__State) - ret := newQAccessible__State(outptr_QAccessible__State) + ret := newQAccessible__State(C.QAccessible__State_new()) ret.isSubclass = true return ret } // NewQAccessible__State2 constructs a new QAccessible::State object. func NewQAccessible__State2(param1 *QAccessible__State) *QAccessible__State { - var outptr_QAccessible__State *C.QAccessible__State = nil - C.QAccessible__State_new2(param1.cPointer(), &outptr_QAccessible__State) - ret := newQAccessible__State(outptr_QAccessible__State) + ret := newQAccessible__State(C.QAccessible__State_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -2463,16 +2350,13 @@ func newQAccessible__ActivationObserver(h *C.QAccessible__ActivationObserver) *Q if h == nil { return nil } + return &QAccessible__ActivationObserver{h: h} } // UnsafeNewQAccessible__ActivationObserver constructs the type using only unsafe pointers. func UnsafeNewQAccessible__ActivationObserver(h unsafe.Pointer) *QAccessible__ActivationObserver { - if h == nil { - return nil - } - - return &QAccessible__ActivationObserver{h: (*C.QAccessible__ActivationObserver)(h)} + return newQAccessible__ActivationObserver((*C.QAccessible__ActivationObserver)(h)) } func (this *QAccessible__ActivationObserver) AccessibilityActiveChanged(active bool) { diff --git a/qt/gen_qaccessible.h b/qt/gen_qaccessible.h index 0ade77a1..c980a4fc 100644 --- a/qt/gen_qaccessible.h +++ b/qt/gen_qaccessible.h @@ -222,8 +222,8 @@ QPoint* QAccessibleImageInterface_ImagePosition(const QAccessibleImageInterface* void QAccessibleImageInterface_OperatorAssign(QAccessibleImageInterface* self, QAccessibleImageInterface* param1); void QAccessibleImageInterface_Delete(QAccessibleImageInterface* self, bool isSubclass); -void QAccessibleEvent_new(QObject* obj, int typ, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleEvent_new2(QAccessibleInterface* iface, int typ, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleEvent* QAccessibleEvent_new(QObject* obj, int typ); +QAccessibleEvent* QAccessibleEvent_new2(QAccessibleInterface* iface, int typ); int QAccessibleEvent_Type(const QAccessibleEvent* self); QObject* QAccessibleEvent_Object(const QAccessibleEvent* self); unsigned int QAccessibleEvent_UniqueId(const QAccessibleEvent* self); @@ -234,57 +234,65 @@ void QAccessibleEvent_override_virtual_AccessibleInterface(void* self, intptr_t QAccessibleInterface* QAccessibleEvent_virtualbase_AccessibleInterface(const void* self); void QAccessibleEvent_Delete(QAccessibleEvent* self, bool isSubclass); -void QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state); +QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state); +void QAccessibleStateChangeEvent_virtbase(QAccessibleStateChangeEvent* src, QAccessibleEvent** outptr_QAccessibleEvent); QAccessible__State* QAccessibleStateChangeEvent_ChangedStates(const QAccessibleStateChangeEvent* self); void QAccessibleStateChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); QAccessibleInterface* QAccessibleStateChangeEvent_virtualbase_AccessibleInterface(const void* self); void QAccessibleStateChangeEvent_Delete(QAccessibleStateChangeEvent* self, bool isSubclass); -void QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos); +QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos); +void QAccessibleTextCursorEvent_virtbase(QAccessibleTextCursorEvent* src, QAccessibleEvent** outptr_QAccessibleEvent); void QAccessibleTextCursorEvent_SetCursorPosition(QAccessibleTextCursorEvent* self, int position); int QAccessibleTextCursorEvent_CursorPosition(const QAccessibleTextCursorEvent* self); void QAccessibleTextCursorEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); QAccessibleInterface* QAccessibleTextCursorEvent_virtualbase_AccessibleInterface(const void* self); void QAccessibleTextCursorEvent_Delete(QAccessibleTextCursorEvent* self, bool isSubclass); -void QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end); +QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end); +void QAccessibleTextSelectionEvent_virtbase(QAccessibleTextSelectionEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent); void QAccessibleTextSelectionEvent_SetSelection(QAccessibleTextSelectionEvent* self, int start, int end); int QAccessibleTextSelectionEvent_SelectionStart(const QAccessibleTextSelectionEvent* self); int QAccessibleTextSelectionEvent_SelectionEnd(const QAccessibleTextSelectionEvent* self); void QAccessibleTextSelectionEvent_Delete(QAccessibleTextSelectionEvent* self, bool isSubclass); -void QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text); +QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text); +void QAccessibleTextInsertEvent_virtbase(QAccessibleTextInsertEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent); struct miqt_string QAccessibleTextInsertEvent_TextInserted(const QAccessibleTextInsertEvent* self); int QAccessibleTextInsertEvent_ChangePosition(const QAccessibleTextInsertEvent* self); void QAccessibleTextInsertEvent_Delete(QAccessibleTextInsertEvent* self, bool isSubclass); -void QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text); +QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text); +void QAccessibleTextRemoveEvent_virtbase(QAccessibleTextRemoveEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent); struct miqt_string QAccessibleTextRemoveEvent_TextRemoved(const QAccessibleTextRemoveEvent* self); int QAccessibleTextRemoveEvent_ChangePosition(const QAccessibleTextRemoveEvent* self); void QAccessibleTextRemoveEvent_Delete(QAccessibleTextRemoveEvent* self, bool isSubclass); -void QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text); +QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text); +void QAccessibleTextUpdateEvent_virtbase(QAccessibleTextUpdateEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent); struct miqt_string QAccessibleTextUpdateEvent_TextRemoved(const QAccessibleTextUpdateEvent* self); struct miqt_string QAccessibleTextUpdateEvent_TextInserted(const QAccessibleTextUpdateEvent* self); int QAccessibleTextUpdateEvent_ChangePosition(const QAccessibleTextUpdateEvent* self); void QAccessibleTextUpdateEvent_Delete(QAccessibleTextUpdateEvent* self, bool isSubclass); -void QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val); +QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val); +void QAccessibleValueChangeEvent_virtbase(QAccessibleValueChangeEvent* src, QAccessibleEvent** outptr_QAccessibleEvent); void QAccessibleValueChangeEvent_SetValue(QAccessibleValueChangeEvent* self, QVariant* val); QVariant* QAccessibleValueChangeEvent_Value(const QAccessibleValueChangeEvent* self); void QAccessibleValueChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); QAccessibleInterface* QAccessibleValueChangeEvent_virtualbase_AccessibleInterface(const void* self); void QAccessibleValueChangeEvent_Delete(QAccessibleValueChangeEvent* self, bool isSubclass); -void QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType); +QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType); +void QAccessibleTableModelChangeEvent_virtbase(QAccessibleTableModelChangeEvent* src, QAccessibleEvent** outptr_QAccessibleEvent); void QAccessibleTableModelChangeEvent_SetModelChangeType(QAccessibleTableModelChangeEvent* self, int changeType); int QAccessibleTableModelChangeEvent_ModelChangeType(const QAccessibleTableModelChangeEvent* self); void QAccessibleTableModelChangeEvent_SetFirstRow(QAccessibleTableModelChangeEvent* self, int row); @@ -299,8 +307,8 @@ void QAccessibleTableModelChangeEvent_override_virtual_AccessibleInterface(void* QAccessibleInterface* QAccessibleTableModelChangeEvent_virtualbase_AccessibleInterface(const void* self); void QAccessibleTableModelChangeEvent_Delete(QAccessibleTableModelChangeEvent* self, bool isSubclass); -void QAccessible__State_new(QAccessible__State** outptr_QAccessible__State); -void QAccessible__State_new2(QAccessible__State* param1, QAccessible__State** outptr_QAccessible__State); +QAccessible__State* QAccessible__State_new(); +QAccessible__State* QAccessible__State_new2(QAccessible__State* param1); void QAccessible__State_Delete(QAccessible__State* self, bool isSubclass); void QAccessible__ActivationObserver_AccessibilityActiveChanged(QAccessible__ActivationObserver* self, bool active); diff --git a/qt/gen_qaccessiblebridge.cpp b/qt/gen_qaccessiblebridge.cpp index 5bf145f1..4775be2c 100644 --- a/qt/gen_qaccessiblebridge.cpp +++ b/qt/gen_qaccessiblebridge.cpp @@ -239,16 +239,16 @@ public: }; -void QAccessibleBridgePlugin_new(QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject) { - MiqtVirtualQAccessibleBridgePlugin* ret = new MiqtVirtualQAccessibleBridgePlugin(); - *outptr_QAccessibleBridgePlugin = ret; - *outptr_QObject = static_cast(ret); +QAccessibleBridgePlugin* QAccessibleBridgePlugin_new() { + return new MiqtVirtualQAccessibleBridgePlugin(); } -void QAccessibleBridgePlugin_new2(QObject* parent, QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject) { - MiqtVirtualQAccessibleBridgePlugin* ret = new MiqtVirtualQAccessibleBridgePlugin(parent); - *outptr_QAccessibleBridgePlugin = ret; - *outptr_QObject = static_cast(ret); +QAccessibleBridgePlugin* QAccessibleBridgePlugin_new2(QObject* parent) { + return new MiqtVirtualQAccessibleBridgePlugin(parent); +} + +void QAccessibleBridgePlugin_virtbase(QAccessibleBridgePlugin* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAccessibleBridgePlugin_MetaObject(const QAccessibleBridgePlugin* self) { diff --git a/qt/gen_qaccessiblebridge.go b/qt/gen_qaccessiblebridge.go index 8656a0a4..c92419bd 100644 --- a/qt/gen_qaccessiblebridge.go +++ b/qt/gen_qaccessiblebridge.go @@ -38,16 +38,13 @@ func newQAccessibleBridge(h *C.QAccessibleBridge) *QAccessibleBridge { if h == nil { return nil } + return &QAccessibleBridge{h: h} } // UnsafeNewQAccessibleBridge constructs the type using only unsafe pointers. func UnsafeNewQAccessibleBridge(h unsafe.Pointer) *QAccessibleBridge { - if h == nil { - return nil - } - - return &QAccessibleBridge{h: (*C.QAccessibleBridge)(h)} + return newQAccessibleBridge((*C.QAccessibleBridge)(h)) } func (this *QAccessibleBridge) SetRootObject(rootObject *QAccessibleInterface) { @@ -97,42 +94,34 @@ func (this *QAccessibleBridgePlugin) UnsafePointer() unsafe.Pointer { } // newQAccessibleBridgePlugin constructs the type using only CGO pointers. -func newQAccessibleBridgePlugin(h *C.QAccessibleBridgePlugin, h_QObject *C.QObject) *QAccessibleBridgePlugin { +func newQAccessibleBridgePlugin(h *C.QAccessibleBridgePlugin) *QAccessibleBridgePlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAccessibleBridgePlugin_virtbase(h, &outptr_QObject) + return &QAccessibleBridgePlugin{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAccessibleBridgePlugin constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleBridgePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAccessibleBridgePlugin { - if h == nil { - return nil - } - - return &QAccessibleBridgePlugin{h: (*C.QAccessibleBridgePlugin)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAccessibleBridgePlugin(h unsafe.Pointer) *QAccessibleBridgePlugin { + return newQAccessibleBridgePlugin((*C.QAccessibleBridgePlugin)(h)) } // NewQAccessibleBridgePlugin constructs a new QAccessibleBridgePlugin object. func NewQAccessibleBridgePlugin() *QAccessibleBridgePlugin { - var outptr_QAccessibleBridgePlugin *C.QAccessibleBridgePlugin = nil - var outptr_QObject *C.QObject = nil - C.QAccessibleBridgePlugin_new(&outptr_QAccessibleBridgePlugin, &outptr_QObject) - ret := newQAccessibleBridgePlugin(outptr_QAccessibleBridgePlugin, outptr_QObject) + ret := newQAccessibleBridgePlugin(C.QAccessibleBridgePlugin_new()) ret.isSubclass = true return ret } // NewQAccessibleBridgePlugin2 constructs a new QAccessibleBridgePlugin object. func NewQAccessibleBridgePlugin2(parent *QObject) *QAccessibleBridgePlugin { - var outptr_QAccessibleBridgePlugin *C.QAccessibleBridgePlugin = nil - var outptr_QObject *C.QObject = nil - C.QAccessibleBridgePlugin_new2(parent.cPointer(), &outptr_QAccessibleBridgePlugin, &outptr_QObject) - ret := newQAccessibleBridgePlugin(outptr_QAccessibleBridgePlugin, outptr_QObject) + ret := newQAccessibleBridgePlugin(C.QAccessibleBridgePlugin_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -320,7 +309,7 @@ func miqt_exec_callback_QAccessibleBridgePlugin_TimerEvent(self *C.QAccessibleBr } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAccessibleBridgePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -346,7 +335,7 @@ func miqt_exec_callback_QAccessibleBridgePlugin_ChildEvent(self *C.QAccessibleBr } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAccessibleBridgePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qaccessiblebridge.h b/qt/gen_qaccessiblebridge.h index 2883d6c7..f63a7c56 100644 --- a/qt/gen_qaccessiblebridge.h +++ b/qt/gen_qaccessiblebridge.h @@ -43,8 +43,9 @@ void QAccessibleBridge_NotifyAccessibilityUpdate(QAccessibleBridge* self, QAcces void QAccessibleBridge_OperatorAssign(QAccessibleBridge* self, QAccessibleBridge* param1); void QAccessibleBridge_Delete(QAccessibleBridge* self, bool isSubclass); -void QAccessibleBridgePlugin_new(QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject); -void QAccessibleBridgePlugin_new2(QObject* parent, QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject); +QAccessibleBridgePlugin* QAccessibleBridgePlugin_new(); +QAccessibleBridgePlugin* QAccessibleBridgePlugin_new2(QObject* parent); +void QAccessibleBridgePlugin_virtbase(QAccessibleBridgePlugin* src, QObject** outptr_QObject); QMetaObject* QAccessibleBridgePlugin_MetaObject(const QAccessibleBridgePlugin* self); void* QAccessibleBridgePlugin_Metacast(QAccessibleBridgePlugin* self, const char* param1); struct miqt_string QAccessibleBridgePlugin_Tr(const char* s); diff --git a/qt/gen_qaccessibleobject.cpp b/qt/gen_qaccessibleobject.cpp index 5a54f869..626bf5c6 100644 --- a/qt/gen_qaccessibleobject.cpp +++ b/qt/gen_qaccessibleobject.cpp @@ -12,6 +12,10 @@ #include "gen_qaccessibleobject.h" #include "_cgo_export.h" +void QAccessibleObject_virtbase(QAccessibleObject* src, QAccessibleInterface** outptr_QAccessibleInterface) { + *outptr_QAccessibleInterface = static_cast(src); +} + bool QAccessibleObject_IsValid(const QAccessibleObject* self) { return self->isValid(); } @@ -33,11 +37,12 @@ QAccessibleInterface* QAccessibleObject_ChildAt(const QAccessibleObject* self, i return self->childAt(static_cast(x), static_cast(y)); } -void QAccessibleApplication_new(QAccessibleApplication** outptr_QAccessibleApplication, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface) { - QAccessibleApplication* ret = new QAccessibleApplication(); - *outptr_QAccessibleApplication = ret; - *outptr_QAccessibleObject = static_cast(ret); - *outptr_QAccessibleInterface = static_cast(ret); +QAccessibleApplication* QAccessibleApplication_new() { + return new QAccessibleApplication(); +} + +void QAccessibleApplication_virtbase(QAccessibleApplication* src, QAccessibleObject** outptr_QAccessibleObject) { + *outptr_QAccessibleObject = static_cast(src); } QWindow* QAccessibleApplication_Window(const QAccessibleApplication* self) { diff --git a/qt/gen_qaccessibleobject.go b/qt/gen_qaccessibleobject.go index f419309a..871e4781 100644 --- a/qt/gen_qaccessibleobject.go +++ b/qt/gen_qaccessibleobject.go @@ -34,22 +34,20 @@ func (this *QAccessibleObject) UnsafePointer() unsafe.Pointer { } // newQAccessibleObject constructs the type using only CGO pointers. -func newQAccessibleObject(h *C.QAccessibleObject, h_QAccessibleInterface *C.QAccessibleInterface) *QAccessibleObject { +func newQAccessibleObject(h *C.QAccessibleObject) *QAccessibleObject { if h == nil { return nil } + var outptr_QAccessibleInterface *C.QAccessibleInterface = nil + C.QAccessibleObject_virtbase(h, &outptr_QAccessibleInterface) + return &QAccessibleObject{h: h, - QAccessibleInterface: newQAccessibleInterface(h_QAccessibleInterface)} + QAccessibleInterface: newQAccessibleInterface(outptr_QAccessibleInterface)} } // UnsafeNewQAccessibleObject constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleObject(h unsafe.Pointer, h_QAccessibleInterface unsafe.Pointer) *QAccessibleObject { - if h == nil { - return nil - } - - return &QAccessibleObject{h: (*C.QAccessibleObject)(h), - QAccessibleInterface: UnsafeNewQAccessibleInterface(h_QAccessibleInterface)} +func UnsafeNewQAccessibleObject(h unsafe.Pointer) *QAccessibleObject { + return newQAccessibleObject((*C.QAccessibleObject)(h)) } func (this *QAccessibleObject) IsValid() bool { @@ -99,38 +97,32 @@ func (this *QAccessibleApplication) UnsafePointer() unsafe.Pointer { } // newQAccessibleApplication constructs the type using only CGO pointers. -func newQAccessibleApplication(h *C.QAccessibleApplication, h_QAccessibleObject *C.QAccessibleObject, h_QAccessibleInterface *C.QAccessibleInterface) *QAccessibleApplication { +func newQAccessibleApplication(h *C.QAccessibleApplication) *QAccessibleApplication { if h == nil { return nil } + var outptr_QAccessibleObject *C.QAccessibleObject = nil + C.QAccessibleApplication_virtbase(h, &outptr_QAccessibleObject) + return &QAccessibleApplication{h: h, - QAccessibleObject: newQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface)} + QAccessibleObject: newQAccessibleObject(outptr_QAccessibleObject)} } // UnsafeNewQAccessibleApplication constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleApplication(h unsafe.Pointer, h_QAccessibleObject unsafe.Pointer, h_QAccessibleInterface unsafe.Pointer) *QAccessibleApplication { - if h == nil { - return nil - } - - return &QAccessibleApplication{h: (*C.QAccessibleApplication)(h), - QAccessibleObject: UnsafeNewQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface)} +func UnsafeNewQAccessibleApplication(h unsafe.Pointer) *QAccessibleApplication { + return newQAccessibleApplication((*C.QAccessibleApplication)(h)) } // NewQAccessibleApplication constructs a new QAccessibleApplication object. func NewQAccessibleApplication() *QAccessibleApplication { - var outptr_QAccessibleApplication *C.QAccessibleApplication = nil - var outptr_QAccessibleObject *C.QAccessibleObject = nil - var outptr_QAccessibleInterface *C.QAccessibleInterface = nil - C.QAccessibleApplication_new(&outptr_QAccessibleApplication, &outptr_QAccessibleObject, &outptr_QAccessibleInterface) - ret := newQAccessibleApplication(outptr_QAccessibleApplication, outptr_QAccessibleObject, outptr_QAccessibleInterface) + ret := newQAccessibleApplication(C.QAccessibleApplication_new()) ret.isSubclass = true return ret } func (this *QAccessibleApplication) Window() *QWindow { - return newQWindow(C.QAccessibleApplication_Window(this.h), nil, nil) + return newQWindow(C.QAccessibleApplication_Window(this.h)) } func (this *QAccessibleApplication) ChildCount() int { diff --git a/qt/gen_qaccessibleobject.h b/qt/gen_qaccessibleobject.h index fe86a600..3e97c3e3 100644 --- a/qt/gen_qaccessibleobject.h +++ b/qt/gen_qaccessibleobject.h @@ -36,13 +36,15 @@ typedef struct QRect QRect; typedef struct QWindow QWindow; #endif +void QAccessibleObject_virtbase(QAccessibleObject* src, QAccessibleInterface** outptr_QAccessibleInterface); bool QAccessibleObject_IsValid(const QAccessibleObject* self); QObject* QAccessibleObject_Object(const QAccessibleObject* self); QRect* QAccessibleObject_Rect(const QAccessibleObject* self); void QAccessibleObject_SetText(QAccessibleObject* self, int t, struct miqt_string text); QAccessibleInterface* QAccessibleObject_ChildAt(const QAccessibleObject* self, int x, int y); -void QAccessibleApplication_new(QAccessibleApplication** outptr_QAccessibleApplication, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface); +QAccessibleApplication* QAccessibleApplication_new(); +void QAccessibleApplication_virtbase(QAccessibleApplication* src, QAccessibleObject** outptr_QAccessibleObject); QWindow* QAccessibleApplication_Window(const QAccessibleApplication* self); int QAccessibleApplication_ChildCount(const QAccessibleApplication* self); int QAccessibleApplication_IndexOfChild(const QAccessibleApplication* self, QAccessibleInterface* param1); diff --git a/qt/gen_qaccessibleplugin.cpp b/qt/gen_qaccessibleplugin.cpp index 15702148..9d6ca2df 100644 --- a/qt/gen_qaccessibleplugin.cpp +++ b/qt/gen_qaccessibleplugin.cpp @@ -218,16 +218,16 @@ public: }; -void QAccessiblePlugin_new(QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject) { - MiqtVirtualQAccessiblePlugin* ret = new MiqtVirtualQAccessiblePlugin(); - *outptr_QAccessiblePlugin = ret; - *outptr_QObject = static_cast(ret); +QAccessiblePlugin* QAccessiblePlugin_new() { + return new MiqtVirtualQAccessiblePlugin(); } -void QAccessiblePlugin_new2(QObject* parent, QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject) { - MiqtVirtualQAccessiblePlugin* ret = new MiqtVirtualQAccessiblePlugin(parent); - *outptr_QAccessiblePlugin = ret; - *outptr_QObject = static_cast(ret); +QAccessiblePlugin* QAccessiblePlugin_new2(QObject* parent) { + return new MiqtVirtualQAccessiblePlugin(parent); +} + +void QAccessiblePlugin_virtbase(QAccessiblePlugin* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAccessiblePlugin_MetaObject(const QAccessiblePlugin* self) { diff --git a/qt/gen_qaccessibleplugin.go b/qt/gen_qaccessibleplugin.go index b7900b16..335a77b5 100644 --- a/qt/gen_qaccessibleplugin.go +++ b/qt/gen_qaccessibleplugin.go @@ -35,42 +35,34 @@ func (this *QAccessiblePlugin) UnsafePointer() unsafe.Pointer { } // newQAccessiblePlugin constructs the type using only CGO pointers. -func newQAccessiblePlugin(h *C.QAccessiblePlugin, h_QObject *C.QObject) *QAccessiblePlugin { +func newQAccessiblePlugin(h *C.QAccessiblePlugin) *QAccessiblePlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAccessiblePlugin_virtbase(h, &outptr_QObject) + return &QAccessiblePlugin{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAccessiblePlugin constructs the type using only unsafe pointers. -func UnsafeNewQAccessiblePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAccessiblePlugin { - if h == nil { - return nil - } - - return &QAccessiblePlugin{h: (*C.QAccessiblePlugin)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAccessiblePlugin(h unsafe.Pointer) *QAccessiblePlugin { + return newQAccessiblePlugin((*C.QAccessiblePlugin)(h)) } // NewQAccessiblePlugin constructs a new QAccessiblePlugin object. func NewQAccessiblePlugin() *QAccessiblePlugin { - var outptr_QAccessiblePlugin *C.QAccessiblePlugin = nil - var outptr_QObject *C.QObject = nil - C.QAccessiblePlugin_new(&outptr_QAccessiblePlugin, &outptr_QObject) - ret := newQAccessiblePlugin(outptr_QAccessiblePlugin, outptr_QObject) + ret := newQAccessiblePlugin(C.QAccessiblePlugin_new()) ret.isSubclass = true return ret } // NewQAccessiblePlugin2 constructs a new QAccessiblePlugin object. func NewQAccessiblePlugin2(parent *QObject) *QAccessiblePlugin { - var outptr_QAccessiblePlugin *C.QAccessiblePlugin = nil - var outptr_QObject *C.QObject = nil - C.QAccessiblePlugin_new2(parent.cPointer(), &outptr_QAccessiblePlugin, &outptr_QObject) - ret := newQAccessiblePlugin(outptr_QAccessiblePlugin, outptr_QObject) + ret := newQAccessiblePlugin(C.QAccessiblePlugin_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -259,7 +251,7 @@ func miqt_exec_callback_QAccessiblePlugin_TimerEvent(self *C.QAccessiblePlugin, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAccessiblePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -285,7 +277,7 @@ func miqt_exec_callback_QAccessiblePlugin_ChildEvent(self *C.QAccessiblePlugin, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAccessiblePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qaccessibleplugin.h b/qt/gen_qaccessibleplugin.h index 373dcb2f..82ac3f09 100644 --- a/qt/gen_qaccessibleplugin.h +++ b/qt/gen_qaccessibleplugin.h @@ -34,8 +34,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QAccessiblePlugin_new(QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject); -void QAccessiblePlugin_new2(QObject* parent, QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject); +QAccessiblePlugin* QAccessiblePlugin_new(); +QAccessiblePlugin* QAccessiblePlugin_new2(QObject* parent); +void QAccessiblePlugin_virtbase(QAccessiblePlugin* src, QObject** outptr_QObject); QMetaObject* QAccessiblePlugin_MetaObject(const QAccessiblePlugin* self); void* QAccessiblePlugin_Metacast(QAccessiblePlugin* self, const char* param1); struct miqt_string QAccessiblePlugin_Tr(const char* s); diff --git a/qt/gen_qaccessiblewidget.cpp b/qt/gen_qaccessiblewidget.cpp index 2a2a147b..794e1301 100644 --- a/qt/gen_qaccessiblewidget.cpp +++ b/qt/gen_qaccessiblewidget.cpp @@ -16,29 +16,22 @@ #include "gen_qaccessiblewidget.h" #include "_cgo_export.h" -void QAccessibleWidget_new(QWidget* o, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface) { - QAccessibleWidget* ret = new QAccessibleWidget(o); - *outptr_QAccessibleWidget = ret; - *outptr_QAccessibleObject = static_cast(ret); - *outptr_QAccessibleInterface = static_cast(ret); - *outptr_QAccessibleActionInterface = static_cast(ret); +QAccessibleWidget* QAccessibleWidget_new(QWidget* o) { + return new QAccessibleWidget(o); } -void QAccessibleWidget_new2(QWidget* o, int r, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface) { - QAccessibleWidget* ret = new QAccessibleWidget(o, static_cast(r)); - *outptr_QAccessibleWidget = ret; - *outptr_QAccessibleObject = static_cast(ret); - *outptr_QAccessibleInterface = static_cast(ret); - *outptr_QAccessibleActionInterface = static_cast(ret); +QAccessibleWidget* QAccessibleWidget_new2(QWidget* o, int r) { + return new QAccessibleWidget(o, static_cast(r)); } -void QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface) { +QAccessibleWidget* QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - QAccessibleWidget* ret = new QAccessibleWidget(o, static_cast(r), name_QString); - *outptr_QAccessibleWidget = ret; - *outptr_QAccessibleObject = static_cast(ret); - *outptr_QAccessibleInterface = static_cast(ret); - *outptr_QAccessibleActionInterface = static_cast(ret); + return new QAccessibleWidget(o, static_cast(r), name_QString); +} + +void QAccessibleWidget_virtbase(QAccessibleWidget* src, QAccessibleObject** outptr_QAccessibleObject, QAccessibleActionInterface** outptr_QAccessibleActionInterface) { + *outptr_QAccessibleObject = static_cast(src); + *outptr_QAccessibleActionInterface = static_cast(src); } bool QAccessibleWidget_IsValid(const QAccessibleWidget* self) { diff --git a/qt/gen_qaccessiblewidget.go b/qt/gen_qaccessiblewidget.go index a885c0d4..70235007 100644 --- a/qt/gen_qaccessiblewidget.go +++ b/qt/gen_qaccessiblewidget.go @@ -34,48 +34,36 @@ func (this *QAccessibleWidget) UnsafePointer() unsafe.Pointer { } // newQAccessibleWidget constructs the type using only CGO pointers. -func newQAccessibleWidget(h *C.QAccessibleWidget, h_QAccessibleObject *C.QAccessibleObject, h_QAccessibleInterface *C.QAccessibleInterface, h_QAccessibleActionInterface *C.QAccessibleActionInterface) *QAccessibleWidget { +func newQAccessibleWidget(h *C.QAccessibleWidget) *QAccessibleWidget { if h == nil { return nil } + var outptr_QAccessibleObject *C.QAccessibleObject = nil + var outptr_QAccessibleActionInterface *C.QAccessibleActionInterface = nil + C.QAccessibleWidget_virtbase(h, &outptr_QAccessibleObject, &outptr_QAccessibleActionInterface) + return &QAccessibleWidget{h: h, - QAccessibleObject: newQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface), - QAccessibleActionInterface: newQAccessibleActionInterface(h_QAccessibleActionInterface)} + QAccessibleObject: newQAccessibleObject(outptr_QAccessibleObject), + QAccessibleActionInterface: newQAccessibleActionInterface(outptr_QAccessibleActionInterface)} } // UnsafeNewQAccessibleWidget constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleWidget(h unsafe.Pointer, h_QAccessibleObject unsafe.Pointer, h_QAccessibleInterface unsafe.Pointer, h_QAccessibleActionInterface unsafe.Pointer) *QAccessibleWidget { - if h == nil { - return nil - } - - return &QAccessibleWidget{h: (*C.QAccessibleWidget)(h), - QAccessibleObject: UnsafeNewQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface), - QAccessibleActionInterface: UnsafeNewQAccessibleActionInterface(h_QAccessibleActionInterface)} +func UnsafeNewQAccessibleWidget(h unsafe.Pointer) *QAccessibleWidget { + return newQAccessibleWidget((*C.QAccessibleWidget)(h)) } // NewQAccessibleWidget constructs a new QAccessibleWidget object. func NewQAccessibleWidget(o *QWidget) *QAccessibleWidget { - var outptr_QAccessibleWidget *C.QAccessibleWidget = nil - var outptr_QAccessibleObject *C.QAccessibleObject = nil - var outptr_QAccessibleInterface *C.QAccessibleInterface = nil - var outptr_QAccessibleActionInterface *C.QAccessibleActionInterface = nil - C.QAccessibleWidget_new(o.cPointer(), &outptr_QAccessibleWidget, &outptr_QAccessibleObject, &outptr_QAccessibleInterface, &outptr_QAccessibleActionInterface) - ret := newQAccessibleWidget(outptr_QAccessibleWidget, outptr_QAccessibleObject, outptr_QAccessibleInterface, outptr_QAccessibleActionInterface) + ret := newQAccessibleWidget(C.QAccessibleWidget_new(o.cPointer())) ret.isSubclass = true return ret } // NewQAccessibleWidget2 constructs a new QAccessibleWidget object. func NewQAccessibleWidget2(o *QWidget, r QAccessible__Role) *QAccessibleWidget { - var outptr_QAccessibleWidget *C.QAccessibleWidget = nil - var outptr_QAccessibleObject *C.QAccessibleObject = nil - var outptr_QAccessibleInterface *C.QAccessibleInterface = nil - var outptr_QAccessibleActionInterface *C.QAccessibleActionInterface = nil - C.QAccessibleWidget_new2(o.cPointer(), (C.int)(r), &outptr_QAccessibleWidget, &outptr_QAccessibleObject, &outptr_QAccessibleInterface, &outptr_QAccessibleActionInterface) - ret := newQAccessibleWidget(outptr_QAccessibleWidget, outptr_QAccessibleObject, outptr_QAccessibleInterface, outptr_QAccessibleActionInterface) + ret := newQAccessibleWidget(C.QAccessibleWidget_new2(o.cPointer(), (C.int)(r))) ret.isSubclass = true return ret } @@ -86,13 +74,8 @@ func NewQAccessibleWidget3(o *QWidget, r QAccessible__Role, name string) *QAcces name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QAccessibleWidget *C.QAccessibleWidget = nil - var outptr_QAccessibleObject *C.QAccessibleObject = nil - var outptr_QAccessibleInterface *C.QAccessibleInterface = nil - var outptr_QAccessibleActionInterface *C.QAccessibleActionInterface = nil - C.QAccessibleWidget_new3(o.cPointer(), (C.int)(r), name_ms, &outptr_QAccessibleWidget, &outptr_QAccessibleObject, &outptr_QAccessibleInterface, &outptr_QAccessibleActionInterface) - ret := newQAccessibleWidget(outptr_QAccessibleWidget, outptr_QAccessibleObject, outptr_QAccessibleInterface, outptr_QAccessibleActionInterface) + ret := newQAccessibleWidget(C.QAccessibleWidget_new3(o.cPointer(), (C.int)(r), name_ms)) ret.isSubclass = true return ret } @@ -102,7 +85,7 @@ func (this *QAccessibleWidget) IsValid() bool { } func (this *QAccessibleWidget) Window() *QWindow { - return newQWindow(C.QAccessibleWidget_Window(this.h), nil, nil) + return newQWindow(C.QAccessibleWidget_Window(this.h)) } func (this *QAccessibleWidget) ChildCount() int { diff --git a/qt/gen_qaccessiblewidget.h b/qt/gen_qaccessiblewidget.h index ae0ccaed..a7062ec4 100644 --- a/qt/gen_qaccessiblewidget.h +++ b/qt/gen_qaccessiblewidget.h @@ -40,9 +40,10 @@ typedef struct QWidget QWidget; typedef struct QWindow QWindow; #endif -void QAccessibleWidget_new(QWidget* o, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface); -void QAccessibleWidget_new2(QWidget* o, int r, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface); -void QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface); +QAccessibleWidget* QAccessibleWidget_new(QWidget* o); +QAccessibleWidget* QAccessibleWidget_new2(QWidget* o, int r); +QAccessibleWidget* QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name); +void QAccessibleWidget_virtbase(QAccessibleWidget* src, QAccessibleObject** outptr_QAccessibleObject, QAccessibleActionInterface** outptr_QAccessibleActionInterface); bool QAccessibleWidget_IsValid(const QAccessibleWidget* self); QWindow* QAccessibleWidget_Window(const QAccessibleWidget* self); int QAccessibleWidget_ChildCount(const QAccessibleWidget* self); diff --git a/qt/gen_qaction.cpp b/qt/gen_qaction.cpp index fddddab6..0d594f82 100644 --- a/qt/gen_qaction.cpp +++ b/qt/gen_qaction.cpp @@ -206,44 +206,36 @@ public: }; -void QAction_new(QAction** outptr_QAction, QObject** outptr_QObject) { - MiqtVirtualQAction* ret = new MiqtVirtualQAction(); - *outptr_QAction = ret; - *outptr_QObject = static_cast(ret); +QAction* QAction_new() { + return new MiqtVirtualQAction(); } -void QAction_new2(struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject) { +QAction* QAction_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQAction* ret = new MiqtVirtualQAction(text_QString); - *outptr_QAction = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQAction(text_QString); } -void QAction_new3(QIcon* icon, struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject) { +QAction* QAction_new3(QIcon* icon, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQAction* ret = new MiqtVirtualQAction(*icon, text_QString); - *outptr_QAction = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQAction(*icon, text_QString); } -void QAction_new4(QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject) { - MiqtVirtualQAction* ret = new MiqtVirtualQAction(parent); - *outptr_QAction = ret; - *outptr_QObject = static_cast(ret); +QAction* QAction_new4(QObject* parent) { + return new MiqtVirtualQAction(parent); } -void QAction_new5(struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject) { +QAction* QAction_new5(struct miqt_string text, QObject* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQAction* ret = new MiqtVirtualQAction(text_QString, parent); - *outptr_QAction = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQAction(text_QString, parent); } -void QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject) { +QAction* QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQAction* ret = new MiqtVirtualQAction(*icon, text_QString, parent); - *outptr_QAction = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQAction(*icon, text_QString, parent); +} + +void QAction_virtbase(QAction* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAction_MetaObject(const QAction* self) { diff --git a/qt/gen_qaction.go b/qt/gen_qaction.go index dc82c315..01c03e92 100644 --- a/qt/gen_qaction.go +++ b/qt/gen_qaction.go @@ -62,31 +62,26 @@ func (this *QAction) UnsafePointer() unsafe.Pointer { } // newQAction constructs the type using only CGO pointers. -func newQAction(h *C.QAction, h_QObject *C.QObject) *QAction { +func newQAction(h *C.QAction) *QAction { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAction_virtbase(h, &outptr_QObject) + return &QAction{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAction constructs the type using only unsafe pointers. -func UnsafeNewQAction(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAction { - if h == nil { - return nil - } - - return &QAction{h: (*C.QAction)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAction(h unsafe.Pointer) *QAction { + return newQAction((*C.QAction)(h)) } // NewQAction constructs a new QAction object. func NewQAction() *QAction { - var outptr_QAction *C.QAction = nil - var outptr_QObject *C.QObject = nil - C.QAction_new(&outptr_QAction, &outptr_QObject) - ret := newQAction(outptr_QAction, outptr_QObject) + ret := newQAction(C.QAction_new()) ret.isSubclass = true return ret } @@ -97,11 +92,8 @@ func NewQAction2(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAction *C.QAction = nil - var outptr_QObject *C.QObject = nil - C.QAction_new2(text_ms, &outptr_QAction, &outptr_QObject) - ret := newQAction(outptr_QAction, outptr_QObject) + ret := newQAction(C.QAction_new2(text_ms)) ret.isSubclass = true return ret } @@ -112,22 +104,16 @@ func NewQAction3(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAction *C.QAction = nil - var outptr_QObject *C.QObject = nil - C.QAction_new3(icon.cPointer(), text_ms, &outptr_QAction, &outptr_QObject) - ret := newQAction(outptr_QAction, outptr_QObject) + ret := newQAction(C.QAction_new3(icon.cPointer(), text_ms)) ret.isSubclass = true return ret } // NewQAction4 constructs a new QAction object. func NewQAction4(parent *QObject) *QAction { - var outptr_QAction *C.QAction = nil - var outptr_QObject *C.QObject = nil - C.QAction_new4(parent.cPointer(), &outptr_QAction, &outptr_QObject) - ret := newQAction(outptr_QAction, outptr_QObject) + ret := newQAction(C.QAction_new4(parent.cPointer())) ret.isSubclass = true return ret } @@ -138,11 +124,8 @@ func NewQAction5(text string, parent *QObject) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAction *C.QAction = nil - var outptr_QObject *C.QObject = nil - C.QAction_new5(text_ms, parent.cPointer(), &outptr_QAction, &outptr_QObject) - ret := newQAction(outptr_QAction, outptr_QObject) + ret := newQAction(C.QAction_new5(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -153,11 +136,8 @@ func NewQAction6(icon *QIcon, text string, parent *QObject) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAction *C.QAction = nil - var outptr_QObject *C.QObject = nil - C.QAction_new6(icon.cPointer(), text_ms, parent.cPointer(), &outptr_QAction, &outptr_QObject) - ret := newQAction(outptr_QAction, outptr_QObject) + ret := newQAction(C.QAction_new6(icon.cPointer(), text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -195,7 +175,7 @@ func (this *QAction) SetActionGroup(group *QActionGroup) { } func (this *QAction) ActionGroup() *QActionGroup { - return newQActionGroup(C.QAction_ActionGroup(this.h), nil) + return newQActionGroup(C.QAction_ActionGroup(this.h)) } func (this *QAction) SetIcon(icon *QIcon) { @@ -292,7 +272,7 @@ func (this *QAction) Priority() QAction__Priority { } func (this *QAction) Menu() *QMenu { - return newQMenu(C.QAction_Menu(this.h), nil, nil, nil) + return newQMenu(C.QAction_Menu(this.h)) } func (this *QAction) SetMenu(menu *QMenu) { @@ -432,7 +412,7 @@ func (this *QAction) IsShortcutVisibleInContextMenu() bool { } func (this *QAction) ParentWidget() *QWidget { - return newQWidget(C.QAction_ParentWidget(this.h), nil, nil) + return newQWidget(C.QAction_ParentWidget(this.h)) } func (this *QAction) AssociatedWidgets() []*QWidget { @@ -440,7 +420,7 @@ func (this *QAction) AssociatedWidgets() []*QWidget { _ret := make([]*QWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQWidget(_outCast[i], nil, nil) + _ret[i] = newQWidget(_outCast[i]) } return _ret } @@ -450,7 +430,7 @@ func (this *QAction) AssociatedGraphicsWidgets() []*QGraphicsWidget { _ret := make([]*QGraphicsWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QGraphicsWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQGraphicsWidget(_outCast[i], nil, nil, nil, nil) + _ret[i] = newQGraphicsWidget(_outCast[i]) } return _ret } @@ -700,7 +680,7 @@ func miqt_exec_callback_QAction_TimerEvent(self *C.QAction, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAction{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -726,7 +706,7 @@ func miqt_exec_callback_QAction_ChildEvent(self *C.QAction, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAction{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qaction.h b/qt/gen_qaction.h index f9ce1001..65e9fdf6 100644 --- a/qt/gen_qaction.h +++ b/qt/gen_qaction.h @@ -48,12 +48,13 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QAction_new(QAction** outptr_QAction, QObject** outptr_QObject); -void QAction_new2(struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject); -void QAction_new3(QIcon* icon, struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject); -void QAction_new4(QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject); -void QAction_new5(struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject); -void QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject); +QAction* QAction_new(); +QAction* QAction_new2(struct miqt_string text); +QAction* QAction_new3(QIcon* icon, struct miqt_string text); +QAction* QAction_new4(QObject* parent); +QAction* QAction_new5(struct miqt_string text, QObject* parent); +QAction* QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent); +void QAction_virtbase(QAction* src, QObject** outptr_QObject); QMetaObject* QAction_MetaObject(const QAction* self); void* QAction_Metacast(QAction* self, const char* param1); struct miqt_string QAction_Tr(const char* s); diff --git a/qt/gen_qactiongroup.cpp b/qt/gen_qactiongroup.cpp index 53ad9eec..710ff2a7 100644 --- a/qt/gen_qactiongroup.cpp +++ b/qt/gen_qactiongroup.cpp @@ -195,10 +195,12 @@ public: }; -void QActionGroup_new(QObject* parent, QActionGroup** outptr_QActionGroup, QObject** outptr_QObject) { - MiqtVirtualQActionGroup* ret = new MiqtVirtualQActionGroup(parent); - *outptr_QActionGroup = ret; - *outptr_QObject = static_cast(ret); +QActionGroup* QActionGroup_new(QObject* parent) { + return new MiqtVirtualQActionGroup(parent); +} + +void QActionGroup_virtbase(QActionGroup* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QActionGroup_MetaObject(const QActionGroup* self) { diff --git a/qt/gen_qactiongroup.go b/qt/gen_qactiongroup.go index a516c8f3..bad4d2e7 100644 --- a/qt/gen_qactiongroup.go +++ b/qt/gen_qactiongroup.go @@ -43,31 +43,26 @@ func (this *QActionGroup) UnsafePointer() unsafe.Pointer { } // newQActionGroup constructs the type using only CGO pointers. -func newQActionGroup(h *C.QActionGroup, h_QObject *C.QObject) *QActionGroup { +func newQActionGroup(h *C.QActionGroup) *QActionGroup { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QActionGroup_virtbase(h, &outptr_QObject) + return &QActionGroup{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQActionGroup constructs the type using only unsafe pointers. -func UnsafeNewQActionGroup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QActionGroup { - if h == nil { - return nil - } - - return &QActionGroup{h: (*C.QActionGroup)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQActionGroup(h unsafe.Pointer) *QActionGroup { + return newQActionGroup((*C.QActionGroup)(h)) } // NewQActionGroup constructs a new QActionGroup object. func NewQActionGroup(parent *QObject) *QActionGroup { - var outptr_QActionGroup *C.QActionGroup = nil - var outptr_QObject *C.QObject = nil - C.QActionGroup_new(parent.cPointer(), &outptr_QActionGroup, &outptr_QObject) - ret := newQActionGroup(outptr_QActionGroup, outptr_QObject) + ret := newQActionGroup(C.QActionGroup_new(parent.cPointer())) ret.isSubclass = true return ret } @@ -101,7 +96,7 @@ func QActionGroup_TrUtf8(s string) string { } func (this *QActionGroup) AddAction(a *QAction) *QAction { - return newQAction(C.QActionGroup_AddAction(this.h, a.cPointer()), nil) + return newQAction(C.QActionGroup_AddAction(this.h, a.cPointer())) } func (this *QActionGroup) AddActionWithText(text string) *QAction { @@ -109,7 +104,7 @@ func (this *QActionGroup) AddActionWithText(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QActionGroup_AddActionWithText(this.h, text_ms), nil) + return newQAction(C.QActionGroup_AddActionWithText(this.h, text_ms)) } func (this *QActionGroup) AddAction2(icon *QIcon, text string) *QAction { @@ -117,7 +112,7 @@ func (this *QActionGroup) AddAction2(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QActionGroup_AddAction2(this.h, icon.cPointer(), text_ms), nil) + return newQAction(C.QActionGroup_AddAction2(this.h, icon.cPointer(), text_ms)) } func (this *QActionGroup) RemoveAction(a *QAction) { @@ -129,13 +124,13 @@ func (this *QActionGroup) Actions() []*QAction { _ret := make([]*QAction, int(_ma.len)) _outCast := (*[0xffff]*C.QAction)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAction(_outCast[i], nil) + _ret[i] = newQAction(_outCast[i]) } return _ret } func (this *QActionGroup) CheckedAction() *QAction { - return newQAction(C.QActionGroup_CheckedAction(this.h), nil) + return newQAction(C.QActionGroup_CheckedAction(this.h)) } func (this *QActionGroup) IsExclusive() bool { @@ -189,7 +184,7 @@ func miqt_exec_callback_QActionGroup_Triggered(cb C.intptr_t, param1 *C.QAction) } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(param1, nil) + slotval1 := newQAction(param1) gofunc(slotval1) } @@ -209,7 +204,7 @@ func miqt_exec_callback_QActionGroup_Hovered(cb C.intptr_t, param1 *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(param1, nil) + slotval1 := newQAction(param1) gofunc(slotval1) } @@ -336,7 +331,7 @@ func miqt_exec_callback_QActionGroup_TimerEvent(self *C.QActionGroup, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QActionGroup{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -362,7 +357,7 @@ func miqt_exec_callback_QActionGroup_ChildEvent(self *C.QActionGroup, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QActionGroup{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qactiongroup.h b/qt/gen_qactiongroup.h index 9e7a3e06..31577b90 100644 --- a/qt/gen_qactiongroup.h +++ b/qt/gen_qactiongroup.h @@ -36,7 +36,8 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QActionGroup_new(QObject* parent, QActionGroup** outptr_QActionGroup, QObject** outptr_QObject); +QActionGroup* QActionGroup_new(QObject* parent); +void QActionGroup_virtbase(QActionGroup* src, QObject** outptr_QObject); QMetaObject* QActionGroup_MetaObject(const QActionGroup* self); void* QActionGroup_Metacast(QActionGroup* self, const char* param1); struct miqt_string QActionGroup_Tr(const char* s); diff --git a/qt/gen_qanimationgroup.cpp b/qt/gen_qanimationgroup.cpp index 5373b5fb..cd45ad36 100644 --- a/qt/gen_qanimationgroup.cpp +++ b/qt/gen_qanimationgroup.cpp @@ -126,18 +126,16 @@ public: }; -void QAnimationGroup_new(QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQAnimationGroup* ret = new MiqtVirtualQAnimationGroup(); - *outptr_QAnimationGroup = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAnimationGroup* QAnimationGroup_new() { + return new MiqtVirtualQAnimationGroup(); } -void QAnimationGroup_new2(QObject* parent, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQAnimationGroup* ret = new MiqtVirtualQAnimationGroup(parent); - *outptr_QAnimationGroup = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAnimationGroup* QAnimationGroup_new2(QObject* parent) { + return new MiqtVirtualQAnimationGroup(parent); +} + +void QAnimationGroup_virtbase(QAnimationGroup* src, QAbstractAnimation** outptr_QAbstractAnimation) { + *outptr_QAbstractAnimation = static_cast(src); } QMetaObject* QAnimationGroup_MetaObject(const QAnimationGroup* self) { diff --git a/qt/gen_qanimationgroup.go b/qt/gen_qanimationgroup.go index 3672ca2a..673b8a5d 100644 --- a/qt/gen_qanimationgroup.go +++ b/qt/gen_qanimationgroup.go @@ -35,44 +35,34 @@ func (this *QAnimationGroup) UnsafePointer() unsafe.Pointer { } // newQAnimationGroup constructs the type using only CGO pointers. -func newQAnimationGroup(h *C.QAnimationGroup, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QAnimationGroup { +func newQAnimationGroup(h *C.QAnimationGroup) *QAnimationGroup { if h == nil { return nil } + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + C.QAnimationGroup_virtbase(h, &outptr_QAbstractAnimation) + return &QAnimationGroup{h: h, - QAbstractAnimation: newQAbstractAnimation(h_QAbstractAnimation, h_QObject)} + QAbstractAnimation: newQAbstractAnimation(outptr_QAbstractAnimation)} } // UnsafeNewQAnimationGroup constructs the type using only unsafe pointers. -func UnsafeNewQAnimationGroup(h unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QAnimationGroup { - if h == nil { - return nil - } - - return &QAnimationGroup{h: (*C.QAnimationGroup)(h), - QAbstractAnimation: UnsafeNewQAbstractAnimation(h_QAbstractAnimation, h_QObject)} +func UnsafeNewQAnimationGroup(h unsafe.Pointer) *QAnimationGroup { + return newQAnimationGroup((*C.QAnimationGroup)(h)) } // NewQAnimationGroup constructs a new QAnimationGroup object. func NewQAnimationGroup() *QAnimationGroup { - var outptr_QAnimationGroup *C.QAnimationGroup = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QAnimationGroup_new(&outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQAnimationGroup(outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret := newQAnimationGroup(C.QAnimationGroup_new()) ret.isSubclass = true return ret } // NewQAnimationGroup2 constructs a new QAnimationGroup object. func NewQAnimationGroup2(parent *QObject) *QAnimationGroup { - var outptr_QAnimationGroup *C.QAnimationGroup = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QAnimationGroup_new2(parent.cPointer(), &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQAnimationGroup(outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret := newQAnimationGroup(C.QAnimationGroup_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -106,7 +96,7 @@ func QAnimationGroup_TrUtf8(s string) string { } func (this *QAnimationGroup) AnimationAt(index int) *QAbstractAnimation { - return newQAbstractAnimation(C.QAnimationGroup_AnimationAt(this.h, (C.int)(index)), nil) + return newQAbstractAnimation(C.QAnimationGroup_AnimationAt(this.h, (C.int)(index))) } func (this *QAnimationGroup) AnimationCount() int { @@ -130,7 +120,7 @@ func (this *QAnimationGroup) RemoveAnimation(animation *QAbstractAnimation) { } func (this *QAnimationGroup) TakeAnimation(index int) *QAbstractAnimation { - return newQAbstractAnimation(C.QAnimationGroup_TakeAnimation(this.h, (C.int)(index)), nil) + return newQAbstractAnimation(C.QAnimationGroup_TakeAnimation(this.h, (C.int)(index))) } func (this *QAnimationGroup) Clear() { diff --git a/qt/gen_qanimationgroup.h b/qt/gen_qanimationgroup.h index 544b39b8..40c9759b 100644 --- a/qt/gen_qanimationgroup.h +++ b/qt/gen_qanimationgroup.h @@ -28,8 +28,9 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -void QAnimationGroup_new(QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QAnimationGroup_new2(QObject* parent, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +QAnimationGroup* QAnimationGroup_new(); +QAnimationGroup* QAnimationGroup_new2(QObject* parent); +void QAnimationGroup_virtbase(QAnimationGroup* src, QAbstractAnimation** outptr_QAbstractAnimation); QMetaObject* QAnimationGroup_MetaObject(const QAnimationGroup* self); void* QAnimationGroup_Metacast(QAnimationGroup* self, const char* param1); struct miqt_string QAnimationGroup_Tr(const char* s); diff --git a/qt/gen_qapplication.cpp b/qt/gen_qapplication.cpp index a4164624..59add9b2 100644 --- a/qt/gen_qapplication.cpp +++ b/qt/gen_qapplication.cpp @@ -78,20 +78,16 @@ public: }; -void QApplication_new(int* argc, char** argv, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { - MiqtVirtualQApplication* ret = new MiqtVirtualQApplication(static_cast(*argc), argv); - *outptr_QApplication = ret; - *outptr_QGuiApplication = static_cast(ret); - *outptr_QCoreApplication = static_cast(ret); - *outptr_QObject = static_cast(ret); +QApplication* QApplication_new(int* argc, char** argv) { + return new MiqtVirtualQApplication(static_cast(*argc), argv); } -void QApplication_new2(int* argc, char** argv, int param3, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { - MiqtVirtualQApplication* ret = new MiqtVirtualQApplication(static_cast(*argc), argv, static_cast(param3)); - *outptr_QApplication = ret; - *outptr_QGuiApplication = static_cast(ret); - *outptr_QCoreApplication = static_cast(ret); - *outptr_QObject = static_cast(ret); +QApplication* QApplication_new2(int* argc, char** argv, int param3) { + return new MiqtVirtualQApplication(static_cast(*argc), argv, static_cast(param3)); +} + +void QApplication_virtbase(QApplication* src, QGuiApplication** outptr_QGuiApplication) { + *outptr_QGuiApplication = static_cast(src); } QMetaObject* QApplication_MetaObject(const QApplication* self) { diff --git a/qt/gen_qapplication.go b/qt/gen_qapplication.go index c2a54d74..713717ce 100644 --- a/qt/gen_qapplication.go +++ b/qt/gen_qapplication.go @@ -43,22 +43,20 @@ func (this *QApplication) UnsafePointer() unsafe.Pointer { } // newQApplication constructs the type using only CGO pointers. -func newQApplication(h *C.QApplication, h_QGuiApplication *C.QGuiApplication, h_QCoreApplication *C.QCoreApplication, h_QObject *C.QObject) *QApplication { +func newQApplication(h *C.QApplication) *QApplication { if h == nil { return nil } + var outptr_QGuiApplication *C.QGuiApplication = nil + C.QApplication_virtbase(h, &outptr_QGuiApplication) + return &QApplication{h: h, - QGuiApplication: newQGuiApplication(h_QGuiApplication, h_QCoreApplication, h_QObject)} + QGuiApplication: newQGuiApplication(outptr_QGuiApplication)} } // UnsafeNewQApplication constructs the type using only unsafe pointers. -func UnsafeNewQApplication(h unsafe.Pointer, h_QGuiApplication unsafe.Pointer, h_QCoreApplication unsafe.Pointer, h_QObject unsafe.Pointer) *QApplication { - if h == nil { - return nil - } - - return &QApplication{h: (*C.QApplication)(h), - QGuiApplication: UnsafeNewQGuiApplication(h_QGuiApplication, h_QCoreApplication, h_QObject)} +func UnsafeNewQApplication(h unsafe.Pointer) *QApplication { + return newQApplication((*C.QApplication)(h)) } // NewQApplication constructs a new QApplication object. @@ -73,13 +71,7 @@ func NewQApplication(args []string) *QApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - var outptr_QApplication *C.QApplication = nil - var outptr_QGuiApplication *C.QGuiApplication = nil - var outptr_QCoreApplication *C.QCoreApplication = nil - var outptr_QObject *C.QObject = nil - - C.QApplication_new(argc, &argv[0], &outptr_QApplication, &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) - ret := newQApplication(outptr_QApplication, outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret := newQApplication(C.QApplication_new(argc, &argv[0])) ret.isSubclass = true return ret } @@ -96,13 +88,7 @@ func NewQApplication2(args []string, param3 int) *QApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - var outptr_QApplication *C.QApplication = nil - var outptr_QGuiApplication *C.QGuiApplication = nil - var outptr_QCoreApplication *C.QCoreApplication = nil - var outptr_QObject *C.QObject = nil - - C.QApplication_new2(argc, &argv[0], (C.int)(param3), &outptr_QApplication, &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) - ret := newQApplication(outptr_QApplication, outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret := newQApplication(C.QApplication_new2(argc, &argv[0], (C.int)(param3))) ret.isSubclass = true return ret } @@ -136,7 +122,7 @@ func QApplication_TrUtf8(s string) string { } func QApplication_Style() *QStyle { - return newQStyle(C.QApplication_Style(), nil) + return newQStyle(C.QApplication_Style()) } func QApplication_SetStyle(style *QStyle) { @@ -148,7 +134,7 @@ func QApplication_SetStyleWithStyle(style string) *QStyle { style_ms.data = C.CString(style) style_ms.len = C.size_t(len(style)) defer C.free(unsafe.Pointer(style_ms.data)) - return newQStyle(C.QApplication_SetStyleWithStyle(style_ms), nil) + return newQStyle(C.QApplication_SetStyleWithStyle(style_ms)) } func QApplication_ColorSpec() int { @@ -222,7 +208,7 @@ func QApplication_AllWidgets() []*QWidget { _ret := make([]*QWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQWidget(_outCast[i], nil, nil) + _ret[i] = newQWidget(_outCast[i]) } return _ret } @@ -232,29 +218,29 @@ func QApplication_TopLevelWidgets() []*QWidget { _ret := make([]*QWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQWidget(_outCast[i], nil, nil) + _ret[i] = newQWidget(_outCast[i]) } return _ret } func QApplication_Desktop() *QDesktopWidget { - return newQDesktopWidget(C.QApplication_Desktop(), nil, nil, nil) + return newQDesktopWidget(C.QApplication_Desktop()) } func QApplication_ActivePopupWidget() *QWidget { - return newQWidget(C.QApplication_ActivePopupWidget(), nil, nil) + return newQWidget(C.QApplication_ActivePopupWidget()) } func QApplication_ActiveModalWidget() *QWidget { - return newQWidget(C.QApplication_ActiveModalWidget(), nil, nil) + return newQWidget(C.QApplication_ActiveModalWidget()) } func QApplication_FocusWidget() *QWidget { - return newQWidget(C.QApplication_FocusWidget(), nil, nil) + return newQWidget(C.QApplication_FocusWidget()) } func QApplication_ActiveWindow() *QWidget { - return newQWidget(C.QApplication_ActiveWindow(), nil, nil) + return newQWidget(C.QApplication_ActiveWindow()) } func QApplication_SetActiveWindow(act *QWidget) { @@ -262,19 +248,19 @@ func QApplication_SetActiveWindow(act *QWidget) { } func QApplication_WidgetAt(p *QPoint) *QWidget { - return newQWidget(C.QApplication_WidgetAt(p.cPointer()), nil, nil) + return newQWidget(C.QApplication_WidgetAt(p.cPointer())) } func QApplication_WidgetAt2(x int, y int) *QWidget { - return newQWidget(C.QApplication_WidgetAt2((C.int)(x), (C.int)(y)), nil, nil) + return newQWidget(C.QApplication_WidgetAt2((C.int)(x), (C.int)(y))) } func QApplication_TopLevelAt(p *QPoint) *QWidget { - return newQWidget(C.QApplication_TopLevelAt(p.cPointer()), nil, nil) + return newQWidget(C.QApplication_TopLevelAt(p.cPointer())) } func QApplication_TopLevelAt2(x int, y int) *QWidget { - return newQWidget(C.QApplication_TopLevelAt2((C.int)(x), (C.int)(y)), nil, nil) + return newQWidget(C.QApplication_TopLevelAt2((C.int)(x), (C.int)(y))) } func QApplication_Beep() { @@ -374,9 +360,9 @@ func miqt_exec_callback_QApplication_FocusChanged(cb C.intptr_t, old *C.QWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(old, nil, nil) + slotval1 := newQWidget(old) - slotval2 := newQWidget(now, nil, nil) + slotval2 := newQWidget(now) gofunc(slotval1, slotval2) } diff --git a/qt/gen_qapplication.h b/qt/gen_qapplication.h index 1d2749ef..a2a6692a 100644 --- a/qt/gen_qapplication.h +++ b/qt/gen_qapplication.h @@ -48,8 +48,9 @@ typedef struct QStyle QStyle; typedef struct QWidget QWidget; #endif -void QApplication_new(int* argc, char** argv, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); -void QApplication_new2(int* argc, char** argv, int param3, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); +QApplication* QApplication_new(int* argc, char** argv); +QApplication* QApplication_new2(int* argc, char** argv, int param3); +void QApplication_virtbase(QApplication* src, QGuiApplication** outptr_QGuiApplication); QMetaObject* QApplication_MetaObject(const QApplication* self); void* QApplication_Metacast(QApplication* self, const char* param1); struct miqt_string QApplication_Tr(const char* s); diff --git a/qt/gen_qarraydata.go b/qt/gen_qarraydata.go index 897b5722..ae3f27e4 100644 --- a/qt/gen_qarraydata.go +++ b/qt/gen_qarraydata.go @@ -56,16 +56,13 @@ func newQArrayData(h *C.QArrayData) *QArrayData { if h == nil { return nil } + return &QArrayData{h: h} } // UnsafeNewQArrayData constructs the type using only unsafe pointers. func UnsafeNewQArrayData(h unsafe.Pointer) *QArrayData { - if h == nil { - return nil - } - - return &QArrayData{h: (*C.QArrayData)(h)} + return newQArrayData((*C.QArrayData)(h)) } func (this *QArrayData) Data() unsafe.Pointer { diff --git a/qt/gen_qbackingstore.cpp b/qt/gen_qbackingstore.cpp index 6383eba6..1809c154 100644 --- a/qt/gen_qbackingstore.cpp +++ b/qt/gen_qbackingstore.cpp @@ -8,9 +8,8 @@ #include "gen_qbackingstore.h" #include "_cgo_export.h" -void QBackingStore_new(QWindow* window, QBackingStore** outptr_QBackingStore) { - QBackingStore* ret = new QBackingStore(window); - *outptr_QBackingStore = ret; +QBackingStore* QBackingStore_new(QWindow* window) { + return new QBackingStore(window); } QWindow* QBackingStore_Window(const QBackingStore* self) { diff --git a/qt/gen_qbackingstore.go b/qt/gen_qbackingstore.go index 33cea875..dc9caf90 100644 --- a/qt/gen_qbackingstore.go +++ b/qt/gen_qbackingstore.go @@ -37,30 +37,25 @@ func newQBackingStore(h *C.QBackingStore) *QBackingStore { if h == nil { return nil } + return &QBackingStore{h: h} } // UnsafeNewQBackingStore constructs the type using only unsafe pointers. func UnsafeNewQBackingStore(h unsafe.Pointer) *QBackingStore { - if h == nil { - return nil - } - - return &QBackingStore{h: (*C.QBackingStore)(h)} + return newQBackingStore((*C.QBackingStore)(h)) } // NewQBackingStore constructs a new QBackingStore object. func NewQBackingStore(window *QWindow) *QBackingStore { - var outptr_QBackingStore *C.QBackingStore = nil - C.QBackingStore_new(window.cPointer(), &outptr_QBackingStore) - ret := newQBackingStore(outptr_QBackingStore) + ret := newQBackingStore(C.QBackingStore_new(window.cPointer())) ret.isSubclass = true return ret } func (this *QBackingStore) Window() *QWindow { - return newQWindow(C.QBackingStore_Window(this.h), nil, nil) + return newQWindow(C.QBackingStore_Window(this.h)) } func (this *QBackingStore) PaintDevice() *QPaintDevice { diff --git a/qt/gen_qbackingstore.h b/qt/gen_qbackingstore.h index 6b7554b0..024d69d5 100644 --- a/qt/gen_qbackingstore.h +++ b/qt/gen_qbackingstore.h @@ -30,7 +30,7 @@ typedef struct QSize QSize; typedef struct QWindow QWindow; #endif -void QBackingStore_new(QWindow* window, QBackingStore** outptr_QBackingStore); +QBackingStore* QBackingStore_new(QWindow* window); QWindow* QBackingStore_Window(const QBackingStore* self); QPaintDevice* QBackingStore_PaintDevice(QBackingStore* self); void QBackingStore_Flush(QBackingStore* self, QRegion* region); diff --git a/qt/gen_qbasictimer.cpp b/qt/gen_qbasictimer.cpp index 8263eeb1..d726f151 100644 --- a/qt/gen_qbasictimer.cpp +++ b/qt/gen_qbasictimer.cpp @@ -4,14 +4,12 @@ #include "gen_qbasictimer.h" #include "_cgo_export.h" -void QBasicTimer_new(QBasicTimer* param1, QBasicTimer** outptr_QBasicTimer) { - QBasicTimer* ret = new QBasicTimer(*param1); - *outptr_QBasicTimer = ret; +QBasicTimer* QBasicTimer_new(QBasicTimer* param1) { + return new QBasicTimer(*param1); } -void QBasicTimer_new2(QBasicTimer** outptr_QBasicTimer) { - QBasicTimer* ret = new QBasicTimer(); - *outptr_QBasicTimer = ret; +QBasicTimer* QBasicTimer_new2() { + return new QBasicTimer(); } void QBasicTimer_OperatorAssign(QBasicTimer* self, QBasicTimer* param1) { diff --git a/qt/gen_qbasictimer.go b/qt/gen_qbasictimer.go index b33d2b1a..1930560f 100644 --- a/qt/gen_qbasictimer.go +++ b/qt/gen_qbasictimer.go @@ -37,34 +37,27 @@ func newQBasicTimer(h *C.QBasicTimer) *QBasicTimer { if h == nil { return nil } + return &QBasicTimer{h: h} } // UnsafeNewQBasicTimer constructs the type using only unsafe pointers. func UnsafeNewQBasicTimer(h unsafe.Pointer) *QBasicTimer { - if h == nil { - return nil - } - - return &QBasicTimer{h: (*C.QBasicTimer)(h)} + return newQBasicTimer((*C.QBasicTimer)(h)) } // NewQBasicTimer constructs a new QBasicTimer object. func NewQBasicTimer(param1 *QBasicTimer) *QBasicTimer { - var outptr_QBasicTimer *C.QBasicTimer = nil - C.QBasicTimer_new(param1.cPointer(), &outptr_QBasicTimer) - ret := newQBasicTimer(outptr_QBasicTimer) + ret := newQBasicTimer(C.QBasicTimer_new(param1.cPointer())) ret.isSubclass = true return ret } // NewQBasicTimer2 constructs a new QBasicTimer object. func NewQBasicTimer2() *QBasicTimer { - var outptr_QBasicTimer *C.QBasicTimer = nil - C.QBasicTimer_new2(&outptr_QBasicTimer) - ret := newQBasicTimer(outptr_QBasicTimer) + ret := newQBasicTimer(C.QBasicTimer_new2()) ret.isSubclass = true return ret } diff --git a/qt/gen_qbasictimer.h b/qt/gen_qbasictimer.h index 070dd7cf..c4aca056 100644 --- a/qt/gen_qbasictimer.h +++ b/qt/gen_qbasictimer.h @@ -22,8 +22,8 @@ typedef struct QBasicTimer QBasicTimer; typedef struct QObject QObject; #endif -void QBasicTimer_new(QBasicTimer* param1, QBasicTimer** outptr_QBasicTimer); -void QBasicTimer_new2(QBasicTimer** outptr_QBasicTimer); +QBasicTimer* QBasicTimer_new(QBasicTimer* param1); +QBasicTimer* QBasicTimer_new2(); void QBasicTimer_OperatorAssign(QBasicTimer* self, QBasicTimer* param1); void QBasicTimer_Swap(QBasicTimer* self, QBasicTimer* other); bool QBasicTimer_IsActive(const QBasicTimer* self); diff --git a/qt/gen_qbitarray.cpp b/qt/gen_qbitarray.cpp index adc6bcb9..4479e9d3 100644 --- a/qt/gen_qbitarray.cpp +++ b/qt/gen_qbitarray.cpp @@ -4,24 +4,20 @@ #include "gen_qbitarray.h" #include "_cgo_export.h" -void QBitArray_new(QBitArray** outptr_QBitArray) { - QBitArray* ret = new QBitArray(); - *outptr_QBitArray = ret; +QBitArray* QBitArray_new() { + return new QBitArray(); } -void QBitArray_new2(int size, QBitArray** outptr_QBitArray) { - QBitArray* ret = new QBitArray(static_cast(size)); - *outptr_QBitArray = ret; +QBitArray* QBitArray_new2(int size) { + return new QBitArray(static_cast(size)); } -void QBitArray_new3(QBitArray* other, QBitArray** outptr_QBitArray) { - QBitArray* ret = new QBitArray(*other); - *outptr_QBitArray = ret; +QBitArray* QBitArray_new3(QBitArray* other) { + return new QBitArray(*other); } -void QBitArray_new4(int size, bool val, QBitArray** outptr_QBitArray) { - QBitArray* ret = new QBitArray(static_cast(size), val); - *outptr_QBitArray = ret; +QBitArray* QBitArray_new4(int size, bool val) { + return new QBitArray(static_cast(size), val); } void QBitArray_OperatorAssign(QBitArray* self, QBitArray* other) { @@ -160,9 +156,8 @@ void QBitArray_Delete(QBitArray* self, bool isSubclass) { } } -void QBitRef_new(QBitRef* param1, QBitRef** outptr_QBitRef) { - QBitRef* ret = new QBitRef(*param1); - *outptr_QBitRef = ret; +QBitRef* QBitRef_new(QBitRef* param1) { + return new QBitRef(*param1); } bool QBitRef_OperatorNot(const QBitRef* self) { diff --git a/qt/gen_qbitarray.go b/qt/gen_qbitarray.go index ffebcf9a..ea8d86be 100644 --- a/qt/gen_qbitarray.go +++ b/qt/gen_qbitarray.go @@ -37,54 +37,43 @@ func newQBitArray(h *C.QBitArray) *QBitArray { if h == nil { return nil } + return &QBitArray{h: h} } // UnsafeNewQBitArray constructs the type using only unsafe pointers. func UnsafeNewQBitArray(h unsafe.Pointer) *QBitArray { - if h == nil { - return nil - } - - return &QBitArray{h: (*C.QBitArray)(h)} + return newQBitArray((*C.QBitArray)(h)) } // NewQBitArray constructs a new QBitArray object. func NewQBitArray() *QBitArray { - var outptr_QBitArray *C.QBitArray = nil - C.QBitArray_new(&outptr_QBitArray) - ret := newQBitArray(outptr_QBitArray) + ret := newQBitArray(C.QBitArray_new()) ret.isSubclass = true return ret } // NewQBitArray2 constructs a new QBitArray object. func NewQBitArray2(size int) *QBitArray { - var outptr_QBitArray *C.QBitArray = nil - C.QBitArray_new2((C.int)(size), &outptr_QBitArray) - ret := newQBitArray(outptr_QBitArray) + ret := newQBitArray(C.QBitArray_new2((C.int)(size))) ret.isSubclass = true return ret } // NewQBitArray3 constructs a new QBitArray object. func NewQBitArray3(other *QBitArray) *QBitArray { - var outptr_QBitArray *C.QBitArray = nil - C.QBitArray_new3(other.cPointer(), &outptr_QBitArray) - ret := newQBitArray(outptr_QBitArray) + ret := newQBitArray(C.QBitArray_new3(other.cPointer())) ret.isSubclass = true return ret } // NewQBitArray4 constructs a new QBitArray object. func NewQBitArray4(size int, val bool) *QBitArray { - var outptr_QBitArray *C.QBitArray = nil - C.QBitArray_new4((C.int)(size), (C.bool)(val), &outptr_QBitArray) - ret := newQBitArray(outptr_QBitArray) + ret := newQBitArray(C.QBitArray_new4((C.int)(size), (C.bool)(val))) ret.isSubclass = true return ret } @@ -264,24 +253,19 @@ func newQBitRef(h *C.QBitRef) *QBitRef { if h == nil { return nil } + return &QBitRef{h: h} } // UnsafeNewQBitRef constructs the type using only unsafe pointers. func UnsafeNewQBitRef(h unsafe.Pointer) *QBitRef { - if h == nil { - return nil - } - - return &QBitRef{h: (*C.QBitRef)(h)} + return newQBitRef((*C.QBitRef)(h)) } // NewQBitRef constructs a new QBitRef object. func NewQBitRef(param1 *QBitRef) *QBitRef { - var outptr_QBitRef *C.QBitRef = nil - C.QBitRef_new(param1.cPointer(), &outptr_QBitRef) - ret := newQBitRef(outptr_QBitRef) + ret := newQBitRef(C.QBitRef_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qbitarray.h b/qt/gen_qbitarray.h index 1235d6b5..bfedc85f 100644 --- a/qt/gen_qbitarray.h +++ b/qt/gen_qbitarray.h @@ -22,10 +22,10 @@ typedef struct QBitArray QBitArray; typedef struct QBitRef QBitRef; #endif -void QBitArray_new(QBitArray** outptr_QBitArray); -void QBitArray_new2(int size, QBitArray** outptr_QBitArray); -void QBitArray_new3(QBitArray* other, QBitArray** outptr_QBitArray); -void QBitArray_new4(int size, bool val, QBitArray** outptr_QBitArray); +QBitArray* QBitArray_new(); +QBitArray* QBitArray_new2(int size); +QBitArray* QBitArray_new3(QBitArray* other); +QBitArray* QBitArray_new4(int size, bool val); void QBitArray_OperatorAssign(QBitArray* self, QBitArray* other); void QBitArray_Swap(QBitArray* self, QBitArray* other); int QBitArray_Size(const QBitArray* self); @@ -60,7 +60,7 @@ QBitArray* QBitArray_FromBits(const char* data, ptrdiff_t lenVal); bool QBitArray_Fill22(QBitArray* self, bool val, int size); void QBitArray_Delete(QBitArray* self, bool isSubclass); -void QBitRef_new(QBitRef* param1, QBitRef** outptr_QBitRef); +QBitRef* QBitRef_new(QBitRef* param1); bool QBitRef_OperatorNot(const QBitRef* self); void QBitRef_OperatorAssign(QBitRef* self, QBitRef* val); void QBitRef_OperatorAssignWithVal(QBitRef* self, bool val); diff --git a/qt/gen_qbitmap.cpp b/qt/gen_qbitmap.cpp index efe51492..08716538 100644 --- a/qt/gen_qbitmap.cpp +++ b/qt/gen_qbitmap.cpp @@ -96,55 +96,38 @@ public: }; -void QBitmap_new(QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(); - *outptr_QBitmap = ret; - *outptr_QPixmap = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QBitmap* QBitmap_new() { + return new MiqtVirtualQBitmap(); } -void QBitmap_new2(QPixmap* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(*param1); - *outptr_QBitmap = ret; - *outptr_QPixmap = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QBitmap* QBitmap_new2(QPixmap* param1) { + return new MiqtVirtualQBitmap(*param1); } -void QBitmap_new3(int w, int h, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(static_cast(w), static_cast(h)); - *outptr_QBitmap = ret; - *outptr_QPixmap = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QBitmap* QBitmap_new3(int w, int h) { + return new MiqtVirtualQBitmap(static_cast(w), static_cast(h)); } -void QBitmap_new4(QSize* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(*param1); - *outptr_QBitmap = ret; - *outptr_QPixmap = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QBitmap* QBitmap_new4(QSize* param1) { + return new MiqtVirtualQBitmap(*param1); } -void QBitmap_new5(struct miqt_string fileName, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { +QBitmap* QBitmap_new5(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(fileName_QString); - *outptr_QBitmap = ret; - *outptr_QPixmap = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQBitmap(fileName_QString); } -void QBitmap_new6(QBitmap* other, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(*other); - *outptr_QBitmap = ret; - *outptr_QPixmap = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QBitmap* QBitmap_new6(QBitmap* other) { + return new MiqtVirtualQBitmap(*other); } -void QBitmap_new7(struct miqt_string fileName, const char* format, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { +QBitmap* QBitmap_new7(struct miqt_string fileName, const char* format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(fileName_QString, format); - *outptr_QBitmap = ret; - *outptr_QPixmap = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQBitmap(fileName_QString, format); +} + +void QBitmap_virtbase(QBitmap* src, QPixmap** outptr_QPixmap) { + *outptr_QPixmap = static_cast(src); } void QBitmap_OperatorAssign(QBitmap* self, QBitmap* other) { diff --git a/qt/gen_qbitmap.go b/qt/gen_qbitmap.go index aa3684f5..1e666d2e 100644 --- a/qt/gen_qbitmap.go +++ b/qt/gen_qbitmap.go @@ -35,68 +35,50 @@ func (this *QBitmap) UnsafePointer() unsafe.Pointer { } // newQBitmap constructs the type using only CGO pointers. -func newQBitmap(h *C.QBitmap, h_QPixmap *C.QPixmap, h_QPaintDevice *C.QPaintDevice) *QBitmap { +func newQBitmap(h *C.QBitmap) *QBitmap { if h == nil { return nil } + var outptr_QPixmap *C.QPixmap = nil + C.QBitmap_virtbase(h, &outptr_QPixmap) + return &QBitmap{h: h, - QPixmap: newQPixmap(h_QPixmap, h_QPaintDevice)} + QPixmap: newQPixmap(outptr_QPixmap)} } // UnsafeNewQBitmap constructs the type using only unsafe pointers. -func UnsafeNewQBitmap(h unsafe.Pointer, h_QPixmap unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QBitmap { - if h == nil { - return nil - } - - return &QBitmap{h: (*C.QBitmap)(h), - QPixmap: UnsafeNewQPixmap(h_QPixmap, h_QPaintDevice)} +func UnsafeNewQBitmap(h unsafe.Pointer) *QBitmap { + return newQBitmap((*C.QBitmap)(h)) } // NewQBitmap constructs a new QBitmap object. func NewQBitmap() *QBitmap { - var outptr_QBitmap *C.QBitmap = nil - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QBitmap_new(&outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret := newQBitmap(C.QBitmap_new()) ret.isSubclass = true return ret } // NewQBitmap2 constructs a new QBitmap object. func NewQBitmap2(param1 *QPixmap) *QBitmap { - var outptr_QBitmap *C.QBitmap = nil - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QBitmap_new2(param1.cPointer(), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret := newQBitmap(C.QBitmap_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQBitmap3 constructs a new QBitmap object. func NewQBitmap3(w int, h int) *QBitmap { - var outptr_QBitmap *C.QBitmap = nil - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QBitmap_new3((C.int)(w), (C.int)(h), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret := newQBitmap(C.QBitmap_new3((C.int)(w), (C.int)(h))) ret.isSubclass = true return ret } // NewQBitmap4 constructs a new QBitmap object. func NewQBitmap4(param1 *QSize) *QBitmap { - var outptr_QBitmap *C.QBitmap = nil - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QBitmap_new4(param1.cPointer(), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret := newQBitmap(C.QBitmap_new4(param1.cPointer())) ret.isSubclass = true return ret } @@ -107,24 +89,16 @@ func NewQBitmap5(fileName string) *QBitmap { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QBitmap *C.QBitmap = nil - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QBitmap_new5(fileName_ms, &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret := newQBitmap(C.QBitmap_new5(fileName_ms)) ret.isSubclass = true return ret } // NewQBitmap6 constructs a new QBitmap object. func NewQBitmap6(other *QBitmap) *QBitmap { - var outptr_QBitmap *C.QBitmap = nil - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QBitmap_new6(other.cPointer(), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret := newQBitmap(C.QBitmap_new6(other.cPointer())) ret.isSubclass = true return ret } @@ -137,12 +111,8 @@ func NewQBitmap7(fileName string, format string) *QBitmap { defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - var outptr_QBitmap *C.QBitmap = nil - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QBitmap_new7(fileName_ms, format_Cstring, &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret := newQBitmap(C.QBitmap_new7(fileName_ms, format_Cstring)) ret.isSubclass = true return ret } @@ -164,37 +134,37 @@ func (this *QBitmap) Clear() { } func QBitmap_FromImage(image *QImage) *QBitmap { - _goptr := newQBitmap(C.QBitmap_FromImage(image.cPointer()), nil, nil) + _goptr := newQBitmap(C.QBitmap_FromImage(image.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QBitmap_FromData(size *QSize, bits *byte) *QBitmap { - _goptr := newQBitmap(C.QBitmap_FromData(size.cPointer(), (*C.uchar)(unsafe.Pointer(bits))), nil, nil) + _goptr := newQBitmap(C.QBitmap_FromData(size.cPointer(), (*C.uchar)(unsafe.Pointer(bits)))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QBitmap) Transformed(param1 *QMatrix) *QBitmap { - _goptr := newQBitmap(C.QBitmap_Transformed(this.h, param1.cPointer()), nil, nil) + _goptr := newQBitmap(C.QBitmap_Transformed(this.h, param1.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QBitmap) TransformedWithMatrix(matrix *QTransform) *QBitmap { - _goptr := newQBitmap(C.QBitmap_TransformedWithMatrix(this.h, matrix.cPointer()), nil, nil) + _goptr := newQBitmap(C.QBitmap_TransformedWithMatrix(this.h, matrix.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QBitmap_FromImage2(image *QImage, flags ImageConversionFlag) *QBitmap { - _goptr := newQBitmap(C.QBitmap_FromImage2(image.cPointer(), (C.int)(flags)), nil, nil) + _goptr := newQBitmap(C.QBitmap_FromImage2(image.cPointer(), (C.int)(flags))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QBitmap_FromData3(size *QSize, bits *byte, monoFormat QImage__Format) *QBitmap { - _goptr := newQBitmap(C.QBitmap_FromData3(size.cPointer(), (*C.uchar)(unsafe.Pointer(bits)), (C.int)(monoFormat)), nil, nil) + _goptr := newQBitmap(C.QBitmap_FromData3(size.cPointer(), (*C.uchar)(unsafe.Pointer(bits)), (C.int)(monoFormat))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/gen_qbitmap.h b/qt/gen_qbitmap.h index dc9876f9..82db0586 100644 --- a/qt/gen_qbitmap.h +++ b/qt/gen_qbitmap.h @@ -34,13 +34,14 @@ typedef struct QSize QSize; typedef struct QTransform QTransform; #endif -void QBitmap_new(QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QBitmap_new2(QPixmap* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QBitmap_new3(int w, int h, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QBitmap_new4(QSize* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QBitmap_new5(struct miqt_string fileName, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QBitmap_new6(QBitmap* other, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QBitmap_new7(struct miqt_string fileName, const char* format, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +QBitmap* QBitmap_new(); +QBitmap* QBitmap_new2(QPixmap* param1); +QBitmap* QBitmap_new3(int w, int h); +QBitmap* QBitmap_new4(QSize* param1); +QBitmap* QBitmap_new5(struct miqt_string fileName); +QBitmap* QBitmap_new6(QBitmap* other); +QBitmap* QBitmap_new7(struct miqt_string fileName, const char* format); +void QBitmap_virtbase(QBitmap* src, QPixmap** outptr_QPixmap); void QBitmap_OperatorAssign(QBitmap* self, QBitmap* other); void QBitmap_OperatorAssignWithQPixmap(QBitmap* self, QPixmap* param1); void QBitmap_Swap(QBitmap* self, QBitmap* other); diff --git a/qt/gen_qboxlayout.cpp b/qt/gen_qboxlayout.cpp index accd8b56..f4137045 100644 --- a/qt/gen_qboxlayout.cpp +++ b/qt/gen_qboxlayout.cpp @@ -461,20 +461,16 @@ public: }; -void QBoxLayout_new(int param1, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQBoxLayout* ret = new MiqtVirtualQBoxLayout(static_cast(param1)); - *outptr_QBoxLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QBoxLayout* QBoxLayout_new(int param1) { + return new MiqtVirtualQBoxLayout(static_cast(param1)); } -void QBoxLayout_new2(int param1, QWidget* parent, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQBoxLayout* ret = new MiqtVirtualQBoxLayout(static_cast(param1), parent); - *outptr_QBoxLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QBoxLayout* QBoxLayout_new2(int param1, QWidget* parent) { + return new MiqtVirtualQBoxLayout(static_cast(param1), parent); +} + +void QBoxLayout_virtbase(QBoxLayout* src, QLayout** outptr_QLayout) { + *outptr_QLayout = static_cast(src); } QMetaObject* QBoxLayout_MetaObject(const QBoxLayout* self) { @@ -1185,22 +1181,16 @@ public: }; -void QHBoxLayout_new(QWidget* parent, QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQHBoxLayout* ret = new MiqtVirtualQHBoxLayout(parent); - *outptr_QHBoxLayout = ret; - *outptr_QBoxLayout = static_cast(ret); - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QHBoxLayout* QHBoxLayout_new(QWidget* parent) { + return new MiqtVirtualQHBoxLayout(parent); } -void QHBoxLayout_new2(QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQHBoxLayout* ret = new MiqtVirtualQHBoxLayout(); - *outptr_QHBoxLayout = ret; - *outptr_QBoxLayout = static_cast(ret); - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QHBoxLayout* QHBoxLayout_new2() { + return new MiqtVirtualQHBoxLayout(); +} + +void QHBoxLayout_virtbase(QHBoxLayout* src, QBoxLayout** outptr_QBoxLayout) { + *outptr_QBoxLayout = static_cast(src); } QMetaObject* QHBoxLayout_MetaObject(const QHBoxLayout* self) { @@ -1697,22 +1687,16 @@ public: }; -void QVBoxLayout_new(QWidget* parent, QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQVBoxLayout* ret = new MiqtVirtualQVBoxLayout(parent); - *outptr_QVBoxLayout = ret; - *outptr_QBoxLayout = static_cast(ret); - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QVBoxLayout* QVBoxLayout_new(QWidget* parent) { + return new MiqtVirtualQVBoxLayout(parent); } -void QVBoxLayout_new2(QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQVBoxLayout* ret = new MiqtVirtualQVBoxLayout(); - *outptr_QVBoxLayout = ret; - *outptr_QBoxLayout = static_cast(ret); - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QVBoxLayout* QVBoxLayout_new2() { + return new MiqtVirtualQVBoxLayout(); +} + +void QVBoxLayout_virtbase(QVBoxLayout* src, QBoxLayout** outptr_QBoxLayout) { + *outptr_QBoxLayout = static_cast(src); } QMetaObject* QVBoxLayout_MetaObject(const QVBoxLayout* self) { diff --git a/qt/gen_qboxlayout.go b/qt/gen_qboxlayout.go index eb76b001..f8438c8e 100644 --- a/qt/gen_qboxlayout.go +++ b/qt/gen_qboxlayout.go @@ -46,46 +46,34 @@ func (this *QBoxLayout) UnsafePointer() unsafe.Pointer { } // newQBoxLayout constructs the type using only CGO pointers. -func newQBoxLayout(h *C.QBoxLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QBoxLayout { +func newQBoxLayout(h *C.QBoxLayout) *QBoxLayout { if h == nil { return nil } + var outptr_QLayout *C.QLayout = nil + C.QBoxLayout_virtbase(h, &outptr_QLayout) + return &QBoxLayout{h: h, - QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} + QLayout: newQLayout(outptr_QLayout)} } // UnsafeNewQBoxLayout constructs the type using only unsafe pointers. -func UnsafeNewQBoxLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QBoxLayout { - if h == nil { - return nil - } - - return &QBoxLayout{h: (*C.QBoxLayout)(h), - QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} +func UnsafeNewQBoxLayout(h unsafe.Pointer) *QBoxLayout { + return newQBoxLayout((*C.QBoxLayout)(h)) } // NewQBoxLayout constructs a new QBoxLayout object. func NewQBoxLayout(param1 QBoxLayout__Direction) *QBoxLayout { - var outptr_QBoxLayout *C.QBoxLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QBoxLayout_new((C.int)(param1), &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQBoxLayout(outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQBoxLayout(C.QBoxLayout_new((C.int)(param1))) ret.isSubclass = true return ret } // NewQBoxLayout2 constructs a new QBoxLayout object. func NewQBoxLayout2(param1 QBoxLayout__Direction, parent *QWidget) *QBoxLayout { - var outptr_QBoxLayout *C.QBoxLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QBoxLayout_new2((C.int)(param1), parent.cPointer(), &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQBoxLayout(outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQBoxLayout(C.QBoxLayout_new2((C.int)(param1), parent.cPointer())) ret.isSubclass = true return ret } @@ -722,7 +710,7 @@ func miqt_exec_callback_QBoxLayout_IndexOf(self *C.QBoxLayout, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(param1, nil, nil) + slotval1 := newQWidget(param1) virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_IndexOf, slotval1) @@ -782,7 +770,7 @@ func miqt_exec_callback_QBoxLayout_ControlTypes(self *C.QBoxLayout, cb C.intptr_ func (this *QBoxLayout) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QBoxLayout_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QBoxLayout_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QBoxLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -825,7 +813,7 @@ func miqt_exec_callback_QBoxLayout_ChildEvent(self *C.QBoxLayout, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(e, nil) + slotval1 := newQChildEvent(e) gofunc((&QBoxLayout{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -866,48 +854,34 @@ func (this *QHBoxLayout) UnsafePointer() unsafe.Pointer { } // newQHBoxLayout constructs the type using only CGO pointers. -func newQHBoxLayout(h *C.QHBoxLayout, h_QBoxLayout *C.QBoxLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QHBoxLayout { +func newQHBoxLayout(h *C.QHBoxLayout) *QHBoxLayout { if h == nil { return nil } + var outptr_QBoxLayout *C.QBoxLayout = nil + C.QHBoxLayout_virtbase(h, &outptr_QBoxLayout) + return &QHBoxLayout{h: h, - QBoxLayout: newQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} + QBoxLayout: newQBoxLayout(outptr_QBoxLayout)} } // UnsafeNewQHBoxLayout constructs the type using only unsafe pointers. -func UnsafeNewQHBoxLayout(h unsafe.Pointer, h_QBoxLayout unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QHBoxLayout { - if h == nil { - return nil - } - - return &QHBoxLayout{h: (*C.QHBoxLayout)(h), - QBoxLayout: UnsafeNewQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} +func UnsafeNewQHBoxLayout(h unsafe.Pointer) *QHBoxLayout { + return newQHBoxLayout((*C.QHBoxLayout)(h)) } // NewQHBoxLayout constructs a new QHBoxLayout object. func NewQHBoxLayout(parent *QWidget) *QHBoxLayout { - var outptr_QHBoxLayout *C.QHBoxLayout = nil - var outptr_QBoxLayout *C.QBoxLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QHBoxLayout_new(parent.cPointer(), &outptr_QHBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQHBoxLayout(outptr_QHBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQHBoxLayout(C.QHBoxLayout_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQHBoxLayout2 constructs a new QHBoxLayout object. func NewQHBoxLayout2() *QHBoxLayout { - var outptr_QHBoxLayout *C.QHBoxLayout = nil - var outptr_QBoxLayout *C.QBoxLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QHBoxLayout_new2(&outptr_QHBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQHBoxLayout(outptr_QHBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQHBoxLayout(C.QHBoxLayout_new2()) ret.isSubclass = true return ret } @@ -1362,48 +1336,34 @@ func (this *QVBoxLayout) UnsafePointer() unsafe.Pointer { } // newQVBoxLayout constructs the type using only CGO pointers. -func newQVBoxLayout(h *C.QVBoxLayout, h_QBoxLayout *C.QBoxLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QVBoxLayout { +func newQVBoxLayout(h *C.QVBoxLayout) *QVBoxLayout { if h == nil { return nil } + var outptr_QBoxLayout *C.QBoxLayout = nil + C.QVBoxLayout_virtbase(h, &outptr_QBoxLayout) + return &QVBoxLayout{h: h, - QBoxLayout: newQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} + QBoxLayout: newQBoxLayout(outptr_QBoxLayout)} } // UnsafeNewQVBoxLayout constructs the type using only unsafe pointers. -func UnsafeNewQVBoxLayout(h unsafe.Pointer, h_QBoxLayout unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QVBoxLayout { - if h == nil { - return nil - } - - return &QVBoxLayout{h: (*C.QVBoxLayout)(h), - QBoxLayout: UnsafeNewQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} +func UnsafeNewQVBoxLayout(h unsafe.Pointer) *QVBoxLayout { + return newQVBoxLayout((*C.QVBoxLayout)(h)) } // NewQVBoxLayout constructs a new QVBoxLayout object. func NewQVBoxLayout(parent *QWidget) *QVBoxLayout { - var outptr_QVBoxLayout *C.QVBoxLayout = nil - var outptr_QBoxLayout *C.QBoxLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QVBoxLayout_new(parent.cPointer(), &outptr_QVBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQVBoxLayout(outptr_QVBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQVBoxLayout(C.QVBoxLayout_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQVBoxLayout2 constructs a new QVBoxLayout object. func NewQVBoxLayout2() *QVBoxLayout { - var outptr_QVBoxLayout *C.QVBoxLayout = nil - var outptr_QBoxLayout *C.QBoxLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QVBoxLayout_new2(&outptr_QVBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQVBoxLayout(outptr_QVBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQVBoxLayout(C.QVBoxLayout_new2()) ret.isSubclass = true return ret } diff --git a/qt/gen_qboxlayout.h b/qt/gen_qboxlayout.h index b79265f6..03310e42 100644 --- a/qt/gen_qboxlayout.h +++ b/qt/gen_qboxlayout.h @@ -42,8 +42,9 @@ typedef struct QVBoxLayout QVBoxLayout; typedef struct QWidget QWidget; #endif -void QBoxLayout_new(int param1, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QBoxLayout_new2(int param1, QWidget* parent, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +QBoxLayout* QBoxLayout_new(int param1); +QBoxLayout* QBoxLayout_new2(int param1, QWidget* parent); +void QBoxLayout_virtbase(QBoxLayout* src, QLayout** outptr_QLayout); QMetaObject* QBoxLayout_MetaObject(const QBoxLayout* self); void* QBoxLayout_Metacast(QBoxLayout* self, const char* param1); struct miqt_string QBoxLayout_Tr(const char* s); @@ -133,8 +134,9 @@ void QBoxLayout_override_virtual_ChildEvent(void* self, intptr_t slot); void QBoxLayout_virtualbase_ChildEvent(void* self, QChildEvent* e); void QBoxLayout_Delete(QBoxLayout* self, bool isSubclass); -void QHBoxLayout_new(QWidget* parent, QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QHBoxLayout_new2(QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +QHBoxLayout* QHBoxLayout_new(QWidget* parent); +QHBoxLayout* QHBoxLayout_new2(); +void QHBoxLayout_virtbase(QHBoxLayout* src, QBoxLayout** outptr_QBoxLayout); QMetaObject* QHBoxLayout_MetaObject(const QHBoxLayout* self); void* QHBoxLayout_Metacast(QHBoxLayout* self, const char* param1); struct miqt_string QHBoxLayout_Tr(const char* s); @@ -171,8 +173,9 @@ void QHBoxLayout_override_virtual_SetGeometry(void* self, intptr_t slot); void QHBoxLayout_virtualbase_SetGeometry(void* self, QRect* geometry); void QHBoxLayout_Delete(QHBoxLayout* self, bool isSubclass); -void QVBoxLayout_new(QWidget* parent, QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QVBoxLayout_new2(QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +QVBoxLayout* QVBoxLayout_new(QWidget* parent); +QVBoxLayout* QVBoxLayout_new2(); +void QVBoxLayout_virtbase(QVBoxLayout* src, QBoxLayout** outptr_QBoxLayout); QMetaObject* QVBoxLayout_MetaObject(const QVBoxLayout* self); void* QVBoxLayout_Metacast(QVBoxLayout* self, const char* param1); struct miqt_string QVBoxLayout_Tr(const char* s); diff --git a/qt/gen_qbrush.cpp b/qt/gen_qbrush.cpp index cdfa0753..b76d238c 100644 --- a/qt/gen_qbrush.cpp +++ b/qt/gen_qbrush.cpp @@ -17,64 +17,52 @@ #include "gen_qbrush.h" #include "_cgo_export.h" -void QBrush_new(QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(); - *outptr_QBrush = ret; +QBrush* QBrush_new() { + return new QBrush(); } -void QBrush_new2(int bs, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(static_cast(bs)); - *outptr_QBrush = ret; +QBrush* QBrush_new2(int bs) { + return new QBrush(static_cast(bs)); } -void QBrush_new3(QColor* color, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(*color); - *outptr_QBrush = ret; +QBrush* QBrush_new3(QColor* color) { + return new QBrush(*color); } -void QBrush_new4(int color, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(static_cast(color)); - *outptr_QBrush = ret; +QBrush* QBrush_new4(int color) { + return new QBrush(static_cast(color)); } -void QBrush_new5(QColor* color, QPixmap* pixmap, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(*color, *pixmap); - *outptr_QBrush = ret; +QBrush* QBrush_new5(QColor* color, QPixmap* pixmap) { + return new QBrush(*color, *pixmap); } -void QBrush_new6(int color, QPixmap* pixmap, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(static_cast(color), *pixmap); - *outptr_QBrush = ret; +QBrush* QBrush_new6(int color, QPixmap* pixmap) { + return new QBrush(static_cast(color), *pixmap); } -void QBrush_new7(QPixmap* pixmap, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(*pixmap); - *outptr_QBrush = ret; +QBrush* QBrush_new7(QPixmap* pixmap) { + return new QBrush(*pixmap); } -void QBrush_new8(QImage* image, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(*image); - *outptr_QBrush = ret; +QBrush* QBrush_new8(QImage* image) { + return new QBrush(*image); } -void QBrush_new9(QBrush* brush, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(*brush); - *outptr_QBrush = ret; +QBrush* QBrush_new9(QBrush* brush) { + return new QBrush(*brush); } -void QBrush_new10(QGradient* gradient, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(*gradient); - *outptr_QBrush = ret; +QBrush* QBrush_new10(QGradient* gradient) { + return new QBrush(*gradient); } -void QBrush_new11(QColor* color, int bs, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(*color, static_cast(bs)); - *outptr_QBrush = ret; +QBrush* QBrush_new11(QColor* color, int bs) { + return new QBrush(*color, static_cast(bs)); } -void QBrush_new12(int color, int bs, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(static_cast(color), static_cast(bs)); - *outptr_QBrush = ret; +QBrush* QBrush_new12(int color, int bs) { + return new QBrush(static_cast(color), static_cast(bs)); } void QBrush_OperatorAssign(QBrush* self, QBrush* brush) { @@ -170,9 +158,8 @@ void QBrush_Delete(QBrush* self, bool isSubclass) { } } -void QBrushData_new(QBrushData* param1, QBrushData** outptr_QBrushData) { - QBrushData* ret = new QBrushData(*param1); - *outptr_QBrushData = ret; +QBrushData* QBrushData_new(QBrushData* param1) { + return new QBrushData(*param1); } void QBrushData_OperatorAssign(QBrushData* self, QBrushData* param1) { @@ -187,19 +174,16 @@ void QBrushData_Delete(QBrushData* self, bool isSubclass) { } } -void QGradient_new(QGradient** outptr_QGradient) { - QGradient* ret = new QGradient(); - *outptr_QGradient = ret; +QGradient* QGradient_new() { + return new QGradient(); } -void QGradient_new2(int param1, QGradient** outptr_QGradient) { - QGradient* ret = new QGradient(static_cast(param1)); - *outptr_QGradient = ret; +QGradient* QGradient_new2(int param1) { + return new QGradient(static_cast(param1)); } -void QGradient_new3(QGradient* param1, QGradient** outptr_QGradient) { - QGradient* ret = new QGradient(*param1); - *outptr_QGradient = ret; +QGradient* QGradient_new3(QGradient* param1) { + return new QGradient(*param1); } int QGradient_Type(const QGradient* self) { @@ -292,28 +276,24 @@ void QGradient_Delete(QGradient* self, bool isSubclass) { } } -void QLinearGradient_new(QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { - QLinearGradient* ret = new QLinearGradient(); - *outptr_QLinearGradient = ret; - *outptr_QGradient = static_cast(ret); +QLinearGradient* QLinearGradient_new() { + return new QLinearGradient(); } -void QLinearGradient_new2(QPointF* start, QPointF* finalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { - QLinearGradient* ret = new QLinearGradient(*start, *finalStop); - *outptr_QLinearGradient = ret; - *outptr_QGradient = static_cast(ret); +QLinearGradient* QLinearGradient_new2(QPointF* start, QPointF* finalStop) { + return new QLinearGradient(*start, *finalStop); } -void QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { - QLinearGradient* ret = new QLinearGradient(static_cast(xStart), static_cast(yStart), static_cast(xFinalStop), static_cast(yFinalStop)); - *outptr_QLinearGradient = ret; - *outptr_QGradient = static_cast(ret); +QLinearGradient* QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop) { + return new QLinearGradient(static_cast(xStart), static_cast(yStart), static_cast(xFinalStop), static_cast(yFinalStop)); } -void QLinearGradient_new4(QLinearGradient* param1, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { - QLinearGradient* ret = new QLinearGradient(*param1); - *outptr_QLinearGradient = ret; - *outptr_QGradient = static_cast(ret); +QLinearGradient* QLinearGradient_new4(QLinearGradient* param1) { + return new QLinearGradient(*param1); +} + +void QLinearGradient_virtbase(QLinearGradient* src, QGradient** outptr_QGradient) { + *outptr_QGradient = static_cast(src); } QPointF* QLinearGradient_Start(const QLinearGradient* self) { @@ -348,52 +328,40 @@ void QLinearGradient_Delete(QLinearGradient* self, bool isSubclass) { } } -void QRadialGradient_new(QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new() { + return new QRadialGradient(); } -void QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(*center, static_cast(radius), *focalPoint); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint) { + return new QRadialGradient(*center, static_cast(radius), *focalPoint); } -void QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius), static_cast(fx), static_cast(fy)); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy) { + return new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius), static_cast(fx), static_cast(fy)); } -void QRadialGradient_new4(QPointF* center, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(*center, static_cast(radius)); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new4(QPointF* center, double radius) { + return new QRadialGradient(*center, static_cast(radius)); } -void QRadialGradient_new5(double cx, double cy, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius)); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new5(double cx, double cy, double radius) { + return new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius)); } -void QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(*center, static_cast(centerRadius), *focalPoint, static_cast(focalRadius)); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius) { + return new QRadialGradient(*center, static_cast(centerRadius), *focalPoint, static_cast(focalRadius)); } -void QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(centerRadius), static_cast(fx), static_cast(fy), static_cast(focalRadius)); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius) { + return new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(centerRadius), static_cast(fx), static_cast(fy), static_cast(focalRadius)); } -void QRadialGradient_new8(QRadialGradient* param1, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(*param1); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new8(QRadialGradient* param1) { + return new QRadialGradient(*param1); +} + +void QRadialGradient_virtbase(QRadialGradient* src, QGradient** outptr_QGradient) { + *outptr_QGradient = static_cast(src); } QPointF* QRadialGradient_Center(const QRadialGradient* self) { @@ -455,28 +423,24 @@ void QRadialGradient_Delete(QRadialGradient* self, bool isSubclass) { } } -void QConicalGradient_new(QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { - QConicalGradient* ret = new QConicalGradient(); - *outptr_QConicalGradient = ret; - *outptr_QGradient = static_cast(ret); +QConicalGradient* QConicalGradient_new() { + return new QConicalGradient(); } -void QConicalGradient_new2(QPointF* center, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { - QConicalGradient* ret = new QConicalGradient(*center, static_cast(startAngle)); - *outptr_QConicalGradient = ret; - *outptr_QGradient = static_cast(ret); +QConicalGradient* QConicalGradient_new2(QPointF* center, double startAngle) { + return new QConicalGradient(*center, static_cast(startAngle)); } -void QConicalGradient_new3(double cx, double cy, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { - QConicalGradient* ret = new QConicalGradient(static_cast(cx), static_cast(cy), static_cast(startAngle)); - *outptr_QConicalGradient = ret; - *outptr_QGradient = static_cast(ret); +QConicalGradient* QConicalGradient_new3(double cx, double cy, double startAngle) { + return new QConicalGradient(static_cast(cx), static_cast(cy), static_cast(startAngle)); } -void QConicalGradient_new4(QConicalGradient* param1, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { - QConicalGradient* ret = new QConicalGradient(*param1); - *outptr_QConicalGradient = ret; - *outptr_QGradient = static_cast(ret); +QConicalGradient* QConicalGradient_new4(QConicalGradient* param1) { + return new QConicalGradient(*param1); +} + +void QConicalGradient_virtbase(QConicalGradient* src, QGradient** outptr_QGradient) { + *outptr_QGradient = static_cast(src); } QPointF* QConicalGradient_Center(const QConicalGradient* self) { @@ -508,9 +472,8 @@ void QConicalGradient_Delete(QConicalGradient* self, bool isSubclass) { } } -void QGradient__QGradientData_new(QGradient__QGradientData* param1, QGradient__QGradientData** outptr_QGradient__QGradientData) { - QGradient::QGradientData* ret = new QGradient::QGradientData(*param1); - *outptr_QGradient__QGradientData = ret; +QGradient__QGradientData* QGradient__QGradientData_new(QGradient__QGradientData* param1) { + return new QGradient::QGradientData(*param1); } void QGradient__QGradientData_OperatorAssign(QGradient__QGradientData* self, QGradient__QGradientData* param1) { diff --git a/qt/gen_qbrush.go b/qt/gen_qbrush.go index caf23fc8..0283fb28 100644 --- a/qt/gen_qbrush.go +++ b/qt/gen_qbrush.go @@ -244,134 +244,107 @@ func newQBrush(h *C.QBrush) *QBrush { if h == nil { return nil } + return &QBrush{h: h} } // UnsafeNewQBrush constructs the type using only unsafe pointers. func UnsafeNewQBrush(h unsafe.Pointer) *QBrush { - if h == nil { - return nil - } - - return &QBrush{h: (*C.QBrush)(h)} + return newQBrush((*C.QBrush)(h)) } // NewQBrush constructs a new QBrush object. func NewQBrush() *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new(&outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new()) ret.isSubclass = true return ret } // NewQBrush2 constructs a new QBrush object. func NewQBrush2(bs BrushStyle) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new2((C.int)(bs), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new2((C.int)(bs))) ret.isSubclass = true return ret } // NewQBrush3 constructs a new QBrush object. func NewQBrush3(color *QColor) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new3(color.cPointer(), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new3(color.cPointer())) ret.isSubclass = true return ret } // NewQBrush4 constructs a new QBrush object. func NewQBrush4(color GlobalColor) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new4((C.int)(color), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new4((C.int)(color))) ret.isSubclass = true return ret } // NewQBrush5 constructs a new QBrush object. func NewQBrush5(color *QColor, pixmap *QPixmap) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new5(color.cPointer(), pixmap.cPointer(), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new5(color.cPointer(), pixmap.cPointer())) ret.isSubclass = true return ret } // NewQBrush6 constructs a new QBrush object. func NewQBrush6(color GlobalColor, pixmap *QPixmap) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new6((C.int)(color), pixmap.cPointer(), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new6((C.int)(color), pixmap.cPointer())) ret.isSubclass = true return ret } // NewQBrush7 constructs a new QBrush object. func NewQBrush7(pixmap *QPixmap) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new7(pixmap.cPointer(), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new7(pixmap.cPointer())) ret.isSubclass = true return ret } // NewQBrush8 constructs a new QBrush object. func NewQBrush8(image *QImage) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new8(image.cPointer(), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new8(image.cPointer())) ret.isSubclass = true return ret } // NewQBrush9 constructs a new QBrush object. func NewQBrush9(brush *QBrush) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new9(brush.cPointer(), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new9(brush.cPointer())) ret.isSubclass = true return ret } // NewQBrush10 constructs a new QBrush object. func NewQBrush10(gradient *QGradient) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new10(gradient.cPointer(), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new10(gradient.cPointer())) ret.isSubclass = true return ret } // NewQBrush11 constructs a new QBrush object. func NewQBrush11(color *QColor, bs BrushStyle) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new11(color.cPointer(), (C.int)(bs), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new11(color.cPointer(), (C.int)(bs))) ret.isSubclass = true return ret } // NewQBrush12 constructs a new QBrush object. func NewQBrush12(color GlobalColor, bs BrushStyle) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new12((C.int)(color), (C.int)(bs), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new12((C.int)(color), (C.int)(bs))) ret.isSubclass = true return ret } @@ -411,7 +384,7 @@ func (this *QBrush) SetTransform(transform *QTransform) { } func (this *QBrush) Texture() *QPixmap { - _goptr := newQPixmap(C.QBrush_Texture(this.h), nil) + _goptr := newQPixmap(C.QBrush_Texture(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -421,7 +394,7 @@ func (this *QBrush) SetTexture(pixmap *QPixmap) { } func (this *QBrush) TextureImage() *QImage { - _goptr := newQImage(C.QBrush_TextureImage(this.h), nil) + _goptr := newQImage(C.QBrush_TextureImage(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -500,24 +473,19 @@ func newQBrushData(h *C.QBrushData) *QBrushData { if h == nil { return nil } + return &QBrushData{h: h} } // UnsafeNewQBrushData constructs the type using only unsafe pointers. func UnsafeNewQBrushData(h unsafe.Pointer) *QBrushData { - if h == nil { - return nil - } - - return &QBrushData{h: (*C.QBrushData)(h)} + return newQBrushData((*C.QBrushData)(h)) } // NewQBrushData constructs a new QBrushData object. func NewQBrushData(param1 *QBrushData) *QBrushData { - var outptr_QBrushData *C.QBrushData = nil - C.QBrushData_new(param1.cPointer(), &outptr_QBrushData) - ret := newQBrushData(outptr_QBrushData) + ret := newQBrushData(C.QBrushData_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -564,44 +532,35 @@ func newQGradient(h *C.QGradient) *QGradient { if h == nil { return nil } + return &QGradient{h: h} } // UnsafeNewQGradient constructs the type using only unsafe pointers. func UnsafeNewQGradient(h unsafe.Pointer) *QGradient { - if h == nil { - return nil - } - - return &QGradient{h: (*C.QGradient)(h)} + return newQGradient((*C.QGradient)(h)) } // NewQGradient constructs a new QGradient object. func NewQGradient() *QGradient { - var outptr_QGradient *C.QGradient = nil - C.QGradient_new(&outptr_QGradient) - ret := newQGradient(outptr_QGradient) + ret := newQGradient(C.QGradient_new()) ret.isSubclass = true return ret } // NewQGradient2 constructs a new QGradient object. func NewQGradient2(param1 QGradient__Preset) *QGradient { - var outptr_QGradient *C.QGradient = nil - C.QGradient_new2((C.int)(param1), &outptr_QGradient) - ret := newQGradient(outptr_QGradient) + ret := newQGradient(C.QGradient_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQGradient3 constructs a new QGradient object. func NewQGradient3(param1 *QGradient) *QGradient { - var outptr_QGradient *C.QGradient = nil - C.QGradient_new3(param1.cPointer(), &outptr_QGradient) - ret := newQGradient(outptr_QGradient) + ret := newQGradient(C.QGradient_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -733,64 +692,50 @@ func (this *QLinearGradient) UnsafePointer() unsafe.Pointer { } // newQLinearGradient constructs the type using only CGO pointers. -func newQLinearGradient(h *C.QLinearGradient, h_QGradient *C.QGradient) *QLinearGradient { +func newQLinearGradient(h *C.QLinearGradient) *QLinearGradient { if h == nil { return nil } + var outptr_QGradient *C.QGradient = nil + C.QLinearGradient_virtbase(h, &outptr_QGradient) + return &QLinearGradient{h: h, - QGradient: newQGradient(h_QGradient)} + QGradient: newQGradient(outptr_QGradient)} } // UnsafeNewQLinearGradient constructs the type using only unsafe pointers. -func UnsafeNewQLinearGradient(h unsafe.Pointer, h_QGradient unsafe.Pointer) *QLinearGradient { - if h == nil { - return nil - } - - return &QLinearGradient{h: (*C.QLinearGradient)(h), - QGradient: UnsafeNewQGradient(h_QGradient)} +func UnsafeNewQLinearGradient(h unsafe.Pointer) *QLinearGradient { + return newQLinearGradient((*C.QLinearGradient)(h)) } // NewQLinearGradient constructs a new QLinearGradient object. func NewQLinearGradient() *QLinearGradient { - var outptr_QLinearGradient *C.QLinearGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QLinearGradient_new(&outptr_QLinearGradient, &outptr_QGradient) - ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret := newQLinearGradient(C.QLinearGradient_new()) ret.isSubclass = true return ret } // NewQLinearGradient2 constructs a new QLinearGradient object. func NewQLinearGradient2(start *QPointF, finalStop *QPointF) *QLinearGradient { - var outptr_QLinearGradient *C.QLinearGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QLinearGradient_new2(start.cPointer(), finalStop.cPointer(), &outptr_QLinearGradient, &outptr_QGradient) - ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret := newQLinearGradient(C.QLinearGradient_new2(start.cPointer(), finalStop.cPointer())) ret.isSubclass = true return ret } // NewQLinearGradient3 constructs a new QLinearGradient object. func NewQLinearGradient3(xStart float64, yStart float64, xFinalStop float64, yFinalStop float64) *QLinearGradient { - var outptr_QLinearGradient *C.QLinearGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QLinearGradient_new3((C.double)(xStart), (C.double)(yStart), (C.double)(xFinalStop), (C.double)(yFinalStop), &outptr_QLinearGradient, &outptr_QGradient) - ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret := newQLinearGradient(C.QLinearGradient_new3((C.double)(xStart), (C.double)(yStart), (C.double)(xFinalStop), (C.double)(yFinalStop))) ret.isSubclass = true return ret } // NewQLinearGradient4 constructs a new QLinearGradient object. func NewQLinearGradient4(param1 *QLinearGradient) *QLinearGradient { - var outptr_QLinearGradient *C.QLinearGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QLinearGradient_new4(param1.cPointer(), &outptr_QLinearGradient, &outptr_QGradient) - ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret := newQLinearGradient(C.QLinearGradient_new4(param1.cPointer())) ret.isSubclass = true return ret } @@ -858,108 +803,82 @@ func (this *QRadialGradient) UnsafePointer() unsafe.Pointer { } // newQRadialGradient constructs the type using only CGO pointers. -func newQRadialGradient(h *C.QRadialGradient, h_QGradient *C.QGradient) *QRadialGradient { +func newQRadialGradient(h *C.QRadialGradient) *QRadialGradient { if h == nil { return nil } + var outptr_QGradient *C.QGradient = nil + C.QRadialGradient_virtbase(h, &outptr_QGradient) + return &QRadialGradient{h: h, - QGradient: newQGradient(h_QGradient)} + QGradient: newQGradient(outptr_QGradient)} } // UnsafeNewQRadialGradient constructs the type using only unsafe pointers. -func UnsafeNewQRadialGradient(h unsafe.Pointer, h_QGradient unsafe.Pointer) *QRadialGradient { - if h == nil { - return nil - } - - return &QRadialGradient{h: (*C.QRadialGradient)(h), - QGradient: UnsafeNewQGradient(h_QGradient)} +func UnsafeNewQRadialGradient(h unsafe.Pointer) *QRadialGradient { + return newQRadialGradient((*C.QRadialGradient)(h)) } // NewQRadialGradient constructs a new QRadialGradient object. func NewQRadialGradient() *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new(&outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new()) ret.isSubclass = true return ret } // NewQRadialGradient2 constructs a new QRadialGradient object. func NewQRadialGradient2(center *QPointF, radius float64, focalPoint *QPointF) *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new2(center.cPointer(), (C.double)(radius), focalPoint.cPointer(), &outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new2(center.cPointer(), (C.double)(radius), focalPoint.cPointer())) ret.isSubclass = true return ret } // NewQRadialGradient3 constructs a new QRadialGradient object. func NewQRadialGradient3(cx float64, cy float64, radius float64, fx float64, fy float64) *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(radius), (C.double)(fx), (C.double)(fy), &outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(radius), (C.double)(fx), (C.double)(fy))) ret.isSubclass = true return ret } // NewQRadialGradient4 constructs a new QRadialGradient object. func NewQRadialGradient4(center *QPointF, radius float64) *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new4(center.cPointer(), (C.double)(radius), &outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new4(center.cPointer(), (C.double)(radius))) ret.isSubclass = true return ret } // NewQRadialGradient5 constructs a new QRadialGradient object. func NewQRadialGradient5(cx float64, cy float64, radius float64) *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new5((C.double)(cx), (C.double)(cy), (C.double)(radius), &outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new5((C.double)(cx), (C.double)(cy), (C.double)(radius))) ret.isSubclass = true return ret } // NewQRadialGradient6 constructs a new QRadialGradient object. func NewQRadialGradient6(center *QPointF, centerRadius float64, focalPoint *QPointF, focalRadius float64) *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new6(center.cPointer(), (C.double)(centerRadius), focalPoint.cPointer(), (C.double)(focalRadius), &outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new6(center.cPointer(), (C.double)(centerRadius), focalPoint.cPointer(), (C.double)(focalRadius))) ret.isSubclass = true return ret } // NewQRadialGradient7 constructs a new QRadialGradient object. func NewQRadialGradient7(cx float64, cy float64, centerRadius float64, fx float64, fy float64, focalRadius float64) *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new7((C.double)(cx), (C.double)(cy), (C.double)(centerRadius), (C.double)(fx), (C.double)(fy), (C.double)(focalRadius), &outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new7((C.double)(cx), (C.double)(cy), (C.double)(centerRadius), (C.double)(fx), (C.double)(fy), (C.double)(focalRadius))) ret.isSubclass = true return ret } // NewQRadialGradient8 constructs a new QRadialGradient object. func NewQRadialGradient8(param1 *QRadialGradient) *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new8(param1.cPointer(), &outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new8(param1.cPointer())) ret.isSubclass = true return ret } @@ -1051,64 +970,50 @@ func (this *QConicalGradient) UnsafePointer() unsafe.Pointer { } // newQConicalGradient constructs the type using only CGO pointers. -func newQConicalGradient(h *C.QConicalGradient, h_QGradient *C.QGradient) *QConicalGradient { +func newQConicalGradient(h *C.QConicalGradient) *QConicalGradient { if h == nil { return nil } + var outptr_QGradient *C.QGradient = nil + C.QConicalGradient_virtbase(h, &outptr_QGradient) + return &QConicalGradient{h: h, - QGradient: newQGradient(h_QGradient)} + QGradient: newQGradient(outptr_QGradient)} } // UnsafeNewQConicalGradient constructs the type using only unsafe pointers. -func UnsafeNewQConicalGradient(h unsafe.Pointer, h_QGradient unsafe.Pointer) *QConicalGradient { - if h == nil { - return nil - } - - return &QConicalGradient{h: (*C.QConicalGradient)(h), - QGradient: UnsafeNewQGradient(h_QGradient)} +func UnsafeNewQConicalGradient(h unsafe.Pointer) *QConicalGradient { + return newQConicalGradient((*C.QConicalGradient)(h)) } // NewQConicalGradient constructs a new QConicalGradient object. func NewQConicalGradient() *QConicalGradient { - var outptr_QConicalGradient *C.QConicalGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QConicalGradient_new(&outptr_QConicalGradient, &outptr_QGradient) - ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret := newQConicalGradient(C.QConicalGradient_new()) ret.isSubclass = true return ret } // NewQConicalGradient2 constructs a new QConicalGradient object. func NewQConicalGradient2(center *QPointF, startAngle float64) *QConicalGradient { - var outptr_QConicalGradient *C.QConicalGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QConicalGradient_new2(center.cPointer(), (C.double)(startAngle), &outptr_QConicalGradient, &outptr_QGradient) - ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret := newQConicalGradient(C.QConicalGradient_new2(center.cPointer(), (C.double)(startAngle))) ret.isSubclass = true return ret } // NewQConicalGradient3 constructs a new QConicalGradient object. func NewQConicalGradient3(cx float64, cy float64, startAngle float64) *QConicalGradient { - var outptr_QConicalGradient *C.QConicalGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QConicalGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(startAngle), &outptr_QConicalGradient, &outptr_QGradient) - ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret := newQConicalGradient(C.QConicalGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(startAngle))) ret.isSubclass = true return ret } // NewQConicalGradient4 constructs a new QConicalGradient object. func NewQConicalGradient4(param1 *QConicalGradient) *QConicalGradient { - var outptr_QConicalGradient *C.QConicalGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QConicalGradient_new4(param1.cPointer(), &outptr_QConicalGradient, &outptr_QGradient) - ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret := newQConicalGradient(C.QConicalGradient_new4(param1.cPointer())) ret.isSubclass = true return ret } @@ -1173,24 +1078,19 @@ func newQGradient__QGradientData(h *C.QGradient__QGradientData) *QGradient__QGra if h == nil { return nil } + return &QGradient__QGradientData{h: h} } // UnsafeNewQGradient__QGradientData constructs the type using only unsafe pointers. func UnsafeNewQGradient__QGradientData(h unsafe.Pointer) *QGradient__QGradientData { - if h == nil { - return nil - } - - return &QGradient__QGradientData{h: (*C.QGradient__QGradientData)(h)} + return newQGradient__QGradientData((*C.QGradient__QGradientData)(h)) } // NewQGradient__QGradientData constructs a new QGradient::QGradientData object. func NewQGradient__QGradientData(param1 *QGradient__QGradientData) *QGradient__QGradientData { - var outptr_QGradient__QGradientData *C.QGradient__QGradientData = nil - C.QGradient__QGradientData_new(param1.cPointer(), &outptr_QGradient__QGradientData) - ret := newQGradient__QGradientData(outptr_QGradient__QGradientData) + ret := newQGradient__QGradientData(C.QGradient__QGradientData_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qbrush.h b/qt/gen_qbrush.h index 75d2f179..c0fa8ff7 100644 --- a/qt/gen_qbrush.h +++ b/qt/gen_qbrush.h @@ -48,18 +48,18 @@ typedef struct QRadialGradient QRadialGradient; typedef struct QTransform QTransform; #endif -void QBrush_new(QBrush** outptr_QBrush); -void QBrush_new2(int bs, QBrush** outptr_QBrush); -void QBrush_new3(QColor* color, QBrush** outptr_QBrush); -void QBrush_new4(int color, QBrush** outptr_QBrush); -void QBrush_new5(QColor* color, QPixmap* pixmap, QBrush** outptr_QBrush); -void QBrush_new6(int color, QPixmap* pixmap, QBrush** outptr_QBrush); -void QBrush_new7(QPixmap* pixmap, QBrush** outptr_QBrush); -void QBrush_new8(QImage* image, QBrush** outptr_QBrush); -void QBrush_new9(QBrush* brush, QBrush** outptr_QBrush); -void QBrush_new10(QGradient* gradient, QBrush** outptr_QBrush); -void QBrush_new11(QColor* color, int bs, QBrush** outptr_QBrush); -void QBrush_new12(int color, int bs, QBrush** outptr_QBrush); +QBrush* QBrush_new(); +QBrush* QBrush_new2(int bs); +QBrush* QBrush_new3(QColor* color); +QBrush* QBrush_new4(int color); +QBrush* QBrush_new5(QColor* color, QPixmap* pixmap); +QBrush* QBrush_new6(int color, QPixmap* pixmap); +QBrush* QBrush_new7(QPixmap* pixmap); +QBrush* QBrush_new8(QImage* image); +QBrush* QBrush_new9(QBrush* brush); +QBrush* QBrush_new10(QGradient* gradient); +QBrush* QBrush_new11(QColor* color, int bs); +QBrush* QBrush_new12(int color, int bs); void QBrush_OperatorAssign(QBrush* self, QBrush* brush); void QBrush_Swap(QBrush* self, QBrush* other); int QBrush_Style(const QBrush* self); @@ -82,13 +82,13 @@ bool QBrush_OperatorNotEqual(const QBrush* self, QBrush* b); bool QBrush_IsDetached(const QBrush* self); void QBrush_Delete(QBrush* self, bool isSubclass); -void QBrushData_new(QBrushData* param1, QBrushData** outptr_QBrushData); +QBrushData* QBrushData_new(QBrushData* param1); void QBrushData_OperatorAssign(QBrushData* self, QBrushData* param1); void QBrushData_Delete(QBrushData* self, bool isSubclass); -void QGradient_new(QGradient** outptr_QGradient); -void QGradient_new2(int param1, QGradient** outptr_QGradient); -void QGradient_new3(QGradient* param1, QGradient** outptr_QGradient); +QGradient* QGradient_new(); +QGradient* QGradient_new2(int param1); +QGradient* QGradient_new3(QGradient* param1); int QGradient_Type(const QGradient* self); void QGradient_SetSpread(QGradient* self, int spread); int QGradient_Spread(const QGradient* self); @@ -103,10 +103,11 @@ bool QGradient_OperatorEqual(const QGradient* self, QGradient* gradient); bool QGradient_OperatorNotEqual(const QGradient* self, QGradient* other); void QGradient_Delete(QGradient* self, bool isSubclass); -void QLinearGradient_new(QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); -void QLinearGradient_new2(QPointF* start, QPointF* finalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); -void QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); -void QLinearGradient_new4(QLinearGradient* param1, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); +QLinearGradient* QLinearGradient_new(); +QLinearGradient* QLinearGradient_new2(QPointF* start, QPointF* finalStop); +QLinearGradient* QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop); +QLinearGradient* QLinearGradient_new4(QLinearGradient* param1); +void QLinearGradient_virtbase(QLinearGradient* src, QGradient** outptr_QGradient); QPointF* QLinearGradient_Start(const QLinearGradient* self); void QLinearGradient_SetStart(QLinearGradient* self, QPointF* start); void QLinearGradient_SetStart2(QLinearGradient* self, double x, double y); @@ -115,14 +116,15 @@ void QLinearGradient_SetFinalStop(QLinearGradient* self, QPointF* stop); void QLinearGradient_SetFinalStop2(QLinearGradient* self, double x, double y); void QLinearGradient_Delete(QLinearGradient* self, bool isSubclass); -void QRadialGradient_new(QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); -void QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); -void QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); -void QRadialGradient_new4(QPointF* center, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); -void QRadialGradient_new5(double cx, double cy, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); -void QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); -void QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); -void QRadialGradient_new8(QRadialGradient* param1, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +QRadialGradient* QRadialGradient_new(); +QRadialGradient* QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint); +QRadialGradient* QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy); +QRadialGradient* QRadialGradient_new4(QPointF* center, double radius); +QRadialGradient* QRadialGradient_new5(double cx, double cy, double radius); +QRadialGradient* QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius); +QRadialGradient* QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius); +QRadialGradient* QRadialGradient_new8(QRadialGradient* param1); +void QRadialGradient_virtbase(QRadialGradient* src, QGradient** outptr_QGradient); QPointF* QRadialGradient_Center(const QRadialGradient* self); void QRadialGradient_SetCenter(QRadialGradient* self, QPointF* center); void QRadialGradient_SetCenter2(QRadialGradient* self, double x, double y); @@ -137,10 +139,11 @@ double QRadialGradient_FocalRadius(const QRadialGradient* self); void QRadialGradient_SetFocalRadius(QRadialGradient* self, double radius); void QRadialGradient_Delete(QRadialGradient* self, bool isSubclass); -void QConicalGradient_new(QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); -void QConicalGradient_new2(QPointF* center, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); -void QConicalGradient_new3(double cx, double cy, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); -void QConicalGradient_new4(QConicalGradient* param1, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); +QConicalGradient* QConicalGradient_new(); +QConicalGradient* QConicalGradient_new2(QPointF* center, double startAngle); +QConicalGradient* QConicalGradient_new3(double cx, double cy, double startAngle); +QConicalGradient* QConicalGradient_new4(QConicalGradient* param1); +void QConicalGradient_virtbase(QConicalGradient* src, QGradient** outptr_QGradient); QPointF* QConicalGradient_Center(const QConicalGradient* self); void QConicalGradient_SetCenter(QConicalGradient* self, QPointF* center); void QConicalGradient_SetCenter2(QConicalGradient* self, double x, double y); @@ -148,7 +151,7 @@ double QConicalGradient_Angle(const QConicalGradient* self); void QConicalGradient_SetAngle(QConicalGradient* self, double angle); void QConicalGradient_Delete(QConicalGradient* self, bool isSubclass); -void QGradient__QGradientData_new(QGradient__QGradientData* param1, QGradient__QGradientData** outptr_QGradient__QGradientData); +QGradient__QGradientData* QGradient__QGradientData_new(QGradient__QGradientData* param1); void QGradient__QGradientData_OperatorAssign(QGradient__QGradientData* self, QGradient__QGradientData* param1); void QGradient__QGradientData_Delete(QGradient__QGradientData* self, bool isSubclass); diff --git a/qt/gen_qbuffer.cpp b/qt/gen_qbuffer.cpp index d8ee7187..16efe784 100644 --- a/qt/gen_qbuffer.cpp +++ b/qt/gen_qbuffer.cpp @@ -448,18 +448,16 @@ public: }; -void QBuffer_new(QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQBuffer* ret = new MiqtVirtualQBuffer(); - *outptr_QBuffer = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QBuffer* QBuffer_new() { + return new MiqtVirtualQBuffer(); } -void QBuffer_new2(QObject* parent, QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQBuffer* ret = new MiqtVirtualQBuffer(parent); - *outptr_QBuffer = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QBuffer* QBuffer_new2(QObject* parent) { + return new MiqtVirtualQBuffer(parent); +} + +void QBuffer_virtbase(QBuffer* src, QIODevice** outptr_QIODevice) { + *outptr_QIODevice = static_cast(src); } QMetaObject* QBuffer_MetaObject(const QBuffer* self) { diff --git a/qt/gen_qbuffer.go b/qt/gen_qbuffer.go index 7d3f42b9..d051e2f5 100644 --- a/qt/gen_qbuffer.go +++ b/qt/gen_qbuffer.go @@ -35,44 +35,34 @@ func (this *QBuffer) UnsafePointer() unsafe.Pointer { } // newQBuffer constructs the type using only CGO pointers. -func newQBuffer(h *C.QBuffer, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QBuffer { +func newQBuffer(h *C.QBuffer) *QBuffer { if h == nil { return nil } + var outptr_QIODevice *C.QIODevice = nil + C.QBuffer_virtbase(h, &outptr_QIODevice) + return &QBuffer{h: h, - QIODevice: newQIODevice(h_QIODevice, h_QObject)} + QIODevice: newQIODevice(outptr_QIODevice)} } // UnsafeNewQBuffer constructs the type using only unsafe pointers. -func UnsafeNewQBuffer(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QBuffer { - if h == nil { - return nil - } - - return &QBuffer{h: (*C.QBuffer)(h), - QIODevice: UnsafeNewQIODevice(h_QIODevice, h_QObject)} +func UnsafeNewQBuffer(h unsafe.Pointer) *QBuffer { + return newQBuffer((*C.QBuffer)(h)) } // NewQBuffer constructs a new QBuffer object. func NewQBuffer() *QBuffer { - var outptr_QBuffer *C.QBuffer = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QBuffer_new(&outptr_QBuffer, &outptr_QIODevice, &outptr_QObject) - ret := newQBuffer(outptr_QBuffer, outptr_QIODevice, outptr_QObject) + ret := newQBuffer(C.QBuffer_new()) ret.isSubclass = true return ret } // NewQBuffer2 constructs a new QBuffer object. func NewQBuffer2(parent *QObject) *QBuffer { - var outptr_QBuffer *C.QBuffer = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QBuffer_new2(parent.cPointer(), &outptr_QBuffer, &outptr_QIODevice, &outptr_QObject) - ret := newQBuffer(outptr_QBuffer, outptr_QIODevice, outptr_QObject) + ret := newQBuffer(C.QBuffer_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qbuffer.h b/qt/gen_qbuffer.h index 6a388d41..0a7bfd44 100644 --- a/qt/gen_qbuffer.h +++ b/qt/gen_qbuffer.h @@ -28,8 +28,9 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -void QBuffer_new(QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QBuffer_new2(QObject* parent, QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +QBuffer* QBuffer_new(); +QBuffer* QBuffer_new2(QObject* parent); +void QBuffer_virtbase(QBuffer* src, QIODevice** outptr_QIODevice); QMetaObject* QBuffer_MetaObject(const QBuffer* self); void* QBuffer_Metacast(QBuffer* self, const char* param1); struct miqt_string QBuffer_Tr(const char* s); diff --git a/qt/gen_qbuttongroup.cpp b/qt/gen_qbuttongroup.cpp index 2c2b97b4..c79827ff 100644 --- a/qt/gen_qbuttongroup.cpp +++ b/qt/gen_qbuttongroup.cpp @@ -195,16 +195,16 @@ public: }; -void QButtonGroup_new(QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject) { - MiqtVirtualQButtonGroup* ret = new MiqtVirtualQButtonGroup(); - *outptr_QButtonGroup = ret; - *outptr_QObject = static_cast(ret); +QButtonGroup* QButtonGroup_new() { + return new MiqtVirtualQButtonGroup(); } -void QButtonGroup_new2(QObject* parent, QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject) { - MiqtVirtualQButtonGroup* ret = new MiqtVirtualQButtonGroup(parent); - *outptr_QButtonGroup = ret; - *outptr_QObject = static_cast(ret); +QButtonGroup* QButtonGroup_new2(QObject* parent) { + return new MiqtVirtualQButtonGroup(parent); +} + +void QButtonGroup_virtbase(QButtonGroup* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QButtonGroup_MetaObject(const QButtonGroup* self) { diff --git a/qt/gen_qbuttongroup.go b/qt/gen_qbuttongroup.go index 6426f177..1513e5dd 100644 --- a/qt/gen_qbuttongroup.go +++ b/qt/gen_qbuttongroup.go @@ -35,42 +35,34 @@ func (this *QButtonGroup) UnsafePointer() unsafe.Pointer { } // newQButtonGroup constructs the type using only CGO pointers. -func newQButtonGroup(h *C.QButtonGroup, h_QObject *C.QObject) *QButtonGroup { +func newQButtonGroup(h *C.QButtonGroup) *QButtonGroup { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QButtonGroup_virtbase(h, &outptr_QObject) + return &QButtonGroup{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQButtonGroup constructs the type using only unsafe pointers. -func UnsafeNewQButtonGroup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QButtonGroup { - if h == nil { - return nil - } - - return &QButtonGroup{h: (*C.QButtonGroup)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQButtonGroup(h unsafe.Pointer) *QButtonGroup { + return newQButtonGroup((*C.QButtonGroup)(h)) } // NewQButtonGroup constructs a new QButtonGroup object. func NewQButtonGroup() *QButtonGroup { - var outptr_QButtonGroup *C.QButtonGroup = nil - var outptr_QObject *C.QObject = nil - C.QButtonGroup_new(&outptr_QButtonGroup, &outptr_QObject) - ret := newQButtonGroup(outptr_QButtonGroup, outptr_QObject) + ret := newQButtonGroup(C.QButtonGroup_new()) ret.isSubclass = true return ret } // NewQButtonGroup2 constructs a new QButtonGroup object. func NewQButtonGroup2(parent *QObject) *QButtonGroup { - var outptr_QButtonGroup *C.QButtonGroup = nil - var outptr_QObject *C.QObject = nil - C.QButtonGroup_new2(parent.cPointer(), &outptr_QButtonGroup, &outptr_QObject) - ret := newQButtonGroup(outptr_QButtonGroup, outptr_QObject) + ret := newQButtonGroup(C.QButtonGroup_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -124,17 +116,17 @@ func (this *QButtonGroup) Buttons() []*QAbstractButton { _ret := make([]*QAbstractButton, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractButton)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAbstractButton(_outCast[i], nil, nil, nil) + _ret[i] = newQAbstractButton(_outCast[i]) } return _ret } func (this *QButtonGroup) CheckedButton() *QAbstractButton { - return newQAbstractButton(C.QButtonGroup_CheckedButton(this.h), nil, nil, nil) + return newQAbstractButton(C.QButtonGroup_CheckedButton(this.h)) } func (this *QButtonGroup) Button(id int) *QAbstractButton { - return newQAbstractButton(C.QButtonGroup_Button(this.h, (C.int)(id)), nil, nil, nil) + return newQAbstractButton(C.QButtonGroup_Button(this.h, (C.int)(id))) } func (this *QButtonGroup) SetId(button *QAbstractButton, id int) { @@ -164,7 +156,7 @@ func miqt_exec_callback_QButtonGroup_ButtonClicked(cb C.intptr_t, param1 *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractButton(param1, nil, nil, nil) + slotval1 := newQAbstractButton(param1) gofunc(slotval1) } @@ -184,7 +176,7 @@ func miqt_exec_callback_QButtonGroup_ButtonPressed(cb C.intptr_t, param1 *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractButton(param1, nil, nil, nil) + slotval1 := newQAbstractButton(param1) gofunc(slotval1) } @@ -204,7 +196,7 @@ func miqt_exec_callback_QButtonGroup_ButtonReleased(cb C.intptr_t, param1 *C.QAb } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractButton(param1, nil, nil, nil) + slotval1 := newQAbstractButton(param1) gofunc(slotval1) } @@ -224,7 +216,7 @@ func miqt_exec_callback_QButtonGroup_ButtonToggled(cb C.intptr_t, param1 *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractButton(param1, nil, nil, nil) + slotval1 := newQAbstractButton(param1) slotval2 := (bool)(param2) @@ -521,7 +513,7 @@ func miqt_exec_callback_QButtonGroup_TimerEvent(self *C.QButtonGroup, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QButtonGroup{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -547,7 +539,7 @@ func miqt_exec_callback_QButtonGroup_ChildEvent(self *C.QButtonGroup, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QButtonGroup{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qbuttongroup.h b/qt/gen_qbuttongroup.h index e68fe82f..dca090d0 100644 --- a/qt/gen_qbuttongroup.h +++ b/qt/gen_qbuttongroup.h @@ -34,8 +34,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QButtonGroup_new(QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject); -void QButtonGroup_new2(QObject* parent, QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject); +QButtonGroup* QButtonGroup_new(); +QButtonGroup* QButtonGroup_new2(QObject* parent); +void QButtonGroup_virtbase(QButtonGroup* src, QObject** outptr_QObject); QMetaObject* QButtonGroup_MetaObject(const QButtonGroup* self); void* QButtonGroup_Metacast(QButtonGroup* self, const char* param1); struct miqt_string QButtonGroup_Tr(const char* s); diff --git a/qt/gen_qbytearraymatcher.cpp b/qt/gen_qbytearraymatcher.cpp index 900b9622..6b34213c 100644 --- a/qt/gen_qbytearraymatcher.cpp +++ b/qt/gen_qbytearraymatcher.cpp @@ -5,25 +5,21 @@ #include "gen_qbytearraymatcher.h" #include "_cgo_export.h" -void QByteArrayMatcher_new(QByteArrayMatcher** outptr_QByteArrayMatcher) { - QByteArrayMatcher* ret = new QByteArrayMatcher(); - *outptr_QByteArrayMatcher = ret; +QByteArrayMatcher* QByteArrayMatcher_new() { + return new QByteArrayMatcher(); } -void QByteArrayMatcher_new2(struct miqt_string pattern, QByteArrayMatcher** outptr_QByteArrayMatcher) { +QByteArrayMatcher* QByteArrayMatcher_new2(struct miqt_string pattern) { QByteArray pattern_QByteArray(pattern.data, pattern.len); - QByteArrayMatcher* ret = new QByteArrayMatcher(pattern_QByteArray); - *outptr_QByteArrayMatcher = ret; + return new QByteArrayMatcher(pattern_QByteArray); } -void QByteArrayMatcher_new3(const char* pattern, int length, QByteArrayMatcher** outptr_QByteArrayMatcher) { - QByteArrayMatcher* ret = new QByteArrayMatcher(pattern, static_cast(length)); - *outptr_QByteArrayMatcher = ret; +QByteArrayMatcher* QByteArrayMatcher_new3(const char* pattern, int length) { + return new QByteArrayMatcher(pattern, static_cast(length)); } -void QByteArrayMatcher_new4(QByteArrayMatcher* other, QByteArrayMatcher** outptr_QByteArrayMatcher) { - QByteArrayMatcher* ret = new QByteArrayMatcher(*other); - *outptr_QByteArrayMatcher = ret; +QByteArrayMatcher* QByteArrayMatcher_new4(QByteArrayMatcher* other) { + return new QByteArrayMatcher(*other); } void QByteArrayMatcher_OperatorAssign(QByteArrayMatcher* self, QByteArrayMatcher* other) { diff --git a/qt/gen_qbytearraymatcher.go b/qt/gen_qbytearraymatcher.go index c8cf05aa..ead60a10 100644 --- a/qt/gen_qbytearraymatcher.go +++ b/qt/gen_qbytearraymatcher.go @@ -37,24 +37,19 @@ func newQByteArrayMatcher(h *C.QByteArrayMatcher) *QByteArrayMatcher { if h == nil { return nil } + return &QByteArrayMatcher{h: h} } // UnsafeNewQByteArrayMatcher constructs the type using only unsafe pointers. func UnsafeNewQByteArrayMatcher(h unsafe.Pointer) *QByteArrayMatcher { - if h == nil { - return nil - } - - return &QByteArrayMatcher{h: (*C.QByteArrayMatcher)(h)} + return newQByteArrayMatcher((*C.QByteArrayMatcher)(h)) } // NewQByteArrayMatcher constructs a new QByteArrayMatcher object. func NewQByteArrayMatcher() *QByteArrayMatcher { - var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil - C.QByteArrayMatcher_new(&outptr_QByteArrayMatcher) - ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(C.QByteArrayMatcher_new()) ret.isSubclass = true return ret } @@ -64,10 +59,8 @@ func NewQByteArrayMatcher2(pattern []byte) *QByteArrayMatcher { pattern_alias := C.struct_miqt_string{} pattern_alias.data = (*C.char)(unsafe.Pointer(&pattern[0])) pattern_alias.len = C.size_t(len(pattern)) - var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil - C.QByteArrayMatcher_new2(pattern_alias, &outptr_QByteArrayMatcher) - ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(C.QByteArrayMatcher_new2(pattern_alias)) ret.isSubclass = true return ret } @@ -76,20 +69,16 @@ func NewQByteArrayMatcher2(pattern []byte) *QByteArrayMatcher { func NewQByteArrayMatcher3(pattern string, length int) *QByteArrayMatcher { pattern_Cstring := C.CString(pattern) defer C.free(unsafe.Pointer(pattern_Cstring)) - var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil - C.QByteArrayMatcher_new3(pattern_Cstring, (C.int)(length), &outptr_QByteArrayMatcher) - ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(C.QByteArrayMatcher_new3(pattern_Cstring, (C.int)(length))) ret.isSubclass = true return ret } // NewQByteArrayMatcher4 constructs a new QByteArrayMatcher object. func NewQByteArrayMatcher4(other *QByteArrayMatcher) *QByteArrayMatcher { - var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil - C.QByteArrayMatcher_new4(other.cPointer(), &outptr_QByteArrayMatcher) - ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(C.QByteArrayMatcher_new4(other.cPointer())) ret.isSubclass = true return ret } @@ -176,16 +165,13 @@ func newQStaticByteArrayMatcherBase(h *C.QStaticByteArrayMatcherBase) *QStaticBy if h == nil { return nil } + return &QStaticByteArrayMatcherBase{h: h} } // UnsafeNewQStaticByteArrayMatcherBase constructs the type using only unsafe pointers. func UnsafeNewQStaticByteArrayMatcherBase(h unsafe.Pointer) *QStaticByteArrayMatcherBase { - if h == nil { - return nil - } - - return &QStaticByteArrayMatcherBase{h: (*C.QStaticByteArrayMatcherBase)(h)} + return newQStaticByteArrayMatcherBase((*C.QStaticByteArrayMatcherBase)(h)) } // Delete this object from C++ memory. diff --git a/qt/gen_qbytearraymatcher.h b/qt/gen_qbytearraymatcher.h index 74ad2e5a..be5e62fe 100644 --- a/qt/gen_qbytearraymatcher.h +++ b/qt/gen_qbytearraymatcher.h @@ -22,10 +22,10 @@ typedef struct QByteArrayMatcher QByteArrayMatcher; typedef struct QStaticByteArrayMatcherBase QStaticByteArrayMatcherBase; #endif -void QByteArrayMatcher_new(QByteArrayMatcher** outptr_QByteArrayMatcher); -void QByteArrayMatcher_new2(struct miqt_string pattern, QByteArrayMatcher** outptr_QByteArrayMatcher); -void QByteArrayMatcher_new3(const char* pattern, int length, QByteArrayMatcher** outptr_QByteArrayMatcher); -void QByteArrayMatcher_new4(QByteArrayMatcher* other, QByteArrayMatcher** outptr_QByteArrayMatcher); +QByteArrayMatcher* QByteArrayMatcher_new(); +QByteArrayMatcher* QByteArrayMatcher_new2(struct miqt_string pattern); +QByteArrayMatcher* QByteArrayMatcher_new3(const char* pattern, int length); +QByteArrayMatcher* QByteArrayMatcher_new4(QByteArrayMatcher* other); void QByteArrayMatcher_OperatorAssign(QByteArrayMatcher* self, QByteArrayMatcher* other); void QByteArrayMatcher_SetPattern(QByteArrayMatcher* self, struct miqt_string pattern); int QByteArrayMatcher_IndexIn(const QByteArrayMatcher* self, struct miqt_string ba); diff --git a/qt/gen_qcalendar.cpp b/qt/gen_qcalendar.cpp index 02092ed8..60a9d791 100644 --- a/qt/gen_qcalendar.cpp +++ b/qt/gen_qcalendar.cpp @@ -10,14 +10,12 @@ #include "gen_qcalendar.h" #include "_cgo_export.h" -void QCalendar_new(QCalendar** outptr_QCalendar) { - QCalendar* ret = new QCalendar(); - *outptr_QCalendar = ret; +QCalendar* QCalendar_new() { + return new QCalendar(); } -void QCalendar_new2(int system, QCalendar** outptr_QCalendar) { - QCalendar* ret = new QCalendar(static_cast(system)); - *outptr_QCalendar = ret; +QCalendar* QCalendar_new2(int system) { + return new QCalendar(static_cast(system)); } bool QCalendar_IsValid(const QCalendar* self) { @@ -249,24 +247,20 @@ void QCalendar_Delete(QCalendar* self, bool isSubclass) { } } -void QCalendar__YearMonthDay_new(QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { - QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(); - *outptr_QCalendar__YearMonthDay = ret; +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new() { + return new QCalendar::YearMonthDay(); } -void QCalendar__YearMonthDay_new2(int y, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { - QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(static_cast(y)); - *outptr_QCalendar__YearMonthDay = ret; +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new2(int y) { + return new QCalendar::YearMonthDay(static_cast(y)); } -void QCalendar__YearMonthDay_new3(int y, int m, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { - QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(static_cast(y), static_cast(m)); - *outptr_QCalendar__YearMonthDay = ret; +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new3(int y, int m) { + return new QCalendar::YearMonthDay(static_cast(y), static_cast(m)); } -void QCalendar__YearMonthDay_new4(int y, int m, int d, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { - QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(static_cast(y), static_cast(m), static_cast(d)); - *outptr_QCalendar__YearMonthDay = ret; +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new4(int y, int m, int d) { + return new QCalendar::YearMonthDay(static_cast(y), static_cast(m), static_cast(d)); } bool QCalendar__YearMonthDay_IsValid(const QCalendar__YearMonthDay* self) { diff --git a/qt/gen_qcalendar.go b/qt/gen_qcalendar.go index bf6fc798..1379f31f 100644 --- a/qt/gen_qcalendar.go +++ b/qt/gen_qcalendar.go @@ -55,34 +55,27 @@ func newQCalendar(h *C.QCalendar) *QCalendar { if h == nil { return nil } + return &QCalendar{h: h} } // UnsafeNewQCalendar constructs the type using only unsafe pointers. func UnsafeNewQCalendar(h unsafe.Pointer) *QCalendar { - if h == nil { - return nil - } - - return &QCalendar{h: (*C.QCalendar)(h)} + return newQCalendar((*C.QCalendar)(h)) } // NewQCalendar constructs a new QCalendar object. func NewQCalendar() *QCalendar { - var outptr_QCalendar *C.QCalendar = nil - C.QCalendar_new(&outptr_QCalendar) - ret := newQCalendar(outptr_QCalendar) + ret := newQCalendar(C.QCalendar_new()) ret.isSubclass = true return ret } // NewQCalendar2 constructs a new QCalendar object. func NewQCalendar2(system QCalendar__System) *QCalendar { - var outptr_QCalendar *C.QCalendar = nil - C.QCalendar_new2((C.int)(system), &outptr_QCalendar) - ret := newQCalendar(outptr_QCalendar) + ret := newQCalendar(C.QCalendar_new2((C.int)(system))) ret.isSubclass = true return ret } @@ -301,54 +294,43 @@ func newQCalendar__YearMonthDay(h *C.QCalendar__YearMonthDay) *QCalendar__YearMo if h == nil { return nil } + return &QCalendar__YearMonthDay{h: h} } // UnsafeNewQCalendar__YearMonthDay constructs the type using only unsafe pointers. func UnsafeNewQCalendar__YearMonthDay(h unsafe.Pointer) *QCalendar__YearMonthDay { - if h == nil { - return nil - } - - return &QCalendar__YearMonthDay{h: (*C.QCalendar__YearMonthDay)(h)} + return newQCalendar__YearMonthDay((*C.QCalendar__YearMonthDay)(h)) } // NewQCalendar__YearMonthDay constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay() *QCalendar__YearMonthDay { - var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil - C.QCalendar__YearMonthDay_new(&outptr_QCalendar__YearMonthDay) - ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(C.QCalendar__YearMonthDay_new()) ret.isSubclass = true return ret } // NewQCalendar__YearMonthDay2 constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay2(y int) *QCalendar__YearMonthDay { - var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil - C.QCalendar__YearMonthDay_new2((C.int)(y), &outptr_QCalendar__YearMonthDay) - ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(C.QCalendar__YearMonthDay_new2((C.int)(y))) ret.isSubclass = true return ret } // NewQCalendar__YearMonthDay3 constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay3(y int, m int) *QCalendar__YearMonthDay { - var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil - C.QCalendar__YearMonthDay_new3((C.int)(y), (C.int)(m), &outptr_QCalendar__YearMonthDay) - ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(C.QCalendar__YearMonthDay_new3((C.int)(y), (C.int)(m))) ret.isSubclass = true return ret } // NewQCalendar__YearMonthDay4 constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay4(y int, m int, d int) *QCalendar__YearMonthDay { - var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil - C.QCalendar__YearMonthDay_new4((C.int)(y), (C.int)(m), (C.int)(d), &outptr_QCalendar__YearMonthDay) - ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(C.QCalendar__YearMonthDay_new4((C.int)(y), (C.int)(m), (C.int)(d))) ret.isSubclass = true return ret } diff --git a/qt/gen_qcalendar.h b/qt/gen_qcalendar.h index 88153c6a..6f7f34e3 100644 --- a/qt/gen_qcalendar.h +++ b/qt/gen_qcalendar.h @@ -30,8 +30,8 @@ typedef struct QDate QDate; typedef struct QLocale QLocale; #endif -void QCalendar_new(QCalendar** outptr_QCalendar); -void QCalendar_new2(int system, QCalendar** outptr_QCalendar); +QCalendar* QCalendar_new(); +QCalendar* QCalendar_new2(int system); bool QCalendar_IsValid(const QCalendar* self); int QCalendar_DaysInMonth(const QCalendar* self, int month); int QCalendar_DaysInYear(const QCalendar* self, int year); @@ -66,10 +66,10 @@ struct miqt_string QCalendar_WeekDayName3(const QCalendar* self, QLocale* locale struct miqt_string QCalendar_StandaloneWeekDayName3(const QCalendar* self, QLocale* locale, int day, int format); void QCalendar_Delete(QCalendar* self, bool isSubclass); -void QCalendar__YearMonthDay_new(QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); -void QCalendar__YearMonthDay_new2(int y, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); -void QCalendar__YearMonthDay_new3(int y, int m, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); -void QCalendar__YearMonthDay_new4(int y, int m, int d, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new(); +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new2(int y); +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new3(int y, int m); +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new4(int y, int m, int d); bool QCalendar__YearMonthDay_IsValid(const QCalendar__YearMonthDay* self); void QCalendar__YearMonthDay_Delete(QCalendar__YearMonthDay* self, bool isSubclass); diff --git a/qt/gen_qcalendarwidget.cpp b/qt/gen_qcalendarwidget.cpp index 557e818f..fd59322c 100644 --- a/qt/gen_qcalendarwidget.cpp +++ b/qt/gen_qcalendarwidget.cpp @@ -1079,20 +1079,16 @@ public: }; -void QCalendarWidget_new(QWidget* parent, QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQCalendarWidget* ret = new MiqtVirtualQCalendarWidget(parent); - *outptr_QCalendarWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QCalendarWidget* QCalendarWidget_new(QWidget* parent) { + return new MiqtVirtualQCalendarWidget(parent); } -void QCalendarWidget_new2(QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQCalendarWidget* ret = new MiqtVirtualQCalendarWidget(); - *outptr_QCalendarWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QCalendarWidget* QCalendarWidget_new2() { + return new MiqtVirtualQCalendarWidget(); +} + +void QCalendarWidget_virtbase(QCalendarWidget* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QCalendarWidget_MetaObject(const QCalendarWidget* self) { diff --git a/qt/gen_qcalendarwidget.go b/qt/gen_qcalendarwidget.go index 6b7c8ea3..1937b903 100644 --- a/qt/gen_qcalendarwidget.go +++ b/qt/gen_qcalendarwidget.go @@ -58,46 +58,34 @@ func (this *QCalendarWidget) UnsafePointer() unsafe.Pointer { } // newQCalendarWidget constructs the type using only CGO pointers. -func newQCalendarWidget(h *C.QCalendarWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QCalendarWidget { +func newQCalendarWidget(h *C.QCalendarWidget) *QCalendarWidget { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QCalendarWidget_virtbase(h, &outptr_QWidget) + return &QCalendarWidget{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQCalendarWidget constructs the type using only unsafe pointers. -func UnsafeNewQCalendarWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QCalendarWidget { - if h == nil { - return nil - } - - return &QCalendarWidget{h: (*C.QCalendarWidget)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQCalendarWidget(h unsafe.Pointer) *QCalendarWidget { + return newQCalendarWidget((*C.QCalendarWidget)(h)) } // NewQCalendarWidget constructs a new QCalendarWidget object. func NewQCalendarWidget(parent *QWidget) *QCalendarWidget { - var outptr_QCalendarWidget *C.QCalendarWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCalendarWidget_new(parent.cPointer(), &outptr_QCalendarWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCalendarWidget(outptr_QCalendarWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCalendarWidget(C.QCalendarWidget_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQCalendarWidget2 constructs a new QCalendarWidget object. func NewQCalendarWidget2() *QCalendarWidget { - var outptr_QCalendarWidget *C.QCalendarWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCalendarWidget_new2(&outptr_QCalendarWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCalendarWidget(outptr_QCalendarWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCalendarWidget(C.QCalendarWidget_new2()) ret.isSubclass = true return ret } @@ -227,7 +215,7 @@ func (this *QCalendarWidget) SetVerticalHeaderFormat(format QCalendarWidget__Ver } func (this *QCalendarWidget) HeaderTextFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QCalendarWidget_HeaderTextFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QCalendarWidget_HeaderTextFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -237,7 +225,7 @@ func (this *QCalendarWidget) SetHeaderTextFormat(format *QTextCharFormat) { } func (this *QCalendarWidget) WeekdayTextFormat(dayOfWeek DayOfWeek) *QTextCharFormat { - _goptr := newQTextCharFormat(C.QCalendarWidget_WeekdayTextFormat(this.h, (C.int)(dayOfWeek)), nil) + _goptr := newQTextCharFormat(C.QCalendarWidget_WeekdayTextFormat(this.h, (C.int)(dayOfWeek))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -256,7 +244,7 @@ func (this *QCalendarWidget) DateTextFormat() map[QDate]QTextCharFormat { _mapkey_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer _entry_Key := *_mapkey_goptr - _mapval_goptr := newQTextCharFormat(_Values[i], nil) + _mapval_goptr := newQTextCharFormat(_Values[i]) _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer _entry_Value := *_mapval_goptr @@ -266,7 +254,7 @@ func (this *QCalendarWidget) DateTextFormat() map[QDate]QTextCharFormat { } func (this *QCalendarWidget) DateTextFormatWithDate(date *QDate) *QTextCharFormat { - _goptr := newQTextCharFormat(C.QCalendarWidget_DateTextFormatWithDate(this.h, date.cPointer()), nil) + _goptr := newQTextCharFormat(C.QCalendarWidget_DateTextFormatWithDate(this.h, date.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -590,7 +578,7 @@ func miqt_exec_callback_QCalendarWidget_MousePressEvent(self *C.QCalendarWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -616,7 +604,7 @@ func miqt_exec_callback_QCalendarWidget_ResizeEvent(self *C.QCalendarWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -642,7 +630,7 @@ func miqt_exec_callback_QCalendarWidget_KeyPressEvent(self *C.QCalendarWidget, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -827,7 +815,7 @@ func miqt_exec_callback_QCalendarWidget_MouseReleaseEvent(self *C.QCalendarWidge } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -853,7 +841,7 @@ func miqt_exec_callback_QCalendarWidget_MouseDoubleClickEvent(self *C.QCalendarW } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -879,7 +867,7 @@ func miqt_exec_callback_QCalendarWidget_MouseMoveEvent(self *C.QCalendarWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -905,7 +893,7 @@ func miqt_exec_callback_QCalendarWidget_WheelEvent(self *C.QCalendarWidget, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -931,7 +919,7 @@ func miqt_exec_callback_QCalendarWidget_KeyReleaseEvent(self *C.QCalendarWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -957,7 +945,7 @@ func miqt_exec_callback_QCalendarWidget_FocusInEvent(self *C.QCalendarWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -983,7 +971,7 @@ func miqt_exec_callback_QCalendarWidget_FocusOutEvent(self *C.QCalendarWidget, c } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1061,7 +1049,7 @@ func miqt_exec_callback_QCalendarWidget_PaintEvent(self *C.QCalendarWidget, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1087,7 +1075,7 @@ func miqt_exec_callback_QCalendarWidget_MoveEvent(self *C.QCalendarWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1113,7 +1101,7 @@ func miqt_exec_callback_QCalendarWidget_CloseEvent(self *C.QCalendarWidget, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1139,7 +1127,7 @@ func miqt_exec_callback_QCalendarWidget_ContextMenuEvent(self *C.QCalendarWidget } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1165,7 +1153,7 @@ func miqt_exec_callback_QCalendarWidget_TabletEvent(self *C.QCalendarWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1191,7 +1179,7 @@ func miqt_exec_callback_QCalendarWidget_ActionEvent(self *C.QCalendarWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1217,7 +1205,7 @@ func miqt_exec_callback_QCalendarWidget_DragEnterEvent(self *C.QCalendarWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1243,7 +1231,7 @@ func miqt_exec_callback_QCalendarWidget_DragMoveEvent(self *C.QCalendarWidget, c } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1269,7 +1257,7 @@ func miqt_exec_callback_QCalendarWidget_DragLeaveEvent(self *C.QCalendarWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1295,7 +1283,7 @@ func miqt_exec_callback_QCalendarWidget_DropEvent(self *C.QCalendarWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1321,7 +1309,7 @@ func miqt_exec_callback_QCalendarWidget_ShowEvent(self *C.QCalendarWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1347,7 +1335,7 @@ func miqt_exec_callback_QCalendarWidget_HideEvent(self *C.QCalendarWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1543,7 +1531,7 @@ func miqt_exec_callback_QCalendarWidget_InputMethodEvent(self *C.QCalendarWidget } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QCalendarWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qcalendarwidget.h b/qt/gen_qcalendarwidget.h index 1c33d0df..9cb30fcf 100644 --- a/qt/gen_qcalendarwidget.h +++ b/qt/gen_qcalendarwidget.h @@ -84,8 +84,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QCalendarWidget_new(QWidget* parent, QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCalendarWidget_new2(QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QCalendarWidget* QCalendarWidget_new(QWidget* parent); +QCalendarWidget* QCalendarWidget_new2(); +void QCalendarWidget_virtbase(QCalendarWidget* src, QWidget** outptr_QWidget); QMetaObject* QCalendarWidget_MetaObject(const QCalendarWidget* self); void* QCalendarWidget_Metacast(QCalendarWidget* self, const char* param1); struct miqt_string QCalendarWidget_Tr(const char* s); diff --git a/qt/gen_qchar.cpp b/qt/gen_qchar.cpp index 7074ed7b..d05fd501 100644 --- a/qt/gen_qchar.cpp +++ b/qt/gen_qchar.cpp @@ -7,14 +7,12 @@ #include "gen_qchar.h" #include "_cgo_export.h" -void QLatin1Char_new(char c, QLatin1Char** outptr_QLatin1Char) { - QLatin1Char* ret = new QLatin1Char(static_cast(c)); - *outptr_QLatin1Char = ret; +QLatin1Char* QLatin1Char_new(char c) { + return new QLatin1Char(static_cast(c)); } -void QLatin1Char_new2(QLatin1Char* param1, QLatin1Char** outptr_QLatin1Char) { - QLatin1Char* ret = new QLatin1Char(*param1); - *outptr_QLatin1Char = ret; +QLatin1Char* QLatin1Char_new2(QLatin1Char* param1) { + return new QLatin1Char(*param1); } char QLatin1Char_ToLatin1(const QLatin1Char* self) { @@ -34,59 +32,48 @@ void QLatin1Char_Delete(QLatin1Char* self, bool isSubclass) { } } -void QChar_new(QChar** outptr_QChar) { - QChar* ret = new QChar(); - *outptr_QChar = ret; +QChar* QChar_new() { + return new QChar(); } -void QChar_new2(uint16_t rc, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(rc)); - *outptr_QChar = ret; +QChar* QChar_new2(uint16_t rc) { + return new QChar(static_cast(rc)); } -void QChar_new3(unsigned char c, unsigned char r, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(c), static_cast(r)); - *outptr_QChar = ret; +QChar* QChar_new3(unsigned char c, unsigned char r) { + return new QChar(static_cast(c), static_cast(r)); } -void QChar_new4(int16_t rc, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(rc)); - *outptr_QChar = ret; +QChar* QChar_new4(int16_t rc) { + return new QChar(static_cast(rc)); } -void QChar_new5(unsigned int rc, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(rc)); - *outptr_QChar = ret; +QChar* QChar_new5(unsigned int rc) { + return new QChar(static_cast(rc)); } -void QChar_new6(int rc, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(rc)); - *outptr_QChar = ret; +QChar* QChar_new6(int rc) { + return new QChar(static_cast(rc)); } -void QChar_new7(int s, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(s)); - *outptr_QChar = ret; +QChar* QChar_new7(int s) { + return new QChar(static_cast(s)); } -void QChar_new8(QLatin1Char* ch, QChar** outptr_QChar) { - QChar* ret = new QChar(*ch); - *outptr_QChar = ret; +QChar* QChar_new8(QLatin1Char* ch) { + return new QChar(*ch); } -void QChar_new9(char c, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(c)); - *outptr_QChar = ret; +QChar* QChar_new9(char c) { + return new QChar(static_cast(c)); } -void QChar_new10(unsigned char c, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(c)); - *outptr_QChar = ret; +QChar* QChar_new10(unsigned char c) { + return new QChar(static_cast(c)); } -void QChar_new11(QChar* param1, QChar** outptr_QChar) { - QChar* ret = new QChar(*param1); - *outptr_QChar = ret; +QChar* QChar_new11(QChar* param1) { + return new QChar(*param1); } int QChar_Category(const QChar* self) { diff --git a/qt/gen_qchar.go b/qt/gen_qchar.go index 74bf8565..84eb6570 100644 --- a/qt/gen_qchar.go +++ b/qt/gen_qchar.go @@ -379,34 +379,27 @@ func newQLatin1Char(h *C.QLatin1Char) *QLatin1Char { if h == nil { return nil } + return &QLatin1Char{h: h} } // UnsafeNewQLatin1Char constructs the type using only unsafe pointers. func UnsafeNewQLatin1Char(h unsafe.Pointer) *QLatin1Char { - if h == nil { - return nil - } - - return &QLatin1Char{h: (*C.QLatin1Char)(h)} + return newQLatin1Char((*C.QLatin1Char)(h)) } // NewQLatin1Char constructs a new QLatin1Char object. func NewQLatin1Char(c int8) *QLatin1Char { - var outptr_QLatin1Char *C.QLatin1Char = nil - C.QLatin1Char_new((C.char)(c), &outptr_QLatin1Char) - ret := newQLatin1Char(outptr_QLatin1Char) + ret := newQLatin1Char(C.QLatin1Char_new((C.char)(c))) ret.isSubclass = true return ret } // NewQLatin1Char2 constructs a new QLatin1Char object. func NewQLatin1Char2(param1 *QLatin1Char) *QLatin1Char { - var outptr_QLatin1Char *C.QLatin1Char = nil - C.QLatin1Char_new2(param1.cPointer(), &outptr_QLatin1Char) - ret := newQLatin1Char(outptr_QLatin1Char) + ret := newQLatin1Char(C.QLatin1Char_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -457,124 +450,99 @@ func newQChar(h *C.QChar) *QChar { if h == nil { return nil } + return &QChar{h: h} } // UnsafeNewQChar constructs the type using only unsafe pointers. func UnsafeNewQChar(h unsafe.Pointer) *QChar { - if h == nil { - return nil - } - - return &QChar{h: (*C.QChar)(h)} + return newQChar((*C.QChar)(h)) } // NewQChar constructs a new QChar object. func NewQChar() *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new(&outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new()) ret.isSubclass = true return ret } // NewQChar2 constructs a new QChar object. func NewQChar2(rc uint16) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new2((C.uint16_t)(rc), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new2((C.uint16_t)(rc))) ret.isSubclass = true return ret } // NewQChar3 constructs a new QChar object. func NewQChar3(c byte, r byte) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new3((C.uchar)(c), (C.uchar)(r), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new3((C.uchar)(c), (C.uchar)(r))) ret.isSubclass = true return ret } // NewQChar4 constructs a new QChar object. func NewQChar4(rc int16) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new4((C.int16_t)(rc), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new4((C.int16_t)(rc))) ret.isSubclass = true return ret } // NewQChar5 constructs a new QChar object. func NewQChar5(rc uint) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new5((C.uint)(rc), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new5((C.uint)(rc))) ret.isSubclass = true return ret } // NewQChar6 constructs a new QChar object. func NewQChar6(rc int) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new6((C.int)(rc), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new6((C.int)(rc))) ret.isSubclass = true return ret } // NewQChar7 constructs a new QChar object. func NewQChar7(s QChar__SpecialCharacter) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new7((C.int)(s), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new7((C.int)(s))) ret.isSubclass = true return ret } // NewQChar8 constructs a new QChar object. func NewQChar8(ch QLatin1Char) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new8(ch.cPointer(), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new8(ch.cPointer())) ret.isSubclass = true return ret } // NewQChar9 constructs a new QChar object. func NewQChar9(c int8) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new9((C.char)(c), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new9((C.char)(c))) ret.isSubclass = true return ret } // NewQChar10 constructs a new QChar object. func NewQChar10(c byte) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new10((C.uchar)(c), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new10((C.uchar)(c))) ret.isSubclass = true return ret } // NewQChar11 constructs a new QChar object. func NewQChar11(param1 *QChar) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new11(param1.cPointer(), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new11(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qchar.h b/qt/gen_qchar.h index 4d9f250d..6c22844c 100644 --- a/qt/gen_qchar.h +++ b/qt/gen_qchar.h @@ -22,23 +22,23 @@ typedef struct QChar QChar; typedef struct QLatin1Char QLatin1Char; #endif -void QLatin1Char_new(char c, QLatin1Char** outptr_QLatin1Char); -void QLatin1Char_new2(QLatin1Char* param1, QLatin1Char** outptr_QLatin1Char); +QLatin1Char* QLatin1Char_new(char c); +QLatin1Char* QLatin1Char_new2(QLatin1Char* param1); char QLatin1Char_ToLatin1(const QLatin1Char* self); uint16_t QLatin1Char_Unicode(const QLatin1Char* self); void QLatin1Char_Delete(QLatin1Char* self, bool isSubclass); -void QChar_new(QChar** outptr_QChar); -void QChar_new2(uint16_t rc, QChar** outptr_QChar); -void QChar_new3(unsigned char c, unsigned char r, QChar** outptr_QChar); -void QChar_new4(int16_t rc, QChar** outptr_QChar); -void QChar_new5(unsigned int rc, QChar** outptr_QChar); -void QChar_new6(int rc, QChar** outptr_QChar); -void QChar_new7(int s, QChar** outptr_QChar); -void QChar_new8(QLatin1Char* ch, QChar** outptr_QChar); -void QChar_new9(char c, QChar** outptr_QChar); -void QChar_new10(unsigned char c, QChar** outptr_QChar); -void QChar_new11(QChar* param1, QChar** outptr_QChar); +QChar* QChar_new(); +QChar* QChar_new2(uint16_t rc); +QChar* QChar_new3(unsigned char c, unsigned char r); +QChar* QChar_new4(int16_t rc); +QChar* QChar_new5(unsigned int rc); +QChar* QChar_new6(int rc); +QChar* QChar_new7(int s); +QChar* QChar_new8(QLatin1Char* ch); +QChar* QChar_new9(char c); +QChar* QChar_new10(unsigned char c); +QChar* QChar_new11(QChar* param1); int QChar_Category(const QChar* self); int QChar_Direction(const QChar* self); int QChar_JoiningType(const QChar* self); diff --git a/qt/gen_qcheckbox.cpp b/qt/gen_qcheckbox.cpp index ef2ce095..ab607434 100644 --- a/qt/gen_qcheckbox.cpp +++ b/qt/gen_qcheckbox.cpp @@ -409,42 +409,26 @@ public: }; -void QCheckBox_new(QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(parent); - *outptr_QCheckBox = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QCheckBox* QCheckBox_new(QWidget* parent) { + return new MiqtVirtualQCheckBox(parent); } -void QCheckBox_new2(QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(); - *outptr_QCheckBox = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QCheckBox* QCheckBox_new2() { + return new MiqtVirtualQCheckBox(); } -void QCheckBox_new3(struct miqt_string text, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QCheckBox* QCheckBox_new3(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(text_QString); - *outptr_QCheckBox = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQCheckBox(text_QString); } -void QCheckBox_new4(struct miqt_string text, QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QCheckBox* QCheckBox_new4(struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(text_QString, parent); - *outptr_QCheckBox = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQCheckBox(text_QString, parent); +} + +void QCheckBox_virtbase(QCheckBox* src, QAbstractButton** outptr_QAbstractButton) { + *outptr_QAbstractButton = static_cast(src); } QMetaObject* QCheckBox_MetaObject(const QCheckBox* self) { diff --git a/qt/gen_qcheckbox.go b/qt/gen_qcheckbox.go index e6f1fd68..2467d850 100644 --- a/qt/gen_qcheckbox.go +++ b/qt/gen_qcheckbox.go @@ -35,48 +35,34 @@ func (this *QCheckBox) UnsafePointer() unsafe.Pointer { } // newQCheckBox constructs the type using only CGO pointers. -func newQCheckBox(h *C.QCheckBox, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QCheckBox { +func newQCheckBox(h *C.QCheckBox) *QCheckBox { if h == nil { return nil } + var outptr_QAbstractButton *C.QAbstractButton = nil + C.QCheckBox_virtbase(h, &outptr_QAbstractButton) + return &QCheckBox{h: h, - QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractButton: newQAbstractButton(outptr_QAbstractButton)} } // UnsafeNewQCheckBox constructs the type using only unsafe pointers. -func UnsafeNewQCheckBox(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QCheckBox { - if h == nil { - return nil - } - - return &QCheckBox{h: (*C.QCheckBox)(h), - QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQCheckBox(h unsafe.Pointer) *QCheckBox { + return newQCheckBox((*C.QCheckBox)(h)) } // NewQCheckBox constructs a new QCheckBox object. func NewQCheckBox(parent *QWidget) *QCheckBox { - var outptr_QCheckBox *C.QCheckBox = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCheckBox_new(parent.cPointer(), &outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCheckBox(C.QCheckBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQCheckBox2 constructs a new QCheckBox object. func NewQCheckBox2() *QCheckBox { - var outptr_QCheckBox *C.QCheckBox = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCheckBox_new2(&outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCheckBox(C.QCheckBox_new2()) ret.isSubclass = true return ret } @@ -87,14 +73,8 @@ func NewQCheckBox3(text string) *QCheckBox { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QCheckBox *C.QCheckBox = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCheckBox_new3(text_ms, &outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCheckBox(C.QCheckBox_new3(text_ms)) ret.isSubclass = true return ret } @@ -105,14 +85,8 @@ func NewQCheckBox4(text string, parent *QWidget) *QCheckBox { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QCheckBox *C.QCheckBox = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCheckBox_new4(text_ms, parent.cPointer(), &outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCheckBox(C.QCheckBox_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -417,7 +391,7 @@ func miqt_exec_callback_QCheckBox_PaintEvent(self *C.QCheckBox, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QCheckBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -443,7 +417,7 @@ func miqt_exec_callback_QCheckBox_MouseMoveEvent(self *C.QCheckBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QCheckBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -469,7 +443,7 @@ func miqt_exec_callback_QCheckBox_KeyPressEvent(self *C.QCheckBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QCheckBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -495,7 +469,7 @@ func miqt_exec_callback_QCheckBox_KeyReleaseEvent(self *C.QCheckBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QCheckBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -521,7 +495,7 @@ func miqt_exec_callback_QCheckBox_MousePressEvent(self *C.QCheckBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QCheckBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -547,7 +521,7 @@ func miqt_exec_callback_QCheckBox_MouseReleaseEvent(self *C.QCheckBox, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QCheckBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -573,7 +547,7 @@ func miqt_exec_callback_QCheckBox_FocusInEvent(self *C.QCheckBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QCheckBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -599,7 +573,7 @@ func miqt_exec_callback_QCheckBox_FocusOutEvent(self *C.QCheckBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QCheckBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -651,7 +625,7 @@ func miqt_exec_callback_QCheckBox_TimerEvent(self *C.QCheckBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QCheckBox{h: self}).callVirtualBase_TimerEvent, slotval1) diff --git a/qt/gen_qcheckbox.h b/qt/gen_qcheckbox.h index cf7e2937..7736a962 100644 --- a/qt/gen_qcheckbox.h +++ b/qt/gen_qcheckbox.h @@ -46,10 +46,11 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QCheckBox_new(QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCheckBox_new2(QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCheckBox_new3(struct miqt_string text, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCheckBox_new4(struct miqt_string text, QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QCheckBox* QCheckBox_new(QWidget* parent); +QCheckBox* QCheckBox_new2(); +QCheckBox* QCheckBox_new3(struct miqt_string text); +QCheckBox* QCheckBox_new4(struct miqt_string text, QWidget* parent); +void QCheckBox_virtbase(QCheckBox* src, QAbstractButton** outptr_QAbstractButton); QMetaObject* QCheckBox_MetaObject(const QCheckBox* self); void* QCheckBox_Metacast(QCheckBox* self, const char* param1); struct miqt_string QCheckBox_Tr(const char* s); diff --git a/qt/gen_qclipboard.cpp b/qt/gen_qclipboard.cpp index 48f8c752..cc31783e 100644 --- a/qt/gen_qclipboard.cpp +++ b/qt/gen_qclipboard.cpp @@ -11,6 +11,10 @@ #include "gen_qclipboard.h" #include "_cgo_export.h" +void QClipboard_virtbase(QClipboard* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QClipboard_MetaObject(const QClipboard* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/gen_qclipboard.go b/qt/gen_qclipboard.go index 17791dce..15aefcd3 100644 --- a/qt/gen_qclipboard.go +++ b/qt/gen_qclipboard.go @@ -43,22 +43,20 @@ func (this *QClipboard) UnsafePointer() unsafe.Pointer { } // newQClipboard constructs the type using only CGO pointers. -func newQClipboard(h *C.QClipboard, h_QObject *C.QObject) *QClipboard { +func newQClipboard(h *C.QClipboard) *QClipboard { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QClipboard_virtbase(h, &outptr_QObject) + return &QClipboard{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQClipboard constructs the type using only unsafe pointers. -func UnsafeNewQClipboard(h unsafe.Pointer, h_QObject unsafe.Pointer) *QClipboard { - if h == nil { - return nil - } - - return &QClipboard{h: (*C.QClipboard)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQClipboard(h unsafe.Pointer) *QClipboard { + return newQClipboard((*C.QClipboard)(h)) } func (this *QClipboard) MetaObject() *QMetaObject { @@ -140,7 +138,7 @@ func (this *QClipboard) SetText(param1 string) { } func (this *QClipboard) MimeData() *QMimeData { - return newQMimeData(C.QClipboard_MimeData(this.h), nil) + return newQMimeData(C.QClipboard_MimeData(this.h)) } func (this *QClipboard) SetMimeData(data *QMimeData) { @@ -148,13 +146,13 @@ func (this *QClipboard) SetMimeData(data *QMimeData) { } func (this *QClipboard) Image() *QImage { - _goptr := newQImage(C.QClipboard_Image(this.h), nil) + _goptr := newQImage(C.QClipboard_Image(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QClipboard) Pixmap() *QPixmap { - _goptr := newQPixmap(C.QClipboard_Pixmap(this.h), nil) + _goptr := newQPixmap(C.QClipboard_Pixmap(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -313,7 +311,7 @@ func (this *QClipboard) SetText2(param1 string, mode QClipboard__Mode) { } func (this *QClipboard) MimeData1(mode QClipboard__Mode) *QMimeData { - return newQMimeData(C.QClipboard_MimeData1(this.h, (C.int)(mode)), nil) + return newQMimeData(C.QClipboard_MimeData1(this.h, (C.int)(mode))) } func (this *QClipboard) SetMimeData2(data *QMimeData, mode QClipboard__Mode) { @@ -321,13 +319,13 @@ func (this *QClipboard) SetMimeData2(data *QMimeData, mode QClipboard__Mode) { } func (this *QClipboard) Image1(mode QClipboard__Mode) *QImage { - _goptr := newQImage(C.QClipboard_Image1(this.h, (C.int)(mode)), nil) + _goptr := newQImage(C.QClipboard_Image1(this.h, (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QClipboard) Pixmap1(mode QClipboard__Mode) *QPixmap { - _goptr := newQPixmap(C.QClipboard_Pixmap1(this.h, (C.int)(mode)), nil) + _goptr := newQPixmap(C.QClipboard_Pixmap1(this.h, (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/gen_qclipboard.h b/qt/gen_qclipboard.h index 8ac6e82d..f4157948 100644 --- a/qt/gen_qclipboard.h +++ b/qt/gen_qclipboard.h @@ -30,6 +30,7 @@ typedef struct QObject QObject; typedef struct QPixmap QPixmap; #endif +void QClipboard_virtbase(QClipboard* src, QObject** outptr_QObject); QMetaObject* QClipboard_MetaObject(const QClipboard* self); void* QClipboard_Metacast(QClipboard* self, const char* param1); struct miqt_string QClipboard_Tr(const char* s); diff --git a/qt/gen_qcollator.cpp b/qt/gen_qcollator.cpp index 99726f5d..d3a36205 100644 --- a/qt/gen_qcollator.cpp +++ b/qt/gen_qcollator.cpp @@ -9,9 +9,8 @@ #include "gen_qcollator.h" #include "_cgo_export.h" -void QCollatorSortKey_new(QCollatorSortKey* other, QCollatorSortKey** outptr_QCollatorSortKey) { - QCollatorSortKey* ret = new QCollatorSortKey(*other); - *outptr_QCollatorSortKey = ret; +QCollatorSortKey* QCollatorSortKey_new(QCollatorSortKey* other) { + return new QCollatorSortKey(*other); } void QCollatorSortKey_OperatorAssign(QCollatorSortKey* self, QCollatorSortKey* other) { @@ -34,19 +33,16 @@ void QCollatorSortKey_Delete(QCollatorSortKey* self, bool isSubclass) { } } -void QCollator_new(QCollator** outptr_QCollator) { - QCollator* ret = new QCollator(); - *outptr_QCollator = ret; +QCollator* QCollator_new() { + return new QCollator(); } -void QCollator_new2(QLocale* locale, QCollator** outptr_QCollator) { - QCollator* ret = new QCollator(*locale); - *outptr_QCollator = ret; +QCollator* QCollator_new2(QLocale* locale) { + return new QCollator(*locale); } -void QCollator_new3(QCollator* param1, QCollator** outptr_QCollator) { - QCollator* ret = new QCollator(*param1); - *outptr_QCollator = ret; +QCollator* QCollator_new3(QCollator* param1) { + return new QCollator(*param1); } void QCollator_OperatorAssign(QCollator* self, QCollator* param1) { diff --git a/qt/gen_qcollator.go b/qt/gen_qcollator.go index 594e282f..e2202dd9 100644 --- a/qt/gen_qcollator.go +++ b/qt/gen_qcollator.go @@ -37,24 +37,19 @@ func newQCollatorSortKey(h *C.QCollatorSortKey) *QCollatorSortKey { if h == nil { return nil } + return &QCollatorSortKey{h: h} } // UnsafeNewQCollatorSortKey constructs the type using only unsafe pointers. func UnsafeNewQCollatorSortKey(h unsafe.Pointer) *QCollatorSortKey { - if h == nil { - return nil - } - - return &QCollatorSortKey{h: (*C.QCollatorSortKey)(h)} + return newQCollatorSortKey((*C.QCollatorSortKey)(h)) } // NewQCollatorSortKey constructs a new QCollatorSortKey object. func NewQCollatorSortKey(other *QCollatorSortKey) *QCollatorSortKey { - var outptr_QCollatorSortKey *C.QCollatorSortKey = nil - C.QCollatorSortKey_new(other.cPointer(), &outptr_QCollatorSortKey) - ret := newQCollatorSortKey(outptr_QCollatorSortKey) + ret := newQCollatorSortKey(C.QCollatorSortKey_new(other.cPointer())) ret.isSubclass = true return ret } @@ -109,44 +104,35 @@ func newQCollator(h *C.QCollator) *QCollator { if h == nil { return nil } + return &QCollator{h: h} } // UnsafeNewQCollator constructs the type using only unsafe pointers. func UnsafeNewQCollator(h unsafe.Pointer) *QCollator { - if h == nil { - return nil - } - - return &QCollator{h: (*C.QCollator)(h)} + return newQCollator((*C.QCollator)(h)) } // NewQCollator constructs a new QCollator object. func NewQCollator() *QCollator { - var outptr_QCollator *C.QCollator = nil - C.QCollator_new(&outptr_QCollator) - ret := newQCollator(outptr_QCollator) + ret := newQCollator(C.QCollator_new()) ret.isSubclass = true return ret } // NewQCollator2 constructs a new QCollator object. func NewQCollator2(locale *QLocale) *QCollator { - var outptr_QCollator *C.QCollator = nil - C.QCollator_new2(locale.cPointer(), &outptr_QCollator) - ret := newQCollator(outptr_QCollator) + ret := newQCollator(C.QCollator_new2(locale.cPointer())) ret.isSubclass = true return ret } // NewQCollator3 constructs a new QCollator object. func NewQCollator3(param1 *QCollator) *QCollator { - var outptr_QCollator *C.QCollator = nil - C.QCollator_new3(param1.cPointer(), &outptr_QCollator) - ret := newQCollator(outptr_QCollator) + ret := newQCollator(C.QCollator_new3(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qcollator.h b/qt/gen_qcollator.h index ccde0d91..d3b5f07d 100644 --- a/qt/gen_qcollator.h +++ b/qt/gen_qcollator.h @@ -26,15 +26,15 @@ typedef struct QCollatorSortKey QCollatorSortKey; typedef struct QLocale QLocale; #endif -void QCollatorSortKey_new(QCollatorSortKey* other, QCollatorSortKey** outptr_QCollatorSortKey); +QCollatorSortKey* QCollatorSortKey_new(QCollatorSortKey* other); void QCollatorSortKey_OperatorAssign(QCollatorSortKey* self, QCollatorSortKey* other); void QCollatorSortKey_Swap(QCollatorSortKey* self, QCollatorSortKey* other); int QCollatorSortKey_Compare(const QCollatorSortKey* self, QCollatorSortKey* key); void QCollatorSortKey_Delete(QCollatorSortKey* self, bool isSubclass); -void QCollator_new(QCollator** outptr_QCollator); -void QCollator_new2(QLocale* locale, QCollator** outptr_QCollator); -void QCollator_new3(QCollator* param1, QCollator** outptr_QCollator); +QCollator* QCollator_new(); +QCollator* QCollator_new2(QLocale* locale); +QCollator* QCollator_new3(QCollator* param1); void QCollator_OperatorAssign(QCollator* self, QCollator* param1); void QCollator_Swap(QCollator* self, QCollator* other); void QCollator_SetLocale(QCollator* self, QLocale* locale); diff --git a/qt/gen_qcolor.cpp b/qt/gen_qcolor.cpp index b366299b..10ffa7bb 100644 --- a/qt/gen_qcolor.cpp +++ b/qt/gen_qcolor.cpp @@ -8,65 +8,53 @@ #include "gen_qcolor.h" #include "_cgo_export.h" -void QColor_new(QColor** outptr_QColor) { - QColor* ret = new QColor(); - *outptr_QColor = ret; +QColor* QColor_new() { + return new QColor(); } -void QColor_new2(int color, QColor** outptr_QColor) { - QColor* ret = new QColor(static_cast(color)); - *outptr_QColor = ret; +QColor* QColor_new2(int color) { + return new QColor(static_cast(color)); } -void QColor_new3(int r, int g, int b, QColor** outptr_QColor) { - QColor* ret = new QColor(static_cast(r), static_cast(g), static_cast(b)); - *outptr_QColor = ret; +QColor* QColor_new3(int r, int g, int b) { + return new QColor(static_cast(r), static_cast(g), static_cast(b)); } -void QColor_new4(unsigned int rgb, QColor** outptr_QColor) { - QColor* ret = new QColor(static_cast(rgb)); - *outptr_QColor = ret; +QColor* QColor_new4(unsigned int rgb) { + return new QColor(static_cast(rgb)); } -void QColor_new5(QRgba64* rgba64, QColor** outptr_QColor) { - QColor* ret = new QColor(*rgba64); - *outptr_QColor = ret; +QColor* QColor_new5(QRgba64* rgba64) { + return new QColor(*rgba64); } -void QColor_new6(struct miqt_string name, QColor** outptr_QColor) { +QColor* QColor_new6(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - QColor* ret = new QColor(name_QString); - *outptr_QColor = ret; + return new QColor(name_QString); } -void QColor_new7(const char* aname, QColor** outptr_QColor) { - QColor* ret = new QColor(aname); - *outptr_QColor = ret; +QColor* QColor_new7(const char* aname) { + return new QColor(aname); } -void QColor_new8(int spec, QColor** outptr_QColor) { - QColor* ret = new QColor(static_cast(spec)); - *outptr_QColor = ret; +QColor* QColor_new8(int spec) { + return new QColor(static_cast(spec)); } -void QColor_new9(QColor* color, QColor** outptr_QColor) { - QColor* ret = new QColor(*color); - *outptr_QColor = ret; +QColor* QColor_new9(QColor* color) { + return new QColor(*color); } -void QColor_new10(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, QColor** outptr_QColor) { - QColor* ret = new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4)); - *outptr_QColor = ret; +QColor* QColor_new10(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4) { + return new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4)); } -void QColor_new11(int r, int g, int b, int a, QColor** outptr_QColor) { - QColor* ret = new QColor(static_cast(r), static_cast(g), static_cast(b), static_cast(a)); - *outptr_QColor = ret; +QColor* QColor_new11(int r, int g, int b, int a) { + return new QColor(static_cast(r), static_cast(g), static_cast(b), static_cast(a)); } -void QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5, QColor** outptr_QColor) { - QColor* ret = new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4), static_cast(a5)); - *outptr_QColor = ret; +QColor* QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5) { + return new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4), static_cast(a5)); } void QColor_OperatorAssign(QColor* self, QColor* param1) { diff --git a/qt/gen_qcolor.go b/qt/gen_qcolor.go index 33cdca7b..780abca0 100644 --- a/qt/gen_qcolor.go +++ b/qt/gen_qcolor.go @@ -55,64 +55,51 @@ func newQColor(h *C.QColor) *QColor { if h == nil { return nil } + return &QColor{h: h} } // UnsafeNewQColor constructs the type using only unsafe pointers. func UnsafeNewQColor(h unsafe.Pointer) *QColor { - if h == nil { - return nil - } - - return &QColor{h: (*C.QColor)(h)} + return newQColor((*C.QColor)(h)) } // NewQColor constructs a new QColor object. func NewQColor() *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new(&outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new()) ret.isSubclass = true return ret } // NewQColor2 constructs a new QColor object. func NewQColor2(color GlobalColor) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new2((C.int)(color), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new2((C.int)(color))) ret.isSubclass = true return ret } // NewQColor3 constructs a new QColor object. func NewQColor3(r int, g int, b int) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new3((C.int)(r), (C.int)(g), (C.int)(b), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new3((C.int)(r), (C.int)(g), (C.int)(b))) ret.isSubclass = true return ret } // NewQColor4 constructs a new QColor object. func NewQColor4(rgb uint) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new4((C.uint)(rgb), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new4((C.uint)(rgb))) ret.isSubclass = true return ret } // NewQColor5 constructs a new QColor object. func NewQColor5(rgba64 QRgba64) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new5(rgba64.cPointer(), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new5(rgba64.cPointer())) ret.isSubclass = true return ret } @@ -123,10 +110,8 @@ func NewQColor6(name string) *QColor { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QColor *C.QColor = nil - C.QColor_new6(name_ms, &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new6(name_ms)) ret.isSubclass = true return ret } @@ -135,60 +120,48 @@ func NewQColor6(name string) *QColor { func NewQColor7(aname string) *QColor { aname_Cstring := C.CString(aname) defer C.free(unsafe.Pointer(aname_Cstring)) - var outptr_QColor *C.QColor = nil - C.QColor_new7(aname_Cstring, &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new7(aname_Cstring)) ret.isSubclass = true return ret } // NewQColor8 constructs a new QColor object. func NewQColor8(spec QColor__Spec) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new8((C.int)(spec), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new8((C.int)(spec))) ret.isSubclass = true return ret } // NewQColor9 constructs a new QColor object. func NewQColor9(color *QColor) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new9(color.cPointer(), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new9(color.cPointer())) ret.isSubclass = true return ret } // NewQColor10 constructs a new QColor object. func NewQColor10(spec QColor__Spec, a1 uint16, a2 uint16, a3 uint16, a4 uint16) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new10((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new10((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4))) ret.isSubclass = true return ret } // NewQColor11 constructs a new QColor object. func NewQColor11(r int, g int, b int, a int) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new11((C.int)(r), (C.int)(g), (C.int)(b), (C.int)(a), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new11((C.int)(r), (C.int)(g), (C.int)(b), (C.int)(a))) ret.isSubclass = true return ret } // NewQColor12 constructs a new QColor object. func NewQColor12(spec QColor__Spec, a1 uint16, a2 uint16, a3 uint16, a4 uint16, a5 uint16) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new12((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4), (C.uint16_t)(a5), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new12((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4), (C.uint16_t)(a5))) ret.isSubclass = true return ret } diff --git a/qt/gen_qcolor.h b/qt/gen_qcolor.h index ff55197f..9c0e6413 100644 --- a/qt/gen_qcolor.h +++ b/qt/gen_qcolor.h @@ -22,18 +22,18 @@ typedef struct QColor QColor; typedef struct QRgba64 QRgba64; #endif -void QColor_new(QColor** outptr_QColor); -void QColor_new2(int color, QColor** outptr_QColor); -void QColor_new3(int r, int g, int b, QColor** outptr_QColor); -void QColor_new4(unsigned int rgb, QColor** outptr_QColor); -void QColor_new5(QRgba64* rgba64, QColor** outptr_QColor); -void QColor_new6(struct miqt_string name, QColor** outptr_QColor); -void QColor_new7(const char* aname, QColor** outptr_QColor); -void QColor_new8(int spec, QColor** outptr_QColor); -void QColor_new9(QColor* color, QColor** outptr_QColor); -void QColor_new10(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, QColor** outptr_QColor); -void QColor_new11(int r, int g, int b, int a, QColor** outptr_QColor); -void QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5, QColor** outptr_QColor); +QColor* QColor_new(); +QColor* QColor_new2(int color); +QColor* QColor_new3(int r, int g, int b); +QColor* QColor_new4(unsigned int rgb); +QColor* QColor_new5(QRgba64* rgba64); +QColor* QColor_new6(struct miqt_string name); +QColor* QColor_new7(const char* aname); +QColor* QColor_new8(int spec); +QColor* QColor_new9(QColor* color); +QColor* QColor_new10(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4); +QColor* QColor_new11(int r, int g, int b, int a); +QColor* QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5); void QColor_OperatorAssign(QColor* self, QColor* param1); void QColor_OperatorAssignWithColor(QColor* self, int color); bool QColor_IsValid(const QColor* self); diff --git a/qt/gen_qcolordialog.cpp b/qt/gen_qcolordialog.cpp index a098747b..318d02ee 100644 --- a/qt/gen_qcolordialog.cpp +++ b/qt/gen_qcolordialog.cpp @@ -382,40 +382,24 @@ public: }; -void QColorDialog_new(QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(parent); - *outptr_QColorDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QColorDialog* QColorDialog_new(QWidget* parent) { + return new MiqtVirtualQColorDialog(parent); } -void QColorDialog_new2(QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(); - *outptr_QColorDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QColorDialog* QColorDialog_new2() { + return new MiqtVirtualQColorDialog(); } -void QColorDialog_new3(QColor* initial, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(*initial); - *outptr_QColorDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QColorDialog* QColorDialog_new3(QColor* initial) { + return new MiqtVirtualQColorDialog(*initial); } -void QColorDialog_new4(QColor* initial, QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(*initial, parent); - *outptr_QColorDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QColorDialog* QColorDialog_new4(QColor* initial, QWidget* parent) { + return new MiqtVirtualQColorDialog(*initial, parent); +} + +void QColorDialog_virtbase(QColorDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QColorDialog_MetaObject(const QColorDialog* self) { diff --git a/qt/gen_qcolordialog.go b/qt/gen_qcolordialog.go index 8a7ea7d5..6d461b61 100644 --- a/qt/gen_qcolordialog.go +++ b/qt/gen_qcolordialog.go @@ -43,76 +43,50 @@ func (this *QColorDialog) UnsafePointer() unsafe.Pointer { } // newQColorDialog constructs the type using only CGO pointers. -func newQColorDialog(h *C.QColorDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QColorDialog { +func newQColorDialog(h *C.QColorDialog) *QColorDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QColorDialog_virtbase(h, &outptr_QDialog) + return &QColorDialog{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQColorDialog constructs the type using only unsafe pointers. -func UnsafeNewQColorDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QColorDialog { - if h == nil { - return nil - } - - return &QColorDialog{h: (*C.QColorDialog)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQColorDialog(h unsafe.Pointer) *QColorDialog { + return newQColorDialog((*C.QColorDialog)(h)) } // NewQColorDialog constructs a new QColorDialog object. func NewQColorDialog(parent *QWidget) *QColorDialog { - var outptr_QColorDialog *C.QColorDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QColorDialog_new(parent.cPointer(), &outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQColorDialog(C.QColorDialog_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQColorDialog2 constructs a new QColorDialog object. func NewQColorDialog2() *QColorDialog { - var outptr_QColorDialog *C.QColorDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QColorDialog_new2(&outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQColorDialog(C.QColorDialog_new2()) ret.isSubclass = true return ret } // NewQColorDialog3 constructs a new QColorDialog object. func NewQColorDialog3(initial *QColor) *QColorDialog { - var outptr_QColorDialog *C.QColorDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QColorDialog_new3(initial.cPointer(), &outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQColorDialog(C.QColorDialog_new3(initial.cPointer())) ret.isSubclass = true return ret } // NewQColorDialog4 constructs a new QColorDialog object. func NewQColorDialog4(initial *QColor, parent *QWidget) *QColorDialog { - var outptr_QColorDialog *C.QColorDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QColorDialog_new4(initial.cPointer(), parent.cPointer(), &outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQColorDialog(C.QColorDialog_new4(initial.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -593,7 +567,7 @@ func miqt_exec_callback_QColorDialog_KeyPressEvent(self *C.QColorDialog, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QColorDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -619,7 +593,7 @@ func miqt_exec_callback_QColorDialog_CloseEvent(self *C.QColorDialog, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(param1, nil) + slotval1 := newQCloseEvent(param1) gofunc((&QColorDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -645,7 +619,7 @@ func miqt_exec_callback_QColorDialog_ShowEvent(self *C.QColorDialog, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QColorDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -671,7 +645,7 @@ func miqt_exec_callback_QColorDialog_ResizeEvent(self *C.QColorDialog, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QColorDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -697,7 +671,7 @@ func miqt_exec_callback_QColorDialog_ContextMenuEvent(self *C.QColorDialog, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QColorDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt/gen_qcolordialog.h b/qt/gen_qcolordialog.h index d1202206..e657cd4e 100644 --- a/qt/gen_qcolordialog.h +++ b/qt/gen_qcolordialog.h @@ -46,10 +46,11 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QColorDialog_new(QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QColorDialog_new2(QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QColorDialog_new3(QColor* initial, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QColorDialog_new4(QColor* initial, QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QColorDialog* QColorDialog_new(QWidget* parent); +QColorDialog* QColorDialog_new2(); +QColorDialog* QColorDialog_new3(QColor* initial); +QColorDialog* QColorDialog_new4(QColor* initial, QWidget* parent); +void QColorDialog_virtbase(QColorDialog* src, QDialog** outptr_QDialog); QMetaObject* QColorDialog_MetaObject(const QColorDialog* self); void* QColorDialog_Metacast(QColorDialog* self, const char* param1); struct miqt_string QColorDialog_Tr(const char* s); diff --git a/qt/gen_qcolormap.cpp b/qt/gen_qcolormap.cpp index 3c667025..853c568f 100644 --- a/qt/gen_qcolormap.cpp +++ b/qt/gen_qcolormap.cpp @@ -5,9 +5,8 @@ #include "gen_qcolormap.h" #include "_cgo_export.h" -void QColormap_new(QColormap* colormap, QColormap** outptr_QColormap) { - QColormap* ret = new QColormap(*colormap); - *outptr_QColormap = ret; +QColormap* QColormap_new(QColormap* colormap) { + return new QColormap(*colormap); } void QColormap_Initialize() { diff --git a/qt/gen_qcolormap.go b/qt/gen_qcolormap.go index 5e756a42..cc5b38f3 100644 --- a/qt/gen_qcolormap.go +++ b/qt/gen_qcolormap.go @@ -45,24 +45,19 @@ func newQColormap(h *C.QColormap) *QColormap { if h == nil { return nil } + return &QColormap{h: h} } // UnsafeNewQColormap constructs the type using only unsafe pointers. func UnsafeNewQColormap(h unsafe.Pointer) *QColormap { - if h == nil { - return nil - } - - return &QColormap{h: (*C.QColormap)(h)} + return newQColormap((*C.QColormap)(h)) } // NewQColormap constructs a new QColormap object. func NewQColormap(colormap *QColormap) *QColormap { - var outptr_QColormap *C.QColormap = nil - C.QColormap_new(colormap.cPointer(), &outptr_QColormap) - ret := newQColormap(outptr_QColormap) + ret := newQColormap(C.QColormap_new(colormap.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qcolormap.h b/qt/gen_qcolormap.h index e9c41ca9..5d144972 100644 --- a/qt/gen_qcolormap.h +++ b/qt/gen_qcolormap.h @@ -22,7 +22,7 @@ typedef struct QColor QColor; typedef struct QColormap QColormap; #endif -void QColormap_new(QColormap* colormap, QColormap** outptr_QColormap); +QColormap* QColormap_new(QColormap* colormap); void QColormap_Initialize(); void QColormap_Cleanup(); QColormap* QColormap_Instance(); diff --git a/qt/gen_qcolorspace.cpp b/qt/gen_qcolorspace.cpp index ba1caa92..08ae9307 100644 --- a/qt/gen_qcolorspace.cpp +++ b/qt/gen_qcolorspace.cpp @@ -6,44 +6,36 @@ #include "gen_qcolorspace.h" #include "_cgo_export.h" -void QColorSpace_new(QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new() { + return new QColorSpace(); } -void QColorSpace_new2(int namedColorSpace, QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(static_cast(namedColorSpace)); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new2(int namedColorSpace) { + return new QColorSpace(static_cast(namedColorSpace)); } -void QColorSpace_new3(int primaries, int transferFunction, QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(static_cast(primaries), static_cast(transferFunction)); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new3(int primaries, int transferFunction) { + return new QColorSpace(static_cast(primaries), static_cast(transferFunction)); } -void QColorSpace_new4(int primaries, float gamma, QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(static_cast(primaries), static_cast(gamma)); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new4(int primaries, float gamma) { + return new QColorSpace(static_cast(primaries), static_cast(gamma)); } -void QColorSpace_new5(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction)); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new5(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction) { + return new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction)); } -void QColorSpace_new6(QColorSpace* colorSpace, QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(*colorSpace); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new6(QColorSpace* colorSpace) { + return new QColorSpace(*colorSpace); } -void QColorSpace_new7(int primaries, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(static_cast(primaries), static_cast(transferFunction), static_cast(gamma)); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new7(int primaries, int transferFunction, float gamma) { + return new QColorSpace(static_cast(primaries), static_cast(transferFunction), static_cast(gamma)); } -void QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction), static_cast(gamma)); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma) { + return new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction), static_cast(gamma)); } void QColorSpace_OperatorAssign(QColorSpace* self, QColorSpace* colorSpace) { diff --git a/qt/gen_qcolorspace.go b/qt/gen_qcolorspace.go index 154640dd..e1dfa6b5 100644 --- a/qt/gen_qcolorspace.go +++ b/qt/gen_qcolorspace.go @@ -67,94 +67,75 @@ func newQColorSpace(h *C.QColorSpace) *QColorSpace { if h == nil { return nil } + return &QColorSpace{h: h} } // UnsafeNewQColorSpace constructs the type using only unsafe pointers. func UnsafeNewQColorSpace(h unsafe.Pointer) *QColorSpace { - if h == nil { - return nil - } - - return &QColorSpace{h: (*C.QColorSpace)(h)} + return newQColorSpace((*C.QColorSpace)(h)) } // NewQColorSpace constructs a new QColorSpace object. func NewQColorSpace() *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new(&outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new()) ret.isSubclass = true return ret } // NewQColorSpace2 constructs a new QColorSpace object. func NewQColorSpace2(namedColorSpace QColorSpace__NamedColorSpace) *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new2((C.int)(namedColorSpace), &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new2((C.int)(namedColorSpace))) ret.isSubclass = true return ret } // NewQColorSpace3 constructs a new QColorSpace object. func NewQColorSpace3(primaries QColorSpace__Primaries, transferFunction QColorSpace__TransferFunction) *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new3((C.int)(primaries), (C.int)(transferFunction), &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new3((C.int)(primaries), (C.int)(transferFunction))) ret.isSubclass = true return ret } // NewQColorSpace4 constructs a new QColorSpace object. func NewQColorSpace4(primaries QColorSpace__Primaries, gamma float32) *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new4((C.int)(primaries), (C.float)(gamma), &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new4((C.int)(primaries), (C.float)(gamma))) ret.isSubclass = true return ret } // NewQColorSpace5 constructs a new QColorSpace object. func NewQColorSpace5(whitePoint *QPointF, redPoint *QPointF, greenPoint *QPointF, bluePoint *QPointF, transferFunction QColorSpace__TransferFunction) *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new5(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction), &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new5(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction))) ret.isSubclass = true return ret } // NewQColorSpace6 constructs a new QColorSpace object. func NewQColorSpace6(colorSpace *QColorSpace) *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new6(colorSpace.cPointer(), &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new6(colorSpace.cPointer())) ret.isSubclass = true return ret } // NewQColorSpace7 constructs a new QColorSpace object. func NewQColorSpace7(primaries QColorSpace__Primaries, transferFunction QColorSpace__TransferFunction, gamma float32) *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new7((C.int)(primaries), (C.int)(transferFunction), (C.float)(gamma), &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new7((C.int)(primaries), (C.int)(transferFunction), (C.float)(gamma))) ret.isSubclass = true return ret } // NewQColorSpace8 constructs a new QColorSpace object. func NewQColorSpace8(whitePoint *QPointF, redPoint *QPointF, greenPoint *QPointF, bluePoint *QPointF, transferFunction QColorSpace__TransferFunction, gamma float32) *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new8(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction), (C.float)(gamma), &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new8(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction), (C.float)(gamma))) ret.isSubclass = true return ret } diff --git a/qt/gen_qcolorspace.h b/qt/gen_qcolorspace.h index bd2bca0f..a714b141 100644 --- a/qt/gen_qcolorspace.h +++ b/qt/gen_qcolorspace.h @@ -24,14 +24,14 @@ typedef struct QColorTransform QColorTransform; typedef struct QPointF QPointF; #endif -void QColorSpace_new(QColorSpace** outptr_QColorSpace); -void QColorSpace_new2(int namedColorSpace, QColorSpace** outptr_QColorSpace); -void QColorSpace_new3(int primaries, int transferFunction, QColorSpace** outptr_QColorSpace); -void QColorSpace_new4(int primaries, float gamma, QColorSpace** outptr_QColorSpace); -void QColorSpace_new5(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, QColorSpace** outptr_QColorSpace); -void QColorSpace_new6(QColorSpace* colorSpace, QColorSpace** outptr_QColorSpace); -void QColorSpace_new7(int primaries, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace); -void QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace); +QColorSpace* QColorSpace_new(); +QColorSpace* QColorSpace_new2(int namedColorSpace); +QColorSpace* QColorSpace_new3(int primaries, int transferFunction); +QColorSpace* QColorSpace_new4(int primaries, float gamma); +QColorSpace* QColorSpace_new5(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction); +QColorSpace* QColorSpace_new6(QColorSpace* colorSpace); +QColorSpace* QColorSpace_new7(int primaries, int transferFunction, float gamma); +QColorSpace* QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma); void QColorSpace_OperatorAssign(QColorSpace* self, QColorSpace* colorSpace); void QColorSpace_Swap(QColorSpace* self, QColorSpace* colorSpace); int QColorSpace_Primaries(const QColorSpace* self); diff --git a/qt/gen_qcolortransform.cpp b/qt/gen_qcolortransform.cpp index 8001ac67..6f9a6180 100644 --- a/qt/gen_qcolortransform.cpp +++ b/qt/gen_qcolortransform.cpp @@ -5,14 +5,12 @@ #include "gen_qcolortransform.h" #include "_cgo_export.h" -void QColorTransform_new(QColorTransform** outptr_QColorTransform) { - QColorTransform* ret = new QColorTransform(); - *outptr_QColorTransform = ret; +QColorTransform* QColorTransform_new() { + return new QColorTransform(); } -void QColorTransform_new2(QColorTransform* colorTransform, QColorTransform** outptr_QColorTransform) { - QColorTransform* ret = new QColorTransform(*colorTransform); - *outptr_QColorTransform = ret; +QColorTransform* QColorTransform_new2(QColorTransform* colorTransform) { + return new QColorTransform(*colorTransform); } void QColorTransform_OperatorAssign(QColorTransform* self, QColorTransform* other) { diff --git a/qt/gen_qcolortransform.go b/qt/gen_qcolortransform.go index 27500984..7c409c02 100644 --- a/qt/gen_qcolortransform.go +++ b/qt/gen_qcolortransform.go @@ -37,34 +37,27 @@ func newQColorTransform(h *C.QColorTransform) *QColorTransform { if h == nil { return nil } + return &QColorTransform{h: h} } // UnsafeNewQColorTransform constructs the type using only unsafe pointers. func UnsafeNewQColorTransform(h unsafe.Pointer) *QColorTransform { - if h == nil { - return nil - } - - return &QColorTransform{h: (*C.QColorTransform)(h)} + return newQColorTransform((*C.QColorTransform)(h)) } // NewQColorTransform constructs a new QColorTransform object. func NewQColorTransform() *QColorTransform { - var outptr_QColorTransform *C.QColorTransform = nil - C.QColorTransform_new(&outptr_QColorTransform) - ret := newQColorTransform(outptr_QColorTransform) + ret := newQColorTransform(C.QColorTransform_new()) ret.isSubclass = true return ret } // NewQColorTransform2 constructs a new QColorTransform object. func NewQColorTransform2(colorTransform *QColorTransform) *QColorTransform { - var outptr_QColorTransform *C.QColorTransform = nil - C.QColorTransform_new2(colorTransform.cPointer(), &outptr_QColorTransform) - ret := newQColorTransform(outptr_QColorTransform) + ret := newQColorTransform(C.QColorTransform_new2(colorTransform.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qcolortransform.h b/qt/gen_qcolortransform.h index 08e42404..375dae2f 100644 --- a/qt/gen_qcolortransform.h +++ b/qt/gen_qcolortransform.h @@ -24,8 +24,8 @@ typedef struct QColorTransform QColorTransform; typedef struct QRgba64 QRgba64; #endif -void QColorTransform_new(QColorTransform** outptr_QColorTransform); -void QColorTransform_new2(QColorTransform* colorTransform, QColorTransform** outptr_QColorTransform); +QColorTransform* QColorTransform_new(); +QColorTransform* QColorTransform_new2(QColorTransform* colorTransform); void QColorTransform_OperatorAssign(QColorTransform* self, QColorTransform* other); void QColorTransform_Swap(QColorTransform* self, QColorTransform* other); unsigned int QColorTransform_Map(const QColorTransform* self, unsigned int argb); diff --git a/qt/gen_qcolumnview.cpp b/qt/gen_qcolumnview.cpp index d246be47..3789e220 100644 --- a/qt/gen_qcolumnview.cpp +++ b/qt/gen_qcolumnview.cpp @@ -1576,26 +1576,16 @@ public: }; -void QColumnView_new(QWidget* parent, QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQColumnView* ret = new MiqtVirtualQColumnView(parent); - *outptr_QColumnView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QColumnView* QColumnView_new(QWidget* parent) { + return new MiqtVirtualQColumnView(parent); } -void QColumnView_new2(QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQColumnView* ret = new MiqtVirtualQColumnView(); - *outptr_QColumnView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QColumnView* QColumnView_new2() { + return new MiqtVirtualQColumnView(); +} + +void QColumnView_virtbase(QColumnView* src, QAbstractItemView** outptr_QAbstractItemView) { + *outptr_QAbstractItemView = static_cast(src); } QMetaObject* QColumnView_MetaObject(const QColumnView* self) { diff --git a/qt/gen_qcolumnview.go b/qt/gen_qcolumnview.go index 3692f73a..cad5e4fa 100644 --- a/qt/gen_qcolumnview.go +++ b/qt/gen_qcolumnview.go @@ -35,52 +35,34 @@ func (this *QColumnView) UnsafePointer() unsafe.Pointer { } // newQColumnView constructs the type using only CGO pointers. -func newQColumnView(h *C.QColumnView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QColumnView { +func newQColumnView(h *C.QColumnView) *QColumnView { if h == nil { return nil } + var outptr_QAbstractItemView *C.QAbstractItemView = nil + C.QColumnView_virtbase(h, &outptr_QAbstractItemView) + return &QColumnView{h: h, - QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractItemView: newQAbstractItemView(outptr_QAbstractItemView)} } // UnsafeNewQColumnView constructs the type using only unsafe pointers. -func UnsafeNewQColumnView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QColumnView { - if h == nil { - return nil - } - - return &QColumnView{h: (*C.QColumnView)(h), - QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQColumnView(h unsafe.Pointer) *QColumnView { + return newQColumnView((*C.QColumnView)(h)) } // NewQColumnView constructs a new QColumnView object. func NewQColumnView(parent *QWidget) *QColumnView { - var outptr_QColumnView *C.QColumnView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QColumnView_new(parent.cPointer(), &outptr_QColumnView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQColumnView(outptr_QColumnView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQColumnView(C.QColumnView_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQColumnView2 constructs a new QColumnView object. func NewQColumnView2() *QColumnView { - var outptr_QColumnView *C.QColumnView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QColumnView_new2(&outptr_QColumnView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQColumnView(outptr_QColumnView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQColumnView(C.QColumnView_new2()) ret.isSubclass = true return ret } @@ -180,7 +162,7 @@ func (this *QColumnView) ResizeGripsVisible() bool { } func (this *QColumnView) PreviewWidget() *QWidget { - return newQWidget(C.QColumnView_PreviewWidget(this.h), nil, nil) + return newQWidget(C.QColumnView_PreviewWidget(this.h)) } func (this *QColumnView) SetPreviewWidget(widget *QWidget) { @@ -386,7 +368,7 @@ func miqt_exec_callback_QColumnView_SetModel(self *C.QColumnView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc((&QColumnView{h: self}).callVirtualBase_SetModel, slotval1) @@ -412,7 +394,7 @@ func miqt_exec_callback_QColumnView_SetSelectionModel(self *C.QColumnView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QColumnView{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -547,7 +529,7 @@ func miqt_exec_callback_QColumnView_ResizeEvent(self *C.QColumnView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -749,7 +731,7 @@ func miqt_exec_callback_QColumnView_ScrollContentsBy(self *C.QColumnView, cb C.i func (this *QColumnView) callVirtualBase_CreateColumn(rootIndex *QModelIndex) *QAbstractItemView { - return newQAbstractItemView(C.QColumnView_virtualbase_CreateColumn(unsafe.Pointer(this.h), rootIndex.cPointer()), nil, nil, nil, nil, nil) + return newQAbstractItemView(C.QColumnView_virtualbase_CreateColumn(unsafe.Pointer(this.h), rootIndex.cPointer())) } func (this *QColumnView) OnCreateColumn(slot func(super func(rootIndex *QModelIndex) *QAbstractItemView, rootIndex *QModelIndex) *QAbstractItemView) { @@ -1233,7 +1215,7 @@ func miqt_exec_callback_QColumnView_CloseEditor(self *C.QColumnView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) @@ -1261,7 +1243,7 @@ func miqt_exec_callback_QColumnView_CommitData(self *C.QColumnView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc((&QColumnView{h: self}).callVirtualBase_CommitData, slotval1) @@ -1422,7 +1404,7 @@ func miqt_exec_callback_QColumnView_StartDrag(self *C.QColumnView, cb C.intptr_t func (this *QColumnView) callVirtualBase_ViewOptions() *QStyleOptionViewItem { - _goptr := newQStyleOptionViewItem(C.QColumnView_virtualbase_ViewOptions(unsafe.Pointer(this.h)), nil) + _goptr := newQStyleOptionViewItem(C.QColumnView_virtualbase_ViewOptions(unsafe.Pointer(this.h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -1551,7 +1533,7 @@ func miqt_exec_callback_QColumnView_MousePressEvent(self *C.QColumnView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1577,7 +1559,7 @@ func miqt_exec_callback_QColumnView_MouseMoveEvent(self *C.QColumnView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1603,7 +1585,7 @@ func miqt_exec_callback_QColumnView_MouseReleaseEvent(self *C.QColumnView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1629,7 +1611,7 @@ func miqt_exec_callback_QColumnView_MouseDoubleClickEvent(self *C.QColumnView, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1655,7 +1637,7 @@ func miqt_exec_callback_QColumnView_DragEnterEvent(self *C.QColumnView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1681,7 +1663,7 @@ func miqt_exec_callback_QColumnView_DragMoveEvent(self *C.QColumnView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1707,7 +1689,7 @@ func miqt_exec_callback_QColumnView_DragLeaveEvent(self *C.QColumnView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1733,7 +1715,7 @@ func miqt_exec_callback_QColumnView_DropEvent(self *C.QColumnView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1759,7 +1741,7 @@ func miqt_exec_callback_QColumnView_FocusInEvent(self *C.QColumnView, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1785,7 +1767,7 @@ func miqt_exec_callback_QColumnView_FocusOutEvent(self *C.QColumnView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1811,7 +1793,7 @@ func miqt_exec_callback_QColumnView_KeyPressEvent(self *C.QColumnView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1837,7 +1819,7 @@ func miqt_exec_callback_QColumnView_TimerEvent(self *C.QColumnView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1863,7 +1845,7 @@ func miqt_exec_callback_QColumnView_InputMethodEvent(self *C.QColumnView, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qcolumnview.h b/qt/gen_qcolumnview.h index c3503fc2..6e25ecbd 100644 --- a/qt/gen_qcolumnview.h +++ b/qt/gen_qcolumnview.h @@ -76,8 +76,9 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QColumnView_new(QWidget* parent, QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QColumnView_new2(QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QColumnView* QColumnView_new(QWidget* parent); +QColumnView* QColumnView_new2(); +void QColumnView_virtbase(QColumnView* src, QAbstractItemView** outptr_QAbstractItemView); QMetaObject* QColumnView_MetaObject(const QColumnView* self); void* QColumnView_Metacast(QColumnView* self, const char* param1); struct miqt_string QColumnView_Tr(const char* s); diff --git a/qt/gen_qcombobox.cpp b/qt/gen_qcombobox.cpp index 9b2fa5b6..0635bfd5 100644 --- a/qt/gen_qcombobox.cpp +++ b/qt/gen_qcombobox.cpp @@ -1075,20 +1075,16 @@ public: }; -void QComboBox_new(QWidget* parent, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQComboBox* ret = new MiqtVirtualQComboBox(parent); - *outptr_QComboBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QComboBox* QComboBox_new(QWidget* parent) { + return new MiqtVirtualQComboBox(parent); } -void QComboBox_new2(QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQComboBox* ret = new MiqtVirtualQComboBox(); - *outptr_QComboBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QComboBox* QComboBox_new2() { + return new MiqtVirtualQComboBox(); +} + +void QComboBox_virtbase(QComboBox* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QComboBox_MetaObject(const QComboBox* self) { diff --git a/qt/gen_qcombobox.go b/qt/gen_qcombobox.go index e6706268..ac133f57 100644 --- a/qt/gen_qcombobox.go +++ b/qt/gen_qcombobox.go @@ -56,46 +56,34 @@ func (this *QComboBox) UnsafePointer() unsafe.Pointer { } // newQComboBox constructs the type using only CGO pointers. -func newQComboBox(h *C.QComboBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QComboBox { +func newQComboBox(h *C.QComboBox) *QComboBox { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QComboBox_virtbase(h, &outptr_QWidget) + return &QComboBox{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQComboBox constructs the type using only unsafe pointers. -func UnsafeNewQComboBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QComboBox { - if h == nil { - return nil - } - - return &QComboBox{h: (*C.QComboBox)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQComboBox(h unsafe.Pointer) *QComboBox { + return newQComboBox((*C.QComboBox)(h)) } // NewQComboBox constructs a new QComboBox object. func NewQComboBox(parent *QWidget) *QComboBox { - var outptr_QComboBox *C.QComboBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QComboBox_new(parent.cPointer(), &outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQComboBox(outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQComboBox(C.QComboBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQComboBox2 constructs a new QComboBox object. func NewQComboBox2() *QComboBox { - var outptr_QComboBox *C.QComboBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QComboBox_new2(&outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQComboBox(outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQComboBox(C.QComboBox_new2()) ret.isSubclass = true return ret } @@ -254,7 +242,7 @@ func (this *QComboBox) SetLineEdit(edit *QLineEdit) { } func (this *QComboBox) LineEdit() *QLineEdit { - return newQLineEdit(C.QComboBox_LineEdit(this.h), nil, nil, nil) + return newQLineEdit(C.QComboBox_LineEdit(this.h)) } func (this *QComboBox) SetValidator(v *QValidator) { @@ -262,7 +250,7 @@ func (this *QComboBox) SetValidator(v *QValidator) { } func (this *QComboBox) Validator() *QValidator { - return newQValidator(C.QComboBox_Validator(this.h), nil) + return newQValidator(C.QComboBox_Validator(this.h)) } func (this *QComboBox) SetCompleter(c *QCompleter) { @@ -270,11 +258,11 @@ func (this *QComboBox) SetCompleter(c *QCompleter) { } func (this *QComboBox) Completer() *QCompleter { - return newQCompleter(C.QComboBox_Completer(this.h), nil) + return newQCompleter(C.QComboBox_Completer(this.h)) } func (this *QComboBox) ItemDelegate() *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QComboBox_ItemDelegate(this.h), nil) + return newQAbstractItemDelegate(C.QComboBox_ItemDelegate(this.h)) } func (this *QComboBox) SetItemDelegate(delegate *QAbstractItemDelegate) { @@ -282,7 +270,7 @@ func (this *QComboBox) SetItemDelegate(delegate *QAbstractItemDelegate) { } func (this *QComboBox) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QComboBox_Model(this.h), nil) + return newQAbstractItemModel(C.QComboBox_Model(this.h)) } func (this *QComboBox) SetModel(model *QAbstractItemModel) { @@ -428,7 +416,7 @@ func (this *QComboBox) SetItemData(index int, value *QVariant) { } func (this *QComboBox) View() *QAbstractItemView { - return newQAbstractItemView(C.QComboBox_View(this.h), nil, nil, nil, nil, nil) + return newQAbstractItemView(C.QComboBox_View(this.h)) } func (this *QComboBox) SetView(itemView *QAbstractItemView) { @@ -1034,7 +1022,7 @@ func miqt_exec_callback_QComboBox_FocusInEvent(self *C.QComboBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1060,7 +1048,7 @@ func miqt_exec_callback_QComboBox_FocusOutEvent(self *C.QComboBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1112,7 +1100,7 @@ func miqt_exec_callback_QComboBox_ResizeEvent(self *C.QComboBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1138,7 +1126,7 @@ func miqt_exec_callback_QComboBox_PaintEvent(self *C.QComboBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1164,7 +1152,7 @@ func miqt_exec_callback_QComboBox_ShowEvent(self *C.QComboBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(e, nil) + slotval1 := newQShowEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1190,7 +1178,7 @@ func miqt_exec_callback_QComboBox_HideEvent(self *C.QComboBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(e, nil) + slotval1 := newQHideEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1216,7 +1204,7 @@ func miqt_exec_callback_QComboBox_MousePressEvent(self *C.QComboBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1242,7 +1230,7 @@ func miqt_exec_callback_QComboBox_MouseReleaseEvent(self *C.QComboBox, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1268,7 +1256,7 @@ func miqt_exec_callback_QComboBox_KeyPressEvent(self *C.QComboBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1294,7 +1282,7 @@ func miqt_exec_callback_QComboBox_KeyReleaseEvent(self *C.QComboBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1320,7 +1308,7 @@ func miqt_exec_callback_QComboBox_WheelEvent(self *C.QComboBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1346,7 +1334,7 @@ func miqt_exec_callback_QComboBox_ContextMenuEvent(self *C.QComboBox, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(e, nil, nil) + slotval1 := newQContextMenuEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1372,7 +1360,7 @@ func miqt_exec_callback_QComboBox_InputMethodEvent(self *C.QComboBox, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QComboBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -1527,7 +1515,7 @@ func miqt_exec_callback_QComboBox_MouseDoubleClickEvent(self *C.QComboBox, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1553,7 +1541,7 @@ func miqt_exec_callback_QComboBox_MouseMoveEvent(self *C.QComboBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1631,7 +1619,7 @@ func miqt_exec_callback_QComboBox_MoveEvent(self *C.QComboBox, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1657,7 +1645,7 @@ func miqt_exec_callback_QComboBox_CloseEvent(self *C.QComboBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1683,7 +1671,7 @@ func miqt_exec_callback_QComboBox_TabletEvent(self *C.QComboBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1709,7 +1697,7 @@ func miqt_exec_callback_QComboBox_ActionEvent(self *C.QComboBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1735,7 +1723,7 @@ func miqt_exec_callback_QComboBox_DragEnterEvent(self *C.QComboBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1761,7 +1749,7 @@ func miqt_exec_callback_QComboBox_DragMoveEvent(self *C.QComboBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1787,7 +1775,7 @@ func miqt_exec_callback_QComboBox_DragLeaveEvent(self *C.QComboBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1813,7 +1801,7 @@ func miqt_exec_callback_QComboBox_DropEvent(self *C.QComboBox, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_DropEvent, slotval1) diff --git a/qt/gen_qcombobox.h b/qt/gen_qcombobox.h index 985457dc..8acf60de 100644 --- a/qt/gen_qcombobox.h +++ b/qt/gen_qcombobox.h @@ -92,8 +92,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QComboBox_new(QWidget* parent, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QComboBox_new2(QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QComboBox* QComboBox_new(QWidget* parent); +QComboBox* QComboBox_new2(); +void QComboBox_virtbase(QComboBox* src, QWidget** outptr_QWidget); QMetaObject* QComboBox_MetaObject(const QComboBox* self); void* QComboBox_Metacast(QComboBox* self, const char* param1); struct miqt_string QComboBox_Tr(const char* s); diff --git a/qt/gen_qcommandlineoption.cpp b/qt/gen_qcommandlineoption.cpp index a6d90c4f..68a32216 100644 --- a/qt/gen_qcommandlineoption.cpp +++ b/qt/gen_qcommandlineoption.cpp @@ -7,13 +7,12 @@ #include "gen_qcommandlineoption.h" #include "_cgo_export.h" -void QCommandLineOption_new(struct miqt_string name, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - QCommandLineOption* ret = new QCommandLineOption(name_QString); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(name_QString); } -void QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -21,18 +20,16 @@ void QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ name QString names_arr_i_QString = QString::fromUtf8(names_arr[i].data, names_arr[i].len); names_QList.push_back(names_arr_i_QString); } - QCommandLineOption* ret = new QCommandLineOption(names_QList); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(names_QList); } -void QCommandLineOption_new3(struct miqt_string name, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new3(struct miqt_string name, struct miqt_string description) { QString name_QString = QString::fromUtf8(name.data, name.len); QString description_QString = QString::fromUtf8(description.data, description.len); - QCommandLineOption* ret = new QCommandLineOption(name_QString, description_QString); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(name_QString, description_QString); } -void QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -41,33 +38,29 @@ void QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ name names_QList.push_back(names_arr_i_QString); } QString description_QString = QString::fromUtf8(description.data, description.len); - QCommandLineOption* ret = new QCommandLineOption(names_QList, description_QString); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(names_QList, description_QString); } -void QCommandLineOption_new5(QCommandLineOption* other, QCommandLineOption** outptr_QCommandLineOption) { - QCommandLineOption* ret = new QCommandLineOption(*other); - *outptr_QCommandLineOption = ret; +QCommandLineOption* QCommandLineOption_new5(QCommandLineOption* other) { + return new QCommandLineOption(*other); } -void QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName) { QString name_QString = QString::fromUtf8(name.data, name.len); QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); - QCommandLineOption* ret = new QCommandLineOption(name_QString, description_QString, valueName_QString); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(name_QString, description_QString, valueName_QString); } -void QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue) { QString name_QString = QString::fromUtf8(name.data, name.len); QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); QString defaultValue_QString = QString::fromUtf8(defaultValue.data, defaultValue.len); - QCommandLineOption* ret = new QCommandLineOption(name_QString, description_QString, valueName_QString, defaultValue_QString); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(name_QString, description_QString, valueName_QString, defaultValue_QString); } -void QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -77,11 +70,10 @@ void QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ name } QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); - QCommandLineOption* ret = new QCommandLineOption(names_QList, description_QString, valueName_QString); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(names_QList, description_QString, valueName_QString); } -void QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -92,8 +84,7 @@ void QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ name QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); QString defaultValue_QString = QString::fromUtf8(defaultValue.data, defaultValue.len); - QCommandLineOption* ret = new QCommandLineOption(names_QList, description_QString, valueName_QString, defaultValue_QString); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(names_QList, description_QString, valueName_QString, defaultValue_QString); } void QCommandLineOption_OperatorAssign(QCommandLineOption* self, QCommandLineOption* other) { diff --git a/qt/gen_qcommandlineoption.go b/qt/gen_qcommandlineoption.go index d039ec2b..77cd296f 100644 --- a/qt/gen_qcommandlineoption.go +++ b/qt/gen_qcommandlineoption.go @@ -44,16 +44,13 @@ func newQCommandLineOption(h *C.QCommandLineOption) *QCommandLineOption { if h == nil { return nil } + return &QCommandLineOption{h: h} } // UnsafeNewQCommandLineOption constructs the type using only unsafe pointers. func UnsafeNewQCommandLineOption(h unsafe.Pointer) *QCommandLineOption { - if h == nil { - return nil - } - - return &QCommandLineOption{h: (*C.QCommandLineOption)(h)} + return newQCommandLineOption((*C.QCommandLineOption)(h)) } // NewQCommandLineOption constructs a new QCommandLineOption object. @@ -62,10 +59,8 @@ func NewQCommandLineOption(name string) *QCommandLineOption { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new(name_ms, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new(name_ms)) ret.isSubclass = true return ret } @@ -82,10 +77,8 @@ func NewQCommandLineOption2(names []string) *QCommandLineOption { names_CArray[i] = names_i_ms } names_ma := C.struct_miqt_array{len: C.size_t(len(names)), data: unsafe.Pointer(names_CArray)} - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new2(names_ma, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new2(names_ma)) ret.isSubclass = true return ret } @@ -100,10 +93,8 @@ func NewQCommandLineOption3(name string, description string) *QCommandLineOption description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new3(name_ms, description_ms, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new3(name_ms, description_ms)) ret.isSubclass = true return ret } @@ -124,20 +115,16 @@ func NewQCommandLineOption4(names []string, description string) *QCommandLineOpt description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new4(names_ma, description_ms, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new4(names_ma, description_ms)) ret.isSubclass = true return ret } // NewQCommandLineOption5 constructs a new QCommandLineOption object. func NewQCommandLineOption5(other *QCommandLineOption) *QCommandLineOption { - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new5(other.cPointer(), &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new5(other.cPointer())) ret.isSubclass = true return ret } @@ -156,10 +143,8 @@ func NewQCommandLineOption6(name string, description string, valueName string) * valueName_ms.data = C.CString(valueName) valueName_ms.len = C.size_t(len(valueName)) defer C.free(unsafe.Pointer(valueName_ms.data)) - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new6(name_ms, description_ms, valueName_ms, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new6(name_ms, description_ms, valueName_ms)) ret.isSubclass = true return ret } @@ -182,10 +167,8 @@ func NewQCommandLineOption7(name string, description string, valueName string, d defaultValue_ms.data = C.CString(defaultValue) defaultValue_ms.len = C.size_t(len(defaultValue)) defer C.free(unsafe.Pointer(defaultValue_ms.data)) - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new7(name_ms, description_ms, valueName_ms, defaultValue_ms, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new7(name_ms, description_ms, valueName_ms, defaultValue_ms)) ret.isSubclass = true return ret } @@ -210,10 +193,8 @@ func NewQCommandLineOption8(names []string, description string, valueName string valueName_ms.data = C.CString(valueName) valueName_ms.len = C.size_t(len(valueName)) defer C.free(unsafe.Pointer(valueName_ms.data)) - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new8(names_ma, description_ms, valueName_ms, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new8(names_ma, description_ms, valueName_ms)) ret.isSubclass = true return ret } @@ -242,10 +223,8 @@ func NewQCommandLineOption9(names []string, description string, valueName string defaultValue_ms.data = C.CString(defaultValue) defaultValue_ms.len = C.size_t(len(defaultValue)) defer C.free(unsafe.Pointer(defaultValue_ms.data)) - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new9(names_ma, description_ms, valueName_ms, defaultValue_ms, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new9(names_ma, description_ms, valueName_ms, defaultValue_ms)) ret.isSubclass = true return ret } diff --git a/qt/gen_qcommandlineoption.h b/qt/gen_qcommandlineoption.h index d2d9aa7c..c7ff0038 100644 --- a/qt/gen_qcommandlineoption.h +++ b/qt/gen_qcommandlineoption.h @@ -20,15 +20,15 @@ class QCommandLineOption; typedef struct QCommandLineOption QCommandLineOption; #endif -void QCommandLineOption_new(struct miqt_string name, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new3(struct miqt_string name, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new5(QCommandLineOption* other, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption); +QCommandLineOption* QCommandLineOption_new(struct miqt_string name); +QCommandLineOption* QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names); +QCommandLineOption* QCommandLineOption_new3(struct miqt_string name, struct miqt_string description); +QCommandLineOption* QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description); +QCommandLineOption* QCommandLineOption_new5(QCommandLineOption* other); +QCommandLineOption* QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName); +QCommandLineOption* QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue); +QCommandLineOption* QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName); +QCommandLineOption* QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue); void QCommandLineOption_OperatorAssign(QCommandLineOption* self, QCommandLineOption* other); void QCommandLineOption_Swap(QCommandLineOption* self, QCommandLineOption* other); struct miqt_array /* of struct miqt_string */ QCommandLineOption_Names(const QCommandLineOption* self); diff --git a/qt/gen_qcommandlineparser.cpp b/qt/gen_qcommandlineparser.cpp index 3aca0860..3409627d 100644 --- a/qt/gen_qcommandlineparser.cpp +++ b/qt/gen_qcommandlineparser.cpp @@ -9,9 +9,8 @@ #include "gen_qcommandlineparser.h" #include "_cgo_export.h" -void QCommandLineParser_new(QCommandLineParser** outptr_QCommandLineParser) { - QCommandLineParser* ret = new QCommandLineParser(); - *outptr_QCommandLineParser = ret; +QCommandLineParser* QCommandLineParser_new() { + return new QCommandLineParser(); } struct miqt_string QCommandLineParser_Tr(const char* sourceText) { diff --git a/qt/gen_qcommandlineparser.go b/qt/gen_qcommandlineparser.go index eaf6b5de..ee31a023 100644 --- a/qt/gen_qcommandlineparser.go +++ b/qt/gen_qcommandlineparser.go @@ -51,24 +51,19 @@ func newQCommandLineParser(h *C.QCommandLineParser) *QCommandLineParser { if h == nil { return nil } + return &QCommandLineParser{h: h} } // UnsafeNewQCommandLineParser constructs the type using only unsafe pointers. func UnsafeNewQCommandLineParser(h unsafe.Pointer) *QCommandLineParser { - if h == nil { - return nil - } - - return &QCommandLineParser{h: (*C.QCommandLineParser)(h)} + return newQCommandLineParser((*C.QCommandLineParser)(h)) } // NewQCommandLineParser constructs a new QCommandLineParser object. func NewQCommandLineParser() *QCommandLineParser { - var outptr_QCommandLineParser *C.QCommandLineParser = nil - C.QCommandLineParser_new(&outptr_QCommandLineParser) - ret := newQCommandLineParser(outptr_QCommandLineParser) + ret := newQCommandLineParser(C.QCommandLineParser_new()) ret.isSubclass = true return ret } diff --git a/qt/gen_qcommandlineparser.h b/qt/gen_qcommandlineparser.h index 081514d1..6fdc3359 100644 --- a/qt/gen_qcommandlineparser.h +++ b/qt/gen_qcommandlineparser.h @@ -24,7 +24,7 @@ typedef struct QCommandLineParser QCommandLineParser; typedef struct QCoreApplication QCoreApplication; #endif -void QCommandLineParser_new(QCommandLineParser** outptr_QCommandLineParser); +QCommandLineParser* QCommandLineParser_new(); struct miqt_string QCommandLineParser_Tr(const char* sourceText); struct miqt_string QCommandLineParser_TrUtf8(const char* sourceText); void QCommandLineParser_SetSingleDashWordOptionMode(QCommandLineParser* self, int parsingMode); diff --git a/qt/gen_qcommandlinkbutton.cpp b/qt/gen_qcommandlinkbutton.cpp index 541e088c..9bd281f5 100644 --- a/qt/gen_qcommandlinkbutton.cpp +++ b/qt/gen_qcommandlinkbutton.cpp @@ -243,70 +243,38 @@ public: }; -void QCommandLinkButton_new(QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(parent); - *outptr_QCommandLinkButton = ret; - *outptr_QPushButton = static_cast(ret); - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QCommandLinkButton* QCommandLinkButton_new(QWidget* parent) { + return new MiqtVirtualQCommandLinkButton(parent); } -void QCommandLinkButton_new2(QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(); - *outptr_QCommandLinkButton = ret; - *outptr_QPushButton = static_cast(ret); - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QCommandLinkButton* QCommandLinkButton_new2() { + return new MiqtVirtualQCommandLinkButton(); } -void QCommandLinkButton_new3(struct miqt_string text, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QCommandLinkButton* QCommandLinkButton_new3(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString); - *outptr_QCommandLinkButton = ret; - *outptr_QPushButton = static_cast(ret); - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQCommandLinkButton(text_QString); } -void QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QCommandLinkButton* QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description) { QString text_QString = QString::fromUtf8(text.data, text.len); QString description_QString = QString::fromUtf8(description.data, description.len); - MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString, description_QString); - *outptr_QCommandLinkButton = ret; - *outptr_QPushButton = static_cast(ret); - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQCommandLinkButton(text_QString, description_QString); } -void QCommandLinkButton_new5(struct miqt_string text, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QCommandLinkButton* QCommandLinkButton_new5(struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString, parent); - *outptr_QCommandLinkButton = ret; - *outptr_QPushButton = static_cast(ret); - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQCommandLinkButton(text_QString, parent); } -void QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QCommandLinkButton* QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); QString description_QString = QString::fromUtf8(description.data, description.len); - MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString, description_QString, parent); - *outptr_QCommandLinkButton = ret; - *outptr_QPushButton = static_cast(ret); - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQCommandLinkButton(text_QString, description_QString, parent); +} + +void QCommandLinkButton_virtbase(QCommandLinkButton* src, QPushButton** outptr_QPushButton) { + *outptr_QPushButton = static_cast(src); } QMetaObject* QCommandLinkButton_MetaObject(const QCommandLinkButton* self) { diff --git a/qt/gen_qcommandlinkbutton.go b/qt/gen_qcommandlinkbutton.go index ec9dceb5..fe2386b8 100644 --- a/qt/gen_qcommandlinkbutton.go +++ b/qt/gen_qcommandlinkbutton.go @@ -35,50 +35,34 @@ func (this *QCommandLinkButton) UnsafePointer() unsafe.Pointer { } // newQCommandLinkButton constructs the type using only CGO pointers. -func newQCommandLinkButton(h *C.QCommandLinkButton, h_QPushButton *C.QPushButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QCommandLinkButton { +func newQCommandLinkButton(h *C.QCommandLinkButton) *QCommandLinkButton { if h == nil { return nil } + var outptr_QPushButton *C.QPushButton = nil + C.QCommandLinkButton_virtbase(h, &outptr_QPushButton) + return &QCommandLinkButton{h: h, - QPushButton: newQPushButton(h_QPushButton, h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} + QPushButton: newQPushButton(outptr_QPushButton)} } // UnsafeNewQCommandLinkButton constructs the type using only unsafe pointers. -func UnsafeNewQCommandLinkButton(h unsafe.Pointer, h_QPushButton unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QCommandLinkButton { - if h == nil { - return nil - } - - return &QCommandLinkButton{h: (*C.QCommandLinkButton)(h), - QPushButton: UnsafeNewQPushButton(h_QPushButton, h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQCommandLinkButton(h unsafe.Pointer) *QCommandLinkButton { + return newQCommandLinkButton((*C.QCommandLinkButton)(h)) } // NewQCommandLinkButton constructs a new QCommandLinkButton object. func NewQCommandLinkButton(parent *QWidget) *QCommandLinkButton { - var outptr_QCommandLinkButton *C.QCommandLinkButton = nil - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCommandLinkButton_new(parent.cPointer(), &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCommandLinkButton(C.QCommandLinkButton_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQCommandLinkButton2 constructs a new QCommandLinkButton object. func NewQCommandLinkButton2() *QCommandLinkButton { - var outptr_QCommandLinkButton *C.QCommandLinkButton = nil - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCommandLinkButton_new2(&outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCommandLinkButton(C.QCommandLinkButton_new2()) ret.isSubclass = true return ret } @@ -89,15 +73,8 @@ func NewQCommandLinkButton3(text string) *QCommandLinkButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QCommandLinkButton *C.QCommandLinkButton = nil - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCommandLinkButton_new3(text_ms, &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCommandLinkButton(C.QCommandLinkButton_new3(text_ms)) ret.isSubclass = true return ret } @@ -112,15 +89,8 @@ func NewQCommandLinkButton4(text string, description string) *QCommandLinkButton description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - var outptr_QCommandLinkButton *C.QCommandLinkButton = nil - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCommandLinkButton_new4(text_ms, description_ms, &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCommandLinkButton(C.QCommandLinkButton_new4(text_ms, description_ms)) ret.isSubclass = true return ret } @@ -131,15 +101,8 @@ func NewQCommandLinkButton5(text string, parent *QWidget) *QCommandLinkButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QCommandLinkButton *C.QCommandLinkButton = nil - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCommandLinkButton_new5(text_ms, parent.cPointer(), &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCommandLinkButton(C.QCommandLinkButton_new5(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -154,15 +117,8 @@ func NewQCommandLinkButton6(text string, description string, parent *QWidget) *Q description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - var outptr_QCommandLinkButton *C.QCommandLinkButton = nil - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCommandLinkButton_new6(text_ms, description_ms, parent.cPointer(), &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCommandLinkButton(C.QCommandLinkButton_new6(text_ms, description_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -384,7 +340,7 @@ func miqt_exec_callback_QCommandLinkButton_PaintEvent(self *C.QCommandLinkButton } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QCommandLinkButton{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -410,7 +366,7 @@ func miqt_exec_callback_QCommandLinkButton_KeyPressEvent(self *C.QCommandLinkBut } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QCommandLinkButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -436,7 +392,7 @@ func miqt_exec_callback_QCommandLinkButton_FocusInEvent(self *C.QCommandLinkButt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QCommandLinkButton{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -462,7 +418,7 @@ func miqt_exec_callback_QCommandLinkButton_FocusOutEvent(self *C.QCommandLinkBut } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QCommandLinkButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) diff --git a/qt/gen_qcommandlinkbutton.h b/qt/gen_qcommandlinkbutton.h index 8802acdf..ff7a6adc 100644 --- a/qt/gen_qcommandlinkbutton.h +++ b/qt/gen_qcommandlinkbutton.h @@ -44,12 +44,13 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QCommandLinkButton_new(QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCommandLinkButton_new2(QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCommandLinkButton_new3(struct miqt_string text, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCommandLinkButton_new5(struct miqt_string text, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QCommandLinkButton* QCommandLinkButton_new(QWidget* parent); +QCommandLinkButton* QCommandLinkButton_new2(); +QCommandLinkButton* QCommandLinkButton_new3(struct miqt_string text); +QCommandLinkButton* QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description); +QCommandLinkButton* QCommandLinkButton_new5(struct miqt_string text, QWidget* parent); +QCommandLinkButton* QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent); +void QCommandLinkButton_virtbase(QCommandLinkButton* src, QPushButton** outptr_QPushButton); QMetaObject* QCommandLinkButton_MetaObject(const QCommandLinkButton* self); void* QCommandLinkButton_Metacast(QCommandLinkButton* self, const char* param1); struct miqt_string QCommandLinkButton_Tr(const char* s); diff --git a/qt/gen_qcommonstyle.cpp b/qt/gen_qcommonstyle.cpp index 925f128f..89b675b2 100644 --- a/qt/gen_qcommonstyle.cpp +++ b/qt/gen_qcommonstyle.cpp @@ -677,11 +677,12 @@ public: }; -void QCommonStyle_new(QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { - MiqtVirtualQCommonStyle* ret = new MiqtVirtualQCommonStyle(); - *outptr_QCommonStyle = ret; - *outptr_QStyle = static_cast(ret); - *outptr_QObject = static_cast(ret); +QCommonStyle* QCommonStyle_new() { + return new MiqtVirtualQCommonStyle(); +} + +void QCommonStyle_virtbase(QCommonStyle* src, QStyle** outptr_QStyle) { + *outptr_QStyle = static_cast(src); } QMetaObject* QCommonStyle_MetaObject(const QCommonStyle* self) { diff --git a/qt/gen_qcommonstyle.go b/qt/gen_qcommonstyle.go index 6e81658f..106528f1 100644 --- a/qt/gen_qcommonstyle.go +++ b/qt/gen_qcommonstyle.go @@ -35,32 +35,26 @@ func (this *QCommonStyle) UnsafePointer() unsafe.Pointer { } // newQCommonStyle constructs the type using only CGO pointers. -func newQCommonStyle(h *C.QCommonStyle, h_QStyle *C.QStyle, h_QObject *C.QObject) *QCommonStyle { +func newQCommonStyle(h *C.QCommonStyle) *QCommonStyle { if h == nil { return nil } + var outptr_QStyle *C.QStyle = nil + C.QCommonStyle_virtbase(h, &outptr_QStyle) + return &QCommonStyle{h: h, - QStyle: newQStyle(h_QStyle, h_QObject)} + QStyle: newQStyle(outptr_QStyle)} } // UnsafeNewQCommonStyle constructs the type using only unsafe pointers. -func UnsafeNewQCommonStyle(h unsafe.Pointer, h_QStyle unsafe.Pointer, h_QObject unsafe.Pointer) *QCommonStyle { - if h == nil { - return nil - } - - return &QCommonStyle{h: (*C.QCommonStyle)(h), - QStyle: UnsafeNewQStyle(h_QStyle, h_QObject)} +func UnsafeNewQCommonStyle(h unsafe.Pointer) *QCommonStyle { + return newQCommonStyle((*C.QCommonStyle)(h)) } // NewQCommonStyle constructs a new QCommonStyle object. func NewQCommonStyle() *QCommonStyle { - var outptr_QCommonStyle *C.QCommonStyle = nil - var outptr_QStyle *C.QStyle = nil - var outptr_QObject *C.QObject = nil - C.QCommonStyle_new(&outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) - ret := newQCommonStyle(outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret := newQCommonStyle(C.QCommonStyle_new()) ret.isSubclass = true return ret } @@ -142,13 +136,13 @@ func (this *QCommonStyle) StandardIcon(standardIcon QStyle__StandardPixmap, opt } func (this *QCommonStyle) StandardPixmap(sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _goptr := newQPixmap(C.QCommonStyle_StandardPixmap(this.h, (C.int)(sp), opt.cPointer(), widget.cPointer()), nil) + _goptr := newQPixmap(C.QCommonStyle_StandardPixmap(this.h, (C.int)(sp), opt.cPointer(), widget.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCommonStyle) GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { - _goptr := newQPixmap(C.QCommonStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()), nil) + _goptr := newQPixmap(C.QCommonStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -247,7 +241,7 @@ func miqt_exec_callback_QCommonStyle_DrawPrimitive(self *C.QCommonStyle, cb C.in slotval3 := newQPainter(p) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawPrimitive, slotval1, slotval2, slotval3, slotval4) @@ -279,7 +273,7 @@ func miqt_exec_callback_QCommonStyle_DrawControl(self *C.QCommonStyle, cb C.intp slotval3 := newQPainter(p) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawControl, slotval1, slotval2, slotval3, slotval4) @@ -311,7 +305,7 @@ func miqt_exec_callback_QCommonStyle_SubElementRect(self *C.QCommonStyle, cb C.i slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_SubElementRect, slotval1, slotval2, slotval3) @@ -341,11 +335,11 @@ func miqt_exec_callback_QCommonStyle_DrawComplexControl(self *C.QCommonStyle, cb // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(cc) - slotval2 := newQStyleOptionComplex(opt, nil) + slotval2 := newQStyleOptionComplex(opt) slotval3 := newQPainter(p) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawComplexControl, slotval1, slotval2, slotval3, slotval4) @@ -373,11 +367,11 @@ func miqt_exec_callback_QCommonStyle_HitTestComplexControl(self *C.QCommonStyle, // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(cc) - slotval2 := newQStyleOptionComplex(opt, nil) + slotval2 := newQStyleOptionComplex(opt) slotval3 := newQPoint(pt) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_HitTestComplexControl, slotval1, slotval2, slotval3, slotval4) @@ -409,11 +403,11 @@ func miqt_exec_callback_QCommonStyle_SubControlRect(self *C.QCommonStyle, cb C.i // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(cc) - slotval2 := newQStyleOptionComplex(opt, nil) + slotval2 := newQStyleOptionComplex(opt) slotval3 := (QStyle__SubControl)(sc) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_SubControlRect, slotval1, slotval2, slotval3, slotval4) @@ -449,7 +443,7 @@ func miqt_exec_callback_QCommonStyle_SizeFromContents(self *C.QCommonStyle, cb C slotval3 := newQSize(contentsSize) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_SizeFromContents, slotval1, slotval2, slotval3, slotval4) @@ -481,7 +475,7 @@ func miqt_exec_callback_QCommonStyle_PixelMetric(self *C.QCommonStyle, cb C.intp slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_PixelMetric, slotval1, slotval2, slotval3) @@ -513,7 +507,7 @@ func miqt_exec_callback_QCommonStyle_StyleHint(self *C.QCommonStyle, cb C.intptr slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(w, nil, nil) + slotval3 := newQWidget(w) slotval4 := newQStyleHintReturn(shret) @@ -549,7 +543,7 @@ func miqt_exec_callback_QCommonStyle_StandardIcon(self *C.QCommonStyle, cb C.int slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_StandardIcon, slotval1, slotval2, slotval3) @@ -559,7 +553,7 @@ func miqt_exec_callback_QCommonStyle_StandardIcon(self *C.QCommonStyle, cb C.int func (this *QCommonStyle) callVirtualBase_StandardPixmap(sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _goptr := newQPixmap(C.QCommonStyle_virtualbase_StandardPixmap(unsafe.Pointer(this.h), (C.int)(sp), opt.cPointer(), widget.cPointer()), nil) + _goptr := newQPixmap(C.QCommonStyle_virtualbase_StandardPixmap(unsafe.Pointer(this.h), (C.int)(sp), opt.cPointer(), widget.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -583,7 +577,7 @@ func miqt_exec_callback_QCommonStyle_StandardPixmap(self *C.QCommonStyle, cb C.i slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_StandardPixmap, slotval1, slotval2, slotval3) @@ -593,7 +587,7 @@ func miqt_exec_callback_QCommonStyle_StandardPixmap(self *C.QCommonStyle, cb C.i func (this *QCommonStyle) callVirtualBase_GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { - _goptr := newQPixmap(C.QCommonStyle_virtualbase_GeneratedIconPixmap(unsafe.Pointer(this.h), (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()), nil) + _goptr := newQPixmap(C.QCommonStyle_virtualbase_GeneratedIconPixmap(unsafe.Pointer(this.h), (C.int)(iconMode), pixmap.cPointer(), opt.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -615,7 +609,7 @@ func miqt_exec_callback_QCommonStyle_GeneratedIconPixmap(self *C.QCommonStyle, c // Convert all CABI parameters to Go parameters slotval1 := (QIcon__Mode)(iconMode) - slotval2 := newQPixmap(pixmap, nil) + slotval2 := newQPixmap(pixmap) slotval3 := newQStyleOption(opt) @@ -653,7 +647,7 @@ func miqt_exec_callback_QCommonStyle_LayoutSpacing(self *C.QCommonStyle, cb C.in slotval4 := newQStyleOption(option) - slotval5 := newQWidget(widget, nil, nil) + slotval5 := newQWidget(widget) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_LayoutSpacing, slotval1, slotval2, slotval3, slotval4, slotval5) @@ -707,7 +701,7 @@ func miqt_exec_callback_QCommonStyle_PolishWithApp(self *C.QCommonStyle, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQApplication(app, nil, nil, nil) + slotval1 := newQApplication(app) gofunc((&QCommonStyle{h: self}).callVirtualBase_PolishWithApp, slotval1) @@ -733,7 +727,7 @@ func miqt_exec_callback_QCommonStyle_PolishWithWidget(self *C.QCommonStyle, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QCommonStyle{h: self}).callVirtualBase_PolishWithWidget, slotval1) @@ -759,7 +753,7 @@ func miqt_exec_callback_QCommonStyle_Unpolish(self *C.QCommonStyle, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QCommonStyle{h: self}).callVirtualBase_Unpolish, slotval1) @@ -785,7 +779,7 @@ func miqt_exec_callback_QCommonStyle_UnpolishWithApplication(self *C.QCommonStyl } // Convert all CABI parameters to Go parameters - slotval1 := newQApplication(application, nil, nil, nil) + slotval1 := newQApplication(application) gofunc((&QCommonStyle{h: self}).callVirtualBase_UnpolishWithApplication, slotval1) @@ -862,7 +856,7 @@ func miqt_exec_callback_QCommonStyle_ItemPixmapRect(self *C.QCommonStyle, cb C.i slotval2 := (int)(flags) - slotval3 := newQPixmap(pixmap, nil) + slotval3 := newQPixmap(pixmap) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_ItemPixmapRect, slotval1, slotval2, slotval3) @@ -940,7 +934,7 @@ func miqt_exec_callback_QCommonStyle_DrawItemPixmap(self *C.QCommonStyle, cb C.i slotval3 := (int)(alignment) - slotval4 := newQPixmap(pixmap, nil) + slotval4 := newQPixmap(pixmap) gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawItemPixmap, slotval1, slotval2, slotval3, slotval4) diff --git a/qt/gen_qcommonstyle.h b/qt/gen_qcommonstyle.h index 3938cd9b..55aa3475 100644 --- a/qt/gen_qcommonstyle.h +++ b/qt/gen_qcommonstyle.h @@ -52,7 +52,8 @@ typedef struct QStyleOptionComplex QStyleOptionComplex; typedef struct QWidget QWidget; #endif -void QCommonStyle_new(QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); +QCommonStyle* QCommonStyle_new(); +void QCommonStyle_virtbase(QCommonStyle* src, QStyle** outptr_QStyle); QMetaObject* QCommonStyle_MetaObject(const QCommonStyle* self); void* QCommonStyle_Metacast(QCommonStyle* self, const char* param1); struct miqt_string QCommonStyle_Tr(const char* s); diff --git a/qt/gen_qcompleter.cpp b/qt/gen_qcompleter.cpp index 30ac9c5c..99223875 100644 --- a/qt/gen_qcompleter.cpp +++ b/qt/gen_qcompleter.cpp @@ -290,19 +290,15 @@ public: }; -void QCompleter_new(QCompleter** outptr_QCompleter, QObject** outptr_QObject) { - MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(); - *outptr_QCompleter = ret; - *outptr_QObject = static_cast(ret); +QCompleter* QCompleter_new() { + return new MiqtVirtualQCompleter(); } -void QCompleter_new2(QAbstractItemModel* model, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { - MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(model); - *outptr_QCompleter = ret; - *outptr_QObject = static_cast(ret); +QCompleter* QCompleter_new2(QAbstractItemModel* model) { + return new MiqtVirtualQCompleter(model); } -void QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { +QCompleter* QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions) { QStringList completions_QList; completions_QList.reserve(completions.len); struct miqt_string* completions_arr = static_cast(completions.data); @@ -310,24 +306,18 @@ void QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions, QString completions_arr_i_QString = QString::fromUtf8(completions_arr[i].data, completions_arr[i].len); completions_QList.push_back(completions_arr_i_QString); } - MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(completions_QList); - *outptr_QCompleter = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQCompleter(completions_QList); } -void QCompleter_new4(QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { - MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(parent); - *outptr_QCompleter = ret; - *outptr_QObject = static_cast(ret); +QCompleter* QCompleter_new4(QObject* parent) { + return new MiqtVirtualQCompleter(parent); } -void QCompleter_new5(QAbstractItemModel* model, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { - MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(model, parent); - *outptr_QCompleter = ret; - *outptr_QObject = static_cast(ret); +QCompleter* QCompleter_new5(QAbstractItemModel* model, QObject* parent) { + return new MiqtVirtualQCompleter(model, parent); } -void QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { +QCompleter* QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent) { QStringList completions_QList; completions_QList.reserve(completions.len); struct miqt_string* completions_arr = static_cast(completions.data); @@ -335,9 +325,11 @@ void QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QString completions_arr_i_QString = QString::fromUtf8(completions_arr[i].data, completions_arr[i].len); completions_QList.push_back(completions_arr_i_QString); } - MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(completions_QList, parent); - *outptr_QCompleter = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQCompleter(completions_QList, parent); +} + +void QCompleter_virtbase(QCompleter* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QCompleter_MetaObject(const QCompleter* self) { diff --git a/qt/gen_qcompleter.go b/qt/gen_qcompleter.go index f2500394..f5412ef5 100644 --- a/qt/gen_qcompleter.go +++ b/qt/gen_qcompleter.go @@ -51,42 +51,34 @@ func (this *QCompleter) UnsafePointer() unsafe.Pointer { } // newQCompleter constructs the type using only CGO pointers. -func newQCompleter(h *C.QCompleter, h_QObject *C.QObject) *QCompleter { +func newQCompleter(h *C.QCompleter) *QCompleter { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QCompleter_virtbase(h, &outptr_QObject) + return &QCompleter{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQCompleter constructs the type using only unsafe pointers. -func UnsafeNewQCompleter(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCompleter { - if h == nil { - return nil - } - - return &QCompleter{h: (*C.QCompleter)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQCompleter(h unsafe.Pointer) *QCompleter { + return newQCompleter((*C.QCompleter)(h)) } // NewQCompleter constructs a new QCompleter object. func NewQCompleter() *QCompleter { - var outptr_QCompleter *C.QCompleter = nil - var outptr_QObject *C.QObject = nil - C.QCompleter_new(&outptr_QCompleter, &outptr_QObject) - ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret := newQCompleter(C.QCompleter_new()) ret.isSubclass = true return ret } // NewQCompleter2 constructs a new QCompleter object. func NewQCompleter2(model *QAbstractItemModel) *QCompleter { - var outptr_QCompleter *C.QCompleter = nil - var outptr_QObject *C.QObject = nil - C.QCompleter_new2(model.cPointer(), &outptr_QCompleter, &outptr_QObject) - ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret := newQCompleter(C.QCompleter_new2(model.cPointer())) ret.isSubclass = true return ret } @@ -103,33 +95,24 @@ func NewQCompleter3(completions []string) *QCompleter { completions_CArray[i] = completions_i_ms } completions_ma := C.struct_miqt_array{len: C.size_t(len(completions)), data: unsafe.Pointer(completions_CArray)} - var outptr_QCompleter *C.QCompleter = nil - var outptr_QObject *C.QObject = nil - C.QCompleter_new3(completions_ma, &outptr_QCompleter, &outptr_QObject) - ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret := newQCompleter(C.QCompleter_new3(completions_ma)) ret.isSubclass = true return ret } // NewQCompleter4 constructs a new QCompleter object. func NewQCompleter4(parent *QObject) *QCompleter { - var outptr_QCompleter *C.QCompleter = nil - var outptr_QObject *C.QObject = nil - C.QCompleter_new4(parent.cPointer(), &outptr_QCompleter, &outptr_QObject) - ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret := newQCompleter(C.QCompleter_new4(parent.cPointer())) ret.isSubclass = true return ret } // NewQCompleter5 constructs a new QCompleter object. func NewQCompleter5(model *QAbstractItemModel, parent *QObject) *QCompleter { - var outptr_QCompleter *C.QCompleter = nil - var outptr_QObject *C.QObject = nil - C.QCompleter_new5(model.cPointer(), parent.cPointer(), &outptr_QCompleter, &outptr_QObject) - ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret := newQCompleter(C.QCompleter_new5(model.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -146,11 +129,8 @@ func NewQCompleter6(completions []string, parent *QObject) *QCompleter { completions_CArray[i] = completions_i_ms } completions_ma := C.struct_miqt_array{len: C.size_t(len(completions)), data: unsafe.Pointer(completions_CArray)} - var outptr_QCompleter *C.QCompleter = nil - var outptr_QObject *C.QObject = nil - C.QCompleter_new6(completions_ma, parent.cPointer(), &outptr_QCompleter, &outptr_QObject) - ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret := newQCompleter(C.QCompleter_new6(completions_ma, parent.cPointer())) ret.isSubclass = true return ret } @@ -188,7 +168,7 @@ func (this *QCompleter) SetWidget(widget *QWidget) { } func (this *QCompleter) Widget() *QWidget { - return newQWidget(C.QCompleter_Widget(this.h), nil, nil) + return newQWidget(C.QCompleter_Widget(this.h)) } func (this *QCompleter) SetModel(c *QAbstractItemModel) { @@ -196,7 +176,7 @@ func (this *QCompleter) SetModel(c *QAbstractItemModel) { } func (this *QCompleter) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QCompleter_Model(this.h), nil) + return newQAbstractItemModel(C.QCompleter_Model(this.h)) } func (this *QCompleter) SetCompletionMode(mode QCompleter__CompletionMode) { @@ -216,7 +196,7 @@ func (this *QCompleter) FilterMode() MatchFlag { } func (this *QCompleter) Popup() *QAbstractItemView { - return newQAbstractItemView(C.QCompleter_Popup(this.h), nil, nil, nil, nil, nil) + return newQAbstractItemView(C.QCompleter_Popup(this.h)) } func (this *QCompleter) SetPopup(popup *QAbstractItemView) { @@ -293,7 +273,7 @@ func (this *QCompleter) CurrentCompletion() string { } func (this *QCompleter) CompletionModel() *QAbstractItemModel { - return newQAbstractItemModel(C.QCompleter_CompletionModel(this.h), nil) + return newQAbstractItemModel(C.QCompleter_CompletionModel(this.h)) } func (this *QCompleter) CompletionPrefix() string { @@ -651,7 +631,7 @@ func miqt_exec_callback_QCompleter_TimerEvent(self *C.QCompleter, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QCompleter{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -677,7 +657,7 @@ func miqt_exec_callback_QCompleter_ChildEvent(self *C.QCompleter, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QCompleter{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qcompleter.h b/qt/gen_qcompleter.h index af8a7cd5..ba92da3f 100644 --- a/qt/gen_qcompleter.h +++ b/qt/gen_qcompleter.h @@ -42,12 +42,13 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QCompleter_new(QCompleter** outptr_QCompleter, QObject** outptr_QObject); -void QCompleter_new2(QAbstractItemModel* model, QCompleter** outptr_QCompleter, QObject** outptr_QObject); -void QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions, QCompleter** outptr_QCompleter, QObject** outptr_QObject); -void QCompleter_new4(QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject); -void QCompleter_new5(QAbstractItemModel* model, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject); -void QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject); +QCompleter* QCompleter_new(); +QCompleter* QCompleter_new2(QAbstractItemModel* model); +QCompleter* QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions); +QCompleter* QCompleter_new4(QObject* parent); +QCompleter* QCompleter_new5(QAbstractItemModel* model, QObject* parent); +QCompleter* QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent); +void QCompleter_virtbase(QCompleter* src, QObject** outptr_QObject); QMetaObject* QCompleter_MetaObject(const QCompleter* self); void* QCompleter_Metacast(QCompleter* self, const char* param1); struct miqt_string QCompleter_Tr(const char* s); diff --git a/qt/gen_qconcatenatetablesproxymodel.cpp b/qt/gen_qconcatenatetablesproxymodel.cpp index 38e7cab1..faea3b43 100644 --- a/qt/gen_qconcatenatetablesproxymodel.cpp +++ b/qt/gen_qconcatenatetablesproxymodel.cpp @@ -1034,18 +1034,16 @@ public: }; -void QConcatenateTablesProxyModel_new(QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQConcatenateTablesProxyModel* ret = new MiqtVirtualQConcatenateTablesProxyModel(); - *outptr_QConcatenateTablesProxyModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new() { + return new MiqtVirtualQConcatenateTablesProxyModel(); } -void QConcatenateTablesProxyModel_new2(QObject* parent, QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQConcatenateTablesProxyModel* ret = new MiqtVirtualQConcatenateTablesProxyModel(parent); - *outptr_QConcatenateTablesProxyModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new2(QObject* parent) { + return new MiqtVirtualQConcatenateTablesProxyModel(parent); +} + +void QConcatenateTablesProxyModel_virtbase(QConcatenateTablesProxyModel* src, QAbstractItemModel** outptr_QAbstractItemModel) { + *outptr_QAbstractItemModel = static_cast(src); } QMetaObject* QConcatenateTablesProxyModel_MetaObject(const QConcatenateTablesProxyModel* self) { diff --git a/qt/gen_qconcatenatetablesproxymodel.go b/qt/gen_qconcatenatetablesproxymodel.go index 7275d243..882d501a 100644 --- a/qt/gen_qconcatenatetablesproxymodel.go +++ b/qt/gen_qconcatenatetablesproxymodel.go @@ -35,44 +35,34 @@ func (this *QConcatenateTablesProxyModel) UnsafePointer() unsafe.Pointer { } // newQConcatenateTablesProxyModel constructs the type using only CGO pointers. -func newQConcatenateTablesProxyModel(h *C.QConcatenateTablesProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QConcatenateTablesProxyModel { +func newQConcatenateTablesProxyModel(h *C.QConcatenateTablesProxyModel) *QConcatenateTablesProxyModel { if h == nil { return nil } + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + C.QConcatenateTablesProxyModel_virtbase(h, &outptr_QAbstractItemModel) + return &QConcatenateTablesProxyModel{h: h, - QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} + QAbstractItemModel: newQAbstractItemModel(outptr_QAbstractItemModel)} } // UnsafeNewQConcatenateTablesProxyModel constructs the type using only unsafe pointers. -func UnsafeNewQConcatenateTablesProxyModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QConcatenateTablesProxyModel { - if h == nil { - return nil - } - - return &QConcatenateTablesProxyModel{h: (*C.QConcatenateTablesProxyModel)(h), - QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} +func UnsafeNewQConcatenateTablesProxyModel(h unsafe.Pointer) *QConcatenateTablesProxyModel { + return newQConcatenateTablesProxyModel((*C.QConcatenateTablesProxyModel)(h)) } // NewQConcatenateTablesProxyModel constructs a new QConcatenateTablesProxyModel object. func NewQConcatenateTablesProxyModel() *QConcatenateTablesProxyModel { - var outptr_QConcatenateTablesProxyModel *C.QConcatenateTablesProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QConcatenateTablesProxyModel_new(&outptr_QConcatenateTablesProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQConcatenateTablesProxyModel(outptr_QConcatenateTablesProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQConcatenateTablesProxyModel(C.QConcatenateTablesProxyModel_new()) ret.isSubclass = true return ret } // NewQConcatenateTablesProxyModel2 constructs a new QConcatenateTablesProxyModel object. func NewQConcatenateTablesProxyModel2(parent *QObject) *QConcatenateTablesProxyModel { - var outptr_QConcatenateTablesProxyModel *C.QConcatenateTablesProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QConcatenateTablesProxyModel_new2(parent.cPointer(), &outptr_QConcatenateTablesProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQConcatenateTablesProxyModel(outptr_QConcatenateTablesProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQConcatenateTablesProxyModel(C.QConcatenateTablesProxyModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -110,7 +100,7 @@ func (this *QConcatenateTablesProxyModel) SourceModels() []*QAbstractItemModel { _ret := make([]*QAbstractItemModel, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractItemModel)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAbstractItemModel(_outCast[i], nil) + _ret[i] = newQAbstractItemModel(_outCast[i]) } return _ret } @@ -231,7 +221,7 @@ func (this *QConcatenateTablesProxyModel) MimeData(indexes []QModelIndex) *QMime indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QConcatenateTablesProxyModel_MimeData(this.h, indexes_ma), nil) + return newQMimeData(C.QConcatenateTablesProxyModel_MimeData(this.h, indexes_ma)) } func (this *QConcatenateTablesProxyModel) CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -704,7 +694,7 @@ func (this *QConcatenateTablesProxyModel) callVirtualBase_MimeData(indexes []QMo } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QConcatenateTablesProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QConcatenateTablesProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QConcatenateTablesProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -758,7 +748,7 @@ func miqt_exec_callback_QConcatenateTablesProxyModel_CanDropMimeData(self *C.QCo } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -794,7 +784,7 @@ func miqt_exec_callback_QConcatenateTablesProxyModel_DropMimeData(self *C.QConca } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt/gen_qconcatenatetablesproxymodel.h b/qt/gen_qconcatenatetablesproxymodel.h index 90df41e3..c3efef22 100644 --- a/qt/gen_qconcatenatetablesproxymodel.h +++ b/qt/gen_qconcatenatetablesproxymodel.h @@ -34,8 +34,9 @@ typedef struct QSize QSize; typedef struct QVariant QVariant; #endif -void QConcatenateTablesProxyModel_new(QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QConcatenateTablesProxyModel_new2(QObject* parent, QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new(); +QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new2(QObject* parent); +void QConcatenateTablesProxyModel_virtbase(QConcatenateTablesProxyModel* src, QAbstractItemModel** outptr_QAbstractItemModel); QMetaObject* QConcatenateTablesProxyModel_MetaObject(const QConcatenateTablesProxyModel* self); void* QConcatenateTablesProxyModel_Metacast(QConcatenateTablesProxyModel* self, const char* param1); struct miqt_string QConcatenateTablesProxyModel_Tr(const char* s); diff --git a/qt/gen_qcontiguouscache.go b/qt/gen_qcontiguouscache.go index 547939de..c2efefa0 100644 --- a/qt/gen_qcontiguouscache.go +++ b/qt/gen_qcontiguouscache.go @@ -37,16 +37,13 @@ func newQContiguousCacheData(h *C.QContiguousCacheData) *QContiguousCacheData { if h == nil { return nil } + return &QContiguousCacheData{h: h} } // UnsafeNewQContiguousCacheData constructs the type using only unsafe pointers. func UnsafeNewQContiguousCacheData(h unsafe.Pointer) *QContiguousCacheData { - if h == nil { - return nil - } - - return &QContiguousCacheData{h: (*C.QContiguousCacheData)(h)} + return newQContiguousCacheData((*C.QContiguousCacheData)(h)) } func QContiguousCacheData_AllocateData(size int, alignment int) *QContiguousCacheData { diff --git a/qt/gen_qcoreapplication.cpp b/qt/gen_qcoreapplication.cpp index 8e852abc..ca73d826 100644 --- a/qt/gen_qcoreapplication.cpp +++ b/qt/gen_qcoreapplication.cpp @@ -221,16 +221,16 @@ public: }; -void QCoreApplication_new(int* argc, char** argv, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { - MiqtVirtualQCoreApplication* ret = new MiqtVirtualQCoreApplication(static_cast(*argc), argv); - *outptr_QCoreApplication = ret; - *outptr_QObject = static_cast(ret); +QCoreApplication* QCoreApplication_new(int* argc, char** argv) { + return new MiqtVirtualQCoreApplication(static_cast(*argc), argv); } -void QCoreApplication_new2(int* argc, char** argv, int param3, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { - MiqtVirtualQCoreApplication* ret = new MiqtVirtualQCoreApplication(static_cast(*argc), argv, static_cast(param3)); - *outptr_QCoreApplication = ret; - *outptr_QObject = static_cast(ret); +QCoreApplication* QCoreApplication_new2(int* argc, char** argv, int param3) { + return new MiqtVirtualQCoreApplication(static_cast(*argc), argv, static_cast(param3)); +} + +void QCoreApplication_virtbase(QCoreApplication* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QCoreApplication_MetaObject(const QCoreApplication* self) { diff --git a/qt/gen_qcoreapplication.go b/qt/gen_qcoreapplication.go index f4ffb258..63bad66e 100644 --- a/qt/gen_qcoreapplication.go +++ b/qt/gen_qcoreapplication.go @@ -41,22 +41,20 @@ func (this *QCoreApplication) UnsafePointer() unsafe.Pointer { } // newQCoreApplication constructs the type using only CGO pointers. -func newQCoreApplication(h *C.QCoreApplication, h_QObject *C.QObject) *QCoreApplication { +func newQCoreApplication(h *C.QCoreApplication) *QCoreApplication { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QCoreApplication_virtbase(h, &outptr_QObject) + return &QCoreApplication{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQCoreApplication constructs the type using only unsafe pointers. -func UnsafeNewQCoreApplication(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCoreApplication { - if h == nil { - return nil - } - - return &QCoreApplication{h: (*C.QCoreApplication)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQCoreApplication(h unsafe.Pointer) *QCoreApplication { + return newQCoreApplication((*C.QCoreApplication)(h)) } // NewQCoreApplication constructs a new QCoreApplication object. @@ -71,11 +69,7 @@ func NewQCoreApplication(args []string) *QCoreApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - var outptr_QCoreApplication *C.QCoreApplication = nil - var outptr_QObject *C.QObject = nil - - C.QCoreApplication_new(argc, &argv[0], &outptr_QCoreApplication, &outptr_QObject) - ret := newQCoreApplication(outptr_QCoreApplication, outptr_QObject) + ret := newQCoreApplication(C.QCoreApplication_new(argc, &argv[0])) ret.isSubclass = true return ret } @@ -92,11 +86,7 @@ func NewQCoreApplication2(args []string, param3 int) *QCoreApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - var outptr_QCoreApplication *C.QCoreApplication = nil - var outptr_QObject *C.QObject = nil - - C.QCoreApplication_new2(argc, &argv[0], (C.int)(param3), &outptr_QCoreApplication, &outptr_QObject) - ret := newQCoreApplication(outptr_QCoreApplication, outptr_QObject) + ret := newQCoreApplication(C.QCoreApplication_new2(argc, &argv[0], (C.int)(param3))) ret.isSubclass = true return ret } @@ -219,7 +209,7 @@ func QCoreApplication_IsSetuidAllowed() bool { } func QCoreApplication_Instance() *QCoreApplication { - return newQCoreApplication(C.QCoreApplication_Instance(), nil) + return newQCoreApplication(C.QCoreApplication_Instance()) } func QCoreApplication_Exec() int { @@ -259,7 +249,7 @@ func QCoreApplication_HasPendingEvents() bool { } func QCoreApplication_EventDispatcher() *QAbstractEventDispatcher { - return newQAbstractEventDispatcher(C.QCoreApplication_EventDispatcher(), nil) + return newQAbstractEventDispatcher(C.QCoreApplication_EventDispatcher()) } func QCoreApplication_SetEventDispatcher(eventDispatcher *QAbstractEventDispatcher) { @@ -656,7 +646,7 @@ func miqt_exec_callback_QCoreApplication_TimerEvent(self *C.QCoreApplication, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QCoreApplication{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -682,7 +672,7 @@ func miqt_exec_callback_QCoreApplication_ChildEvent(self *C.QCoreApplication, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QCoreApplication{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qcoreapplication.h b/qt/gen_qcoreapplication.h index cbc3c096..f63f2bdb 100644 --- a/qt/gen_qcoreapplication.h +++ b/qt/gen_qcoreapplication.h @@ -38,8 +38,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QTranslator QTranslator; #endif -void QCoreApplication_new(int* argc, char** argv, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); -void QCoreApplication_new2(int* argc, char** argv, int param3, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); +QCoreApplication* QCoreApplication_new(int* argc, char** argv); +QCoreApplication* QCoreApplication_new2(int* argc, char** argv, int param3); +void QCoreApplication_virtbase(QCoreApplication* src, QObject** outptr_QObject); QMetaObject* QCoreApplication_MetaObject(const QCoreApplication* self); void* QCoreApplication_Metacast(QCoreApplication* self, const char* param1); struct miqt_string QCoreApplication_Tr(const char* s); diff --git a/qt/gen_qcoreevent.cpp b/qt/gen_qcoreevent.cpp index fcdf4843..a5faccf0 100644 --- a/qt/gen_qcoreevent.cpp +++ b/qt/gen_qcoreevent.cpp @@ -8,14 +8,12 @@ #include "gen_qcoreevent.h" #include "_cgo_export.h" -void QEvent_new(int typeVal, QEvent** outptr_QEvent) { - QEvent* ret = new QEvent(static_cast(typeVal)); - *outptr_QEvent = ret; +QEvent* QEvent_new(int typeVal) { + return new QEvent(static_cast(typeVal)); } -void QEvent_new2(QEvent* other, QEvent** outptr_QEvent) { - QEvent* ret = new QEvent(*other); - *outptr_QEvent = ret; +QEvent* QEvent_new2(QEvent* other) { + return new QEvent(*other); } void QEvent_OperatorAssign(QEvent* self, QEvent* other) { @@ -63,16 +61,16 @@ void QEvent_Delete(QEvent* self, bool isSubclass) { } } -void QTimerEvent_new(int timerId, QTimerEvent** outptr_QTimerEvent, QEvent** outptr_QEvent) { - QTimerEvent* ret = new QTimerEvent(static_cast(timerId)); - *outptr_QTimerEvent = ret; - *outptr_QEvent = static_cast(ret); +QTimerEvent* QTimerEvent_new(int timerId) { + return new QTimerEvent(static_cast(timerId)); } -void QTimerEvent_new2(QTimerEvent* param1, QTimerEvent** outptr_QTimerEvent, QEvent** outptr_QEvent) { - QTimerEvent* ret = new QTimerEvent(*param1); - *outptr_QTimerEvent = ret; - *outptr_QEvent = static_cast(ret); +QTimerEvent* QTimerEvent_new2(QTimerEvent* param1) { + return new QTimerEvent(*param1); +} + +void QTimerEvent_virtbase(QTimerEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } int QTimerEvent_TimerId(const QTimerEvent* self) { @@ -87,16 +85,16 @@ void QTimerEvent_Delete(QTimerEvent* self, bool isSubclass) { } } -void QChildEvent_new(int typeVal, QObject* child, QChildEvent** outptr_QChildEvent, QEvent** outptr_QEvent) { - QChildEvent* ret = new QChildEvent(static_cast(typeVal), child); - *outptr_QChildEvent = ret; - *outptr_QEvent = static_cast(ret); +QChildEvent* QChildEvent_new(int typeVal, QObject* child) { + return new QChildEvent(static_cast(typeVal), child); } -void QChildEvent_new2(QChildEvent* param1, QChildEvent** outptr_QChildEvent, QEvent** outptr_QEvent) { - QChildEvent* ret = new QChildEvent(*param1); - *outptr_QChildEvent = ret; - *outptr_QEvent = static_cast(ret); +QChildEvent* QChildEvent_new2(QChildEvent* param1) { + return new QChildEvent(*param1); +} + +void QChildEvent_virtbase(QChildEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QObject* QChildEvent_Child(const QChildEvent* self) { @@ -123,17 +121,17 @@ void QChildEvent_Delete(QChildEvent* self, bool isSubclass) { } } -void QDynamicPropertyChangeEvent_new(struct miqt_string name, QDynamicPropertyChangeEvent** outptr_QDynamicPropertyChangeEvent, QEvent** outptr_QEvent) { +QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_new(struct miqt_string name) { QByteArray name_QByteArray(name.data, name.len); - QDynamicPropertyChangeEvent* ret = new QDynamicPropertyChangeEvent(name_QByteArray); - *outptr_QDynamicPropertyChangeEvent = ret; - *outptr_QEvent = static_cast(ret); + return new QDynamicPropertyChangeEvent(name_QByteArray); } -void QDynamicPropertyChangeEvent_new2(QDynamicPropertyChangeEvent* param1, QDynamicPropertyChangeEvent** outptr_QDynamicPropertyChangeEvent, QEvent** outptr_QEvent) { - QDynamicPropertyChangeEvent* ret = new QDynamicPropertyChangeEvent(*param1); - *outptr_QDynamicPropertyChangeEvent = ret; - *outptr_QEvent = static_cast(ret); +QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_new2(QDynamicPropertyChangeEvent* param1) { + return new QDynamicPropertyChangeEvent(*param1); +} + +void QDynamicPropertyChangeEvent_virtbase(QDynamicPropertyChangeEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } struct miqt_string QDynamicPropertyChangeEvent_PropertyName(const QDynamicPropertyChangeEvent* self) { diff --git a/qt/gen_qcoreevent.go b/qt/gen_qcoreevent.go index 3c81aea6..5bacae7e 100644 --- a/qt/gen_qcoreevent.go +++ b/qt/gen_qcoreevent.go @@ -214,34 +214,27 @@ func newQEvent(h *C.QEvent) *QEvent { if h == nil { return nil } + return &QEvent{h: h} } // UnsafeNewQEvent constructs the type using only unsafe pointers. func UnsafeNewQEvent(h unsafe.Pointer) *QEvent { - if h == nil { - return nil - } - - return &QEvent{h: (*C.QEvent)(h)} + return newQEvent((*C.QEvent)(h)) } // NewQEvent constructs a new QEvent object. func NewQEvent(typeVal QEvent__Type) *QEvent { - var outptr_QEvent *C.QEvent = nil - C.QEvent_new((C.int)(typeVal), &outptr_QEvent) - ret := newQEvent(outptr_QEvent) + ret := newQEvent(C.QEvent_new((C.int)(typeVal))) ret.isSubclass = true return ret } // NewQEvent2 constructs a new QEvent object. func NewQEvent2(other *QEvent) *QEvent { - var outptr_QEvent *C.QEvent = nil - C.QEvent_new2(other.cPointer(), &outptr_QEvent) - ret := newQEvent(outptr_QEvent) + ret := newQEvent(C.QEvent_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -317,42 +310,34 @@ func (this *QTimerEvent) UnsafePointer() unsafe.Pointer { } // newQTimerEvent constructs the type using only CGO pointers. -func newQTimerEvent(h *C.QTimerEvent, h_QEvent *C.QEvent) *QTimerEvent { +func newQTimerEvent(h *C.QTimerEvent) *QTimerEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QTimerEvent_virtbase(h, &outptr_QEvent) + return &QTimerEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQTimerEvent constructs the type using only unsafe pointers. -func UnsafeNewQTimerEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QTimerEvent { - if h == nil { - return nil - } - - return &QTimerEvent{h: (*C.QTimerEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQTimerEvent(h unsafe.Pointer) *QTimerEvent { + return newQTimerEvent((*C.QTimerEvent)(h)) } // NewQTimerEvent constructs a new QTimerEvent object. func NewQTimerEvent(timerId int) *QTimerEvent { - var outptr_QTimerEvent *C.QTimerEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTimerEvent_new((C.int)(timerId), &outptr_QTimerEvent, &outptr_QEvent) - ret := newQTimerEvent(outptr_QTimerEvent, outptr_QEvent) + ret := newQTimerEvent(C.QTimerEvent_new((C.int)(timerId))) ret.isSubclass = true return ret } // NewQTimerEvent2 constructs a new QTimerEvent object. func NewQTimerEvent2(param1 *QTimerEvent) *QTimerEvent { - var outptr_QTimerEvent *C.QTimerEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTimerEvent_new2(param1.cPointer(), &outptr_QTimerEvent, &outptr_QEvent) - ret := newQTimerEvent(outptr_QTimerEvent, outptr_QEvent) + ret := newQTimerEvent(C.QTimerEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -396,42 +381,34 @@ func (this *QChildEvent) UnsafePointer() unsafe.Pointer { } // newQChildEvent constructs the type using only CGO pointers. -func newQChildEvent(h *C.QChildEvent, h_QEvent *C.QEvent) *QChildEvent { +func newQChildEvent(h *C.QChildEvent) *QChildEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QChildEvent_virtbase(h, &outptr_QEvent) + return &QChildEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQChildEvent constructs the type using only unsafe pointers. -func UnsafeNewQChildEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QChildEvent { - if h == nil { - return nil - } - - return &QChildEvent{h: (*C.QChildEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQChildEvent(h unsafe.Pointer) *QChildEvent { + return newQChildEvent((*C.QChildEvent)(h)) } // NewQChildEvent constructs a new QChildEvent object. func NewQChildEvent(typeVal QEvent__Type, child *QObject) *QChildEvent { - var outptr_QChildEvent *C.QChildEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QChildEvent_new((C.int)(typeVal), child.cPointer(), &outptr_QChildEvent, &outptr_QEvent) - ret := newQChildEvent(outptr_QChildEvent, outptr_QEvent) + ret := newQChildEvent(C.QChildEvent_new((C.int)(typeVal), child.cPointer())) ret.isSubclass = true return ret } // NewQChildEvent2 constructs a new QChildEvent object. func NewQChildEvent2(param1 *QChildEvent) *QChildEvent { - var outptr_QChildEvent *C.QChildEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QChildEvent_new2(param1.cPointer(), &outptr_QChildEvent, &outptr_QEvent) - ret := newQChildEvent(outptr_QChildEvent, outptr_QEvent) + ret := newQChildEvent(C.QChildEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -487,22 +464,20 @@ func (this *QDynamicPropertyChangeEvent) UnsafePointer() unsafe.Pointer { } // newQDynamicPropertyChangeEvent constructs the type using only CGO pointers. -func newQDynamicPropertyChangeEvent(h *C.QDynamicPropertyChangeEvent, h_QEvent *C.QEvent) *QDynamicPropertyChangeEvent { +func newQDynamicPropertyChangeEvent(h *C.QDynamicPropertyChangeEvent) *QDynamicPropertyChangeEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QDynamicPropertyChangeEvent_virtbase(h, &outptr_QEvent) + return &QDynamicPropertyChangeEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQDynamicPropertyChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQDynamicPropertyChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QDynamicPropertyChangeEvent { - if h == nil { - return nil - } - - return &QDynamicPropertyChangeEvent{h: (*C.QDynamicPropertyChangeEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQDynamicPropertyChangeEvent(h unsafe.Pointer) *QDynamicPropertyChangeEvent { + return newQDynamicPropertyChangeEvent((*C.QDynamicPropertyChangeEvent)(h)) } // NewQDynamicPropertyChangeEvent constructs a new QDynamicPropertyChangeEvent object. @@ -510,22 +485,16 @@ func NewQDynamicPropertyChangeEvent(name []byte) *QDynamicPropertyChangeEvent { name_alias := C.struct_miqt_string{} name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) name_alias.len = C.size_t(len(name)) - var outptr_QDynamicPropertyChangeEvent *C.QDynamicPropertyChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDynamicPropertyChangeEvent_new(name_alias, &outptr_QDynamicPropertyChangeEvent, &outptr_QEvent) - ret := newQDynamicPropertyChangeEvent(outptr_QDynamicPropertyChangeEvent, outptr_QEvent) + ret := newQDynamicPropertyChangeEvent(C.QDynamicPropertyChangeEvent_new(name_alias)) ret.isSubclass = true return ret } // NewQDynamicPropertyChangeEvent2 constructs a new QDynamicPropertyChangeEvent object. func NewQDynamicPropertyChangeEvent2(param1 *QDynamicPropertyChangeEvent) *QDynamicPropertyChangeEvent { - var outptr_QDynamicPropertyChangeEvent *C.QDynamicPropertyChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDynamicPropertyChangeEvent_new2(param1.cPointer(), &outptr_QDynamicPropertyChangeEvent, &outptr_QEvent) - ret := newQDynamicPropertyChangeEvent(outptr_QDynamicPropertyChangeEvent, outptr_QEvent) + ret := newQDynamicPropertyChangeEvent(C.QDynamicPropertyChangeEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qcoreevent.h b/qt/gen_qcoreevent.h index 37255b02..18526fa3 100644 --- a/qt/gen_qcoreevent.h +++ b/qt/gen_qcoreevent.h @@ -28,8 +28,8 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QEvent_new(int typeVal, QEvent** outptr_QEvent); -void QEvent_new2(QEvent* other, QEvent** outptr_QEvent); +QEvent* QEvent_new(int typeVal); +QEvent* QEvent_new2(QEvent* other); void QEvent_OperatorAssign(QEvent* self, QEvent* other); int QEvent_Type(const QEvent* self); bool QEvent_Spontaneous(const QEvent* self); @@ -41,21 +41,24 @@ int QEvent_RegisterEventType(); int QEvent_RegisterEventType1(int hint); void QEvent_Delete(QEvent* self, bool isSubclass); -void QTimerEvent_new(int timerId, QTimerEvent** outptr_QTimerEvent, QEvent** outptr_QEvent); -void QTimerEvent_new2(QTimerEvent* param1, QTimerEvent** outptr_QTimerEvent, QEvent** outptr_QEvent); +QTimerEvent* QTimerEvent_new(int timerId); +QTimerEvent* QTimerEvent_new2(QTimerEvent* param1); +void QTimerEvent_virtbase(QTimerEvent* src, QEvent** outptr_QEvent); int QTimerEvent_TimerId(const QTimerEvent* self); void QTimerEvent_Delete(QTimerEvent* self, bool isSubclass); -void QChildEvent_new(int typeVal, QObject* child, QChildEvent** outptr_QChildEvent, QEvent** outptr_QEvent); -void QChildEvent_new2(QChildEvent* param1, QChildEvent** outptr_QChildEvent, QEvent** outptr_QEvent); +QChildEvent* QChildEvent_new(int typeVal, QObject* child); +QChildEvent* QChildEvent_new2(QChildEvent* param1); +void QChildEvent_virtbase(QChildEvent* src, QEvent** outptr_QEvent); QObject* QChildEvent_Child(const QChildEvent* self); bool QChildEvent_Added(const QChildEvent* self); bool QChildEvent_Polished(const QChildEvent* self); bool QChildEvent_Removed(const QChildEvent* self); void QChildEvent_Delete(QChildEvent* self, bool isSubclass); -void QDynamicPropertyChangeEvent_new(struct miqt_string name, QDynamicPropertyChangeEvent** outptr_QDynamicPropertyChangeEvent, QEvent** outptr_QEvent); -void QDynamicPropertyChangeEvent_new2(QDynamicPropertyChangeEvent* param1, QDynamicPropertyChangeEvent** outptr_QDynamicPropertyChangeEvent, QEvent** outptr_QEvent); +QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_new(struct miqt_string name); +QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_new2(QDynamicPropertyChangeEvent* param1); +void QDynamicPropertyChangeEvent_virtbase(QDynamicPropertyChangeEvent* src, QEvent** outptr_QEvent); struct miqt_string QDynamicPropertyChangeEvent_PropertyName(const QDynamicPropertyChangeEvent* self); void QDynamicPropertyChangeEvent_Delete(QDynamicPropertyChangeEvent* self, bool isSubclass); diff --git a/qt/gen_qcryptographichash.cpp b/qt/gen_qcryptographichash.cpp index 4b4e65e1..f1b489a6 100644 --- a/qt/gen_qcryptographichash.cpp +++ b/qt/gen_qcryptographichash.cpp @@ -5,9 +5,8 @@ #include "gen_qcryptographichash.h" #include "_cgo_export.h" -void QCryptographicHash_new(int method, QCryptographicHash** outptr_QCryptographicHash) { - QCryptographicHash* ret = new QCryptographicHash(static_cast(method)); - *outptr_QCryptographicHash = ret; +QCryptographicHash* QCryptographicHash_new(int method) { + return new QCryptographicHash(static_cast(method)); } void QCryptographicHash_Reset(QCryptographicHash* self) { diff --git a/qt/gen_qcryptographichash.go b/qt/gen_qcryptographichash.go index a171fb1f..844663f0 100644 --- a/qt/gen_qcryptographichash.go +++ b/qt/gen_qcryptographichash.go @@ -61,24 +61,19 @@ func newQCryptographicHash(h *C.QCryptographicHash) *QCryptographicHash { if h == nil { return nil } + return &QCryptographicHash{h: h} } // UnsafeNewQCryptographicHash constructs the type using only unsafe pointers. func UnsafeNewQCryptographicHash(h unsafe.Pointer) *QCryptographicHash { - if h == nil { - return nil - } - - return &QCryptographicHash{h: (*C.QCryptographicHash)(h)} + return newQCryptographicHash((*C.QCryptographicHash)(h)) } // NewQCryptographicHash constructs a new QCryptographicHash object. func NewQCryptographicHash(method QCryptographicHash__Algorithm) *QCryptographicHash { - var outptr_QCryptographicHash *C.QCryptographicHash = nil - C.QCryptographicHash_new((C.int)(method), &outptr_QCryptographicHash) - ret := newQCryptographicHash(outptr_QCryptographicHash) + ret := newQCryptographicHash(C.QCryptographicHash_new((C.int)(method))) ret.isSubclass = true return ret } diff --git a/qt/gen_qcryptographichash.h b/qt/gen_qcryptographichash.h index bd0d7c1a..ec635b88 100644 --- a/qt/gen_qcryptographichash.h +++ b/qt/gen_qcryptographichash.h @@ -22,7 +22,7 @@ typedef struct QCryptographicHash QCryptographicHash; typedef struct QIODevice QIODevice; #endif -void QCryptographicHash_new(int method, QCryptographicHash** outptr_QCryptographicHash); +QCryptographicHash* QCryptographicHash_new(int method); void QCryptographicHash_Reset(QCryptographicHash* self); void QCryptographicHash_AddData(QCryptographicHash* self, const char* data, int length); void QCryptographicHash_AddDataWithData(QCryptographicHash* self, struct miqt_string data); diff --git a/qt/gen_qcursor.cpp b/qt/gen_qcursor.cpp index 47331c94..ddb1ad95 100644 --- a/qt/gen_qcursor.cpp +++ b/qt/gen_qcursor.cpp @@ -7,49 +7,40 @@ #include "gen_qcursor.h" #include "_cgo_export.h" -void QCursor_new(QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(); - *outptr_QCursor = ret; +QCursor* QCursor_new() { + return new QCursor(); } -void QCursor_new2(int shape, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(static_cast(shape)); - *outptr_QCursor = ret; +QCursor* QCursor_new2(int shape) { + return new QCursor(static_cast(shape)); } -void QCursor_new3(QBitmap* bitmap, QBitmap* mask, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(*bitmap, *mask); - *outptr_QCursor = ret; +QCursor* QCursor_new3(QBitmap* bitmap, QBitmap* mask) { + return new QCursor(*bitmap, *mask); } -void QCursor_new4(QPixmap* pixmap, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(*pixmap); - *outptr_QCursor = ret; +QCursor* QCursor_new4(QPixmap* pixmap) { + return new QCursor(*pixmap); } -void QCursor_new5(QCursor* cursor, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(*cursor); - *outptr_QCursor = ret; +QCursor* QCursor_new5(QCursor* cursor) { + return new QCursor(*cursor); } -void QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(*bitmap, *mask, static_cast(hotX)); - *outptr_QCursor = ret; +QCursor* QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX) { + return new QCursor(*bitmap, *mask, static_cast(hotX)); } -void QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(*bitmap, *mask, static_cast(hotX), static_cast(hotY)); - *outptr_QCursor = ret; +QCursor* QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY) { + return new QCursor(*bitmap, *mask, static_cast(hotX), static_cast(hotY)); } -void QCursor_new8(QPixmap* pixmap, int hotX, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(*pixmap, static_cast(hotX)); - *outptr_QCursor = ret; +QCursor* QCursor_new8(QPixmap* pixmap, int hotX) { + return new QCursor(*pixmap, static_cast(hotX)); } -void QCursor_new9(QPixmap* pixmap, int hotX, int hotY, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(*pixmap, static_cast(hotX), static_cast(hotY)); - *outptr_QCursor = ret; +QCursor* QCursor_new9(QPixmap* pixmap, int hotX, int hotY) { + return new QCursor(*pixmap, static_cast(hotX), static_cast(hotY)); } void QCursor_OperatorAssign(QCursor* self, QCursor* cursor) { diff --git a/qt/gen_qcursor.go b/qt/gen_qcursor.go index 8e3acc04..419cfa45 100644 --- a/qt/gen_qcursor.go +++ b/qt/gen_qcursor.go @@ -37,104 +37,83 @@ func newQCursor(h *C.QCursor) *QCursor { if h == nil { return nil } + return &QCursor{h: h} } // UnsafeNewQCursor constructs the type using only unsafe pointers. func UnsafeNewQCursor(h unsafe.Pointer) *QCursor { - if h == nil { - return nil - } - - return &QCursor{h: (*C.QCursor)(h)} + return newQCursor((*C.QCursor)(h)) } // NewQCursor constructs a new QCursor object. func NewQCursor() *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new(&outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new()) ret.isSubclass = true return ret } // NewQCursor2 constructs a new QCursor object. func NewQCursor2(shape CursorShape) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new2((C.int)(shape), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new2((C.int)(shape))) ret.isSubclass = true return ret } // NewQCursor3 constructs a new QCursor object. func NewQCursor3(bitmap *QBitmap, mask *QBitmap) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new3(bitmap.cPointer(), mask.cPointer(), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new3(bitmap.cPointer(), mask.cPointer())) ret.isSubclass = true return ret } // NewQCursor4 constructs a new QCursor object. func NewQCursor4(pixmap *QPixmap) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new4(pixmap.cPointer(), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new4(pixmap.cPointer())) ret.isSubclass = true return ret } // NewQCursor5 constructs a new QCursor object. func NewQCursor5(cursor *QCursor) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new5(cursor.cPointer(), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new5(cursor.cPointer())) ret.isSubclass = true return ret } // NewQCursor6 constructs a new QCursor object. func NewQCursor6(bitmap *QBitmap, mask *QBitmap, hotX int) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new6(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new6(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX))) ret.isSubclass = true return ret } // NewQCursor7 constructs a new QCursor object. func NewQCursor7(bitmap *QBitmap, mask *QBitmap, hotX int, hotY int) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new7(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX), (C.int)(hotY), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new7(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX), (C.int)(hotY))) ret.isSubclass = true return ret } // NewQCursor8 constructs a new QCursor object. func NewQCursor8(pixmap *QPixmap, hotX int) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new8(pixmap.cPointer(), (C.int)(hotX), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new8(pixmap.cPointer(), (C.int)(hotX))) ret.isSubclass = true return ret } // NewQCursor9 constructs a new QCursor object. func NewQCursor9(pixmap *QPixmap, hotX int, hotY int) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new9(pixmap.cPointer(), (C.int)(hotX), (C.int)(hotY), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new9(pixmap.cPointer(), (C.int)(hotX), (C.int)(hotY))) ret.isSubclass = true return ret } @@ -156,27 +135,27 @@ func (this *QCursor) SetShape(newShape CursorShape) { } func (this *QCursor) Bitmap() *QBitmap { - return newQBitmap(C.QCursor_Bitmap(this.h), nil, nil) + return newQBitmap(C.QCursor_Bitmap(this.h)) } func (this *QCursor) Mask() *QBitmap { - return newQBitmap(C.QCursor_Mask(this.h), nil, nil) + return newQBitmap(C.QCursor_Mask(this.h)) } func (this *QCursor) BitmapWithQtReturnByValueConstant(param1 ReturnByValueConstant) *QBitmap { - _goptr := newQBitmap(C.QCursor_BitmapWithQtReturnByValueConstant(this.h, (C.int)(param1)), nil, nil) + _goptr := newQBitmap(C.QCursor_BitmapWithQtReturnByValueConstant(this.h, (C.int)(param1))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCursor) MaskWithQtReturnByValueConstant(param1 ReturnByValueConstant) *QBitmap { - _goptr := newQBitmap(C.QCursor_MaskWithQtReturnByValueConstant(this.h, (C.int)(param1)), nil, nil) + _goptr := newQBitmap(C.QCursor_MaskWithQtReturnByValueConstant(this.h, (C.int)(param1))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCursor) Pixmap() *QPixmap { - _goptr := newQPixmap(C.QCursor_Pixmap(this.h), nil) + _goptr := newQPixmap(C.QCursor_Pixmap(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/gen_qcursor.h b/qt/gen_qcursor.h index e08abd93..8c8c2bd9 100644 --- a/qt/gen_qcursor.h +++ b/qt/gen_qcursor.h @@ -28,15 +28,15 @@ typedef struct QPoint QPoint; typedef struct QScreen QScreen; #endif -void QCursor_new(QCursor** outptr_QCursor); -void QCursor_new2(int shape, QCursor** outptr_QCursor); -void QCursor_new3(QBitmap* bitmap, QBitmap* mask, QCursor** outptr_QCursor); -void QCursor_new4(QPixmap* pixmap, QCursor** outptr_QCursor); -void QCursor_new5(QCursor* cursor, QCursor** outptr_QCursor); -void QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX, QCursor** outptr_QCursor); -void QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY, QCursor** outptr_QCursor); -void QCursor_new8(QPixmap* pixmap, int hotX, QCursor** outptr_QCursor); -void QCursor_new9(QPixmap* pixmap, int hotX, int hotY, QCursor** outptr_QCursor); +QCursor* QCursor_new(); +QCursor* QCursor_new2(int shape); +QCursor* QCursor_new3(QBitmap* bitmap, QBitmap* mask); +QCursor* QCursor_new4(QPixmap* pixmap); +QCursor* QCursor_new5(QCursor* cursor); +QCursor* QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX); +QCursor* QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY); +QCursor* QCursor_new8(QPixmap* pixmap, int hotX); +QCursor* QCursor_new9(QPixmap* pixmap, int hotX, int hotY); void QCursor_OperatorAssign(QCursor* self, QCursor* cursor); void QCursor_Swap(QCursor* self, QCursor* other); int QCursor_Shape(const QCursor* self); diff --git a/qt/gen_qdatastream.cpp b/qt/gen_qdatastream.cpp index 7c337021..460253f5 100644 --- a/qt/gen_qdatastream.cpp +++ b/qt/gen_qdatastream.cpp @@ -5,20 +5,17 @@ #include "gen_qdatastream.h" #include "_cgo_export.h" -void QDataStream_new(QDataStream** outptr_QDataStream) { - QDataStream* ret = new QDataStream(); - *outptr_QDataStream = ret; +QDataStream* QDataStream_new() { + return new QDataStream(); } -void QDataStream_new2(QIODevice* param1, QDataStream** outptr_QDataStream) { - QDataStream* ret = new QDataStream(param1); - *outptr_QDataStream = ret; +QDataStream* QDataStream_new2(QIODevice* param1) { + return new QDataStream(param1); } -void QDataStream_new3(struct miqt_string param1, QDataStream** outptr_QDataStream) { +QDataStream* QDataStream_new3(struct miqt_string param1) { QByteArray param1_QByteArray(param1.data, param1.len); - QDataStream* ret = new QDataStream(param1_QByteArray); - *outptr_QDataStream = ret; + return new QDataStream(param1_QByteArray); } QIODevice* QDataStream_Device(const QDataStream* self) { diff --git a/qt/gen_qdatastream.go b/qt/gen_qdatastream.go index d9551506..d6b06705 100644 --- a/qt/gen_qdatastream.go +++ b/qt/gen_qdatastream.go @@ -98,34 +98,27 @@ func newQDataStream(h *C.QDataStream) *QDataStream { if h == nil { return nil } + return &QDataStream{h: h} } // UnsafeNewQDataStream constructs the type using only unsafe pointers. func UnsafeNewQDataStream(h unsafe.Pointer) *QDataStream { - if h == nil { - return nil - } - - return &QDataStream{h: (*C.QDataStream)(h)} + return newQDataStream((*C.QDataStream)(h)) } // NewQDataStream constructs a new QDataStream object. func NewQDataStream() *QDataStream { - var outptr_QDataStream *C.QDataStream = nil - C.QDataStream_new(&outptr_QDataStream) - ret := newQDataStream(outptr_QDataStream) + ret := newQDataStream(C.QDataStream_new()) ret.isSubclass = true return ret } // NewQDataStream2 constructs a new QDataStream object. func NewQDataStream2(param1 *QIODevice) *QDataStream { - var outptr_QDataStream *C.QDataStream = nil - C.QDataStream_new2(param1.cPointer(), &outptr_QDataStream) - ret := newQDataStream(outptr_QDataStream) + ret := newQDataStream(C.QDataStream_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -135,16 +128,14 @@ func NewQDataStream3(param1 []byte) *QDataStream { param1_alias := C.struct_miqt_string{} param1_alias.data = (*C.char)(unsafe.Pointer(¶m1[0])) param1_alias.len = C.size_t(len(param1)) - var outptr_QDataStream *C.QDataStream = nil - C.QDataStream_new3(param1_alias, &outptr_QDataStream) - ret := newQDataStream(outptr_QDataStream) + ret := newQDataStream(C.QDataStream_new3(param1_alias)) ret.isSubclass = true return ret } func (this *QDataStream) Device() *QIODevice { - return newQIODevice(C.QDataStream_Device(this.h), nil) + return newQIODevice(C.QDataStream_Device(this.h)) } func (this *QDataStream) SetDevice(device *QIODevice) { diff --git a/qt/gen_qdatastream.h b/qt/gen_qdatastream.h index bcbed710..9868712f 100644 --- a/qt/gen_qdatastream.h +++ b/qt/gen_qdatastream.h @@ -22,9 +22,9 @@ typedef struct QDataStream QDataStream; typedef struct QIODevice QIODevice; #endif -void QDataStream_new(QDataStream** outptr_QDataStream); -void QDataStream_new2(QIODevice* param1, QDataStream** outptr_QDataStream); -void QDataStream_new3(struct miqt_string param1, QDataStream** outptr_QDataStream); +QDataStream* QDataStream_new(); +QDataStream* QDataStream_new2(QIODevice* param1); +QDataStream* QDataStream_new3(struct miqt_string param1); QIODevice* QDataStream_Device(const QDataStream* self); void QDataStream_SetDevice(QDataStream* self, QIODevice* device); void QDataStream_UnsetDevice(QDataStream* self); diff --git a/qt/gen_qdatawidgetmapper.cpp b/qt/gen_qdatawidgetmapper.cpp index fc57ca00..5a5ab5d5 100644 --- a/qt/gen_qdatawidgetmapper.cpp +++ b/qt/gen_qdatawidgetmapper.cpp @@ -222,16 +222,16 @@ public: }; -void QDataWidgetMapper_new(QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject) { - MiqtVirtualQDataWidgetMapper* ret = new MiqtVirtualQDataWidgetMapper(); - *outptr_QDataWidgetMapper = ret; - *outptr_QObject = static_cast(ret); +QDataWidgetMapper* QDataWidgetMapper_new() { + return new MiqtVirtualQDataWidgetMapper(); } -void QDataWidgetMapper_new2(QObject* parent, QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject) { - MiqtVirtualQDataWidgetMapper* ret = new MiqtVirtualQDataWidgetMapper(parent); - *outptr_QDataWidgetMapper = ret; - *outptr_QObject = static_cast(ret); +QDataWidgetMapper* QDataWidgetMapper_new2(QObject* parent) { + return new MiqtVirtualQDataWidgetMapper(parent); +} + +void QDataWidgetMapper_virtbase(QDataWidgetMapper* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QDataWidgetMapper_MetaObject(const QDataWidgetMapper* self) { diff --git a/qt/gen_qdatawidgetmapper.go b/qt/gen_qdatawidgetmapper.go index 883a0026..b67a2f7d 100644 --- a/qt/gen_qdatawidgetmapper.go +++ b/qt/gen_qdatawidgetmapper.go @@ -42,42 +42,34 @@ func (this *QDataWidgetMapper) UnsafePointer() unsafe.Pointer { } // newQDataWidgetMapper constructs the type using only CGO pointers. -func newQDataWidgetMapper(h *C.QDataWidgetMapper, h_QObject *C.QObject) *QDataWidgetMapper { +func newQDataWidgetMapper(h *C.QDataWidgetMapper) *QDataWidgetMapper { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QDataWidgetMapper_virtbase(h, &outptr_QObject) + return &QDataWidgetMapper{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQDataWidgetMapper constructs the type using only unsafe pointers. -func UnsafeNewQDataWidgetMapper(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDataWidgetMapper { - if h == nil { - return nil - } - - return &QDataWidgetMapper{h: (*C.QDataWidgetMapper)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQDataWidgetMapper(h unsafe.Pointer) *QDataWidgetMapper { + return newQDataWidgetMapper((*C.QDataWidgetMapper)(h)) } // NewQDataWidgetMapper constructs a new QDataWidgetMapper object. func NewQDataWidgetMapper() *QDataWidgetMapper { - var outptr_QDataWidgetMapper *C.QDataWidgetMapper = nil - var outptr_QObject *C.QObject = nil - C.QDataWidgetMapper_new(&outptr_QDataWidgetMapper, &outptr_QObject) - ret := newQDataWidgetMapper(outptr_QDataWidgetMapper, outptr_QObject) + ret := newQDataWidgetMapper(C.QDataWidgetMapper_new()) ret.isSubclass = true return ret } // NewQDataWidgetMapper2 constructs a new QDataWidgetMapper object. func NewQDataWidgetMapper2(parent *QObject) *QDataWidgetMapper { - var outptr_QDataWidgetMapper *C.QDataWidgetMapper = nil - var outptr_QObject *C.QObject = nil - C.QDataWidgetMapper_new2(parent.cPointer(), &outptr_QDataWidgetMapper, &outptr_QObject) - ret := newQDataWidgetMapper(outptr_QDataWidgetMapper, outptr_QObject) + ret := newQDataWidgetMapper(C.QDataWidgetMapper_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -115,7 +107,7 @@ func (this *QDataWidgetMapper) SetModel(model *QAbstractItemModel) { } func (this *QDataWidgetMapper) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QDataWidgetMapper_Model(this.h), nil) + return newQAbstractItemModel(C.QDataWidgetMapper_Model(this.h)) } func (this *QDataWidgetMapper) SetItemDelegate(delegate *QAbstractItemDelegate) { @@ -123,7 +115,7 @@ func (this *QDataWidgetMapper) SetItemDelegate(delegate *QAbstractItemDelegate) } func (this *QDataWidgetMapper) ItemDelegate() *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QDataWidgetMapper_ItemDelegate(this.h), nil) + return newQAbstractItemDelegate(C.QDataWidgetMapper_ItemDelegate(this.h)) } func (this *QDataWidgetMapper) SetRootIndex(index *QModelIndex) { @@ -179,7 +171,7 @@ func (this *QDataWidgetMapper) MappedPropertyName(widget *QWidget) []byte { } func (this *QDataWidgetMapper) MappedWidgetAt(section int) *QWidget { - return newQWidget(C.QDataWidgetMapper_MappedWidgetAt(this.h, (C.int)(section)), nil, nil) + return newQWidget(C.QDataWidgetMapper_MappedWidgetAt(this.h, (C.int)(section))) } func (this *QDataWidgetMapper) ClearMapping() { @@ -390,7 +382,7 @@ func miqt_exec_callback_QDataWidgetMapper_TimerEvent(self *C.QDataWidgetMapper, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -416,7 +408,7 @@ func miqt_exec_callback_QDataWidgetMapper_ChildEvent(self *C.QDataWidgetMapper, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qdatawidgetmapper.h b/qt/gen_qdatawidgetmapper.h index ae6712ee..e7a309ca 100644 --- a/qt/gen_qdatawidgetmapper.h +++ b/qt/gen_qdatawidgetmapper.h @@ -40,8 +40,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QDataWidgetMapper_new(QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject); -void QDataWidgetMapper_new2(QObject* parent, QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject); +QDataWidgetMapper* QDataWidgetMapper_new(); +QDataWidgetMapper* QDataWidgetMapper_new2(QObject* parent); +void QDataWidgetMapper_virtbase(QDataWidgetMapper* src, QObject** outptr_QObject); QMetaObject* QDataWidgetMapper_MetaObject(const QDataWidgetMapper* self); void* QDataWidgetMapper_Metacast(QDataWidgetMapper* self, const char* param1); struct miqt_string QDataWidgetMapper_Tr(const char* s); diff --git a/qt/gen_qdatetime.cpp b/qt/gen_qdatetime.cpp index 2dedadbb..1fdb02a2 100644 --- a/qt/gen_qdatetime.cpp +++ b/qt/gen_qdatetime.cpp @@ -10,24 +10,20 @@ #include "gen_qdatetime.h" #include "_cgo_export.h" -void QDate_new(QDate** outptr_QDate) { - QDate* ret = new QDate(); - *outptr_QDate = ret; +QDate* QDate_new() { + return new QDate(); } -void QDate_new2(int y, int m, int d, QDate** outptr_QDate) { - QDate* ret = new QDate(static_cast(y), static_cast(m), static_cast(d)); - *outptr_QDate = ret; +QDate* QDate_new2(int y, int m, int d) { + return new QDate(static_cast(y), static_cast(m), static_cast(d)); } -void QDate_new3(int y, int m, int d, QCalendar* cal, QDate** outptr_QDate) { - QDate* ret = new QDate(static_cast(y), static_cast(m), static_cast(d), *cal); - *outptr_QDate = ret; +QDate* QDate_new3(int y, int m, int d, QCalendar* cal) { + return new QDate(static_cast(y), static_cast(m), static_cast(d), *cal); } -void QDate_new4(QDate* param1, QDate** outptr_QDate) { - QDate* ret = new QDate(*param1); - *outptr_QDate = ret; +QDate* QDate_new4(QDate* param1) { + return new QDate(*param1); } bool QDate_IsNull(const QDate* self) { @@ -395,29 +391,24 @@ void QDate_Delete(QDate* self, bool isSubclass) { } } -void QTime_new(QTime** outptr_QTime) { - QTime* ret = new QTime(); - *outptr_QTime = ret; +QTime* QTime_new() { + return new QTime(); } -void QTime_new2(int h, int m, QTime** outptr_QTime) { - QTime* ret = new QTime(static_cast(h), static_cast(m)); - *outptr_QTime = ret; +QTime* QTime_new2(int h, int m) { + return new QTime(static_cast(h), static_cast(m)); } -void QTime_new3(QTime* param1, QTime** outptr_QTime) { - QTime* ret = new QTime(*param1); - *outptr_QTime = ret; +QTime* QTime_new3(QTime* param1) { + return new QTime(*param1); } -void QTime_new4(int h, int m, int s, QTime** outptr_QTime) { - QTime* ret = new QTime(static_cast(h), static_cast(m), static_cast(s)); - *outptr_QTime = ret; +QTime* QTime_new4(int h, int m, int s) { + return new QTime(static_cast(h), static_cast(m), static_cast(s)); } -void QTime_new5(int h, int m, int s, int ms, QTime** outptr_QTime) { - QTime* ret = new QTime(static_cast(h), static_cast(m), static_cast(s), static_cast(ms)); - *outptr_QTime = ret; +QTime* QTime_new5(int h, int m, int s, int ms) { + return new QTime(static_cast(h), static_cast(m), static_cast(s), static_cast(ms)); } bool QTime_IsNull(const QTime* self) { @@ -582,34 +573,28 @@ void QTime_Delete(QTime* self, bool isSubclass) { } } -void QDateTime_new(QDate* param1, QDateTime** outptr_QDateTime) { - QDateTime* ret = new QDateTime(*param1); - *outptr_QDateTime = ret; +QDateTime* QDateTime_new(QDate* param1) { + return new QDateTime(*param1); } -void QDateTime_new2(QDate* param1, QTime* param2, QDateTime** outptr_QDateTime) { - QDateTime* ret = new QDateTime(*param1, *param2); - *outptr_QDateTime = ret; +QDateTime* QDateTime_new2(QDate* param1, QTime* param2) { + return new QDateTime(*param1, *param2); } -void QDateTime_new3(QDate* date, QTime* time, int spec, int offsetSeconds, QDateTime** outptr_QDateTime) { - QDateTime* ret = new QDateTime(*date, *time, static_cast(spec), static_cast(offsetSeconds)); - *outptr_QDateTime = ret; +QDateTime* QDateTime_new3(QDate* date, QTime* time, int spec, int offsetSeconds) { + return new QDateTime(*date, *time, static_cast(spec), static_cast(offsetSeconds)); } -void QDateTime_new4(QDate* date, QTime* time, QTimeZone* timeZone, QDateTime** outptr_QDateTime) { - QDateTime* ret = new QDateTime(*date, *time, *timeZone); - *outptr_QDateTime = ret; +QDateTime* QDateTime_new4(QDate* date, QTime* time, QTimeZone* timeZone) { + return new QDateTime(*date, *time, *timeZone); } -void QDateTime_new5(QDateTime* other, QDateTime** outptr_QDateTime) { - QDateTime* ret = new QDateTime(*other); - *outptr_QDateTime = ret; +QDateTime* QDateTime_new5(QDateTime* other) { + return new QDateTime(*other); } -void QDateTime_new6(QDate* param1, QTime* param2, int spec, QDateTime** outptr_QDateTime) { - QDateTime* ret = new QDateTime(*param1, *param2, static_cast(spec)); - *outptr_QDateTime = ret; +QDateTime* QDateTime_new6(QDate* param1, QTime* param2, int spec) { + return new QDateTime(*param1, *param2, static_cast(spec)); } void QDateTime_OperatorAssign(QDateTime* self, QDateTime* other) { diff --git a/qt/gen_qdatetime.go b/qt/gen_qdatetime.go index 531b6ced..5816d890 100644 --- a/qt/gen_qdatetime.go +++ b/qt/gen_qdatetime.go @@ -51,54 +51,43 @@ func newQDate(h *C.QDate) *QDate { if h == nil { return nil } + return &QDate{h: h} } // UnsafeNewQDate constructs the type using only unsafe pointers. func UnsafeNewQDate(h unsafe.Pointer) *QDate { - if h == nil { - return nil - } - - return &QDate{h: (*C.QDate)(h)} + return newQDate((*C.QDate)(h)) } // NewQDate constructs a new QDate object. func NewQDate() *QDate { - var outptr_QDate *C.QDate = nil - C.QDate_new(&outptr_QDate) - ret := newQDate(outptr_QDate) + ret := newQDate(C.QDate_new()) ret.isSubclass = true return ret } // NewQDate2 constructs a new QDate object. func NewQDate2(y int, m int, d int) *QDate { - var outptr_QDate *C.QDate = nil - C.QDate_new2((C.int)(y), (C.int)(m), (C.int)(d), &outptr_QDate) - ret := newQDate(outptr_QDate) + ret := newQDate(C.QDate_new2((C.int)(y), (C.int)(m), (C.int)(d))) ret.isSubclass = true return ret } // NewQDate3 constructs a new QDate object. func NewQDate3(y int, m int, d int, cal QCalendar) *QDate { - var outptr_QDate *C.QDate = nil - C.QDate_new3((C.int)(y), (C.int)(m), (C.int)(d), cal.cPointer(), &outptr_QDate) - ret := newQDate(outptr_QDate) + ret := newQDate(C.QDate_new3((C.int)(y), (C.int)(m), (C.int)(d), cal.cPointer())) ret.isSubclass = true return ret } // NewQDate4 constructs a new QDate object. func NewQDate4(param1 *QDate) *QDate { - var outptr_QDate *C.QDate = nil - C.QDate_new4(param1.cPointer(), &outptr_QDate) - ret := newQDate(outptr_QDate) + ret := newQDate(C.QDate_new4(param1.cPointer())) ret.isSubclass = true return ret } @@ -506,64 +495,51 @@ func newQTime(h *C.QTime) *QTime { if h == nil { return nil } + return &QTime{h: h} } // UnsafeNewQTime constructs the type using only unsafe pointers. func UnsafeNewQTime(h unsafe.Pointer) *QTime { - if h == nil { - return nil - } - - return &QTime{h: (*C.QTime)(h)} + return newQTime((*C.QTime)(h)) } // NewQTime constructs a new QTime object. func NewQTime() *QTime { - var outptr_QTime *C.QTime = nil - C.QTime_new(&outptr_QTime) - ret := newQTime(outptr_QTime) + ret := newQTime(C.QTime_new()) ret.isSubclass = true return ret } // NewQTime2 constructs a new QTime object. func NewQTime2(h int, m int) *QTime { - var outptr_QTime *C.QTime = nil - C.QTime_new2((C.int)(h), (C.int)(m), &outptr_QTime) - ret := newQTime(outptr_QTime) + ret := newQTime(C.QTime_new2((C.int)(h), (C.int)(m))) ret.isSubclass = true return ret } // NewQTime3 constructs a new QTime object. func NewQTime3(param1 *QTime) *QTime { - var outptr_QTime *C.QTime = nil - C.QTime_new3(param1.cPointer(), &outptr_QTime) - ret := newQTime(outptr_QTime) + ret := newQTime(C.QTime_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQTime4 constructs a new QTime object. func NewQTime4(h int, m int, s int) *QTime { - var outptr_QTime *C.QTime = nil - C.QTime_new4((C.int)(h), (C.int)(m), (C.int)(s), &outptr_QTime) - ret := newQTime(outptr_QTime) + ret := newQTime(C.QTime_new4((C.int)(h), (C.int)(m), (C.int)(s))) ret.isSubclass = true return ret } // NewQTime5 constructs a new QTime object. func NewQTime5(h int, m int, s int, ms int) *QTime { - var outptr_QTime *C.QTime = nil - C.QTime_new5((C.int)(h), (C.int)(m), (C.int)(s), (C.int)(ms), &outptr_QTime) - ret := newQTime(outptr_QTime) + ret := newQTime(C.QTime_new5((C.int)(h), (C.int)(m), (C.int)(s), (C.int)(ms))) ret.isSubclass = true return ret } @@ -777,74 +753,59 @@ func newQDateTime(h *C.QDateTime) *QDateTime { if h == nil { return nil } + return &QDateTime{h: h} } // UnsafeNewQDateTime constructs the type using only unsafe pointers. func UnsafeNewQDateTime(h unsafe.Pointer) *QDateTime { - if h == nil { - return nil - } - - return &QDateTime{h: (*C.QDateTime)(h)} + return newQDateTime((*C.QDateTime)(h)) } // NewQDateTime constructs a new QDateTime object. func NewQDateTime(param1 *QDate) *QDateTime { - var outptr_QDateTime *C.QDateTime = nil - C.QDateTime_new(param1.cPointer(), &outptr_QDateTime) - ret := newQDateTime(outptr_QDateTime) + ret := newQDateTime(C.QDateTime_new(param1.cPointer())) ret.isSubclass = true return ret } // NewQDateTime2 constructs a new QDateTime object. func NewQDateTime2(param1 *QDate, param2 *QTime) *QDateTime { - var outptr_QDateTime *C.QDateTime = nil - C.QDateTime_new2(param1.cPointer(), param2.cPointer(), &outptr_QDateTime) - ret := newQDateTime(outptr_QDateTime) + ret := newQDateTime(C.QDateTime_new2(param1.cPointer(), param2.cPointer())) ret.isSubclass = true return ret } // NewQDateTime3 constructs a new QDateTime object. func NewQDateTime3(date *QDate, time *QTime, spec TimeSpec, offsetSeconds int) *QDateTime { - var outptr_QDateTime *C.QDateTime = nil - C.QDateTime_new3(date.cPointer(), time.cPointer(), (C.int)(spec), (C.int)(offsetSeconds), &outptr_QDateTime) - ret := newQDateTime(outptr_QDateTime) + ret := newQDateTime(C.QDateTime_new3(date.cPointer(), time.cPointer(), (C.int)(spec), (C.int)(offsetSeconds))) ret.isSubclass = true return ret } // NewQDateTime4 constructs a new QDateTime object. func NewQDateTime4(date *QDate, time *QTime, timeZone *QTimeZone) *QDateTime { - var outptr_QDateTime *C.QDateTime = nil - C.QDateTime_new4(date.cPointer(), time.cPointer(), timeZone.cPointer(), &outptr_QDateTime) - ret := newQDateTime(outptr_QDateTime) + ret := newQDateTime(C.QDateTime_new4(date.cPointer(), time.cPointer(), timeZone.cPointer())) ret.isSubclass = true return ret } // NewQDateTime5 constructs a new QDateTime object. func NewQDateTime5(other *QDateTime) *QDateTime { - var outptr_QDateTime *C.QDateTime = nil - C.QDateTime_new5(other.cPointer(), &outptr_QDateTime) - ret := newQDateTime(outptr_QDateTime) + ret := newQDateTime(C.QDateTime_new5(other.cPointer())) ret.isSubclass = true return ret } // NewQDateTime6 constructs a new QDateTime object. func NewQDateTime6(param1 *QDate, param2 *QTime, spec TimeSpec) *QDateTime { - var outptr_QDateTime *C.QDateTime = nil - C.QDateTime_new6(param1.cPointer(), param2.cPointer(), (C.int)(spec), &outptr_QDateTime) - ret := newQDateTime(outptr_QDateTime) + ret := newQDateTime(C.QDateTime_new6(param1.cPointer(), param2.cPointer(), (C.int)(spec))) ret.isSubclass = true return ret } diff --git a/qt/gen_qdatetime.h b/qt/gen_qdatetime.h index 9b7022cf..6510c9d3 100644 --- a/qt/gen_qdatetime.h +++ b/qt/gen_qdatetime.h @@ -28,10 +28,10 @@ typedef struct QTime QTime; typedef struct QTimeZone QTimeZone; #endif -void QDate_new(QDate** outptr_QDate); -void QDate_new2(int y, int m, int d, QDate** outptr_QDate); -void QDate_new3(int y, int m, int d, QCalendar* cal, QDate** outptr_QDate); -void QDate_new4(QDate* param1, QDate** outptr_QDate); +QDate* QDate_new(); +QDate* QDate_new2(int y, int m, int d); +QDate* QDate_new3(int y, int m, int d, QCalendar* cal); +QDate* QDate_new4(QDate* param1); bool QDate_IsNull(const QDate* self); bool QDate_IsValid(const QDate* self); int QDate_Year(const QDate* self); @@ -98,11 +98,11 @@ struct miqt_string QDate_ToString1(const QDate* self, int format); QDate* QDate_FromString22(struct miqt_string s, int f); void QDate_Delete(QDate* self, bool isSubclass); -void QTime_new(QTime** outptr_QTime); -void QTime_new2(int h, int m, QTime** outptr_QTime); -void QTime_new3(QTime* param1, QTime** outptr_QTime); -void QTime_new4(int h, int m, int s, QTime** outptr_QTime); -void QTime_new5(int h, int m, int s, int ms, QTime** outptr_QTime); +QTime* QTime_new(); +QTime* QTime_new2(int h, int m); +QTime* QTime_new3(QTime* param1); +QTime* QTime_new4(int h, int m, int s); +QTime* QTime_new5(int h, int m, int s, int ms); bool QTime_IsNull(const QTime* self); bool QTime_IsValid(const QTime* self); int QTime_Hour(const QTime* self); @@ -137,12 +137,12 @@ QTime* QTime_FromString22(struct miqt_string s, int f); bool QTime_IsValid4(int h, int m, int s, int ms); void QTime_Delete(QTime* self, bool isSubclass); -void QDateTime_new(QDate* param1, QDateTime** outptr_QDateTime); -void QDateTime_new2(QDate* param1, QTime* param2, QDateTime** outptr_QDateTime); -void QDateTime_new3(QDate* date, QTime* time, int spec, int offsetSeconds, QDateTime** outptr_QDateTime); -void QDateTime_new4(QDate* date, QTime* time, QTimeZone* timeZone, QDateTime** outptr_QDateTime); -void QDateTime_new5(QDateTime* other, QDateTime** outptr_QDateTime); -void QDateTime_new6(QDate* param1, QTime* param2, int spec, QDateTime** outptr_QDateTime); +QDateTime* QDateTime_new(QDate* param1); +QDateTime* QDateTime_new2(QDate* param1, QTime* param2); +QDateTime* QDateTime_new3(QDate* date, QTime* time, int spec, int offsetSeconds); +QDateTime* QDateTime_new4(QDate* date, QTime* time, QTimeZone* timeZone); +QDateTime* QDateTime_new5(QDateTime* other); +QDateTime* QDateTime_new6(QDate* param1, QTime* param2, int spec); void QDateTime_OperatorAssign(QDateTime* self, QDateTime* other); void QDateTime_Swap(QDateTime* self, QDateTime* other); bool QDateTime_IsNull(const QDateTime* self); diff --git a/qt/gen_qdatetimeedit.cpp b/qt/gen_qdatetimeedit.cpp index 07dc8b28..c1d63063 100644 --- a/qt/gen_qdatetimeedit.cpp +++ b/qt/gen_qdatetimeedit.cpp @@ -745,76 +745,40 @@ public: }; -void QDateTimeEdit_new(QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(parent); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new(QWidget* parent) { + return new MiqtVirtualQDateTimeEdit(parent); } -void QDateTimeEdit_new2(QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new2() { + return new MiqtVirtualQDateTimeEdit(); } -void QDateTimeEdit_new3(QDateTime* dt, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*dt); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new3(QDateTime* dt) { + return new MiqtVirtualQDateTimeEdit(*dt); } -void QDateTimeEdit_new4(QDate* d, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*d); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new4(QDate* d) { + return new MiqtVirtualQDateTimeEdit(*d); } -void QDateTimeEdit_new5(QTime* t, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*t); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new5(QTime* t) { + return new MiqtVirtualQDateTimeEdit(*t); } -void QDateTimeEdit_new6(QDateTime* dt, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*dt, parent); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new6(QDateTime* dt, QWidget* parent) { + return new MiqtVirtualQDateTimeEdit(*dt, parent); } -void QDateTimeEdit_new7(QDate* d, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*d, parent); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new7(QDate* d, QWidget* parent) { + return new MiqtVirtualQDateTimeEdit(*d, parent); } -void QDateTimeEdit_new8(QTime* t, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*t, parent); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new8(QTime* t, QWidget* parent) { + return new MiqtVirtualQDateTimeEdit(*t, parent); +} + +void QDateTimeEdit_virtbase(QDateTimeEdit* src, QAbstractSpinBox** outptr_QAbstractSpinBox) { + *outptr_QAbstractSpinBox = static_cast(src); } QMetaObject* QDateTimeEdit_MetaObject(const QDateTimeEdit* self) { @@ -1780,44 +1744,24 @@ public: }; -void QTimeEdit_new(QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(parent); - *outptr_QTimeEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTimeEdit* QTimeEdit_new(QWidget* parent) { + return new MiqtVirtualQTimeEdit(parent); } -void QTimeEdit_new2(QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(); - *outptr_QTimeEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTimeEdit* QTimeEdit_new2() { + return new MiqtVirtualQTimeEdit(); } -void QTimeEdit_new3(QTime* time, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(*time); - *outptr_QTimeEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTimeEdit* QTimeEdit_new3(QTime* time) { + return new MiqtVirtualQTimeEdit(*time); } -void QTimeEdit_new4(QTime* time, QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(*time, parent); - *outptr_QTimeEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTimeEdit* QTimeEdit_new4(QTime* time, QWidget* parent) { + return new MiqtVirtualQTimeEdit(*time, parent); +} + +void QTimeEdit_virtbase(QTimeEdit* src, QDateTimeEdit** outptr_QDateTimeEdit) { + *outptr_QDateTimeEdit = static_cast(src); } QMetaObject* QTimeEdit_MetaObject(const QTimeEdit* self) { @@ -2434,44 +2378,24 @@ public: }; -void QDateEdit_new(QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(parent); - *outptr_QDateEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateEdit* QDateEdit_new(QWidget* parent) { + return new MiqtVirtualQDateEdit(parent); } -void QDateEdit_new2(QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(); - *outptr_QDateEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateEdit* QDateEdit_new2() { + return new MiqtVirtualQDateEdit(); } -void QDateEdit_new3(QDate* date, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(*date); - *outptr_QDateEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateEdit* QDateEdit_new3(QDate* date) { + return new MiqtVirtualQDateEdit(*date); } -void QDateEdit_new4(QDate* date, QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(*date, parent); - *outptr_QDateEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateEdit* QDateEdit_new4(QDate* date, QWidget* parent) { + return new MiqtVirtualQDateEdit(*date, parent); +} + +void QDateEdit_virtbase(QDateEdit* src, QDateTimeEdit** outptr_QDateTimeEdit) { + *outptr_QDateTimeEdit = static_cast(src); } QMetaObject* QDateEdit_MetaObject(const QDateEdit* self) { diff --git a/qt/gen_qdatetimeedit.go b/qt/gen_qdatetimeedit.go index a5ed82e1..2571d8b6 100644 --- a/qt/gen_qdatetimeedit.go +++ b/qt/gen_qdatetimeedit.go @@ -51,132 +51,82 @@ func (this *QDateTimeEdit) UnsafePointer() unsafe.Pointer { } // newQDateTimeEdit constructs the type using only CGO pointers. -func newQDateTimeEdit(h *C.QDateTimeEdit, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDateTimeEdit { +func newQDateTimeEdit(h *C.QDateTimeEdit) *QDateTimeEdit { if h == nil { return nil } + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + C.QDateTimeEdit_virtbase(h, &outptr_QAbstractSpinBox) + return &QDateTimeEdit{h: h, - QAbstractSpinBox: newQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractSpinBox: newQAbstractSpinBox(outptr_QAbstractSpinBox)} } // UnsafeNewQDateTimeEdit constructs the type using only unsafe pointers. -func UnsafeNewQDateTimeEdit(h unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDateTimeEdit { - if h == nil { - return nil - } - - return &QDateTimeEdit{h: (*C.QDateTimeEdit)(h), - QAbstractSpinBox: UnsafeNewQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQDateTimeEdit(h unsafe.Pointer) *QDateTimeEdit { + return newQDateTimeEdit((*C.QDateTimeEdit)(h)) } // NewQDateTimeEdit constructs a new QDateTimeEdit object. func NewQDateTimeEdit(parent *QWidget) *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new(parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQDateTimeEdit2 constructs a new QDateTimeEdit object. func NewQDateTimeEdit2() *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new2(&outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new2()) ret.isSubclass = true return ret } // NewQDateTimeEdit3 constructs a new QDateTimeEdit object. func NewQDateTimeEdit3(dt *QDateTime) *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new3(dt.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new3(dt.cPointer())) ret.isSubclass = true return ret } // NewQDateTimeEdit4 constructs a new QDateTimeEdit object. func NewQDateTimeEdit4(d *QDate) *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new4(d.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new4(d.cPointer())) ret.isSubclass = true return ret } // NewQDateTimeEdit5 constructs a new QDateTimeEdit object. func NewQDateTimeEdit5(t *QTime) *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new5(t.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new5(t.cPointer())) ret.isSubclass = true return ret } // NewQDateTimeEdit6 constructs a new QDateTimeEdit object. func NewQDateTimeEdit6(dt *QDateTime, parent *QWidget) *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new6(dt.cPointer(), parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new6(dt.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQDateTimeEdit7 constructs a new QDateTimeEdit object. func NewQDateTimeEdit7(d *QDate, parent *QWidget) *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new7(d.cPointer(), parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new7(d.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQDateTimeEdit8 constructs a new QDateTimeEdit object. func NewQDateTimeEdit8(t *QTime, parent *QWidget) *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new8(t.cPointer(), parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new8(t.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -358,7 +308,7 @@ func (this *QDateTimeEdit) SetCurrentSectionIndex(index int) { } func (this *QDateTimeEdit) CalendarWidget() *QCalendarWidget { - return newQCalendarWidget(C.QDateTimeEdit_CalendarWidget(this.h), nil, nil, nil) + return newQCalendarWidget(C.QDateTimeEdit_CalendarWidget(this.h)) } func (this *QDateTimeEdit) SetCalendarWidget(calendarWidget *QCalendarWidget) { @@ -669,7 +619,7 @@ func miqt_exec_callback_QDateTimeEdit_KeyPressEvent(self *C.QDateTimeEdit, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -695,7 +645,7 @@ func miqt_exec_callback_QDateTimeEdit_WheelEvent(self *C.QDateTimeEdit, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -721,7 +671,7 @@ func miqt_exec_callback_QDateTimeEdit_FocusInEvent(self *C.QDateTimeEdit, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -940,7 +890,7 @@ func miqt_exec_callback_QDateTimeEdit_MousePressEvent(self *C.QDateTimeEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -966,7 +916,7 @@ func miqt_exec_callback_QDateTimeEdit_PaintEvent(self *C.QDateTimeEdit, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1049,7 +999,7 @@ func miqt_exec_callback_QDateTimeEdit_ResizeEvent(self *C.QDateTimeEdit, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1075,7 +1025,7 @@ func miqt_exec_callback_QDateTimeEdit_KeyReleaseEvent(self *C.QDateTimeEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1101,7 +1051,7 @@ func miqt_exec_callback_QDateTimeEdit_FocusOutEvent(self *C.QDateTimeEdit, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1127,7 +1077,7 @@ func miqt_exec_callback_QDateTimeEdit_ContextMenuEvent(self *C.QDateTimeEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1179,7 +1129,7 @@ func miqt_exec_callback_QDateTimeEdit_CloseEvent(self *C.QDateTimeEdit, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1205,7 +1155,7 @@ func miqt_exec_callback_QDateTimeEdit_HideEvent(self *C.QDateTimeEdit, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1231,7 +1181,7 @@ func miqt_exec_callback_QDateTimeEdit_MouseReleaseEvent(self *C.QDateTimeEdit, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1257,7 +1207,7 @@ func miqt_exec_callback_QDateTimeEdit_MouseMoveEvent(self *C.QDateTimeEdit, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1283,7 +1233,7 @@ func miqt_exec_callback_QDateTimeEdit_TimerEvent(self *C.QDateTimeEdit, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1309,7 +1259,7 @@ func miqt_exec_callback_QDateTimeEdit_ShowEvent(self *C.QDateTimeEdit, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1350,80 +1300,50 @@ func (this *QTimeEdit) UnsafePointer() unsafe.Pointer { } // newQTimeEdit constructs the type using only CGO pointers. -func newQTimeEdit(h *C.QTimeEdit, h_QDateTimeEdit *C.QDateTimeEdit, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTimeEdit { +func newQTimeEdit(h *C.QTimeEdit) *QTimeEdit { if h == nil { return nil } + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + C.QTimeEdit_virtbase(h, &outptr_QDateTimeEdit) + return &QTimeEdit{h: h, - QDateTimeEdit: newQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} + QDateTimeEdit: newQDateTimeEdit(outptr_QDateTimeEdit)} } // UnsafeNewQTimeEdit constructs the type using only unsafe pointers. -func UnsafeNewQTimeEdit(h unsafe.Pointer, h_QDateTimeEdit unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTimeEdit { - if h == nil { - return nil - } - - return &QTimeEdit{h: (*C.QTimeEdit)(h), - QDateTimeEdit: UnsafeNewQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTimeEdit(h unsafe.Pointer) *QTimeEdit { + return newQTimeEdit((*C.QTimeEdit)(h)) } // NewQTimeEdit constructs a new QTimeEdit object. func NewQTimeEdit(parent *QWidget) *QTimeEdit { - var outptr_QTimeEdit *C.QTimeEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTimeEdit_new(parent.cPointer(), &outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTimeEdit(C.QTimeEdit_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTimeEdit2 constructs a new QTimeEdit object. func NewQTimeEdit2() *QTimeEdit { - var outptr_QTimeEdit *C.QTimeEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTimeEdit_new2(&outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTimeEdit(C.QTimeEdit_new2()) ret.isSubclass = true return ret } // NewQTimeEdit3 constructs a new QTimeEdit object. func NewQTimeEdit3(time *QTime) *QTimeEdit { - var outptr_QTimeEdit *C.QTimeEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTimeEdit_new3(time.cPointer(), &outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTimeEdit(C.QTimeEdit_new3(time.cPointer())) ret.isSubclass = true return ret } // NewQTimeEdit4 constructs a new QTimeEdit object. func NewQTimeEdit4(time *QTime, parent *QWidget) *QTimeEdit { - var outptr_QTimeEdit *C.QTimeEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTimeEdit_new4(time.cPointer(), parent.cPointer(), &outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTimeEdit(C.QTimeEdit_new4(time.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -1644,7 +1564,7 @@ func miqt_exec_callback_QTimeEdit_KeyPressEvent(self *C.QTimeEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QTimeEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1670,7 +1590,7 @@ func miqt_exec_callback_QTimeEdit_WheelEvent(self *C.QTimeEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QTimeEdit{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1696,7 +1616,7 @@ func miqt_exec_callback_QTimeEdit_FocusInEvent(self *C.QTimeEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTimeEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1915,7 +1835,7 @@ func miqt_exec_callback_QTimeEdit_MousePressEvent(self *C.QTimeEdit, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTimeEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1941,7 +1861,7 @@ func miqt_exec_callback_QTimeEdit_PaintEvent(self *C.QTimeEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QTimeEdit{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1982,80 +1902,50 @@ func (this *QDateEdit) UnsafePointer() unsafe.Pointer { } // newQDateEdit constructs the type using only CGO pointers. -func newQDateEdit(h *C.QDateEdit, h_QDateTimeEdit *C.QDateTimeEdit, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDateEdit { +func newQDateEdit(h *C.QDateEdit) *QDateEdit { if h == nil { return nil } + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + C.QDateEdit_virtbase(h, &outptr_QDateTimeEdit) + return &QDateEdit{h: h, - QDateTimeEdit: newQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} + QDateTimeEdit: newQDateTimeEdit(outptr_QDateTimeEdit)} } // UnsafeNewQDateEdit constructs the type using only unsafe pointers. -func UnsafeNewQDateEdit(h unsafe.Pointer, h_QDateTimeEdit unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDateEdit { - if h == nil { - return nil - } - - return &QDateEdit{h: (*C.QDateEdit)(h), - QDateTimeEdit: UnsafeNewQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQDateEdit(h unsafe.Pointer) *QDateEdit { + return newQDateEdit((*C.QDateEdit)(h)) } // NewQDateEdit constructs a new QDateEdit object. func NewQDateEdit(parent *QWidget) *QDateEdit { - var outptr_QDateEdit *C.QDateEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateEdit_new(parent.cPointer(), &outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateEdit(C.QDateEdit_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQDateEdit2 constructs a new QDateEdit object. func NewQDateEdit2() *QDateEdit { - var outptr_QDateEdit *C.QDateEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateEdit_new2(&outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateEdit(C.QDateEdit_new2()) ret.isSubclass = true return ret } // NewQDateEdit3 constructs a new QDateEdit object. func NewQDateEdit3(date *QDate) *QDateEdit { - var outptr_QDateEdit *C.QDateEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateEdit_new3(date.cPointer(), &outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateEdit(C.QDateEdit_new3(date.cPointer())) ret.isSubclass = true return ret } // NewQDateEdit4 constructs a new QDateEdit object. func NewQDateEdit4(date *QDate, parent *QWidget) *QDateEdit { - var outptr_QDateEdit *C.QDateEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateEdit_new4(date.cPointer(), parent.cPointer(), &outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateEdit(C.QDateEdit_new4(date.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -2276,7 +2166,7 @@ func miqt_exec_callback_QDateEdit_KeyPressEvent(self *C.QDateEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDateEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -2302,7 +2192,7 @@ func miqt_exec_callback_QDateEdit_WheelEvent(self *C.QDateEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QDateEdit{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -2328,7 +2218,7 @@ func miqt_exec_callback_QDateEdit_FocusInEvent(self *C.QDateEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDateEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -2547,7 +2437,7 @@ func miqt_exec_callback_QDateEdit_MousePressEvent(self *C.QDateEdit, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDateEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -2573,7 +2463,7 @@ func miqt_exec_callback_QDateEdit_PaintEvent(self *C.QDateEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QDateEdit{h: self}).callVirtualBase_PaintEvent, slotval1) diff --git a/qt/gen_qdatetimeedit.h b/qt/gen_qdatetimeedit.h index fe477abc..f8f17d9d 100644 --- a/qt/gen_qdatetimeedit.h +++ b/qt/gen_qdatetimeedit.h @@ -72,14 +72,15 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QDateTimeEdit_new(QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateTimeEdit_new2(QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateTimeEdit_new3(QDateTime* dt, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateTimeEdit_new4(QDate* d, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateTimeEdit_new5(QTime* t, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateTimeEdit_new6(QDateTime* dt, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateTimeEdit_new7(QDate* d, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateTimeEdit_new8(QTime* t, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QDateTimeEdit* QDateTimeEdit_new(QWidget* parent); +QDateTimeEdit* QDateTimeEdit_new2(); +QDateTimeEdit* QDateTimeEdit_new3(QDateTime* dt); +QDateTimeEdit* QDateTimeEdit_new4(QDate* d); +QDateTimeEdit* QDateTimeEdit_new5(QTime* t); +QDateTimeEdit* QDateTimeEdit_new6(QDateTime* dt, QWidget* parent); +QDateTimeEdit* QDateTimeEdit_new7(QDate* d, QWidget* parent); +QDateTimeEdit* QDateTimeEdit_new8(QTime* t, QWidget* parent); +void QDateTimeEdit_virtbase(QDateTimeEdit* src, QAbstractSpinBox** outptr_QAbstractSpinBox); QMetaObject* QDateTimeEdit_MetaObject(const QDateTimeEdit* self); void* QDateTimeEdit_Metacast(QDateTimeEdit* self, const char* param1); struct miqt_string QDateTimeEdit_Tr(const char* s); @@ -213,10 +214,11 @@ void QDateTimeEdit_override_virtual_ShowEvent(void* self, intptr_t slot); void QDateTimeEdit_virtualbase_ShowEvent(void* self, QShowEvent* event); void QDateTimeEdit_Delete(QDateTimeEdit* self, bool isSubclass); -void QTimeEdit_new(QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTimeEdit_new2(QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTimeEdit_new3(QTime* time, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTimeEdit_new4(QTime* time, QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTimeEdit* QTimeEdit_new(QWidget* parent); +QTimeEdit* QTimeEdit_new2(); +QTimeEdit* QTimeEdit_new3(QTime* time); +QTimeEdit* QTimeEdit_new4(QTime* time, QWidget* parent); +void QTimeEdit_virtbase(QTimeEdit* src, QDateTimeEdit** outptr_QDateTimeEdit); QMetaObject* QTimeEdit_MetaObject(const QTimeEdit* self); void* QTimeEdit_Metacast(QTimeEdit* self, const char* param1); struct miqt_string QTimeEdit_Tr(const char* s); @@ -259,10 +261,11 @@ void QTimeEdit_override_virtual_PaintEvent(void* self, intptr_t slot); void QTimeEdit_virtualbase_PaintEvent(void* self, QPaintEvent* event); void QTimeEdit_Delete(QTimeEdit* self, bool isSubclass); -void QDateEdit_new(QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateEdit_new2(QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateEdit_new3(QDate* date, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateEdit_new4(QDate* date, QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QDateEdit* QDateEdit_new(QWidget* parent); +QDateEdit* QDateEdit_new2(); +QDateEdit* QDateEdit_new3(QDate* date); +QDateEdit* QDateEdit_new4(QDate* date, QWidget* parent); +void QDateEdit_virtbase(QDateEdit* src, QDateTimeEdit** outptr_QDateTimeEdit); QMetaObject* QDateEdit_MetaObject(const QDateEdit* self); void* QDateEdit_Metacast(QDateEdit* self, const char* param1); struct miqt_string QDateEdit_Tr(const char* s); diff --git a/qt/gen_qdeadlinetimer.cpp b/qt/gen_qdeadlinetimer.cpp index ada9e2fe..e87a6730 100644 --- a/qt/gen_qdeadlinetimer.cpp +++ b/qt/gen_qdeadlinetimer.cpp @@ -3,39 +3,32 @@ #include "gen_qdeadlinetimer.h" #include "_cgo_export.h" -void QDeadlineTimer_new(QDeadlineTimer** outptr_QDeadlineTimer) { - QDeadlineTimer* ret = new QDeadlineTimer(); - *outptr_QDeadlineTimer = ret; +QDeadlineTimer* QDeadlineTimer_new() { + return new QDeadlineTimer(); } -void QDeadlineTimer_new2(int param1, QDeadlineTimer** outptr_QDeadlineTimer) { - QDeadlineTimer* ret = new QDeadlineTimer(static_cast(param1)); - *outptr_QDeadlineTimer = ret; +QDeadlineTimer* QDeadlineTimer_new2(int param1) { + return new QDeadlineTimer(static_cast(param1)); } -void QDeadlineTimer_new3(long long msecs, QDeadlineTimer** outptr_QDeadlineTimer) { - QDeadlineTimer* ret = new QDeadlineTimer(static_cast(msecs)); - *outptr_QDeadlineTimer = ret; +QDeadlineTimer* QDeadlineTimer_new3(long long msecs) { + return new QDeadlineTimer(static_cast(msecs)); } -void QDeadlineTimer_new4(QDeadlineTimer* param1, QDeadlineTimer** outptr_QDeadlineTimer) { - QDeadlineTimer* ret = new QDeadlineTimer(*param1); - *outptr_QDeadlineTimer = ret; +QDeadlineTimer* QDeadlineTimer_new4(QDeadlineTimer* param1) { + return new QDeadlineTimer(*param1); } -void QDeadlineTimer_new5(int type_, QDeadlineTimer** outptr_QDeadlineTimer) { - QDeadlineTimer* ret = new QDeadlineTimer(static_cast(type_)); - *outptr_QDeadlineTimer = ret; +QDeadlineTimer* QDeadlineTimer_new5(int type_) { + return new QDeadlineTimer(static_cast(type_)); } -void QDeadlineTimer_new6(int param1, int type_, QDeadlineTimer** outptr_QDeadlineTimer) { - QDeadlineTimer* ret = new QDeadlineTimer(static_cast(param1), static_cast(type_)); - *outptr_QDeadlineTimer = ret; +QDeadlineTimer* QDeadlineTimer_new6(int param1, int type_) { + return new QDeadlineTimer(static_cast(param1), static_cast(type_)); } -void QDeadlineTimer_new7(long long msecs, int typeVal, QDeadlineTimer** outptr_QDeadlineTimer) { - QDeadlineTimer* ret = new QDeadlineTimer(static_cast(msecs), static_cast(typeVal)); - *outptr_QDeadlineTimer = ret; +QDeadlineTimer* QDeadlineTimer_new7(long long msecs, int typeVal) { + return new QDeadlineTimer(static_cast(msecs), static_cast(typeVal)); } void QDeadlineTimer_Swap(QDeadlineTimer* self, QDeadlineTimer* other) { diff --git a/qt/gen_qdeadlinetimer.go b/qt/gen_qdeadlinetimer.go index 5b5e6688..92e56cb3 100644 --- a/qt/gen_qdeadlinetimer.go +++ b/qt/gen_qdeadlinetimer.go @@ -43,84 +43,67 @@ func newQDeadlineTimer(h *C.QDeadlineTimer) *QDeadlineTimer { if h == nil { return nil } + return &QDeadlineTimer{h: h} } // UnsafeNewQDeadlineTimer constructs the type using only unsafe pointers. func UnsafeNewQDeadlineTimer(h unsafe.Pointer) *QDeadlineTimer { - if h == nil { - return nil - } - - return &QDeadlineTimer{h: (*C.QDeadlineTimer)(h)} + return newQDeadlineTimer((*C.QDeadlineTimer)(h)) } // NewQDeadlineTimer constructs a new QDeadlineTimer object. func NewQDeadlineTimer() *QDeadlineTimer { - var outptr_QDeadlineTimer *C.QDeadlineTimer = nil - C.QDeadlineTimer_new(&outptr_QDeadlineTimer) - ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret := newQDeadlineTimer(C.QDeadlineTimer_new()) ret.isSubclass = true return ret } // NewQDeadlineTimer2 constructs a new QDeadlineTimer object. func NewQDeadlineTimer2(param1 QDeadlineTimer__ForeverConstant) *QDeadlineTimer { - var outptr_QDeadlineTimer *C.QDeadlineTimer = nil - C.QDeadlineTimer_new2((C.int)(param1), &outptr_QDeadlineTimer) - ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret := newQDeadlineTimer(C.QDeadlineTimer_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQDeadlineTimer3 constructs a new QDeadlineTimer object. func NewQDeadlineTimer3(msecs int64) *QDeadlineTimer { - var outptr_QDeadlineTimer *C.QDeadlineTimer = nil - C.QDeadlineTimer_new3((C.longlong)(msecs), &outptr_QDeadlineTimer) - ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret := newQDeadlineTimer(C.QDeadlineTimer_new3((C.longlong)(msecs))) ret.isSubclass = true return ret } // NewQDeadlineTimer4 constructs a new QDeadlineTimer object. func NewQDeadlineTimer4(param1 *QDeadlineTimer) *QDeadlineTimer { - var outptr_QDeadlineTimer *C.QDeadlineTimer = nil - C.QDeadlineTimer_new4(param1.cPointer(), &outptr_QDeadlineTimer) - ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret := newQDeadlineTimer(C.QDeadlineTimer_new4(param1.cPointer())) ret.isSubclass = true return ret } // NewQDeadlineTimer5 constructs a new QDeadlineTimer object. func NewQDeadlineTimer5(type_ TimerType) *QDeadlineTimer { - var outptr_QDeadlineTimer *C.QDeadlineTimer = nil - C.QDeadlineTimer_new5((C.int)(type_), &outptr_QDeadlineTimer) - ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret := newQDeadlineTimer(C.QDeadlineTimer_new5((C.int)(type_))) ret.isSubclass = true return ret } // NewQDeadlineTimer6 constructs a new QDeadlineTimer object. func NewQDeadlineTimer6(param1 QDeadlineTimer__ForeverConstant, type_ TimerType) *QDeadlineTimer { - var outptr_QDeadlineTimer *C.QDeadlineTimer = nil - C.QDeadlineTimer_new6((C.int)(param1), (C.int)(type_), &outptr_QDeadlineTimer) - ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret := newQDeadlineTimer(C.QDeadlineTimer_new6((C.int)(param1), (C.int)(type_))) ret.isSubclass = true return ret } // NewQDeadlineTimer7 constructs a new QDeadlineTimer object. func NewQDeadlineTimer7(msecs int64, typeVal TimerType) *QDeadlineTimer { - var outptr_QDeadlineTimer *C.QDeadlineTimer = nil - C.QDeadlineTimer_new7((C.longlong)(msecs), (C.int)(typeVal), &outptr_QDeadlineTimer) - ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret := newQDeadlineTimer(C.QDeadlineTimer_new7((C.longlong)(msecs), (C.int)(typeVal))) ret.isSubclass = true return ret } diff --git a/qt/gen_qdeadlinetimer.h b/qt/gen_qdeadlinetimer.h index cfabdd71..73d8c75e 100644 --- a/qt/gen_qdeadlinetimer.h +++ b/qt/gen_qdeadlinetimer.h @@ -20,13 +20,13 @@ class QDeadlineTimer; typedef struct QDeadlineTimer QDeadlineTimer; #endif -void QDeadlineTimer_new(QDeadlineTimer** outptr_QDeadlineTimer); -void QDeadlineTimer_new2(int param1, QDeadlineTimer** outptr_QDeadlineTimer); -void QDeadlineTimer_new3(long long msecs, QDeadlineTimer** outptr_QDeadlineTimer); -void QDeadlineTimer_new4(QDeadlineTimer* param1, QDeadlineTimer** outptr_QDeadlineTimer); -void QDeadlineTimer_new5(int type_, QDeadlineTimer** outptr_QDeadlineTimer); -void QDeadlineTimer_new6(int param1, int type_, QDeadlineTimer** outptr_QDeadlineTimer); -void QDeadlineTimer_new7(long long msecs, int typeVal, QDeadlineTimer** outptr_QDeadlineTimer); +QDeadlineTimer* QDeadlineTimer_new(); +QDeadlineTimer* QDeadlineTimer_new2(int param1); +QDeadlineTimer* QDeadlineTimer_new3(long long msecs); +QDeadlineTimer* QDeadlineTimer_new4(QDeadlineTimer* param1); +QDeadlineTimer* QDeadlineTimer_new5(int type_); +QDeadlineTimer* QDeadlineTimer_new6(int param1, int type_); +QDeadlineTimer* QDeadlineTimer_new7(long long msecs, int typeVal); void QDeadlineTimer_Swap(QDeadlineTimer* self, QDeadlineTimer* other); bool QDeadlineTimer_IsForever(const QDeadlineTimer* self); bool QDeadlineTimer_HasExpired(const QDeadlineTimer* self); diff --git a/qt/gen_qdebug.cpp b/qt/gen_qdebug.cpp index 4532e78f..8b05b866 100644 --- a/qt/gen_qdebug.cpp +++ b/qt/gen_qdebug.cpp @@ -11,14 +11,12 @@ #include "gen_qdebug.h" #include "_cgo_export.h" -void QDebug_new(QIODevice* device, QDebug** outptr_QDebug) { - QDebug* ret = new QDebug(device); - *outptr_QDebug = ret; +QDebug* QDebug_new(QIODevice* device) { + return new QDebug(device); } -void QDebug_new2(QDebug* o, QDebug** outptr_QDebug) { - QDebug* ret = new QDebug(*o); - *outptr_QDebug = ret; +QDebug* QDebug_new2(QDebug* o) { + return new QDebug(*o); } void QDebug_OperatorAssign(QDebug* self, QDebug* other) { @@ -211,9 +209,8 @@ void QDebug_Delete(QDebug* self, bool isSubclass) { } } -void QDebugStateSaver_new(QDebug* dbg, QDebugStateSaver** outptr_QDebugStateSaver) { - QDebugStateSaver* ret = new QDebugStateSaver(*dbg); - *outptr_QDebugStateSaver = ret; +QDebugStateSaver* QDebugStateSaver_new(QDebug* dbg) { + return new QDebugStateSaver(*dbg); } void QDebugStateSaver_Delete(QDebugStateSaver* self, bool isSubclass) { diff --git a/qt/gen_qdebug.go b/qt/gen_qdebug.go index 99420e39..61358036 100644 --- a/qt/gen_qdebug.go +++ b/qt/gen_qdebug.go @@ -45,34 +45,27 @@ func newQDebug(h *C.QDebug) *QDebug { if h == nil { return nil } + return &QDebug{h: h} } // UnsafeNewQDebug constructs the type using only unsafe pointers. func UnsafeNewQDebug(h unsafe.Pointer) *QDebug { - if h == nil { - return nil - } - - return &QDebug{h: (*C.QDebug)(h)} + return newQDebug((*C.QDebug)(h)) } // NewQDebug constructs a new QDebug object. func NewQDebug(device *QIODevice) *QDebug { - var outptr_QDebug *C.QDebug = nil - C.QDebug_new(device.cPointer(), &outptr_QDebug) - ret := newQDebug(outptr_QDebug) + ret := newQDebug(C.QDebug_new(device.cPointer())) ret.isSubclass = true return ret } // NewQDebug2 constructs a new QDebug object. func NewQDebug2(o *QDebug) *QDebug { - var outptr_QDebug *C.QDebug = nil - C.QDebug_new2(o.cPointer(), &outptr_QDebug) - ret := newQDebug(outptr_QDebug) + ret := newQDebug(C.QDebug_new2(o.cPointer())) ret.isSubclass = true return ret } @@ -252,24 +245,19 @@ func newQDebugStateSaver(h *C.QDebugStateSaver) *QDebugStateSaver { if h == nil { return nil } + return &QDebugStateSaver{h: h} } // UnsafeNewQDebugStateSaver constructs the type using only unsafe pointers. func UnsafeNewQDebugStateSaver(h unsafe.Pointer) *QDebugStateSaver { - if h == nil { - return nil - } - - return &QDebugStateSaver{h: (*C.QDebugStateSaver)(h)} + return newQDebugStateSaver((*C.QDebugStateSaver)(h)) } // NewQDebugStateSaver constructs a new QDebugStateSaver object. func NewQDebugStateSaver(dbg *QDebug) *QDebugStateSaver { - var outptr_QDebugStateSaver *C.QDebugStateSaver = nil - C.QDebugStateSaver_new(dbg.cPointer(), &outptr_QDebugStateSaver) - ret := newQDebugStateSaver(outptr_QDebugStateSaver) + ret := newQDebugStateSaver(C.QDebugStateSaver_new(dbg.cPointer())) ret.isSubclass = true return ret } @@ -312,16 +300,13 @@ func newQNoDebug(h *C.QNoDebug) *QNoDebug { if h == nil { return nil } + return &QNoDebug{h: h} } // UnsafeNewQNoDebug constructs the type using only unsafe pointers. func UnsafeNewQNoDebug(h unsafe.Pointer) *QNoDebug { - if h == nil { - return nil - } - - return &QNoDebug{h: (*C.QNoDebug)(h)} + return newQNoDebug((*C.QNoDebug)(h)) } func (this *QNoDebug) Space() *QNoDebug { diff --git a/qt/gen_qdebug.h b/qt/gen_qdebug.h index cd36a919..88c48092 100644 --- a/qt/gen_qdebug.h +++ b/qt/gen_qdebug.h @@ -28,8 +28,8 @@ typedef struct QIODevice QIODevice; typedef struct QNoDebug QNoDebug; #endif -void QDebug_new(QIODevice* device, QDebug** outptr_QDebug); -void QDebug_new2(QDebug* o, QDebug** outptr_QDebug); +QDebug* QDebug_new(QIODevice* device); +QDebug* QDebug_new2(QDebug* o); void QDebug_OperatorAssign(QDebug* self, QDebug* other); void QDebug_Swap(QDebug* self, QDebug* other); QDebug* QDebug_ResetFormat(QDebug* self); @@ -64,7 +64,7 @@ QDebug* QDebug_OperatorShiftLeftWithVoid(QDebug* self, const void* t); QDebug* QDebug_MaybeQuote1(QDebug* self, char c); void QDebug_Delete(QDebug* self, bool isSubclass); -void QDebugStateSaver_new(QDebug* dbg, QDebugStateSaver** outptr_QDebugStateSaver); +QDebugStateSaver* QDebugStateSaver_new(QDebug* dbg); void QDebugStateSaver_Delete(QDebugStateSaver* self, bool isSubclass); QNoDebug* QNoDebug_Space(QNoDebug* self); diff --git a/qt/gen_qdesktopservices.go b/qt/gen_qdesktopservices.go index 6ff94801..679b29d1 100644 --- a/qt/gen_qdesktopservices.go +++ b/qt/gen_qdesktopservices.go @@ -37,16 +37,13 @@ func newQDesktopServices(h *C.QDesktopServices) *QDesktopServices { if h == nil { return nil } + return &QDesktopServices{h: h} } // UnsafeNewQDesktopServices constructs the type using only unsafe pointers. func UnsafeNewQDesktopServices(h unsafe.Pointer) *QDesktopServices { - if h == nil { - return nil - } - - return &QDesktopServices{h: (*C.QDesktopServices)(h)} + return newQDesktopServices((*C.QDesktopServices)(h)) } func QDesktopServices_OpenUrl(url *QUrl) bool { diff --git a/qt/gen_qdesktopwidget.cpp b/qt/gen_qdesktopwidget.cpp index 0852be02..d2e022fc 100644 --- a/qt/gen_qdesktopwidget.cpp +++ b/qt/gen_qdesktopwidget.cpp @@ -1020,12 +1020,12 @@ public: }; -void QDesktopWidget_new(QDesktopWidget** outptr_QDesktopWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDesktopWidget* ret = new MiqtVirtualQDesktopWidget(); - *outptr_QDesktopWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDesktopWidget* QDesktopWidget_new() { + return new MiqtVirtualQDesktopWidget(); +} + +void QDesktopWidget_virtbase(QDesktopWidget* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QDesktopWidget_MetaObject(const QDesktopWidget* self) { diff --git a/qt/gen_qdesktopwidget.go b/qt/gen_qdesktopwidget.go index ef6b0675..0b162cd7 100644 --- a/qt/gen_qdesktopwidget.go +++ b/qt/gen_qdesktopwidget.go @@ -35,33 +35,26 @@ func (this *QDesktopWidget) UnsafePointer() unsafe.Pointer { } // newQDesktopWidget constructs the type using only CGO pointers. -func newQDesktopWidget(h *C.QDesktopWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDesktopWidget { +func newQDesktopWidget(h *C.QDesktopWidget) *QDesktopWidget { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QDesktopWidget_virtbase(h, &outptr_QWidget) + return &QDesktopWidget{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQDesktopWidget constructs the type using only unsafe pointers. -func UnsafeNewQDesktopWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDesktopWidget { - if h == nil { - return nil - } - - return &QDesktopWidget{h: (*C.QDesktopWidget)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQDesktopWidget(h unsafe.Pointer) *QDesktopWidget { + return newQDesktopWidget((*C.QDesktopWidget)(h)) } // NewQDesktopWidget constructs a new QDesktopWidget object. func NewQDesktopWidget() *QDesktopWidget { - var outptr_QDesktopWidget *C.QDesktopWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDesktopWidget_new(&outptr_QDesktopWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDesktopWidget(outptr_QDesktopWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDesktopWidget(C.QDesktopWidget_new()) ret.isSubclass = true return ret } @@ -131,7 +124,7 @@ func (this *QDesktopWidget) ScreenNumberWithQPoint(param1 *QPoint) int { } func (this *QDesktopWidget) Screen() *QWidget { - return newQWidget(C.QDesktopWidget_Screen(this.h), nil, nil) + return newQWidget(C.QDesktopWidget_Screen(this.h)) } func (this *QDesktopWidget) ScreenGeometry2() *QRect { @@ -284,7 +277,7 @@ func (this *QDesktopWidget) ScreenNumber1(widget *QWidget) int { } func (this *QDesktopWidget) Screen1(screen int) *QWidget { - return newQWidget(C.QDesktopWidget_Screen1(this.h, (C.int)(screen)), nil, nil) + return newQWidget(C.QDesktopWidget_Screen1(this.h, (C.int)(screen))) } func (this *QDesktopWidget) ScreenGeometry1(screen int) *QRect { @@ -319,7 +312,7 @@ func miqt_exec_callback_QDesktopWidget_ResizeEvent(self *C.QDesktopWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QDesktopWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -556,7 +549,7 @@ func miqt_exec_callback_QDesktopWidget_MousePressEvent(self *C.QDesktopWidget, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -582,7 +575,7 @@ func miqt_exec_callback_QDesktopWidget_MouseReleaseEvent(self *C.QDesktopWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -608,7 +601,7 @@ func miqt_exec_callback_QDesktopWidget_MouseDoubleClickEvent(self *C.QDesktopWid } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -634,7 +627,7 @@ func miqt_exec_callback_QDesktopWidget_MouseMoveEvent(self *C.QDesktopWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -660,7 +653,7 @@ func miqt_exec_callback_QDesktopWidget_WheelEvent(self *C.QDesktopWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -686,7 +679,7 @@ func miqt_exec_callback_QDesktopWidget_KeyPressEvent(self *C.QDesktopWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -712,7 +705,7 @@ func miqt_exec_callback_QDesktopWidget_KeyReleaseEvent(self *C.QDesktopWidget, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -738,7 +731,7 @@ func miqt_exec_callback_QDesktopWidget_FocusInEvent(self *C.QDesktopWidget, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -764,7 +757,7 @@ func miqt_exec_callback_QDesktopWidget_FocusOutEvent(self *C.QDesktopWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -842,7 +835,7 @@ func miqt_exec_callback_QDesktopWidget_PaintEvent(self *C.QDesktopWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -868,7 +861,7 @@ func miqt_exec_callback_QDesktopWidget_MoveEvent(self *C.QDesktopWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -894,7 +887,7 @@ func miqt_exec_callback_QDesktopWidget_CloseEvent(self *C.QDesktopWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -920,7 +913,7 @@ func miqt_exec_callback_QDesktopWidget_ContextMenuEvent(self *C.QDesktopWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -946,7 +939,7 @@ func miqt_exec_callback_QDesktopWidget_TabletEvent(self *C.QDesktopWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -972,7 +965,7 @@ func miqt_exec_callback_QDesktopWidget_ActionEvent(self *C.QDesktopWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -998,7 +991,7 @@ func miqt_exec_callback_QDesktopWidget_DragEnterEvent(self *C.QDesktopWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1024,7 +1017,7 @@ func miqt_exec_callback_QDesktopWidget_DragMoveEvent(self *C.QDesktopWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1050,7 +1043,7 @@ func miqt_exec_callback_QDesktopWidget_DragLeaveEvent(self *C.QDesktopWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1076,7 +1069,7 @@ func miqt_exec_callback_QDesktopWidget_DropEvent(self *C.QDesktopWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1102,7 +1095,7 @@ func miqt_exec_callback_QDesktopWidget_ShowEvent(self *C.QDesktopWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1128,7 +1121,7 @@ func miqt_exec_callback_QDesktopWidget_HideEvent(self *C.QDesktopWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QDesktopWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1324,7 +1317,7 @@ func miqt_exec_callback_QDesktopWidget_InputMethodEvent(self *C.QDesktopWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QDesktopWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qdesktopwidget.h b/qt/gen_qdesktopwidget.h index 78963d75..abbec78d 100644 --- a/qt/gen_qdesktopwidget.h +++ b/qt/gen_qdesktopwidget.h @@ -78,7 +78,8 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QDesktopWidget_new(QDesktopWidget** outptr_QDesktopWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QDesktopWidget* QDesktopWidget_new(); +void QDesktopWidget_virtbase(QDesktopWidget* src, QWidget** outptr_QWidget); QMetaObject* QDesktopWidget_MetaObject(const QDesktopWidget* self); void* QDesktopWidget_Metacast(QDesktopWidget* self, const char* param1); struct miqt_string QDesktopWidget_Tr(const char* s); diff --git a/qt/gen_qdial.cpp b/qt/gen_qdial.cpp index 79abe914..f921bba0 100644 --- a/qt/gen_qdial.cpp +++ b/qt/gen_qdial.cpp @@ -337,22 +337,16 @@ public: }; -void QDial_new(QWidget* parent, QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDial* ret = new MiqtVirtualQDial(parent); - *outptr_QDial = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDial* QDial_new(QWidget* parent) { + return new MiqtVirtualQDial(parent); } -void QDial_new2(QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDial* ret = new MiqtVirtualQDial(); - *outptr_QDial = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDial* QDial_new2() { + return new MiqtVirtualQDial(); +} + +void QDial_virtbase(QDial* src, QAbstractSlider** outptr_QAbstractSlider) { + *outptr_QAbstractSlider = static_cast(src); } QMetaObject* QDial_MetaObject(const QDial* self) { diff --git a/qt/gen_qdial.go b/qt/gen_qdial.go index 584bc0a5..8ef1651f 100644 --- a/qt/gen_qdial.go +++ b/qt/gen_qdial.go @@ -35,48 +35,34 @@ func (this *QDial) UnsafePointer() unsafe.Pointer { } // newQDial constructs the type using only CGO pointers. -func newQDial(h *C.QDial, h_QAbstractSlider *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDial { +func newQDial(h *C.QDial) *QDial { if h == nil { return nil } + var outptr_QAbstractSlider *C.QAbstractSlider = nil + C.QDial_virtbase(h, &outptr_QAbstractSlider) + return &QDial{h: h, - QAbstractSlider: newQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractSlider: newQAbstractSlider(outptr_QAbstractSlider)} } // UnsafeNewQDial constructs the type using only unsafe pointers. -func UnsafeNewQDial(h unsafe.Pointer, h_QAbstractSlider unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDial { - if h == nil { - return nil - } - - return &QDial{h: (*C.QDial)(h), - QAbstractSlider: UnsafeNewQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQDial(h unsafe.Pointer) *QDial { + return newQDial((*C.QDial)(h)) } // NewQDial constructs a new QDial object. func NewQDial(parent *QWidget) *QDial { - var outptr_QDial *C.QDial = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDial_new(parent.cPointer(), &outptr_QDial, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDial(outptr_QDial, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDial(C.QDial_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQDial2 constructs a new QDial object. func NewQDial2() *QDial { - var outptr_QDial *C.QDial = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDial_new2(&outptr_QDial, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDial(outptr_QDial, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDial(C.QDial_new2()) ret.isSubclass = true return ret } @@ -295,7 +281,7 @@ func miqt_exec_callback_QDial_ResizeEvent(self *C.QDial, cb C.intptr_t, re *C.QR } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(re, nil) + slotval1 := newQResizeEvent(re) gofunc((&QDial{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -321,7 +307,7 @@ func miqt_exec_callback_QDial_PaintEvent(self *C.QDial, cb C.intptr_t, pe *C.QPa } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(pe, nil) + slotval1 := newQPaintEvent(pe) gofunc((&QDial{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -347,7 +333,7 @@ func miqt_exec_callback_QDial_MousePressEvent(self *C.QDial, cb C.intptr_t, me * } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(me, nil, nil) + slotval1 := newQMouseEvent(me) gofunc((&QDial{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -373,7 +359,7 @@ func miqt_exec_callback_QDial_MouseReleaseEvent(self *C.QDial, cb C.intptr_t, me } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(me, nil, nil) + slotval1 := newQMouseEvent(me) gofunc((&QDial{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -399,7 +385,7 @@ func miqt_exec_callback_QDial_MouseMoveEvent(self *C.QDial, cb C.intptr_t, me *C } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(me, nil, nil) + slotval1 := newQMouseEvent(me) gofunc((&QDial{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -451,7 +437,7 @@ func miqt_exec_callback_QDial_KeyPressEvent(self *C.QDial, cb C.intptr_t, ev *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(ev, nil, nil) + slotval1 := newQKeyEvent(ev) gofunc((&QDial{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -477,7 +463,7 @@ func miqt_exec_callback_QDial_TimerEvent(self *C.QDial, cb C.intptr_t, param1 *C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QDial{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -503,7 +489,7 @@ func miqt_exec_callback_QDial_WheelEvent(self *C.QDial, cb C.intptr_t, e *C.QWhe } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QDial{h: self}).callVirtualBase_WheelEvent, slotval1) diff --git a/qt/gen_qdial.h b/qt/gen_qdial.h index 002fa8f7..1e0c0487 100644 --- a/qt/gen_qdial.h +++ b/qt/gen_qdial.h @@ -46,8 +46,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QDial_new(QWidget* parent, QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDial_new2(QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QDial* QDial_new(QWidget* parent); +QDial* QDial_new2(); +void QDial_virtbase(QDial* src, QAbstractSlider** outptr_QAbstractSlider); QMetaObject* QDial_MetaObject(const QDial* self); void* QDial_Metacast(QDial* self, const char* param1); struct miqt_string QDial_Tr(const char* s); diff --git a/qt/gen_qdialog.cpp b/qt/gen_qdialog.cpp index 1101dabc..d44ea419 100644 --- a/qt/gen_qdialog.cpp +++ b/qt/gen_qdialog.cpp @@ -1160,28 +1160,20 @@ public: }; -void QDialog_new(QWidget* parent, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialog* ret = new MiqtVirtualQDialog(parent); - *outptr_QDialog = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialog* QDialog_new(QWidget* parent) { + return new MiqtVirtualQDialog(parent); } -void QDialog_new2(QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialog* ret = new MiqtVirtualQDialog(); - *outptr_QDialog = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialog* QDialog_new2() { + return new MiqtVirtualQDialog(); } -void QDialog_new3(QWidget* parent, int f, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialog* ret = new MiqtVirtualQDialog(parent, static_cast(f)); - *outptr_QDialog = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialog* QDialog_new3(QWidget* parent, int f) { + return new MiqtVirtualQDialog(parent, static_cast(f)); +} + +void QDialog_virtbase(QDialog* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QDialog_MetaObject(const QDialog* self) { diff --git a/qt/gen_qdialog.go b/qt/gen_qdialog.go index 70b1ce4d..a05a5786 100644 --- a/qt/gen_qdialog.go +++ b/qt/gen_qdialog.go @@ -42,59 +42,42 @@ func (this *QDialog) UnsafePointer() unsafe.Pointer { } // newQDialog constructs the type using only CGO pointers. -func newQDialog(h *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDialog { +func newQDialog(h *C.QDialog) *QDialog { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QDialog_virtbase(h, &outptr_QWidget) + return &QDialog{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQDialog constructs the type using only unsafe pointers. -func UnsafeNewQDialog(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDialog { - if h == nil { - return nil - } - - return &QDialog{h: (*C.QDialog)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQDialog(h unsafe.Pointer) *QDialog { + return newQDialog((*C.QDialog)(h)) } // NewQDialog constructs a new QDialog object. func NewQDialog(parent *QWidget) *QDialog { - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialog_new(parent.cPointer(), &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialog(outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialog(C.QDialog_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQDialog2 constructs a new QDialog object. func NewQDialog2() *QDialog { - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialog_new2(&outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialog(outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialog(C.QDialog_new2()) ret.isSubclass = true return ret } // NewQDialog3 constructs a new QDialog object. func NewQDialog3(parent *QWidget, f WindowType) *QDialog { - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialog_new3(parent.cPointer(), (C.int)(f), &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialog(outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialog(C.QDialog_new3(parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -148,7 +131,7 @@ func (this *QDialog) SetExtension(extension *QWidget) { } func (this *QDialog) Extension() *QWidget { - return newQWidget(C.QDialog_Extension(this.h), nil, nil) + return newQWidget(C.QDialog_Extension(this.h)) } func (this *QDialog) SizeHint() *QSize { @@ -521,7 +504,7 @@ func miqt_exec_callback_QDialog_KeyPressEvent(self *C.QDialog, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -547,7 +530,7 @@ func miqt_exec_callback_QDialog_CloseEvent(self *C.QDialog, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(param1, nil) + slotval1 := newQCloseEvent(param1) gofunc((&QDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -573,7 +556,7 @@ func miqt_exec_callback_QDialog_ShowEvent(self *C.QDialog, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -599,7 +582,7 @@ func miqt_exec_callback_QDialog_ResizeEvent(self *C.QDialog, cb C.intptr_t, para } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -625,7 +608,7 @@ func miqt_exec_callback_QDialog_ContextMenuEvent(self *C.QDialog, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -812,7 +795,7 @@ func miqt_exec_callback_QDialog_MousePressEvent(self *C.QDialog, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -838,7 +821,7 @@ func miqt_exec_callback_QDialog_MouseReleaseEvent(self *C.QDialog, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -864,7 +847,7 @@ func miqt_exec_callback_QDialog_MouseDoubleClickEvent(self *C.QDialog, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -890,7 +873,7 @@ func miqt_exec_callback_QDialog_MouseMoveEvent(self *C.QDialog, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -916,7 +899,7 @@ func miqt_exec_callback_QDialog_WheelEvent(self *C.QDialog, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -942,7 +925,7 @@ func miqt_exec_callback_QDialog_KeyReleaseEvent(self *C.QDialog, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -968,7 +951,7 @@ func miqt_exec_callback_QDialog_FocusInEvent(self *C.QDialog, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -994,7 +977,7 @@ func miqt_exec_callback_QDialog_FocusOutEvent(self *C.QDialog, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1072,7 +1055,7 @@ func miqt_exec_callback_QDialog_PaintEvent(self *C.QDialog, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1098,7 +1081,7 @@ func miqt_exec_callback_QDialog_MoveEvent(self *C.QDialog, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1124,7 +1107,7 @@ func miqt_exec_callback_QDialog_TabletEvent(self *C.QDialog, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1150,7 +1133,7 @@ func miqt_exec_callback_QDialog_ActionEvent(self *C.QDialog, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1176,7 +1159,7 @@ func miqt_exec_callback_QDialog_DragEnterEvent(self *C.QDialog, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1202,7 +1185,7 @@ func miqt_exec_callback_QDialog_DragMoveEvent(self *C.QDialog, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1228,7 +1211,7 @@ func miqt_exec_callback_QDialog_DragLeaveEvent(self *C.QDialog, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1254,7 +1237,7 @@ func miqt_exec_callback_QDialog_DropEvent(self *C.QDialog, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1280,7 +1263,7 @@ func miqt_exec_callback_QDialog_HideEvent(self *C.QDialog, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1476,7 +1459,7 @@ func miqt_exec_callback_QDialog_InputMethodEvent(self *C.QDialog, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QDialog{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qdialog.h b/qt/gen_qdialog.h index 176da166..15ce55d2 100644 --- a/qt/gen_qdialog.h +++ b/qt/gen_qdialog.h @@ -76,9 +76,10 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QDialog_new(QWidget* parent, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialog_new2(QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialog_new3(QWidget* parent, int f, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QDialog* QDialog_new(QWidget* parent); +QDialog* QDialog_new2(); +QDialog* QDialog_new3(QWidget* parent, int f); +void QDialog_virtbase(QDialog* src, QWidget** outptr_QWidget); QMetaObject* QDialog_MetaObject(const QDialog* self); void* QDialog_Metacast(QDialog* self, const char* param1); struct miqt_string QDialog_Tr(const char* s); diff --git a/qt/gen_qdialogbuttonbox.cpp b/qt/gen_qdialogbuttonbox.cpp index 8205ea81..a5c04169 100644 --- a/qt/gen_qdialogbuttonbox.cpp +++ b/qt/gen_qdialogbuttonbox.cpp @@ -1029,68 +1029,40 @@ public: }; -void QDialogButtonBox_new(QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(parent); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new(QWidget* parent) { + return new MiqtVirtualQDialogButtonBox(parent); } -void QDialogButtonBox_new2(QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new2() { + return new MiqtVirtualQDialogButtonBox(); } -void QDialogButtonBox_new3(int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(orientation)); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new3(int orientation) { + return new MiqtVirtualQDialogButtonBox(static_cast(orientation)); } -void QDialogButtonBox_new4(int buttons, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons)); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new4(int buttons) { + return new MiqtVirtualQDialogButtonBox(static_cast(buttons)); } -void QDialogButtonBox_new5(int buttons, int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons), static_cast(orientation)); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new5(int buttons, int orientation) { + return new MiqtVirtualQDialogButtonBox(static_cast(buttons), static_cast(orientation)); } -void QDialogButtonBox_new6(int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(orientation), parent); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new6(int orientation, QWidget* parent) { + return new MiqtVirtualQDialogButtonBox(static_cast(orientation), parent); } -void QDialogButtonBox_new7(int buttons, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons), parent); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new7(int buttons, QWidget* parent) { + return new MiqtVirtualQDialogButtonBox(static_cast(buttons), parent); } -void QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons), static_cast(orientation), parent); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent) { + return new MiqtVirtualQDialogButtonBox(static_cast(buttons), static_cast(orientation), parent); +} + +void QDialogButtonBox_virtbase(QDialogButtonBox* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QDialogButtonBox_MetaObject(const QDialogButtonBox* self) { diff --git a/qt/gen_qdialogbuttonbox.go b/qt/gen_qdialogbuttonbox.go index 2cedad81..b3d4e3e4 100644 --- a/qt/gen_qdialogbuttonbox.go +++ b/qt/gen_qdialogbuttonbox.go @@ -87,124 +87,82 @@ func (this *QDialogButtonBox) UnsafePointer() unsafe.Pointer { } // newQDialogButtonBox constructs the type using only CGO pointers. -func newQDialogButtonBox(h *C.QDialogButtonBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDialogButtonBox { +func newQDialogButtonBox(h *C.QDialogButtonBox) *QDialogButtonBox { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QDialogButtonBox_virtbase(h, &outptr_QWidget) + return &QDialogButtonBox{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQDialogButtonBox constructs the type using only unsafe pointers. -func UnsafeNewQDialogButtonBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDialogButtonBox { - if h == nil { - return nil - } - - return &QDialogButtonBox{h: (*C.QDialogButtonBox)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQDialogButtonBox(h unsafe.Pointer) *QDialogButtonBox { + return newQDialogButtonBox((*C.QDialogButtonBox)(h)) } // NewQDialogButtonBox constructs a new QDialogButtonBox object. func NewQDialogButtonBox(parent *QWidget) *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new(parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQDialogButtonBox2 constructs a new QDialogButtonBox object. func NewQDialogButtonBox2() *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new2(&outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new2()) ret.isSubclass = true return ret } // NewQDialogButtonBox3 constructs a new QDialogButtonBox object. func NewQDialogButtonBox3(orientation Orientation) *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new3((C.int)(orientation), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new3((C.int)(orientation))) ret.isSubclass = true return ret } // NewQDialogButtonBox4 constructs a new QDialogButtonBox object. func NewQDialogButtonBox4(buttons QDialogButtonBox__StandardButton) *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new4((C.int)(buttons), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new4((C.int)(buttons))) ret.isSubclass = true return ret } // NewQDialogButtonBox5 constructs a new QDialogButtonBox object. func NewQDialogButtonBox5(buttons QDialogButtonBox__StandardButton, orientation Orientation) *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new5((C.int)(buttons), (C.int)(orientation), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new5((C.int)(buttons), (C.int)(orientation))) ret.isSubclass = true return ret } // NewQDialogButtonBox6 constructs a new QDialogButtonBox object. func NewQDialogButtonBox6(orientation Orientation, parent *QWidget) *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new6((C.int)(orientation), parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new6((C.int)(orientation), parent.cPointer())) ret.isSubclass = true return ret } // NewQDialogButtonBox7 constructs a new QDialogButtonBox object. func NewQDialogButtonBox7(buttons QDialogButtonBox__StandardButton, parent *QWidget) *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new7((C.int)(buttons), parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new7((C.int)(buttons), parent.cPointer())) ret.isSubclass = true return ret } // NewQDialogButtonBox8 constructs a new QDialogButtonBox object. func NewQDialogButtonBox8(buttons QDialogButtonBox__StandardButton, orientation Orientation, parent *QWidget) *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new8((C.int)(buttons), (C.int)(orientation), parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new8((C.int)(buttons), (C.int)(orientation), parent.cPointer())) ret.isSubclass = true return ret } @@ -254,11 +212,11 @@ func (this *QDialogButtonBox) AddButton2(text string, role QDialogButtonBox__But text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQPushButton(C.QDialogButtonBox_AddButton2(this.h, text_ms, (C.int)(role)), nil, nil, nil, nil) + return newQPushButton(C.QDialogButtonBox_AddButton2(this.h, text_ms, (C.int)(role))) } func (this *QDialogButtonBox) AddButtonWithButton(button QDialogButtonBox__StandardButton) *QPushButton { - return newQPushButton(C.QDialogButtonBox_AddButtonWithButton(this.h, (C.int)(button)), nil, nil, nil, nil) + return newQPushButton(C.QDialogButtonBox_AddButtonWithButton(this.h, (C.int)(button))) } func (this *QDialogButtonBox) RemoveButton(button *QAbstractButton) { @@ -274,7 +232,7 @@ func (this *QDialogButtonBox) Buttons() []*QAbstractButton { _ret := make([]*QAbstractButton, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractButton)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAbstractButton(_outCast[i], nil, nil, nil) + _ret[i] = newQAbstractButton(_outCast[i]) } return _ret } @@ -296,7 +254,7 @@ func (this *QDialogButtonBox) StandardButton(button *QAbstractButton) QDialogBut } func (this *QDialogButtonBox) Button(which QDialogButtonBox__StandardButton) *QPushButton { - return newQPushButton(C.QDialogButtonBox_Button(this.h, (C.int)(which)), nil, nil, nil, nil) + return newQPushButton(C.QDialogButtonBox_Button(this.h, (C.int)(which))) } func (this *QDialogButtonBox) SetCenterButtons(center bool) { @@ -322,7 +280,7 @@ func miqt_exec_callback_QDialogButtonBox_Clicked(cb C.intptr_t, button *C.QAbstr } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractButton(button, nil, nil, nil) + slotval1 := newQAbstractButton(button) gofunc(slotval1) } @@ -679,7 +637,7 @@ func miqt_exec_callback_QDialogButtonBox_MousePressEvent(self *C.QDialogButtonBo } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -705,7 +663,7 @@ func miqt_exec_callback_QDialogButtonBox_MouseReleaseEvent(self *C.QDialogButton } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -731,7 +689,7 @@ func miqt_exec_callback_QDialogButtonBox_MouseDoubleClickEvent(self *C.QDialogBu } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -757,7 +715,7 @@ func miqt_exec_callback_QDialogButtonBox_MouseMoveEvent(self *C.QDialogButtonBox } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -783,7 +741,7 @@ func miqt_exec_callback_QDialogButtonBox_WheelEvent(self *C.QDialogButtonBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -809,7 +767,7 @@ func miqt_exec_callback_QDialogButtonBox_KeyPressEvent(self *C.QDialogButtonBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -835,7 +793,7 @@ func miqt_exec_callback_QDialogButtonBox_KeyReleaseEvent(self *C.QDialogButtonBo } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -861,7 +819,7 @@ func miqt_exec_callback_QDialogButtonBox_FocusInEvent(self *C.QDialogButtonBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -887,7 +845,7 @@ func miqt_exec_callback_QDialogButtonBox_FocusOutEvent(self *C.QDialogButtonBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -965,7 +923,7 @@ func miqt_exec_callback_QDialogButtonBox_PaintEvent(self *C.QDialogButtonBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -991,7 +949,7 @@ func miqt_exec_callback_QDialogButtonBox_MoveEvent(self *C.QDialogButtonBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1017,7 +975,7 @@ func miqt_exec_callback_QDialogButtonBox_ResizeEvent(self *C.QDialogButtonBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1043,7 +1001,7 @@ func miqt_exec_callback_QDialogButtonBox_CloseEvent(self *C.QDialogButtonBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1069,7 +1027,7 @@ func miqt_exec_callback_QDialogButtonBox_ContextMenuEvent(self *C.QDialogButtonB } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1095,7 +1053,7 @@ func miqt_exec_callback_QDialogButtonBox_TabletEvent(self *C.QDialogButtonBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1121,7 +1079,7 @@ func miqt_exec_callback_QDialogButtonBox_ActionEvent(self *C.QDialogButtonBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1147,7 +1105,7 @@ func miqt_exec_callback_QDialogButtonBox_DragEnterEvent(self *C.QDialogButtonBox } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1173,7 +1131,7 @@ func miqt_exec_callback_QDialogButtonBox_DragMoveEvent(self *C.QDialogButtonBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1199,7 +1157,7 @@ func miqt_exec_callback_QDialogButtonBox_DragLeaveEvent(self *C.QDialogButtonBox } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1225,7 +1183,7 @@ func miqt_exec_callback_QDialogButtonBox_DropEvent(self *C.QDialogButtonBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1251,7 +1209,7 @@ func miqt_exec_callback_QDialogButtonBox_ShowEvent(self *C.QDialogButtonBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1277,7 +1235,7 @@ func miqt_exec_callback_QDialogButtonBox_HideEvent(self *C.QDialogButtonBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1447,7 +1405,7 @@ func miqt_exec_callback_QDialogButtonBox_InputMethodEvent(self *C.QDialogButtonB } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qdialogbuttonbox.h b/qt/gen_qdialogbuttonbox.h index f352bd97..bdde7efb 100644 --- a/qt/gen_qdialogbuttonbox.h +++ b/qt/gen_qdialogbuttonbox.h @@ -80,14 +80,15 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QDialogButtonBox_new(QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialogButtonBox_new2(QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialogButtonBox_new3(int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialogButtonBox_new4(int buttons, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialogButtonBox_new5(int buttons, int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialogButtonBox_new6(int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialogButtonBox_new7(int buttons, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QDialogButtonBox* QDialogButtonBox_new(QWidget* parent); +QDialogButtonBox* QDialogButtonBox_new2(); +QDialogButtonBox* QDialogButtonBox_new3(int orientation); +QDialogButtonBox* QDialogButtonBox_new4(int buttons); +QDialogButtonBox* QDialogButtonBox_new5(int buttons, int orientation); +QDialogButtonBox* QDialogButtonBox_new6(int orientation, QWidget* parent); +QDialogButtonBox* QDialogButtonBox_new7(int buttons, QWidget* parent); +QDialogButtonBox* QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent); +void QDialogButtonBox_virtbase(QDialogButtonBox* src, QWidget** outptr_QWidget); QMetaObject* QDialogButtonBox_MetaObject(const QDialogButtonBox* self); void* QDialogButtonBox_Metacast(QDialogButtonBox* self, const char* param1); struct miqt_string QDialogButtonBox_Tr(const char* s); diff --git a/qt/gen_qdir.cpp b/qt/gen_qdir.cpp index 449ce1bc..1d452ede 100644 --- a/qt/gen_qdir.cpp +++ b/qt/gen_qdir.cpp @@ -9,41 +9,35 @@ #include "gen_qdir.h" #include "_cgo_export.h" -void QDir_new(QDir* param1, QDir** outptr_QDir) { - QDir* ret = new QDir(*param1); - *outptr_QDir = ret; +QDir* QDir_new(QDir* param1) { + return new QDir(*param1); } -void QDir_new2(QDir** outptr_QDir) { - QDir* ret = new QDir(); - *outptr_QDir = ret; +QDir* QDir_new2() { + return new QDir(); } -void QDir_new3(struct miqt_string path, struct miqt_string nameFilter, QDir** outptr_QDir) { +QDir* QDir_new3(struct miqt_string path, struct miqt_string nameFilter) { QString path_QString = QString::fromUtf8(path.data, path.len); QString nameFilter_QString = QString::fromUtf8(nameFilter.data, nameFilter.len); - QDir* ret = new QDir(path_QString, nameFilter_QString); - *outptr_QDir = ret; + return new QDir(path_QString, nameFilter_QString); } -void QDir_new4(struct miqt_string path, QDir** outptr_QDir) { +QDir* QDir_new4(struct miqt_string path) { QString path_QString = QString::fromUtf8(path.data, path.len); - QDir* ret = new QDir(path_QString); - *outptr_QDir = ret; + return new QDir(path_QString); } -void QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort, QDir** outptr_QDir) { +QDir* QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort) { QString path_QString = QString::fromUtf8(path.data, path.len); QString nameFilter_QString = QString::fromUtf8(nameFilter.data, nameFilter.len); - QDir* ret = new QDir(path_QString, nameFilter_QString, static_cast(sort)); - *outptr_QDir = ret; + return new QDir(path_QString, nameFilter_QString, static_cast(sort)); } -void QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter, QDir** outptr_QDir) { +QDir* QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter) { QString path_QString = QString::fromUtf8(path.data, path.len); QString nameFilter_QString = QString::fromUtf8(nameFilter.data, nameFilter.len); - QDir* ret = new QDir(path_QString, nameFilter_QString, static_cast(sort), static_cast(filter)); - *outptr_QDir = ret; + return new QDir(path_QString, nameFilter_QString, static_cast(sort), static_cast(filter)); } void QDir_OperatorAssign(QDir* self, QDir* param1) { diff --git a/qt/gen_qdir.go b/qt/gen_qdir.go index d4e242a4..0d26e574 100644 --- a/qt/gen_qdir.go +++ b/qt/gen_qdir.go @@ -79,34 +79,27 @@ func newQDir(h *C.QDir) *QDir { if h == nil { return nil } + return &QDir{h: h} } // UnsafeNewQDir constructs the type using only unsafe pointers. func UnsafeNewQDir(h unsafe.Pointer) *QDir { - if h == nil { - return nil - } - - return &QDir{h: (*C.QDir)(h)} + return newQDir((*C.QDir)(h)) } // NewQDir constructs a new QDir object. func NewQDir(param1 *QDir) *QDir { - var outptr_QDir *C.QDir = nil - C.QDir_new(param1.cPointer(), &outptr_QDir) - ret := newQDir(outptr_QDir) + ret := newQDir(C.QDir_new(param1.cPointer())) ret.isSubclass = true return ret } // NewQDir2 constructs a new QDir object. func NewQDir2() *QDir { - var outptr_QDir *C.QDir = nil - C.QDir_new2(&outptr_QDir) - ret := newQDir(outptr_QDir) + ret := newQDir(C.QDir_new2()) ret.isSubclass = true return ret } @@ -121,10 +114,8 @@ func NewQDir3(path string, nameFilter string) *QDir { nameFilter_ms.data = C.CString(nameFilter) nameFilter_ms.len = C.size_t(len(nameFilter)) defer C.free(unsafe.Pointer(nameFilter_ms.data)) - var outptr_QDir *C.QDir = nil - C.QDir_new3(path_ms, nameFilter_ms, &outptr_QDir) - ret := newQDir(outptr_QDir) + ret := newQDir(C.QDir_new3(path_ms, nameFilter_ms)) ret.isSubclass = true return ret } @@ -135,10 +126,8 @@ func NewQDir4(path string) *QDir { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - var outptr_QDir *C.QDir = nil - C.QDir_new4(path_ms, &outptr_QDir) - ret := newQDir(outptr_QDir) + ret := newQDir(C.QDir_new4(path_ms)) ret.isSubclass = true return ret } @@ -153,10 +142,8 @@ func NewQDir5(path string, nameFilter string, sort QDir__SortFlag) *QDir { nameFilter_ms.data = C.CString(nameFilter) nameFilter_ms.len = C.size_t(len(nameFilter)) defer C.free(unsafe.Pointer(nameFilter_ms.data)) - var outptr_QDir *C.QDir = nil - C.QDir_new5(path_ms, nameFilter_ms, (C.int)(sort), &outptr_QDir) - ret := newQDir(outptr_QDir) + ret := newQDir(C.QDir_new5(path_ms, nameFilter_ms, (C.int)(sort))) ret.isSubclass = true return ret } @@ -171,10 +158,8 @@ func NewQDir6(path string, nameFilter string, sort QDir__SortFlag, filter QDir__ nameFilter_ms.data = C.CString(nameFilter) nameFilter_ms.len = C.size_t(len(nameFilter)) defer C.free(unsafe.Pointer(nameFilter_ms.data)) - var outptr_QDir *C.QDir = nil - C.QDir_new6(path_ms, nameFilter_ms, (C.int)(sort), (C.int)(filter), &outptr_QDir) - ret := newQDir(outptr_QDir) + ret := newQDir(C.QDir_new6(path_ms, nameFilter_ms, (C.int)(sort), (C.int)(filter))) ret.isSubclass = true return ret } diff --git a/qt/gen_qdir.h b/qt/gen_qdir.h index eecf311e..b8a73c55 100644 --- a/qt/gen_qdir.h +++ b/qt/gen_qdir.h @@ -24,12 +24,12 @@ typedef struct QDir QDir; typedef struct QFileInfo QFileInfo; #endif -void QDir_new(QDir* param1, QDir** outptr_QDir); -void QDir_new2(QDir** outptr_QDir); -void QDir_new3(struct miqt_string path, struct miqt_string nameFilter, QDir** outptr_QDir); -void QDir_new4(struct miqt_string path, QDir** outptr_QDir); -void QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort, QDir** outptr_QDir); -void QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter, QDir** outptr_QDir); +QDir* QDir_new(QDir* param1); +QDir* QDir_new2(); +QDir* QDir_new3(struct miqt_string path, struct miqt_string nameFilter); +QDir* QDir_new4(struct miqt_string path); +QDir* QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort); +QDir* QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter); void QDir_OperatorAssign(QDir* self, QDir* param1); void QDir_OperatorAssignWithPath(QDir* self, struct miqt_string path); void QDir_Swap(QDir* self, QDir* other); diff --git a/qt/gen_qdiriterator.cpp b/qt/gen_qdiriterator.cpp index d9fd33b4..81392586 100644 --- a/qt/gen_qdiriterator.cpp +++ b/qt/gen_qdiriterator.cpp @@ -9,24 +9,21 @@ #include "gen_qdiriterator.h" #include "_cgo_export.h" -void QDirIterator_new(QDir* dir, QDirIterator** outptr_QDirIterator) { - QDirIterator* ret = new QDirIterator(*dir); - *outptr_QDirIterator = ret; +QDirIterator* QDirIterator_new(QDir* dir) { + return new QDirIterator(*dir); } -void QDirIterator_new2(struct miqt_string path, QDirIterator** outptr_QDirIterator) { +QDirIterator* QDirIterator_new2(struct miqt_string path) { QString path_QString = QString::fromUtf8(path.data, path.len); - QDirIterator* ret = new QDirIterator(path_QString); - *outptr_QDirIterator = ret; + return new QDirIterator(path_QString); } -void QDirIterator_new3(struct miqt_string path, int filter, QDirIterator** outptr_QDirIterator) { +QDirIterator* QDirIterator_new3(struct miqt_string path, int filter) { QString path_QString = QString::fromUtf8(path.data, path.len); - QDirIterator* ret = new QDirIterator(path_QString, static_cast(filter)); - *outptr_QDirIterator = ret; + return new QDirIterator(path_QString, static_cast(filter)); } -void QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, QDirIterator** outptr_QDirIterator) { +QDirIterator* QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters) { QString path_QString = QString::fromUtf8(path.data, path.len); QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); @@ -35,28 +32,24 @@ void QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct m QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - QDirIterator* ret = new QDirIterator(path_QString, nameFilters_QList); - *outptr_QDirIterator = ret; + return new QDirIterator(path_QString, nameFilters_QList); } -void QDirIterator_new5(QDir* dir, int flags, QDirIterator** outptr_QDirIterator) { - QDirIterator* ret = new QDirIterator(*dir, static_cast(flags)); - *outptr_QDirIterator = ret; +QDirIterator* QDirIterator_new5(QDir* dir, int flags) { + return new QDirIterator(*dir, static_cast(flags)); } -void QDirIterator_new6(struct miqt_string path, int flags, QDirIterator** outptr_QDirIterator) { +QDirIterator* QDirIterator_new6(struct miqt_string path, int flags) { QString path_QString = QString::fromUtf8(path.data, path.len); - QDirIterator* ret = new QDirIterator(path_QString, static_cast(flags)); - *outptr_QDirIterator = ret; + return new QDirIterator(path_QString, static_cast(flags)); } -void QDirIterator_new7(struct miqt_string path, int filter, int flags, QDirIterator** outptr_QDirIterator) { +QDirIterator* QDirIterator_new7(struct miqt_string path, int filter, int flags) { QString path_QString = QString::fromUtf8(path.data, path.len); - QDirIterator* ret = new QDirIterator(path_QString, static_cast(filter), static_cast(flags)); - *outptr_QDirIterator = ret; + return new QDirIterator(path_QString, static_cast(filter), static_cast(flags)); } -void QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, QDirIterator** outptr_QDirIterator) { +QDirIterator* QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters) { QString path_QString = QString::fromUtf8(path.data, path.len); QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); @@ -65,11 +58,10 @@ void QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct m QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - QDirIterator* ret = new QDirIterator(path_QString, nameFilters_QList, static_cast(filters)); - *outptr_QDirIterator = ret; + return new QDirIterator(path_QString, nameFilters_QList, static_cast(filters)); } -void QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags, QDirIterator** outptr_QDirIterator) { +QDirIterator* QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags) { QString path_QString = QString::fromUtf8(path.data, path.len); QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); @@ -78,8 +70,7 @@ void QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct m QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - QDirIterator* ret = new QDirIterator(path_QString, nameFilters_QList, static_cast(filters), static_cast(flags)); - *outptr_QDirIterator = ret; + return new QDirIterator(path_QString, nameFilters_QList, static_cast(filters), static_cast(flags)); } struct miqt_string QDirIterator_Next(QDirIterator* self) { diff --git a/qt/gen_qdiriterator.go b/qt/gen_qdiriterator.go index ab05c899..5980a672 100644 --- a/qt/gen_qdiriterator.go +++ b/qt/gen_qdiriterator.go @@ -45,24 +45,19 @@ func newQDirIterator(h *C.QDirIterator) *QDirIterator { if h == nil { return nil } + return &QDirIterator{h: h} } // UnsafeNewQDirIterator constructs the type using only unsafe pointers. func UnsafeNewQDirIterator(h unsafe.Pointer) *QDirIterator { - if h == nil { - return nil - } - - return &QDirIterator{h: (*C.QDirIterator)(h)} + return newQDirIterator((*C.QDirIterator)(h)) } // NewQDirIterator constructs a new QDirIterator object. func NewQDirIterator(dir *QDir) *QDirIterator { - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new(dir.cPointer(), &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new(dir.cPointer())) ret.isSubclass = true return ret } @@ -73,10 +68,8 @@ func NewQDirIterator2(path string) *QDirIterator { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new2(path_ms, &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new2(path_ms)) ret.isSubclass = true return ret } @@ -87,10 +80,8 @@ func NewQDirIterator3(path string, filter QDir__Filter) *QDirIterator { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new3(path_ms, (C.int)(filter), &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new3(path_ms, (C.int)(filter))) ret.isSubclass = true return ret } @@ -111,20 +102,16 @@ func NewQDirIterator4(path string, nameFilters []string) *QDirIterator { nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new4(path_ms, nameFilters_ma, &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new4(path_ms, nameFilters_ma)) ret.isSubclass = true return ret } // NewQDirIterator5 constructs a new QDirIterator object. func NewQDirIterator5(dir *QDir, flags QDirIterator__IteratorFlag) *QDirIterator { - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new5(dir.cPointer(), (C.int)(flags), &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new5(dir.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -135,10 +122,8 @@ func NewQDirIterator6(path string, flags QDirIterator__IteratorFlag) *QDirIterat path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new6(path_ms, (C.int)(flags), &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new6(path_ms, (C.int)(flags))) ret.isSubclass = true return ret } @@ -149,10 +134,8 @@ func NewQDirIterator7(path string, filter QDir__Filter, flags QDirIterator__Iter path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new7(path_ms, (C.int)(filter), (C.int)(flags), &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new7(path_ms, (C.int)(filter), (C.int)(flags))) ret.isSubclass = true return ret } @@ -173,10 +156,8 @@ func NewQDirIterator8(path string, nameFilters []string, filters QDir__Filter) * nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new8(path_ms, nameFilters_ma, (C.int)(filters), &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new8(path_ms, nameFilters_ma, (C.int)(filters))) ret.isSubclass = true return ret } @@ -197,10 +178,8 @@ func NewQDirIterator9(path string, nameFilters []string, filters QDir__Filter, f nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new9(path_ms, nameFilters_ma, (C.int)(filters), (C.int)(flags), &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new9(path_ms, nameFilters_ma, (C.int)(filters), (C.int)(flags))) ret.isSubclass = true return ret } diff --git a/qt/gen_qdiriterator.h b/qt/gen_qdiriterator.h index 3680d52a..548c7563 100644 --- a/qt/gen_qdiriterator.h +++ b/qt/gen_qdiriterator.h @@ -24,15 +24,15 @@ typedef struct QDirIterator QDirIterator; typedef struct QFileInfo QFileInfo; #endif -void QDirIterator_new(QDir* dir, QDirIterator** outptr_QDirIterator); -void QDirIterator_new2(struct miqt_string path, QDirIterator** outptr_QDirIterator); -void QDirIterator_new3(struct miqt_string path, int filter, QDirIterator** outptr_QDirIterator); -void QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, QDirIterator** outptr_QDirIterator); -void QDirIterator_new5(QDir* dir, int flags, QDirIterator** outptr_QDirIterator); -void QDirIterator_new6(struct miqt_string path, int flags, QDirIterator** outptr_QDirIterator); -void QDirIterator_new7(struct miqt_string path, int filter, int flags, QDirIterator** outptr_QDirIterator); -void QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, QDirIterator** outptr_QDirIterator); -void QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags, QDirIterator** outptr_QDirIterator); +QDirIterator* QDirIterator_new(QDir* dir); +QDirIterator* QDirIterator_new2(struct miqt_string path); +QDirIterator* QDirIterator_new3(struct miqt_string path, int filter); +QDirIterator* QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters); +QDirIterator* QDirIterator_new5(QDir* dir, int flags); +QDirIterator* QDirIterator_new6(struct miqt_string path, int flags); +QDirIterator* QDirIterator_new7(struct miqt_string path, int filter, int flags); +QDirIterator* QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters); +QDirIterator* QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags); struct miqt_string QDirIterator_Next(QDirIterator* self); bool QDirIterator_HasNext(const QDirIterator* self); struct miqt_string QDirIterator_FileName(const QDirIterator* self); diff --git a/qt/gen_qdirmodel.cpp b/qt/gen_qdirmodel.cpp index 4d32c6c4..d5e9450c 100644 --- a/qt/gen_qdirmodel.cpp +++ b/qt/gen_qdirmodel.cpp @@ -1039,7 +1039,7 @@ public: }; -void QDirModel_new(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort, QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { +QDirModel* QDirModel_new(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort) { QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); struct miqt_string* nameFilters_arr = static_cast(nameFilters.data); @@ -1047,20 +1047,14 @@ void QDirModel_new(struct miqt_array /* of struct miqt_string */ nameFilters, i QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - MiqtVirtualQDirModel* ret = new MiqtVirtualQDirModel(nameFilters_QList, static_cast(filters), static_cast(sort)); - *outptr_QDirModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQDirModel(nameFilters_QList, static_cast(filters), static_cast(sort)); } -void QDirModel_new2(QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQDirModel* ret = new MiqtVirtualQDirModel(); - *outptr_QDirModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QDirModel* QDirModel_new2() { + return new MiqtVirtualQDirModel(); } -void QDirModel_new3(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort, QObject* parent, QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { +QDirModel* QDirModel_new3(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort, QObject* parent) { QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); struct miqt_string* nameFilters_arr = static_cast(nameFilters.data); @@ -1068,17 +1062,15 @@ void QDirModel_new3(struct miqt_array /* of struct miqt_string */ nameFilters, QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - MiqtVirtualQDirModel* ret = new MiqtVirtualQDirModel(nameFilters_QList, static_cast(filters), static_cast(sort), parent); - *outptr_QDirModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQDirModel(nameFilters_QList, static_cast(filters), static_cast(sort), parent); } -void QDirModel_new4(QObject* parent, QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQDirModel* ret = new MiqtVirtualQDirModel(parent); - *outptr_QDirModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QDirModel* QDirModel_new4(QObject* parent) { + return new MiqtVirtualQDirModel(parent); +} + +void QDirModel_virtbase(QDirModel* src, QAbstractItemModel** outptr_QAbstractItemModel) { + *outptr_QAbstractItemModel = static_cast(src); } QMetaObject* QDirModel_MetaObject(const QDirModel* self) { diff --git a/qt/gen_qdirmodel.go b/qt/gen_qdirmodel.go index 71be2813..e75381d3 100644 --- a/qt/gen_qdirmodel.go +++ b/qt/gen_qdirmodel.go @@ -43,22 +43,20 @@ func (this *QDirModel) UnsafePointer() unsafe.Pointer { } // newQDirModel constructs the type using only CGO pointers. -func newQDirModel(h *C.QDirModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QDirModel { +func newQDirModel(h *C.QDirModel) *QDirModel { if h == nil { return nil } + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + C.QDirModel_virtbase(h, &outptr_QAbstractItemModel) + return &QDirModel{h: h, - QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} + QAbstractItemModel: newQAbstractItemModel(outptr_QAbstractItemModel)} } // UnsafeNewQDirModel constructs the type using only unsafe pointers. -func UnsafeNewQDirModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QDirModel { - if h == nil { - return nil - } - - return &QDirModel{h: (*C.QDirModel)(h), - QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} +func UnsafeNewQDirModel(h unsafe.Pointer) *QDirModel { + return newQDirModel((*C.QDirModel)(h)) } // NewQDirModel constructs a new QDirModel object. @@ -73,24 +71,16 @@ func NewQDirModel(nameFilters []string, filters QDir__Filter, sort QDir__SortFla nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - var outptr_QDirModel *C.QDirModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QDirModel_new(nameFilters_ma, (C.int)(filters), (C.int)(sort), &outptr_QDirModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQDirModel(outptr_QDirModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQDirModel(C.QDirModel_new(nameFilters_ma, (C.int)(filters), (C.int)(sort))) ret.isSubclass = true return ret } // NewQDirModel2 constructs a new QDirModel object. func NewQDirModel2() *QDirModel { - var outptr_QDirModel *C.QDirModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QDirModel_new2(&outptr_QDirModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQDirModel(outptr_QDirModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQDirModel(C.QDirModel_new2()) ret.isSubclass = true return ret } @@ -107,24 +97,16 @@ func NewQDirModel3(nameFilters []string, filters QDir__Filter, sort QDir__SortFl nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - var outptr_QDirModel *C.QDirModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QDirModel_new3(nameFilters_ma, (C.int)(filters), (C.int)(sort), parent.cPointer(), &outptr_QDirModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQDirModel(outptr_QDirModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQDirModel(C.QDirModel_new3(nameFilters_ma, (C.int)(filters), (C.int)(sort), parent.cPointer())) ret.isSubclass = true return ret } // NewQDirModel4 constructs a new QDirModel object. func NewQDirModel4(parent *QObject) *QDirModel { - var outptr_QDirModel *C.QDirModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QDirModel_new4(parent.cPointer(), &outptr_QDirModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQDirModel(outptr_QDirModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQDirModel(C.QDirModel_new4(parent.cPointer())) ret.isSubclass = true return ret } @@ -225,7 +207,7 @@ func (this *QDirModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QDirModel_MimeData(this.h, indexes_ma), nil) + return newQMimeData(C.QDirModel_MimeData(this.h, indexes_ma)) } func (this *QDirModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -785,7 +767,7 @@ func (this *QDirModel) callVirtualBase_MimeData(indexes []QModelIndex) *QMimeDat } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QDirModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QDirModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QDirModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -839,7 +821,7 @@ func miqt_exec_callback_QDirModel_DropMimeData(self *C.QDirModel, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -1082,7 +1064,7 @@ func miqt_exec_callback_QDirModel_CanDropMimeData(self *C.QDirModel, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt/gen_qdirmodel.h b/qt/gen_qdirmodel.h index 13914b52..145b4ddc 100644 --- a/qt/gen_qdirmodel.h +++ b/qt/gen_qdirmodel.h @@ -40,10 +40,11 @@ typedef struct QSize QSize; typedef struct QVariant QVariant; #endif -void QDirModel_new(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort, QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QDirModel_new2(QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QDirModel_new3(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort, QObject* parent, QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QDirModel_new4(QObject* parent, QDirModel** outptr_QDirModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QDirModel* QDirModel_new(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort); +QDirModel* QDirModel_new2(); +QDirModel* QDirModel_new3(struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int sort, QObject* parent); +QDirModel* QDirModel_new4(QObject* parent); +void QDirModel_virtbase(QDirModel* src, QAbstractItemModel** outptr_QAbstractItemModel); QMetaObject* QDirModel_MetaObject(const QDirModel* self); void* QDirModel_Metacast(QDirModel* self, const char* param1); struct miqt_string QDirModel_Tr(const char* s); diff --git a/qt/gen_qdockwidget.cpp b/qt/gen_qdockwidget.cpp index 2445602d..666b56b5 100644 --- a/qt/gen_qdockwidget.cpp +++ b/qt/gen_qdockwidget.cpp @@ -1025,55 +1025,35 @@ public: }; -void QDockWidget_new(QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(parent); - *outptr_QDockWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDockWidget* QDockWidget_new(QWidget* parent) { + return new MiqtVirtualQDockWidget(parent); } -void QDockWidget_new2(struct miqt_string title, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QDockWidget* QDockWidget_new2(struct miqt_string title) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(title_QString); - *outptr_QDockWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQDockWidget(title_QString); } -void QDockWidget_new3(QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(); - *outptr_QDockWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDockWidget* QDockWidget_new3() { + return new MiqtVirtualQDockWidget(); } -void QDockWidget_new4(struct miqt_string title, QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QDockWidget* QDockWidget_new4(struct miqt_string title, QWidget* parent) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(title_QString, parent); - *outptr_QDockWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQDockWidget(title_QString, parent); } -void QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QDockWidget* QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(title_QString, parent, static_cast(flags)); - *outptr_QDockWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQDockWidget(title_QString, parent, static_cast(flags)); } -void QDockWidget_new6(QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(parent, static_cast(flags)); - *outptr_QDockWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDockWidget* QDockWidget_new6(QWidget* parent, int flags) { + return new MiqtVirtualQDockWidget(parent, static_cast(flags)); +} + +void QDockWidget_virtbase(QDockWidget* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QDockWidget_MetaObject(const QDockWidget* self) { diff --git a/qt/gen_qdockwidget.go b/qt/gen_qdockwidget.go index 72e68864..b66ee52f 100644 --- a/qt/gen_qdockwidget.go +++ b/qt/gen_qdockwidget.go @@ -48,33 +48,26 @@ func (this *QDockWidget) UnsafePointer() unsafe.Pointer { } // newQDockWidget constructs the type using only CGO pointers. -func newQDockWidget(h *C.QDockWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDockWidget { +func newQDockWidget(h *C.QDockWidget) *QDockWidget { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QDockWidget_virtbase(h, &outptr_QWidget) + return &QDockWidget{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQDockWidget constructs the type using only unsafe pointers. -func UnsafeNewQDockWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDockWidget { - if h == nil { - return nil - } - - return &QDockWidget{h: (*C.QDockWidget)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQDockWidget(h unsafe.Pointer) *QDockWidget { + return newQDockWidget((*C.QDockWidget)(h)) } // NewQDockWidget constructs a new QDockWidget object. func NewQDockWidget(parent *QWidget) *QDockWidget { - var outptr_QDockWidget *C.QDockWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDockWidget_new(parent.cPointer(), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDockWidget(C.QDockWidget_new(parent.cPointer())) ret.isSubclass = true return ret } @@ -85,26 +78,16 @@ func NewQDockWidget2(title string) *QDockWidget { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QDockWidget *C.QDockWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDockWidget_new2(title_ms, &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDockWidget(C.QDockWidget_new2(title_ms)) ret.isSubclass = true return ret } // NewQDockWidget3 constructs a new QDockWidget object. func NewQDockWidget3() *QDockWidget { - var outptr_QDockWidget *C.QDockWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDockWidget_new3(&outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDockWidget(C.QDockWidget_new3()) ret.isSubclass = true return ret } @@ -115,13 +98,8 @@ func NewQDockWidget4(title string, parent *QWidget) *QDockWidget { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QDockWidget *C.QDockWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDockWidget_new4(title_ms, parent.cPointer(), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDockWidget(C.QDockWidget_new4(title_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -132,26 +110,16 @@ func NewQDockWidget5(title string, parent *QWidget, flags WindowType) *QDockWidg title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QDockWidget *C.QDockWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDockWidget_new5(title_ms, parent.cPointer(), (C.int)(flags), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDockWidget(C.QDockWidget_new5(title_ms, parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } // NewQDockWidget6 constructs a new QDockWidget object. func NewQDockWidget6(parent *QWidget, flags WindowType) *QDockWidget { - var outptr_QDockWidget *C.QDockWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDockWidget_new6(parent.cPointer(), (C.int)(flags), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDockWidget(C.QDockWidget_new6(parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -185,7 +153,7 @@ func QDockWidget_TrUtf8(s string) string { } func (this *QDockWidget) Widget() *QWidget { - return newQWidget(C.QDockWidget_Widget(this.h), nil, nil) + return newQWidget(C.QDockWidget_Widget(this.h)) } func (this *QDockWidget) SetWidget(widget *QWidget) { @@ -221,7 +189,7 @@ func (this *QDockWidget) SetTitleBarWidget(widget *QWidget) { } func (this *QDockWidget) TitleBarWidget() *QWidget { - return newQWidget(C.QDockWidget_TitleBarWidget(this.h), nil, nil) + return newQWidget(C.QDockWidget_TitleBarWidget(this.h)) } func (this *QDockWidget) IsAreaAllowed(area DockWidgetArea) bool { @@ -229,7 +197,7 @@ func (this *QDockWidget) IsAreaAllowed(area DockWidgetArea) bool { } func (this *QDockWidget) ToggleViewAction() *QAction { - return newQAction(C.QDockWidget_ToggleViewAction(this.h), nil) + return newQAction(C.QDockWidget_ToggleViewAction(this.h)) } func (this *QDockWidget) FeaturesChanged(features QDockWidget__DockWidgetFeature) { @@ -422,7 +390,7 @@ func miqt_exec_callback_QDockWidget_CloseEvent(self *C.QDockWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -448,7 +416,7 @@ func miqt_exec_callback_QDockWidget_PaintEvent(self *C.QDockWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -685,7 +653,7 @@ func miqt_exec_callback_QDockWidget_MousePressEvent(self *C.QDockWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -711,7 +679,7 @@ func miqt_exec_callback_QDockWidget_MouseReleaseEvent(self *C.QDockWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -737,7 +705,7 @@ func miqt_exec_callback_QDockWidget_MouseDoubleClickEvent(self *C.QDockWidget, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -763,7 +731,7 @@ func miqt_exec_callback_QDockWidget_MouseMoveEvent(self *C.QDockWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -789,7 +757,7 @@ func miqt_exec_callback_QDockWidget_WheelEvent(self *C.QDockWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -815,7 +783,7 @@ func miqt_exec_callback_QDockWidget_KeyPressEvent(self *C.QDockWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -841,7 +809,7 @@ func miqt_exec_callback_QDockWidget_KeyReleaseEvent(self *C.QDockWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -867,7 +835,7 @@ func miqt_exec_callback_QDockWidget_FocusInEvent(self *C.QDockWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -893,7 +861,7 @@ func miqt_exec_callback_QDockWidget_FocusOutEvent(self *C.QDockWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -971,7 +939,7 @@ func miqt_exec_callback_QDockWidget_MoveEvent(self *C.QDockWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -997,7 +965,7 @@ func miqt_exec_callback_QDockWidget_ResizeEvent(self *C.QDockWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1023,7 +991,7 @@ func miqt_exec_callback_QDockWidget_ContextMenuEvent(self *C.QDockWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1049,7 +1017,7 @@ func miqt_exec_callback_QDockWidget_TabletEvent(self *C.QDockWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1075,7 +1043,7 @@ func miqt_exec_callback_QDockWidget_ActionEvent(self *C.QDockWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1101,7 +1069,7 @@ func miqt_exec_callback_QDockWidget_DragEnterEvent(self *C.QDockWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1127,7 +1095,7 @@ func miqt_exec_callback_QDockWidget_DragMoveEvent(self *C.QDockWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1153,7 +1121,7 @@ func miqt_exec_callback_QDockWidget_DragLeaveEvent(self *C.QDockWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1179,7 +1147,7 @@ func miqt_exec_callback_QDockWidget_DropEvent(self *C.QDockWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1205,7 +1173,7 @@ func miqt_exec_callback_QDockWidget_ShowEvent(self *C.QDockWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1231,7 +1199,7 @@ func miqt_exec_callback_QDockWidget_HideEvent(self *C.QDockWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1401,7 +1369,7 @@ func miqt_exec_callback_QDockWidget_InputMethodEvent(self *C.QDockWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QDockWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qdockwidget.h b/qt/gen_qdockwidget.h index ab216385..bbffb66e 100644 --- a/qt/gen_qdockwidget.h +++ b/qt/gen_qdockwidget.h @@ -78,12 +78,13 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QDockWidget_new(QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDockWidget_new2(struct miqt_string title, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDockWidget_new3(QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDockWidget_new4(struct miqt_string title, QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDockWidget_new6(QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QDockWidget* QDockWidget_new(QWidget* parent); +QDockWidget* QDockWidget_new2(struct miqt_string title); +QDockWidget* QDockWidget_new3(); +QDockWidget* QDockWidget_new4(struct miqt_string title, QWidget* parent); +QDockWidget* QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags); +QDockWidget* QDockWidget_new6(QWidget* parent, int flags); +void QDockWidget_virtbase(QDockWidget* src, QWidget** outptr_QWidget); QMetaObject* QDockWidget_MetaObject(const QDockWidget* self); void* QDockWidget_Metacast(QDockWidget* self, const char* param1); struct miqt_string QDockWidget_Tr(const char* s); diff --git a/qt/gen_qdrag.cpp b/qt/gen_qdrag.cpp index e669b376..6ed7ca99 100644 --- a/qt/gen_qdrag.cpp +++ b/qt/gen_qdrag.cpp @@ -195,10 +195,12 @@ public: }; -void QDrag_new(QObject* dragSource, QDrag** outptr_QDrag, QObject** outptr_QObject) { - MiqtVirtualQDrag* ret = new MiqtVirtualQDrag(dragSource); - *outptr_QDrag = ret; - *outptr_QObject = static_cast(ret); +QDrag* QDrag_new(QObject* dragSource) { + return new MiqtVirtualQDrag(dragSource); +} + +void QDrag_virtbase(QDrag* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QDrag_MetaObject(const QDrag* self) { diff --git a/qt/gen_qdrag.go b/qt/gen_qdrag.go index 0e0a9646..1006798b 100644 --- a/qt/gen_qdrag.go +++ b/qt/gen_qdrag.go @@ -35,31 +35,26 @@ func (this *QDrag) UnsafePointer() unsafe.Pointer { } // newQDrag constructs the type using only CGO pointers. -func newQDrag(h *C.QDrag, h_QObject *C.QObject) *QDrag { +func newQDrag(h *C.QDrag) *QDrag { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QDrag_virtbase(h, &outptr_QObject) + return &QDrag{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQDrag constructs the type using only unsafe pointers. -func UnsafeNewQDrag(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDrag { - if h == nil { - return nil - } - - return &QDrag{h: (*C.QDrag)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQDrag(h unsafe.Pointer) *QDrag { + return newQDrag((*C.QDrag)(h)) } // NewQDrag constructs a new QDrag object. func NewQDrag(dragSource *QObject) *QDrag { - var outptr_QDrag *C.QDrag = nil - var outptr_QObject *C.QObject = nil - C.QDrag_new(dragSource.cPointer(), &outptr_QDrag, &outptr_QObject) - ret := newQDrag(outptr_QDrag, outptr_QObject) + ret := newQDrag(C.QDrag_new(dragSource.cPointer())) ret.isSubclass = true return ret } @@ -97,7 +92,7 @@ func (this *QDrag) SetMimeData(data *QMimeData) { } func (this *QDrag) MimeData() *QMimeData { - return newQMimeData(C.QDrag_MimeData(this.h), nil) + return newQMimeData(C.QDrag_MimeData(this.h)) } func (this *QDrag) SetPixmap(pixmap *QPixmap) { @@ -105,7 +100,7 @@ func (this *QDrag) SetPixmap(pixmap *QPixmap) { } func (this *QDrag) Pixmap() *QPixmap { - _goptr := newQPixmap(C.QDrag_Pixmap(this.h), nil) + _goptr := newQPixmap(C.QDrag_Pixmap(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -145,7 +140,7 @@ func (this *QDrag) SetDragCursor(cursor *QPixmap, action DropAction) { } func (this *QDrag) DragCursor(action DropAction) *QPixmap { - _goptr := newQPixmap(C.QDrag_DragCursor(this.h, (C.int)(action)), nil) + _goptr := newQPixmap(C.QDrag_DragCursor(this.h, (C.int)(action))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -332,7 +327,7 @@ func miqt_exec_callback_QDrag_TimerEvent(self *C.QDrag, cb C.intptr_t, event *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QDrag{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -358,7 +353,7 @@ func miqt_exec_callback_QDrag_ChildEvent(self *C.QDrag, cb C.intptr_t, event *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QDrag{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qdrag.h b/qt/gen_qdrag.h index b9890f3d..00790f0b 100644 --- a/qt/gen_qdrag.h +++ b/qt/gen_qdrag.h @@ -38,7 +38,8 @@ typedef struct QPoint QPoint; typedef struct QTimerEvent QTimerEvent; #endif -void QDrag_new(QObject* dragSource, QDrag** outptr_QDrag, QObject** outptr_QObject); +QDrag* QDrag_new(QObject* dragSource); +void QDrag_virtbase(QDrag* src, QObject** outptr_QObject); QMetaObject* QDrag_MetaObject(const QDrag* self); void* QDrag_Metacast(QDrag* self, const char* param1); struct miqt_string QDrag_Tr(const char* s); diff --git a/qt/gen_qdrawutil.cpp b/qt/gen_qdrawutil.cpp index c07d5fb8..ea9074ea 100644 --- a/qt/gen_qdrawutil.cpp +++ b/qt/gen_qdrawutil.cpp @@ -3,24 +3,20 @@ #include "gen_qdrawutil.h" #include "_cgo_export.h" -void QTileRules_new(int horizontalRule, int verticalRule, QTileRules** outptr_QTileRules) { - QTileRules* ret = new QTileRules(static_cast(horizontalRule), static_cast(verticalRule)); - *outptr_QTileRules = ret; +QTileRules* QTileRules_new(int horizontalRule, int verticalRule) { + return new QTileRules(static_cast(horizontalRule), static_cast(verticalRule)); } -void QTileRules_new2(QTileRules** outptr_QTileRules) { - QTileRules* ret = new QTileRules(); - *outptr_QTileRules = ret; +QTileRules* QTileRules_new2() { + return new QTileRules(); } -void QTileRules_new3(QTileRules* param1, QTileRules** outptr_QTileRules) { - QTileRules* ret = new QTileRules(*param1); - *outptr_QTileRules = ret; +QTileRules* QTileRules_new3(QTileRules* param1) { + return new QTileRules(*param1); } -void QTileRules_new4(int rule, QTileRules** outptr_QTileRules) { - QTileRules* ret = new QTileRules(static_cast(rule)); - *outptr_QTileRules = ret; +QTileRules* QTileRules_new4(int rule) { + return new QTileRules(static_cast(rule)); } void QTileRules_Delete(QTileRules* self, bool isSubclass) { diff --git a/qt/gen_qdrawutil.go b/qt/gen_qdrawutil.go index 1e7c8c57..32370e07 100644 --- a/qt/gen_qdrawutil.go +++ b/qt/gen_qdrawutil.go @@ -55,54 +55,43 @@ func newQTileRules(h *C.QTileRules) *QTileRules { if h == nil { return nil } + return &QTileRules{h: h} } // UnsafeNewQTileRules constructs the type using only unsafe pointers. func UnsafeNewQTileRules(h unsafe.Pointer) *QTileRules { - if h == nil { - return nil - } - - return &QTileRules{h: (*C.QTileRules)(h)} + return newQTileRules((*C.QTileRules)(h)) } // NewQTileRules constructs a new QTileRules object. func NewQTileRules(horizontalRule TileRule, verticalRule TileRule) *QTileRules { - var outptr_QTileRules *C.QTileRules = nil - C.QTileRules_new((C.int)(horizontalRule), (C.int)(verticalRule), &outptr_QTileRules) - ret := newQTileRules(outptr_QTileRules) + ret := newQTileRules(C.QTileRules_new((C.int)(horizontalRule), (C.int)(verticalRule))) ret.isSubclass = true return ret } // NewQTileRules2 constructs a new QTileRules object. func NewQTileRules2() *QTileRules { - var outptr_QTileRules *C.QTileRules = nil - C.QTileRules_new2(&outptr_QTileRules) - ret := newQTileRules(outptr_QTileRules) + ret := newQTileRules(C.QTileRules_new2()) ret.isSubclass = true return ret } // NewQTileRules3 constructs a new QTileRules object. func NewQTileRules3(param1 *QTileRules) *QTileRules { - var outptr_QTileRules *C.QTileRules = nil - C.QTileRules_new3(param1.cPointer(), &outptr_QTileRules) - ret := newQTileRules(outptr_QTileRules) + ret := newQTileRules(C.QTileRules_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQTileRules4 constructs a new QTileRules object. func NewQTileRules4(rule TileRule) *QTileRules { - var outptr_QTileRules *C.QTileRules = nil - C.QTileRules_new4((C.int)(rule), &outptr_QTileRules) - ret := newQTileRules(outptr_QTileRules) + ret := newQTileRules(C.QTileRules_new4((C.int)(rule))) ret.isSubclass = true return ret } diff --git a/qt/gen_qdrawutil.h b/qt/gen_qdrawutil.h index 7c4931e6..4e1bd98c 100644 --- a/qt/gen_qdrawutil.h +++ b/qt/gen_qdrawutil.h @@ -20,10 +20,10 @@ class QTileRules; typedef struct QTileRules QTileRules; #endif -void QTileRules_new(int horizontalRule, int verticalRule, QTileRules** outptr_QTileRules); -void QTileRules_new2(QTileRules** outptr_QTileRules); -void QTileRules_new3(QTileRules* param1, QTileRules** outptr_QTileRules); -void QTileRules_new4(int rule, QTileRules** outptr_QTileRules); +QTileRules* QTileRules_new(int horizontalRule, int verticalRule); +QTileRules* QTileRules_new2(); +QTileRules* QTileRules_new3(QTileRules* param1); +QTileRules* QTileRules_new4(int rule); void QTileRules_Delete(QTileRules* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qeasingcurve.cpp b/qt/gen_qeasingcurve.cpp index 65a7a655..b9624447 100644 --- a/qt/gen_qeasingcurve.cpp +++ b/qt/gen_qeasingcurve.cpp @@ -5,19 +5,16 @@ #include "gen_qeasingcurve.h" #include "_cgo_export.h" -void QEasingCurve_new(QEasingCurve** outptr_QEasingCurve) { - QEasingCurve* ret = new QEasingCurve(); - *outptr_QEasingCurve = ret; +QEasingCurve* QEasingCurve_new() { + return new QEasingCurve(); } -void QEasingCurve_new2(QEasingCurve* other, QEasingCurve** outptr_QEasingCurve) { - QEasingCurve* ret = new QEasingCurve(*other); - *outptr_QEasingCurve = ret; +QEasingCurve* QEasingCurve_new2(QEasingCurve* other) { + return new QEasingCurve(*other); } -void QEasingCurve_new3(int typeVal, QEasingCurve** outptr_QEasingCurve) { - QEasingCurve* ret = new QEasingCurve(static_cast(typeVal)); - *outptr_QEasingCurve = ret; +QEasingCurve* QEasingCurve_new3(int typeVal) { + return new QEasingCurve(static_cast(typeVal)); } void QEasingCurve_OperatorAssign(QEasingCurve* self, QEasingCurve* other) { diff --git a/qt/gen_qeasingcurve.go b/qt/gen_qeasingcurve.go index 7d046bd3..eff607f9 100644 --- a/qt/gen_qeasingcurve.go +++ b/qt/gen_qeasingcurve.go @@ -91,44 +91,35 @@ func newQEasingCurve(h *C.QEasingCurve) *QEasingCurve { if h == nil { return nil } + return &QEasingCurve{h: h} } // UnsafeNewQEasingCurve constructs the type using only unsafe pointers. func UnsafeNewQEasingCurve(h unsafe.Pointer) *QEasingCurve { - if h == nil { - return nil - } - - return &QEasingCurve{h: (*C.QEasingCurve)(h)} + return newQEasingCurve((*C.QEasingCurve)(h)) } // NewQEasingCurve constructs a new QEasingCurve object. func NewQEasingCurve() *QEasingCurve { - var outptr_QEasingCurve *C.QEasingCurve = nil - C.QEasingCurve_new(&outptr_QEasingCurve) - ret := newQEasingCurve(outptr_QEasingCurve) + ret := newQEasingCurve(C.QEasingCurve_new()) ret.isSubclass = true return ret } // NewQEasingCurve2 constructs a new QEasingCurve object. func NewQEasingCurve2(other *QEasingCurve) *QEasingCurve { - var outptr_QEasingCurve *C.QEasingCurve = nil - C.QEasingCurve_new2(other.cPointer(), &outptr_QEasingCurve) - ret := newQEasingCurve(outptr_QEasingCurve) + ret := newQEasingCurve(C.QEasingCurve_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQEasingCurve3 constructs a new QEasingCurve object. func NewQEasingCurve3(typeVal QEasingCurve__Type) *QEasingCurve { - var outptr_QEasingCurve *C.QEasingCurve = nil - C.QEasingCurve_new3((C.int)(typeVal), &outptr_QEasingCurve) - ret := newQEasingCurve(outptr_QEasingCurve) + ret := newQEasingCurve(C.QEasingCurve_new3((C.int)(typeVal))) ret.isSubclass = true return ret } diff --git a/qt/gen_qeasingcurve.h b/qt/gen_qeasingcurve.h index 590176c3..822c383c 100644 --- a/qt/gen_qeasingcurve.h +++ b/qt/gen_qeasingcurve.h @@ -22,9 +22,9 @@ typedef struct QEasingCurve QEasingCurve; typedef struct QPointF QPointF; #endif -void QEasingCurve_new(QEasingCurve** outptr_QEasingCurve); -void QEasingCurve_new2(QEasingCurve* other, QEasingCurve** outptr_QEasingCurve); -void QEasingCurve_new3(int typeVal, QEasingCurve** outptr_QEasingCurve); +QEasingCurve* QEasingCurve_new(); +QEasingCurve* QEasingCurve_new2(QEasingCurve* other); +QEasingCurve* QEasingCurve_new3(int typeVal); void QEasingCurve_OperatorAssign(QEasingCurve* self, QEasingCurve* other); void QEasingCurve_Swap(QEasingCurve* self, QEasingCurve* other); bool QEasingCurve_OperatorEqual(const QEasingCurve* self, QEasingCurve* other); diff --git a/qt/gen_qelapsedtimer.cpp b/qt/gen_qelapsedtimer.cpp index d78f613a..1a579feb 100644 --- a/qt/gen_qelapsedtimer.cpp +++ b/qt/gen_qelapsedtimer.cpp @@ -3,9 +3,8 @@ #include "gen_qelapsedtimer.h" #include "_cgo_export.h" -void QElapsedTimer_new(QElapsedTimer** outptr_QElapsedTimer) { - QElapsedTimer* ret = new QElapsedTimer(); - *outptr_QElapsedTimer = ret; +QElapsedTimer* QElapsedTimer_new() { + return new QElapsedTimer(); } int QElapsedTimer_ClockType() { diff --git a/qt/gen_qelapsedtimer.go b/qt/gen_qelapsedtimer.go index ceb5cddd..60827d22 100644 --- a/qt/gen_qelapsedtimer.go +++ b/qt/gen_qelapsedtimer.go @@ -47,24 +47,19 @@ func newQElapsedTimer(h *C.QElapsedTimer) *QElapsedTimer { if h == nil { return nil } + return &QElapsedTimer{h: h} } // UnsafeNewQElapsedTimer constructs the type using only unsafe pointers. func UnsafeNewQElapsedTimer(h unsafe.Pointer) *QElapsedTimer { - if h == nil { - return nil - } - - return &QElapsedTimer{h: (*C.QElapsedTimer)(h)} + return newQElapsedTimer((*C.QElapsedTimer)(h)) } // NewQElapsedTimer constructs a new QElapsedTimer object. func NewQElapsedTimer() *QElapsedTimer { - var outptr_QElapsedTimer *C.QElapsedTimer = nil - C.QElapsedTimer_new(&outptr_QElapsedTimer) - ret := newQElapsedTimer(outptr_QElapsedTimer) + ret := newQElapsedTimer(C.QElapsedTimer_new()) ret.isSubclass = true return ret } diff --git a/qt/gen_qelapsedtimer.h b/qt/gen_qelapsedtimer.h index 57cd98a1..3300b006 100644 --- a/qt/gen_qelapsedtimer.h +++ b/qt/gen_qelapsedtimer.h @@ -20,7 +20,7 @@ class QElapsedTimer; typedef struct QElapsedTimer QElapsedTimer; #endif -void QElapsedTimer_new(QElapsedTimer** outptr_QElapsedTimer); +QElapsedTimer* QElapsedTimer_new(); int QElapsedTimer_ClockType(); bool QElapsedTimer_IsMonotonic(); void QElapsedTimer_Start(QElapsedTimer* self); diff --git a/qt/gen_qerrormessage.cpp b/qt/gen_qerrormessage.cpp index 9003b6de..94030f77 100644 --- a/qt/gen_qerrormessage.cpp +++ b/qt/gen_qerrormessage.cpp @@ -379,22 +379,16 @@ public: }; -void QErrorMessage_new(QWidget* parent, QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQErrorMessage* ret = new MiqtVirtualQErrorMessage(parent); - *outptr_QErrorMessage = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QErrorMessage* QErrorMessage_new(QWidget* parent) { + return new MiqtVirtualQErrorMessage(parent); } -void QErrorMessage_new2(QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQErrorMessage* ret = new MiqtVirtualQErrorMessage(); - *outptr_QErrorMessage = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QErrorMessage* QErrorMessage_new2() { + return new MiqtVirtualQErrorMessage(); +} + +void QErrorMessage_virtbase(QErrorMessage* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QErrorMessage_MetaObject(const QErrorMessage* self) { diff --git a/qt/gen_qerrormessage.go b/qt/gen_qerrormessage.go index 7324fab6..7939f31c 100644 --- a/qt/gen_qerrormessage.go +++ b/qt/gen_qerrormessage.go @@ -35,48 +35,34 @@ func (this *QErrorMessage) UnsafePointer() unsafe.Pointer { } // newQErrorMessage constructs the type using only CGO pointers. -func newQErrorMessage(h *C.QErrorMessage, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QErrorMessage { +func newQErrorMessage(h *C.QErrorMessage) *QErrorMessage { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QErrorMessage_virtbase(h, &outptr_QDialog) + return &QErrorMessage{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQErrorMessage constructs the type using only unsafe pointers. -func UnsafeNewQErrorMessage(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QErrorMessage { - if h == nil { - return nil - } - - return &QErrorMessage{h: (*C.QErrorMessage)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQErrorMessage(h unsafe.Pointer) *QErrorMessage { + return newQErrorMessage((*C.QErrorMessage)(h)) } // NewQErrorMessage constructs a new QErrorMessage object. func NewQErrorMessage(parent *QWidget) *QErrorMessage { - var outptr_QErrorMessage *C.QErrorMessage = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QErrorMessage_new(parent.cPointer(), &outptr_QErrorMessage, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQErrorMessage(outptr_QErrorMessage, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQErrorMessage(C.QErrorMessage_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQErrorMessage2 constructs a new QErrorMessage object. func NewQErrorMessage2() *QErrorMessage { - var outptr_QErrorMessage *C.QErrorMessage = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QErrorMessage_new2(&outptr_QErrorMessage, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQErrorMessage(outptr_QErrorMessage, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQErrorMessage(C.QErrorMessage_new2()) ret.isSubclass = true return ret } @@ -110,7 +96,7 @@ func QErrorMessage_TrUtf8(s string) string { } func QErrorMessage_QtHandler() *QErrorMessage { - return newQErrorMessage(C.QErrorMessage_QtHandler(), nil, nil, nil, nil) + return newQErrorMessage(C.QErrorMessage_QtHandler()) } func (this *QErrorMessage) ShowMessage(message string) { @@ -423,7 +409,7 @@ func miqt_exec_callback_QErrorMessage_KeyPressEvent(self *C.QErrorMessage, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QErrorMessage{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -449,7 +435,7 @@ func miqt_exec_callback_QErrorMessage_CloseEvent(self *C.QErrorMessage, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(param1, nil) + slotval1 := newQCloseEvent(param1) gofunc((&QErrorMessage{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -475,7 +461,7 @@ func miqt_exec_callback_QErrorMessage_ShowEvent(self *C.QErrorMessage, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QErrorMessage{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -501,7 +487,7 @@ func miqt_exec_callback_QErrorMessage_ResizeEvent(self *C.QErrorMessage, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QErrorMessage{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -527,7 +513,7 @@ func miqt_exec_callback_QErrorMessage_ContextMenuEvent(self *C.QErrorMessage, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QErrorMessage{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt/gen_qerrormessage.h b/qt/gen_qerrormessage.h index dec76dc7..28c6db8e 100644 --- a/qt/gen_qerrormessage.h +++ b/qt/gen_qerrormessage.h @@ -44,8 +44,9 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QErrorMessage_new(QWidget* parent, QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QErrorMessage_new2(QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QErrorMessage* QErrorMessage_new(QWidget* parent); +QErrorMessage* QErrorMessage_new2(); +void QErrorMessage_virtbase(QErrorMessage* src, QDialog** outptr_QDialog); QMetaObject* QErrorMessage_MetaObject(const QErrorMessage* self); void* QErrorMessage_Metacast(QErrorMessage* self, const char* param1); struct miqt_string QErrorMessage_Tr(const char* s); diff --git a/qt/gen_qevent.cpp b/qt/gen_qevent.cpp index 65b4aeb1..da1cb0d9 100644 --- a/qt/gen_qevent.cpp +++ b/qt/gen_qevent.cpp @@ -65,22 +65,20 @@ #include "gen_qevent.h" #include "_cgo_export.h" -void QInputEvent_new(int typeVal, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QInputEvent* ret = new QInputEvent(static_cast(typeVal)); - *outptr_QInputEvent = ret; - *outptr_QEvent = static_cast(ret); +QInputEvent* QInputEvent_new(int typeVal) { + return new QInputEvent(static_cast(typeVal)); } -void QInputEvent_new2(QInputEvent* param1, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QInputEvent* ret = new QInputEvent(*param1); - *outptr_QInputEvent = ret; - *outptr_QEvent = static_cast(ret); +QInputEvent* QInputEvent_new2(QInputEvent* param1) { + return new QInputEvent(*param1); } -void QInputEvent_new3(int typeVal, int modifiers, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QInputEvent* ret = new QInputEvent(static_cast(typeVal), static_cast(modifiers)); - *outptr_QInputEvent = ret; - *outptr_QEvent = static_cast(ret); +QInputEvent* QInputEvent_new3(int typeVal, int modifiers) { + return new QInputEvent(static_cast(typeVal), static_cast(modifiers)); +} + +void QInputEvent_virtbase(QInputEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } int QInputEvent_Modifiers(const QInputEvent* self) { @@ -109,16 +107,16 @@ void QInputEvent_Delete(QInputEvent* self, bool isSubclass) { } } -void QEnterEvent_new(QPointF* localPos, QPointF* windowPos, QPointF* screenPos, QEnterEvent** outptr_QEnterEvent, QEvent** outptr_QEvent) { - QEnterEvent* ret = new QEnterEvent(*localPos, *windowPos, *screenPos); - *outptr_QEnterEvent = ret; - *outptr_QEvent = static_cast(ret); +QEnterEvent* QEnterEvent_new(QPointF* localPos, QPointF* windowPos, QPointF* screenPos) { + return new QEnterEvent(*localPos, *windowPos, *screenPos); } -void QEnterEvent_new2(QEnterEvent* param1, QEnterEvent** outptr_QEnterEvent, QEvent** outptr_QEvent) { - QEnterEvent* ret = new QEnterEvent(*param1); - *outptr_QEnterEvent = ret; - *outptr_QEvent = static_cast(ret); +QEnterEvent* QEnterEvent_new2(QEnterEvent* param1) { + return new QEnterEvent(*param1); +} + +void QEnterEvent_virtbase(QEnterEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QPoint* QEnterEvent_Pos(const QEnterEvent* self) { @@ -171,39 +169,28 @@ void QEnterEvent_Delete(QEnterEvent* self, bool isSubclass) { } } -void QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QMouseEvent* ret = new QMouseEvent(static_cast(typeVal), *localPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); - *outptr_QMouseEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QMouseEvent* QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers) { + return new QMouseEvent(static_cast(typeVal), *localPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); } -void QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* screenPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QMouseEvent* ret = new QMouseEvent(static_cast(typeVal), *localPos, *screenPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); - *outptr_QMouseEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QMouseEvent* QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* screenPos, int button, int buttons, int modifiers) { + return new QMouseEvent(static_cast(typeVal), *localPos, *screenPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); } -void QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QMouseEvent* ret = new QMouseEvent(static_cast(typeVal), *localPos, *windowPos, *screenPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); - *outptr_QMouseEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QMouseEvent* QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers) { + return new QMouseEvent(static_cast(typeVal), *localPos, *windowPos, *screenPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); } -void QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers, int source, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QMouseEvent* ret = new QMouseEvent(static_cast(typeVal), *localPos, *windowPos, *screenPos, static_cast(button), static_cast(buttons), static_cast(modifiers), static_cast(source)); - *outptr_QMouseEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QMouseEvent* QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers, int source) { + return new QMouseEvent(static_cast(typeVal), *localPos, *windowPos, *screenPos, static_cast(button), static_cast(buttons), static_cast(modifiers), static_cast(source)); } -void QMouseEvent_new5(QMouseEvent* param1, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QMouseEvent* ret = new QMouseEvent(*param1); - *outptr_QMouseEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QMouseEvent* QMouseEvent_new5(QMouseEvent* param1) { + return new QMouseEvent(*param1); +} + +void QMouseEvent_virtbase(QMouseEvent* src, QInputEvent** outptr_QInputEvent) { + *outptr_QInputEvent = static_cast(src); } QPoint* QMouseEvent_Pos(const QMouseEvent* self) { @@ -280,25 +267,20 @@ void QMouseEvent_Delete(QMouseEvent* self, bool isSubclass) { } } -void QHoverEvent_new(int typeVal, QPointF* pos, QPointF* oldPos, QHoverEvent** outptr_QHoverEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QHoverEvent* ret = new QHoverEvent(static_cast(typeVal), *pos, *oldPos); - *outptr_QHoverEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QHoverEvent* QHoverEvent_new(int typeVal, QPointF* pos, QPointF* oldPos) { + return new QHoverEvent(static_cast(typeVal), *pos, *oldPos); } -void QHoverEvent_new2(QHoverEvent* param1, QHoverEvent** outptr_QHoverEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QHoverEvent* ret = new QHoverEvent(*param1); - *outptr_QHoverEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QHoverEvent* QHoverEvent_new2(QHoverEvent* param1) { + return new QHoverEvent(*param1); } -void QHoverEvent_new3(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QHoverEvent** outptr_QHoverEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QHoverEvent* ret = new QHoverEvent(static_cast(typeVal), *pos, *oldPos, static_cast(modifiers)); - *outptr_QHoverEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QHoverEvent* QHoverEvent_new3(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers) { + return new QHoverEvent(static_cast(typeVal), *pos, *oldPos, static_cast(modifiers)); +} + +void QHoverEvent_virtbase(QHoverEvent* src, QInputEvent** outptr_QInputEvent) { + *outptr_QInputEvent = static_cast(src); } QPoint* QHoverEvent_Pos(const QHoverEvent* self) { @@ -329,81 +311,52 @@ void QHoverEvent_Delete(QHoverEvent* self, bool isSubclass) { } } -void QWheelEvent_new(QPointF* pos, int delta, int buttons, int modifiers, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QWheelEvent* ret = new QWheelEvent(*pos, static_cast(delta), static_cast(buttons), static_cast(modifiers)); - *outptr_QWheelEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QWheelEvent* QWheelEvent_new(QPointF* pos, int delta, int buttons, int modifiers) { + return new QWheelEvent(*pos, static_cast(delta), static_cast(buttons), static_cast(modifiers)); } -void QWheelEvent_new2(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, static_cast(delta), static_cast(buttons), static_cast(modifiers)); - *outptr_QWheelEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QWheelEvent* QWheelEvent_new2(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers) { + return new QWheelEvent(*pos, *globalPos, static_cast(delta), static_cast(buttons), static_cast(modifiers)); } -void QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers)); - *outptr_QWheelEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QWheelEvent* QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers) { + return new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers)); } -void QWheelEvent_new4(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers), static_cast(phase)); - *outptr_QWheelEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QWheelEvent* QWheelEvent_new4(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase) { + return new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers), static_cast(phase)); } -void QWheelEvent_new5(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers), static_cast(phase), static_cast(source)); - *outptr_QWheelEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QWheelEvent* QWheelEvent_new5(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source) { + return new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers), static_cast(phase), static_cast(source)); } -void QWheelEvent_new6(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source, bool inverted, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers), static_cast(phase), static_cast(source), inverted); - *outptr_QWheelEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QWheelEvent* QWheelEvent_new6(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source, bool inverted) { + return new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(qt4Delta), static_cast(qt4Orientation), static_cast(buttons), static_cast(modifiers), static_cast(phase), static_cast(source), inverted); } -void QWheelEvent_new7(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted); - *outptr_QWheelEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QWheelEvent* QWheelEvent_new7(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted) { + return new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted); } -void QWheelEvent_new8(QWheelEvent* param1, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QWheelEvent* ret = new QWheelEvent(*param1); - *outptr_QWheelEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QWheelEvent* QWheelEvent_new8(QWheelEvent* param1) { + return new QWheelEvent(*param1); } -void QWheelEvent_new9(QPointF* pos, int delta, int buttons, int modifiers, int orient, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QWheelEvent* ret = new QWheelEvent(*pos, static_cast(delta), static_cast(buttons), static_cast(modifiers), static_cast(orient)); - *outptr_QWheelEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QWheelEvent* QWheelEvent_new9(QPointF* pos, int delta, int buttons, int modifiers, int orient) { + return new QWheelEvent(*pos, static_cast(delta), static_cast(buttons), static_cast(modifiers), static_cast(orient)); } -void QWheelEvent_new10(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers, int orient, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, static_cast(delta), static_cast(buttons), static_cast(modifiers), static_cast(orient)); - *outptr_QWheelEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QWheelEvent* QWheelEvent_new10(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers, int orient) { + return new QWheelEvent(*pos, *globalPos, static_cast(delta), static_cast(buttons), static_cast(modifiers), static_cast(orient)); } -void QWheelEvent_new11(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QWheelEvent* ret = new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted, static_cast(source)); - *outptr_QWheelEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QWheelEvent* QWheelEvent_new11(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source) { + return new QWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted, static_cast(source)); +} + +void QWheelEvent_virtbase(QWheelEvent* src, QInputEvent** outptr_QInputEvent) { + *outptr_QInputEvent = static_cast(src); } QPoint* QWheelEvent_PixelDelta(const QWheelEvent* self) { @@ -494,25 +447,20 @@ void QWheelEvent_Delete(QWheelEvent* self, bool isSubclass) { } } -void QTabletEvent_new(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID, QTabletEvent** outptr_QTabletEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QTabletEvent* ret = new QTabletEvent(static_cast(t), *pos, *globalPos, static_cast(device), static_cast(pointerType), static_cast(pressure), static_cast(xTilt), static_cast(yTilt), static_cast(tangentialPressure), static_cast(rotation), static_cast(z), static_cast(keyState), static_cast(uniqueID)); - *outptr_QTabletEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QTabletEvent* QTabletEvent_new(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID) { + return new QTabletEvent(static_cast(t), *pos, *globalPos, static_cast(device), static_cast(pointerType), static_cast(pressure), static_cast(xTilt), static_cast(yTilt), static_cast(tangentialPressure), static_cast(rotation), static_cast(z), static_cast(keyState), static_cast(uniqueID)); } -void QTabletEvent_new2(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID, int button, int buttons, QTabletEvent** outptr_QTabletEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QTabletEvent* ret = new QTabletEvent(static_cast(t), *pos, *globalPos, static_cast(device), static_cast(pointerType), static_cast(pressure), static_cast(xTilt), static_cast(yTilt), static_cast(tangentialPressure), static_cast(rotation), static_cast(z), static_cast(keyState), static_cast(uniqueID), static_cast(button), static_cast(buttons)); - *outptr_QTabletEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QTabletEvent* QTabletEvent_new2(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID, int button, int buttons) { + return new QTabletEvent(static_cast(t), *pos, *globalPos, static_cast(device), static_cast(pointerType), static_cast(pressure), static_cast(xTilt), static_cast(yTilt), static_cast(tangentialPressure), static_cast(rotation), static_cast(z), static_cast(keyState), static_cast(uniqueID), static_cast(button), static_cast(buttons)); } -void QTabletEvent_new3(QTabletEvent* param1, QTabletEvent** outptr_QTabletEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QTabletEvent* ret = new QTabletEvent(*param1); - *outptr_QTabletEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QTabletEvent* QTabletEvent_new3(QTabletEvent* param1) { + return new QTabletEvent(*param1); +} + +void QTabletEvent_virtbase(QTabletEvent* src, QInputEvent** outptr_QInputEvent) { + *outptr_QInputEvent = static_cast(src); } QPoint* QTabletEvent_Pos(const QTabletEvent* self) { @@ -626,25 +574,20 @@ void QTabletEvent_Delete(QTabletEvent* self, bool isSubclass) { } } -void QNativeGestureEvent_new(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument, QNativeGestureEvent** outptr_QNativeGestureEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QNativeGestureEvent* ret = new QNativeGestureEvent(static_cast(typeVal), *localPos, *windowPos, *screenPos, static_cast(value), static_cast(sequenceId), static_cast(intArgument)); - *outptr_QNativeGestureEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QNativeGestureEvent* QNativeGestureEvent_new(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument) { + return new QNativeGestureEvent(static_cast(typeVal), *localPos, *windowPos, *screenPos, static_cast(value), static_cast(sequenceId), static_cast(intArgument)); } -void QNativeGestureEvent_new2(int typeVal, QTouchDevice* dev, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument, QNativeGestureEvent** outptr_QNativeGestureEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QNativeGestureEvent* ret = new QNativeGestureEvent(static_cast(typeVal), dev, *localPos, *windowPos, *screenPos, static_cast(value), static_cast(sequenceId), static_cast(intArgument)); - *outptr_QNativeGestureEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QNativeGestureEvent* QNativeGestureEvent_new2(int typeVal, QTouchDevice* dev, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument) { + return new QNativeGestureEvent(static_cast(typeVal), dev, *localPos, *windowPos, *screenPos, static_cast(value), static_cast(sequenceId), static_cast(intArgument)); } -void QNativeGestureEvent_new3(QNativeGestureEvent* param1, QNativeGestureEvent** outptr_QNativeGestureEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QNativeGestureEvent* ret = new QNativeGestureEvent(*param1); - *outptr_QNativeGestureEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QNativeGestureEvent* QNativeGestureEvent_new3(QNativeGestureEvent* param1) { + return new QNativeGestureEvent(*param1); +} + +void QNativeGestureEvent_virtbase(QNativeGestureEvent* src, QInputEvent** outptr_QInputEvent) { + *outptr_QInputEvent = static_cast(src); } int QNativeGestureEvent_GestureType(const QNativeGestureEvent* self) { @@ -695,73 +638,50 @@ void QNativeGestureEvent_Delete(QNativeGestureEvent* self, bool isSubclass) { } } -void QKeyEvent_new(int typeVal, int key, int modifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers)); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QKeyEvent* QKeyEvent_new(int typeVal, int key, int modifiers) { + return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers)); } -void QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers)); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QKeyEvent* QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers) { + return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers)); } -void QKeyEvent_new3(QKeyEvent* param1, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QKeyEvent* ret = new QKeyEvent(*param1); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QKeyEvent* QKeyEvent_new3(QKeyEvent* param1) { + return new QKeyEvent(*param1); } -void QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QKeyEvent* QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString); } -void QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QKeyEvent* QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep) { QString text_QString = QString::fromUtf8(text.data, text.len); - QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep); } -void QKeyEvent_new6(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QKeyEvent* QKeyEvent_new6(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count) { QString text_QString = QString::fromUtf8(text.data, text.len); - QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep, static_cast(count)); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep, static_cast(count)); } -void QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QKeyEvent* QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString); } -void QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QKeyEvent* QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep) { QString text_QString = QString::fromUtf8(text.data, text.len); - QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep); } -void QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QKeyEvent* QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count) { QString text_QString = QString::fromUtf8(text.data, text.len); - QKeyEvent* ret = new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep, static_cast(count)); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new QKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep, static_cast(count)); +} + +void QKeyEvent_virtbase(QKeyEvent* src, QInputEvent** outptr_QInputEvent) { + *outptr_QInputEvent = static_cast(src); } int QKeyEvent_Key(const QKeyEvent* self) { @@ -819,22 +739,20 @@ void QKeyEvent_Delete(QKeyEvent* self, bool isSubclass) { } } -void QFocusEvent_new(int typeVal, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent) { - QFocusEvent* ret = new QFocusEvent(static_cast(typeVal)); - *outptr_QFocusEvent = ret; - *outptr_QEvent = static_cast(ret); +QFocusEvent* QFocusEvent_new(int typeVal) { + return new QFocusEvent(static_cast(typeVal)); } -void QFocusEvent_new2(QFocusEvent* param1, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent) { - QFocusEvent* ret = new QFocusEvent(*param1); - *outptr_QFocusEvent = ret; - *outptr_QEvent = static_cast(ret); +QFocusEvent* QFocusEvent_new2(QFocusEvent* param1) { + return new QFocusEvent(*param1); } -void QFocusEvent_new3(int typeVal, int reason, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent) { - QFocusEvent* ret = new QFocusEvent(static_cast(typeVal), static_cast(reason)); - *outptr_QFocusEvent = ret; - *outptr_QEvent = static_cast(ret); +QFocusEvent* QFocusEvent_new3(int typeVal, int reason) { + return new QFocusEvent(static_cast(typeVal), static_cast(reason)); +} + +void QFocusEvent_virtbase(QFocusEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } bool QFocusEvent_GotFocus(const QFocusEvent* self) { @@ -858,22 +776,20 @@ void QFocusEvent_Delete(QFocusEvent* self, bool isSubclass) { } } -void QPaintEvent_new(QRegion* paintRegion, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent) { - QPaintEvent* ret = new QPaintEvent(*paintRegion); - *outptr_QPaintEvent = ret; - *outptr_QEvent = static_cast(ret); +QPaintEvent* QPaintEvent_new(QRegion* paintRegion) { + return new QPaintEvent(*paintRegion); } -void QPaintEvent_new2(QRect* paintRect, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent) { - QPaintEvent* ret = new QPaintEvent(*paintRect); - *outptr_QPaintEvent = ret; - *outptr_QEvent = static_cast(ret); +QPaintEvent* QPaintEvent_new2(QRect* paintRect) { + return new QPaintEvent(*paintRect); } -void QPaintEvent_new3(QPaintEvent* param1, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent) { - QPaintEvent* ret = new QPaintEvent(*param1); - *outptr_QPaintEvent = ret; - *outptr_QEvent = static_cast(ret); +QPaintEvent* QPaintEvent_new3(QPaintEvent* param1) { + return new QPaintEvent(*param1); +} + +void QPaintEvent_virtbase(QPaintEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QRect* QPaintEvent_Rect(const QPaintEvent* self) { @@ -896,16 +812,16 @@ void QPaintEvent_Delete(QPaintEvent* self, bool isSubclass) { } } -void QMoveEvent_new(QPoint* pos, QPoint* oldPos, QMoveEvent** outptr_QMoveEvent, QEvent** outptr_QEvent) { - QMoveEvent* ret = new QMoveEvent(*pos, *oldPos); - *outptr_QMoveEvent = ret; - *outptr_QEvent = static_cast(ret); +QMoveEvent* QMoveEvent_new(QPoint* pos, QPoint* oldPos) { + return new QMoveEvent(*pos, *oldPos); } -void QMoveEvent_new2(QMoveEvent* param1, QMoveEvent** outptr_QMoveEvent, QEvent** outptr_QEvent) { - QMoveEvent* ret = new QMoveEvent(*param1); - *outptr_QMoveEvent = ret; - *outptr_QEvent = static_cast(ret); +QMoveEvent* QMoveEvent_new2(QMoveEvent* param1) { + return new QMoveEvent(*param1); +} + +void QMoveEvent_virtbase(QMoveEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QPoint* QMoveEvent_Pos(const QMoveEvent* self) { @@ -928,16 +844,16 @@ void QMoveEvent_Delete(QMoveEvent* self, bool isSubclass) { } } -void QExposeEvent_new(QRegion* rgn, QExposeEvent** outptr_QExposeEvent, QEvent** outptr_QEvent) { - QExposeEvent* ret = new QExposeEvent(*rgn); - *outptr_QExposeEvent = ret; - *outptr_QEvent = static_cast(ret); +QExposeEvent* QExposeEvent_new(QRegion* rgn) { + return new QExposeEvent(*rgn); } -void QExposeEvent_new2(QExposeEvent* param1, QExposeEvent** outptr_QExposeEvent, QEvent** outptr_QEvent) { - QExposeEvent* ret = new QExposeEvent(*param1); - *outptr_QExposeEvent = ret; - *outptr_QEvent = static_cast(ret); +QExposeEvent* QExposeEvent_new2(QExposeEvent* param1) { + return new QExposeEvent(*param1); +} + +void QExposeEvent_virtbase(QExposeEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QRegion* QExposeEvent_Region(const QExposeEvent* self) { @@ -954,16 +870,16 @@ void QExposeEvent_Delete(QExposeEvent* self, bool isSubclass) { } } -void QPlatformSurfaceEvent_new(int surfaceEventType, QPlatformSurfaceEvent** outptr_QPlatformSurfaceEvent, QEvent** outptr_QEvent) { - QPlatformSurfaceEvent* ret = new QPlatformSurfaceEvent(static_cast(surfaceEventType)); - *outptr_QPlatformSurfaceEvent = ret; - *outptr_QEvent = static_cast(ret); +QPlatformSurfaceEvent* QPlatformSurfaceEvent_new(int surfaceEventType) { + return new QPlatformSurfaceEvent(static_cast(surfaceEventType)); } -void QPlatformSurfaceEvent_new2(QPlatformSurfaceEvent* param1, QPlatformSurfaceEvent** outptr_QPlatformSurfaceEvent, QEvent** outptr_QEvent) { - QPlatformSurfaceEvent* ret = new QPlatformSurfaceEvent(*param1); - *outptr_QPlatformSurfaceEvent = ret; - *outptr_QEvent = static_cast(ret); +QPlatformSurfaceEvent* QPlatformSurfaceEvent_new2(QPlatformSurfaceEvent* param1) { + return new QPlatformSurfaceEvent(*param1); +} + +void QPlatformSurfaceEvent_virtbase(QPlatformSurfaceEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } int QPlatformSurfaceEvent_SurfaceEventType(const QPlatformSurfaceEvent* self) { @@ -979,16 +895,16 @@ void QPlatformSurfaceEvent_Delete(QPlatformSurfaceEvent* self, bool isSubclass) } } -void QResizeEvent_new(QSize* size, QSize* oldSize, QResizeEvent** outptr_QResizeEvent, QEvent** outptr_QEvent) { - QResizeEvent* ret = new QResizeEvent(*size, *oldSize); - *outptr_QResizeEvent = ret; - *outptr_QEvent = static_cast(ret); +QResizeEvent* QResizeEvent_new(QSize* size, QSize* oldSize) { + return new QResizeEvent(*size, *oldSize); } -void QResizeEvent_new2(QResizeEvent* param1, QResizeEvent** outptr_QResizeEvent, QEvent** outptr_QEvent) { - QResizeEvent* ret = new QResizeEvent(*param1); - *outptr_QResizeEvent = ret; - *outptr_QEvent = static_cast(ret); +QResizeEvent* QResizeEvent_new2(QResizeEvent* param1) { + return new QResizeEvent(*param1); +} + +void QResizeEvent_virtbase(QResizeEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QSize* QResizeEvent_Size(const QResizeEvent* self) { @@ -1011,16 +927,16 @@ void QResizeEvent_Delete(QResizeEvent* self, bool isSubclass) { } } -void QCloseEvent_new(QCloseEvent** outptr_QCloseEvent, QEvent** outptr_QEvent) { - QCloseEvent* ret = new QCloseEvent(); - *outptr_QCloseEvent = ret; - *outptr_QEvent = static_cast(ret); +QCloseEvent* QCloseEvent_new() { + return new QCloseEvent(); } -void QCloseEvent_new2(QCloseEvent* param1, QCloseEvent** outptr_QCloseEvent, QEvent** outptr_QEvent) { - QCloseEvent* ret = new QCloseEvent(*param1); - *outptr_QCloseEvent = ret; - *outptr_QEvent = static_cast(ret); +QCloseEvent* QCloseEvent_new2(QCloseEvent* param1) { + return new QCloseEvent(*param1); +} + +void QCloseEvent_virtbase(QCloseEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } void QCloseEvent_OperatorAssign(QCloseEvent* self, QCloseEvent* param1) { @@ -1035,16 +951,16 @@ void QCloseEvent_Delete(QCloseEvent* self, bool isSubclass) { } } -void QIconDragEvent_new(QIconDragEvent** outptr_QIconDragEvent, QEvent** outptr_QEvent) { - QIconDragEvent* ret = new QIconDragEvent(); - *outptr_QIconDragEvent = ret; - *outptr_QEvent = static_cast(ret); +QIconDragEvent* QIconDragEvent_new() { + return new QIconDragEvent(); } -void QIconDragEvent_new2(QIconDragEvent* param1, QIconDragEvent** outptr_QIconDragEvent, QEvent** outptr_QEvent) { - QIconDragEvent* ret = new QIconDragEvent(*param1); - *outptr_QIconDragEvent = ret; - *outptr_QEvent = static_cast(ret); +QIconDragEvent* QIconDragEvent_new2(QIconDragEvent* param1) { + return new QIconDragEvent(*param1); +} + +void QIconDragEvent_virtbase(QIconDragEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } void QIconDragEvent_OperatorAssign(QIconDragEvent* self, QIconDragEvent* param1) { @@ -1059,16 +975,16 @@ void QIconDragEvent_Delete(QIconDragEvent* self, bool isSubclass) { } } -void QShowEvent_new(QShowEvent** outptr_QShowEvent, QEvent** outptr_QEvent) { - QShowEvent* ret = new QShowEvent(); - *outptr_QShowEvent = ret; - *outptr_QEvent = static_cast(ret); +QShowEvent* QShowEvent_new() { + return new QShowEvent(); } -void QShowEvent_new2(QShowEvent* param1, QShowEvent** outptr_QShowEvent, QEvent** outptr_QEvent) { - QShowEvent* ret = new QShowEvent(*param1); - *outptr_QShowEvent = ret; - *outptr_QEvent = static_cast(ret); +QShowEvent* QShowEvent_new2(QShowEvent* param1) { + return new QShowEvent(*param1); +} + +void QShowEvent_virtbase(QShowEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } void QShowEvent_OperatorAssign(QShowEvent* self, QShowEvent* param1) { @@ -1083,16 +999,16 @@ void QShowEvent_Delete(QShowEvent* self, bool isSubclass) { } } -void QHideEvent_new(QHideEvent** outptr_QHideEvent, QEvent** outptr_QEvent) { - QHideEvent* ret = new QHideEvent(); - *outptr_QHideEvent = ret; - *outptr_QEvent = static_cast(ret); +QHideEvent* QHideEvent_new() { + return new QHideEvent(); } -void QHideEvent_new2(QHideEvent* param1, QHideEvent** outptr_QHideEvent, QEvent** outptr_QEvent) { - QHideEvent* ret = new QHideEvent(*param1); - *outptr_QHideEvent = ret; - *outptr_QEvent = static_cast(ret); +QHideEvent* QHideEvent_new2(QHideEvent* param1) { + return new QHideEvent(*param1); +} + +void QHideEvent_virtbase(QHideEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } void QHideEvent_OperatorAssign(QHideEvent* self, QHideEvent* param1) { @@ -1107,32 +1023,24 @@ void QHideEvent_Delete(QHideEvent* self, bool isSubclass) { } } -void QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos, int modifiers, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QContextMenuEvent* ret = new QContextMenuEvent(static_cast(reason), *pos, *globalPos, static_cast(modifiers)); - *outptr_QContextMenuEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QContextMenuEvent* QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos, int modifiers) { + return new QContextMenuEvent(static_cast(reason), *pos, *globalPos, static_cast(modifiers)); } -void QContextMenuEvent_new2(int reason, QPoint* pos, QPoint* globalPos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QContextMenuEvent* ret = new QContextMenuEvent(static_cast(reason), *pos, *globalPos); - *outptr_QContextMenuEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QContextMenuEvent* QContextMenuEvent_new2(int reason, QPoint* pos, QPoint* globalPos) { + return new QContextMenuEvent(static_cast(reason), *pos, *globalPos); } -void QContextMenuEvent_new3(int reason, QPoint* pos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QContextMenuEvent* ret = new QContextMenuEvent(static_cast(reason), *pos); - *outptr_QContextMenuEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QContextMenuEvent* QContextMenuEvent_new3(int reason, QPoint* pos) { + return new QContextMenuEvent(static_cast(reason), *pos); } -void QContextMenuEvent_new4(QContextMenuEvent* param1, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QContextMenuEvent* ret = new QContextMenuEvent(*param1); - *outptr_QContextMenuEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QContextMenuEvent* QContextMenuEvent_new4(QContextMenuEvent* param1) { + return new QContextMenuEvent(*param1); +} + +void QContextMenuEvent_virtbase(QContextMenuEvent* src, QInputEvent** outptr_QInputEvent) { + *outptr_QInputEvent = static_cast(src); } int QContextMenuEvent_X(const QContextMenuEvent* self) { @@ -1176,13 +1084,11 @@ void QContextMenuEvent_Delete(QContextMenuEvent* self, bool isSubclass) { } } -void QInputMethodEvent_new(QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent) { - QInputMethodEvent* ret = new QInputMethodEvent(); - *outptr_QInputMethodEvent = ret; - *outptr_QEvent = static_cast(ret); +QInputMethodEvent* QInputMethodEvent_new() { + return new QInputMethodEvent(); } -void QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes, QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent) { +QInputMethodEvent* QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes) { QString preeditText_QString = QString::fromUtf8(preeditText.data, preeditText.len); QList attributes_QList; attributes_QList.reserve(attributes.len); @@ -1190,15 +1096,15 @@ void QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* for(size_t i = 0; i < attributes.len; ++i) { attributes_QList.push_back(*(attributes_arr[i])); } - QInputMethodEvent* ret = new QInputMethodEvent(preeditText_QString, attributes_QList); - *outptr_QInputMethodEvent = ret; - *outptr_QEvent = static_cast(ret); + return new QInputMethodEvent(preeditText_QString, attributes_QList); } -void QInputMethodEvent_new3(QInputMethodEvent* other, QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent) { - QInputMethodEvent* ret = new QInputMethodEvent(*other); - *outptr_QInputMethodEvent = ret; - *outptr_QEvent = static_cast(ret); +QInputMethodEvent* QInputMethodEvent_new3(QInputMethodEvent* other) { + return new QInputMethodEvent(*other); +} + +void QInputMethodEvent_virtbase(QInputMethodEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } void QInputMethodEvent_SetCommitString(QInputMethodEvent* self, struct miqt_string commitString) { @@ -1267,16 +1173,16 @@ void QInputMethodEvent_Delete(QInputMethodEvent* self, bool isSubclass) { } } -void QInputMethodQueryEvent_new(int queries, QInputMethodQueryEvent** outptr_QInputMethodQueryEvent, QEvent** outptr_QEvent) { - QInputMethodQueryEvent* ret = new QInputMethodQueryEvent(static_cast(queries)); - *outptr_QInputMethodQueryEvent = ret; - *outptr_QEvent = static_cast(ret); +QInputMethodQueryEvent* QInputMethodQueryEvent_new(int queries) { + return new QInputMethodQueryEvent(static_cast(queries)); } -void QInputMethodQueryEvent_new2(QInputMethodQueryEvent* param1, QInputMethodQueryEvent** outptr_QInputMethodQueryEvent, QEvent** outptr_QEvent) { - QInputMethodQueryEvent* ret = new QInputMethodQueryEvent(*param1); - *outptr_QInputMethodQueryEvent = ret; - *outptr_QEvent = static_cast(ret); +QInputMethodQueryEvent* QInputMethodQueryEvent_new2(QInputMethodQueryEvent* param1) { + return new QInputMethodQueryEvent(*param1); +} + +void QInputMethodQueryEvent_virtbase(QInputMethodQueryEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } int QInputMethodQueryEvent_Queries(const QInputMethodQueryEvent* self) { @@ -1300,22 +1206,20 @@ void QInputMethodQueryEvent_Delete(QInputMethodQueryEvent* self, bool isSubclass } } -void QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { - QDropEvent* ret = new QDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); - *outptr_QDropEvent = ret; - *outptr_QEvent = static_cast(ret); +QDropEvent* QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers) { + return new QDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); } -void QDropEvent_new2(QDropEvent* param1, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { - QDropEvent* ret = new QDropEvent(*param1); - *outptr_QDropEvent = ret; - *outptr_QEvent = static_cast(ret); +QDropEvent* QDropEvent_new2(QDropEvent* param1) { + return new QDropEvent(*param1); } -void QDropEvent_new3(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { - QDropEvent* ret = new QDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); - *outptr_QDropEvent = ret; - *outptr_QEvent = static_cast(ret); +QDropEvent* QDropEvent_new3(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal) { + return new QDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); +} + +void QDropEvent_virtbase(QDropEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QPoint* QDropEvent_Pos(const QDropEvent* self) { @@ -1377,25 +1281,20 @@ void QDropEvent_Delete(QDropEvent* self, bool isSubclass) { } } -void QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { - QDragMoveEvent* ret = new QDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); - *outptr_QDragMoveEvent = ret; - *outptr_QDropEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QDragMoveEvent* QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers) { + return new QDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); } -void QDragMoveEvent_new2(QDragMoveEvent* param1, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { - QDragMoveEvent* ret = new QDragMoveEvent(*param1); - *outptr_QDragMoveEvent = ret; - *outptr_QDropEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QDragMoveEvent* QDragMoveEvent_new2(QDragMoveEvent* param1) { + return new QDragMoveEvent(*param1); } -void QDragMoveEvent_new3(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { - QDragMoveEvent* ret = new QDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); - *outptr_QDragMoveEvent = ret; - *outptr_QDropEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QDragMoveEvent* QDragMoveEvent_new3(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal) { + return new QDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); +} + +void QDragMoveEvent_virtbase(QDragMoveEvent* src, QDropEvent** outptr_QDropEvent) { + *outptr_QDropEvent = static_cast(src); } QRect* QDragMoveEvent_AnswerRect(const QDragMoveEvent* self) { @@ -1426,20 +1325,16 @@ void QDragMoveEvent_Delete(QDragMoveEvent* self, bool isSubclass) { } } -void QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragEnterEvent** outptr_QDragEnterEvent, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { - QDragEnterEvent* ret = new QDragEnterEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); - *outptr_QDragEnterEvent = ret; - *outptr_QDragMoveEvent = static_cast(ret); - *outptr_QDropEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QDragEnterEvent* QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers) { + return new QDragEnterEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); } -void QDragEnterEvent_new2(QDragEnterEvent* param1, QDragEnterEvent** outptr_QDragEnterEvent, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { - QDragEnterEvent* ret = new QDragEnterEvent(*param1); - *outptr_QDragEnterEvent = ret; - *outptr_QDragMoveEvent = static_cast(ret); - *outptr_QDropEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QDragEnterEvent* QDragEnterEvent_new2(QDragEnterEvent* param1) { + return new QDragEnterEvent(*param1); +} + +void QDragEnterEvent_virtbase(QDragEnterEvent* src, QDragMoveEvent** outptr_QDragMoveEvent) { + *outptr_QDragMoveEvent = static_cast(src); } void QDragEnterEvent_OperatorAssign(QDragEnterEvent* self, QDragEnterEvent* param1) { @@ -1454,16 +1349,16 @@ void QDragEnterEvent_Delete(QDragEnterEvent* self, bool isSubclass) { } } -void QDragLeaveEvent_new(QDragLeaveEvent** outptr_QDragLeaveEvent, QEvent** outptr_QEvent) { - QDragLeaveEvent* ret = new QDragLeaveEvent(); - *outptr_QDragLeaveEvent = ret; - *outptr_QEvent = static_cast(ret); +QDragLeaveEvent* QDragLeaveEvent_new() { + return new QDragLeaveEvent(); } -void QDragLeaveEvent_new2(QDragLeaveEvent* param1, QDragLeaveEvent** outptr_QDragLeaveEvent, QEvent** outptr_QEvent) { - QDragLeaveEvent* ret = new QDragLeaveEvent(*param1); - *outptr_QDragLeaveEvent = ret; - *outptr_QEvent = static_cast(ret); +QDragLeaveEvent* QDragLeaveEvent_new2(QDragLeaveEvent* param1) { + return new QDragLeaveEvent(*param1); +} + +void QDragLeaveEvent_virtbase(QDragLeaveEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } void QDragLeaveEvent_OperatorAssign(QDragLeaveEvent* self, QDragLeaveEvent* param1) { @@ -1478,16 +1373,16 @@ void QDragLeaveEvent_Delete(QDragLeaveEvent* self, bool isSubclass) { } } -void QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos, QHelpEvent** outptr_QHelpEvent, QEvent** outptr_QEvent) { - QHelpEvent* ret = new QHelpEvent(static_cast(typeVal), *pos, *globalPos); - *outptr_QHelpEvent = ret; - *outptr_QEvent = static_cast(ret); +QHelpEvent* QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos) { + return new QHelpEvent(static_cast(typeVal), *pos, *globalPos); } -void QHelpEvent_new2(QHelpEvent* param1, QHelpEvent** outptr_QHelpEvent, QEvent** outptr_QEvent) { - QHelpEvent* ret = new QHelpEvent(*param1); - *outptr_QHelpEvent = ret; - *outptr_QEvent = static_cast(ret); +QHelpEvent* QHelpEvent_new2(QHelpEvent* param1) { + return new QHelpEvent(*param1); +} + +void QHelpEvent_virtbase(QHelpEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } int QHelpEvent_X(const QHelpEvent* self) { @@ -1526,17 +1421,17 @@ void QHelpEvent_Delete(QHelpEvent* self, bool isSubclass) { } } -void QStatusTipEvent_new(struct miqt_string tip, QStatusTipEvent** outptr_QStatusTipEvent, QEvent** outptr_QEvent) { +QStatusTipEvent* QStatusTipEvent_new(struct miqt_string tip) { QString tip_QString = QString::fromUtf8(tip.data, tip.len); - QStatusTipEvent* ret = new QStatusTipEvent(tip_QString); - *outptr_QStatusTipEvent = ret; - *outptr_QEvent = static_cast(ret); + return new QStatusTipEvent(tip_QString); } -void QStatusTipEvent_new2(QStatusTipEvent* param1, QStatusTipEvent** outptr_QStatusTipEvent, QEvent** outptr_QEvent) { - QStatusTipEvent* ret = new QStatusTipEvent(*param1); - *outptr_QStatusTipEvent = ret; - *outptr_QEvent = static_cast(ret); +QStatusTipEvent* QStatusTipEvent_new2(QStatusTipEvent* param1) { + return new QStatusTipEvent(*param1); +} + +void QStatusTipEvent_virtbase(QStatusTipEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } struct miqt_string QStatusTipEvent_Tip(const QStatusTipEvent* self) { @@ -1558,17 +1453,17 @@ void QStatusTipEvent_Delete(QStatusTipEvent* self, bool isSubclass) { } } -void QWhatsThisClickedEvent_new(struct miqt_string href, QWhatsThisClickedEvent** outptr_QWhatsThisClickedEvent, QEvent** outptr_QEvent) { +QWhatsThisClickedEvent* QWhatsThisClickedEvent_new(struct miqt_string href) { QString href_QString = QString::fromUtf8(href.data, href.len); - QWhatsThisClickedEvent* ret = new QWhatsThisClickedEvent(href_QString); - *outptr_QWhatsThisClickedEvent = ret; - *outptr_QEvent = static_cast(ret); + return new QWhatsThisClickedEvent(href_QString); } -void QWhatsThisClickedEvent_new2(QWhatsThisClickedEvent* param1, QWhatsThisClickedEvent** outptr_QWhatsThisClickedEvent, QEvent** outptr_QEvent) { - QWhatsThisClickedEvent* ret = new QWhatsThisClickedEvent(*param1); - *outptr_QWhatsThisClickedEvent = ret; - *outptr_QEvent = static_cast(ret); +QWhatsThisClickedEvent* QWhatsThisClickedEvent_new2(QWhatsThisClickedEvent* param1) { + return new QWhatsThisClickedEvent(*param1); +} + +void QWhatsThisClickedEvent_virtbase(QWhatsThisClickedEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } struct miqt_string QWhatsThisClickedEvent_Href(const QWhatsThisClickedEvent* self) { @@ -1590,22 +1485,20 @@ void QWhatsThisClickedEvent_Delete(QWhatsThisClickedEvent* self, bool isSubclass } } -void QActionEvent_new(int typeVal, QAction* action, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent) { - QActionEvent* ret = new QActionEvent(static_cast(typeVal), action); - *outptr_QActionEvent = ret; - *outptr_QEvent = static_cast(ret); +QActionEvent* QActionEvent_new(int typeVal, QAction* action) { + return new QActionEvent(static_cast(typeVal), action); } -void QActionEvent_new2(QActionEvent* param1, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent) { - QActionEvent* ret = new QActionEvent(*param1); - *outptr_QActionEvent = ret; - *outptr_QEvent = static_cast(ret); +QActionEvent* QActionEvent_new2(QActionEvent* param1) { + return new QActionEvent(*param1); } -void QActionEvent_new3(int typeVal, QAction* action, QAction* before, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent) { - QActionEvent* ret = new QActionEvent(static_cast(typeVal), action, before); - *outptr_QActionEvent = ret; - *outptr_QEvent = static_cast(ret); +QActionEvent* QActionEvent_new3(int typeVal, QAction* action, QAction* before) { + return new QActionEvent(static_cast(typeVal), action, before); +} + +void QActionEvent_virtbase(QActionEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QAction* QActionEvent_Action(const QActionEvent* self) { @@ -1628,23 +1521,21 @@ void QActionEvent_Delete(QActionEvent* self, bool isSubclass) { } } -void QFileOpenEvent_new(struct miqt_string file, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent) { +QFileOpenEvent* QFileOpenEvent_new(struct miqt_string file) { QString file_QString = QString::fromUtf8(file.data, file.len); - QFileOpenEvent* ret = new QFileOpenEvent(file_QString); - *outptr_QFileOpenEvent = ret; - *outptr_QEvent = static_cast(ret); + return new QFileOpenEvent(file_QString); } -void QFileOpenEvent_new2(QUrl* url, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent) { - QFileOpenEvent* ret = new QFileOpenEvent(*url); - *outptr_QFileOpenEvent = ret; - *outptr_QEvent = static_cast(ret); +QFileOpenEvent* QFileOpenEvent_new2(QUrl* url) { + return new QFileOpenEvent(*url); } -void QFileOpenEvent_new3(QFileOpenEvent* param1, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent) { - QFileOpenEvent* ret = new QFileOpenEvent(*param1); - *outptr_QFileOpenEvent = ret; - *outptr_QEvent = static_cast(ret); +QFileOpenEvent* QFileOpenEvent_new3(QFileOpenEvent* param1) { + return new QFileOpenEvent(*param1); +} + +void QFileOpenEvent_virtbase(QFileOpenEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } struct miqt_string QFileOpenEvent_File(const QFileOpenEvent* self) { @@ -1674,16 +1565,16 @@ void QFileOpenEvent_Delete(QFileOpenEvent* self, bool isSubclass) { } } -void QToolBarChangeEvent_new(bool t, QToolBarChangeEvent** outptr_QToolBarChangeEvent, QEvent** outptr_QEvent) { - QToolBarChangeEvent* ret = new QToolBarChangeEvent(t); - *outptr_QToolBarChangeEvent = ret; - *outptr_QEvent = static_cast(ret); +QToolBarChangeEvent* QToolBarChangeEvent_new(bool t) { + return new QToolBarChangeEvent(t); } -void QToolBarChangeEvent_new2(QToolBarChangeEvent* param1, QToolBarChangeEvent** outptr_QToolBarChangeEvent, QEvent** outptr_QEvent) { - QToolBarChangeEvent* ret = new QToolBarChangeEvent(*param1); - *outptr_QToolBarChangeEvent = ret; - *outptr_QEvent = static_cast(ret); +QToolBarChangeEvent* QToolBarChangeEvent_new2(QToolBarChangeEvent* param1) { + return new QToolBarChangeEvent(*param1); +} + +void QToolBarChangeEvent_virtbase(QToolBarChangeEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } bool QToolBarChangeEvent_Toggle(const QToolBarChangeEvent* self) { @@ -1698,22 +1589,20 @@ void QToolBarChangeEvent_Delete(QToolBarChangeEvent* self, bool isSubclass) { } } -void QShortcutEvent_new(QKeySequence* key, int id, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent) { - QShortcutEvent* ret = new QShortcutEvent(*key, static_cast(id)); - *outptr_QShortcutEvent = ret; - *outptr_QEvent = static_cast(ret); +QShortcutEvent* QShortcutEvent_new(QKeySequence* key, int id) { + return new QShortcutEvent(*key, static_cast(id)); } -void QShortcutEvent_new2(QShortcutEvent* param1, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent) { - QShortcutEvent* ret = new QShortcutEvent(*param1); - *outptr_QShortcutEvent = ret; - *outptr_QEvent = static_cast(ret); +QShortcutEvent* QShortcutEvent_new2(QShortcutEvent* param1) { + return new QShortcutEvent(*param1); } -void QShortcutEvent_new3(QKeySequence* key, int id, bool ambiguous, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent) { - QShortcutEvent* ret = new QShortcutEvent(*key, static_cast(id), ambiguous); - *outptr_QShortcutEvent = ret; - *outptr_QEvent = static_cast(ret); +QShortcutEvent* QShortcutEvent_new3(QKeySequence* key, int id, bool ambiguous) { + return new QShortcutEvent(*key, static_cast(id), ambiguous); +} + +void QShortcutEvent_virtbase(QShortcutEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QKeySequence* QShortcutEvent_Key(const QShortcutEvent* self) { @@ -1738,22 +1627,20 @@ void QShortcutEvent_Delete(QShortcutEvent* self, bool isSubclass) { } } -void QWindowStateChangeEvent_new(int aOldState, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent) { - QWindowStateChangeEvent* ret = new QWindowStateChangeEvent(static_cast(aOldState)); - *outptr_QWindowStateChangeEvent = ret; - *outptr_QEvent = static_cast(ret); +QWindowStateChangeEvent* QWindowStateChangeEvent_new(int aOldState) { + return new QWindowStateChangeEvent(static_cast(aOldState)); } -void QWindowStateChangeEvent_new2(QWindowStateChangeEvent* param1, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent) { - QWindowStateChangeEvent* ret = new QWindowStateChangeEvent(*param1); - *outptr_QWindowStateChangeEvent = ret; - *outptr_QEvent = static_cast(ret); +QWindowStateChangeEvent* QWindowStateChangeEvent_new2(QWindowStateChangeEvent* param1) { + return new QWindowStateChangeEvent(*param1); } -void QWindowStateChangeEvent_new3(int aOldState, bool isOverride, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent) { - QWindowStateChangeEvent* ret = new QWindowStateChangeEvent(static_cast(aOldState), isOverride); - *outptr_QWindowStateChangeEvent = ret; - *outptr_QEvent = static_cast(ret); +QWindowStateChangeEvent* QWindowStateChangeEvent_new3(int aOldState, bool isOverride) { + return new QWindowStateChangeEvent(static_cast(aOldState), isOverride); +} + +void QWindowStateChangeEvent_virtbase(QWindowStateChangeEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } int QWindowStateChangeEvent_OldState(const QWindowStateChangeEvent* self) { @@ -1773,14 +1660,12 @@ void QWindowStateChangeEvent_Delete(QWindowStateChangeEvent* self, bool isSubcla } } -void QPointingDeviceUniqueId_new(QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId) { - QPointingDeviceUniqueId* ret = new QPointingDeviceUniqueId(); - *outptr_QPointingDeviceUniqueId = ret; +QPointingDeviceUniqueId* QPointingDeviceUniqueId_new() { + return new QPointingDeviceUniqueId(); } -void QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1, QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId) { - QPointingDeviceUniqueId* ret = new QPointingDeviceUniqueId(*param1); - *outptr_QPointingDeviceUniqueId = ret; +QPointingDeviceUniqueId* QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1) { + return new QPointingDeviceUniqueId(*param1); } QPointingDeviceUniqueId* QPointingDeviceUniqueId_FromNumericId(long long id) { @@ -1804,52 +1689,38 @@ void QPointingDeviceUniqueId_Delete(QPointingDeviceUniqueId* self, bool isSubcla } } -void QTouchEvent_new(int eventType, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QTouchEvent* ret = new QTouchEvent(static_cast(eventType)); - *outptr_QTouchEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QTouchEvent* QTouchEvent_new(int eventType) { + return new QTouchEvent(static_cast(eventType)); } -void QTouchEvent_new2(QTouchEvent* param1, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QTouchEvent* ret = new QTouchEvent(*param1); - *outptr_QTouchEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QTouchEvent* QTouchEvent_new2(QTouchEvent* param1) { + return new QTouchEvent(*param1); } -void QTouchEvent_new3(int eventType, QTouchDevice* device, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QTouchEvent* ret = new QTouchEvent(static_cast(eventType), device); - *outptr_QTouchEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QTouchEvent* QTouchEvent_new3(int eventType, QTouchDevice* device) { + return new QTouchEvent(static_cast(eventType), device); } -void QTouchEvent_new4(int eventType, QTouchDevice* device, int modifiers, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QTouchEvent* ret = new QTouchEvent(static_cast(eventType), device, static_cast(modifiers)); - *outptr_QTouchEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QTouchEvent* QTouchEvent_new4(int eventType, QTouchDevice* device, int modifiers) { + return new QTouchEvent(static_cast(eventType), device, static_cast(modifiers)); } -void QTouchEvent_new5(int eventType, QTouchDevice* device, int modifiers, int touchPointStates, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - QTouchEvent* ret = new QTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates)); - *outptr_QTouchEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QTouchEvent* QTouchEvent_new5(int eventType, QTouchDevice* device, int modifiers, int touchPointStates) { + return new QTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates)); } -void QTouchEvent_new6(int eventType, QTouchDevice* device, int modifiers, int touchPointStates, struct miqt_array /* of QTouchEvent__TouchPoint* */ touchPoints, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QTouchEvent* QTouchEvent_new6(int eventType, QTouchDevice* device, int modifiers, int touchPointStates, struct miqt_array /* of QTouchEvent__TouchPoint* */ touchPoints) { QList touchPoints_QList; touchPoints_QList.reserve(touchPoints.len); QTouchEvent__TouchPoint** touchPoints_arr = static_cast(touchPoints.data); for(size_t i = 0; i < touchPoints.len; ++i) { touchPoints_QList.push_back(*(touchPoints_arr[i])); } - QTouchEvent* ret = new QTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates), touchPoints_QList); - *outptr_QTouchEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new QTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates), touchPoints_QList); +} + +void QTouchEvent_virtbase(QTouchEvent* src, QInputEvent** outptr_QInputEvent) { + *outptr_QInputEvent = static_cast(src); } QWindow* QTouchEvent_Window(const QTouchEvent* self) { @@ -1916,16 +1787,16 @@ void QTouchEvent_Delete(QTouchEvent* self, bool isSubclass) { } } -void QScrollPrepareEvent_new(QPointF* startPos, QScrollPrepareEvent** outptr_QScrollPrepareEvent, QEvent** outptr_QEvent) { - QScrollPrepareEvent* ret = new QScrollPrepareEvent(*startPos); - *outptr_QScrollPrepareEvent = ret; - *outptr_QEvent = static_cast(ret); +QScrollPrepareEvent* QScrollPrepareEvent_new(QPointF* startPos) { + return new QScrollPrepareEvent(*startPos); } -void QScrollPrepareEvent_new2(QScrollPrepareEvent* param1, QScrollPrepareEvent** outptr_QScrollPrepareEvent, QEvent** outptr_QEvent) { - QScrollPrepareEvent* ret = new QScrollPrepareEvent(*param1); - *outptr_QScrollPrepareEvent = ret; - *outptr_QEvent = static_cast(ret); +QScrollPrepareEvent* QScrollPrepareEvent_new2(QScrollPrepareEvent* param1) { + return new QScrollPrepareEvent(*param1); +} + +void QScrollPrepareEvent_virtbase(QScrollPrepareEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QPointF* QScrollPrepareEvent_StartPos(const QScrollPrepareEvent* self) { @@ -1964,16 +1835,16 @@ void QScrollPrepareEvent_Delete(QScrollPrepareEvent* self, bool isSubclass) { } } -void QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState, QScrollEvent** outptr_QScrollEvent, QEvent** outptr_QEvent) { - QScrollEvent* ret = new QScrollEvent(*contentPos, *overshoot, static_cast(scrollState)); - *outptr_QScrollEvent = ret; - *outptr_QEvent = static_cast(ret); +QScrollEvent* QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState) { + return new QScrollEvent(*contentPos, *overshoot, static_cast(scrollState)); } -void QScrollEvent_new2(QScrollEvent* param1, QScrollEvent** outptr_QScrollEvent, QEvent** outptr_QEvent) { - QScrollEvent* ret = new QScrollEvent(*param1); - *outptr_QScrollEvent = ret; - *outptr_QEvent = static_cast(ret); +QScrollEvent* QScrollEvent_new2(QScrollEvent* param1) { + return new QScrollEvent(*param1); +} + +void QScrollEvent_virtbase(QScrollEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QPointF* QScrollEvent_ContentPos(const QScrollEvent* self) { @@ -1997,16 +1868,16 @@ void QScrollEvent_Delete(QScrollEvent* self, bool isSubclass) { } } -void QScreenOrientationChangeEvent_new(QScreen* screen, int orientation, QScreenOrientationChangeEvent** outptr_QScreenOrientationChangeEvent, QEvent** outptr_QEvent) { - QScreenOrientationChangeEvent* ret = new QScreenOrientationChangeEvent(screen, static_cast(orientation)); - *outptr_QScreenOrientationChangeEvent = ret; - *outptr_QEvent = static_cast(ret); +QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_new(QScreen* screen, int orientation) { + return new QScreenOrientationChangeEvent(screen, static_cast(orientation)); } -void QScreenOrientationChangeEvent_new2(QScreenOrientationChangeEvent* param1, QScreenOrientationChangeEvent** outptr_QScreenOrientationChangeEvent, QEvent** outptr_QEvent) { - QScreenOrientationChangeEvent* ret = new QScreenOrientationChangeEvent(*param1); - *outptr_QScreenOrientationChangeEvent = ret; - *outptr_QEvent = static_cast(ret); +QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_new2(QScreenOrientationChangeEvent* param1) { + return new QScreenOrientationChangeEvent(*param1); +} + +void QScreenOrientationChangeEvent_virtbase(QScreenOrientationChangeEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QScreen* QScreenOrientationChangeEvent_Screen(const QScreenOrientationChangeEvent* self) { @@ -2026,16 +1897,16 @@ void QScreenOrientationChangeEvent_Delete(QScreenOrientationChangeEvent* self, b } } -void QApplicationStateChangeEvent_new(int state, QApplicationStateChangeEvent** outptr_QApplicationStateChangeEvent, QEvent** outptr_QEvent) { - QApplicationStateChangeEvent* ret = new QApplicationStateChangeEvent(static_cast(state)); - *outptr_QApplicationStateChangeEvent = ret; - *outptr_QEvent = static_cast(ret); +QApplicationStateChangeEvent* QApplicationStateChangeEvent_new(int state) { + return new QApplicationStateChangeEvent(static_cast(state)); } -void QApplicationStateChangeEvent_new2(QApplicationStateChangeEvent* param1, QApplicationStateChangeEvent** outptr_QApplicationStateChangeEvent, QEvent** outptr_QEvent) { - QApplicationStateChangeEvent* ret = new QApplicationStateChangeEvent(*param1); - *outptr_QApplicationStateChangeEvent = ret; - *outptr_QEvent = static_cast(ret); +QApplicationStateChangeEvent* QApplicationStateChangeEvent_new2(QApplicationStateChangeEvent* param1) { + return new QApplicationStateChangeEvent(*param1); +} + +void QApplicationStateChangeEvent_virtbase(QApplicationStateChangeEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } int QApplicationStateChangeEvent_ApplicationState(const QApplicationStateChangeEvent* self) { @@ -2051,19 +1922,16 @@ void QApplicationStateChangeEvent_Delete(QApplicationStateChangeEvent* self, boo } } -void QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute) { - QInputMethodEvent::Attribute* ret = new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l), *val); - *outptr_QInputMethodEvent__Attribute = ret; +QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val) { + return new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l), *val); } -void QInputMethodEvent__Attribute_new2(int typ, int s, int l, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute) { - QInputMethodEvent::Attribute* ret = new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l)); - *outptr_QInputMethodEvent__Attribute = ret; +QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new2(int typ, int s, int l) { + return new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l)); } -void QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute) { - QInputMethodEvent::Attribute* ret = new QInputMethodEvent::Attribute(*param1); - *outptr_QInputMethodEvent__Attribute = ret; +QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1) { + return new QInputMethodEvent::Attribute(*param1); } void QInputMethodEvent__Attribute_OperatorAssign(QInputMethodEvent__Attribute* self, QInputMethodEvent__Attribute* param1) { @@ -2078,19 +1946,16 @@ void QInputMethodEvent__Attribute_Delete(QInputMethodEvent__Attribute* self, boo } } -void QTouchEvent__TouchPoint_new(QTouchEvent__TouchPoint** outptr_QTouchEvent__TouchPoint) { - QTouchEvent::TouchPoint* ret = new QTouchEvent::TouchPoint(); - *outptr_QTouchEvent__TouchPoint = ret; +QTouchEvent__TouchPoint* QTouchEvent__TouchPoint_new() { + return new QTouchEvent::TouchPoint(); } -void QTouchEvent__TouchPoint_new2(QTouchEvent__TouchPoint* other, QTouchEvent__TouchPoint** outptr_QTouchEvent__TouchPoint) { - QTouchEvent::TouchPoint* ret = new QTouchEvent::TouchPoint(*other); - *outptr_QTouchEvent__TouchPoint = ret; +QTouchEvent__TouchPoint* QTouchEvent__TouchPoint_new2(QTouchEvent__TouchPoint* other) { + return new QTouchEvent::TouchPoint(*other); } -void QTouchEvent__TouchPoint_new3(int id, QTouchEvent__TouchPoint** outptr_QTouchEvent__TouchPoint) { - QTouchEvent::TouchPoint* ret = new QTouchEvent::TouchPoint(static_cast(id)); - *outptr_QTouchEvent__TouchPoint = ret; +QTouchEvent__TouchPoint* QTouchEvent__TouchPoint_new3(int id) { + return new QTouchEvent::TouchPoint(static_cast(id)); } void QTouchEvent__TouchPoint_OperatorAssign(QTouchEvent__TouchPoint* self, QTouchEvent__TouchPoint* other) { diff --git a/qt/gen_qevent.go b/qt/gen_qevent.go index 6c5d3363..81d65ef1 100644 --- a/qt/gen_qevent.go +++ b/qt/gen_qevent.go @@ -101,53 +101,42 @@ func (this *QInputEvent) UnsafePointer() unsafe.Pointer { } // newQInputEvent constructs the type using only CGO pointers. -func newQInputEvent(h *C.QInputEvent, h_QEvent *C.QEvent) *QInputEvent { +func newQInputEvent(h *C.QInputEvent) *QInputEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QInputEvent_virtbase(h, &outptr_QEvent) + return &QInputEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQInputEvent constructs the type using only unsafe pointers. -func UnsafeNewQInputEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QInputEvent { - if h == nil { - return nil - } - - return &QInputEvent{h: (*C.QInputEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQInputEvent(h unsafe.Pointer) *QInputEvent { + return newQInputEvent((*C.QInputEvent)(h)) } // NewQInputEvent constructs a new QInputEvent object. func NewQInputEvent(typeVal QEvent__Type) *QInputEvent { - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QInputEvent_new((C.int)(typeVal), &outptr_QInputEvent, &outptr_QEvent) - ret := newQInputEvent(outptr_QInputEvent, outptr_QEvent) + ret := newQInputEvent(C.QInputEvent_new((C.int)(typeVal))) ret.isSubclass = true return ret } // NewQInputEvent2 constructs a new QInputEvent object. func NewQInputEvent2(param1 *QInputEvent) *QInputEvent { - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QInputEvent_new2(param1.cPointer(), &outptr_QInputEvent, &outptr_QEvent) - ret := newQInputEvent(outptr_QInputEvent, outptr_QEvent) + ret := newQInputEvent(C.QInputEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQInputEvent3 constructs a new QInputEvent object. func NewQInputEvent3(typeVal QEvent__Type, modifiers KeyboardModifier) *QInputEvent { - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QInputEvent_new3((C.int)(typeVal), (C.int)(modifiers), &outptr_QInputEvent, &outptr_QEvent) - ret := newQInputEvent(outptr_QInputEvent, outptr_QEvent) + ret := newQInputEvent(C.QInputEvent_new3((C.int)(typeVal), (C.int)(modifiers))) ret.isSubclass = true return ret } @@ -203,42 +192,34 @@ func (this *QEnterEvent) UnsafePointer() unsafe.Pointer { } // newQEnterEvent constructs the type using only CGO pointers. -func newQEnterEvent(h *C.QEnterEvent, h_QEvent *C.QEvent) *QEnterEvent { +func newQEnterEvent(h *C.QEnterEvent) *QEnterEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QEnterEvent_virtbase(h, &outptr_QEvent) + return &QEnterEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQEnterEvent constructs the type using only unsafe pointers. -func UnsafeNewQEnterEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QEnterEvent { - if h == nil { - return nil - } - - return &QEnterEvent{h: (*C.QEnterEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQEnterEvent(h unsafe.Pointer) *QEnterEvent { + return newQEnterEvent((*C.QEnterEvent)(h)) } // NewQEnterEvent constructs a new QEnterEvent object. func NewQEnterEvent(localPos *QPointF, windowPos *QPointF, screenPos *QPointF) *QEnterEvent { - var outptr_QEnterEvent *C.QEnterEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QEnterEvent_new(localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), &outptr_QEnterEvent, &outptr_QEvent) - ret := newQEnterEvent(outptr_QEnterEvent, outptr_QEvent) + ret := newQEnterEvent(C.QEnterEvent_new(localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer())) ret.isSubclass = true return ret } // NewQEnterEvent2 constructs a new QEnterEvent object. func NewQEnterEvent2(param1 *QEnterEvent) *QEnterEvent { - var outptr_QEnterEvent *C.QEnterEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QEnterEvent_new2(param1.cPointer(), &outptr_QEnterEvent, &outptr_QEvent) - ret := newQEnterEvent(outptr_QEnterEvent, outptr_QEvent) + ret := newQEnterEvent(C.QEnterEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -318,80 +299,58 @@ func (this *QMouseEvent) UnsafePointer() unsafe.Pointer { } // newQMouseEvent constructs the type using only CGO pointers. -func newQMouseEvent(h *C.QMouseEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QMouseEvent { +func newQMouseEvent(h *C.QMouseEvent) *QMouseEvent { if h == nil { return nil } + var outptr_QInputEvent *C.QInputEvent = nil + C.QMouseEvent_virtbase(h, &outptr_QInputEvent) + return &QMouseEvent{h: h, - QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} + QInputEvent: newQInputEvent(outptr_QInputEvent)} } // UnsafeNewQMouseEvent constructs the type using only unsafe pointers. -func UnsafeNewQMouseEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QMouseEvent { - if h == nil { - return nil - } - - return &QMouseEvent{h: (*C.QMouseEvent)(h), - QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} +func UnsafeNewQMouseEvent(h unsafe.Pointer) *QMouseEvent { + return newQMouseEvent((*C.QMouseEvent)(h)) } // NewQMouseEvent constructs a new QMouseEvent object. func NewQMouseEvent(typeVal QEvent__Type, localPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier) *QMouseEvent { - var outptr_QMouseEvent *C.QMouseEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMouseEvent_new((C.int)(typeVal), localPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), &outptr_QMouseEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQMouseEvent(outptr_QMouseEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQMouseEvent(C.QMouseEvent_new((C.int)(typeVal), localPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQMouseEvent2 constructs a new QMouseEvent object. func NewQMouseEvent2(typeVal QEvent__Type, localPos *QPointF, screenPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier) *QMouseEvent { - var outptr_QMouseEvent *C.QMouseEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMouseEvent_new2((C.int)(typeVal), localPos.cPointer(), screenPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), &outptr_QMouseEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQMouseEvent(outptr_QMouseEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQMouseEvent(C.QMouseEvent_new2((C.int)(typeVal), localPos.cPointer(), screenPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQMouseEvent3 constructs a new QMouseEvent object. func NewQMouseEvent3(typeVal QEvent__Type, localPos *QPointF, windowPos *QPointF, screenPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier) *QMouseEvent { - var outptr_QMouseEvent *C.QMouseEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMouseEvent_new3((C.int)(typeVal), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), &outptr_QMouseEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQMouseEvent(outptr_QMouseEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQMouseEvent(C.QMouseEvent_new3((C.int)(typeVal), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQMouseEvent4 constructs a new QMouseEvent object. func NewQMouseEvent4(typeVal QEvent__Type, localPos *QPointF, windowPos *QPointF, screenPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier, source MouseEventSource) *QMouseEvent { - var outptr_QMouseEvent *C.QMouseEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMouseEvent_new4((C.int)(typeVal), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), (C.int)(source), &outptr_QMouseEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQMouseEvent(outptr_QMouseEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQMouseEvent(C.QMouseEvent_new4((C.int)(typeVal), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), (C.int)(source))) ret.isSubclass = true return ret } // NewQMouseEvent5 constructs a new QMouseEvent object. func NewQMouseEvent5(param1 *QMouseEvent) *QMouseEvent { - var outptr_QMouseEvent *C.QMouseEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMouseEvent_new5(param1.cPointer(), &outptr_QMouseEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQMouseEvent(outptr_QMouseEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQMouseEvent(C.QMouseEvent_new5(param1.cPointer())) ret.isSubclass = true return ret } @@ -491,56 +450,42 @@ func (this *QHoverEvent) UnsafePointer() unsafe.Pointer { } // newQHoverEvent constructs the type using only CGO pointers. -func newQHoverEvent(h *C.QHoverEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QHoverEvent { +func newQHoverEvent(h *C.QHoverEvent) *QHoverEvent { if h == nil { return nil } + var outptr_QInputEvent *C.QInputEvent = nil + C.QHoverEvent_virtbase(h, &outptr_QInputEvent) + return &QHoverEvent{h: h, - QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} + QInputEvent: newQInputEvent(outptr_QInputEvent)} } // UnsafeNewQHoverEvent constructs the type using only unsafe pointers. -func UnsafeNewQHoverEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QHoverEvent { - if h == nil { - return nil - } - - return &QHoverEvent{h: (*C.QHoverEvent)(h), - QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} +func UnsafeNewQHoverEvent(h unsafe.Pointer) *QHoverEvent { + return newQHoverEvent((*C.QHoverEvent)(h)) } // NewQHoverEvent constructs a new QHoverEvent object. func NewQHoverEvent(typeVal QEvent__Type, pos *QPointF, oldPos *QPointF) *QHoverEvent { - var outptr_QHoverEvent *C.QHoverEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QHoverEvent_new((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), &outptr_QHoverEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQHoverEvent(outptr_QHoverEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQHoverEvent(C.QHoverEvent_new((C.int)(typeVal), pos.cPointer(), oldPos.cPointer())) ret.isSubclass = true return ret } // NewQHoverEvent2 constructs a new QHoverEvent object. func NewQHoverEvent2(param1 *QHoverEvent) *QHoverEvent { - var outptr_QHoverEvent *C.QHoverEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QHoverEvent_new2(param1.cPointer(), &outptr_QHoverEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQHoverEvent(outptr_QHoverEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQHoverEvent(C.QHoverEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQHoverEvent3 constructs a new QHoverEvent object. func NewQHoverEvent3(typeVal QEvent__Type, pos *QPointF, oldPos *QPointF, modifiers KeyboardModifier) *QHoverEvent { - var outptr_QHoverEvent *C.QHoverEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QHoverEvent_new3((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), (C.int)(modifiers), &outptr_QHoverEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQHoverEvent(outptr_QHoverEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQHoverEvent(C.QHoverEvent_new3((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), (C.int)(modifiers))) ret.isSubclass = true return ret } @@ -600,152 +545,106 @@ func (this *QWheelEvent) UnsafePointer() unsafe.Pointer { } // newQWheelEvent constructs the type using only CGO pointers. -func newQWheelEvent(h *C.QWheelEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QWheelEvent { +func newQWheelEvent(h *C.QWheelEvent) *QWheelEvent { if h == nil { return nil } + var outptr_QInputEvent *C.QInputEvent = nil + C.QWheelEvent_virtbase(h, &outptr_QInputEvent) + return &QWheelEvent{h: h, - QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} + QInputEvent: newQInputEvent(outptr_QInputEvent)} } // UnsafeNewQWheelEvent constructs the type using only unsafe pointers. -func UnsafeNewQWheelEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QWheelEvent { - if h == nil { - return nil - } - - return &QWheelEvent{h: (*C.QWheelEvent)(h), - QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} +func UnsafeNewQWheelEvent(h unsafe.Pointer) *QWheelEvent { + return newQWheelEvent((*C.QWheelEvent)(h)) } // NewQWheelEvent constructs a new QWheelEvent object. func NewQWheelEvent(pos *QPointF, delta int, buttons MouseButton, modifiers KeyboardModifier) *QWheelEvent { - var outptr_QWheelEvent *C.QWheelEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWheelEvent_new(pos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQWheelEvent(C.QWheelEvent_new(pos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQWheelEvent2 constructs a new QWheelEvent object. func NewQWheelEvent2(pos *QPointF, globalPos *QPointF, delta int, buttons MouseButton, modifiers KeyboardModifier) *QWheelEvent { - var outptr_QWheelEvent *C.QWheelEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWheelEvent_new2(pos.cPointer(), globalPos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQWheelEvent(C.QWheelEvent_new2(pos.cPointer(), globalPos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQWheelEvent3 constructs a new QWheelEvent object. func NewQWheelEvent3(pos *QPointF, globalPos *QPointF, pixelDelta QPoint, angleDelta QPoint, qt4Delta int, qt4Orientation Orientation, buttons MouseButton, modifiers KeyboardModifier) *QWheelEvent { - var outptr_QWheelEvent *C.QWheelEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWheelEvent_new3(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQWheelEvent(C.QWheelEvent_new3(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQWheelEvent4 constructs a new QWheelEvent object. func NewQWheelEvent4(pos *QPointF, globalPos *QPointF, pixelDelta QPoint, angleDelta QPoint, qt4Delta int, qt4Orientation Orientation, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase) *QWheelEvent { - var outptr_QWheelEvent *C.QWheelEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWheelEvent_new4(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQWheelEvent(C.QWheelEvent_new4(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase))) ret.isSubclass = true return ret } // NewQWheelEvent5 constructs a new QWheelEvent object. func NewQWheelEvent5(pos *QPointF, globalPos *QPointF, pixelDelta QPoint, angleDelta QPoint, qt4Delta int, qt4Orientation Orientation, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase, source MouseEventSource) *QWheelEvent { - var outptr_QWheelEvent *C.QWheelEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWheelEvent_new5(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.int)(source), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQWheelEvent(C.QWheelEvent_new5(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.int)(source))) ret.isSubclass = true return ret } // NewQWheelEvent6 constructs a new QWheelEvent object. func NewQWheelEvent6(pos *QPointF, globalPos *QPointF, pixelDelta QPoint, angleDelta QPoint, qt4Delta int, qt4Orientation Orientation, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase, source MouseEventSource, inverted bool) *QWheelEvent { - var outptr_QWheelEvent *C.QWheelEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWheelEvent_new6(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.int)(source), (C.bool)(inverted), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQWheelEvent(C.QWheelEvent_new6(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(qt4Delta), (C.int)(qt4Orientation), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.int)(source), (C.bool)(inverted))) ret.isSubclass = true return ret } // NewQWheelEvent7 constructs a new QWheelEvent object. func NewQWheelEvent7(pos QPointF, globalPos QPointF, pixelDelta QPoint, angleDelta QPoint, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase, inverted bool) *QWheelEvent { - var outptr_QWheelEvent *C.QWheelEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWheelEvent_new7(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQWheelEvent(C.QWheelEvent_new7(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted))) ret.isSubclass = true return ret } // NewQWheelEvent8 constructs a new QWheelEvent object. func NewQWheelEvent8(param1 *QWheelEvent) *QWheelEvent { - var outptr_QWheelEvent *C.QWheelEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWheelEvent_new8(param1.cPointer(), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQWheelEvent(C.QWheelEvent_new8(param1.cPointer())) ret.isSubclass = true return ret } // NewQWheelEvent9 constructs a new QWheelEvent object. func NewQWheelEvent9(pos *QPointF, delta int, buttons MouseButton, modifiers KeyboardModifier, orient Orientation) *QWheelEvent { - var outptr_QWheelEvent *C.QWheelEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWheelEvent_new9(pos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers), (C.int)(orient), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQWheelEvent(C.QWheelEvent_new9(pos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers), (C.int)(orient))) ret.isSubclass = true return ret } // NewQWheelEvent10 constructs a new QWheelEvent object. func NewQWheelEvent10(pos *QPointF, globalPos *QPointF, delta int, buttons MouseButton, modifiers KeyboardModifier, orient Orientation) *QWheelEvent { - var outptr_QWheelEvent *C.QWheelEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWheelEvent_new10(pos.cPointer(), globalPos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers), (C.int)(orient), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQWheelEvent(C.QWheelEvent_new10(pos.cPointer(), globalPos.cPointer(), (C.int)(delta), (C.int)(buttons), (C.int)(modifiers), (C.int)(orient))) ret.isSubclass = true return ret } // NewQWheelEvent11 constructs a new QWheelEvent object. func NewQWheelEvent11(pos QPointF, globalPos QPointF, pixelDelta QPoint, angleDelta QPoint, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase, inverted bool, source MouseEventSource) *QWheelEvent { - var outptr_QWheelEvent *C.QWheelEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWheelEvent_new11(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), (C.int)(source), &outptr_QWheelEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQWheelEvent(outptr_QWheelEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQWheelEvent(C.QWheelEvent_new11(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), (C.int)(source))) ret.isSubclass = true return ret } @@ -869,56 +768,42 @@ func (this *QTabletEvent) UnsafePointer() unsafe.Pointer { } // newQTabletEvent constructs the type using only CGO pointers. -func newQTabletEvent(h *C.QTabletEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QTabletEvent { +func newQTabletEvent(h *C.QTabletEvent) *QTabletEvent { if h == nil { return nil } + var outptr_QInputEvent *C.QInputEvent = nil + C.QTabletEvent_virtbase(h, &outptr_QInputEvent) + return &QTabletEvent{h: h, - QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} + QInputEvent: newQInputEvent(outptr_QInputEvent)} } // UnsafeNewQTabletEvent constructs the type using only unsafe pointers. -func UnsafeNewQTabletEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QTabletEvent { - if h == nil { - return nil - } - - return &QTabletEvent{h: (*C.QTabletEvent)(h), - QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} +func UnsafeNewQTabletEvent(h unsafe.Pointer) *QTabletEvent { + return newQTabletEvent((*C.QTabletEvent)(h)) } // NewQTabletEvent constructs a new QTabletEvent object. func NewQTabletEvent(t QEvent__Type, pos *QPointF, globalPos *QPointF, device int, pointerType int, pressure float64, xTilt int, yTilt int, tangentialPressure float64, rotation float64, z int, keyState KeyboardModifier, uniqueID int64) *QTabletEvent { - var outptr_QTabletEvent *C.QTabletEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTabletEvent_new((C.int)(t), pos.cPointer(), globalPos.cPointer(), (C.int)(device), (C.int)(pointerType), (C.double)(pressure), (C.int)(xTilt), (C.int)(yTilt), (C.double)(tangentialPressure), (C.double)(rotation), (C.int)(z), (C.int)(keyState), (C.longlong)(uniqueID), &outptr_QTabletEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTabletEvent(outptr_QTabletEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTabletEvent(C.QTabletEvent_new((C.int)(t), pos.cPointer(), globalPos.cPointer(), (C.int)(device), (C.int)(pointerType), (C.double)(pressure), (C.int)(xTilt), (C.int)(yTilt), (C.double)(tangentialPressure), (C.double)(rotation), (C.int)(z), (C.int)(keyState), (C.longlong)(uniqueID))) ret.isSubclass = true return ret } // NewQTabletEvent2 constructs a new QTabletEvent object. func NewQTabletEvent2(t QEvent__Type, pos *QPointF, globalPos *QPointF, device int, pointerType int, pressure float64, xTilt int, yTilt int, tangentialPressure float64, rotation float64, z int, keyState KeyboardModifier, uniqueID int64, button MouseButton, buttons MouseButton) *QTabletEvent { - var outptr_QTabletEvent *C.QTabletEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTabletEvent_new2((C.int)(t), pos.cPointer(), globalPos.cPointer(), (C.int)(device), (C.int)(pointerType), (C.double)(pressure), (C.int)(xTilt), (C.int)(yTilt), (C.double)(tangentialPressure), (C.double)(rotation), (C.int)(z), (C.int)(keyState), (C.longlong)(uniqueID), (C.int)(button), (C.int)(buttons), &outptr_QTabletEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTabletEvent(outptr_QTabletEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTabletEvent(C.QTabletEvent_new2((C.int)(t), pos.cPointer(), globalPos.cPointer(), (C.int)(device), (C.int)(pointerType), (C.double)(pressure), (C.int)(xTilt), (C.int)(yTilt), (C.double)(tangentialPressure), (C.double)(rotation), (C.int)(z), (C.int)(keyState), (C.longlong)(uniqueID), (C.int)(button), (C.int)(buttons))) ret.isSubclass = true return ret } // NewQTabletEvent3 constructs a new QTabletEvent object. func NewQTabletEvent3(param1 *QTabletEvent) *QTabletEvent { - var outptr_QTabletEvent *C.QTabletEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTabletEvent_new3(param1.cPointer(), &outptr_QTabletEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTabletEvent(outptr_QTabletEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTabletEvent(C.QTabletEvent_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -1050,56 +935,42 @@ func (this *QNativeGestureEvent) UnsafePointer() unsafe.Pointer { } // newQNativeGestureEvent constructs the type using only CGO pointers. -func newQNativeGestureEvent(h *C.QNativeGestureEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QNativeGestureEvent { +func newQNativeGestureEvent(h *C.QNativeGestureEvent) *QNativeGestureEvent { if h == nil { return nil } + var outptr_QInputEvent *C.QInputEvent = nil + C.QNativeGestureEvent_virtbase(h, &outptr_QInputEvent) + return &QNativeGestureEvent{h: h, - QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} + QInputEvent: newQInputEvent(outptr_QInputEvent)} } // UnsafeNewQNativeGestureEvent constructs the type using only unsafe pointers. -func UnsafeNewQNativeGestureEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QNativeGestureEvent { - if h == nil { - return nil - } - - return &QNativeGestureEvent{h: (*C.QNativeGestureEvent)(h), - QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} +func UnsafeNewQNativeGestureEvent(h unsafe.Pointer) *QNativeGestureEvent { + return newQNativeGestureEvent((*C.QNativeGestureEvent)(h)) } // NewQNativeGestureEvent constructs a new QNativeGestureEvent object. func NewQNativeGestureEvent(typeVal NativeGestureType, localPos *QPointF, windowPos *QPointF, screenPos *QPointF, value float64, sequenceId uint64, intArgument uint64) *QNativeGestureEvent { - var outptr_QNativeGestureEvent *C.QNativeGestureEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QNativeGestureEvent_new((C.int)(typeVal), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.double)(value), (C.ulong)(sequenceId), (C.ulonglong)(intArgument), &outptr_QNativeGestureEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQNativeGestureEvent(outptr_QNativeGestureEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQNativeGestureEvent(C.QNativeGestureEvent_new((C.int)(typeVal), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.double)(value), (C.ulong)(sequenceId), (C.ulonglong)(intArgument))) ret.isSubclass = true return ret } // NewQNativeGestureEvent2 constructs a new QNativeGestureEvent object. func NewQNativeGestureEvent2(typeVal NativeGestureType, dev *QTouchDevice, localPos *QPointF, windowPos *QPointF, screenPos *QPointF, value float64, sequenceId uint64, intArgument uint64) *QNativeGestureEvent { - var outptr_QNativeGestureEvent *C.QNativeGestureEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QNativeGestureEvent_new2((C.int)(typeVal), dev.cPointer(), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.double)(value), (C.ulong)(sequenceId), (C.ulonglong)(intArgument), &outptr_QNativeGestureEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQNativeGestureEvent(outptr_QNativeGestureEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQNativeGestureEvent(C.QNativeGestureEvent_new2((C.int)(typeVal), dev.cPointer(), localPos.cPointer(), windowPos.cPointer(), screenPos.cPointer(), (C.double)(value), (C.ulong)(sequenceId), (C.ulonglong)(intArgument))) ret.isSubclass = true return ret } // NewQNativeGestureEvent3 constructs a new QNativeGestureEvent object. func NewQNativeGestureEvent3(param1 *QNativeGestureEvent) *QNativeGestureEvent { - var outptr_QNativeGestureEvent *C.QNativeGestureEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QNativeGestureEvent_new3(param1.cPointer(), &outptr_QNativeGestureEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQNativeGestureEvent(outptr_QNativeGestureEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQNativeGestureEvent(C.QNativeGestureEvent_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -1175,56 +1046,42 @@ func (this *QKeyEvent) UnsafePointer() unsafe.Pointer { } // newQKeyEvent constructs the type using only CGO pointers. -func newQKeyEvent(h *C.QKeyEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QKeyEvent { +func newQKeyEvent(h *C.QKeyEvent) *QKeyEvent { if h == nil { return nil } + var outptr_QInputEvent *C.QInputEvent = nil + C.QKeyEvent_virtbase(h, &outptr_QInputEvent) + return &QKeyEvent{h: h, - QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} + QInputEvent: newQInputEvent(outptr_QInputEvent)} } // UnsafeNewQKeyEvent constructs the type using only unsafe pointers. -func UnsafeNewQKeyEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QKeyEvent { - if h == nil { - return nil - } - - return &QKeyEvent{h: (*C.QKeyEvent)(h), - QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} +func UnsafeNewQKeyEvent(h unsafe.Pointer) *QKeyEvent { + return newQKeyEvent((*C.QKeyEvent)(h)) } // NewQKeyEvent constructs a new QKeyEvent object. func NewQKeyEvent(typeVal QEvent__Type, key int, modifiers KeyboardModifier) *QKeyEvent { - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new((C.int)(typeVal), (C.int)(key), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQKeyEvent2 constructs a new QKeyEvent object. func NewQKeyEvent2(typeVal QEvent__Type, key int, modifiers KeyboardModifier, nativeScanCode uint, nativeVirtualKey uint, nativeModifiers uint) *QKeyEvent { - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new2((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new2((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers))) ret.isSubclass = true return ret } // NewQKeyEvent3 constructs a new QKeyEvent object. func NewQKeyEvent3(param1 *QKeyEvent) *QKeyEvent { - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new3(param1.cPointer(), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -1235,12 +1092,8 @@ func NewQKeyEvent4(typeVal QEvent__Type, key int, modifiers KeyboardModifier, te text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new4((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new4((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms)) ret.isSubclass = true return ret } @@ -1251,12 +1104,8 @@ func NewQKeyEvent5(typeVal QEvent__Type, key int, modifiers KeyboardModifier, te text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new5((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new5((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep))) ret.isSubclass = true return ret } @@ -1267,12 +1116,8 @@ func NewQKeyEvent6(typeVal QEvent__Type, key int, modifiers KeyboardModifier, te text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new6((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new6((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count))) ret.isSubclass = true return ret } @@ -1283,12 +1128,8 @@ func NewQKeyEvent7(typeVal QEvent__Type, key int, modifiers KeyboardModifier, na text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new7((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new7((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms)) ret.isSubclass = true return ret } @@ -1299,12 +1140,8 @@ func NewQKeyEvent8(typeVal QEvent__Type, key int, modifiers KeyboardModifier, na text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new8((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new8((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep))) ret.isSubclass = true return ret } @@ -1315,12 +1152,8 @@ func NewQKeyEvent9(typeVal QEvent__Type, key int, modifiers KeyboardModifier, na text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new9((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new9((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count))) ret.isSubclass = true return ret } @@ -1399,53 +1232,42 @@ func (this *QFocusEvent) UnsafePointer() unsafe.Pointer { } // newQFocusEvent constructs the type using only CGO pointers. -func newQFocusEvent(h *C.QFocusEvent, h_QEvent *C.QEvent) *QFocusEvent { +func newQFocusEvent(h *C.QFocusEvent) *QFocusEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QFocusEvent_virtbase(h, &outptr_QEvent) + return &QFocusEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQFocusEvent constructs the type using only unsafe pointers. -func UnsafeNewQFocusEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QFocusEvent { - if h == nil { - return nil - } - - return &QFocusEvent{h: (*C.QFocusEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQFocusEvent(h unsafe.Pointer) *QFocusEvent { + return newQFocusEvent((*C.QFocusEvent)(h)) } // NewQFocusEvent constructs a new QFocusEvent object. func NewQFocusEvent(typeVal QEvent__Type) *QFocusEvent { - var outptr_QFocusEvent *C.QFocusEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QFocusEvent_new((C.int)(typeVal), &outptr_QFocusEvent, &outptr_QEvent) - ret := newQFocusEvent(outptr_QFocusEvent, outptr_QEvent) + ret := newQFocusEvent(C.QFocusEvent_new((C.int)(typeVal))) ret.isSubclass = true return ret } // NewQFocusEvent2 constructs a new QFocusEvent object. func NewQFocusEvent2(param1 *QFocusEvent) *QFocusEvent { - var outptr_QFocusEvent *C.QFocusEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QFocusEvent_new2(param1.cPointer(), &outptr_QFocusEvent, &outptr_QEvent) - ret := newQFocusEvent(outptr_QFocusEvent, outptr_QEvent) + ret := newQFocusEvent(C.QFocusEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQFocusEvent3 constructs a new QFocusEvent object. func NewQFocusEvent3(typeVal QEvent__Type, reason FocusReason) *QFocusEvent { - var outptr_QFocusEvent *C.QFocusEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QFocusEvent_new3((C.int)(typeVal), (C.int)(reason), &outptr_QFocusEvent, &outptr_QEvent) - ret := newQFocusEvent(outptr_QFocusEvent, outptr_QEvent) + ret := newQFocusEvent(C.QFocusEvent_new3((C.int)(typeVal), (C.int)(reason))) ret.isSubclass = true return ret } @@ -1497,53 +1319,42 @@ func (this *QPaintEvent) UnsafePointer() unsafe.Pointer { } // newQPaintEvent constructs the type using only CGO pointers. -func newQPaintEvent(h *C.QPaintEvent, h_QEvent *C.QEvent) *QPaintEvent { +func newQPaintEvent(h *C.QPaintEvent) *QPaintEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QPaintEvent_virtbase(h, &outptr_QEvent) + return &QPaintEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQPaintEvent constructs the type using only unsafe pointers. -func UnsafeNewQPaintEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QPaintEvent { - if h == nil { - return nil - } - - return &QPaintEvent{h: (*C.QPaintEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQPaintEvent(h unsafe.Pointer) *QPaintEvent { + return newQPaintEvent((*C.QPaintEvent)(h)) } // NewQPaintEvent constructs a new QPaintEvent object. func NewQPaintEvent(paintRegion *QRegion) *QPaintEvent { - var outptr_QPaintEvent *C.QPaintEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QPaintEvent_new(paintRegion.cPointer(), &outptr_QPaintEvent, &outptr_QEvent) - ret := newQPaintEvent(outptr_QPaintEvent, outptr_QEvent) + ret := newQPaintEvent(C.QPaintEvent_new(paintRegion.cPointer())) ret.isSubclass = true return ret } // NewQPaintEvent2 constructs a new QPaintEvent object. func NewQPaintEvent2(paintRect *QRect) *QPaintEvent { - var outptr_QPaintEvent *C.QPaintEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QPaintEvent_new2(paintRect.cPointer(), &outptr_QPaintEvent, &outptr_QEvent) - ret := newQPaintEvent(outptr_QPaintEvent, outptr_QEvent) + ret := newQPaintEvent(C.QPaintEvent_new2(paintRect.cPointer())) ret.isSubclass = true return ret } // NewQPaintEvent3 constructs a new QPaintEvent object. func NewQPaintEvent3(param1 *QPaintEvent) *QPaintEvent { - var outptr_QPaintEvent *C.QPaintEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QPaintEvent_new3(param1.cPointer(), &outptr_QPaintEvent, &outptr_QEvent) - ret := newQPaintEvent(outptr_QPaintEvent, outptr_QEvent) + ret := newQPaintEvent(C.QPaintEvent_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -1591,42 +1402,34 @@ func (this *QMoveEvent) UnsafePointer() unsafe.Pointer { } // newQMoveEvent constructs the type using only CGO pointers. -func newQMoveEvent(h *C.QMoveEvent, h_QEvent *C.QEvent) *QMoveEvent { +func newQMoveEvent(h *C.QMoveEvent) *QMoveEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QMoveEvent_virtbase(h, &outptr_QEvent) + return &QMoveEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQMoveEvent constructs the type using only unsafe pointers. -func UnsafeNewQMoveEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QMoveEvent { - if h == nil { - return nil - } - - return &QMoveEvent{h: (*C.QMoveEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQMoveEvent(h unsafe.Pointer) *QMoveEvent { + return newQMoveEvent((*C.QMoveEvent)(h)) } // NewQMoveEvent constructs a new QMoveEvent object. func NewQMoveEvent(pos *QPoint, oldPos *QPoint) *QMoveEvent { - var outptr_QMoveEvent *C.QMoveEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMoveEvent_new(pos.cPointer(), oldPos.cPointer(), &outptr_QMoveEvent, &outptr_QEvent) - ret := newQMoveEvent(outptr_QMoveEvent, outptr_QEvent) + ret := newQMoveEvent(C.QMoveEvent_new(pos.cPointer(), oldPos.cPointer())) ret.isSubclass = true return ret } // NewQMoveEvent2 constructs a new QMoveEvent object. func NewQMoveEvent2(param1 *QMoveEvent) *QMoveEvent { - var outptr_QMoveEvent *C.QMoveEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMoveEvent_new2(param1.cPointer(), &outptr_QMoveEvent, &outptr_QEvent) - ret := newQMoveEvent(outptr_QMoveEvent, outptr_QEvent) + ret := newQMoveEvent(C.QMoveEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1674,42 +1477,34 @@ func (this *QExposeEvent) UnsafePointer() unsafe.Pointer { } // newQExposeEvent constructs the type using only CGO pointers. -func newQExposeEvent(h *C.QExposeEvent, h_QEvent *C.QEvent) *QExposeEvent { +func newQExposeEvent(h *C.QExposeEvent) *QExposeEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QExposeEvent_virtbase(h, &outptr_QEvent) + return &QExposeEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQExposeEvent constructs the type using only unsafe pointers. -func UnsafeNewQExposeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QExposeEvent { - if h == nil { - return nil - } - - return &QExposeEvent{h: (*C.QExposeEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQExposeEvent(h unsafe.Pointer) *QExposeEvent { + return newQExposeEvent((*C.QExposeEvent)(h)) } // NewQExposeEvent constructs a new QExposeEvent object. func NewQExposeEvent(rgn *QRegion) *QExposeEvent { - var outptr_QExposeEvent *C.QExposeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QExposeEvent_new(rgn.cPointer(), &outptr_QExposeEvent, &outptr_QEvent) - ret := newQExposeEvent(outptr_QExposeEvent, outptr_QEvent) + ret := newQExposeEvent(C.QExposeEvent_new(rgn.cPointer())) ret.isSubclass = true return ret } // NewQExposeEvent2 constructs a new QExposeEvent object. func NewQExposeEvent2(param1 *QExposeEvent) *QExposeEvent { - var outptr_QExposeEvent *C.QExposeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QExposeEvent_new2(param1.cPointer(), &outptr_QExposeEvent, &outptr_QEvent) - ret := newQExposeEvent(outptr_QExposeEvent, outptr_QEvent) + ret := newQExposeEvent(C.QExposeEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1753,42 +1548,34 @@ func (this *QPlatformSurfaceEvent) UnsafePointer() unsafe.Pointer { } // newQPlatformSurfaceEvent constructs the type using only CGO pointers. -func newQPlatformSurfaceEvent(h *C.QPlatformSurfaceEvent, h_QEvent *C.QEvent) *QPlatformSurfaceEvent { +func newQPlatformSurfaceEvent(h *C.QPlatformSurfaceEvent) *QPlatformSurfaceEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QPlatformSurfaceEvent_virtbase(h, &outptr_QEvent) + return &QPlatformSurfaceEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQPlatformSurfaceEvent constructs the type using only unsafe pointers. -func UnsafeNewQPlatformSurfaceEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QPlatformSurfaceEvent { - if h == nil { - return nil - } - - return &QPlatformSurfaceEvent{h: (*C.QPlatformSurfaceEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQPlatformSurfaceEvent(h unsafe.Pointer) *QPlatformSurfaceEvent { + return newQPlatformSurfaceEvent((*C.QPlatformSurfaceEvent)(h)) } // NewQPlatformSurfaceEvent constructs a new QPlatformSurfaceEvent object. func NewQPlatformSurfaceEvent(surfaceEventType QPlatformSurfaceEvent__SurfaceEventType) *QPlatformSurfaceEvent { - var outptr_QPlatformSurfaceEvent *C.QPlatformSurfaceEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QPlatformSurfaceEvent_new((C.int)(surfaceEventType), &outptr_QPlatformSurfaceEvent, &outptr_QEvent) - ret := newQPlatformSurfaceEvent(outptr_QPlatformSurfaceEvent, outptr_QEvent) + ret := newQPlatformSurfaceEvent(C.QPlatformSurfaceEvent_new((C.int)(surfaceEventType))) ret.isSubclass = true return ret } // NewQPlatformSurfaceEvent2 constructs a new QPlatformSurfaceEvent object. func NewQPlatformSurfaceEvent2(param1 *QPlatformSurfaceEvent) *QPlatformSurfaceEvent { - var outptr_QPlatformSurfaceEvent *C.QPlatformSurfaceEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QPlatformSurfaceEvent_new2(param1.cPointer(), &outptr_QPlatformSurfaceEvent, &outptr_QEvent) - ret := newQPlatformSurfaceEvent(outptr_QPlatformSurfaceEvent, outptr_QEvent) + ret := newQPlatformSurfaceEvent(C.QPlatformSurfaceEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1832,42 +1619,34 @@ func (this *QResizeEvent) UnsafePointer() unsafe.Pointer { } // newQResizeEvent constructs the type using only CGO pointers. -func newQResizeEvent(h *C.QResizeEvent, h_QEvent *C.QEvent) *QResizeEvent { +func newQResizeEvent(h *C.QResizeEvent) *QResizeEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QResizeEvent_virtbase(h, &outptr_QEvent) + return &QResizeEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQResizeEvent constructs the type using only unsafe pointers. -func UnsafeNewQResizeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QResizeEvent { - if h == nil { - return nil - } - - return &QResizeEvent{h: (*C.QResizeEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQResizeEvent(h unsafe.Pointer) *QResizeEvent { + return newQResizeEvent((*C.QResizeEvent)(h)) } // NewQResizeEvent constructs a new QResizeEvent object. func NewQResizeEvent(size *QSize, oldSize *QSize) *QResizeEvent { - var outptr_QResizeEvent *C.QResizeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QResizeEvent_new(size.cPointer(), oldSize.cPointer(), &outptr_QResizeEvent, &outptr_QEvent) - ret := newQResizeEvent(outptr_QResizeEvent, outptr_QEvent) + ret := newQResizeEvent(C.QResizeEvent_new(size.cPointer(), oldSize.cPointer())) ret.isSubclass = true return ret } // NewQResizeEvent2 constructs a new QResizeEvent object. func NewQResizeEvent2(param1 *QResizeEvent) *QResizeEvent { - var outptr_QResizeEvent *C.QResizeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QResizeEvent_new2(param1.cPointer(), &outptr_QResizeEvent, &outptr_QEvent) - ret := newQResizeEvent(outptr_QResizeEvent, outptr_QEvent) + ret := newQResizeEvent(C.QResizeEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1915,42 +1694,34 @@ func (this *QCloseEvent) UnsafePointer() unsafe.Pointer { } // newQCloseEvent constructs the type using only CGO pointers. -func newQCloseEvent(h *C.QCloseEvent, h_QEvent *C.QEvent) *QCloseEvent { +func newQCloseEvent(h *C.QCloseEvent) *QCloseEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QCloseEvent_virtbase(h, &outptr_QEvent) + return &QCloseEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQCloseEvent constructs the type using only unsafe pointers. -func UnsafeNewQCloseEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QCloseEvent { - if h == nil { - return nil - } - - return &QCloseEvent{h: (*C.QCloseEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQCloseEvent(h unsafe.Pointer) *QCloseEvent { + return newQCloseEvent((*C.QCloseEvent)(h)) } // NewQCloseEvent constructs a new QCloseEvent object. func NewQCloseEvent() *QCloseEvent { - var outptr_QCloseEvent *C.QCloseEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QCloseEvent_new(&outptr_QCloseEvent, &outptr_QEvent) - ret := newQCloseEvent(outptr_QCloseEvent, outptr_QEvent) + ret := newQCloseEvent(C.QCloseEvent_new()) ret.isSubclass = true return ret } // NewQCloseEvent2 constructs a new QCloseEvent object. func NewQCloseEvent2(param1 *QCloseEvent) *QCloseEvent { - var outptr_QCloseEvent *C.QCloseEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QCloseEvent_new2(param1.cPointer(), &outptr_QCloseEvent, &outptr_QEvent) - ret := newQCloseEvent(outptr_QCloseEvent, outptr_QEvent) + ret := newQCloseEvent(C.QCloseEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1994,42 +1765,34 @@ func (this *QIconDragEvent) UnsafePointer() unsafe.Pointer { } // newQIconDragEvent constructs the type using only CGO pointers. -func newQIconDragEvent(h *C.QIconDragEvent, h_QEvent *C.QEvent) *QIconDragEvent { +func newQIconDragEvent(h *C.QIconDragEvent) *QIconDragEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QIconDragEvent_virtbase(h, &outptr_QEvent) + return &QIconDragEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQIconDragEvent constructs the type using only unsafe pointers. -func UnsafeNewQIconDragEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QIconDragEvent { - if h == nil { - return nil - } - - return &QIconDragEvent{h: (*C.QIconDragEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQIconDragEvent(h unsafe.Pointer) *QIconDragEvent { + return newQIconDragEvent((*C.QIconDragEvent)(h)) } // NewQIconDragEvent constructs a new QIconDragEvent object. func NewQIconDragEvent() *QIconDragEvent { - var outptr_QIconDragEvent *C.QIconDragEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QIconDragEvent_new(&outptr_QIconDragEvent, &outptr_QEvent) - ret := newQIconDragEvent(outptr_QIconDragEvent, outptr_QEvent) + ret := newQIconDragEvent(C.QIconDragEvent_new()) ret.isSubclass = true return ret } // NewQIconDragEvent2 constructs a new QIconDragEvent object. func NewQIconDragEvent2(param1 *QIconDragEvent) *QIconDragEvent { - var outptr_QIconDragEvent *C.QIconDragEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QIconDragEvent_new2(param1.cPointer(), &outptr_QIconDragEvent, &outptr_QEvent) - ret := newQIconDragEvent(outptr_QIconDragEvent, outptr_QEvent) + ret := newQIconDragEvent(C.QIconDragEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -2073,42 +1836,34 @@ func (this *QShowEvent) UnsafePointer() unsafe.Pointer { } // newQShowEvent constructs the type using only CGO pointers. -func newQShowEvent(h *C.QShowEvent, h_QEvent *C.QEvent) *QShowEvent { +func newQShowEvent(h *C.QShowEvent) *QShowEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QShowEvent_virtbase(h, &outptr_QEvent) + return &QShowEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQShowEvent constructs the type using only unsafe pointers. -func UnsafeNewQShowEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QShowEvent { - if h == nil { - return nil - } - - return &QShowEvent{h: (*C.QShowEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQShowEvent(h unsafe.Pointer) *QShowEvent { + return newQShowEvent((*C.QShowEvent)(h)) } // NewQShowEvent constructs a new QShowEvent object. func NewQShowEvent() *QShowEvent { - var outptr_QShowEvent *C.QShowEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QShowEvent_new(&outptr_QShowEvent, &outptr_QEvent) - ret := newQShowEvent(outptr_QShowEvent, outptr_QEvent) + ret := newQShowEvent(C.QShowEvent_new()) ret.isSubclass = true return ret } // NewQShowEvent2 constructs a new QShowEvent object. func NewQShowEvent2(param1 *QShowEvent) *QShowEvent { - var outptr_QShowEvent *C.QShowEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QShowEvent_new2(param1.cPointer(), &outptr_QShowEvent, &outptr_QEvent) - ret := newQShowEvent(outptr_QShowEvent, outptr_QEvent) + ret := newQShowEvent(C.QShowEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -2152,42 +1907,34 @@ func (this *QHideEvent) UnsafePointer() unsafe.Pointer { } // newQHideEvent constructs the type using only CGO pointers. -func newQHideEvent(h *C.QHideEvent, h_QEvent *C.QEvent) *QHideEvent { +func newQHideEvent(h *C.QHideEvent) *QHideEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QHideEvent_virtbase(h, &outptr_QEvent) + return &QHideEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQHideEvent constructs the type using only unsafe pointers. -func UnsafeNewQHideEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QHideEvent { - if h == nil { - return nil - } - - return &QHideEvent{h: (*C.QHideEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQHideEvent(h unsafe.Pointer) *QHideEvent { + return newQHideEvent((*C.QHideEvent)(h)) } // NewQHideEvent constructs a new QHideEvent object. func NewQHideEvent() *QHideEvent { - var outptr_QHideEvent *C.QHideEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QHideEvent_new(&outptr_QHideEvent, &outptr_QEvent) - ret := newQHideEvent(outptr_QHideEvent, outptr_QEvent) + ret := newQHideEvent(C.QHideEvent_new()) ret.isSubclass = true return ret } // NewQHideEvent2 constructs a new QHideEvent object. func NewQHideEvent2(param1 *QHideEvent) *QHideEvent { - var outptr_QHideEvent *C.QHideEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QHideEvent_new2(param1.cPointer(), &outptr_QHideEvent, &outptr_QEvent) - ret := newQHideEvent(outptr_QHideEvent, outptr_QEvent) + ret := newQHideEvent(C.QHideEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -2231,68 +1978,50 @@ func (this *QContextMenuEvent) UnsafePointer() unsafe.Pointer { } // newQContextMenuEvent constructs the type using only CGO pointers. -func newQContextMenuEvent(h *C.QContextMenuEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QContextMenuEvent { +func newQContextMenuEvent(h *C.QContextMenuEvent) *QContextMenuEvent { if h == nil { return nil } + var outptr_QInputEvent *C.QInputEvent = nil + C.QContextMenuEvent_virtbase(h, &outptr_QInputEvent) + return &QContextMenuEvent{h: h, - QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} + QInputEvent: newQInputEvent(outptr_QInputEvent)} } // UnsafeNewQContextMenuEvent constructs the type using only unsafe pointers. -func UnsafeNewQContextMenuEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QContextMenuEvent { - if h == nil { - return nil - } - - return &QContextMenuEvent{h: (*C.QContextMenuEvent)(h), - QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} +func UnsafeNewQContextMenuEvent(h unsafe.Pointer) *QContextMenuEvent { + return newQContextMenuEvent((*C.QContextMenuEvent)(h)) } // NewQContextMenuEvent constructs a new QContextMenuEvent object. func NewQContextMenuEvent(reason QContextMenuEvent__Reason, pos *QPoint, globalPos *QPoint, modifiers KeyboardModifier) *QContextMenuEvent { - var outptr_QContextMenuEvent *C.QContextMenuEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QContextMenuEvent_new((C.int)(reason), pos.cPointer(), globalPos.cPointer(), (C.int)(modifiers), &outptr_QContextMenuEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQContextMenuEvent(outptr_QContextMenuEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQContextMenuEvent(C.QContextMenuEvent_new((C.int)(reason), pos.cPointer(), globalPos.cPointer(), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQContextMenuEvent2 constructs a new QContextMenuEvent object. func NewQContextMenuEvent2(reason QContextMenuEvent__Reason, pos *QPoint, globalPos *QPoint) *QContextMenuEvent { - var outptr_QContextMenuEvent *C.QContextMenuEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QContextMenuEvent_new2((C.int)(reason), pos.cPointer(), globalPos.cPointer(), &outptr_QContextMenuEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQContextMenuEvent(outptr_QContextMenuEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQContextMenuEvent(C.QContextMenuEvent_new2((C.int)(reason), pos.cPointer(), globalPos.cPointer())) ret.isSubclass = true return ret } // NewQContextMenuEvent3 constructs a new QContextMenuEvent object. func NewQContextMenuEvent3(reason QContextMenuEvent__Reason, pos *QPoint) *QContextMenuEvent { - var outptr_QContextMenuEvent *C.QContextMenuEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QContextMenuEvent_new3((C.int)(reason), pos.cPointer(), &outptr_QContextMenuEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQContextMenuEvent(outptr_QContextMenuEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQContextMenuEvent(C.QContextMenuEvent_new3((C.int)(reason), pos.cPointer())) ret.isSubclass = true return ret } // NewQContextMenuEvent4 constructs a new QContextMenuEvent object. func NewQContextMenuEvent4(param1 *QContextMenuEvent) *QContextMenuEvent { - var outptr_QContextMenuEvent *C.QContextMenuEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QContextMenuEvent_new4(param1.cPointer(), &outptr_QContextMenuEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQContextMenuEvent(outptr_QContextMenuEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQContextMenuEvent(C.QContextMenuEvent_new4(param1.cPointer())) ret.isSubclass = true return ret } @@ -2360,31 +2089,26 @@ func (this *QInputMethodEvent) UnsafePointer() unsafe.Pointer { } // newQInputMethodEvent constructs the type using only CGO pointers. -func newQInputMethodEvent(h *C.QInputMethodEvent, h_QEvent *C.QEvent) *QInputMethodEvent { +func newQInputMethodEvent(h *C.QInputMethodEvent) *QInputMethodEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QInputMethodEvent_virtbase(h, &outptr_QEvent) + return &QInputMethodEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQInputMethodEvent constructs the type using only unsafe pointers. -func UnsafeNewQInputMethodEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QInputMethodEvent { - if h == nil { - return nil - } - - return &QInputMethodEvent{h: (*C.QInputMethodEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQInputMethodEvent(h unsafe.Pointer) *QInputMethodEvent { + return newQInputMethodEvent((*C.QInputMethodEvent)(h)) } // NewQInputMethodEvent constructs a new QInputMethodEvent object. func NewQInputMethodEvent() *QInputMethodEvent { - var outptr_QInputMethodEvent *C.QInputMethodEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QInputMethodEvent_new(&outptr_QInputMethodEvent, &outptr_QEvent) - ret := newQInputMethodEvent(outptr_QInputMethodEvent, outptr_QEvent) + ret := newQInputMethodEvent(C.QInputMethodEvent_new()) ret.isSubclass = true return ret } @@ -2401,22 +2125,16 @@ func NewQInputMethodEvent2(preeditText string, attributes []QInputMethodEvent__A attributes_CArray[i] = attributes[i].cPointer() } attributes_ma := C.struct_miqt_array{len: C.size_t(len(attributes)), data: unsafe.Pointer(attributes_CArray)} - var outptr_QInputMethodEvent *C.QInputMethodEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QInputMethodEvent_new2(preeditText_ms, attributes_ma, &outptr_QInputMethodEvent, &outptr_QEvent) - ret := newQInputMethodEvent(outptr_QInputMethodEvent, outptr_QEvent) + ret := newQInputMethodEvent(C.QInputMethodEvent_new2(preeditText_ms, attributes_ma)) ret.isSubclass = true return ret } // NewQInputMethodEvent3 constructs a new QInputMethodEvent object. func NewQInputMethodEvent3(other *QInputMethodEvent) *QInputMethodEvent { - var outptr_QInputMethodEvent *C.QInputMethodEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QInputMethodEvent_new3(other.cPointer(), &outptr_QInputMethodEvent, &outptr_QEvent) - ret := newQInputMethodEvent(outptr_QInputMethodEvent, outptr_QEvent) + ret := newQInputMethodEvent(C.QInputMethodEvent_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -2514,42 +2232,34 @@ func (this *QInputMethodQueryEvent) UnsafePointer() unsafe.Pointer { } // newQInputMethodQueryEvent constructs the type using only CGO pointers. -func newQInputMethodQueryEvent(h *C.QInputMethodQueryEvent, h_QEvent *C.QEvent) *QInputMethodQueryEvent { +func newQInputMethodQueryEvent(h *C.QInputMethodQueryEvent) *QInputMethodQueryEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QInputMethodQueryEvent_virtbase(h, &outptr_QEvent) + return &QInputMethodQueryEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQInputMethodQueryEvent constructs the type using only unsafe pointers. -func UnsafeNewQInputMethodQueryEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QInputMethodQueryEvent { - if h == nil { - return nil - } - - return &QInputMethodQueryEvent{h: (*C.QInputMethodQueryEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQInputMethodQueryEvent(h unsafe.Pointer) *QInputMethodQueryEvent { + return newQInputMethodQueryEvent((*C.QInputMethodQueryEvent)(h)) } // NewQInputMethodQueryEvent constructs a new QInputMethodQueryEvent object. func NewQInputMethodQueryEvent(queries InputMethodQuery) *QInputMethodQueryEvent { - var outptr_QInputMethodQueryEvent *C.QInputMethodQueryEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QInputMethodQueryEvent_new((C.int)(queries), &outptr_QInputMethodQueryEvent, &outptr_QEvent) - ret := newQInputMethodQueryEvent(outptr_QInputMethodQueryEvent, outptr_QEvent) + ret := newQInputMethodQueryEvent(C.QInputMethodQueryEvent_new((C.int)(queries))) ret.isSubclass = true return ret } // NewQInputMethodQueryEvent2 constructs a new QInputMethodQueryEvent object. func NewQInputMethodQueryEvent2(param1 *QInputMethodQueryEvent) *QInputMethodQueryEvent { - var outptr_QInputMethodQueryEvent *C.QInputMethodQueryEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QInputMethodQueryEvent_new2(param1.cPointer(), &outptr_QInputMethodQueryEvent, &outptr_QEvent) - ret := newQInputMethodQueryEvent(outptr_QInputMethodQueryEvent, outptr_QEvent) + ret := newQInputMethodQueryEvent(C.QInputMethodQueryEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -2603,53 +2313,42 @@ func (this *QDropEvent) UnsafePointer() unsafe.Pointer { } // newQDropEvent constructs the type using only CGO pointers. -func newQDropEvent(h *C.QDropEvent, h_QEvent *C.QEvent) *QDropEvent { +func newQDropEvent(h *C.QDropEvent) *QDropEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QDropEvent_virtbase(h, &outptr_QEvent) + return &QDropEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQDropEvent constructs the type using only unsafe pointers. -func UnsafeNewQDropEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QDropEvent { - if h == nil { - return nil - } - - return &QDropEvent{h: (*C.QDropEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQDropEvent(h unsafe.Pointer) *QDropEvent { + return newQDropEvent((*C.QDropEvent)(h)) } // NewQDropEvent constructs a new QDropEvent object. func NewQDropEvent(pos *QPointF, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier) *QDropEvent { - var outptr_QDropEvent *C.QDropEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDropEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), &outptr_QDropEvent, &outptr_QEvent) - ret := newQDropEvent(outptr_QDropEvent, outptr_QEvent) + ret := newQDropEvent(C.QDropEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQDropEvent2 constructs a new QDropEvent object. func NewQDropEvent2(param1 *QDropEvent) *QDropEvent { - var outptr_QDropEvent *C.QDropEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDropEvent_new2(param1.cPointer(), &outptr_QDropEvent, &outptr_QEvent) - ret := newQDropEvent(outptr_QDropEvent, outptr_QEvent) + ret := newQDropEvent(C.QDropEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQDropEvent3 constructs a new QDropEvent object. func NewQDropEvent3(pos *QPointF, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier, typeVal QEvent__Type) *QDropEvent { - var outptr_QDropEvent *C.QDropEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDropEvent_new3(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal), &outptr_QDropEvent, &outptr_QEvent) - ret := newQDropEvent(outptr_QDropEvent, outptr_QEvent) + ret := newQDropEvent(C.QDropEvent_new3(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -2697,7 +2396,7 @@ func (this *QDropEvent) Source() *QObject { } func (this *QDropEvent) MimeData() *QMimeData { - return newQMimeData(C.QDropEvent_MimeData(this.h), nil) + return newQMimeData(C.QDropEvent_MimeData(this.h)) } // Delete this object from C++ memory. @@ -2735,56 +2434,42 @@ func (this *QDragMoveEvent) UnsafePointer() unsafe.Pointer { } // newQDragMoveEvent constructs the type using only CGO pointers. -func newQDragMoveEvent(h *C.QDragMoveEvent, h_QDropEvent *C.QDropEvent, h_QEvent *C.QEvent) *QDragMoveEvent { +func newQDragMoveEvent(h *C.QDragMoveEvent) *QDragMoveEvent { if h == nil { return nil } + var outptr_QDropEvent *C.QDropEvent = nil + C.QDragMoveEvent_virtbase(h, &outptr_QDropEvent) + return &QDragMoveEvent{h: h, - QDropEvent: newQDropEvent(h_QDropEvent, h_QEvent)} + QDropEvent: newQDropEvent(outptr_QDropEvent)} } // UnsafeNewQDragMoveEvent constructs the type using only unsafe pointers. -func UnsafeNewQDragMoveEvent(h unsafe.Pointer, h_QDropEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QDragMoveEvent { - if h == nil { - return nil - } - - return &QDragMoveEvent{h: (*C.QDragMoveEvent)(h), - QDropEvent: UnsafeNewQDropEvent(h_QDropEvent, h_QEvent)} +func UnsafeNewQDragMoveEvent(h unsafe.Pointer) *QDragMoveEvent { + return newQDragMoveEvent((*C.QDragMoveEvent)(h)) } // NewQDragMoveEvent constructs a new QDragMoveEvent object. func NewQDragMoveEvent(pos *QPoint, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier) *QDragMoveEvent { - var outptr_QDragMoveEvent *C.QDragMoveEvent = nil - var outptr_QDropEvent *C.QDropEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDragMoveEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) - ret := newQDragMoveEvent(outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret := newQDragMoveEvent(C.QDragMoveEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQDragMoveEvent2 constructs a new QDragMoveEvent object. func NewQDragMoveEvent2(param1 *QDragMoveEvent) *QDragMoveEvent { - var outptr_QDragMoveEvent *C.QDragMoveEvent = nil - var outptr_QDropEvent *C.QDropEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDragMoveEvent_new2(param1.cPointer(), &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) - ret := newQDragMoveEvent(outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret := newQDragMoveEvent(C.QDragMoveEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQDragMoveEvent3 constructs a new QDragMoveEvent object. func NewQDragMoveEvent3(pos *QPoint, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier, typeVal QEvent__Type) *QDragMoveEvent { - var outptr_QDragMoveEvent *C.QDragMoveEvent = nil - var outptr_QDropEvent *C.QDropEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDragMoveEvent_new3(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal), &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) - ret := newQDragMoveEvent(outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret := newQDragMoveEvent(C.QDragMoveEvent_new3(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -2846,46 +2531,34 @@ func (this *QDragEnterEvent) UnsafePointer() unsafe.Pointer { } // newQDragEnterEvent constructs the type using only CGO pointers. -func newQDragEnterEvent(h *C.QDragEnterEvent, h_QDragMoveEvent *C.QDragMoveEvent, h_QDropEvent *C.QDropEvent, h_QEvent *C.QEvent) *QDragEnterEvent { +func newQDragEnterEvent(h *C.QDragEnterEvent) *QDragEnterEvent { if h == nil { return nil } + var outptr_QDragMoveEvent *C.QDragMoveEvent = nil + C.QDragEnterEvent_virtbase(h, &outptr_QDragMoveEvent) + return &QDragEnterEvent{h: h, - QDragMoveEvent: newQDragMoveEvent(h_QDragMoveEvent, h_QDropEvent, h_QEvent)} + QDragMoveEvent: newQDragMoveEvent(outptr_QDragMoveEvent)} } // UnsafeNewQDragEnterEvent constructs the type using only unsafe pointers. -func UnsafeNewQDragEnterEvent(h unsafe.Pointer, h_QDragMoveEvent unsafe.Pointer, h_QDropEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QDragEnterEvent { - if h == nil { - return nil - } - - return &QDragEnterEvent{h: (*C.QDragEnterEvent)(h), - QDragMoveEvent: UnsafeNewQDragMoveEvent(h_QDragMoveEvent, h_QDropEvent, h_QEvent)} +func UnsafeNewQDragEnterEvent(h unsafe.Pointer) *QDragEnterEvent { + return newQDragEnterEvent((*C.QDragEnterEvent)(h)) } // NewQDragEnterEvent constructs a new QDragEnterEvent object. func NewQDragEnterEvent(pos *QPoint, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier) *QDragEnterEvent { - var outptr_QDragEnterEvent *C.QDragEnterEvent = nil - var outptr_QDragMoveEvent *C.QDragMoveEvent = nil - var outptr_QDropEvent *C.QDropEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDragEnterEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), &outptr_QDragEnterEvent, &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) - ret := newQDragEnterEvent(outptr_QDragEnterEvent, outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret := newQDragEnterEvent(C.QDragEnterEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQDragEnterEvent2 constructs a new QDragEnterEvent object. func NewQDragEnterEvent2(param1 *QDragEnterEvent) *QDragEnterEvent { - var outptr_QDragEnterEvent *C.QDragEnterEvent = nil - var outptr_QDragMoveEvent *C.QDragMoveEvent = nil - var outptr_QDropEvent *C.QDropEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDragEnterEvent_new2(param1.cPointer(), &outptr_QDragEnterEvent, &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) - ret := newQDragEnterEvent(outptr_QDragEnterEvent, outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret := newQDragEnterEvent(C.QDragEnterEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -2929,42 +2602,34 @@ func (this *QDragLeaveEvent) UnsafePointer() unsafe.Pointer { } // newQDragLeaveEvent constructs the type using only CGO pointers. -func newQDragLeaveEvent(h *C.QDragLeaveEvent, h_QEvent *C.QEvent) *QDragLeaveEvent { +func newQDragLeaveEvent(h *C.QDragLeaveEvent) *QDragLeaveEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QDragLeaveEvent_virtbase(h, &outptr_QEvent) + return &QDragLeaveEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQDragLeaveEvent constructs the type using only unsafe pointers. -func UnsafeNewQDragLeaveEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QDragLeaveEvent { - if h == nil { - return nil - } - - return &QDragLeaveEvent{h: (*C.QDragLeaveEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQDragLeaveEvent(h unsafe.Pointer) *QDragLeaveEvent { + return newQDragLeaveEvent((*C.QDragLeaveEvent)(h)) } // NewQDragLeaveEvent constructs a new QDragLeaveEvent object. func NewQDragLeaveEvent() *QDragLeaveEvent { - var outptr_QDragLeaveEvent *C.QDragLeaveEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDragLeaveEvent_new(&outptr_QDragLeaveEvent, &outptr_QEvent) - ret := newQDragLeaveEvent(outptr_QDragLeaveEvent, outptr_QEvent) + ret := newQDragLeaveEvent(C.QDragLeaveEvent_new()) ret.isSubclass = true return ret } // NewQDragLeaveEvent2 constructs a new QDragLeaveEvent object. func NewQDragLeaveEvent2(param1 *QDragLeaveEvent) *QDragLeaveEvent { - var outptr_QDragLeaveEvent *C.QDragLeaveEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDragLeaveEvent_new2(param1.cPointer(), &outptr_QDragLeaveEvent, &outptr_QEvent) - ret := newQDragLeaveEvent(outptr_QDragLeaveEvent, outptr_QEvent) + ret := newQDragLeaveEvent(C.QDragLeaveEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -3008,42 +2673,34 @@ func (this *QHelpEvent) UnsafePointer() unsafe.Pointer { } // newQHelpEvent constructs the type using only CGO pointers. -func newQHelpEvent(h *C.QHelpEvent, h_QEvent *C.QEvent) *QHelpEvent { +func newQHelpEvent(h *C.QHelpEvent) *QHelpEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QHelpEvent_virtbase(h, &outptr_QEvent) + return &QHelpEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQHelpEvent constructs the type using only unsafe pointers. -func UnsafeNewQHelpEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QHelpEvent { - if h == nil { - return nil - } - - return &QHelpEvent{h: (*C.QHelpEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQHelpEvent(h unsafe.Pointer) *QHelpEvent { + return newQHelpEvent((*C.QHelpEvent)(h)) } // NewQHelpEvent constructs a new QHelpEvent object. func NewQHelpEvent(typeVal QEvent__Type, pos *QPoint, globalPos *QPoint) *QHelpEvent { - var outptr_QHelpEvent *C.QHelpEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QHelpEvent_new((C.int)(typeVal), pos.cPointer(), globalPos.cPointer(), &outptr_QHelpEvent, &outptr_QEvent) - ret := newQHelpEvent(outptr_QHelpEvent, outptr_QEvent) + ret := newQHelpEvent(C.QHelpEvent_new((C.int)(typeVal), pos.cPointer(), globalPos.cPointer())) ret.isSubclass = true return ret } // NewQHelpEvent2 constructs a new QHelpEvent object. func NewQHelpEvent2(param1 *QHelpEvent) *QHelpEvent { - var outptr_QHelpEvent *C.QHelpEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QHelpEvent_new2(param1.cPointer(), &outptr_QHelpEvent, &outptr_QEvent) - ret := newQHelpEvent(outptr_QHelpEvent, outptr_QEvent) + ret := newQHelpEvent(C.QHelpEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -3107,22 +2764,20 @@ func (this *QStatusTipEvent) UnsafePointer() unsafe.Pointer { } // newQStatusTipEvent constructs the type using only CGO pointers. -func newQStatusTipEvent(h *C.QStatusTipEvent, h_QEvent *C.QEvent) *QStatusTipEvent { +func newQStatusTipEvent(h *C.QStatusTipEvent) *QStatusTipEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QStatusTipEvent_virtbase(h, &outptr_QEvent) + return &QStatusTipEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQStatusTipEvent constructs the type using only unsafe pointers. -func UnsafeNewQStatusTipEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QStatusTipEvent { - if h == nil { - return nil - } - - return &QStatusTipEvent{h: (*C.QStatusTipEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQStatusTipEvent(h unsafe.Pointer) *QStatusTipEvent { + return newQStatusTipEvent((*C.QStatusTipEvent)(h)) } // NewQStatusTipEvent constructs a new QStatusTipEvent object. @@ -3131,22 +2786,16 @@ func NewQStatusTipEvent(tip string) *QStatusTipEvent { tip_ms.data = C.CString(tip) tip_ms.len = C.size_t(len(tip)) defer C.free(unsafe.Pointer(tip_ms.data)) - var outptr_QStatusTipEvent *C.QStatusTipEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QStatusTipEvent_new(tip_ms, &outptr_QStatusTipEvent, &outptr_QEvent) - ret := newQStatusTipEvent(outptr_QStatusTipEvent, outptr_QEvent) + ret := newQStatusTipEvent(C.QStatusTipEvent_new(tip_ms)) ret.isSubclass = true return ret } // NewQStatusTipEvent2 constructs a new QStatusTipEvent object. func NewQStatusTipEvent2(param1 *QStatusTipEvent) *QStatusTipEvent { - var outptr_QStatusTipEvent *C.QStatusTipEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QStatusTipEvent_new2(param1.cPointer(), &outptr_QStatusTipEvent, &outptr_QEvent) - ret := newQStatusTipEvent(outptr_QStatusTipEvent, outptr_QEvent) + ret := newQStatusTipEvent(C.QStatusTipEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -3193,22 +2842,20 @@ func (this *QWhatsThisClickedEvent) UnsafePointer() unsafe.Pointer { } // newQWhatsThisClickedEvent constructs the type using only CGO pointers. -func newQWhatsThisClickedEvent(h *C.QWhatsThisClickedEvent, h_QEvent *C.QEvent) *QWhatsThisClickedEvent { +func newQWhatsThisClickedEvent(h *C.QWhatsThisClickedEvent) *QWhatsThisClickedEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QWhatsThisClickedEvent_virtbase(h, &outptr_QEvent) + return &QWhatsThisClickedEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQWhatsThisClickedEvent constructs the type using only unsafe pointers. -func UnsafeNewQWhatsThisClickedEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QWhatsThisClickedEvent { - if h == nil { - return nil - } - - return &QWhatsThisClickedEvent{h: (*C.QWhatsThisClickedEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQWhatsThisClickedEvent(h unsafe.Pointer) *QWhatsThisClickedEvent { + return newQWhatsThisClickedEvent((*C.QWhatsThisClickedEvent)(h)) } // NewQWhatsThisClickedEvent constructs a new QWhatsThisClickedEvent object. @@ -3217,22 +2864,16 @@ func NewQWhatsThisClickedEvent(href string) *QWhatsThisClickedEvent { href_ms.data = C.CString(href) href_ms.len = C.size_t(len(href)) defer C.free(unsafe.Pointer(href_ms.data)) - var outptr_QWhatsThisClickedEvent *C.QWhatsThisClickedEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWhatsThisClickedEvent_new(href_ms, &outptr_QWhatsThisClickedEvent, &outptr_QEvent) - ret := newQWhatsThisClickedEvent(outptr_QWhatsThisClickedEvent, outptr_QEvent) + ret := newQWhatsThisClickedEvent(C.QWhatsThisClickedEvent_new(href_ms)) ret.isSubclass = true return ret } // NewQWhatsThisClickedEvent2 constructs a new QWhatsThisClickedEvent object. func NewQWhatsThisClickedEvent2(param1 *QWhatsThisClickedEvent) *QWhatsThisClickedEvent { - var outptr_QWhatsThisClickedEvent *C.QWhatsThisClickedEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWhatsThisClickedEvent_new2(param1.cPointer(), &outptr_QWhatsThisClickedEvent, &outptr_QEvent) - ret := newQWhatsThisClickedEvent(outptr_QWhatsThisClickedEvent, outptr_QEvent) + ret := newQWhatsThisClickedEvent(C.QWhatsThisClickedEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -3279,63 +2920,52 @@ func (this *QActionEvent) UnsafePointer() unsafe.Pointer { } // newQActionEvent constructs the type using only CGO pointers. -func newQActionEvent(h *C.QActionEvent, h_QEvent *C.QEvent) *QActionEvent { +func newQActionEvent(h *C.QActionEvent) *QActionEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QActionEvent_virtbase(h, &outptr_QEvent) + return &QActionEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQActionEvent constructs the type using only unsafe pointers. -func UnsafeNewQActionEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QActionEvent { - if h == nil { - return nil - } - - return &QActionEvent{h: (*C.QActionEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQActionEvent(h unsafe.Pointer) *QActionEvent { + return newQActionEvent((*C.QActionEvent)(h)) } // NewQActionEvent constructs a new QActionEvent object. func NewQActionEvent(typeVal int, action *QAction) *QActionEvent { - var outptr_QActionEvent *C.QActionEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QActionEvent_new((C.int)(typeVal), action.cPointer(), &outptr_QActionEvent, &outptr_QEvent) - ret := newQActionEvent(outptr_QActionEvent, outptr_QEvent) + ret := newQActionEvent(C.QActionEvent_new((C.int)(typeVal), action.cPointer())) ret.isSubclass = true return ret } // NewQActionEvent2 constructs a new QActionEvent object. func NewQActionEvent2(param1 *QActionEvent) *QActionEvent { - var outptr_QActionEvent *C.QActionEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QActionEvent_new2(param1.cPointer(), &outptr_QActionEvent, &outptr_QEvent) - ret := newQActionEvent(outptr_QActionEvent, outptr_QEvent) + ret := newQActionEvent(C.QActionEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQActionEvent3 constructs a new QActionEvent object. func NewQActionEvent3(typeVal int, action *QAction, before *QAction) *QActionEvent { - var outptr_QActionEvent *C.QActionEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QActionEvent_new3((C.int)(typeVal), action.cPointer(), before.cPointer(), &outptr_QActionEvent, &outptr_QEvent) - ret := newQActionEvent(outptr_QActionEvent, outptr_QEvent) + ret := newQActionEvent(C.QActionEvent_new3((C.int)(typeVal), action.cPointer(), before.cPointer())) ret.isSubclass = true return ret } func (this *QActionEvent) Action() *QAction { - return newQAction(C.QActionEvent_Action(this.h), nil) + return newQAction(C.QActionEvent_Action(this.h)) } func (this *QActionEvent) Before() *QAction { - return newQAction(C.QActionEvent_Before(this.h), nil) + return newQAction(C.QActionEvent_Before(this.h)) } func (this *QActionEvent) OperatorAssign(param1 *QActionEvent) { @@ -3377,22 +3007,20 @@ func (this *QFileOpenEvent) UnsafePointer() unsafe.Pointer { } // newQFileOpenEvent constructs the type using only CGO pointers. -func newQFileOpenEvent(h *C.QFileOpenEvent, h_QEvent *C.QEvent) *QFileOpenEvent { +func newQFileOpenEvent(h *C.QFileOpenEvent) *QFileOpenEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QFileOpenEvent_virtbase(h, &outptr_QEvent) + return &QFileOpenEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQFileOpenEvent constructs the type using only unsafe pointers. -func UnsafeNewQFileOpenEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QFileOpenEvent { - if h == nil { - return nil - } - - return &QFileOpenEvent{h: (*C.QFileOpenEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQFileOpenEvent(h unsafe.Pointer) *QFileOpenEvent { + return newQFileOpenEvent((*C.QFileOpenEvent)(h)) } // NewQFileOpenEvent constructs a new QFileOpenEvent object. @@ -3401,33 +3029,24 @@ func NewQFileOpenEvent(file string) *QFileOpenEvent { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - var outptr_QFileOpenEvent *C.QFileOpenEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QFileOpenEvent_new(file_ms, &outptr_QFileOpenEvent, &outptr_QEvent) - ret := newQFileOpenEvent(outptr_QFileOpenEvent, outptr_QEvent) + ret := newQFileOpenEvent(C.QFileOpenEvent_new(file_ms)) ret.isSubclass = true return ret } // NewQFileOpenEvent2 constructs a new QFileOpenEvent object. func NewQFileOpenEvent2(url *QUrl) *QFileOpenEvent { - var outptr_QFileOpenEvent *C.QFileOpenEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QFileOpenEvent_new2(url.cPointer(), &outptr_QFileOpenEvent, &outptr_QEvent) - ret := newQFileOpenEvent(outptr_QFileOpenEvent, outptr_QEvent) + ret := newQFileOpenEvent(C.QFileOpenEvent_new2(url.cPointer())) ret.isSubclass = true return ret } // NewQFileOpenEvent3 constructs a new QFileOpenEvent object. func NewQFileOpenEvent3(param1 *QFileOpenEvent) *QFileOpenEvent { - var outptr_QFileOpenEvent *C.QFileOpenEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QFileOpenEvent_new3(param1.cPointer(), &outptr_QFileOpenEvent, &outptr_QEvent) - ret := newQFileOpenEvent(outptr_QFileOpenEvent, outptr_QEvent) + ret := newQFileOpenEvent(C.QFileOpenEvent_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -3484,42 +3103,34 @@ func (this *QToolBarChangeEvent) UnsafePointer() unsafe.Pointer { } // newQToolBarChangeEvent constructs the type using only CGO pointers. -func newQToolBarChangeEvent(h *C.QToolBarChangeEvent, h_QEvent *C.QEvent) *QToolBarChangeEvent { +func newQToolBarChangeEvent(h *C.QToolBarChangeEvent) *QToolBarChangeEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QToolBarChangeEvent_virtbase(h, &outptr_QEvent) + return &QToolBarChangeEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQToolBarChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQToolBarChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QToolBarChangeEvent { - if h == nil { - return nil - } - - return &QToolBarChangeEvent{h: (*C.QToolBarChangeEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQToolBarChangeEvent(h unsafe.Pointer) *QToolBarChangeEvent { + return newQToolBarChangeEvent((*C.QToolBarChangeEvent)(h)) } // NewQToolBarChangeEvent constructs a new QToolBarChangeEvent object. func NewQToolBarChangeEvent(t bool) *QToolBarChangeEvent { - var outptr_QToolBarChangeEvent *C.QToolBarChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QToolBarChangeEvent_new((C.bool)(t), &outptr_QToolBarChangeEvent, &outptr_QEvent) - ret := newQToolBarChangeEvent(outptr_QToolBarChangeEvent, outptr_QEvent) + ret := newQToolBarChangeEvent(C.QToolBarChangeEvent_new((C.bool)(t))) ret.isSubclass = true return ret } // NewQToolBarChangeEvent2 constructs a new QToolBarChangeEvent object. func NewQToolBarChangeEvent2(param1 *QToolBarChangeEvent) *QToolBarChangeEvent { - var outptr_QToolBarChangeEvent *C.QToolBarChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QToolBarChangeEvent_new2(param1.cPointer(), &outptr_QToolBarChangeEvent, &outptr_QEvent) - ret := newQToolBarChangeEvent(outptr_QToolBarChangeEvent, outptr_QEvent) + ret := newQToolBarChangeEvent(C.QToolBarChangeEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -3563,53 +3174,42 @@ func (this *QShortcutEvent) UnsafePointer() unsafe.Pointer { } // newQShortcutEvent constructs the type using only CGO pointers. -func newQShortcutEvent(h *C.QShortcutEvent, h_QEvent *C.QEvent) *QShortcutEvent { +func newQShortcutEvent(h *C.QShortcutEvent) *QShortcutEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QShortcutEvent_virtbase(h, &outptr_QEvent) + return &QShortcutEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQShortcutEvent constructs the type using only unsafe pointers. -func UnsafeNewQShortcutEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QShortcutEvent { - if h == nil { - return nil - } - - return &QShortcutEvent{h: (*C.QShortcutEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQShortcutEvent(h unsafe.Pointer) *QShortcutEvent { + return newQShortcutEvent((*C.QShortcutEvent)(h)) } // NewQShortcutEvent constructs a new QShortcutEvent object. func NewQShortcutEvent(key *QKeySequence, id int) *QShortcutEvent { - var outptr_QShortcutEvent *C.QShortcutEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QShortcutEvent_new(key.cPointer(), (C.int)(id), &outptr_QShortcutEvent, &outptr_QEvent) - ret := newQShortcutEvent(outptr_QShortcutEvent, outptr_QEvent) + ret := newQShortcutEvent(C.QShortcutEvent_new(key.cPointer(), (C.int)(id))) ret.isSubclass = true return ret } // NewQShortcutEvent2 constructs a new QShortcutEvent object. func NewQShortcutEvent2(param1 *QShortcutEvent) *QShortcutEvent { - var outptr_QShortcutEvent *C.QShortcutEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QShortcutEvent_new2(param1.cPointer(), &outptr_QShortcutEvent, &outptr_QEvent) - ret := newQShortcutEvent(outptr_QShortcutEvent, outptr_QEvent) + ret := newQShortcutEvent(C.QShortcutEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQShortcutEvent3 constructs a new QShortcutEvent object. func NewQShortcutEvent3(key *QKeySequence, id int, ambiguous bool) *QShortcutEvent { - var outptr_QShortcutEvent *C.QShortcutEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QShortcutEvent_new3(key.cPointer(), (C.int)(id), (C.bool)(ambiguous), &outptr_QShortcutEvent, &outptr_QEvent) - ret := newQShortcutEvent(outptr_QShortcutEvent, outptr_QEvent) + ret := newQShortcutEvent(C.QShortcutEvent_new3(key.cPointer(), (C.int)(id), (C.bool)(ambiguous))) ret.isSubclass = true return ret } @@ -3661,53 +3261,42 @@ func (this *QWindowStateChangeEvent) UnsafePointer() unsafe.Pointer { } // newQWindowStateChangeEvent constructs the type using only CGO pointers. -func newQWindowStateChangeEvent(h *C.QWindowStateChangeEvent, h_QEvent *C.QEvent) *QWindowStateChangeEvent { +func newQWindowStateChangeEvent(h *C.QWindowStateChangeEvent) *QWindowStateChangeEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QWindowStateChangeEvent_virtbase(h, &outptr_QEvent) + return &QWindowStateChangeEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQWindowStateChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQWindowStateChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QWindowStateChangeEvent { - if h == nil { - return nil - } - - return &QWindowStateChangeEvent{h: (*C.QWindowStateChangeEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQWindowStateChangeEvent(h unsafe.Pointer) *QWindowStateChangeEvent { + return newQWindowStateChangeEvent((*C.QWindowStateChangeEvent)(h)) } // NewQWindowStateChangeEvent constructs a new QWindowStateChangeEvent object. func NewQWindowStateChangeEvent(aOldState WindowState) *QWindowStateChangeEvent { - var outptr_QWindowStateChangeEvent *C.QWindowStateChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWindowStateChangeEvent_new((C.int)(aOldState), &outptr_QWindowStateChangeEvent, &outptr_QEvent) - ret := newQWindowStateChangeEvent(outptr_QWindowStateChangeEvent, outptr_QEvent) + ret := newQWindowStateChangeEvent(C.QWindowStateChangeEvent_new((C.int)(aOldState))) ret.isSubclass = true return ret } // NewQWindowStateChangeEvent2 constructs a new QWindowStateChangeEvent object. func NewQWindowStateChangeEvent2(param1 *QWindowStateChangeEvent) *QWindowStateChangeEvent { - var outptr_QWindowStateChangeEvent *C.QWindowStateChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWindowStateChangeEvent_new2(param1.cPointer(), &outptr_QWindowStateChangeEvent, &outptr_QEvent) - ret := newQWindowStateChangeEvent(outptr_QWindowStateChangeEvent, outptr_QEvent) + ret := newQWindowStateChangeEvent(C.QWindowStateChangeEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQWindowStateChangeEvent3 constructs a new QWindowStateChangeEvent object. func NewQWindowStateChangeEvent3(aOldState WindowState, isOverride bool) *QWindowStateChangeEvent { - var outptr_QWindowStateChangeEvent *C.QWindowStateChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWindowStateChangeEvent_new3((C.int)(aOldState), (C.bool)(isOverride), &outptr_QWindowStateChangeEvent, &outptr_QEvent) - ret := newQWindowStateChangeEvent(outptr_QWindowStateChangeEvent, outptr_QEvent) + ret := newQWindowStateChangeEvent(C.QWindowStateChangeEvent_new3((C.int)(aOldState), (C.bool)(isOverride))) ret.isSubclass = true return ret } @@ -3758,34 +3347,27 @@ func newQPointingDeviceUniqueId(h *C.QPointingDeviceUniqueId) *QPointingDeviceUn if h == nil { return nil } + return &QPointingDeviceUniqueId{h: h} } // UnsafeNewQPointingDeviceUniqueId constructs the type using only unsafe pointers. func UnsafeNewQPointingDeviceUniqueId(h unsafe.Pointer) *QPointingDeviceUniqueId { - if h == nil { - return nil - } - - return &QPointingDeviceUniqueId{h: (*C.QPointingDeviceUniqueId)(h)} + return newQPointingDeviceUniqueId((*C.QPointingDeviceUniqueId)(h)) } // NewQPointingDeviceUniqueId constructs a new QPointingDeviceUniqueId object. func NewQPointingDeviceUniqueId() *QPointingDeviceUniqueId { - var outptr_QPointingDeviceUniqueId *C.QPointingDeviceUniqueId = nil - C.QPointingDeviceUniqueId_new(&outptr_QPointingDeviceUniqueId) - ret := newQPointingDeviceUniqueId(outptr_QPointingDeviceUniqueId) + ret := newQPointingDeviceUniqueId(C.QPointingDeviceUniqueId_new()) ret.isSubclass = true return ret } // NewQPointingDeviceUniqueId2 constructs a new QPointingDeviceUniqueId object. func NewQPointingDeviceUniqueId2(param1 *QPointingDeviceUniqueId) *QPointingDeviceUniqueId { - var outptr_QPointingDeviceUniqueId *C.QPointingDeviceUniqueId = nil - C.QPointingDeviceUniqueId_new2(param1.cPointer(), &outptr_QPointingDeviceUniqueId) - ret := newQPointingDeviceUniqueId(outptr_QPointingDeviceUniqueId) + ret := newQPointingDeviceUniqueId(C.QPointingDeviceUniqueId_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -3839,80 +3421,58 @@ func (this *QTouchEvent) UnsafePointer() unsafe.Pointer { } // newQTouchEvent constructs the type using only CGO pointers. -func newQTouchEvent(h *C.QTouchEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QTouchEvent { +func newQTouchEvent(h *C.QTouchEvent) *QTouchEvent { if h == nil { return nil } + var outptr_QInputEvent *C.QInputEvent = nil + C.QTouchEvent_virtbase(h, &outptr_QInputEvent) + return &QTouchEvent{h: h, - QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} + QInputEvent: newQInputEvent(outptr_QInputEvent)} } // UnsafeNewQTouchEvent constructs the type using only unsafe pointers. -func UnsafeNewQTouchEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QTouchEvent { - if h == nil { - return nil - } - - return &QTouchEvent{h: (*C.QTouchEvent)(h), - QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} +func UnsafeNewQTouchEvent(h unsafe.Pointer) *QTouchEvent { + return newQTouchEvent((*C.QTouchEvent)(h)) } // NewQTouchEvent constructs a new QTouchEvent object. func NewQTouchEvent(eventType QEvent__Type) *QTouchEvent { - var outptr_QTouchEvent *C.QTouchEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTouchEvent_new((C.int)(eventType), &outptr_QTouchEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTouchEvent(outptr_QTouchEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTouchEvent(C.QTouchEvent_new((C.int)(eventType))) ret.isSubclass = true return ret } // NewQTouchEvent2 constructs a new QTouchEvent object. func NewQTouchEvent2(param1 *QTouchEvent) *QTouchEvent { - var outptr_QTouchEvent *C.QTouchEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTouchEvent_new2(param1.cPointer(), &outptr_QTouchEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTouchEvent(outptr_QTouchEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTouchEvent(C.QTouchEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQTouchEvent3 constructs a new QTouchEvent object. func NewQTouchEvent3(eventType QEvent__Type, device *QTouchDevice) *QTouchEvent { - var outptr_QTouchEvent *C.QTouchEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTouchEvent_new3((C.int)(eventType), device.cPointer(), &outptr_QTouchEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTouchEvent(outptr_QTouchEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTouchEvent(C.QTouchEvent_new3((C.int)(eventType), device.cPointer())) ret.isSubclass = true return ret } // NewQTouchEvent4 constructs a new QTouchEvent object. func NewQTouchEvent4(eventType QEvent__Type, device *QTouchDevice, modifiers KeyboardModifier) *QTouchEvent { - var outptr_QTouchEvent *C.QTouchEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTouchEvent_new4((C.int)(eventType), device.cPointer(), (C.int)(modifiers), &outptr_QTouchEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTouchEvent(outptr_QTouchEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTouchEvent(C.QTouchEvent_new4((C.int)(eventType), device.cPointer(), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQTouchEvent5 constructs a new QTouchEvent object. func NewQTouchEvent5(eventType QEvent__Type, device *QTouchDevice, modifiers KeyboardModifier, touchPointStates TouchPointState) *QTouchEvent { - var outptr_QTouchEvent *C.QTouchEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTouchEvent_new5((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.int)(touchPointStates), &outptr_QTouchEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTouchEvent(outptr_QTouchEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTouchEvent(C.QTouchEvent_new5((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.int)(touchPointStates))) ret.isSubclass = true return ret } @@ -3925,18 +3485,14 @@ func NewQTouchEvent6(eventType QEvent__Type, device *QTouchDevice, modifiers Key touchPoints_CArray[i] = touchPoints[i].cPointer() } touchPoints_ma := C.struct_miqt_array{len: C.size_t(len(touchPoints)), data: unsafe.Pointer(touchPoints_CArray)} - var outptr_QTouchEvent *C.QTouchEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTouchEvent_new6((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.int)(touchPointStates), touchPoints_ma, &outptr_QTouchEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTouchEvent(outptr_QTouchEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTouchEvent(C.QTouchEvent_new6((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.int)(touchPointStates), touchPoints_ma)) ret.isSubclass = true return ret } func (this *QTouchEvent) Window() *QWindow { - return newQWindow(C.QTouchEvent_Window(this.h), nil, nil) + return newQWindow(C.QTouchEvent_Window(this.h)) } func (this *QTouchEvent) Target() *QObject { @@ -4024,42 +3580,34 @@ func (this *QScrollPrepareEvent) UnsafePointer() unsafe.Pointer { } // newQScrollPrepareEvent constructs the type using only CGO pointers. -func newQScrollPrepareEvent(h *C.QScrollPrepareEvent, h_QEvent *C.QEvent) *QScrollPrepareEvent { +func newQScrollPrepareEvent(h *C.QScrollPrepareEvent) *QScrollPrepareEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QScrollPrepareEvent_virtbase(h, &outptr_QEvent) + return &QScrollPrepareEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQScrollPrepareEvent constructs the type using only unsafe pointers. -func UnsafeNewQScrollPrepareEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QScrollPrepareEvent { - if h == nil { - return nil - } - - return &QScrollPrepareEvent{h: (*C.QScrollPrepareEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQScrollPrepareEvent(h unsafe.Pointer) *QScrollPrepareEvent { + return newQScrollPrepareEvent((*C.QScrollPrepareEvent)(h)) } // NewQScrollPrepareEvent constructs a new QScrollPrepareEvent object. func NewQScrollPrepareEvent(startPos *QPointF) *QScrollPrepareEvent { - var outptr_QScrollPrepareEvent *C.QScrollPrepareEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QScrollPrepareEvent_new(startPos.cPointer(), &outptr_QScrollPrepareEvent, &outptr_QEvent) - ret := newQScrollPrepareEvent(outptr_QScrollPrepareEvent, outptr_QEvent) + ret := newQScrollPrepareEvent(C.QScrollPrepareEvent_new(startPos.cPointer())) ret.isSubclass = true return ret } // NewQScrollPrepareEvent2 constructs a new QScrollPrepareEvent object. func NewQScrollPrepareEvent2(param1 *QScrollPrepareEvent) *QScrollPrepareEvent { - var outptr_QScrollPrepareEvent *C.QScrollPrepareEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QScrollPrepareEvent_new2(param1.cPointer(), &outptr_QScrollPrepareEvent, &outptr_QEvent) - ret := newQScrollPrepareEvent(outptr_QScrollPrepareEvent, outptr_QEvent) + ret := newQScrollPrepareEvent(C.QScrollPrepareEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -4135,42 +3683,34 @@ func (this *QScrollEvent) UnsafePointer() unsafe.Pointer { } // newQScrollEvent constructs the type using only CGO pointers. -func newQScrollEvent(h *C.QScrollEvent, h_QEvent *C.QEvent) *QScrollEvent { +func newQScrollEvent(h *C.QScrollEvent) *QScrollEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QScrollEvent_virtbase(h, &outptr_QEvent) + return &QScrollEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQScrollEvent constructs the type using only unsafe pointers. -func UnsafeNewQScrollEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QScrollEvent { - if h == nil { - return nil - } - - return &QScrollEvent{h: (*C.QScrollEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQScrollEvent(h unsafe.Pointer) *QScrollEvent { + return newQScrollEvent((*C.QScrollEvent)(h)) } // NewQScrollEvent constructs a new QScrollEvent object. func NewQScrollEvent(contentPos *QPointF, overshoot *QPointF, scrollState QScrollEvent__ScrollState) *QScrollEvent { - var outptr_QScrollEvent *C.QScrollEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QScrollEvent_new(contentPos.cPointer(), overshoot.cPointer(), (C.int)(scrollState), &outptr_QScrollEvent, &outptr_QEvent) - ret := newQScrollEvent(outptr_QScrollEvent, outptr_QEvent) + ret := newQScrollEvent(C.QScrollEvent_new(contentPos.cPointer(), overshoot.cPointer(), (C.int)(scrollState))) ret.isSubclass = true return ret } // NewQScrollEvent2 constructs a new QScrollEvent object. func NewQScrollEvent2(param1 *QScrollEvent) *QScrollEvent { - var outptr_QScrollEvent *C.QScrollEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QScrollEvent_new2(param1.cPointer(), &outptr_QScrollEvent, &outptr_QEvent) - ret := newQScrollEvent(outptr_QScrollEvent, outptr_QEvent) + ret := newQScrollEvent(C.QScrollEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -4226,48 +3766,40 @@ func (this *QScreenOrientationChangeEvent) UnsafePointer() unsafe.Pointer { } // newQScreenOrientationChangeEvent constructs the type using only CGO pointers. -func newQScreenOrientationChangeEvent(h *C.QScreenOrientationChangeEvent, h_QEvent *C.QEvent) *QScreenOrientationChangeEvent { +func newQScreenOrientationChangeEvent(h *C.QScreenOrientationChangeEvent) *QScreenOrientationChangeEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QScreenOrientationChangeEvent_virtbase(h, &outptr_QEvent) + return &QScreenOrientationChangeEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQScreenOrientationChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQScreenOrientationChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QScreenOrientationChangeEvent { - if h == nil { - return nil - } - - return &QScreenOrientationChangeEvent{h: (*C.QScreenOrientationChangeEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQScreenOrientationChangeEvent(h unsafe.Pointer) *QScreenOrientationChangeEvent { + return newQScreenOrientationChangeEvent((*C.QScreenOrientationChangeEvent)(h)) } // NewQScreenOrientationChangeEvent constructs a new QScreenOrientationChangeEvent object. func NewQScreenOrientationChangeEvent(screen *QScreen, orientation ScreenOrientation) *QScreenOrientationChangeEvent { - var outptr_QScreenOrientationChangeEvent *C.QScreenOrientationChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QScreenOrientationChangeEvent_new(screen.cPointer(), (C.int)(orientation), &outptr_QScreenOrientationChangeEvent, &outptr_QEvent) - ret := newQScreenOrientationChangeEvent(outptr_QScreenOrientationChangeEvent, outptr_QEvent) + ret := newQScreenOrientationChangeEvent(C.QScreenOrientationChangeEvent_new(screen.cPointer(), (C.int)(orientation))) ret.isSubclass = true return ret } // NewQScreenOrientationChangeEvent2 constructs a new QScreenOrientationChangeEvent object. func NewQScreenOrientationChangeEvent2(param1 *QScreenOrientationChangeEvent) *QScreenOrientationChangeEvent { - var outptr_QScreenOrientationChangeEvent *C.QScreenOrientationChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QScreenOrientationChangeEvent_new2(param1.cPointer(), &outptr_QScreenOrientationChangeEvent, &outptr_QEvent) - ret := newQScreenOrientationChangeEvent(outptr_QScreenOrientationChangeEvent, outptr_QEvent) + ret := newQScreenOrientationChangeEvent(C.QScreenOrientationChangeEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } func (this *QScreenOrientationChangeEvent) Screen() *QScreen { - return newQScreen(C.QScreenOrientationChangeEvent_Screen(this.h), nil) + return newQScreen(C.QScreenOrientationChangeEvent_Screen(this.h)) } func (this *QScreenOrientationChangeEvent) Orientation() ScreenOrientation { @@ -4309,42 +3841,34 @@ func (this *QApplicationStateChangeEvent) UnsafePointer() unsafe.Pointer { } // newQApplicationStateChangeEvent constructs the type using only CGO pointers. -func newQApplicationStateChangeEvent(h *C.QApplicationStateChangeEvent, h_QEvent *C.QEvent) *QApplicationStateChangeEvent { +func newQApplicationStateChangeEvent(h *C.QApplicationStateChangeEvent) *QApplicationStateChangeEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QApplicationStateChangeEvent_virtbase(h, &outptr_QEvent) + return &QApplicationStateChangeEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQApplicationStateChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQApplicationStateChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QApplicationStateChangeEvent { - if h == nil { - return nil - } - - return &QApplicationStateChangeEvent{h: (*C.QApplicationStateChangeEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQApplicationStateChangeEvent(h unsafe.Pointer) *QApplicationStateChangeEvent { + return newQApplicationStateChangeEvent((*C.QApplicationStateChangeEvent)(h)) } // NewQApplicationStateChangeEvent constructs a new QApplicationStateChangeEvent object. func NewQApplicationStateChangeEvent(state ApplicationState) *QApplicationStateChangeEvent { - var outptr_QApplicationStateChangeEvent *C.QApplicationStateChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QApplicationStateChangeEvent_new((C.int)(state), &outptr_QApplicationStateChangeEvent, &outptr_QEvent) - ret := newQApplicationStateChangeEvent(outptr_QApplicationStateChangeEvent, outptr_QEvent) + ret := newQApplicationStateChangeEvent(C.QApplicationStateChangeEvent_new((C.int)(state))) ret.isSubclass = true return ret } // NewQApplicationStateChangeEvent2 constructs a new QApplicationStateChangeEvent object. func NewQApplicationStateChangeEvent2(param1 *QApplicationStateChangeEvent) *QApplicationStateChangeEvent { - var outptr_QApplicationStateChangeEvent *C.QApplicationStateChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QApplicationStateChangeEvent_new2(param1.cPointer(), &outptr_QApplicationStateChangeEvent, &outptr_QEvent) - ret := newQApplicationStateChangeEvent(outptr_QApplicationStateChangeEvent, outptr_QEvent) + ret := newQApplicationStateChangeEvent(C.QApplicationStateChangeEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -4391,44 +3915,35 @@ func newQInputMethodEvent__Attribute(h *C.QInputMethodEvent__Attribute) *QInputM if h == nil { return nil } + return &QInputMethodEvent__Attribute{h: h} } // UnsafeNewQInputMethodEvent__Attribute constructs the type using only unsafe pointers. func UnsafeNewQInputMethodEvent__Attribute(h unsafe.Pointer) *QInputMethodEvent__Attribute { - if h == nil { - return nil - } - - return &QInputMethodEvent__Attribute{h: (*C.QInputMethodEvent__Attribute)(h)} + return newQInputMethodEvent__Attribute((*C.QInputMethodEvent__Attribute)(h)) } // NewQInputMethodEvent__Attribute constructs a new QInputMethodEvent::Attribute object. func NewQInputMethodEvent__Attribute(typ QInputMethodEvent__AttributeType, s int, l int, val QVariant) *QInputMethodEvent__Attribute { - var outptr_QInputMethodEvent__Attribute *C.QInputMethodEvent__Attribute = nil - C.QInputMethodEvent__Attribute_new((C.int)(typ), (C.int)(s), (C.int)(l), val.cPointer(), &outptr_QInputMethodEvent__Attribute) - ret := newQInputMethodEvent__Attribute(outptr_QInputMethodEvent__Attribute) + ret := newQInputMethodEvent__Attribute(C.QInputMethodEvent__Attribute_new((C.int)(typ), (C.int)(s), (C.int)(l), val.cPointer())) ret.isSubclass = true return ret } // NewQInputMethodEvent__Attribute2 constructs a new QInputMethodEvent::Attribute object. func NewQInputMethodEvent__Attribute2(typ QInputMethodEvent__AttributeType, s int, l int) *QInputMethodEvent__Attribute { - var outptr_QInputMethodEvent__Attribute *C.QInputMethodEvent__Attribute = nil - C.QInputMethodEvent__Attribute_new2((C.int)(typ), (C.int)(s), (C.int)(l), &outptr_QInputMethodEvent__Attribute) - ret := newQInputMethodEvent__Attribute(outptr_QInputMethodEvent__Attribute) + ret := newQInputMethodEvent__Attribute(C.QInputMethodEvent__Attribute_new2((C.int)(typ), (C.int)(s), (C.int)(l))) ret.isSubclass = true return ret } // NewQInputMethodEvent__Attribute3 constructs a new QInputMethodEvent::Attribute object. func NewQInputMethodEvent__Attribute3(param1 *QInputMethodEvent__Attribute) *QInputMethodEvent__Attribute { - var outptr_QInputMethodEvent__Attribute *C.QInputMethodEvent__Attribute = nil - C.QInputMethodEvent__Attribute_new3(param1.cPointer(), &outptr_QInputMethodEvent__Attribute) - ret := newQInputMethodEvent__Attribute(outptr_QInputMethodEvent__Attribute) + ret := newQInputMethodEvent__Attribute(C.QInputMethodEvent__Attribute_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -4475,44 +3990,35 @@ func newQTouchEvent__TouchPoint(h *C.QTouchEvent__TouchPoint) *QTouchEvent__Touc if h == nil { return nil } + return &QTouchEvent__TouchPoint{h: h} } // UnsafeNewQTouchEvent__TouchPoint constructs the type using only unsafe pointers. func UnsafeNewQTouchEvent__TouchPoint(h unsafe.Pointer) *QTouchEvent__TouchPoint { - if h == nil { - return nil - } - - return &QTouchEvent__TouchPoint{h: (*C.QTouchEvent__TouchPoint)(h)} + return newQTouchEvent__TouchPoint((*C.QTouchEvent__TouchPoint)(h)) } // NewQTouchEvent__TouchPoint constructs a new QTouchEvent::TouchPoint object. func NewQTouchEvent__TouchPoint() *QTouchEvent__TouchPoint { - var outptr_QTouchEvent__TouchPoint *C.QTouchEvent__TouchPoint = nil - C.QTouchEvent__TouchPoint_new(&outptr_QTouchEvent__TouchPoint) - ret := newQTouchEvent__TouchPoint(outptr_QTouchEvent__TouchPoint) + ret := newQTouchEvent__TouchPoint(C.QTouchEvent__TouchPoint_new()) ret.isSubclass = true return ret } // NewQTouchEvent__TouchPoint2 constructs a new QTouchEvent::TouchPoint object. func NewQTouchEvent__TouchPoint2(other *QTouchEvent__TouchPoint) *QTouchEvent__TouchPoint { - var outptr_QTouchEvent__TouchPoint *C.QTouchEvent__TouchPoint = nil - C.QTouchEvent__TouchPoint_new2(other.cPointer(), &outptr_QTouchEvent__TouchPoint) - ret := newQTouchEvent__TouchPoint(outptr_QTouchEvent__TouchPoint) + ret := newQTouchEvent__TouchPoint(C.QTouchEvent__TouchPoint_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQTouchEvent__TouchPoint3 constructs a new QTouchEvent::TouchPoint object. func NewQTouchEvent__TouchPoint3(id int) *QTouchEvent__TouchPoint { - var outptr_QTouchEvent__TouchPoint *C.QTouchEvent__TouchPoint = nil - C.QTouchEvent__TouchPoint_new3((C.int)(id), &outptr_QTouchEvent__TouchPoint) - ret := newQTouchEvent__TouchPoint(outptr_QTouchEvent__TouchPoint) + ret := newQTouchEvent__TouchPoint(C.QTouchEvent__TouchPoint_new3((C.int)(id))) ret.isSubclass = true return ret } diff --git a/qt/gen_qevent.h b/qt/gen_qevent.h index 35a9d246..3887ce4a 100644 --- a/qt/gen_qevent.h +++ b/qt/gen_qevent.h @@ -146,17 +146,19 @@ typedef struct QWindow QWindow; typedef struct QWindowStateChangeEvent QWindowStateChangeEvent; #endif -void QInputEvent_new(int typeVal, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QInputEvent_new2(QInputEvent* param1, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QInputEvent_new3(int typeVal, int modifiers, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QInputEvent* QInputEvent_new(int typeVal); +QInputEvent* QInputEvent_new2(QInputEvent* param1); +QInputEvent* QInputEvent_new3(int typeVal, int modifiers); +void QInputEvent_virtbase(QInputEvent* src, QEvent** outptr_QEvent); int QInputEvent_Modifiers(const QInputEvent* self); void QInputEvent_SetModifiers(QInputEvent* self, int amodifiers); unsigned long QInputEvent_Timestamp(const QInputEvent* self); void QInputEvent_SetTimestamp(QInputEvent* self, unsigned long atimestamp); void QInputEvent_Delete(QInputEvent* self, bool isSubclass); -void QEnterEvent_new(QPointF* localPos, QPointF* windowPos, QPointF* screenPos, QEnterEvent** outptr_QEnterEvent, QEvent** outptr_QEvent); -void QEnterEvent_new2(QEnterEvent* param1, QEnterEvent** outptr_QEnterEvent, QEvent** outptr_QEvent); +QEnterEvent* QEnterEvent_new(QPointF* localPos, QPointF* windowPos, QPointF* screenPos); +QEnterEvent* QEnterEvent_new2(QEnterEvent* param1); +void QEnterEvent_virtbase(QEnterEvent* src, QEvent** outptr_QEvent); QPoint* QEnterEvent_Pos(const QEnterEvent* self); QPoint* QEnterEvent_GlobalPos(const QEnterEvent* self); int QEnterEvent_X(const QEnterEvent* self); @@ -168,11 +170,12 @@ QPointF* QEnterEvent_WindowPos(const QEnterEvent* self); QPointF* QEnterEvent_ScreenPos(const QEnterEvent* self); void QEnterEvent_Delete(QEnterEvent* self, bool isSubclass); -void QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* screenPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers, int source, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QMouseEvent_new5(QMouseEvent* param1, QMouseEvent** outptr_QMouseEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QMouseEvent* QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers); +QMouseEvent* QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* screenPos, int button, int buttons, int modifiers); +QMouseEvent* QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers); +QMouseEvent* QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, int button, int buttons, int modifiers, int source); +QMouseEvent* QMouseEvent_new5(QMouseEvent* param1); +void QMouseEvent_virtbase(QMouseEvent* src, QInputEvent** outptr_QInputEvent); QPoint* QMouseEvent_Pos(const QMouseEvent* self); QPoint* QMouseEvent_GlobalPos(const QMouseEvent* self); int QMouseEvent_X(const QMouseEvent* self); @@ -189,26 +192,28 @@ int QMouseEvent_Source(const QMouseEvent* self); int QMouseEvent_Flags(const QMouseEvent* self); void QMouseEvent_Delete(QMouseEvent* self, bool isSubclass); -void QHoverEvent_new(int typeVal, QPointF* pos, QPointF* oldPos, QHoverEvent** outptr_QHoverEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QHoverEvent_new2(QHoverEvent* param1, QHoverEvent** outptr_QHoverEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QHoverEvent_new3(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QHoverEvent** outptr_QHoverEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QHoverEvent* QHoverEvent_new(int typeVal, QPointF* pos, QPointF* oldPos); +QHoverEvent* QHoverEvent_new2(QHoverEvent* param1); +QHoverEvent* QHoverEvent_new3(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers); +void QHoverEvent_virtbase(QHoverEvent* src, QInputEvent** outptr_QInputEvent); QPoint* QHoverEvent_Pos(const QHoverEvent* self); QPoint* QHoverEvent_OldPos(const QHoverEvent* self); QPointF* QHoverEvent_PosF(const QHoverEvent* self); QPointF* QHoverEvent_OldPosF(const QHoverEvent* self); void QHoverEvent_Delete(QHoverEvent* self, bool isSubclass); -void QWheelEvent_new(QPointF* pos, int delta, int buttons, int modifiers, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QWheelEvent_new2(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QWheelEvent_new4(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QWheelEvent_new5(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QWheelEvent_new6(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source, bool inverted, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QWheelEvent_new7(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QWheelEvent_new8(QWheelEvent* param1, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QWheelEvent_new9(QPointF* pos, int delta, int buttons, int modifiers, int orient, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QWheelEvent_new10(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers, int orient, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QWheelEvent_new11(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QWheelEvent** outptr_QWheelEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QWheelEvent* QWheelEvent_new(QPointF* pos, int delta, int buttons, int modifiers); +QWheelEvent* QWheelEvent_new2(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers); +QWheelEvent* QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers); +QWheelEvent* QWheelEvent_new4(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase); +QWheelEvent* QWheelEvent_new5(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source); +QWheelEvent* QWheelEvent_new6(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int qt4Delta, int qt4Orientation, int buttons, int modifiers, int phase, int source, bool inverted); +QWheelEvent* QWheelEvent_new7(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted); +QWheelEvent* QWheelEvent_new8(QWheelEvent* param1); +QWheelEvent* QWheelEvent_new9(QPointF* pos, int delta, int buttons, int modifiers, int orient); +QWheelEvent* QWheelEvent_new10(QPointF* pos, QPointF* globalPos, int delta, int buttons, int modifiers, int orient); +QWheelEvent* QWheelEvent_new11(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source); +void QWheelEvent_virtbase(QWheelEvent* src, QInputEvent** outptr_QInputEvent); QPoint* QWheelEvent_PixelDelta(const QWheelEvent* self); QPoint* QWheelEvent_AngleDelta(const QWheelEvent* self); int QWheelEvent_Delta(const QWheelEvent* self); @@ -229,9 +234,10 @@ bool QWheelEvent_Inverted(const QWheelEvent* self); int QWheelEvent_Source(const QWheelEvent* self); void QWheelEvent_Delete(QWheelEvent* self, bool isSubclass); -void QTabletEvent_new(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID, QTabletEvent** outptr_QTabletEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QTabletEvent_new2(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID, int button, int buttons, QTabletEvent** outptr_QTabletEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QTabletEvent_new3(QTabletEvent* param1, QTabletEvent** outptr_QTabletEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QTabletEvent* QTabletEvent_new(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID); +QTabletEvent* QTabletEvent_new2(int t, QPointF* pos, QPointF* globalPos, int device, int pointerType, double pressure, int xTilt, int yTilt, double tangentialPressure, double rotation, int z, int keyState, long long uniqueID, int button, int buttons); +QTabletEvent* QTabletEvent_new3(QTabletEvent* param1); +void QTabletEvent_virtbase(QTabletEvent* src, QInputEvent** outptr_QInputEvent); QPoint* QTabletEvent_Pos(const QTabletEvent* self); QPoint* QTabletEvent_GlobalPos(const QTabletEvent* self); QPointF* QTabletEvent_PosF(const QTabletEvent* self); @@ -256,9 +262,10 @@ int QTabletEvent_Button(const QTabletEvent* self); int QTabletEvent_Buttons(const QTabletEvent* self); void QTabletEvent_Delete(QTabletEvent* self, bool isSubclass); -void QNativeGestureEvent_new(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument, QNativeGestureEvent** outptr_QNativeGestureEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QNativeGestureEvent_new2(int typeVal, QTouchDevice* dev, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument, QNativeGestureEvent** outptr_QNativeGestureEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QNativeGestureEvent_new3(QNativeGestureEvent* param1, QNativeGestureEvent** outptr_QNativeGestureEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QNativeGestureEvent* QNativeGestureEvent_new(int typeVal, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument); +QNativeGestureEvent* QNativeGestureEvent_new2(int typeVal, QTouchDevice* dev, QPointF* localPos, QPointF* windowPos, QPointF* screenPos, double value, unsigned long sequenceId, unsigned long long intArgument); +QNativeGestureEvent* QNativeGestureEvent_new3(QNativeGestureEvent* param1); +void QNativeGestureEvent_virtbase(QNativeGestureEvent* src, QInputEvent** outptr_QInputEvent); int QNativeGestureEvent_GestureType(const QNativeGestureEvent* self); double QNativeGestureEvent_Value(const QNativeGestureEvent* self); QPoint* QNativeGestureEvent_Pos(const QNativeGestureEvent* self); @@ -269,15 +276,16 @@ QPointF* QNativeGestureEvent_ScreenPos(const QNativeGestureEvent* self); QTouchDevice* QNativeGestureEvent_Device(const QNativeGestureEvent* self); void QNativeGestureEvent_Delete(QNativeGestureEvent* self, bool isSubclass); -void QKeyEvent_new(int typeVal, int key, int modifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new3(QKeyEvent* param1, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new6(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QKeyEvent* QKeyEvent_new(int typeVal, int key, int modifiers); +QKeyEvent* QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers); +QKeyEvent* QKeyEvent_new3(QKeyEvent* param1); +QKeyEvent* QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text); +QKeyEvent* QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep); +QKeyEvent* QKeyEvent_new6(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count); +QKeyEvent* QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text); +QKeyEvent* QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep); +QKeyEvent* QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count); +void QKeyEvent_virtbase(QKeyEvent* src, QInputEvent** outptr_QInputEvent); int QKeyEvent_Key(const QKeyEvent* self); bool QKeyEvent_Matches(const QKeyEvent* self, int key); int QKeyEvent_Modifiers(const QKeyEvent* self); @@ -289,67 +297,78 @@ unsigned int QKeyEvent_NativeVirtualKey(const QKeyEvent* self); unsigned int QKeyEvent_NativeModifiers(const QKeyEvent* self); void QKeyEvent_Delete(QKeyEvent* self, bool isSubclass); -void QFocusEvent_new(int typeVal, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent); -void QFocusEvent_new2(QFocusEvent* param1, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent); -void QFocusEvent_new3(int typeVal, int reason, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent); +QFocusEvent* QFocusEvent_new(int typeVal); +QFocusEvent* QFocusEvent_new2(QFocusEvent* param1); +QFocusEvent* QFocusEvent_new3(int typeVal, int reason); +void QFocusEvent_virtbase(QFocusEvent* src, QEvent** outptr_QEvent); bool QFocusEvent_GotFocus(const QFocusEvent* self); bool QFocusEvent_LostFocus(const QFocusEvent* self); int QFocusEvent_Reason(const QFocusEvent* self); void QFocusEvent_Delete(QFocusEvent* self, bool isSubclass); -void QPaintEvent_new(QRegion* paintRegion, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent); -void QPaintEvent_new2(QRect* paintRect, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent); -void QPaintEvent_new3(QPaintEvent* param1, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent); +QPaintEvent* QPaintEvent_new(QRegion* paintRegion); +QPaintEvent* QPaintEvent_new2(QRect* paintRect); +QPaintEvent* QPaintEvent_new3(QPaintEvent* param1); +void QPaintEvent_virtbase(QPaintEvent* src, QEvent** outptr_QEvent); QRect* QPaintEvent_Rect(const QPaintEvent* self); QRegion* QPaintEvent_Region(const QPaintEvent* self); void QPaintEvent_Delete(QPaintEvent* self, bool isSubclass); -void QMoveEvent_new(QPoint* pos, QPoint* oldPos, QMoveEvent** outptr_QMoveEvent, QEvent** outptr_QEvent); -void QMoveEvent_new2(QMoveEvent* param1, QMoveEvent** outptr_QMoveEvent, QEvent** outptr_QEvent); +QMoveEvent* QMoveEvent_new(QPoint* pos, QPoint* oldPos); +QMoveEvent* QMoveEvent_new2(QMoveEvent* param1); +void QMoveEvent_virtbase(QMoveEvent* src, QEvent** outptr_QEvent); QPoint* QMoveEvent_Pos(const QMoveEvent* self); QPoint* QMoveEvent_OldPos(const QMoveEvent* self); void QMoveEvent_Delete(QMoveEvent* self, bool isSubclass); -void QExposeEvent_new(QRegion* rgn, QExposeEvent** outptr_QExposeEvent, QEvent** outptr_QEvent); -void QExposeEvent_new2(QExposeEvent* param1, QExposeEvent** outptr_QExposeEvent, QEvent** outptr_QEvent); +QExposeEvent* QExposeEvent_new(QRegion* rgn); +QExposeEvent* QExposeEvent_new2(QExposeEvent* param1); +void QExposeEvent_virtbase(QExposeEvent* src, QEvent** outptr_QEvent); QRegion* QExposeEvent_Region(const QExposeEvent* self); void QExposeEvent_Delete(QExposeEvent* self, bool isSubclass); -void QPlatformSurfaceEvent_new(int surfaceEventType, QPlatformSurfaceEvent** outptr_QPlatformSurfaceEvent, QEvent** outptr_QEvent); -void QPlatformSurfaceEvent_new2(QPlatformSurfaceEvent* param1, QPlatformSurfaceEvent** outptr_QPlatformSurfaceEvent, QEvent** outptr_QEvent); +QPlatformSurfaceEvent* QPlatformSurfaceEvent_new(int surfaceEventType); +QPlatformSurfaceEvent* QPlatformSurfaceEvent_new2(QPlatformSurfaceEvent* param1); +void QPlatformSurfaceEvent_virtbase(QPlatformSurfaceEvent* src, QEvent** outptr_QEvent); int QPlatformSurfaceEvent_SurfaceEventType(const QPlatformSurfaceEvent* self); void QPlatformSurfaceEvent_Delete(QPlatformSurfaceEvent* self, bool isSubclass); -void QResizeEvent_new(QSize* size, QSize* oldSize, QResizeEvent** outptr_QResizeEvent, QEvent** outptr_QEvent); -void QResizeEvent_new2(QResizeEvent* param1, QResizeEvent** outptr_QResizeEvent, QEvent** outptr_QEvent); +QResizeEvent* QResizeEvent_new(QSize* size, QSize* oldSize); +QResizeEvent* QResizeEvent_new2(QResizeEvent* param1); +void QResizeEvent_virtbase(QResizeEvent* src, QEvent** outptr_QEvent); QSize* QResizeEvent_Size(const QResizeEvent* self); QSize* QResizeEvent_OldSize(const QResizeEvent* self); void QResizeEvent_Delete(QResizeEvent* self, bool isSubclass); -void QCloseEvent_new(QCloseEvent** outptr_QCloseEvent, QEvent** outptr_QEvent); -void QCloseEvent_new2(QCloseEvent* param1, QCloseEvent** outptr_QCloseEvent, QEvent** outptr_QEvent); +QCloseEvent* QCloseEvent_new(); +QCloseEvent* QCloseEvent_new2(QCloseEvent* param1); +void QCloseEvent_virtbase(QCloseEvent* src, QEvent** outptr_QEvent); void QCloseEvent_OperatorAssign(QCloseEvent* self, QCloseEvent* param1); void QCloseEvent_Delete(QCloseEvent* self, bool isSubclass); -void QIconDragEvent_new(QIconDragEvent** outptr_QIconDragEvent, QEvent** outptr_QEvent); -void QIconDragEvent_new2(QIconDragEvent* param1, QIconDragEvent** outptr_QIconDragEvent, QEvent** outptr_QEvent); +QIconDragEvent* QIconDragEvent_new(); +QIconDragEvent* QIconDragEvent_new2(QIconDragEvent* param1); +void QIconDragEvent_virtbase(QIconDragEvent* src, QEvent** outptr_QEvent); void QIconDragEvent_OperatorAssign(QIconDragEvent* self, QIconDragEvent* param1); void QIconDragEvent_Delete(QIconDragEvent* self, bool isSubclass); -void QShowEvent_new(QShowEvent** outptr_QShowEvent, QEvent** outptr_QEvent); -void QShowEvent_new2(QShowEvent* param1, QShowEvent** outptr_QShowEvent, QEvent** outptr_QEvent); +QShowEvent* QShowEvent_new(); +QShowEvent* QShowEvent_new2(QShowEvent* param1); +void QShowEvent_virtbase(QShowEvent* src, QEvent** outptr_QEvent); void QShowEvent_OperatorAssign(QShowEvent* self, QShowEvent* param1); void QShowEvent_Delete(QShowEvent* self, bool isSubclass); -void QHideEvent_new(QHideEvent** outptr_QHideEvent, QEvent** outptr_QEvent); -void QHideEvent_new2(QHideEvent* param1, QHideEvent** outptr_QHideEvent, QEvent** outptr_QEvent); +QHideEvent* QHideEvent_new(); +QHideEvent* QHideEvent_new2(QHideEvent* param1); +void QHideEvent_virtbase(QHideEvent* src, QEvent** outptr_QEvent); void QHideEvent_OperatorAssign(QHideEvent* self, QHideEvent* param1); void QHideEvent_Delete(QHideEvent* self, bool isSubclass); -void QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos, int modifiers, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QContextMenuEvent_new2(int reason, QPoint* pos, QPoint* globalPos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QContextMenuEvent_new3(int reason, QPoint* pos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QContextMenuEvent_new4(QContextMenuEvent* param1, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QContextMenuEvent* QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos, int modifiers); +QContextMenuEvent* QContextMenuEvent_new2(int reason, QPoint* pos, QPoint* globalPos); +QContextMenuEvent* QContextMenuEvent_new3(int reason, QPoint* pos); +QContextMenuEvent* QContextMenuEvent_new4(QContextMenuEvent* param1); +void QContextMenuEvent_virtbase(QContextMenuEvent* src, QInputEvent** outptr_QInputEvent); int QContextMenuEvent_X(const QContextMenuEvent* self); int QContextMenuEvent_Y(const QContextMenuEvent* self); int QContextMenuEvent_GlobalX(const QContextMenuEvent* self); @@ -359,9 +378,10 @@ QPoint* QContextMenuEvent_GlobalPos(const QContextMenuEvent* self); int QContextMenuEvent_Reason(const QContextMenuEvent* self); void QContextMenuEvent_Delete(QContextMenuEvent* self, bool isSubclass); -void QInputMethodEvent_new(QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent); -void QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes, QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent); -void QInputMethodEvent_new3(QInputMethodEvent* other, QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent); +QInputMethodEvent* QInputMethodEvent_new(); +QInputMethodEvent* QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes); +QInputMethodEvent* QInputMethodEvent_new3(QInputMethodEvent* other); +void QInputMethodEvent_virtbase(QInputMethodEvent* src, QEvent** outptr_QEvent); void QInputMethodEvent_SetCommitString(QInputMethodEvent* self, struct miqt_string commitString); struct miqt_array /* of QInputMethodEvent__Attribute* */ QInputMethodEvent_Attributes(const QInputMethodEvent* self); struct miqt_string QInputMethodEvent_PreeditString(const QInputMethodEvent* self); @@ -372,16 +392,18 @@ void QInputMethodEvent_SetCommitString2(QInputMethodEvent* self, struct miqt_str void QInputMethodEvent_SetCommitString3(QInputMethodEvent* self, struct miqt_string commitString, int replaceFrom, int replaceLength); void QInputMethodEvent_Delete(QInputMethodEvent* self, bool isSubclass); -void QInputMethodQueryEvent_new(int queries, QInputMethodQueryEvent** outptr_QInputMethodQueryEvent, QEvent** outptr_QEvent); -void QInputMethodQueryEvent_new2(QInputMethodQueryEvent* param1, QInputMethodQueryEvent** outptr_QInputMethodQueryEvent, QEvent** outptr_QEvent); +QInputMethodQueryEvent* QInputMethodQueryEvent_new(int queries); +QInputMethodQueryEvent* QInputMethodQueryEvent_new2(QInputMethodQueryEvent* param1); +void QInputMethodQueryEvent_virtbase(QInputMethodQueryEvent* src, QEvent** outptr_QEvent); int QInputMethodQueryEvent_Queries(const QInputMethodQueryEvent* self); void QInputMethodQueryEvent_SetValue(QInputMethodQueryEvent* self, int query, QVariant* value); QVariant* QInputMethodQueryEvent_Value(const QInputMethodQueryEvent* self, int query); void QInputMethodQueryEvent_Delete(QInputMethodQueryEvent* self, bool isSubclass); -void QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); -void QDropEvent_new2(QDropEvent* param1, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); -void QDropEvent_new3(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); +QDropEvent* QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers); +QDropEvent* QDropEvent_new2(QDropEvent* param1); +QDropEvent* QDropEvent_new3(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal); +void QDropEvent_virtbase(QDropEvent* src, QEvent** outptr_QEvent); QPoint* QDropEvent_Pos(const QDropEvent* self); QPointF* QDropEvent_PosF(const QDropEvent* self); int QDropEvent_MouseButtons(const QDropEvent* self); @@ -395,9 +417,10 @@ QObject* QDropEvent_Source(const QDropEvent* self); QMimeData* QDropEvent_MimeData(const QDropEvent* self); void QDropEvent_Delete(QDropEvent* self, bool isSubclass); -void QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); -void QDragMoveEvent_new2(QDragMoveEvent* param1, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); -void QDragMoveEvent_new3(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); +QDragMoveEvent* QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers); +QDragMoveEvent* QDragMoveEvent_new2(QDragMoveEvent* param1); +QDragMoveEvent* QDragMoveEvent_new3(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal); +void QDragMoveEvent_virtbase(QDragMoveEvent* src, QDropEvent** outptr_QDropEvent); QRect* QDragMoveEvent_AnswerRect(const QDragMoveEvent* self); void QDragMoveEvent_Accept(QDragMoveEvent* self); void QDragMoveEvent_Ignore(QDragMoveEvent* self); @@ -405,18 +428,21 @@ void QDragMoveEvent_AcceptWithQRect(QDragMoveEvent* self, QRect* r); void QDragMoveEvent_IgnoreWithQRect(QDragMoveEvent* self, QRect* r); void QDragMoveEvent_Delete(QDragMoveEvent* self, bool isSubclass); -void QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragEnterEvent** outptr_QDragEnterEvent, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); -void QDragEnterEvent_new2(QDragEnterEvent* param1, QDragEnterEvent** outptr_QDragEnterEvent, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); +QDragEnterEvent* QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers); +QDragEnterEvent* QDragEnterEvent_new2(QDragEnterEvent* param1); +void QDragEnterEvent_virtbase(QDragEnterEvent* src, QDragMoveEvent** outptr_QDragMoveEvent); void QDragEnterEvent_OperatorAssign(QDragEnterEvent* self, QDragEnterEvent* param1); void QDragEnterEvent_Delete(QDragEnterEvent* self, bool isSubclass); -void QDragLeaveEvent_new(QDragLeaveEvent** outptr_QDragLeaveEvent, QEvent** outptr_QEvent); -void QDragLeaveEvent_new2(QDragLeaveEvent* param1, QDragLeaveEvent** outptr_QDragLeaveEvent, QEvent** outptr_QEvent); +QDragLeaveEvent* QDragLeaveEvent_new(); +QDragLeaveEvent* QDragLeaveEvent_new2(QDragLeaveEvent* param1); +void QDragLeaveEvent_virtbase(QDragLeaveEvent* src, QEvent** outptr_QEvent); void QDragLeaveEvent_OperatorAssign(QDragLeaveEvent* self, QDragLeaveEvent* param1); void QDragLeaveEvent_Delete(QDragLeaveEvent* self, bool isSubclass); -void QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos, QHelpEvent** outptr_QHelpEvent, QEvent** outptr_QEvent); -void QHelpEvent_new2(QHelpEvent* param1, QHelpEvent** outptr_QHelpEvent, QEvent** outptr_QEvent); +QHelpEvent* QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos); +QHelpEvent* QHelpEvent_new2(QHelpEvent* param1); +void QHelpEvent_virtbase(QHelpEvent* src, QEvent** outptr_QEvent); int QHelpEvent_X(const QHelpEvent* self); int QHelpEvent_Y(const QHelpEvent* self); int QHelpEvent_GlobalX(const QHelpEvent* self); @@ -425,65 +451,73 @@ QPoint* QHelpEvent_Pos(const QHelpEvent* self); QPoint* QHelpEvent_GlobalPos(const QHelpEvent* self); void QHelpEvent_Delete(QHelpEvent* self, bool isSubclass); -void QStatusTipEvent_new(struct miqt_string tip, QStatusTipEvent** outptr_QStatusTipEvent, QEvent** outptr_QEvent); -void QStatusTipEvent_new2(QStatusTipEvent* param1, QStatusTipEvent** outptr_QStatusTipEvent, QEvent** outptr_QEvent); +QStatusTipEvent* QStatusTipEvent_new(struct miqt_string tip); +QStatusTipEvent* QStatusTipEvent_new2(QStatusTipEvent* param1); +void QStatusTipEvent_virtbase(QStatusTipEvent* src, QEvent** outptr_QEvent); struct miqt_string QStatusTipEvent_Tip(const QStatusTipEvent* self); void QStatusTipEvent_Delete(QStatusTipEvent* self, bool isSubclass); -void QWhatsThisClickedEvent_new(struct miqt_string href, QWhatsThisClickedEvent** outptr_QWhatsThisClickedEvent, QEvent** outptr_QEvent); -void QWhatsThisClickedEvent_new2(QWhatsThisClickedEvent* param1, QWhatsThisClickedEvent** outptr_QWhatsThisClickedEvent, QEvent** outptr_QEvent); +QWhatsThisClickedEvent* QWhatsThisClickedEvent_new(struct miqt_string href); +QWhatsThisClickedEvent* QWhatsThisClickedEvent_new2(QWhatsThisClickedEvent* param1); +void QWhatsThisClickedEvent_virtbase(QWhatsThisClickedEvent* src, QEvent** outptr_QEvent); struct miqt_string QWhatsThisClickedEvent_Href(const QWhatsThisClickedEvent* self); void QWhatsThisClickedEvent_Delete(QWhatsThisClickedEvent* self, bool isSubclass); -void QActionEvent_new(int typeVal, QAction* action, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent); -void QActionEvent_new2(QActionEvent* param1, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent); -void QActionEvent_new3(int typeVal, QAction* action, QAction* before, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent); +QActionEvent* QActionEvent_new(int typeVal, QAction* action); +QActionEvent* QActionEvent_new2(QActionEvent* param1); +QActionEvent* QActionEvent_new3(int typeVal, QAction* action, QAction* before); +void QActionEvent_virtbase(QActionEvent* src, QEvent** outptr_QEvent); QAction* QActionEvent_Action(const QActionEvent* self); QAction* QActionEvent_Before(const QActionEvent* self); void QActionEvent_OperatorAssign(QActionEvent* self, QActionEvent* param1); void QActionEvent_Delete(QActionEvent* self, bool isSubclass); -void QFileOpenEvent_new(struct miqt_string file, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent); -void QFileOpenEvent_new2(QUrl* url, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent); -void QFileOpenEvent_new3(QFileOpenEvent* param1, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent); +QFileOpenEvent* QFileOpenEvent_new(struct miqt_string file); +QFileOpenEvent* QFileOpenEvent_new2(QUrl* url); +QFileOpenEvent* QFileOpenEvent_new3(QFileOpenEvent* param1); +void QFileOpenEvent_virtbase(QFileOpenEvent* src, QEvent** outptr_QEvent); struct miqt_string QFileOpenEvent_File(const QFileOpenEvent* self); QUrl* QFileOpenEvent_Url(const QFileOpenEvent* self); bool QFileOpenEvent_OpenFile(const QFileOpenEvent* self, QFile* file, int flags); void QFileOpenEvent_Delete(QFileOpenEvent* self, bool isSubclass); -void QToolBarChangeEvent_new(bool t, QToolBarChangeEvent** outptr_QToolBarChangeEvent, QEvent** outptr_QEvent); -void QToolBarChangeEvent_new2(QToolBarChangeEvent* param1, QToolBarChangeEvent** outptr_QToolBarChangeEvent, QEvent** outptr_QEvent); +QToolBarChangeEvent* QToolBarChangeEvent_new(bool t); +QToolBarChangeEvent* QToolBarChangeEvent_new2(QToolBarChangeEvent* param1); +void QToolBarChangeEvent_virtbase(QToolBarChangeEvent* src, QEvent** outptr_QEvent); bool QToolBarChangeEvent_Toggle(const QToolBarChangeEvent* self); void QToolBarChangeEvent_Delete(QToolBarChangeEvent* self, bool isSubclass); -void QShortcutEvent_new(QKeySequence* key, int id, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent); -void QShortcutEvent_new2(QShortcutEvent* param1, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent); -void QShortcutEvent_new3(QKeySequence* key, int id, bool ambiguous, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent); +QShortcutEvent* QShortcutEvent_new(QKeySequence* key, int id); +QShortcutEvent* QShortcutEvent_new2(QShortcutEvent* param1); +QShortcutEvent* QShortcutEvent_new3(QKeySequence* key, int id, bool ambiguous); +void QShortcutEvent_virtbase(QShortcutEvent* src, QEvent** outptr_QEvent); QKeySequence* QShortcutEvent_Key(const QShortcutEvent* self); int QShortcutEvent_ShortcutId(const QShortcutEvent* self); bool QShortcutEvent_IsAmbiguous(const QShortcutEvent* self); void QShortcutEvent_Delete(QShortcutEvent* self, bool isSubclass); -void QWindowStateChangeEvent_new(int aOldState, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent); -void QWindowStateChangeEvent_new2(QWindowStateChangeEvent* param1, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent); -void QWindowStateChangeEvent_new3(int aOldState, bool isOverride, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent); +QWindowStateChangeEvent* QWindowStateChangeEvent_new(int aOldState); +QWindowStateChangeEvent* QWindowStateChangeEvent_new2(QWindowStateChangeEvent* param1); +QWindowStateChangeEvent* QWindowStateChangeEvent_new3(int aOldState, bool isOverride); +void QWindowStateChangeEvent_virtbase(QWindowStateChangeEvent* src, QEvent** outptr_QEvent); int QWindowStateChangeEvent_OldState(const QWindowStateChangeEvent* self); bool QWindowStateChangeEvent_IsOverride(const QWindowStateChangeEvent* self); void QWindowStateChangeEvent_Delete(QWindowStateChangeEvent* self, bool isSubclass); -void QPointingDeviceUniqueId_new(QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId); -void QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1, QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId); +QPointingDeviceUniqueId* QPointingDeviceUniqueId_new(); +QPointingDeviceUniqueId* QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1); QPointingDeviceUniqueId* QPointingDeviceUniqueId_FromNumericId(long long id); bool QPointingDeviceUniqueId_IsValid(const QPointingDeviceUniqueId* self); long long QPointingDeviceUniqueId_NumericId(const QPointingDeviceUniqueId* self); void QPointingDeviceUniqueId_Delete(QPointingDeviceUniqueId* self, bool isSubclass); -void QTouchEvent_new(int eventType, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QTouchEvent_new2(QTouchEvent* param1, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QTouchEvent_new3(int eventType, QTouchDevice* device, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QTouchEvent_new4(int eventType, QTouchDevice* device, int modifiers, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QTouchEvent_new5(int eventType, QTouchDevice* device, int modifiers, int touchPointStates, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QTouchEvent_new6(int eventType, QTouchDevice* device, int modifiers, int touchPointStates, struct miqt_array /* of QTouchEvent__TouchPoint* */ touchPoints, QTouchEvent** outptr_QTouchEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QTouchEvent* QTouchEvent_new(int eventType); +QTouchEvent* QTouchEvent_new2(QTouchEvent* param1); +QTouchEvent* QTouchEvent_new3(int eventType, QTouchDevice* device); +QTouchEvent* QTouchEvent_new4(int eventType, QTouchDevice* device, int modifiers); +QTouchEvent* QTouchEvent_new5(int eventType, QTouchDevice* device, int modifiers, int touchPointStates); +QTouchEvent* QTouchEvent_new6(int eventType, QTouchDevice* device, int modifiers, int touchPointStates, struct miqt_array /* of QTouchEvent__TouchPoint* */ touchPoints); +void QTouchEvent_virtbase(QTouchEvent* src, QInputEvent** outptr_QInputEvent); QWindow* QTouchEvent_Window(const QTouchEvent* self); QObject* QTouchEvent_Target(const QTouchEvent* self); int QTouchEvent_TouchPointStates(const QTouchEvent* self); @@ -496,8 +530,9 @@ void QTouchEvent_SetTouchPoints(QTouchEvent* self, struct miqt_array /* of QTouc void QTouchEvent_SetDevice(QTouchEvent* self, QTouchDevice* adevice); void QTouchEvent_Delete(QTouchEvent* self, bool isSubclass); -void QScrollPrepareEvent_new(QPointF* startPos, QScrollPrepareEvent** outptr_QScrollPrepareEvent, QEvent** outptr_QEvent); -void QScrollPrepareEvent_new2(QScrollPrepareEvent* param1, QScrollPrepareEvent** outptr_QScrollPrepareEvent, QEvent** outptr_QEvent); +QScrollPrepareEvent* QScrollPrepareEvent_new(QPointF* startPos); +QScrollPrepareEvent* QScrollPrepareEvent_new2(QScrollPrepareEvent* param1); +void QScrollPrepareEvent_virtbase(QScrollPrepareEvent* src, QEvent** outptr_QEvent); QPointF* QScrollPrepareEvent_StartPos(const QScrollPrepareEvent* self); QSizeF* QScrollPrepareEvent_ViewportSize(const QScrollPrepareEvent* self); QRectF* QScrollPrepareEvent_ContentPosRange(const QScrollPrepareEvent* self); @@ -507,33 +542,36 @@ void QScrollPrepareEvent_SetContentPosRange(QScrollPrepareEvent* self, QRectF* r void QScrollPrepareEvent_SetContentPos(QScrollPrepareEvent* self, QPointF* pos); void QScrollPrepareEvent_Delete(QScrollPrepareEvent* self, bool isSubclass); -void QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState, QScrollEvent** outptr_QScrollEvent, QEvent** outptr_QEvent); -void QScrollEvent_new2(QScrollEvent* param1, QScrollEvent** outptr_QScrollEvent, QEvent** outptr_QEvent); +QScrollEvent* QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState); +QScrollEvent* QScrollEvent_new2(QScrollEvent* param1); +void QScrollEvent_virtbase(QScrollEvent* src, QEvent** outptr_QEvent); QPointF* QScrollEvent_ContentPos(const QScrollEvent* self); QPointF* QScrollEvent_OvershootDistance(const QScrollEvent* self); int QScrollEvent_ScrollState(const QScrollEvent* self); void QScrollEvent_Delete(QScrollEvent* self, bool isSubclass); -void QScreenOrientationChangeEvent_new(QScreen* screen, int orientation, QScreenOrientationChangeEvent** outptr_QScreenOrientationChangeEvent, QEvent** outptr_QEvent); -void QScreenOrientationChangeEvent_new2(QScreenOrientationChangeEvent* param1, QScreenOrientationChangeEvent** outptr_QScreenOrientationChangeEvent, QEvent** outptr_QEvent); +QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_new(QScreen* screen, int orientation); +QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_new2(QScreenOrientationChangeEvent* param1); +void QScreenOrientationChangeEvent_virtbase(QScreenOrientationChangeEvent* src, QEvent** outptr_QEvent); QScreen* QScreenOrientationChangeEvent_Screen(const QScreenOrientationChangeEvent* self); int QScreenOrientationChangeEvent_Orientation(const QScreenOrientationChangeEvent* self); void QScreenOrientationChangeEvent_Delete(QScreenOrientationChangeEvent* self, bool isSubclass); -void QApplicationStateChangeEvent_new(int state, QApplicationStateChangeEvent** outptr_QApplicationStateChangeEvent, QEvent** outptr_QEvent); -void QApplicationStateChangeEvent_new2(QApplicationStateChangeEvent* param1, QApplicationStateChangeEvent** outptr_QApplicationStateChangeEvent, QEvent** outptr_QEvent); +QApplicationStateChangeEvent* QApplicationStateChangeEvent_new(int state); +QApplicationStateChangeEvent* QApplicationStateChangeEvent_new2(QApplicationStateChangeEvent* param1); +void QApplicationStateChangeEvent_virtbase(QApplicationStateChangeEvent* src, QEvent** outptr_QEvent); int QApplicationStateChangeEvent_ApplicationState(const QApplicationStateChangeEvent* self); void QApplicationStateChangeEvent_Delete(QApplicationStateChangeEvent* self, bool isSubclass); -void QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute); -void QInputMethodEvent__Attribute_new2(int typ, int s, int l, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute); -void QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute); +QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val); +QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new2(int typ, int s, int l); +QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1); void QInputMethodEvent__Attribute_OperatorAssign(QInputMethodEvent__Attribute* self, QInputMethodEvent__Attribute* param1); void QInputMethodEvent__Attribute_Delete(QInputMethodEvent__Attribute* self, bool isSubclass); -void QTouchEvent__TouchPoint_new(QTouchEvent__TouchPoint** outptr_QTouchEvent__TouchPoint); -void QTouchEvent__TouchPoint_new2(QTouchEvent__TouchPoint* other, QTouchEvent__TouchPoint** outptr_QTouchEvent__TouchPoint); -void QTouchEvent__TouchPoint_new3(int id, QTouchEvent__TouchPoint** outptr_QTouchEvent__TouchPoint); +QTouchEvent__TouchPoint* QTouchEvent__TouchPoint_new(); +QTouchEvent__TouchPoint* QTouchEvent__TouchPoint_new2(QTouchEvent__TouchPoint* other); +QTouchEvent__TouchPoint* QTouchEvent__TouchPoint_new3(int id); void QTouchEvent__TouchPoint_OperatorAssign(QTouchEvent__TouchPoint* self, QTouchEvent__TouchPoint* other); void QTouchEvent__TouchPoint_Swap(QTouchEvent__TouchPoint* self, QTouchEvent__TouchPoint* other); int QTouchEvent__TouchPoint_Id(const QTouchEvent__TouchPoint* self); diff --git a/qt/gen_qeventloop.cpp b/qt/gen_qeventloop.cpp index 94fac1ea..80ccd704 100644 --- a/qt/gen_qeventloop.cpp +++ b/qt/gen_qeventloop.cpp @@ -195,16 +195,16 @@ public: }; -void QEventLoop_new(QEventLoop** outptr_QEventLoop, QObject** outptr_QObject) { - MiqtVirtualQEventLoop* ret = new MiqtVirtualQEventLoop(); - *outptr_QEventLoop = ret; - *outptr_QObject = static_cast(ret); +QEventLoop* QEventLoop_new() { + return new MiqtVirtualQEventLoop(); } -void QEventLoop_new2(QObject* parent, QEventLoop** outptr_QEventLoop, QObject** outptr_QObject) { - MiqtVirtualQEventLoop* ret = new MiqtVirtualQEventLoop(parent); - *outptr_QEventLoop = ret; - *outptr_QObject = static_cast(ret); +QEventLoop* QEventLoop_new2(QObject* parent) { + return new MiqtVirtualQEventLoop(parent); +} + +void QEventLoop_virtbase(QEventLoop* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QEventLoop_MetaObject(const QEventLoop* self) { @@ -389,19 +389,16 @@ void QEventLoop_Delete(QEventLoop* self, bool isSubclass) { } } -void QEventLoopLocker_new(QEventLoopLocker** outptr_QEventLoopLocker) { - QEventLoopLocker* ret = new QEventLoopLocker(); - *outptr_QEventLoopLocker = ret; +QEventLoopLocker* QEventLoopLocker_new() { + return new QEventLoopLocker(); } -void QEventLoopLocker_new2(QEventLoop* loop, QEventLoopLocker** outptr_QEventLoopLocker) { - QEventLoopLocker* ret = new QEventLoopLocker(loop); - *outptr_QEventLoopLocker = ret; +QEventLoopLocker* QEventLoopLocker_new2(QEventLoop* loop) { + return new QEventLoopLocker(loop); } -void QEventLoopLocker_new3(QThread* thread, QEventLoopLocker** outptr_QEventLoopLocker) { - QEventLoopLocker* ret = new QEventLoopLocker(thread); - *outptr_QEventLoopLocker = ret; +QEventLoopLocker* QEventLoopLocker_new3(QThread* thread) { + return new QEventLoopLocker(thread); } void QEventLoopLocker_Delete(QEventLoopLocker* self, bool isSubclass) { diff --git a/qt/gen_qeventloop.go b/qt/gen_qeventloop.go index 391a1d28..72d6ac12 100644 --- a/qt/gen_qeventloop.go +++ b/qt/gen_qeventloop.go @@ -47,42 +47,34 @@ func (this *QEventLoop) UnsafePointer() unsafe.Pointer { } // newQEventLoop constructs the type using only CGO pointers. -func newQEventLoop(h *C.QEventLoop, h_QObject *C.QObject) *QEventLoop { +func newQEventLoop(h *C.QEventLoop) *QEventLoop { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QEventLoop_virtbase(h, &outptr_QObject) + return &QEventLoop{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQEventLoop constructs the type using only unsafe pointers. -func UnsafeNewQEventLoop(h unsafe.Pointer, h_QObject unsafe.Pointer) *QEventLoop { - if h == nil { - return nil - } - - return &QEventLoop{h: (*C.QEventLoop)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQEventLoop(h unsafe.Pointer) *QEventLoop { + return newQEventLoop((*C.QEventLoop)(h)) } // NewQEventLoop constructs a new QEventLoop object. func NewQEventLoop() *QEventLoop { - var outptr_QEventLoop *C.QEventLoop = nil - var outptr_QObject *C.QObject = nil - C.QEventLoop_new(&outptr_QEventLoop, &outptr_QObject) - ret := newQEventLoop(outptr_QEventLoop, outptr_QObject) + ret := newQEventLoop(C.QEventLoop_new()) ret.isSubclass = true return ret } // NewQEventLoop2 constructs a new QEventLoop object. func NewQEventLoop2(parent *QObject) *QEventLoop { - var outptr_QEventLoop *C.QEventLoop = nil - var outptr_QObject *C.QObject = nil - C.QEventLoop_new2(parent.cPointer(), &outptr_QEventLoop, &outptr_QObject) - ret := newQEventLoop(outptr_QEventLoop, outptr_QObject) + ret := newQEventLoop(C.QEventLoop_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -281,7 +273,7 @@ func miqt_exec_callback_QEventLoop_TimerEvent(self *C.QEventLoop, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QEventLoop{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -307,7 +299,7 @@ func miqt_exec_callback_QEventLoop_ChildEvent(self *C.QEventLoop, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QEventLoop{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -429,44 +421,35 @@ func newQEventLoopLocker(h *C.QEventLoopLocker) *QEventLoopLocker { if h == nil { return nil } + return &QEventLoopLocker{h: h} } // UnsafeNewQEventLoopLocker constructs the type using only unsafe pointers. func UnsafeNewQEventLoopLocker(h unsafe.Pointer) *QEventLoopLocker { - if h == nil { - return nil - } - - return &QEventLoopLocker{h: (*C.QEventLoopLocker)(h)} + return newQEventLoopLocker((*C.QEventLoopLocker)(h)) } // NewQEventLoopLocker constructs a new QEventLoopLocker object. func NewQEventLoopLocker() *QEventLoopLocker { - var outptr_QEventLoopLocker *C.QEventLoopLocker = nil - C.QEventLoopLocker_new(&outptr_QEventLoopLocker) - ret := newQEventLoopLocker(outptr_QEventLoopLocker) + ret := newQEventLoopLocker(C.QEventLoopLocker_new()) ret.isSubclass = true return ret } // NewQEventLoopLocker2 constructs a new QEventLoopLocker object. func NewQEventLoopLocker2(loop *QEventLoop) *QEventLoopLocker { - var outptr_QEventLoopLocker *C.QEventLoopLocker = nil - C.QEventLoopLocker_new2(loop.cPointer(), &outptr_QEventLoopLocker) - ret := newQEventLoopLocker(outptr_QEventLoopLocker) + ret := newQEventLoopLocker(C.QEventLoopLocker_new2(loop.cPointer())) ret.isSubclass = true return ret } // NewQEventLoopLocker3 constructs a new QEventLoopLocker object. func NewQEventLoopLocker3(thread *QThread) *QEventLoopLocker { - var outptr_QEventLoopLocker *C.QEventLoopLocker = nil - C.QEventLoopLocker_new3(thread.cPointer(), &outptr_QEventLoopLocker) - ret := newQEventLoopLocker(outptr_QEventLoopLocker) + ret := newQEventLoopLocker(C.QEventLoopLocker_new3(thread.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qeventloop.h b/qt/gen_qeventloop.h index 8ec7ea5b..28216251 100644 --- a/qt/gen_qeventloop.h +++ b/qt/gen_qeventloop.h @@ -36,8 +36,9 @@ typedef struct QThread QThread; typedef struct QTimerEvent QTimerEvent; #endif -void QEventLoop_new(QEventLoop** outptr_QEventLoop, QObject** outptr_QObject); -void QEventLoop_new2(QObject* parent, QEventLoop** outptr_QEventLoop, QObject** outptr_QObject); +QEventLoop* QEventLoop_new(); +QEventLoop* QEventLoop_new2(QObject* parent); +void QEventLoop_virtbase(QEventLoop* src, QObject** outptr_QObject); QMetaObject* QEventLoop_MetaObject(const QEventLoop* self); void* QEventLoop_Metacast(QEventLoop* self, const char* param1); struct miqt_string QEventLoop_Tr(const char* s); @@ -73,9 +74,9 @@ void QEventLoop_override_virtual_DisconnectNotify(void* self, intptr_t slot); void QEventLoop_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QEventLoop_Delete(QEventLoop* self, bool isSubclass); -void QEventLoopLocker_new(QEventLoopLocker** outptr_QEventLoopLocker); -void QEventLoopLocker_new2(QEventLoop* loop, QEventLoopLocker** outptr_QEventLoopLocker); -void QEventLoopLocker_new3(QThread* thread, QEventLoopLocker** outptr_QEventLoopLocker); +QEventLoopLocker* QEventLoopLocker_new(); +QEventLoopLocker* QEventLoopLocker_new2(QEventLoop* loop); +QEventLoopLocker* QEventLoopLocker_new3(QThread* thread); void QEventLoopLocker_Delete(QEventLoopLocker* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qeventtransition.cpp b/qt/gen_qeventtransition.cpp index e345c726..55b50680 100644 --- a/qt/gen_qeventtransition.cpp +++ b/qt/gen_qeventtransition.cpp @@ -93,32 +93,24 @@ public: }; -void QEventTransition_new(QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQEventTransition* ret = new MiqtVirtualQEventTransition(); - *outptr_QEventTransition = ret; - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QEventTransition* QEventTransition_new() { + return new MiqtVirtualQEventTransition(); } -void QEventTransition_new2(QObject* object, int typeVal, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQEventTransition* ret = new MiqtVirtualQEventTransition(object, static_cast(typeVal)); - *outptr_QEventTransition = ret; - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QEventTransition* QEventTransition_new2(QObject* object, int typeVal) { + return new MiqtVirtualQEventTransition(object, static_cast(typeVal)); } -void QEventTransition_new3(QState* sourceState, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQEventTransition* ret = new MiqtVirtualQEventTransition(sourceState); - *outptr_QEventTransition = ret; - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QEventTransition* QEventTransition_new3(QState* sourceState) { + return new MiqtVirtualQEventTransition(sourceState); } -void QEventTransition_new4(QObject* object, int typeVal, QState* sourceState, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQEventTransition* ret = new MiqtVirtualQEventTransition(object, static_cast(typeVal), sourceState); - *outptr_QEventTransition = ret; - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QEventTransition* QEventTransition_new4(QObject* object, int typeVal, QState* sourceState) { + return new MiqtVirtualQEventTransition(object, static_cast(typeVal), sourceState); +} + +void QEventTransition_virtbase(QEventTransition* src, QAbstractTransition** outptr_QAbstractTransition) { + *outptr_QAbstractTransition = static_cast(src); } QMetaObject* QEventTransition_MetaObject(const QEventTransition* self) { diff --git a/qt/gen_qeventtransition.go b/qt/gen_qeventtransition.go index d61bb9ae..a6f7167c 100644 --- a/qt/gen_qeventtransition.go +++ b/qt/gen_qeventtransition.go @@ -35,68 +35,50 @@ func (this *QEventTransition) UnsafePointer() unsafe.Pointer { } // newQEventTransition constructs the type using only CGO pointers. -func newQEventTransition(h *C.QEventTransition, h_QAbstractTransition *C.QAbstractTransition, h_QObject *C.QObject) *QEventTransition { +func newQEventTransition(h *C.QEventTransition) *QEventTransition { if h == nil { return nil } + var outptr_QAbstractTransition *C.QAbstractTransition = nil + C.QEventTransition_virtbase(h, &outptr_QAbstractTransition) + return &QEventTransition{h: h, - QAbstractTransition: newQAbstractTransition(h_QAbstractTransition, h_QObject)} + QAbstractTransition: newQAbstractTransition(outptr_QAbstractTransition)} } // UnsafeNewQEventTransition constructs the type using only unsafe pointers. -func UnsafeNewQEventTransition(h unsafe.Pointer, h_QAbstractTransition unsafe.Pointer, h_QObject unsafe.Pointer) *QEventTransition { - if h == nil { - return nil - } - - return &QEventTransition{h: (*C.QEventTransition)(h), - QAbstractTransition: UnsafeNewQAbstractTransition(h_QAbstractTransition, h_QObject)} +func UnsafeNewQEventTransition(h unsafe.Pointer) *QEventTransition { + return newQEventTransition((*C.QEventTransition)(h)) } // NewQEventTransition constructs a new QEventTransition object. func NewQEventTransition() *QEventTransition { - var outptr_QEventTransition *C.QEventTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QEventTransition_new(&outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQEventTransition(outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQEventTransition(C.QEventTransition_new()) ret.isSubclass = true return ret } // NewQEventTransition2 constructs a new QEventTransition object. func NewQEventTransition2(object *QObject, typeVal QEvent__Type) *QEventTransition { - var outptr_QEventTransition *C.QEventTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QEventTransition_new2(object.cPointer(), (C.int)(typeVal), &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQEventTransition(outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQEventTransition(C.QEventTransition_new2(object.cPointer(), (C.int)(typeVal))) ret.isSubclass = true return ret } // NewQEventTransition3 constructs a new QEventTransition object. func NewQEventTransition3(sourceState *QState) *QEventTransition { - var outptr_QEventTransition *C.QEventTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QEventTransition_new3(sourceState.cPointer(), &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQEventTransition(outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQEventTransition(C.QEventTransition_new3(sourceState.cPointer())) ret.isSubclass = true return ret } // NewQEventTransition4 constructs a new QEventTransition object. func NewQEventTransition4(object *QObject, typeVal QEvent__Type, sourceState *QState) *QEventTransition { - var outptr_QEventTransition *C.QEventTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QEventTransition_new4(object.cPointer(), (C.int)(typeVal), sourceState.cPointer(), &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQEventTransition(outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQEventTransition(C.QEventTransition_new4(object.cPointer(), (C.int)(typeVal), sourceState.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qeventtransition.h b/qt/gen_qeventtransition.h index 88443e4f..432800be 100644 --- a/qt/gen_qeventtransition.h +++ b/qt/gen_qeventtransition.h @@ -30,10 +30,11 @@ typedef struct QObject QObject; typedef struct QState QState; #endif -void QEventTransition_new(QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); -void QEventTransition_new2(QObject* object, int typeVal, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); -void QEventTransition_new3(QState* sourceState, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); -void QEventTransition_new4(QObject* object, int typeVal, QState* sourceState, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +QEventTransition* QEventTransition_new(); +QEventTransition* QEventTransition_new2(QObject* object, int typeVal); +QEventTransition* QEventTransition_new3(QState* sourceState); +QEventTransition* QEventTransition_new4(QObject* object, int typeVal, QState* sourceState); +void QEventTransition_virtbase(QEventTransition* src, QAbstractTransition** outptr_QAbstractTransition); QMetaObject* QEventTransition_MetaObject(const QEventTransition* self); void* QEventTransition_Metacast(QEventTransition* self, const char* param1); struct miqt_string QEventTransition_Tr(const char* s); diff --git a/qt/gen_qfactoryinterface.go b/qt/gen_qfactoryinterface.go index 5ee68e6d..839db0a4 100644 --- a/qt/gen_qfactoryinterface.go +++ b/qt/gen_qfactoryinterface.go @@ -37,16 +37,13 @@ func newQFactoryInterface(h *C.QFactoryInterface) *QFactoryInterface { if h == nil { return nil } + return &QFactoryInterface{h: h} } // UnsafeNewQFactoryInterface constructs the type using only unsafe pointers. func UnsafeNewQFactoryInterface(h unsafe.Pointer) *QFactoryInterface { - if h == nil { - return nil - } - - return &QFactoryInterface{h: (*C.QFactoryInterface)(h)} + return newQFactoryInterface((*C.QFactoryInterface)(h)) } func (this *QFactoryInterface) Keys() []string { diff --git a/qt/gen_qfile.cpp b/qt/gen_qfile.cpp index b90a6204..35f2baa4 100644 --- a/qt/gen_qfile.cpp +++ b/qt/gen_qfile.cpp @@ -363,38 +363,26 @@ public: }; -void QFile_new(QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQFile* ret = new MiqtVirtualQFile(); - *outptr_QFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QFile* QFile_new() { + return new MiqtVirtualQFile(); } -void QFile_new2(struct miqt_string name, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { +QFile* QFile_new2(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQFile* ret = new MiqtVirtualQFile(name_QString); - *outptr_QFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQFile(name_QString); } -void QFile_new3(QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQFile* ret = new MiqtVirtualQFile(parent); - *outptr_QFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QFile* QFile_new3(QObject* parent) { + return new MiqtVirtualQFile(parent); } -void QFile_new4(struct miqt_string name, QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { +QFile* QFile_new4(struct miqt_string name, QObject* parent) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQFile* ret = new MiqtVirtualQFile(name_QString, parent); - *outptr_QFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQFile(name_QString, parent); +} + +void QFile_virtbase(QFile* src, QFileDevice** outptr_QFileDevice) { + *outptr_QFileDevice = static_cast(src); } QMetaObject* QFile_MetaObject(const QFile* self) { diff --git a/qt/gen_qfile.go b/qt/gen_qfile.go index 4a9b7b3e..e6c2d4ed 100644 --- a/qt/gen_qfile.go +++ b/qt/gen_qfile.go @@ -35,33 +35,26 @@ func (this *QFile) UnsafePointer() unsafe.Pointer { } // newQFile constructs the type using only CGO pointers. -func newQFile(h *C.QFile, h_QFileDevice *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QFile { +func newQFile(h *C.QFile) *QFile { if h == nil { return nil } + var outptr_QFileDevice *C.QFileDevice = nil + C.QFile_virtbase(h, &outptr_QFileDevice) + return &QFile{h: h, - QFileDevice: newQFileDevice(h_QFileDevice, h_QIODevice, h_QObject)} + QFileDevice: newQFileDevice(outptr_QFileDevice)} } // UnsafeNewQFile constructs the type using only unsafe pointers. -func UnsafeNewQFile(h unsafe.Pointer, h_QFileDevice unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QFile { - if h == nil { - return nil - } - - return &QFile{h: (*C.QFile)(h), - QFileDevice: UnsafeNewQFileDevice(h_QFileDevice, h_QIODevice, h_QObject)} +func UnsafeNewQFile(h unsafe.Pointer) *QFile { + return newQFile((*C.QFile)(h)) } // NewQFile constructs a new QFile object. func NewQFile() *QFile { - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QFile_new(&outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) - ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret := newQFile(C.QFile_new()) ret.isSubclass = true return ret } @@ -72,26 +65,16 @@ func NewQFile2(name string) *QFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QFile_new2(name_ms, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) - ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret := newQFile(C.QFile_new2(name_ms)) ret.isSubclass = true return ret } // NewQFile3 constructs a new QFile object. func NewQFile3(parent *QObject) *QFile { - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QFile_new3(parent.cPointer(), &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) - ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret := newQFile(C.QFile_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -102,13 +85,8 @@ func NewQFile4(name string, parent *QObject) *QFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QFile_new4(name_ms, parent.cPointer(), &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) - ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret := newQFile(C.QFile_new4(name_ms, parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qfile.h b/qt/gen_qfile.h index 5d6abc18..8fb04da2 100644 --- a/qt/gen_qfile.h +++ b/qt/gen_qfile.h @@ -28,10 +28,11 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -void QFile_new(QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QFile_new2(struct miqt_string name, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QFile_new3(QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QFile_new4(struct miqt_string name, QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +QFile* QFile_new(); +QFile* QFile_new2(struct miqt_string name); +QFile* QFile_new3(QObject* parent); +QFile* QFile_new4(struct miqt_string name, QObject* parent); +void QFile_virtbase(QFile* src, QFileDevice** outptr_QFileDevice); QMetaObject* QFile_MetaObject(const QFile* self); void* QFile_Metacast(QFile* self, const char* param1); struct miqt_string QFile_Tr(const char* s); diff --git a/qt/gen_qfiledevice.cpp b/qt/gen_qfiledevice.cpp index b64b9d8b..2d361340 100644 --- a/qt/gen_qfiledevice.cpp +++ b/qt/gen_qfiledevice.cpp @@ -10,6 +10,10 @@ #include "gen_qfiledevice.h" #include "_cgo_export.h" +void QFileDevice_virtbase(QFileDevice* src, QIODevice** outptr_QIODevice) { + *outptr_QIODevice = static_cast(src); +} + QMetaObject* QFileDevice_MetaObject(const QFileDevice* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/gen_qfiledevice.go b/qt/gen_qfiledevice.go index fa75de1f..35042d9b 100644 --- a/qt/gen_qfiledevice.go +++ b/qt/gen_qfiledevice.go @@ -94,22 +94,20 @@ func (this *QFileDevice) UnsafePointer() unsafe.Pointer { } // newQFileDevice constructs the type using only CGO pointers. -func newQFileDevice(h *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QFileDevice { +func newQFileDevice(h *C.QFileDevice) *QFileDevice { if h == nil { return nil } + var outptr_QIODevice *C.QIODevice = nil + C.QFileDevice_virtbase(h, &outptr_QIODevice) + return &QFileDevice{h: h, - QIODevice: newQIODevice(h_QIODevice, h_QObject)} + QIODevice: newQIODevice(outptr_QIODevice)} } // UnsafeNewQFileDevice constructs the type using only unsafe pointers. -func UnsafeNewQFileDevice(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QFileDevice { - if h == nil { - return nil - } - - return &QFileDevice{h: (*C.QFileDevice)(h), - QIODevice: UnsafeNewQIODevice(h_QIODevice, h_QObject)} +func UnsafeNewQFileDevice(h unsafe.Pointer) *QFileDevice { + return newQFileDevice((*C.QFileDevice)(h)) } func (this *QFileDevice) MetaObject() *QMetaObject { diff --git a/qt/gen_qfiledevice.h b/qt/gen_qfiledevice.h index 99ff155b..4c400259 100644 --- a/qt/gen_qfiledevice.h +++ b/qt/gen_qfiledevice.h @@ -28,6 +28,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QFileDevice_virtbase(QFileDevice* src, QIODevice** outptr_QIODevice); QMetaObject* QFileDevice_MetaObject(const QFileDevice* self); void* QFileDevice_Metacast(QFileDevice* self, const char* param1); struct miqt_string QFileDevice_Tr(const char* s); diff --git a/qt/gen_qfiledialog.cpp b/qt/gen_qfiledialog.cpp index 22409f79..cb15108f 100644 --- a/qt/gen_qfiledialog.cpp +++ b/qt/gen_qfiledialog.cpp @@ -390,64 +390,38 @@ public: }; -void QFileDialog_new(QWidget* parent, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent); - *outptr_QFileDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFileDialog* QFileDialog_new(QWidget* parent) { + return new MiqtVirtualQFileDialog(parent); } -void QFileDialog_new2(QWidget* parent, int f, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, static_cast(f)); - *outptr_QFileDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFileDialog* QFileDialog_new2(QWidget* parent, int f) { + return new MiqtVirtualQFileDialog(parent, static_cast(f)); } -void QFileDialog_new3(QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(); - *outptr_QFileDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFileDialog* QFileDialog_new3() { + return new MiqtVirtualQFileDialog(); } -void QFileDialog_new4(QWidget* parent, struct miqt_string caption, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QFileDialog* QFileDialog_new4(QWidget* parent, struct miqt_string caption) { QString caption_QString = QString::fromUtf8(caption.data, caption.len); - MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, caption_QString); - *outptr_QFileDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQFileDialog(parent, caption_QString); } -void QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QFileDialog* QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory) { QString caption_QString = QString::fromUtf8(caption.data, caption.len); QString directory_QString = QString::fromUtf8(directory.data, directory.len); - MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, caption_QString, directory_QString); - *outptr_QFileDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQFileDialog(parent, caption_QString, directory_QString); } -void QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QFileDialog* QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter) { QString caption_QString = QString::fromUtf8(caption.data, caption.len); QString directory_QString = QString::fromUtf8(directory.data, directory.len); QString filter_QString = QString::fromUtf8(filter.data, filter.len); - MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, caption_QString, directory_QString, filter_QString); - *outptr_QFileDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQFileDialog(parent, caption_QString, directory_QString, filter_QString); +} + +void QFileDialog_virtbase(QFileDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QFileDialog_MetaObject(const QFileDialog* self) { diff --git a/qt/gen_qfiledialog.go b/qt/gen_qfiledialog.go index 7a27073b..f1a3788a 100644 --- a/qt/gen_qfiledialog.go +++ b/qt/gen_qfiledialog.go @@ -82,62 +82,42 @@ func (this *QFileDialog) UnsafePointer() unsafe.Pointer { } // newQFileDialog constructs the type using only CGO pointers. -func newQFileDialog(h *C.QFileDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFileDialog { +func newQFileDialog(h *C.QFileDialog) *QFileDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QFileDialog_virtbase(h, &outptr_QDialog) + return &QFileDialog{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQFileDialog constructs the type using only unsafe pointers. -func UnsafeNewQFileDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFileDialog { - if h == nil { - return nil - } - - return &QFileDialog{h: (*C.QFileDialog)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQFileDialog(h unsafe.Pointer) *QFileDialog { + return newQFileDialog((*C.QFileDialog)(h)) } // NewQFileDialog constructs a new QFileDialog object. func NewQFileDialog(parent *QWidget) *QFileDialog { - var outptr_QFileDialog *C.QFileDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFileDialog_new(parent.cPointer(), &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFileDialog(C.QFileDialog_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQFileDialog2 constructs a new QFileDialog object. func NewQFileDialog2(parent *QWidget, f WindowType) *QFileDialog { - var outptr_QFileDialog *C.QFileDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFileDialog_new2(parent.cPointer(), (C.int)(f), &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFileDialog(C.QFileDialog_new2(parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } // NewQFileDialog3 constructs a new QFileDialog object. func NewQFileDialog3() *QFileDialog { - var outptr_QFileDialog *C.QFileDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFileDialog_new3(&outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFileDialog(C.QFileDialog_new3()) ret.isSubclass = true return ret } @@ -148,14 +128,8 @@ func NewQFileDialog4(parent *QWidget, caption string) *QFileDialog { caption_ms.data = C.CString(caption) caption_ms.len = C.size_t(len(caption)) defer C.free(unsafe.Pointer(caption_ms.data)) - var outptr_QFileDialog *C.QFileDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFileDialog_new4(parent.cPointer(), caption_ms, &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFileDialog(C.QFileDialog_new4(parent.cPointer(), caption_ms)) ret.isSubclass = true return ret } @@ -170,14 +144,8 @@ func NewQFileDialog5(parent *QWidget, caption string, directory string) *QFileDi directory_ms.data = C.CString(directory) directory_ms.len = C.size_t(len(directory)) defer C.free(unsafe.Pointer(directory_ms.data)) - var outptr_QFileDialog *C.QFileDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFileDialog_new5(parent.cPointer(), caption_ms, directory_ms, &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFileDialog(C.QFileDialog_new5(parent.cPointer(), caption_ms, directory_ms)) ret.isSubclass = true return ret } @@ -196,14 +164,8 @@ func NewQFileDialog6(parent *QWidget, caption string, directory string, filter s filter_ms.data = C.CString(filter) filter_ms.len = C.size_t(len(filter)) defer C.free(unsafe.Pointer(filter_ms.data)) - var outptr_QFileDialog *C.QFileDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFileDialog_new6(parent.cPointer(), caption_ms, directory_ms, filter_ms, &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFileDialog(C.QFileDialog_new6(parent.cPointer(), caption_ms, directory_ms, filter_ms)) ret.isSubclass = true return ret } @@ -540,7 +502,7 @@ func (this *QFileDialog) SetItemDelegate(delegate *QAbstractItemDelegate) { } func (this *QFileDialog) ItemDelegate() *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QFileDialog_ItemDelegate(this.h), nil) + return newQAbstractItemDelegate(C.QFileDialog_ItemDelegate(this.h)) } func (this *QFileDialog) SetIconProvider(provider *QFileIconProvider) { @@ -598,7 +560,7 @@ func (this *QFileDialog) SetProxyModel(model *QAbstractProxyModel) { } func (this *QFileDialog) ProxyModel() *QAbstractProxyModel { - return newQAbstractProxyModel(C.QFileDialog_ProxyModel(this.h), nil, nil) + return newQAbstractProxyModel(C.QFileDialog_ProxyModel(this.h)) } func (this *QFileDialog) SetOption(option QFileDialog__Option) { @@ -1659,7 +1621,7 @@ func miqt_exec_callback_QFileDialog_KeyPressEvent(self *C.QFileDialog, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QFileDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1685,7 +1647,7 @@ func miqt_exec_callback_QFileDialog_CloseEvent(self *C.QFileDialog, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(param1, nil) + slotval1 := newQCloseEvent(param1) gofunc((&QFileDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1711,7 +1673,7 @@ func miqt_exec_callback_QFileDialog_ShowEvent(self *C.QFileDialog, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QFileDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1737,7 +1699,7 @@ func miqt_exec_callback_QFileDialog_ResizeEvent(self *C.QFileDialog, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QFileDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1763,7 +1725,7 @@ func miqt_exec_callback_QFileDialog_ContextMenuEvent(self *C.QFileDialog, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QFileDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt/gen_qfiledialog.h b/qt/gen_qfiledialog.h index d6aaf1ac..5f5cb0a2 100644 --- a/qt/gen_qfiledialog.h +++ b/qt/gen_qfiledialog.h @@ -54,12 +54,13 @@ typedef struct QUrl QUrl; typedef struct QWidget QWidget; #endif -void QFileDialog_new(QWidget* parent, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFileDialog_new2(QWidget* parent, int f, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFileDialog_new3(QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFileDialog_new4(QWidget* parent, struct miqt_string caption, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QFileDialog* QFileDialog_new(QWidget* parent); +QFileDialog* QFileDialog_new2(QWidget* parent, int f); +QFileDialog* QFileDialog_new3(); +QFileDialog* QFileDialog_new4(QWidget* parent, struct miqt_string caption); +QFileDialog* QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory); +QFileDialog* QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter); +void QFileDialog_virtbase(QFileDialog* src, QDialog** outptr_QDialog); QMetaObject* QFileDialog_MetaObject(const QFileDialog* self); void* QFileDialog_Metacast(QFileDialog* self, const char* param1); struct miqt_string QFileDialog_Tr(const char* s); diff --git a/qt/gen_qfileiconprovider.cpp b/qt/gen_qfileiconprovider.cpp index 0f610127..4bbe3ca3 100644 --- a/qt/gen_qfileiconprovider.cpp +++ b/qt/gen_qfileiconprovider.cpp @@ -99,9 +99,8 @@ public: }; -void QFileIconProvider_new(QFileIconProvider** outptr_QFileIconProvider) { - MiqtVirtualQFileIconProvider* ret = new MiqtVirtualQFileIconProvider(); - *outptr_QFileIconProvider = ret; +QFileIconProvider* QFileIconProvider_new() { + return new MiqtVirtualQFileIconProvider(); } QIcon* QFileIconProvider_Icon(const QFileIconProvider* self, int typeVal) { diff --git a/qt/gen_qfileiconprovider.go b/qt/gen_qfileiconprovider.go index ea52e92f..2fe3a84f 100644 --- a/qt/gen_qfileiconprovider.go +++ b/qt/gen_qfileiconprovider.go @@ -56,24 +56,19 @@ func newQFileIconProvider(h *C.QFileIconProvider) *QFileIconProvider { if h == nil { return nil } + return &QFileIconProvider{h: h} } // UnsafeNewQFileIconProvider constructs the type using only unsafe pointers. func UnsafeNewQFileIconProvider(h unsafe.Pointer) *QFileIconProvider { - if h == nil { - return nil - } - - return &QFileIconProvider{h: (*C.QFileIconProvider)(h)} + return newQFileIconProvider((*C.QFileIconProvider)(h)) } // NewQFileIconProvider constructs a new QFileIconProvider object. func NewQFileIconProvider() *QFileIconProvider { - var outptr_QFileIconProvider *C.QFileIconProvider = nil - C.QFileIconProvider_new(&outptr_QFileIconProvider) - ret := newQFileIconProvider(outptr_QFileIconProvider) + ret := newQFileIconProvider(C.QFileIconProvider_new()) ret.isSubclass = true return ret } diff --git a/qt/gen_qfileiconprovider.h b/qt/gen_qfileiconprovider.h index e964f96b..3c95d74d 100644 --- a/qt/gen_qfileiconprovider.h +++ b/qt/gen_qfileiconprovider.h @@ -24,7 +24,7 @@ typedef struct QFileInfo QFileInfo; typedef struct QIcon QIcon; #endif -void QFileIconProvider_new(QFileIconProvider** outptr_QFileIconProvider); +QFileIconProvider* QFileIconProvider_new(); QIcon* QFileIconProvider_Icon(const QFileIconProvider* self, int typeVal); QIcon* QFileIconProvider_IconWithInfo(const QFileIconProvider* self, QFileInfo* info); struct miqt_string QFileIconProvider_Type(const QFileIconProvider* self, QFileInfo* info); diff --git a/qt/gen_qfileinfo.cpp b/qt/gen_qfileinfo.cpp index 082e7332..ff1a7cf0 100644 --- a/qt/gen_qfileinfo.cpp +++ b/qt/gen_qfileinfo.cpp @@ -9,31 +9,26 @@ #include "gen_qfileinfo.h" #include "_cgo_export.h" -void QFileInfo_new(QFileInfo** outptr_QFileInfo) { - QFileInfo* ret = new QFileInfo(); - *outptr_QFileInfo = ret; +QFileInfo* QFileInfo_new() { + return new QFileInfo(); } -void QFileInfo_new2(struct miqt_string file, QFileInfo** outptr_QFileInfo) { +QFileInfo* QFileInfo_new2(struct miqt_string file) { QString file_QString = QString::fromUtf8(file.data, file.len); - QFileInfo* ret = new QFileInfo(file_QString); - *outptr_QFileInfo = ret; + return new QFileInfo(file_QString); } -void QFileInfo_new3(QFile* file, QFileInfo** outptr_QFileInfo) { - QFileInfo* ret = new QFileInfo(*file); - *outptr_QFileInfo = ret; +QFileInfo* QFileInfo_new3(QFile* file) { + return new QFileInfo(*file); } -void QFileInfo_new4(QDir* dir, struct miqt_string file, QFileInfo** outptr_QFileInfo) { +QFileInfo* QFileInfo_new4(QDir* dir, struct miqt_string file) { QString file_QString = QString::fromUtf8(file.data, file.len); - QFileInfo* ret = new QFileInfo(*dir, file_QString); - *outptr_QFileInfo = ret; + return new QFileInfo(*dir, file_QString); } -void QFileInfo_new5(QFileInfo* fileinfo, QFileInfo** outptr_QFileInfo) { - QFileInfo* ret = new QFileInfo(*fileinfo); - *outptr_QFileInfo = ret; +QFileInfo* QFileInfo_new5(QFileInfo* fileinfo) { + return new QFileInfo(*fileinfo); } void QFileInfo_OperatorAssign(QFileInfo* self, QFileInfo* fileinfo) { diff --git a/qt/gen_qfileinfo.go b/qt/gen_qfileinfo.go index 946f3528..a85ac2fb 100644 --- a/qt/gen_qfileinfo.go +++ b/qt/gen_qfileinfo.go @@ -37,24 +37,19 @@ func newQFileInfo(h *C.QFileInfo) *QFileInfo { if h == nil { return nil } + return &QFileInfo{h: h} } // UnsafeNewQFileInfo constructs the type using only unsafe pointers. func UnsafeNewQFileInfo(h unsafe.Pointer) *QFileInfo { - if h == nil { - return nil - } - - return &QFileInfo{h: (*C.QFileInfo)(h)} + return newQFileInfo((*C.QFileInfo)(h)) } // NewQFileInfo constructs a new QFileInfo object. func NewQFileInfo() *QFileInfo { - var outptr_QFileInfo *C.QFileInfo = nil - C.QFileInfo_new(&outptr_QFileInfo) - ret := newQFileInfo(outptr_QFileInfo) + ret := newQFileInfo(C.QFileInfo_new()) ret.isSubclass = true return ret } @@ -65,20 +60,16 @@ func NewQFileInfo2(file string) *QFileInfo { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - var outptr_QFileInfo *C.QFileInfo = nil - C.QFileInfo_new2(file_ms, &outptr_QFileInfo) - ret := newQFileInfo(outptr_QFileInfo) + ret := newQFileInfo(C.QFileInfo_new2(file_ms)) ret.isSubclass = true return ret } // NewQFileInfo3 constructs a new QFileInfo object. func NewQFileInfo3(file *QFile) *QFileInfo { - var outptr_QFileInfo *C.QFileInfo = nil - C.QFileInfo_new3(file.cPointer(), &outptr_QFileInfo) - ret := newQFileInfo(outptr_QFileInfo) + ret := newQFileInfo(C.QFileInfo_new3(file.cPointer())) ret.isSubclass = true return ret } @@ -89,20 +80,16 @@ func NewQFileInfo4(dir *QDir, file string) *QFileInfo { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - var outptr_QFileInfo *C.QFileInfo = nil - C.QFileInfo_new4(dir.cPointer(), file_ms, &outptr_QFileInfo) - ret := newQFileInfo(outptr_QFileInfo) + ret := newQFileInfo(C.QFileInfo_new4(dir.cPointer(), file_ms)) ret.isSubclass = true return ret } // NewQFileInfo5 constructs a new QFileInfo object. func NewQFileInfo5(fileinfo *QFileInfo) *QFileInfo { - var outptr_QFileInfo *C.QFileInfo = nil - C.QFileInfo_new5(fileinfo.cPointer(), &outptr_QFileInfo) - ret := newQFileInfo(outptr_QFileInfo) + ret := newQFileInfo(C.QFileInfo_new5(fileinfo.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qfileinfo.h b/qt/gen_qfileinfo.h index ba3494f0..e9a24358 100644 --- a/qt/gen_qfileinfo.h +++ b/qt/gen_qfileinfo.h @@ -26,11 +26,11 @@ typedef struct QFile QFile; typedef struct QFileInfo QFileInfo; #endif -void QFileInfo_new(QFileInfo** outptr_QFileInfo); -void QFileInfo_new2(struct miqt_string file, QFileInfo** outptr_QFileInfo); -void QFileInfo_new3(QFile* file, QFileInfo** outptr_QFileInfo); -void QFileInfo_new4(QDir* dir, struct miqt_string file, QFileInfo** outptr_QFileInfo); -void QFileInfo_new5(QFileInfo* fileinfo, QFileInfo** outptr_QFileInfo); +QFileInfo* QFileInfo_new(); +QFileInfo* QFileInfo_new2(struct miqt_string file); +QFileInfo* QFileInfo_new3(QFile* file); +QFileInfo* QFileInfo_new4(QDir* dir, struct miqt_string file); +QFileInfo* QFileInfo_new5(QFileInfo* fileinfo); void QFileInfo_OperatorAssign(QFileInfo* self, QFileInfo* fileinfo); void QFileInfo_Swap(QFileInfo* self, QFileInfo* other); bool QFileInfo_OperatorEqual(const QFileInfo* self, QFileInfo* fileinfo); diff --git a/qt/gen_qfileselector.cpp b/qt/gen_qfileselector.cpp index ac437cbe..d9c9effb 100644 --- a/qt/gen_qfileselector.cpp +++ b/qt/gen_qfileselector.cpp @@ -195,16 +195,16 @@ public: }; -void QFileSelector_new(QFileSelector** outptr_QFileSelector, QObject** outptr_QObject) { - MiqtVirtualQFileSelector* ret = new MiqtVirtualQFileSelector(); - *outptr_QFileSelector = ret; - *outptr_QObject = static_cast(ret); +QFileSelector* QFileSelector_new() { + return new MiqtVirtualQFileSelector(); } -void QFileSelector_new2(QObject* parent, QFileSelector** outptr_QFileSelector, QObject** outptr_QObject) { - MiqtVirtualQFileSelector* ret = new MiqtVirtualQFileSelector(parent); - *outptr_QFileSelector = ret; - *outptr_QObject = static_cast(ret); +QFileSelector* QFileSelector_new2(QObject* parent) { + return new MiqtVirtualQFileSelector(parent); +} + +void QFileSelector_virtbase(QFileSelector* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QFileSelector_MetaObject(const QFileSelector* self) { diff --git a/qt/gen_qfileselector.go b/qt/gen_qfileselector.go index 9f5689a9..489bfc51 100644 --- a/qt/gen_qfileselector.go +++ b/qt/gen_qfileselector.go @@ -35,42 +35,34 @@ func (this *QFileSelector) UnsafePointer() unsafe.Pointer { } // newQFileSelector constructs the type using only CGO pointers. -func newQFileSelector(h *C.QFileSelector, h_QObject *C.QObject) *QFileSelector { +func newQFileSelector(h *C.QFileSelector) *QFileSelector { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QFileSelector_virtbase(h, &outptr_QObject) + return &QFileSelector{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQFileSelector constructs the type using only unsafe pointers. -func UnsafeNewQFileSelector(h unsafe.Pointer, h_QObject unsafe.Pointer) *QFileSelector { - if h == nil { - return nil - } - - return &QFileSelector{h: (*C.QFileSelector)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQFileSelector(h unsafe.Pointer) *QFileSelector { + return newQFileSelector((*C.QFileSelector)(h)) } // NewQFileSelector constructs a new QFileSelector object. func NewQFileSelector() *QFileSelector { - var outptr_QFileSelector *C.QFileSelector = nil - var outptr_QObject *C.QObject = nil - C.QFileSelector_new(&outptr_QFileSelector, &outptr_QObject) - ret := newQFileSelector(outptr_QFileSelector, outptr_QObject) + ret := newQFileSelector(C.QFileSelector_new()) ret.isSubclass = true return ret } // NewQFileSelector2 constructs a new QFileSelector object. func NewQFileSelector2(parent *QObject) *QFileSelector { - var outptr_QFileSelector *C.QFileSelector = nil - var outptr_QObject *C.QObject = nil - C.QFileSelector_new2(parent.cPointer(), &outptr_QFileSelector, &outptr_QObject) - ret := newQFileSelector(outptr_QFileSelector, outptr_QObject) + ret := newQFileSelector(C.QFileSelector_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -282,7 +274,7 @@ func miqt_exec_callback_QFileSelector_TimerEvent(self *C.QFileSelector, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QFileSelector{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -308,7 +300,7 @@ func miqt_exec_callback_QFileSelector_ChildEvent(self *C.QFileSelector, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QFileSelector{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qfileselector.h b/qt/gen_qfileselector.h index 1bfde067..a3e9867c 100644 --- a/qt/gen_qfileselector.h +++ b/qt/gen_qfileselector.h @@ -34,8 +34,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -void QFileSelector_new(QFileSelector** outptr_QFileSelector, QObject** outptr_QObject); -void QFileSelector_new2(QObject* parent, QFileSelector** outptr_QFileSelector, QObject** outptr_QObject); +QFileSelector* QFileSelector_new(); +QFileSelector* QFileSelector_new2(QObject* parent); +void QFileSelector_virtbase(QFileSelector* src, QObject** outptr_QObject); QMetaObject* QFileSelector_MetaObject(const QFileSelector* self); void* QFileSelector_Metacast(QFileSelector* self, const char* param1); struct miqt_string QFileSelector_Tr(const char* s); diff --git a/qt/gen_qfilesystemmodel.cpp b/qt/gen_qfilesystemmodel.cpp index 7f2452e3..f30c142c 100644 --- a/qt/gen_qfilesystemmodel.cpp +++ b/qt/gen_qfilesystemmodel.cpp @@ -1088,18 +1088,16 @@ public: }; -void QFileSystemModel_new(QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQFileSystemModel* ret = new MiqtVirtualQFileSystemModel(); - *outptr_QFileSystemModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QFileSystemModel* QFileSystemModel_new() { + return new MiqtVirtualQFileSystemModel(); } -void QFileSystemModel_new2(QObject* parent, QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQFileSystemModel* ret = new MiqtVirtualQFileSystemModel(parent); - *outptr_QFileSystemModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QFileSystemModel* QFileSystemModel_new2(QObject* parent) { + return new MiqtVirtualQFileSystemModel(parent); +} + +void QFileSystemModel_virtbase(QFileSystemModel* src, QAbstractItemModel** outptr_QAbstractItemModel) { + *outptr_QAbstractItemModel = static_cast(src); } QMetaObject* QFileSystemModel_MetaObject(const QFileSystemModel* self) { diff --git a/qt/gen_qfilesystemmodel.go b/qt/gen_qfilesystemmodel.go index f09a5f57..d9821e9e 100644 --- a/qt/gen_qfilesystemmodel.go +++ b/qt/gen_qfilesystemmodel.go @@ -52,44 +52,34 @@ func (this *QFileSystemModel) UnsafePointer() unsafe.Pointer { } // newQFileSystemModel constructs the type using only CGO pointers. -func newQFileSystemModel(h *C.QFileSystemModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QFileSystemModel { +func newQFileSystemModel(h *C.QFileSystemModel) *QFileSystemModel { if h == nil { return nil } + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + C.QFileSystemModel_virtbase(h, &outptr_QAbstractItemModel) + return &QFileSystemModel{h: h, - QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} + QAbstractItemModel: newQAbstractItemModel(outptr_QAbstractItemModel)} } // UnsafeNewQFileSystemModel constructs the type using only unsafe pointers. -func UnsafeNewQFileSystemModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QFileSystemModel { - if h == nil { - return nil - } - - return &QFileSystemModel{h: (*C.QFileSystemModel)(h), - QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} +func UnsafeNewQFileSystemModel(h unsafe.Pointer) *QFileSystemModel { + return newQFileSystemModel((*C.QFileSystemModel)(h)) } // NewQFileSystemModel constructs a new QFileSystemModel object. func NewQFileSystemModel() *QFileSystemModel { - var outptr_QFileSystemModel *C.QFileSystemModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QFileSystemModel_new(&outptr_QFileSystemModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQFileSystemModel(outptr_QFileSystemModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQFileSystemModel(C.QFileSystemModel_new()) ret.isSubclass = true return ret } // NewQFileSystemModel2 constructs a new QFileSystemModel object. func NewQFileSystemModel2(parent *QObject) *QFileSystemModel { - var outptr_QFileSystemModel *C.QFileSystemModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QFileSystemModel_new2(parent.cPointer(), &outptr_QFileSystemModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQFileSystemModel(outptr_QFileSystemModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQFileSystemModel(C.QFileSystemModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -317,7 +307,7 @@ func (this *QFileSystemModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QFileSystemModel_MimeData(this.h, indexes_ma), nil) + return newQMimeData(C.QFileSystemModel_MimeData(this.h, indexes_ma)) } func (this *QFileSystemModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -1009,7 +999,7 @@ func (this *QFileSystemModel) callVirtualBase_MimeData(indexes []QModelIndex) *Q } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QFileSystemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QFileSystemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QFileSystemModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -1063,7 +1053,7 @@ func miqt_exec_callback_QFileSystemModel_DropMimeData(self *C.QFileSystemModel, } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -1124,7 +1114,7 @@ func miqt_exec_callback_QFileSystemModel_TimerEvent(self *C.QFileSystemModel, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QFileSystemModel{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1326,7 +1316,7 @@ func miqt_exec_callback_QFileSystemModel_CanDropMimeData(self *C.QFileSystemMode } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt/gen_qfilesystemmodel.h b/qt/gen_qfilesystemmodel.h index bbe5f1a3..9fa81f5d 100644 --- a/qt/gen_qfilesystemmodel.h +++ b/qt/gen_qfilesystemmodel.h @@ -48,8 +48,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -void QFileSystemModel_new(QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QFileSystemModel_new2(QObject* parent, QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QFileSystemModel* QFileSystemModel_new(); +QFileSystemModel* QFileSystemModel_new2(QObject* parent); +void QFileSystemModel_virtbase(QFileSystemModel* src, QAbstractItemModel** outptr_QAbstractItemModel); QMetaObject* QFileSystemModel_MetaObject(const QFileSystemModel* self); void* QFileSystemModel_Metacast(QFileSystemModel* self, const char* param1); struct miqt_string QFileSystemModel_Tr(const char* s); diff --git a/qt/gen_qfilesystemwatcher.cpp b/qt/gen_qfilesystemwatcher.cpp index 2ec27c1a..ce199dfb 100644 --- a/qt/gen_qfilesystemwatcher.cpp +++ b/qt/gen_qfilesystemwatcher.cpp @@ -196,13 +196,11 @@ public: }; -void QFileSystemWatcher_new(QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { - MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(); - *outptr_QFileSystemWatcher = ret; - *outptr_QObject = static_cast(ret); +QFileSystemWatcher* QFileSystemWatcher_new() { + return new MiqtVirtualQFileSystemWatcher(); } -void QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { +QFileSystemWatcher* QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths) { QStringList paths_QList; paths_QList.reserve(paths.len); struct miqt_string* paths_arr = static_cast(paths.data); @@ -210,18 +208,14 @@ void QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ path QString paths_arr_i_QString = QString::fromUtf8(paths_arr[i].data, paths_arr[i].len); paths_QList.push_back(paths_arr_i_QString); } - MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(paths_QList); - *outptr_QFileSystemWatcher = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQFileSystemWatcher(paths_QList); } -void QFileSystemWatcher_new3(QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { - MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(parent); - *outptr_QFileSystemWatcher = ret; - *outptr_QObject = static_cast(ret); +QFileSystemWatcher* QFileSystemWatcher_new3(QObject* parent) { + return new MiqtVirtualQFileSystemWatcher(parent); } -void QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { +QFileSystemWatcher* QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent) { QStringList paths_QList; paths_QList.reserve(paths.len); struct miqt_string* paths_arr = static_cast(paths.data); @@ -229,9 +223,11 @@ void QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ path QString paths_arr_i_QString = QString::fromUtf8(paths_arr[i].data, paths_arr[i].len); paths_QList.push_back(paths_arr_i_QString); } - MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(paths_QList, parent); - *outptr_QFileSystemWatcher = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQFileSystemWatcher(paths_QList, parent); +} + +void QFileSystemWatcher_virtbase(QFileSystemWatcher* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QFileSystemWatcher_MetaObject(const QFileSystemWatcher* self) { diff --git a/qt/gen_qfilesystemwatcher.go b/qt/gen_qfilesystemwatcher.go index a6174948..7b89d5a9 100644 --- a/qt/gen_qfilesystemwatcher.go +++ b/qt/gen_qfilesystemwatcher.go @@ -35,31 +35,26 @@ func (this *QFileSystemWatcher) UnsafePointer() unsafe.Pointer { } // newQFileSystemWatcher constructs the type using only CGO pointers. -func newQFileSystemWatcher(h *C.QFileSystemWatcher, h_QObject *C.QObject) *QFileSystemWatcher { +func newQFileSystemWatcher(h *C.QFileSystemWatcher) *QFileSystemWatcher { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QFileSystemWatcher_virtbase(h, &outptr_QObject) + return &QFileSystemWatcher{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQFileSystemWatcher constructs the type using only unsafe pointers. -func UnsafeNewQFileSystemWatcher(h unsafe.Pointer, h_QObject unsafe.Pointer) *QFileSystemWatcher { - if h == nil { - return nil - } - - return &QFileSystemWatcher{h: (*C.QFileSystemWatcher)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQFileSystemWatcher(h unsafe.Pointer) *QFileSystemWatcher { + return newQFileSystemWatcher((*C.QFileSystemWatcher)(h)) } // NewQFileSystemWatcher constructs a new QFileSystemWatcher object. func NewQFileSystemWatcher() *QFileSystemWatcher { - var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil - var outptr_QObject *C.QObject = nil - C.QFileSystemWatcher_new(&outptr_QFileSystemWatcher, &outptr_QObject) - ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret := newQFileSystemWatcher(C.QFileSystemWatcher_new()) ret.isSubclass = true return ret } @@ -76,22 +71,16 @@ func NewQFileSystemWatcher2(paths []string) *QFileSystemWatcher { paths_CArray[i] = paths_i_ms } paths_ma := C.struct_miqt_array{len: C.size_t(len(paths)), data: unsafe.Pointer(paths_CArray)} - var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil - var outptr_QObject *C.QObject = nil - C.QFileSystemWatcher_new2(paths_ma, &outptr_QFileSystemWatcher, &outptr_QObject) - ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret := newQFileSystemWatcher(C.QFileSystemWatcher_new2(paths_ma)) ret.isSubclass = true return ret } // NewQFileSystemWatcher3 constructs a new QFileSystemWatcher object. func NewQFileSystemWatcher3(parent *QObject) *QFileSystemWatcher { - var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil - var outptr_QObject *C.QObject = nil - C.QFileSystemWatcher_new3(parent.cPointer(), &outptr_QFileSystemWatcher, &outptr_QObject) - ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret := newQFileSystemWatcher(C.QFileSystemWatcher_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -108,11 +97,8 @@ func NewQFileSystemWatcher4(paths []string, parent *QObject) *QFileSystemWatcher paths_CArray[i] = paths_i_ms } paths_ma := C.struct_miqt_array{len: C.size_t(len(paths)), data: unsafe.Pointer(paths_CArray)} - var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil - var outptr_QObject *C.QObject = nil - C.QFileSystemWatcher_new4(paths_ma, parent.cPointer(), &outptr_QFileSystemWatcher, &outptr_QObject) - ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret := newQFileSystemWatcher(C.QFileSystemWatcher_new4(paths_ma, parent.cPointer())) ret.isSubclass = true return ret } @@ -355,7 +341,7 @@ func miqt_exec_callback_QFileSystemWatcher_TimerEvent(self *C.QFileSystemWatcher } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -381,7 +367,7 @@ func miqt_exec_callback_QFileSystemWatcher_ChildEvent(self *C.QFileSystemWatcher } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qfilesystemwatcher.h b/qt/gen_qfilesystemwatcher.h index e62f9aa3..d18f4564 100644 --- a/qt/gen_qfilesystemwatcher.h +++ b/qt/gen_qfilesystemwatcher.h @@ -32,10 +32,11 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QFileSystemWatcher_new(QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); -void QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); -void QFileSystemWatcher_new3(QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); -void QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); +QFileSystemWatcher* QFileSystemWatcher_new(); +QFileSystemWatcher* QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths); +QFileSystemWatcher* QFileSystemWatcher_new3(QObject* parent); +QFileSystemWatcher* QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent); +void QFileSystemWatcher_virtbase(QFileSystemWatcher* src, QObject** outptr_QObject); QMetaObject* QFileSystemWatcher_MetaObject(const QFileSystemWatcher* self); void* QFileSystemWatcher_Metacast(QFileSystemWatcher* self, const char* param1); struct miqt_string QFileSystemWatcher_Tr(const char* s); diff --git a/qt/gen_qfinalstate.cpp b/qt/gen_qfinalstate.cpp index 4bef099d..f08c3ca8 100644 --- a/qt/gen_qfinalstate.cpp +++ b/qt/gen_qfinalstate.cpp @@ -92,18 +92,16 @@ public: }; -void QFinalState_new(QFinalState** outptr_QFinalState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { - MiqtVirtualQFinalState* ret = new MiqtVirtualQFinalState(); - *outptr_QFinalState = ret; - *outptr_QAbstractState = static_cast(ret); - *outptr_QObject = static_cast(ret); +QFinalState* QFinalState_new() { + return new MiqtVirtualQFinalState(); } -void QFinalState_new2(QState* parent, QFinalState** outptr_QFinalState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { - MiqtVirtualQFinalState* ret = new MiqtVirtualQFinalState(parent); - *outptr_QFinalState = ret; - *outptr_QAbstractState = static_cast(ret); - *outptr_QObject = static_cast(ret); +QFinalState* QFinalState_new2(QState* parent) { + return new MiqtVirtualQFinalState(parent); +} + +void QFinalState_virtbase(QFinalState* src, QAbstractState** outptr_QAbstractState) { + *outptr_QAbstractState = static_cast(src); } QMetaObject* QFinalState_MetaObject(const QFinalState* self) { diff --git a/qt/gen_qfinalstate.go b/qt/gen_qfinalstate.go index dbde257f..610059fa 100644 --- a/qt/gen_qfinalstate.go +++ b/qt/gen_qfinalstate.go @@ -35,44 +35,34 @@ func (this *QFinalState) UnsafePointer() unsafe.Pointer { } // newQFinalState constructs the type using only CGO pointers. -func newQFinalState(h *C.QFinalState, h_QAbstractState *C.QAbstractState, h_QObject *C.QObject) *QFinalState { +func newQFinalState(h *C.QFinalState) *QFinalState { if h == nil { return nil } + var outptr_QAbstractState *C.QAbstractState = nil + C.QFinalState_virtbase(h, &outptr_QAbstractState) + return &QFinalState{h: h, - QAbstractState: newQAbstractState(h_QAbstractState, h_QObject)} + QAbstractState: newQAbstractState(outptr_QAbstractState)} } // UnsafeNewQFinalState constructs the type using only unsafe pointers. -func UnsafeNewQFinalState(h unsafe.Pointer, h_QAbstractState unsafe.Pointer, h_QObject unsafe.Pointer) *QFinalState { - if h == nil { - return nil - } - - return &QFinalState{h: (*C.QFinalState)(h), - QAbstractState: UnsafeNewQAbstractState(h_QAbstractState, h_QObject)} +func UnsafeNewQFinalState(h unsafe.Pointer) *QFinalState { + return newQFinalState((*C.QFinalState)(h)) } // NewQFinalState constructs a new QFinalState object. func NewQFinalState() *QFinalState { - var outptr_QFinalState *C.QFinalState = nil - var outptr_QAbstractState *C.QAbstractState = nil - var outptr_QObject *C.QObject = nil - C.QFinalState_new(&outptr_QFinalState, &outptr_QAbstractState, &outptr_QObject) - ret := newQFinalState(outptr_QFinalState, outptr_QAbstractState, outptr_QObject) + ret := newQFinalState(C.QFinalState_new()) ret.isSubclass = true return ret } // NewQFinalState2 constructs a new QFinalState object. func NewQFinalState2(parent *QState) *QFinalState { - var outptr_QFinalState *C.QFinalState = nil - var outptr_QAbstractState *C.QAbstractState = nil - var outptr_QObject *C.QObject = nil - C.QFinalState_new2(parent.cPointer(), &outptr_QFinalState, &outptr_QAbstractState, &outptr_QObject) - ret := newQFinalState(outptr_QFinalState, outptr_QAbstractState, outptr_QObject) + ret := newQFinalState(C.QFinalState_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qfinalstate.h b/qt/gen_qfinalstate.h index bf08bc4e..42a5552a 100644 --- a/qt/gen_qfinalstate.h +++ b/qt/gen_qfinalstate.h @@ -30,8 +30,9 @@ typedef struct QObject QObject; typedef struct QState QState; #endif -void QFinalState_new(QFinalState** outptr_QFinalState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); -void QFinalState_new2(QState* parent, QFinalState** outptr_QFinalState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); +QFinalState* QFinalState_new(); +QFinalState* QFinalState_new2(QState* parent); +void QFinalState_virtbase(QFinalState* src, QAbstractState** outptr_QAbstractState); QMetaObject* QFinalState_MetaObject(const QFinalState* self); void* QFinalState_Metacast(QFinalState* self, const char* param1); struct miqt_string QFinalState_Tr(const char* s); diff --git a/qt/gen_qfloat16.cpp b/qt/gen_qfloat16.cpp index 6439a90c..df8cda14 100644 --- a/qt/gen_qfloat16.cpp +++ b/qt/gen_qfloat16.cpp @@ -2,14 +2,12 @@ #include "gen_qfloat16.h" #include "_cgo_export.h" -void qfloat16_new(qfloat16** outptr_qfloat16) { - qfloat16* ret = new qfloat16(); - *outptr_qfloat16 = ret; +qfloat16* qfloat16_new() { + return new qfloat16(); } -void qfloat16_new2(float f, qfloat16** outptr_qfloat16) { - qfloat16* ret = new qfloat16(static_cast(f)); - *outptr_qfloat16 = ret; +qfloat16* qfloat16_new2(float f) { + return new qfloat16(static_cast(f)); } bool qfloat16_IsInf(const qfloat16* self) { diff --git a/qt/gen_qfloat16.go b/qt/gen_qfloat16.go index f0e51871..888677d4 100644 --- a/qt/gen_qfloat16.go +++ b/qt/gen_qfloat16.go @@ -37,34 +37,27 @@ func newqfloat16(h *C.qfloat16) *qfloat16 { if h == nil { return nil } + return &qfloat16{h: h} } // UnsafeNewqfloat16 constructs the type using only unsafe pointers. func UnsafeNewqfloat16(h unsafe.Pointer) *qfloat16 { - if h == nil { - return nil - } - - return &qfloat16{h: (*C.qfloat16)(h)} + return newqfloat16((*C.qfloat16)(h)) } // Newqfloat16 constructs a new qfloat16 object. func Newqfloat16() *qfloat16 { - var outptr_qfloat16 *C.qfloat16 = nil - C.qfloat16_new(&outptr_qfloat16) - ret := newqfloat16(outptr_qfloat16) + ret := newqfloat16(C.qfloat16_new()) ret.isSubclass = true return ret } // Newqfloat162 constructs a new qfloat16 object. func Newqfloat162(f float32) *qfloat16 { - var outptr_qfloat16 *C.qfloat16 = nil - C.qfloat16_new2((C.float)(f), &outptr_qfloat16) - ret := newqfloat16(outptr_qfloat16) + ret := newqfloat16(C.qfloat16_new2((C.float)(f))) ret.isSubclass = true return ret } diff --git a/qt/gen_qfloat16.h b/qt/gen_qfloat16.h index 9b60bcda..b5a86c49 100644 --- a/qt/gen_qfloat16.h +++ b/qt/gen_qfloat16.h @@ -20,8 +20,8 @@ class qfloat16; typedef struct qfloat16 qfloat16; #endif -void qfloat16_new(qfloat16** outptr_qfloat16); -void qfloat16_new2(float f, qfloat16** outptr_qfloat16); +qfloat16* qfloat16_new(); +qfloat16* qfloat16_new2(float f); bool qfloat16_IsInf(const qfloat16* self); bool qfloat16_IsNaN(const qfloat16* self); bool qfloat16_IsFinite(const qfloat16* self); diff --git a/qt/gen_qfocusframe.cpp b/qt/gen_qfocusframe.cpp index 240df60f..dee67235 100644 --- a/qt/gen_qfocusframe.cpp +++ b/qt/gen_qfocusframe.cpp @@ -1044,20 +1044,16 @@ public: }; -void QFocusFrame_new(QWidget* parent, QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFocusFrame* ret = new MiqtVirtualQFocusFrame(parent); - *outptr_QFocusFrame = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFocusFrame* QFocusFrame_new(QWidget* parent) { + return new MiqtVirtualQFocusFrame(parent); } -void QFocusFrame_new2(QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFocusFrame* ret = new MiqtVirtualQFocusFrame(); - *outptr_QFocusFrame = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFocusFrame* QFocusFrame_new2() { + return new MiqtVirtualQFocusFrame(); +} + +void QFocusFrame_virtbase(QFocusFrame* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QFocusFrame_MetaObject(const QFocusFrame* self) { diff --git a/qt/gen_qfocusframe.go b/qt/gen_qfocusframe.go index 7d5f43f4..72f072ec 100644 --- a/qt/gen_qfocusframe.go +++ b/qt/gen_qfocusframe.go @@ -35,46 +35,34 @@ func (this *QFocusFrame) UnsafePointer() unsafe.Pointer { } // newQFocusFrame constructs the type using only CGO pointers. -func newQFocusFrame(h *C.QFocusFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFocusFrame { +func newQFocusFrame(h *C.QFocusFrame) *QFocusFrame { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QFocusFrame_virtbase(h, &outptr_QWidget) + return &QFocusFrame{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQFocusFrame constructs the type using only unsafe pointers. -func UnsafeNewQFocusFrame(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFocusFrame { - if h == nil { - return nil - } - - return &QFocusFrame{h: (*C.QFocusFrame)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQFocusFrame(h unsafe.Pointer) *QFocusFrame { + return newQFocusFrame((*C.QFocusFrame)(h)) } // NewQFocusFrame constructs a new QFocusFrame object. func NewQFocusFrame(parent *QWidget) *QFocusFrame { - var outptr_QFocusFrame *C.QFocusFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFocusFrame_new(parent.cPointer(), &outptr_QFocusFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFocusFrame(outptr_QFocusFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFocusFrame(C.QFocusFrame_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQFocusFrame2 constructs a new QFocusFrame object. func NewQFocusFrame2() *QFocusFrame { - var outptr_QFocusFrame *C.QFocusFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFocusFrame_new2(&outptr_QFocusFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFocusFrame(outptr_QFocusFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFocusFrame(C.QFocusFrame_new2()) ret.isSubclass = true return ret } @@ -112,7 +100,7 @@ func (this *QFocusFrame) SetWidget(widget *QWidget) { } func (this *QFocusFrame) Widget() *QWidget { - return newQWidget(C.QFocusFrame_Widget(this.h), nil, nil) + return newQWidget(C.QFocusFrame_Widget(this.h)) } func QFocusFrame_Tr2(s string, c string) string { @@ -237,7 +225,7 @@ func miqt_exec_callback_QFocusFrame_PaintEvent(self *C.QFocusFrame, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QFocusFrame{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -446,7 +434,7 @@ func miqt_exec_callback_QFocusFrame_MousePressEvent(self *C.QFocusFrame, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -472,7 +460,7 @@ func miqt_exec_callback_QFocusFrame_MouseReleaseEvent(self *C.QFocusFrame, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -498,7 +486,7 @@ func miqt_exec_callback_QFocusFrame_MouseDoubleClickEvent(self *C.QFocusFrame, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -524,7 +512,7 @@ func miqt_exec_callback_QFocusFrame_MouseMoveEvent(self *C.QFocusFrame, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -550,7 +538,7 @@ func miqt_exec_callback_QFocusFrame_WheelEvent(self *C.QFocusFrame, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -576,7 +564,7 @@ func miqt_exec_callback_QFocusFrame_KeyPressEvent(self *C.QFocusFrame, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -602,7 +590,7 @@ func miqt_exec_callback_QFocusFrame_KeyReleaseEvent(self *C.QFocusFrame, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -628,7 +616,7 @@ func miqt_exec_callback_QFocusFrame_FocusInEvent(self *C.QFocusFrame, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -654,7 +642,7 @@ func miqt_exec_callback_QFocusFrame_FocusOutEvent(self *C.QFocusFrame, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -732,7 +720,7 @@ func miqt_exec_callback_QFocusFrame_MoveEvent(self *C.QFocusFrame, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -758,7 +746,7 @@ func miqt_exec_callback_QFocusFrame_ResizeEvent(self *C.QFocusFrame, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -784,7 +772,7 @@ func miqt_exec_callback_QFocusFrame_CloseEvent(self *C.QFocusFrame, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -810,7 +798,7 @@ func miqt_exec_callback_QFocusFrame_ContextMenuEvent(self *C.QFocusFrame, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -836,7 +824,7 @@ func miqt_exec_callback_QFocusFrame_TabletEvent(self *C.QFocusFrame, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -862,7 +850,7 @@ func miqt_exec_callback_QFocusFrame_ActionEvent(self *C.QFocusFrame, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -888,7 +876,7 @@ func miqt_exec_callback_QFocusFrame_DragEnterEvent(self *C.QFocusFrame, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -914,7 +902,7 @@ func miqt_exec_callback_QFocusFrame_DragMoveEvent(self *C.QFocusFrame, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -940,7 +928,7 @@ func miqt_exec_callback_QFocusFrame_DragLeaveEvent(self *C.QFocusFrame, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -966,7 +954,7 @@ func miqt_exec_callback_QFocusFrame_DropEvent(self *C.QFocusFrame, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_DropEvent, slotval1) @@ -992,7 +980,7 @@ func miqt_exec_callback_QFocusFrame_ShowEvent(self *C.QFocusFrame, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1018,7 +1006,7 @@ func miqt_exec_callback_QFocusFrame_HideEvent(self *C.QFocusFrame, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1214,7 +1202,7 @@ func miqt_exec_callback_QFocusFrame_InputMethodEvent(self *C.QFocusFrame, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QFocusFrame{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qfocusframe.h b/qt/gen_qfocusframe.h index c97d27e1..bed65871 100644 --- a/qt/gen_qfocusframe.h +++ b/qt/gen_qfocusframe.h @@ -76,8 +76,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QFocusFrame_new(QWidget* parent, QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFocusFrame_new2(QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QFocusFrame* QFocusFrame_new(QWidget* parent); +QFocusFrame* QFocusFrame_new2(); +void QFocusFrame_virtbase(QFocusFrame* src, QWidget** outptr_QWidget); QMetaObject* QFocusFrame_MetaObject(const QFocusFrame* self); void* QFocusFrame_Metacast(QFocusFrame* self, const char* param1); struct miqt_string QFocusFrame_Tr(const char* s); diff --git a/qt/gen_qfont.cpp b/qt/gen_qfont.cpp index 84e5cd01..a60d8bcb 100644 --- a/qt/gen_qfont.cpp +++ b/qt/gen_qfont.cpp @@ -8,48 +8,40 @@ #include "gen_qfont.h" #include "_cgo_export.h" -void QFont_new(QFont** outptr_QFont) { - QFont* ret = new QFont(); - *outptr_QFont = ret; +QFont* QFont_new() { + return new QFont(); } -void QFont_new2(struct miqt_string family, QFont** outptr_QFont) { +QFont* QFont_new2(struct miqt_string family) { QString family_QString = QString::fromUtf8(family.data, family.len); - QFont* ret = new QFont(family_QString); - *outptr_QFont = ret; + return new QFont(family_QString); } -void QFont_new3(QFont* font, QPaintDevice* pd, QFont** outptr_QFont) { - QFont* ret = new QFont(*font, pd); - *outptr_QFont = ret; +QFont* QFont_new3(QFont* font, QPaintDevice* pd) { + return new QFont(*font, pd); } -void QFont_new4(QFont* font, QPaintDevice* pd, QFont** outptr_QFont) { - QFont* ret = new QFont(*font, pd); - *outptr_QFont = ret; +QFont* QFont_new4(QFont* font, QPaintDevice* pd) { + return new QFont(*font, pd); } -void QFont_new5(QFont* font, QFont** outptr_QFont) { - QFont* ret = new QFont(*font); - *outptr_QFont = ret; +QFont* QFont_new5(QFont* font) { + return new QFont(*font); } -void QFont_new6(struct miqt_string family, int pointSize, QFont** outptr_QFont) { +QFont* QFont_new6(struct miqt_string family, int pointSize) { QString family_QString = QString::fromUtf8(family.data, family.len); - QFont* ret = new QFont(family_QString, static_cast(pointSize)); - *outptr_QFont = ret; + return new QFont(family_QString, static_cast(pointSize)); } -void QFont_new7(struct miqt_string family, int pointSize, int weight, QFont** outptr_QFont) { +QFont* QFont_new7(struct miqt_string family, int pointSize, int weight) { QString family_QString = QString::fromUtf8(family.data, family.len); - QFont* ret = new QFont(family_QString, static_cast(pointSize), static_cast(weight)); - *outptr_QFont = ret; + return new QFont(family_QString, static_cast(pointSize), static_cast(weight)); } -void QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic, QFont** outptr_QFont) { +QFont* QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic) { QString family_QString = QString::fromUtf8(family.data, family.len); - QFont* ret = new QFont(family_QString, static_cast(pointSize), static_cast(weight), italic); - *outptr_QFont = ret; + return new QFont(family_QString, static_cast(pointSize), static_cast(weight), italic); } void QFont_Swap(QFont* self, QFont* other) { diff --git a/qt/gen_qfont.go b/qt/gen_qfont.go index e0d577cc..060ae442 100644 --- a/qt/gen_qfont.go +++ b/qt/gen_qfont.go @@ -162,24 +162,19 @@ func newQFont(h *C.QFont) *QFont { if h == nil { return nil } + return &QFont{h: h} } // UnsafeNewQFont constructs the type using only unsafe pointers. func UnsafeNewQFont(h unsafe.Pointer) *QFont { - if h == nil { - return nil - } - - return &QFont{h: (*C.QFont)(h)} + return newQFont((*C.QFont)(h)) } // NewQFont constructs a new QFont object. func NewQFont() *QFont { - var outptr_QFont *C.QFont = nil - C.QFont_new(&outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new()) ret.isSubclass = true return ret } @@ -190,40 +185,32 @@ func NewQFont2(family string) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - var outptr_QFont *C.QFont = nil - C.QFont_new2(family_ms, &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new2(family_ms)) ret.isSubclass = true return ret } // NewQFont3 constructs a new QFont object. func NewQFont3(font *QFont, pd *QPaintDevice) *QFont { - var outptr_QFont *C.QFont = nil - C.QFont_new3(font.cPointer(), pd.cPointer(), &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new3(font.cPointer(), pd.cPointer())) ret.isSubclass = true return ret } // NewQFont4 constructs a new QFont object. func NewQFont4(font *QFont, pd *QPaintDevice) *QFont { - var outptr_QFont *C.QFont = nil - C.QFont_new4(font.cPointer(), pd.cPointer(), &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new4(font.cPointer(), pd.cPointer())) ret.isSubclass = true return ret } // NewQFont5 constructs a new QFont object. func NewQFont5(font *QFont) *QFont { - var outptr_QFont *C.QFont = nil - C.QFont_new5(font.cPointer(), &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new5(font.cPointer())) ret.isSubclass = true return ret } @@ -234,10 +221,8 @@ func NewQFont6(family string, pointSize int) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - var outptr_QFont *C.QFont = nil - C.QFont_new6(family_ms, (C.int)(pointSize), &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new6(family_ms, (C.int)(pointSize))) ret.isSubclass = true return ret } @@ -248,10 +233,8 @@ func NewQFont7(family string, pointSize int, weight int) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - var outptr_QFont *C.QFont = nil - C.QFont_new7(family_ms, (C.int)(pointSize), (C.int)(weight), &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new7(family_ms, (C.int)(pointSize), (C.int)(weight))) ret.isSubclass = true return ret } @@ -262,10 +245,8 @@ func NewQFont8(family string, pointSize int, weight int, italic bool) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - var outptr_QFont *C.QFont = nil - C.QFont_new8(family_ms, (C.int)(pointSize), (C.int)(weight), (C.bool)(italic), &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new8(family_ms, (C.int)(pointSize), (C.int)(weight), (C.bool)(italic))) ret.isSubclass = true return ret } diff --git a/qt/gen_qfont.h b/qt/gen_qfont.h index c91a6681..280153d5 100644 --- a/qt/gen_qfont.h +++ b/qt/gen_qfont.h @@ -22,14 +22,14 @@ typedef struct QFont QFont; typedef struct QPaintDevice QPaintDevice; #endif -void QFont_new(QFont** outptr_QFont); -void QFont_new2(struct miqt_string family, QFont** outptr_QFont); -void QFont_new3(QFont* font, QPaintDevice* pd, QFont** outptr_QFont); -void QFont_new4(QFont* font, QPaintDevice* pd, QFont** outptr_QFont); -void QFont_new5(QFont* font, QFont** outptr_QFont); -void QFont_new6(struct miqt_string family, int pointSize, QFont** outptr_QFont); -void QFont_new7(struct miqt_string family, int pointSize, int weight, QFont** outptr_QFont); -void QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic, QFont** outptr_QFont); +QFont* QFont_new(); +QFont* QFont_new2(struct miqt_string family); +QFont* QFont_new3(QFont* font, QPaintDevice* pd); +QFont* QFont_new4(QFont* font, QPaintDevice* pd); +QFont* QFont_new5(QFont* font); +QFont* QFont_new6(struct miqt_string family, int pointSize); +QFont* QFont_new7(struct miqt_string family, int pointSize, int weight); +QFont* QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic); void QFont_Swap(QFont* self, QFont* other); struct miqt_string QFont_Family(const QFont* self); void QFont_SetFamily(QFont* self, struct miqt_string family); diff --git a/qt/gen_qfontcombobox.cpp b/qt/gen_qfontcombobox.cpp index b20838ea..f0c80b47 100644 --- a/qt/gen_qfontcombobox.cpp +++ b/qt/gen_qfontcombobox.cpp @@ -508,22 +508,16 @@ public: }; -void QFontComboBox_new(QWidget* parent, QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFontComboBox* ret = new MiqtVirtualQFontComboBox(parent); - *outptr_QFontComboBox = ret; - *outptr_QComboBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFontComboBox* QFontComboBox_new(QWidget* parent) { + return new MiqtVirtualQFontComboBox(parent); } -void QFontComboBox_new2(QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFontComboBox* ret = new MiqtVirtualQFontComboBox(); - *outptr_QFontComboBox = ret; - *outptr_QComboBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFontComboBox* QFontComboBox_new2() { + return new MiqtVirtualQFontComboBox(); +} + +void QFontComboBox_virtbase(QFontComboBox* src, QComboBox** outptr_QComboBox) { + *outptr_QComboBox = static_cast(src); } QMetaObject* QFontComboBox_MetaObject(const QFontComboBox* self) { diff --git a/qt/gen_qfontcombobox.go b/qt/gen_qfontcombobox.go index 812a3bac..d826980c 100644 --- a/qt/gen_qfontcombobox.go +++ b/qt/gen_qfontcombobox.go @@ -45,48 +45,34 @@ func (this *QFontComboBox) UnsafePointer() unsafe.Pointer { } // newQFontComboBox constructs the type using only CGO pointers. -func newQFontComboBox(h *C.QFontComboBox, h_QComboBox *C.QComboBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFontComboBox { +func newQFontComboBox(h *C.QFontComboBox) *QFontComboBox { if h == nil { return nil } + var outptr_QComboBox *C.QComboBox = nil + C.QFontComboBox_virtbase(h, &outptr_QComboBox) + return &QFontComboBox{h: h, - QComboBox: newQComboBox(h_QComboBox, h_QWidget, h_QObject, h_QPaintDevice)} + QComboBox: newQComboBox(outptr_QComboBox)} } // UnsafeNewQFontComboBox constructs the type using only unsafe pointers. -func UnsafeNewQFontComboBox(h unsafe.Pointer, h_QComboBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFontComboBox { - if h == nil { - return nil - } - - return &QFontComboBox{h: (*C.QFontComboBox)(h), - QComboBox: UnsafeNewQComboBox(h_QComboBox, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQFontComboBox(h unsafe.Pointer) *QFontComboBox { + return newQFontComboBox((*C.QFontComboBox)(h)) } // NewQFontComboBox constructs a new QFontComboBox object. func NewQFontComboBox(parent *QWidget) *QFontComboBox { - var outptr_QFontComboBox *C.QFontComboBox = nil - var outptr_QComboBox *C.QComboBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFontComboBox_new(parent.cPointer(), &outptr_QFontComboBox, &outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFontComboBox(outptr_QFontComboBox, outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFontComboBox(C.QFontComboBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQFontComboBox2 constructs a new QFontComboBox object. func NewQFontComboBox2() *QFontComboBox { - var outptr_QFontComboBox *C.QFontComboBox = nil - var outptr_QComboBox *C.QComboBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFontComboBox_new2(&outptr_QFontComboBox, &outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFontComboBox(outptr_QFontComboBox, outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFontComboBox(C.QFontComboBox_new2()) ret.isSubclass = true return ret } @@ -393,7 +379,7 @@ func miqt_exec_callback_QFontComboBox_FocusInEvent(self *C.QFontComboBox, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -419,7 +405,7 @@ func miqt_exec_callback_QFontComboBox_FocusOutEvent(self *C.QFontComboBox, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -471,7 +457,7 @@ func miqt_exec_callback_QFontComboBox_ResizeEvent(self *C.QFontComboBox, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -497,7 +483,7 @@ func miqt_exec_callback_QFontComboBox_PaintEvent(self *C.QFontComboBox, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -523,7 +509,7 @@ func miqt_exec_callback_QFontComboBox_ShowEvent(self *C.QFontComboBox, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(e, nil) + slotval1 := newQShowEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -549,7 +535,7 @@ func miqt_exec_callback_QFontComboBox_HideEvent(self *C.QFontComboBox, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(e, nil) + slotval1 := newQHideEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_HideEvent, slotval1) @@ -575,7 +561,7 @@ func miqt_exec_callback_QFontComboBox_MousePressEvent(self *C.QFontComboBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -601,7 +587,7 @@ func miqt_exec_callback_QFontComboBox_MouseReleaseEvent(self *C.QFontComboBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -627,7 +613,7 @@ func miqt_exec_callback_QFontComboBox_KeyPressEvent(self *C.QFontComboBox, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -653,7 +639,7 @@ func miqt_exec_callback_QFontComboBox_KeyReleaseEvent(self *C.QFontComboBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -679,7 +665,7 @@ func miqt_exec_callback_QFontComboBox_WheelEvent(self *C.QFontComboBox, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -705,7 +691,7 @@ func miqt_exec_callback_QFontComboBox_ContextMenuEvent(self *C.QFontComboBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(e, nil, nil) + slotval1 := newQContextMenuEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -731,7 +717,7 @@ func miqt_exec_callback_QFontComboBox_InputMethodEvent(self *C.QFontComboBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QFontComboBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qfontcombobox.h b/qt/gen_qfontcombobox.h index b4b8b036..3140b0f4 100644 --- a/qt/gen_qfontcombobox.h +++ b/qt/gen_qfontcombobox.h @@ -58,8 +58,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QFontComboBox_new(QWidget* parent, QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFontComboBox_new2(QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QFontComboBox* QFontComboBox_new(QWidget* parent); +QFontComboBox* QFontComboBox_new2(); +void QFontComboBox_virtbase(QFontComboBox* src, QComboBox** outptr_QComboBox); QMetaObject* QFontComboBox_MetaObject(const QFontComboBox* self); void* QFontComboBox_Metacast(QFontComboBox* self, const char* param1); struct miqt_string QFontComboBox_Tr(const char* s); diff --git a/qt/gen_qfontdatabase.cpp b/qt/gen_qfontdatabase.cpp index 7d05825b..870031fa 100644 --- a/qt/gen_qfontdatabase.cpp +++ b/qt/gen_qfontdatabase.cpp @@ -10,9 +10,8 @@ #include "gen_qfontdatabase.h" #include "_cgo_export.h" -void QFontDatabase_new(QFontDatabase** outptr_QFontDatabase) { - QFontDatabase* ret = new QFontDatabase(); - *outptr_QFontDatabase = ret; +QFontDatabase* QFontDatabase_new() { + return new QFontDatabase(); } struct miqt_array /* of int */ QFontDatabase_StandardSizes() { diff --git a/qt/gen_qfontdatabase.go b/qt/gen_qfontdatabase.go index 5c347fc9..3661d577 100644 --- a/qt/gen_qfontdatabase.go +++ b/qt/gen_qfontdatabase.go @@ -87,24 +87,19 @@ func newQFontDatabase(h *C.QFontDatabase) *QFontDatabase { if h == nil { return nil } + return &QFontDatabase{h: h} } // UnsafeNewQFontDatabase constructs the type using only unsafe pointers. func UnsafeNewQFontDatabase(h unsafe.Pointer) *QFontDatabase { - if h == nil { - return nil - } - - return &QFontDatabase{h: (*C.QFontDatabase)(h)} + return newQFontDatabase((*C.QFontDatabase)(h)) } // NewQFontDatabase constructs a new QFontDatabase object. func NewQFontDatabase() *QFontDatabase { - var outptr_QFontDatabase *C.QFontDatabase = nil - C.QFontDatabase_new(&outptr_QFontDatabase) - ret := newQFontDatabase(outptr_QFontDatabase) + ret := newQFontDatabase(C.QFontDatabase_new()) ret.isSubclass = true return ret } diff --git a/qt/gen_qfontdatabase.h b/qt/gen_qfontdatabase.h index 53fe470d..cee72d7b 100644 --- a/qt/gen_qfontdatabase.h +++ b/qt/gen_qfontdatabase.h @@ -24,7 +24,7 @@ typedef struct QFontDatabase QFontDatabase; typedef struct QFontInfo QFontInfo; #endif -void QFontDatabase_new(QFontDatabase** outptr_QFontDatabase); +QFontDatabase* QFontDatabase_new(); struct miqt_array /* of int */ QFontDatabase_StandardSizes(); struct miqt_array /* of int */ QFontDatabase_WritingSystems(const QFontDatabase* self); struct miqt_array /* of int */ QFontDatabase_WritingSystemsWithFamily(const QFontDatabase* self, struct miqt_string family); diff --git a/qt/gen_qfontdialog.cpp b/qt/gen_qfontdialog.cpp index 77f4375f..57d73e68 100644 --- a/qt/gen_qfontdialog.cpp +++ b/qt/gen_qfontdialog.cpp @@ -382,40 +382,24 @@ public: }; -void QFontDialog_new(QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(parent); - *outptr_QFontDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFontDialog* QFontDialog_new(QWidget* parent) { + return new MiqtVirtualQFontDialog(parent); } -void QFontDialog_new2(QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(); - *outptr_QFontDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFontDialog* QFontDialog_new2() { + return new MiqtVirtualQFontDialog(); } -void QFontDialog_new3(QFont* initial, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(*initial); - *outptr_QFontDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFontDialog* QFontDialog_new3(QFont* initial) { + return new MiqtVirtualQFontDialog(*initial); } -void QFontDialog_new4(QFont* initial, QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(*initial, parent); - *outptr_QFontDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFontDialog* QFontDialog_new4(QFont* initial, QWidget* parent) { + return new MiqtVirtualQFontDialog(*initial, parent); +} + +void QFontDialog_virtbase(QFontDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QFontDialog_MetaObject(const QFontDialog* self) { diff --git a/qt/gen_qfontdialog.go b/qt/gen_qfontdialog.go index 5502df99..790ff710 100644 --- a/qt/gen_qfontdialog.go +++ b/qt/gen_qfontdialog.go @@ -46,76 +46,50 @@ func (this *QFontDialog) UnsafePointer() unsafe.Pointer { } // newQFontDialog constructs the type using only CGO pointers. -func newQFontDialog(h *C.QFontDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFontDialog { +func newQFontDialog(h *C.QFontDialog) *QFontDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QFontDialog_virtbase(h, &outptr_QDialog) + return &QFontDialog{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQFontDialog constructs the type using only unsafe pointers. -func UnsafeNewQFontDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFontDialog { - if h == nil { - return nil - } - - return &QFontDialog{h: (*C.QFontDialog)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQFontDialog(h unsafe.Pointer) *QFontDialog { + return newQFontDialog((*C.QFontDialog)(h)) } // NewQFontDialog constructs a new QFontDialog object. func NewQFontDialog(parent *QWidget) *QFontDialog { - var outptr_QFontDialog *C.QFontDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFontDialog_new(parent.cPointer(), &outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFontDialog(C.QFontDialog_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQFontDialog2 constructs a new QFontDialog object. func NewQFontDialog2() *QFontDialog { - var outptr_QFontDialog *C.QFontDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFontDialog_new2(&outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFontDialog(C.QFontDialog_new2()) ret.isSubclass = true return ret } // NewQFontDialog3 constructs a new QFontDialog object. func NewQFontDialog3(initial *QFont) *QFontDialog { - var outptr_QFontDialog *C.QFontDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFontDialog_new3(initial.cPointer(), &outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFontDialog(C.QFontDialog_new3(initial.cPointer())) ret.isSubclass = true return ret } // NewQFontDialog4 constructs a new QFontDialog object. func NewQFontDialog4(initial *QFont, parent *QWidget) *QFontDialog { - var outptr_QFontDialog *C.QFontDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFontDialog_new4(initial.cPointer(), parent.cPointer(), &outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFontDialog(C.QFontDialog_new4(initial.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -592,7 +566,7 @@ func miqt_exec_callback_QFontDialog_KeyPressEvent(self *C.QFontDialog, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QFontDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -618,7 +592,7 @@ func miqt_exec_callback_QFontDialog_CloseEvent(self *C.QFontDialog, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(param1, nil) + slotval1 := newQCloseEvent(param1) gofunc((&QFontDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -644,7 +618,7 @@ func miqt_exec_callback_QFontDialog_ShowEvent(self *C.QFontDialog, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QFontDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -670,7 +644,7 @@ func miqt_exec_callback_QFontDialog_ResizeEvent(self *C.QFontDialog, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QFontDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -696,7 +670,7 @@ func miqt_exec_callback_QFontDialog_ContextMenuEvent(self *C.QFontDialog, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QFontDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt/gen_qfontdialog.h b/qt/gen_qfontdialog.h index da08ca8b..b16f1280 100644 --- a/qt/gen_qfontdialog.h +++ b/qt/gen_qfontdialog.h @@ -46,10 +46,11 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QFontDialog_new(QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFontDialog_new2(QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFontDialog_new3(QFont* initial, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFontDialog_new4(QFont* initial, QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QFontDialog* QFontDialog_new(QWidget* parent); +QFontDialog* QFontDialog_new2(); +QFontDialog* QFontDialog_new3(QFont* initial); +QFontDialog* QFontDialog_new4(QFont* initial, QWidget* parent); +void QFontDialog_virtbase(QFontDialog* src, QDialog** outptr_QDialog); QMetaObject* QFontDialog_MetaObject(const QFontDialog* self); void* QFontDialog_Metacast(QFontDialog* self, const char* param1); struct miqt_string QFontDialog_Tr(const char* s); diff --git a/qt/gen_qfontinfo.cpp b/qt/gen_qfontinfo.cpp index 90fa5e65..389f9c87 100644 --- a/qt/gen_qfontinfo.cpp +++ b/qt/gen_qfontinfo.cpp @@ -7,14 +7,12 @@ #include "gen_qfontinfo.h" #include "_cgo_export.h" -void QFontInfo_new(QFont* param1, QFontInfo** outptr_QFontInfo) { - QFontInfo* ret = new QFontInfo(*param1); - *outptr_QFontInfo = ret; +QFontInfo* QFontInfo_new(QFont* param1) { + return new QFontInfo(*param1); } -void QFontInfo_new2(QFontInfo* param1, QFontInfo** outptr_QFontInfo) { - QFontInfo* ret = new QFontInfo(*param1); - *outptr_QFontInfo = ret; +QFontInfo* QFontInfo_new2(QFontInfo* param1) { + return new QFontInfo(*param1); } void QFontInfo_OperatorAssign(QFontInfo* self, QFontInfo* param1) { diff --git a/qt/gen_qfontinfo.go b/qt/gen_qfontinfo.go index 6fe585be..19994b50 100644 --- a/qt/gen_qfontinfo.go +++ b/qt/gen_qfontinfo.go @@ -37,34 +37,27 @@ func newQFontInfo(h *C.QFontInfo) *QFontInfo { if h == nil { return nil } + return &QFontInfo{h: h} } // UnsafeNewQFontInfo constructs the type using only unsafe pointers. func UnsafeNewQFontInfo(h unsafe.Pointer) *QFontInfo { - if h == nil { - return nil - } - - return &QFontInfo{h: (*C.QFontInfo)(h)} + return newQFontInfo((*C.QFontInfo)(h)) } // NewQFontInfo constructs a new QFontInfo object. func NewQFontInfo(param1 *QFont) *QFontInfo { - var outptr_QFontInfo *C.QFontInfo = nil - C.QFontInfo_new(param1.cPointer(), &outptr_QFontInfo) - ret := newQFontInfo(outptr_QFontInfo) + ret := newQFontInfo(C.QFontInfo_new(param1.cPointer())) ret.isSubclass = true return ret } // NewQFontInfo2 constructs a new QFontInfo object. func NewQFontInfo2(param1 *QFontInfo) *QFontInfo { - var outptr_QFontInfo *C.QFontInfo = nil - C.QFontInfo_new2(param1.cPointer(), &outptr_QFontInfo) - ret := newQFontInfo(outptr_QFontInfo) + ret := newQFontInfo(C.QFontInfo_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qfontinfo.h b/qt/gen_qfontinfo.h index 21c7a492..beb5751c 100644 --- a/qt/gen_qfontinfo.h +++ b/qt/gen_qfontinfo.h @@ -22,8 +22,8 @@ typedef struct QFont QFont; typedef struct QFontInfo QFontInfo; #endif -void QFontInfo_new(QFont* param1, QFontInfo** outptr_QFontInfo); -void QFontInfo_new2(QFontInfo* param1, QFontInfo** outptr_QFontInfo); +QFontInfo* QFontInfo_new(QFont* param1); +QFontInfo* QFontInfo_new2(QFontInfo* param1); void QFontInfo_OperatorAssign(QFontInfo* self, QFontInfo* param1); void QFontInfo_Swap(QFontInfo* self, QFontInfo* other); struct miqt_string QFontInfo_Family(const QFontInfo* self); diff --git a/qt/gen_qfontmetrics.cpp b/qt/gen_qfontmetrics.cpp index 4233dc2a..46714ba7 100644 --- a/qt/gen_qfontmetrics.cpp +++ b/qt/gen_qfontmetrics.cpp @@ -14,19 +14,16 @@ #include "gen_qfontmetrics.h" #include "_cgo_export.h" -void QFontMetrics_new(QFont* param1, QFontMetrics** outptr_QFontMetrics) { - QFontMetrics* ret = new QFontMetrics(*param1); - *outptr_QFontMetrics = ret; +QFontMetrics* QFontMetrics_new(QFont* param1) { + return new QFontMetrics(*param1); } -void QFontMetrics_new2(QFont* font, QPaintDevice* pd, QFontMetrics** outptr_QFontMetrics) { - QFontMetrics* ret = new QFontMetrics(*font, pd); - *outptr_QFontMetrics = ret; +QFontMetrics* QFontMetrics_new2(QFont* font, QPaintDevice* pd) { + return new QFontMetrics(*font, pd); } -void QFontMetrics_new3(QFontMetrics* param1, QFontMetrics** outptr_QFontMetrics) { - QFontMetrics* ret = new QFontMetrics(*param1); - *outptr_QFontMetrics = ret; +QFontMetrics* QFontMetrics_new3(QFontMetrics* param1) { + return new QFontMetrics(*param1); } void QFontMetrics_OperatorAssign(QFontMetrics* self, QFontMetrics* param1) { @@ -255,24 +252,20 @@ void QFontMetrics_Delete(QFontMetrics* self, bool isSubclass) { } } -void QFontMetricsF_new(QFont* font, QFontMetricsF** outptr_QFontMetricsF) { - QFontMetricsF* ret = new QFontMetricsF(*font); - *outptr_QFontMetricsF = ret; +QFontMetricsF* QFontMetricsF_new(QFont* font) { + return new QFontMetricsF(*font); } -void QFontMetricsF_new2(QFont* font, QPaintDevice* pd, QFontMetricsF** outptr_QFontMetricsF) { - QFontMetricsF* ret = new QFontMetricsF(*font, pd); - *outptr_QFontMetricsF = ret; +QFontMetricsF* QFontMetricsF_new2(QFont* font, QPaintDevice* pd) { + return new QFontMetricsF(*font, pd); } -void QFontMetricsF_new3(QFontMetrics* param1, QFontMetricsF** outptr_QFontMetricsF) { - QFontMetricsF* ret = new QFontMetricsF(*param1); - *outptr_QFontMetricsF = ret; +QFontMetricsF* QFontMetricsF_new3(QFontMetrics* param1) { + return new QFontMetricsF(*param1); } -void QFontMetricsF_new4(QFontMetricsF* param1, QFontMetricsF** outptr_QFontMetricsF) { - QFontMetricsF* ret = new QFontMetricsF(*param1); - *outptr_QFontMetricsF = ret; +QFontMetricsF* QFontMetricsF_new4(QFontMetricsF* param1) { + return new QFontMetricsF(*param1); } void QFontMetricsF_OperatorAssign(QFontMetricsF* self, QFontMetricsF* param1) { diff --git a/qt/gen_qfontmetrics.go b/qt/gen_qfontmetrics.go index c0a046dc..6ba1c13e 100644 --- a/qt/gen_qfontmetrics.go +++ b/qt/gen_qfontmetrics.go @@ -37,44 +37,35 @@ func newQFontMetrics(h *C.QFontMetrics) *QFontMetrics { if h == nil { return nil } + return &QFontMetrics{h: h} } // UnsafeNewQFontMetrics constructs the type using only unsafe pointers. func UnsafeNewQFontMetrics(h unsafe.Pointer) *QFontMetrics { - if h == nil { - return nil - } - - return &QFontMetrics{h: (*C.QFontMetrics)(h)} + return newQFontMetrics((*C.QFontMetrics)(h)) } // NewQFontMetrics constructs a new QFontMetrics object. func NewQFontMetrics(param1 *QFont) *QFontMetrics { - var outptr_QFontMetrics *C.QFontMetrics = nil - C.QFontMetrics_new(param1.cPointer(), &outptr_QFontMetrics) - ret := newQFontMetrics(outptr_QFontMetrics) + ret := newQFontMetrics(C.QFontMetrics_new(param1.cPointer())) ret.isSubclass = true return ret } // NewQFontMetrics2 constructs a new QFontMetrics object. func NewQFontMetrics2(font *QFont, pd *QPaintDevice) *QFontMetrics { - var outptr_QFontMetrics *C.QFontMetrics = nil - C.QFontMetrics_new2(font.cPointer(), pd.cPointer(), &outptr_QFontMetrics) - ret := newQFontMetrics(outptr_QFontMetrics) + ret := newQFontMetrics(C.QFontMetrics_new2(font.cPointer(), pd.cPointer())) ret.isSubclass = true return ret } // NewQFontMetrics3 constructs a new QFontMetrics object. func NewQFontMetrics3(param1 *QFontMetrics) *QFontMetrics { - var outptr_QFontMetrics *C.QFontMetrics = nil - C.QFontMetrics_new3(param1.cPointer(), &outptr_QFontMetrics) - ret := newQFontMetrics(outptr_QFontMetrics) + ret := newQFontMetrics(C.QFontMetrics_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -407,54 +398,43 @@ func newQFontMetricsF(h *C.QFontMetricsF) *QFontMetricsF { if h == nil { return nil } + return &QFontMetricsF{h: h} } // UnsafeNewQFontMetricsF constructs the type using only unsafe pointers. func UnsafeNewQFontMetricsF(h unsafe.Pointer) *QFontMetricsF { - if h == nil { - return nil - } - - return &QFontMetricsF{h: (*C.QFontMetricsF)(h)} + return newQFontMetricsF((*C.QFontMetricsF)(h)) } // NewQFontMetricsF constructs a new QFontMetricsF object. func NewQFontMetricsF(font *QFont) *QFontMetricsF { - var outptr_QFontMetricsF *C.QFontMetricsF = nil - C.QFontMetricsF_new(font.cPointer(), &outptr_QFontMetricsF) - ret := newQFontMetricsF(outptr_QFontMetricsF) + ret := newQFontMetricsF(C.QFontMetricsF_new(font.cPointer())) ret.isSubclass = true return ret } // NewQFontMetricsF2 constructs a new QFontMetricsF object. func NewQFontMetricsF2(font *QFont, pd *QPaintDevice) *QFontMetricsF { - var outptr_QFontMetricsF *C.QFontMetricsF = nil - C.QFontMetricsF_new2(font.cPointer(), pd.cPointer(), &outptr_QFontMetricsF) - ret := newQFontMetricsF(outptr_QFontMetricsF) + ret := newQFontMetricsF(C.QFontMetricsF_new2(font.cPointer(), pd.cPointer())) ret.isSubclass = true return ret } // NewQFontMetricsF3 constructs a new QFontMetricsF object. func NewQFontMetricsF3(param1 *QFontMetrics) *QFontMetricsF { - var outptr_QFontMetricsF *C.QFontMetricsF = nil - C.QFontMetricsF_new3(param1.cPointer(), &outptr_QFontMetricsF) - ret := newQFontMetricsF(outptr_QFontMetricsF) + ret := newQFontMetricsF(C.QFontMetricsF_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQFontMetricsF4 constructs a new QFontMetricsF object. func NewQFontMetricsF4(param1 *QFontMetricsF) *QFontMetricsF { - var outptr_QFontMetricsF *C.QFontMetricsF = nil - C.QFontMetricsF_new4(param1.cPointer(), &outptr_QFontMetricsF) - ret := newQFontMetricsF(outptr_QFontMetricsF) + ret := newQFontMetricsF(C.QFontMetricsF_new4(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qfontmetrics.h b/qt/gen_qfontmetrics.h index 131c4938..d68eb18a 100644 --- a/qt/gen_qfontmetrics.h +++ b/qt/gen_qfontmetrics.h @@ -36,9 +36,9 @@ typedef struct QSize QSize; typedef struct QSizeF QSizeF; #endif -void QFontMetrics_new(QFont* param1, QFontMetrics** outptr_QFontMetrics); -void QFontMetrics_new2(QFont* font, QPaintDevice* pd, QFontMetrics** outptr_QFontMetrics); -void QFontMetrics_new3(QFontMetrics* param1, QFontMetrics** outptr_QFontMetrics); +QFontMetrics* QFontMetrics_new(QFont* param1); +QFontMetrics* QFontMetrics_new2(QFont* font, QPaintDevice* pd); +QFontMetrics* QFontMetrics_new3(QFontMetrics* param1); void QFontMetrics_OperatorAssign(QFontMetrics* self, QFontMetrics* param1); void QFontMetrics_Swap(QFontMetrics* self, QFontMetrics* other); int QFontMetrics_Ascent(const QFontMetrics* self); @@ -87,10 +87,10 @@ QSize* QFontMetrics_Size4(const QFontMetrics* self, int flags, struct miqt_strin struct miqt_string QFontMetrics_ElidedText4(const QFontMetrics* self, struct miqt_string text, int mode, int width, int flags); void QFontMetrics_Delete(QFontMetrics* self, bool isSubclass); -void QFontMetricsF_new(QFont* font, QFontMetricsF** outptr_QFontMetricsF); -void QFontMetricsF_new2(QFont* font, QPaintDevice* pd, QFontMetricsF** outptr_QFontMetricsF); -void QFontMetricsF_new3(QFontMetrics* param1, QFontMetricsF** outptr_QFontMetricsF); -void QFontMetricsF_new4(QFontMetricsF* param1, QFontMetricsF** outptr_QFontMetricsF); +QFontMetricsF* QFontMetricsF_new(QFont* font); +QFontMetricsF* QFontMetricsF_new2(QFont* font, QPaintDevice* pd); +QFontMetricsF* QFontMetricsF_new3(QFontMetrics* param1); +QFontMetricsF* QFontMetricsF_new4(QFontMetricsF* param1); void QFontMetricsF_OperatorAssign(QFontMetricsF* self, QFontMetricsF* param1); void QFontMetricsF_OperatorAssignWithQFontMetrics(QFontMetricsF* self, QFontMetrics* param1); void QFontMetricsF_Swap(QFontMetricsF* self, QFontMetricsF* other); diff --git a/qt/gen_qformlayout.cpp b/qt/gen_qformlayout.cpp index 3822e05d..a9b0b9db 100644 --- a/qt/gen_qformlayout.cpp +++ b/qt/gen_qformlayout.cpp @@ -436,20 +436,16 @@ public: }; -void QFormLayout_new(QWidget* parent, QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQFormLayout* ret = new MiqtVirtualQFormLayout(parent); - *outptr_QFormLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QFormLayout* QFormLayout_new(QWidget* parent) { + return new MiqtVirtualQFormLayout(parent); } -void QFormLayout_new2(QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQFormLayout* ret = new MiqtVirtualQFormLayout(); - *outptr_QFormLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QFormLayout* QFormLayout_new2() { + return new MiqtVirtualQFormLayout(); +} + +void QFormLayout_virtbase(QFormLayout* src, QLayout** outptr_QLayout) { + *outptr_QLayout = static_cast(src); } QMetaObject* QFormLayout_MetaObject(const QFormLayout* self) { diff --git a/qt/gen_qformlayout.go b/qt/gen_qformlayout.go index 7de80eb9..0f74c5c1 100644 --- a/qt/gen_qformlayout.go +++ b/qt/gen_qformlayout.go @@ -59,46 +59,34 @@ func (this *QFormLayout) UnsafePointer() unsafe.Pointer { } // newQFormLayout constructs the type using only CGO pointers. -func newQFormLayout(h *C.QFormLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QFormLayout { +func newQFormLayout(h *C.QFormLayout) *QFormLayout { if h == nil { return nil } + var outptr_QLayout *C.QLayout = nil + C.QFormLayout_virtbase(h, &outptr_QLayout) + return &QFormLayout{h: h, - QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} + QLayout: newQLayout(outptr_QLayout)} } // UnsafeNewQFormLayout constructs the type using only unsafe pointers. -func UnsafeNewQFormLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QFormLayout { - if h == nil { - return nil - } - - return &QFormLayout{h: (*C.QFormLayout)(h), - QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} +func UnsafeNewQFormLayout(h unsafe.Pointer) *QFormLayout { + return newQFormLayout((*C.QFormLayout)(h)) } // NewQFormLayout constructs a new QFormLayout object. func NewQFormLayout(parent *QWidget) *QFormLayout { - var outptr_QFormLayout *C.QFormLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QFormLayout_new(parent.cPointer(), &outptr_QFormLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQFormLayout(outptr_QFormLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQFormLayout(C.QFormLayout_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQFormLayout2 constructs a new QFormLayout object. func NewQFormLayout2() *QFormLayout { - var outptr_QFormLayout *C.QFormLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QFormLayout_new2(&outptr_QFormLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQFormLayout(outptr_QFormLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQFormLayout(C.QFormLayout_new2()) ret.isSubclass = true return ret } @@ -298,11 +286,11 @@ func (this *QFormLayout) ItemAt(row int, role QFormLayout__ItemRole) *QLayoutIte } func (this *QFormLayout) LabelForField(field *QWidget) *QWidget { - return newQWidget(C.QFormLayout_LabelForField(this.h, field.cPointer()), nil, nil) + return newQWidget(C.QFormLayout_LabelForField(this.h, field.cPointer())) } func (this *QFormLayout) LabelForFieldWithField(field *QLayout) *QWidget { - return newQWidget(C.QFormLayout_LabelForFieldWithField(this.h, field.cPointer()), nil, nil) + return newQWidget(C.QFormLayout_LabelForFieldWithField(this.h, field.cPointer())) } func (this *QFormLayout) AddItem(item *QLayoutItem) { @@ -763,7 +751,7 @@ func miqt_exec_callback_QFormLayout_IndexOf(self *C.QFormLayout, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(param1, nil, nil) + slotval1 := newQWidget(param1) virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_IndexOf, slotval1) @@ -823,7 +811,7 @@ func miqt_exec_callback_QFormLayout_ControlTypes(self *C.QFormLayout, cb C.intpt func (this *QFormLayout) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QFormLayout_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QFormLayout_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QFormLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -866,7 +854,7 @@ func miqt_exec_callback_QFormLayout_ChildEvent(self *C.QFormLayout, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(e, nil) + slotval1 := newQChildEvent(e) gofunc((&QFormLayout{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -910,16 +898,13 @@ func newQFormLayout__TakeRowResult(h *C.QFormLayout__TakeRowResult) *QFormLayout if h == nil { return nil } + return &QFormLayout__TakeRowResult{h: h} } // UnsafeNewQFormLayout__TakeRowResult constructs the type using only unsafe pointers. func UnsafeNewQFormLayout__TakeRowResult(h unsafe.Pointer) *QFormLayout__TakeRowResult { - if h == nil { - return nil - } - - return &QFormLayout__TakeRowResult{h: (*C.QFormLayout__TakeRowResult)(h)} + return newQFormLayout__TakeRowResult((*C.QFormLayout__TakeRowResult)(h)) } // Delete this object from C++ memory. diff --git a/qt/gen_qformlayout.h b/qt/gen_qformlayout.h index d855af7d..19fc681e 100644 --- a/qt/gen_qformlayout.h +++ b/qt/gen_qformlayout.h @@ -42,8 +42,9 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QFormLayout_new(QWidget* parent, QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QFormLayout_new2(QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +QFormLayout* QFormLayout_new(QWidget* parent); +QFormLayout* QFormLayout_new2(); +void QFormLayout_virtbase(QFormLayout* src, QLayout** outptr_QLayout); QMetaObject* QFormLayout_MetaObject(const QFormLayout* self); void* QFormLayout_Metacast(QFormLayout* self, const char* param1); struct miqt_string QFormLayout_Tr(const char* s); diff --git a/qt/gen_qframe.cpp b/qt/gen_qframe.cpp index 53672b51..58084685 100644 --- a/qt/gen_qframe.cpp +++ b/qt/gen_qframe.cpp @@ -1022,28 +1022,20 @@ public: }; -void QFrame_new(QWidget* parent, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFrame* ret = new MiqtVirtualQFrame(parent); - *outptr_QFrame = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFrame* QFrame_new(QWidget* parent) { + return new MiqtVirtualQFrame(parent); } -void QFrame_new2(QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFrame* ret = new MiqtVirtualQFrame(); - *outptr_QFrame = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFrame* QFrame_new2() { + return new MiqtVirtualQFrame(); } -void QFrame_new3(QWidget* parent, int f, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFrame* ret = new MiqtVirtualQFrame(parent, static_cast(f)); - *outptr_QFrame = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFrame* QFrame_new3(QWidget* parent, int f) { + return new MiqtVirtualQFrame(parent, static_cast(f)); +} + +void QFrame_virtbase(QFrame* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QFrame_MetaObject(const QFrame* self) { diff --git a/qt/gen_qframe.go b/qt/gen_qframe.go index 5797b3f8..97742e48 100644 --- a/qt/gen_qframe.go +++ b/qt/gen_qframe.go @@ -62,59 +62,42 @@ func (this *QFrame) UnsafePointer() unsafe.Pointer { } // newQFrame constructs the type using only CGO pointers. -func newQFrame(h *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFrame { +func newQFrame(h *C.QFrame) *QFrame { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QFrame_virtbase(h, &outptr_QWidget) + return &QFrame{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQFrame constructs the type using only unsafe pointers. -func UnsafeNewQFrame(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFrame { - if h == nil { - return nil - } - - return &QFrame{h: (*C.QFrame)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQFrame(h unsafe.Pointer) *QFrame { + return newQFrame((*C.QFrame)(h)) } // NewQFrame constructs a new QFrame object. func NewQFrame(parent *QWidget) *QFrame { - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFrame_new(parent.cPointer(), &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFrame(outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFrame(C.QFrame_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQFrame2 constructs a new QFrame object. func NewQFrame2() *QFrame { - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFrame_new2(&outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFrame(outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFrame(C.QFrame_new2()) ret.isSubclass = true return ret } // NewQFrame3 constructs a new QFrame object. func NewQFrame3(parent *QWidget, f WindowType) *QFrame { - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFrame_new3(parent.cPointer(), (C.int)(f), &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFrame(outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFrame(C.QFrame_new3(parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -326,7 +309,7 @@ func miqt_exec_callback_QFrame_PaintEvent(self *C.QFrame, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QFrame{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -534,7 +517,7 @@ func miqt_exec_callback_QFrame_MousePressEvent(self *C.QFrame, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -560,7 +543,7 @@ func miqt_exec_callback_QFrame_MouseReleaseEvent(self *C.QFrame, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -586,7 +569,7 @@ func miqt_exec_callback_QFrame_MouseDoubleClickEvent(self *C.QFrame, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -612,7 +595,7 @@ func miqt_exec_callback_QFrame_MouseMoveEvent(self *C.QFrame, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -638,7 +621,7 @@ func miqt_exec_callback_QFrame_WheelEvent(self *C.QFrame, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -664,7 +647,7 @@ func miqt_exec_callback_QFrame_KeyPressEvent(self *C.QFrame, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -690,7 +673,7 @@ func miqt_exec_callback_QFrame_KeyReleaseEvent(self *C.QFrame, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -716,7 +699,7 @@ func miqt_exec_callback_QFrame_FocusInEvent(self *C.QFrame, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -742,7 +725,7 @@ func miqt_exec_callback_QFrame_FocusOutEvent(self *C.QFrame, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -820,7 +803,7 @@ func miqt_exec_callback_QFrame_MoveEvent(self *C.QFrame, cb C.intptr_t, event *C } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -846,7 +829,7 @@ func miqt_exec_callback_QFrame_ResizeEvent(self *C.QFrame, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -872,7 +855,7 @@ func miqt_exec_callback_QFrame_CloseEvent(self *C.QFrame, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -898,7 +881,7 @@ func miqt_exec_callback_QFrame_ContextMenuEvent(self *C.QFrame, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -924,7 +907,7 @@ func miqt_exec_callback_QFrame_TabletEvent(self *C.QFrame, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -950,7 +933,7 @@ func miqt_exec_callback_QFrame_ActionEvent(self *C.QFrame, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -976,7 +959,7 @@ func miqt_exec_callback_QFrame_DragEnterEvent(self *C.QFrame, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1002,7 +985,7 @@ func miqt_exec_callback_QFrame_DragMoveEvent(self *C.QFrame, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1028,7 +1011,7 @@ func miqt_exec_callback_QFrame_DragLeaveEvent(self *C.QFrame, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1054,7 +1037,7 @@ func miqt_exec_callback_QFrame_DropEvent(self *C.QFrame, cb C.intptr_t, event *C } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1080,7 +1063,7 @@ func miqt_exec_callback_QFrame_ShowEvent(self *C.QFrame, cb C.intptr_t, event *C } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1106,7 +1089,7 @@ func miqt_exec_callback_QFrame_HideEvent(self *C.QFrame, cb C.intptr_t, event *C } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1276,7 +1259,7 @@ func miqt_exec_callback_QFrame_InputMethodEvent(self *C.QFrame, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QFrame{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qframe.h b/qt/gen_qframe.h index 120e31ed..78332a34 100644 --- a/qt/gen_qframe.h +++ b/qt/gen_qframe.h @@ -78,9 +78,10 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QFrame_new(QWidget* parent, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFrame_new2(QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFrame_new3(QWidget* parent, int f, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QFrame* QFrame_new(QWidget* parent); +QFrame* QFrame_new2(); +QFrame* QFrame_new3(QWidget* parent, int f); +void QFrame_virtbase(QFrame* src, QWidget** outptr_QWidget); QMetaObject* QFrame_MetaObject(const QFrame* self); void* QFrame_Metacast(QFrame* self, const char* param1); struct miqt_string QFrame_Tr(const char* s); diff --git a/qt/gen_qfutureinterface.cpp b/qt/gen_qfutureinterface.cpp index 4c86359f..46dec81b 100644 --- a/qt/gen_qfutureinterface.cpp +++ b/qt/gen_qfutureinterface.cpp @@ -9,19 +9,16 @@ #include "gen_qfutureinterface.h" #include "_cgo_export.h" -void QFutureInterfaceBase_new(QFutureInterfaceBase** outptr_QFutureInterfaceBase) { - QFutureInterfaceBase* ret = new QFutureInterfaceBase(); - *outptr_QFutureInterfaceBase = ret; +QFutureInterfaceBase* QFutureInterfaceBase_new() { + return new QFutureInterfaceBase(); } -void QFutureInterfaceBase_new2(QFutureInterfaceBase* other, QFutureInterfaceBase** outptr_QFutureInterfaceBase) { - QFutureInterfaceBase* ret = new QFutureInterfaceBase(*other); - *outptr_QFutureInterfaceBase = ret; +QFutureInterfaceBase* QFutureInterfaceBase_new2(QFutureInterfaceBase* other) { + return new QFutureInterfaceBase(*other); } -void QFutureInterfaceBase_new3(int initialState, QFutureInterfaceBase** outptr_QFutureInterfaceBase) { - QFutureInterfaceBase* ret = new QFutureInterfaceBase(static_cast(initialState)); - *outptr_QFutureInterfaceBase = ret; +QFutureInterfaceBase* QFutureInterfaceBase_new3(int initialState) { + return new QFutureInterfaceBase(static_cast(initialState)); } void QFutureInterfaceBase_ReportStarted(QFutureInterfaceBase* self) { diff --git a/qt/gen_qfutureinterface.go b/qt/gen_qfutureinterface.go index d3020a1c..8a0ca64f 100644 --- a/qt/gen_qfutureinterface.go +++ b/qt/gen_qfutureinterface.go @@ -49,44 +49,35 @@ func newQFutureInterfaceBase(h *C.QFutureInterfaceBase) *QFutureInterfaceBase { if h == nil { return nil } + return &QFutureInterfaceBase{h: h} } // UnsafeNewQFutureInterfaceBase constructs the type using only unsafe pointers. func UnsafeNewQFutureInterfaceBase(h unsafe.Pointer) *QFutureInterfaceBase { - if h == nil { - return nil - } - - return &QFutureInterfaceBase{h: (*C.QFutureInterfaceBase)(h)} + return newQFutureInterfaceBase((*C.QFutureInterfaceBase)(h)) } // NewQFutureInterfaceBase constructs a new QFutureInterfaceBase object. func NewQFutureInterfaceBase() *QFutureInterfaceBase { - var outptr_QFutureInterfaceBase *C.QFutureInterfaceBase = nil - C.QFutureInterfaceBase_new(&outptr_QFutureInterfaceBase) - ret := newQFutureInterfaceBase(outptr_QFutureInterfaceBase) + ret := newQFutureInterfaceBase(C.QFutureInterfaceBase_new()) ret.isSubclass = true return ret } // NewQFutureInterfaceBase2 constructs a new QFutureInterfaceBase object. func NewQFutureInterfaceBase2(other *QFutureInterfaceBase) *QFutureInterfaceBase { - var outptr_QFutureInterfaceBase *C.QFutureInterfaceBase = nil - C.QFutureInterfaceBase_new2(other.cPointer(), &outptr_QFutureInterfaceBase) - ret := newQFutureInterfaceBase(outptr_QFutureInterfaceBase) + ret := newQFutureInterfaceBase(C.QFutureInterfaceBase_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQFutureInterfaceBase3 constructs a new QFutureInterfaceBase object. func NewQFutureInterfaceBase3(initialState QFutureInterfaceBase__State) *QFutureInterfaceBase { - var outptr_QFutureInterfaceBase *C.QFutureInterfaceBase = nil - C.QFutureInterfaceBase_new3((C.int)(initialState), &outptr_QFutureInterfaceBase) - ret := newQFutureInterfaceBase(outptr_QFutureInterfaceBase) + ret := newQFutureInterfaceBase(C.QFutureInterfaceBase_new3((C.int)(initialState))) ret.isSubclass = true return ret } @@ -235,11 +226,11 @@ func (this *QFutureInterfaceBase) WaitForResume() { } func (this *QFutureInterfaceBase) Mutex() *QMutex { - return newQMutex(C.QFutureInterfaceBase_Mutex(this.h), nil) + return newQMutex(C.QFutureInterfaceBase_Mutex(this.h)) } func (this *QFutureInterfaceBase) MutexWithInt(param1 int) *QMutex { - return newQMutex(C.QFutureInterfaceBase_MutexWithInt(this.h, (C.int)(param1)), nil) + return newQMutex(C.QFutureInterfaceBase_MutexWithInt(this.h, (C.int)(param1))) } func (this *QFutureInterfaceBase) OperatorEqual(other *QFutureInterfaceBase) bool { diff --git a/qt/gen_qfutureinterface.h b/qt/gen_qfutureinterface.h index 4df9844d..ec327fd4 100644 --- a/qt/gen_qfutureinterface.h +++ b/qt/gen_qfutureinterface.h @@ -26,9 +26,9 @@ typedef struct QRunnable QRunnable; typedef struct QThreadPool QThreadPool; #endif -void QFutureInterfaceBase_new(QFutureInterfaceBase** outptr_QFutureInterfaceBase); -void QFutureInterfaceBase_new2(QFutureInterfaceBase* other, QFutureInterfaceBase** outptr_QFutureInterfaceBase); -void QFutureInterfaceBase_new3(int initialState, QFutureInterfaceBase** outptr_QFutureInterfaceBase); +QFutureInterfaceBase* QFutureInterfaceBase_new(); +QFutureInterfaceBase* QFutureInterfaceBase_new2(QFutureInterfaceBase* other); +QFutureInterfaceBase* QFutureInterfaceBase_new3(int initialState); void QFutureInterfaceBase_ReportStarted(QFutureInterfaceBase* self); void QFutureInterfaceBase_ReportFinished(QFutureInterfaceBase* self); void QFutureInterfaceBase_ReportCanceled(QFutureInterfaceBase* self); diff --git a/qt/gen_qfuturewatcher.cpp b/qt/gen_qfuturewatcher.cpp index 8f00a1f6..55ea715b 100644 --- a/qt/gen_qfuturewatcher.cpp +++ b/qt/gen_qfuturewatcher.cpp @@ -10,6 +10,10 @@ #include "gen_qfuturewatcher.h" #include "_cgo_export.h" +void QFutureWatcherBase_virtbase(QFutureWatcherBase* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QFutureWatcherBase_MetaObject(const QFutureWatcherBase* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/gen_qfuturewatcher.go b/qt/gen_qfuturewatcher.go index cf4c570f..b162d1a8 100644 --- a/qt/gen_qfuturewatcher.go +++ b/qt/gen_qfuturewatcher.go @@ -35,22 +35,20 @@ func (this *QFutureWatcherBase) UnsafePointer() unsafe.Pointer { } // newQFutureWatcherBase constructs the type using only CGO pointers. -func newQFutureWatcherBase(h *C.QFutureWatcherBase, h_QObject *C.QObject) *QFutureWatcherBase { +func newQFutureWatcherBase(h *C.QFutureWatcherBase) *QFutureWatcherBase { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QFutureWatcherBase_virtbase(h, &outptr_QObject) + return &QFutureWatcherBase{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQFutureWatcherBase constructs the type using only unsafe pointers. -func UnsafeNewQFutureWatcherBase(h unsafe.Pointer, h_QObject unsafe.Pointer) *QFutureWatcherBase { - if h == nil { - return nil - } - - return &QFutureWatcherBase{h: (*C.QFutureWatcherBase)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQFutureWatcherBase(h unsafe.Pointer) *QFutureWatcherBase { + return newQFutureWatcherBase((*C.QFutureWatcherBase)(h)) } func (this *QFutureWatcherBase) MetaObject() *QMetaObject { diff --git a/qt/gen_qfuturewatcher.h b/qt/gen_qfuturewatcher.h index baa931ca..5bb755a1 100644 --- a/qt/gen_qfuturewatcher.h +++ b/qt/gen_qfuturewatcher.h @@ -28,6 +28,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QFutureWatcherBase_virtbase(QFutureWatcherBase* src, QObject** outptr_QObject); QMetaObject* QFutureWatcherBase_MetaObject(const QFutureWatcherBase* self); void* QFutureWatcherBase_Metacast(QFutureWatcherBase* self, const char* param1); struct miqt_string QFutureWatcherBase_Tr(const char* s); diff --git a/qt/gen_qgenericplugin.cpp b/qt/gen_qgenericplugin.cpp index e4312a87..561dccc3 100644 --- a/qt/gen_qgenericplugin.cpp +++ b/qt/gen_qgenericplugin.cpp @@ -224,16 +224,16 @@ public: }; -void QGenericPlugin_new(QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject) { - MiqtVirtualQGenericPlugin* ret = new MiqtVirtualQGenericPlugin(); - *outptr_QGenericPlugin = ret; - *outptr_QObject = static_cast(ret); +QGenericPlugin* QGenericPlugin_new() { + return new MiqtVirtualQGenericPlugin(); } -void QGenericPlugin_new2(QObject* parent, QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject) { - MiqtVirtualQGenericPlugin* ret = new MiqtVirtualQGenericPlugin(parent); - *outptr_QGenericPlugin = ret; - *outptr_QObject = static_cast(ret); +QGenericPlugin* QGenericPlugin_new2(QObject* parent) { + return new MiqtVirtualQGenericPlugin(parent); +} + +void QGenericPlugin_virtbase(QGenericPlugin* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QGenericPlugin_MetaObject(const QGenericPlugin* self) { diff --git a/qt/gen_qgenericplugin.go b/qt/gen_qgenericplugin.go index 4207c393..4788773c 100644 --- a/qt/gen_qgenericplugin.go +++ b/qt/gen_qgenericplugin.go @@ -35,42 +35,34 @@ func (this *QGenericPlugin) UnsafePointer() unsafe.Pointer { } // newQGenericPlugin constructs the type using only CGO pointers. -func newQGenericPlugin(h *C.QGenericPlugin, h_QObject *C.QObject) *QGenericPlugin { +func newQGenericPlugin(h *C.QGenericPlugin) *QGenericPlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QGenericPlugin_virtbase(h, &outptr_QObject) + return &QGenericPlugin{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQGenericPlugin constructs the type using only unsafe pointers. -func UnsafeNewQGenericPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGenericPlugin { - if h == nil { - return nil - } - - return &QGenericPlugin{h: (*C.QGenericPlugin)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQGenericPlugin(h unsafe.Pointer) *QGenericPlugin { + return newQGenericPlugin((*C.QGenericPlugin)(h)) } // NewQGenericPlugin constructs a new QGenericPlugin object. func NewQGenericPlugin() *QGenericPlugin { - var outptr_QGenericPlugin *C.QGenericPlugin = nil - var outptr_QObject *C.QObject = nil - C.QGenericPlugin_new(&outptr_QGenericPlugin, &outptr_QObject) - ret := newQGenericPlugin(outptr_QGenericPlugin, outptr_QObject) + ret := newQGenericPlugin(C.QGenericPlugin_new()) ret.isSubclass = true return ret } // NewQGenericPlugin2 constructs a new QGenericPlugin object. func NewQGenericPlugin2(parent *QObject) *QGenericPlugin { - var outptr_QGenericPlugin *C.QGenericPlugin = nil - var outptr_QObject *C.QObject = nil - C.QGenericPlugin_new2(parent.cPointer(), &outptr_QGenericPlugin, &outptr_QObject) - ret := newQGenericPlugin(outptr_QGenericPlugin, outptr_QObject) + ret := newQGenericPlugin(C.QGenericPlugin_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -266,7 +258,7 @@ func miqt_exec_callback_QGenericPlugin_TimerEvent(self *C.QGenericPlugin, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QGenericPlugin{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -292,7 +284,7 @@ func miqt_exec_callback_QGenericPlugin_ChildEvent(self *C.QGenericPlugin, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGenericPlugin{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qgenericplugin.h b/qt/gen_qgenericplugin.h index 812f4847..7e6a5465 100644 --- a/qt/gen_qgenericplugin.h +++ b/qt/gen_qgenericplugin.h @@ -32,8 +32,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QGenericPlugin_new(QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject); -void QGenericPlugin_new2(QObject* parent, QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject); +QGenericPlugin* QGenericPlugin_new(); +QGenericPlugin* QGenericPlugin_new2(QObject* parent); +void QGenericPlugin_virtbase(QGenericPlugin* src, QObject** outptr_QObject); QMetaObject* QGenericPlugin_MetaObject(const QGenericPlugin* self); void* QGenericPlugin_Metacast(QGenericPlugin* self, const char* param1); struct miqt_string QGenericPlugin_Tr(const char* s); diff --git a/qt/gen_qgenericpluginfactory.go b/qt/gen_qgenericpluginfactory.go index b30279a4..7ad69cd1 100644 --- a/qt/gen_qgenericpluginfactory.go +++ b/qt/gen_qgenericpluginfactory.go @@ -37,16 +37,13 @@ func newQGenericPluginFactory(h *C.QGenericPluginFactory) *QGenericPluginFactory if h == nil { return nil } + return &QGenericPluginFactory{h: h} } // UnsafeNewQGenericPluginFactory constructs the type using only unsafe pointers. func UnsafeNewQGenericPluginFactory(h unsafe.Pointer) *QGenericPluginFactory { - if h == nil { - return nil - } - - return &QGenericPluginFactory{h: (*C.QGenericPluginFactory)(h)} + return newQGenericPluginFactory((*C.QGenericPluginFactory)(h)) } func QGenericPluginFactory_Keys() []string { diff --git a/qt/gen_qgesture.cpp b/qt/gen_qgesture.cpp index 7e56e4e3..caa85555 100644 --- a/qt/gen_qgesture.cpp +++ b/qt/gen_qgesture.cpp @@ -202,16 +202,16 @@ public: }; -void QGesture_new(QGesture** outptr_QGesture, QObject** outptr_QObject) { - MiqtVirtualQGesture* ret = new MiqtVirtualQGesture(); - *outptr_QGesture = ret; - *outptr_QObject = static_cast(ret); +QGesture* QGesture_new() { + return new MiqtVirtualQGesture(); } -void QGesture_new2(QObject* parent, QGesture** outptr_QGesture, QObject** outptr_QObject) { - MiqtVirtualQGesture* ret = new MiqtVirtualQGesture(parent); - *outptr_QGesture = ret; - *outptr_QObject = static_cast(ret); +QGesture* QGesture_new2(QObject* parent) { + return new MiqtVirtualQGesture(parent); +} + +void QGesture_virtbase(QGesture* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QGesture_MetaObject(const QGesture* self) { @@ -387,18 +387,16 @@ void QGesture_Delete(QGesture* self, bool isSubclass) { } } -void QPanGesture_new(QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QPanGesture* ret = new QPanGesture(); - *outptr_QPanGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPanGesture* QPanGesture_new() { + return new QPanGesture(); } -void QPanGesture_new2(QObject* parent, QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QPanGesture* ret = new QPanGesture(parent); - *outptr_QPanGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPanGesture* QPanGesture_new2(QObject* parent) { + return new QPanGesture(parent); +} + +void QPanGesture_virtbase(QPanGesture* src, QGesture** outptr_QGesture) { + *outptr_QGesture = static_cast(src); } QMetaObject* QPanGesture_MetaObject(const QPanGesture* self) { @@ -512,18 +510,16 @@ void QPanGesture_Delete(QPanGesture* self, bool isSubclass) { } } -void QPinchGesture_new(QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QPinchGesture* ret = new QPinchGesture(); - *outptr_QPinchGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPinchGesture* QPinchGesture_new() { + return new QPinchGesture(); } -void QPinchGesture_new2(QObject* parent, QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QPinchGesture* ret = new QPinchGesture(parent); - *outptr_QPinchGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPinchGesture* QPinchGesture_new2(QObject* parent) { + return new QPinchGesture(parent); +} + +void QPinchGesture_virtbase(QPinchGesture* src, QGesture** outptr_QGesture) { + *outptr_QGesture = static_cast(src); } QMetaObject* QPinchGesture_MetaObject(const QPinchGesture* self) { @@ -704,18 +700,16 @@ void QPinchGesture_Delete(QPinchGesture* self, bool isSubclass) { } } -void QSwipeGesture_new(QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QSwipeGesture* ret = new QSwipeGesture(); - *outptr_QSwipeGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSwipeGesture* QSwipeGesture_new() { + return new QSwipeGesture(); } -void QSwipeGesture_new2(QObject* parent, QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QSwipeGesture* ret = new QSwipeGesture(parent); - *outptr_QSwipeGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSwipeGesture* QSwipeGesture_new2(QObject* parent) { + return new QSwipeGesture(parent); +} + +void QSwipeGesture_virtbase(QSwipeGesture* src, QGesture** outptr_QGesture) { + *outptr_QGesture = static_cast(src); } QMetaObject* QSwipeGesture_MetaObject(const QSwipeGesture* self) { @@ -819,18 +813,16 @@ void QSwipeGesture_Delete(QSwipeGesture* self, bool isSubclass) { } } -void QTapGesture_new(QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QTapGesture* ret = new QTapGesture(); - *outptr_QTapGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTapGesture* QTapGesture_new() { + return new QTapGesture(); } -void QTapGesture_new2(QObject* parent, QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QTapGesture* ret = new QTapGesture(parent); - *outptr_QTapGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTapGesture* QTapGesture_new2(QObject* parent) { + return new QTapGesture(parent); +} + +void QTapGesture_virtbase(QTapGesture* src, QGesture** outptr_QGesture) { + *outptr_QGesture = static_cast(src); } QMetaObject* QTapGesture_MetaObject(const QTapGesture* self) { @@ -923,18 +915,16 @@ void QTapGesture_Delete(QTapGesture* self, bool isSubclass) { } } -void QTapAndHoldGesture_new(QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QTapAndHoldGesture* ret = new QTapAndHoldGesture(); - *outptr_QTapAndHoldGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTapAndHoldGesture* QTapAndHoldGesture_new() { + return new QTapAndHoldGesture(); } -void QTapAndHoldGesture_new2(QObject* parent, QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QTapAndHoldGesture* ret = new QTapAndHoldGesture(parent); - *outptr_QTapAndHoldGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTapAndHoldGesture* QTapAndHoldGesture_new2(QObject* parent) { + return new QTapAndHoldGesture(parent); +} + +void QTapAndHoldGesture_virtbase(QTapAndHoldGesture* src, QGesture** outptr_QGesture) { + *outptr_QGesture = static_cast(src); } QMetaObject* QTapAndHoldGesture_MetaObject(const QTapAndHoldGesture* self) { @@ -1035,22 +1025,22 @@ void QTapAndHoldGesture_Delete(QTapAndHoldGesture* self, bool isSubclass) { } } -void QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent) { +QGestureEvent* QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures) { QList gestures_QList; gestures_QList.reserve(gestures.len); QGesture** gestures_arr = static_cast(gestures.data); for(size_t i = 0; i < gestures.len; ++i) { gestures_QList.push_back(gestures_arr[i]); } - QGestureEvent* ret = new QGestureEvent(gestures_QList); - *outptr_QGestureEvent = ret; - *outptr_QEvent = static_cast(ret); + return new QGestureEvent(gestures_QList); } -void QGestureEvent_new2(QGestureEvent* param1, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent) { - QGestureEvent* ret = new QGestureEvent(*param1); - *outptr_QGestureEvent = ret; - *outptr_QEvent = static_cast(ret); +QGestureEvent* QGestureEvent_new2(QGestureEvent* param1) { + return new QGestureEvent(*param1); +} + +void QGestureEvent_virtbase(QGestureEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } struct miqt_array /* of QGesture* */ QGestureEvent_Gestures(const QGestureEvent* self) { diff --git a/qt/gen_qgesture.go b/qt/gen_qgesture.go index dc98415b..b16233b2 100644 --- a/qt/gen_qgesture.go +++ b/qt/gen_qgesture.go @@ -60,42 +60,34 @@ func (this *QGesture) UnsafePointer() unsafe.Pointer { } // newQGesture constructs the type using only CGO pointers. -func newQGesture(h *C.QGesture, h_QObject *C.QObject) *QGesture { +func newQGesture(h *C.QGesture) *QGesture { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QGesture_virtbase(h, &outptr_QObject) + return &QGesture{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQGesture constructs the type using only unsafe pointers. -func UnsafeNewQGesture(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGesture { - if h == nil { - return nil - } - - return &QGesture{h: (*C.QGesture)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQGesture(h unsafe.Pointer) *QGesture { + return newQGesture((*C.QGesture)(h)) } // NewQGesture constructs a new QGesture object. func NewQGesture() *QGesture { - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QGesture_new(&outptr_QGesture, &outptr_QObject) - ret := newQGesture(outptr_QGesture, outptr_QObject) + ret := newQGesture(C.QGesture_new()) ret.isSubclass = true return ret } // NewQGesture2 constructs a new QGesture object. func NewQGesture2(parent *QObject) *QGesture { - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QGesture_new2(parent.cPointer(), &outptr_QGesture, &outptr_QObject) - ret := newQGesture(outptr_QGesture, outptr_QObject) + ret := newQGesture(C.QGesture_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -284,7 +276,7 @@ func miqt_exec_callback_QGesture_TimerEvent(self *C.QGesture, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QGesture{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -310,7 +302,7 @@ func miqt_exec_callback_QGesture_ChildEvent(self *C.QGesture, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGesture{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -429,44 +421,34 @@ func (this *QPanGesture) UnsafePointer() unsafe.Pointer { } // newQPanGesture constructs the type using only CGO pointers. -func newQPanGesture(h *C.QPanGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QPanGesture { +func newQPanGesture(h *C.QPanGesture) *QPanGesture { if h == nil { return nil } + var outptr_QGesture *C.QGesture = nil + C.QPanGesture_virtbase(h, &outptr_QGesture) + return &QPanGesture{h: h, - QGesture: newQGesture(h_QGesture, h_QObject)} + QGesture: newQGesture(outptr_QGesture)} } // UnsafeNewQPanGesture constructs the type using only unsafe pointers. -func UnsafeNewQPanGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QPanGesture { - if h == nil { - return nil - } - - return &QPanGesture{h: (*C.QPanGesture)(h), - QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} +func UnsafeNewQPanGesture(h unsafe.Pointer) *QPanGesture { + return newQPanGesture((*C.QPanGesture)(h)) } // NewQPanGesture constructs a new QPanGesture object. func NewQPanGesture() *QPanGesture { - var outptr_QPanGesture *C.QPanGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QPanGesture_new(&outptr_QPanGesture, &outptr_QGesture, &outptr_QObject) - ret := newQPanGesture(outptr_QPanGesture, outptr_QGesture, outptr_QObject) + ret := newQPanGesture(C.QPanGesture_new()) ret.isSubclass = true return ret } // NewQPanGesture2 constructs a new QPanGesture object. func NewQPanGesture2(parent *QObject) *QPanGesture { - var outptr_QPanGesture *C.QPanGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QPanGesture_new2(parent.cPointer(), &outptr_QPanGesture, &outptr_QGesture, &outptr_QObject) - ret := newQPanGesture(outptr_QPanGesture, outptr_QGesture, outptr_QObject) + ret := newQPanGesture(C.QPanGesture_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -612,44 +594,34 @@ func (this *QPinchGesture) UnsafePointer() unsafe.Pointer { } // newQPinchGesture constructs the type using only CGO pointers. -func newQPinchGesture(h *C.QPinchGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QPinchGesture { +func newQPinchGesture(h *C.QPinchGesture) *QPinchGesture { if h == nil { return nil } + var outptr_QGesture *C.QGesture = nil + C.QPinchGesture_virtbase(h, &outptr_QGesture) + return &QPinchGesture{h: h, - QGesture: newQGesture(h_QGesture, h_QObject)} + QGesture: newQGesture(outptr_QGesture)} } // UnsafeNewQPinchGesture constructs the type using only unsafe pointers. -func UnsafeNewQPinchGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QPinchGesture { - if h == nil { - return nil - } - - return &QPinchGesture{h: (*C.QPinchGesture)(h), - QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} +func UnsafeNewQPinchGesture(h unsafe.Pointer) *QPinchGesture { + return newQPinchGesture((*C.QPinchGesture)(h)) } // NewQPinchGesture constructs a new QPinchGesture object. func NewQPinchGesture() *QPinchGesture { - var outptr_QPinchGesture *C.QPinchGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QPinchGesture_new(&outptr_QPinchGesture, &outptr_QGesture, &outptr_QObject) - ret := newQPinchGesture(outptr_QPinchGesture, outptr_QGesture, outptr_QObject) + ret := newQPinchGesture(C.QPinchGesture_new()) ret.isSubclass = true return ret } // NewQPinchGesture2 constructs a new QPinchGesture object. func NewQPinchGesture2(parent *QObject) *QPinchGesture { - var outptr_QPinchGesture *C.QPinchGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QPinchGesture_new2(parent.cPointer(), &outptr_QPinchGesture, &outptr_QGesture, &outptr_QObject) - ret := newQPinchGesture(outptr_QPinchGesture, outptr_QGesture, outptr_QObject) + ret := newQPinchGesture(C.QPinchGesture_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -855,44 +827,34 @@ func (this *QSwipeGesture) UnsafePointer() unsafe.Pointer { } // newQSwipeGesture constructs the type using only CGO pointers. -func newQSwipeGesture(h *C.QSwipeGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QSwipeGesture { +func newQSwipeGesture(h *C.QSwipeGesture) *QSwipeGesture { if h == nil { return nil } + var outptr_QGesture *C.QGesture = nil + C.QSwipeGesture_virtbase(h, &outptr_QGesture) + return &QSwipeGesture{h: h, - QGesture: newQGesture(h_QGesture, h_QObject)} + QGesture: newQGesture(outptr_QGesture)} } // UnsafeNewQSwipeGesture constructs the type using only unsafe pointers. -func UnsafeNewQSwipeGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QSwipeGesture { - if h == nil { - return nil - } - - return &QSwipeGesture{h: (*C.QSwipeGesture)(h), - QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} +func UnsafeNewQSwipeGesture(h unsafe.Pointer) *QSwipeGesture { + return newQSwipeGesture((*C.QSwipeGesture)(h)) } // NewQSwipeGesture constructs a new QSwipeGesture object. func NewQSwipeGesture() *QSwipeGesture { - var outptr_QSwipeGesture *C.QSwipeGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QSwipeGesture_new(&outptr_QSwipeGesture, &outptr_QGesture, &outptr_QObject) - ret := newQSwipeGesture(outptr_QSwipeGesture, outptr_QGesture, outptr_QObject) + ret := newQSwipeGesture(C.QSwipeGesture_new()) ret.isSubclass = true return ret } // NewQSwipeGesture2 constructs a new QSwipeGesture object. func NewQSwipeGesture2(parent *QObject) *QSwipeGesture { - var outptr_QSwipeGesture *C.QSwipeGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QSwipeGesture_new2(parent.cPointer(), &outptr_QSwipeGesture, &outptr_QGesture, &outptr_QObject) - ret := newQSwipeGesture(outptr_QSwipeGesture, outptr_QGesture, outptr_QObject) + ret := newQSwipeGesture(C.QSwipeGesture_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -1020,44 +982,34 @@ func (this *QTapGesture) UnsafePointer() unsafe.Pointer { } // newQTapGesture constructs the type using only CGO pointers. -func newQTapGesture(h *C.QTapGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QTapGesture { +func newQTapGesture(h *C.QTapGesture) *QTapGesture { if h == nil { return nil } + var outptr_QGesture *C.QGesture = nil + C.QTapGesture_virtbase(h, &outptr_QGesture) + return &QTapGesture{h: h, - QGesture: newQGesture(h_QGesture, h_QObject)} + QGesture: newQGesture(outptr_QGesture)} } // UnsafeNewQTapGesture constructs the type using only unsafe pointers. -func UnsafeNewQTapGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QTapGesture { - if h == nil { - return nil - } - - return &QTapGesture{h: (*C.QTapGesture)(h), - QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} +func UnsafeNewQTapGesture(h unsafe.Pointer) *QTapGesture { + return newQTapGesture((*C.QTapGesture)(h)) } // NewQTapGesture constructs a new QTapGesture object. func NewQTapGesture() *QTapGesture { - var outptr_QTapGesture *C.QTapGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QTapGesture_new(&outptr_QTapGesture, &outptr_QGesture, &outptr_QObject) - ret := newQTapGesture(outptr_QTapGesture, outptr_QGesture, outptr_QObject) + ret := newQTapGesture(C.QTapGesture_new()) ret.isSubclass = true return ret } // NewQTapGesture2 constructs a new QTapGesture object. func NewQTapGesture2(parent *QObject) *QTapGesture { - var outptr_QTapGesture *C.QTapGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QTapGesture_new2(parent.cPointer(), &outptr_QTapGesture, &outptr_QGesture, &outptr_QObject) - ret := newQTapGesture(outptr_QTapGesture, outptr_QGesture, outptr_QObject) + ret := newQTapGesture(C.QTapGesture_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -1179,44 +1131,34 @@ func (this *QTapAndHoldGesture) UnsafePointer() unsafe.Pointer { } // newQTapAndHoldGesture constructs the type using only CGO pointers. -func newQTapAndHoldGesture(h *C.QTapAndHoldGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QTapAndHoldGesture { +func newQTapAndHoldGesture(h *C.QTapAndHoldGesture) *QTapAndHoldGesture { if h == nil { return nil } + var outptr_QGesture *C.QGesture = nil + C.QTapAndHoldGesture_virtbase(h, &outptr_QGesture) + return &QTapAndHoldGesture{h: h, - QGesture: newQGesture(h_QGesture, h_QObject)} + QGesture: newQGesture(outptr_QGesture)} } // UnsafeNewQTapAndHoldGesture constructs the type using only unsafe pointers. -func UnsafeNewQTapAndHoldGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QTapAndHoldGesture { - if h == nil { - return nil - } - - return &QTapAndHoldGesture{h: (*C.QTapAndHoldGesture)(h), - QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} +func UnsafeNewQTapAndHoldGesture(h unsafe.Pointer) *QTapAndHoldGesture { + return newQTapAndHoldGesture((*C.QTapAndHoldGesture)(h)) } // NewQTapAndHoldGesture constructs a new QTapAndHoldGesture object. func NewQTapAndHoldGesture() *QTapAndHoldGesture { - var outptr_QTapAndHoldGesture *C.QTapAndHoldGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QTapAndHoldGesture_new(&outptr_QTapAndHoldGesture, &outptr_QGesture, &outptr_QObject) - ret := newQTapAndHoldGesture(outptr_QTapAndHoldGesture, outptr_QGesture, outptr_QObject) + ret := newQTapAndHoldGesture(C.QTapAndHoldGesture_new()) ret.isSubclass = true return ret } // NewQTapAndHoldGesture2 constructs a new QTapAndHoldGesture object. func NewQTapAndHoldGesture2(parent *QObject) *QTapAndHoldGesture { - var outptr_QTapAndHoldGesture *C.QTapAndHoldGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QTapAndHoldGesture_new2(parent.cPointer(), &outptr_QTapAndHoldGesture, &outptr_QGesture, &outptr_QObject) - ret := newQTapAndHoldGesture(outptr_QTapAndHoldGesture, outptr_QGesture, outptr_QObject) + ret := newQTapAndHoldGesture(C.QTapAndHoldGesture_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -1346,22 +1288,20 @@ func (this *QGestureEvent) UnsafePointer() unsafe.Pointer { } // newQGestureEvent constructs the type using only CGO pointers. -func newQGestureEvent(h *C.QGestureEvent, h_QEvent *C.QEvent) *QGestureEvent { +func newQGestureEvent(h *C.QGestureEvent) *QGestureEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QGestureEvent_virtbase(h, &outptr_QEvent) + return &QGestureEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQGestureEvent constructs the type using only unsafe pointers. -func UnsafeNewQGestureEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QGestureEvent { - if h == nil { - return nil - } - - return &QGestureEvent{h: (*C.QGestureEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQGestureEvent(h unsafe.Pointer) *QGestureEvent { + return newQGestureEvent((*C.QGestureEvent)(h)) } // NewQGestureEvent constructs a new QGestureEvent object. @@ -1372,22 +1312,16 @@ func NewQGestureEvent(gestures []*QGesture) *QGestureEvent { gestures_CArray[i] = gestures[i].cPointer() } gestures_ma := C.struct_miqt_array{len: C.size_t(len(gestures)), data: unsafe.Pointer(gestures_CArray)} - var outptr_QGestureEvent *C.QGestureEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGestureEvent_new(gestures_ma, &outptr_QGestureEvent, &outptr_QEvent) - ret := newQGestureEvent(outptr_QGestureEvent, outptr_QEvent) + ret := newQGestureEvent(C.QGestureEvent_new(gestures_ma)) ret.isSubclass = true return ret } // NewQGestureEvent2 constructs a new QGestureEvent object. func NewQGestureEvent2(param1 *QGestureEvent) *QGestureEvent { - var outptr_QGestureEvent *C.QGestureEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGestureEvent_new2(param1.cPointer(), &outptr_QGestureEvent, &outptr_QEvent) - ret := newQGestureEvent(outptr_QGestureEvent, outptr_QEvent) + ret := newQGestureEvent(C.QGestureEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1397,13 +1331,13 @@ func (this *QGestureEvent) Gestures() []*QGesture { _ret := make([]*QGesture, int(_ma.len)) _outCast := (*[0xffff]*C.QGesture)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQGesture(_outCast[i], nil) + _ret[i] = newQGesture(_outCast[i]) } return _ret } func (this *QGestureEvent) Gesture(typeVal GestureType) *QGesture { - return newQGesture(C.QGestureEvent_Gesture(this.h, (C.int)(typeVal)), nil) + return newQGesture(C.QGestureEvent_Gesture(this.h, (C.int)(typeVal))) } func (this *QGestureEvent) ActiveGestures() []*QGesture { @@ -1411,7 +1345,7 @@ func (this *QGestureEvent) ActiveGestures() []*QGesture { _ret := make([]*QGesture, int(_ma.len)) _outCast := (*[0xffff]*C.QGesture)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQGesture(_outCast[i], nil) + _ret[i] = newQGesture(_outCast[i]) } return _ret } @@ -1421,7 +1355,7 @@ func (this *QGestureEvent) CanceledGestures() []*QGesture { _ret := make([]*QGesture, int(_ma.len)) _outCast := (*[0xffff]*C.QGesture)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQGesture(_outCast[i], nil) + _ret[i] = newQGesture(_outCast[i]) } return _ret } @@ -1463,7 +1397,7 @@ func (this *QGestureEvent) SetWidget(widget *QWidget) { } func (this *QGestureEvent) Widget() *QWidget { - return newQWidget(C.QGestureEvent_Widget(this.h), nil, nil) + return newQWidget(C.QGestureEvent_Widget(this.h)) } func (this *QGestureEvent) MapToGraphicsScene(gesturePoint *QPointF) *QPointF { diff --git a/qt/gen_qgesture.h b/qt/gen_qgesture.h index 664d62e9..7007b294 100644 --- a/qt/gen_qgesture.h +++ b/qt/gen_qgesture.h @@ -48,8 +48,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QGesture_new(QGesture** outptr_QGesture, QObject** outptr_QObject); -void QGesture_new2(QObject* parent, QGesture** outptr_QGesture, QObject** outptr_QObject); +QGesture* QGesture_new(); +QGesture* QGesture_new2(QObject* parent); +void QGesture_virtbase(QGesture* src, QObject** outptr_QObject); QMetaObject* QGesture_MetaObject(const QGesture* self); void* QGesture_Metacast(QGesture* self, const char* param1); struct miqt_string QGesture_Tr(const char* s); @@ -82,8 +83,9 @@ void QGesture_override_virtual_DisconnectNotify(void* self, intptr_t slot); void QGesture_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QGesture_Delete(QGesture* self, bool isSubclass); -void QPanGesture_new(QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); -void QPanGesture_new2(QObject* parent, QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +QPanGesture* QPanGesture_new(); +QPanGesture* QPanGesture_new2(QObject* parent); +void QPanGesture_virtbase(QPanGesture* src, QGesture** outptr_QGesture); QMetaObject* QPanGesture_MetaObject(const QPanGesture* self); void* QPanGesture_Metacast(QPanGesture* self, const char* param1); struct miqt_string QPanGesture_Tr(const char* s); @@ -101,8 +103,9 @@ struct miqt_string QPanGesture_TrUtf82(const char* s, const char* c); struct miqt_string QPanGesture_TrUtf83(const char* s, const char* c, int n); void QPanGesture_Delete(QPanGesture* self, bool isSubclass); -void QPinchGesture_new(QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); -void QPinchGesture_new2(QObject* parent, QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +QPinchGesture* QPinchGesture_new(); +QPinchGesture* QPinchGesture_new2(QObject* parent); +void QPinchGesture_virtbase(QPinchGesture* src, QGesture** outptr_QGesture); QMetaObject* QPinchGesture_MetaObject(const QPinchGesture* self); void* QPinchGesture_Metacast(QPinchGesture* self, const char* param1); struct miqt_string QPinchGesture_Tr(const char* s); @@ -135,8 +138,9 @@ struct miqt_string QPinchGesture_TrUtf82(const char* s, const char* c); struct miqt_string QPinchGesture_TrUtf83(const char* s, const char* c, int n); void QPinchGesture_Delete(QPinchGesture* self, bool isSubclass); -void QSwipeGesture_new(QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); -void QSwipeGesture_new2(QObject* parent, QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +QSwipeGesture* QSwipeGesture_new(); +QSwipeGesture* QSwipeGesture_new2(QObject* parent); +void QSwipeGesture_virtbase(QSwipeGesture* src, QGesture** outptr_QGesture); QMetaObject* QSwipeGesture_MetaObject(const QSwipeGesture* self); void* QSwipeGesture_Metacast(QSwipeGesture* self, const char* param1); struct miqt_string QSwipeGesture_Tr(const char* s); @@ -151,8 +155,9 @@ struct miqt_string QSwipeGesture_TrUtf82(const char* s, const char* c); struct miqt_string QSwipeGesture_TrUtf83(const char* s, const char* c, int n); void QSwipeGesture_Delete(QSwipeGesture* self, bool isSubclass); -void QTapGesture_new(QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); -void QTapGesture_new2(QObject* parent, QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +QTapGesture* QTapGesture_new(); +QTapGesture* QTapGesture_new2(QObject* parent); +void QTapGesture_virtbase(QTapGesture* src, QGesture** outptr_QGesture); QMetaObject* QTapGesture_MetaObject(const QTapGesture* self); void* QTapGesture_Metacast(QTapGesture* self, const char* param1); struct miqt_string QTapGesture_Tr(const char* s); @@ -165,8 +170,9 @@ struct miqt_string QTapGesture_TrUtf82(const char* s, const char* c); struct miqt_string QTapGesture_TrUtf83(const char* s, const char* c, int n); void QTapGesture_Delete(QTapGesture* self, bool isSubclass); -void QTapAndHoldGesture_new(QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); -void QTapAndHoldGesture_new2(QObject* parent, QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +QTapAndHoldGesture* QTapAndHoldGesture_new(); +QTapAndHoldGesture* QTapAndHoldGesture_new2(QObject* parent); +void QTapAndHoldGesture_virtbase(QTapAndHoldGesture* src, QGesture** outptr_QGesture); QMetaObject* QTapAndHoldGesture_MetaObject(const QTapAndHoldGesture* self); void* QTapAndHoldGesture_Metacast(QTapAndHoldGesture* self, const char* param1); struct miqt_string QTapAndHoldGesture_Tr(const char* s); @@ -181,8 +187,9 @@ struct miqt_string QTapAndHoldGesture_TrUtf82(const char* s, const char* c); struct miqt_string QTapAndHoldGesture_TrUtf83(const char* s, const char* c, int n); void QTapAndHoldGesture_Delete(QTapAndHoldGesture* self, bool isSubclass); -void QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent); -void QGestureEvent_new2(QGestureEvent* param1, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent); +QGestureEvent* QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures); +QGestureEvent* QGestureEvent_new2(QGestureEvent* param1); +void QGestureEvent_virtbase(QGestureEvent* src, QEvent** outptr_QEvent); struct miqt_array /* of QGesture* */ QGestureEvent_Gestures(const QGestureEvent* self); QGesture* QGestureEvent_Gesture(const QGestureEvent* self, int typeVal); struct miqt_array /* of QGesture* */ QGestureEvent_ActiveGestures(const QGestureEvent* self); diff --git a/qt/gen_qgesturerecognizer.cpp b/qt/gen_qgesturerecognizer.cpp index 61a64702..821c191e 100644 --- a/qt/gen_qgesturerecognizer.cpp +++ b/qt/gen_qgesturerecognizer.cpp @@ -80,9 +80,8 @@ public: }; -void QGestureRecognizer_new(QGestureRecognizer** outptr_QGestureRecognizer) { - MiqtVirtualQGestureRecognizer* ret = new MiqtVirtualQGestureRecognizer(); - *outptr_QGestureRecognizer = ret; +QGestureRecognizer* QGestureRecognizer_new() { + return new MiqtVirtualQGestureRecognizer(); } QGesture* QGestureRecognizer_Create(QGestureRecognizer* self, QObject* target) { diff --git a/qt/gen_qgesturerecognizer.go b/qt/gen_qgesturerecognizer.go index d2b48a00..38dd1881 100644 --- a/qt/gen_qgesturerecognizer.go +++ b/qt/gen_qgesturerecognizer.go @@ -51,30 +51,25 @@ func newQGestureRecognizer(h *C.QGestureRecognizer) *QGestureRecognizer { if h == nil { return nil } + return &QGestureRecognizer{h: h} } // UnsafeNewQGestureRecognizer constructs the type using only unsafe pointers. func UnsafeNewQGestureRecognizer(h unsafe.Pointer) *QGestureRecognizer { - if h == nil { - return nil - } - - return &QGestureRecognizer{h: (*C.QGestureRecognizer)(h)} + return newQGestureRecognizer((*C.QGestureRecognizer)(h)) } // NewQGestureRecognizer constructs a new QGestureRecognizer object. func NewQGestureRecognizer() *QGestureRecognizer { - var outptr_QGestureRecognizer *C.QGestureRecognizer = nil - C.QGestureRecognizer_new(&outptr_QGestureRecognizer) - ret := newQGestureRecognizer(outptr_QGestureRecognizer) + ret := newQGestureRecognizer(C.QGestureRecognizer_new()) ret.isSubclass = true return ret } func (this *QGestureRecognizer) Create(target *QObject) *QGesture { - return newQGesture(C.QGestureRecognizer_Create(this.h, target.cPointer()), nil) + return newQGesture(C.QGestureRecognizer_Create(this.h, target.cPointer())) } func (this *QGestureRecognizer) Recognize(state *QGesture, watched *QObject, event *QEvent) QGestureRecognizer__ResultFlag { @@ -99,7 +94,7 @@ func (this *QGestureRecognizer) OperatorAssign(param1 *QGestureRecognizer) { func (this *QGestureRecognizer) callVirtualBase_Create(target *QObject) *QGesture { - return newQGesture(C.QGestureRecognizer_virtualbase_Create(unsafe.Pointer(this.h), target.cPointer()), nil) + return newQGesture(C.QGestureRecognizer_virtualbase_Create(unsafe.Pointer(this.h), target.cPointer())) } func (this *QGestureRecognizer) OnCreate(slot func(super func(target *QObject) *QGesture, target *QObject) *QGesture) { @@ -139,7 +134,7 @@ func miqt_exec_callback_QGestureRecognizer_Recognize(self *C.QGestureRecognizer, } // Convert all CABI parameters to Go parameters - slotval1 := newQGesture(state, nil) + slotval1 := newQGesture(state) slotval2 := newQObject(watched) @@ -171,7 +166,7 @@ func miqt_exec_callback_QGestureRecognizer_Reset(self *C.QGestureRecognizer, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGesture(state, nil) + slotval1 := newQGesture(state) gofunc((&QGestureRecognizer{h: self}).callVirtualBase_Reset, slotval1) diff --git a/qt/gen_qgesturerecognizer.h b/qt/gen_qgesturerecognizer.h index c551fb74..ca93638a 100644 --- a/qt/gen_qgesturerecognizer.h +++ b/qt/gen_qgesturerecognizer.h @@ -26,7 +26,7 @@ typedef struct QGestureRecognizer QGestureRecognizer; typedef struct QObject QObject; #endif -void QGestureRecognizer_new(QGestureRecognizer** outptr_QGestureRecognizer); +QGestureRecognizer* QGestureRecognizer_new(); QGesture* QGestureRecognizer_Create(QGestureRecognizer* self, QObject* target); int QGestureRecognizer_Recognize(QGestureRecognizer* self, QGesture* state, QObject* watched, QEvent* event); void QGestureRecognizer_Reset(QGestureRecognizer* self, QGesture* state); diff --git a/qt/gen_qglyphrun.cpp b/qt/gen_qglyphrun.cpp index b333d12c..53aed6db 100644 --- a/qt/gen_qglyphrun.cpp +++ b/qt/gen_qglyphrun.cpp @@ -7,14 +7,12 @@ #include "gen_qglyphrun.h" #include "_cgo_export.h" -void QGlyphRun_new(QGlyphRun** outptr_QGlyphRun) { - QGlyphRun* ret = new QGlyphRun(); - *outptr_QGlyphRun = ret; +QGlyphRun* QGlyphRun_new() { + return new QGlyphRun(); } -void QGlyphRun_new2(QGlyphRun* other, QGlyphRun** outptr_QGlyphRun) { - QGlyphRun* ret = new QGlyphRun(*other); - *outptr_QGlyphRun = ret; +QGlyphRun* QGlyphRun_new2(QGlyphRun* other) { + return new QGlyphRun(*other); } void QGlyphRun_OperatorAssign(QGlyphRun* self, QGlyphRun* other) { diff --git a/qt/gen_qglyphrun.go b/qt/gen_qglyphrun.go index 1dc9061b..35d0e8ad 100644 --- a/qt/gen_qglyphrun.go +++ b/qt/gen_qglyphrun.go @@ -47,34 +47,27 @@ func newQGlyphRun(h *C.QGlyphRun) *QGlyphRun { if h == nil { return nil } + return &QGlyphRun{h: h} } // UnsafeNewQGlyphRun constructs the type using only unsafe pointers. func UnsafeNewQGlyphRun(h unsafe.Pointer) *QGlyphRun { - if h == nil { - return nil - } - - return &QGlyphRun{h: (*C.QGlyphRun)(h)} + return newQGlyphRun((*C.QGlyphRun)(h)) } // NewQGlyphRun constructs a new QGlyphRun object. func NewQGlyphRun() *QGlyphRun { - var outptr_QGlyphRun *C.QGlyphRun = nil - C.QGlyphRun_new(&outptr_QGlyphRun) - ret := newQGlyphRun(outptr_QGlyphRun) + ret := newQGlyphRun(C.QGlyphRun_new()) ret.isSubclass = true return ret } // NewQGlyphRun2 constructs a new QGlyphRun object. func NewQGlyphRun2(other *QGlyphRun) *QGlyphRun { - var outptr_QGlyphRun *C.QGlyphRun = nil - C.QGlyphRun_new2(other.cPointer(), &outptr_QGlyphRun) - ret := newQGlyphRun(outptr_QGlyphRun) + ret := newQGlyphRun(C.QGlyphRun_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qglyphrun.h b/qt/gen_qglyphrun.h index ff743035..1128ff62 100644 --- a/qt/gen_qglyphrun.h +++ b/qt/gen_qglyphrun.h @@ -26,8 +26,8 @@ typedef struct QRawFont QRawFont; typedef struct QRectF QRectF; #endif -void QGlyphRun_new(QGlyphRun** outptr_QGlyphRun); -void QGlyphRun_new2(QGlyphRun* other, QGlyphRun** outptr_QGlyphRun); +QGlyphRun* QGlyphRun_new(); +QGlyphRun* QGlyphRun_new2(QGlyphRun* other); void QGlyphRun_OperatorAssign(QGlyphRun* self, QGlyphRun* other); void QGlyphRun_Swap(QGlyphRun* self, QGlyphRun* other); QRawFont* QGlyphRun_RawFont(const QGlyphRun* self); diff --git a/qt/gen_qgraphicsanchorlayout.cpp b/qt/gen_qgraphicsanchorlayout.cpp index 1129fa3d..323c3f1c 100644 --- a/qt/gen_qgraphicsanchorlayout.cpp +++ b/qt/gen_qgraphicsanchorlayout.cpp @@ -14,6 +14,10 @@ #include "gen_qgraphicsanchorlayout.h" #include "_cgo_export.h" +void QGraphicsAnchor_virtbase(QGraphicsAnchor* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QGraphicsAnchor_MetaObject(const QGraphicsAnchor* self) { return (QMetaObject*) self->metaObject(); } @@ -351,18 +355,16 @@ public: }; -void QGraphicsAnchorLayout_new(QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsAnchorLayout* ret = new MiqtVirtualQGraphicsAnchorLayout(); - *outptr_QGraphicsAnchorLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsAnchorLayout* QGraphicsAnchorLayout_new() { + return new MiqtVirtualQGraphicsAnchorLayout(); } -void QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent, QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsAnchorLayout* ret = new MiqtVirtualQGraphicsAnchorLayout(parent); - *outptr_QGraphicsAnchorLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsAnchorLayout* QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent) { + return new MiqtVirtualQGraphicsAnchorLayout(parent); +} + +void QGraphicsAnchorLayout_virtbase(QGraphicsAnchorLayout* src, QGraphicsLayout** outptr_QGraphicsLayout) { + *outptr_QGraphicsLayout = static_cast(src); } QGraphicsAnchor* QGraphicsAnchorLayout_AddAnchor(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstEdge, QGraphicsLayoutItem* secondItem, int secondEdge) { diff --git a/qt/gen_qgraphicsanchorlayout.go b/qt/gen_qgraphicsanchorlayout.go index 97fb800a..21a7ee96 100644 --- a/qt/gen_qgraphicsanchorlayout.go +++ b/qt/gen_qgraphicsanchorlayout.go @@ -35,22 +35,20 @@ func (this *QGraphicsAnchor) UnsafePointer() unsafe.Pointer { } // newQGraphicsAnchor constructs the type using only CGO pointers. -func newQGraphicsAnchor(h *C.QGraphicsAnchor, h_QObject *C.QObject) *QGraphicsAnchor { +func newQGraphicsAnchor(h *C.QGraphicsAnchor) *QGraphicsAnchor { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QGraphicsAnchor_virtbase(h, &outptr_QObject) + return &QGraphicsAnchor{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQGraphicsAnchor constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsAnchor(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsAnchor { - if h == nil { - return nil - } - - return &QGraphicsAnchor{h: (*C.QGraphicsAnchor)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQGraphicsAnchor(h unsafe.Pointer) *QGraphicsAnchor { + return newQGraphicsAnchor((*C.QGraphicsAnchor)(h)) } func (this *QGraphicsAnchor) MetaObject() *QMetaObject { @@ -180,54 +178,44 @@ func (this *QGraphicsAnchorLayout) UnsafePointer() unsafe.Pointer { } // newQGraphicsAnchorLayout constructs the type using only CGO pointers. -func newQGraphicsAnchorLayout(h *C.QGraphicsAnchorLayout, h_QGraphicsLayout *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsAnchorLayout { +func newQGraphicsAnchorLayout(h *C.QGraphicsAnchorLayout) *QGraphicsAnchorLayout { if h == nil { return nil } + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + C.QGraphicsAnchorLayout_virtbase(h, &outptr_QGraphicsLayout) + return &QGraphicsAnchorLayout{h: h, - QGraphicsLayout: newQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} + QGraphicsLayout: newQGraphicsLayout(outptr_QGraphicsLayout)} } // UnsafeNewQGraphicsAnchorLayout constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsAnchorLayout(h unsafe.Pointer, h_QGraphicsLayout unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsAnchorLayout { - if h == nil { - return nil - } - - return &QGraphicsAnchorLayout{h: (*C.QGraphicsAnchorLayout)(h), - QGraphicsLayout: UnsafeNewQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} +func UnsafeNewQGraphicsAnchorLayout(h unsafe.Pointer) *QGraphicsAnchorLayout { + return newQGraphicsAnchorLayout((*C.QGraphicsAnchorLayout)(h)) } // NewQGraphicsAnchorLayout constructs a new QGraphicsAnchorLayout object. func NewQGraphicsAnchorLayout() *QGraphicsAnchorLayout { - var outptr_QGraphicsAnchorLayout *C.QGraphicsAnchorLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsAnchorLayout_new(&outptr_QGraphicsAnchorLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsAnchorLayout(outptr_QGraphicsAnchorLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsAnchorLayout(C.QGraphicsAnchorLayout_new()) ret.isSubclass = true return ret } // NewQGraphicsAnchorLayout2 constructs a new QGraphicsAnchorLayout object. func NewQGraphicsAnchorLayout2(parent *QGraphicsLayoutItem) *QGraphicsAnchorLayout { - var outptr_QGraphicsAnchorLayout *C.QGraphicsAnchorLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsAnchorLayout_new2(parent.cPointer(), &outptr_QGraphicsAnchorLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsAnchorLayout(outptr_QGraphicsAnchorLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsAnchorLayout(C.QGraphicsAnchorLayout_new2(parent.cPointer())) ret.isSubclass = true return ret } func (this *QGraphicsAnchorLayout) AddAnchor(firstItem *QGraphicsLayoutItem, firstEdge AnchorPoint, secondItem *QGraphicsLayoutItem, secondEdge AnchorPoint) *QGraphicsAnchor { - return newQGraphicsAnchor(C.QGraphicsAnchorLayout_AddAnchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge)), nil) + return newQGraphicsAnchor(C.QGraphicsAnchorLayout_AddAnchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge))) } func (this *QGraphicsAnchorLayout) Anchor(firstItem *QGraphicsLayoutItem, firstEdge AnchorPoint, secondItem *QGraphicsLayoutItem, secondEdge AnchorPoint) *QGraphicsAnchor { - return newQGraphicsAnchor(C.QGraphicsAnchorLayout_Anchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge)), nil) + return newQGraphicsAnchor(C.QGraphicsAnchorLayout_Anchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge))) } func (this *QGraphicsAnchorLayout) AddCornerAnchors(firstItem *QGraphicsLayoutItem, firstCorner Corner, secondItem *QGraphicsLayoutItem, secondCorner Corner) { diff --git a/qt/gen_qgraphicsanchorlayout.h b/qt/gen_qgraphicsanchorlayout.h index 93219e2a..35589aa3 100644 --- a/qt/gen_qgraphicsanchorlayout.h +++ b/qt/gen_qgraphicsanchorlayout.h @@ -36,6 +36,7 @@ typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; #endif +void QGraphicsAnchor_virtbase(QGraphicsAnchor* src, QObject** outptr_QObject); QMetaObject* QGraphicsAnchor_MetaObject(const QGraphicsAnchor* self); void* QGraphicsAnchor_Metacast(QGraphicsAnchor* self, const char* param1); struct miqt_string QGraphicsAnchor_Tr(const char* s); @@ -51,8 +52,9 @@ struct miqt_string QGraphicsAnchor_TrUtf82(const char* s, const char* c); struct miqt_string QGraphicsAnchor_TrUtf83(const char* s, const char* c, int n); void QGraphicsAnchor_Delete(QGraphicsAnchor* self, bool isSubclass); -void QGraphicsAnchorLayout_new(QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent, QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QGraphicsAnchorLayout* QGraphicsAnchorLayout_new(); +QGraphicsAnchorLayout* QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent); +void QGraphicsAnchorLayout_virtbase(QGraphicsAnchorLayout* src, QGraphicsLayout** outptr_QGraphicsLayout); QGraphicsAnchor* QGraphicsAnchorLayout_AddAnchor(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstEdge, QGraphicsLayoutItem* secondItem, int secondEdge); QGraphicsAnchor* QGraphicsAnchorLayout_Anchor(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstEdge, QGraphicsLayoutItem* secondItem, int secondEdge); void QGraphicsAnchorLayout_AddCornerAnchors(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstCorner, QGraphicsLayoutItem* secondItem, int secondCorner); diff --git a/qt/gen_qgraphicseffect.cpp b/qt/gen_qgraphicseffect.cpp index 0f769eeb..cc747946 100644 --- a/qt/gen_qgraphicseffect.cpp +++ b/qt/gen_qgraphicseffect.cpp @@ -268,16 +268,16 @@ public: }; -void QGraphicsEffect_new(QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsEffect* ret = new MiqtVirtualQGraphicsEffect(); - *outptr_QGraphicsEffect = ret; - *outptr_QObject = static_cast(ret); +QGraphicsEffect* QGraphicsEffect_new() { + return new MiqtVirtualQGraphicsEffect(); } -void QGraphicsEffect_new2(QObject* parent, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsEffect* ret = new MiqtVirtualQGraphicsEffect(parent); - *outptr_QGraphicsEffect = ret; - *outptr_QObject = static_cast(ret); +QGraphicsEffect* QGraphicsEffect_new2(QObject* parent) { + return new MiqtVirtualQGraphicsEffect(parent); +} + +void QGraphicsEffect_virtbase(QGraphicsEffect* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QGraphicsEffect_MetaObject(const QGraphicsEffect* self) { @@ -553,18 +553,16 @@ public: }; -void QGraphicsColorizeEffect_new(QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsColorizeEffect* ret = new MiqtVirtualQGraphicsColorizeEffect(); - *outptr_QGraphicsColorizeEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsColorizeEffect* QGraphicsColorizeEffect_new() { + return new MiqtVirtualQGraphicsColorizeEffect(); } -void QGraphicsColorizeEffect_new2(QObject* parent, QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsColorizeEffect* ret = new MiqtVirtualQGraphicsColorizeEffect(parent); - *outptr_QGraphicsColorizeEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsColorizeEffect* QGraphicsColorizeEffect_new2(QObject* parent) { + return new MiqtVirtualQGraphicsColorizeEffect(parent); +} + +void QGraphicsColorizeEffect_virtbase(QGraphicsColorizeEffect* src, QGraphicsEffect** outptr_QGraphicsEffect) { + *outptr_QGraphicsEffect = static_cast(src); } QMetaObject* QGraphicsColorizeEffect_MetaObject(const QGraphicsColorizeEffect* self) { @@ -799,18 +797,16 @@ public: }; -void QGraphicsBlurEffect_new(QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsBlurEffect* ret = new MiqtVirtualQGraphicsBlurEffect(); - *outptr_QGraphicsBlurEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsBlurEffect* QGraphicsBlurEffect_new() { + return new MiqtVirtualQGraphicsBlurEffect(); } -void QGraphicsBlurEffect_new2(QObject* parent, QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsBlurEffect* ret = new MiqtVirtualQGraphicsBlurEffect(parent); - *outptr_QGraphicsBlurEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsBlurEffect* QGraphicsBlurEffect_new2(QObject* parent) { + return new MiqtVirtualQGraphicsBlurEffect(parent); +} + +void QGraphicsBlurEffect_virtbase(QGraphicsBlurEffect* src, QGraphicsEffect** outptr_QGraphicsEffect) { + *outptr_QGraphicsEffect = static_cast(src); } QMetaObject* QGraphicsBlurEffect_MetaObject(const QGraphicsBlurEffect* self) { @@ -1049,18 +1045,16 @@ public: }; -void QGraphicsDropShadowEffect_new(QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsDropShadowEffect* ret = new MiqtVirtualQGraphicsDropShadowEffect(); - *outptr_QGraphicsDropShadowEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new() { + return new MiqtVirtualQGraphicsDropShadowEffect(); } -void QGraphicsDropShadowEffect_new2(QObject* parent, QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsDropShadowEffect* ret = new MiqtVirtualQGraphicsDropShadowEffect(parent); - *outptr_QGraphicsDropShadowEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new2(QObject* parent) { + return new MiqtVirtualQGraphicsDropShadowEffect(parent); +} + +void QGraphicsDropShadowEffect_virtbase(QGraphicsDropShadowEffect* src, QGraphicsEffect** outptr_QGraphicsEffect) { + *outptr_QGraphicsEffect = static_cast(src); } QMetaObject* QGraphicsDropShadowEffect_MetaObject(const QGraphicsDropShadowEffect* self) { @@ -1346,18 +1340,16 @@ public: }; -void QGraphicsOpacityEffect_new(QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsOpacityEffect* ret = new MiqtVirtualQGraphicsOpacityEffect(); - *outptr_QGraphicsOpacityEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsOpacityEffect* QGraphicsOpacityEffect_new() { + return new MiqtVirtualQGraphicsOpacityEffect(); } -void QGraphicsOpacityEffect_new2(QObject* parent, QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsOpacityEffect* ret = new MiqtVirtualQGraphicsOpacityEffect(parent); - *outptr_QGraphicsOpacityEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsOpacityEffect* QGraphicsOpacityEffect_new2(QObject* parent) { + return new MiqtVirtualQGraphicsOpacityEffect(parent); +} + +void QGraphicsOpacityEffect_virtbase(QGraphicsOpacityEffect* src, QGraphicsEffect** outptr_QGraphicsEffect) { + *outptr_QGraphicsEffect = static_cast(src); } QMetaObject* QGraphicsOpacityEffect_MetaObject(const QGraphicsOpacityEffect* self) { diff --git a/qt/gen_qgraphicseffect.go b/qt/gen_qgraphicseffect.go index e3e369d7..0034fac1 100644 --- a/qt/gen_qgraphicseffect.go +++ b/qt/gen_qgraphicseffect.go @@ -60,42 +60,34 @@ func (this *QGraphicsEffect) UnsafePointer() unsafe.Pointer { } // newQGraphicsEffect constructs the type using only CGO pointers. -func newQGraphicsEffect(h *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsEffect { +func newQGraphicsEffect(h *C.QGraphicsEffect) *QGraphicsEffect { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QGraphicsEffect_virtbase(h, &outptr_QObject) + return &QGraphicsEffect{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQGraphicsEffect constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsEffect(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsEffect { - if h == nil { - return nil - } - - return &QGraphicsEffect{h: (*C.QGraphicsEffect)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQGraphicsEffect(h unsafe.Pointer) *QGraphicsEffect { + return newQGraphicsEffect((*C.QGraphicsEffect)(h)) } // NewQGraphicsEffect constructs a new QGraphicsEffect object. func NewQGraphicsEffect() *QGraphicsEffect { - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsEffect_new(&outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsEffect(outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsEffect(C.QGraphicsEffect_new()) ret.isSubclass = true return ret } // NewQGraphicsEffect2 constructs a new QGraphicsEffect object. func NewQGraphicsEffect2(parent *QObject) *QGraphicsEffect { - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsEffect_new2(parent.cPointer(), &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsEffect(outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsEffect(C.QGraphicsEffect_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -370,7 +362,7 @@ func miqt_exec_callback_QGraphicsEffect_TimerEvent(self *C.QGraphicsEffect, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QGraphicsEffect{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -396,7 +388,7 @@ func miqt_exec_callback_QGraphicsEffect_ChildEvent(self *C.QGraphicsEffect, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGraphicsEffect{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -515,44 +507,34 @@ func (this *QGraphicsColorizeEffect) UnsafePointer() unsafe.Pointer { } // newQGraphicsColorizeEffect constructs the type using only CGO pointers. -func newQGraphicsColorizeEffect(h *C.QGraphicsColorizeEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsColorizeEffect { +func newQGraphicsColorizeEffect(h *C.QGraphicsColorizeEffect) *QGraphicsColorizeEffect { if h == nil { return nil } + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + C.QGraphicsColorizeEffect_virtbase(h, &outptr_QGraphicsEffect) + return &QGraphicsColorizeEffect{h: h, - QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} + QGraphicsEffect: newQGraphicsEffect(outptr_QGraphicsEffect)} } // UnsafeNewQGraphicsColorizeEffect constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsColorizeEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsColorizeEffect { - if h == nil { - return nil - } - - return &QGraphicsColorizeEffect{h: (*C.QGraphicsColorizeEffect)(h), - QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} +func UnsafeNewQGraphicsColorizeEffect(h unsafe.Pointer) *QGraphicsColorizeEffect { + return newQGraphicsColorizeEffect((*C.QGraphicsColorizeEffect)(h)) } // NewQGraphicsColorizeEffect constructs a new QGraphicsColorizeEffect object. func NewQGraphicsColorizeEffect() *QGraphicsColorizeEffect { - var outptr_QGraphicsColorizeEffect *C.QGraphicsColorizeEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsColorizeEffect_new(&outptr_QGraphicsColorizeEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsColorizeEffect(outptr_QGraphicsColorizeEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsColorizeEffect(C.QGraphicsColorizeEffect_new()) ret.isSubclass = true return ret } // NewQGraphicsColorizeEffect2 constructs a new QGraphicsColorizeEffect object. func NewQGraphicsColorizeEffect2(parent *QObject) *QGraphicsColorizeEffect { - var outptr_QGraphicsColorizeEffect *C.QGraphicsColorizeEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsColorizeEffect_new2(parent.cPointer(), &outptr_QGraphicsColorizeEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsColorizeEffect(outptr_QGraphicsColorizeEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsColorizeEffect(C.QGraphicsColorizeEffect_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -804,44 +786,34 @@ func (this *QGraphicsBlurEffect) UnsafePointer() unsafe.Pointer { } // newQGraphicsBlurEffect constructs the type using only CGO pointers. -func newQGraphicsBlurEffect(h *C.QGraphicsBlurEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsBlurEffect { +func newQGraphicsBlurEffect(h *C.QGraphicsBlurEffect) *QGraphicsBlurEffect { if h == nil { return nil } + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + C.QGraphicsBlurEffect_virtbase(h, &outptr_QGraphicsEffect) + return &QGraphicsBlurEffect{h: h, - QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} + QGraphicsEffect: newQGraphicsEffect(outptr_QGraphicsEffect)} } // UnsafeNewQGraphicsBlurEffect constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsBlurEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsBlurEffect { - if h == nil { - return nil - } - - return &QGraphicsBlurEffect{h: (*C.QGraphicsBlurEffect)(h), - QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} +func UnsafeNewQGraphicsBlurEffect(h unsafe.Pointer) *QGraphicsBlurEffect { + return newQGraphicsBlurEffect((*C.QGraphicsBlurEffect)(h)) } // NewQGraphicsBlurEffect constructs a new QGraphicsBlurEffect object. func NewQGraphicsBlurEffect() *QGraphicsBlurEffect { - var outptr_QGraphicsBlurEffect *C.QGraphicsBlurEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsBlurEffect_new(&outptr_QGraphicsBlurEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsBlurEffect(outptr_QGraphicsBlurEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsBlurEffect(C.QGraphicsBlurEffect_new()) ret.isSubclass = true return ret } // NewQGraphicsBlurEffect2 constructs a new QGraphicsBlurEffect object. func NewQGraphicsBlurEffect2(parent *QObject) *QGraphicsBlurEffect { - var outptr_QGraphicsBlurEffect *C.QGraphicsBlurEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsBlurEffect_new2(parent.cPointer(), &outptr_QGraphicsBlurEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsBlurEffect(outptr_QGraphicsBlurEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsBlurEffect(C.QGraphicsBlurEffect_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -1097,44 +1069,34 @@ func (this *QGraphicsDropShadowEffect) UnsafePointer() unsafe.Pointer { } // newQGraphicsDropShadowEffect constructs the type using only CGO pointers. -func newQGraphicsDropShadowEffect(h *C.QGraphicsDropShadowEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsDropShadowEffect { +func newQGraphicsDropShadowEffect(h *C.QGraphicsDropShadowEffect) *QGraphicsDropShadowEffect { if h == nil { return nil } + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + C.QGraphicsDropShadowEffect_virtbase(h, &outptr_QGraphicsEffect) + return &QGraphicsDropShadowEffect{h: h, - QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} + QGraphicsEffect: newQGraphicsEffect(outptr_QGraphicsEffect)} } // UnsafeNewQGraphicsDropShadowEffect constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsDropShadowEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsDropShadowEffect { - if h == nil { - return nil - } - - return &QGraphicsDropShadowEffect{h: (*C.QGraphicsDropShadowEffect)(h), - QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} +func UnsafeNewQGraphicsDropShadowEffect(h unsafe.Pointer) *QGraphicsDropShadowEffect { + return newQGraphicsDropShadowEffect((*C.QGraphicsDropShadowEffect)(h)) } // NewQGraphicsDropShadowEffect constructs a new QGraphicsDropShadowEffect object. func NewQGraphicsDropShadowEffect() *QGraphicsDropShadowEffect { - var outptr_QGraphicsDropShadowEffect *C.QGraphicsDropShadowEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsDropShadowEffect_new(&outptr_QGraphicsDropShadowEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsDropShadowEffect(outptr_QGraphicsDropShadowEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsDropShadowEffect(C.QGraphicsDropShadowEffect_new()) ret.isSubclass = true return ret } // NewQGraphicsDropShadowEffect2 constructs a new QGraphicsDropShadowEffect object. func NewQGraphicsDropShadowEffect2(parent *QObject) *QGraphicsDropShadowEffect { - var outptr_QGraphicsDropShadowEffect *C.QGraphicsDropShadowEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsDropShadowEffect_new2(parent.cPointer(), &outptr_QGraphicsDropShadowEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsDropShadowEffect(outptr_QGraphicsDropShadowEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsDropShadowEffect(C.QGraphicsDropShadowEffect_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -1446,44 +1408,34 @@ func (this *QGraphicsOpacityEffect) UnsafePointer() unsafe.Pointer { } // newQGraphicsOpacityEffect constructs the type using only CGO pointers. -func newQGraphicsOpacityEffect(h *C.QGraphicsOpacityEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsOpacityEffect { +func newQGraphicsOpacityEffect(h *C.QGraphicsOpacityEffect) *QGraphicsOpacityEffect { if h == nil { return nil } + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + C.QGraphicsOpacityEffect_virtbase(h, &outptr_QGraphicsEffect) + return &QGraphicsOpacityEffect{h: h, - QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} + QGraphicsEffect: newQGraphicsEffect(outptr_QGraphicsEffect)} } // UnsafeNewQGraphicsOpacityEffect constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsOpacityEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsOpacityEffect { - if h == nil { - return nil - } - - return &QGraphicsOpacityEffect{h: (*C.QGraphicsOpacityEffect)(h), - QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} +func UnsafeNewQGraphicsOpacityEffect(h unsafe.Pointer) *QGraphicsOpacityEffect { + return newQGraphicsOpacityEffect((*C.QGraphicsOpacityEffect)(h)) } // NewQGraphicsOpacityEffect constructs a new QGraphicsOpacityEffect object. func NewQGraphicsOpacityEffect() *QGraphicsOpacityEffect { - var outptr_QGraphicsOpacityEffect *C.QGraphicsOpacityEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsOpacityEffect_new(&outptr_QGraphicsOpacityEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsOpacityEffect(outptr_QGraphicsOpacityEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsOpacityEffect(C.QGraphicsOpacityEffect_new()) ret.isSubclass = true return ret } // NewQGraphicsOpacityEffect2 constructs a new QGraphicsOpacityEffect object. func NewQGraphicsOpacityEffect2(parent *QObject) *QGraphicsOpacityEffect { - var outptr_QGraphicsOpacityEffect *C.QGraphicsOpacityEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsOpacityEffect_new2(parent.cPointer(), &outptr_QGraphicsOpacityEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsOpacityEffect(outptr_QGraphicsOpacityEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsOpacityEffect(C.QGraphicsOpacityEffect_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qgraphicseffect.h b/qt/gen_qgraphicseffect.h index c1a373ab..30ac8e13 100644 --- a/qt/gen_qgraphicseffect.h +++ b/qt/gen_qgraphicseffect.h @@ -50,8 +50,9 @@ typedef struct QRectF QRectF; typedef struct QTimerEvent QTimerEvent; #endif -void QGraphicsEffect_new(QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); -void QGraphicsEffect_new2(QObject* parent, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +QGraphicsEffect* QGraphicsEffect_new(); +QGraphicsEffect* QGraphicsEffect_new2(QObject* parent); +void QGraphicsEffect_virtbase(QGraphicsEffect* src, QObject** outptr_QObject); QMetaObject* QGraphicsEffect_MetaObject(const QGraphicsEffect* self); void* QGraphicsEffect_Metacast(QGraphicsEffect* self, const char* param1); struct miqt_string QGraphicsEffect_Tr(const char* s); @@ -91,8 +92,9 @@ void QGraphicsEffect_override_virtual_DisconnectNotify(void* self, intptr_t slot void QGraphicsEffect_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QGraphicsEffect_Delete(QGraphicsEffect* self, bool isSubclass); -void QGraphicsColorizeEffect_new(QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); -void QGraphicsColorizeEffect_new2(QObject* parent, QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +QGraphicsColorizeEffect* QGraphicsColorizeEffect_new(); +QGraphicsColorizeEffect* QGraphicsColorizeEffect_new2(QObject* parent); +void QGraphicsColorizeEffect_virtbase(QGraphicsColorizeEffect* src, QGraphicsEffect** outptr_QGraphicsEffect); QMetaObject* QGraphicsColorizeEffect_MetaObject(const QGraphicsColorizeEffect* self); void* QGraphicsColorizeEffect_Metacast(QGraphicsColorizeEffect* self, const char* param1); struct miqt_string QGraphicsColorizeEffect_Tr(const char* s); @@ -118,8 +120,9 @@ void QGraphicsColorizeEffect_override_virtual_SourceChanged(void* self, intptr_t void QGraphicsColorizeEffect_virtualbase_SourceChanged(void* self, int flags); void QGraphicsColorizeEffect_Delete(QGraphicsColorizeEffect* self, bool isSubclass); -void QGraphicsBlurEffect_new(QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); -void QGraphicsBlurEffect_new2(QObject* parent, QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +QGraphicsBlurEffect* QGraphicsBlurEffect_new(); +QGraphicsBlurEffect* QGraphicsBlurEffect_new2(QObject* parent); +void QGraphicsBlurEffect_virtbase(QGraphicsBlurEffect* src, QGraphicsEffect** outptr_QGraphicsEffect); QMetaObject* QGraphicsBlurEffect_MetaObject(const QGraphicsBlurEffect* self); void* QGraphicsBlurEffect_Metacast(QGraphicsBlurEffect* self, const char* param1); struct miqt_string QGraphicsBlurEffect_Tr(const char* s); @@ -146,8 +149,9 @@ void QGraphicsBlurEffect_override_virtual_SourceChanged(void* self, intptr_t slo void QGraphicsBlurEffect_virtualbase_SourceChanged(void* self, int flags); void QGraphicsBlurEffect_Delete(QGraphicsBlurEffect* self, bool isSubclass); -void QGraphicsDropShadowEffect_new(QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); -void QGraphicsDropShadowEffect_new2(QObject* parent, QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new(); +QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new2(QObject* parent); +void QGraphicsDropShadowEffect_virtbase(QGraphicsDropShadowEffect* src, QGraphicsEffect** outptr_QGraphicsEffect); QMetaObject* QGraphicsDropShadowEffect_MetaObject(const QGraphicsDropShadowEffect* self); void* QGraphicsDropShadowEffect_Metacast(QGraphicsDropShadowEffect* self, const char* param1); struct miqt_string QGraphicsDropShadowEffect_Tr(const char* s); @@ -184,8 +188,9 @@ void QGraphicsDropShadowEffect_override_virtual_SourceChanged(void* self, intptr void QGraphicsDropShadowEffect_virtualbase_SourceChanged(void* self, int flags); void QGraphicsDropShadowEffect_Delete(QGraphicsDropShadowEffect* self, bool isSubclass); -void QGraphicsOpacityEffect_new(QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); -void QGraphicsOpacityEffect_new2(QObject* parent, QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +QGraphicsOpacityEffect* QGraphicsOpacityEffect_new(); +QGraphicsOpacityEffect* QGraphicsOpacityEffect_new2(QObject* parent); +void QGraphicsOpacityEffect_virtbase(QGraphicsOpacityEffect* src, QGraphicsEffect** outptr_QGraphicsEffect); QMetaObject* QGraphicsOpacityEffect_MetaObject(const QGraphicsOpacityEffect* self); void* QGraphicsOpacityEffect_Metacast(QGraphicsOpacityEffect* self, const char* param1); struct miqt_string QGraphicsOpacityEffect_Tr(const char* s); diff --git a/qt/gen_qgraphicsgridlayout.cpp b/qt/gen_qgraphicsgridlayout.cpp index 2cd46db0..7fd53187 100644 --- a/qt/gen_qgraphicsgridlayout.cpp +++ b/qt/gen_qgraphicsgridlayout.cpp @@ -241,18 +241,16 @@ public: }; -void QGraphicsGridLayout_new(QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsGridLayout* ret = new MiqtVirtualQGraphicsGridLayout(); - *outptr_QGraphicsGridLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsGridLayout* QGraphicsGridLayout_new() { + return new MiqtVirtualQGraphicsGridLayout(); } -void QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent, QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsGridLayout* ret = new MiqtVirtualQGraphicsGridLayout(parent); - *outptr_QGraphicsGridLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsGridLayout* QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent) { + return new MiqtVirtualQGraphicsGridLayout(parent); +} + +void QGraphicsGridLayout_virtbase(QGraphicsGridLayout* src, QGraphicsLayout** outptr_QGraphicsLayout) { + *outptr_QGraphicsLayout = static_cast(src); } void QGraphicsGridLayout_AddItem(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column, int rowSpan, int columnSpan) { diff --git a/qt/gen_qgraphicsgridlayout.go b/qt/gen_qgraphicsgridlayout.go index ae552d7f..6602ce28 100644 --- a/qt/gen_qgraphicsgridlayout.go +++ b/qt/gen_qgraphicsgridlayout.go @@ -35,44 +35,34 @@ func (this *QGraphicsGridLayout) UnsafePointer() unsafe.Pointer { } // newQGraphicsGridLayout constructs the type using only CGO pointers. -func newQGraphicsGridLayout(h *C.QGraphicsGridLayout, h_QGraphicsLayout *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsGridLayout { +func newQGraphicsGridLayout(h *C.QGraphicsGridLayout) *QGraphicsGridLayout { if h == nil { return nil } + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + C.QGraphicsGridLayout_virtbase(h, &outptr_QGraphicsLayout) + return &QGraphicsGridLayout{h: h, - QGraphicsLayout: newQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} + QGraphicsLayout: newQGraphicsLayout(outptr_QGraphicsLayout)} } // UnsafeNewQGraphicsGridLayout constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsGridLayout(h unsafe.Pointer, h_QGraphicsLayout unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsGridLayout { - if h == nil { - return nil - } - - return &QGraphicsGridLayout{h: (*C.QGraphicsGridLayout)(h), - QGraphicsLayout: UnsafeNewQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} +func UnsafeNewQGraphicsGridLayout(h unsafe.Pointer) *QGraphicsGridLayout { + return newQGraphicsGridLayout((*C.QGraphicsGridLayout)(h)) } // NewQGraphicsGridLayout constructs a new QGraphicsGridLayout object. func NewQGraphicsGridLayout() *QGraphicsGridLayout { - var outptr_QGraphicsGridLayout *C.QGraphicsGridLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsGridLayout_new(&outptr_QGraphicsGridLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsGridLayout(outptr_QGraphicsGridLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsGridLayout(C.QGraphicsGridLayout_new()) ret.isSubclass = true return ret } // NewQGraphicsGridLayout2 constructs a new QGraphicsGridLayout object. func NewQGraphicsGridLayout2(parent *QGraphicsLayoutItem) *QGraphicsGridLayout { - var outptr_QGraphicsGridLayout *C.QGraphicsGridLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsGridLayout_new2(parent.cPointer(), &outptr_QGraphicsGridLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsGridLayout(outptr_QGraphicsGridLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsGridLayout(C.QGraphicsGridLayout_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qgraphicsgridlayout.h b/qt/gen_qgraphicsgridlayout.h index 694867cb..b190b781 100644 --- a/qt/gen_qgraphicsgridlayout.h +++ b/qt/gen_qgraphicsgridlayout.h @@ -30,8 +30,9 @@ typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; #endif -void QGraphicsGridLayout_new(QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent, QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QGraphicsGridLayout* QGraphicsGridLayout_new(); +QGraphicsGridLayout* QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent); +void QGraphicsGridLayout_virtbase(QGraphicsGridLayout* src, QGraphicsLayout** outptr_QGraphicsLayout); void QGraphicsGridLayout_AddItem(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column, int rowSpan, int columnSpan); void QGraphicsGridLayout_AddItem2(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column); void QGraphicsGridLayout_SetHorizontalSpacing(QGraphicsGridLayout* self, double spacing); diff --git a/qt/gen_qgraphicsitem.cpp b/qt/gen_qgraphicsitem.cpp index 36cf6002..3f7598fc 100644 --- a/qt/gen_qgraphicsitem.cpp +++ b/qt/gen_qgraphicsitem.cpp @@ -896,14 +896,12 @@ public: }; -void QGraphicsItem_new(QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsItem* ret = new MiqtVirtualQGraphicsItem(); - *outptr_QGraphicsItem = ret; +QGraphicsItem* QGraphicsItem_new() { + return new MiqtVirtualQGraphicsItem(); } -void QGraphicsItem_new2(QGraphicsItem* parent, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsItem* ret = new MiqtVirtualQGraphicsItem(parent); - *outptr_QGraphicsItem = ret; +QGraphicsItem* QGraphicsItem_new2(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsItem(parent); } QGraphicsScene* QGraphicsItem_Scene(const QGraphicsItem* self) { @@ -2980,18 +2978,17 @@ public: }; -void QGraphicsObject_new(QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsObject* ret = new MiqtVirtualQGraphicsObject(); - *outptr_QGraphicsObject = ret; - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsObject* QGraphicsObject_new() { + return new MiqtVirtualQGraphicsObject(); } -void QGraphicsObject_new2(QGraphicsItem* parent, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsObject* ret = new MiqtVirtualQGraphicsObject(parent); - *outptr_QGraphicsObject = ret; - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsObject* QGraphicsObject_new2(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsObject(parent); +} + +void QGraphicsObject_virtbase(QGraphicsObject* src, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + *outptr_QObject = static_cast(src); + *outptr_QGraphicsItem = static_cast(src); } QMetaObject* QGraphicsObject_MetaObject(const QGraphicsObject* self) { @@ -4376,16 +4373,16 @@ public: }; -void QAbstractGraphicsShapeItem_new(QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQAbstractGraphicsShapeItem* ret = new MiqtVirtualQAbstractGraphicsShapeItem(); - *outptr_QAbstractGraphicsShapeItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QAbstractGraphicsShapeItem* QAbstractGraphicsShapeItem_new() { + return new MiqtVirtualQAbstractGraphicsShapeItem(); } -void QAbstractGraphicsShapeItem_new2(QGraphicsItem* parent, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQAbstractGraphicsShapeItem* ret = new MiqtVirtualQAbstractGraphicsShapeItem(parent); - *outptr_QAbstractGraphicsShapeItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QAbstractGraphicsShapeItem* QAbstractGraphicsShapeItem_new2(QGraphicsItem* parent) { + return new MiqtVirtualQAbstractGraphicsShapeItem(parent); +} + +void QAbstractGraphicsShapeItem_virtbase(QAbstractGraphicsShapeItem* src, QGraphicsItem** outptr_QGraphicsItem) { + *outptr_QGraphicsItem = static_cast(src); } QPen* QAbstractGraphicsShapeItem_Pen(const QAbstractGraphicsShapeItem* self) { @@ -4943,32 +4940,24 @@ public: }; -void QGraphicsPathItem_new(QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(); - *outptr_QGraphicsPathItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPathItem* QGraphicsPathItem_new() { + return new MiqtVirtualQGraphicsPathItem(); } -void QGraphicsPathItem_new2(QPainterPath* path, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(*path); - *outptr_QGraphicsPathItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPathItem* QGraphicsPathItem_new2(QPainterPath* path) { + return new MiqtVirtualQGraphicsPathItem(*path); } -void QGraphicsPathItem_new3(QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(parent); - *outptr_QGraphicsPathItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPathItem* QGraphicsPathItem_new3(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsPathItem(parent); } -void QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(*path, parent); - *outptr_QGraphicsPathItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPathItem* QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsPathItem(*path, parent); +} + +void QGraphicsPathItem_virtbase(QGraphicsPathItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem) { + *outptr_QAbstractGraphicsShapeItem = static_cast(src); } QPainterPath* QGraphicsPathItem_Path(const QGraphicsPathItem* self) { @@ -5348,46 +5337,32 @@ public: }; -void QGraphicsRectItem_new(QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(); - *outptr_QGraphicsRectItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsRectItem* QGraphicsRectItem_new() { + return new MiqtVirtualQGraphicsRectItem(); } -void QGraphicsRectItem_new2(QRectF* rect, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(*rect); - *outptr_QGraphicsRectItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsRectItem* QGraphicsRectItem_new2(QRectF* rect) { + return new MiqtVirtualQGraphicsRectItem(*rect); } -void QGraphicsRectItem_new3(double x, double y, double w, double h, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); - *outptr_QGraphicsRectItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsRectItem* QGraphicsRectItem_new3(double x, double y, double w, double h) { + return new MiqtVirtualQGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); } -void QGraphicsRectItem_new4(QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(parent); - *outptr_QGraphicsRectItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsRectItem* QGraphicsRectItem_new4(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsRectItem(parent); } -void QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(*rect, parent); - *outptr_QGraphicsRectItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsRectItem* QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsRectItem(*rect, parent); } -void QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); - *outptr_QGraphicsRectItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsRectItem* QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); +} + +void QGraphicsRectItem_virtbase(QGraphicsRectItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem) { + *outptr_QAbstractGraphicsShapeItem = static_cast(src); } QRectF* QGraphicsRectItem_Rect(const QGraphicsRectItem* self) { @@ -5771,46 +5746,32 @@ public: }; -void QGraphicsEllipseItem_new(QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(); - *outptr_QGraphicsEllipseItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsEllipseItem* QGraphicsEllipseItem_new() { + return new MiqtVirtualQGraphicsEllipseItem(); } -void QGraphicsEllipseItem_new2(QRectF* rect, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(*rect); - *outptr_QGraphicsEllipseItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsEllipseItem* QGraphicsEllipseItem_new2(QRectF* rect) { + return new MiqtVirtualQGraphicsEllipseItem(*rect); } -void QGraphicsEllipseItem_new3(double x, double y, double w, double h, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); - *outptr_QGraphicsEllipseItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsEllipseItem* QGraphicsEllipseItem_new3(double x, double y, double w, double h) { + return new MiqtVirtualQGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); } -void QGraphicsEllipseItem_new4(QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(parent); - *outptr_QGraphicsEllipseItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsEllipseItem* QGraphicsEllipseItem_new4(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsEllipseItem(parent); } -void QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(*rect, parent); - *outptr_QGraphicsEllipseItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsEllipseItem* QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsEllipseItem(*rect, parent); } -void QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); - *outptr_QGraphicsEllipseItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsEllipseItem* QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); +} + +void QGraphicsEllipseItem_virtbase(QGraphicsEllipseItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem) { + *outptr_QAbstractGraphicsShapeItem = static_cast(src); } QRectF* QGraphicsEllipseItem_Rect(const QGraphicsEllipseItem* self) { @@ -6206,18 +6167,16 @@ public: }; -void QGraphicsPolygonItem_new(QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPolygonItem* ret = new MiqtVirtualQGraphicsPolygonItem(); - *outptr_QGraphicsPolygonItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPolygonItem* QGraphicsPolygonItem_new() { + return new MiqtVirtualQGraphicsPolygonItem(); } -void QGraphicsPolygonItem_new2(QGraphicsItem* parent, QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPolygonItem* ret = new MiqtVirtualQGraphicsPolygonItem(parent); - *outptr_QGraphicsPolygonItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPolygonItem* QGraphicsPolygonItem_new2(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsPolygonItem(parent); +} + +void QGraphicsPolygonItem_virtbase(QGraphicsPolygonItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem) { + *outptr_QAbstractGraphicsShapeItem = static_cast(src); } int QGraphicsPolygonItem_FillRule(const QGraphicsPolygonItem* self) { @@ -7204,40 +7163,32 @@ public: }; -void QGraphicsLineItem_new(QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(); - *outptr_QGraphicsLineItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsLineItem* QGraphicsLineItem_new() { + return new MiqtVirtualQGraphicsLineItem(); } -void QGraphicsLineItem_new2(QLineF* line, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(*line); - *outptr_QGraphicsLineItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsLineItem* QGraphicsLineItem_new2(QLineF* line) { + return new MiqtVirtualQGraphicsLineItem(*line); } -void QGraphicsLineItem_new3(double x1, double y1, double x2, double y2, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); - *outptr_QGraphicsLineItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsLineItem* QGraphicsLineItem_new3(double x1, double y1, double x2, double y2) { + return new MiqtVirtualQGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); } -void QGraphicsLineItem_new4(QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(parent); - *outptr_QGraphicsLineItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsLineItem* QGraphicsLineItem_new4(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsLineItem(parent); } -void QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(*line, parent); - *outptr_QGraphicsLineItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsLineItem* QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsLineItem(*line, parent); } -void QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2), parent); - *outptr_QGraphicsLineItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsLineItem* QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2), parent); +} + +void QGraphicsLineItem_virtbase(QGraphicsLineItem* src, QGraphicsItem** outptr_QGraphicsItem) { + *outptr_QGraphicsItem = static_cast(src); } QPen* QGraphicsLineItem_Pen(const QGraphicsLineItem* self) { @@ -8433,28 +8384,24 @@ public: }; -void QGraphicsPixmapItem_new(QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(); - *outptr_QGraphicsPixmapItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPixmapItem* QGraphicsPixmapItem_new() { + return new MiqtVirtualQGraphicsPixmapItem(); } -void QGraphicsPixmapItem_new2(QPixmap* pixmap, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(*pixmap); - *outptr_QGraphicsPixmapItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPixmapItem* QGraphicsPixmapItem_new2(QPixmap* pixmap) { + return new MiqtVirtualQGraphicsPixmapItem(*pixmap); } -void QGraphicsPixmapItem_new3(QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(parent); - *outptr_QGraphicsPixmapItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPixmapItem* QGraphicsPixmapItem_new3(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsPixmapItem(parent); } -void QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(*pixmap, parent); - *outptr_QGraphicsPixmapItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPixmapItem* QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsPixmapItem(*pixmap, parent); +} + +void QGraphicsPixmapItem_virtbase(QGraphicsPixmapItem* src, QGraphicsItem** outptr_QGraphicsItem) { + *outptr_QGraphicsItem = static_cast(src); } QPixmap* QGraphicsPixmapItem_Pixmap(const QGraphicsPixmapItem* self) { @@ -9540,38 +9487,26 @@ public: }; -void QGraphicsTextItem_new(QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(); - *outptr_QGraphicsTextItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsTextItem* QGraphicsTextItem_new() { + return new MiqtVirtualQGraphicsTextItem(); } -void QGraphicsTextItem_new2(struct miqt_string text, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { +QGraphicsTextItem* QGraphicsTextItem_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(text_QString); - *outptr_QGraphicsTextItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); + return new MiqtVirtualQGraphicsTextItem(text_QString); } -void QGraphicsTextItem_new3(QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(parent); - *outptr_QGraphicsTextItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsTextItem* QGraphicsTextItem_new3(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsTextItem(parent); } -void QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { +QGraphicsTextItem* QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(text_QString, parent); - *outptr_QGraphicsTextItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); + return new MiqtVirtualQGraphicsTextItem(text_QString, parent); +} + +void QGraphicsTextItem_virtbase(QGraphicsTextItem* src, QGraphicsObject** outptr_QGraphicsObject) { + *outptr_QGraphicsObject = static_cast(src); } QMetaObject* QGraphicsTextItem_MetaObject(const QGraphicsTextItem* self) { @@ -10315,34 +10250,26 @@ public: }; -void QGraphicsSimpleTextItem_new(QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(); - *outptr_QGraphicsSimpleTextItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new() { + return new MiqtVirtualQGraphicsSimpleTextItem(); } -void QGraphicsSimpleTextItem_new2(struct miqt_string text, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(text_QString); - *outptr_QGraphicsSimpleTextItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); + return new MiqtVirtualQGraphicsSimpleTextItem(text_QString); } -void QGraphicsSimpleTextItem_new3(QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(parent); - *outptr_QGraphicsSimpleTextItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new3(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsSimpleTextItem(parent); } -void QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(text_QString, parent); - *outptr_QGraphicsSimpleTextItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); + return new MiqtVirtualQGraphicsSimpleTextItem(text_QString, parent); +} + +void QGraphicsSimpleTextItem_virtbase(QGraphicsSimpleTextItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem) { + *outptr_QAbstractGraphicsShapeItem = static_cast(src); } void QGraphicsSimpleTextItem_SetText(QGraphicsSimpleTextItem* self, struct miqt_string text) { @@ -11340,16 +11267,16 @@ public: }; -void QGraphicsItemGroup_new(QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsItemGroup* ret = new MiqtVirtualQGraphicsItemGroup(); - *outptr_QGraphicsItemGroup = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsItemGroup* QGraphicsItemGroup_new() { + return new MiqtVirtualQGraphicsItemGroup(); } -void QGraphicsItemGroup_new2(QGraphicsItem* parent, QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsItemGroup* ret = new MiqtVirtualQGraphicsItemGroup(parent); - *outptr_QGraphicsItemGroup = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsItemGroup* QGraphicsItemGroup_new2(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsItemGroup(parent); +} + +void QGraphicsItemGroup_virtbase(QGraphicsItemGroup* src, QGraphicsItem** outptr_QGraphicsItem) { + *outptr_QGraphicsItem = static_cast(src); } void QGraphicsItemGroup_AddToGroup(QGraphicsItemGroup* self, QGraphicsItem* item) { diff --git a/qt/gen_qgraphicsitem.go b/qt/gen_qgraphicsitem.go index 086bb72c..245d7b57 100644 --- a/qt/gen_qgraphicsitem.go +++ b/qt/gen_qgraphicsitem.go @@ -193,40 +193,33 @@ func newQGraphicsItem(h *C.QGraphicsItem) *QGraphicsItem { if h == nil { return nil } + return &QGraphicsItem{h: h} } // UnsafeNewQGraphicsItem constructs the type using only unsafe pointers. func UnsafeNewQGraphicsItem(h unsafe.Pointer) *QGraphicsItem { - if h == nil { - return nil - } - - return &QGraphicsItem{h: (*C.QGraphicsItem)(h)} + return newQGraphicsItem((*C.QGraphicsItem)(h)) } // NewQGraphicsItem constructs a new QGraphicsItem object. func NewQGraphicsItem() *QGraphicsItem { - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsItem_new(&outptr_QGraphicsItem) - ret := newQGraphicsItem(outptr_QGraphicsItem) + ret := newQGraphicsItem(C.QGraphicsItem_new()) ret.isSubclass = true return ret } // NewQGraphicsItem2 constructs a new QGraphicsItem object. func NewQGraphicsItem2(parent *QGraphicsItem) *QGraphicsItem { - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsItem_new2(parent.cPointer(), &outptr_QGraphicsItem) - ret := newQGraphicsItem(outptr_QGraphicsItem) + ret := newQGraphicsItem(C.QGraphicsItem_new2(parent.cPointer())) ret.isSubclass = true return ret } func (this *QGraphicsItem) Scene() *QGraphicsScene { - return newQGraphicsScene(C.QGraphicsItem_Scene(this.h), nil) + return newQGraphicsScene(C.QGraphicsItem_Scene(this.h)) } func (this *QGraphicsItem) ParentItem() *QGraphicsItem { @@ -238,19 +231,19 @@ func (this *QGraphicsItem) TopLevelItem() *QGraphicsItem { } func (this *QGraphicsItem) ParentObject() *QGraphicsObject { - return newQGraphicsObject(C.QGraphicsItem_ParentObject(this.h), nil, nil) + return newQGraphicsObject(C.QGraphicsItem_ParentObject(this.h)) } func (this *QGraphicsItem) ParentWidget() *QGraphicsWidget { - return newQGraphicsWidget(C.QGraphicsItem_ParentWidget(this.h), nil, nil, nil, nil) + return newQGraphicsWidget(C.QGraphicsItem_ParentWidget(this.h)) } func (this *QGraphicsItem) TopLevelWidget() *QGraphicsWidget { - return newQGraphicsWidget(C.QGraphicsItem_TopLevelWidget(this.h), nil, nil, nil, nil) + return newQGraphicsWidget(C.QGraphicsItem_TopLevelWidget(this.h)) } func (this *QGraphicsItem) Window() *QGraphicsWidget { - return newQGraphicsWidget(C.QGraphicsItem_Window(this.h), nil, nil, nil, nil) + return newQGraphicsWidget(C.QGraphicsItem_Window(this.h)) } func (this *QGraphicsItem) Panel() *QGraphicsItem { @@ -284,15 +277,15 @@ func (this *QGraphicsItem) IsPanel() bool { } func (this *QGraphicsItem) ToGraphicsObject() *QGraphicsObject { - return newQGraphicsObject(C.QGraphicsItem_ToGraphicsObject(this.h), nil, nil) + return newQGraphicsObject(C.QGraphicsItem_ToGraphicsObject(this.h)) } func (this *QGraphicsItem) ToGraphicsObject2() *QGraphicsObject { - return newQGraphicsObject(C.QGraphicsItem_ToGraphicsObject2(this.h), nil, nil) + return newQGraphicsObject(C.QGraphicsItem_ToGraphicsObject2(this.h)) } func (this *QGraphicsItem) Group() *QGraphicsItemGroup { - return newQGraphicsItemGroup(C.QGraphicsItem_Group(this.h), nil) + return newQGraphicsItemGroup(C.QGraphicsItem_Group(this.h)) } func (this *QGraphicsItem) SetGroup(group *QGraphicsItemGroup) { @@ -421,7 +414,7 @@ func (this *QGraphicsItem) SetOpacity(opacity float64) { } func (this *QGraphicsItem) GraphicsEffect() *QGraphicsEffect { - return newQGraphicsEffect(C.QGraphicsItem_GraphicsEffect(this.h), nil) + return newQGraphicsEffect(C.QGraphicsItem_GraphicsEffect(this.h)) } func (this *QGraphicsItem) SetGraphicsEffect(effect *QGraphicsEffect) { @@ -641,7 +634,7 @@ func (this *QGraphicsItem) Transformations() []*QGraphicsTransform { _ret := make([]*QGraphicsTransform, int(_ma.len)) _outCast := (*[0xffff]*C.QGraphicsTransform)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQGraphicsTransform(_outCast[i], nil) + _ret[i] = newQGraphicsTransform(_outCast[i]) } return _ret } @@ -1311,9 +1304,9 @@ func miqt_exec_callback_QGraphicsItem_Paint(self *C.QGraphicsItem, cb C.intptr_t // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc(slotval1, slotval2, slotval3) @@ -1422,7 +1415,7 @@ func miqt_exec_callback_QGraphicsItem_ContextMenuEvent(self *C.QGraphicsItem, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1448,7 +1441,7 @@ func miqt_exec_callback_QGraphicsItem_DragEnterEvent(self *C.QGraphicsItem, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1474,7 +1467,7 @@ func miqt_exec_callback_QGraphicsItem_DragLeaveEvent(self *C.QGraphicsItem, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1500,7 +1493,7 @@ func miqt_exec_callback_QGraphicsItem_DragMoveEvent(self *C.QGraphicsItem, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1526,7 +1519,7 @@ func miqt_exec_callback_QGraphicsItem_DropEvent(self *C.QGraphicsItem, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1552,7 +1545,7 @@ func miqt_exec_callback_QGraphicsItem_FocusInEvent(self *C.QGraphicsItem, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1578,7 +1571,7 @@ func miqt_exec_callback_QGraphicsItem_FocusOutEvent(self *C.QGraphicsItem, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1604,7 +1597,7 @@ func miqt_exec_callback_QGraphicsItem_HoverEnterEvent(self *C.QGraphicsItem, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -1630,7 +1623,7 @@ func miqt_exec_callback_QGraphicsItem_HoverMoveEvent(self *C.QGraphicsItem, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -1656,7 +1649,7 @@ func miqt_exec_callback_QGraphicsItem_HoverLeaveEvent(self *C.QGraphicsItem, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -1682,7 +1675,7 @@ func miqt_exec_callback_QGraphicsItem_KeyPressEvent(self *C.QGraphicsItem, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1708,7 +1701,7 @@ func miqt_exec_callback_QGraphicsItem_KeyReleaseEvent(self *C.QGraphicsItem, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1734,7 +1727,7 @@ func miqt_exec_callback_QGraphicsItem_MousePressEvent(self *C.QGraphicsItem, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1760,7 +1753,7 @@ func miqt_exec_callback_QGraphicsItem_MouseMoveEvent(self *C.QGraphicsItem, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1786,7 +1779,7 @@ func miqt_exec_callback_QGraphicsItem_MouseReleaseEvent(self *C.QGraphicsItem, c } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1812,7 +1805,7 @@ func miqt_exec_callback_QGraphicsItem_MouseDoubleClickEvent(self *C.QGraphicsIte } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1838,7 +1831,7 @@ func miqt_exec_callback_QGraphicsItem_WheelEvent(self *C.QGraphicsItem, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1864,7 +1857,7 @@ func miqt_exec_callback_QGraphicsItem_InputMethodEvent(self *C.QGraphicsItem, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -2054,46 +2047,36 @@ func (this *QGraphicsObject) UnsafePointer() unsafe.Pointer { } // newQGraphicsObject constructs the type using only CGO pointers. -func newQGraphicsObject(h *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsObject { +func newQGraphicsObject(h *C.QGraphicsObject) *QGraphicsObject { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + C.QGraphicsObject_virtbase(h, &outptr_QObject, &outptr_QGraphicsItem) + return &QGraphicsObject{h: h, - QObject: newQObject(h_QObject), - QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} + QObject: newQObject(outptr_QObject), + QGraphicsItem: newQGraphicsItem(outptr_QGraphicsItem)} } // UnsafeNewQGraphicsObject constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsObject(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsObject { - if h == nil { - return nil - } - - return &QGraphicsObject{h: (*C.QGraphicsObject)(h), - QObject: UnsafeNewQObject(h_QObject), - QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} +func UnsafeNewQGraphicsObject(h unsafe.Pointer) *QGraphicsObject { + return newQGraphicsObject((*C.QGraphicsObject)(h)) } // NewQGraphicsObject constructs a new QGraphicsObject object. func NewQGraphicsObject() *QGraphicsObject { - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsObject_new(&outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsObject(outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsObject(C.QGraphicsObject_new()) ret.isSubclass = true return ret } // NewQGraphicsObject2 constructs a new QGraphicsObject object. func NewQGraphicsObject2(parent *QGraphicsItem) *QGraphicsObject { - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsObject_new2(parent.cPointer(), &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsObject(outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsObject(C.QGraphicsObject_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -2464,7 +2447,7 @@ func miqt_exec_callback_QGraphicsObject_TimerEvent(self *C.QGraphicsObject, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -2490,7 +2473,7 @@ func miqt_exec_callback_QGraphicsObject_ChildEvent(self *C.QGraphicsObject, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -2805,9 +2788,9 @@ func miqt_exec_callback_QGraphicsObject_Paint(self *C.QGraphicsObject, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc(slotval1, slotval2, slotval3) @@ -2916,7 +2899,7 @@ func miqt_exec_callback_QGraphicsObject_ContextMenuEvent(self *C.QGraphicsObject } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -2942,7 +2925,7 @@ func miqt_exec_callback_QGraphicsObject_DragEnterEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -2968,7 +2951,7 @@ func miqt_exec_callback_QGraphicsObject_DragLeaveEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -2994,7 +2977,7 @@ func miqt_exec_callback_QGraphicsObject_DragMoveEvent(self *C.QGraphicsObject, c } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -3020,7 +3003,7 @@ func miqt_exec_callback_QGraphicsObject_DropEvent(self *C.QGraphicsObject, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_DropEvent, slotval1) @@ -3046,7 +3029,7 @@ func miqt_exec_callback_QGraphicsObject_FocusInEvent(self *C.QGraphicsObject, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -3072,7 +3055,7 @@ func miqt_exec_callback_QGraphicsObject_FocusOutEvent(self *C.QGraphicsObject, c } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -3098,7 +3081,7 @@ func miqt_exec_callback_QGraphicsObject_HoverEnterEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -3124,7 +3107,7 @@ func miqt_exec_callback_QGraphicsObject_HoverMoveEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -3150,7 +3133,7 @@ func miqt_exec_callback_QGraphicsObject_HoverLeaveEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -3176,7 +3159,7 @@ func miqt_exec_callback_QGraphicsObject_KeyPressEvent(self *C.QGraphicsObject, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -3202,7 +3185,7 @@ func miqt_exec_callback_QGraphicsObject_KeyReleaseEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -3228,7 +3211,7 @@ func miqt_exec_callback_QGraphicsObject_MousePressEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -3254,7 +3237,7 @@ func miqt_exec_callback_QGraphicsObject_MouseMoveEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -3280,7 +3263,7 @@ func miqt_exec_callback_QGraphicsObject_MouseReleaseEvent(self *C.QGraphicsObjec } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -3306,7 +3289,7 @@ func miqt_exec_callback_QGraphicsObject_MouseDoubleClickEvent(self *C.QGraphicsO } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -3332,7 +3315,7 @@ func miqt_exec_callback_QGraphicsObject_WheelEvent(self *C.QGraphicsObject, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -3358,7 +3341,7 @@ func miqt_exec_callback_QGraphicsObject_InputMethodEvent(self *C.QGraphicsObject } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -3547,42 +3530,34 @@ func (this *QAbstractGraphicsShapeItem) UnsafePointer() unsafe.Pointer { } // newQAbstractGraphicsShapeItem constructs the type using only CGO pointers. -func newQAbstractGraphicsShapeItem(h *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QAbstractGraphicsShapeItem { +func newQAbstractGraphicsShapeItem(h *C.QAbstractGraphicsShapeItem) *QAbstractGraphicsShapeItem { if h == nil { return nil } + var outptr_QGraphicsItem *C.QGraphicsItem = nil + C.QAbstractGraphicsShapeItem_virtbase(h, &outptr_QGraphicsItem) + return &QAbstractGraphicsShapeItem{h: h, - QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} + QGraphicsItem: newQGraphicsItem(outptr_QGraphicsItem)} } // UnsafeNewQAbstractGraphicsShapeItem constructs the type using only unsafe pointers. -func UnsafeNewQAbstractGraphicsShapeItem(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QAbstractGraphicsShapeItem { - if h == nil { - return nil - } - - return &QAbstractGraphicsShapeItem{h: (*C.QAbstractGraphicsShapeItem)(h), - QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} +func UnsafeNewQAbstractGraphicsShapeItem(h unsafe.Pointer) *QAbstractGraphicsShapeItem { + return newQAbstractGraphicsShapeItem((*C.QAbstractGraphicsShapeItem)(h)) } // NewQAbstractGraphicsShapeItem constructs a new QAbstractGraphicsShapeItem object. func NewQAbstractGraphicsShapeItem() *QAbstractGraphicsShapeItem { - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QAbstractGraphicsShapeItem_new(&outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQAbstractGraphicsShapeItem(C.QAbstractGraphicsShapeItem_new()) ret.isSubclass = true return ret } // NewQAbstractGraphicsShapeItem2 constructs a new QAbstractGraphicsShapeItem object. func NewQAbstractGraphicsShapeItem2(parent *QGraphicsItem) *QAbstractGraphicsShapeItem { - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QAbstractGraphicsShapeItem_new2(parent.cPointer(), &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQAbstractGraphicsShapeItem(C.QAbstractGraphicsShapeItem_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -3848,9 +3823,9 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_Paint(self *C.QAbstractGraphi // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc(slotval1, slotval2, slotval3) @@ -3959,7 +3934,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_ContextMenuEvent(self *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -3985,7 +3960,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_DragEnterEvent(self *C.QAbstr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -4011,7 +3986,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_DragLeaveEvent(self *C.QAbstr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -4037,7 +4012,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_DragMoveEvent(self *C.QAbstra } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -4063,7 +4038,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_DropEvent(self *C.QAbstractGr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DropEvent, slotval1) @@ -4089,7 +4064,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_FocusInEvent(self *C.QAbstrac } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -4115,7 +4090,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_FocusOutEvent(self *C.QAbstra } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -4141,7 +4116,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_HoverEnterEvent(self *C.QAbst } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -4167,7 +4142,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_HoverMoveEvent(self *C.QAbstr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -4193,7 +4168,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_HoverLeaveEvent(self *C.QAbst } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -4219,7 +4194,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_KeyPressEvent(self *C.QAbstra } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -4245,7 +4220,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_KeyReleaseEvent(self *C.QAbst } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -4271,7 +4246,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_MousePressEvent(self *C.QAbst } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -4297,7 +4272,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_MouseMoveEvent(self *C.QAbstr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -4323,7 +4298,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_MouseReleaseEvent(self *C.QAb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -4349,7 +4324,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_MouseDoubleClickEvent(self *C } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -4375,7 +4350,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_WheelEvent(self *C.QAbstractG } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -4401,7 +4376,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_InputMethodEvent(self *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -4590,68 +4565,50 @@ func (this *QGraphicsPathItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsPathItem constructs the type using only CGO pointers. -func newQGraphicsPathItem(h *C.QGraphicsPathItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsPathItem { +func newQGraphicsPathItem(h *C.QGraphicsPathItem) *QGraphicsPathItem { if h == nil { return nil } + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + C.QGraphicsPathItem_virtbase(h, &outptr_QAbstractGraphicsShapeItem) + return &QGraphicsPathItem{h: h, - QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem)} } // UnsafeNewQGraphicsPathItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsPathItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsPathItem { - if h == nil { - return nil - } - - return &QGraphicsPathItem{h: (*C.QGraphicsPathItem)(h), - QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} +func UnsafeNewQGraphicsPathItem(h unsafe.Pointer) *QGraphicsPathItem { + return newQGraphicsPathItem((*C.QGraphicsPathItem)(h)) } // NewQGraphicsPathItem constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem() *QGraphicsPathItem { - var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPathItem_new(&outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsPathItem(C.QGraphicsPathItem_new()) ret.isSubclass = true return ret } // NewQGraphicsPathItem2 constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem2(path *QPainterPath) *QGraphicsPathItem { - var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPathItem_new2(path.cPointer(), &outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsPathItem(C.QGraphicsPathItem_new2(path.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsPathItem3 constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem3(parent *QGraphicsItem) *QGraphicsPathItem { - var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPathItem_new3(parent.cPointer(), &outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsPathItem(C.QGraphicsPathItem_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsPathItem4 constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem4(path *QPainterPath, parent *QGraphicsItem) *QGraphicsPathItem { - var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPathItem_new4(path.cPointer(), parent.cPointer(), &outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsPathItem(C.QGraphicsPathItem_new4(path.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -4804,9 +4761,9 @@ func miqt_exec_callback_QGraphicsPathItem_Paint(self *C.QGraphicsPathItem, cb C. // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -5013,92 +4970,66 @@ func (this *QGraphicsRectItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsRectItem constructs the type using only CGO pointers. -func newQGraphicsRectItem(h *C.QGraphicsRectItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsRectItem { +func newQGraphicsRectItem(h *C.QGraphicsRectItem) *QGraphicsRectItem { if h == nil { return nil } + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + C.QGraphicsRectItem_virtbase(h, &outptr_QAbstractGraphicsShapeItem) + return &QGraphicsRectItem{h: h, - QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem)} } // UnsafeNewQGraphicsRectItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsRectItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsRectItem { - if h == nil { - return nil - } - - return &QGraphicsRectItem{h: (*C.QGraphicsRectItem)(h), - QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} +func UnsafeNewQGraphicsRectItem(h unsafe.Pointer) *QGraphicsRectItem { + return newQGraphicsRectItem((*C.QGraphicsRectItem)(h)) } // NewQGraphicsRectItem constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem() *QGraphicsRectItem { - var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsRectItem_new(&outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsRectItem(C.QGraphicsRectItem_new()) ret.isSubclass = true return ret } // NewQGraphicsRectItem2 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem2(rect *QRectF) *QGraphicsRectItem { - var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsRectItem_new2(rect.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsRectItem(C.QGraphicsRectItem_new2(rect.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsRectItem3 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem3(x float64, y float64, w float64, h float64) *QGraphicsRectItem { - var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsRectItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsRectItem(C.QGraphicsRectItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h))) ret.isSubclass = true return ret } // NewQGraphicsRectItem4 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem4(parent *QGraphicsItem) *QGraphicsRectItem { - var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsRectItem_new4(parent.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsRectItem(C.QGraphicsRectItem_new4(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsRectItem5 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem5(rect *QRectF, parent *QGraphicsItem) *QGraphicsRectItem { - var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsRectItem_new5(rect.cPointer(), parent.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsRectItem(C.QGraphicsRectItem_new5(rect.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsRectItem6 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem6(x float64, y float64, w float64, h float64, parent *QGraphicsItem) *QGraphicsRectItem { - var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsRectItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsRectItem(C.QGraphicsRectItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer())) ret.isSubclass = true return ret } @@ -5255,9 +5186,9 @@ func miqt_exec_callback_QGraphicsRectItem_Paint(self *C.QGraphicsRectItem, cb C. // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -5464,92 +5395,66 @@ func (this *QGraphicsEllipseItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsEllipseItem constructs the type using only CGO pointers. -func newQGraphicsEllipseItem(h *C.QGraphicsEllipseItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsEllipseItem { +func newQGraphicsEllipseItem(h *C.QGraphicsEllipseItem) *QGraphicsEllipseItem { if h == nil { return nil } + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + C.QGraphicsEllipseItem_virtbase(h, &outptr_QAbstractGraphicsShapeItem) + return &QGraphicsEllipseItem{h: h, - QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem)} } // UnsafeNewQGraphicsEllipseItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsEllipseItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsEllipseItem { - if h == nil { - return nil - } - - return &QGraphicsEllipseItem{h: (*C.QGraphicsEllipseItem)(h), - QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} +func UnsafeNewQGraphicsEllipseItem(h unsafe.Pointer) *QGraphicsEllipseItem { + return newQGraphicsEllipseItem((*C.QGraphicsEllipseItem)(h)) } // NewQGraphicsEllipseItem constructs a new QGraphicsEllipseItem object. func NewQGraphicsEllipseItem() *QGraphicsEllipseItem { - var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsEllipseItem_new(&outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(C.QGraphicsEllipseItem_new()) ret.isSubclass = true return ret } // NewQGraphicsEllipseItem2 constructs a new QGraphicsEllipseItem object. func NewQGraphicsEllipseItem2(rect *QRectF) *QGraphicsEllipseItem { - var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsEllipseItem_new2(rect.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(C.QGraphicsEllipseItem_new2(rect.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsEllipseItem3 constructs a new QGraphicsEllipseItem object. func NewQGraphicsEllipseItem3(x float64, y float64, w float64, h float64) *QGraphicsEllipseItem { - var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsEllipseItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(C.QGraphicsEllipseItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h))) ret.isSubclass = true return ret } // NewQGraphicsEllipseItem4 constructs a new QGraphicsEllipseItem object. func NewQGraphicsEllipseItem4(parent *QGraphicsItem) *QGraphicsEllipseItem { - var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsEllipseItem_new4(parent.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(C.QGraphicsEllipseItem_new4(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsEllipseItem5 constructs a new QGraphicsEllipseItem object. func NewQGraphicsEllipseItem5(rect *QRectF, parent *QGraphicsItem) *QGraphicsEllipseItem { - var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsEllipseItem_new5(rect.cPointer(), parent.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(C.QGraphicsEllipseItem_new5(rect.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsEllipseItem6 constructs a new QGraphicsEllipseItem object. func NewQGraphicsEllipseItem6(x float64, y float64, w float64, h float64, parent *QGraphicsItem) *QGraphicsEllipseItem { - var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsEllipseItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(C.QGraphicsEllipseItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer())) ret.isSubclass = true return ret } @@ -5722,9 +5627,9 @@ func miqt_exec_callback_QGraphicsEllipseItem_Paint(self *C.QGraphicsEllipseItem, // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -5931,44 +5836,34 @@ func (this *QGraphicsPolygonItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsPolygonItem constructs the type using only CGO pointers. -func newQGraphicsPolygonItem(h *C.QGraphicsPolygonItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsPolygonItem { +func newQGraphicsPolygonItem(h *C.QGraphicsPolygonItem) *QGraphicsPolygonItem { if h == nil { return nil } + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + C.QGraphicsPolygonItem_virtbase(h, &outptr_QAbstractGraphicsShapeItem) + return &QGraphicsPolygonItem{h: h, - QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem)} } // UnsafeNewQGraphicsPolygonItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsPolygonItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsPolygonItem { - if h == nil { - return nil - } - - return &QGraphicsPolygonItem{h: (*C.QGraphicsPolygonItem)(h), - QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} +func UnsafeNewQGraphicsPolygonItem(h unsafe.Pointer) *QGraphicsPolygonItem { + return newQGraphicsPolygonItem((*C.QGraphicsPolygonItem)(h)) } // NewQGraphicsPolygonItem constructs a new QGraphicsPolygonItem object. func NewQGraphicsPolygonItem() *QGraphicsPolygonItem { - var outptr_QGraphicsPolygonItem *C.QGraphicsPolygonItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPolygonItem_new(&outptr_QGraphicsPolygonItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsPolygonItem(outptr_QGraphicsPolygonItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsPolygonItem(C.QGraphicsPolygonItem_new()) ret.isSubclass = true return ret } // NewQGraphicsPolygonItem2 constructs a new QGraphicsPolygonItem object. func NewQGraphicsPolygonItem2(parent *QGraphicsItem) *QGraphicsPolygonItem { - var outptr_QGraphicsPolygonItem *C.QGraphicsPolygonItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPolygonItem_new2(parent.cPointer(), &outptr_QGraphicsPolygonItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsPolygonItem(outptr_QGraphicsPolygonItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsPolygonItem(C.QGraphicsPolygonItem_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -6119,9 +6014,9 @@ func miqt_exec_callback_QGraphicsPolygonItem_Paint(self *C.QGraphicsPolygonItem, // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -6328,86 +6223,66 @@ func (this *QGraphicsLineItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsLineItem constructs the type using only CGO pointers. -func newQGraphicsLineItem(h *C.QGraphicsLineItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsLineItem { +func newQGraphicsLineItem(h *C.QGraphicsLineItem) *QGraphicsLineItem { if h == nil { return nil } + var outptr_QGraphicsItem *C.QGraphicsItem = nil + C.QGraphicsLineItem_virtbase(h, &outptr_QGraphicsItem) + return &QGraphicsLineItem{h: h, - QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} + QGraphicsItem: newQGraphicsItem(outptr_QGraphicsItem)} } // UnsafeNewQGraphicsLineItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsLineItem(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsLineItem { - if h == nil { - return nil - } - - return &QGraphicsLineItem{h: (*C.QGraphicsLineItem)(h), - QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} +func UnsafeNewQGraphicsLineItem(h unsafe.Pointer) *QGraphicsLineItem { + return newQGraphicsLineItem((*C.QGraphicsLineItem)(h)) } // NewQGraphicsLineItem constructs a new QGraphicsLineItem object. func NewQGraphicsLineItem() *QGraphicsLineItem { - var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsLineItem_new(&outptr_QGraphicsLineItem, &outptr_QGraphicsItem) - ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret := newQGraphicsLineItem(C.QGraphicsLineItem_new()) ret.isSubclass = true return ret } // NewQGraphicsLineItem2 constructs a new QGraphicsLineItem object. func NewQGraphicsLineItem2(line *QLineF) *QGraphicsLineItem { - var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsLineItem_new2(line.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) - ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret := newQGraphicsLineItem(C.QGraphicsLineItem_new2(line.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsLineItem3 constructs a new QGraphicsLineItem object. func NewQGraphicsLineItem3(x1 float64, y1 float64, x2 float64, y2 float64) *QGraphicsLineItem { - var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsLineItem_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) - ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret := newQGraphicsLineItem(C.QGraphicsLineItem_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2))) ret.isSubclass = true return ret } // NewQGraphicsLineItem4 constructs a new QGraphicsLineItem object. func NewQGraphicsLineItem4(parent *QGraphicsItem) *QGraphicsLineItem { - var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsLineItem_new4(parent.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) - ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret := newQGraphicsLineItem(C.QGraphicsLineItem_new4(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsLineItem5 constructs a new QGraphicsLineItem object. func NewQGraphicsLineItem5(line *QLineF, parent *QGraphicsItem) *QGraphicsLineItem { - var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsLineItem_new5(line.cPointer(), parent.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) - ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret := newQGraphicsLineItem(C.QGraphicsLineItem_new5(line.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsLineItem6 constructs a new QGraphicsLineItem object. func NewQGraphicsLineItem6(x1 float64, y1 float64, x2 float64, y2 float64, parent *QGraphicsItem) *QGraphicsLineItem { - var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsLineItem_new6((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), parent.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) - ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret := newQGraphicsLineItem(C.QGraphicsLineItem_new6((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), parent.cPointer())) ret.isSubclass = true return ret } @@ -6574,9 +6449,9 @@ func miqt_exec_callback_QGraphicsLineItem_Paint(self *C.QGraphicsLineItem, cb C. // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -6912,7 +6787,7 @@ func miqt_exec_callback_QGraphicsLineItem_ContextMenuEvent(self *C.QGraphicsLine } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -6938,7 +6813,7 @@ func miqt_exec_callback_QGraphicsLineItem_DragEnterEvent(self *C.QGraphicsLineIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -6964,7 +6839,7 @@ func miqt_exec_callback_QGraphicsLineItem_DragLeaveEvent(self *C.QGraphicsLineIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -6990,7 +6865,7 @@ func miqt_exec_callback_QGraphicsLineItem_DragMoveEvent(self *C.QGraphicsLineIte } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -7016,7 +6891,7 @@ func miqt_exec_callback_QGraphicsLineItem_DropEvent(self *C.QGraphicsLineItem, c } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DropEvent, slotval1) @@ -7042,7 +6917,7 @@ func miqt_exec_callback_QGraphicsLineItem_FocusInEvent(self *C.QGraphicsLineItem } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -7068,7 +6943,7 @@ func miqt_exec_callback_QGraphicsLineItem_FocusOutEvent(self *C.QGraphicsLineIte } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -7094,7 +6969,7 @@ func miqt_exec_callback_QGraphicsLineItem_HoverEnterEvent(self *C.QGraphicsLineI } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -7120,7 +6995,7 @@ func miqt_exec_callback_QGraphicsLineItem_HoverMoveEvent(self *C.QGraphicsLineIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -7146,7 +7021,7 @@ func miqt_exec_callback_QGraphicsLineItem_HoverLeaveEvent(self *C.QGraphicsLineI } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -7172,7 +7047,7 @@ func miqt_exec_callback_QGraphicsLineItem_KeyPressEvent(self *C.QGraphicsLineIte } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -7198,7 +7073,7 @@ func miqt_exec_callback_QGraphicsLineItem_KeyReleaseEvent(self *C.QGraphicsLineI } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -7224,7 +7099,7 @@ func miqt_exec_callback_QGraphicsLineItem_MousePressEvent(self *C.QGraphicsLineI } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -7250,7 +7125,7 @@ func miqt_exec_callback_QGraphicsLineItem_MouseMoveEvent(self *C.QGraphicsLineIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -7276,7 +7151,7 @@ func miqt_exec_callback_QGraphicsLineItem_MouseReleaseEvent(self *C.QGraphicsLin } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -7302,7 +7177,7 @@ func miqt_exec_callback_QGraphicsLineItem_MouseDoubleClickEvent(self *C.QGraphic } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -7328,7 +7203,7 @@ func miqt_exec_callback_QGraphicsLineItem_WheelEvent(self *C.QGraphicsLineItem, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -7354,7 +7229,7 @@ func miqt_exec_callback_QGraphicsLineItem_InputMethodEvent(self *C.QGraphicsLine } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -7457,70 +7332,56 @@ func (this *QGraphicsPixmapItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsPixmapItem constructs the type using only CGO pointers. -func newQGraphicsPixmapItem(h *C.QGraphicsPixmapItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsPixmapItem { +func newQGraphicsPixmapItem(h *C.QGraphicsPixmapItem) *QGraphicsPixmapItem { if h == nil { return nil } + var outptr_QGraphicsItem *C.QGraphicsItem = nil + C.QGraphicsPixmapItem_virtbase(h, &outptr_QGraphicsItem) + return &QGraphicsPixmapItem{h: h, - QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} + QGraphicsItem: newQGraphicsItem(outptr_QGraphicsItem)} } // UnsafeNewQGraphicsPixmapItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsPixmapItem(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsPixmapItem { - if h == nil { - return nil - } - - return &QGraphicsPixmapItem{h: (*C.QGraphicsPixmapItem)(h), - QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} +func UnsafeNewQGraphicsPixmapItem(h unsafe.Pointer) *QGraphicsPixmapItem { + return newQGraphicsPixmapItem((*C.QGraphicsPixmapItem)(h)) } // NewQGraphicsPixmapItem constructs a new QGraphicsPixmapItem object. func NewQGraphicsPixmapItem() *QGraphicsPixmapItem { - var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPixmapItem_new(&outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) - ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(C.QGraphicsPixmapItem_new()) ret.isSubclass = true return ret } // NewQGraphicsPixmapItem2 constructs a new QGraphicsPixmapItem object. func NewQGraphicsPixmapItem2(pixmap *QPixmap) *QGraphicsPixmapItem { - var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPixmapItem_new2(pixmap.cPointer(), &outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) - ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(C.QGraphicsPixmapItem_new2(pixmap.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsPixmapItem3 constructs a new QGraphicsPixmapItem object. func NewQGraphicsPixmapItem3(parent *QGraphicsItem) *QGraphicsPixmapItem { - var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPixmapItem_new3(parent.cPointer(), &outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) - ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(C.QGraphicsPixmapItem_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsPixmapItem4 constructs a new QGraphicsPixmapItem object. func NewQGraphicsPixmapItem4(pixmap *QPixmap, parent *QGraphicsItem) *QGraphicsPixmapItem { - var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPixmapItem_new4(pixmap.cPointer(), parent.cPointer(), &outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) - ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(C.QGraphicsPixmapItem_new4(pixmap.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } func (this *QGraphicsPixmapItem) Pixmap() *QPixmap { - _goptr := newQPixmap(C.QGraphicsPixmapItem_Pixmap(this.h), nil) + _goptr := newQPixmap(C.QGraphicsPixmapItem_Pixmap(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -7697,9 +7558,9 @@ func miqt_exec_callback_QGraphicsPixmapItem_Paint(self *C.QGraphicsPixmapItem, c // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -8035,7 +7896,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_ContextMenuEvent(self *C.QGraphicsPi } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -8061,7 +7922,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_DragEnterEvent(self *C.QGraphicsPixm } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -8087,7 +7948,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_DragLeaveEvent(self *C.QGraphicsPixm } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -8113,7 +7974,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_DragMoveEvent(self *C.QGraphicsPixma } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -8139,7 +8000,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_DropEvent(self *C.QGraphicsPixmapIte } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DropEvent, slotval1) @@ -8165,7 +8026,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_FocusInEvent(self *C.QGraphicsPixmap } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -8191,7 +8052,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_FocusOutEvent(self *C.QGraphicsPixma } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -8217,7 +8078,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_HoverEnterEvent(self *C.QGraphicsPix } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -8243,7 +8104,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_HoverMoveEvent(self *C.QGraphicsPixm } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -8269,7 +8130,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_HoverLeaveEvent(self *C.QGraphicsPix } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -8295,7 +8156,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_KeyPressEvent(self *C.QGraphicsPixma } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -8321,7 +8182,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_KeyReleaseEvent(self *C.QGraphicsPix } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -8347,7 +8208,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_MousePressEvent(self *C.QGraphicsPix } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -8373,7 +8234,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_MouseMoveEvent(self *C.QGraphicsPixm } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -8399,7 +8260,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_MouseReleaseEvent(self *C.QGraphicsP } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -8425,7 +8286,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_MouseDoubleClickEvent(self *C.QGraph } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -8451,7 +8312,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_WheelEvent(self *C.QGraphicsPixmapIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -8477,7 +8338,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_InputMethodEvent(self *C.QGraphicsPi } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -8580,33 +8441,26 @@ func (this *QGraphicsTextItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsTextItem constructs the type using only CGO pointers. -func newQGraphicsTextItem(h *C.QGraphicsTextItem, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsTextItem { +func newQGraphicsTextItem(h *C.QGraphicsTextItem) *QGraphicsTextItem { if h == nil { return nil } + var outptr_QGraphicsObject *C.QGraphicsObject = nil + C.QGraphicsTextItem_virtbase(h, &outptr_QGraphicsObject) + return &QGraphicsTextItem{h: h, - QGraphicsObject: newQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem)} + QGraphicsObject: newQGraphicsObject(outptr_QGraphicsObject)} } // UnsafeNewQGraphicsTextItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsTextItem(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsTextItem { - if h == nil { - return nil - } - - return &QGraphicsTextItem{h: (*C.QGraphicsTextItem)(h), - QGraphicsObject: UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem)} +func UnsafeNewQGraphicsTextItem(h unsafe.Pointer) *QGraphicsTextItem { + return newQGraphicsTextItem((*C.QGraphicsTextItem)(h)) } // NewQGraphicsTextItem constructs a new QGraphicsTextItem object. func NewQGraphicsTextItem() *QGraphicsTextItem { - var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsTextItem_new(&outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsTextItem(C.QGraphicsTextItem_new()) ret.isSubclass = true return ret } @@ -8617,26 +8471,16 @@ func NewQGraphicsTextItem2(text string) *QGraphicsTextItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsTextItem_new2(text_ms, &outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsTextItem(C.QGraphicsTextItem_new2(text_ms)) ret.isSubclass = true return ret } // NewQGraphicsTextItem3 constructs a new QGraphicsTextItem object. func NewQGraphicsTextItem3(parent *QGraphicsItem) *QGraphicsTextItem { - var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsTextItem_new3(parent.cPointer(), &outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsTextItem(C.QGraphicsTextItem_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -8647,13 +8491,8 @@ func NewQGraphicsTextItem4(text string, parent *QGraphicsItem) *QGraphicsTextIte text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsTextItem_new4(text_ms, parent.cPointer(), &outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsTextItem(C.QGraphicsTextItem_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -8787,7 +8626,7 @@ func (this *QGraphicsTextItem) SetDocument(document *QTextDocument) { } func (this *QGraphicsTextItem) Document() *QTextDocument { - return newQTextDocument(C.QGraphicsTextItem_Document(this.h), nil) + return newQTextDocument(C.QGraphicsTextItem_Document(this.h)) } func (this *QGraphicsTextItem) SetTextInteractionFlags(flags TextInteractionFlag) { @@ -9026,9 +8865,9 @@ func miqt_exec_callback_QGraphicsTextItem_Paint(self *C.QGraphicsTextItem, cb C. // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -9162,7 +9001,7 @@ func miqt_exec_callback_QGraphicsTextItem_MousePressEvent(self *C.QGraphicsTextI } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -9188,7 +9027,7 @@ func miqt_exec_callback_QGraphicsTextItem_MouseMoveEvent(self *C.QGraphicsTextIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -9214,7 +9053,7 @@ func miqt_exec_callback_QGraphicsTextItem_MouseReleaseEvent(self *C.QGraphicsTex } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -9240,7 +9079,7 @@ func miqt_exec_callback_QGraphicsTextItem_MouseDoubleClickEvent(self *C.QGraphic } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -9266,7 +9105,7 @@ func miqt_exec_callback_QGraphicsTextItem_ContextMenuEvent(self *C.QGraphicsText } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -9292,7 +9131,7 @@ func miqt_exec_callback_QGraphicsTextItem_KeyPressEvent(self *C.QGraphicsTextIte } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -9318,7 +9157,7 @@ func miqt_exec_callback_QGraphicsTextItem_KeyReleaseEvent(self *C.QGraphicsTextI } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -9344,7 +9183,7 @@ func miqt_exec_callback_QGraphicsTextItem_FocusInEvent(self *C.QGraphicsTextItem } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -9370,7 +9209,7 @@ func miqt_exec_callback_QGraphicsTextItem_FocusOutEvent(self *C.QGraphicsTextIte } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -9396,7 +9235,7 @@ func miqt_exec_callback_QGraphicsTextItem_DragEnterEvent(self *C.QGraphicsTextIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -9422,7 +9261,7 @@ func miqt_exec_callback_QGraphicsTextItem_DragLeaveEvent(self *C.QGraphicsTextIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -9448,7 +9287,7 @@ func miqt_exec_callback_QGraphicsTextItem_DragMoveEvent(self *C.QGraphicsTextIte } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -9474,7 +9313,7 @@ func miqt_exec_callback_QGraphicsTextItem_DropEvent(self *C.QGraphicsTextItem, c } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DropEvent, slotval1) @@ -9500,7 +9339,7 @@ func miqt_exec_callback_QGraphicsTextItem_InputMethodEvent(self *C.QGraphicsText } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -9526,7 +9365,7 @@ func miqt_exec_callback_QGraphicsTextItem_HoverEnterEvent(self *C.QGraphicsTextI } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -9552,7 +9391,7 @@ func miqt_exec_callback_QGraphicsTextItem_HoverMoveEvent(self *C.QGraphicsTextIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -9578,7 +9417,7 @@ func miqt_exec_callback_QGraphicsTextItem_HoverLeaveEvent(self *C.QGraphicsTextI } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -9763,32 +9602,26 @@ func (this *QGraphicsSimpleTextItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsSimpleTextItem constructs the type using only CGO pointers. -func newQGraphicsSimpleTextItem(h *C.QGraphicsSimpleTextItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsSimpleTextItem { +func newQGraphicsSimpleTextItem(h *C.QGraphicsSimpleTextItem) *QGraphicsSimpleTextItem { if h == nil { return nil } + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + C.QGraphicsSimpleTextItem_virtbase(h, &outptr_QAbstractGraphicsShapeItem) + return &QGraphicsSimpleTextItem{h: h, - QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem)} } // UnsafeNewQGraphicsSimpleTextItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSimpleTextItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsSimpleTextItem { - if h == nil { - return nil - } - - return &QGraphicsSimpleTextItem{h: (*C.QGraphicsSimpleTextItem)(h), - QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} +func UnsafeNewQGraphicsSimpleTextItem(h unsafe.Pointer) *QGraphicsSimpleTextItem { + return newQGraphicsSimpleTextItem((*C.QGraphicsSimpleTextItem)(h)) } // NewQGraphicsSimpleTextItem constructs a new QGraphicsSimpleTextItem object. func NewQGraphicsSimpleTextItem() *QGraphicsSimpleTextItem { - var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSimpleTextItem_new(&outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(C.QGraphicsSimpleTextItem_new()) ret.isSubclass = true return ret } @@ -9799,24 +9632,16 @@ func NewQGraphicsSimpleTextItem2(text string) *QGraphicsSimpleTextItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSimpleTextItem_new2(text_ms, &outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(C.QGraphicsSimpleTextItem_new2(text_ms)) ret.isSubclass = true return ret } // NewQGraphicsSimpleTextItem3 constructs a new QGraphicsSimpleTextItem object. func NewQGraphicsSimpleTextItem3(parent *QGraphicsItem) *QGraphicsSimpleTextItem { - var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSimpleTextItem_new3(parent.cPointer(), &outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(C.QGraphicsSimpleTextItem_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -9827,12 +9652,8 @@ func NewQGraphicsSimpleTextItem4(text string, parent *QGraphicsItem) *QGraphicsS text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSimpleTextItem_new4(text_ms, parent.cPointer(), &outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(C.QGraphicsSimpleTextItem_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -10000,9 +9821,9 @@ func miqt_exec_callback_QGraphicsSimpleTextItem_Paint(self *C.QGraphicsSimpleTex // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -10209,42 +10030,34 @@ func (this *QGraphicsItemGroup) UnsafePointer() unsafe.Pointer { } // newQGraphicsItemGroup constructs the type using only CGO pointers. -func newQGraphicsItemGroup(h *C.QGraphicsItemGroup, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsItemGroup { +func newQGraphicsItemGroup(h *C.QGraphicsItemGroup) *QGraphicsItemGroup { if h == nil { return nil } + var outptr_QGraphicsItem *C.QGraphicsItem = nil + C.QGraphicsItemGroup_virtbase(h, &outptr_QGraphicsItem) + return &QGraphicsItemGroup{h: h, - QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} + QGraphicsItem: newQGraphicsItem(outptr_QGraphicsItem)} } // UnsafeNewQGraphicsItemGroup constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsItemGroup(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsItemGroup { - if h == nil { - return nil - } - - return &QGraphicsItemGroup{h: (*C.QGraphicsItemGroup)(h), - QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} +func UnsafeNewQGraphicsItemGroup(h unsafe.Pointer) *QGraphicsItemGroup { + return newQGraphicsItemGroup((*C.QGraphicsItemGroup)(h)) } // NewQGraphicsItemGroup constructs a new QGraphicsItemGroup object. func NewQGraphicsItemGroup() *QGraphicsItemGroup { - var outptr_QGraphicsItemGroup *C.QGraphicsItemGroup = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsItemGroup_new(&outptr_QGraphicsItemGroup, &outptr_QGraphicsItem) - ret := newQGraphicsItemGroup(outptr_QGraphicsItemGroup, outptr_QGraphicsItem) + ret := newQGraphicsItemGroup(C.QGraphicsItemGroup_new()) ret.isSubclass = true return ret } // NewQGraphicsItemGroup2 constructs a new QGraphicsItemGroup object. func NewQGraphicsItemGroup2(parent *QGraphicsItem) *QGraphicsItemGroup { - var outptr_QGraphicsItemGroup *C.QGraphicsItemGroup = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsItemGroup_new2(parent.cPointer(), &outptr_QGraphicsItemGroup, &outptr_QGraphicsItem) - ret := newQGraphicsItemGroup(outptr_QGraphicsItemGroup, outptr_QGraphicsItem) + ret := newQGraphicsItemGroup(C.QGraphicsItemGroup_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -10330,9 +10143,9 @@ func miqt_exec_callback_QGraphicsItemGroup_Paint(self *C.QGraphicsItemGroup, cb // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -10637,7 +10450,7 @@ func miqt_exec_callback_QGraphicsItemGroup_ContextMenuEvent(self *C.QGraphicsIte } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -10663,7 +10476,7 @@ func miqt_exec_callback_QGraphicsItemGroup_DragEnterEvent(self *C.QGraphicsItemG } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -10689,7 +10502,7 @@ func miqt_exec_callback_QGraphicsItemGroup_DragLeaveEvent(self *C.QGraphicsItemG } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -10715,7 +10528,7 @@ func miqt_exec_callback_QGraphicsItemGroup_DragMoveEvent(self *C.QGraphicsItemGr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -10741,7 +10554,7 @@ func miqt_exec_callback_QGraphicsItemGroup_DropEvent(self *C.QGraphicsItemGroup, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DropEvent, slotval1) @@ -10767,7 +10580,7 @@ func miqt_exec_callback_QGraphicsItemGroup_FocusInEvent(self *C.QGraphicsItemGro } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -10793,7 +10606,7 @@ func miqt_exec_callback_QGraphicsItemGroup_FocusOutEvent(self *C.QGraphicsItemGr } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -10819,7 +10632,7 @@ func miqt_exec_callback_QGraphicsItemGroup_HoverEnterEvent(self *C.QGraphicsItem } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -10845,7 +10658,7 @@ func miqt_exec_callback_QGraphicsItemGroup_HoverMoveEvent(self *C.QGraphicsItemG } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -10871,7 +10684,7 @@ func miqt_exec_callback_QGraphicsItemGroup_HoverLeaveEvent(self *C.QGraphicsItem } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -10897,7 +10710,7 @@ func miqt_exec_callback_QGraphicsItemGroup_KeyPressEvent(self *C.QGraphicsItemGr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -10923,7 +10736,7 @@ func miqt_exec_callback_QGraphicsItemGroup_KeyReleaseEvent(self *C.QGraphicsItem } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -10949,7 +10762,7 @@ func miqt_exec_callback_QGraphicsItemGroup_MousePressEvent(self *C.QGraphicsItem } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -10975,7 +10788,7 @@ func miqt_exec_callback_QGraphicsItemGroup_MouseMoveEvent(self *C.QGraphicsItemG } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -11001,7 +10814,7 @@ func miqt_exec_callback_QGraphicsItemGroup_MouseReleaseEvent(self *C.QGraphicsIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -11027,7 +10840,7 @@ func miqt_exec_callback_QGraphicsItemGroup_MouseDoubleClickEvent(self *C.QGraphi } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -11053,7 +10866,7 @@ func miqt_exec_callback_QGraphicsItemGroup_WheelEvent(self *C.QGraphicsItemGroup } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -11079,7 +10892,7 @@ func miqt_exec_callback_QGraphicsItemGroup_InputMethodEvent(self *C.QGraphicsIte } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qgraphicsitem.h b/qt/gen_qgraphicsitem.h index bc6840a2..33126d92 100644 --- a/qt/gen_qgraphicsitem.h +++ b/qt/gen_qgraphicsitem.h @@ -118,8 +118,8 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QGraphicsItem_new(QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsItem_new2(QGraphicsItem* parent, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsItem* QGraphicsItem_new(); +QGraphicsItem* QGraphicsItem_new2(QGraphicsItem* parent); QGraphicsScene* QGraphicsItem_Scene(const QGraphicsItem* self); QGraphicsItem* QGraphicsItem_ParentItem(const QGraphicsItem* self); QGraphicsItem* QGraphicsItem_TopLevelItem(const QGraphicsItem* self); @@ -397,8 +397,9 @@ void QGraphicsItem_override_virtual_Extension(void* self, intptr_t slot); QVariant* QGraphicsItem_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsItem_Delete(QGraphicsItem* self, bool isSubclass); -void QGraphicsObject_new(QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsObject_new2(QGraphicsItem* parent, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsObject* QGraphicsObject_new(); +QGraphicsObject* QGraphicsObject_new2(QGraphicsItem* parent); +void QGraphicsObject_virtbase(QGraphicsObject* src, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); QMetaObject* QGraphicsObject_MetaObject(const QGraphicsObject* self); void* QGraphicsObject_Metacast(QGraphicsObject* self, const char* param1); struct miqt_string QGraphicsObject_Tr(const char* s); @@ -521,8 +522,9 @@ void QGraphicsObject_override_virtual_Extension(void* self, intptr_t slot); QVariant* QGraphicsObject_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsObject_Delete(QGraphicsObject* self, bool isSubclass); -void QAbstractGraphicsShapeItem_new(QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QAbstractGraphicsShapeItem_new2(QGraphicsItem* parent, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +QAbstractGraphicsShapeItem* QAbstractGraphicsShapeItem_new(); +QAbstractGraphicsShapeItem* QAbstractGraphicsShapeItem_new2(QGraphicsItem* parent); +void QAbstractGraphicsShapeItem_virtbase(QAbstractGraphicsShapeItem* src, QGraphicsItem** outptr_QGraphicsItem); QPen* QAbstractGraphicsShapeItem_Pen(const QAbstractGraphicsShapeItem* self); void QAbstractGraphicsShapeItem_SetPen(QAbstractGraphicsShapeItem* self, QPen* pen); QBrush* QAbstractGraphicsShapeItem_Brush(const QAbstractGraphicsShapeItem* self); @@ -601,10 +603,11 @@ void QAbstractGraphicsShapeItem_override_virtual_Extension(void* self, intptr_t QVariant* QAbstractGraphicsShapeItem_virtualbase_Extension(const void* self, QVariant* variant); void QAbstractGraphicsShapeItem_Delete(QAbstractGraphicsShapeItem* self, bool isSubclass); -void QGraphicsPathItem_new(QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsPathItem_new2(QPainterPath* path, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsPathItem_new3(QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsPathItem* QGraphicsPathItem_new(); +QGraphicsPathItem* QGraphicsPathItem_new2(QPainterPath* path); +QGraphicsPathItem* QGraphicsPathItem_new3(QGraphicsItem* parent); +QGraphicsPathItem* QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent); +void QGraphicsPathItem_virtbase(QGraphicsPathItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem); QPainterPath* QGraphicsPathItem_Path(const QGraphicsPathItem* self); void QGraphicsPathItem_SetPath(QGraphicsPathItem* self, QPainterPath* path); QRectF* QGraphicsPathItem_BoundingRect(const QGraphicsPathItem* self); @@ -639,12 +642,13 @@ void QGraphicsPathItem_override_virtual_Extension(void* self, intptr_t slot); QVariant* QGraphicsPathItem_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsPathItem_Delete(QGraphicsPathItem* self, bool isSubclass); -void QGraphicsRectItem_new(QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsRectItem_new2(QRectF* rect, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsRectItem_new3(double x, double y, double w, double h, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsRectItem_new4(QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsRectItem* QGraphicsRectItem_new(); +QGraphicsRectItem* QGraphicsRectItem_new2(QRectF* rect); +QGraphicsRectItem* QGraphicsRectItem_new3(double x, double y, double w, double h); +QGraphicsRectItem* QGraphicsRectItem_new4(QGraphicsItem* parent); +QGraphicsRectItem* QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent); +QGraphicsRectItem* QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent); +void QGraphicsRectItem_virtbase(QGraphicsRectItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem); QRectF* QGraphicsRectItem_Rect(const QGraphicsRectItem* self); void QGraphicsRectItem_SetRect(QGraphicsRectItem* self, QRectF* rect); void QGraphicsRectItem_SetRect2(QGraphicsRectItem* self, double x, double y, double w, double h); @@ -680,12 +684,13 @@ void QGraphicsRectItem_override_virtual_Extension(void* self, intptr_t slot); QVariant* QGraphicsRectItem_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsRectItem_Delete(QGraphicsRectItem* self, bool isSubclass); -void QGraphicsEllipseItem_new(QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsEllipseItem_new2(QRectF* rect, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsEllipseItem_new3(double x, double y, double w, double h, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsEllipseItem_new4(QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsEllipseItem* QGraphicsEllipseItem_new(); +QGraphicsEllipseItem* QGraphicsEllipseItem_new2(QRectF* rect); +QGraphicsEllipseItem* QGraphicsEllipseItem_new3(double x, double y, double w, double h); +QGraphicsEllipseItem* QGraphicsEllipseItem_new4(QGraphicsItem* parent); +QGraphicsEllipseItem* QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent); +QGraphicsEllipseItem* QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent); +void QGraphicsEllipseItem_virtbase(QGraphicsEllipseItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem); QRectF* QGraphicsEllipseItem_Rect(const QGraphicsEllipseItem* self); void QGraphicsEllipseItem_SetRect(QGraphicsEllipseItem* self, QRectF* rect); void QGraphicsEllipseItem_SetRect2(QGraphicsEllipseItem* self, double x, double y, double w, double h); @@ -725,8 +730,9 @@ void QGraphicsEllipseItem_override_virtual_Extension(void* self, intptr_t slot); QVariant* QGraphicsEllipseItem_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsEllipseItem_Delete(QGraphicsEllipseItem* self, bool isSubclass); -void QGraphicsPolygonItem_new(QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsPolygonItem_new2(QGraphicsItem* parent, QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsPolygonItem* QGraphicsPolygonItem_new(); +QGraphicsPolygonItem* QGraphicsPolygonItem_new2(QGraphicsItem* parent); +void QGraphicsPolygonItem_virtbase(QGraphicsPolygonItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem); int QGraphicsPolygonItem_FillRule(const QGraphicsPolygonItem* self); void QGraphicsPolygonItem_SetFillRule(QGraphicsPolygonItem* self, int rule); QRectF* QGraphicsPolygonItem_BoundingRect(const QGraphicsPolygonItem* self); @@ -761,12 +767,13 @@ void QGraphicsPolygonItem_override_virtual_Extension(void* self, intptr_t slot); QVariant* QGraphicsPolygonItem_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsPolygonItem_Delete(QGraphicsPolygonItem* self, bool isSubclass); -void QGraphicsLineItem_new(QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsLineItem_new2(QLineF* line, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsLineItem_new3(double x1, double y1, double x2, double y2, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsLineItem_new4(QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsLineItem* QGraphicsLineItem_new(); +QGraphicsLineItem* QGraphicsLineItem_new2(QLineF* line); +QGraphicsLineItem* QGraphicsLineItem_new3(double x1, double y1, double x2, double y2); +QGraphicsLineItem* QGraphicsLineItem_new4(QGraphicsItem* parent); +QGraphicsLineItem* QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent); +QGraphicsLineItem* QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent); +void QGraphicsLineItem_virtbase(QGraphicsLineItem* src, QGraphicsItem** outptr_QGraphicsItem); QPen* QGraphicsLineItem_Pen(const QGraphicsLineItem* self); void QGraphicsLineItem_SetPen(QGraphicsLineItem* self, QPen* pen); QLineF* QGraphicsLineItem_Line(const QGraphicsLineItem* self); @@ -854,10 +861,11 @@ void QGraphicsLineItem_override_virtual_ItemChange(void* self, intptr_t slot); QVariant* QGraphicsLineItem_virtualbase_ItemChange(void* self, int change, QVariant* value); void QGraphicsLineItem_Delete(QGraphicsLineItem* self, bool isSubclass); -void QGraphicsPixmapItem_new(QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsPixmapItem_new2(QPixmap* pixmap, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsPixmapItem_new3(QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsPixmapItem* QGraphicsPixmapItem_new(); +QGraphicsPixmapItem* QGraphicsPixmapItem_new2(QPixmap* pixmap); +QGraphicsPixmapItem* QGraphicsPixmapItem_new3(QGraphicsItem* parent); +QGraphicsPixmapItem* QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent); +void QGraphicsPixmapItem_virtbase(QGraphicsPixmapItem* src, QGraphicsItem** outptr_QGraphicsItem); QPixmap* QGraphicsPixmapItem_Pixmap(const QGraphicsPixmapItem* self); void QGraphicsPixmapItem_SetPixmap(QGraphicsPixmapItem* self, QPixmap* pixmap); int QGraphicsPixmapItem_TransformationMode(const QGraphicsPixmapItem* self); @@ -949,10 +957,11 @@ void QGraphicsPixmapItem_override_virtual_ItemChange(void* self, intptr_t slot); QVariant* QGraphicsPixmapItem_virtualbase_ItemChange(void* self, int change, QVariant* value); void QGraphicsPixmapItem_Delete(QGraphicsPixmapItem* self, bool isSubclass); -void QGraphicsTextItem_new(QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsTextItem_new2(struct miqt_string text, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsTextItem_new3(QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsTextItem* QGraphicsTextItem_new(); +QGraphicsTextItem* QGraphicsTextItem_new2(struct miqt_string text); +QGraphicsTextItem* QGraphicsTextItem_new3(QGraphicsItem* parent); +QGraphicsTextItem* QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent); +void QGraphicsTextItem_virtbase(QGraphicsTextItem* src, QGraphicsObject** outptr_QGraphicsObject); QMetaObject* QGraphicsTextItem_MetaObject(const QGraphicsTextItem* self); void* QGraphicsTextItem_Metacast(QGraphicsTextItem* self, const char* param1); struct miqt_string QGraphicsTextItem_Tr(const char* s); @@ -1077,10 +1086,11 @@ void QGraphicsTextItem_override_virtual_Event(void* self, intptr_t slot); bool QGraphicsTextItem_virtualbase_Event(void* self, QEvent* ev); void QGraphicsTextItem_Delete(QGraphicsTextItem* self, bool isSubclass); -void QGraphicsSimpleTextItem_new(QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsSimpleTextItem_new2(struct miqt_string text, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsSimpleTextItem_new3(QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new(); +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new2(struct miqt_string text); +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new3(QGraphicsItem* parent); +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent); +void QGraphicsSimpleTextItem_virtbase(QGraphicsSimpleTextItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem); void QGraphicsSimpleTextItem_SetText(QGraphicsSimpleTextItem* self, struct miqt_string text); struct miqt_string QGraphicsSimpleTextItem_Text(const QGraphicsSimpleTextItem* self); void QGraphicsSimpleTextItem_SetFont(QGraphicsSimpleTextItem* self, QFont* font); @@ -1117,8 +1127,9 @@ void QGraphicsSimpleTextItem_override_virtual_Extension(void* self, intptr_t slo QVariant* QGraphicsSimpleTextItem_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsSimpleTextItem_Delete(QGraphicsSimpleTextItem* self, bool isSubclass); -void QGraphicsItemGroup_new(QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsItemGroup_new2(QGraphicsItem* parent, QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsItemGroup* QGraphicsItemGroup_new(); +QGraphicsItemGroup* QGraphicsItemGroup_new2(QGraphicsItem* parent); +void QGraphicsItemGroup_virtbase(QGraphicsItemGroup* src, QGraphicsItem** outptr_QGraphicsItem); void QGraphicsItemGroup_AddToGroup(QGraphicsItemGroup* self, QGraphicsItem* item); void QGraphicsItemGroup_RemoveFromGroup(QGraphicsItemGroup* self, QGraphicsItem* item); QRectF* QGraphicsItemGroup_BoundingRect(const QGraphicsItemGroup* self); diff --git a/qt/gen_qgraphicsitemanimation.cpp b/qt/gen_qgraphicsitemanimation.cpp index ec3c082b..a963a66e 100644 --- a/qt/gen_qgraphicsitemanimation.cpp +++ b/qt/gen_qgraphicsitemanimation.cpp @@ -250,16 +250,16 @@ public: }; -void QGraphicsItemAnimation_new(QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject) { - MiqtVirtualQGraphicsItemAnimation* ret = new MiqtVirtualQGraphicsItemAnimation(); - *outptr_QGraphicsItemAnimation = ret; - *outptr_QObject = static_cast(ret); +QGraphicsItemAnimation* QGraphicsItemAnimation_new() { + return new MiqtVirtualQGraphicsItemAnimation(); } -void QGraphicsItemAnimation_new2(QObject* parent, QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject) { - MiqtVirtualQGraphicsItemAnimation* ret = new MiqtVirtualQGraphicsItemAnimation(parent); - *outptr_QGraphicsItemAnimation = ret; - *outptr_QObject = static_cast(ret); +QGraphicsItemAnimation* QGraphicsItemAnimation_new2(QObject* parent) { + return new MiqtVirtualQGraphicsItemAnimation(parent); +} + +void QGraphicsItemAnimation_virtbase(QGraphicsItemAnimation* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QGraphicsItemAnimation_MetaObject(const QGraphicsItemAnimation* self) { diff --git a/qt/gen_qgraphicsitemanimation.go b/qt/gen_qgraphicsitemanimation.go index 2c747fc5..0d7120e4 100644 --- a/qt/gen_qgraphicsitemanimation.go +++ b/qt/gen_qgraphicsitemanimation.go @@ -35,42 +35,34 @@ func (this *QGraphicsItemAnimation) UnsafePointer() unsafe.Pointer { } // newQGraphicsItemAnimation constructs the type using only CGO pointers. -func newQGraphicsItemAnimation(h *C.QGraphicsItemAnimation, h_QObject *C.QObject) *QGraphicsItemAnimation { +func newQGraphicsItemAnimation(h *C.QGraphicsItemAnimation) *QGraphicsItemAnimation { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QGraphicsItemAnimation_virtbase(h, &outptr_QObject) + return &QGraphicsItemAnimation{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQGraphicsItemAnimation constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsItemAnimation(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsItemAnimation { - if h == nil { - return nil - } - - return &QGraphicsItemAnimation{h: (*C.QGraphicsItemAnimation)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQGraphicsItemAnimation(h unsafe.Pointer) *QGraphicsItemAnimation { + return newQGraphicsItemAnimation((*C.QGraphicsItemAnimation)(h)) } // NewQGraphicsItemAnimation constructs a new QGraphicsItemAnimation object. func NewQGraphicsItemAnimation() *QGraphicsItemAnimation { - var outptr_QGraphicsItemAnimation *C.QGraphicsItemAnimation = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsItemAnimation_new(&outptr_QGraphicsItemAnimation, &outptr_QObject) - ret := newQGraphicsItemAnimation(outptr_QGraphicsItemAnimation, outptr_QObject) + ret := newQGraphicsItemAnimation(C.QGraphicsItemAnimation_new()) ret.isSubclass = true return ret } // NewQGraphicsItemAnimation2 constructs a new QGraphicsItemAnimation object. func NewQGraphicsItemAnimation2(parent *QObject) *QGraphicsItemAnimation { - var outptr_QGraphicsItemAnimation *C.QGraphicsItemAnimation = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsItemAnimation_new2(parent.cPointer(), &outptr_QGraphicsItemAnimation, &outptr_QObject) - ret := newQGraphicsItemAnimation(outptr_QGraphicsItemAnimation, outptr_QObject) + ret := newQGraphicsItemAnimation(C.QGraphicsItemAnimation_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -112,7 +104,7 @@ func (this *QGraphicsItemAnimation) SetItem(item *QGraphicsItem) { } func (this *QGraphicsItemAnimation) TimeLine() *QTimeLine { - return newQTimeLine(C.QGraphicsItemAnimation_TimeLine(this.h), nil) + return newQTimeLine(C.QGraphicsItemAnimation_TimeLine(this.h)) } func (this *QGraphicsItemAnimation) SetTimeLine(timeLine *QTimeLine) { @@ -509,7 +501,7 @@ func miqt_exec_callback_QGraphicsItemAnimation_TimerEvent(self *C.QGraphicsItemA } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -535,7 +527,7 @@ func miqt_exec_callback_QGraphicsItemAnimation_ChildEvent(self *C.QGraphicsItemA } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qgraphicsitemanimation.h b/qt/gen_qgraphicsitemanimation.h index 8b5ef609..9dc98af7 100644 --- a/qt/gen_qgraphicsitemanimation.h +++ b/qt/gen_qgraphicsitemanimation.h @@ -42,8 +42,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QTransform QTransform; #endif -void QGraphicsItemAnimation_new(QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject); -void QGraphicsItemAnimation_new2(QObject* parent, QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject); +QGraphicsItemAnimation* QGraphicsItemAnimation_new(); +QGraphicsItemAnimation* QGraphicsItemAnimation_new2(QObject* parent); +void QGraphicsItemAnimation_virtbase(QGraphicsItemAnimation* src, QObject** outptr_QObject); QMetaObject* QGraphicsItemAnimation_MetaObject(const QGraphicsItemAnimation* self); void* QGraphicsItemAnimation_Metacast(QGraphicsItemAnimation* self, const char* param1); struct miqt_string QGraphicsItemAnimation_Tr(const char* s); diff --git a/qt/gen_qgraphicslayout.cpp b/qt/gen_qgraphicslayout.cpp index 7c756127..82855820 100644 --- a/qt/gen_qgraphicslayout.cpp +++ b/qt/gen_qgraphicslayout.cpp @@ -211,16 +211,16 @@ public: }; -void QGraphicsLayout_new(QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLayout* ret = new MiqtVirtualQGraphicsLayout(); - *outptr_QGraphicsLayout = ret; - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsLayout* QGraphicsLayout_new() { + return new MiqtVirtualQGraphicsLayout(); } -void QGraphicsLayout_new2(QGraphicsLayoutItem* parent, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLayout* ret = new MiqtVirtualQGraphicsLayout(parent); - *outptr_QGraphicsLayout = ret; - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsLayout* QGraphicsLayout_new2(QGraphicsLayoutItem* parent) { + return new MiqtVirtualQGraphicsLayout(parent); +} + +void QGraphicsLayout_virtbase(QGraphicsLayout* src, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + *outptr_QGraphicsLayoutItem = static_cast(src); } void QGraphicsLayout_SetContentsMargins(QGraphicsLayout* self, double left, double top, double right, double bottom) { diff --git a/qt/gen_qgraphicslayout.go b/qt/gen_qgraphicslayout.go index 1a6fdd8e..b23ec123 100644 --- a/qt/gen_qgraphicslayout.go +++ b/qt/gen_qgraphicslayout.go @@ -35,42 +35,34 @@ func (this *QGraphicsLayout) UnsafePointer() unsafe.Pointer { } // newQGraphicsLayout constructs the type using only CGO pointers. -func newQGraphicsLayout(h *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsLayout { +func newQGraphicsLayout(h *C.QGraphicsLayout) *QGraphicsLayout { if h == nil { return nil } + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + C.QGraphicsLayout_virtbase(h, &outptr_QGraphicsLayoutItem) + return &QGraphicsLayout{h: h, - QGraphicsLayoutItem: newQGraphicsLayoutItem(h_QGraphicsLayoutItem)} + QGraphicsLayoutItem: newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem)} } // UnsafeNewQGraphicsLayout constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsLayout(h unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsLayout { - if h == nil { - return nil - } - - return &QGraphicsLayout{h: (*C.QGraphicsLayout)(h), - QGraphicsLayoutItem: UnsafeNewQGraphicsLayoutItem(h_QGraphicsLayoutItem)} +func UnsafeNewQGraphicsLayout(h unsafe.Pointer) *QGraphicsLayout { + return newQGraphicsLayout((*C.QGraphicsLayout)(h)) } // NewQGraphicsLayout constructs a new QGraphicsLayout object. func NewQGraphicsLayout() *QGraphicsLayout { - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLayout_new(&outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLayout(outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayout(C.QGraphicsLayout_new()) ret.isSubclass = true return ret } // NewQGraphicsLayout2 constructs a new QGraphicsLayout object. func NewQGraphicsLayout2(parent *QGraphicsLayoutItem) *QGraphicsLayout { - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLayout_new2(parent.cPointer(), &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLayout(outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayout(C.QGraphicsLayout_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qgraphicslayout.h b/qt/gen_qgraphicslayout.h index 167e4473..23d7681a 100644 --- a/qt/gen_qgraphicslayout.h +++ b/qt/gen_qgraphicslayout.h @@ -28,8 +28,9 @@ typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; #endif -void QGraphicsLayout_new(QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsLayout_new2(QGraphicsLayoutItem* parent, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QGraphicsLayout* QGraphicsLayout_new(); +QGraphicsLayout* QGraphicsLayout_new2(QGraphicsLayoutItem* parent); +void QGraphicsLayout_virtbase(QGraphicsLayout* src, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); void QGraphicsLayout_SetContentsMargins(QGraphicsLayout* self, double left, double top, double right, double bottom); void QGraphicsLayout_GetContentsMargins(const QGraphicsLayout* self, double* left, double* top, double* right, double* bottom); void QGraphicsLayout_Activate(QGraphicsLayout* self); diff --git a/qt/gen_qgraphicslayoutitem.cpp b/qt/gen_qgraphicslayoutitem.cpp index 241e8c25..c1c9aa8f 100644 --- a/qt/gen_qgraphicslayoutitem.cpp +++ b/qt/gen_qgraphicslayoutitem.cpp @@ -118,19 +118,16 @@ public: }; -void QGraphicsLayoutItem_new(QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLayoutItem* ret = new MiqtVirtualQGraphicsLayoutItem(); - *outptr_QGraphicsLayoutItem = ret; +QGraphicsLayoutItem* QGraphicsLayoutItem_new() { + return new MiqtVirtualQGraphicsLayoutItem(); } -void QGraphicsLayoutItem_new2(QGraphicsLayoutItem* parent, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLayoutItem* ret = new MiqtVirtualQGraphicsLayoutItem(parent); - *outptr_QGraphicsLayoutItem = ret; +QGraphicsLayoutItem* QGraphicsLayoutItem_new2(QGraphicsLayoutItem* parent) { + return new MiqtVirtualQGraphicsLayoutItem(parent); } -void QGraphicsLayoutItem_new3(QGraphicsLayoutItem* parent, bool isLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLayoutItem* ret = new MiqtVirtualQGraphicsLayoutItem(parent, isLayout); - *outptr_QGraphicsLayoutItem = ret; +QGraphicsLayoutItem* QGraphicsLayoutItem_new3(QGraphicsLayoutItem* parent, bool isLayout) { + return new MiqtVirtualQGraphicsLayoutItem(parent, isLayout); } void QGraphicsLayoutItem_SetSizePolicy(QGraphicsLayoutItem* self, QSizePolicy* policy) { diff --git a/qt/gen_qgraphicslayoutitem.go b/qt/gen_qgraphicslayoutitem.go index 7a607bd0..0b264ecc 100644 --- a/qt/gen_qgraphicslayoutitem.go +++ b/qt/gen_qgraphicslayoutitem.go @@ -38,44 +38,35 @@ func newQGraphicsLayoutItem(h *C.QGraphicsLayoutItem) *QGraphicsLayoutItem { if h == nil { return nil } + return &QGraphicsLayoutItem{h: h} } // UnsafeNewQGraphicsLayoutItem constructs the type using only unsafe pointers. func UnsafeNewQGraphicsLayoutItem(h unsafe.Pointer) *QGraphicsLayoutItem { - if h == nil { - return nil - } - - return &QGraphicsLayoutItem{h: (*C.QGraphicsLayoutItem)(h)} + return newQGraphicsLayoutItem((*C.QGraphicsLayoutItem)(h)) } // NewQGraphicsLayoutItem constructs a new QGraphicsLayoutItem object. func NewQGraphicsLayoutItem() *QGraphicsLayoutItem { - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLayoutItem_new(&outptr_QGraphicsLayoutItem) - ret := newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayoutItem(C.QGraphicsLayoutItem_new()) ret.isSubclass = true return ret } // NewQGraphicsLayoutItem2 constructs a new QGraphicsLayoutItem object. func NewQGraphicsLayoutItem2(parent *QGraphicsLayoutItem) *QGraphicsLayoutItem { - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLayoutItem_new2(parent.cPointer(), &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayoutItem(C.QGraphicsLayoutItem_new2(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsLayoutItem3 constructs a new QGraphicsLayoutItem object. func NewQGraphicsLayoutItem3(parent *QGraphicsLayoutItem, isLayout bool) *QGraphicsLayoutItem { - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLayoutItem_new3(parent.cPointer(), (C.bool)(isLayout), &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayoutItem(C.QGraphicsLayoutItem_new3(parent.cPointer(), (C.bool)(isLayout))) ret.isSubclass = true return ret } diff --git a/qt/gen_qgraphicslayoutitem.h b/qt/gen_qgraphicslayoutitem.h index 5c683ae2..fac611fe 100644 --- a/qt/gen_qgraphicslayoutitem.h +++ b/qt/gen_qgraphicslayoutitem.h @@ -28,9 +28,9 @@ typedef struct QSizeF QSizeF; typedef struct QSizePolicy QSizePolicy; #endif -void QGraphicsLayoutItem_new(QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsLayoutItem_new2(QGraphicsLayoutItem* parent, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsLayoutItem_new3(QGraphicsLayoutItem* parent, bool isLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QGraphicsLayoutItem* QGraphicsLayoutItem_new(); +QGraphicsLayoutItem* QGraphicsLayoutItem_new2(QGraphicsLayoutItem* parent); +QGraphicsLayoutItem* QGraphicsLayoutItem_new3(QGraphicsLayoutItem* parent, bool isLayout); void QGraphicsLayoutItem_SetSizePolicy(QGraphicsLayoutItem* self, QSizePolicy* policy); void QGraphicsLayoutItem_SetSizePolicy2(QGraphicsLayoutItem* self, int hPolicy, int vPolicy); QSizePolicy* QGraphicsLayoutItem_SizePolicy(const QGraphicsLayoutItem* self); diff --git a/qt/gen_qgraphicslinearlayout.cpp b/qt/gen_qgraphicslinearlayout.cpp index f7372267..673474f5 100644 --- a/qt/gen_qgraphicslinearlayout.cpp +++ b/qt/gen_qgraphicslinearlayout.cpp @@ -243,32 +243,24 @@ public: }; -void QGraphicsLinearLayout_new(QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(); - *outptr_QGraphicsLinearLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsLinearLayout* QGraphicsLinearLayout_new() { + return new MiqtVirtualQGraphicsLinearLayout(); } -void QGraphicsLinearLayout_new2(int orientation, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(static_cast(orientation)); - *outptr_QGraphicsLinearLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsLinearLayout* QGraphicsLinearLayout_new2(int orientation) { + return new MiqtVirtualQGraphicsLinearLayout(static_cast(orientation)); } -void QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(parent); - *outptr_QGraphicsLinearLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsLinearLayout* QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent) { + return new MiqtVirtualQGraphicsLinearLayout(parent); } -void QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(static_cast(orientation), parent); - *outptr_QGraphicsLinearLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsLinearLayout* QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent) { + return new MiqtVirtualQGraphicsLinearLayout(static_cast(orientation), parent); +} + +void QGraphicsLinearLayout_virtbase(QGraphicsLinearLayout* src, QGraphicsLayout** outptr_QGraphicsLayout) { + *outptr_QGraphicsLayout = static_cast(src); } void QGraphicsLinearLayout_SetOrientation(QGraphicsLinearLayout* self, int orientation) { diff --git a/qt/gen_qgraphicslinearlayout.go b/qt/gen_qgraphicslinearlayout.go index e3e86e90..dc1bdaf3 100644 --- a/qt/gen_qgraphicslinearlayout.go +++ b/qt/gen_qgraphicslinearlayout.go @@ -35,68 +35,50 @@ func (this *QGraphicsLinearLayout) UnsafePointer() unsafe.Pointer { } // newQGraphicsLinearLayout constructs the type using only CGO pointers. -func newQGraphicsLinearLayout(h *C.QGraphicsLinearLayout, h_QGraphicsLayout *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsLinearLayout { +func newQGraphicsLinearLayout(h *C.QGraphicsLinearLayout) *QGraphicsLinearLayout { if h == nil { return nil } + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + C.QGraphicsLinearLayout_virtbase(h, &outptr_QGraphicsLayout) + return &QGraphicsLinearLayout{h: h, - QGraphicsLayout: newQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} + QGraphicsLayout: newQGraphicsLayout(outptr_QGraphicsLayout)} } // UnsafeNewQGraphicsLinearLayout constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsLinearLayout(h unsafe.Pointer, h_QGraphicsLayout unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsLinearLayout { - if h == nil { - return nil - } - - return &QGraphicsLinearLayout{h: (*C.QGraphicsLinearLayout)(h), - QGraphicsLayout: UnsafeNewQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} +func UnsafeNewQGraphicsLinearLayout(h unsafe.Pointer) *QGraphicsLinearLayout { + return newQGraphicsLinearLayout((*C.QGraphicsLinearLayout)(h)) } // NewQGraphicsLinearLayout constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout() *QGraphicsLinearLayout { - var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLinearLayout_new(&outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(C.QGraphicsLinearLayout_new()) ret.isSubclass = true return ret } // NewQGraphicsLinearLayout2 constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout2(orientation Orientation) *QGraphicsLinearLayout { - var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLinearLayout_new2((C.int)(orientation), &outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(C.QGraphicsLinearLayout_new2((C.int)(orientation))) ret.isSubclass = true return ret } // NewQGraphicsLinearLayout3 constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout3(parent *QGraphicsLayoutItem) *QGraphicsLinearLayout { - var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLinearLayout_new3(parent.cPointer(), &outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(C.QGraphicsLinearLayout_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsLinearLayout4 constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout4(orientation Orientation, parent *QGraphicsLayoutItem) *QGraphicsLinearLayout { - var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLinearLayout_new4((C.int)(orientation), parent.cPointer(), &outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(C.QGraphicsLinearLayout_new4((C.int)(orientation), parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qgraphicslinearlayout.h b/qt/gen_qgraphicslinearlayout.h index 43e17b2d..65e9f3bb 100644 --- a/qt/gen_qgraphicslinearlayout.h +++ b/qt/gen_qgraphicslinearlayout.h @@ -30,10 +30,11 @@ typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; #endif -void QGraphicsLinearLayout_new(QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsLinearLayout_new2(int orientation, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QGraphicsLinearLayout* QGraphicsLinearLayout_new(); +QGraphicsLinearLayout* QGraphicsLinearLayout_new2(int orientation); +QGraphicsLinearLayout* QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent); +QGraphicsLinearLayout* QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent); +void QGraphicsLinearLayout_virtbase(QGraphicsLinearLayout* src, QGraphicsLayout** outptr_QGraphicsLayout); void QGraphicsLinearLayout_SetOrientation(QGraphicsLinearLayout* self, int orientation); int QGraphicsLinearLayout_Orientation(const QGraphicsLinearLayout* self); void QGraphicsLinearLayout_AddItem(QGraphicsLinearLayout* self, QGraphicsLayoutItem* item); diff --git a/qt/gen_qgraphicsproxywidget.cpp b/qt/gen_qgraphicsproxywidget.cpp index 13af69dd..fb3afccb 100644 --- a/qt/gen_qgraphicsproxywidget.cpp +++ b/qt/gen_qgraphicsproxywidget.cpp @@ -1217,34 +1217,20 @@ public: }; -void QGraphicsProxyWidget_new(QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsProxyWidget* ret = new MiqtVirtualQGraphicsProxyWidget(); - *outptr_QGraphicsProxyWidget = ret; - *outptr_QGraphicsWidget = static_cast(ret); - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsProxyWidget* QGraphicsProxyWidget_new() { + return new MiqtVirtualQGraphicsProxyWidget(); } -void QGraphicsProxyWidget_new2(QGraphicsItem* parent, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsProxyWidget* ret = new MiqtVirtualQGraphicsProxyWidget(parent); - *outptr_QGraphicsProxyWidget = ret; - *outptr_QGraphicsWidget = static_cast(ret); - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsProxyWidget* QGraphicsProxyWidget_new2(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsProxyWidget(parent); } -void QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsProxyWidget* ret = new MiqtVirtualQGraphicsProxyWidget(parent, static_cast(wFlags)); - *outptr_QGraphicsProxyWidget = ret; - *outptr_QGraphicsWidget = static_cast(ret); - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsProxyWidget* QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags) { + return new MiqtVirtualQGraphicsProxyWidget(parent, static_cast(wFlags)); +} + +void QGraphicsProxyWidget_virtbase(QGraphicsProxyWidget* src, QGraphicsWidget** outptr_QGraphicsWidget) { + *outptr_QGraphicsWidget = static_cast(src); } QMetaObject* QGraphicsProxyWidget_MetaObject(const QGraphicsProxyWidget* self) { diff --git a/qt/gen_qgraphicsproxywidget.go b/qt/gen_qgraphicsproxywidget.go index 930a5137..db204121 100644 --- a/qt/gen_qgraphicsproxywidget.go +++ b/qt/gen_qgraphicsproxywidget.go @@ -41,65 +41,42 @@ func (this *QGraphicsProxyWidget) UnsafePointer() unsafe.Pointer { } // newQGraphicsProxyWidget constructs the type using only CGO pointers. -func newQGraphicsProxyWidget(h *C.QGraphicsProxyWidget, h_QGraphicsWidget *C.QGraphicsWidget, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsProxyWidget { +func newQGraphicsProxyWidget(h *C.QGraphicsProxyWidget) *QGraphicsProxyWidget { if h == nil { return nil } + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + C.QGraphicsProxyWidget_virtbase(h, &outptr_QGraphicsWidget) + return &QGraphicsProxyWidget{h: h, - QGraphicsWidget: newQGraphicsWidget(h_QGraphicsWidget, h_QGraphicsObject, h_QObject, h_QGraphicsItem, h_QGraphicsLayoutItem)} + QGraphicsWidget: newQGraphicsWidget(outptr_QGraphicsWidget)} } // UnsafeNewQGraphicsProxyWidget constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsProxyWidget(h unsafe.Pointer, h_QGraphicsWidget unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsProxyWidget { - if h == nil { - return nil - } - - return &QGraphicsProxyWidget{h: (*C.QGraphicsProxyWidget)(h), - QGraphicsWidget: UnsafeNewQGraphicsWidget(h_QGraphicsWidget, h_QGraphicsObject, h_QObject, h_QGraphicsItem, h_QGraphicsLayoutItem)} +func UnsafeNewQGraphicsProxyWidget(h unsafe.Pointer) *QGraphicsProxyWidget { + return newQGraphicsProxyWidget((*C.QGraphicsProxyWidget)(h)) } // NewQGraphicsProxyWidget constructs a new QGraphicsProxyWidget object. func NewQGraphicsProxyWidget() *QGraphicsProxyWidget { - var outptr_QGraphicsProxyWidget *C.QGraphicsProxyWidget = nil - var outptr_QGraphicsWidget *C.QGraphicsWidget = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsProxyWidget_new(&outptr_QGraphicsProxyWidget, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsProxyWidget(outptr_QGraphicsProxyWidget, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret := newQGraphicsProxyWidget(C.QGraphicsProxyWidget_new()) ret.isSubclass = true return ret } // NewQGraphicsProxyWidget2 constructs a new QGraphicsProxyWidget object. func NewQGraphicsProxyWidget2(parent *QGraphicsItem) *QGraphicsProxyWidget { - var outptr_QGraphicsProxyWidget *C.QGraphicsProxyWidget = nil - var outptr_QGraphicsWidget *C.QGraphicsWidget = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsProxyWidget_new2(parent.cPointer(), &outptr_QGraphicsProxyWidget, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsProxyWidget(outptr_QGraphicsProxyWidget, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret := newQGraphicsProxyWidget(C.QGraphicsProxyWidget_new2(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsProxyWidget3 constructs a new QGraphicsProxyWidget object. func NewQGraphicsProxyWidget3(parent *QGraphicsItem, wFlags WindowType) *QGraphicsProxyWidget { - var outptr_QGraphicsProxyWidget *C.QGraphicsProxyWidget = nil - var outptr_QGraphicsWidget *C.QGraphicsWidget = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsProxyWidget_new3(parent.cPointer(), (C.int)(wFlags), &outptr_QGraphicsProxyWidget, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsProxyWidget(outptr_QGraphicsProxyWidget, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret := newQGraphicsProxyWidget(C.QGraphicsProxyWidget_new3(parent.cPointer(), (C.int)(wFlags))) ret.isSubclass = true return ret } @@ -137,7 +114,7 @@ func (this *QGraphicsProxyWidget) SetWidget(widget *QWidget) { } func (this *QGraphicsProxyWidget) Widget() *QWidget { - return newQWidget(C.QGraphicsProxyWidget_Widget(this.h), nil, nil) + return newQWidget(C.QGraphicsProxyWidget_Widget(this.h)) } func (this *QGraphicsProxyWidget) SubWidgetRect(widget *QWidget) *QRectF { @@ -159,7 +136,7 @@ func (this *QGraphicsProxyWidget) Type() int { } func (this *QGraphicsProxyWidget) CreateProxyForChildWidget(child *QWidget) *QGraphicsProxyWidget { - return newQGraphicsProxyWidget(C.QGraphicsProxyWidget_CreateProxyForChildWidget(this.h, child.cPointer()), nil, nil, nil, nil, nil) + return newQGraphicsProxyWidget(C.QGraphicsProxyWidget_CreateProxyForChildWidget(this.h, child.cPointer())) } func QGraphicsProxyWidget_Tr2(s string, c string) string { @@ -254,9 +231,9 @@ func miqt_exec_callback_QGraphicsProxyWidget_Paint(self *C.QGraphicsProxyWidget, // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -397,7 +374,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_ShowEvent(self *C.QGraphicsProxyWid } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -423,7 +400,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_HideEvent(self *C.QGraphicsProxyWid } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -449,7 +426,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_ContextMenuEvent(self *C.QGraphicsP } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -475,7 +452,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_DragEnterEvent(self *C.QGraphicsPro } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -501,7 +478,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_DragLeaveEvent(self *C.QGraphicsPro } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -527,7 +504,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_DragMoveEvent(self *C.QGraphicsProx } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -553,7 +530,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_DropEvent(self *C.QGraphicsProxyWid } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -579,7 +556,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_HoverEnterEvent(self *C.QGraphicsPr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -605,7 +582,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_HoverLeaveEvent(self *C.QGraphicsPr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -631,7 +608,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_HoverMoveEvent(self *C.QGraphicsPro } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -709,7 +686,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_MouseMoveEvent(self *C.QGraphicsPro } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -735,7 +712,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_MousePressEvent(self *C.QGraphicsPr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -761,7 +738,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_MouseReleaseEvent(self *C.QGraphics } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -787,7 +764,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_MouseDoubleClickEvent(self *C.QGrap } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -813,7 +790,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_WheelEvent(self *C.QGraphicsProxyWi } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -839,7 +816,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_KeyPressEvent(self *C.QGraphicsProx } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -865,7 +842,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_KeyReleaseEvent(self *C.QGraphicsPr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -891,7 +868,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_FocusInEvent(self *C.QGraphicsProxy } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -917,7 +894,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_FocusOutEvent(self *C.QGraphicsProx } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1001,7 +978,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_InputMethodEvent(self *C.QGraphicsP } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -1059,7 +1036,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_ResizeEvent(self *C.QGraphicsProxyW } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneResizeEvent(event, nil, nil) + slotval1 := newQGraphicsSceneResizeEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1119,9 +1096,9 @@ func miqt_exec_callback_QGraphicsProxyWidget_PaintWindowFrame(self *C.QGraphicsP // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_PaintWindowFrame, slotval1, slotval2, slotval3) @@ -1398,7 +1375,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_CloseEvent(self *C.QGraphicsProxyWi } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1424,7 +1401,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_MoveEvent(self *C.QGraphicsProxyWid } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMoveEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMoveEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MoveEvent, slotval1) diff --git a/qt/gen_qgraphicsproxywidget.h b/qt/gen_qgraphicsproxywidget.h index c07da09a..00725dcd 100644 --- a/qt/gen_qgraphicsproxywidget.h +++ b/qt/gen_qgraphicsproxywidget.h @@ -78,9 +78,10 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QGraphicsProxyWidget_new(QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsProxyWidget_new2(QGraphicsItem* parent, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QGraphicsProxyWidget* QGraphicsProxyWidget_new(); +QGraphicsProxyWidget* QGraphicsProxyWidget_new2(QGraphicsItem* parent); +QGraphicsProxyWidget* QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags); +void QGraphicsProxyWidget_virtbase(QGraphicsProxyWidget* src, QGraphicsWidget** outptr_QGraphicsWidget); QMetaObject* QGraphicsProxyWidget_MetaObject(const QGraphicsProxyWidget* self); void* QGraphicsProxyWidget_Metacast(QGraphicsProxyWidget* self, const char* param1); struct miqt_string QGraphicsProxyWidget_Tr(const char* s); diff --git a/qt/gen_qgraphicsscene.cpp b/qt/gen_qgraphicsscene.cpp index 78eebd2c..d8b49bb0 100644 --- a/qt/gen_qgraphicsscene.cpp +++ b/qt/gen_qgraphicsscene.cpp @@ -694,40 +694,32 @@ public: }; -void QGraphicsScene_new(QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(); - *outptr_QGraphicsScene = ret; - *outptr_QObject = static_cast(ret); +QGraphicsScene* QGraphicsScene_new() { + return new MiqtVirtualQGraphicsScene(); } -void QGraphicsScene_new2(QRectF* sceneRect, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(*sceneRect); - *outptr_QGraphicsScene = ret; - *outptr_QObject = static_cast(ret); +QGraphicsScene* QGraphicsScene_new2(QRectF* sceneRect) { + return new MiqtVirtualQGraphicsScene(*sceneRect); } -void QGraphicsScene_new3(double x, double y, double width, double height, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height)); - *outptr_QGraphicsScene = ret; - *outptr_QObject = static_cast(ret); +QGraphicsScene* QGraphicsScene_new3(double x, double y, double width, double height) { + return new MiqtVirtualQGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height)); } -void QGraphicsScene_new4(QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(parent); - *outptr_QGraphicsScene = ret; - *outptr_QObject = static_cast(ret); +QGraphicsScene* QGraphicsScene_new4(QObject* parent) { + return new MiqtVirtualQGraphicsScene(parent); } -void QGraphicsScene_new5(QRectF* sceneRect, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(*sceneRect, parent); - *outptr_QGraphicsScene = ret; - *outptr_QObject = static_cast(ret); +QGraphicsScene* QGraphicsScene_new5(QRectF* sceneRect, QObject* parent) { + return new MiqtVirtualQGraphicsScene(*sceneRect, parent); } -void QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height), parent); - *outptr_QGraphicsScene = ret; - *outptr_QObject = static_cast(ret); +QGraphicsScene* QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent) { + return new MiqtVirtualQGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height), parent); +} + +void QGraphicsScene_virtbase(QGraphicsScene* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QGraphicsScene_MetaObject(const QGraphicsScene* self) { diff --git a/qt/gen_qgraphicsscene.go b/qt/gen_qgraphicsscene.go index 0687d8ca..81d15939 100644 --- a/qt/gen_qgraphicsscene.go +++ b/qt/gen_qgraphicsscene.go @@ -51,86 +51,66 @@ func (this *QGraphicsScene) UnsafePointer() unsafe.Pointer { } // newQGraphicsScene constructs the type using only CGO pointers. -func newQGraphicsScene(h *C.QGraphicsScene, h_QObject *C.QObject) *QGraphicsScene { +func newQGraphicsScene(h *C.QGraphicsScene) *QGraphicsScene { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QGraphicsScene_virtbase(h, &outptr_QObject) + return &QGraphicsScene{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQGraphicsScene constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsScene(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsScene { - if h == nil { - return nil - } - - return &QGraphicsScene{h: (*C.QGraphicsScene)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQGraphicsScene(h unsafe.Pointer) *QGraphicsScene { + return newQGraphicsScene((*C.QGraphicsScene)(h)) } // NewQGraphicsScene constructs a new QGraphicsScene object. func NewQGraphicsScene() *QGraphicsScene { - var outptr_QGraphicsScene *C.QGraphicsScene = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScene_new(&outptr_QGraphicsScene, &outptr_QObject) - ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret := newQGraphicsScene(C.QGraphicsScene_new()) ret.isSubclass = true return ret } // NewQGraphicsScene2 constructs a new QGraphicsScene object. func NewQGraphicsScene2(sceneRect *QRectF) *QGraphicsScene { - var outptr_QGraphicsScene *C.QGraphicsScene = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScene_new2(sceneRect.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) - ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret := newQGraphicsScene(C.QGraphicsScene_new2(sceneRect.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsScene3 constructs a new QGraphicsScene object. func NewQGraphicsScene3(x float64, y float64, width float64, height float64) *QGraphicsScene { - var outptr_QGraphicsScene *C.QGraphicsScene = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScene_new3((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height), &outptr_QGraphicsScene, &outptr_QObject) - ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret := newQGraphicsScene(C.QGraphicsScene_new3((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height))) ret.isSubclass = true return ret } // NewQGraphicsScene4 constructs a new QGraphicsScene object. func NewQGraphicsScene4(parent *QObject) *QGraphicsScene { - var outptr_QGraphicsScene *C.QGraphicsScene = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScene_new4(parent.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) - ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret := newQGraphicsScene(C.QGraphicsScene_new4(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsScene5 constructs a new QGraphicsScene object. func NewQGraphicsScene5(sceneRect *QRectF, parent *QObject) *QGraphicsScene { - var outptr_QGraphicsScene *C.QGraphicsScene = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScene_new5(sceneRect.cPointer(), parent.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) - ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret := newQGraphicsScene(C.QGraphicsScene_new5(sceneRect.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsScene6 constructs a new QGraphicsScene object. func NewQGraphicsScene6(x float64, y float64, width float64, height float64, parent *QObject) *QGraphicsScene { - var outptr_QGraphicsScene *C.QGraphicsScene = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScene_new6((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height), parent.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) - ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret := newQGraphicsScene(C.QGraphicsScene_new6((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height), parent.cPointer())) ret.isSubclass = true return ret } @@ -322,7 +302,7 @@ func (this *QGraphicsScene) CreateItemGroup(items []*QGraphicsItem) *QGraphicsIt items_CArray[i] = items[i].cPointer() } items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} - return newQGraphicsItemGroup(C.QGraphicsScene_CreateItemGroup(this.h, items_ma), nil) + return newQGraphicsItemGroup(C.QGraphicsScene_CreateItemGroup(this.h, items_ma)) } func (this *QGraphicsScene) DestroyItemGroup(group *QGraphicsItemGroup) { @@ -334,23 +314,23 @@ func (this *QGraphicsScene) AddItem(item *QGraphicsItem) { } func (this *QGraphicsScene) AddEllipse(rect *QRectF) *QGraphicsEllipseItem { - return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse(this.h, rect.cPointer()), nil, nil) + return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse(this.h, rect.cPointer())) } func (this *QGraphicsScene) AddLine(line *QLineF) *QGraphicsLineItem { - return newQGraphicsLineItem(C.QGraphicsScene_AddLine(this.h, line.cPointer()), nil) + return newQGraphicsLineItem(C.QGraphicsScene_AddLine(this.h, line.cPointer())) } func (this *QGraphicsScene) AddPath(path *QPainterPath) *QGraphicsPathItem { - return newQGraphicsPathItem(C.QGraphicsScene_AddPath(this.h, path.cPointer()), nil, nil) + return newQGraphicsPathItem(C.QGraphicsScene_AddPath(this.h, path.cPointer())) } func (this *QGraphicsScene) AddPixmap(pixmap *QPixmap) *QGraphicsPixmapItem { - return newQGraphicsPixmapItem(C.QGraphicsScene_AddPixmap(this.h, pixmap.cPointer()), nil) + return newQGraphicsPixmapItem(C.QGraphicsScene_AddPixmap(this.h, pixmap.cPointer())) } func (this *QGraphicsScene) AddRect(rect *QRectF) *QGraphicsRectItem { - return newQGraphicsRectItem(C.QGraphicsScene_AddRect(this.h, rect.cPointer()), nil, nil) + return newQGraphicsRectItem(C.QGraphicsScene_AddRect(this.h, rect.cPointer())) } func (this *QGraphicsScene) AddText(text string) *QGraphicsTextItem { @@ -358,7 +338,7 @@ func (this *QGraphicsScene) AddText(text string) *QGraphicsTextItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQGraphicsTextItem(C.QGraphicsScene_AddText(this.h, text_ms), nil, nil, nil) + return newQGraphicsTextItem(C.QGraphicsScene_AddText(this.h, text_ms)) } func (this *QGraphicsScene) AddSimpleText(text string) *QGraphicsSimpleTextItem { @@ -366,23 +346,23 @@ func (this *QGraphicsScene) AddSimpleText(text string) *QGraphicsSimpleTextItem text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQGraphicsSimpleTextItem(C.QGraphicsScene_AddSimpleText(this.h, text_ms), nil, nil) + return newQGraphicsSimpleTextItem(C.QGraphicsScene_AddSimpleText(this.h, text_ms)) } func (this *QGraphicsScene) AddWidget(widget *QWidget) *QGraphicsProxyWidget { - return newQGraphicsProxyWidget(C.QGraphicsScene_AddWidget(this.h, widget.cPointer()), nil, nil, nil, nil, nil) + return newQGraphicsProxyWidget(C.QGraphicsScene_AddWidget(this.h, widget.cPointer())) } func (this *QGraphicsScene) AddEllipse2(x float64, y float64, w float64, h float64) *QGraphicsEllipseItem { - return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)), nil, nil) + return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h))) } func (this *QGraphicsScene) AddLine2(x1 float64, y1 float64, x2 float64, y2 float64) *QGraphicsLineItem { - return newQGraphicsLineItem(C.QGraphicsScene_AddLine2(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2)), nil) + return newQGraphicsLineItem(C.QGraphicsScene_AddLine2(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2))) } func (this *QGraphicsScene) AddRect2(x float64, y float64, w float64, h float64) *QGraphicsRectItem { - return newQGraphicsRectItem(C.QGraphicsScene_AddRect2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)), nil, nil) + return newQGraphicsRectItem(C.QGraphicsScene_AddRect2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h))) } func (this *QGraphicsScene) RemoveItem(item *QGraphicsItem) { @@ -452,7 +432,7 @@ func (this *QGraphicsScene) Views() []*QGraphicsView { _ret := make([]*QGraphicsView, int(_ma.len)) _outCast := (*[0xffff]*C.QGraphicsView)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQGraphicsView(_outCast[i], nil, nil, nil, nil, nil) + _ret[i] = newQGraphicsView(_outCast[i]) } return _ret } @@ -466,7 +446,7 @@ func (this *QGraphicsScene) Invalidate(x float64, y float64, w float64, h float6 } func (this *QGraphicsScene) Style() *QStyle { - return newQStyle(C.QGraphicsScene_Style(this.h), nil) + return newQStyle(C.QGraphicsScene_Style(this.h)) } func (this *QGraphicsScene) SetStyle(style *QStyle) { @@ -506,7 +486,7 @@ func (this *QGraphicsScene) SetActivePanel(item *QGraphicsItem) { } func (this *QGraphicsScene) ActiveWindow() *QGraphicsWidget { - return newQGraphicsWidget(C.QGraphicsScene_ActiveWindow(this.h), nil, nil, nil, nil) + return newQGraphicsWidget(C.QGraphicsScene_ActiveWindow(this.h)) } func (this *QGraphicsScene) SetActiveWindow(widget *QGraphicsWidget) { @@ -841,31 +821,31 @@ func (this *QGraphicsScene) SetSelectionArea4(path *QPainterPath, selectionOpera } func (this *QGraphicsScene) AddEllipse22(rect *QRectF, pen *QPen) *QGraphicsEllipseItem { - return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse22(this.h, rect.cPointer(), pen.cPointer()), nil, nil) + return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse22(this.h, rect.cPointer(), pen.cPointer())) } func (this *QGraphicsScene) AddEllipse3(rect *QRectF, pen *QPen, brush *QBrush) *QGraphicsEllipseItem { - return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer()), nil, nil) + return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer())) } func (this *QGraphicsScene) AddLine22(line *QLineF, pen *QPen) *QGraphicsLineItem { - return newQGraphicsLineItem(C.QGraphicsScene_AddLine22(this.h, line.cPointer(), pen.cPointer()), nil) + return newQGraphicsLineItem(C.QGraphicsScene_AddLine22(this.h, line.cPointer(), pen.cPointer())) } func (this *QGraphicsScene) AddPath2(path *QPainterPath, pen *QPen) *QGraphicsPathItem { - return newQGraphicsPathItem(C.QGraphicsScene_AddPath2(this.h, path.cPointer(), pen.cPointer()), nil, nil) + return newQGraphicsPathItem(C.QGraphicsScene_AddPath2(this.h, path.cPointer(), pen.cPointer())) } func (this *QGraphicsScene) AddPath3(path *QPainterPath, pen *QPen, brush *QBrush) *QGraphicsPathItem { - return newQGraphicsPathItem(C.QGraphicsScene_AddPath3(this.h, path.cPointer(), pen.cPointer(), brush.cPointer()), nil, nil) + return newQGraphicsPathItem(C.QGraphicsScene_AddPath3(this.h, path.cPointer(), pen.cPointer(), brush.cPointer())) } func (this *QGraphicsScene) AddRect22(rect *QRectF, pen *QPen) *QGraphicsRectItem { - return newQGraphicsRectItem(C.QGraphicsScene_AddRect22(this.h, rect.cPointer(), pen.cPointer()), nil, nil) + return newQGraphicsRectItem(C.QGraphicsScene_AddRect22(this.h, rect.cPointer(), pen.cPointer())) } func (this *QGraphicsScene) AddRect3(rect *QRectF, pen *QPen, brush *QBrush) *QGraphicsRectItem { - return newQGraphicsRectItem(C.QGraphicsScene_AddRect3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer()), nil, nil) + return newQGraphicsRectItem(C.QGraphicsScene_AddRect3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer())) } func (this *QGraphicsScene) AddText2(text string, font *QFont) *QGraphicsTextItem { @@ -873,7 +853,7 @@ func (this *QGraphicsScene) AddText2(text string, font *QFont) *QGraphicsTextIte text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQGraphicsTextItem(C.QGraphicsScene_AddText2(this.h, text_ms, font.cPointer()), nil, nil, nil) + return newQGraphicsTextItem(C.QGraphicsScene_AddText2(this.h, text_ms, font.cPointer())) } func (this *QGraphicsScene) AddSimpleText2(text string, font *QFont) *QGraphicsSimpleTextItem { @@ -881,31 +861,31 @@ func (this *QGraphicsScene) AddSimpleText2(text string, font *QFont) *QGraphicsS text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQGraphicsSimpleTextItem(C.QGraphicsScene_AddSimpleText2(this.h, text_ms, font.cPointer()), nil, nil) + return newQGraphicsSimpleTextItem(C.QGraphicsScene_AddSimpleText2(this.h, text_ms, font.cPointer())) } func (this *QGraphicsScene) AddWidget2(widget *QWidget, wFlags WindowType) *QGraphicsProxyWidget { - return newQGraphicsProxyWidget(C.QGraphicsScene_AddWidget2(this.h, widget.cPointer(), (C.int)(wFlags)), nil, nil, nil, nil, nil) + return newQGraphicsProxyWidget(C.QGraphicsScene_AddWidget2(this.h, widget.cPointer(), (C.int)(wFlags))) } func (this *QGraphicsScene) AddEllipse5(x float64, y float64, w float64, h float64, pen *QPen) *QGraphicsEllipseItem { - return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer()), nil, nil) + return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer())) } func (this *QGraphicsScene) AddEllipse6(x float64, y float64, w float64, h float64, pen *QPen, brush *QBrush) *QGraphicsEllipseItem { - return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer()), nil, nil) + return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer())) } func (this *QGraphicsScene) AddLine5(x1 float64, y1 float64, x2 float64, y2 float64, pen *QPen) *QGraphicsLineItem { - return newQGraphicsLineItem(C.QGraphicsScene_AddLine5(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), pen.cPointer()), nil) + return newQGraphicsLineItem(C.QGraphicsScene_AddLine5(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), pen.cPointer())) } func (this *QGraphicsScene) AddRect5(x float64, y float64, w float64, h float64, pen *QPen) *QGraphicsRectItem { - return newQGraphicsRectItem(C.QGraphicsScene_AddRect5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer()), nil, nil) + return newQGraphicsRectItem(C.QGraphicsScene_AddRect5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer())) } func (this *QGraphicsScene) AddRect6(x float64, y float64, w float64, h float64, pen *QPen, brush *QBrush) *QGraphicsRectItem { - return newQGraphicsRectItem(C.QGraphicsScene_AddRect6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer()), nil, nil) + return newQGraphicsRectItem(C.QGraphicsScene_AddRect6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer())) } func (this *QGraphicsScene) SetFocusItem2(item *QGraphicsItem, focusReason FocusReason) { @@ -1040,7 +1020,7 @@ func miqt_exec_callback_QGraphicsScene_ContextMenuEvent(self *C.QGraphicsScene, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1066,7 +1046,7 @@ func miqt_exec_callback_QGraphicsScene_DragEnterEvent(self *C.QGraphicsScene, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1092,7 +1072,7 @@ func miqt_exec_callback_QGraphicsScene_DragMoveEvent(self *C.QGraphicsScene, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1118,7 +1098,7 @@ func miqt_exec_callback_QGraphicsScene_DragLeaveEvent(self *C.QGraphicsScene, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1144,7 +1124,7 @@ func miqt_exec_callback_QGraphicsScene_DropEvent(self *C.QGraphicsScene, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1170,7 +1150,7 @@ func miqt_exec_callback_QGraphicsScene_FocusInEvent(self *C.QGraphicsScene, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1196,7 +1176,7 @@ func miqt_exec_callback_QGraphicsScene_FocusOutEvent(self *C.QGraphicsScene, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1222,7 +1202,7 @@ func miqt_exec_callback_QGraphicsScene_HelpEvent(self *C.QGraphicsScene, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHelpEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHelpEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_HelpEvent, slotval1) @@ -1248,7 +1228,7 @@ func miqt_exec_callback_QGraphicsScene_KeyPressEvent(self *C.QGraphicsScene, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1274,7 +1254,7 @@ func miqt_exec_callback_QGraphicsScene_KeyReleaseEvent(self *C.QGraphicsScene, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1300,7 +1280,7 @@ func miqt_exec_callback_QGraphicsScene_MousePressEvent(self *C.QGraphicsScene, c } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1326,7 +1306,7 @@ func miqt_exec_callback_QGraphicsScene_MouseMoveEvent(self *C.QGraphicsScene, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1352,7 +1332,7 @@ func miqt_exec_callback_QGraphicsScene_MouseReleaseEvent(self *C.QGraphicsScene, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1378,7 +1358,7 @@ func miqt_exec_callback_QGraphicsScene_MouseDoubleClickEvent(self *C.QGraphicsSc } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1404,7 +1384,7 @@ func miqt_exec_callback_QGraphicsScene_WheelEvent(self *C.QGraphicsScene, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1430,7 +1410,7 @@ func miqt_exec_callback_QGraphicsScene_InputMethodEvent(self *C.QGraphicsScene, } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -1512,7 +1492,7 @@ func miqt_exec_callback_QGraphicsScene_TimerEvent(self *C.QGraphicsScene, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1538,7 +1518,7 @@ func miqt_exec_callback_QGraphicsScene_ChildEvent(self *C.QGraphicsScene, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qgraphicsscene.h b/qt/gen_qgraphicsscene.h index e5236615..8c996f54 100644 --- a/qt/gen_qgraphicsscene.h +++ b/qt/gen_qgraphicsscene.h @@ -100,12 +100,13 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QGraphicsScene_new(QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); -void QGraphicsScene_new2(QRectF* sceneRect, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); -void QGraphicsScene_new3(double x, double y, double width, double height, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); -void QGraphicsScene_new4(QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); -void QGraphicsScene_new5(QRectF* sceneRect, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); -void QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); +QGraphicsScene* QGraphicsScene_new(); +QGraphicsScene* QGraphicsScene_new2(QRectF* sceneRect); +QGraphicsScene* QGraphicsScene_new3(double x, double y, double width, double height); +QGraphicsScene* QGraphicsScene_new4(QObject* parent); +QGraphicsScene* QGraphicsScene_new5(QRectF* sceneRect, QObject* parent); +QGraphicsScene* QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent); +void QGraphicsScene_virtbase(QGraphicsScene* src, QObject** outptr_QObject); QMetaObject* QGraphicsScene_MetaObject(const QGraphicsScene* self); void* QGraphicsScene_Metacast(QGraphicsScene* self, const char* param1); struct miqt_string QGraphicsScene_Tr(const char* s); diff --git a/qt/gen_qgraphicssceneevent.cpp b/qt/gen_qgraphicssceneevent.cpp index 95318930..67c73ea8 100644 --- a/qt/gen_qgraphicssceneevent.cpp +++ b/qt/gen_qgraphicssceneevent.cpp @@ -17,10 +17,12 @@ #include "gen_qgraphicssceneevent.h" #include "_cgo_export.h" -void QGraphicsSceneEvent_new(int typeVal, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneEvent* ret = new QGraphicsSceneEvent(static_cast(typeVal)); - *outptr_QGraphicsSceneEvent = ret; - *outptr_QEvent = static_cast(ret); +QGraphicsSceneEvent* QGraphicsSceneEvent_new(int typeVal) { + return new QGraphicsSceneEvent(static_cast(typeVal)); +} + +void QGraphicsSceneEvent_virtbase(QGraphicsSceneEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QWidget* QGraphicsSceneEvent_Widget(const QGraphicsSceneEvent* self) { @@ -39,18 +41,16 @@ void QGraphicsSceneEvent_Delete(QGraphicsSceneEvent* self, bool isSubclass) { } } -void QGraphicsSceneMouseEvent_new(QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneMouseEvent* ret = new QGraphicsSceneMouseEvent(); - *outptr_QGraphicsSceneMouseEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new() { + return new QGraphicsSceneMouseEvent(); } -void QGraphicsSceneMouseEvent_new2(int typeVal, QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneMouseEvent* ret = new QGraphicsSceneMouseEvent(static_cast(typeVal)); - *outptr_QGraphicsSceneMouseEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new2(int typeVal) { + return new QGraphicsSceneMouseEvent(static_cast(typeVal)); +} + +void QGraphicsSceneMouseEvent_virtbase(QGraphicsSceneMouseEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QPointF* QGraphicsSceneMouseEvent_Pos(const QGraphicsSceneMouseEvent* self) { @@ -178,18 +178,16 @@ void QGraphicsSceneMouseEvent_Delete(QGraphicsSceneMouseEvent* self, bool isSubc } } -void QGraphicsSceneWheelEvent_new(QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneWheelEvent* ret = new QGraphicsSceneWheelEvent(); - *outptr_QGraphicsSceneWheelEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new() { + return new QGraphicsSceneWheelEvent(); } -void QGraphicsSceneWheelEvent_new2(int typeVal, QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneWheelEvent* ret = new QGraphicsSceneWheelEvent(static_cast(typeVal)); - *outptr_QGraphicsSceneWheelEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new2(int typeVal) { + return new QGraphicsSceneWheelEvent(static_cast(typeVal)); +} + +void QGraphicsSceneWheelEvent_virtbase(QGraphicsSceneWheelEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QPointF* QGraphicsSceneWheelEvent_Pos(const QGraphicsSceneWheelEvent* self) { @@ -259,18 +257,16 @@ void QGraphicsSceneWheelEvent_Delete(QGraphicsSceneWheelEvent* self, bool isSubc } } -void QGraphicsSceneContextMenuEvent_new(QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneContextMenuEvent* ret = new QGraphicsSceneContextMenuEvent(); - *outptr_QGraphicsSceneContextMenuEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new() { + return new QGraphicsSceneContextMenuEvent(); } -void QGraphicsSceneContextMenuEvent_new2(int typeVal, QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneContextMenuEvent* ret = new QGraphicsSceneContextMenuEvent(static_cast(typeVal)); - *outptr_QGraphicsSceneContextMenuEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new2(int typeVal) { + return new QGraphicsSceneContextMenuEvent(static_cast(typeVal)); +} + +void QGraphicsSceneContextMenuEvent_virtbase(QGraphicsSceneContextMenuEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QPointF* QGraphicsSceneContextMenuEvent_Pos(const QGraphicsSceneContextMenuEvent* self) { @@ -323,18 +319,16 @@ void QGraphicsSceneContextMenuEvent_Delete(QGraphicsSceneContextMenuEvent* self, } } -void QGraphicsSceneHoverEvent_new(QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneHoverEvent* ret = new QGraphicsSceneHoverEvent(); - *outptr_QGraphicsSceneHoverEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new() { + return new QGraphicsSceneHoverEvent(); } -void QGraphicsSceneHoverEvent_new2(int typeVal, QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneHoverEvent* ret = new QGraphicsSceneHoverEvent(static_cast(typeVal)); - *outptr_QGraphicsSceneHoverEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new2(int typeVal) { + return new QGraphicsSceneHoverEvent(static_cast(typeVal)); +} + +void QGraphicsSceneHoverEvent_virtbase(QGraphicsSceneHoverEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QPointF* QGraphicsSceneHoverEvent_Pos(const QGraphicsSceneHoverEvent* self) { @@ -402,18 +396,16 @@ void QGraphicsSceneHoverEvent_Delete(QGraphicsSceneHoverEvent* self, bool isSubc } } -void QGraphicsSceneHelpEvent_new(QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneHelpEvent* ret = new QGraphicsSceneHelpEvent(); - *outptr_QGraphicsSceneHelpEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new() { + return new QGraphicsSceneHelpEvent(); } -void QGraphicsSceneHelpEvent_new2(int typeVal, QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneHelpEvent* ret = new QGraphicsSceneHelpEvent(static_cast(typeVal)); - *outptr_QGraphicsSceneHelpEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new2(int typeVal) { + return new QGraphicsSceneHelpEvent(static_cast(typeVal)); +} + +void QGraphicsSceneHelpEvent_virtbase(QGraphicsSceneHelpEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QPointF* QGraphicsSceneHelpEvent_ScenePos(const QGraphicsSceneHelpEvent* self) { @@ -440,18 +432,16 @@ void QGraphicsSceneHelpEvent_Delete(QGraphicsSceneHelpEvent* self, bool isSubcla } } -void QGraphicsSceneDragDropEvent_new(QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneDragDropEvent* ret = new QGraphicsSceneDragDropEvent(); - *outptr_QGraphicsSceneDragDropEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new() { + return new QGraphicsSceneDragDropEvent(); } -void QGraphicsSceneDragDropEvent_new2(int typeVal, QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneDragDropEvent* ret = new QGraphicsSceneDragDropEvent(static_cast(typeVal)); - *outptr_QGraphicsSceneDragDropEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new2(int typeVal) { + return new QGraphicsSceneDragDropEvent(static_cast(typeVal)); +} + +void QGraphicsSceneDragDropEvent_virtbase(QGraphicsSceneDragDropEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QPointF* QGraphicsSceneDragDropEvent_Pos(const QGraphicsSceneDragDropEvent* self) { @@ -551,11 +541,12 @@ void QGraphicsSceneDragDropEvent_Delete(QGraphicsSceneDragDropEvent* self, bool } } -void QGraphicsSceneResizeEvent_new(QGraphicsSceneResizeEvent** outptr_QGraphicsSceneResizeEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneResizeEvent* ret = new QGraphicsSceneResizeEvent(); - *outptr_QGraphicsSceneResizeEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneResizeEvent* QGraphicsSceneResizeEvent_new() { + return new QGraphicsSceneResizeEvent(); +} + +void QGraphicsSceneResizeEvent_virtbase(QGraphicsSceneResizeEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QSizeF* QGraphicsSceneResizeEvent_OldSize(const QGraphicsSceneResizeEvent* self) { @@ -582,11 +573,12 @@ void QGraphicsSceneResizeEvent_Delete(QGraphicsSceneResizeEvent* self, bool isSu } } -void QGraphicsSceneMoveEvent_new(QGraphicsSceneMoveEvent** outptr_QGraphicsSceneMoveEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneMoveEvent* ret = new QGraphicsSceneMoveEvent(); - *outptr_QGraphicsSceneMoveEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneMoveEvent* QGraphicsSceneMoveEvent_new() { + return new QGraphicsSceneMoveEvent(); +} + +void QGraphicsSceneMoveEvent_virtbase(QGraphicsSceneMoveEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QPointF* QGraphicsSceneMoveEvent_OldPos(const QGraphicsSceneMoveEvent* self) { diff --git a/qt/gen_qgraphicssceneevent.go b/qt/gen_qgraphicssceneevent.go index ea471e07..071b0da0 100644 --- a/qt/gen_qgraphicssceneevent.go +++ b/qt/gen_qgraphicssceneevent.go @@ -42,37 +42,32 @@ func (this *QGraphicsSceneEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneEvent constructs the type using only CGO pointers. -func newQGraphicsSceneEvent(h *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneEvent { +func newQGraphicsSceneEvent(h *C.QGraphicsSceneEvent) *QGraphicsSceneEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QGraphicsSceneEvent_virtbase(h, &outptr_QEvent) + return &QGraphicsSceneEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQGraphicsSceneEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneEvent{h: (*C.QGraphicsSceneEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQGraphicsSceneEvent(h unsafe.Pointer) *QGraphicsSceneEvent { + return newQGraphicsSceneEvent((*C.QGraphicsSceneEvent)(h)) } // NewQGraphicsSceneEvent constructs a new QGraphicsSceneEvent object. func NewQGraphicsSceneEvent(typeVal QEvent__Type) *QGraphicsSceneEvent { - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneEvent_new((C.int)(typeVal), &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneEvent(C.QGraphicsSceneEvent_new((C.int)(typeVal))) ret.isSubclass = true return ret } func (this *QGraphicsSceneEvent) Widget() *QWidget { - return newQWidget(C.QGraphicsSceneEvent_Widget(this.h), nil, nil) + return newQWidget(C.QGraphicsSceneEvent_Widget(this.h)) } func (this *QGraphicsSceneEvent) SetWidget(widget *QWidget) { @@ -114,44 +109,34 @@ func (this *QGraphicsSceneMouseEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneMouseEvent constructs the type using only CGO pointers. -func newQGraphicsSceneMouseEvent(h *C.QGraphicsSceneMouseEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneMouseEvent { +func newQGraphicsSceneMouseEvent(h *C.QGraphicsSceneMouseEvent) *QGraphicsSceneMouseEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneMouseEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneMouseEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneMouseEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneMouseEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneMouseEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneMouseEvent{h: (*C.QGraphicsSceneMouseEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneMouseEvent(h unsafe.Pointer) *QGraphicsSceneMouseEvent { + return newQGraphicsSceneMouseEvent((*C.QGraphicsSceneMouseEvent)(h)) } // NewQGraphicsSceneMouseEvent constructs a new QGraphicsSceneMouseEvent object. func NewQGraphicsSceneMouseEvent() *QGraphicsSceneMouseEvent { - var outptr_QGraphicsSceneMouseEvent *C.QGraphicsSceneMouseEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneMouseEvent_new(&outptr_QGraphicsSceneMouseEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneMouseEvent(outptr_QGraphicsSceneMouseEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneMouseEvent(C.QGraphicsSceneMouseEvent_new()) ret.isSubclass = true return ret } // NewQGraphicsSceneMouseEvent2 constructs a new QGraphicsSceneMouseEvent object. func NewQGraphicsSceneMouseEvent2(typeVal QEvent__Type) *QGraphicsSceneMouseEvent { - var outptr_QGraphicsSceneMouseEvent *C.QGraphicsSceneMouseEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneMouseEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneMouseEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneMouseEvent(outptr_QGraphicsSceneMouseEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneMouseEvent(C.QGraphicsSceneMouseEvent_new2((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -321,44 +306,34 @@ func (this *QGraphicsSceneWheelEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneWheelEvent constructs the type using only CGO pointers. -func newQGraphicsSceneWheelEvent(h *C.QGraphicsSceneWheelEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneWheelEvent { +func newQGraphicsSceneWheelEvent(h *C.QGraphicsSceneWheelEvent) *QGraphicsSceneWheelEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneWheelEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneWheelEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneWheelEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneWheelEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneWheelEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneWheelEvent{h: (*C.QGraphicsSceneWheelEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneWheelEvent(h unsafe.Pointer) *QGraphicsSceneWheelEvent { + return newQGraphicsSceneWheelEvent((*C.QGraphicsSceneWheelEvent)(h)) } // NewQGraphicsSceneWheelEvent constructs a new QGraphicsSceneWheelEvent object. func NewQGraphicsSceneWheelEvent() *QGraphicsSceneWheelEvent { - var outptr_QGraphicsSceneWheelEvent *C.QGraphicsSceneWheelEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneWheelEvent_new(&outptr_QGraphicsSceneWheelEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneWheelEvent(outptr_QGraphicsSceneWheelEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneWheelEvent(C.QGraphicsSceneWheelEvent_new()) ret.isSubclass = true return ret } // NewQGraphicsSceneWheelEvent2 constructs a new QGraphicsSceneWheelEvent object. func NewQGraphicsSceneWheelEvent2(typeVal QEvent__Type) *QGraphicsSceneWheelEvent { - var outptr_QGraphicsSceneWheelEvent *C.QGraphicsSceneWheelEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneWheelEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneWheelEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneWheelEvent(outptr_QGraphicsSceneWheelEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneWheelEvent(C.QGraphicsSceneWheelEvent_new2((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -460,44 +435,34 @@ func (this *QGraphicsSceneContextMenuEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneContextMenuEvent constructs the type using only CGO pointers. -func newQGraphicsSceneContextMenuEvent(h *C.QGraphicsSceneContextMenuEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneContextMenuEvent { +func newQGraphicsSceneContextMenuEvent(h *C.QGraphicsSceneContextMenuEvent) *QGraphicsSceneContextMenuEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneContextMenuEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneContextMenuEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneContextMenuEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneContextMenuEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneContextMenuEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneContextMenuEvent{h: (*C.QGraphicsSceneContextMenuEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneContextMenuEvent(h unsafe.Pointer) *QGraphicsSceneContextMenuEvent { + return newQGraphicsSceneContextMenuEvent((*C.QGraphicsSceneContextMenuEvent)(h)) } // NewQGraphicsSceneContextMenuEvent constructs a new QGraphicsSceneContextMenuEvent object. func NewQGraphicsSceneContextMenuEvent() *QGraphicsSceneContextMenuEvent { - var outptr_QGraphicsSceneContextMenuEvent *C.QGraphicsSceneContextMenuEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneContextMenuEvent_new(&outptr_QGraphicsSceneContextMenuEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneContextMenuEvent(outptr_QGraphicsSceneContextMenuEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneContextMenuEvent(C.QGraphicsSceneContextMenuEvent_new()) ret.isSubclass = true return ret } // NewQGraphicsSceneContextMenuEvent2 constructs a new QGraphicsSceneContextMenuEvent object. func NewQGraphicsSceneContextMenuEvent2(typeVal QEvent__Type) *QGraphicsSceneContextMenuEvent { - var outptr_QGraphicsSceneContextMenuEvent *C.QGraphicsSceneContextMenuEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneContextMenuEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneContextMenuEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneContextMenuEvent(outptr_QGraphicsSceneContextMenuEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneContextMenuEvent(C.QGraphicsSceneContextMenuEvent_new2((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -583,44 +548,34 @@ func (this *QGraphicsSceneHoverEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneHoverEvent constructs the type using only CGO pointers. -func newQGraphicsSceneHoverEvent(h *C.QGraphicsSceneHoverEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneHoverEvent { +func newQGraphicsSceneHoverEvent(h *C.QGraphicsSceneHoverEvent) *QGraphicsSceneHoverEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneHoverEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneHoverEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneHoverEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneHoverEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneHoverEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneHoverEvent{h: (*C.QGraphicsSceneHoverEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneHoverEvent(h unsafe.Pointer) *QGraphicsSceneHoverEvent { + return newQGraphicsSceneHoverEvent((*C.QGraphicsSceneHoverEvent)(h)) } // NewQGraphicsSceneHoverEvent constructs a new QGraphicsSceneHoverEvent object. func NewQGraphicsSceneHoverEvent() *QGraphicsSceneHoverEvent { - var outptr_QGraphicsSceneHoverEvent *C.QGraphicsSceneHoverEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneHoverEvent_new(&outptr_QGraphicsSceneHoverEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneHoverEvent(outptr_QGraphicsSceneHoverEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneHoverEvent(C.QGraphicsSceneHoverEvent_new()) ret.isSubclass = true return ret } // NewQGraphicsSceneHoverEvent2 constructs a new QGraphicsSceneHoverEvent object. func NewQGraphicsSceneHoverEvent2(typeVal QEvent__Type) *QGraphicsSceneHoverEvent { - var outptr_QGraphicsSceneHoverEvent *C.QGraphicsSceneHoverEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneHoverEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneHoverEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneHoverEvent(outptr_QGraphicsSceneHoverEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneHoverEvent(C.QGraphicsSceneHoverEvent_new2((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -728,44 +683,34 @@ func (this *QGraphicsSceneHelpEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneHelpEvent constructs the type using only CGO pointers. -func newQGraphicsSceneHelpEvent(h *C.QGraphicsSceneHelpEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneHelpEvent { +func newQGraphicsSceneHelpEvent(h *C.QGraphicsSceneHelpEvent) *QGraphicsSceneHelpEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneHelpEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneHelpEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneHelpEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneHelpEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneHelpEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneHelpEvent{h: (*C.QGraphicsSceneHelpEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneHelpEvent(h unsafe.Pointer) *QGraphicsSceneHelpEvent { + return newQGraphicsSceneHelpEvent((*C.QGraphicsSceneHelpEvent)(h)) } // NewQGraphicsSceneHelpEvent constructs a new QGraphicsSceneHelpEvent object. func NewQGraphicsSceneHelpEvent() *QGraphicsSceneHelpEvent { - var outptr_QGraphicsSceneHelpEvent *C.QGraphicsSceneHelpEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneHelpEvent_new(&outptr_QGraphicsSceneHelpEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneHelpEvent(outptr_QGraphicsSceneHelpEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneHelpEvent(C.QGraphicsSceneHelpEvent_new()) ret.isSubclass = true return ret } // NewQGraphicsSceneHelpEvent2 constructs a new QGraphicsSceneHelpEvent object. func NewQGraphicsSceneHelpEvent2(typeVal QEvent__Type) *QGraphicsSceneHelpEvent { - var outptr_QGraphicsSceneHelpEvent *C.QGraphicsSceneHelpEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneHelpEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneHelpEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneHelpEvent(outptr_QGraphicsSceneHelpEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneHelpEvent(C.QGraphicsSceneHelpEvent_new2((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -825,44 +770,34 @@ func (this *QGraphicsSceneDragDropEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneDragDropEvent constructs the type using only CGO pointers. -func newQGraphicsSceneDragDropEvent(h *C.QGraphicsSceneDragDropEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneDragDropEvent { +func newQGraphicsSceneDragDropEvent(h *C.QGraphicsSceneDragDropEvent) *QGraphicsSceneDragDropEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneDragDropEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneDragDropEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneDragDropEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneDragDropEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneDragDropEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneDragDropEvent{h: (*C.QGraphicsSceneDragDropEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneDragDropEvent(h unsafe.Pointer) *QGraphicsSceneDragDropEvent { + return newQGraphicsSceneDragDropEvent((*C.QGraphicsSceneDragDropEvent)(h)) } // NewQGraphicsSceneDragDropEvent constructs a new QGraphicsSceneDragDropEvent object. func NewQGraphicsSceneDragDropEvent() *QGraphicsSceneDragDropEvent { - var outptr_QGraphicsSceneDragDropEvent *C.QGraphicsSceneDragDropEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneDragDropEvent_new(&outptr_QGraphicsSceneDragDropEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneDragDropEvent(outptr_QGraphicsSceneDragDropEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneDragDropEvent(C.QGraphicsSceneDragDropEvent_new()) ret.isSubclass = true return ret } // NewQGraphicsSceneDragDropEvent2 constructs a new QGraphicsSceneDragDropEvent object. func NewQGraphicsSceneDragDropEvent2(typeVal QEvent__Type) *QGraphicsSceneDragDropEvent { - var outptr_QGraphicsSceneDragDropEvent *C.QGraphicsSceneDragDropEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneDragDropEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneDragDropEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneDragDropEvent(outptr_QGraphicsSceneDragDropEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneDragDropEvent(C.QGraphicsSceneDragDropEvent_new2((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -942,7 +877,7 @@ func (this *QGraphicsSceneDragDropEvent) SetDropAction(action DropAction) { } func (this *QGraphicsSceneDragDropEvent) Source() *QWidget { - return newQWidget(C.QGraphicsSceneDragDropEvent_Source(this.h), nil, nil) + return newQWidget(C.QGraphicsSceneDragDropEvent_Source(this.h)) } func (this *QGraphicsSceneDragDropEvent) SetSource(source *QWidget) { @@ -950,7 +885,7 @@ func (this *QGraphicsSceneDragDropEvent) SetSource(source *QWidget) { } func (this *QGraphicsSceneDragDropEvent) MimeData() *QMimeData { - return newQMimeData(C.QGraphicsSceneDragDropEvent_MimeData(this.h), nil) + return newQMimeData(C.QGraphicsSceneDragDropEvent_MimeData(this.h)) } func (this *QGraphicsSceneDragDropEvent) SetMimeData(data *QMimeData) { @@ -992,32 +927,26 @@ func (this *QGraphicsSceneResizeEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneResizeEvent constructs the type using only CGO pointers. -func newQGraphicsSceneResizeEvent(h *C.QGraphicsSceneResizeEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneResizeEvent { +func newQGraphicsSceneResizeEvent(h *C.QGraphicsSceneResizeEvent) *QGraphicsSceneResizeEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneResizeEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneResizeEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneResizeEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneResizeEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneResizeEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneResizeEvent{h: (*C.QGraphicsSceneResizeEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneResizeEvent(h unsafe.Pointer) *QGraphicsSceneResizeEvent { + return newQGraphicsSceneResizeEvent((*C.QGraphicsSceneResizeEvent)(h)) } // NewQGraphicsSceneResizeEvent constructs a new QGraphicsSceneResizeEvent object. func NewQGraphicsSceneResizeEvent() *QGraphicsSceneResizeEvent { - var outptr_QGraphicsSceneResizeEvent *C.QGraphicsSceneResizeEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneResizeEvent_new(&outptr_QGraphicsSceneResizeEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneResizeEvent(outptr_QGraphicsSceneResizeEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneResizeEvent(C.QGraphicsSceneResizeEvent_new()) ret.isSubclass = true return ret } @@ -1077,32 +1006,26 @@ func (this *QGraphicsSceneMoveEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneMoveEvent constructs the type using only CGO pointers. -func newQGraphicsSceneMoveEvent(h *C.QGraphicsSceneMoveEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneMoveEvent { +func newQGraphicsSceneMoveEvent(h *C.QGraphicsSceneMoveEvent) *QGraphicsSceneMoveEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneMoveEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneMoveEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneMoveEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneMoveEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneMoveEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneMoveEvent{h: (*C.QGraphicsSceneMoveEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneMoveEvent(h unsafe.Pointer) *QGraphicsSceneMoveEvent { + return newQGraphicsSceneMoveEvent((*C.QGraphicsSceneMoveEvent)(h)) } // NewQGraphicsSceneMoveEvent constructs a new QGraphicsSceneMoveEvent object. func NewQGraphicsSceneMoveEvent() *QGraphicsSceneMoveEvent { - var outptr_QGraphicsSceneMoveEvent *C.QGraphicsSceneMoveEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneMoveEvent_new(&outptr_QGraphicsSceneMoveEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneMoveEvent(outptr_QGraphicsSceneMoveEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneMoveEvent(C.QGraphicsSceneMoveEvent_new()) ret.isSubclass = true return ret } diff --git a/qt/gen_qgraphicssceneevent.h b/qt/gen_qgraphicssceneevent.h index 39a9c5df..13808443 100644 --- a/qt/gen_qgraphicssceneevent.h +++ b/qt/gen_qgraphicssceneevent.h @@ -48,13 +48,15 @@ typedef struct QSizeF QSizeF; typedef struct QWidget QWidget; #endif -void QGraphicsSceneEvent_new(int typeVal, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneEvent* QGraphicsSceneEvent_new(int typeVal); +void QGraphicsSceneEvent_virtbase(QGraphicsSceneEvent* src, QEvent** outptr_QEvent); QWidget* QGraphicsSceneEvent_Widget(const QGraphicsSceneEvent* self); void QGraphicsSceneEvent_SetWidget(QGraphicsSceneEvent* self, QWidget* widget); void QGraphicsSceneEvent_Delete(QGraphicsSceneEvent* self, bool isSubclass); -void QGraphicsSceneMouseEvent_new(QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); -void QGraphicsSceneMouseEvent_new2(int typeVal, QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new(); +QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new2(int typeVal); +void QGraphicsSceneMouseEvent_virtbase(QGraphicsSceneMouseEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QPointF* QGraphicsSceneMouseEvent_Pos(const QGraphicsSceneMouseEvent* self); void QGraphicsSceneMouseEvent_SetPos(QGraphicsSceneMouseEvent* self, QPointF* pos); QPointF* QGraphicsSceneMouseEvent_ScenePos(const QGraphicsSceneMouseEvent* self); @@ -85,8 +87,9 @@ int QGraphicsSceneMouseEvent_Flags(const QGraphicsSceneMouseEvent* self); void QGraphicsSceneMouseEvent_SetFlags(QGraphicsSceneMouseEvent* self, int flags); void QGraphicsSceneMouseEvent_Delete(QGraphicsSceneMouseEvent* self, bool isSubclass); -void QGraphicsSceneWheelEvent_new(QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); -void QGraphicsSceneWheelEvent_new2(int typeVal, QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new(); +QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new2(int typeVal); +void QGraphicsSceneWheelEvent_virtbase(QGraphicsSceneWheelEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QPointF* QGraphicsSceneWheelEvent_Pos(const QGraphicsSceneWheelEvent* self); void QGraphicsSceneWheelEvent_SetPos(QGraphicsSceneWheelEvent* self, QPointF* pos); QPointF* QGraphicsSceneWheelEvent_ScenePos(const QGraphicsSceneWheelEvent* self); @@ -103,8 +106,9 @@ int QGraphicsSceneWheelEvent_Orientation(const QGraphicsSceneWheelEvent* self); void QGraphicsSceneWheelEvent_SetOrientation(QGraphicsSceneWheelEvent* self, int orientation); void QGraphicsSceneWheelEvent_Delete(QGraphicsSceneWheelEvent* self, bool isSubclass); -void QGraphicsSceneContextMenuEvent_new(QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); -void QGraphicsSceneContextMenuEvent_new2(int typeVal, QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new(); +QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new2(int typeVal); +void QGraphicsSceneContextMenuEvent_virtbase(QGraphicsSceneContextMenuEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QPointF* QGraphicsSceneContextMenuEvent_Pos(const QGraphicsSceneContextMenuEvent* self); void QGraphicsSceneContextMenuEvent_SetPos(QGraphicsSceneContextMenuEvent* self, QPointF* pos); QPointF* QGraphicsSceneContextMenuEvent_ScenePos(const QGraphicsSceneContextMenuEvent* self); @@ -117,8 +121,9 @@ int QGraphicsSceneContextMenuEvent_Reason(const QGraphicsSceneContextMenuEvent* void QGraphicsSceneContextMenuEvent_SetReason(QGraphicsSceneContextMenuEvent* self, int reason); void QGraphicsSceneContextMenuEvent_Delete(QGraphicsSceneContextMenuEvent* self, bool isSubclass); -void QGraphicsSceneHoverEvent_new(QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); -void QGraphicsSceneHoverEvent_new2(int typeVal, QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new(); +QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new2(int typeVal); +void QGraphicsSceneHoverEvent_virtbase(QGraphicsSceneHoverEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QPointF* QGraphicsSceneHoverEvent_Pos(const QGraphicsSceneHoverEvent* self); void QGraphicsSceneHoverEvent_SetPos(QGraphicsSceneHoverEvent* self, QPointF* pos); QPointF* QGraphicsSceneHoverEvent_ScenePos(const QGraphicsSceneHoverEvent* self); @@ -135,16 +140,18 @@ int QGraphicsSceneHoverEvent_Modifiers(const QGraphicsSceneHoverEvent* self); void QGraphicsSceneHoverEvent_SetModifiers(QGraphicsSceneHoverEvent* self, int modifiers); void QGraphicsSceneHoverEvent_Delete(QGraphicsSceneHoverEvent* self, bool isSubclass); -void QGraphicsSceneHelpEvent_new(QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); -void QGraphicsSceneHelpEvent_new2(int typeVal, QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new(); +QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new2(int typeVal); +void QGraphicsSceneHelpEvent_virtbase(QGraphicsSceneHelpEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QPointF* QGraphicsSceneHelpEvent_ScenePos(const QGraphicsSceneHelpEvent* self); void QGraphicsSceneHelpEvent_SetScenePos(QGraphicsSceneHelpEvent* self, QPointF* pos); QPoint* QGraphicsSceneHelpEvent_ScreenPos(const QGraphicsSceneHelpEvent* self); void QGraphicsSceneHelpEvent_SetScreenPos(QGraphicsSceneHelpEvent* self, QPoint* pos); void QGraphicsSceneHelpEvent_Delete(QGraphicsSceneHelpEvent* self, bool isSubclass); -void QGraphicsSceneDragDropEvent_new(QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); -void QGraphicsSceneDragDropEvent_new2(int typeVal, QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new(); +QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new2(int typeVal); +void QGraphicsSceneDragDropEvent_virtbase(QGraphicsSceneDragDropEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QPointF* QGraphicsSceneDragDropEvent_Pos(const QGraphicsSceneDragDropEvent* self); void QGraphicsSceneDragDropEvent_SetPos(QGraphicsSceneDragDropEvent* self, QPointF* pos); QPointF* QGraphicsSceneDragDropEvent_ScenePos(const QGraphicsSceneDragDropEvent* self); @@ -168,14 +175,16 @@ QMimeData* QGraphicsSceneDragDropEvent_MimeData(const QGraphicsSceneDragDropEven void QGraphicsSceneDragDropEvent_SetMimeData(QGraphicsSceneDragDropEvent* self, QMimeData* data); void QGraphicsSceneDragDropEvent_Delete(QGraphicsSceneDragDropEvent* self, bool isSubclass); -void QGraphicsSceneResizeEvent_new(QGraphicsSceneResizeEvent** outptr_QGraphicsSceneResizeEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneResizeEvent* QGraphicsSceneResizeEvent_new(); +void QGraphicsSceneResizeEvent_virtbase(QGraphicsSceneResizeEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QSizeF* QGraphicsSceneResizeEvent_OldSize(const QGraphicsSceneResizeEvent* self); void QGraphicsSceneResizeEvent_SetOldSize(QGraphicsSceneResizeEvent* self, QSizeF* size); QSizeF* QGraphicsSceneResizeEvent_NewSize(const QGraphicsSceneResizeEvent* self); void QGraphicsSceneResizeEvent_SetNewSize(QGraphicsSceneResizeEvent* self, QSizeF* size); void QGraphicsSceneResizeEvent_Delete(QGraphicsSceneResizeEvent* self, bool isSubclass); -void QGraphicsSceneMoveEvent_new(QGraphicsSceneMoveEvent** outptr_QGraphicsSceneMoveEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneMoveEvent* QGraphicsSceneMoveEvent_new(); +void QGraphicsSceneMoveEvent_virtbase(QGraphicsSceneMoveEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QPointF* QGraphicsSceneMoveEvent_OldPos(const QGraphicsSceneMoveEvent* self); void QGraphicsSceneMoveEvent_SetOldPos(QGraphicsSceneMoveEvent* self, QPointF* pos); QPointF* QGraphicsSceneMoveEvent_NewPos(const QGraphicsSceneMoveEvent* self); diff --git a/qt/gen_qgraphicstransform.cpp b/qt/gen_qgraphicstransform.cpp index 24ee3168..00fbaa53 100644 --- a/qt/gen_qgraphicstransform.cpp +++ b/qt/gen_qgraphicstransform.cpp @@ -213,16 +213,16 @@ public: }; -void QGraphicsTransform_new(QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { - MiqtVirtualQGraphicsTransform* ret = new MiqtVirtualQGraphicsTransform(); - *outptr_QGraphicsTransform = ret; - *outptr_QObject = static_cast(ret); +QGraphicsTransform* QGraphicsTransform_new() { + return new MiqtVirtualQGraphicsTransform(); } -void QGraphicsTransform_new2(QObject* parent, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { - MiqtVirtualQGraphicsTransform* ret = new MiqtVirtualQGraphicsTransform(parent); - *outptr_QGraphicsTransform = ret; - *outptr_QObject = static_cast(ret); +QGraphicsTransform* QGraphicsTransform_new2(QObject* parent) { + return new MiqtVirtualQGraphicsTransform(parent); +} + +void QGraphicsTransform_virtbase(QGraphicsTransform* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QGraphicsTransform_MetaObject(const QGraphicsTransform* self) { @@ -405,18 +405,16 @@ public: }; -void QGraphicsScale_new(QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScale* ret = new MiqtVirtualQGraphicsScale(); - *outptr_QGraphicsScale = ret; - *outptr_QGraphicsTransform = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsScale* QGraphicsScale_new() { + return new MiqtVirtualQGraphicsScale(); } -void QGraphicsScale_new2(QObject* parent, QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScale* ret = new MiqtVirtualQGraphicsScale(parent); - *outptr_QGraphicsScale = ret; - *outptr_QGraphicsTransform = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsScale* QGraphicsScale_new2(QObject* parent) { + return new MiqtVirtualQGraphicsScale(parent); +} + +void QGraphicsScale_virtbase(QGraphicsScale* src, QGraphicsTransform** outptr_QGraphicsTransform) { + *outptr_QGraphicsTransform = static_cast(src); } QMetaObject* QGraphicsScale_MetaObject(const QGraphicsScale* self) { @@ -632,18 +630,16 @@ public: }; -void QGraphicsRotation_new(QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { - MiqtVirtualQGraphicsRotation* ret = new MiqtVirtualQGraphicsRotation(); - *outptr_QGraphicsRotation = ret; - *outptr_QGraphicsTransform = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsRotation* QGraphicsRotation_new() { + return new MiqtVirtualQGraphicsRotation(); } -void QGraphicsRotation_new2(QObject* parent, QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { - MiqtVirtualQGraphicsRotation* ret = new MiqtVirtualQGraphicsRotation(parent); - *outptr_QGraphicsRotation = ret; - *outptr_QGraphicsTransform = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsRotation* QGraphicsRotation_new2(QObject* parent) { + return new MiqtVirtualQGraphicsRotation(parent); +} + +void QGraphicsRotation_virtbase(QGraphicsRotation* src, QGraphicsTransform** outptr_QGraphicsTransform) { + *outptr_QGraphicsTransform = static_cast(src); } QMetaObject* QGraphicsRotation_MetaObject(const QGraphicsRotation* self) { diff --git a/qt/gen_qgraphicstransform.go b/qt/gen_qgraphicstransform.go index 23ba5ee8..2a1c9b5b 100644 --- a/qt/gen_qgraphicstransform.go +++ b/qt/gen_qgraphicstransform.go @@ -35,42 +35,34 @@ func (this *QGraphicsTransform) UnsafePointer() unsafe.Pointer { } // newQGraphicsTransform constructs the type using only CGO pointers. -func newQGraphicsTransform(h *C.QGraphicsTransform, h_QObject *C.QObject) *QGraphicsTransform { +func newQGraphicsTransform(h *C.QGraphicsTransform) *QGraphicsTransform { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QGraphicsTransform_virtbase(h, &outptr_QObject) + return &QGraphicsTransform{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQGraphicsTransform constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsTransform(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsTransform { - if h == nil { - return nil - } - - return &QGraphicsTransform{h: (*C.QGraphicsTransform)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQGraphicsTransform(h unsafe.Pointer) *QGraphicsTransform { + return newQGraphicsTransform((*C.QGraphicsTransform)(h)) } // NewQGraphicsTransform constructs a new QGraphicsTransform object. func NewQGraphicsTransform() *QGraphicsTransform { - var outptr_QGraphicsTransform *C.QGraphicsTransform = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsTransform_new(&outptr_QGraphicsTransform, &outptr_QObject) - ret := newQGraphicsTransform(outptr_QGraphicsTransform, outptr_QObject) + ret := newQGraphicsTransform(C.QGraphicsTransform_new()) ret.isSubclass = true return ret } // NewQGraphicsTransform2 constructs a new QGraphicsTransform object. func NewQGraphicsTransform2(parent *QObject) *QGraphicsTransform { - var outptr_QGraphicsTransform *C.QGraphicsTransform = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsTransform_new2(parent.cPointer(), &outptr_QGraphicsTransform, &outptr_QObject) - ret := newQGraphicsTransform(outptr_QGraphicsTransform, outptr_QObject) + ret := newQGraphicsTransform(C.QGraphicsTransform_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -249,7 +241,7 @@ func miqt_exec_callback_QGraphicsTransform_TimerEvent(self *C.QGraphicsTransform } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QGraphicsTransform{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -275,7 +267,7 @@ func miqt_exec_callback_QGraphicsTransform_ChildEvent(self *C.QGraphicsTransform } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGraphicsTransform{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -394,44 +386,34 @@ func (this *QGraphicsScale) UnsafePointer() unsafe.Pointer { } // newQGraphicsScale constructs the type using only CGO pointers. -func newQGraphicsScale(h *C.QGraphicsScale, h_QGraphicsTransform *C.QGraphicsTransform, h_QObject *C.QObject) *QGraphicsScale { +func newQGraphicsScale(h *C.QGraphicsScale) *QGraphicsScale { if h == nil { return nil } + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + C.QGraphicsScale_virtbase(h, &outptr_QGraphicsTransform) + return &QGraphicsScale{h: h, - QGraphicsTransform: newQGraphicsTransform(h_QGraphicsTransform, h_QObject)} + QGraphicsTransform: newQGraphicsTransform(outptr_QGraphicsTransform)} } // UnsafeNewQGraphicsScale constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsScale(h unsafe.Pointer, h_QGraphicsTransform unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsScale { - if h == nil { - return nil - } - - return &QGraphicsScale{h: (*C.QGraphicsScale)(h), - QGraphicsTransform: UnsafeNewQGraphicsTransform(h_QGraphicsTransform, h_QObject)} +func UnsafeNewQGraphicsScale(h unsafe.Pointer) *QGraphicsScale { + return newQGraphicsScale((*C.QGraphicsScale)(h)) } // NewQGraphicsScale constructs a new QGraphicsScale object. func NewQGraphicsScale() *QGraphicsScale { - var outptr_QGraphicsScale *C.QGraphicsScale = nil - var outptr_QGraphicsTransform *C.QGraphicsTransform = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScale_new(&outptr_QGraphicsScale, &outptr_QGraphicsTransform, &outptr_QObject) - ret := newQGraphicsScale(outptr_QGraphicsScale, outptr_QGraphicsTransform, outptr_QObject) + ret := newQGraphicsScale(C.QGraphicsScale_new()) ret.isSubclass = true return ret } // NewQGraphicsScale2 constructs a new QGraphicsScale object. func NewQGraphicsScale2(parent *QObject) *QGraphicsScale { - var outptr_QGraphicsScale *C.QGraphicsScale = nil - var outptr_QGraphicsTransform *C.QGraphicsTransform = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScale_new2(parent.cPointer(), &outptr_QGraphicsScale, &outptr_QGraphicsTransform, &outptr_QObject) - ret := newQGraphicsScale(outptr_QGraphicsScale, outptr_QGraphicsTransform, outptr_QObject) + ret := newQGraphicsScale(C.QGraphicsScale_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -692,44 +674,34 @@ func (this *QGraphicsRotation) UnsafePointer() unsafe.Pointer { } // newQGraphicsRotation constructs the type using only CGO pointers. -func newQGraphicsRotation(h *C.QGraphicsRotation, h_QGraphicsTransform *C.QGraphicsTransform, h_QObject *C.QObject) *QGraphicsRotation { +func newQGraphicsRotation(h *C.QGraphicsRotation) *QGraphicsRotation { if h == nil { return nil } + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + C.QGraphicsRotation_virtbase(h, &outptr_QGraphicsTransform) + return &QGraphicsRotation{h: h, - QGraphicsTransform: newQGraphicsTransform(h_QGraphicsTransform, h_QObject)} + QGraphicsTransform: newQGraphicsTransform(outptr_QGraphicsTransform)} } // UnsafeNewQGraphicsRotation constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsRotation(h unsafe.Pointer, h_QGraphicsTransform unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsRotation { - if h == nil { - return nil - } - - return &QGraphicsRotation{h: (*C.QGraphicsRotation)(h), - QGraphicsTransform: UnsafeNewQGraphicsTransform(h_QGraphicsTransform, h_QObject)} +func UnsafeNewQGraphicsRotation(h unsafe.Pointer) *QGraphicsRotation { + return newQGraphicsRotation((*C.QGraphicsRotation)(h)) } // NewQGraphicsRotation constructs a new QGraphicsRotation object. func NewQGraphicsRotation() *QGraphicsRotation { - var outptr_QGraphicsRotation *C.QGraphicsRotation = nil - var outptr_QGraphicsTransform *C.QGraphicsTransform = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsRotation_new(&outptr_QGraphicsRotation, &outptr_QGraphicsTransform, &outptr_QObject) - ret := newQGraphicsRotation(outptr_QGraphicsRotation, outptr_QGraphicsTransform, outptr_QObject) + ret := newQGraphicsRotation(C.QGraphicsRotation_new()) ret.isSubclass = true return ret } // NewQGraphicsRotation2 constructs a new QGraphicsRotation object. func NewQGraphicsRotation2(parent *QObject) *QGraphicsRotation { - var outptr_QGraphicsRotation *C.QGraphicsRotation = nil - var outptr_QGraphicsTransform *C.QGraphicsTransform = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsRotation_new2(parent.cPointer(), &outptr_QGraphicsRotation, &outptr_QGraphicsTransform, &outptr_QObject) - ret := newQGraphicsRotation(outptr_QGraphicsRotation, outptr_QGraphicsTransform, outptr_QObject) + ret := newQGraphicsRotation(C.QGraphicsRotation_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qgraphicstransform.h b/qt/gen_qgraphicstransform.h index 21f13fcf..2fb6fa58 100644 --- a/qt/gen_qgraphicstransform.h +++ b/qt/gen_qgraphicstransform.h @@ -40,8 +40,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVector3D QVector3D; #endif -void QGraphicsTransform_new(QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); -void QGraphicsTransform_new2(QObject* parent, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); +QGraphicsTransform* QGraphicsTransform_new(); +QGraphicsTransform* QGraphicsTransform_new2(QObject* parent); +void QGraphicsTransform_virtbase(QGraphicsTransform* src, QObject** outptr_QObject); QMetaObject* QGraphicsTransform_MetaObject(const QGraphicsTransform* self); void* QGraphicsTransform_Metacast(QGraphicsTransform* self, const char* param1); struct miqt_string QGraphicsTransform_Tr(const char* s); @@ -69,8 +70,9 @@ void QGraphicsTransform_override_virtual_DisconnectNotify(void* self, intptr_t s void QGraphicsTransform_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QGraphicsTransform_Delete(QGraphicsTransform* self, bool isSubclass); -void QGraphicsScale_new(QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); -void QGraphicsScale_new2(QObject* parent, QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); +QGraphicsScale* QGraphicsScale_new(); +QGraphicsScale* QGraphicsScale_new2(QObject* parent); +void QGraphicsScale_virtbase(QGraphicsScale* src, QGraphicsTransform** outptr_QGraphicsTransform); QMetaObject* QGraphicsScale_MetaObject(const QGraphicsScale* self); void* QGraphicsScale_Metacast(QGraphicsScale* self, const char* param1); struct miqt_string QGraphicsScale_Tr(const char* s); @@ -102,8 +104,9 @@ void QGraphicsScale_override_virtual_ApplyTo(void* self, intptr_t slot); void QGraphicsScale_virtualbase_ApplyTo(const void* self, QMatrix4x4* matrix); void QGraphicsScale_Delete(QGraphicsScale* self, bool isSubclass); -void QGraphicsRotation_new(QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); -void QGraphicsRotation_new2(QObject* parent, QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); +QGraphicsRotation* QGraphicsRotation_new(); +QGraphicsRotation* QGraphicsRotation_new2(QObject* parent); +void QGraphicsRotation_virtbase(QGraphicsRotation* src, QGraphicsTransform** outptr_QGraphicsTransform); QMetaObject* QGraphicsRotation_MetaObject(const QGraphicsRotation* self); void* QGraphicsRotation_Metacast(QGraphicsRotation* self, const char* param1); struct miqt_string QGraphicsRotation_Tr(const char* s); diff --git a/qt/gen_qgraphicsview.cpp b/qt/gen_qgraphicsview.cpp index 0a95fa7d..840ac2e4 100644 --- a/qt/gen_qgraphicsview.cpp +++ b/qt/gen_qgraphicsview.cpp @@ -770,44 +770,24 @@ public: }; -void QGraphicsView_new(QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(parent); - *outptr_QGraphicsView = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QGraphicsView* QGraphicsView_new(QWidget* parent) { + return new MiqtVirtualQGraphicsView(parent); } -void QGraphicsView_new2(QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(); - *outptr_QGraphicsView = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QGraphicsView* QGraphicsView_new2() { + return new MiqtVirtualQGraphicsView(); } -void QGraphicsView_new3(QGraphicsScene* scene, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(scene); - *outptr_QGraphicsView = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QGraphicsView* QGraphicsView_new3(QGraphicsScene* scene) { + return new MiqtVirtualQGraphicsView(scene); } -void QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(scene, parent); - *outptr_QGraphicsView = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QGraphicsView* QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent) { + return new MiqtVirtualQGraphicsView(scene, parent); +} + +void QGraphicsView_virtbase(QGraphicsView* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); } QMetaObject* QGraphicsView_MetaObject(const QGraphicsView* self) { diff --git a/qt/gen_qgraphicsview.go b/qt/gen_qgraphicsview.go index c923c99c..c66de106 100644 --- a/qt/gen_qgraphicsview.go +++ b/qt/gen_qgraphicsview.go @@ -77,80 +77,50 @@ func (this *QGraphicsView) UnsafePointer() unsafe.Pointer { } // newQGraphicsView constructs the type using only CGO pointers. -func newQGraphicsView(h *C.QGraphicsView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QGraphicsView { +func newQGraphicsView(h *C.QGraphicsView) *QGraphicsView { if h == nil { return nil } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QGraphicsView_virtbase(h, &outptr_QAbstractScrollArea) + return &QGraphicsView{h: h, - QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractScrollArea: newQAbstractScrollArea(outptr_QAbstractScrollArea)} } // UnsafeNewQGraphicsView constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsView(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QGraphicsView { - if h == nil { - return nil - } - - return &QGraphicsView{h: (*C.QGraphicsView)(h), - QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQGraphicsView(h unsafe.Pointer) *QGraphicsView { + return newQGraphicsView((*C.QGraphicsView)(h)) } // NewQGraphicsView constructs a new QGraphicsView object. func NewQGraphicsView(parent *QWidget) *QGraphicsView { - var outptr_QGraphicsView *C.QGraphicsView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGraphicsView_new(parent.cPointer(), &outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGraphicsView(C.QGraphicsView_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsView2 constructs a new QGraphicsView object. func NewQGraphicsView2() *QGraphicsView { - var outptr_QGraphicsView *C.QGraphicsView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGraphicsView_new2(&outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGraphicsView(C.QGraphicsView_new2()) ret.isSubclass = true return ret } // NewQGraphicsView3 constructs a new QGraphicsView object. func NewQGraphicsView3(scene *QGraphicsScene) *QGraphicsView { - var outptr_QGraphicsView *C.QGraphicsView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGraphicsView_new3(scene.cPointer(), &outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGraphicsView(C.QGraphicsView_new3(scene.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsView4 constructs a new QGraphicsView object. func NewQGraphicsView4(scene *QGraphicsScene, parent *QWidget) *QGraphicsView { - var outptr_QGraphicsView *C.QGraphicsView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGraphicsView_new4(scene.cPointer(), parent.cPointer(), &outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGraphicsView(C.QGraphicsView_new4(scene.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -288,7 +258,7 @@ func (this *QGraphicsView) SetInteractive(allowed bool) { } func (this *QGraphicsView) Scene() *QGraphicsScene { - return newQGraphicsScene(C.QGraphicsView_Scene(this.h), nil) + return newQGraphicsScene(C.QGraphicsView_Scene(this.h)) } func (this *QGraphicsView) SetScene(scene *QGraphicsScene) { @@ -804,7 +774,7 @@ func miqt_exec_callback_QGraphicsView_SetupViewport(self *C.QGraphicsView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QGraphicsView{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -886,7 +856,7 @@ func miqt_exec_callback_QGraphicsView_ContextMenuEvent(self *C.QGraphicsView, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -912,7 +882,7 @@ func miqt_exec_callback_QGraphicsView_DragEnterEvent(self *C.QGraphicsView, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -938,7 +908,7 @@ func miqt_exec_callback_QGraphicsView_DragLeaveEvent(self *C.QGraphicsView, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -964,7 +934,7 @@ func miqt_exec_callback_QGraphicsView_DragMoveEvent(self *C.QGraphicsView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -990,7 +960,7 @@ func miqt_exec_callback_QGraphicsView_DropEvent(self *C.QGraphicsView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1016,7 +986,7 @@ func miqt_exec_callback_QGraphicsView_FocusInEvent(self *C.QGraphicsView, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1070,7 +1040,7 @@ func miqt_exec_callback_QGraphicsView_FocusOutEvent(self *C.QGraphicsView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1096,7 +1066,7 @@ func miqt_exec_callback_QGraphicsView_KeyPressEvent(self *C.QGraphicsView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1122,7 +1092,7 @@ func miqt_exec_callback_QGraphicsView_KeyReleaseEvent(self *C.QGraphicsView, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1148,7 +1118,7 @@ func miqt_exec_callback_QGraphicsView_MouseDoubleClickEvent(self *C.QGraphicsVie } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1174,7 +1144,7 @@ func miqt_exec_callback_QGraphicsView_MousePressEvent(self *C.QGraphicsView, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1200,7 +1170,7 @@ func miqt_exec_callback_QGraphicsView_MouseMoveEvent(self *C.QGraphicsView, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1226,7 +1196,7 @@ func miqt_exec_callback_QGraphicsView_MouseReleaseEvent(self *C.QGraphicsView, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1252,7 +1222,7 @@ func miqt_exec_callback_QGraphicsView_WheelEvent(self *C.QGraphicsView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1278,7 +1248,7 @@ func miqt_exec_callback_QGraphicsView_PaintEvent(self *C.QGraphicsView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1304,7 +1274,7 @@ func miqt_exec_callback_QGraphicsView_ResizeEvent(self *C.QGraphicsView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1358,7 +1328,7 @@ func miqt_exec_callback_QGraphicsView_ShowEvent(self *C.QGraphicsView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1384,7 +1354,7 @@ func miqt_exec_callback_QGraphicsView_InputMethodEvent(self *C.QGraphicsView, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qgraphicsview.h b/qt/gen_qgraphicsview.h index bbb6a476..1240af8a 100644 --- a/qt/gen_qgraphicsview.h +++ b/qt/gen_qgraphicsview.h @@ -86,10 +86,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QGraphicsView_new(QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QGraphicsView_new2(QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QGraphicsView_new3(QGraphicsScene* scene, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QGraphicsView* QGraphicsView_new(QWidget* parent); +QGraphicsView* QGraphicsView_new2(); +QGraphicsView* QGraphicsView_new3(QGraphicsScene* scene); +QGraphicsView* QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent); +void QGraphicsView_virtbase(QGraphicsView* src, QAbstractScrollArea** outptr_QAbstractScrollArea); QMetaObject* QGraphicsView_MetaObject(const QGraphicsView* self); void* QGraphicsView_Metacast(QGraphicsView* self, const char* param1); struct miqt_string QGraphicsView_Tr(const char* s); diff --git a/qt/gen_qgraphicswidget.cpp b/qt/gen_qgraphicswidget.cpp index ba41a6b9..568b0420 100644 --- a/qt/gen_qgraphicswidget.cpp +++ b/qt/gen_qgraphicswidget.cpp @@ -834,31 +834,21 @@ public: }; -void QGraphicsWidget_new(QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsWidget* ret = new MiqtVirtualQGraphicsWidget(); - *outptr_QGraphicsWidget = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsWidget* QGraphicsWidget_new() { + return new MiqtVirtualQGraphicsWidget(); } -void QGraphicsWidget_new2(QGraphicsItem* parent, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsWidget* ret = new MiqtVirtualQGraphicsWidget(parent); - *outptr_QGraphicsWidget = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsWidget* QGraphicsWidget_new2(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsWidget(parent); } -void QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsWidget* ret = new MiqtVirtualQGraphicsWidget(parent, static_cast(wFlags)); - *outptr_QGraphicsWidget = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsWidget* QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags) { + return new MiqtVirtualQGraphicsWidget(parent, static_cast(wFlags)); +} + +void QGraphicsWidget_virtbase(QGraphicsWidget* src, QGraphicsObject** outptr_QGraphicsObject, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + *outptr_QGraphicsObject = static_cast(src); + *outptr_QGraphicsLayoutItem = static_cast(src); } QMetaObject* QGraphicsWidget_MetaObject(const QGraphicsWidget* self) { diff --git a/qt/gen_qgraphicswidget.go b/qt/gen_qgraphicswidget.go index efea8bb8..a380b67f 100644 --- a/qt/gen_qgraphicswidget.go +++ b/qt/gen_qgraphicswidget.go @@ -42,64 +42,44 @@ func (this *QGraphicsWidget) UnsafePointer() unsafe.Pointer { } // newQGraphicsWidget constructs the type using only CGO pointers. -func newQGraphicsWidget(h *C.QGraphicsWidget, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsWidget { +func newQGraphicsWidget(h *C.QGraphicsWidget) *QGraphicsWidget { if h == nil { return nil } + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + C.QGraphicsWidget_virtbase(h, &outptr_QGraphicsObject, &outptr_QGraphicsLayoutItem) + return &QGraphicsWidget{h: h, - QGraphicsObject: newQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem), - QGraphicsLayoutItem: newQGraphicsLayoutItem(h_QGraphicsLayoutItem)} + QGraphicsObject: newQGraphicsObject(outptr_QGraphicsObject), + QGraphicsLayoutItem: newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem)} } // UnsafeNewQGraphicsWidget constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsWidget(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsWidget { - if h == nil { - return nil - } - - return &QGraphicsWidget{h: (*C.QGraphicsWidget)(h), - QGraphicsObject: UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem), - QGraphicsLayoutItem: UnsafeNewQGraphicsLayoutItem(h_QGraphicsLayoutItem)} +func UnsafeNewQGraphicsWidget(h unsafe.Pointer) *QGraphicsWidget { + return newQGraphicsWidget((*C.QGraphicsWidget)(h)) } // NewQGraphicsWidget constructs a new QGraphicsWidget object. func NewQGraphicsWidget() *QGraphicsWidget { - var outptr_QGraphicsWidget *C.QGraphicsWidget = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsWidget_new(&outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsWidget(outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret := newQGraphicsWidget(C.QGraphicsWidget_new()) ret.isSubclass = true return ret } // NewQGraphicsWidget2 constructs a new QGraphicsWidget object. func NewQGraphicsWidget2(parent *QGraphicsItem) *QGraphicsWidget { - var outptr_QGraphicsWidget *C.QGraphicsWidget = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsWidget_new2(parent.cPointer(), &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsWidget(outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret := newQGraphicsWidget(C.QGraphicsWidget_new2(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsWidget3 constructs a new QGraphicsWidget object. func NewQGraphicsWidget3(parent *QGraphicsItem, wFlags WindowType) *QGraphicsWidget { - var outptr_QGraphicsWidget *C.QGraphicsWidget = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsWidget_new3(parent.cPointer(), (C.int)(wFlags), &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsWidget(outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret := newQGraphicsWidget(C.QGraphicsWidget_new3(parent.cPointer(), (C.int)(wFlags))) ret.isSubclass = true return ret } @@ -133,7 +113,7 @@ func QGraphicsWidget_TrUtf8(s string) string { } func (this *QGraphicsWidget) Layout() *QGraphicsLayout { - return newQGraphicsLayout(C.QGraphicsWidget_Layout(this.h), nil) + return newQGraphicsLayout(C.QGraphicsWidget_Layout(this.h)) } func (this *QGraphicsWidget) SetLayout(layout *QGraphicsLayout) { @@ -157,7 +137,7 @@ func (this *QGraphicsWidget) UnsetLayoutDirection() { } func (this *QGraphicsWidget) Style() *QStyle { - return newQStyle(C.QGraphicsWidget_Style(this.h), nil) + return newQStyle(C.QGraphicsWidget_Style(this.h)) } func (this *QGraphicsWidget) SetStyle(style *QStyle) { @@ -304,7 +284,7 @@ func QGraphicsWidget_SetTabOrder(first *QGraphicsWidget, second *QGraphicsWidget } func (this *QGraphicsWidget) FocusWidget() *QGraphicsWidget { - return newQGraphicsWidget(C.QGraphicsWidget_FocusWidget(this.h), nil, nil, nil, nil) + return newQGraphicsWidget(C.QGraphicsWidget_FocusWidget(this.h)) } func (this *QGraphicsWidget) GrabShortcut(sequence *QKeySequence) int { @@ -360,7 +340,7 @@ func (this *QGraphicsWidget) Actions() []*QAction { _ret := make([]*QAction, int(_ma.len)) _outCast := (*[0xffff]*C.QAction)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAction(_outCast[i], nil) + _ret[i] = newQAction(_outCast[i]) } return _ret } @@ -600,9 +580,9 @@ func miqt_exec_callback_QGraphicsWidget_Paint(self *C.QGraphicsWidget, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -630,9 +610,9 @@ func miqt_exec_callback_QGraphicsWidget_PaintWindowFrame(self *C.QGraphicsWidget // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_PaintWindowFrame, slotval1, slotval2, slotval3) @@ -1001,7 +981,7 @@ func miqt_exec_callback_QGraphicsWidget_CloseEvent(self *C.QGraphicsWidget, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1027,7 +1007,7 @@ func miqt_exec_callback_QGraphicsWidget_FocusInEvent(self *C.QGraphicsWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1081,7 +1061,7 @@ func miqt_exec_callback_QGraphicsWidget_FocusOutEvent(self *C.QGraphicsWidget, c } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1107,7 +1087,7 @@ func miqt_exec_callback_QGraphicsWidget_HideEvent(self *C.QGraphicsWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1133,7 +1113,7 @@ func miqt_exec_callback_QGraphicsWidget_MoveEvent(self *C.QGraphicsWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMoveEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMoveEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1182,7 +1162,7 @@ func miqt_exec_callback_QGraphicsWidget_ResizeEvent(self *C.QGraphicsWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneResizeEvent(event, nil, nil) + slotval1 := newQGraphicsSceneResizeEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1208,7 +1188,7 @@ func miqt_exec_callback_QGraphicsWidget_ShowEvent(self *C.QGraphicsWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1234,7 +1214,7 @@ func miqt_exec_callback_QGraphicsWidget_HoverMoveEvent(self *C.QGraphicsWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -1260,7 +1240,7 @@ func miqt_exec_callback_QGraphicsWidget_HoverLeaveEvent(self *C.QGraphicsWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) diff --git a/qt/gen_qgraphicswidget.h b/qt/gen_qgraphicswidget.h index f44711fc..25793f7c 100644 --- a/qt/gen_qgraphicswidget.h +++ b/qt/gen_qgraphicswidget.h @@ -78,9 +78,10 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QGraphicsWidget_new(QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsWidget_new2(QGraphicsItem* parent, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QGraphicsWidget* QGraphicsWidget_new(); +QGraphicsWidget* QGraphicsWidget_new2(QGraphicsItem* parent); +QGraphicsWidget* QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags); +void QGraphicsWidget_virtbase(QGraphicsWidget* src, QGraphicsObject** outptr_QGraphicsObject, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); QMetaObject* QGraphicsWidget_MetaObject(const QGraphicsWidget* self); void* QGraphicsWidget_Metacast(QGraphicsWidget* self, const char* param1); struct miqt_string QGraphicsWidget_Tr(const char* s); diff --git a/qt/gen_qgridlayout.cpp b/qt/gen_qgridlayout.cpp index 4ed240cb..7d6f9580 100644 --- a/qt/gen_qgridlayout.cpp +++ b/qt/gen_qgridlayout.cpp @@ -458,20 +458,16 @@ public: }; -void QGridLayout_new(QWidget* parent, QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQGridLayout* ret = new MiqtVirtualQGridLayout(parent); - *outptr_QGridLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QGridLayout* QGridLayout_new(QWidget* parent) { + return new MiqtVirtualQGridLayout(parent); } -void QGridLayout_new2(QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQGridLayout* ret = new MiqtVirtualQGridLayout(); - *outptr_QGridLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QGridLayout* QGridLayout_new2() { + return new MiqtVirtualQGridLayout(); +} + +void QGridLayout_virtbase(QGridLayout* src, QLayout** outptr_QLayout) { + *outptr_QLayout = static_cast(src); } QMetaObject* QGridLayout_MetaObject(const QGridLayout* self) { diff --git a/qt/gen_qgridlayout.go b/qt/gen_qgridlayout.go index a4194e5a..5de5442a 100644 --- a/qt/gen_qgridlayout.go +++ b/qt/gen_qgridlayout.go @@ -35,46 +35,34 @@ func (this *QGridLayout) UnsafePointer() unsafe.Pointer { } // newQGridLayout constructs the type using only CGO pointers. -func newQGridLayout(h *C.QGridLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QGridLayout { +func newQGridLayout(h *C.QGridLayout) *QGridLayout { if h == nil { return nil } + var outptr_QLayout *C.QLayout = nil + C.QGridLayout_virtbase(h, &outptr_QLayout) + return &QGridLayout{h: h, - QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} + QLayout: newQLayout(outptr_QLayout)} } // UnsafeNewQGridLayout constructs the type using only unsafe pointers. -func UnsafeNewQGridLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QGridLayout { - if h == nil { - return nil - } - - return &QGridLayout{h: (*C.QGridLayout)(h), - QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} +func UnsafeNewQGridLayout(h unsafe.Pointer) *QGridLayout { + return newQGridLayout((*C.QGridLayout)(h)) } // NewQGridLayout constructs a new QGridLayout object. func NewQGridLayout(parent *QWidget) *QGridLayout { - var outptr_QGridLayout *C.QGridLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QGridLayout_new(parent.cPointer(), &outptr_QGridLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQGridLayout(outptr_QGridLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQGridLayout(C.QGridLayout_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQGridLayout2 constructs a new QGridLayout object. func NewQGridLayout2() *QGridLayout { - var outptr_QGridLayout *C.QGridLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QGridLayout_new2(&outptr_QGridLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQGridLayout(outptr_QGridLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQGridLayout(C.QGridLayout_new2()) ret.isSubclass = true return ret } @@ -737,7 +725,7 @@ func miqt_exec_callback_QGridLayout_IndexOf(self *C.QGridLayout, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(param1, nil, nil) + slotval1 := newQWidget(param1) virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_IndexOf, slotval1) @@ -797,7 +785,7 @@ func miqt_exec_callback_QGridLayout_ControlTypes(self *C.QGridLayout, cb C.intpt func (this *QGridLayout) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QGridLayout_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QGridLayout_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QGridLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -840,7 +828,7 @@ func miqt_exec_callback_QGridLayout_ChildEvent(self *C.QGridLayout, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(e, nil) + slotval1 := newQChildEvent(e) gofunc((&QGridLayout{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qgridlayout.h b/qt/gen_qgridlayout.h index 38cd9a4d..4a2c5411 100644 --- a/qt/gen_qgridlayout.h +++ b/qt/gen_qgridlayout.h @@ -36,8 +36,9 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QGridLayout_new(QWidget* parent, QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QGridLayout_new2(QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +QGridLayout* QGridLayout_new(QWidget* parent); +QGridLayout* QGridLayout_new2(); +void QGridLayout_virtbase(QGridLayout* src, QLayout** outptr_QLayout); QMetaObject* QGridLayout_MetaObject(const QGridLayout* self); void* QGridLayout_Metacast(QGridLayout* self, const char* param1); struct miqt_string QGridLayout_Tr(const char* s); diff --git a/qt/gen_qgroupbox.cpp b/qt/gen_qgroupbox.cpp index 91946e5b..6a5ba9b3 100644 --- a/qt/gen_qgroupbox.cpp +++ b/qt/gen_qgroupbox.cpp @@ -1047,38 +1047,26 @@ public: }; -void QGroupBox_new(QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(parent); - *outptr_QGroupBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QGroupBox* QGroupBox_new(QWidget* parent) { + return new MiqtVirtualQGroupBox(parent); } -void QGroupBox_new2(QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(); - *outptr_QGroupBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QGroupBox* QGroupBox_new2() { + return new MiqtVirtualQGroupBox(); } -void QGroupBox_new3(struct miqt_string title, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QGroupBox* QGroupBox_new3(struct miqt_string title) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(title_QString); - *outptr_QGroupBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQGroupBox(title_QString); } -void QGroupBox_new4(struct miqt_string title, QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QGroupBox* QGroupBox_new4(struct miqt_string title, QWidget* parent) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(title_QString, parent); - *outptr_QGroupBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQGroupBox(title_QString, parent); +} + +void QGroupBox_virtbase(QGroupBox* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QGroupBox_MetaObject(const QGroupBox* self) { diff --git a/qt/gen_qgroupbox.go b/qt/gen_qgroupbox.go index 7739adce..b5a7e5f8 100644 --- a/qt/gen_qgroupbox.go +++ b/qt/gen_qgroupbox.go @@ -35,46 +35,34 @@ func (this *QGroupBox) UnsafePointer() unsafe.Pointer { } // newQGroupBox constructs the type using only CGO pointers. -func newQGroupBox(h *C.QGroupBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QGroupBox { +func newQGroupBox(h *C.QGroupBox) *QGroupBox { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QGroupBox_virtbase(h, &outptr_QWidget) + return &QGroupBox{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQGroupBox constructs the type using only unsafe pointers. -func UnsafeNewQGroupBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QGroupBox { - if h == nil { - return nil - } - - return &QGroupBox{h: (*C.QGroupBox)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQGroupBox(h unsafe.Pointer) *QGroupBox { + return newQGroupBox((*C.QGroupBox)(h)) } // NewQGroupBox constructs a new QGroupBox object. func NewQGroupBox(parent *QWidget) *QGroupBox { - var outptr_QGroupBox *C.QGroupBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGroupBox_new(parent.cPointer(), &outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGroupBox(C.QGroupBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQGroupBox2 constructs a new QGroupBox object. func NewQGroupBox2() *QGroupBox { - var outptr_QGroupBox *C.QGroupBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGroupBox_new2(&outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGroupBox(C.QGroupBox_new2()) ret.isSubclass = true return ret } @@ -85,13 +73,8 @@ func NewQGroupBox3(title string) *QGroupBox { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QGroupBox *C.QGroupBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGroupBox_new3(title_ms, &outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGroupBox(C.QGroupBox_new3(title_ms)) ret.isSubclass = true return ret } @@ -102,13 +85,8 @@ func NewQGroupBox4(title string, parent *QWidget) *QGroupBox { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QGroupBox *C.QGroupBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGroupBox_new4(title_ms, parent.cPointer(), &outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGroupBox(C.QGroupBox_new4(title_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -370,7 +348,7 @@ func miqt_exec_callback_QGroupBox_ChildEvent(self *C.QGroupBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -396,7 +374,7 @@ func miqt_exec_callback_QGroupBox_ResizeEvent(self *C.QGroupBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -422,7 +400,7 @@ func miqt_exec_callback_QGroupBox_PaintEvent(self *C.QGroupBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -448,7 +426,7 @@ func miqt_exec_callback_QGroupBox_FocusInEvent(self *C.QGroupBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -500,7 +478,7 @@ func miqt_exec_callback_QGroupBox_MousePressEvent(self *C.QGroupBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -526,7 +504,7 @@ func miqt_exec_callback_QGroupBox_MouseMoveEvent(self *C.QGroupBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -552,7 +530,7 @@ func miqt_exec_callback_QGroupBox_MouseReleaseEvent(self *C.QGroupBox, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -734,7 +712,7 @@ func miqt_exec_callback_QGroupBox_MouseDoubleClickEvent(self *C.QGroupBox, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -760,7 +738,7 @@ func miqt_exec_callback_QGroupBox_WheelEvent(self *C.QGroupBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -786,7 +764,7 @@ func miqt_exec_callback_QGroupBox_KeyPressEvent(self *C.QGroupBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -812,7 +790,7 @@ func miqt_exec_callback_QGroupBox_KeyReleaseEvent(self *C.QGroupBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -838,7 +816,7 @@ func miqt_exec_callback_QGroupBox_FocusOutEvent(self *C.QGroupBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -916,7 +894,7 @@ func miqt_exec_callback_QGroupBox_MoveEvent(self *C.QGroupBox, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -942,7 +920,7 @@ func miqt_exec_callback_QGroupBox_CloseEvent(self *C.QGroupBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -968,7 +946,7 @@ func miqt_exec_callback_QGroupBox_ContextMenuEvent(self *C.QGroupBox, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -994,7 +972,7 @@ func miqt_exec_callback_QGroupBox_TabletEvent(self *C.QGroupBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1020,7 +998,7 @@ func miqt_exec_callback_QGroupBox_ActionEvent(self *C.QGroupBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1046,7 +1024,7 @@ func miqt_exec_callback_QGroupBox_DragEnterEvent(self *C.QGroupBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1072,7 +1050,7 @@ func miqt_exec_callback_QGroupBox_DragMoveEvent(self *C.QGroupBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1098,7 +1076,7 @@ func miqt_exec_callback_QGroupBox_DragLeaveEvent(self *C.QGroupBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1124,7 +1102,7 @@ func miqt_exec_callback_QGroupBox_DropEvent(self *C.QGroupBox, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1150,7 +1128,7 @@ func miqt_exec_callback_QGroupBox_ShowEvent(self *C.QGroupBox, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1176,7 +1154,7 @@ func miqt_exec_callback_QGroupBox_HideEvent(self *C.QGroupBox, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1346,7 +1324,7 @@ func miqt_exec_callback_QGroupBox_InputMethodEvent(self *C.QGroupBox, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QGroupBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qgroupbox.h b/qt/gen_qgroupbox.h index 6d1cc3f9..f9bc7018 100644 --- a/qt/gen_qgroupbox.h +++ b/qt/gen_qgroupbox.h @@ -78,10 +78,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QGroupBox_new(QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QGroupBox_new2(QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QGroupBox_new3(struct miqt_string title, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QGroupBox_new4(struct miqt_string title, QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QGroupBox* QGroupBox_new(QWidget* parent); +QGroupBox* QGroupBox_new2(); +QGroupBox* QGroupBox_new3(struct miqt_string title); +QGroupBox* QGroupBox_new4(struct miqt_string title, QWidget* parent); +void QGroupBox_virtbase(QGroupBox* src, QWidget** outptr_QWidget); QMetaObject* QGroupBox_MetaObject(const QGroupBox* self); void* QGroupBox_Metacast(QGroupBox* self, const char* param1); struct miqt_string QGroupBox_Tr(const char* s); diff --git a/qt/gen_qguiapplication.cpp b/qt/gen_qguiapplication.cpp index 6459fce1..9718e9e8 100644 --- a/qt/gen_qguiapplication.cpp +++ b/qt/gen_qguiapplication.cpp @@ -79,18 +79,16 @@ public: }; -void QGuiApplication_new(int* argc, char** argv, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { - MiqtVirtualQGuiApplication* ret = new MiqtVirtualQGuiApplication(static_cast(*argc), argv); - *outptr_QGuiApplication = ret; - *outptr_QCoreApplication = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGuiApplication* QGuiApplication_new(int* argc, char** argv) { + return new MiqtVirtualQGuiApplication(static_cast(*argc), argv); } -void QGuiApplication_new2(int* argc, char** argv, int param3, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { - MiqtVirtualQGuiApplication* ret = new MiqtVirtualQGuiApplication(static_cast(*argc), argv, static_cast(param3)); - *outptr_QGuiApplication = ret; - *outptr_QCoreApplication = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGuiApplication* QGuiApplication_new2(int* argc, char** argv, int param3) { + return new MiqtVirtualQGuiApplication(static_cast(*argc), argv, static_cast(param3)); +} + +void QGuiApplication_virtbase(QGuiApplication* src, QCoreApplication** outptr_QCoreApplication) { + *outptr_QCoreApplication = static_cast(src); } QMetaObject* QGuiApplication_MetaObject(const QGuiApplication* self) { diff --git a/qt/gen_qguiapplication.go b/qt/gen_qguiapplication.go index 6e7ee49b..80d43536 100644 --- a/qt/gen_qguiapplication.go +++ b/qt/gen_qguiapplication.go @@ -35,22 +35,20 @@ func (this *QGuiApplication) UnsafePointer() unsafe.Pointer { } // newQGuiApplication constructs the type using only CGO pointers. -func newQGuiApplication(h *C.QGuiApplication, h_QCoreApplication *C.QCoreApplication, h_QObject *C.QObject) *QGuiApplication { +func newQGuiApplication(h *C.QGuiApplication) *QGuiApplication { if h == nil { return nil } + var outptr_QCoreApplication *C.QCoreApplication = nil + C.QGuiApplication_virtbase(h, &outptr_QCoreApplication) + return &QGuiApplication{h: h, - QCoreApplication: newQCoreApplication(h_QCoreApplication, h_QObject)} + QCoreApplication: newQCoreApplication(outptr_QCoreApplication)} } // UnsafeNewQGuiApplication constructs the type using only unsafe pointers. -func UnsafeNewQGuiApplication(h unsafe.Pointer, h_QCoreApplication unsafe.Pointer, h_QObject unsafe.Pointer) *QGuiApplication { - if h == nil { - return nil - } - - return &QGuiApplication{h: (*C.QGuiApplication)(h), - QCoreApplication: UnsafeNewQCoreApplication(h_QCoreApplication, h_QObject)} +func UnsafeNewQGuiApplication(h unsafe.Pointer) *QGuiApplication { + return newQGuiApplication((*C.QGuiApplication)(h)) } // NewQGuiApplication constructs a new QGuiApplication object. @@ -65,12 +63,7 @@ func NewQGuiApplication(args []string) *QGuiApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - var outptr_QGuiApplication *C.QGuiApplication = nil - var outptr_QCoreApplication *C.QCoreApplication = nil - var outptr_QObject *C.QObject = nil - - C.QGuiApplication_new(argc, &argv[0], &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) - ret := newQGuiApplication(outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret := newQGuiApplication(C.QGuiApplication_new(argc, &argv[0])) ret.isSubclass = true return ret } @@ -87,12 +80,7 @@ func NewQGuiApplication2(args []string, param3 int) *QGuiApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - var outptr_QGuiApplication *C.QGuiApplication = nil - var outptr_QCoreApplication *C.QCoreApplication = nil - var outptr_QObject *C.QObject = nil - - C.QGuiApplication_new2(argc, &argv[0], (C.int)(param3), &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) - ret := newQGuiApplication(outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret := newQGuiApplication(C.QGuiApplication_new2(argc, &argv[0], (C.int)(param3))) ret.isSubclass = true return ret } @@ -160,7 +148,7 @@ func QGuiApplication_AllWindows() []*QWindow { _ret := make([]*QWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQWindow(_outCast[i], nil, nil) + _ret[i] = newQWindow(_outCast[i]) } return _ret } @@ -170,13 +158,13 @@ func QGuiApplication_TopLevelWindows() []*QWindow { _ret := make([]*QWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQWindow(_outCast[i], nil, nil) + _ret[i] = newQWindow(_outCast[i]) } return _ret } func QGuiApplication_TopLevelAt(pos *QPoint) *QWindow { - return newQWindow(C.QGuiApplication_TopLevelAt(pos.cPointer()), nil, nil) + return newQWindow(C.QGuiApplication_TopLevelAt(pos.cPointer())) } func QGuiApplication_SetWindowIcon(icon *QIcon) { @@ -197,11 +185,11 @@ func QGuiApplication_PlatformName() string { } func QGuiApplication_ModalWindow() *QWindow { - return newQWindow(C.QGuiApplication_ModalWindow(), nil, nil) + return newQWindow(C.QGuiApplication_ModalWindow()) } func QGuiApplication_FocusWindow() *QWindow { - return newQWindow(C.QGuiApplication_FocusWindow(), nil, nil) + return newQWindow(C.QGuiApplication_FocusWindow()) } func QGuiApplication_FocusObject() *QObject { @@ -209,7 +197,7 @@ func QGuiApplication_FocusObject() *QObject { } func QGuiApplication_PrimaryScreen() *QScreen { - return newQScreen(C.QGuiApplication_PrimaryScreen(), nil) + return newQScreen(C.QGuiApplication_PrimaryScreen()) } func QGuiApplication_Screens() []*QScreen { @@ -217,13 +205,13 @@ func QGuiApplication_Screens() []*QScreen { _ret := make([]*QScreen, int(_ma.len)) _outCast := (*[0xffff]*C.QScreen)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQScreen(_outCast[i], nil) + _ret[i] = newQScreen(_outCast[i]) } return _ret } func QGuiApplication_ScreenAt(point *QPoint) *QScreen { - return newQScreen(C.QGuiApplication_ScreenAt(point.cPointer()), nil) + return newQScreen(C.QGuiApplication_ScreenAt(point.cPointer())) } func (this *QGuiApplication) DevicePixelRatio() float64 { @@ -257,7 +245,7 @@ func QGuiApplication_SetFont(font *QFont) { } func QGuiApplication_Clipboard() *QClipboard { - return newQClipboard(C.QGuiApplication_Clipboard(), nil) + return newQClipboard(C.QGuiApplication_Clipboard()) } func QGuiApplication_Palette() *QPalette { @@ -299,7 +287,7 @@ func QGuiApplication_IsLeftToRight() bool { } func QGuiApplication_StyleHints() *QStyleHints { - return newQStyleHints(C.QGuiApplication_StyleHints(), nil) + return newQStyleHints(C.QGuiApplication_StyleHints()) } func QGuiApplication_SetDesktopSettingsAware(on bool) { @@ -311,7 +299,7 @@ func QGuiApplication_DesktopSettingsAware() bool { } func QGuiApplication_InputMethod() *QInputMethod { - return newQInputMethod(C.QGuiApplication_InputMethod(), nil) + return newQInputMethod(C.QGuiApplication_InputMethod()) } func QGuiApplication_SetQuitOnLastWindowClosed(quit bool) { @@ -408,7 +396,7 @@ func miqt_exec_callback_QGuiApplication_ScreenAdded(cb C.intptr_t, screen *C.QSc } // Convert all CABI parameters to Go parameters - slotval1 := newQScreen(screen, nil) + slotval1 := newQScreen(screen) gofunc(slotval1) } @@ -428,7 +416,7 @@ func miqt_exec_callback_QGuiApplication_ScreenRemoved(cb C.intptr_t, screen *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := newQScreen(screen, nil) + slotval1 := newQScreen(screen) gofunc(slotval1) } @@ -448,7 +436,7 @@ func miqt_exec_callback_QGuiApplication_PrimaryScreenChanged(cb C.intptr_t, scre } // Convert all CABI parameters to Go parameters - slotval1 := newQScreen(screen, nil) + slotval1 := newQScreen(screen) gofunc(slotval1) } @@ -505,7 +493,7 @@ func miqt_exec_callback_QGuiApplication_FocusWindowChanged(cb C.intptr_t, focusW } // Convert all CABI parameters to Go parameters - slotval1 := newQWindow(focusWindow, nil, nil) + slotval1 := newQWindow(focusWindow) gofunc(slotval1) } @@ -565,7 +553,7 @@ func miqt_exec_callback_QGuiApplication_CommitDataRequest(cb C.intptr_t, session } // Convert all CABI parameters to Go parameters - slotval1 := newQSessionManager(sessionManager, nil) + slotval1 := newQSessionManager(sessionManager) gofunc(slotval1) } @@ -585,7 +573,7 @@ func miqt_exec_callback_QGuiApplication_SaveStateRequest(cb C.intptr_t, sessionM } // Convert all CABI parameters to Go parameters - slotval1 := newQSessionManager(sessionManager, nil) + slotval1 := newQSessionManager(sessionManager) gofunc(slotval1) } diff --git a/qt/gen_qguiapplication.h b/qt/gen_qguiapplication.h index f1188523..62905bc1 100644 --- a/qt/gen_qguiapplication.h +++ b/qt/gen_qguiapplication.h @@ -50,8 +50,9 @@ typedef struct QStyleHints QStyleHints; typedef struct QWindow QWindow; #endif -void QGuiApplication_new(int* argc, char** argv, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); -void QGuiApplication_new2(int* argc, char** argv, int param3, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); +QGuiApplication* QGuiApplication_new(int* argc, char** argv); +QGuiApplication* QGuiApplication_new2(int* argc, char** argv, int param3); +void QGuiApplication_virtbase(QGuiApplication* src, QCoreApplication** outptr_QCoreApplication); QMetaObject* QGuiApplication_MetaObject(const QGuiApplication* self); void* QGuiApplication_Metacast(QGuiApplication* self, const char* param1); struct miqt_string QGuiApplication_Tr(const char* s); diff --git a/qt/gen_qheaderview.cpp b/qt/gen_qheaderview.cpp index d134db2b..bc0d01c6 100644 --- a/qt/gen_qheaderview.cpp +++ b/qt/gen_qheaderview.cpp @@ -1653,26 +1653,16 @@ public: }; -void QHeaderView_new(int orientation, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQHeaderView* ret = new MiqtVirtualQHeaderView(static_cast(orientation)); - *outptr_QHeaderView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QHeaderView* QHeaderView_new(int orientation) { + return new MiqtVirtualQHeaderView(static_cast(orientation)); } -void QHeaderView_new2(int orientation, QWidget* parent, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQHeaderView* ret = new MiqtVirtualQHeaderView(static_cast(orientation), parent); - *outptr_QHeaderView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QHeaderView* QHeaderView_new2(int orientation, QWidget* parent) { + return new MiqtVirtualQHeaderView(static_cast(orientation), parent); +} + +void QHeaderView_virtbase(QHeaderView* src, QAbstractItemView** outptr_QAbstractItemView) { + *outptr_QAbstractItemView = static_cast(src); } QMetaObject* QHeaderView_MetaObject(const QHeaderView* self) { diff --git a/qt/gen_qheaderview.go b/qt/gen_qheaderview.go index e23b3e16..127ca47b 100644 --- a/qt/gen_qheaderview.go +++ b/qt/gen_qheaderview.go @@ -45,52 +45,34 @@ func (this *QHeaderView) UnsafePointer() unsafe.Pointer { } // newQHeaderView constructs the type using only CGO pointers. -func newQHeaderView(h *C.QHeaderView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QHeaderView { +func newQHeaderView(h *C.QHeaderView) *QHeaderView { if h == nil { return nil } + var outptr_QAbstractItemView *C.QAbstractItemView = nil + C.QHeaderView_virtbase(h, &outptr_QAbstractItemView) + return &QHeaderView{h: h, - QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractItemView: newQAbstractItemView(outptr_QAbstractItemView)} } // UnsafeNewQHeaderView constructs the type using only unsafe pointers. -func UnsafeNewQHeaderView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QHeaderView { - if h == nil { - return nil - } - - return &QHeaderView{h: (*C.QHeaderView)(h), - QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQHeaderView(h unsafe.Pointer) *QHeaderView { + return newQHeaderView((*C.QHeaderView)(h)) } // NewQHeaderView constructs a new QHeaderView object. func NewQHeaderView(orientation Orientation) *QHeaderView { - var outptr_QHeaderView *C.QHeaderView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QHeaderView_new((C.int)(orientation), &outptr_QHeaderView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQHeaderView(outptr_QHeaderView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQHeaderView(C.QHeaderView_new((C.int)(orientation))) ret.isSubclass = true return ret } // NewQHeaderView2 constructs a new QHeaderView object. func NewQHeaderView2(orientation Orientation, parent *QWidget) *QHeaderView { - var outptr_QHeaderView *C.QHeaderView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QHeaderView_new2((C.int)(orientation), parent.cPointer(), &outptr_QHeaderView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQHeaderView(outptr_QHeaderView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQHeaderView(C.QHeaderView_new2((C.int)(orientation), parent.cPointer())) ret.isSubclass = true return ret } @@ -676,7 +658,7 @@ func miqt_exec_callback_QHeaderView_SetModel(self *C.QHeaderView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc((&QHeaderView{h: self}).callVirtualBase_SetModel, slotval1) @@ -857,7 +839,7 @@ func miqt_exec_callback_QHeaderView_PaintEvent(self *C.QHeaderView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QHeaderView{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -883,7 +865,7 @@ func miqt_exec_callback_QHeaderView_MousePressEvent(self *C.QHeaderView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QHeaderView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -909,7 +891,7 @@ func miqt_exec_callback_QHeaderView_MouseMoveEvent(self *C.QHeaderView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QHeaderView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -935,7 +917,7 @@ func miqt_exec_callback_QHeaderView_MouseReleaseEvent(self *C.QHeaderView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QHeaderView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -961,7 +943,7 @@ func miqt_exec_callback_QHeaderView_MouseDoubleClickEvent(self *C.QHeaderView, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QHeaderView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1454,7 +1436,7 @@ func miqt_exec_callback_QHeaderView_SetSelectionModel(self *C.QHeaderView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QHeaderView{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -1856,7 +1838,7 @@ func miqt_exec_callback_QHeaderView_CloseEditor(self *C.QHeaderView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) @@ -1884,7 +1866,7 @@ func miqt_exec_callback_QHeaderView_CommitData(self *C.QHeaderView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc((&QHeaderView{h: self}).callVirtualBase_CommitData, slotval1) @@ -2045,7 +2027,7 @@ func miqt_exec_callback_QHeaderView_StartDrag(self *C.QHeaderView, cb C.intptr_t func (this *QHeaderView) callVirtualBase_ViewOptions() *QStyleOptionViewItem { - _goptr := newQStyleOptionViewItem(C.QHeaderView_virtualbase_ViewOptions(unsafe.Pointer(this.h)), nil) + _goptr := newQStyleOptionViewItem(C.QHeaderView_virtualbase_ViewOptions(unsafe.Pointer(this.h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -2118,7 +2100,7 @@ func miqt_exec_callback_QHeaderView_DragEnterEvent(self *C.QHeaderView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -2144,7 +2126,7 @@ func miqt_exec_callback_QHeaderView_DragMoveEvent(self *C.QHeaderView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -2170,7 +2152,7 @@ func miqt_exec_callback_QHeaderView_DragLeaveEvent(self *C.QHeaderView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -2196,7 +2178,7 @@ func miqt_exec_callback_QHeaderView_DropEvent(self *C.QHeaderView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -2222,7 +2204,7 @@ func miqt_exec_callback_QHeaderView_FocusInEvent(self *C.QHeaderView, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -2248,7 +2230,7 @@ func miqt_exec_callback_QHeaderView_FocusOutEvent(self *C.QHeaderView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -2274,7 +2256,7 @@ func miqt_exec_callback_QHeaderView_KeyPressEvent(self *C.QHeaderView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -2300,7 +2282,7 @@ func miqt_exec_callback_QHeaderView_ResizeEvent(self *C.QHeaderView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -2326,7 +2308,7 @@ func miqt_exec_callback_QHeaderView_TimerEvent(self *C.QHeaderView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -2352,7 +2334,7 @@ func miqt_exec_callback_QHeaderView_InputMethodEvent(self *C.QHeaderView, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qheaderview.h b/qt/gen_qheaderview.h index 5c3d6078..390a24cf 100644 --- a/qt/gen_qheaderview.h +++ b/qt/gen_qheaderview.h @@ -80,8 +80,9 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QHeaderView_new(int orientation, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QHeaderView_new2(int orientation, QWidget* parent, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QHeaderView* QHeaderView_new(int orientation); +QHeaderView* QHeaderView_new2(int orientation, QWidget* parent); +void QHeaderView_virtbase(QHeaderView* src, QAbstractItemView** outptr_QAbstractItemView); QMetaObject* QHeaderView_MetaObject(const QHeaderView* self); void* QHeaderView_Metacast(QHeaderView* self, const char* param1); struct miqt_string QHeaderView_Tr(const char* s); diff --git a/qt/gen_qhistorystate.cpp b/qt/gen_qhistorystate.cpp index 3170cb8e..bd1d6e6c 100644 --- a/qt/gen_qhistorystate.cpp +++ b/qt/gen_qhistorystate.cpp @@ -95,32 +95,24 @@ public: }; -void QHistoryState_new(QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { - MiqtVirtualQHistoryState* ret = new MiqtVirtualQHistoryState(); - *outptr_QHistoryState = ret; - *outptr_QAbstractState = static_cast(ret); - *outptr_QObject = static_cast(ret); +QHistoryState* QHistoryState_new() { + return new MiqtVirtualQHistoryState(); } -void QHistoryState_new2(int typeVal, QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { - MiqtVirtualQHistoryState* ret = new MiqtVirtualQHistoryState(static_cast(typeVal)); - *outptr_QHistoryState = ret; - *outptr_QAbstractState = static_cast(ret); - *outptr_QObject = static_cast(ret); +QHistoryState* QHistoryState_new2(int typeVal) { + return new MiqtVirtualQHistoryState(static_cast(typeVal)); } -void QHistoryState_new3(QState* parent, QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { - MiqtVirtualQHistoryState* ret = new MiqtVirtualQHistoryState(parent); - *outptr_QHistoryState = ret; - *outptr_QAbstractState = static_cast(ret); - *outptr_QObject = static_cast(ret); +QHistoryState* QHistoryState_new3(QState* parent) { + return new MiqtVirtualQHistoryState(parent); } -void QHistoryState_new4(int typeVal, QState* parent, QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { - MiqtVirtualQHistoryState* ret = new MiqtVirtualQHistoryState(static_cast(typeVal), parent); - *outptr_QHistoryState = ret; - *outptr_QAbstractState = static_cast(ret); - *outptr_QObject = static_cast(ret); +QHistoryState* QHistoryState_new4(int typeVal, QState* parent) { + return new MiqtVirtualQHistoryState(static_cast(typeVal), parent); +} + +void QHistoryState_virtbase(QHistoryState* src, QAbstractState** outptr_QAbstractState) { + *outptr_QAbstractState = static_cast(src); } QMetaObject* QHistoryState_MetaObject(const QHistoryState* self) { diff --git a/qt/gen_qhistorystate.go b/qt/gen_qhistorystate.go index 170bacdd..22c1e038 100644 --- a/qt/gen_qhistorystate.go +++ b/qt/gen_qhistorystate.go @@ -42,68 +42,50 @@ func (this *QHistoryState) UnsafePointer() unsafe.Pointer { } // newQHistoryState constructs the type using only CGO pointers. -func newQHistoryState(h *C.QHistoryState, h_QAbstractState *C.QAbstractState, h_QObject *C.QObject) *QHistoryState { +func newQHistoryState(h *C.QHistoryState) *QHistoryState { if h == nil { return nil } + var outptr_QAbstractState *C.QAbstractState = nil + C.QHistoryState_virtbase(h, &outptr_QAbstractState) + return &QHistoryState{h: h, - QAbstractState: newQAbstractState(h_QAbstractState, h_QObject)} + QAbstractState: newQAbstractState(outptr_QAbstractState)} } // UnsafeNewQHistoryState constructs the type using only unsafe pointers. -func UnsafeNewQHistoryState(h unsafe.Pointer, h_QAbstractState unsafe.Pointer, h_QObject unsafe.Pointer) *QHistoryState { - if h == nil { - return nil - } - - return &QHistoryState{h: (*C.QHistoryState)(h), - QAbstractState: UnsafeNewQAbstractState(h_QAbstractState, h_QObject)} +func UnsafeNewQHistoryState(h unsafe.Pointer) *QHistoryState { + return newQHistoryState((*C.QHistoryState)(h)) } // NewQHistoryState constructs a new QHistoryState object. func NewQHistoryState() *QHistoryState { - var outptr_QHistoryState *C.QHistoryState = nil - var outptr_QAbstractState *C.QAbstractState = nil - var outptr_QObject *C.QObject = nil - C.QHistoryState_new(&outptr_QHistoryState, &outptr_QAbstractState, &outptr_QObject) - ret := newQHistoryState(outptr_QHistoryState, outptr_QAbstractState, outptr_QObject) + ret := newQHistoryState(C.QHistoryState_new()) ret.isSubclass = true return ret } // NewQHistoryState2 constructs a new QHistoryState object. func NewQHistoryState2(typeVal QHistoryState__HistoryType) *QHistoryState { - var outptr_QHistoryState *C.QHistoryState = nil - var outptr_QAbstractState *C.QAbstractState = nil - var outptr_QObject *C.QObject = nil - C.QHistoryState_new2((C.int)(typeVal), &outptr_QHistoryState, &outptr_QAbstractState, &outptr_QObject) - ret := newQHistoryState(outptr_QHistoryState, outptr_QAbstractState, outptr_QObject) + ret := newQHistoryState(C.QHistoryState_new2((C.int)(typeVal))) ret.isSubclass = true return ret } // NewQHistoryState3 constructs a new QHistoryState object. func NewQHistoryState3(parent *QState) *QHistoryState { - var outptr_QHistoryState *C.QHistoryState = nil - var outptr_QAbstractState *C.QAbstractState = nil - var outptr_QObject *C.QObject = nil - C.QHistoryState_new3(parent.cPointer(), &outptr_QHistoryState, &outptr_QAbstractState, &outptr_QObject) - ret := newQHistoryState(outptr_QHistoryState, outptr_QAbstractState, outptr_QObject) + ret := newQHistoryState(C.QHistoryState_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQHistoryState4 constructs a new QHistoryState object. func NewQHistoryState4(typeVal QHistoryState__HistoryType, parent *QState) *QHistoryState { - var outptr_QHistoryState *C.QHistoryState = nil - var outptr_QAbstractState *C.QAbstractState = nil - var outptr_QObject *C.QObject = nil - C.QHistoryState_new4((C.int)(typeVal), parent.cPointer(), &outptr_QHistoryState, &outptr_QAbstractState, &outptr_QObject) - ret := newQHistoryState(outptr_QHistoryState, outptr_QAbstractState, outptr_QObject) + ret := newQHistoryState(C.QHistoryState_new4((C.int)(typeVal), parent.cPointer())) ret.isSubclass = true return ret } @@ -137,7 +119,7 @@ func QHistoryState_TrUtf8(s string) string { } func (this *QHistoryState) DefaultTransition() *QAbstractTransition { - return newQAbstractTransition(C.QHistoryState_DefaultTransition(this.h), nil) + return newQAbstractTransition(C.QHistoryState_DefaultTransition(this.h)) } func (this *QHistoryState) SetDefaultTransition(transition *QAbstractTransition) { @@ -145,7 +127,7 @@ func (this *QHistoryState) SetDefaultTransition(transition *QAbstractTransition) } func (this *QHistoryState) DefaultState() *QAbstractState { - return newQAbstractState(C.QHistoryState_DefaultState(this.h), nil) + return newQAbstractState(C.QHistoryState_DefaultState(this.h)) } func (this *QHistoryState) SetDefaultState(state *QAbstractState) { diff --git a/qt/gen_qhistorystate.h b/qt/gen_qhistorystate.h index 78d9a828..dbf48eb2 100644 --- a/qt/gen_qhistorystate.h +++ b/qt/gen_qhistorystate.h @@ -32,10 +32,11 @@ typedef struct QObject QObject; typedef struct QState QState; #endif -void QHistoryState_new(QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); -void QHistoryState_new2(int typeVal, QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); -void QHistoryState_new3(QState* parent, QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); -void QHistoryState_new4(int typeVal, QState* parent, QHistoryState** outptr_QHistoryState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); +QHistoryState* QHistoryState_new(); +QHistoryState* QHistoryState_new2(int typeVal); +QHistoryState* QHistoryState_new3(QState* parent); +QHistoryState* QHistoryState_new4(int typeVal, QState* parent); +void QHistoryState_virtbase(QHistoryState* src, QAbstractState** outptr_QAbstractState); QMetaObject* QHistoryState_MetaObject(const QHistoryState* self); void* QHistoryState_Metacast(QHistoryState* self, const char* param1); struct miqt_string QHistoryState_Tr(const char* s); diff --git a/qt/gen_qicon.cpp b/qt/gen_qicon.cpp index 2ccac75f..aa330714 100644 --- a/qt/gen_qicon.cpp +++ b/qt/gen_qicon.cpp @@ -13,30 +13,25 @@ #include "gen_qicon.h" #include "_cgo_export.h" -void QIcon_new(QIcon** outptr_QIcon) { - QIcon* ret = new QIcon(); - *outptr_QIcon = ret; +QIcon* QIcon_new() { + return new QIcon(); } -void QIcon_new2(QPixmap* pixmap, QIcon** outptr_QIcon) { - QIcon* ret = new QIcon(*pixmap); - *outptr_QIcon = ret; +QIcon* QIcon_new2(QPixmap* pixmap) { + return new QIcon(*pixmap); } -void QIcon_new3(QIcon* other, QIcon** outptr_QIcon) { - QIcon* ret = new QIcon(*other); - *outptr_QIcon = ret; +QIcon* QIcon_new3(QIcon* other) { + return new QIcon(*other); } -void QIcon_new4(struct miqt_string fileName, QIcon** outptr_QIcon) { +QIcon* QIcon_new4(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QIcon* ret = new QIcon(fileName_QString); - *outptr_QIcon = ret; + return new QIcon(fileName_QString); } -void QIcon_new5(QIconEngine* engine, QIcon** outptr_QIcon) { - QIcon* ret = new QIcon(engine); - *outptr_QIcon = ret; +QIcon* QIcon_new5(QIconEngine* engine) { + return new QIcon(engine); } void QIcon_OperatorAssign(QIcon* self, QIcon* other) { diff --git a/qt/gen_qicon.go b/qt/gen_qicon.go index 45c76682..14128009 100644 --- a/qt/gen_qicon.go +++ b/qt/gen_qicon.go @@ -53,44 +53,35 @@ func newQIcon(h *C.QIcon) *QIcon { if h == nil { return nil } + return &QIcon{h: h} } // UnsafeNewQIcon constructs the type using only unsafe pointers. func UnsafeNewQIcon(h unsafe.Pointer) *QIcon { - if h == nil { - return nil - } - - return &QIcon{h: (*C.QIcon)(h)} + return newQIcon((*C.QIcon)(h)) } // NewQIcon constructs a new QIcon object. func NewQIcon() *QIcon { - var outptr_QIcon *C.QIcon = nil - C.QIcon_new(&outptr_QIcon) - ret := newQIcon(outptr_QIcon) + ret := newQIcon(C.QIcon_new()) ret.isSubclass = true return ret } // NewQIcon2 constructs a new QIcon object. func NewQIcon2(pixmap *QPixmap) *QIcon { - var outptr_QIcon *C.QIcon = nil - C.QIcon_new2(pixmap.cPointer(), &outptr_QIcon) - ret := newQIcon(outptr_QIcon) + ret := newQIcon(C.QIcon_new2(pixmap.cPointer())) ret.isSubclass = true return ret } // NewQIcon3 constructs a new QIcon object. func NewQIcon3(other *QIcon) *QIcon { - var outptr_QIcon *C.QIcon = nil - C.QIcon_new3(other.cPointer(), &outptr_QIcon) - ret := newQIcon(outptr_QIcon) + ret := newQIcon(C.QIcon_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -101,20 +92,16 @@ func NewQIcon4(fileName string) *QIcon { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QIcon *C.QIcon = nil - C.QIcon_new4(fileName_ms, &outptr_QIcon) - ret := newQIcon(outptr_QIcon) + ret := newQIcon(C.QIcon_new4(fileName_ms)) ret.isSubclass = true return ret } // NewQIcon5 constructs a new QIcon object. func NewQIcon5(engine *QIconEngine) *QIcon { - var outptr_QIcon *C.QIcon = nil - C.QIcon_new5(engine.cPointer(), &outptr_QIcon) - ret := newQIcon(outptr_QIcon) + ret := newQIcon(C.QIcon_new5(engine.cPointer())) ret.isSubclass = true return ret } @@ -128,25 +115,25 @@ func (this *QIcon) Swap(other *QIcon) { } func (this *QIcon) Pixmap(size *QSize) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap(this.h, size.cPointer()), nil) + _goptr := newQPixmap(C.QIcon_Pixmap(this.h, size.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap2(w int, h int) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap2(this.h, (C.int)(w), (C.int)(h)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap2(this.h, (C.int)(w), (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) PixmapWithExtent(extent int) *QPixmap { - _goptr := newQPixmap(C.QIcon_PixmapWithExtent(this.h, (C.int)(extent)), nil) + _goptr := newQPixmap(C.QIcon_PixmapWithExtent(this.h, (C.int)(extent))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap3(window *QWindow, size *QSize) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap3(this.h, window.cPointer(), size.cPointer()), nil) + _goptr := newQPixmap(C.QIcon_Pixmap3(this.h, window.cPointer(), size.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -339,49 +326,49 @@ func QIcon_SetFallbackThemeName(name string) { } func (this *QIcon) Pixmap22(size *QSize, mode QIcon__Mode) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap22(this.h, size.cPointer(), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap22(this.h, size.cPointer(), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap32(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap32(this.h, size.cPointer(), (C.int)(mode), (C.int)(state)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap32(this.h, size.cPointer(), (C.int)(mode), (C.int)(state))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap33(w int, h int, mode QIcon__Mode) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap33(this.h, (C.int)(w), (C.int)(h), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap33(this.h, (C.int)(w), (C.int)(h), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap4(w int, h int, mode QIcon__Mode, state QIcon__State) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap4(this.h, (C.int)(w), (C.int)(h), (C.int)(mode), (C.int)(state)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap4(this.h, (C.int)(w), (C.int)(h), (C.int)(mode), (C.int)(state))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap23(extent int, mode QIcon__Mode) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap23(this.h, (C.int)(extent), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap23(this.h, (C.int)(extent), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap34(extent int, mode QIcon__Mode, state QIcon__State) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap34(this.h, (C.int)(extent), (C.int)(mode), (C.int)(state)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap34(this.h, (C.int)(extent), (C.int)(mode), (C.int)(state))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap35(window *QWindow, size *QSize, mode QIcon__Mode) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap35(this.h, window.cPointer(), size.cPointer(), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap35(this.h, window.cPointer(), size.cPointer(), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap42(window *QWindow, size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap42(this.h, window.cPointer(), size.cPointer(), (C.int)(mode), (C.int)(state)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap42(this.h, window.cPointer(), size.cPointer(), (C.int)(mode), (C.int)(state))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/gen_qicon.h b/qt/gen_qicon.h index 66869d25..1a3b3147 100644 --- a/qt/gen_qicon.h +++ b/qt/gen_qicon.h @@ -32,11 +32,11 @@ typedef struct QSize QSize; typedef struct QWindow QWindow; #endif -void QIcon_new(QIcon** outptr_QIcon); -void QIcon_new2(QPixmap* pixmap, QIcon** outptr_QIcon); -void QIcon_new3(QIcon* other, QIcon** outptr_QIcon); -void QIcon_new4(struct miqt_string fileName, QIcon** outptr_QIcon); -void QIcon_new5(QIconEngine* engine, QIcon** outptr_QIcon); +QIcon* QIcon_new(); +QIcon* QIcon_new2(QPixmap* pixmap); +QIcon* QIcon_new3(QIcon* other); +QIcon* QIcon_new4(struct miqt_string fileName); +QIcon* QIcon_new5(QIconEngine* engine); void QIcon_OperatorAssign(QIcon* self, QIcon* other); void QIcon_Swap(QIcon* self, QIcon* other); QPixmap* QIcon_Pixmap(const QIcon* self, QSize* size); diff --git a/qt/gen_qiconengine.cpp b/qt/gen_qiconengine.cpp index f8c9d1a6..d6a9e0d5 100644 --- a/qt/gen_qiconengine.cpp +++ b/qt/gen_qiconengine.cpp @@ -365,14 +365,12 @@ public: }; -void QIconEngine_new(QIconEngine** outptr_QIconEngine) { - MiqtVirtualQIconEngine* ret = new MiqtVirtualQIconEngine(); - *outptr_QIconEngine = ret; +QIconEngine* QIconEngine_new() { + return new MiqtVirtualQIconEngine(); } -void QIconEngine_new2(QIconEngine* other, QIconEngine** outptr_QIconEngine) { - MiqtVirtualQIconEngine* ret = new MiqtVirtualQIconEngine(*other); - *outptr_QIconEngine = ret; +QIconEngine* QIconEngine_new2(QIconEngine* other) { + return new MiqtVirtualQIconEngine(*other); } void QIconEngine_Paint(QIconEngine* self, QPainter* painter, QRect* rect, int mode, int state) { @@ -551,9 +549,8 @@ void QIconEngine_Delete(QIconEngine* self, bool isSubclass) { } } -void QIconEngine__AvailableSizesArgument_new(QIconEngine__AvailableSizesArgument* param1, QIconEngine__AvailableSizesArgument** outptr_QIconEngine__AvailableSizesArgument) { - QIconEngine::AvailableSizesArgument* ret = new QIconEngine::AvailableSizesArgument(*param1); - *outptr_QIconEngine__AvailableSizesArgument = ret; +QIconEngine__AvailableSizesArgument* QIconEngine__AvailableSizesArgument_new(QIconEngine__AvailableSizesArgument* param1) { + return new QIconEngine::AvailableSizesArgument(*param1); } void QIconEngine__AvailableSizesArgument_OperatorAssign(QIconEngine__AvailableSizesArgument* self, QIconEngine__AvailableSizesArgument* param1) { @@ -568,9 +565,8 @@ void QIconEngine__AvailableSizesArgument_Delete(QIconEngine__AvailableSizesArgum } } -void QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1, QIconEngine__ScaledPixmapArgument** outptr_QIconEngine__ScaledPixmapArgument) { - QIconEngine::ScaledPixmapArgument* ret = new QIconEngine::ScaledPixmapArgument(*param1); - *outptr_QIconEngine__ScaledPixmapArgument = ret; +QIconEngine__ScaledPixmapArgument* QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1) { + return new QIconEngine::ScaledPixmapArgument(*param1); } void QIconEngine__ScaledPixmapArgument_OperatorAssign(QIconEngine__ScaledPixmapArgument* self, QIconEngine__ScaledPixmapArgument* param1) { diff --git a/qt/gen_qiconengine.go b/qt/gen_qiconengine.go index 14c7adcc..94c47ef1 100644 --- a/qt/gen_qiconengine.go +++ b/qt/gen_qiconengine.go @@ -47,34 +47,27 @@ func newQIconEngine(h *C.QIconEngine) *QIconEngine { if h == nil { return nil } + return &QIconEngine{h: h} } // UnsafeNewQIconEngine constructs the type using only unsafe pointers. func UnsafeNewQIconEngine(h unsafe.Pointer) *QIconEngine { - if h == nil { - return nil - } - - return &QIconEngine{h: (*C.QIconEngine)(h)} + return newQIconEngine((*C.QIconEngine)(h)) } // NewQIconEngine constructs a new QIconEngine object. func NewQIconEngine() *QIconEngine { - var outptr_QIconEngine *C.QIconEngine = nil - C.QIconEngine_new(&outptr_QIconEngine) - ret := newQIconEngine(outptr_QIconEngine) + ret := newQIconEngine(C.QIconEngine_new()) ret.isSubclass = true return ret } // NewQIconEngine2 constructs a new QIconEngine object. func NewQIconEngine2(other *QIconEngine) *QIconEngine { - var outptr_QIconEngine *C.QIconEngine = nil - C.QIconEngine_new2(other.cPointer(), &outptr_QIconEngine) - ret := newQIconEngine(outptr_QIconEngine) + ret := newQIconEngine(C.QIconEngine_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -90,7 +83,7 @@ func (this *QIconEngine) ActualSize(size *QSize, mode QIcon__Mode, state QIcon__ } func (this *QIconEngine) Pixmap(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { - _goptr := newQPixmap(C.QIconEngine_Pixmap(this.h, size.cPointer(), (C.int)(mode), (C.int)(state)), nil) + _goptr := newQPixmap(C.QIconEngine_Pixmap(this.h, size.cPointer(), (C.int)(mode), (C.int)(state))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -150,7 +143,7 @@ func (this *QIconEngine) IsNull() bool { } func (this *QIconEngine) ScaledPixmap(size *QSize, mode QIcon__Mode, state QIcon__State, scale float64) *QPixmap { - _goptr := newQPixmap(C.QIconEngine_ScaledPixmap(this.h, size.cPointer(), (C.int)(mode), (C.int)(state), (C.double)(scale)), nil) + _goptr := newQPixmap(C.QIconEngine_ScaledPixmap(this.h, size.cPointer(), (C.int)(mode), (C.int)(state), (C.double)(scale))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -221,7 +214,7 @@ func miqt_exec_callback_QIconEngine_ActualSize(self *C.QIconEngine, cb C.intptr_ func (this *QIconEngine) callVirtualBase_Pixmap(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { - _goptr := newQPixmap(C.QIconEngine_virtualbase_Pixmap(unsafe.Pointer(this.h), size.cPointer(), (C.int)(mode), (C.int)(state)), nil) + _goptr := newQPixmap(C.QIconEngine_virtualbase_Pixmap(unsafe.Pointer(this.h), size.cPointer(), (C.int)(mode), (C.int)(state))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -273,7 +266,7 @@ func miqt_exec_callback_QIconEngine_AddPixmap(self *C.QIconEngine, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQPixmap(pixmap, nil) + slotval1 := newQPixmap(pixmap) slotval2 := (QIcon__Mode)(mode) @@ -568,24 +561,19 @@ func newQIconEngine__AvailableSizesArgument(h *C.QIconEngine__AvailableSizesArgu if h == nil { return nil } + return &QIconEngine__AvailableSizesArgument{h: h} } // UnsafeNewQIconEngine__AvailableSizesArgument constructs the type using only unsafe pointers. func UnsafeNewQIconEngine__AvailableSizesArgument(h unsafe.Pointer) *QIconEngine__AvailableSizesArgument { - if h == nil { - return nil - } - - return &QIconEngine__AvailableSizesArgument{h: (*C.QIconEngine__AvailableSizesArgument)(h)} + return newQIconEngine__AvailableSizesArgument((*C.QIconEngine__AvailableSizesArgument)(h)) } // NewQIconEngine__AvailableSizesArgument constructs a new QIconEngine::AvailableSizesArgument object. func NewQIconEngine__AvailableSizesArgument(param1 *QIconEngine__AvailableSizesArgument) *QIconEngine__AvailableSizesArgument { - var outptr_QIconEngine__AvailableSizesArgument *C.QIconEngine__AvailableSizesArgument = nil - C.QIconEngine__AvailableSizesArgument_new(param1.cPointer(), &outptr_QIconEngine__AvailableSizesArgument) - ret := newQIconEngine__AvailableSizesArgument(outptr_QIconEngine__AvailableSizesArgument) + ret := newQIconEngine__AvailableSizesArgument(C.QIconEngine__AvailableSizesArgument_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -632,24 +620,19 @@ func newQIconEngine__ScaledPixmapArgument(h *C.QIconEngine__ScaledPixmapArgument if h == nil { return nil } + return &QIconEngine__ScaledPixmapArgument{h: h} } // UnsafeNewQIconEngine__ScaledPixmapArgument constructs the type using only unsafe pointers. func UnsafeNewQIconEngine__ScaledPixmapArgument(h unsafe.Pointer) *QIconEngine__ScaledPixmapArgument { - if h == nil { - return nil - } - - return &QIconEngine__ScaledPixmapArgument{h: (*C.QIconEngine__ScaledPixmapArgument)(h)} + return newQIconEngine__ScaledPixmapArgument((*C.QIconEngine__ScaledPixmapArgument)(h)) } // NewQIconEngine__ScaledPixmapArgument constructs a new QIconEngine::ScaledPixmapArgument object. func NewQIconEngine__ScaledPixmapArgument(param1 *QIconEngine__ScaledPixmapArgument) *QIconEngine__ScaledPixmapArgument { - var outptr_QIconEngine__ScaledPixmapArgument *C.QIconEngine__ScaledPixmapArgument = nil - C.QIconEngine__ScaledPixmapArgument_new(param1.cPointer(), &outptr_QIconEngine__ScaledPixmapArgument) - ret := newQIconEngine__ScaledPixmapArgument(outptr_QIconEngine__ScaledPixmapArgument) + ret := newQIconEngine__ScaledPixmapArgument(C.QIconEngine__ScaledPixmapArgument_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qiconengine.h b/qt/gen_qiconengine.h index 00275ecd..fb0fe1bb 100644 --- a/qt/gen_qiconengine.h +++ b/qt/gen_qiconengine.h @@ -42,8 +42,8 @@ typedef struct QRect QRect; typedef struct QSize QSize; #endif -void QIconEngine_new(QIconEngine** outptr_QIconEngine); -void QIconEngine_new2(QIconEngine* other, QIconEngine** outptr_QIconEngine); +QIconEngine* QIconEngine_new(); +QIconEngine* QIconEngine_new2(QIconEngine* other); void QIconEngine_Paint(QIconEngine* self, QPainter* painter, QRect* rect, int mode, int state); QSize* QIconEngine_ActualSize(QIconEngine* self, QSize* size, int mode, int state); QPixmap* QIconEngine_Pixmap(QIconEngine* self, QSize* size, int mode, int state); @@ -84,11 +84,11 @@ void QIconEngine_override_virtual_VirtualHook(void* self, intptr_t slot); void QIconEngine_virtualbase_VirtualHook(void* self, int id, void* data); void QIconEngine_Delete(QIconEngine* self, bool isSubclass); -void QIconEngine__AvailableSizesArgument_new(QIconEngine__AvailableSizesArgument* param1, QIconEngine__AvailableSizesArgument** outptr_QIconEngine__AvailableSizesArgument); +QIconEngine__AvailableSizesArgument* QIconEngine__AvailableSizesArgument_new(QIconEngine__AvailableSizesArgument* param1); void QIconEngine__AvailableSizesArgument_OperatorAssign(QIconEngine__AvailableSizesArgument* self, QIconEngine__AvailableSizesArgument* param1); void QIconEngine__AvailableSizesArgument_Delete(QIconEngine__AvailableSizesArgument* self, bool isSubclass); -void QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1, QIconEngine__ScaledPixmapArgument** outptr_QIconEngine__ScaledPixmapArgument); +QIconEngine__ScaledPixmapArgument* QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1); void QIconEngine__ScaledPixmapArgument_OperatorAssign(QIconEngine__ScaledPixmapArgument* self, QIconEngine__ScaledPixmapArgument* param1); void QIconEngine__ScaledPixmapArgument_Delete(QIconEngine__ScaledPixmapArgument* self, bool isSubclass); diff --git a/qt/gen_qiconengineplugin.cpp b/qt/gen_qiconengineplugin.cpp index 472cb58d..8833aaaa 100644 --- a/qt/gen_qiconengineplugin.cpp +++ b/qt/gen_qiconengineplugin.cpp @@ -217,16 +217,16 @@ public: }; -void QIconEnginePlugin_new(QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject) { - MiqtVirtualQIconEnginePlugin* ret = new MiqtVirtualQIconEnginePlugin(); - *outptr_QIconEnginePlugin = ret; - *outptr_QObject = static_cast(ret); +QIconEnginePlugin* QIconEnginePlugin_new() { + return new MiqtVirtualQIconEnginePlugin(); } -void QIconEnginePlugin_new2(QObject* parent, QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject) { - MiqtVirtualQIconEnginePlugin* ret = new MiqtVirtualQIconEnginePlugin(parent); - *outptr_QIconEnginePlugin = ret; - *outptr_QObject = static_cast(ret); +QIconEnginePlugin* QIconEnginePlugin_new2(QObject* parent) { + return new MiqtVirtualQIconEnginePlugin(parent); +} + +void QIconEnginePlugin_virtbase(QIconEnginePlugin* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QIconEnginePlugin_MetaObject(const QIconEnginePlugin* self) { diff --git a/qt/gen_qiconengineplugin.go b/qt/gen_qiconengineplugin.go index 6b99d60f..aa1b4e25 100644 --- a/qt/gen_qiconengineplugin.go +++ b/qt/gen_qiconengineplugin.go @@ -35,42 +35,34 @@ func (this *QIconEnginePlugin) UnsafePointer() unsafe.Pointer { } // newQIconEnginePlugin constructs the type using only CGO pointers. -func newQIconEnginePlugin(h *C.QIconEnginePlugin, h_QObject *C.QObject) *QIconEnginePlugin { +func newQIconEnginePlugin(h *C.QIconEnginePlugin) *QIconEnginePlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QIconEnginePlugin_virtbase(h, &outptr_QObject) + return &QIconEnginePlugin{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQIconEnginePlugin constructs the type using only unsafe pointers. -func UnsafeNewQIconEnginePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QIconEnginePlugin { - if h == nil { - return nil - } - - return &QIconEnginePlugin{h: (*C.QIconEnginePlugin)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQIconEnginePlugin(h unsafe.Pointer) *QIconEnginePlugin { + return newQIconEnginePlugin((*C.QIconEnginePlugin)(h)) } // NewQIconEnginePlugin constructs a new QIconEnginePlugin object. func NewQIconEnginePlugin() *QIconEnginePlugin { - var outptr_QIconEnginePlugin *C.QIconEnginePlugin = nil - var outptr_QObject *C.QObject = nil - C.QIconEnginePlugin_new(&outptr_QIconEnginePlugin, &outptr_QObject) - ret := newQIconEnginePlugin(outptr_QIconEnginePlugin, outptr_QObject) + ret := newQIconEnginePlugin(C.QIconEnginePlugin_new()) ret.isSubclass = true return ret } // NewQIconEnginePlugin2 constructs a new QIconEnginePlugin object. func NewQIconEnginePlugin2(parent *QObject) *QIconEnginePlugin { - var outptr_QIconEnginePlugin *C.QIconEnginePlugin = nil - var outptr_QObject *C.QObject = nil - C.QIconEnginePlugin_new2(parent.cPointer(), &outptr_QIconEnginePlugin, &outptr_QObject) - ret := newQIconEnginePlugin(outptr_QIconEnginePlugin, outptr_QObject) + ret := newQIconEnginePlugin(C.QIconEnginePlugin_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -258,7 +250,7 @@ func miqt_exec_callback_QIconEnginePlugin_TimerEvent(self *C.QIconEnginePlugin, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QIconEnginePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -284,7 +276,7 @@ func miqt_exec_callback_QIconEnginePlugin_ChildEvent(self *C.QIconEnginePlugin, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QIconEnginePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qiconengineplugin.h b/qt/gen_qiconengineplugin.h index 3c7b33b6..4cd5ba9d 100644 --- a/qt/gen_qiconengineplugin.h +++ b/qt/gen_qiconengineplugin.h @@ -34,8 +34,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QIconEnginePlugin_new(QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject); -void QIconEnginePlugin_new2(QObject* parent, QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject); +QIconEnginePlugin* QIconEnginePlugin_new(); +QIconEnginePlugin* QIconEnginePlugin_new2(QObject* parent); +void QIconEnginePlugin_virtbase(QIconEnginePlugin* src, QObject** outptr_QObject); QMetaObject* QIconEnginePlugin_MetaObject(const QIconEnginePlugin* self); void* QIconEnginePlugin_Metacast(QIconEnginePlugin* self, const char* param1); struct miqt_string QIconEnginePlugin_Tr(const char* s); diff --git a/qt/gen_qidentityproxymodel.cpp b/qt/gen_qidentityproxymodel.cpp index 4a1b7b9d..bda5158b 100644 --- a/qt/gen_qidentityproxymodel.cpp +++ b/qt/gen_qidentityproxymodel.cpp @@ -1110,20 +1110,16 @@ public: }; -void QIdentityProxyModel_new(QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQIdentityProxyModel* ret = new MiqtVirtualQIdentityProxyModel(); - *outptr_QIdentityProxyModel = ret; - *outptr_QAbstractProxyModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QIdentityProxyModel* QIdentityProxyModel_new() { + return new MiqtVirtualQIdentityProxyModel(); } -void QIdentityProxyModel_new2(QObject* parent, QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQIdentityProxyModel* ret = new MiqtVirtualQIdentityProxyModel(parent); - *outptr_QIdentityProxyModel = ret; - *outptr_QAbstractProxyModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QIdentityProxyModel* QIdentityProxyModel_new2(QObject* parent) { + return new MiqtVirtualQIdentityProxyModel(parent); +} + +void QIdentityProxyModel_virtbase(QIdentityProxyModel* src, QAbstractProxyModel** outptr_QAbstractProxyModel) { + *outptr_QAbstractProxyModel = static_cast(src); } QMetaObject* QIdentityProxyModel_MetaObject(const QIdentityProxyModel* self) { diff --git a/qt/gen_qidentityproxymodel.go b/qt/gen_qidentityproxymodel.go index dd2044d5..8402e7ad 100644 --- a/qt/gen_qidentityproxymodel.go +++ b/qt/gen_qidentityproxymodel.go @@ -35,46 +35,34 @@ func (this *QIdentityProxyModel) UnsafePointer() unsafe.Pointer { } // newQIdentityProxyModel constructs the type using only CGO pointers. -func newQIdentityProxyModel(h *C.QIdentityProxyModel, h_QAbstractProxyModel *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QIdentityProxyModel { +func newQIdentityProxyModel(h *C.QIdentityProxyModel) *QIdentityProxyModel { if h == nil { return nil } + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + C.QIdentityProxyModel_virtbase(h, &outptr_QAbstractProxyModel) + return &QIdentityProxyModel{h: h, - QAbstractProxyModel: newQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} + QAbstractProxyModel: newQAbstractProxyModel(outptr_QAbstractProxyModel)} } // UnsafeNewQIdentityProxyModel constructs the type using only unsafe pointers. -func UnsafeNewQIdentityProxyModel(h unsafe.Pointer, h_QAbstractProxyModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QIdentityProxyModel { - if h == nil { - return nil - } - - return &QIdentityProxyModel{h: (*C.QIdentityProxyModel)(h), - QAbstractProxyModel: UnsafeNewQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} +func UnsafeNewQIdentityProxyModel(h unsafe.Pointer) *QIdentityProxyModel { + return newQIdentityProxyModel((*C.QIdentityProxyModel)(h)) } // NewQIdentityProxyModel constructs a new QIdentityProxyModel object. func NewQIdentityProxyModel() *QIdentityProxyModel { - var outptr_QIdentityProxyModel *C.QIdentityProxyModel = nil - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QIdentityProxyModel_new(&outptr_QIdentityProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQIdentityProxyModel(outptr_QIdentityProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQIdentityProxyModel(C.QIdentityProxyModel_new()) ret.isSubclass = true return ret } // NewQIdentityProxyModel2 constructs a new QIdentityProxyModel object. func NewQIdentityProxyModel2(parent *QObject) *QIdentityProxyModel { - var outptr_QIdentityProxyModel *C.QIdentityProxyModel = nil - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QIdentityProxyModel_new2(parent.cPointer(), &outptr_QIdentityProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQIdentityProxyModel(outptr_QIdentityProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQIdentityProxyModel(C.QIdentityProxyModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -485,7 +473,7 @@ func miqt_exec_callback_QIdentityProxyModel_DropMimeData(self *C.QIdentityProxyM } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -665,7 +653,7 @@ func miqt_exec_callback_QIdentityProxyModel_SetSourceModel(self *C.QIdentityProx } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(sourceModel, nil) + slotval1 := newQAbstractItemModel(sourceModel) gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) @@ -1337,7 +1325,7 @@ func (this *QIdentityProxyModel) callVirtualBase_MimeData(indexes []QModelIndex) } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QIdentityProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QIdentityProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QIdentityProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -1391,7 +1379,7 @@ func miqt_exec_callback_QIdentityProxyModel_CanDropMimeData(self *C.QIdentityPro } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt/gen_qidentityproxymodel.h b/qt/gen_qidentityproxymodel.h index e3b21dbc..70b414bd 100644 --- a/qt/gen_qidentityproxymodel.h +++ b/qt/gen_qidentityproxymodel.h @@ -38,8 +38,9 @@ typedef struct QSize QSize; typedef struct QVariant QVariant; #endif -void QIdentityProxyModel_new(QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QIdentityProxyModel_new2(QObject* parent, QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QIdentityProxyModel* QIdentityProxyModel_new(); +QIdentityProxyModel* QIdentityProxyModel_new2(QObject* parent); +void QIdentityProxyModel_virtbase(QIdentityProxyModel* src, QAbstractProxyModel** outptr_QAbstractProxyModel); QMetaObject* QIdentityProxyModel_MetaObject(const QIdentityProxyModel* self); void* QIdentityProxyModel_Metacast(QIdentityProxyModel* self, const char* param1); struct miqt_string QIdentityProxyModel_Tr(const char* s); diff --git a/qt/gen_qimage.cpp b/qt/gen_qimage.cpp index 17ee11b4..291a159b 100644 --- a/qt/gen_qimage.cpp +++ b/qt/gen_qimage.cpp @@ -176,66 +176,50 @@ public: }; -void QImage_new(QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new() { + return new MiqtVirtualQImage(); } -void QImage_new2(QSize* size, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(*size, static_cast(format)); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new2(QSize* size, int format) { + return new MiqtVirtualQImage(*size, static_cast(format)); } -void QImage_new3(int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(width), static_cast(height), static_cast(format)); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new3(int width, int height, int format) { + return new MiqtVirtualQImage(static_cast(width), static_cast(height), static_cast(format)); } -void QImage_new4(unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new4(unsigned char* data, int width, int height, int format) { + return new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); } -void QImage_new5(const unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new5(const unsigned char* data, int width, int height, int format) { + return new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); } -void QImage_new6(unsigned char* data, int width, int height, int bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(bytesPerLine), static_cast(format)); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new6(unsigned char* data, int width, int height, int bytesPerLine, int format) { + return new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(bytesPerLine), static_cast(format)); } -void QImage_new7(const unsigned char* data, int width, int height, int bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(bytesPerLine), static_cast(format)); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new7(const unsigned char* data, int width, int height, int bytesPerLine, int format) { + return new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(bytesPerLine), static_cast(format)); } -void QImage_new8(struct miqt_string fileName, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { +QImage* QImage_new8(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQImage* ret = new MiqtVirtualQImage(fileName_QString); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQImage(fileName_QString); } -void QImage_new9(QImage* param1, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(*param1); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new9(QImage* param1) { + return new MiqtVirtualQImage(*param1); } -void QImage_new10(struct miqt_string fileName, const char* format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { +QImage* QImage_new10(struct miqt_string fileName, const char* format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQImage* ret = new MiqtVirtualQImage(fileName_QString, format); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQImage(fileName_QString, format); +} + +void QImage_virtbase(QImage* src, QPaintDevice** outptr_QPaintDevice) { + *outptr_QPaintDevice = static_cast(src); } void QImage_OperatorAssign(QImage* self, QImage* param1) { diff --git a/qt/gen_qimage.go b/qt/gen_qimage.go index b4c8bdb5..a82cc40f 100644 --- a/qt/gen_qimage.go +++ b/qt/gen_qimage.go @@ -78,97 +78,74 @@ func (this *QImage) UnsafePointer() unsafe.Pointer { } // newQImage constructs the type using only CGO pointers. -func newQImage(h *C.QImage, h_QPaintDevice *C.QPaintDevice) *QImage { +func newQImage(h *C.QImage) *QImage { if h == nil { return nil } + var outptr_QPaintDevice *C.QPaintDevice = nil + C.QImage_virtbase(h, &outptr_QPaintDevice) + return &QImage{h: h, - QPaintDevice: newQPaintDevice(h_QPaintDevice)} + QPaintDevice: newQPaintDevice(outptr_QPaintDevice)} } // UnsafeNewQImage constructs the type using only unsafe pointers. -func UnsafeNewQImage(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QImage { - if h == nil { - return nil - } - - return &QImage{h: (*C.QImage)(h), - QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} +func UnsafeNewQImage(h unsafe.Pointer) *QImage { + return newQImage((*C.QImage)(h)) } // NewQImage constructs a new QImage object. func NewQImage() *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new(&outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new()) ret.isSubclass = true return ret } // NewQImage2 constructs a new QImage object. func NewQImage2(size *QSize, format QImage__Format) *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new2(size.cPointer(), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new2(size.cPointer(), (C.int)(format))) ret.isSubclass = true return ret } // NewQImage3 constructs a new QImage object. func NewQImage3(width int, height int, format QImage__Format) *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new3((C.int)(width), (C.int)(height), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new3((C.int)(width), (C.int)(height), (C.int)(format))) ret.isSubclass = true return ret } // NewQImage4 constructs a new QImage object. func NewQImage4(data *byte, width int, height int, format QImage__Format) *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new4((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new4((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format))) ret.isSubclass = true return ret } // NewQImage5 constructs a new QImage object. func NewQImage5(data *byte, width int, height int, format QImage__Format) *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new5((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new5((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format))) ret.isSubclass = true return ret } // NewQImage6 constructs a new QImage object. func NewQImage6(data *byte, width int, height int, bytesPerLine int, format QImage__Format) *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new6((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(bytesPerLine), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new6((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(bytesPerLine), (C.int)(format))) ret.isSubclass = true return ret } // NewQImage7 constructs a new QImage object. func NewQImage7(data *byte, width int, height int, bytesPerLine int, format QImage__Format) *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new7((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(bytesPerLine), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new7((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(bytesPerLine), (C.int)(format))) ret.isSubclass = true return ret } @@ -179,22 +156,16 @@ func NewQImage8(fileName string) *QImage { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new8(fileName_ms, &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new8(fileName_ms)) ret.isSubclass = true return ret } // NewQImage9 constructs a new QImage object. func NewQImage9(param1 *QImage) *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new9(param1.cPointer(), &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new9(param1.cPointer())) ret.isSubclass = true return ret } @@ -207,11 +178,8 @@ func NewQImage10(fileName string, format string) *QImage { defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new10(fileName_ms, format_Cstring, &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new10(fileName_ms, format_Cstring)) ret.isSubclass = true return ret } @@ -249,13 +217,13 @@ func (this *QImage) IsDetached() bool { } func (this *QImage) Copy() *QImage { - _goptr := newQImage(C.QImage_Copy(this.h), nil) + _goptr := newQImage(C.QImage_Copy(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Copy2(x int, y int, w int, h int) *QImage { - _goptr := newQImage(C.QImage_Copy2(this.h, (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h)), nil) + _goptr := newQImage(C.QImage_Copy2(this.h, (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -265,7 +233,7 @@ func (this *QImage) Format() QImage__Format { } func (this *QImage) ConvertToFormat(f QImage__Format) *QImage { - _goptr := newQImage(C.QImage_ConvertToFormat(this.h, (C.int)(f)), nil) + _goptr := newQImage(C.QImage_ConvertToFormat(this.h, (C.int)(f))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -277,7 +245,7 @@ func (this *QImage) ConvertToFormat2(f QImage__Format, colorTable []uint) *QImag colorTable_CArray[i] = (C.uint)(colorTable[i]) } colorTable_ma := C.struct_miqt_array{len: C.size_t(len(colorTable)), data: unsafe.Pointer(colorTable_CArray)} - _goptr := newQImage(C.QImage_ConvertToFormat2(this.h, (C.int)(f), colorTable_ma), nil) + _goptr := newQImage(C.QImage_ConvertToFormat2(this.h, (C.int)(f), colorTable_ma)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -479,55 +447,55 @@ func (this *QImage) SetAlphaChannel(alphaChannel *QImage) { } func (this *QImage) AlphaChannel() *QImage { - _goptr := newQImage(C.QImage_AlphaChannel(this.h), nil) + _goptr := newQImage(C.QImage_AlphaChannel(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateAlphaMask() *QImage { - _goptr := newQImage(C.QImage_CreateAlphaMask(this.h), nil) + _goptr := newQImage(C.QImage_CreateAlphaMask(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateHeuristicMask() *QImage { - _goptr := newQImage(C.QImage_CreateHeuristicMask(this.h), nil) + _goptr := newQImage(C.QImage_CreateHeuristicMask(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateMaskFromColor(color uint) *QImage { - _goptr := newQImage(C.QImage_CreateMaskFromColor(this.h, (C.uint)(color)), nil) + _goptr := newQImage(C.QImage_CreateMaskFromColor(this.h, (C.uint)(color))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled(w int, h int) *QImage { - _goptr := newQImage(C.QImage_Scaled(this.h, (C.int)(w), (C.int)(h)), nil) + _goptr := newQImage(C.QImage_Scaled(this.h, (C.int)(w), (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledWithQSize(s *QSize) *QImage { - _goptr := newQImage(C.QImage_ScaledWithQSize(this.h, s.cPointer()), nil) + _goptr := newQImage(C.QImage_ScaledWithQSize(this.h, s.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToWidth(w int) *QImage { - _goptr := newQImage(C.QImage_ScaledToWidth(this.h, (C.int)(w)), nil) + _goptr := newQImage(C.QImage_ScaledToWidth(this.h, (C.int)(w))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToHeight(h int) *QImage { - _goptr := newQImage(C.QImage_ScaledToHeight(this.h, (C.int)(h)), nil) + _goptr := newQImage(C.QImage_ScaledToHeight(this.h, (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Transformed(matrix *QMatrix) *QImage { - _goptr := newQImage(C.QImage_Transformed(this.h, matrix.cPointer()), nil) + _goptr := newQImage(C.QImage_Transformed(this.h, matrix.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -539,7 +507,7 @@ func QImage_TrueMatrix(param1 *QMatrix, w int, h int) *QMatrix { } func (this *QImage) TransformedWithMatrix(matrix *QTransform) *QImage { - _goptr := newQImage(C.QImage_TransformedWithMatrix(this.h, matrix.cPointer()), nil) + _goptr := newQImage(C.QImage_TransformedWithMatrix(this.h, matrix.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -551,13 +519,13 @@ func QImage_TrueMatrix2(param1 *QTransform, w int, h int) *QTransform { } func (this *QImage) Mirrored() *QImage { - _goptr := newQImage(C.QImage_Mirrored(this.h), nil) + _goptr := newQImage(C.QImage_Mirrored(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) RgbSwapped() *QImage { - _goptr := newQImage(C.QImage_RgbSwapped(this.h), nil) + _goptr := newQImage(C.QImage_RgbSwapped(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -573,7 +541,7 @@ func (this *QImage) ColorSpace() *QColorSpace { } func (this *QImage) ConvertedToColorSpace(param1 *QColorSpace) *QImage { - _goptr := newQImage(C.QImage_ConvertedToColorSpace(this.h, param1.cPointer()), nil) + _goptr := newQImage(C.QImage_ConvertedToColorSpace(this.h, param1.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -628,7 +596,7 @@ func (this *QImage) SaveWithDevice(device *QIODevice) bool { } func QImage_FromData(data *byte, size int) *QImage { - _goptr := newQImage(C.QImage_FromData((*C.uchar)(unsafe.Pointer(data)), (C.int)(size)), nil) + _goptr := newQImage(C.QImage_FromData((*C.uchar)(unsafe.Pointer(data)), (C.int)(size))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -637,7 +605,7 @@ func QImage_FromDataWithData(data []byte) *QImage { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - _goptr := newQImage(C.QImage_FromDataWithData(data_alias), nil) + _goptr := newQImage(C.QImage_FromDataWithData(data_alias)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -725,13 +693,13 @@ func QImage_ToImageFormat(format QPixelFormat) QImage__Format { } func (this *QImage) Copy1(rect *QRect) *QImage { - _goptr := newQImage(C.QImage_Copy1(this.h, rect.cPointer()), nil) + _goptr := newQImage(C.QImage_Copy1(this.h, rect.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ConvertToFormat22(f QImage__Format, flags ImageConversionFlag) *QImage { - _goptr := newQImage(C.QImage_ConvertToFormat22(this.h, (C.int)(f), (C.int)(flags)), nil) + _goptr := newQImage(C.QImage_ConvertToFormat22(this.h, (C.int)(f), (C.int)(flags))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -743,7 +711,7 @@ func (this *QImage) ConvertToFormat3(f QImage__Format, colorTable []uint, flags colorTable_CArray[i] = (C.uint)(colorTable[i]) } colorTable_ma := C.struct_miqt_array{len: C.size_t(len(colorTable)), data: unsafe.Pointer(colorTable_CArray)} - _goptr := newQImage(C.QImage_ConvertToFormat3(this.h, (C.int)(f), colorTable_ma, (C.int)(flags)), nil) + _goptr := newQImage(C.QImage_ConvertToFormat3(this.h, (C.int)(f), colorTable_ma, (C.int)(flags))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -753,79 +721,79 @@ func (this *QImage) ConvertTo2(f QImage__Format, flags ImageConversionFlag) { } func (this *QImage) CreateAlphaMask1(flags ImageConversionFlag) *QImage { - _goptr := newQImage(C.QImage_CreateAlphaMask1(this.h, (C.int)(flags)), nil) + _goptr := newQImage(C.QImage_CreateAlphaMask1(this.h, (C.int)(flags))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateHeuristicMask1(clipTight bool) *QImage { - _goptr := newQImage(C.QImage_CreateHeuristicMask1(this.h, (C.bool)(clipTight)), nil) + _goptr := newQImage(C.QImage_CreateHeuristicMask1(this.h, (C.bool)(clipTight))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateMaskFromColor2(color uint, mode MaskMode) *QImage { - _goptr := newQImage(C.QImage_CreateMaskFromColor2(this.h, (C.uint)(color), (C.int)(mode)), nil) + _goptr := newQImage(C.QImage_CreateMaskFromColor2(this.h, (C.uint)(color), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled3(w int, h int, aspectMode AspectRatioMode) *QImage { - _goptr := newQImage(C.QImage_Scaled3(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode)), nil) + _goptr := newQImage(C.QImage_Scaled3(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled4(w int, h int, aspectMode AspectRatioMode, mode TransformationMode) *QImage { - _goptr := newQImage(C.QImage_Scaled4(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode), (C.int)(mode)), nil) + _goptr := newQImage(C.QImage_Scaled4(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled2(s *QSize, aspectMode AspectRatioMode) *QImage { - _goptr := newQImage(C.QImage_Scaled2(this.h, s.cPointer(), (C.int)(aspectMode)), nil) + _goptr := newQImage(C.QImage_Scaled2(this.h, s.cPointer(), (C.int)(aspectMode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled32(s *QSize, aspectMode AspectRatioMode, mode TransformationMode) *QImage { - _goptr := newQImage(C.QImage_Scaled32(this.h, s.cPointer(), (C.int)(aspectMode), (C.int)(mode)), nil) + _goptr := newQImage(C.QImage_Scaled32(this.h, s.cPointer(), (C.int)(aspectMode), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToWidth2(w int, mode TransformationMode) *QImage { - _goptr := newQImage(C.QImage_ScaledToWidth2(this.h, (C.int)(w), (C.int)(mode)), nil) + _goptr := newQImage(C.QImage_ScaledToWidth2(this.h, (C.int)(w), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToHeight2(h int, mode TransformationMode) *QImage { - _goptr := newQImage(C.QImage_ScaledToHeight2(this.h, (C.int)(h), (C.int)(mode)), nil) + _goptr := newQImage(C.QImage_ScaledToHeight2(this.h, (C.int)(h), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Transformed2(matrix *QMatrix, mode TransformationMode) *QImage { - _goptr := newQImage(C.QImage_Transformed2(this.h, matrix.cPointer(), (C.int)(mode)), nil) + _goptr := newQImage(C.QImage_Transformed2(this.h, matrix.cPointer(), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Transformed22(matrix *QTransform, mode TransformationMode) *QImage { - _goptr := newQImage(C.QImage_Transformed22(this.h, matrix.cPointer(), (C.int)(mode)), nil) + _goptr := newQImage(C.QImage_Transformed22(this.h, matrix.cPointer(), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Mirrored1(horizontally bool) *QImage { - _goptr := newQImage(C.QImage_Mirrored1(this.h, (C.bool)(horizontally)), nil) + _goptr := newQImage(C.QImage_Mirrored1(this.h, (C.bool)(horizontally))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Mirrored2(horizontally bool, vertically bool) *QImage { - _goptr := newQImage(C.QImage_Mirrored2(this.h, (C.bool)(horizontally), (C.bool)(vertically)), nil) + _goptr := newQImage(C.QImage_Mirrored2(this.h, (C.bool)(horizontally), (C.bool)(vertically))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -894,7 +862,7 @@ func (this *QImage) Save32(device *QIODevice, format string, quality int) bool { func QImage_FromData3(data *byte, size int, format string) *QImage { format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - _goptr := newQImage(C.QImage_FromData3((*C.uchar)(unsafe.Pointer(data)), (C.int)(size), format_Cstring), nil) + _goptr := newQImage(C.QImage_FromData3((*C.uchar)(unsafe.Pointer(data)), (C.int)(size), format_Cstring)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -905,7 +873,7 @@ func QImage_FromData2(data []byte, format string) *QImage { data_alias.len = C.size_t(len(data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - _goptr := newQImage(C.QImage_FromData2(data_alias, format_Cstring), nil) + _goptr := newQImage(C.QImage_FromData2(data_alias, format_Cstring)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/gen_qimage.h b/qt/gen_qimage.h index eea19916..9df5edc8 100644 --- a/qt/gen_qimage.h +++ b/qt/gen_qimage.h @@ -46,16 +46,17 @@ typedef struct QSize QSize; typedef struct QTransform QTransform; #endif -void QImage_new(QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new2(QSize* size, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new3(int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new4(unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new5(const unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new6(unsigned char* data, int width, int height, int bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new7(const unsigned char* data, int width, int height, int bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new8(struct miqt_string fileName, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new9(QImage* param1, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new10(struct miqt_string fileName, const char* format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +QImage* QImage_new(); +QImage* QImage_new2(QSize* size, int format); +QImage* QImage_new3(int width, int height, int format); +QImage* QImage_new4(unsigned char* data, int width, int height, int format); +QImage* QImage_new5(const unsigned char* data, int width, int height, int format); +QImage* QImage_new6(unsigned char* data, int width, int height, int bytesPerLine, int format); +QImage* QImage_new7(const unsigned char* data, int width, int height, int bytesPerLine, int format); +QImage* QImage_new8(struct miqt_string fileName); +QImage* QImage_new9(QImage* param1); +QImage* QImage_new10(struct miqt_string fileName, const char* format); +void QImage_virtbase(QImage* src, QPaintDevice** outptr_QPaintDevice); void QImage_OperatorAssign(QImage* self, QImage* param1); void QImage_Swap(QImage* self, QImage* other); bool QImage_IsNull(const QImage* self); diff --git a/qt/gen_qimageiohandler.cpp b/qt/gen_qimageiohandler.cpp index eafd4a80..a54f529b 100644 --- a/qt/gen_qimageiohandler.cpp +++ b/qt/gen_qimageiohandler.cpp @@ -342,9 +342,8 @@ public: }; -void QImageIOHandler_new(QImageIOHandler** outptr_QImageIOHandler) { - MiqtVirtualQImageIOHandler* ret = new MiqtVirtualQImageIOHandler(); - *outptr_QImageIOHandler = ret; +QImageIOHandler* QImageIOHandler_new() { + return new MiqtVirtualQImageIOHandler(); } void QImageIOHandler_SetDevice(QImageIOHandler* self, QIODevice* device) { @@ -772,16 +771,16 @@ public: }; -void QImageIOPlugin_new(QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject) { - MiqtVirtualQImageIOPlugin* ret = new MiqtVirtualQImageIOPlugin(); - *outptr_QImageIOPlugin = ret; - *outptr_QObject = static_cast(ret); +QImageIOPlugin* QImageIOPlugin_new() { + return new MiqtVirtualQImageIOPlugin(); } -void QImageIOPlugin_new2(QObject* parent, QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject) { - MiqtVirtualQImageIOPlugin* ret = new MiqtVirtualQImageIOPlugin(parent); - *outptr_QImageIOPlugin = ret; - *outptr_QObject = static_cast(ret); +QImageIOPlugin* QImageIOPlugin_new2(QObject* parent) { + return new MiqtVirtualQImageIOPlugin(parent); +} + +void QImageIOPlugin_virtbase(QImageIOPlugin* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QImageIOPlugin_MetaObject(const QImageIOPlugin* self) { diff --git a/qt/gen_qimageiohandler.go b/qt/gen_qimageiohandler.go index 25b93c99..618209fc 100644 --- a/qt/gen_qimageiohandler.go +++ b/qt/gen_qimageiohandler.go @@ -84,24 +84,19 @@ func newQImageIOHandler(h *C.QImageIOHandler) *QImageIOHandler { if h == nil { return nil } + return &QImageIOHandler{h: h} } // UnsafeNewQImageIOHandler constructs the type using only unsafe pointers. func UnsafeNewQImageIOHandler(h unsafe.Pointer) *QImageIOHandler { - if h == nil { - return nil - } - - return &QImageIOHandler{h: (*C.QImageIOHandler)(h)} + return newQImageIOHandler((*C.QImageIOHandler)(h)) } // NewQImageIOHandler constructs a new QImageIOHandler object. func NewQImageIOHandler() *QImageIOHandler { - var outptr_QImageIOHandler *C.QImageIOHandler = nil - C.QImageIOHandler_new(&outptr_QImageIOHandler) - ret := newQImageIOHandler(outptr_QImageIOHandler) + ret := newQImageIOHandler(C.QImageIOHandler_new()) ret.isSubclass = true return ret } @@ -111,7 +106,7 @@ func (this *QImageIOHandler) SetDevice(device *QIODevice) { } func (this *QImageIOHandler) Device() *QIODevice { - return newQIODevice(C.QImageIOHandler_Device(this.h), nil) + return newQIODevice(C.QImageIOHandler_Device(this.h)) } func (this *QImageIOHandler) SetFormat(format []byte) { @@ -261,7 +256,7 @@ func miqt_exec_callback_QImageIOHandler_Read(self *C.QImageIOHandler, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQImage(image, nil) + slotval1 := newQImage(image) virtualReturn := gofunc(slotval1) @@ -289,7 +284,7 @@ func miqt_exec_callback_QImageIOHandler_Write(self *C.QImageIOHandler, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQImage(image, nil) + slotval1 := newQImage(image) virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_Write, slotval1) @@ -598,42 +593,34 @@ func (this *QImageIOPlugin) UnsafePointer() unsafe.Pointer { } // newQImageIOPlugin constructs the type using only CGO pointers. -func newQImageIOPlugin(h *C.QImageIOPlugin, h_QObject *C.QObject) *QImageIOPlugin { +func newQImageIOPlugin(h *C.QImageIOPlugin) *QImageIOPlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QImageIOPlugin_virtbase(h, &outptr_QObject) + return &QImageIOPlugin{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQImageIOPlugin constructs the type using only unsafe pointers. -func UnsafeNewQImageIOPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QImageIOPlugin { - if h == nil { - return nil - } - - return &QImageIOPlugin{h: (*C.QImageIOPlugin)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQImageIOPlugin(h unsafe.Pointer) *QImageIOPlugin { + return newQImageIOPlugin((*C.QImageIOPlugin)(h)) } // NewQImageIOPlugin constructs a new QImageIOPlugin object. func NewQImageIOPlugin() *QImageIOPlugin { - var outptr_QImageIOPlugin *C.QImageIOPlugin = nil - var outptr_QObject *C.QObject = nil - C.QImageIOPlugin_new(&outptr_QImageIOPlugin, &outptr_QObject) - ret := newQImageIOPlugin(outptr_QImageIOPlugin, outptr_QObject) + ret := newQImageIOPlugin(C.QImageIOPlugin_new()) ret.isSubclass = true return ret } // NewQImageIOPlugin2 constructs a new QImageIOPlugin object. func NewQImageIOPlugin2(parent *QObject) *QImageIOPlugin { - var outptr_QImageIOPlugin *C.QImageIOPlugin = nil - var outptr_QObject *C.QObject = nil - C.QImageIOPlugin_new2(parent.cPointer(), &outptr_QImageIOPlugin, &outptr_QObject) - ret := newQImageIOPlugin(outptr_QImageIOPlugin, outptr_QObject) + ret := newQImageIOPlugin(C.QImageIOPlugin_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -738,7 +725,7 @@ func miqt_exec_callback_QImageIOPlugin_Capabilities(self *C.QImageIOPlugin, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQIODevice(device, nil) + slotval1 := newQIODevice(device) var format_bytearray C.struct_miqt_string = format format_ret := C.GoBytes(unsafe.Pointer(format_bytearray.data), C.int(int64(format_bytearray.len))) @@ -765,7 +752,7 @@ func miqt_exec_callback_QImageIOPlugin_Create(self *C.QImageIOPlugin, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQIODevice(device, nil) + slotval1 := newQIODevice(device) var format_bytearray C.struct_miqt_string = format format_ret := C.GoBytes(unsafe.Pointer(format_bytearray.data), C.int(int64(format_bytearray.len))) @@ -856,7 +843,7 @@ func miqt_exec_callback_QImageIOPlugin_TimerEvent(self *C.QImageIOPlugin, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QImageIOPlugin{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -882,7 +869,7 @@ func miqt_exec_callback_QImageIOPlugin_ChildEvent(self *C.QImageIOPlugin, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QImageIOPlugin{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qimageiohandler.h b/qt/gen_qimageiohandler.h index f90bc80f..a0be4937 100644 --- a/qt/gen_qimageiohandler.h +++ b/qt/gen_qimageiohandler.h @@ -42,7 +42,7 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -void QImageIOHandler_new(QImageIOHandler** outptr_QImageIOHandler); +QImageIOHandler* QImageIOHandler_new(); void QImageIOHandler_SetDevice(QImageIOHandler* self, QIODevice* device); QIODevice* QImageIOHandler_Device(const QImageIOHandler* self); void QImageIOHandler_SetFormat(QImageIOHandler* self, struct miqt_string format); @@ -92,8 +92,9 @@ void QImageIOHandler_override_virtual_CurrentImageRect(void* self, intptr_t slot QRect* QImageIOHandler_virtualbase_CurrentImageRect(const void* self); void QImageIOHandler_Delete(QImageIOHandler* self, bool isSubclass); -void QImageIOPlugin_new(QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject); -void QImageIOPlugin_new2(QObject* parent, QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject); +QImageIOPlugin* QImageIOPlugin_new(); +QImageIOPlugin* QImageIOPlugin_new2(QObject* parent); +void QImageIOPlugin_virtbase(QImageIOPlugin* src, QObject** outptr_QObject); QMetaObject* QImageIOPlugin_MetaObject(const QImageIOPlugin* self); void* QImageIOPlugin_Metacast(QImageIOPlugin* self, const char* param1); struct miqt_string QImageIOPlugin_Tr(const char* s); diff --git a/qt/gen_qimagereader.cpp b/qt/gen_qimagereader.cpp index 6809e18a..4e260f2d 100644 --- a/qt/gen_qimagereader.cpp +++ b/qt/gen_qimagereader.cpp @@ -13,33 +13,28 @@ #include "gen_qimagereader.h" #include "_cgo_export.h" -void QImageReader_new(QImageReader** outptr_QImageReader) { - QImageReader* ret = new QImageReader(); - *outptr_QImageReader = ret; +QImageReader* QImageReader_new() { + return new QImageReader(); } -void QImageReader_new2(QIODevice* device, QImageReader** outptr_QImageReader) { - QImageReader* ret = new QImageReader(device); - *outptr_QImageReader = ret; +QImageReader* QImageReader_new2(QIODevice* device) { + return new QImageReader(device); } -void QImageReader_new3(struct miqt_string fileName, QImageReader** outptr_QImageReader) { +QImageReader* QImageReader_new3(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QImageReader* ret = new QImageReader(fileName_QString); - *outptr_QImageReader = ret; + return new QImageReader(fileName_QString); } -void QImageReader_new4(QIODevice* device, struct miqt_string format, QImageReader** outptr_QImageReader) { +QImageReader* QImageReader_new4(QIODevice* device, struct miqt_string format) { QByteArray format_QByteArray(format.data, format.len); - QImageReader* ret = new QImageReader(device, format_QByteArray); - *outptr_QImageReader = ret; + return new QImageReader(device, format_QByteArray); } -void QImageReader_new5(struct miqt_string fileName, struct miqt_string format, QImageReader** outptr_QImageReader) { +QImageReader* QImageReader_new5(struct miqt_string fileName, struct miqt_string format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - QImageReader* ret = new QImageReader(fileName_QString, format_QByteArray); - *outptr_QImageReader = ret; + return new QImageReader(fileName_QString, format_QByteArray); } struct miqt_string QImageReader_Tr(const char* sourceText) { diff --git a/qt/gen_qimagereader.go b/qt/gen_qimagereader.go index e47e8ac7..8d691de1 100644 --- a/qt/gen_qimagereader.go +++ b/qt/gen_qimagereader.go @@ -47,34 +47,27 @@ func newQImageReader(h *C.QImageReader) *QImageReader { if h == nil { return nil } + return &QImageReader{h: h} } // UnsafeNewQImageReader constructs the type using only unsafe pointers. func UnsafeNewQImageReader(h unsafe.Pointer) *QImageReader { - if h == nil { - return nil - } - - return &QImageReader{h: (*C.QImageReader)(h)} + return newQImageReader((*C.QImageReader)(h)) } // NewQImageReader constructs a new QImageReader object. func NewQImageReader() *QImageReader { - var outptr_QImageReader *C.QImageReader = nil - C.QImageReader_new(&outptr_QImageReader) - ret := newQImageReader(outptr_QImageReader) + ret := newQImageReader(C.QImageReader_new()) ret.isSubclass = true return ret } // NewQImageReader2 constructs a new QImageReader object. func NewQImageReader2(device *QIODevice) *QImageReader { - var outptr_QImageReader *C.QImageReader = nil - C.QImageReader_new2(device.cPointer(), &outptr_QImageReader) - ret := newQImageReader(outptr_QImageReader) + ret := newQImageReader(C.QImageReader_new2(device.cPointer())) ret.isSubclass = true return ret } @@ -85,10 +78,8 @@ func NewQImageReader3(fileName string) *QImageReader { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QImageReader *C.QImageReader = nil - C.QImageReader_new3(fileName_ms, &outptr_QImageReader) - ret := newQImageReader(outptr_QImageReader) + ret := newQImageReader(C.QImageReader_new3(fileName_ms)) ret.isSubclass = true return ret } @@ -98,10 +89,8 @@ func NewQImageReader4(device *QIODevice, format []byte) *QImageReader { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QImageReader *C.QImageReader = nil - C.QImageReader_new4(device.cPointer(), format_alias, &outptr_QImageReader) - ret := newQImageReader(outptr_QImageReader) + ret := newQImageReader(C.QImageReader_new4(device.cPointer(), format_alias)) ret.isSubclass = true return ret } @@ -115,10 +104,8 @@ func NewQImageReader5(fileName string, format []byte) *QImageReader { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QImageReader *C.QImageReader = nil - C.QImageReader_new5(fileName_ms, format_alias, &outptr_QImageReader) - ret := newQImageReader(outptr_QImageReader) + ret := newQImageReader(C.QImageReader_new5(fileName_ms, format_alias)) ret.isSubclass = true return ret } @@ -176,7 +163,7 @@ func (this *QImageReader) SetDevice(device *QIODevice) { } func (this *QImageReader) Device() *QIODevice { - return newQIODevice(C.QImageReader_Device(this.h), nil) + return newQIODevice(C.QImageReader_Device(this.h)) } func (this *QImageReader) SetFileName(fileName string) { @@ -325,7 +312,7 @@ func (this *QImageReader) CanRead() bool { } func (this *QImageReader) Read() *QImage { - _goptr := newQImage(C.QImageReader_Read(this.h), nil) + _goptr := newQImage(C.QImageReader_Read(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/gen_qimagereader.h b/qt/gen_qimagereader.h index 2cab031e..cfcba022 100644 --- a/qt/gen_qimagereader.h +++ b/qt/gen_qimagereader.h @@ -30,11 +30,11 @@ typedef struct QRect QRect; typedef struct QSize QSize; #endif -void QImageReader_new(QImageReader** outptr_QImageReader); -void QImageReader_new2(QIODevice* device, QImageReader** outptr_QImageReader); -void QImageReader_new3(struct miqt_string fileName, QImageReader** outptr_QImageReader); -void QImageReader_new4(QIODevice* device, struct miqt_string format, QImageReader** outptr_QImageReader); -void QImageReader_new5(struct miqt_string fileName, struct miqt_string format, QImageReader** outptr_QImageReader); +QImageReader* QImageReader_new(); +QImageReader* QImageReader_new2(QIODevice* device); +QImageReader* QImageReader_new3(struct miqt_string fileName); +QImageReader* QImageReader_new4(QIODevice* device, struct miqt_string format); +QImageReader* QImageReader_new5(struct miqt_string fileName, struct miqt_string format); struct miqt_string QImageReader_Tr(const char* sourceText); struct miqt_string QImageReader_TrUtf8(const char* sourceText); void QImageReader_SetFormat(QImageReader* self, struct miqt_string format); diff --git a/qt/gen_qimagewriter.cpp b/qt/gen_qimagewriter.cpp index 3138d05a..26d428d9 100644 --- a/qt/gen_qimagewriter.cpp +++ b/qt/gen_qimagewriter.cpp @@ -10,28 +10,24 @@ #include "gen_qimagewriter.h" #include "_cgo_export.h" -void QImageWriter_new(QImageWriter** outptr_QImageWriter) { - QImageWriter* ret = new QImageWriter(); - *outptr_QImageWriter = ret; +QImageWriter* QImageWriter_new() { + return new QImageWriter(); } -void QImageWriter_new2(QIODevice* device, struct miqt_string format, QImageWriter** outptr_QImageWriter) { +QImageWriter* QImageWriter_new2(QIODevice* device, struct miqt_string format) { QByteArray format_QByteArray(format.data, format.len); - QImageWriter* ret = new QImageWriter(device, format_QByteArray); - *outptr_QImageWriter = ret; + return new QImageWriter(device, format_QByteArray); } -void QImageWriter_new3(struct miqt_string fileName, QImageWriter** outptr_QImageWriter) { +QImageWriter* QImageWriter_new3(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QImageWriter* ret = new QImageWriter(fileName_QString); - *outptr_QImageWriter = ret; + return new QImageWriter(fileName_QString); } -void QImageWriter_new4(struct miqt_string fileName, struct miqt_string format, QImageWriter** outptr_QImageWriter) { +QImageWriter* QImageWriter_new4(struct miqt_string fileName, struct miqt_string format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - QImageWriter* ret = new QImageWriter(fileName_QString, format_QByteArray); - *outptr_QImageWriter = ret; + return new QImageWriter(fileName_QString, format_QByteArray); } struct miqt_string QImageWriter_Tr(const char* sourceText) { diff --git a/qt/gen_qimagewriter.go b/qt/gen_qimagewriter.go index 10ad469b..33f6026b 100644 --- a/qt/gen_qimagewriter.go +++ b/qt/gen_qimagewriter.go @@ -46,24 +46,19 @@ func newQImageWriter(h *C.QImageWriter) *QImageWriter { if h == nil { return nil } + return &QImageWriter{h: h} } // UnsafeNewQImageWriter constructs the type using only unsafe pointers. func UnsafeNewQImageWriter(h unsafe.Pointer) *QImageWriter { - if h == nil { - return nil - } - - return &QImageWriter{h: (*C.QImageWriter)(h)} + return newQImageWriter((*C.QImageWriter)(h)) } // NewQImageWriter constructs a new QImageWriter object. func NewQImageWriter() *QImageWriter { - var outptr_QImageWriter *C.QImageWriter = nil - C.QImageWriter_new(&outptr_QImageWriter) - ret := newQImageWriter(outptr_QImageWriter) + ret := newQImageWriter(C.QImageWriter_new()) ret.isSubclass = true return ret } @@ -73,10 +68,8 @@ func NewQImageWriter2(device *QIODevice, format []byte) *QImageWriter { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QImageWriter *C.QImageWriter = nil - C.QImageWriter_new2(device.cPointer(), format_alias, &outptr_QImageWriter) - ret := newQImageWriter(outptr_QImageWriter) + ret := newQImageWriter(C.QImageWriter_new2(device.cPointer(), format_alias)) ret.isSubclass = true return ret } @@ -87,10 +80,8 @@ func NewQImageWriter3(fileName string) *QImageWriter { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QImageWriter *C.QImageWriter = nil - C.QImageWriter_new3(fileName_ms, &outptr_QImageWriter) - ret := newQImageWriter(outptr_QImageWriter) + ret := newQImageWriter(C.QImageWriter_new3(fileName_ms)) ret.isSubclass = true return ret } @@ -104,10 +95,8 @@ func NewQImageWriter4(fileName string, format []byte) *QImageWriter { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QImageWriter *C.QImageWriter = nil - C.QImageWriter_new4(fileName_ms, format_alias, &outptr_QImageWriter) - ret := newQImageWriter(outptr_QImageWriter) + ret := newQImageWriter(C.QImageWriter_new4(fileName_ms, format_alias)) ret.isSubclass = true return ret } @@ -149,7 +138,7 @@ func (this *QImageWriter) SetDevice(device *QIODevice) { } func (this *QImageWriter) Device() *QIODevice { - return newQIODevice(C.QImageWriter_Device(this.h), nil) + return newQIODevice(C.QImageWriter_Device(this.h)) } func (this *QImageWriter) SetFileName(fileName string) { diff --git a/qt/gen_qimagewriter.h b/qt/gen_qimagewriter.h index 5e1e8b1c..7851108a 100644 --- a/qt/gen_qimagewriter.h +++ b/qt/gen_qimagewriter.h @@ -24,10 +24,10 @@ typedef struct QImage QImage; typedef struct QImageWriter QImageWriter; #endif -void QImageWriter_new(QImageWriter** outptr_QImageWriter); -void QImageWriter_new2(QIODevice* device, struct miqt_string format, QImageWriter** outptr_QImageWriter); -void QImageWriter_new3(struct miqt_string fileName, QImageWriter** outptr_QImageWriter); -void QImageWriter_new4(struct miqt_string fileName, struct miqt_string format, QImageWriter** outptr_QImageWriter); +QImageWriter* QImageWriter_new(); +QImageWriter* QImageWriter_new2(QIODevice* device, struct miqt_string format); +QImageWriter* QImageWriter_new3(struct miqt_string fileName); +QImageWriter* QImageWriter_new4(struct miqt_string fileName, struct miqt_string format); struct miqt_string QImageWriter_Tr(const char* sourceText); struct miqt_string QImageWriter_TrUtf8(const char* sourceText); void QImageWriter_SetFormat(QImageWriter* self, struct miqt_string format); diff --git a/qt/gen_qinputdialog.cpp b/qt/gen_qinputdialog.cpp index 1abed1d3..4e6ba358 100644 --- a/qt/gen_qinputdialog.cpp +++ b/qt/gen_qinputdialog.cpp @@ -357,31 +357,20 @@ public: }; -void QInputDialog_new(QWidget* parent, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQInputDialog* ret = new MiqtVirtualQInputDialog(parent); - *outptr_QInputDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QInputDialog* QInputDialog_new(QWidget* parent) { + return new MiqtVirtualQInputDialog(parent); } -void QInputDialog_new2(QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQInputDialog* ret = new MiqtVirtualQInputDialog(); - *outptr_QInputDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QInputDialog* QInputDialog_new2() { + return new MiqtVirtualQInputDialog(); } -void QInputDialog_new3(QWidget* parent, int flags, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQInputDialog* ret = new MiqtVirtualQInputDialog(parent, static_cast(flags)); - *outptr_QInputDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QInputDialog* QInputDialog_new3(QWidget* parent, int flags) { + return new MiqtVirtualQInputDialog(parent, static_cast(flags)); +} + +void QInputDialog_virtbase(QInputDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QInputDialog_MetaObject(const QInputDialog* self) { diff --git a/qt/gen_qinputdialog.go b/qt/gen_qinputdialog.go index 0e77f004..f17d6e52 100644 --- a/qt/gen_qinputdialog.go +++ b/qt/gen_qinputdialog.go @@ -51,62 +51,42 @@ func (this *QInputDialog) UnsafePointer() unsafe.Pointer { } // newQInputDialog constructs the type using only CGO pointers. -func newQInputDialog(h *C.QInputDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QInputDialog { +func newQInputDialog(h *C.QInputDialog) *QInputDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QInputDialog_virtbase(h, &outptr_QDialog) + return &QInputDialog{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQInputDialog constructs the type using only unsafe pointers. -func UnsafeNewQInputDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QInputDialog { - if h == nil { - return nil - } - - return &QInputDialog{h: (*C.QInputDialog)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQInputDialog(h unsafe.Pointer) *QInputDialog { + return newQInputDialog((*C.QInputDialog)(h)) } // NewQInputDialog constructs a new QInputDialog object. func NewQInputDialog(parent *QWidget) *QInputDialog { - var outptr_QInputDialog *C.QInputDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QInputDialog_new(parent.cPointer(), &outptr_QInputDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQInputDialog(outptr_QInputDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQInputDialog(C.QInputDialog_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQInputDialog2 constructs a new QInputDialog object. func NewQInputDialog2() *QInputDialog { - var outptr_QInputDialog *C.QInputDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QInputDialog_new2(&outptr_QInputDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQInputDialog(outptr_QInputDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQInputDialog(C.QInputDialog_new2()) ret.isSubclass = true return ret } // NewQInputDialog3 constructs a new QInputDialog object. func NewQInputDialog3(parent *QWidget, flags WindowType) *QInputDialog { - var outptr_QInputDialog *C.QInputDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QInputDialog_new3(parent.cPointer(), (C.int)(flags), &outptr_QInputDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQInputDialog(outptr_QInputDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQInputDialog(C.QInputDialog_new3(parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -1295,7 +1275,7 @@ func miqt_exec_callback_QInputDialog_KeyPressEvent(self *C.QInputDialog, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QInputDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1321,7 +1301,7 @@ func miqt_exec_callback_QInputDialog_CloseEvent(self *C.QInputDialog, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(param1, nil) + slotval1 := newQCloseEvent(param1) gofunc((&QInputDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1347,7 +1327,7 @@ func miqt_exec_callback_QInputDialog_ShowEvent(self *C.QInputDialog, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QInputDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1373,7 +1353,7 @@ func miqt_exec_callback_QInputDialog_ResizeEvent(self *C.QInputDialog, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QInputDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1399,7 +1379,7 @@ func miqt_exec_callback_QInputDialog_ContextMenuEvent(self *C.QInputDialog, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QInputDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt/gen_qinputdialog.h b/qt/gen_qinputdialog.h index 11fada9b..f3eff45c 100644 --- a/qt/gen_qinputdialog.h +++ b/qt/gen_qinputdialog.h @@ -44,9 +44,10 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QInputDialog_new(QWidget* parent, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QInputDialog_new2(QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QInputDialog_new3(QWidget* parent, int flags, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QInputDialog* QInputDialog_new(QWidget* parent); +QInputDialog* QInputDialog_new2(); +QInputDialog* QInputDialog_new3(QWidget* parent, int flags); +void QInputDialog_virtbase(QInputDialog* src, QDialog** outptr_QDialog); QMetaObject* QInputDialog_MetaObject(const QInputDialog* self); void* QInputDialog_Metacast(QInputDialog* self, const char* param1); struct miqt_string QInputDialog_Tr(const char* s); diff --git a/qt/gen_qinputmethod.cpp b/qt/gen_qinputmethod.cpp index cc47ad58..abd7fd32 100644 --- a/qt/gen_qinputmethod.cpp +++ b/qt/gen_qinputmethod.cpp @@ -12,6 +12,10 @@ #include "gen_qinputmethod.h" #include "_cgo_export.h" +void QInputMethod_virtbase(QInputMethod* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QInputMethod_MetaObject(const QInputMethod* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/gen_qinputmethod.go b/qt/gen_qinputmethod.go index e4d48380..e1ad8227 100644 --- a/qt/gen_qinputmethod.go +++ b/qt/gen_qinputmethod.go @@ -41,22 +41,20 @@ func (this *QInputMethod) UnsafePointer() unsafe.Pointer { } // newQInputMethod constructs the type using only CGO pointers. -func newQInputMethod(h *C.QInputMethod, h_QObject *C.QObject) *QInputMethod { +func newQInputMethod(h *C.QInputMethod) *QInputMethod { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QInputMethod_virtbase(h, &outptr_QObject) + return &QInputMethod{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQInputMethod constructs the type using only unsafe pointers. -func UnsafeNewQInputMethod(h unsafe.Pointer, h_QObject unsafe.Pointer) *QInputMethod { - if h == nil { - return nil - } - - return &QInputMethod{h: (*C.QInputMethod)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQInputMethod(h unsafe.Pointer) *QInputMethod { + return newQInputMethod((*C.QInputMethod)(h)) } func (this *QInputMethod) MetaObject() *QMetaObject { diff --git a/qt/gen_qinputmethod.h b/qt/gen_qinputmethod.h index 61832d17..d7014c6e 100644 --- a/qt/gen_qinputmethod.h +++ b/qt/gen_qinputmethod.h @@ -32,6 +32,7 @@ typedef struct QTransform QTransform; typedef struct QVariant QVariant; #endif +void QInputMethod_virtbase(QInputMethod* src, QObject** outptr_QObject); QMetaObject* QInputMethod_MetaObject(const QInputMethod* self); void* QInputMethod_Metacast(QInputMethod* self, const char* param1); struct miqt_string QInputMethod_Tr(const char* s); diff --git a/qt/gen_qiodevice.cpp b/qt/gen_qiodevice.cpp index 01123206..807255dd 100644 --- a/qt/gen_qiodevice.cpp +++ b/qt/gen_qiodevice.cpp @@ -553,16 +553,16 @@ public: }; -void QIODevice_new(QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQIODevice* ret = new MiqtVirtualQIODevice(); - *outptr_QIODevice = ret; - *outptr_QObject = static_cast(ret); +QIODevice* QIODevice_new() { + return new MiqtVirtualQIODevice(); } -void QIODevice_new2(QObject* parent, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQIODevice* ret = new MiqtVirtualQIODevice(parent); - *outptr_QIODevice = ret; - *outptr_QObject = static_cast(ret); +QIODevice* QIODevice_new2(QObject* parent) { + return new MiqtVirtualQIODevice(parent); +} + +void QIODevice_virtbase(QIODevice* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QIODevice_MetaObject(const QIODevice* self) { diff --git a/qt/gen_qiodevice.go b/qt/gen_qiodevice.go index d1f8dfb6..a54b49d8 100644 --- a/qt/gen_qiodevice.go +++ b/qt/gen_qiodevice.go @@ -50,42 +50,34 @@ func (this *QIODevice) UnsafePointer() unsafe.Pointer { } // newQIODevice constructs the type using only CGO pointers. -func newQIODevice(h *C.QIODevice, h_QObject *C.QObject) *QIODevice { +func newQIODevice(h *C.QIODevice) *QIODevice { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QIODevice_virtbase(h, &outptr_QObject) + return &QIODevice{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQIODevice constructs the type using only unsafe pointers. -func UnsafeNewQIODevice(h unsafe.Pointer, h_QObject unsafe.Pointer) *QIODevice { - if h == nil { - return nil - } - - return &QIODevice{h: (*C.QIODevice)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQIODevice(h unsafe.Pointer) *QIODevice { + return newQIODevice((*C.QIODevice)(h)) } // NewQIODevice constructs a new QIODevice object. func NewQIODevice() *QIODevice { - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QIODevice_new(&outptr_QIODevice, &outptr_QObject) - ret := newQIODevice(outptr_QIODevice, outptr_QObject) + ret := newQIODevice(C.QIODevice_new()) ret.isSubclass = true return ret } // NewQIODevice2 constructs a new QIODevice object. func NewQIODevice2(parent *QObject) *QIODevice { - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QIODevice_new2(parent.cPointer(), &outptr_QIODevice, &outptr_QObject) - ret := newQIODevice(outptr_QIODevice, outptr_QObject) + ret := newQIODevice(C.QIODevice_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -984,7 +976,7 @@ func miqt_exec_callback_QIODevice_TimerEvent(self *C.QIODevice, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QIODevice{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1010,7 +1002,7 @@ func miqt_exec_callback_QIODevice_ChildEvent(self *C.QIODevice, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QIODevice{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qiodevice.h b/qt/gen_qiodevice.h index 6439e333..a1d69e7c 100644 --- a/qt/gen_qiodevice.h +++ b/qt/gen_qiodevice.h @@ -32,8 +32,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QIODevice_new(QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QIODevice_new2(QObject* parent, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +QIODevice* QIODevice_new(); +QIODevice* QIODevice_new2(QObject* parent); +void QIODevice_virtbase(QIODevice* src, QObject** outptr_QObject); QMetaObject* QIODevice_MetaObject(const QIODevice* self); void* QIODevice_Metacast(QIODevice* self, const char* param1); struct miqt_string QIODevice_Tr(const char* s); diff --git a/qt/gen_qitemdelegate.cpp b/qt/gen_qitemdelegate.cpp index 9db4471f..b0ac1a62 100644 --- a/qt/gen_qitemdelegate.cpp +++ b/qt/gen_qitemdelegate.cpp @@ -486,18 +486,16 @@ public: }; -void QItemDelegate_new(QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { - MiqtVirtualQItemDelegate* ret = new MiqtVirtualQItemDelegate(); - *outptr_QItemDelegate = ret; - *outptr_QAbstractItemDelegate = static_cast(ret); - *outptr_QObject = static_cast(ret); +QItemDelegate* QItemDelegate_new() { + return new MiqtVirtualQItemDelegate(); } -void QItemDelegate_new2(QObject* parent, QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { - MiqtVirtualQItemDelegate* ret = new MiqtVirtualQItemDelegate(parent); - *outptr_QItemDelegate = ret; - *outptr_QAbstractItemDelegate = static_cast(ret); - *outptr_QObject = static_cast(ret); +QItemDelegate* QItemDelegate_new2(QObject* parent) { + return new MiqtVirtualQItemDelegate(parent); +} + +void QItemDelegate_virtbase(QItemDelegate* src, QAbstractItemDelegate** outptr_QAbstractItemDelegate) { + *outptr_QAbstractItemDelegate = static_cast(src); } QMetaObject* QItemDelegate_MetaObject(const QItemDelegate* self) { diff --git a/qt/gen_qitemdelegate.go b/qt/gen_qitemdelegate.go index adac0dd7..f7d226c3 100644 --- a/qt/gen_qitemdelegate.go +++ b/qt/gen_qitemdelegate.go @@ -35,44 +35,34 @@ func (this *QItemDelegate) UnsafePointer() unsafe.Pointer { } // newQItemDelegate constructs the type using only CGO pointers. -func newQItemDelegate(h *C.QItemDelegate, h_QAbstractItemDelegate *C.QAbstractItemDelegate, h_QObject *C.QObject) *QItemDelegate { +func newQItemDelegate(h *C.QItemDelegate) *QItemDelegate { if h == nil { return nil } + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + C.QItemDelegate_virtbase(h, &outptr_QAbstractItemDelegate) + return &QItemDelegate{h: h, - QAbstractItemDelegate: newQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} + QAbstractItemDelegate: newQAbstractItemDelegate(outptr_QAbstractItemDelegate)} } // UnsafeNewQItemDelegate constructs the type using only unsafe pointers. -func UnsafeNewQItemDelegate(h unsafe.Pointer, h_QAbstractItemDelegate unsafe.Pointer, h_QObject unsafe.Pointer) *QItemDelegate { - if h == nil { - return nil - } - - return &QItemDelegate{h: (*C.QItemDelegate)(h), - QAbstractItemDelegate: UnsafeNewQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} +func UnsafeNewQItemDelegate(h unsafe.Pointer) *QItemDelegate { + return newQItemDelegate((*C.QItemDelegate)(h)) } // NewQItemDelegate constructs a new QItemDelegate object. func NewQItemDelegate() *QItemDelegate { - var outptr_QItemDelegate *C.QItemDelegate = nil - var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil - var outptr_QObject *C.QObject = nil - C.QItemDelegate_new(&outptr_QItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) - ret := newQItemDelegate(outptr_QItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret := newQItemDelegate(C.QItemDelegate_new()) ret.isSubclass = true return ret } // NewQItemDelegate2 constructs a new QItemDelegate object. func NewQItemDelegate2(parent *QObject) *QItemDelegate { - var outptr_QItemDelegate *C.QItemDelegate = nil - var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil - var outptr_QObject *C.QObject = nil - C.QItemDelegate_new2(parent.cPointer(), &outptr_QItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) - ret := newQItemDelegate(outptr_QItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret := newQItemDelegate(C.QItemDelegate_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -124,7 +114,7 @@ func (this *QItemDelegate) SizeHint(option *QStyleOptionViewItem, index *QModelI } func (this *QItemDelegate) CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return newQWidget(C.QItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer()), nil, nil) + return newQWidget(C.QItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer())) } func (this *QItemDelegate) SetEditorData(editor *QWidget, index *QModelIndex) { @@ -213,7 +203,7 @@ func miqt_exec_callback_QItemDelegate_Paint(self *C.QItemDelegate, cb C.intptr_t // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -243,7 +233,7 @@ func miqt_exec_callback_QItemDelegate_SizeHint(self *C.QItemDelegate, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) slotval2 := newQModelIndex(index) @@ -255,7 +245,7 @@ func miqt_exec_callback_QItemDelegate_SizeHint(self *C.QItemDelegate, cb C.intpt func (this *QItemDelegate) callVirtualBase_CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return newQWidget(C.QItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer()), nil, nil) + return newQWidget(C.QItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer())) } func (this *QItemDelegate) OnCreateEditor(slot func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) { @@ -273,9 +263,9 @@ func miqt_exec_callback_QItemDelegate_CreateEditor(self *C.QItemDelegate, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(parent, nil, nil) + slotval1 := newQWidget(parent) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -305,7 +295,7 @@ func miqt_exec_callback_QItemDelegate_SetEditorData(self *C.QItemDelegate, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := newQModelIndex(index) @@ -333,9 +323,9 @@ func miqt_exec_callback_QItemDelegate_SetModelData(self *C.QItemDelegate, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) - slotval2 := newQAbstractItemModel(model, nil) + slotval2 := newQAbstractItemModel(model) slotval3 := newQModelIndex(index) @@ -363,9 +353,9 @@ func miqt_exec_callback_QItemDelegate_UpdateEditorGeometry(self *C.QItemDelegate } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -399,7 +389,7 @@ func miqt_exec_callback_QItemDelegate_DrawDisplay(self *C.QItemDelegate, cb C.in // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQRect(rect) @@ -434,11 +424,11 @@ func miqt_exec_callback_QItemDelegate_DrawDecoration(self *C.QItemDelegate, cb C // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQRect(rect) - slotval4 := newQPixmap(pixmap, nil) + slotval4 := newQPixmap(pixmap) gofunc((&QItemDelegate{h: self}).callVirtualBase_DrawDecoration, slotval1, slotval2, slotval3, slotval4) @@ -466,7 +456,7 @@ func miqt_exec_callback_QItemDelegate_DrawFocus(self *C.QItemDelegate, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQRect(rect) @@ -496,7 +486,7 @@ func miqt_exec_callback_QItemDelegate_DrawCheck(self *C.QItemDelegate, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQRect(rect) @@ -558,9 +548,9 @@ func miqt_exec_callback_QItemDelegate_EditorEvent(self *C.QItemDelegate, cb C.in // Convert all CABI parameters to Go parameters slotval1 := newQEvent(event) - slotval2 := newQAbstractItemModel(model, nil) + slotval2 := newQAbstractItemModel(model) - slotval3 := newQStyleOptionViewItem(option, nil) + slotval3 := newQStyleOptionViewItem(option) slotval4 := newQModelIndex(index) @@ -590,7 +580,7 @@ func miqt_exec_callback_QItemDelegate_DestroyEditor(self *C.QItemDelegate, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := newQModelIndex(index) @@ -618,11 +608,11 @@ func miqt_exec_callback_QItemDelegate_HelpEvent(self *C.QItemDelegate, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQHelpEvent(event, nil) + slotval1 := newQHelpEvent(event) - slotval2 := newQAbstractItemView(view, nil, nil, nil, nil, nil) + slotval2 := newQAbstractItemView(view) - slotval3 := newQStyleOptionViewItem(option, nil) + slotval3 := newQStyleOptionViewItem(option) slotval4 := newQModelIndex(index) diff --git a/qt/gen_qitemdelegate.h b/qt/gen_qitemdelegate.h index 8d3268ce..ed4e6938 100644 --- a/qt/gen_qitemdelegate.h +++ b/qt/gen_qitemdelegate.h @@ -50,8 +50,9 @@ typedef struct QStyleOptionViewItem QStyleOptionViewItem; typedef struct QWidget QWidget; #endif -void QItemDelegate_new(QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); -void QItemDelegate_new2(QObject* parent, QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); +QItemDelegate* QItemDelegate_new(); +QItemDelegate* QItemDelegate_new2(QObject* parent); +void QItemDelegate_virtbase(QItemDelegate* src, QAbstractItemDelegate** outptr_QAbstractItemDelegate); QMetaObject* QItemDelegate_MetaObject(const QItemDelegate* self); void* QItemDelegate_Metacast(QItemDelegate* self, const char* param1); struct miqt_string QItemDelegate_Tr(const char* s); diff --git a/qt/gen_qitemeditorfactory.cpp b/qt/gen_qitemeditorfactory.cpp index 08641f11..cb9fbebf 100644 --- a/qt/gen_qitemeditorfactory.cpp +++ b/qt/gen_qitemeditorfactory.cpp @@ -94,14 +94,12 @@ public: }; -void QItemEditorFactory_new(QItemEditorFactory** outptr_QItemEditorFactory) { - MiqtVirtualQItemEditorFactory* ret = new MiqtVirtualQItemEditorFactory(); - *outptr_QItemEditorFactory = ret; +QItemEditorFactory* QItemEditorFactory_new() { + return new MiqtVirtualQItemEditorFactory(); } -void QItemEditorFactory_new2(QItemEditorFactory* param1, QItemEditorFactory** outptr_QItemEditorFactory) { - MiqtVirtualQItemEditorFactory* ret = new MiqtVirtualQItemEditorFactory(*param1); - *outptr_QItemEditorFactory = ret; +QItemEditorFactory* QItemEditorFactory_new2(QItemEditorFactory* param1) { + return new MiqtVirtualQItemEditorFactory(*param1); } QWidget* QItemEditorFactory_CreateEditor(const QItemEditorFactory* self, int userType, QWidget* parent) { diff --git a/qt/gen_qitemeditorfactory.go b/qt/gen_qitemeditorfactory.go index b1be1bb2..be36c4ab 100644 --- a/qt/gen_qitemeditorfactory.go +++ b/qt/gen_qitemeditorfactory.go @@ -38,20 +38,17 @@ func newQItemEditorCreatorBase(h *C.QItemEditorCreatorBase) *QItemEditorCreatorB if h == nil { return nil } + return &QItemEditorCreatorBase{h: h} } // UnsafeNewQItemEditorCreatorBase constructs the type using only unsafe pointers. func UnsafeNewQItemEditorCreatorBase(h unsafe.Pointer) *QItemEditorCreatorBase { - if h == nil { - return nil - } - - return &QItemEditorCreatorBase{h: (*C.QItemEditorCreatorBase)(h)} + return newQItemEditorCreatorBase((*C.QItemEditorCreatorBase)(h)) } func (this *QItemEditorCreatorBase) CreateWidget(parent *QWidget) *QWidget { - return newQWidget(C.QItemEditorCreatorBase_CreateWidget(this.h, parent.cPointer()), nil, nil) + return newQWidget(C.QItemEditorCreatorBase_CreateWidget(this.h, parent.cPointer())) } func (this *QItemEditorCreatorBase) ValuePropertyName() []byte { @@ -103,40 +100,33 @@ func newQItemEditorFactory(h *C.QItemEditorFactory) *QItemEditorFactory { if h == nil { return nil } + return &QItemEditorFactory{h: h} } // UnsafeNewQItemEditorFactory constructs the type using only unsafe pointers. func UnsafeNewQItemEditorFactory(h unsafe.Pointer) *QItemEditorFactory { - if h == nil { - return nil - } - - return &QItemEditorFactory{h: (*C.QItemEditorFactory)(h)} + return newQItemEditorFactory((*C.QItemEditorFactory)(h)) } // NewQItemEditorFactory constructs a new QItemEditorFactory object. func NewQItemEditorFactory() *QItemEditorFactory { - var outptr_QItemEditorFactory *C.QItemEditorFactory = nil - C.QItemEditorFactory_new(&outptr_QItemEditorFactory) - ret := newQItemEditorFactory(outptr_QItemEditorFactory) + ret := newQItemEditorFactory(C.QItemEditorFactory_new()) ret.isSubclass = true return ret } // NewQItemEditorFactory2 constructs a new QItemEditorFactory object. func NewQItemEditorFactory2(param1 *QItemEditorFactory) *QItemEditorFactory { - var outptr_QItemEditorFactory *C.QItemEditorFactory = nil - C.QItemEditorFactory_new2(param1.cPointer(), &outptr_QItemEditorFactory) - ret := newQItemEditorFactory(outptr_QItemEditorFactory) + ret := newQItemEditorFactory(C.QItemEditorFactory_new2(param1.cPointer())) ret.isSubclass = true return ret } func (this *QItemEditorFactory) CreateEditor(userType int, parent *QWidget) *QWidget { - return newQWidget(C.QItemEditorFactory_CreateEditor(this.h, (C.int)(userType), parent.cPointer()), nil, nil) + return newQWidget(C.QItemEditorFactory_CreateEditor(this.h, (C.int)(userType), parent.cPointer())) } func (this *QItemEditorFactory) ValuePropertyName(userType int) []byte { @@ -160,7 +150,7 @@ func QItemEditorFactory_SetDefaultFactory(factory *QItemEditorFactory) { func (this *QItemEditorFactory) callVirtualBase_CreateEditor(userType int, parent *QWidget) *QWidget { - return newQWidget(C.QItemEditorFactory_virtualbase_CreateEditor(unsafe.Pointer(this.h), (C.int)(userType), parent.cPointer()), nil, nil) + return newQWidget(C.QItemEditorFactory_virtualbase_CreateEditor(unsafe.Pointer(this.h), (C.int)(userType), parent.cPointer())) } func (this *QItemEditorFactory) OnCreateEditor(slot func(super func(userType int, parent *QWidget) *QWidget, userType int, parent *QWidget) *QWidget) { @@ -180,7 +170,7 @@ func miqt_exec_callback_QItemEditorFactory_CreateEditor(self *C.QItemEditorFacto // Convert all CABI parameters to Go parameters slotval1 := (int)(userType) - slotval2 := newQWidget(parent, nil, nil) + slotval2 := newQWidget(parent) virtualReturn := gofunc((&QItemEditorFactory{h: self}).callVirtualBase_CreateEditor, slotval1, slotval2) diff --git a/qt/gen_qitemeditorfactory.h b/qt/gen_qitemeditorfactory.h index 16f5d45d..7ee8f89f 100644 --- a/qt/gen_qitemeditorfactory.h +++ b/qt/gen_qitemeditorfactory.h @@ -29,8 +29,8 @@ struct miqt_string QItemEditorCreatorBase_ValuePropertyName(const QItemEditorCre void QItemEditorCreatorBase_OperatorAssign(QItemEditorCreatorBase* self, QItemEditorCreatorBase* param1); void QItemEditorCreatorBase_Delete(QItemEditorCreatorBase* self, bool isSubclass); -void QItemEditorFactory_new(QItemEditorFactory** outptr_QItemEditorFactory); -void QItemEditorFactory_new2(QItemEditorFactory* param1, QItemEditorFactory** outptr_QItemEditorFactory); +QItemEditorFactory* QItemEditorFactory_new(); +QItemEditorFactory* QItemEditorFactory_new2(QItemEditorFactory* param1); QWidget* QItemEditorFactory_CreateEditor(const QItemEditorFactory* self, int userType, QWidget* parent); struct miqt_string QItemEditorFactory_ValuePropertyName(const QItemEditorFactory* self, int userType); void QItemEditorFactory_RegisterEditor(QItemEditorFactory* self, int userType, QItemEditorCreatorBase* creator); diff --git a/qt/gen_qitemselectionmodel.cpp b/qt/gen_qitemselectionmodel.cpp index 135773b9..92a4a71f 100644 --- a/qt/gen_qitemselectionmodel.cpp +++ b/qt/gen_qitemselectionmodel.cpp @@ -18,24 +18,20 @@ #include "gen_qitemselectionmodel.h" #include "_cgo_export.h" -void QItemSelectionRange_new(QItemSelectionRange** outptr_QItemSelectionRange) { - QItemSelectionRange* ret = new QItemSelectionRange(); - *outptr_QItemSelectionRange = ret; +QItemSelectionRange* QItemSelectionRange_new() { + return new QItemSelectionRange(); } -void QItemSelectionRange_new2(QItemSelectionRange* other, QItemSelectionRange** outptr_QItemSelectionRange) { - QItemSelectionRange* ret = new QItemSelectionRange(*other); - *outptr_QItemSelectionRange = ret; +QItemSelectionRange* QItemSelectionRange_new2(QItemSelectionRange* other) { + return new QItemSelectionRange(*other); } -void QItemSelectionRange_new3(QModelIndex* topL, QModelIndex* bottomR, QItemSelectionRange** outptr_QItemSelectionRange) { - QItemSelectionRange* ret = new QItemSelectionRange(*topL, *bottomR); - *outptr_QItemSelectionRange = ret; +QItemSelectionRange* QItemSelectionRange_new3(QModelIndex* topL, QModelIndex* bottomR) { + return new QItemSelectionRange(*topL, *bottomR); } -void QItemSelectionRange_new4(QModelIndex* index, QItemSelectionRange** outptr_QItemSelectionRange) { - QItemSelectionRange* ret = new QItemSelectionRange(*index); - *outptr_QItemSelectionRange = ret; +QItemSelectionRange* QItemSelectionRange_new4(QModelIndex* index) { + return new QItemSelectionRange(*index); } void QItemSelectionRange_OperatorAssign(QItemSelectionRange* self, QItemSelectionRange* other) { @@ -482,22 +478,20 @@ public: }; -void QItemSelectionModel_new(QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject) { - MiqtVirtualQItemSelectionModel* ret = new MiqtVirtualQItemSelectionModel(); - *outptr_QItemSelectionModel = ret; - *outptr_QObject = static_cast(ret); +QItemSelectionModel* QItemSelectionModel_new() { + return new MiqtVirtualQItemSelectionModel(); } -void QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject) { - MiqtVirtualQItemSelectionModel* ret = new MiqtVirtualQItemSelectionModel(model, parent); - *outptr_QItemSelectionModel = ret; - *outptr_QObject = static_cast(ret); +QItemSelectionModel* QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent) { + return new MiqtVirtualQItemSelectionModel(model, parent); } -void QItemSelectionModel_new3(QAbstractItemModel* model, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject) { - MiqtVirtualQItemSelectionModel* ret = new MiqtVirtualQItemSelectionModel(model); - *outptr_QItemSelectionModel = ret; - *outptr_QObject = static_cast(ret); +QItemSelectionModel* QItemSelectionModel_new3(QAbstractItemModel* model) { + return new MiqtVirtualQItemSelectionModel(model); +} + +void QItemSelectionModel_virtbase(QItemSelectionModel* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QItemSelectionModel_MetaObject(const QItemSelectionModel* self) { @@ -914,14 +908,12 @@ void QItemSelectionModel_Delete(QItemSelectionModel* self, bool isSubclass) { } } -void QItemSelection_new(QItemSelection** outptr_QItemSelection) { - QItemSelection* ret = new QItemSelection(); - *outptr_QItemSelection = ret; +QItemSelection* QItemSelection_new() { + return new QItemSelection(); } -void QItemSelection_new2(QModelIndex* topLeft, QModelIndex* bottomRight, QItemSelection** outptr_QItemSelection) { - QItemSelection* ret = new QItemSelection(*topLeft, *bottomRight); - *outptr_QItemSelection = ret; +QItemSelection* QItemSelection_new2(QModelIndex* topLeft, QModelIndex* bottomRight) { + return new QItemSelection(*topLeft, *bottomRight); } void QItemSelection_Select(QItemSelection* self, QModelIndex* topLeft, QModelIndex* bottomRight) { diff --git a/qt/gen_qitemselectionmodel.go b/qt/gen_qitemselectionmodel.go index f07b2bde..8b157c32 100644 --- a/qt/gen_qitemselectionmodel.go +++ b/qt/gen_qitemselectionmodel.go @@ -54,54 +54,43 @@ func newQItemSelectionRange(h *C.QItemSelectionRange) *QItemSelectionRange { if h == nil { return nil } + return &QItemSelectionRange{h: h} } // UnsafeNewQItemSelectionRange constructs the type using only unsafe pointers. func UnsafeNewQItemSelectionRange(h unsafe.Pointer) *QItemSelectionRange { - if h == nil { - return nil - } - - return &QItemSelectionRange{h: (*C.QItemSelectionRange)(h)} + return newQItemSelectionRange((*C.QItemSelectionRange)(h)) } // NewQItemSelectionRange constructs a new QItemSelectionRange object. func NewQItemSelectionRange() *QItemSelectionRange { - var outptr_QItemSelectionRange *C.QItemSelectionRange = nil - C.QItemSelectionRange_new(&outptr_QItemSelectionRange) - ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret := newQItemSelectionRange(C.QItemSelectionRange_new()) ret.isSubclass = true return ret } // NewQItemSelectionRange2 constructs a new QItemSelectionRange object. func NewQItemSelectionRange2(other *QItemSelectionRange) *QItemSelectionRange { - var outptr_QItemSelectionRange *C.QItemSelectionRange = nil - C.QItemSelectionRange_new2(other.cPointer(), &outptr_QItemSelectionRange) - ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret := newQItemSelectionRange(C.QItemSelectionRange_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQItemSelectionRange3 constructs a new QItemSelectionRange object. func NewQItemSelectionRange3(topL *QModelIndex, bottomR *QModelIndex) *QItemSelectionRange { - var outptr_QItemSelectionRange *C.QItemSelectionRange = nil - C.QItemSelectionRange_new3(topL.cPointer(), bottomR.cPointer(), &outptr_QItemSelectionRange) - ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret := newQItemSelectionRange(C.QItemSelectionRange_new3(topL.cPointer(), bottomR.cPointer())) ret.isSubclass = true return ret } // NewQItemSelectionRange4 constructs a new QItemSelectionRange object. func NewQItemSelectionRange4(index *QModelIndex) *QItemSelectionRange { - var outptr_QItemSelectionRange *C.QItemSelectionRange = nil - C.QItemSelectionRange_new4(index.cPointer(), &outptr_QItemSelectionRange) - ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret := newQItemSelectionRange(C.QItemSelectionRange_new4(index.cPointer())) ret.isSubclass = true return ret } @@ -153,7 +142,7 @@ func (this *QItemSelectionRange) Parent() *QModelIndex { } func (this *QItemSelectionRange) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QItemSelectionRange_Model(this.h), nil) + return newQAbstractItemModel(C.QItemSelectionRange_Model(this.h)) } func (this *QItemSelectionRange) Contains(index *QModelIndex) bool { @@ -241,53 +230,42 @@ func (this *QItemSelectionModel) UnsafePointer() unsafe.Pointer { } // newQItemSelectionModel constructs the type using only CGO pointers. -func newQItemSelectionModel(h *C.QItemSelectionModel, h_QObject *C.QObject) *QItemSelectionModel { +func newQItemSelectionModel(h *C.QItemSelectionModel) *QItemSelectionModel { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QItemSelectionModel_virtbase(h, &outptr_QObject) + return &QItemSelectionModel{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQItemSelectionModel constructs the type using only unsafe pointers. -func UnsafeNewQItemSelectionModel(h unsafe.Pointer, h_QObject unsafe.Pointer) *QItemSelectionModel { - if h == nil { - return nil - } - - return &QItemSelectionModel{h: (*C.QItemSelectionModel)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQItemSelectionModel(h unsafe.Pointer) *QItemSelectionModel { + return newQItemSelectionModel((*C.QItemSelectionModel)(h)) } // NewQItemSelectionModel constructs a new QItemSelectionModel object. func NewQItemSelectionModel() *QItemSelectionModel { - var outptr_QItemSelectionModel *C.QItemSelectionModel = nil - var outptr_QObject *C.QObject = nil - C.QItemSelectionModel_new(&outptr_QItemSelectionModel, &outptr_QObject) - ret := newQItemSelectionModel(outptr_QItemSelectionModel, outptr_QObject) + ret := newQItemSelectionModel(C.QItemSelectionModel_new()) ret.isSubclass = true return ret } // NewQItemSelectionModel2 constructs a new QItemSelectionModel object. func NewQItemSelectionModel2(model *QAbstractItemModel, parent *QObject) *QItemSelectionModel { - var outptr_QItemSelectionModel *C.QItemSelectionModel = nil - var outptr_QObject *C.QObject = nil - C.QItemSelectionModel_new2(model.cPointer(), parent.cPointer(), &outptr_QItemSelectionModel, &outptr_QObject) - ret := newQItemSelectionModel(outptr_QItemSelectionModel, outptr_QObject) + ret := newQItemSelectionModel(C.QItemSelectionModel_new2(model.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQItemSelectionModel3 constructs a new QItemSelectionModel object. func NewQItemSelectionModel3(model *QAbstractItemModel) *QItemSelectionModel { - var outptr_QItemSelectionModel *C.QItemSelectionModel = nil - var outptr_QObject *C.QObject = nil - C.QItemSelectionModel_new3(model.cPointer(), &outptr_QItemSelectionModel, &outptr_QObject) - ret := newQItemSelectionModel(outptr_QItemSelectionModel, outptr_QObject) + ret := newQItemSelectionModel(C.QItemSelectionModel_new3(model.cPointer())) ret.isSubclass = true return ret } @@ -393,11 +371,11 @@ func (this *QItemSelectionModel) Selection() *QItemSelection { } func (this *QItemSelectionModel) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QItemSelectionModel_Model(this.h), nil) + return newQAbstractItemModel(C.QItemSelectionModel_Model(this.h)) } func (this *QItemSelectionModel) Model2() *QAbstractItemModel { - return newQAbstractItemModel(C.QItemSelectionModel_Model2(this.h), nil) + return newQAbstractItemModel(C.QItemSelectionModel_Model2(this.h)) } func (this *QItemSelectionModel) SetModel(model *QAbstractItemModel) { @@ -535,7 +513,7 @@ func miqt_exec_callback_QItemSelectionModel_ModelChanged(cb C.intptr_t, model *C } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc(slotval1) } @@ -855,7 +833,7 @@ func miqt_exec_callback_QItemSelectionModel_TimerEvent(self *C.QItemSelectionMod } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QItemSelectionModel{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -881,7 +859,7 @@ func miqt_exec_callback_QItemSelectionModel_ChildEvent(self *C.QItemSelectionMod } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QItemSelectionModel{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -1005,34 +983,27 @@ func newQItemSelection(h *C.QItemSelection) *QItemSelection { if h == nil { return nil } + return &QItemSelection{h: h} } // UnsafeNewQItemSelection constructs the type using only unsafe pointers. func UnsafeNewQItemSelection(h unsafe.Pointer) *QItemSelection { - if h == nil { - return nil - } - - return &QItemSelection{h: (*C.QItemSelection)(h)} + return newQItemSelection((*C.QItemSelection)(h)) } // NewQItemSelection constructs a new QItemSelection object. func NewQItemSelection() *QItemSelection { - var outptr_QItemSelection *C.QItemSelection = nil - C.QItemSelection_new(&outptr_QItemSelection) - ret := newQItemSelection(outptr_QItemSelection) + ret := newQItemSelection(C.QItemSelection_new()) ret.isSubclass = true return ret } // NewQItemSelection2 constructs a new QItemSelection object. func NewQItemSelection2(topLeft *QModelIndex, bottomRight *QModelIndex) *QItemSelection { - var outptr_QItemSelection *C.QItemSelection = nil - C.QItemSelection_new2(topLeft.cPointer(), bottomRight.cPointer(), &outptr_QItemSelection) - ret := newQItemSelection(outptr_QItemSelection) + ret := newQItemSelection(C.QItemSelection_new2(topLeft.cPointer(), bottomRight.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qitemselectionmodel.h b/qt/gen_qitemselectionmodel.h index ef9a67e8..fe083d91 100644 --- a/qt/gen_qitemselectionmodel.h +++ b/qt/gen_qitemselectionmodel.h @@ -42,10 +42,10 @@ typedef struct QPersistentModelIndex QPersistentModelIndex; typedef struct QTimerEvent QTimerEvent; #endif -void QItemSelectionRange_new(QItemSelectionRange** outptr_QItemSelectionRange); -void QItemSelectionRange_new2(QItemSelectionRange* other, QItemSelectionRange** outptr_QItemSelectionRange); -void QItemSelectionRange_new3(QModelIndex* topL, QModelIndex* bottomR, QItemSelectionRange** outptr_QItemSelectionRange); -void QItemSelectionRange_new4(QModelIndex* index, QItemSelectionRange** outptr_QItemSelectionRange); +QItemSelectionRange* QItemSelectionRange_new(); +QItemSelectionRange* QItemSelectionRange_new2(QItemSelectionRange* other); +QItemSelectionRange* QItemSelectionRange_new3(QModelIndex* topL, QModelIndex* bottomR); +QItemSelectionRange* QItemSelectionRange_new4(QModelIndex* index); void QItemSelectionRange_OperatorAssign(QItemSelectionRange* self, QItemSelectionRange* other); void QItemSelectionRange_Swap(QItemSelectionRange* self, QItemSelectionRange* other); int QItemSelectionRange_Top(const QItemSelectionRange* self); @@ -70,9 +70,10 @@ bool QItemSelectionRange_IsEmpty(const QItemSelectionRange* self); struct miqt_array /* of QModelIndex* */ QItemSelectionRange_Indexes(const QItemSelectionRange* self); void QItemSelectionRange_Delete(QItemSelectionRange* self, bool isSubclass); -void QItemSelectionModel_new(QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject); -void QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject); -void QItemSelectionModel_new3(QAbstractItemModel* model, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject); +QItemSelectionModel* QItemSelectionModel_new(); +QItemSelectionModel* QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent); +QItemSelectionModel* QItemSelectionModel_new3(QAbstractItemModel* model); +void QItemSelectionModel_virtbase(QItemSelectionModel* src, QObject** outptr_QObject); QMetaObject* QItemSelectionModel_MetaObject(const QItemSelectionModel* self); void* QItemSelectionModel_Metacast(QItemSelectionModel* self, const char* param1); struct miqt_string QItemSelectionModel_Tr(const char* s); @@ -146,8 +147,8 @@ void QItemSelectionModel_override_virtual_DisconnectNotify(void* self, intptr_t void QItemSelectionModel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QItemSelectionModel_Delete(QItemSelectionModel* self, bool isSubclass); -void QItemSelection_new(QItemSelection** outptr_QItemSelection); -void QItemSelection_new2(QModelIndex* topLeft, QModelIndex* bottomRight, QItemSelection** outptr_QItemSelection); +QItemSelection* QItemSelection_new(); +QItemSelection* QItemSelection_new2(QModelIndex* topLeft, QModelIndex* bottomRight); void QItemSelection_Select(QItemSelection* self, QModelIndex* topLeft, QModelIndex* bottomRight); bool QItemSelection_Contains(const QItemSelection* self, QModelIndex* index); struct miqt_array /* of QModelIndex* */ QItemSelection_Indexes(const QItemSelection* self); diff --git a/qt/gen_qjsonarray.cpp b/qt/gen_qjsonarray.cpp index 9892f8d8..97065b03 100644 --- a/qt/gen_qjsonarray.cpp +++ b/qt/gen_qjsonarray.cpp @@ -13,14 +13,12 @@ #include "gen_qjsonarray.h" #include "_cgo_export.h" -void QJsonArray_new(QJsonArray** outptr_QJsonArray) { - QJsonArray* ret = new QJsonArray(); - *outptr_QJsonArray = ret; +QJsonArray* QJsonArray_new() { + return new QJsonArray(); } -void QJsonArray_new2(QJsonArray* other, QJsonArray** outptr_QJsonArray) { - QJsonArray* ret = new QJsonArray(*other); - *outptr_QJsonArray = ret; +QJsonArray* QJsonArray_new2(QJsonArray* other) { + return new QJsonArray(*other); } void QJsonArray_OperatorAssign(QJsonArray* self, QJsonArray* other) { @@ -202,19 +200,16 @@ void QJsonArray_Delete(QJsonArray* self, bool isSubclass) { } } -void QJsonArray__iterator_new(QJsonArray__iterator** outptr_QJsonArray__iterator) { - QJsonArray::iterator* ret = new QJsonArray::iterator(); - *outptr_QJsonArray__iterator = ret; +QJsonArray__iterator* QJsonArray__iterator_new() { + return new QJsonArray::iterator(); } -void QJsonArray__iterator_new2(QJsonArray* array, int index, QJsonArray__iterator** outptr_QJsonArray__iterator) { - QJsonArray::iterator* ret = new QJsonArray::iterator(array, static_cast(index)); - *outptr_QJsonArray__iterator = ret; +QJsonArray__iterator* QJsonArray__iterator_new2(QJsonArray* array, int index) { + return new QJsonArray::iterator(array, static_cast(index)); } -void QJsonArray__iterator_new3(QJsonArray__iterator* param1, QJsonArray__iterator** outptr_QJsonArray__iterator) { - QJsonArray::iterator* ret = new QJsonArray::iterator(*param1); - *outptr_QJsonArray__iterator = ret; +QJsonArray__iterator* QJsonArray__iterator_new3(QJsonArray__iterator* param1) { + return new QJsonArray::iterator(*param1); } QJsonValueRef* QJsonArray__iterator_OperatorMultiply(const QJsonArray__iterator* self) { @@ -329,24 +324,20 @@ void QJsonArray__iterator_Delete(QJsonArray__iterator* self, bool isSubclass) { } } -void QJsonArray__const_iterator_new(QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { - QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(); - *outptr_QJsonArray__const_iterator = ret; +QJsonArray__const_iterator* QJsonArray__const_iterator_new() { + return new QJsonArray::const_iterator(); } -void QJsonArray__const_iterator_new2(QJsonArray* array, int index, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { - QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(array, static_cast(index)); - *outptr_QJsonArray__const_iterator = ret; +QJsonArray__const_iterator* QJsonArray__const_iterator_new2(QJsonArray* array, int index) { + return new QJsonArray::const_iterator(array, static_cast(index)); } -void QJsonArray__const_iterator_new3(QJsonArray__const_iterator* o, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { - QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(*o); - *outptr_QJsonArray__const_iterator = ret; +QJsonArray__const_iterator* QJsonArray__const_iterator_new3(QJsonArray__const_iterator* o) { + return new QJsonArray::const_iterator(*o); } -void QJsonArray__const_iterator_new4(QJsonArray__iterator* o, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { - QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(*o); - *outptr_QJsonArray__const_iterator = ret; +QJsonArray__const_iterator* QJsonArray__const_iterator_new4(QJsonArray__iterator* o) { + return new QJsonArray::const_iterator(*o); } QJsonValue* QJsonArray__const_iterator_OperatorMultiply(const QJsonArray__const_iterator* self) { diff --git a/qt/gen_qjsonarray.go b/qt/gen_qjsonarray.go index ba706010..2fb6b2da 100644 --- a/qt/gen_qjsonarray.go +++ b/qt/gen_qjsonarray.go @@ -37,34 +37,27 @@ func newQJsonArray(h *C.QJsonArray) *QJsonArray { if h == nil { return nil } + return &QJsonArray{h: h} } // UnsafeNewQJsonArray constructs the type using only unsafe pointers. func UnsafeNewQJsonArray(h unsafe.Pointer) *QJsonArray { - if h == nil { - return nil - } - - return &QJsonArray{h: (*C.QJsonArray)(h)} + return newQJsonArray((*C.QJsonArray)(h)) } // NewQJsonArray constructs a new QJsonArray object. func NewQJsonArray() *QJsonArray { - var outptr_QJsonArray *C.QJsonArray = nil - C.QJsonArray_new(&outptr_QJsonArray) - ret := newQJsonArray(outptr_QJsonArray) + ret := newQJsonArray(C.QJsonArray_new()) ret.isSubclass = true return ret } // NewQJsonArray2 constructs a new QJsonArray object. func NewQJsonArray2(other *QJsonArray) *QJsonArray { - var outptr_QJsonArray *C.QJsonArray = nil - C.QJsonArray_new2(other.cPointer(), &outptr_QJsonArray) - ret := newQJsonArray(outptr_QJsonArray) + ret := newQJsonArray(C.QJsonArray_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -313,44 +306,35 @@ func newQJsonArray__iterator(h *C.QJsonArray__iterator) *QJsonArray__iterator { if h == nil { return nil } + return &QJsonArray__iterator{h: h} } // UnsafeNewQJsonArray__iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonArray__iterator(h unsafe.Pointer) *QJsonArray__iterator { - if h == nil { - return nil - } - - return &QJsonArray__iterator{h: (*C.QJsonArray__iterator)(h)} + return newQJsonArray__iterator((*C.QJsonArray__iterator)(h)) } // NewQJsonArray__iterator constructs a new QJsonArray::iterator object. func NewQJsonArray__iterator() *QJsonArray__iterator { - var outptr_QJsonArray__iterator *C.QJsonArray__iterator = nil - C.QJsonArray__iterator_new(&outptr_QJsonArray__iterator) - ret := newQJsonArray__iterator(outptr_QJsonArray__iterator) + ret := newQJsonArray__iterator(C.QJsonArray__iterator_new()) ret.isSubclass = true return ret } // NewQJsonArray__iterator2 constructs a new QJsonArray::iterator object. func NewQJsonArray__iterator2(array *QJsonArray, index int) *QJsonArray__iterator { - var outptr_QJsonArray__iterator *C.QJsonArray__iterator = nil - C.QJsonArray__iterator_new2(array.cPointer(), (C.int)(index), &outptr_QJsonArray__iterator) - ret := newQJsonArray__iterator(outptr_QJsonArray__iterator) + ret := newQJsonArray__iterator(C.QJsonArray__iterator_new2(array.cPointer(), (C.int)(index))) ret.isSubclass = true return ret } // NewQJsonArray__iterator3 constructs a new QJsonArray::iterator object. func NewQJsonArray__iterator3(param1 *QJsonArray__iterator) *QJsonArray__iterator { - var outptr_QJsonArray__iterator *C.QJsonArray__iterator = nil - C.QJsonArray__iterator_new3(param1.cPointer(), &outptr_QJsonArray__iterator) - ret := newQJsonArray__iterator(outptr_QJsonArray__iterator) + ret := newQJsonArray__iterator(C.QJsonArray__iterator_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -503,54 +487,43 @@ func newQJsonArray__const_iterator(h *C.QJsonArray__const_iterator) *QJsonArray_ if h == nil { return nil } + return &QJsonArray__const_iterator{h: h} } // UnsafeNewQJsonArray__const_iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonArray__const_iterator(h unsafe.Pointer) *QJsonArray__const_iterator { - if h == nil { - return nil - } - - return &QJsonArray__const_iterator{h: (*C.QJsonArray__const_iterator)(h)} + return newQJsonArray__const_iterator((*C.QJsonArray__const_iterator)(h)) } // NewQJsonArray__const_iterator constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator() *QJsonArray__const_iterator { - var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil - C.QJsonArray__const_iterator_new(&outptr_QJsonArray__const_iterator) - ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(C.QJsonArray__const_iterator_new()) ret.isSubclass = true return ret } // NewQJsonArray__const_iterator2 constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator2(array *QJsonArray, index int) *QJsonArray__const_iterator { - var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil - C.QJsonArray__const_iterator_new2(array.cPointer(), (C.int)(index), &outptr_QJsonArray__const_iterator) - ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(C.QJsonArray__const_iterator_new2(array.cPointer(), (C.int)(index))) ret.isSubclass = true return ret } // NewQJsonArray__const_iterator3 constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator3(o *QJsonArray__const_iterator) *QJsonArray__const_iterator { - var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil - C.QJsonArray__const_iterator_new3(o.cPointer(), &outptr_QJsonArray__const_iterator) - ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(C.QJsonArray__const_iterator_new3(o.cPointer())) ret.isSubclass = true return ret } // NewQJsonArray__const_iterator4 constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator4(o *QJsonArray__iterator) *QJsonArray__const_iterator { - var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil - C.QJsonArray__const_iterator_new4(o.cPointer(), &outptr_QJsonArray__const_iterator) - ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(C.QJsonArray__const_iterator_new4(o.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qjsonarray.h b/qt/gen_qjsonarray.h index 8522a534..ad460964 100644 --- a/qt/gen_qjsonarray.h +++ b/qt/gen_qjsonarray.h @@ -40,8 +40,8 @@ typedef struct QJsonValueRef QJsonValueRef; typedef struct QJsonValueRefPtr QJsonValueRefPtr; #endif -void QJsonArray_new(QJsonArray** outptr_QJsonArray); -void QJsonArray_new2(QJsonArray* other, QJsonArray** outptr_QJsonArray); +QJsonArray* QJsonArray_new(); +QJsonArray* QJsonArray_new2(QJsonArray* other); void QJsonArray_OperatorAssign(QJsonArray* self, QJsonArray* other); QJsonArray* QJsonArray_FromStringList(struct miqt_array /* of struct miqt_string */ list); int QJsonArray_Size(const QJsonArray* self); @@ -84,9 +84,9 @@ void QJsonArray_PopBack(QJsonArray* self); bool QJsonArray_Empty(const QJsonArray* self); void QJsonArray_Delete(QJsonArray* self, bool isSubclass); -void QJsonArray__iterator_new(QJsonArray__iterator** outptr_QJsonArray__iterator); -void QJsonArray__iterator_new2(QJsonArray* array, int index, QJsonArray__iterator** outptr_QJsonArray__iterator); -void QJsonArray__iterator_new3(QJsonArray__iterator* param1, QJsonArray__iterator** outptr_QJsonArray__iterator); +QJsonArray__iterator* QJsonArray__iterator_new(); +QJsonArray__iterator* QJsonArray__iterator_new2(QJsonArray* array, int index); +QJsonArray__iterator* QJsonArray__iterator_new3(QJsonArray__iterator* param1); QJsonValueRef* QJsonArray__iterator_OperatorMultiply(const QJsonArray__iterator* self); QJsonValueRefPtr* QJsonArray__iterator_OperatorMinusGreater(const QJsonArray__iterator* self); QJsonValueRef* QJsonArray__iterator_OperatorSubscript(const QJsonArray__iterator* self, int j); @@ -113,10 +113,10 @@ QJsonArray__iterator* QJsonArray__iterator_OperatorMinus(const QJsonArray__itera int QJsonArray__iterator_OperatorMinusWithQJsonArrayiterator(const QJsonArray__iterator* self, QJsonArray__iterator* j); void QJsonArray__iterator_Delete(QJsonArray__iterator* self, bool isSubclass); -void QJsonArray__const_iterator_new(QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); -void QJsonArray__const_iterator_new2(QJsonArray* array, int index, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); -void QJsonArray__const_iterator_new3(QJsonArray__const_iterator* o, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); -void QJsonArray__const_iterator_new4(QJsonArray__iterator* o, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); +QJsonArray__const_iterator* QJsonArray__const_iterator_new(); +QJsonArray__const_iterator* QJsonArray__const_iterator_new2(QJsonArray* array, int index); +QJsonArray__const_iterator* QJsonArray__const_iterator_new3(QJsonArray__const_iterator* o); +QJsonArray__const_iterator* QJsonArray__const_iterator_new4(QJsonArray__iterator* o); QJsonValue* QJsonArray__const_iterator_OperatorMultiply(const QJsonArray__const_iterator* self); QJsonValuePtr* QJsonArray__const_iterator_OperatorMinusGreater(const QJsonArray__const_iterator* self); QJsonValue* QJsonArray__const_iterator_OperatorSubscript(const QJsonArray__const_iterator* self, int j); diff --git a/qt/gen_qjsondocument.cpp b/qt/gen_qjsondocument.cpp index a2a10f28..52a99e62 100644 --- a/qt/gen_qjsondocument.cpp +++ b/qt/gen_qjsondocument.cpp @@ -31,24 +31,20 @@ void QJsonParseError_Delete(QJsonParseError* self, bool isSubclass) { } } -void QJsonDocument_new(QJsonDocument** outptr_QJsonDocument) { - QJsonDocument* ret = new QJsonDocument(); - *outptr_QJsonDocument = ret; +QJsonDocument* QJsonDocument_new() { + return new QJsonDocument(); } -void QJsonDocument_new2(QJsonObject* object, QJsonDocument** outptr_QJsonDocument) { - QJsonDocument* ret = new QJsonDocument(*object); - *outptr_QJsonDocument = ret; +QJsonDocument* QJsonDocument_new2(QJsonObject* object) { + return new QJsonDocument(*object); } -void QJsonDocument_new3(QJsonArray* array, QJsonDocument** outptr_QJsonDocument) { - QJsonDocument* ret = new QJsonDocument(*array); - *outptr_QJsonDocument = ret; +QJsonDocument* QJsonDocument_new3(QJsonArray* array) { + return new QJsonDocument(*array); } -void QJsonDocument_new4(QJsonDocument* other, QJsonDocument** outptr_QJsonDocument) { - QJsonDocument* ret = new QJsonDocument(*other); - *outptr_QJsonDocument = ret; +QJsonDocument* QJsonDocument_new4(QJsonDocument* other) { + return new QJsonDocument(*other); } void QJsonDocument_OperatorAssign(QJsonDocument* self, QJsonDocument* other) { diff --git a/qt/gen_qjsondocument.go b/qt/gen_qjsondocument.go index be4e594c..7886cd78 100644 --- a/qt/gen_qjsondocument.go +++ b/qt/gen_qjsondocument.go @@ -71,16 +71,13 @@ func newQJsonParseError(h *C.QJsonParseError) *QJsonParseError { if h == nil { return nil } + return &QJsonParseError{h: h} } // UnsafeNewQJsonParseError constructs the type using only unsafe pointers. func UnsafeNewQJsonParseError(h unsafe.Pointer) *QJsonParseError { - if h == nil { - return nil - } - - return &QJsonParseError{h: (*C.QJsonParseError)(h)} + return newQJsonParseError((*C.QJsonParseError)(h)) } func (this *QJsonParseError) ErrorString() string { @@ -128,54 +125,43 @@ func newQJsonDocument(h *C.QJsonDocument) *QJsonDocument { if h == nil { return nil } + return &QJsonDocument{h: h} } // UnsafeNewQJsonDocument constructs the type using only unsafe pointers. func UnsafeNewQJsonDocument(h unsafe.Pointer) *QJsonDocument { - if h == nil { - return nil - } - - return &QJsonDocument{h: (*C.QJsonDocument)(h)} + return newQJsonDocument((*C.QJsonDocument)(h)) } // NewQJsonDocument constructs a new QJsonDocument object. func NewQJsonDocument() *QJsonDocument { - var outptr_QJsonDocument *C.QJsonDocument = nil - C.QJsonDocument_new(&outptr_QJsonDocument) - ret := newQJsonDocument(outptr_QJsonDocument) + ret := newQJsonDocument(C.QJsonDocument_new()) ret.isSubclass = true return ret } // NewQJsonDocument2 constructs a new QJsonDocument object. func NewQJsonDocument2(object *QJsonObject) *QJsonDocument { - var outptr_QJsonDocument *C.QJsonDocument = nil - C.QJsonDocument_new2(object.cPointer(), &outptr_QJsonDocument) - ret := newQJsonDocument(outptr_QJsonDocument) + ret := newQJsonDocument(C.QJsonDocument_new2(object.cPointer())) ret.isSubclass = true return ret } // NewQJsonDocument3 constructs a new QJsonDocument object. func NewQJsonDocument3(array *QJsonArray) *QJsonDocument { - var outptr_QJsonDocument *C.QJsonDocument = nil - C.QJsonDocument_new3(array.cPointer(), &outptr_QJsonDocument) - ret := newQJsonDocument(outptr_QJsonDocument) + ret := newQJsonDocument(C.QJsonDocument_new3(array.cPointer())) ret.isSubclass = true return ret } // NewQJsonDocument4 constructs a new QJsonDocument object. func NewQJsonDocument4(other *QJsonDocument) *QJsonDocument { - var outptr_QJsonDocument *C.QJsonDocument = nil - C.QJsonDocument_new4(other.cPointer(), &outptr_QJsonDocument) - ret := newQJsonDocument(outptr_QJsonDocument) + ret := newQJsonDocument(C.QJsonDocument_new4(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qjsondocument.h b/qt/gen_qjsondocument.h index 2410d41a..41ba09bb 100644 --- a/qt/gen_qjsondocument.h +++ b/qt/gen_qjsondocument.h @@ -33,10 +33,10 @@ typedef struct QVariant QVariant; struct miqt_string QJsonParseError_ErrorString(const QJsonParseError* self); void QJsonParseError_Delete(QJsonParseError* self, bool isSubclass); -void QJsonDocument_new(QJsonDocument** outptr_QJsonDocument); -void QJsonDocument_new2(QJsonObject* object, QJsonDocument** outptr_QJsonDocument); -void QJsonDocument_new3(QJsonArray* array, QJsonDocument** outptr_QJsonDocument); -void QJsonDocument_new4(QJsonDocument* other, QJsonDocument** outptr_QJsonDocument); +QJsonDocument* QJsonDocument_new(); +QJsonDocument* QJsonDocument_new2(QJsonObject* object); +QJsonDocument* QJsonDocument_new3(QJsonArray* array); +QJsonDocument* QJsonDocument_new4(QJsonDocument* other); void QJsonDocument_OperatorAssign(QJsonDocument* self, QJsonDocument* other); void QJsonDocument_Swap(QJsonDocument* self, QJsonDocument* other); QJsonDocument* QJsonDocument_FromRawData(const char* data, int size); diff --git a/qt/gen_qjsonobject.cpp b/qt/gen_qjsonobject.cpp index a5409f62..23dc1199 100644 --- a/qt/gen_qjsonobject.cpp +++ b/qt/gen_qjsonobject.cpp @@ -15,14 +15,12 @@ #include "gen_qjsonobject.h" #include "_cgo_export.h" -void QJsonObject_new(QJsonObject** outptr_QJsonObject) { - QJsonObject* ret = new QJsonObject(); - *outptr_QJsonObject = ret; +QJsonObject* QJsonObject_new() { + return new QJsonObject(); } -void QJsonObject_new2(QJsonObject* other, QJsonObject** outptr_QJsonObject) { - QJsonObject* ret = new QJsonObject(*other); - *outptr_QJsonObject = ret; +QJsonObject* QJsonObject_new2(QJsonObject* other) { + return new QJsonObject(*other); } void QJsonObject_OperatorAssign(QJsonObject* self, QJsonObject* other) { @@ -240,19 +238,16 @@ void QJsonObject_Delete(QJsonObject* self, bool isSubclass) { } } -void QJsonObject__iterator_new(QJsonObject__iterator** outptr_QJsonObject__iterator) { - QJsonObject::iterator* ret = new QJsonObject::iterator(); - *outptr_QJsonObject__iterator = ret; +QJsonObject__iterator* QJsonObject__iterator_new() { + return new QJsonObject::iterator(); } -void QJsonObject__iterator_new2(QJsonObject* obj, int index, QJsonObject__iterator** outptr_QJsonObject__iterator) { - QJsonObject::iterator* ret = new QJsonObject::iterator(obj, static_cast(index)); - *outptr_QJsonObject__iterator = ret; +QJsonObject__iterator* QJsonObject__iterator_new2(QJsonObject* obj, int index) { + return new QJsonObject::iterator(obj, static_cast(index)); } -void QJsonObject__iterator_new3(QJsonObject__iterator* param1, QJsonObject__iterator** outptr_QJsonObject__iterator) { - QJsonObject::iterator* ret = new QJsonObject::iterator(*param1); - *outptr_QJsonObject__iterator = ret; +QJsonObject__iterator* QJsonObject__iterator_new3(QJsonObject__iterator* param1) { + return new QJsonObject::iterator(*param1); } struct miqt_string QJsonObject__iterator_Key(const QJsonObject__iterator* self) { @@ -382,24 +377,20 @@ void QJsonObject__iterator_Delete(QJsonObject__iterator* self, bool isSubclass) } } -void QJsonObject__const_iterator_new(QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { - QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(); - *outptr_QJsonObject__const_iterator = ret; +QJsonObject__const_iterator* QJsonObject__const_iterator_new() { + return new QJsonObject::const_iterator(); } -void QJsonObject__const_iterator_new2(QJsonObject* obj, int index, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { - QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(obj, static_cast(index)); - *outptr_QJsonObject__const_iterator = ret; +QJsonObject__const_iterator* QJsonObject__const_iterator_new2(QJsonObject* obj, int index) { + return new QJsonObject::const_iterator(obj, static_cast(index)); } -void QJsonObject__const_iterator_new3(QJsonObject__iterator* other, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { - QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(*other); - *outptr_QJsonObject__const_iterator = ret; +QJsonObject__const_iterator* QJsonObject__const_iterator_new3(QJsonObject__iterator* other) { + return new QJsonObject::const_iterator(*other); } -void QJsonObject__const_iterator_new4(QJsonObject__const_iterator* param1, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { - QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(*param1); - *outptr_QJsonObject__const_iterator = ret; +QJsonObject__const_iterator* QJsonObject__const_iterator_new4(QJsonObject__const_iterator* param1) { + return new QJsonObject::const_iterator(*param1); } struct miqt_string QJsonObject__const_iterator_Key(const QJsonObject__const_iterator* self) { diff --git a/qt/gen_qjsonobject.go b/qt/gen_qjsonobject.go index 37e8e6f5..a5b75428 100644 --- a/qt/gen_qjsonobject.go +++ b/qt/gen_qjsonobject.go @@ -37,34 +37,27 @@ func newQJsonObject(h *C.QJsonObject) *QJsonObject { if h == nil { return nil } + return &QJsonObject{h: h} } // UnsafeNewQJsonObject constructs the type using only unsafe pointers. func UnsafeNewQJsonObject(h unsafe.Pointer) *QJsonObject { - if h == nil { - return nil - } - - return &QJsonObject{h: (*C.QJsonObject)(h)} + return newQJsonObject((*C.QJsonObject)(h)) } // NewQJsonObject constructs a new QJsonObject object. func NewQJsonObject() *QJsonObject { - var outptr_QJsonObject *C.QJsonObject = nil - C.QJsonObject_new(&outptr_QJsonObject) - ret := newQJsonObject(outptr_QJsonObject) + ret := newQJsonObject(C.QJsonObject_new()) ret.isSubclass = true return ret } // NewQJsonObject2 constructs a new QJsonObject object. func NewQJsonObject2(other *QJsonObject) *QJsonObject { - var outptr_QJsonObject *C.QJsonObject = nil - C.QJsonObject_new2(other.cPointer(), &outptr_QJsonObject) - ret := newQJsonObject(outptr_QJsonObject) + ret := newQJsonObject(C.QJsonObject_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -382,44 +375,35 @@ func newQJsonObject__iterator(h *C.QJsonObject__iterator) *QJsonObject__iterator if h == nil { return nil } + return &QJsonObject__iterator{h: h} } // UnsafeNewQJsonObject__iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonObject__iterator(h unsafe.Pointer) *QJsonObject__iterator { - if h == nil { - return nil - } - - return &QJsonObject__iterator{h: (*C.QJsonObject__iterator)(h)} + return newQJsonObject__iterator((*C.QJsonObject__iterator)(h)) } // NewQJsonObject__iterator constructs a new QJsonObject::iterator object. func NewQJsonObject__iterator() *QJsonObject__iterator { - var outptr_QJsonObject__iterator *C.QJsonObject__iterator = nil - C.QJsonObject__iterator_new(&outptr_QJsonObject__iterator) - ret := newQJsonObject__iterator(outptr_QJsonObject__iterator) + ret := newQJsonObject__iterator(C.QJsonObject__iterator_new()) ret.isSubclass = true return ret } // NewQJsonObject__iterator2 constructs a new QJsonObject::iterator object. func NewQJsonObject__iterator2(obj *QJsonObject, index int) *QJsonObject__iterator { - var outptr_QJsonObject__iterator *C.QJsonObject__iterator = nil - C.QJsonObject__iterator_new2(obj.cPointer(), (C.int)(index), &outptr_QJsonObject__iterator) - ret := newQJsonObject__iterator(outptr_QJsonObject__iterator) + ret := newQJsonObject__iterator(C.QJsonObject__iterator_new2(obj.cPointer(), (C.int)(index))) ret.isSubclass = true return ret } // NewQJsonObject__iterator3 constructs a new QJsonObject::iterator object. func NewQJsonObject__iterator3(param1 *QJsonObject__iterator) *QJsonObject__iterator { - var outptr_QJsonObject__iterator *C.QJsonObject__iterator = nil - C.QJsonObject__iterator_new3(param1.cPointer(), &outptr_QJsonObject__iterator) - ret := newQJsonObject__iterator(outptr_QJsonObject__iterator) + ret := newQJsonObject__iterator(C.QJsonObject__iterator_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -585,54 +569,43 @@ func newQJsonObject__const_iterator(h *C.QJsonObject__const_iterator) *QJsonObje if h == nil { return nil } + return &QJsonObject__const_iterator{h: h} } // UnsafeNewQJsonObject__const_iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonObject__const_iterator(h unsafe.Pointer) *QJsonObject__const_iterator { - if h == nil { - return nil - } - - return &QJsonObject__const_iterator{h: (*C.QJsonObject__const_iterator)(h)} + return newQJsonObject__const_iterator((*C.QJsonObject__const_iterator)(h)) } // NewQJsonObject__const_iterator constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator() *QJsonObject__const_iterator { - var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil - C.QJsonObject__const_iterator_new(&outptr_QJsonObject__const_iterator) - ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(C.QJsonObject__const_iterator_new()) ret.isSubclass = true return ret } // NewQJsonObject__const_iterator2 constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator2(obj *QJsonObject, index int) *QJsonObject__const_iterator { - var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil - C.QJsonObject__const_iterator_new2(obj.cPointer(), (C.int)(index), &outptr_QJsonObject__const_iterator) - ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(C.QJsonObject__const_iterator_new2(obj.cPointer(), (C.int)(index))) ret.isSubclass = true return ret } // NewQJsonObject__const_iterator3 constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator3(other *QJsonObject__iterator) *QJsonObject__const_iterator { - var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil - C.QJsonObject__const_iterator_new3(other.cPointer(), &outptr_QJsonObject__const_iterator) - ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(C.QJsonObject__const_iterator_new3(other.cPointer())) ret.isSubclass = true return ret } // NewQJsonObject__const_iterator4 constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator4(param1 *QJsonObject__const_iterator) *QJsonObject__const_iterator { - var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil - C.QJsonObject__const_iterator_new4(param1.cPointer(), &outptr_QJsonObject__const_iterator) - ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(C.QJsonObject__const_iterator_new4(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qjsonobject.h b/qt/gen_qjsonobject.h index 7ad75776..d505dd7e 100644 --- a/qt/gen_qjsonobject.h +++ b/qt/gen_qjsonobject.h @@ -42,8 +42,8 @@ typedef struct QJsonValueRefPtr QJsonValueRefPtr; typedef struct QVariant QVariant; #endif -void QJsonObject_new(QJsonObject** outptr_QJsonObject); -void QJsonObject_new2(QJsonObject* other, QJsonObject** outptr_QJsonObject); +QJsonObject* QJsonObject_new(); +QJsonObject* QJsonObject_new2(QJsonObject* other); void QJsonObject_OperatorAssign(QJsonObject* self, QJsonObject* other); void QJsonObject_Swap(QJsonObject* self, QJsonObject* other); QJsonObject* QJsonObject_FromVariantMap(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal); @@ -77,9 +77,9 @@ QJsonObject__iterator* QJsonObject_Insert(QJsonObject* self, struct miqt_string bool QJsonObject_Empty(const QJsonObject* self); void QJsonObject_Delete(QJsonObject* self, bool isSubclass); -void QJsonObject__iterator_new(QJsonObject__iterator** outptr_QJsonObject__iterator); -void QJsonObject__iterator_new2(QJsonObject* obj, int index, QJsonObject__iterator** outptr_QJsonObject__iterator); -void QJsonObject__iterator_new3(QJsonObject__iterator* param1, QJsonObject__iterator** outptr_QJsonObject__iterator); +QJsonObject__iterator* QJsonObject__iterator_new(); +QJsonObject__iterator* QJsonObject__iterator_new2(QJsonObject* obj, int index); +QJsonObject__iterator* QJsonObject__iterator_new3(QJsonObject__iterator* param1); struct miqt_string QJsonObject__iterator_Key(const QJsonObject__iterator* self); QJsonValueRef* QJsonObject__iterator_Value(const QJsonObject__iterator* self); QJsonValueRef* QJsonObject__iterator_OperatorMultiply(const QJsonObject__iterator* self); @@ -108,10 +108,10 @@ bool QJsonObject__iterator_OperatorGreaterWithOther(const QJsonObject__iterator* bool QJsonObject__iterator_OperatorGreaterOrEqualWithOther(const QJsonObject__iterator* self, QJsonObject__const_iterator* other); void QJsonObject__iterator_Delete(QJsonObject__iterator* self, bool isSubclass); -void QJsonObject__const_iterator_new(QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); -void QJsonObject__const_iterator_new2(QJsonObject* obj, int index, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); -void QJsonObject__const_iterator_new3(QJsonObject__iterator* other, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); -void QJsonObject__const_iterator_new4(QJsonObject__const_iterator* param1, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); +QJsonObject__const_iterator* QJsonObject__const_iterator_new(); +QJsonObject__const_iterator* QJsonObject__const_iterator_new2(QJsonObject* obj, int index); +QJsonObject__const_iterator* QJsonObject__const_iterator_new3(QJsonObject__iterator* other); +QJsonObject__const_iterator* QJsonObject__const_iterator_new4(QJsonObject__const_iterator* param1); struct miqt_string QJsonObject__const_iterator_Key(const QJsonObject__const_iterator* self); QJsonValue* QJsonObject__const_iterator_Value(const QJsonObject__const_iterator* self); QJsonValue* QJsonObject__const_iterator_OperatorMultiply(const QJsonObject__const_iterator* self); diff --git a/qt/gen_qjsonvalue.cpp b/qt/gen_qjsonvalue.cpp index 3038f98d..61c2f119 100644 --- a/qt/gen_qjsonvalue.cpp +++ b/qt/gen_qjsonvalue.cpp @@ -12,60 +12,49 @@ #include "gen_qjsonvalue.h" #include "_cgo_export.h" -void QJsonValue_new(QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new() { + return new QJsonValue(); } -void QJsonValue_new2(bool b, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(b); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new2(bool b) { + return new QJsonValue(b); } -void QJsonValue_new3(double n, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(static_cast(n)); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new3(double n) { + return new QJsonValue(static_cast(n)); } -void QJsonValue_new4(int n, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(static_cast(n)); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new4(int n) { + return new QJsonValue(static_cast(n)); } -void QJsonValue_new5(long long v, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(static_cast(v)); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new5(long long v) { + return new QJsonValue(static_cast(v)); } -void QJsonValue_new6(struct miqt_string s, QJsonValue** outptr_QJsonValue) { +QJsonValue* QJsonValue_new6(struct miqt_string s) { QString s_QString = QString::fromUtf8(s.data, s.len); - QJsonValue* ret = new QJsonValue(s_QString); - *outptr_QJsonValue = ret; + return new QJsonValue(s_QString); } -void QJsonValue_new7(const char* s, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(s); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new7(const char* s) { + return new QJsonValue(s); } -void QJsonValue_new8(QJsonArray* a, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(*a); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new8(QJsonArray* a) { + return new QJsonValue(*a); } -void QJsonValue_new9(QJsonObject* o, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(*o); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new9(QJsonObject* o) { + return new QJsonValue(*o); } -void QJsonValue_new10(QJsonValue* other, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(*other); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new10(QJsonValue* other) { + return new QJsonValue(*other); } -void QJsonValue_new11(int param1, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(static_cast(param1)); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new11(int param1) { + return new QJsonValue(static_cast(param1)); } void QJsonValue_OperatorAssign(QJsonValue* self, QJsonValue* other) { @@ -205,19 +194,16 @@ void QJsonValue_Delete(QJsonValue* self, bool isSubclass) { } } -void QJsonValueRef_new(QJsonValueRef* param1, QJsonValueRef** outptr_QJsonValueRef) { - QJsonValueRef* ret = new QJsonValueRef(*param1); - *outptr_QJsonValueRef = ret; +QJsonValueRef* QJsonValueRef_new(QJsonValueRef* param1) { + return new QJsonValueRef(*param1); } -void QJsonValueRef_new2(QJsonArray* array, int idx, QJsonValueRef** outptr_QJsonValueRef) { - QJsonValueRef* ret = new QJsonValueRef(array, static_cast(idx)); - *outptr_QJsonValueRef = ret; +QJsonValueRef* QJsonValueRef_new2(QJsonArray* array, int idx) { + return new QJsonValueRef(array, static_cast(idx)); } -void QJsonValueRef_new3(QJsonObject* object, int idx, QJsonValueRef** outptr_QJsonValueRef) { - QJsonValueRef* ret = new QJsonValueRef(object, static_cast(idx)); - *outptr_QJsonValueRef = ret; +QJsonValueRef* QJsonValueRef_new3(QJsonObject* object, int idx) { + return new QJsonValueRef(object, static_cast(idx)); } void QJsonValueRef_OperatorAssign(QJsonValueRef* self, QJsonValue* val) { @@ -336,14 +322,12 @@ void QJsonValueRef_Delete(QJsonValueRef* self, bool isSubclass) { } } -void QJsonValuePtr_new(QJsonValue* val, QJsonValuePtr** outptr_QJsonValuePtr) { - QJsonValuePtr* ret = new QJsonValuePtr(*val); - *outptr_QJsonValuePtr = ret; +QJsonValuePtr* QJsonValuePtr_new(QJsonValue* val) { + return new QJsonValuePtr(*val); } -void QJsonValuePtr_new2(QJsonValuePtr* param1, QJsonValuePtr** outptr_QJsonValuePtr) { - QJsonValuePtr* ret = new QJsonValuePtr(*param1); - *outptr_QJsonValuePtr = ret; +QJsonValuePtr* QJsonValuePtr_new2(QJsonValuePtr* param1) { + return new QJsonValuePtr(*param1); } QJsonValue* QJsonValuePtr_OperatorMultiply(QJsonValuePtr* self) { @@ -368,19 +352,16 @@ void QJsonValuePtr_Delete(QJsonValuePtr* self, bool isSubclass) { } } -void QJsonValueRefPtr_new(QJsonArray* array, int idx, QJsonValueRefPtr** outptr_QJsonValueRefPtr) { - QJsonValueRefPtr* ret = new QJsonValueRefPtr(array, static_cast(idx)); - *outptr_QJsonValueRefPtr = ret; +QJsonValueRefPtr* QJsonValueRefPtr_new(QJsonArray* array, int idx) { + return new QJsonValueRefPtr(array, static_cast(idx)); } -void QJsonValueRefPtr_new2(QJsonObject* object, int idx, QJsonValueRefPtr** outptr_QJsonValueRefPtr) { - QJsonValueRefPtr* ret = new QJsonValueRefPtr(object, static_cast(idx)); - *outptr_QJsonValueRefPtr = ret; +QJsonValueRefPtr* QJsonValueRefPtr_new2(QJsonObject* object, int idx) { + return new QJsonValueRefPtr(object, static_cast(idx)); } -void QJsonValueRefPtr_new3(QJsonValueRefPtr* param1, QJsonValueRefPtr** outptr_QJsonValueRefPtr) { - QJsonValueRefPtr* ret = new QJsonValueRefPtr(*param1); - *outptr_QJsonValueRefPtr = ret; +QJsonValueRefPtr* QJsonValueRefPtr_new3(QJsonValueRefPtr* param1) { + return new QJsonValueRefPtr(*param1); } QJsonValueRef* QJsonValueRefPtr_OperatorMultiply(QJsonValueRefPtr* self) { diff --git a/qt/gen_qjsonvalue.go b/qt/gen_qjsonvalue.go index 13f016b8..e6dbd571 100644 --- a/qt/gen_qjsonvalue.go +++ b/qt/gen_qjsonvalue.go @@ -49,64 +49,51 @@ func newQJsonValue(h *C.QJsonValue) *QJsonValue { if h == nil { return nil } + return &QJsonValue{h: h} } // UnsafeNewQJsonValue constructs the type using only unsafe pointers. func UnsafeNewQJsonValue(h unsafe.Pointer) *QJsonValue { - if h == nil { - return nil - } - - return &QJsonValue{h: (*C.QJsonValue)(h)} + return newQJsonValue((*C.QJsonValue)(h)) } // NewQJsonValue constructs a new QJsonValue object. func NewQJsonValue() *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new(&outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new()) ret.isSubclass = true return ret } // NewQJsonValue2 constructs a new QJsonValue object. func NewQJsonValue2(b bool) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new2((C.bool)(b), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new2((C.bool)(b))) ret.isSubclass = true return ret } // NewQJsonValue3 constructs a new QJsonValue object. func NewQJsonValue3(n float64) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new3((C.double)(n), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new3((C.double)(n))) ret.isSubclass = true return ret } // NewQJsonValue4 constructs a new QJsonValue object. func NewQJsonValue4(n int) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new4((C.int)(n), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new4((C.int)(n))) ret.isSubclass = true return ret } // NewQJsonValue5 constructs a new QJsonValue object. func NewQJsonValue5(v int64) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new5((C.longlong)(v), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new5((C.longlong)(v))) ret.isSubclass = true return ret } @@ -117,10 +104,8 @@ func NewQJsonValue6(s string) *QJsonValue { s_ms.data = C.CString(s) s_ms.len = C.size_t(len(s)) defer C.free(unsafe.Pointer(s_ms.data)) - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new6(s_ms, &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new6(s_ms)) ret.isSubclass = true return ret } @@ -129,50 +114,40 @@ func NewQJsonValue6(s string) *QJsonValue { func NewQJsonValue7(s string) *QJsonValue { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new7(s_Cstring, &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new7(s_Cstring)) ret.isSubclass = true return ret } // NewQJsonValue8 constructs a new QJsonValue object. func NewQJsonValue8(a *QJsonArray) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new8(a.cPointer(), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new8(a.cPointer())) ret.isSubclass = true return ret } // NewQJsonValue9 constructs a new QJsonValue object. func NewQJsonValue9(o *QJsonObject) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new9(o.cPointer(), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new9(o.cPointer())) ret.isSubclass = true return ret } // NewQJsonValue10 constructs a new QJsonValue object. func NewQJsonValue10(other *QJsonValue) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new10(other.cPointer(), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new10(other.cPointer())) ret.isSubclass = true return ret } // NewQJsonValue11 constructs a new QJsonValue object. func NewQJsonValue11(param1 QJsonValue__Type) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new11((C.int)(param1), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new11((C.int)(param1))) ret.isSubclass = true return ret } @@ -357,44 +332,35 @@ func newQJsonValueRef(h *C.QJsonValueRef) *QJsonValueRef { if h == nil { return nil } + return &QJsonValueRef{h: h} } // UnsafeNewQJsonValueRef constructs the type using only unsafe pointers. func UnsafeNewQJsonValueRef(h unsafe.Pointer) *QJsonValueRef { - if h == nil { - return nil - } - - return &QJsonValueRef{h: (*C.QJsonValueRef)(h)} + return newQJsonValueRef((*C.QJsonValueRef)(h)) } // NewQJsonValueRef constructs a new QJsonValueRef object. func NewQJsonValueRef(param1 *QJsonValueRef) *QJsonValueRef { - var outptr_QJsonValueRef *C.QJsonValueRef = nil - C.QJsonValueRef_new(param1.cPointer(), &outptr_QJsonValueRef) - ret := newQJsonValueRef(outptr_QJsonValueRef) + ret := newQJsonValueRef(C.QJsonValueRef_new(param1.cPointer())) ret.isSubclass = true return ret } // NewQJsonValueRef2 constructs a new QJsonValueRef object. func NewQJsonValueRef2(array *QJsonArray, idx int) *QJsonValueRef { - var outptr_QJsonValueRef *C.QJsonValueRef = nil - C.QJsonValueRef_new2(array.cPointer(), (C.int)(idx), &outptr_QJsonValueRef) - ret := newQJsonValueRef(outptr_QJsonValueRef) + ret := newQJsonValueRef(C.QJsonValueRef_new2(array.cPointer(), (C.int)(idx))) ret.isSubclass = true return ret } // NewQJsonValueRef3 constructs a new QJsonValueRef object. func NewQJsonValueRef3(object *QJsonObject, idx int) *QJsonValueRef { - var outptr_QJsonValueRef *C.QJsonValueRef = nil - C.QJsonValueRef_new3(object.cPointer(), (C.int)(idx), &outptr_QJsonValueRef) - ret := newQJsonValueRef(outptr_QJsonValueRef) + ret := newQJsonValueRef(C.QJsonValueRef_new3(object.cPointer(), (C.int)(idx))) ret.isSubclass = true return ret } @@ -545,34 +511,27 @@ func newQJsonValuePtr(h *C.QJsonValuePtr) *QJsonValuePtr { if h == nil { return nil } + return &QJsonValuePtr{h: h} } // UnsafeNewQJsonValuePtr constructs the type using only unsafe pointers. func UnsafeNewQJsonValuePtr(h unsafe.Pointer) *QJsonValuePtr { - if h == nil { - return nil - } - - return &QJsonValuePtr{h: (*C.QJsonValuePtr)(h)} + return newQJsonValuePtr((*C.QJsonValuePtr)(h)) } // NewQJsonValuePtr constructs a new QJsonValuePtr object. func NewQJsonValuePtr(val *QJsonValue) *QJsonValuePtr { - var outptr_QJsonValuePtr *C.QJsonValuePtr = nil - C.QJsonValuePtr_new(val.cPointer(), &outptr_QJsonValuePtr) - ret := newQJsonValuePtr(outptr_QJsonValuePtr) + ret := newQJsonValuePtr(C.QJsonValuePtr_new(val.cPointer())) ret.isSubclass = true return ret } // NewQJsonValuePtr2 constructs a new QJsonValuePtr object. func NewQJsonValuePtr2(param1 *QJsonValuePtr) *QJsonValuePtr { - var outptr_QJsonValuePtr *C.QJsonValuePtr = nil - C.QJsonValuePtr_new2(param1.cPointer(), &outptr_QJsonValuePtr) - ret := newQJsonValuePtr(outptr_QJsonValuePtr) + ret := newQJsonValuePtr(C.QJsonValuePtr_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -627,44 +586,35 @@ func newQJsonValueRefPtr(h *C.QJsonValueRefPtr) *QJsonValueRefPtr { if h == nil { return nil } + return &QJsonValueRefPtr{h: h} } // UnsafeNewQJsonValueRefPtr constructs the type using only unsafe pointers. func UnsafeNewQJsonValueRefPtr(h unsafe.Pointer) *QJsonValueRefPtr { - if h == nil { - return nil - } - - return &QJsonValueRefPtr{h: (*C.QJsonValueRefPtr)(h)} + return newQJsonValueRefPtr((*C.QJsonValueRefPtr)(h)) } // NewQJsonValueRefPtr constructs a new QJsonValueRefPtr object. func NewQJsonValueRefPtr(array *QJsonArray, idx int) *QJsonValueRefPtr { - var outptr_QJsonValueRefPtr *C.QJsonValueRefPtr = nil - C.QJsonValueRefPtr_new(array.cPointer(), (C.int)(idx), &outptr_QJsonValueRefPtr) - ret := newQJsonValueRefPtr(outptr_QJsonValueRefPtr) + ret := newQJsonValueRefPtr(C.QJsonValueRefPtr_new(array.cPointer(), (C.int)(idx))) ret.isSubclass = true return ret } // NewQJsonValueRefPtr2 constructs a new QJsonValueRefPtr object. func NewQJsonValueRefPtr2(object *QJsonObject, idx int) *QJsonValueRefPtr { - var outptr_QJsonValueRefPtr *C.QJsonValueRefPtr = nil - C.QJsonValueRefPtr_new2(object.cPointer(), (C.int)(idx), &outptr_QJsonValueRefPtr) - ret := newQJsonValueRefPtr(outptr_QJsonValueRefPtr) + ret := newQJsonValueRefPtr(C.QJsonValueRefPtr_new2(object.cPointer(), (C.int)(idx))) ret.isSubclass = true return ret } // NewQJsonValueRefPtr3 constructs a new QJsonValueRefPtr object. func NewQJsonValueRefPtr3(param1 *QJsonValueRefPtr) *QJsonValueRefPtr { - var outptr_QJsonValueRefPtr *C.QJsonValueRefPtr = nil - C.QJsonValueRefPtr_new3(param1.cPointer(), &outptr_QJsonValueRefPtr) - ret := newQJsonValueRefPtr(outptr_QJsonValueRefPtr) + ret := newQJsonValueRefPtr(C.QJsonValueRefPtr_new3(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qjsonvalue.h b/qt/gen_qjsonvalue.h index df2714da..db024e58 100644 --- a/qt/gen_qjsonvalue.h +++ b/qt/gen_qjsonvalue.h @@ -32,17 +32,17 @@ typedef struct QJsonValueRefPtr QJsonValueRefPtr; typedef struct QVariant QVariant; #endif -void QJsonValue_new(QJsonValue** outptr_QJsonValue); -void QJsonValue_new2(bool b, QJsonValue** outptr_QJsonValue); -void QJsonValue_new3(double n, QJsonValue** outptr_QJsonValue); -void QJsonValue_new4(int n, QJsonValue** outptr_QJsonValue); -void QJsonValue_new5(long long v, QJsonValue** outptr_QJsonValue); -void QJsonValue_new6(struct miqt_string s, QJsonValue** outptr_QJsonValue); -void QJsonValue_new7(const char* s, QJsonValue** outptr_QJsonValue); -void QJsonValue_new8(QJsonArray* a, QJsonValue** outptr_QJsonValue); -void QJsonValue_new9(QJsonObject* o, QJsonValue** outptr_QJsonValue); -void QJsonValue_new10(QJsonValue* other, QJsonValue** outptr_QJsonValue); -void QJsonValue_new11(int param1, QJsonValue** outptr_QJsonValue); +QJsonValue* QJsonValue_new(); +QJsonValue* QJsonValue_new2(bool b); +QJsonValue* QJsonValue_new3(double n); +QJsonValue* QJsonValue_new4(int n); +QJsonValue* QJsonValue_new5(long long v); +QJsonValue* QJsonValue_new6(struct miqt_string s); +QJsonValue* QJsonValue_new7(const char* s); +QJsonValue* QJsonValue_new8(QJsonArray* a); +QJsonValue* QJsonValue_new9(QJsonObject* o); +QJsonValue* QJsonValue_new10(QJsonValue* other); +QJsonValue* QJsonValue_new11(int param1); void QJsonValue_OperatorAssign(QJsonValue* self, QJsonValue* other); void QJsonValue_Swap(QJsonValue* self, QJsonValue* other); QJsonValue* QJsonValue_FromVariant(QVariant* variant); @@ -73,9 +73,9 @@ int QJsonValue_ToInt1(const QJsonValue* self, int defaultValue); double QJsonValue_ToDouble1(const QJsonValue* self, double defaultValue); void QJsonValue_Delete(QJsonValue* self, bool isSubclass); -void QJsonValueRef_new(QJsonValueRef* param1, QJsonValueRef** outptr_QJsonValueRef); -void QJsonValueRef_new2(QJsonArray* array, int idx, QJsonValueRef** outptr_QJsonValueRef); -void QJsonValueRef_new3(QJsonObject* object, int idx, QJsonValueRef** outptr_QJsonValueRef); +QJsonValueRef* QJsonValueRef_new(QJsonValueRef* param1); +QJsonValueRef* QJsonValueRef_new2(QJsonArray* array, int idx); +QJsonValueRef* QJsonValueRef_new3(QJsonObject* object, int idx); void QJsonValueRef_OperatorAssign(QJsonValueRef* self, QJsonValue* val); void QJsonValueRef_OperatorAssignWithVal(QJsonValueRef* self, QJsonValueRef* val); QVariant* QJsonValueRef_ToVariant(const QJsonValueRef* self); @@ -101,16 +101,16 @@ bool QJsonValueRef_OperatorEqual(const QJsonValueRef* self, QJsonValue* other); bool QJsonValueRef_OperatorNotEqual(const QJsonValueRef* self, QJsonValue* other); void QJsonValueRef_Delete(QJsonValueRef* self, bool isSubclass); -void QJsonValuePtr_new(QJsonValue* val, QJsonValuePtr** outptr_QJsonValuePtr); -void QJsonValuePtr_new2(QJsonValuePtr* param1, QJsonValuePtr** outptr_QJsonValuePtr); +QJsonValuePtr* QJsonValuePtr_new(QJsonValue* val); +QJsonValuePtr* QJsonValuePtr_new2(QJsonValuePtr* param1); QJsonValue* QJsonValuePtr_OperatorMultiply(QJsonValuePtr* self); QJsonValue* QJsonValuePtr_OperatorMinusGreater(QJsonValuePtr* self); void QJsonValuePtr_OperatorAssign(QJsonValuePtr* self, QJsonValuePtr* param1); void QJsonValuePtr_Delete(QJsonValuePtr* self, bool isSubclass); -void QJsonValueRefPtr_new(QJsonArray* array, int idx, QJsonValueRefPtr** outptr_QJsonValueRefPtr); -void QJsonValueRefPtr_new2(QJsonObject* object, int idx, QJsonValueRefPtr** outptr_QJsonValueRefPtr); -void QJsonValueRefPtr_new3(QJsonValueRefPtr* param1, QJsonValueRefPtr** outptr_QJsonValueRefPtr); +QJsonValueRefPtr* QJsonValueRefPtr_new(QJsonArray* array, int idx); +QJsonValueRefPtr* QJsonValueRefPtr_new2(QJsonObject* object, int idx); +QJsonValueRefPtr* QJsonValueRefPtr_new3(QJsonValueRefPtr* param1); QJsonValueRef* QJsonValueRefPtr_OperatorMultiply(QJsonValueRefPtr* self); QJsonValueRef* QJsonValueRefPtr_OperatorMinusGreater(QJsonValueRefPtr* self); void QJsonValueRefPtr_OperatorAssign(QJsonValueRefPtr* self, QJsonValueRefPtr* param1); diff --git a/qt/gen_qkeyeventtransition.cpp b/qt/gen_qkeyeventtransition.cpp index 5dbe3d1a..25cbc467 100644 --- a/qt/gen_qkeyeventtransition.cpp +++ b/qt/gen_qkeyeventtransition.cpp @@ -94,36 +94,24 @@ public: }; -void QKeyEventTransition_new(QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQKeyEventTransition* ret = new MiqtVirtualQKeyEventTransition(); - *outptr_QKeyEventTransition = ret; - *outptr_QEventTransition = static_cast(ret); - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QKeyEventTransition* QKeyEventTransition_new() { + return new MiqtVirtualQKeyEventTransition(); } -void QKeyEventTransition_new2(QObject* object, int typeVal, int key, QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQKeyEventTransition* ret = new MiqtVirtualQKeyEventTransition(object, static_cast(typeVal), static_cast(key)); - *outptr_QKeyEventTransition = ret; - *outptr_QEventTransition = static_cast(ret); - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QKeyEventTransition* QKeyEventTransition_new2(QObject* object, int typeVal, int key) { + return new MiqtVirtualQKeyEventTransition(object, static_cast(typeVal), static_cast(key)); } -void QKeyEventTransition_new3(QState* sourceState, QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQKeyEventTransition* ret = new MiqtVirtualQKeyEventTransition(sourceState); - *outptr_QKeyEventTransition = ret; - *outptr_QEventTransition = static_cast(ret); - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QKeyEventTransition* QKeyEventTransition_new3(QState* sourceState) { + return new MiqtVirtualQKeyEventTransition(sourceState); } -void QKeyEventTransition_new4(QObject* object, int typeVal, int key, QState* sourceState, QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQKeyEventTransition* ret = new MiqtVirtualQKeyEventTransition(object, static_cast(typeVal), static_cast(key), sourceState); - *outptr_QKeyEventTransition = ret; - *outptr_QEventTransition = static_cast(ret); - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QKeyEventTransition* QKeyEventTransition_new4(QObject* object, int typeVal, int key, QState* sourceState) { + return new MiqtVirtualQKeyEventTransition(object, static_cast(typeVal), static_cast(key), sourceState); +} + +void QKeyEventTransition_virtbase(QKeyEventTransition* src, QEventTransition** outptr_QEventTransition) { + *outptr_QEventTransition = static_cast(src); } QMetaObject* QKeyEventTransition_MetaObject(const QKeyEventTransition* self) { diff --git a/qt/gen_qkeyeventtransition.go b/qt/gen_qkeyeventtransition.go index 2523495a..54cbd1b9 100644 --- a/qt/gen_qkeyeventtransition.go +++ b/qt/gen_qkeyeventtransition.go @@ -35,72 +35,50 @@ func (this *QKeyEventTransition) UnsafePointer() unsafe.Pointer { } // newQKeyEventTransition constructs the type using only CGO pointers. -func newQKeyEventTransition(h *C.QKeyEventTransition, h_QEventTransition *C.QEventTransition, h_QAbstractTransition *C.QAbstractTransition, h_QObject *C.QObject) *QKeyEventTransition { +func newQKeyEventTransition(h *C.QKeyEventTransition) *QKeyEventTransition { if h == nil { return nil } + var outptr_QEventTransition *C.QEventTransition = nil + C.QKeyEventTransition_virtbase(h, &outptr_QEventTransition) + return &QKeyEventTransition{h: h, - QEventTransition: newQEventTransition(h_QEventTransition, h_QAbstractTransition, h_QObject)} + QEventTransition: newQEventTransition(outptr_QEventTransition)} } // UnsafeNewQKeyEventTransition constructs the type using only unsafe pointers. -func UnsafeNewQKeyEventTransition(h unsafe.Pointer, h_QEventTransition unsafe.Pointer, h_QAbstractTransition unsafe.Pointer, h_QObject unsafe.Pointer) *QKeyEventTransition { - if h == nil { - return nil - } - - return &QKeyEventTransition{h: (*C.QKeyEventTransition)(h), - QEventTransition: UnsafeNewQEventTransition(h_QEventTransition, h_QAbstractTransition, h_QObject)} +func UnsafeNewQKeyEventTransition(h unsafe.Pointer) *QKeyEventTransition { + return newQKeyEventTransition((*C.QKeyEventTransition)(h)) } // NewQKeyEventTransition constructs a new QKeyEventTransition object. func NewQKeyEventTransition() *QKeyEventTransition { - var outptr_QKeyEventTransition *C.QKeyEventTransition = nil - var outptr_QEventTransition *C.QEventTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QKeyEventTransition_new(&outptr_QKeyEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQKeyEventTransition(outptr_QKeyEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQKeyEventTransition(C.QKeyEventTransition_new()) ret.isSubclass = true return ret } // NewQKeyEventTransition2 constructs a new QKeyEventTransition object. func NewQKeyEventTransition2(object *QObject, typeVal QEvent__Type, key int) *QKeyEventTransition { - var outptr_QKeyEventTransition *C.QKeyEventTransition = nil - var outptr_QEventTransition *C.QEventTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QKeyEventTransition_new2(object.cPointer(), (C.int)(typeVal), (C.int)(key), &outptr_QKeyEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQKeyEventTransition(outptr_QKeyEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQKeyEventTransition(C.QKeyEventTransition_new2(object.cPointer(), (C.int)(typeVal), (C.int)(key))) ret.isSubclass = true return ret } // NewQKeyEventTransition3 constructs a new QKeyEventTransition object. func NewQKeyEventTransition3(sourceState *QState) *QKeyEventTransition { - var outptr_QKeyEventTransition *C.QKeyEventTransition = nil - var outptr_QEventTransition *C.QEventTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QKeyEventTransition_new3(sourceState.cPointer(), &outptr_QKeyEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQKeyEventTransition(outptr_QKeyEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQKeyEventTransition(C.QKeyEventTransition_new3(sourceState.cPointer())) ret.isSubclass = true return ret } // NewQKeyEventTransition4 constructs a new QKeyEventTransition object. func NewQKeyEventTransition4(object *QObject, typeVal QEvent__Type, key int, sourceState *QState) *QKeyEventTransition { - var outptr_QKeyEventTransition *C.QKeyEventTransition = nil - var outptr_QEventTransition *C.QEventTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QKeyEventTransition_new4(object.cPointer(), (C.int)(typeVal), (C.int)(key), sourceState.cPointer(), &outptr_QKeyEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQKeyEventTransition(outptr_QKeyEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQKeyEventTransition(C.QKeyEventTransition_new4(object.cPointer(), (C.int)(typeVal), (C.int)(key), sourceState.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qkeyeventtransition.h b/qt/gen_qkeyeventtransition.h index f9282752..076a7e46 100644 --- a/qt/gen_qkeyeventtransition.h +++ b/qt/gen_qkeyeventtransition.h @@ -32,10 +32,11 @@ typedef struct QObject QObject; typedef struct QState QState; #endif -void QKeyEventTransition_new(QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); -void QKeyEventTransition_new2(QObject* object, int typeVal, int key, QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); -void QKeyEventTransition_new3(QState* sourceState, QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); -void QKeyEventTransition_new4(QObject* object, int typeVal, int key, QState* sourceState, QKeyEventTransition** outptr_QKeyEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +QKeyEventTransition* QKeyEventTransition_new(); +QKeyEventTransition* QKeyEventTransition_new2(QObject* object, int typeVal, int key); +QKeyEventTransition* QKeyEventTransition_new3(QState* sourceState); +QKeyEventTransition* QKeyEventTransition_new4(QObject* object, int typeVal, int key, QState* sourceState); +void QKeyEventTransition_virtbase(QKeyEventTransition* src, QEventTransition** outptr_QEventTransition); QMetaObject* QKeyEventTransition_MetaObject(const QKeyEventTransition* self); void* QKeyEventTransition_Metacast(QKeyEventTransition* self, const char* param1); struct miqt_string QKeyEventTransition_Tr(const char* s); diff --git a/qt/gen_qkeysequence.cpp b/qt/gen_qkeysequence.cpp index 0c8d99de..92b08658 100644 --- a/qt/gen_qkeysequence.cpp +++ b/qt/gen_qkeysequence.cpp @@ -7,51 +7,42 @@ #include "gen_qkeysequence.h" #include "_cgo_export.h" -void QKeySequence_new(QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new() { + return new QKeySequence(); } -void QKeySequence_new2(struct miqt_string key, QKeySequence** outptr_QKeySequence) { +QKeySequence* QKeySequence_new2(struct miqt_string key) { QString key_QString = QString::fromUtf8(key.data, key.len); - QKeySequence* ret = new QKeySequence(key_QString); - *outptr_QKeySequence = ret; + return new QKeySequence(key_QString); } -void QKeySequence_new3(int k1, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(static_cast(k1)); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new3(int k1) { + return new QKeySequence(static_cast(k1)); } -void QKeySequence_new4(QKeySequence* ks, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(*ks); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new4(QKeySequence* ks) { + return new QKeySequence(*ks); } -void QKeySequence_new5(int key, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(static_cast(key)); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new5(int key) { + return new QKeySequence(static_cast(key)); } -void QKeySequence_new6(struct miqt_string key, int format, QKeySequence** outptr_QKeySequence) { +QKeySequence* QKeySequence_new6(struct miqt_string key, int format) { QString key_QString = QString::fromUtf8(key.data, key.len); - QKeySequence* ret = new QKeySequence(key_QString, static_cast(format)); - *outptr_QKeySequence = ret; + return new QKeySequence(key_QString, static_cast(format)); } -void QKeySequence_new7(int k1, int k2, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(static_cast(k1), static_cast(k2)); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new7(int k1, int k2) { + return new QKeySequence(static_cast(k1), static_cast(k2)); } -void QKeySequence_new8(int k1, int k2, int k3, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3)); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new8(int k1, int k2, int k3) { + return new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3)); } -void QKeySequence_new9(int k1, int k2, int k3, int k4, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3), static_cast(k4)); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new9(int k1, int k2, int k3, int k4) { + return new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3), static_cast(k4)); } int QKeySequence_Count(const QKeySequence* self) { diff --git a/qt/gen_qkeysequence.go b/qt/gen_qkeysequence.go index ab20228b..11366ea3 100644 --- a/qt/gen_qkeysequence.go +++ b/qt/gen_qkeysequence.go @@ -128,24 +128,19 @@ func newQKeySequence(h *C.QKeySequence) *QKeySequence { if h == nil { return nil } + return &QKeySequence{h: h} } // UnsafeNewQKeySequence constructs the type using only unsafe pointers. func UnsafeNewQKeySequence(h unsafe.Pointer) *QKeySequence { - if h == nil { - return nil - } - - return &QKeySequence{h: (*C.QKeySequence)(h)} + return newQKeySequence((*C.QKeySequence)(h)) } // NewQKeySequence constructs a new QKeySequence object. func NewQKeySequence() *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new(&outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new()) ret.isSubclass = true return ret } @@ -156,40 +151,32 @@ func NewQKeySequence2(key string) *QKeySequence { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new2(key_ms, &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new2(key_ms)) ret.isSubclass = true return ret } // NewQKeySequence3 constructs a new QKeySequence object. func NewQKeySequence3(k1 int) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new3((C.int)(k1), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new3((C.int)(k1))) ret.isSubclass = true return ret } // NewQKeySequence4 constructs a new QKeySequence object. func NewQKeySequence4(ks *QKeySequence) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new4(ks.cPointer(), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new4(ks.cPointer())) ret.isSubclass = true return ret } // NewQKeySequence5 constructs a new QKeySequence object. func NewQKeySequence5(key QKeySequence__StandardKey) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new5((C.int)(key), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new5((C.int)(key))) ret.isSubclass = true return ret } @@ -200,40 +187,32 @@ func NewQKeySequence6(key string, format QKeySequence__SequenceFormat) *QKeySequ key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new6(key_ms, (C.int)(format), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new6(key_ms, (C.int)(format))) ret.isSubclass = true return ret } // NewQKeySequence7 constructs a new QKeySequence object. func NewQKeySequence7(k1 int, k2 int) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new7((C.int)(k1), (C.int)(k2), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new7((C.int)(k1), (C.int)(k2))) ret.isSubclass = true return ret } // NewQKeySequence8 constructs a new QKeySequence object. func NewQKeySequence8(k1 int, k2 int, k3 int) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new8((C.int)(k1), (C.int)(k2), (C.int)(k3), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new8((C.int)(k1), (C.int)(k2), (C.int)(k3))) ret.isSubclass = true return ret } // NewQKeySequence9 constructs a new QKeySequence object. func NewQKeySequence9(k1 int, k2 int, k3 int, k4 int) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new9((C.int)(k1), (C.int)(k2), (C.int)(k3), (C.int)(k4), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new9((C.int)(k1), (C.int)(k2), (C.int)(k3), (C.int)(k4))) ret.isSubclass = true return ret } diff --git a/qt/gen_qkeysequence.h b/qt/gen_qkeysequence.h index 830c6e2d..9e5618ea 100644 --- a/qt/gen_qkeysequence.h +++ b/qt/gen_qkeysequence.h @@ -20,15 +20,15 @@ class QKeySequence; typedef struct QKeySequence QKeySequence; #endif -void QKeySequence_new(QKeySequence** outptr_QKeySequence); -void QKeySequence_new2(struct miqt_string key, QKeySequence** outptr_QKeySequence); -void QKeySequence_new3(int k1, QKeySequence** outptr_QKeySequence); -void QKeySequence_new4(QKeySequence* ks, QKeySequence** outptr_QKeySequence); -void QKeySequence_new5(int key, QKeySequence** outptr_QKeySequence); -void QKeySequence_new6(struct miqt_string key, int format, QKeySequence** outptr_QKeySequence); -void QKeySequence_new7(int k1, int k2, QKeySequence** outptr_QKeySequence); -void QKeySequence_new8(int k1, int k2, int k3, QKeySequence** outptr_QKeySequence); -void QKeySequence_new9(int k1, int k2, int k3, int k4, QKeySequence** outptr_QKeySequence); +QKeySequence* QKeySequence_new(); +QKeySequence* QKeySequence_new2(struct miqt_string key); +QKeySequence* QKeySequence_new3(int k1); +QKeySequence* QKeySequence_new4(QKeySequence* ks); +QKeySequence* QKeySequence_new5(int key); +QKeySequence* QKeySequence_new6(struct miqt_string key, int format); +QKeySequence* QKeySequence_new7(int k1, int k2); +QKeySequence* QKeySequence_new8(int k1, int k2, int k3); +QKeySequence* QKeySequence_new9(int k1, int k2, int k3, int k4); int QKeySequence_Count(const QKeySequence* self); bool QKeySequence_IsEmpty(const QKeySequence* self); struct miqt_string QKeySequence_ToString(const QKeySequence* self); diff --git a/qt/gen_qkeysequenceedit.cpp b/qt/gen_qkeysequenceedit.cpp index aca36472..8fd478e7 100644 --- a/qt/gen_qkeysequenceedit.cpp +++ b/qt/gen_qkeysequenceedit.cpp @@ -1048,36 +1048,24 @@ public: }; -void QKeySequenceEdit_new(QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(parent); - *outptr_QKeySequenceEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QKeySequenceEdit* QKeySequenceEdit_new(QWidget* parent) { + return new MiqtVirtualQKeySequenceEdit(parent); } -void QKeySequenceEdit_new2(QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(); - *outptr_QKeySequenceEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QKeySequenceEdit* QKeySequenceEdit_new2() { + return new MiqtVirtualQKeySequenceEdit(); } -void QKeySequenceEdit_new3(QKeySequence* keySequence, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(*keySequence); - *outptr_QKeySequenceEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QKeySequenceEdit* QKeySequenceEdit_new3(QKeySequence* keySequence) { + return new MiqtVirtualQKeySequenceEdit(*keySequence); } -void QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(*keySequence, parent); - *outptr_QKeySequenceEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QKeySequenceEdit* QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent) { + return new MiqtVirtualQKeySequenceEdit(*keySequence, parent); +} + +void QKeySequenceEdit_virtbase(QKeySequenceEdit* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QKeySequenceEdit_MetaObject(const QKeySequenceEdit* self) { diff --git a/qt/gen_qkeysequenceedit.go b/qt/gen_qkeysequenceedit.go index c8486513..22b55e4f 100644 --- a/qt/gen_qkeysequenceedit.go +++ b/qt/gen_qkeysequenceedit.go @@ -35,72 +35,50 @@ func (this *QKeySequenceEdit) UnsafePointer() unsafe.Pointer { } // newQKeySequenceEdit constructs the type using only CGO pointers. -func newQKeySequenceEdit(h *C.QKeySequenceEdit, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QKeySequenceEdit { +func newQKeySequenceEdit(h *C.QKeySequenceEdit) *QKeySequenceEdit { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QKeySequenceEdit_virtbase(h, &outptr_QWidget) + return &QKeySequenceEdit{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQKeySequenceEdit constructs the type using only unsafe pointers. -func UnsafeNewQKeySequenceEdit(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QKeySequenceEdit { - if h == nil { - return nil - } - - return &QKeySequenceEdit{h: (*C.QKeySequenceEdit)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQKeySequenceEdit(h unsafe.Pointer) *QKeySequenceEdit { + return newQKeySequenceEdit((*C.QKeySequenceEdit)(h)) } // NewQKeySequenceEdit constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit(parent *QWidget) *QKeySequenceEdit { - var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QKeySequenceEdit_new(parent.cPointer(), &outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQKeySequenceEdit(C.QKeySequenceEdit_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQKeySequenceEdit2 constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit2() *QKeySequenceEdit { - var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QKeySequenceEdit_new2(&outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQKeySequenceEdit(C.QKeySequenceEdit_new2()) ret.isSubclass = true return ret } // NewQKeySequenceEdit3 constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit3(keySequence *QKeySequence) *QKeySequenceEdit { - var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QKeySequenceEdit_new3(keySequence.cPointer(), &outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQKeySequenceEdit(C.QKeySequenceEdit_new3(keySequence.cPointer())) ret.isSubclass = true return ret } // NewQKeySequenceEdit4 constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit4(keySequence *QKeySequence, parent *QWidget) *QKeySequenceEdit { - var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QKeySequenceEdit_new4(keySequence.cPointer(), parent.cPointer(), &outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQKeySequenceEdit(C.QKeySequenceEdit_new4(keySequence.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -276,7 +254,7 @@ func miqt_exec_callback_QKeySequenceEdit_KeyPressEvent(self *C.QKeySequenceEdit, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -302,7 +280,7 @@ func miqt_exec_callback_QKeySequenceEdit_KeyReleaseEvent(self *C.QKeySequenceEdi } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -328,7 +306,7 @@ func miqt_exec_callback_QKeySequenceEdit_TimerEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -537,7 +515,7 @@ func miqt_exec_callback_QKeySequenceEdit_MousePressEvent(self *C.QKeySequenceEdi } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -563,7 +541,7 @@ func miqt_exec_callback_QKeySequenceEdit_MouseReleaseEvent(self *C.QKeySequenceE } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -589,7 +567,7 @@ func miqt_exec_callback_QKeySequenceEdit_MouseDoubleClickEvent(self *C.QKeySeque } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -615,7 +593,7 @@ func miqt_exec_callback_QKeySequenceEdit_MouseMoveEvent(self *C.QKeySequenceEdit } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -641,7 +619,7 @@ func miqt_exec_callback_QKeySequenceEdit_WheelEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -667,7 +645,7 @@ func miqt_exec_callback_QKeySequenceEdit_FocusInEvent(self *C.QKeySequenceEdit, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -693,7 +671,7 @@ func miqt_exec_callback_QKeySequenceEdit_FocusOutEvent(self *C.QKeySequenceEdit, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -771,7 +749,7 @@ func miqt_exec_callback_QKeySequenceEdit_PaintEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -797,7 +775,7 @@ func miqt_exec_callback_QKeySequenceEdit_MoveEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -823,7 +801,7 @@ func miqt_exec_callback_QKeySequenceEdit_ResizeEvent(self *C.QKeySequenceEdit, c } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -849,7 +827,7 @@ func miqt_exec_callback_QKeySequenceEdit_CloseEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -875,7 +853,7 @@ func miqt_exec_callback_QKeySequenceEdit_ContextMenuEvent(self *C.QKeySequenceEd } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -901,7 +879,7 @@ func miqt_exec_callback_QKeySequenceEdit_TabletEvent(self *C.QKeySequenceEdit, c } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -927,7 +905,7 @@ func miqt_exec_callback_QKeySequenceEdit_ActionEvent(self *C.QKeySequenceEdit, c } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -953,7 +931,7 @@ func miqt_exec_callback_QKeySequenceEdit_DragEnterEvent(self *C.QKeySequenceEdit } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -979,7 +957,7 @@ func miqt_exec_callback_QKeySequenceEdit_DragMoveEvent(self *C.QKeySequenceEdit, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1005,7 +983,7 @@ func miqt_exec_callback_QKeySequenceEdit_DragLeaveEvent(self *C.QKeySequenceEdit } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1031,7 +1009,7 @@ func miqt_exec_callback_QKeySequenceEdit_DropEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1057,7 +1035,7 @@ func miqt_exec_callback_QKeySequenceEdit_ShowEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1083,7 +1061,7 @@ func miqt_exec_callback_QKeySequenceEdit_HideEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1279,7 +1257,7 @@ func miqt_exec_callback_QKeySequenceEdit_InputMethodEvent(self *C.QKeySequenceEd } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qkeysequenceedit.h b/qt/gen_qkeysequenceedit.h index ef0257ea..cb468b83 100644 --- a/qt/gen_qkeysequenceedit.h +++ b/qt/gen_qkeysequenceedit.h @@ -80,10 +80,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QKeySequenceEdit_new(QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QKeySequenceEdit_new2(QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QKeySequenceEdit_new3(QKeySequence* keySequence, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QKeySequenceEdit* QKeySequenceEdit_new(QWidget* parent); +QKeySequenceEdit* QKeySequenceEdit_new2(); +QKeySequenceEdit* QKeySequenceEdit_new3(QKeySequence* keySequence); +QKeySequenceEdit* QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent); +void QKeySequenceEdit_virtbase(QKeySequenceEdit* src, QWidget** outptr_QWidget); QMetaObject* QKeySequenceEdit_MetaObject(const QKeySequenceEdit* self); void* QKeySequenceEdit_Metacast(QKeySequenceEdit* self, const char* param1); struct miqt_string QKeySequenceEdit_Tr(const char* s); diff --git a/qt/gen_qlabel.cpp b/qt/gen_qlabel.cpp index 18859ee0..b0d3b23d 100644 --- a/qt/gen_qlabel.cpp +++ b/qt/gen_qlabel.cpp @@ -364,61 +364,35 @@ public: }; -void QLabel_new(QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(parent); - *outptr_QLabel = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLabel* QLabel_new(QWidget* parent) { + return new MiqtVirtualQLabel(parent); } -void QLabel_new2(QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(); - *outptr_QLabel = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLabel* QLabel_new2() { + return new MiqtVirtualQLabel(); } -void QLabel_new3(struct miqt_string text, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QLabel* QLabel_new3(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(text_QString); - *outptr_QLabel = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQLabel(text_QString); } -void QLabel_new4(QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(parent, static_cast(f)); - *outptr_QLabel = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLabel* QLabel_new4(QWidget* parent, int f) { + return new MiqtVirtualQLabel(parent, static_cast(f)); } -void QLabel_new5(struct miqt_string text, QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QLabel* QLabel_new5(struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(text_QString, parent); - *outptr_QLabel = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQLabel(text_QString, parent); } -void QLabel_new6(struct miqt_string text, QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QLabel* QLabel_new6(struct miqt_string text, QWidget* parent, int f) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(text_QString, parent, static_cast(f)); - *outptr_QLabel = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQLabel(text_QString, parent, static_cast(f)); +} + +void QLabel_virtbase(QLabel* src, QFrame** outptr_QFrame) { + *outptr_QFrame = static_cast(src); } QMetaObject* QLabel_MetaObject(const QLabel* self) { diff --git a/qt/gen_qlabel.go b/qt/gen_qlabel.go index cbd3e641..e7b4c739 100644 --- a/qt/gen_qlabel.go +++ b/qt/gen_qlabel.go @@ -35,48 +35,34 @@ func (this *QLabel) UnsafePointer() unsafe.Pointer { } // newQLabel constructs the type using only CGO pointers. -func newQLabel(h *C.QLabel, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QLabel { +func newQLabel(h *C.QLabel) *QLabel { if h == nil { return nil } + var outptr_QFrame *C.QFrame = nil + C.QLabel_virtbase(h, &outptr_QFrame) + return &QLabel{h: h, - QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QFrame: newQFrame(outptr_QFrame)} } // UnsafeNewQLabel constructs the type using only unsafe pointers. -func UnsafeNewQLabel(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QLabel { - if h == nil { - return nil - } - - return &QLabel{h: (*C.QLabel)(h), - QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQLabel(h unsafe.Pointer) *QLabel { + return newQLabel((*C.QLabel)(h)) } // NewQLabel constructs a new QLabel object. func NewQLabel(parent *QWidget) *QLabel { - var outptr_QLabel *C.QLabel = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLabel_new(parent.cPointer(), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLabel(C.QLabel_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQLabel2 constructs a new QLabel object. func NewQLabel2() *QLabel { - var outptr_QLabel *C.QLabel = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLabel_new2(&outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLabel(C.QLabel_new2()) ret.isSubclass = true return ret } @@ -87,28 +73,16 @@ func NewQLabel3(text string) *QLabel { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QLabel *C.QLabel = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLabel_new3(text_ms, &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLabel(C.QLabel_new3(text_ms)) ret.isSubclass = true return ret } // NewQLabel4 constructs a new QLabel object. func NewQLabel4(parent *QWidget, f WindowType) *QLabel { - var outptr_QLabel *C.QLabel = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLabel_new4(parent.cPointer(), (C.int)(f), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLabel(C.QLabel_new4(parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -119,14 +93,8 @@ func NewQLabel5(text string, parent *QWidget) *QLabel { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QLabel *C.QLabel = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLabel_new5(text_ms, parent.cPointer(), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLabel(C.QLabel_new5(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -137,14 +105,8 @@ func NewQLabel6(text string, parent *QWidget, f WindowType) *QLabel { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QLabel *C.QLabel = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLabel_new6(text_ms, parent.cPointer(), (C.int)(f), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLabel(C.QLabel_new6(text_ms, parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -185,27 +147,27 @@ func (this *QLabel) Text() string { } func (this *QLabel) Pixmap() *QPixmap { - return newQPixmap(C.QLabel_Pixmap(this.h), nil) + return newQPixmap(C.QLabel_Pixmap(this.h)) } func (this *QLabel) PixmapWithQtReturnByValueConstant(param1 ReturnByValueConstant) *QPixmap { - _goptr := newQPixmap(C.QLabel_PixmapWithQtReturnByValueConstant(this.h, (C.int)(param1)), nil) + _goptr := newQPixmap(C.QLabel_PixmapWithQtReturnByValueConstant(this.h, (C.int)(param1))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QLabel) Picture() *QPicture { - return newQPicture(C.QLabel_Picture(this.h), nil) + return newQPicture(C.QLabel_Picture(this.h)) } func (this *QLabel) PictureWithQtReturnByValueConstant(param1 ReturnByValueConstant) *QPicture { - _goptr := newQPicture(C.QLabel_PictureWithQtReturnByValueConstant(this.h, (C.int)(param1)), nil) + _goptr := newQPicture(C.QLabel_PictureWithQtReturnByValueConstant(this.h, (C.int)(param1))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QLabel) Movie() *QMovie { - return newQMovie(C.QLabel_Movie(this.h), nil) + return newQMovie(C.QLabel_Movie(this.h)) } func (this *QLabel) TextFormat() TextFormat { @@ -273,7 +235,7 @@ func (this *QLabel) SetBuddy(buddy *QWidget) { } func (this *QLabel) Buddy() *QWidget { - return newQWidget(C.QLabel_Buddy(this.h), nil, nil) + return newQWidget(C.QLabel_Buddy(this.h)) } func (this *QLabel) HeightForWidth(param1 int) int { @@ -575,7 +537,7 @@ func miqt_exec_callback_QLabel_KeyPressEvent(self *C.QLabel, cb C.intptr_t, ev * } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(ev, nil, nil) + slotval1 := newQKeyEvent(ev) gofunc((&QLabel{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -601,7 +563,7 @@ func miqt_exec_callback_QLabel_PaintEvent(self *C.QLabel, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QLabel{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -653,7 +615,7 @@ func miqt_exec_callback_QLabel_MousePressEvent(self *C.QLabel, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QLabel{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -679,7 +641,7 @@ func miqt_exec_callback_QLabel_MouseMoveEvent(self *C.QLabel, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QLabel{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -705,7 +667,7 @@ func miqt_exec_callback_QLabel_MouseReleaseEvent(self *C.QLabel, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QLabel{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -731,7 +693,7 @@ func miqt_exec_callback_QLabel_ContextMenuEvent(self *C.QLabel, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(ev, nil, nil) + slotval1 := newQContextMenuEvent(ev) gofunc((&QLabel{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -757,7 +719,7 @@ func miqt_exec_callback_QLabel_FocusInEvent(self *C.QLabel, cb C.intptr_t, ev *C } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(ev, nil) + slotval1 := newQFocusEvent(ev) gofunc((&QLabel{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -783,7 +745,7 @@ func miqt_exec_callback_QLabel_FocusOutEvent(self *C.QLabel, cb C.intptr_t, ev * } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(ev, nil) + slotval1 := newQFocusEvent(ev) gofunc((&QLabel{h: self}).callVirtualBase_FocusOutEvent, slotval1) diff --git a/qt/gen_qlabel.h b/qt/gen_qlabel.h index 56643a3b..f277d39e 100644 --- a/qt/gen_qlabel.h +++ b/qt/gen_qlabel.h @@ -50,12 +50,13 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QLabel_new(QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLabel_new2(QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLabel_new3(struct miqt_string text, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLabel_new4(QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLabel_new5(struct miqt_string text, QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLabel_new6(struct miqt_string text, QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QLabel* QLabel_new(QWidget* parent); +QLabel* QLabel_new2(); +QLabel* QLabel_new3(struct miqt_string text); +QLabel* QLabel_new4(QWidget* parent, int f); +QLabel* QLabel_new5(struct miqt_string text, QWidget* parent); +QLabel* QLabel_new6(struct miqt_string text, QWidget* parent, int f); +void QLabel_virtbase(QLabel* src, QFrame** outptr_QFrame); QMetaObject* QLabel_MetaObject(const QLabel* self); void* QLabel_Metacast(QLabel* self, const char* param1); struct miqt_string QLabel_Tr(const char* s); diff --git a/qt/gen_qlayout.cpp b/qt/gen_qlayout.cpp index a51f45bd..cd0c6974 100644 --- a/qt/gen_qlayout.cpp +++ b/qt/gen_qlayout.cpp @@ -617,18 +617,17 @@ public: }; -void QLayout_new(QWidget* parent, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQLayout* ret = new MiqtVirtualQLayout(parent); - *outptr_QLayout = ret; - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QLayout* QLayout_new(QWidget* parent) { + return new MiqtVirtualQLayout(parent); } -void QLayout_new2(QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQLayout* ret = new MiqtVirtualQLayout(); - *outptr_QLayout = ret; - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QLayout* QLayout_new2() { + return new MiqtVirtualQLayout(); +} + +void QLayout_virtbase(QLayout* src, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + *outptr_QObject = static_cast(src); + *outptr_QLayoutItem = static_cast(src); } QMetaObject* QLayout_MetaObject(const QLayout* self) { diff --git a/qt/gen_qlayout.go b/qt/gen_qlayout.go index ba526483..4804a6d6 100644 --- a/qt/gen_qlayout.go +++ b/qt/gen_qlayout.go @@ -47,46 +47,36 @@ func (this *QLayout) UnsafePointer() unsafe.Pointer { } // newQLayout constructs the type using only CGO pointers. -func newQLayout(h *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QLayout { +func newQLayout(h *C.QLayout) *QLayout { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + C.QLayout_virtbase(h, &outptr_QObject, &outptr_QLayoutItem) + return &QLayout{h: h, - QObject: newQObject(h_QObject), - QLayoutItem: newQLayoutItem(h_QLayoutItem)} + QObject: newQObject(outptr_QObject), + QLayoutItem: newQLayoutItem(outptr_QLayoutItem)} } // UnsafeNewQLayout constructs the type using only unsafe pointers. -func UnsafeNewQLayout(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QLayout { - if h == nil { - return nil - } - - return &QLayout{h: (*C.QLayout)(h), - QObject: UnsafeNewQObject(h_QObject), - QLayoutItem: UnsafeNewQLayoutItem(h_QLayoutItem)} +func UnsafeNewQLayout(h unsafe.Pointer) *QLayout { + return newQLayout((*C.QLayout)(h)) } // NewQLayout constructs a new QLayout object. func NewQLayout(parent *QWidget) *QLayout { - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QLayout_new(parent.cPointer(), &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQLayout(outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQLayout(C.QLayout_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQLayout2 constructs a new QLayout object. func NewQLayout2() *QLayout { - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QLayout_new2(&outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQLayout(outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQLayout(C.QLayout_new2()) ret.isSubclass = true return ret } @@ -180,11 +170,11 @@ func (this *QLayout) SetMenuBar(w *QWidget) { } func (this *QLayout) MenuBar() *QWidget { - return newQWidget(C.QLayout_MenuBar(this.h), nil, nil) + return newQWidget(C.QLayout_MenuBar(this.h)) } func (this *QLayout) ParentWidget() *QWidget { - return newQWidget(C.QLayout_ParentWidget(this.h), nil, nil) + return newQWidget(C.QLayout_ParentWidget(this.h)) } func (this *QLayout) Invalidate() { @@ -296,7 +286,7 @@ func (this *QLayout) TotalSizeHint() *QSize { } func (this *QLayout) Layout() *QLayout { - return newQLayout(C.QLayout_Layout(this.h), nil, nil) + return newQLayout(C.QLayout_Layout(this.h)) } func (this *QLayout) SetEnabled(enabled bool) { @@ -600,7 +590,7 @@ func miqt_exec_callback_QLayout_IndexOf(self *C.QLayout, cb C.intptr_t, param1 * } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(param1, nil, nil) + slotval1 := newQWidget(param1) virtualReturn := gofunc((&QLayout{h: self}).callVirtualBase_IndexOf, slotval1) @@ -679,7 +669,7 @@ func miqt_exec_callback_QLayout_ControlTypes(self *C.QLayout, cb C.intptr_t) C.i func (this *QLayout) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QLayout_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QLayout_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -722,7 +712,7 @@ func miqt_exec_callback_QLayout_ChildEvent(self *C.QLayout, cb C.intptr_t, e *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(e, nil) + slotval1 := newQChildEvent(e) gofunc((&QLayout{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -806,7 +796,7 @@ func miqt_exec_callback_QLayout_TimerEvent(self *C.QLayout, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QLayout{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -992,7 +982,7 @@ func miqt_exec_callback_QLayout_MinimumHeightForWidth(self *C.QLayout, cb C.intp func (this *QLayout) callVirtualBase_Widget() *QWidget { - return newQWidget(C.QLayout_virtualbase_Widget(unsafe.Pointer(this.h)), nil, nil) + return newQWidget(C.QLayout_virtualbase_Widget(unsafe.Pointer(this.h))) } func (this *QLayout) OnWidget(slot func(super func() *QWidget) *QWidget) { @@ -1017,7 +1007,7 @@ func miqt_exec_callback_QLayout_Widget(self *C.QLayout, cb C.intptr_t) *C.QWidge func (this *QLayout) callVirtualBase_SpacerItem() *QSpacerItem { - return newQSpacerItem(C.QLayout_virtualbase_SpacerItem(unsafe.Pointer(this.h)), nil) + return newQSpacerItem(C.QLayout_virtualbase_SpacerItem(unsafe.Pointer(this.h))) } func (this *QLayout) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { diff --git a/qt/gen_qlayout.h b/qt/gen_qlayout.h index d2501246..0f809238 100644 --- a/qt/gen_qlayout.h +++ b/qt/gen_qlayout.h @@ -44,8 +44,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QLayout_new(QWidget* parent, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QLayout_new2(QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +QLayout* QLayout_new(QWidget* parent); +QLayout* QLayout_new2(); +void QLayout_virtbase(QLayout* src, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QLayout_MetaObject(const QLayout* self); void* QLayout_Metacast(QLayout* self, const char* param1); struct miqt_string QLayout_Tr(const char* s); diff --git a/qt/gen_qlayoutitem.cpp b/qt/gen_qlayoutitem.cpp index 68872439..e0b1e94a 100644 --- a/qt/gen_qlayoutitem.cpp +++ b/qt/gen_qlayoutitem.cpp @@ -310,19 +310,16 @@ public: }; -void QLayoutItem_new(QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQLayoutItem* ret = new MiqtVirtualQLayoutItem(); - *outptr_QLayoutItem = ret; +QLayoutItem* QLayoutItem_new() { + return new MiqtVirtualQLayoutItem(); } -void QLayoutItem_new2(QLayoutItem* param1, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQLayoutItem* ret = new MiqtVirtualQLayoutItem(*param1); - *outptr_QLayoutItem = ret; +QLayoutItem* QLayoutItem_new2(QLayoutItem* param1) { + return new MiqtVirtualQLayoutItem(*param1); } -void QLayoutItem_new3(int alignment, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQLayoutItem* ret = new MiqtVirtualQLayoutItem(static_cast(alignment)); - *outptr_QLayoutItem = ret; +QLayoutItem* QLayoutItem_new3(int alignment) { + return new MiqtVirtualQLayoutItem(static_cast(alignment)); } QSize* QLayoutItem_SizeHint(const QLayoutItem* self) { @@ -847,28 +844,24 @@ public: }; -void QSpacerItem_new(int w, int h, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h)); - *outptr_QSpacerItem = ret; - *outptr_QLayoutItem = static_cast(ret); +QSpacerItem* QSpacerItem_new(int w, int h) { + return new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h)); } -void QSpacerItem_new2(QSpacerItem* param1, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(*param1); - *outptr_QSpacerItem = ret; - *outptr_QLayoutItem = static_cast(ret); +QSpacerItem* QSpacerItem_new2(QSpacerItem* param1) { + return new MiqtVirtualQSpacerItem(*param1); } -void QSpacerItem_new3(int w, int h, int hData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h), static_cast(hData)); - *outptr_QSpacerItem = ret; - *outptr_QLayoutItem = static_cast(ret); +QSpacerItem* QSpacerItem_new3(int w, int h, int hData) { + return new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h), static_cast(hData)); } -void QSpacerItem_new4(int w, int h, int hData, int vData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h), static_cast(hData), static_cast(vData)); - *outptr_QSpacerItem = ret; - *outptr_QLayoutItem = static_cast(ret); +QSpacerItem* QSpacerItem_new4(int w, int h, int hData, int vData) { + return new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h), static_cast(hData), static_cast(vData)); +} + +void QSpacerItem_virtbase(QSpacerItem* src, QLayoutItem** outptr_QLayoutItem) { + *outptr_QLayoutItem = static_cast(src); } void QSpacerItem_ChangeSize(QSpacerItem* self, int w, int h) { @@ -1396,10 +1389,12 @@ public: }; -void QWidgetItem_new(QWidget* w, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQWidgetItem* ret = new MiqtVirtualQWidgetItem(w); - *outptr_QWidgetItem = ret; - *outptr_QLayoutItem = static_cast(ret); +QWidgetItem* QWidgetItem_new(QWidget* w) { + return new MiqtVirtualQWidgetItem(w); +} + +void QWidgetItem_virtbase(QWidgetItem* src, QLayoutItem** outptr_QLayoutItem) { + *outptr_QLayoutItem = static_cast(src); } QSize* QWidgetItem_SizeHint(const QWidgetItem* self) { @@ -1834,11 +1829,12 @@ public: }; -void QWidgetItemV2_new(QWidget* widget, QWidgetItemV2** outptr_QWidgetItemV2, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQWidgetItemV2* ret = new MiqtVirtualQWidgetItemV2(widget); - *outptr_QWidgetItemV2 = ret; - *outptr_QWidgetItem = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QWidgetItemV2* QWidgetItemV2_new(QWidget* widget) { + return new MiqtVirtualQWidgetItemV2(widget); +} + +void QWidgetItemV2_virtbase(QWidgetItemV2* src, QWidgetItem** outptr_QWidgetItem) { + *outptr_QWidgetItem = static_cast(src); } QSize* QWidgetItemV2_SizeHint(const QWidgetItemV2* self) { diff --git a/qt/gen_qlayoutitem.go b/qt/gen_qlayoutitem.go index 41af7356..466e9186 100644 --- a/qt/gen_qlayoutitem.go +++ b/qt/gen_qlayoutitem.go @@ -38,44 +38,35 @@ func newQLayoutItem(h *C.QLayoutItem) *QLayoutItem { if h == nil { return nil } + return &QLayoutItem{h: h} } // UnsafeNewQLayoutItem constructs the type using only unsafe pointers. func UnsafeNewQLayoutItem(h unsafe.Pointer) *QLayoutItem { - if h == nil { - return nil - } - - return &QLayoutItem{h: (*C.QLayoutItem)(h)} + return newQLayoutItem((*C.QLayoutItem)(h)) } // NewQLayoutItem constructs a new QLayoutItem object. func NewQLayoutItem() *QLayoutItem { - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QLayoutItem_new(&outptr_QLayoutItem) - ret := newQLayoutItem(outptr_QLayoutItem) + ret := newQLayoutItem(C.QLayoutItem_new()) ret.isSubclass = true return ret } // NewQLayoutItem2 constructs a new QLayoutItem object. func NewQLayoutItem2(param1 *QLayoutItem) *QLayoutItem { - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QLayoutItem_new2(param1.cPointer(), &outptr_QLayoutItem) - ret := newQLayoutItem(outptr_QLayoutItem) + ret := newQLayoutItem(C.QLayoutItem_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQLayoutItem3 constructs a new QLayoutItem object. func NewQLayoutItem3(alignment AlignmentFlag) *QLayoutItem { - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QLayoutItem_new3((C.int)(alignment), &outptr_QLayoutItem) - ret := newQLayoutItem(outptr_QLayoutItem) + ret := newQLayoutItem(C.QLayoutItem_new3((C.int)(alignment))) ret.isSubclass = true return ret } @@ -133,15 +124,15 @@ func (this *QLayoutItem) Invalidate() { } func (this *QLayoutItem) Widget() *QWidget { - return newQWidget(C.QLayoutItem_Widget(this.h), nil, nil) + return newQWidget(C.QLayoutItem_Widget(this.h)) } func (this *QLayoutItem) Layout() *QLayout { - return newQLayout(C.QLayoutItem_Layout(this.h), nil, nil) + return newQLayout(C.QLayoutItem_Layout(this.h)) } func (this *QLayoutItem) SpacerItem() *QSpacerItem { - return newQSpacerItem(C.QLayoutItem_SpacerItem(this.h), nil) + return newQSpacerItem(C.QLayoutItem_SpacerItem(this.h)) } func (this *QLayoutItem) Alignment() AlignmentFlag { @@ -396,7 +387,7 @@ func miqt_exec_callback_QLayoutItem_Invalidate(self *C.QLayoutItem, cb C.intptr_ func (this *QLayoutItem) callVirtualBase_Widget() *QWidget { - return newQWidget(C.QLayoutItem_virtualbase_Widget(unsafe.Pointer(this.h)), nil, nil) + return newQWidget(C.QLayoutItem_virtualbase_Widget(unsafe.Pointer(this.h))) } func (this *QLayoutItem) OnWidget(slot func(super func() *QWidget) *QWidget) { @@ -421,7 +412,7 @@ func miqt_exec_callback_QLayoutItem_Widget(self *C.QLayoutItem, cb C.intptr_t) * func (this *QLayoutItem) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QLayoutItem_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QLayoutItem_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QLayoutItem) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -446,7 +437,7 @@ func miqt_exec_callback_QLayoutItem_Layout(self *C.QLayoutItem, cb C.intptr_t) * func (this *QLayoutItem) callVirtualBase_SpacerItem() *QSpacerItem { - return newQSpacerItem(C.QLayoutItem_virtualbase_SpacerItem(unsafe.Pointer(this.h)), nil) + return newQSpacerItem(C.QLayoutItem_virtualbase_SpacerItem(unsafe.Pointer(this.h))) } func (this *QLayoutItem) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { @@ -529,64 +520,50 @@ func (this *QSpacerItem) UnsafePointer() unsafe.Pointer { } // newQSpacerItem constructs the type using only CGO pointers. -func newQSpacerItem(h *C.QSpacerItem, h_QLayoutItem *C.QLayoutItem) *QSpacerItem { +func newQSpacerItem(h *C.QSpacerItem) *QSpacerItem { if h == nil { return nil } + var outptr_QLayoutItem *C.QLayoutItem = nil + C.QSpacerItem_virtbase(h, &outptr_QLayoutItem) + return &QSpacerItem{h: h, - QLayoutItem: newQLayoutItem(h_QLayoutItem)} + QLayoutItem: newQLayoutItem(outptr_QLayoutItem)} } // UnsafeNewQSpacerItem constructs the type using only unsafe pointers. -func UnsafeNewQSpacerItem(h unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QSpacerItem { - if h == nil { - return nil - } - - return &QSpacerItem{h: (*C.QSpacerItem)(h), - QLayoutItem: UnsafeNewQLayoutItem(h_QLayoutItem)} +func UnsafeNewQSpacerItem(h unsafe.Pointer) *QSpacerItem { + return newQSpacerItem((*C.QSpacerItem)(h)) } // NewQSpacerItem constructs a new QSpacerItem object. func NewQSpacerItem(w int, h int) *QSpacerItem { - var outptr_QSpacerItem *C.QSpacerItem = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QSpacerItem_new((C.int)(w), (C.int)(h), &outptr_QSpacerItem, &outptr_QLayoutItem) - ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret := newQSpacerItem(C.QSpacerItem_new((C.int)(w), (C.int)(h))) ret.isSubclass = true return ret } // NewQSpacerItem2 constructs a new QSpacerItem object. func NewQSpacerItem2(param1 *QSpacerItem) *QSpacerItem { - var outptr_QSpacerItem *C.QSpacerItem = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QSpacerItem_new2(param1.cPointer(), &outptr_QSpacerItem, &outptr_QLayoutItem) - ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret := newQSpacerItem(C.QSpacerItem_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQSpacerItem3 constructs a new QSpacerItem object. func NewQSpacerItem3(w int, h int, hData QSizePolicy__Policy) *QSpacerItem { - var outptr_QSpacerItem *C.QSpacerItem = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QSpacerItem_new3((C.int)(w), (C.int)(h), (C.int)(hData), &outptr_QSpacerItem, &outptr_QLayoutItem) - ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret := newQSpacerItem(C.QSpacerItem_new3((C.int)(w), (C.int)(h), (C.int)(hData))) ret.isSubclass = true return ret } // NewQSpacerItem4 constructs a new QSpacerItem object. func NewQSpacerItem4(w int, h int, hData QSizePolicy__Policy, vData QSizePolicy__Policy) *QSpacerItem { - var outptr_QSpacerItem *C.QSpacerItem = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QSpacerItem_new4((C.int)(w), (C.int)(h), (C.int)(hData), (C.int)(vData), &outptr_QSpacerItem, &outptr_QLayoutItem) - ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret := newQSpacerItem(C.QSpacerItem_new4((C.int)(w), (C.int)(h), (C.int)(hData), (C.int)(vData))) ret.isSubclass = true return ret } @@ -632,7 +609,7 @@ func (this *QSpacerItem) Geometry() *QRect { } func (this *QSpacerItem) SpacerItem() *QSpacerItem { - return newQSpacerItem(C.QSpacerItem_SpacerItem(this.h), nil) + return newQSpacerItem(C.QSpacerItem_SpacerItem(this.h)) } func (this *QSpacerItem) SizePolicy() *QSizePolicy { @@ -835,7 +812,7 @@ func miqt_exec_callback_QSpacerItem_Geometry(self *C.QSpacerItem, cb C.intptr_t) func (this *QSpacerItem) callVirtualBase_SpacerItem() *QSpacerItem { - return newQSpacerItem(C.QSpacerItem_virtualbase_SpacerItem(unsafe.Pointer(this.h)), nil) + return newQSpacerItem(C.QSpacerItem_virtualbase_SpacerItem(unsafe.Pointer(this.h))) } func (this *QSpacerItem) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { @@ -964,7 +941,7 @@ func miqt_exec_callback_QSpacerItem_Invalidate(self *C.QSpacerItem, cb C.intptr_ func (this *QSpacerItem) callVirtualBase_Widget() *QWidget { - return newQWidget(C.QSpacerItem_virtualbase_Widget(unsafe.Pointer(this.h)), nil, nil) + return newQWidget(C.QSpacerItem_virtualbase_Widget(unsafe.Pointer(this.h))) } func (this *QSpacerItem) OnWidget(slot func(super func() *QWidget) *QWidget) { @@ -989,7 +966,7 @@ func miqt_exec_callback_QSpacerItem_Widget(self *C.QSpacerItem, cb C.intptr_t) * func (this *QSpacerItem) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QSpacerItem_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QSpacerItem_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QSpacerItem) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -1072,31 +1049,26 @@ func (this *QWidgetItem) UnsafePointer() unsafe.Pointer { } // newQWidgetItem constructs the type using only CGO pointers. -func newQWidgetItem(h *C.QWidgetItem, h_QLayoutItem *C.QLayoutItem) *QWidgetItem { +func newQWidgetItem(h *C.QWidgetItem) *QWidgetItem { if h == nil { return nil } + var outptr_QLayoutItem *C.QLayoutItem = nil + C.QWidgetItem_virtbase(h, &outptr_QLayoutItem) + return &QWidgetItem{h: h, - QLayoutItem: newQLayoutItem(h_QLayoutItem)} + QLayoutItem: newQLayoutItem(outptr_QLayoutItem)} } // UnsafeNewQWidgetItem constructs the type using only unsafe pointers. -func UnsafeNewQWidgetItem(h unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QWidgetItem { - if h == nil { - return nil - } - - return &QWidgetItem{h: (*C.QWidgetItem)(h), - QLayoutItem: UnsafeNewQLayoutItem(h_QLayoutItem)} +func UnsafeNewQWidgetItem(h unsafe.Pointer) *QWidgetItem { + return newQWidgetItem((*C.QWidgetItem)(h)) } // NewQWidgetItem constructs a new QWidgetItem object. func NewQWidgetItem(w *QWidget) *QWidgetItem { - var outptr_QWidgetItem *C.QWidgetItem = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QWidgetItem_new(w.cPointer(), &outptr_QWidgetItem, &outptr_QLayoutItem) - ret := newQWidgetItem(outptr_QWidgetItem, outptr_QLayoutItem) + ret := newQWidgetItem(C.QWidgetItem_new(w.cPointer())) ret.isSubclass = true return ret } @@ -1138,7 +1110,7 @@ func (this *QWidgetItem) Geometry() *QRect { } func (this *QWidgetItem) Widget() *QWidget { - return newQWidget(C.QWidgetItem_Widget(this.h), nil, nil) + return newQWidget(C.QWidgetItem_Widget(this.h)) } func (this *QWidgetItem) HasHeightForWidth() bool { @@ -1339,7 +1311,7 @@ func miqt_exec_callback_QWidgetItem_Geometry(self *C.QWidgetItem, cb C.intptr_t) func (this *QWidgetItem) callVirtualBase_Widget() *QWidget { - return newQWidget(C.QWidgetItem_virtualbase_Widget(unsafe.Pointer(this.h)), nil, nil) + return newQWidget(C.QWidgetItem_virtualbase_Widget(unsafe.Pointer(this.h))) } func (this *QWidgetItem) OnWidget(slot func(super func() *QWidget) *QWidget) { @@ -1493,7 +1465,7 @@ func miqt_exec_callback_QWidgetItem_Invalidate(self *C.QWidgetItem, cb C.intptr_ func (this *QWidgetItem) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QWidgetItem_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QWidgetItem_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QWidgetItem) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -1518,7 +1490,7 @@ func miqt_exec_callback_QWidgetItem_Layout(self *C.QWidgetItem, cb C.intptr_t) * func (this *QWidgetItem) callVirtualBase_SpacerItem() *QSpacerItem { - return newQSpacerItem(C.QWidgetItem_virtualbase_SpacerItem(unsafe.Pointer(this.h)), nil) + return newQSpacerItem(C.QWidgetItem_virtualbase_SpacerItem(unsafe.Pointer(this.h))) } func (this *QWidgetItem) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { @@ -1576,32 +1548,26 @@ func (this *QWidgetItemV2) UnsafePointer() unsafe.Pointer { } // newQWidgetItemV2 constructs the type using only CGO pointers. -func newQWidgetItemV2(h *C.QWidgetItemV2, h_QWidgetItem *C.QWidgetItem, h_QLayoutItem *C.QLayoutItem) *QWidgetItemV2 { +func newQWidgetItemV2(h *C.QWidgetItemV2) *QWidgetItemV2 { if h == nil { return nil } + var outptr_QWidgetItem *C.QWidgetItem = nil + C.QWidgetItemV2_virtbase(h, &outptr_QWidgetItem) + return &QWidgetItemV2{h: h, - QWidgetItem: newQWidgetItem(h_QWidgetItem, h_QLayoutItem)} + QWidgetItem: newQWidgetItem(outptr_QWidgetItem)} } // UnsafeNewQWidgetItemV2 constructs the type using only unsafe pointers. -func UnsafeNewQWidgetItemV2(h unsafe.Pointer, h_QWidgetItem unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QWidgetItemV2 { - if h == nil { - return nil - } - - return &QWidgetItemV2{h: (*C.QWidgetItemV2)(h), - QWidgetItem: UnsafeNewQWidgetItem(h_QWidgetItem, h_QLayoutItem)} +func UnsafeNewQWidgetItemV2(h unsafe.Pointer) *QWidgetItemV2 { + return newQWidgetItemV2((*C.QWidgetItemV2)(h)) } // NewQWidgetItemV2 constructs a new QWidgetItemV2 object. func NewQWidgetItemV2(widget *QWidget) *QWidgetItemV2 { - var outptr_QWidgetItemV2 *C.QWidgetItemV2 = nil - var outptr_QWidgetItem *C.QWidgetItem = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QWidgetItemV2_new(widget.cPointer(), &outptr_QWidgetItemV2, &outptr_QWidgetItem, &outptr_QLayoutItem) - ret := newQWidgetItemV2(outptr_QWidgetItemV2, outptr_QWidgetItem, outptr_QLayoutItem) + ret := newQWidgetItemV2(C.QWidgetItemV2_new(widget.cPointer())) ret.isSubclass = true return ret } @@ -1842,7 +1808,7 @@ func miqt_exec_callback_QWidgetItemV2_Geometry(self *C.QWidgetItemV2, cb C.intpt func (this *QWidgetItemV2) callVirtualBase_Widget() *QWidget { - return newQWidget(C.QWidgetItemV2_virtualbase_Widget(unsafe.Pointer(this.h)), nil, nil) + return newQWidget(C.QWidgetItemV2_virtualbase_Widget(unsafe.Pointer(this.h))) } func (this *QWidgetItemV2) OnWidget(slot func(super func() *QWidget) *QWidget) { diff --git a/qt/gen_qlayoutitem.h b/qt/gen_qlayoutitem.h index b593e34a..729f475e 100644 --- a/qt/gen_qlayoutitem.h +++ b/qt/gen_qlayoutitem.h @@ -36,9 +36,9 @@ typedef struct QWidgetItem QWidgetItem; typedef struct QWidgetItemV2 QWidgetItemV2; #endif -void QLayoutItem_new(QLayoutItem** outptr_QLayoutItem); -void QLayoutItem_new2(QLayoutItem* param1, QLayoutItem** outptr_QLayoutItem); -void QLayoutItem_new3(int alignment, QLayoutItem** outptr_QLayoutItem); +QLayoutItem* QLayoutItem_new(); +QLayoutItem* QLayoutItem_new2(QLayoutItem* param1); +QLayoutItem* QLayoutItem_new3(int alignment); QSize* QLayoutItem_SizeHint(const QLayoutItem* self); QSize* QLayoutItem_MinimumSize(const QLayoutItem* self); QSize* QLayoutItem_MaximumSize(const QLayoutItem* self); @@ -88,10 +88,11 @@ void QLayoutItem_override_virtual_ControlTypes(void* self, intptr_t slot); int QLayoutItem_virtualbase_ControlTypes(const void* self); void QLayoutItem_Delete(QLayoutItem* self, bool isSubclass); -void QSpacerItem_new(int w, int h, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); -void QSpacerItem_new2(QSpacerItem* param1, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); -void QSpacerItem_new3(int w, int h, int hData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); -void QSpacerItem_new4(int w, int h, int hData, int vData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); +QSpacerItem* QSpacerItem_new(int w, int h); +QSpacerItem* QSpacerItem_new2(QSpacerItem* param1); +QSpacerItem* QSpacerItem_new3(int w, int h, int hData); +QSpacerItem* QSpacerItem_new4(int w, int h, int hData, int vData); +void QSpacerItem_virtbase(QSpacerItem* src, QLayoutItem** outptr_QLayoutItem); void QSpacerItem_ChangeSize(QSpacerItem* self, int w, int h); QSize* QSpacerItem_SizeHint(const QSpacerItem* self); QSize* QSpacerItem_MinimumSize(const QSpacerItem* self); @@ -136,7 +137,8 @@ void QSpacerItem_override_virtual_ControlTypes(void* self, intptr_t slot); int QSpacerItem_virtualbase_ControlTypes(const void* self); void QSpacerItem_Delete(QSpacerItem* self, bool isSubclass); -void QWidgetItem_new(QWidget* w, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem); +QWidgetItem* QWidgetItem_new(QWidget* w); +void QWidgetItem_virtbase(QWidgetItem* src, QLayoutItem** outptr_QLayoutItem); QSize* QWidgetItem_SizeHint(const QWidgetItem* self); QSize* QWidgetItem_MinimumSize(const QWidgetItem* self); QSize* QWidgetItem_MaximumSize(const QWidgetItem* self); @@ -180,7 +182,8 @@ void QWidgetItem_override_virtual_SpacerItem(void* self, intptr_t slot); QSpacerItem* QWidgetItem_virtualbase_SpacerItem(void* self); void QWidgetItem_Delete(QWidgetItem* self, bool isSubclass); -void QWidgetItemV2_new(QWidget* widget, QWidgetItemV2** outptr_QWidgetItemV2, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem); +QWidgetItemV2* QWidgetItemV2_new(QWidget* widget); +void QWidgetItemV2_virtbase(QWidgetItemV2* src, QWidgetItem** outptr_QWidgetItem); QSize* QWidgetItemV2_SizeHint(const QWidgetItemV2* self); QSize* QWidgetItemV2_MinimumSize(const QWidgetItemV2* self); QSize* QWidgetItemV2_MaximumSize(const QWidgetItemV2* self); diff --git a/qt/gen_qlcdnumber.cpp b/qt/gen_qlcdnumber.cpp index e8e616fb..ff2241a6 100644 --- a/qt/gen_qlcdnumber.cpp +++ b/qt/gen_qlcdnumber.cpp @@ -119,40 +119,24 @@ public: }; -void QLCDNumber_new(QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(parent); - *outptr_QLCDNumber = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLCDNumber* QLCDNumber_new(QWidget* parent) { + return new MiqtVirtualQLCDNumber(parent); } -void QLCDNumber_new2(QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(); - *outptr_QLCDNumber = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLCDNumber* QLCDNumber_new2() { + return new MiqtVirtualQLCDNumber(); } -void QLCDNumber_new3(unsigned int numDigits, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(static_cast(numDigits)); - *outptr_QLCDNumber = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLCDNumber* QLCDNumber_new3(unsigned int numDigits) { + return new MiqtVirtualQLCDNumber(static_cast(numDigits)); } -void QLCDNumber_new4(unsigned int numDigits, QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(static_cast(numDigits), parent); - *outptr_QLCDNumber = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLCDNumber* QLCDNumber_new4(unsigned int numDigits, QWidget* parent) { + return new MiqtVirtualQLCDNumber(static_cast(numDigits), parent); +} + +void QLCDNumber_virtbase(QLCDNumber* src, QFrame** outptr_QFrame) { + *outptr_QFrame = static_cast(src); } QMetaObject* QLCDNumber_MetaObject(const QLCDNumber* self) { diff --git a/qt/gen_qlcdnumber.go b/qt/gen_qlcdnumber.go index 6c0d690a..7ff7aa78 100644 --- a/qt/gen_qlcdnumber.go +++ b/qt/gen_qlcdnumber.go @@ -52,76 +52,50 @@ func (this *QLCDNumber) UnsafePointer() unsafe.Pointer { } // newQLCDNumber constructs the type using only CGO pointers. -func newQLCDNumber(h *C.QLCDNumber, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QLCDNumber { +func newQLCDNumber(h *C.QLCDNumber) *QLCDNumber { if h == nil { return nil } + var outptr_QFrame *C.QFrame = nil + C.QLCDNumber_virtbase(h, &outptr_QFrame) + return &QLCDNumber{h: h, - QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QFrame: newQFrame(outptr_QFrame)} } // UnsafeNewQLCDNumber constructs the type using only unsafe pointers. -func UnsafeNewQLCDNumber(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QLCDNumber { - if h == nil { - return nil - } - - return &QLCDNumber{h: (*C.QLCDNumber)(h), - QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQLCDNumber(h unsafe.Pointer) *QLCDNumber { + return newQLCDNumber((*C.QLCDNumber)(h)) } // NewQLCDNumber constructs a new QLCDNumber object. func NewQLCDNumber(parent *QWidget) *QLCDNumber { - var outptr_QLCDNumber *C.QLCDNumber = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLCDNumber_new(parent.cPointer(), &outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLCDNumber(C.QLCDNumber_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQLCDNumber2 constructs a new QLCDNumber object. func NewQLCDNumber2() *QLCDNumber { - var outptr_QLCDNumber *C.QLCDNumber = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLCDNumber_new2(&outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLCDNumber(C.QLCDNumber_new2()) ret.isSubclass = true return ret } // NewQLCDNumber3 constructs a new QLCDNumber object. func NewQLCDNumber3(numDigits uint) *QLCDNumber { - var outptr_QLCDNumber *C.QLCDNumber = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLCDNumber_new3((C.uint)(numDigits), &outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLCDNumber(C.QLCDNumber_new3((C.uint)(numDigits))) ret.isSubclass = true return ret } // NewQLCDNumber4 constructs a new QLCDNumber object. func NewQLCDNumber4(numDigits uint, parent *QWidget) *QLCDNumber { - var outptr_QLCDNumber *C.QLCDNumber = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLCDNumber_new4((C.uint)(numDigits), parent.cPointer(), &outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLCDNumber(C.QLCDNumber_new4((C.uint)(numDigits), parent.cPointer())) ret.isSubclass = true return ret } @@ -376,7 +350,7 @@ func miqt_exec_callback_QLCDNumber_PaintEvent(self *C.QLCDNumber, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QLCDNumber{h: self}).callVirtualBase_PaintEvent, slotval1) diff --git a/qt/gen_qlcdnumber.h b/qt/gen_qlcdnumber.h index 3c037599..855af8a3 100644 --- a/qt/gen_qlcdnumber.h +++ b/qt/gen_qlcdnumber.h @@ -36,10 +36,11 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QLCDNumber_new(QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLCDNumber_new2(QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLCDNumber_new3(unsigned int numDigits, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLCDNumber_new4(unsigned int numDigits, QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QLCDNumber* QLCDNumber_new(QWidget* parent); +QLCDNumber* QLCDNumber_new2(); +QLCDNumber* QLCDNumber_new3(unsigned int numDigits); +QLCDNumber* QLCDNumber_new4(unsigned int numDigits, QWidget* parent); +void QLCDNumber_virtbase(QLCDNumber* src, QFrame** outptr_QFrame); QMetaObject* QLCDNumber_MetaObject(const QLCDNumber* self); void* QLCDNumber_Metacast(QLCDNumber* self, const char* param1); struct miqt_string QLCDNumber_Tr(const char* s); diff --git a/qt/gen_qlibrary.cpp b/qt/gen_qlibrary.cpp index e2961bb3..fcce6fad 100644 --- a/qt/gen_qlibrary.cpp +++ b/qt/gen_qlibrary.cpp @@ -199,60 +199,48 @@ public: }; -void QLibrary_new(QLibrary** outptr_QLibrary, QObject** outptr_QObject) { - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); +QLibrary* QLibrary_new() { + return new MiqtVirtualQLibrary(); } -void QLibrary_new2(struct miqt_string fileName, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { +QLibrary* QLibrary_new2(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQLibrary(fileName_QString); } -void QLibrary_new3(struct miqt_string fileName, int verNum, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { +QLibrary* QLibrary_new3(struct miqt_string fileName, int verNum) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, static_cast(verNum)); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQLibrary(fileName_QString, static_cast(verNum)); } -void QLibrary_new4(struct miqt_string fileName, struct miqt_string version, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { +QLibrary* QLibrary_new4(struct miqt_string fileName, struct miqt_string version) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QString version_QString = QString::fromUtf8(version.data, version.len); - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, version_QString); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQLibrary(fileName_QString, version_QString); } -void QLibrary_new5(QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(parent); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); +QLibrary* QLibrary_new5(QObject* parent) { + return new MiqtVirtualQLibrary(parent); } -void QLibrary_new6(struct miqt_string fileName, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { +QLibrary* QLibrary_new6(struct miqt_string fileName, QObject* parent) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, parent); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQLibrary(fileName_QString, parent); } -void QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { +QLibrary* QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, static_cast(verNum), parent); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQLibrary(fileName_QString, static_cast(verNum), parent); } -void QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { +QLibrary* QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QString version_QString = QString::fromUtf8(version.data, version.len); - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, version_QString, parent); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQLibrary(fileName_QString, version_QString, parent); +} + +void QLibrary_virtbase(QLibrary* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QLibrary_MetaObject(const QLibrary* self) { diff --git a/qt/gen_qlibrary.go b/qt/gen_qlibrary.go index 6f977724..f30de40c 100644 --- a/qt/gen_qlibrary.go +++ b/qt/gen_qlibrary.go @@ -45,31 +45,26 @@ func (this *QLibrary) UnsafePointer() unsafe.Pointer { } // newQLibrary constructs the type using only CGO pointers. -func newQLibrary(h *C.QLibrary, h_QObject *C.QObject) *QLibrary { +func newQLibrary(h *C.QLibrary) *QLibrary { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QLibrary_virtbase(h, &outptr_QObject) + return &QLibrary{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQLibrary constructs the type using only unsafe pointers. -func UnsafeNewQLibrary(h unsafe.Pointer, h_QObject unsafe.Pointer) *QLibrary { - if h == nil { - return nil - } - - return &QLibrary{h: (*C.QLibrary)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQLibrary(h unsafe.Pointer) *QLibrary { + return newQLibrary((*C.QLibrary)(h)) } // NewQLibrary constructs a new QLibrary object. func NewQLibrary() *QLibrary { - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new(&outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new()) ret.isSubclass = true return ret } @@ -80,11 +75,8 @@ func NewQLibrary2(fileName string) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new2(fileName_ms, &outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new2(fileName_ms)) ret.isSubclass = true return ret } @@ -95,11 +87,8 @@ func NewQLibrary3(fileName string, verNum int) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new3(fileName_ms, (C.int)(verNum), &outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new3(fileName_ms, (C.int)(verNum))) ret.isSubclass = true return ret } @@ -114,22 +103,16 @@ func NewQLibrary4(fileName string, version string) *QLibrary { version_ms.data = C.CString(version) version_ms.len = C.size_t(len(version)) defer C.free(unsafe.Pointer(version_ms.data)) - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new4(fileName_ms, version_ms, &outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new4(fileName_ms, version_ms)) ret.isSubclass = true return ret } // NewQLibrary5 constructs a new QLibrary object. func NewQLibrary5(parent *QObject) *QLibrary { - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new5(parent.cPointer(), &outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new5(parent.cPointer())) ret.isSubclass = true return ret } @@ -140,11 +123,8 @@ func NewQLibrary6(fileName string, parent *QObject) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new6(fileName_ms, parent.cPointer(), &outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new6(fileName_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -155,11 +135,8 @@ func NewQLibrary7(fileName string, verNum int, parent *QObject) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new7(fileName_ms, (C.int)(verNum), parent.cPointer(), &outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new7(fileName_ms, (C.int)(verNum), parent.cPointer())) ret.isSubclass = true return ret } @@ -174,11 +151,8 @@ func NewQLibrary8(fileName string, version string, parent *QObject) *QLibrary { version_ms.data = C.CString(version) version_ms.len = C.size_t(len(version)) defer C.free(unsafe.Pointer(version_ms.data)) - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new8(fileName_ms, version_ms, parent.cPointer(), &outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new8(fileName_ms, version_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -403,7 +377,7 @@ func miqt_exec_callback_QLibrary_TimerEvent(self *C.QLibrary, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QLibrary{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -429,7 +403,7 @@ func miqt_exec_callback_QLibrary_ChildEvent(self *C.QLibrary, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QLibrary{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qlibrary.h b/qt/gen_qlibrary.h index 8cb05154..a8b1349c 100644 --- a/qt/gen_qlibrary.h +++ b/qt/gen_qlibrary.h @@ -32,14 +32,15 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QLibrary_new(QLibrary** outptr_QLibrary, QObject** outptr_QObject); -void QLibrary_new2(struct miqt_string fileName, QLibrary** outptr_QLibrary, QObject** outptr_QObject); -void QLibrary_new3(struct miqt_string fileName, int verNum, QLibrary** outptr_QLibrary, QObject** outptr_QObject); -void QLibrary_new4(struct miqt_string fileName, struct miqt_string version, QLibrary** outptr_QLibrary, QObject** outptr_QObject); -void QLibrary_new5(QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); -void QLibrary_new6(struct miqt_string fileName, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); -void QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); -void QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); +QLibrary* QLibrary_new(); +QLibrary* QLibrary_new2(struct miqt_string fileName); +QLibrary* QLibrary_new3(struct miqt_string fileName, int verNum); +QLibrary* QLibrary_new4(struct miqt_string fileName, struct miqt_string version); +QLibrary* QLibrary_new5(QObject* parent); +QLibrary* QLibrary_new6(struct miqt_string fileName, QObject* parent); +QLibrary* QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent); +QLibrary* QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent); +void QLibrary_virtbase(QLibrary* src, QObject** outptr_QObject); QMetaObject* QLibrary_MetaObject(const QLibrary* self); void* QLibrary_Metacast(QLibrary* self, const char* param1); struct miqt_string QLibrary_Tr(const char* s); diff --git a/qt/gen_qlibraryinfo.go b/qt/gen_qlibraryinfo.go index 4d011822..78147a57 100644 --- a/qt/gen_qlibraryinfo.go +++ b/qt/gen_qlibraryinfo.go @@ -57,16 +57,13 @@ func newQLibraryInfo(h *C.QLibraryInfo) *QLibraryInfo { if h == nil { return nil } + return &QLibraryInfo{h: h} } // UnsafeNewQLibraryInfo constructs the type using only unsafe pointers. func UnsafeNewQLibraryInfo(h unsafe.Pointer) *QLibraryInfo { - if h == nil { - return nil - } - - return &QLibraryInfo{h: (*C.QLibraryInfo)(h)} + return newQLibraryInfo((*C.QLibraryInfo)(h)) } func QLibraryInfo_Licensee() string { diff --git a/qt/gen_qline.cpp b/qt/gen_qline.cpp index e11517aa..e690e67e 100644 --- a/qt/gen_qline.cpp +++ b/qt/gen_qline.cpp @@ -6,24 +6,20 @@ #include "gen_qline.h" #include "_cgo_export.h" -void QLine_new(QLine** outptr_QLine) { - QLine* ret = new QLine(); - *outptr_QLine = ret; +QLine* QLine_new() { + return new QLine(); } -void QLine_new2(QPoint* pt1, QPoint* pt2, QLine** outptr_QLine) { - QLine* ret = new QLine(*pt1, *pt2); - *outptr_QLine = ret; +QLine* QLine_new2(QPoint* pt1, QPoint* pt2) { + return new QLine(*pt1, *pt2); } -void QLine_new3(int x1, int y1, int x2, int y2, QLine** outptr_QLine) { - QLine* ret = new QLine(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); - *outptr_QLine = ret; +QLine* QLine_new3(int x1, int y1, int x2, int y2) { + return new QLine(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); } -void QLine_new4(QLine* param1, QLine** outptr_QLine) { - QLine* ret = new QLine(*param1); - *outptr_QLine = ret; +QLine* QLine_new4(QLine* param1) { + return new QLine(*param1); } bool QLine_IsNull(const QLine* self) { @@ -114,29 +110,24 @@ void QLine_Delete(QLine* self, bool isSubclass) { } } -void QLineF_new(QLineF** outptr_QLineF) { - QLineF* ret = new QLineF(); - *outptr_QLineF = ret; +QLineF* QLineF_new() { + return new QLineF(); } -void QLineF_new2(QPointF* pt1, QPointF* pt2, QLineF** outptr_QLineF) { - QLineF* ret = new QLineF(*pt1, *pt2); - *outptr_QLineF = ret; +QLineF* QLineF_new2(QPointF* pt1, QPointF* pt2) { + return new QLineF(*pt1, *pt2); } -void QLineF_new3(double x1, double y1, double x2, double y2, QLineF** outptr_QLineF) { - QLineF* ret = new QLineF(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); - *outptr_QLineF = ret; +QLineF* QLineF_new3(double x1, double y1, double x2, double y2) { + return new QLineF(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); } -void QLineF_new4(QLine* line, QLineF** outptr_QLineF) { - QLineF* ret = new QLineF(*line); - *outptr_QLineF = ret; +QLineF* QLineF_new4(QLine* line) { + return new QLineF(*line); } -void QLineF_new5(QLineF* param1, QLineF** outptr_QLineF) { - QLineF* ret = new QLineF(*param1); - *outptr_QLineF = ret; +QLineF* QLineF_new5(QLineF* param1) { + return new QLineF(*param1); } QLineF* QLineF_FromPolar(double length, double angle) { diff --git a/qt/gen_qline.go b/qt/gen_qline.go index 15d3ab31..7a87f9c4 100644 --- a/qt/gen_qline.go +++ b/qt/gen_qline.go @@ -45,54 +45,43 @@ func newQLine(h *C.QLine) *QLine { if h == nil { return nil } + return &QLine{h: h} } // UnsafeNewQLine constructs the type using only unsafe pointers. func UnsafeNewQLine(h unsafe.Pointer) *QLine { - if h == nil { - return nil - } - - return &QLine{h: (*C.QLine)(h)} + return newQLine((*C.QLine)(h)) } // NewQLine constructs a new QLine object. func NewQLine() *QLine { - var outptr_QLine *C.QLine = nil - C.QLine_new(&outptr_QLine) - ret := newQLine(outptr_QLine) + ret := newQLine(C.QLine_new()) ret.isSubclass = true return ret } // NewQLine2 constructs a new QLine object. func NewQLine2(pt1 *QPoint, pt2 *QPoint) *QLine { - var outptr_QLine *C.QLine = nil - C.QLine_new2(pt1.cPointer(), pt2.cPointer(), &outptr_QLine) - ret := newQLine(outptr_QLine) + ret := newQLine(C.QLine_new2(pt1.cPointer(), pt2.cPointer())) ret.isSubclass = true return ret } // NewQLine3 constructs a new QLine object. func NewQLine3(x1 int, y1 int, x2 int, y2 int) *QLine { - var outptr_QLine *C.QLine = nil - C.QLine_new3((C.int)(x1), (C.int)(y1), (C.int)(x2), (C.int)(y2), &outptr_QLine) - ret := newQLine(outptr_QLine) + ret := newQLine(C.QLine_new3((C.int)(x1), (C.int)(y1), (C.int)(x2), (C.int)(y2))) ret.isSubclass = true return ret } // NewQLine4 constructs a new QLine object. func NewQLine4(param1 *QLine) *QLine { - var outptr_QLine *C.QLine = nil - C.QLine_new4(param1.cPointer(), &outptr_QLine) - ret := newQLine(outptr_QLine) + ret := newQLine(C.QLine_new4(param1.cPointer())) ret.isSubclass = true return ret } @@ -225,64 +214,51 @@ func newQLineF(h *C.QLineF) *QLineF { if h == nil { return nil } + return &QLineF{h: h} } // UnsafeNewQLineF constructs the type using only unsafe pointers. func UnsafeNewQLineF(h unsafe.Pointer) *QLineF { - if h == nil { - return nil - } - - return &QLineF{h: (*C.QLineF)(h)} + return newQLineF((*C.QLineF)(h)) } // NewQLineF constructs a new QLineF object. func NewQLineF() *QLineF { - var outptr_QLineF *C.QLineF = nil - C.QLineF_new(&outptr_QLineF) - ret := newQLineF(outptr_QLineF) + ret := newQLineF(C.QLineF_new()) ret.isSubclass = true return ret } // NewQLineF2 constructs a new QLineF object. func NewQLineF2(pt1 *QPointF, pt2 *QPointF) *QLineF { - var outptr_QLineF *C.QLineF = nil - C.QLineF_new2(pt1.cPointer(), pt2.cPointer(), &outptr_QLineF) - ret := newQLineF(outptr_QLineF) + ret := newQLineF(C.QLineF_new2(pt1.cPointer(), pt2.cPointer())) ret.isSubclass = true return ret } // NewQLineF3 constructs a new QLineF object. func NewQLineF3(x1 float64, y1 float64, x2 float64, y2 float64) *QLineF { - var outptr_QLineF *C.QLineF = nil - C.QLineF_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), &outptr_QLineF) - ret := newQLineF(outptr_QLineF) + ret := newQLineF(C.QLineF_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2))) ret.isSubclass = true return ret } // NewQLineF4 constructs a new QLineF object. func NewQLineF4(line *QLine) *QLineF { - var outptr_QLineF *C.QLineF = nil - C.QLineF_new4(line.cPointer(), &outptr_QLineF) - ret := newQLineF(outptr_QLineF) + ret := newQLineF(C.QLineF_new4(line.cPointer())) ret.isSubclass = true return ret } // NewQLineF5 constructs a new QLineF object. func NewQLineF5(param1 *QLineF) *QLineF { - var outptr_QLineF *C.QLineF = nil - C.QLineF_new5(param1.cPointer(), &outptr_QLineF) - ret := newQLineF(outptr_QLineF) + ret := newQLineF(C.QLineF_new5(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qline.h b/qt/gen_qline.h index 878fee90..62361d7e 100644 --- a/qt/gen_qline.h +++ b/qt/gen_qline.h @@ -26,10 +26,10 @@ typedef struct QPoint QPoint; typedef struct QPointF QPointF; #endif -void QLine_new(QLine** outptr_QLine); -void QLine_new2(QPoint* pt1, QPoint* pt2, QLine** outptr_QLine); -void QLine_new3(int x1, int y1, int x2, int y2, QLine** outptr_QLine); -void QLine_new4(QLine* param1, QLine** outptr_QLine); +QLine* QLine_new(); +QLine* QLine_new2(QPoint* pt1, QPoint* pt2); +QLine* QLine_new3(int x1, int y1, int x2, int y2); +QLine* QLine_new4(QLine* param1); bool QLine_IsNull(const QLine* self); QPoint* QLine_P1(const QLine* self); QPoint* QLine_P2(const QLine* self); @@ -52,11 +52,11 @@ bool QLine_OperatorEqual(const QLine* self, QLine* d); bool QLine_OperatorNotEqual(const QLine* self, QLine* d); void QLine_Delete(QLine* self, bool isSubclass); -void QLineF_new(QLineF** outptr_QLineF); -void QLineF_new2(QPointF* pt1, QPointF* pt2, QLineF** outptr_QLineF); -void QLineF_new3(double x1, double y1, double x2, double y2, QLineF** outptr_QLineF); -void QLineF_new4(QLine* line, QLineF** outptr_QLineF); -void QLineF_new5(QLineF* param1, QLineF** outptr_QLineF); +QLineF* QLineF_new(); +QLineF* QLineF_new2(QPointF* pt1, QPointF* pt2); +QLineF* QLineF_new3(double x1, double y1, double x2, double y2); +QLineF* QLineF_new4(QLine* line); +QLineF* QLineF_new5(QLineF* param1); QLineF* QLineF_FromPolar(double length, double angle); bool QLineF_IsNull(const QLineF* self); QPointF* QLineF_P1(const QLineF* self); diff --git a/qt/gen_qlineedit.cpp b/qt/gen_qlineedit.cpp index 21d78356..72a2dec9 100644 --- a/qt/gen_qlineedit.cpp +++ b/qt/gen_qlineedit.cpp @@ -1028,38 +1028,26 @@ public: }; -void QLineEdit_new(QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(parent); - *outptr_QLineEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLineEdit* QLineEdit_new(QWidget* parent) { + return new MiqtVirtualQLineEdit(parent); } -void QLineEdit_new2(QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(); - *outptr_QLineEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLineEdit* QLineEdit_new2() { + return new MiqtVirtualQLineEdit(); } -void QLineEdit_new3(struct miqt_string param1, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QLineEdit* QLineEdit_new3(struct miqt_string param1) { QString param1_QString = QString::fromUtf8(param1.data, param1.len); - MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(param1_QString); - *outptr_QLineEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQLineEdit(param1_QString); } -void QLineEdit_new4(struct miqt_string param1, QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QLineEdit* QLineEdit_new4(struct miqt_string param1, QWidget* parent) { QString param1_QString = QString::fromUtf8(param1.data, param1.len); - MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(param1_QString, parent); - *outptr_QLineEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQLineEdit(param1_QString, parent); +} + +void QLineEdit_virtbase(QLineEdit* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QLineEdit_MetaObject(const QLineEdit* self) { diff --git a/qt/gen_qlineedit.go b/qt/gen_qlineedit.go index 4fb72fbc..b2ae7847 100644 --- a/qt/gen_qlineedit.go +++ b/qt/gen_qlineedit.go @@ -51,46 +51,34 @@ func (this *QLineEdit) UnsafePointer() unsafe.Pointer { } // newQLineEdit constructs the type using only CGO pointers. -func newQLineEdit(h *C.QLineEdit, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QLineEdit { +func newQLineEdit(h *C.QLineEdit) *QLineEdit { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QLineEdit_virtbase(h, &outptr_QWidget) + return &QLineEdit{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQLineEdit constructs the type using only unsafe pointers. -func UnsafeNewQLineEdit(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QLineEdit { - if h == nil { - return nil - } - - return &QLineEdit{h: (*C.QLineEdit)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQLineEdit(h unsafe.Pointer) *QLineEdit { + return newQLineEdit((*C.QLineEdit)(h)) } // NewQLineEdit constructs a new QLineEdit object. func NewQLineEdit(parent *QWidget) *QLineEdit { - var outptr_QLineEdit *C.QLineEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLineEdit_new(parent.cPointer(), &outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLineEdit(C.QLineEdit_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQLineEdit2 constructs a new QLineEdit object. func NewQLineEdit2() *QLineEdit { - var outptr_QLineEdit *C.QLineEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLineEdit_new2(&outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLineEdit(C.QLineEdit_new2()) ret.isSubclass = true return ret } @@ -101,13 +89,8 @@ func NewQLineEdit3(param1 string) *QLineEdit { param1_ms.data = C.CString(param1) param1_ms.len = C.size_t(len(param1)) defer C.free(unsafe.Pointer(param1_ms.data)) - var outptr_QLineEdit *C.QLineEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLineEdit_new3(param1_ms, &outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLineEdit(C.QLineEdit_new3(param1_ms)) ret.isSubclass = true return ret } @@ -118,13 +101,8 @@ func NewQLineEdit4(param1 string, parent *QWidget) *QLineEdit { param1_ms.data = C.CString(param1) param1_ms.len = C.size_t(len(param1)) defer C.free(unsafe.Pointer(param1_ms.data)) - var outptr_QLineEdit *C.QLineEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLineEdit_new4(param1_ms, parent.cPointer(), &outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLineEdit(C.QLineEdit_new4(param1_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -231,7 +209,7 @@ func (this *QLineEdit) SetValidator(validator *QValidator) { } func (this *QLineEdit) Validator() *QValidator { - return newQValidator(C.QLineEdit_Validator(this.h), nil) + return newQValidator(C.QLineEdit_Validator(this.h)) } func (this *QLineEdit) SetCompleter(completer *QCompleter) { @@ -239,7 +217,7 @@ func (this *QLineEdit) SetCompleter(completer *QCompleter) { } func (this *QLineEdit) Completer() *QCompleter { - return newQCompleter(C.QLineEdit_Completer(this.h), nil) + return newQCompleter(C.QLineEdit_Completer(this.h)) } func (this *QLineEdit) SizeHint() *QSize { @@ -407,7 +385,7 @@ func (this *QLineEdit) AddAction(action *QAction, position QLineEdit__ActionPosi } func (this *QLineEdit) AddAction2(icon *QIcon, position QLineEdit__ActionPosition) *QAction { - return newQAction(C.QLineEdit_AddAction2(this.h, icon.cPointer(), (C.int)(position)), nil) + return newQAction(C.QLineEdit_AddAction2(this.h, icon.cPointer(), (C.int)(position))) } func (this *QLineEdit) SetText(text string) { @@ -459,7 +437,7 @@ func (this *QLineEdit) Insert(param1 string) { } func (this *QLineEdit) CreateStandardContextMenu() *QMenu { - return newQMenu(C.QLineEdit_CreateStandardContextMenu(this.h), nil, nil, nil) + return newQMenu(C.QLineEdit_CreateStandardContextMenu(this.h)) } func (this *QLineEdit) TextChanged(param1 string) { @@ -748,7 +726,7 @@ func miqt_exec_callback_QLineEdit_MousePressEvent(self *C.QLineEdit, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -774,7 +752,7 @@ func miqt_exec_callback_QLineEdit_MouseMoveEvent(self *C.QLineEdit, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -800,7 +778,7 @@ func miqt_exec_callback_QLineEdit_MouseReleaseEvent(self *C.QLineEdit, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -826,7 +804,7 @@ func miqt_exec_callback_QLineEdit_MouseDoubleClickEvent(self *C.QLineEdit, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -852,7 +830,7 @@ func miqt_exec_callback_QLineEdit_KeyPressEvent(self *C.QLineEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -878,7 +856,7 @@ func miqt_exec_callback_QLineEdit_FocusInEvent(self *C.QLineEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -904,7 +882,7 @@ func miqt_exec_callback_QLineEdit_FocusOutEvent(self *C.QLineEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -930,7 +908,7 @@ func miqt_exec_callback_QLineEdit_PaintEvent(self *C.QLineEdit, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -956,7 +934,7 @@ func miqt_exec_callback_QLineEdit_DragEnterEvent(self *C.QLineEdit, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(param1, nil, nil, nil) + slotval1 := newQDragEnterEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -982,7 +960,7 @@ func miqt_exec_callback_QLineEdit_DragMoveEvent(self *C.QLineEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(e, nil, nil) + slotval1 := newQDragMoveEvent(e) gofunc((&QLineEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1008,7 +986,7 @@ func miqt_exec_callback_QLineEdit_DragLeaveEvent(self *C.QLineEdit, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(e, nil) + slotval1 := newQDragLeaveEvent(e) gofunc((&QLineEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1034,7 +1012,7 @@ func miqt_exec_callback_QLineEdit_DropEvent(self *C.QLineEdit, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(param1, nil) + slotval1 := newQDropEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1086,7 +1064,7 @@ func miqt_exec_callback_QLineEdit_ContextMenuEvent(self *C.QLineEdit, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1112,7 +1090,7 @@ func miqt_exec_callback_QLineEdit_InputMethodEvent(self *C.QLineEdit, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -1325,7 +1303,7 @@ func miqt_exec_callback_QLineEdit_WheelEvent(self *C.QLineEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1351,7 +1329,7 @@ func miqt_exec_callback_QLineEdit_KeyReleaseEvent(self *C.QLineEdit, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1429,7 +1407,7 @@ func miqt_exec_callback_QLineEdit_MoveEvent(self *C.QLineEdit, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1455,7 +1433,7 @@ func miqt_exec_callback_QLineEdit_ResizeEvent(self *C.QLineEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1481,7 +1459,7 @@ func miqt_exec_callback_QLineEdit_CloseEvent(self *C.QLineEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1507,7 +1485,7 @@ func miqt_exec_callback_QLineEdit_TabletEvent(self *C.QLineEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1533,7 +1511,7 @@ func miqt_exec_callback_QLineEdit_ActionEvent(self *C.QLineEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1559,7 +1537,7 @@ func miqt_exec_callback_QLineEdit_ShowEvent(self *C.QLineEdit, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1585,7 +1563,7 @@ func miqt_exec_callback_QLineEdit_HideEvent(self *C.QLineEdit, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_HideEvent, slotval1) diff --git a/qt/gen_qlineedit.h b/qt/gen_qlineedit.h index a52ad196..224df175 100644 --- a/qt/gen_qlineedit.h +++ b/qt/gen_qlineedit.h @@ -88,10 +88,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QLineEdit_new(QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLineEdit_new2(QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLineEdit_new3(struct miqt_string param1, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLineEdit_new4(struct miqt_string param1, QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QLineEdit* QLineEdit_new(QWidget* parent); +QLineEdit* QLineEdit_new2(); +QLineEdit* QLineEdit_new3(struct miqt_string param1); +QLineEdit* QLineEdit_new4(struct miqt_string param1, QWidget* parent); +void QLineEdit_virtbase(QLineEdit* src, QWidget** outptr_QWidget); QMetaObject* QLineEdit_MetaObject(const QLineEdit* self); void* QLineEdit_Metacast(QLineEdit* self, const char* param1); struct miqt_string QLineEdit_Tr(const char* s); diff --git a/qt/gen_qlinkedlist.cpp b/qt/gen_qlinkedlist.cpp index 535915be..1ca5bd7e 100644 --- a/qt/gen_qlinkedlist.cpp +++ b/qt/gen_qlinkedlist.cpp @@ -3,9 +3,8 @@ #include "gen_qlinkedlist.h" #include "_cgo_export.h" -void QLinkedListData_new(QLinkedListData** outptr_QLinkedListData) { - QLinkedListData* ret = new QLinkedListData(); - *outptr_QLinkedListData = ret; +QLinkedListData* QLinkedListData_new() { + return new QLinkedListData(); } void QLinkedListData_Delete(QLinkedListData* self, bool isSubclass) { diff --git a/qt/gen_qlinkedlist.go b/qt/gen_qlinkedlist.go index 0be1df27..8725c1f3 100644 --- a/qt/gen_qlinkedlist.go +++ b/qt/gen_qlinkedlist.go @@ -37,24 +37,19 @@ func newQLinkedListData(h *C.QLinkedListData) *QLinkedListData { if h == nil { return nil } + return &QLinkedListData{h: h} } // UnsafeNewQLinkedListData constructs the type using only unsafe pointers. func UnsafeNewQLinkedListData(h unsafe.Pointer) *QLinkedListData { - if h == nil { - return nil - } - - return &QLinkedListData{h: (*C.QLinkedListData)(h)} + return newQLinkedListData((*C.QLinkedListData)(h)) } // NewQLinkedListData constructs a new QLinkedListData object. func NewQLinkedListData() *QLinkedListData { - var outptr_QLinkedListData *C.QLinkedListData = nil - C.QLinkedListData_new(&outptr_QLinkedListData) - ret := newQLinkedListData(outptr_QLinkedListData) + ret := newQLinkedListData(C.QLinkedListData_new()) ret.isSubclass = true return ret } diff --git a/qt/gen_qlinkedlist.h b/qt/gen_qlinkedlist.h index 36e1cee4..f76bc869 100644 --- a/qt/gen_qlinkedlist.h +++ b/qt/gen_qlinkedlist.h @@ -20,7 +20,7 @@ class QLinkedListData; typedef struct QLinkedListData QLinkedListData; #endif -void QLinkedListData_new(QLinkedListData** outptr_QLinkedListData); +QLinkedListData* QLinkedListData_new(); void QLinkedListData_Delete(QLinkedListData* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qlistview.cpp b/qt/gen_qlistview.cpp index 0d34329c..f1e60d7c 100644 --- a/qt/gen_qlistview.cpp +++ b/qt/gen_qlistview.cpp @@ -1579,26 +1579,16 @@ public: }; -void QListView_new(QWidget* parent, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQListView* ret = new MiqtVirtualQListView(parent); - *outptr_QListView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QListView* QListView_new(QWidget* parent) { + return new MiqtVirtualQListView(parent); } -void QListView_new2(QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQListView* ret = new MiqtVirtualQListView(); - *outptr_QListView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QListView* QListView_new2() { + return new MiqtVirtualQListView(); +} + +void QListView_virtbase(QListView* src, QAbstractItemView** outptr_QAbstractItemView) { + *outptr_QAbstractItemView = static_cast(src); } QMetaObject* QListView_MetaObject(const QListView* self) { diff --git a/qt/gen_qlistview.go b/qt/gen_qlistview.go index c70b2e84..ccf6764a 100644 --- a/qt/gen_qlistview.go +++ b/qt/gen_qlistview.go @@ -71,52 +71,34 @@ func (this *QListView) UnsafePointer() unsafe.Pointer { } // newQListView constructs the type using only CGO pointers. -func newQListView(h *C.QListView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QListView { +func newQListView(h *C.QListView) *QListView { if h == nil { return nil } + var outptr_QAbstractItemView *C.QAbstractItemView = nil + C.QListView_virtbase(h, &outptr_QAbstractItemView) + return &QListView{h: h, - QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractItemView: newQAbstractItemView(outptr_QAbstractItemView)} } // UnsafeNewQListView constructs the type using only unsafe pointers. -func UnsafeNewQListView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QListView { - if h == nil { - return nil - } - - return &QListView{h: (*C.QListView)(h), - QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQListView(h unsafe.Pointer) *QListView { + return newQListView((*C.QListView)(h)) } // NewQListView constructs a new QListView object. func NewQListView(parent *QWidget) *QListView { - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QListView_new(parent.cPointer(), &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQListView(outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQListView(C.QListView_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQListView2 constructs a new QListView object. func NewQListView2() *QListView { - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QListView_new2(&outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQListView(outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQListView(C.QListView_new2()) ret.isSubclass = true return ret } @@ -719,7 +701,7 @@ func miqt_exec_callback_QListView_MouseMoveEvent(self *C.QListView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QListView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -745,7 +727,7 @@ func miqt_exec_callback_QListView_MouseReleaseEvent(self *C.QListView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QListView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -771,7 +753,7 @@ func miqt_exec_callback_QListView_WheelEvent(self *C.QListView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QListView{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -797,7 +779,7 @@ func miqt_exec_callback_QListView_TimerEvent(self *C.QListView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QListView{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -823,7 +805,7 @@ func miqt_exec_callback_QListView_ResizeEvent(self *C.QListView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QListView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -849,7 +831,7 @@ func miqt_exec_callback_QListView_DragMoveEvent(self *C.QListView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(e, nil, nil) + slotval1 := newQDragMoveEvent(e) gofunc((&QListView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -875,7 +857,7 @@ func miqt_exec_callback_QListView_DragLeaveEvent(self *C.QListView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(e, nil) + slotval1 := newQDragLeaveEvent(e) gofunc((&QListView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -901,7 +883,7 @@ func miqt_exec_callback_QListView_DropEvent(self *C.QListView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(e, nil) + slotval1 := newQDropEvent(e) gofunc((&QListView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -935,7 +917,7 @@ func miqt_exec_callback_QListView_StartDrag(self *C.QListView, cb C.intptr_t, su func (this *QListView) callVirtualBase_ViewOptions() *QStyleOptionViewItem { - _goptr := newQStyleOptionViewItem(C.QListView_virtualbase_ViewOptions(unsafe.Pointer(this.h)), nil) + _goptr := newQStyleOptionViewItem(C.QListView_virtualbase_ViewOptions(unsafe.Pointer(this.h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -980,7 +962,7 @@ func miqt_exec_callback_QListView_PaintEvent(self *C.QListView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QListView{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1319,7 +1301,7 @@ func miqt_exec_callback_QListView_SetModel(self *C.QListView, cb C.intptr_t, mod } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc((&QListView{h: self}).callVirtualBase_SetModel, slotval1) @@ -1345,7 +1327,7 @@ func miqt_exec_callback_QListView_SetSelectionModel(self *C.QListView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QListView{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -1663,7 +1645,7 @@ func miqt_exec_callback_QListView_CloseEditor(self *C.QListView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) @@ -1691,7 +1673,7 @@ func miqt_exec_callback_QListView_CommitData(self *C.QListView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc((&QListView{h: self}).callVirtualBase_CommitData, slotval1) @@ -1861,7 +1843,7 @@ func miqt_exec_callback_QListView_MousePressEvent(self *C.QListView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QListView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1887,7 +1869,7 @@ func miqt_exec_callback_QListView_MouseDoubleClickEvent(self *C.QListView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QListView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1913,7 +1895,7 @@ func miqt_exec_callback_QListView_DragEnterEvent(self *C.QListView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QListView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1939,7 +1921,7 @@ func miqt_exec_callback_QListView_FocusInEvent(self *C.QListView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QListView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1965,7 +1947,7 @@ func miqt_exec_callback_QListView_FocusOutEvent(self *C.QListView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QListView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1991,7 +1973,7 @@ func miqt_exec_callback_QListView_KeyPressEvent(self *C.QListView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QListView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -2017,7 +1999,7 @@ func miqt_exec_callback_QListView_InputMethodEvent(self *C.QListView, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QListView{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qlistview.h b/qt/gen_qlistview.h index fd506c3e..45400cd0 100644 --- a/qt/gen_qlistview.h +++ b/qt/gen_qlistview.h @@ -80,8 +80,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QListView_new(QWidget* parent, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QListView_new2(QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QListView* QListView_new(QWidget* parent); +QListView* QListView_new2(); +void QListView_virtbase(QListView* src, QAbstractItemView** outptr_QAbstractItemView); QMetaObject* QListView_MetaObject(const QListView* self); void* QListView_Metacast(QListView* self, const char* param1); struct miqt_string QListView_Tr(const char* s); diff --git a/qt/gen_qlistwidget.cpp b/qt/gen_qlistwidget.cpp index a9ce73c1..aa518c0d 100644 --- a/qt/gen_qlistwidget.cpp +++ b/qt/gen_qlistwidget.cpp @@ -233,60 +233,50 @@ public: }; -void QListWidgetItem_new(QListWidgetItem** outptr_QListWidgetItem) { - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(); - *outptr_QListWidgetItem = ret; +QListWidgetItem* QListWidgetItem_new() { + return new MiqtVirtualQListWidgetItem(); } -void QListWidgetItem_new2(struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem) { +QListWidgetItem* QListWidgetItem_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(text_QString); - *outptr_QListWidgetItem = ret; + return new MiqtVirtualQListWidgetItem(text_QString); } -void QListWidgetItem_new3(QIcon* icon, struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem) { +QListWidgetItem* QListWidgetItem_new3(QIcon* icon, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*icon, text_QString); - *outptr_QListWidgetItem = ret; + return new MiqtVirtualQListWidgetItem(*icon, text_QString); } -void QListWidgetItem_new4(QListWidgetItem* other, QListWidgetItem** outptr_QListWidgetItem) { - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*other); - *outptr_QListWidgetItem = ret; +QListWidgetItem* QListWidgetItem_new4(QListWidgetItem* other) { + return new MiqtVirtualQListWidgetItem(*other); } -void QListWidgetItem_new5(QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem) { - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(listview); - *outptr_QListWidgetItem = ret; +QListWidgetItem* QListWidgetItem_new5(QListWidget* listview) { + return new MiqtVirtualQListWidgetItem(listview); } -void QListWidgetItem_new6(QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem) { - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(listview, static_cast(typeVal)); - *outptr_QListWidgetItem = ret; +QListWidgetItem* QListWidgetItem_new6(QListWidget* listview, int typeVal) { + return new MiqtVirtualQListWidgetItem(listview, static_cast(typeVal)); } -void QListWidgetItem_new7(struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem) { +QListWidgetItem* QListWidgetItem_new7(struct miqt_string text, QListWidget* listview) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(text_QString, listview); - *outptr_QListWidgetItem = ret; + return new MiqtVirtualQListWidgetItem(text_QString, listview); } -void QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem) { +QListWidgetItem* QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(text_QString, listview, static_cast(typeVal)); - *outptr_QListWidgetItem = ret; + return new MiqtVirtualQListWidgetItem(text_QString, listview, static_cast(typeVal)); } -void QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem) { +QListWidgetItem* QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*icon, text_QString, listview); - *outptr_QListWidgetItem = ret; + return new MiqtVirtualQListWidgetItem(*icon, text_QString, listview); } -void QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem) { +QListWidgetItem* QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*icon, text_QString, listview, static_cast(typeVal)); - *outptr_QListWidgetItem = ret; + return new MiqtVirtualQListWidgetItem(*icon, text_QString, listview, static_cast(typeVal)); } QListWidgetItem* QListWidgetItem_Clone(const QListWidgetItem* self) { @@ -1567,28 +1557,16 @@ public: }; -void QListWidget_new(QWidget* parent, QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQListWidget* ret = new MiqtVirtualQListWidget(parent); - *outptr_QListWidget = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QListWidget* QListWidget_new(QWidget* parent) { + return new MiqtVirtualQListWidget(parent); } -void QListWidget_new2(QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQListWidget* ret = new MiqtVirtualQListWidget(); - *outptr_QListWidget = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QListWidget* QListWidget_new2() { + return new MiqtVirtualQListWidget(); +} + +void QListWidget_virtbase(QListWidget* src, QListView** outptr_QListView) { + *outptr_QListView = static_cast(src); } QMetaObject* QListWidget_MetaObject(const QListWidget* self) { diff --git a/qt/gen_qlistwidget.go b/qt/gen_qlistwidget.go index 6422b0b3..70d71686 100644 --- a/qt/gen_qlistwidget.go +++ b/qt/gen_qlistwidget.go @@ -45,24 +45,19 @@ func newQListWidgetItem(h *C.QListWidgetItem) *QListWidgetItem { if h == nil { return nil } + return &QListWidgetItem{h: h} } // UnsafeNewQListWidgetItem constructs the type using only unsafe pointers. func UnsafeNewQListWidgetItem(h unsafe.Pointer) *QListWidgetItem { - if h == nil { - return nil - } - - return &QListWidgetItem{h: (*C.QListWidgetItem)(h)} + return newQListWidgetItem((*C.QListWidgetItem)(h)) } // NewQListWidgetItem constructs a new QListWidgetItem object. func NewQListWidgetItem() *QListWidgetItem { - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new(&outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new()) ret.isSubclass = true return ret } @@ -73,10 +68,8 @@ func NewQListWidgetItem2(text string) *QListWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new2(text_ms, &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new2(text_ms)) ret.isSubclass = true return ret } @@ -87,40 +80,32 @@ func NewQListWidgetItem3(icon *QIcon, text string) *QListWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new3(icon.cPointer(), text_ms, &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new3(icon.cPointer(), text_ms)) ret.isSubclass = true return ret } // NewQListWidgetItem4 constructs a new QListWidgetItem object. func NewQListWidgetItem4(other *QListWidgetItem) *QListWidgetItem { - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new4(other.cPointer(), &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new4(other.cPointer())) ret.isSubclass = true return ret } // NewQListWidgetItem5 constructs a new QListWidgetItem object. func NewQListWidgetItem5(listview *QListWidget) *QListWidgetItem { - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new5(listview.cPointer(), &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new5(listview.cPointer())) ret.isSubclass = true return ret } // NewQListWidgetItem6 constructs a new QListWidgetItem object. func NewQListWidgetItem6(listview *QListWidget, typeVal int) *QListWidgetItem { - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new6(listview.cPointer(), (C.int)(typeVal), &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new6(listview.cPointer(), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -131,10 +116,8 @@ func NewQListWidgetItem7(text string, listview *QListWidget) *QListWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new7(text_ms, listview.cPointer(), &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new7(text_ms, listview.cPointer())) ret.isSubclass = true return ret } @@ -145,10 +128,8 @@ func NewQListWidgetItem8(text string, listview *QListWidget, typeVal int) *QList text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new8(text_ms, listview.cPointer(), (C.int)(typeVal), &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new8(text_ms, listview.cPointer(), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -159,10 +140,8 @@ func NewQListWidgetItem9(icon *QIcon, text string, listview *QListWidget) *QList text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new9(icon.cPointer(), text_ms, listview.cPointer(), &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new9(icon.cPointer(), text_ms, listview.cPointer())) ret.isSubclass = true return ret } @@ -173,10 +152,8 @@ func NewQListWidgetItem10(icon *QIcon, text string, listview *QListWidget, typeV text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new10(icon.cPointer(), text_ms, listview.cPointer(), (C.int)(typeVal), &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new10(icon.cPointer(), text_ms, listview.cPointer(), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -186,7 +163,7 @@ func (this *QListWidgetItem) Clone() *QListWidgetItem { } func (this *QListWidgetItem) ListWidget() *QListWidget { - return newQListWidget(C.QListWidgetItem_ListWidget(this.h), nil, nil, nil, nil, nil, nil, nil) + return newQListWidget(C.QListWidgetItem_ListWidget(this.h)) } func (this *QListWidgetItem) SetSelected(selectVal bool) { @@ -613,54 +590,34 @@ func (this *QListWidget) UnsafePointer() unsafe.Pointer { } // newQListWidget constructs the type using only CGO pointers. -func newQListWidget(h *C.QListWidget, h_QListView *C.QListView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QListWidget { +func newQListWidget(h *C.QListWidget) *QListWidget { if h == nil { return nil } + var outptr_QListView *C.QListView = nil + C.QListWidget_virtbase(h, &outptr_QListView) + return &QListWidget{h: h, - QListView: newQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QListView: newQListView(outptr_QListView)} } // UnsafeNewQListWidget constructs the type using only unsafe pointers. -func UnsafeNewQListWidget(h unsafe.Pointer, h_QListView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QListWidget { - if h == nil { - return nil - } - - return &QListWidget{h: (*C.QListWidget)(h), - QListView: UnsafeNewQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQListWidget(h unsafe.Pointer) *QListWidget { + return newQListWidget((*C.QListWidget)(h)) } // NewQListWidget constructs a new QListWidget object. func NewQListWidget(parent *QWidget) *QListWidget { - var outptr_QListWidget *C.QListWidget = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QListWidget_new(parent.cPointer(), &outptr_QListWidget, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQListWidget(outptr_QListWidget, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQListWidget(C.QListWidget_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQListWidget2 constructs a new QListWidget object. func NewQListWidget2() *QListWidget { - var outptr_QListWidget *C.QListWidget = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QListWidget_new2(&outptr_QListWidget, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQListWidget(outptr_QListWidget, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQListWidget(C.QListWidget_new2()) ret.isSubclass = true return ret } @@ -832,7 +789,7 @@ func (this *QListWidget) IsPersistentEditorOpen(item *QListWidgetItem) bool { } func (this *QListWidget) ItemWidget(item *QListWidgetItem) *QWidget { - return newQWidget(C.QListWidget_ItemWidget(this.h, item.cPointer()), nil, nil) + return newQWidget(C.QListWidget_ItemWidget(this.h, item.cPointer())) } func (this *QListWidget) SetItemWidget(item *QListWidgetItem, widget *QWidget) { @@ -1173,7 +1130,7 @@ func miqt_exec_callback_QListWidget_SetSelectionModel(self *C.QListWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QListWidget{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -1199,7 +1156,7 @@ func miqt_exec_callback_QListWidget_DropEvent(self *C.QListWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QListWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1285,7 +1242,7 @@ func (this *QListWidget) callVirtualBase_MimeData(items []*QListWidgetItem) *QMi } items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} - return newQMimeData(C.QListWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma), nil) + return newQMimeData(C.QListWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma)) } func (this *QListWidget) OnMimeData(slot func(super func(items []*QListWidgetItem) *QMimeData, items []*QListWidgetItem) *QMimeData) { @@ -1339,7 +1296,7 @@ func miqt_exec_callback_QListWidget_DropMimeData(self *C.QListWidget, cb C.intpt // Convert all CABI parameters to Go parameters slotval1 := (int)(index) - slotval2 := newQMimeData(data, nil) + slotval2 := newQMimeData(data) slotval3 := (DropAction)(action) @@ -1684,7 +1641,7 @@ func miqt_exec_callback_QListWidget_MouseMoveEvent(self *C.QListWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1710,7 +1667,7 @@ func miqt_exec_callback_QListWidget_MouseReleaseEvent(self *C.QListWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1736,7 +1693,7 @@ func miqt_exec_callback_QListWidget_WheelEvent(self *C.QListWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1762,7 +1719,7 @@ func miqt_exec_callback_QListWidget_TimerEvent(self *C.QListWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1788,7 +1745,7 @@ func miqt_exec_callback_QListWidget_ResizeEvent(self *C.QListWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1814,7 +1771,7 @@ func miqt_exec_callback_QListWidget_DragMoveEvent(self *C.QListWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(e, nil, nil) + slotval1 := newQDragMoveEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1840,7 +1797,7 @@ func miqt_exec_callback_QListWidget_DragLeaveEvent(self *C.QListWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(e, nil) + slotval1 := newQDragLeaveEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1874,7 +1831,7 @@ func miqt_exec_callback_QListWidget_StartDrag(self *C.QListWidget, cb C.intptr_t func (this *QListWidget) callVirtualBase_ViewOptions() *QStyleOptionViewItem { - _goptr := newQStyleOptionViewItem(C.QListWidget_virtualbase_ViewOptions(unsafe.Pointer(this.h)), nil) + _goptr := newQStyleOptionViewItem(C.QListWidget_virtualbase_ViewOptions(unsafe.Pointer(this.h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -1919,7 +1876,7 @@ func miqt_exec_callback_QListWidget_PaintEvent(self *C.QListWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_PaintEvent, slotval1) diff --git a/qt/gen_qlistwidget.h b/qt/gen_qlistwidget.h index 6a1de9bb..ba42c424 100644 --- a/qt/gen_qlistwidget.h +++ b/qt/gen_qlistwidget.h @@ -86,16 +86,16 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QListWidgetItem_new(QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new2(struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new3(QIcon* icon, struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new4(QListWidgetItem* other, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new5(QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new6(QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new7(struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem); +QListWidgetItem* QListWidgetItem_new(); +QListWidgetItem* QListWidgetItem_new2(struct miqt_string text); +QListWidgetItem* QListWidgetItem_new3(QIcon* icon, struct miqt_string text); +QListWidgetItem* QListWidgetItem_new4(QListWidgetItem* other); +QListWidgetItem* QListWidgetItem_new5(QListWidget* listview); +QListWidgetItem* QListWidgetItem_new6(QListWidget* listview, int typeVal); +QListWidgetItem* QListWidgetItem_new7(struct miqt_string text, QListWidget* listview); +QListWidgetItem* QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal); +QListWidgetItem* QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview); +QListWidgetItem* QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal); QListWidgetItem* QListWidgetItem_Clone(const QListWidgetItem* self); QListWidget* QListWidgetItem_ListWidget(const QListWidgetItem* self); void QListWidgetItem_SetSelected(QListWidgetItem* self, bool selectVal); @@ -153,8 +153,9 @@ void QListWidgetItem_override_virtual_Write(void* self, intptr_t slot); void QListWidgetItem_virtualbase_Write(const void* self, QDataStream* out); void QListWidgetItem_Delete(QListWidgetItem* self, bool isSubclass); -void QListWidget_new(QWidget* parent, QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QListWidget_new2(QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QListWidget* QListWidget_new(QWidget* parent); +QListWidget* QListWidget_new2(); +void QListWidget_virtbase(QListWidget* src, QListView** outptr_QListView); QMetaObject* QListWidget_MetaObject(const QListWidget* self); void* QListWidget_Metacast(QListWidget* self, const char* param1); struct miqt_string QListWidget_Tr(const char* s); diff --git a/qt/gen_qlocale.cpp b/qt/gen_qlocale.cpp index 4dff5609..b6d7bc30 100644 --- a/qt/gen_qlocale.cpp +++ b/qt/gen_qlocale.cpp @@ -12,35 +12,29 @@ #include "gen_qlocale.h" #include "_cgo_export.h" -void QLocale_new(QLocale** outptr_QLocale) { - QLocale* ret = new QLocale(); - *outptr_QLocale = ret; +QLocale* QLocale_new() { + return new QLocale(); } -void QLocale_new2(struct miqt_string name, QLocale** outptr_QLocale) { +QLocale* QLocale_new2(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - QLocale* ret = new QLocale(name_QString); - *outptr_QLocale = ret; + return new QLocale(name_QString); } -void QLocale_new3(int language, QLocale** outptr_QLocale) { - QLocale* ret = new QLocale(static_cast(language)); - *outptr_QLocale = ret; +QLocale* QLocale_new3(int language) { + return new QLocale(static_cast(language)); } -void QLocale_new4(int language, int script, int country, QLocale** outptr_QLocale) { - QLocale* ret = new QLocale(static_cast(language), static_cast(script), static_cast(country)); - *outptr_QLocale = ret; +QLocale* QLocale_new4(int language, int script, int country) { + return new QLocale(static_cast(language), static_cast(script), static_cast(country)); } -void QLocale_new5(QLocale* other, QLocale** outptr_QLocale) { - QLocale* ret = new QLocale(*other); - *outptr_QLocale = ret; +QLocale* QLocale_new5(QLocale* other) { + return new QLocale(*other); } -void QLocale_new6(int language, int country, QLocale** outptr_QLocale) { - QLocale* ret = new QLocale(static_cast(language), static_cast(country)); - *outptr_QLocale = ret; +QLocale* QLocale_new6(int language, int country) { + return new QLocale(static_cast(language), static_cast(country)); } void QLocale_OperatorAssign(QLocale* self, QLocale* other) { diff --git a/qt/gen_qlocale.go b/qt/gen_qlocale.go index 5cccad31..ed564212 100644 --- a/qt/gen_qlocale.go +++ b/qt/gen_qlocale.go @@ -915,24 +915,19 @@ func newQLocale(h *C.QLocale) *QLocale { if h == nil { return nil } + return &QLocale{h: h} } // UnsafeNewQLocale constructs the type using only unsafe pointers. func UnsafeNewQLocale(h unsafe.Pointer) *QLocale { - if h == nil { - return nil - } - - return &QLocale{h: (*C.QLocale)(h)} + return newQLocale((*C.QLocale)(h)) } // NewQLocale constructs a new QLocale object. func NewQLocale() *QLocale { - var outptr_QLocale *C.QLocale = nil - C.QLocale_new(&outptr_QLocale) - ret := newQLocale(outptr_QLocale) + ret := newQLocale(C.QLocale_new()) ret.isSubclass = true return ret } @@ -943,50 +938,40 @@ func NewQLocale2(name string) *QLocale { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QLocale *C.QLocale = nil - C.QLocale_new2(name_ms, &outptr_QLocale) - ret := newQLocale(outptr_QLocale) + ret := newQLocale(C.QLocale_new2(name_ms)) ret.isSubclass = true return ret } // NewQLocale3 constructs a new QLocale object. func NewQLocale3(language QLocale__Language) *QLocale { - var outptr_QLocale *C.QLocale = nil - C.QLocale_new3((C.int)(language), &outptr_QLocale) - ret := newQLocale(outptr_QLocale) + ret := newQLocale(C.QLocale_new3((C.int)(language))) ret.isSubclass = true return ret } // NewQLocale4 constructs a new QLocale object. func NewQLocale4(language QLocale__Language, script QLocale__Script, country QLocale__Country) *QLocale { - var outptr_QLocale *C.QLocale = nil - C.QLocale_new4((C.int)(language), (C.int)(script), (C.int)(country), &outptr_QLocale) - ret := newQLocale(outptr_QLocale) + ret := newQLocale(C.QLocale_new4((C.int)(language), (C.int)(script), (C.int)(country))) ret.isSubclass = true return ret } // NewQLocale5 constructs a new QLocale object. func NewQLocale5(other *QLocale) *QLocale { - var outptr_QLocale *C.QLocale = nil - C.QLocale_new5(other.cPointer(), &outptr_QLocale) - ret := newQLocale(outptr_QLocale) + ret := newQLocale(C.QLocale_new5(other.cPointer())) ret.isSubclass = true return ret } // NewQLocale6 constructs a new QLocale object. func NewQLocale6(language QLocale__Language, country QLocale__Country) *QLocale { - var outptr_QLocale *C.QLocale = nil - C.QLocale_new6((C.int)(language), (C.int)(country), &outptr_QLocale) - ret := newQLocale(outptr_QLocale) + ret := newQLocale(C.QLocale_new6((C.int)(language), (C.int)(country))) ret.isSubclass = true return ret } diff --git a/qt/gen_qlocale.h b/qt/gen_qlocale.h index 4682a317..3c1da5e9 100644 --- a/qt/gen_qlocale.h +++ b/qt/gen_qlocale.h @@ -30,12 +30,12 @@ typedef struct QLocale QLocale; typedef struct QTime QTime; #endif -void QLocale_new(QLocale** outptr_QLocale); -void QLocale_new2(struct miqt_string name, QLocale** outptr_QLocale); -void QLocale_new3(int language, QLocale** outptr_QLocale); -void QLocale_new4(int language, int script, int country, QLocale** outptr_QLocale); -void QLocale_new5(QLocale* other, QLocale** outptr_QLocale); -void QLocale_new6(int language, int country, QLocale** outptr_QLocale); +QLocale* QLocale_new(); +QLocale* QLocale_new2(struct miqt_string name); +QLocale* QLocale_new3(int language); +QLocale* QLocale_new4(int language, int script, int country); +QLocale* QLocale_new5(QLocale* other); +QLocale* QLocale_new6(int language, int country); void QLocale_OperatorAssign(QLocale* self, QLocale* other); void QLocale_Swap(QLocale* self, QLocale* other); int QLocale_Language(const QLocale* self); diff --git a/qt/gen_qlockfile.cpp b/qt/gen_qlockfile.cpp index 7637c4d3..35236129 100644 --- a/qt/gen_qlockfile.cpp +++ b/qt/gen_qlockfile.cpp @@ -6,10 +6,9 @@ #include "gen_qlockfile.h" #include "_cgo_export.h" -void QLockFile_new(struct miqt_string fileName, QLockFile** outptr_QLockFile) { +QLockFile* QLockFile_new(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QLockFile* ret = new QLockFile(fileName_QString); - *outptr_QLockFile = ret; + return new QLockFile(fileName_QString); } bool QLockFile_Lock(QLockFile* self) { diff --git a/qt/gen_qlockfile.go b/qt/gen_qlockfile.go index 4a6b8086..62701321 100644 --- a/qt/gen_qlockfile.go +++ b/qt/gen_qlockfile.go @@ -46,16 +46,13 @@ func newQLockFile(h *C.QLockFile) *QLockFile { if h == nil { return nil } + return &QLockFile{h: h} } // UnsafeNewQLockFile constructs the type using only unsafe pointers. func UnsafeNewQLockFile(h unsafe.Pointer) *QLockFile { - if h == nil { - return nil - } - - return &QLockFile{h: (*C.QLockFile)(h)} + return newQLockFile((*C.QLockFile)(h)) } // NewQLockFile constructs a new QLockFile object. @@ -64,10 +61,8 @@ func NewQLockFile(fileName string) *QLockFile { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QLockFile *C.QLockFile = nil - C.QLockFile_new(fileName_ms, &outptr_QLockFile) - ret := newQLockFile(outptr_QLockFile) + ret := newQLockFile(C.QLockFile_new(fileName_ms)) ret.isSubclass = true return ret } diff --git a/qt/gen_qlockfile.h b/qt/gen_qlockfile.h index 42b7533a..6d165dcb 100644 --- a/qt/gen_qlockfile.h +++ b/qt/gen_qlockfile.h @@ -20,7 +20,7 @@ class QLockFile; typedef struct QLockFile QLockFile; #endif -void QLockFile_new(struct miqt_string fileName, QLockFile** outptr_QLockFile); +QLockFile* QLockFile_new(struct miqt_string fileName); bool QLockFile_Lock(QLockFile* self); bool QLockFile_TryLock(QLockFile* self); void QLockFile_Unlock(QLockFile* self); diff --git a/qt/gen_qloggingcategory.cpp b/qt/gen_qloggingcategory.cpp index e9926534..6dcdc369 100644 --- a/qt/gen_qloggingcategory.cpp +++ b/qt/gen_qloggingcategory.cpp @@ -6,9 +6,8 @@ #include "gen_qloggingcategory.h" #include "_cgo_export.h" -void QLoggingCategory_new(const char* category, QLoggingCategory** outptr_QLoggingCategory) { - QLoggingCategory* ret = new QLoggingCategory(category); - *outptr_QLoggingCategory = ret; +QLoggingCategory* QLoggingCategory_new(const char* category) { + return new QLoggingCategory(category); } bool QLoggingCategory_IsDebugEnabled(const QLoggingCategory* self) { diff --git a/qt/gen_qloggingcategory.go b/qt/gen_qloggingcategory.go index 86eceb82..2163f641 100644 --- a/qt/gen_qloggingcategory.go +++ b/qt/gen_qloggingcategory.go @@ -37,26 +37,21 @@ func newQLoggingCategory(h *C.QLoggingCategory) *QLoggingCategory { if h == nil { return nil } + return &QLoggingCategory{h: h} } // UnsafeNewQLoggingCategory constructs the type using only unsafe pointers. func UnsafeNewQLoggingCategory(h unsafe.Pointer) *QLoggingCategory { - if h == nil { - return nil - } - - return &QLoggingCategory{h: (*C.QLoggingCategory)(h)} + return newQLoggingCategory((*C.QLoggingCategory)(h)) } // NewQLoggingCategory constructs a new QLoggingCategory object. func NewQLoggingCategory(category string) *QLoggingCategory { category_Cstring := C.CString(category) defer C.free(unsafe.Pointer(category_Cstring)) - var outptr_QLoggingCategory *C.QLoggingCategory = nil - C.QLoggingCategory_new(category_Cstring, &outptr_QLoggingCategory) - ret := newQLoggingCategory(outptr_QLoggingCategory) + ret := newQLoggingCategory(C.QLoggingCategory_new(category_Cstring)) ret.isSubclass = true return ret } diff --git a/qt/gen_qloggingcategory.h b/qt/gen_qloggingcategory.h index fc7648af..a14acf5e 100644 --- a/qt/gen_qloggingcategory.h +++ b/qt/gen_qloggingcategory.h @@ -20,7 +20,7 @@ class QLoggingCategory; typedef struct QLoggingCategory QLoggingCategory; #endif -void QLoggingCategory_new(const char* category, QLoggingCategory** outptr_QLoggingCategory); +QLoggingCategory* QLoggingCategory_new(const char* category); bool QLoggingCategory_IsDebugEnabled(const QLoggingCategory* self); bool QLoggingCategory_IsInfoEnabled(const QLoggingCategory* self); bool QLoggingCategory_IsWarningEnabled(const QLoggingCategory* self); diff --git a/qt/gen_qmainwindow.cpp b/qt/gen_qmainwindow.cpp index 628acd30..363d0269 100644 --- a/qt/gen_qmainwindow.cpp +++ b/qt/gen_qmainwindow.cpp @@ -1049,28 +1049,20 @@ public: }; -void QMainWindow_new(QWidget* parent, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMainWindow* ret = new MiqtVirtualQMainWindow(parent); - *outptr_QMainWindow = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMainWindow* QMainWindow_new(QWidget* parent) { + return new MiqtVirtualQMainWindow(parent); } -void QMainWindow_new2(QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMainWindow* ret = new MiqtVirtualQMainWindow(); - *outptr_QMainWindow = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMainWindow* QMainWindow_new2() { + return new MiqtVirtualQMainWindow(); } -void QMainWindow_new3(QWidget* parent, int flags, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMainWindow* ret = new MiqtVirtualQMainWindow(parent, static_cast(flags)); - *outptr_QMainWindow = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMainWindow* QMainWindow_new3(QWidget* parent, int flags) { + return new MiqtVirtualQMainWindow(parent, static_cast(flags)); +} + +void QMainWindow_virtbase(QMainWindow* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QMainWindow_MetaObject(const QMainWindow* self) { diff --git a/qt/gen_qmainwindow.go b/qt/gen_qmainwindow.go index 62cebd75..98b56d8a 100644 --- a/qt/gen_qmainwindow.go +++ b/qt/gen_qmainwindow.go @@ -46,59 +46,42 @@ func (this *QMainWindow) UnsafePointer() unsafe.Pointer { } // newQMainWindow constructs the type using only CGO pointers. -func newQMainWindow(h *C.QMainWindow, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMainWindow { +func newQMainWindow(h *C.QMainWindow) *QMainWindow { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QMainWindow_virtbase(h, &outptr_QWidget) + return &QMainWindow{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQMainWindow constructs the type using only unsafe pointers. -func UnsafeNewQMainWindow(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMainWindow { - if h == nil { - return nil - } - - return &QMainWindow{h: (*C.QMainWindow)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQMainWindow(h unsafe.Pointer) *QMainWindow { + return newQMainWindow((*C.QMainWindow)(h)) } // NewQMainWindow constructs a new QMainWindow object. func NewQMainWindow(parent *QWidget) *QMainWindow { - var outptr_QMainWindow *C.QMainWindow = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMainWindow_new(parent.cPointer(), &outptr_QMainWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMainWindow(outptr_QMainWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMainWindow(C.QMainWindow_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQMainWindow2 constructs a new QMainWindow object. func NewQMainWindow2() *QMainWindow { - var outptr_QMainWindow *C.QMainWindow = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMainWindow_new2(&outptr_QMainWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMainWindow(outptr_QMainWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMainWindow(C.QMainWindow_new2()) ret.isSubclass = true return ret } // NewQMainWindow3 constructs a new QMainWindow object. func NewQMainWindow3(parent *QWidget, flags WindowType) *QMainWindow { - var outptr_QMainWindow *C.QMainWindow = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMainWindow_new3(parent.cPointer(), (C.int)(flags), &outptr_QMainWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMainWindow(outptr_QMainWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMainWindow(C.QMainWindow_new3(parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -194,7 +177,7 @@ func (this *QMainWindow) IsSeparator(pos *QPoint) bool { } func (this *QMainWindow) MenuBar() *QMenuBar { - return newQMenuBar(C.QMainWindow_MenuBar(this.h), nil, nil, nil) + return newQMenuBar(C.QMainWindow_MenuBar(this.h)) } func (this *QMainWindow) SetMenuBar(menubar *QMenuBar) { @@ -202,7 +185,7 @@ func (this *QMainWindow) SetMenuBar(menubar *QMenuBar) { } func (this *QMainWindow) MenuWidget() *QWidget { - return newQWidget(C.QMainWindow_MenuWidget(this.h), nil, nil) + return newQWidget(C.QMainWindow_MenuWidget(this.h)) } func (this *QMainWindow) SetMenuWidget(menubar *QWidget) { @@ -210,7 +193,7 @@ func (this *QMainWindow) SetMenuWidget(menubar *QWidget) { } func (this *QMainWindow) StatusBar() *QStatusBar { - return newQStatusBar(C.QMainWindow_StatusBar(this.h), nil, nil, nil) + return newQStatusBar(C.QMainWindow_StatusBar(this.h)) } func (this *QMainWindow) SetStatusBar(statusbar *QStatusBar) { @@ -218,7 +201,7 @@ func (this *QMainWindow) SetStatusBar(statusbar *QStatusBar) { } func (this *QMainWindow) CentralWidget() *QWidget { - return newQWidget(C.QMainWindow_CentralWidget(this.h), nil, nil) + return newQWidget(C.QMainWindow_CentralWidget(this.h)) } func (this *QMainWindow) SetCentralWidget(widget *QWidget) { @@ -226,7 +209,7 @@ func (this *QMainWindow) SetCentralWidget(widget *QWidget) { } func (this *QMainWindow) TakeCentralWidget() *QWidget { - return newQWidget(C.QMainWindow_TakeCentralWidget(this.h), nil, nil) + return newQWidget(C.QMainWindow_TakeCentralWidget(this.h)) } func (this *QMainWindow) SetCorner(corner Corner, area DockWidgetArea) { @@ -258,7 +241,7 @@ func (this *QMainWindow) AddToolBarWithTitle(title string) *QToolBar { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return newQToolBar(C.QMainWindow_AddToolBarWithTitle(this.h, title_ms), nil, nil, nil) + return newQToolBar(C.QMainWindow_AddToolBarWithTitle(this.h, title_ms)) } func (this *QMainWindow) InsertToolBar(before *QToolBar, toolbar *QToolBar) { @@ -306,7 +289,7 @@ func (this *QMainWindow) TabifiedDockWidgets(dockwidget *QDockWidget) []*QDockWi _ret := make([]*QDockWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QDockWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQDockWidget(_outCast[i], nil, nil, nil) + _ret[i] = newQDockWidget(_outCast[i]) } return _ret } @@ -354,7 +337,7 @@ func (this *QMainWindow) RestoreState(state []byte) bool { } func (this *QMainWindow) CreatePopupMenu() *QMenu { - return newQMenu(C.QMainWindow_CreatePopupMenu(this.h), nil, nil, nil) + return newQMenu(C.QMainWindow_CreatePopupMenu(this.h)) } func (this *QMainWindow) SetAnimated(enabled bool) { @@ -424,7 +407,7 @@ func miqt_exec_callback_QMainWindow_TabifiedDockWidgetActivated(cb C.intptr_t, d } // Convert all CABI parameters to Go parameters - slotval1 := newQDockWidget(dockWidget, nil, nil, nil) + slotval1 := newQDockWidget(dockWidget) gofunc(slotval1) } @@ -493,7 +476,7 @@ func (this *QMainWindow) RestoreState2(state []byte, version int) bool { func (this *QMainWindow) callVirtualBase_CreatePopupMenu() *QMenu { - return newQMenu(C.QMainWindow_virtualbase_CreatePopupMenu(unsafe.Pointer(this.h)), nil, nil, nil) + return newQMenu(C.QMainWindow_virtualbase_CreatePopupMenu(unsafe.Pointer(this.h))) } func (this *QMainWindow) OnCreatePopupMenu(slot func(super func() *QMenu) *QMenu) { @@ -536,7 +519,7 @@ func miqt_exec_callback_QMainWindow_ContextMenuEvent(self *C.QMainWindow, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -773,7 +756,7 @@ func miqt_exec_callback_QMainWindow_MousePressEvent(self *C.QMainWindow, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -799,7 +782,7 @@ func miqt_exec_callback_QMainWindow_MouseReleaseEvent(self *C.QMainWindow, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -825,7 +808,7 @@ func miqt_exec_callback_QMainWindow_MouseDoubleClickEvent(self *C.QMainWindow, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -851,7 +834,7 @@ func miqt_exec_callback_QMainWindow_MouseMoveEvent(self *C.QMainWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -877,7 +860,7 @@ func miqt_exec_callback_QMainWindow_WheelEvent(self *C.QMainWindow, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -903,7 +886,7 @@ func miqt_exec_callback_QMainWindow_KeyPressEvent(self *C.QMainWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -929,7 +912,7 @@ func miqt_exec_callback_QMainWindow_KeyReleaseEvent(self *C.QMainWindow, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -955,7 +938,7 @@ func miqt_exec_callback_QMainWindow_FocusInEvent(self *C.QMainWindow, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -981,7 +964,7 @@ func miqt_exec_callback_QMainWindow_FocusOutEvent(self *C.QMainWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1059,7 +1042,7 @@ func miqt_exec_callback_QMainWindow_PaintEvent(self *C.QMainWindow, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1085,7 +1068,7 @@ func miqt_exec_callback_QMainWindow_MoveEvent(self *C.QMainWindow, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1111,7 +1094,7 @@ func miqt_exec_callback_QMainWindow_ResizeEvent(self *C.QMainWindow, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1137,7 +1120,7 @@ func miqt_exec_callback_QMainWindow_CloseEvent(self *C.QMainWindow, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1163,7 +1146,7 @@ func miqt_exec_callback_QMainWindow_TabletEvent(self *C.QMainWindow, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1189,7 +1172,7 @@ func miqt_exec_callback_QMainWindow_ActionEvent(self *C.QMainWindow, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1215,7 +1198,7 @@ func miqt_exec_callback_QMainWindow_DragEnterEvent(self *C.QMainWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1241,7 +1224,7 @@ func miqt_exec_callback_QMainWindow_DragMoveEvent(self *C.QMainWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1267,7 +1250,7 @@ func miqt_exec_callback_QMainWindow_DragLeaveEvent(self *C.QMainWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1293,7 +1276,7 @@ func miqt_exec_callback_QMainWindow_DropEvent(self *C.QMainWindow, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1319,7 +1302,7 @@ func miqt_exec_callback_QMainWindow_ShowEvent(self *C.QMainWindow, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1345,7 +1328,7 @@ func miqt_exec_callback_QMainWindow_HideEvent(self *C.QMainWindow, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1541,7 +1524,7 @@ func miqt_exec_callback_QMainWindow_InputMethodEvent(self *C.QMainWindow, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QMainWindow{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qmainwindow.h b/qt/gen_qmainwindow.h index 855f65c3..de5df4ba 100644 --- a/qt/gen_qmainwindow.h +++ b/qt/gen_qmainwindow.h @@ -86,9 +86,10 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QMainWindow_new(QWidget* parent, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMainWindow_new2(QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMainWindow_new3(QWidget* parent, int flags, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMainWindow* QMainWindow_new(QWidget* parent); +QMainWindow* QMainWindow_new2(); +QMainWindow* QMainWindow_new3(QWidget* parent, int flags); +void QMainWindow_virtbase(QMainWindow* src, QWidget** outptr_QWidget); QMetaObject* QMainWindow_MetaObject(const QMainWindow* self); void* QMainWindow_Metacast(QMainWindow* self, const char* param1); struct miqt_string QMainWindow_Tr(const char* s); diff --git a/qt/gen_qmargins.cpp b/qt/gen_qmargins.cpp index 7c594773..b1fd61d6 100644 --- a/qt/gen_qmargins.cpp +++ b/qt/gen_qmargins.cpp @@ -4,19 +4,16 @@ #include "gen_qmargins.h" #include "_cgo_export.h" -void QMargins_new(QMargins** outptr_QMargins) { - QMargins* ret = new QMargins(); - *outptr_QMargins = ret; +QMargins* QMargins_new() { + return new QMargins(); } -void QMargins_new2(int left, int top, int right, int bottom, QMargins** outptr_QMargins) { - QMargins* ret = new QMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); - *outptr_QMargins = ret; +QMargins* QMargins_new2(int left, int top, int right, int bottom) { + return new QMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); } -void QMargins_new3(QMargins* param1, QMargins** outptr_QMargins) { - QMargins* ret = new QMargins(*param1); - *outptr_QMargins = ret; +QMargins* QMargins_new3(QMargins* param1) { + return new QMargins(*param1); } bool QMargins_IsNull(const QMargins* self) { @@ -111,24 +108,20 @@ void QMargins_Delete(QMargins* self, bool isSubclass) { } } -void QMarginsF_new(QMarginsF** outptr_QMarginsF) { - QMarginsF* ret = new QMarginsF(); - *outptr_QMarginsF = ret; +QMarginsF* QMarginsF_new() { + return new QMarginsF(); } -void QMarginsF_new2(double left, double top, double right, double bottom, QMarginsF** outptr_QMarginsF) { - QMarginsF* ret = new QMarginsF(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); - *outptr_QMarginsF = ret; +QMarginsF* QMarginsF_new2(double left, double top, double right, double bottom) { + return new QMarginsF(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); } -void QMarginsF_new3(QMargins* margins, QMarginsF** outptr_QMarginsF) { - QMarginsF* ret = new QMarginsF(*margins); - *outptr_QMarginsF = ret; +QMarginsF* QMarginsF_new3(QMargins* margins) { + return new QMarginsF(*margins); } -void QMarginsF_new4(QMarginsF* param1, QMarginsF** outptr_QMarginsF) { - QMarginsF* ret = new QMarginsF(*param1); - *outptr_QMarginsF = ret; +QMarginsF* QMarginsF_new4(QMarginsF* param1) { + return new QMarginsF(*param1); } bool QMarginsF_IsNull(const QMarginsF* self) { diff --git a/qt/gen_qmargins.go b/qt/gen_qmargins.go index fd3e9cb3..84c748ec 100644 --- a/qt/gen_qmargins.go +++ b/qt/gen_qmargins.go @@ -37,44 +37,35 @@ func newQMargins(h *C.QMargins) *QMargins { if h == nil { return nil } + return &QMargins{h: h} } // UnsafeNewQMargins constructs the type using only unsafe pointers. func UnsafeNewQMargins(h unsafe.Pointer) *QMargins { - if h == nil { - return nil - } - - return &QMargins{h: (*C.QMargins)(h)} + return newQMargins((*C.QMargins)(h)) } // NewQMargins constructs a new QMargins object. func NewQMargins() *QMargins { - var outptr_QMargins *C.QMargins = nil - C.QMargins_new(&outptr_QMargins) - ret := newQMargins(outptr_QMargins) + ret := newQMargins(C.QMargins_new()) ret.isSubclass = true return ret } // NewQMargins2 constructs a new QMargins object. func NewQMargins2(left int, top int, right int, bottom int) *QMargins { - var outptr_QMargins *C.QMargins = nil - C.QMargins_new2((C.int)(left), (C.int)(top), (C.int)(right), (C.int)(bottom), &outptr_QMargins) - ret := newQMargins(outptr_QMargins) + ret := newQMargins(C.QMargins_new2((C.int)(left), (C.int)(top), (C.int)(right), (C.int)(bottom))) ret.isSubclass = true return ret } // NewQMargins3 constructs a new QMargins object. func NewQMargins3(param1 *QMargins) *QMargins { - var outptr_QMargins *C.QMargins = nil - C.QMargins_new3(param1.cPointer(), &outptr_QMargins) - ret := newQMargins(outptr_QMargins) + ret := newQMargins(C.QMargins_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -185,54 +176,43 @@ func newQMarginsF(h *C.QMarginsF) *QMarginsF { if h == nil { return nil } + return &QMarginsF{h: h} } // UnsafeNewQMarginsF constructs the type using only unsafe pointers. func UnsafeNewQMarginsF(h unsafe.Pointer) *QMarginsF { - if h == nil { - return nil - } - - return &QMarginsF{h: (*C.QMarginsF)(h)} + return newQMarginsF((*C.QMarginsF)(h)) } // NewQMarginsF constructs a new QMarginsF object. func NewQMarginsF() *QMarginsF { - var outptr_QMarginsF *C.QMarginsF = nil - C.QMarginsF_new(&outptr_QMarginsF) - ret := newQMarginsF(outptr_QMarginsF) + ret := newQMarginsF(C.QMarginsF_new()) ret.isSubclass = true return ret } // NewQMarginsF2 constructs a new QMarginsF object. func NewQMarginsF2(left float64, top float64, right float64, bottom float64) *QMarginsF { - var outptr_QMarginsF *C.QMarginsF = nil - C.QMarginsF_new2((C.double)(left), (C.double)(top), (C.double)(right), (C.double)(bottom), &outptr_QMarginsF) - ret := newQMarginsF(outptr_QMarginsF) + ret := newQMarginsF(C.QMarginsF_new2((C.double)(left), (C.double)(top), (C.double)(right), (C.double)(bottom))) ret.isSubclass = true return ret } // NewQMarginsF3 constructs a new QMarginsF object. func NewQMarginsF3(margins *QMargins) *QMarginsF { - var outptr_QMarginsF *C.QMarginsF = nil - C.QMarginsF_new3(margins.cPointer(), &outptr_QMarginsF) - ret := newQMarginsF(outptr_QMarginsF) + ret := newQMarginsF(C.QMarginsF_new3(margins.cPointer())) ret.isSubclass = true return ret } // NewQMarginsF4 constructs a new QMarginsF object. func NewQMarginsF4(param1 *QMarginsF) *QMarginsF { - var outptr_QMarginsF *C.QMarginsF = nil - C.QMarginsF_new4(param1.cPointer(), &outptr_QMarginsF) - ret := newQMarginsF(outptr_QMarginsF) + ret := newQMarginsF(C.QMarginsF_new4(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qmargins.h b/qt/gen_qmargins.h index f1773614..4ebec5dd 100644 --- a/qt/gen_qmargins.h +++ b/qt/gen_qmargins.h @@ -22,9 +22,9 @@ typedef struct QMargins QMargins; typedef struct QMarginsF QMarginsF; #endif -void QMargins_new(QMargins** outptr_QMargins); -void QMargins_new2(int left, int top, int right, int bottom, QMargins** outptr_QMargins); -void QMargins_new3(QMargins* param1, QMargins** outptr_QMargins); +QMargins* QMargins_new(); +QMargins* QMargins_new2(int left, int top, int right, int bottom); +QMargins* QMargins_new3(QMargins* param1); bool QMargins_IsNull(const QMargins* self); int QMargins_Left(const QMargins* self); int QMargins_Top(const QMargins* self); @@ -44,10 +44,10 @@ QMargins* QMargins_OperatorMultiplyAssignWithQreal(QMargins* self, double param1 QMargins* QMargins_OperatorDivideAssignWithQreal(QMargins* self, double param1); void QMargins_Delete(QMargins* self, bool isSubclass); -void QMarginsF_new(QMarginsF** outptr_QMarginsF); -void QMarginsF_new2(double left, double top, double right, double bottom, QMarginsF** outptr_QMarginsF); -void QMarginsF_new3(QMargins* margins, QMarginsF** outptr_QMarginsF); -void QMarginsF_new4(QMarginsF* param1, QMarginsF** outptr_QMarginsF); +QMarginsF* QMarginsF_new(); +QMarginsF* QMarginsF_new2(double left, double top, double right, double bottom); +QMarginsF* QMarginsF_new3(QMargins* margins); +QMarginsF* QMarginsF_new4(QMarginsF* param1); bool QMarginsF_IsNull(const QMarginsF* self); double QMarginsF_Left(const QMarginsF* self); double QMarginsF_Top(const QMarginsF* self); diff --git a/qt/gen_qmatrix.cpp b/qt/gen_qmatrix.cpp index 8fef0219..42db8e7d 100644 --- a/qt/gen_qmatrix.cpp +++ b/qt/gen_qmatrix.cpp @@ -11,24 +11,20 @@ #include "gen_qmatrix.h" #include "_cgo_export.h" -void QMatrix_new(int param1, QMatrix** outptr_QMatrix) { - QMatrix* ret = new QMatrix(static_cast(param1)); - *outptr_QMatrix = ret; +QMatrix* QMatrix_new(int param1) { + return new QMatrix(static_cast(param1)); } -void QMatrix_new2(QMatrix** outptr_QMatrix) { - QMatrix* ret = new QMatrix(); - *outptr_QMatrix = ret; +QMatrix* QMatrix_new2() { + return new QMatrix(); } -void QMatrix_new3(double m11, double m12, double m21, double m22, double dx, double dy, QMatrix** outptr_QMatrix) { - QMatrix* ret = new QMatrix(static_cast(m11), static_cast(m12), static_cast(m21), static_cast(m22), static_cast(dx), static_cast(dy)); - *outptr_QMatrix = ret; +QMatrix* QMatrix_new3(double m11, double m12, double m21, double m22, double dx, double dy) { + return new QMatrix(static_cast(m11), static_cast(m12), static_cast(m21), static_cast(m22), static_cast(dx), static_cast(dy)); } -void QMatrix_new4(QMatrix* other, QMatrix** outptr_QMatrix) { - QMatrix* ret = new QMatrix(*other); - *outptr_QMatrix = ret; +QMatrix* QMatrix_new4(QMatrix* other) { + return new QMatrix(*other); } void QMatrix_OperatorAssign(QMatrix* self, QMatrix* param1) { diff --git a/qt/gen_qmatrix.go b/qt/gen_qmatrix.go index 8a858af1..8e2cb049 100644 --- a/qt/gen_qmatrix.go +++ b/qt/gen_qmatrix.go @@ -37,54 +37,43 @@ func newQMatrix(h *C.QMatrix) *QMatrix { if h == nil { return nil } + return &QMatrix{h: h} } // UnsafeNewQMatrix constructs the type using only unsafe pointers. func UnsafeNewQMatrix(h unsafe.Pointer) *QMatrix { - if h == nil { - return nil - } - - return &QMatrix{h: (*C.QMatrix)(h)} + return newQMatrix((*C.QMatrix)(h)) } // NewQMatrix constructs a new QMatrix object. func NewQMatrix(param1 Initialization) *QMatrix { - var outptr_QMatrix *C.QMatrix = nil - C.QMatrix_new((C.int)(param1), &outptr_QMatrix) - ret := newQMatrix(outptr_QMatrix) + ret := newQMatrix(C.QMatrix_new((C.int)(param1))) ret.isSubclass = true return ret } // NewQMatrix2 constructs a new QMatrix object. func NewQMatrix2() *QMatrix { - var outptr_QMatrix *C.QMatrix = nil - C.QMatrix_new2(&outptr_QMatrix) - ret := newQMatrix(outptr_QMatrix) + ret := newQMatrix(C.QMatrix_new2()) ret.isSubclass = true return ret } // NewQMatrix3 constructs a new QMatrix object. func NewQMatrix3(m11 float64, m12 float64, m21 float64, m22 float64, dx float64, dy float64) *QMatrix { - var outptr_QMatrix *C.QMatrix = nil - C.QMatrix_new3((C.double)(m11), (C.double)(m12), (C.double)(m21), (C.double)(m22), (C.double)(dx), (C.double)(dy), &outptr_QMatrix) - ret := newQMatrix(outptr_QMatrix) + ret := newQMatrix(C.QMatrix_new3((C.double)(m11), (C.double)(m12), (C.double)(m21), (C.double)(m22), (C.double)(dx), (C.double)(dy))) ret.isSubclass = true return ret } // NewQMatrix4 constructs a new QMatrix object. func NewQMatrix4(other *QMatrix) *QMatrix { - var outptr_QMatrix *C.QMatrix = nil - C.QMatrix_new4(other.cPointer(), &outptr_QMatrix) - ret := newQMatrix(outptr_QMatrix) + ret := newQMatrix(C.QMatrix_new4(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qmatrix.h b/qt/gen_qmatrix.h index 64bc7df2..11e9f619 100644 --- a/qt/gen_qmatrix.h +++ b/qt/gen_qmatrix.h @@ -36,10 +36,10 @@ typedef struct QRectF QRectF; typedef struct QRegion QRegion; #endif -void QMatrix_new(int param1, QMatrix** outptr_QMatrix); -void QMatrix_new2(QMatrix** outptr_QMatrix); -void QMatrix_new3(double m11, double m12, double m21, double m22, double dx, double dy, QMatrix** outptr_QMatrix); -void QMatrix_new4(QMatrix* other, QMatrix** outptr_QMatrix); +QMatrix* QMatrix_new(int param1); +QMatrix* QMatrix_new2(); +QMatrix* QMatrix_new3(double m11, double m12, double m21, double m22, double dx, double dy); +QMatrix* QMatrix_new4(QMatrix* other); void QMatrix_OperatorAssign(QMatrix* self, QMatrix* param1); void QMatrix_SetMatrix(QMatrix* self, double m11, double m12, double m21, double m22, double dx, double dy); double QMatrix_M11(const QMatrix* self); diff --git a/qt/gen_qmatrix4x4.cpp b/qt/gen_qmatrix4x4.cpp index 3045ea26..8a77a5a1 100644 --- a/qt/gen_qmatrix4x4.cpp +++ b/qt/gen_qmatrix4x4.cpp @@ -12,44 +12,36 @@ #include "gen_qmatrix4x4.h" #include "_cgo_export.h" -void QMatrix4x4_new(QMatrix4x4** outptr_QMatrix4x4) { - QMatrix4x4* ret = new QMatrix4x4(); - *outptr_QMatrix4x4 = ret; +QMatrix4x4* QMatrix4x4_new() { + return new QMatrix4x4(); } -void QMatrix4x4_new2(int param1, QMatrix4x4** outptr_QMatrix4x4) { - QMatrix4x4* ret = new QMatrix4x4(static_cast(param1)); - *outptr_QMatrix4x4 = ret; +QMatrix4x4* QMatrix4x4_new2(int param1) { + return new QMatrix4x4(static_cast(param1)); } -void QMatrix4x4_new3(const float* values, QMatrix4x4** outptr_QMatrix4x4) { - QMatrix4x4* ret = new QMatrix4x4(static_cast(values)); - *outptr_QMatrix4x4 = ret; +QMatrix4x4* QMatrix4x4_new3(const float* values) { + return new QMatrix4x4(static_cast(values)); } -void QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44, QMatrix4x4** outptr_QMatrix4x4) { - QMatrix4x4* ret = new QMatrix4x4(static_cast(m11), static_cast(m12), static_cast(m13), static_cast(m14), static_cast(m21), static_cast(m22), static_cast(m23), static_cast(m24), static_cast(m31), static_cast(m32), static_cast(m33), static_cast(m34), static_cast(m41), static_cast(m42), static_cast(m43), static_cast(m44)); - *outptr_QMatrix4x4 = ret; +QMatrix4x4* QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) { + return new QMatrix4x4(static_cast(m11), static_cast(m12), static_cast(m13), static_cast(m14), static_cast(m21), static_cast(m22), static_cast(m23), static_cast(m24), static_cast(m31), static_cast(m32), static_cast(m33), static_cast(m34), static_cast(m41), static_cast(m42), static_cast(m43), static_cast(m44)); } -void QMatrix4x4_new5(const float* values, int cols, int rows, QMatrix4x4** outptr_QMatrix4x4) { - QMatrix4x4* ret = new QMatrix4x4(static_cast(values), static_cast(cols), static_cast(rows)); - *outptr_QMatrix4x4 = ret; +QMatrix4x4* QMatrix4x4_new5(const float* values, int cols, int rows) { + return new QMatrix4x4(static_cast(values), static_cast(cols), static_cast(rows)); } -void QMatrix4x4_new6(QTransform* transform, QMatrix4x4** outptr_QMatrix4x4) { - QMatrix4x4* ret = new QMatrix4x4(*transform); - *outptr_QMatrix4x4 = ret; +QMatrix4x4* QMatrix4x4_new6(QTransform* transform) { + return new QMatrix4x4(*transform); } -void QMatrix4x4_new7(QMatrix* matrix, QMatrix4x4** outptr_QMatrix4x4) { - QMatrix4x4* ret = new QMatrix4x4(*matrix); - *outptr_QMatrix4x4 = ret; +QMatrix4x4* QMatrix4x4_new7(QMatrix* matrix) { + return new QMatrix4x4(*matrix); } -void QMatrix4x4_new8(QMatrix4x4* param1, QMatrix4x4** outptr_QMatrix4x4) { - QMatrix4x4* ret = new QMatrix4x4(*param1); - *outptr_QMatrix4x4 = ret; +QMatrix4x4* QMatrix4x4_new8(QMatrix4x4* param1) { + return new QMatrix4x4(*param1); } QVector4D* QMatrix4x4_Column(const QMatrix4x4* self, int index) { diff --git a/qt/gen_qmatrix4x4.go b/qt/gen_qmatrix4x4.go index e7218d86..1c0fa8e0 100644 --- a/qt/gen_qmatrix4x4.go +++ b/qt/gen_qmatrix4x4.go @@ -37,94 +37,75 @@ func newQMatrix4x4(h *C.QMatrix4x4) *QMatrix4x4 { if h == nil { return nil } + return &QMatrix4x4{h: h} } // UnsafeNewQMatrix4x4 constructs the type using only unsafe pointers. func UnsafeNewQMatrix4x4(h unsafe.Pointer) *QMatrix4x4 { - if h == nil { - return nil - } - - return &QMatrix4x4{h: (*C.QMatrix4x4)(h)} + return newQMatrix4x4((*C.QMatrix4x4)(h)) } // NewQMatrix4x4 constructs a new QMatrix4x4 object. func NewQMatrix4x4() *QMatrix4x4 { - var outptr_QMatrix4x4 *C.QMatrix4x4 = nil - C.QMatrix4x4_new(&outptr_QMatrix4x4) - ret := newQMatrix4x4(outptr_QMatrix4x4) + ret := newQMatrix4x4(C.QMatrix4x4_new()) ret.isSubclass = true return ret } // NewQMatrix4x42 constructs a new QMatrix4x4 object. func NewQMatrix4x42(param1 Initialization) *QMatrix4x4 { - var outptr_QMatrix4x4 *C.QMatrix4x4 = nil - C.QMatrix4x4_new2((C.int)(param1), &outptr_QMatrix4x4) - ret := newQMatrix4x4(outptr_QMatrix4x4) + ret := newQMatrix4x4(C.QMatrix4x4_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQMatrix4x43 constructs a new QMatrix4x4 object. func NewQMatrix4x43(values *float32) *QMatrix4x4 { - var outptr_QMatrix4x4 *C.QMatrix4x4 = nil - C.QMatrix4x4_new3((*C.float)(unsafe.Pointer(values)), &outptr_QMatrix4x4) - ret := newQMatrix4x4(outptr_QMatrix4x4) + ret := newQMatrix4x4(C.QMatrix4x4_new3((*C.float)(unsafe.Pointer(values)))) ret.isSubclass = true return ret } // NewQMatrix4x44 constructs a new QMatrix4x4 object. func NewQMatrix4x44(m11 float32, m12 float32, m13 float32, m14 float32, m21 float32, m22 float32, m23 float32, m24 float32, m31 float32, m32 float32, m33 float32, m34 float32, m41 float32, m42 float32, m43 float32, m44 float32) *QMatrix4x4 { - var outptr_QMatrix4x4 *C.QMatrix4x4 = nil - C.QMatrix4x4_new4((C.float)(m11), (C.float)(m12), (C.float)(m13), (C.float)(m14), (C.float)(m21), (C.float)(m22), (C.float)(m23), (C.float)(m24), (C.float)(m31), (C.float)(m32), (C.float)(m33), (C.float)(m34), (C.float)(m41), (C.float)(m42), (C.float)(m43), (C.float)(m44), &outptr_QMatrix4x4) - ret := newQMatrix4x4(outptr_QMatrix4x4) + ret := newQMatrix4x4(C.QMatrix4x4_new4((C.float)(m11), (C.float)(m12), (C.float)(m13), (C.float)(m14), (C.float)(m21), (C.float)(m22), (C.float)(m23), (C.float)(m24), (C.float)(m31), (C.float)(m32), (C.float)(m33), (C.float)(m34), (C.float)(m41), (C.float)(m42), (C.float)(m43), (C.float)(m44))) ret.isSubclass = true return ret } // NewQMatrix4x45 constructs a new QMatrix4x4 object. func NewQMatrix4x45(values *float32, cols int, rows int) *QMatrix4x4 { - var outptr_QMatrix4x4 *C.QMatrix4x4 = nil - C.QMatrix4x4_new5((*C.float)(unsafe.Pointer(values)), (C.int)(cols), (C.int)(rows), &outptr_QMatrix4x4) - ret := newQMatrix4x4(outptr_QMatrix4x4) + ret := newQMatrix4x4(C.QMatrix4x4_new5((*C.float)(unsafe.Pointer(values)), (C.int)(cols), (C.int)(rows))) ret.isSubclass = true return ret } // NewQMatrix4x46 constructs a new QMatrix4x4 object. func NewQMatrix4x46(transform *QTransform) *QMatrix4x4 { - var outptr_QMatrix4x4 *C.QMatrix4x4 = nil - C.QMatrix4x4_new6(transform.cPointer(), &outptr_QMatrix4x4) - ret := newQMatrix4x4(outptr_QMatrix4x4) + ret := newQMatrix4x4(C.QMatrix4x4_new6(transform.cPointer())) ret.isSubclass = true return ret } // NewQMatrix4x47 constructs a new QMatrix4x4 object. func NewQMatrix4x47(matrix *QMatrix) *QMatrix4x4 { - var outptr_QMatrix4x4 *C.QMatrix4x4 = nil - C.QMatrix4x4_new7(matrix.cPointer(), &outptr_QMatrix4x4) - ret := newQMatrix4x4(outptr_QMatrix4x4) + ret := newQMatrix4x4(C.QMatrix4x4_new7(matrix.cPointer())) ret.isSubclass = true return ret } // NewQMatrix4x48 constructs a new QMatrix4x4 object. func NewQMatrix4x48(param1 *QMatrix4x4) *QMatrix4x4 { - var outptr_QMatrix4x4 *C.QMatrix4x4 = nil - C.QMatrix4x4_new8(param1.cPointer(), &outptr_QMatrix4x4) - ret := newQMatrix4x4(outptr_QMatrix4x4) + ret := newQMatrix4x4(C.QMatrix4x4_new8(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qmatrix4x4.h b/qt/gen_qmatrix4x4.h index b306c28f..74a39294 100644 --- a/qt/gen_qmatrix4x4.h +++ b/qt/gen_qmatrix4x4.h @@ -38,14 +38,14 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -void QMatrix4x4_new(QMatrix4x4** outptr_QMatrix4x4); -void QMatrix4x4_new2(int param1, QMatrix4x4** outptr_QMatrix4x4); -void QMatrix4x4_new3(const float* values, QMatrix4x4** outptr_QMatrix4x4); -void QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44, QMatrix4x4** outptr_QMatrix4x4); -void QMatrix4x4_new5(const float* values, int cols, int rows, QMatrix4x4** outptr_QMatrix4x4); -void QMatrix4x4_new6(QTransform* transform, QMatrix4x4** outptr_QMatrix4x4); -void QMatrix4x4_new7(QMatrix* matrix, QMatrix4x4** outptr_QMatrix4x4); -void QMatrix4x4_new8(QMatrix4x4* param1, QMatrix4x4** outptr_QMatrix4x4); +QMatrix4x4* QMatrix4x4_new(); +QMatrix4x4* QMatrix4x4_new2(int param1); +QMatrix4x4* QMatrix4x4_new3(const float* values); +QMatrix4x4* QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44); +QMatrix4x4* QMatrix4x4_new5(const float* values, int cols, int rows); +QMatrix4x4* QMatrix4x4_new6(QTransform* transform); +QMatrix4x4* QMatrix4x4_new7(QMatrix* matrix); +QMatrix4x4* QMatrix4x4_new8(QMatrix4x4* param1); QVector4D* QMatrix4x4_Column(const QMatrix4x4* self, int index); void QMatrix4x4_SetColumn(QMatrix4x4* self, int index, QVector4D* value); QVector4D* QMatrix4x4_Row(const QMatrix4x4* self, int index); diff --git a/qt/gen_qmdiarea.cpp b/qt/gen_qmdiarea.cpp index b9d0e37d..734644f7 100644 --- a/qt/gen_qmdiarea.cpp +++ b/qt/gen_qmdiarea.cpp @@ -609,24 +609,16 @@ public: }; -void QMdiArea_new(QWidget* parent, QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMdiArea* ret = new MiqtVirtualQMdiArea(parent); - *outptr_QMdiArea = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMdiArea* QMdiArea_new(QWidget* parent) { + return new MiqtVirtualQMdiArea(parent); } -void QMdiArea_new2(QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMdiArea* ret = new MiqtVirtualQMdiArea(); - *outptr_QMdiArea = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMdiArea* QMdiArea_new2() { + return new MiqtVirtualQMdiArea(); +} + +void QMdiArea_virtbase(QMdiArea* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); } QMetaObject* QMdiArea_MetaObject(const QMdiArea* self) { diff --git a/qt/gen_qmdiarea.go b/qt/gen_qmdiarea.go index f0c235db..48a1f785 100644 --- a/qt/gen_qmdiarea.go +++ b/qt/gen_qmdiarea.go @@ -56,50 +56,34 @@ func (this *QMdiArea) UnsafePointer() unsafe.Pointer { } // newQMdiArea constructs the type using only CGO pointers. -func newQMdiArea(h *C.QMdiArea, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMdiArea { +func newQMdiArea(h *C.QMdiArea) *QMdiArea { if h == nil { return nil } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QMdiArea_virtbase(h, &outptr_QAbstractScrollArea) + return &QMdiArea{h: h, - QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractScrollArea: newQAbstractScrollArea(outptr_QAbstractScrollArea)} } // UnsafeNewQMdiArea constructs the type using only unsafe pointers. -func UnsafeNewQMdiArea(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMdiArea { - if h == nil { - return nil - } - - return &QMdiArea{h: (*C.QMdiArea)(h), - QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQMdiArea(h unsafe.Pointer) *QMdiArea { + return newQMdiArea((*C.QMdiArea)(h)) } // NewQMdiArea constructs a new QMdiArea object. func NewQMdiArea(parent *QWidget) *QMdiArea { - var outptr_QMdiArea *C.QMdiArea = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMdiArea_new(parent.cPointer(), &outptr_QMdiArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMdiArea(outptr_QMdiArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMdiArea(C.QMdiArea_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQMdiArea2 constructs a new QMdiArea object. func NewQMdiArea2() *QMdiArea { - var outptr_QMdiArea *C.QMdiArea = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMdiArea_new2(&outptr_QMdiArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMdiArea(outptr_QMdiArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMdiArea(C.QMdiArea_new2()) ret.isSubclass = true return ret } @@ -145,11 +129,11 @@ func (this *QMdiArea) MinimumSizeHint() *QSize { } func (this *QMdiArea) CurrentSubWindow() *QMdiSubWindow { - return newQMdiSubWindow(C.QMdiArea_CurrentSubWindow(this.h), nil, nil, nil) + return newQMdiSubWindow(C.QMdiArea_CurrentSubWindow(this.h)) } func (this *QMdiArea) ActiveSubWindow() *QMdiSubWindow { - return newQMdiSubWindow(C.QMdiArea_ActiveSubWindow(this.h), nil, nil, nil) + return newQMdiSubWindow(C.QMdiArea_ActiveSubWindow(this.h)) } func (this *QMdiArea) SubWindowList() []*QMdiSubWindow { @@ -157,13 +141,13 @@ func (this *QMdiArea) SubWindowList() []*QMdiSubWindow { _ret := make([]*QMdiSubWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QMdiSubWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQMdiSubWindow(_outCast[i], nil, nil, nil) + _ret[i] = newQMdiSubWindow(_outCast[i]) } return _ret } func (this *QMdiArea) AddSubWindow(widget *QWidget) *QMdiSubWindow { - return newQMdiSubWindow(C.QMdiArea_AddSubWindow(this.h, widget.cPointer()), nil, nil, nil) + return newQMdiSubWindow(C.QMdiArea_AddSubWindow(this.h, widget.cPointer())) } func (this *QMdiArea) RemoveSubWindow(widget *QWidget) { @@ -259,7 +243,7 @@ func miqt_exec_callback_QMdiArea_SubWindowActivated(cb C.intptr_t, param1 *C.QMd } // Convert all CABI parameters to Go parameters - slotval1 := newQMdiSubWindow(param1, nil, nil, nil) + slotval1 := newQMdiSubWindow(param1) gofunc(slotval1) } @@ -341,13 +325,13 @@ func (this *QMdiArea) SubWindowList1(order QMdiArea__WindowOrder) []*QMdiSubWind _ret := make([]*QMdiSubWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QMdiSubWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQMdiSubWindow(_outCast[i], nil, nil, nil) + _ret[i] = newQMdiSubWindow(_outCast[i]) } return _ret } func (this *QMdiArea) AddSubWindow2(widget *QWidget, flags WindowType) *QMdiSubWindow { - return newQMdiSubWindow(C.QMdiArea_AddSubWindow2(this.h, widget.cPointer(), (C.int)(flags)), nil, nil, nil) + return newQMdiSubWindow(C.QMdiArea_AddSubWindow2(this.h, widget.cPointer(), (C.int)(flags))) } func (this *QMdiArea) SetOption2(option QMdiArea__AreaOption, on bool) { @@ -428,7 +412,7 @@ func miqt_exec_callback_QMdiArea_SetupViewport(self *C.QMdiArea, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(viewport, nil, nil) + slotval1 := newQWidget(viewport) gofunc((&QMdiArea{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -512,7 +496,7 @@ func miqt_exec_callback_QMdiArea_PaintEvent(self *C.QMdiArea, cb C.intptr_t, pai } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(paintEvent, nil) + slotval1 := newQPaintEvent(paintEvent) gofunc((&QMdiArea{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -538,7 +522,7 @@ func miqt_exec_callback_QMdiArea_ChildEvent(self *C.QMdiArea, cb C.intptr_t, chi } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(childEvent, nil) + slotval1 := newQChildEvent(childEvent) gofunc((&QMdiArea{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -564,7 +548,7 @@ func miqt_exec_callback_QMdiArea_ResizeEvent(self *C.QMdiArea, cb C.intptr_t, re } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(resizeEvent, nil) + slotval1 := newQResizeEvent(resizeEvent) gofunc((&QMdiArea{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -590,7 +574,7 @@ func miqt_exec_callback_QMdiArea_TimerEvent(self *C.QMdiArea, cb C.intptr_t, tim } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(timerEvent, nil) + slotval1 := newQTimerEvent(timerEvent) gofunc((&QMdiArea{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -616,7 +600,7 @@ func miqt_exec_callback_QMdiArea_ShowEvent(self *C.QMdiArea, cb C.intptr_t, show } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(showEvent, nil) + slotval1 := newQShowEvent(showEvent) gofunc((&QMdiArea{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -698,7 +682,7 @@ func miqt_exec_callback_QMdiArea_MousePressEvent(self *C.QMdiArea, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -724,7 +708,7 @@ func miqt_exec_callback_QMdiArea_MouseReleaseEvent(self *C.QMdiArea, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -750,7 +734,7 @@ func miqt_exec_callback_QMdiArea_MouseDoubleClickEvent(self *C.QMdiArea, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -776,7 +760,7 @@ func miqt_exec_callback_QMdiArea_MouseMoveEvent(self *C.QMdiArea, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -802,7 +786,7 @@ func miqt_exec_callback_QMdiArea_WheelEvent(self *C.QMdiArea, cb C.intptr_t, par } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(param1, nil, nil) + slotval1 := newQWheelEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -828,7 +812,7 @@ func miqt_exec_callback_QMdiArea_ContextMenuEvent(self *C.QMdiArea, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -854,7 +838,7 @@ func miqt_exec_callback_QMdiArea_DragEnterEvent(self *C.QMdiArea, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(param1, nil, nil, nil) + slotval1 := newQDragEnterEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -880,7 +864,7 @@ func miqt_exec_callback_QMdiArea_DragMoveEvent(self *C.QMdiArea, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(param1, nil, nil) + slotval1 := newQDragMoveEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -906,7 +890,7 @@ func miqt_exec_callback_QMdiArea_DragLeaveEvent(self *C.QMdiArea, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(param1, nil) + slotval1 := newQDragLeaveEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -932,7 +916,7 @@ func miqt_exec_callback_QMdiArea_DropEvent(self *C.QMdiArea, cb C.intptr_t, para } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(param1, nil) + slotval1 := newQDropEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_DropEvent, slotval1) @@ -958,7 +942,7 @@ func miqt_exec_callback_QMdiArea_KeyPressEvent(self *C.QMdiArea, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_KeyPressEvent, slotval1) diff --git a/qt/gen_qmdiarea.h b/qt/gen_qmdiarea.h index 2781a012..da286302 100644 --- a/qt/gen_qmdiarea.h +++ b/qt/gen_qmdiarea.h @@ -66,8 +66,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QMdiArea_new(QWidget* parent, QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMdiArea_new2(QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMdiArea* QMdiArea_new(QWidget* parent); +QMdiArea* QMdiArea_new2(); +void QMdiArea_virtbase(QMdiArea* src, QAbstractScrollArea** outptr_QAbstractScrollArea); QMetaObject* QMdiArea_MetaObject(const QMdiArea* self); void* QMdiArea_Metacast(QMdiArea* self, const char* param1); struct miqt_string QMdiArea_Tr(const char* s); diff --git a/qt/gen_qmdisubwindow.cpp b/qt/gen_qmdisubwindow.cpp index 0a1a4291..eaa76e6c 100644 --- a/qt/gen_qmdisubwindow.cpp +++ b/qt/gen_qmdisubwindow.cpp @@ -1097,28 +1097,20 @@ public: }; -void QMdiSubWindow_new(QWidget* parent, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMdiSubWindow* ret = new MiqtVirtualQMdiSubWindow(parent); - *outptr_QMdiSubWindow = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMdiSubWindow* QMdiSubWindow_new(QWidget* parent) { + return new MiqtVirtualQMdiSubWindow(parent); } -void QMdiSubWindow_new2(QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMdiSubWindow* ret = new MiqtVirtualQMdiSubWindow(); - *outptr_QMdiSubWindow = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMdiSubWindow* QMdiSubWindow_new2() { + return new MiqtVirtualQMdiSubWindow(); } -void QMdiSubWindow_new3(QWidget* parent, int flags, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMdiSubWindow* ret = new MiqtVirtualQMdiSubWindow(parent, static_cast(flags)); - *outptr_QMdiSubWindow = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMdiSubWindow* QMdiSubWindow_new3(QWidget* parent, int flags) { + return new MiqtVirtualQMdiSubWindow(parent, static_cast(flags)); +} + +void QMdiSubWindow_virtbase(QMdiSubWindow* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QMdiSubWindow_MetaObject(const QMdiSubWindow* self) { diff --git a/qt/gen_qmdisubwindow.go b/qt/gen_qmdisubwindow.go index b5bc134d..c1b62f7a 100644 --- a/qt/gen_qmdisubwindow.go +++ b/qt/gen_qmdisubwindow.go @@ -44,59 +44,42 @@ func (this *QMdiSubWindow) UnsafePointer() unsafe.Pointer { } // newQMdiSubWindow constructs the type using only CGO pointers. -func newQMdiSubWindow(h *C.QMdiSubWindow, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMdiSubWindow { +func newQMdiSubWindow(h *C.QMdiSubWindow) *QMdiSubWindow { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QMdiSubWindow_virtbase(h, &outptr_QWidget) + return &QMdiSubWindow{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQMdiSubWindow constructs the type using only unsafe pointers. -func UnsafeNewQMdiSubWindow(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMdiSubWindow { - if h == nil { - return nil - } - - return &QMdiSubWindow{h: (*C.QMdiSubWindow)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQMdiSubWindow(h unsafe.Pointer) *QMdiSubWindow { + return newQMdiSubWindow((*C.QMdiSubWindow)(h)) } // NewQMdiSubWindow constructs a new QMdiSubWindow object. func NewQMdiSubWindow(parent *QWidget) *QMdiSubWindow { - var outptr_QMdiSubWindow *C.QMdiSubWindow = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMdiSubWindow_new(parent.cPointer(), &outptr_QMdiSubWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMdiSubWindow(outptr_QMdiSubWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMdiSubWindow(C.QMdiSubWindow_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQMdiSubWindow2 constructs a new QMdiSubWindow object. func NewQMdiSubWindow2() *QMdiSubWindow { - var outptr_QMdiSubWindow *C.QMdiSubWindow = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMdiSubWindow_new2(&outptr_QMdiSubWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMdiSubWindow(outptr_QMdiSubWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMdiSubWindow(C.QMdiSubWindow_new2()) ret.isSubclass = true return ret } // NewQMdiSubWindow3 constructs a new QMdiSubWindow object. func NewQMdiSubWindow3(parent *QWidget, flags WindowType) *QMdiSubWindow { - var outptr_QMdiSubWindow *C.QMdiSubWindow = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMdiSubWindow_new3(parent.cPointer(), (C.int)(flags), &outptr_QMdiSubWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMdiSubWindow(outptr_QMdiSubWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMdiSubWindow(C.QMdiSubWindow_new3(parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -146,15 +129,15 @@ func (this *QMdiSubWindow) SetWidget(widget *QWidget) { } func (this *QMdiSubWindow) Widget() *QWidget { - return newQWidget(C.QMdiSubWindow_Widget(this.h), nil, nil) + return newQWidget(C.QMdiSubWindow_Widget(this.h)) } func (this *QMdiSubWindow) MaximizedButtonsWidget() *QWidget { - return newQWidget(C.QMdiSubWindow_MaximizedButtonsWidget(this.h), nil, nil) + return newQWidget(C.QMdiSubWindow_MaximizedButtonsWidget(this.h)) } func (this *QMdiSubWindow) MaximizedSystemMenuIconWidget() *QWidget { - return newQWidget(C.QMdiSubWindow_MaximizedSystemMenuIconWidget(this.h), nil, nil) + return newQWidget(C.QMdiSubWindow_MaximizedSystemMenuIconWidget(this.h)) } func (this *QMdiSubWindow) IsShaded() bool { @@ -190,11 +173,11 @@ func (this *QMdiSubWindow) SetSystemMenu(systemMenu *QMenu) { } func (this *QMdiSubWindow) SystemMenu() *QMenu { - return newQMenu(C.QMdiSubWindow_SystemMenu(this.h), nil, nil, nil) + return newQMenu(C.QMdiSubWindow_SystemMenu(this.h)) } func (this *QMdiSubWindow) MdiArea() *QMdiArea { - return newQMdiArea(C.QMdiSubWindow_MdiArea(this.h), nil, nil, nil, nil, nil) + return newQMdiArea(C.QMdiSubWindow_MdiArea(this.h)) } func (this *QMdiSubWindow) WindowStateChanged(oldState WindowState, newState WindowState) { @@ -424,7 +407,7 @@ func miqt_exec_callback_QMdiSubWindow_ShowEvent(self *C.QMdiSubWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(showEvent, nil) + slotval1 := newQShowEvent(showEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -450,7 +433,7 @@ func miqt_exec_callback_QMdiSubWindow_HideEvent(self *C.QMdiSubWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(hideEvent, nil) + slotval1 := newQHideEvent(hideEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_HideEvent, slotval1) @@ -502,7 +485,7 @@ func miqt_exec_callback_QMdiSubWindow_CloseEvent(self *C.QMdiSubWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(closeEvent, nil) + slotval1 := newQCloseEvent(closeEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -554,7 +537,7 @@ func miqt_exec_callback_QMdiSubWindow_ResizeEvent(self *C.QMdiSubWindow, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(resizeEvent, nil) + slotval1 := newQResizeEvent(resizeEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -580,7 +563,7 @@ func miqt_exec_callback_QMdiSubWindow_TimerEvent(self *C.QMdiSubWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(timerEvent, nil) + slotval1 := newQTimerEvent(timerEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -606,7 +589,7 @@ func miqt_exec_callback_QMdiSubWindow_MoveEvent(self *C.QMdiSubWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(moveEvent, nil) + slotval1 := newQMoveEvent(moveEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -632,7 +615,7 @@ func miqt_exec_callback_QMdiSubWindow_PaintEvent(self *C.QMdiSubWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(paintEvent, nil) + slotval1 := newQPaintEvent(paintEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -658,7 +641,7 @@ func miqt_exec_callback_QMdiSubWindow_MousePressEvent(self *C.QMdiSubWindow, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(mouseEvent, nil, nil) + slotval1 := newQMouseEvent(mouseEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -684,7 +667,7 @@ func miqt_exec_callback_QMdiSubWindow_MouseDoubleClickEvent(self *C.QMdiSubWindo } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(mouseEvent, nil, nil) + slotval1 := newQMouseEvent(mouseEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -710,7 +693,7 @@ func miqt_exec_callback_QMdiSubWindow_MouseReleaseEvent(self *C.QMdiSubWindow, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(mouseEvent, nil, nil) + slotval1 := newQMouseEvent(mouseEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -736,7 +719,7 @@ func miqt_exec_callback_QMdiSubWindow_MouseMoveEvent(self *C.QMdiSubWindow, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(mouseEvent, nil, nil) + slotval1 := newQMouseEvent(mouseEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -762,7 +745,7 @@ func miqt_exec_callback_QMdiSubWindow_KeyPressEvent(self *C.QMdiSubWindow, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(keyEvent, nil, nil) + slotval1 := newQKeyEvent(keyEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -788,7 +771,7 @@ func miqt_exec_callback_QMdiSubWindow_ContextMenuEvent(self *C.QMdiSubWindow, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(contextMenuEvent, nil, nil) + slotval1 := newQContextMenuEvent(contextMenuEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -814,7 +797,7 @@ func miqt_exec_callback_QMdiSubWindow_FocusInEvent(self *C.QMdiSubWindow, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(focusInEvent, nil) + slotval1 := newQFocusEvent(focusInEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -840,7 +823,7 @@ func miqt_exec_callback_QMdiSubWindow_FocusOutEvent(self *C.QMdiSubWindow, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(focusOutEvent, nil) + slotval1 := newQFocusEvent(focusOutEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -866,7 +849,7 @@ func miqt_exec_callback_QMdiSubWindow_ChildEvent(self *C.QMdiSubWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(childEvent, nil) + slotval1 := newQChildEvent(childEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -1021,7 +1004,7 @@ func miqt_exec_callback_QMdiSubWindow_WheelEvent(self *C.QMdiSubWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1047,7 +1030,7 @@ func miqt_exec_callback_QMdiSubWindow_KeyReleaseEvent(self *C.QMdiSubWindow, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1099,7 +1082,7 @@ func miqt_exec_callback_QMdiSubWindow_TabletEvent(self *C.QMdiSubWindow, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1125,7 +1108,7 @@ func miqt_exec_callback_QMdiSubWindow_ActionEvent(self *C.QMdiSubWindow, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1151,7 +1134,7 @@ func miqt_exec_callback_QMdiSubWindow_DragEnterEvent(self *C.QMdiSubWindow, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1177,7 +1160,7 @@ func miqt_exec_callback_QMdiSubWindow_DragMoveEvent(self *C.QMdiSubWindow, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1203,7 +1186,7 @@ func miqt_exec_callback_QMdiSubWindow_DragLeaveEvent(self *C.QMdiSubWindow, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1229,7 +1212,7 @@ func miqt_exec_callback_QMdiSubWindow_DropEvent(self *C.QMdiSubWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1399,7 +1382,7 @@ func miqt_exec_callback_QMdiSubWindow_InputMethodEvent(self *C.QMdiSubWindow, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qmdisubwindow.h b/qt/gen_qmdisubwindow.h index dcace4f8..a32f8a1b 100644 --- a/qt/gen_qmdisubwindow.h +++ b/qt/gen_qmdisubwindow.h @@ -84,9 +84,10 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QMdiSubWindow_new(QWidget* parent, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMdiSubWindow_new2(QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMdiSubWindow_new3(QWidget* parent, int flags, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMdiSubWindow* QMdiSubWindow_new(QWidget* parent); +QMdiSubWindow* QMdiSubWindow_new2(); +QMdiSubWindow* QMdiSubWindow_new3(QWidget* parent, int flags); +void QMdiSubWindow_virtbase(QMdiSubWindow* src, QWidget** outptr_QWidget); QMetaObject* QMdiSubWindow_MetaObject(const QMdiSubWindow* self); void* QMdiSubWindow_Metacast(QMdiSubWindow* self, const char* param1); struct miqt_string QMdiSubWindow_Tr(const char* s); diff --git a/qt/gen_qmenu.cpp b/qt/gen_qmenu.cpp index d93103c7..99fb0995 100644 --- a/qt/gen_qmenu.cpp +++ b/qt/gen_qmenu.cpp @@ -1051,38 +1051,26 @@ public: }; -void QMenu_new(QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(parent); - *outptr_QMenu = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMenu* QMenu_new(QWidget* parent) { + return new MiqtVirtualQMenu(parent); } -void QMenu_new2(QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(); - *outptr_QMenu = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMenu* QMenu_new2() { + return new MiqtVirtualQMenu(); } -void QMenu_new3(struct miqt_string title, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMenu* QMenu_new3(struct miqt_string title) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(title_QString); - *outptr_QMenu = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMenu(title_QString); } -void QMenu_new4(struct miqt_string title, QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMenu* QMenu_new4(struct miqt_string title, QWidget* parent) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(title_QString, parent); - *outptr_QMenu = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMenu(title_QString, parent); +} + +void QMenu_virtbase(QMenu* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QMenu_MetaObject(const QMenu* self) { diff --git a/qt/gen_qmenu.go b/qt/gen_qmenu.go index 5f1d1b8a..cfcc36bf 100644 --- a/qt/gen_qmenu.go +++ b/qt/gen_qmenu.go @@ -35,46 +35,34 @@ func (this *QMenu) UnsafePointer() unsafe.Pointer { } // newQMenu constructs the type using only CGO pointers. -func newQMenu(h *C.QMenu, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMenu { +func newQMenu(h *C.QMenu) *QMenu { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QMenu_virtbase(h, &outptr_QWidget) + return &QMenu{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQMenu constructs the type using only unsafe pointers. -func UnsafeNewQMenu(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMenu { - if h == nil { - return nil - } - - return &QMenu{h: (*C.QMenu)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQMenu(h unsafe.Pointer) *QMenu { + return newQMenu((*C.QMenu)(h)) } // NewQMenu constructs a new QMenu object. func NewQMenu(parent *QWidget) *QMenu { - var outptr_QMenu *C.QMenu = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMenu_new(parent.cPointer(), &outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMenu(C.QMenu_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQMenu2 constructs a new QMenu object. func NewQMenu2() *QMenu { - var outptr_QMenu *C.QMenu = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMenu_new2(&outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMenu(C.QMenu_new2()) ret.isSubclass = true return ret } @@ -85,13 +73,8 @@ func NewQMenu3(title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QMenu *C.QMenu = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMenu_new3(title_ms, &outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMenu(C.QMenu_new3(title_ms)) ret.isSubclass = true return ret } @@ -102,13 +85,8 @@ func NewQMenu4(title string, parent *QWidget) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QMenu *C.QMenu = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMenu_new4(title_ms, parent.cPointer(), &outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMenu(C.QMenu_new4(title_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -146,7 +124,7 @@ func (this *QMenu) AddAction(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QMenu_AddAction(this.h, text_ms), nil) + return newQAction(C.QMenu_AddAction(this.h, text_ms)) } func (this *QMenu) AddAction2(icon *QIcon, text string) *QAction { @@ -154,11 +132,11 @@ func (this *QMenu) AddAction2(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QMenu_AddAction2(this.h, icon.cPointer(), text_ms), nil) + return newQAction(C.QMenu_AddAction2(this.h, icon.cPointer(), text_ms)) } func (this *QMenu) AddMenu(menu *QMenu) *QAction { - return newQAction(C.QMenu_AddMenu(this.h, menu.cPointer()), nil) + return newQAction(C.QMenu_AddMenu(this.h, menu.cPointer())) } func (this *QMenu) AddMenuWithTitle(title string) *QMenu { @@ -166,7 +144,7 @@ func (this *QMenu) AddMenuWithTitle(title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return newQMenu(C.QMenu_AddMenuWithTitle(this.h, title_ms), nil, nil, nil) + return newQMenu(C.QMenu_AddMenuWithTitle(this.h, title_ms)) } func (this *QMenu) AddMenu2(icon *QIcon, title string) *QMenu { @@ -174,11 +152,11 @@ func (this *QMenu) AddMenu2(icon *QIcon, title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return newQMenu(C.QMenu_AddMenu2(this.h, icon.cPointer(), title_ms), nil, nil, nil) + return newQMenu(C.QMenu_AddMenu2(this.h, icon.cPointer(), title_ms)) } func (this *QMenu) AddSeparator() *QAction { - return newQAction(C.QMenu_AddSeparator(this.h), nil) + return newQAction(C.QMenu_AddSeparator(this.h)) } func (this *QMenu) AddSection(text string) *QAction { @@ -186,7 +164,7 @@ func (this *QMenu) AddSection(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QMenu_AddSection(this.h, text_ms), nil) + return newQAction(C.QMenu_AddSection(this.h, text_ms)) } func (this *QMenu) AddSection2(icon *QIcon, text string) *QAction { @@ -194,15 +172,15 @@ func (this *QMenu) AddSection2(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QMenu_AddSection2(this.h, icon.cPointer(), text_ms), nil) + return newQAction(C.QMenu_AddSection2(this.h, icon.cPointer(), text_ms)) } func (this *QMenu) InsertMenu(before *QAction, menu *QMenu) *QAction { - return newQAction(C.QMenu_InsertMenu(this.h, before.cPointer(), menu.cPointer()), nil) + return newQAction(C.QMenu_InsertMenu(this.h, before.cPointer(), menu.cPointer())) } func (this *QMenu) InsertSeparator(before *QAction) *QAction { - return newQAction(C.QMenu_InsertSeparator(this.h, before.cPointer()), nil) + return newQAction(C.QMenu_InsertSeparator(this.h, before.cPointer())) } func (this *QMenu) InsertSection(before *QAction, text string) *QAction { @@ -210,7 +188,7 @@ func (this *QMenu) InsertSection(before *QAction, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QMenu_InsertSection(this.h, before.cPointer(), text_ms), nil) + return newQAction(C.QMenu_InsertSection(this.h, before.cPointer(), text_ms)) } func (this *QMenu) InsertSection2(before *QAction, icon *QIcon, text string) *QAction { @@ -218,7 +196,7 @@ func (this *QMenu) InsertSection2(before *QAction, icon *QIcon, text string) *QA text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QMenu_InsertSection2(this.h, before.cPointer(), icon.cPointer(), text_ms), nil) + return newQAction(C.QMenu_InsertSection2(this.h, before.cPointer(), icon.cPointer(), text_ms)) } func (this *QMenu) IsEmpty() bool { @@ -258,7 +236,7 @@ func (this *QMenu) SetDefaultAction(defaultAction *QAction) { } func (this *QMenu) DefaultAction() *QAction { - return newQAction(C.QMenu_DefaultAction(this.h), nil) + return newQAction(C.QMenu_DefaultAction(this.h)) } func (this *QMenu) SetActiveAction(act *QAction) { @@ -266,7 +244,7 @@ func (this *QMenu) SetActiveAction(act *QAction) { } func (this *QMenu) ActiveAction() *QAction { - return newQAction(C.QMenu_ActiveAction(this.h), nil) + return newQAction(C.QMenu_ActiveAction(this.h)) } func (this *QMenu) Popup(pos *QPoint) { @@ -274,11 +252,11 @@ func (this *QMenu) Popup(pos *QPoint) { } func (this *QMenu) Exec() *QAction { - return newQAction(C.QMenu_Exec(this.h), nil) + return newQAction(C.QMenu_Exec(this.h)) } func (this *QMenu) ExecWithPos(pos *QPoint) *QAction { - return newQAction(C.QMenu_ExecWithPos(this.h, pos.cPointer()), nil) + return newQAction(C.QMenu_ExecWithPos(this.h, pos.cPointer())) } func QMenu_Exec2(actions []*QAction, pos *QPoint) *QAction { @@ -288,7 +266,7 @@ func QMenu_Exec2(actions []*QAction, pos *QPoint) *QAction { actions_CArray[i] = actions[i].cPointer() } actions_ma := C.struct_miqt_array{len: C.size_t(len(actions)), data: unsafe.Pointer(actions_CArray)} - return newQAction(C.QMenu_Exec2(actions_ma, pos.cPointer()), nil) + return newQAction(C.QMenu_Exec2(actions_ma, pos.cPointer())) } func (this *QMenu) SizeHint() *QSize { @@ -304,11 +282,11 @@ func (this *QMenu) ActionGeometry(param1 *QAction) *QRect { } func (this *QMenu) ActionAt(param1 *QPoint) *QAction { - return newQAction(C.QMenu_ActionAt(this.h, param1.cPointer()), nil) + return newQAction(C.QMenu_ActionAt(this.h, param1.cPointer())) } func (this *QMenu) MenuAction() *QAction { - return newQAction(C.QMenu_MenuAction(this.h), nil) + return newQAction(C.QMenu_MenuAction(this.h)) } func (this *QMenu) Title() string { @@ -405,7 +383,7 @@ func miqt_exec_callback_QMenu_Triggered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(action, nil) + slotval1 := newQAction(action) gofunc(slotval1) } @@ -425,7 +403,7 @@ func miqt_exec_callback_QMenu_Hovered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(action, nil) + slotval1 := newQAction(action) gofunc(slotval1) } @@ -479,7 +457,7 @@ func (this *QMenu) Popup2(pos *QPoint, at *QAction) { } func (this *QMenu) Exec22(pos *QPoint, at *QAction) *QAction { - return newQAction(C.QMenu_Exec22(this.h, pos.cPointer(), at.cPointer()), nil) + return newQAction(C.QMenu_Exec22(this.h, pos.cPointer(), at.cPointer())) } func QMenu_Exec3(actions []*QAction, pos *QPoint, at *QAction) *QAction { @@ -489,7 +467,7 @@ func QMenu_Exec3(actions []*QAction, pos *QPoint, at *QAction) *QAction { actions_CArray[i] = actions[i].cPointer() } actions_ma := C.struct_miqt_array{len: C.size_t(len(actions)), data: unsafe.Pointer(actions_CArray)} - return newQAction(C.QMenu_Exec3(actions_ma, pos.cPointer(), at.cPointer()), nil) + return newQAction(C.QMenu_Exec3(actions_ma, pos.cPointer(), at.cPointer())) } func QMenu_Exec4(actions []*QAction, pos *QPoint, at *QAction, parent *QWidget) *QAction { @@ -499,7 +477,7 @@ func QMenu_Exec4(actions []*QAction, pos *QPoint, at *QAction, parent *QWidget) actions_CArray[i] = actions[i].cPointer() } actions_ma := C.struct_miqt_array{len: C.size_t(len(actions)), data: unsafe.Pointer(actions_CArray)} - return newQAction(C.QMenu_Exec4(actions_ma, pos.cPointer(), at.cPointer(), parent.cPointer()), nil) + return newQAction(C.QMenu_Exec4(actions_ma, pos.cPointer(), at.cPointer(), parent.cPointer())) } func (this *QMenu) callVirtualBase_SizeHint() *QSize { @@ -575,7 +553,7 @@ func miqt_exec_callback_QMenu_KeyPressEvent(self *C.QMenu, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -601,7 +579,7 @@ func miqt_exec_callback_QMenu_MouseReleaseEvent(self *C.QMenu, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -627,7 +605,7 @@ func miqt_exec_callback_QMenu_MousePressEvent(self *C.QMenu, cb C.intptr_t, para } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -653,7 +631,7 @@ func miqt_exec_callback_QMenu_MouseMoveEvent(self *C.QMenu, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -679,7 +657,7 @@ func miqt_exec_callback_QMenu_WheelEvent(self *C.QMenu, cb C.intptr_t, param1 *C } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(param1, nil, nil) + slotval1 := newQWheelEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -757,7 +735,7 @@ func miqt_exec_callback_QMenu_HideEvent(self *C.QMenu, cb C.intptr_t, param1 *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(param1, nil) + slotval1 := newQHideEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_HideEvent, slotval1) @@ -783,7 +761,7 @@ func miqt_exec_callback_QMenu_PaintEvent(self *C.QMenu, cb C.intptr_t, param1 *C } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -809,7 +787,7 @@ func miqt_exec_callback_QMenu_ActionEvent(self *C.QMenu, cb C.intptr_t, param1 * } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(param1, nil) + slotval1 := newQActionEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -835,7 +813,7 @@ func miqt_exec_callback_QMenu_TimerEvent(self *C.QMenu, cb C.intptr_t, param1 *C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1073,7 +1051,7 @@ func miqt_exec_callback_QMenu_MouseDoubleClickEvent(self *C.QMenu, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1099,7 +1077,7 @@ func miqt_exec_callback_QMenu_KeyReleaseEvent(self *C.QMenu, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1125,7 +1103,7 @@ func miqt_exec_callback_QMenu_FocusInEvent(self *C.QMenu, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1151,7 +1129,7 @@ func miqt_exec_callback_QMenu_FocusOutEvent(self *C.QMenu, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1177,7 +1155,7 @@ func miqt_exec_callback_QMenu_MoveEvent(self *C.QMenu, cb C.intptr_t, event *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1203,7 +1181,7 @@ func miqt_exec_callback_QMenu_ResizeEvent(self *C.QMenu, cb C.intptr_t, event *C } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1229,7 +1207,7 @@ func miqt_exec_callback_QMenu_CloseEvent(self *C.QMenu, cb C.intptr_t, event *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1255,7 +1233,7 @@ func miqt_exec_callback_QMenu_ContextMenuEvent(self *C.QMenu, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1281,7 +1259,7 @@ func miqt_exec_callback_QMenu_TabletEvent(self *C.QMenu, cb C.intptr_t, event *C } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1307,7 +1285,7 @@ func miqt_exec_callback_QMenu_DragEnterEvent(self *C.QMenu, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1333,7 +1311,7 @@ func miqt_exec_callback_QMenu_DragMoveEvent(self *C.QMenu, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1359,7 +1337,7 @@ func miqt_exec_callback_QMenu_DragLeaveEvent(self *C.QMenu, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1385,7 +1363,7 @@ func miqt_exec_callback_QMenu_DropEvent(self *C.QMenu, cb C.intptr_t, event *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1411,7 +1389,7 @@ func miqt_exec_callback_QMenu_ShowEvent(self *C.QMenu, cb C.intptr_t, event *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1581,7 +1559,7 @@ func miqt_exec_callback_QMenu_InputMethodEvent(self *C.QMenu, cb C.intptr_t, par } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qmenu.h b/qt/gen_qmenu.h index 32cc2c6a..e3a77d13 100644 --- a/qt/gen_qmenu.h +++ b/qt/gen_qmenu.h @@ -84,10 +84,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QMenu_new(QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMenu_new2(QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMenu_new3(struct miqt_string title, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMenu_new4(struct miqt_string title, QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMenu* QMenu_new(QWidget* parent); +QMenu* QMenu_new2(); +QMenu* QMenu_new3(struct miqt_string title); +QMenu* QMenu_new4(struct miqt_string title, QWidget* parent); +void QMenu_virtbase(QMenu* src, QWidget** outptr_QWidget); QMetaObject* QMenu_MetaObject(const QMenu* self); void* QMenu_Metacast(QMenu* self, const char* param1); struct miqt_string QMenu_Tr(const char* s); diff --git a/qt/gen_qmenubar.cpp b/qt/gen_qmenubar.cpp index e3c62771..faaecc50 100644 --- a/qt/gen_qmenubar.cpp +++ b/qt/gen_qmenubar.cpp @@ -1073,20 +1073,16 @@ public: }; -void QMenuBar_new(QWidget* parent, QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMenuBar* ret = new MiqtVirtualQMenuBar(parent); - *outptr_QMenuBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMenuBar* QMenuBar_new(QWidget* parent) { + return new MiqtVirtualQMenuBar(parent); } -void QMenuBar_new2(QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMenuBar* ret = new MiqtVirtualQMenuBar(); - *outptr_QMenuBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMenuBar* QMenuBar_new2() { + return new MiqtVirtualQMenuBar(); +} + +void QMenuBar_virtbase(QMenuBar* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QMenuBar_MetaObject(const QMenuBar* self) { diff --git a/qt/gen_qmenubar.go b/qt/gen_qmenubar.go index 0f08324e..392190b2 100644 --- a/qt/gen_qmenubar.go +++ b/qt/gen_qmenubar.go @@ -35,46 +35,34 @@ func (this *QMenuBar) UnsafePointer() unsafe.Pointer { } // newQMenuBar constructs the type using only CGO pointers. -func newQMenuBar(h *C.QMenuBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMenuBar { +func newQMenuBar(h *C.QMenuBar) *QMenuBar { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QMenuBar_virtbase(h, &outptr_QWidget) + return &QMenuBar{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQMenuBar constructs the type using only unsafe pointers. -func UnsafeNewQMenuBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMenuBar { - if h == nil { - return nil - } - - return &QMenuBar{h: (*C.QMenuBar)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQMenuBar(h unsafe.Pointer) *QMenuBar { + return newQMenuBar((*C.QMenuBar)(h)) } // NewQMenuBar constructs a new QMenuBar object. func NewQMenuBar(parent *QWidget) *QMenuBar { - var outptr_QMenuBar *C.QMenuBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMenuBar_new(parent.cPointer(), &outptr_QMenuBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMenuBar(outptr_QMenuBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMenuBar(C.QMenuBar_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQMenuBar2 constructs a new QMenuBar object. func NewQMenuBar2() *QMenuBar { - var outptr_QMenuBar *C.QMenuBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMenuBar_new2(&outptr_QMenuBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMenuBar(outptr_QMenuBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMenuBar(C.QMenuBar_new2()) ret.isSubclass = true return ret } @@ -112,11 +100,11 @@ func (this *QMenuBar) AddAction(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QMenuBar_AddAction(this.h, text_ms), nil) + return newQAction(C.QMenuBar_AddAction(this.h, text_ms)) } func (this *QMenuBar) AddMenu(menu *QMenu) *QAction { - return newQAction(C.QMenuBar_AddMenu(this.h, menu.cPointer()), nil) + return newQAction(C.QMenuBar_AddMenu(this.h, menu.cPointer())) } func (this *QMenuBar) AddMenuWithTitle(title string) *QMenu { @@ -124,7 +112,7 @@ func (this *QMenuBar) AddMenuWithTitle(title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return newQMenu(C.QMenuBar_AddMenuWithTitle(this.h, title_ms), nil, nil, nil) + return newQMenu(C.QMenuBar_AddMenuWithTitle(this.h, title_ms)) } func (this *QMenuBar) AddMenu2(icon *QIcon, title string) *QMenu { @@ -132,19 +120,19 @@ func (this *QMenuBar) AddMenu2(icon *QIcon, title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return newQMenu(C.QMenuBar_AddMenu2(this.h, icon.cPointer(), title_ms), nil, nil, nil) + return newQMenu(C.QMenuBar_AddMenu2(this.h, icon.cPointer(), title_ms)) } func (this *QMenuBar) AddSeparator() *QAction { - return newQAction(C.QMenuBar_AddSeparator(this.h), nil) + return newQAction(C.QMenuBar_AddSeparator(this.h)) } func (this *QMenuBar) InsertSeparator(before *QAction) *QAction { - return newQAction(C.QMenuBar_InsertSeparator(this.h, before.cPointer()), nil) + return newQAction(C.QMenuBar_InsertSeparator(this.h, before.cPointer())) } func (this *QMenuBar) InsertMenu(before *QAction, menu *QMenu) *QAction { - return newQAction(C.QMenuBar_InsertMenu(this.h, before.cPointer(), menu.cPointer()), nil) + return newQAction(C.QMenuBar_InsertMenu(this.h, before.cPointer(), menu.cPointer())) } func (this *QMenuBar) Clear() { @@ -152,7 +140,7 @@ func (this *QMenuBar) Clear() { } func (this *QMenuBar) ActiveAction() *QAction { - return newQAction(C.QMenuBar_ActiveAction(this.h), nil) + return newQAction(C.QMenuBar_ActiveAction(this.h)) } func (this *QMenuBar) SetActiveAction(action *QAction) { @@ -190,7 +178,7 @@ func (this *QMenuBar) ActionGeometry(param1 *QAction) *QRect { } func (this *QMenuBar) ActionAt(param1 *QPoint) *QAction { - return newQAction(C.QMenuBar_ActionAt(this.h, param1.cPointer()), nil) + return newQAction(C.QMenuBar_ActionAt(this.h, param1.cPointer())) } func (this *QMenuBar) SetCornerWidget(w *QWidget) { @@ -198,7 +186,7 @@ func (this *QMenuBar) SetCornerWidget(w *QWidget) { } func (this *QMenuBar) CornerWidget() *QWidget { - return newQWidget(C.QMenuBar_CornerWidget(this.h), nil, nil) + return newQWidget(C.QMenuBar_CornerWidget(this.h)) } func (this *QMenuBar) IsNativeMenuBar() bool { @@ -228,7 +216,7 @@ func miqt_exec_callback_QMenuBar_Triggered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(action, nil) + slotval1 := newQAction(action) gofunc(slotval1) } @@ -248,7 +236,7 @@ func miqt_exec_callback_QMenuBar_Hovered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(action, nil) + slotval1 := newQAction(action) gofunc(slotval1) } @@ -302,7 +290,7 @@ func (this *QMenuBar) SetCornerWidget2(w *QWidget, corner Corner) { } func (this *QMenuBar) CornerWidget1(corner Corner) *QWidget { - return newQWidget(C.QMenuBar_CornerWidget1(this.h, (C.int)(corner)), nil, nil) + return newQWidget(C.QMenuBar_CornerWidget1(this.h, (C.int)(corner))) } func (this *QMenuBar) callVirtualBase_SizeHint() *QSize { @@ -459,7 +447,7 @@ func miqt_exec_callback_QMenuBar_KeyPressEvent(self *C.QMenuBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -485,7 +473,7 @@ func miqt_exec_callback_QMenuBar_MouseReleaseEvent(self *C.QMenuBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -511,7 +499,7 @@ func miqt_exec_callback_QMenuBar_MousePressEvent(self *C.QMenuBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -537,7 +525,7 @@ func miqt_exec_callback_QMenuBar_MouseMoveEvent(self *C.QMenuBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -589,7 +577,7 @@ func miqt_exec_callback_QMenuBar_PaintEvent(self *C.QMenuBar, cb C.intptr_t, par } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -615,7 +603,7 @@ func miqt_exec_callback_QMenuBar_ResizeEvent(self *C.QMenuBar, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -641,7 +629,7 @@ func miqt_exec_callback_QMenuBar_ActionEvent(self *C.QMenuBar, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(param1, nil) + slotval1 := newQActionEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -667,7 +655,7 @@ func miqt_exec_callback_QMenuBar_FocusOutEvent(self *C.QMenuBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -693,7 +681,7 @@ func miqt_exec_callback_QMenuBar_FocusInEvent(self *C.QMenuBar, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -719,7 +707,7 @@ func miqt_exec_callback_QMenuBar_TimerEvent(self *C.QMenuBar, cb C.intptr_t, par } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -878,7 +866,7 @@ func miqt_exec_callback_QMenuBar_MouseDoubleClickEvent(self *C.QMenuBar, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -904,7 +892,7 @@ func miqt_exec_callback_QMenuBar_WheelEvent(self *C.QMenuBar, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -930,7 +918,7 @@ func miqt_exec_callback_QMenuBar_KeyReleaseEvent(self *C.QMenuBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -982,7 +970,7 @@ func miqt_exec_callback_QMenuBar_MoveEvent(self *C.QMenuBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1008,7 +996,7 @@ func miqt_exec_callback_QMenuBar_CloseEvent(self *C.QMenuBar, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1034,7 +1022,7 @@ func miqt_exec_callback_QMenuBar_ContextMenuEvent(self *C.QMenuBar, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1060,7 +1048,7 @@ func miqt_exec_callback_QMenuBar_TabletEvent(self *C.QMenuBar, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1086,7 +1074,7 @@ func miqt_exec_callback_QMenuBar_DragEnterEvent(self *C.QMenuBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1112,7 +1100,7 @@ func miqt_exec_callback_QMenuBar_DragMoveEvent(self *C.QMenuBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1138,7 +1126,7 @@ func miqt_exec_callback_QMenuBar_DragLeaveEvent(self *C.QMenuBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1164,7 +1152,7 @@ func miqt_exec_callback_QMenuBar_DropEvent(self *C.QMenuBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1190,7 +1178,7 @@ func miqt_exec_callback_QMenuBar_ShowEvent(self *C.QMenuBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1216,7 +1204,7 @@ func miqt_exec_callback_QMenuBar_HideEvent(self *C.QMenuBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1386,7 +1374,7 @@ func miqt_exec_callback_QMenuBar_InputMethodEvent(self *C.QMenuBar, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qmenubar.h b/qt/gen_qmenubar.h index 0f3efede..a0096687 100644 --- a/qt/gen_qmenubar.h +++ b/qt/gen_qmenubar.h @@ -86,8 +86,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QMenuBar_new(QWidget* parent, QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMenuBar_new2(QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMenuBar* QMenuBar_new(QWidget* parent); +QMenuBar* QMenuBar_new2(); +void QMenuBar_virtbase(QMenuBar* src, QWidget** outptr_QWidget); QMetaObject* QMenuBar_MetaObject(const QMenuBar* self); void* QMenuBar_Metacast(QMenuBar* self, const char* param1); struct miqt_string QMenuBar_Tr(const char* s); diff --git a/qt/gen_qmessageauthenticationcode.cpp b/qt/gen_qmessageauthenticationcode.cpp index b0918ca6..2078069d 100644 --- a/qt/gen_qmessageauthenticationcode.cpp +++ b/qt/gen_qmessageauthenticationcode.cpp @@ -5,15 +5,13 @@ #include "gen_qmessageauthenticationcode.h" #include "_cgo_export.h" -void QMessageAuthenticationCode_new(int method, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode) { - QMessageAuthenticationCode* ret = new QMessageAuthenticationCode(static_cast(method)); - *outptr_QMessageAuthenticationCode = ret; +QMessageAuthenticationCode* QMessageAuthenticationCode_new(int method) { + return new QMessageAuthenticationCode(static_cast(method)); } -void QMessageAuthenticationCode_new2(int method, struct miqt_string key, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode) { +QMessageAuthenticationCode* QMessageAuthenticationCode_new2(int method, struct miqt_string key) { QByteArray key_QByteArray(key.data, key.len); - QMessageAuthenticationCode* ret = new QMessageAuthenticationCode(static_cast(method), key_QByteArray); - *outptr_QMessageAuthenticationCode = ret; + return new QMessageAuthenticationCode(static_cast(method), key_QByteArray); } void QMessageAuthenticationCode_Reset(QMessageAuthenticationCode* self) { diff --git a/qt/gen_qmessageauthenticationcode.go b/qt/gen_qmessageauthenticationcode.go index e17c20b1..70104cce 100644 --- a/qt/gen_qmessageauthenticationcode.go +++ b/qt/gen_qmessageauthenticationcode.go @@ -37,24 +37,19 @@ func newQMessageAuthenticationCode(h *C.QMessageAuthenticationCode) *QMessageAut if h == nil { return nil } + return &QMessageAuthenticationCode{h: h} } // UnsafeNewQMessageAuthenticationCode constructs the type using only unsafe pointers. func UnsafeNewQMessageAuthenticationCode(h unsafe.Pointer) *QMessageAuthenticationCode { - if h == nil { - return nil - } - - return &QMessageAuthenticationCode{h: (*C.QMessageAuthenticationCode)(h)} + return newQMessageAuthenticationCode((*C.QMessageAuthenticationCode)(h)) } // NewQMessageAuthenticationCode constructs a new QMessageAuthenticationCode object. func NewQMessageAuthenticationCode(method QCryptographicHash__Algorithm) *QMessageAuthenticationCode { - var outptr_QMessageAuthenticationCode *C.QMessageAuthenticationCode = nil - C.QMessageAuthenticationCode_new((C.int)(method), &outptr_QMessageAuthenticationCode) - ret := newQMessageAuthenticationCode(outptr_QMessageAuthenticationCode) + ret := newQMessageAuthenticationCode(C.QMessageAuthenticationCode_new((C.int)(method))) ret.isSubclass = true return ret } @@ -64,10 +59,8 @@ func NewQMessageAuthenticationCode2(method QCryptographicHash__Algorithm, key [] key_alias := C.struct_miqt_string{} key_alias.data = (*C.char)(unsafe.Pointer(&key[0])) key_alias.len = C.size_t(len(key)) - var outptr_QMessageAuthenticationCode *C.QMessageAuthenticationCode = nil - C.QMessageAuthenticationCode_new2((C.int)(method), key_alias, &outptr_QMessageAuthenticationCode) - ret := newQMessageAuthenticationCode(outptr_QMessageAuthenticationCode) + ret := newQMessageAuthenticationCode(C.QMessageAuthenticationCode_new2((C.int)(method), key_alias)) ret.isSubclass = true return ret } diff --git a/qt/gen_qmessageauthenticationcode.h b/qt/gen_qmessageauthenticationcode.h index 42c7ddfb..3c038719 100644 --- a/qt/gen_qmessageauthenticationcode.h +++ b/qt/gen_qmessageauthenticationcode.h @@ -22,8 +22,8 @@ typedef struct QIODevice QIODevice; typedef struct QMessageAuthenticationCode QMessageAuthenticationCode; #endif -void QMessageAuthenticationCode_new(int method, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode); -void QMessageAuthenticationCode_new2(int method, struct miqt_string key, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode); +QMessageAuthenticationCode* QMessageAuthenticationCode_new(int method); +QMessageAuthenticationCode* QMessageAuthenticationCode_new2(int method, struct miqt_string key); void QMessageAuthenticationCode_Reset(QMessageAuthenticationCode* self); void QMessageAuthenticationCode_SetKey(QMessageAuthenticationCode* self, struct miqt_string key); void QMessageAuthenticationCode_AddData(QMessageAuthenticationCode* self, const char* data, int length); diff --git a/qt/gen_qmessagebox.cpp b/qt/gen_qmessagebox.cpp index 1ac854a8..d9cfb192 100644 --- a/qt/gen_qmessagebox.cpp +++ b/qt/gen_qmessagebox.cpp @@ -414,99 +414,58 @@ public: }; -void QMessageBox_new(QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(parent); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMessageBox* QMessageBox_new(QWidget* parent) { + return new MiqtVirtualQMessageBox(parent); } -void QMessageBox_new2(QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMessageBox* QMessageBox_new2() { + return new MiqtVirtualQMessageBox(); } -void QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMessageBox* QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString); } -void QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMessageBox* QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2)); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2)); } -void QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMessageBox* QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons)); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons)); } -void QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMessageBox* QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent); } -void QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMessageBox* QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent, static_cast(flags)); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent, static_cast(flags)); } -void QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMessageBox* QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent); } -void QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMessageBox* QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent, static_cast(f)); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent, static_cast(f)); +} + +void QMessageBox_virtbase(QMessageBox* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QMessageBox_MetaObject(const QMessageBox* self) { diff --git a/qt/gen_qmessagebox.go b/qt/gen_qmessagebox.go index 648c9d53..40d6d228 100644 --- a/qt/gen_qmessagebox.go +++ b/qt/gen_qmessagebox.go @@ -93,48 +93,34 @@ func (this *QMessageBox) UnsafePointer() unsafe.Pointer { } // newQMessageBox constructs the type using only CGO pointers. -func newQMessageBox(h *C.QMessageBox, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMessageBox { +func newQMessageBox(h *C.QMessageBox) *QMessageBox { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QMessageBox_virtbase(h, &outptr_QDialog) + return &QMessageBox{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQMessageBox constructs the type using only unsafe pointers. -func UnsafeNewQMessageBox(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMessageBox { - if h == nil { - return nil - } - - return &QMessageBox{h: (*C.QMessageBox)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQMessageBox(h unsafe.Pointer) *QMessageBox { + return newQMessageBox((*C.QMessageBox)(h)) } // NewQMessageBox constructs a new QMessageBox object. func NewQMessageBox(parent *QWidget) *QMessageBox { - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new(parent.cPointer(), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQMessageBox2 constructs a new QMessageBox object. func NewQMessageBox2() *QMessageBox { - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new2(&outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new2()) ret.isSubclass = true return ret } @@ -149,14 +135,8 @@ func NewQMessageBox3(icon QMessageBox__Icon, title string, text string) *QMessag text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new3((C.int)(icon), title_ms, text_ms, &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new3((C.int)(icon), title_ms, text_ms)) ret.isSubclass = true return ret } @@ -171,14 +151,8 @@ func NewQMessageBox4(title string, text string, icon QMessageBox__Icon, button0 text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new4(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new4(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2))) ret.isSubclass = true return ret } @@ -193,14 +167,8 @@ func NewQMessageBox5(icon QMessageBox__Icon, title string, text string, buttons text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new5((C.int)(icon), title_ms, text_ms, (C.int)(buttons), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new5((C.int)(icon), title_ms, text_ms, (C.int)(buttons))) ret.isSubclass = true return ret } @@ -215,14 +183,8 @@ func NewQMessageBox6(icon QMessageBox__Icon, title string, text string, buttons text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new6((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer(), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new6((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer())) ret.isSubclass = true return ret } @@ -237,14 +199,8 @@ func NewQMessageBox7(icon QMessageBox__Icon, title string, text string, buttons text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new7((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer(), (C.int)(flags), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new7((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -259,14 +215,8 @@ func NewQMessageBox8(title string, text string, icon QMessageBox__Icon, button0 text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new8(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer(), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new8(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer())) ret.isSubclass = true return ret } @@ -281,14 +231,8 @@ func NewQMessageBox9(title string, text string, icon QMessageBox__Icon, button0 text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new9(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer(), (C.int)(f), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new9(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -330,11 +274,11 @@ func (this *QMessageBox) AddButton2(text string, role QMessageBox__ButtonRole) * text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQPushButton(C.QMessageBox_AddButton2(this.h, text_ms, (C.int)(role)), nil, nil, nil, nil) + return newQPushButton(C.QMessageBox_AddButton2(this.h, text_ms, (C.int)(role))) } func (this *QMessageBox) AddButtonWithButton(button QMessageBox__StandardButton) *QPushButton { - return newQPushButton(C.QMessageBox_AddButtonWithButton(this.h, (C.int)(button)), nil, nil, nil, nil) + return newQPushButton(C.QMessageBox_AddButtonWithButton(this.h, (C.int)(button))) } func (this *QMessageBox) RemoveButton(button *QAbstractButton) { @@ -346,7 +290,7 @@ func (this *QMessageBox) Buttons() []*QAbstractButton { _ret := make([]*QAbstractButton, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractButton)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAbstractButton(_outCast[i], nil, nil, nil) + _ret[i] = newQAbstractButton(_outCast[i]) } return _ret } @@ -368,11 +312,11 @@ func (this *QMessageBox) StandardButton(button *QAbstractButton) QMessageBox__St } func (this *QMessageBox) Button(which QMessageBox__StandardButton) *QAbstractButton { - return newQAbstractButton(C.QMessageBox_Button(this.h, (C.int)(which)), nil, nil, nil) + return newQAbstractButton(C.QMessageBox_Button(this.h, (C.int)(which))) } func (this *QMessageBox) DefaultButton() *QPushButton { - return newQPushButton(C.QMessageBox_DefaultButton(this.h), nil, nil, nil, nil) + return newQPushButton(C.QMessageBox_DefaultButton(this.h)) } func (this *QMessageBox) SetDefaultButton(button *QPushButton) { @@ -384,7 +328,7 @@ func (this *QMessageBox) SetDefaultButtonWithButton(button QMessageBox__Standard } func (this *QMessageBox) EscapeButton() *QAbstractButton { - return newQAbstractButton(C.QMessageBox_EscapeButton(this.h), nil, nil, nil) + return newQAbstractButton(C.QMessageBox_EscapeButton(this.h)) } func (this *QMessageBox) SetEscapeButton(button *QAbstractButton) { @@ -396,7 +340,7 @@ func (this *QMessageBox) SetEscapeButtonWithButton(button QMessageBox__StandardB } func (this *QMessageBox) ClickedButton() *QAbstractButton { - return newQAbstractButton(C.QMessageBox_ClickedButton(this.h), nil, nil, nil) + return newQAbstractButton(C.QMessageBox_ClickedButton(this.h)) } func (this *QMessageBox) Text() string { @@ -423,7 +367,7 @@ func (this *QMessageBox) SetIcon(icon QMessageBox__Icon) { } func (this *QMessageBox) IconPixmap() *QPixmap { - _goptr := newQPixmap(C.QMessageBox_IconPixmap(this.h), nil) + _goptr := newQPixmap(C.QMessageBox_IconPixmap(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -453,7 +397,7 @@ func (this *QMessageBox) SetCheckBox(cb *QCheckBox) { } func (this *QMessageBox) CheckBox() *QCheckBox { - return newQCheckBox(C.QMessageBox_CheckBox(this.h), nil, nil, nil, nil) + return newQCheckBox(C.QMessageBox_CheckBox(this.h)) } func QMessageBox_Information(parent *QWidget, title string, text string) QMessageBox__StandardButton { @@ -738,7 +682,7 @@ func (this *QMessageBox) SetWindowModality(windowModality WindowModality) { } func QMessageBox_StandardIcon(icon QMessageBox__Icon) *QPixmap { - _goptr := newQPixmap(C.QMessageBox_StandardIcon((C.int)(icon)), nil) + _goptr := newQPixmap(C.QMessageBox_StandardIcon((C.int)(icon))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -758,7 +702,7 @@ func miqt_exec_callback_QMessageBox_ButtonClicked(cb C.intptr_t, button *C.QAbst } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractButton(button, nil, nil, nil) + slotval1 := newQAbstractButton(button) gofunc(slotval1) } @@ -1411,7 +1355,7 @@ func miqt_exec_callback_QMessageBox_ResizeEvent(self *C.QMessageBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QMessageBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1437,7 +1381,7 @@ func miqt_exec_callback_QMessageBox_ShowEvent(self *C.QMessageBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QMessageBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1463,7 +1407,7 @@ func miqt_exec_callback_QMessageBox_CloseEvent(self *C.QMessageBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QMessageBox{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1489,7 +1433,7 @@ func miqt_exec_callback_QMessageBox_KeyPressEvent(self *C.QMessageBox, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QMessageBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1741,7 +1685,7 @@ func miqt_exec_callback_QMessageBox_ContextMenuEvent(self *C.QMessageBox, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QMessageBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt/gen_qmessagebox.h b/qt/gen_qmessagebox.h index 4b34ac99..487ae13f 100644 --- a/qt/gen_qmessagebox.h +++ b/qt/gen_qmessagebox.h @@ -52,15 +52,16 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QMessageBox_new(QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new2(QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMessageBox* QMessageBox_new(QWidget* parent); +QMessageBox* QMessageBox_new2(); +QMessageBox* QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text); +QMessageBox* QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2); +QMessageBox* QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons); +QMessageBox* QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent); +QMessageBox* QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags); +QMessageBox* QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent); +QMessageBox* QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f); +void QMessageBox_virtbase(QMessageBox* src, QDialog** outptr_QDialog); QMetaObject* QMessageBox_MetaObject(const QMessageBox* self); void* QMessageBox_Metacast(QMessageBox* self, const char* param1); struct miqt_string QMessageBox_Tr(const char* s); diff --git a/qt/gen_qmetaobject.cpp b/qt/gen_qmetaobject.cpp index edadc92f..77ab5b89 100644 --- a/qt/gen_qmetaobject.cpp +++ b/qt/gen_qmetaobject.cpp @@ -13,14 +13,12 @@ #include "gen_qmetaobject.h" #include "_cgo_export.h" -void QMetaMethod_new(QMetaMethod** outptr_QMetaMethod) { - QMetaMethod* ret = new QMetaMethod(); - *outptr_QMetaMethod = ret; +QMetaMethod* QMetaMethod_new() { + return new QMetaMethod(); } -void QMetaMethod_new2(QMetaMethod* param1, QMetaMethod** outptr_QMetaMethod) { - QMetaMethod* ret = new QMetaMethod(*param1); - *outptr_QMetaMethod = ret; +QMetaMethod* QMetaMethod_new2(QMetaMethod* param1) { + return new QMetaMethod(*param1); } struct miqt_string QMetaMethod_MethodSignature(const QMetaMethod* self) { @@ -403,14 +401,12 @@ void QMetaMethod_Delete(QMetaMethod* self, bool isSubclass) { } } -void QMetaEnum_new(QMetaEnum** outptr_QMetaEnum) { - QMetaEnum* ret = new QMetaEnum(); - *outptr_QMetaEnum = ret; +QMetaEnum* QMetaEnum_new() { + return new QMetaEnum(); } -void QMetaEnum_new2(QMetaEnum* param1, QMetaEnum** outptr_QMetaEnum) { - QMetaEnum* ret = new QMetaEnum(*param1); - *outptr_QMetaEnum = ret; +QMetaEnum* QMetaEnum_new2(QMetaEnum* param1) { + return new QMetaEnum(*param1); } const char* QMetaEnum_Name(const QMetaEnum* self) { @@ -490,9 +486,8 @@ void QMetaEnum_Delete(QMetaEnum* self, bool isSubclass) { } } -void QMetaProperty_new(QMetaProperty** outptr_QMetaProperty) { - QMetaProperty* ret = new QMetaProperty(); - *outptr_QMetaProperty = ret; +QMetaProperty* QMetaProperty_new() { + return new QMetaProperty(); } const char* QMetaProperty_Name(const QMetaProperty* self) { @@ -656,9 +651,8 @@ void QMetaProperty_Delete(QMetaProperty* self, bool isSubclass) { } } -void QMetaClassInfo_new(QMetaClassInfo** outptr_QMetaClassInfo) { - QMetaClassInfo* ret = new QMetaClassInfo(); - *outptr_QMetaClassInfo = ret; +QMetaClassInfo* QMetaClassInfo_new() { + return new QMetaClassInfo(); } const char* QMetaClassInfo_Name(const QMetaClassInfo* self) { diff --git a/qt/gen_qmetaobject.go b/qt/gen_qmetaobject.go index 2a8fe398..88bcb0fa 100644 --- a/qt/gen_qmetaobject.go +++ b/qt/gen_qmetaobject.go @@ -62,34 +62,27 @@ func newQMetaMethod(h *C.QMetaMethod) *QMetaMethod { if h == nil { return nil } + return &QMetaMethod{h: h} } // UnsafeNewQMetaMethod constructs the type using only unsafe pointers. func UnsafeNewQMetaMethod(h unsafe.Pointer) *QMetaMethod { - if h == nil { - return nil - } - - return &QMetaMethod{h: (*C.QMetaMethod)(h)} + return newQMetaMethod((*C.QMetaMethod)(h)) } // NewQMetaMethod constructs a new QMetaMethod object. func NewQMetaMethod() *QMetaMethod { - var outptr_QMetaMethod *C.QMetaMethod = nil - C.QMetaMethod_new(&outptr_QMetaMethod) - ret := newQMetaMethod(outptr_QMetaMethod) + ret := newQMetaMethod(C.QMetaMethod_new()) ret.isSubclass = true return ret } // NewQMetaMethod2 constructs a new QMetaMethod object. func NewQMetaMethod2(param1 *QMetaMethod) *QMetaMethod { - var outptr_QMetaMethod *C.QMetaMethod = nil - C.QMetaMethod_new2(param1.cPointer(), &outptr_QMetaMethod) - ret := newQMetaMethod(outptr_QMetaMethod) + ret := newQMetaMethod(C.QMetaMethod_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -490,34 +483,27 @@ func newQMetaEnum(h *C.QMetaEnum) *QMetaEnum { if h == nil { return nil } + return &QMetaEnum{h: h} } // UnsafeNewQMetaEnum constructs the type using only unsafe pointers. func UnsafeNewQMetaEnum(h unsafe.Pointer) *QMetaEnum { - if h == nil { - return nil - } - - return &QMetaEnum{h: (*C.QMetaEnum)(h)} + return newQMetaEnum((*C.QMetaEnum)(h)) } // NewQMetaEnum constructs a new QMetaEnum object. func NewQMetaEnum() *QMetaEnum { - var outptr_QMetaEnum *C.QMetaEnum = nil - C.QMetaEnum_new(&outptr_QMetaEnum) - ret := newQMetaEnum(outptr_QMetaEnum) + ret := newQMetaEnum(C.QMetaEnum_new()) ret.isSubclass = true return ret } // NewQMetaEnum2 constructs a new QMetaEnum object. func NewQMetaEnum2(param1 *QMetaEnum) *QMetaEnum { - var outptr_QMetaEnum *C.QMetaEnum = nil - C.QMetaEnum_new2(param1.cPointer(), &outptr_QMetaEnum) - ret := newQMetaEnum(outptr_QMetaEnum) + ret := newQMetaEnum(C.QMetaEnum_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -640,24 +626,19 @@ func newQMetaProperty(h *C.QMetaProperty) *QMetaProperty { if h == nil { return nil } + return &QMetaProperty{h: h} } // UnsafeNewQMetaProperty constructs the type using only unsafe pointers. func UnsafeNewQMetaProperty(h unsafe.Pointer) *QMetaProperty { - if h == nil { - return nil - } - - return &QMetaProperty{h: (*C.QMetaProperty)(h)} + return newQMetaProperty((*C.QMetaProperty)(h)) } // NewQMetaProperty constructs a new QMetaProperty object. func NewQMetaProperty() *QMetaProperty { - var outptr_QMetaProperty *C.QMetaProperty = nil - C.QMetaProperty_new(&outptr_QMetaProperty) - ret := newQMetaProperty(outptr_QMetaProperty) + ret := newQMetaProperty(C.QMetaProperty_new()) ret.isSubclass = true return ret } @@ -862,24 +843,19 @@ func newQMetaClassInfo(h *C.QMetaClassInfo) *QMetaClassInfo { if h == nil { return nil } + return &QMetaClassInfo{h: h} } // UnsafeNewQMetaClassInfo constructs the type using only unsafe pointers. func UnsafeNewQMetaClassInfo(h unsafe.Pointer) *QMetaClassInfo { - if h == nil { - return nil - } - - return &QMetaClassInfo{h: (*C.QMetaClassInfo)(h)} + return newQMetaClassInfo((*C.QMetaClassInfo)(h)) } // NewQMetaClassInfo constructs a new QMetaClassInfo object. func NewQMetaClassInfo() *QMetaClassInfo { - var outptr_QMetaClassInfo *C.QMetaClassInfo = nil - C.QMetaClassInfo_new(&outptr_QMetaClassInfo) - ret := newQMetaClassInfo(outptr_QMetaClassInfo) + ret := newQMetaClassInfo(C.QMetaClassInfo_new()) ret.isSubclass = true return ret } diff --git a/qt/gen_qmetaobject.h b/qt/gen_qmetaobject.h index 8f4f9a2f..52a3f49a 100644 --- a/qt/gen_qmetaobject.h +++ b/qt/gen_qmetaobject.h @@ -36,8 +36,8 @@ typedef struct QObject QObject; typedef struct QVariant QVariant; #endif -void QMetaMethod_new(QMetaMethod** outptr_QMetaMethod); -void QMetaMethod_new2(QMetaMethod* param1, QMetaMethod** outptr_QMetaMethod); +QMetaMethod* QMetaMethod_new(); +QMetaMethod* QMetaMethod_new2(QMetaMethod* param1); struct miqt_string QMetaMethod_MethodSignature(const QMetaMethod* self); struct miqt_string QMetaMethod_Name(const QMetaMethod* self); const char* QMetaMethod_TypeName(const QMetaMethod* self); @@ -123,8 +123,8 @@ bool QMetaMethod_InvokeOnGadget102(const QMetaMethod* self, void* gadget, QGener bool QMetaMethod_InvokeOnGadget112(const QMetaMethod* self, void* gadget, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7, QGenericArgument* val8, QGenericArgument* val9); void QMetaMethod_Delete(QMetaMethod* self, bool isSubclass); -void QMetaEnum_new(QMetaEnum** outptr_QMetaEnum); -void QMetaEnum_new2(QMetaEnum* param1, QMetaEnum** outptr_QMetaEnum); +QMetaEnum* QMetaEnum_new(); +QMetaEnum* QMetaEnum_new2(QMetaEnum* param1); const char* QMetaEnum_Name(const QMetaEnum* self); const char* QMetaEnum_EnumName(const QMetaEnum* self); bool QMetaEnum_IsFlag(const QMetaEnum* self); @@ -143,7 +143,7 @@ int QMetaEnum_KeyToValue2(const QMetaEnum* self, const char* key, bool* ok); int QMetaEnum_KeysToValue2(const QMetaEnum* self, const char* keys, bool* ok); void QMetaEnum_Delete(QMetaEnum* self, bool isSubclass); -void QMetaProperty_new(QMetaProperty** outptr_QMetaProperty); +QMetaProperty* QMetaProperty_new(); const char* QMetaProperty_Name(const QMetaProperty* self); const char* QMetaProperty_TypeName(const QMetaProperty* self); int QMetaProperty_Type(const QMetaProperty* self); @@ -184,7 +184,7 @@ bool QMetaProperty_IsEditable1(const QMetaProperty* self, QObject* obj); bool QMetaProperty_IsUser1(const QMetaProperty* self, QObject* obj); void QMetaProperty_Delete(QMetaProperty* self, bool isSubclass); -void QMetaClassInfo_new(QMetaClassInfo** outptr_QMetaClassInfo); +QMetaClassInfo* QMetaClassInfo_new(); const char* QMetaClassInfo_Name(const QMetaClassInfo* self); const char* QMetaClassInfo_Value(const QMetaClassInfo* self); QMetaObject* QMetaClassInfo_EnclosingMetaObject(const QMetaClassInfo* self); diff --git a/qt/gen_qmetatype.cpp b/qt/gen_qmetatype.cpp index 97fb5e42..18ed848a 100644 --- a/qt/gen_qmetatype.cpp +++ b/qt/gen_qmetatype.cpp @@ -7,14 +7,12 @@ #include "gen_qmetatype.h" #include "_cgo_export.h" -void QMetaType_new(QMetaType** outptr_QMetaType) { - QMetaType* ret = new QMetaType(); - *outptr_QMetaType = ret; +QMetaType* QMetaType_new() { + return new QMetaType(); } -void QMetaType_new2(const int typeVal, QMetaType** outptr_QMetaType) { - QMetaType* ret = new QMetaType(static_cast(typeVal)); - *outptr_QMetaType = ret; +QMetaType* QMetaType_new2(const int typeVal) { + return new QMetaType(static_cast(typeVal)); } bool QMetaType_UnregisterType(int typeVal) { diff --git a/qt/gen_qmetatype.go b/qt/gen_qmetatype.go index 33a78e87..bae27d7d 100644 --- a/qt/gen_qmetatype.go +++ b/qt/gen_qmetatype.go @@ -171,34 +171,27 @@ func newQMetaType(h *C.QMetaType) *QMetaType { if h == nil { return nil } + return &QMetaType{h: h} } // UnsafeNewQMetaType constructs the type using only unsafe pointers. func UnsafeNewQMetaType(h unsafe.Pointer) *QMetaType { - if h == nil { - return nil - } - - return &QMetaType{h: (*C.QMetaType)(h)} + return newQMetaType((*C.QMetaType)(h)) } // NewQMetaType constructs a new QMetaType object. func NewQMetaType() *QMetaType { - var outptr_QMetaType *C.QMetaType = nil - C.QMetaType_new(&outptr_QMetaType) - ret := newQMetaType(outptr_QMetaType) + ret := newQMetaType(C.QMetaType_new()) ret.isSubclass = true return ret } // NewQMetaType2 constructs a new QMetaType object. func NewQMetaType2(typeVal int) *QMetaType { - var outptr_QMetaType *C.QMetaType = nil - C.QMetaType_new2((C.int)(typeVal), &outptr_QMetaType) - ret := newQMetaType(outptr_QMetaType) + ret := newQMetaType(C.QMetaType_new2((C.int)(typeVal))) ret.isSubclass = true return ret } diff --git a/qt/gen_qmetatype.h b/qt/gen_qmetatype.h index df5b79bd..40efa701 100644 --- a/qt/gen_qmetatype.h +++ b/qt/gen_qmetatype.h @@ -26,8 +26,8 @@ typedef struct QMetaObject QMetaObject; typedef struct QMetaType QMetaType; #endif -void QMetaType_new(QMetaType** outptr_QMetaType); -void QMetaType_new2(const int typeVal, QMetaType** outptr_QMetaType); +QMetaType* QMetaType_new(); +QMetaType* QMetaType_new2(const int typeVal); bool QMetaType_UnregisterType(int typeVal); int QMetaType_RegisterTypedef(const char* typeName, int aliasId); int QMetaType_RegisterNormalizedTypedef(struct miqt_string normalizedTypeName, int aliasId); diff --git a/qt/gen_qmimedata.cpp b/qt/gen_qmimedata.cpp index b175d6f4..8e55b599 100644 --- a/qt/gen_qmimedata.cpp +++ b/qt/gen_qmimedata.cpp @@ -305,10 +305,12 @@ public: }; -void QMimeData_new(QMimeData** outptr_QMimeData, QObject** outptr_QObject) { - MiqtVirtualQMimeData* ret = new MiqtVirtualQMimeData(); - *outptr_QMimeData = ret; - *outptr_QObject = static_cast(ret); +QMimeData* QMimeData_new() { + return new MiqtVirtualQMimeData(); +} + +void QMimeData_virtbase(QMimeData* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QMimeData_MetaObject(const QMimeData* self) { diff --git a/qt/gen_qmimedata.go b/qt/gen_qmimedata.go index 90c532f4..9c4d434f 100644 --- a/qt/gen_qmimedata.go +++ b/qt/gen_qmimedata.go @@ -35,31 +35,26 @@ func (this *QMimeData) UnsafePointer() unsafe.Pointer { } // newQMimeData constructs the type using only CGO pointers. -func newQMimeData(h *C.QMimeData, h_QObject *C.QObject) *QMimeData { +func newQMimeData(h *C.QMimeData) *QMimeData { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QMimeData_virtbase(h, &outptr_QObject) + return &QMimeData{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQMimeData constructs the type using only unsafe pointers. -func UnsafeNewQMimeData(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMimeData { - if h == nil { - return nil - } - - return &QMimeData{h: (*C.QMimeData)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQMimeData(h unsafe.Pointer) *QMimeData { + return newQMimeData((*C.QMimeData)(h)) } // NewQMimeData constructs a new QMimeData object. func NewQMimeData() *QMimeData { - var outptr_QMimeData *C.QMimeData = nil - var outptr_QObject *C.QObject = nil - C.QMimeData_new(&outptr_QMimeData, &outptr_QObject) - ret := newQMimeData(outptr_QMimeData, outptr_QObject) + ret := newQMimeData(C.QMimeData_new()) ret.isSubclass = true return ret } @@ -478,7 +473,7 @@ func miqt_exec_callback_QMimeData_TimerEvent(self *C.QMimeData, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QMimeData{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -504,7 +499,7 @@ func miqt_exec_callback_QMimeData_ChildEvent(self *C.QMimeData, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QMimeData{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qmimedata.h b/qt/gen_qmimedata.h index 71c4b8cf..f33a44e5 100644 --- a/qt/gen_qmimedata.h +++ b/qt/gen_qmimedata.h @@ -36,7 +36,8 @@ typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -void QMimeData_new(QMimeData** outptr_QMimeData, QObject** outptr_QObject); +QMimeData* QMimeData_new(); +void QMimeData_virtbase(QMimeData* src, QObject** outptr_QObject); QMetaObject* QMimeData_MetaObject(const QMimeData* self); void* QMimeData_Metacast(QMimeData* self, const char* param1); struct miqt_string QMimeData_Tr(const char* s); diff --git a/qt/gen_qmimedatabase.cpp b/qt/gen_qmimedatabase.cpp index ee71f459..7c2e2bb7 100644 --- a/qt/gen_qmimedatabase.cpp +++ b/qt/gen_qmimedatabase.cpp @@ -12,9 +12,8 @@ #include "gen_qmimedatabase.h" #include "_cgo_export.h" -void QMimeDatabase_new(QMimeDatabase** outptr_QMimeDatabase) { - QMimeDatabase* ret = new QMimeDatabase(); - *outptr_QMimeDatabase = ret; +QMimeDatabase* QMimeDatabase_new() { + return new QMimeDatabase(); } QMimeType* QMimeDatabase_MimeTypeForName(const QMimeDatabase* self, struct miqt_string nameOrAlias) { diff --git a/qt/gen_qmimedatabase.go b/qt/gen_qmimedatabase.go index 7fb17b84..e88d8071 100644 --- a/qt/gen_qmimedatabase.go +++ b/qt/gen_qmimedatabase.go @@ -45,24 +45,19 @@ func newQMimeDatabase(h *C.QMimeDatabase) *QMimeDatabase { if h == nil { return nil } + return &QMimeDatabase{h: h} } // UnsafeNewQMimeDatabase constructs the type using only unsafe pointers. func UnsafeNewQMimeDatabase(h unsafe.Pointer) *QMimeDatabase { - if h == nil { - return nil - } - - return &QMimeDatabase{h: (*C.QMimeDatabase)(h)} + return newQMimeDatabase((*C.QMimeDatabase)(h)) } // NewQMimeDatabase constructs a new QMimeDatabase object. func NewQMimeDatabase() *QMimeDatabase { - var outptr_QMimeDatabase *C.QMimeDatabase = nil - C.QMimeDatabase_new(&outptr_QMimeDatabase) - ret := newQMimeDatabase(outptr_QMimeDatabase) + ret := newQMimeDatabase(C.QMimeDatabase_new()) ret.isSubclass = true return ret } diff --git a/qt/gen_qmimedatabase.h b/qt/gen_qmimedatabase.h index 0d4aa762..bac5cde2 100644 --- a/qt/gen_qmimedatabase.h +++ b/qt/gen_qmimedatabase.h @@ -28,7 +28,7 @@ typedef struct QMimeType QMimeType; typedef struct QUrl QUrl; #endif -void QMimeDatabase_new(QMimeDatabase** outptr_QMimeDatabase); +QMimeDatabase* QMimeDatabase_new(); QMimeType* QMimeDatabase_MimeTypeForName(const QMimeDatabase* self, struct miqt_string nameOrAlias); QMimeType* QMimeDatabase_MimeTypeForFile(const QMimeDatabase* self, struct miqt_string fileName); QMimeType* QMimeDatabase_MimeTypeForFileWithFileInfo(const QMimeDatabase* self, QFileInfo* fileInfo); diff --git a/qt/gen_qmimetype.cpp b/qt/gen_qmimetype.cpp index 8d3a7f1c..e9750035 100644 --- a/qt/gen_qmimetype.cpp +++ b/qt/gen_qmimetype.cpp @@ -7,14 +7,12 @@ #include "gen_qmimetype.h" #include "_cgo_export.h" -void QMimeType_new(QMimeType** outptr_QMimeType) { - QMimeType* ret = new QMimeType(); - *outptr_QMimeType = ret; +QMimeType* QMimeType_new() { + return new QMimeType(); } -void QMimeType_new2(QMimeType* other, QMimeType** outptr_QMimeType) { - QMimeType* ret = new QMimeType(*other); - *outptr_QMimeType = ret; +QMimeType* QMimeType_new2(QMimeType* other) { + return new QMimeType(*other); } void QMimeType_OperatorAssign(QMimeType* self, QMimeType* other) { diff --git a/qt/gen_qmimetype.go b/qt/gen_qmimetype.go index 451e6092..a7bb2694 100644 --- a/qt/gen_qmimetype.go +++ b/qt/gen_qmimetype.go @@ -37,34 +37,27 @@ func newQMimeType(h *C.QMimeType) *QMimeType { if h == nil { return nil } + return &QMimeType{h: h} } // UnsafeNewQMimeType constructs the type using only unsafe pointers. func UnsafeNewQMimeType(h unsafe.Pointer) *QMimeType { - if h == nil { - return nil - } - - return &QMimeType{h: (*C.QMimeType)(h)} + return newQMimeType((*C.QMimeType)(h)) } // NewQMimeType constructs a new QMimeType object. func NewQMimeType() *QMimeType { - var outptr_QMimeType *C.QMimeType = nil - C.QMimeType_new(&outptr_QMimeType) - ret := newQMimeType(outptr_QMimeType) + ret := newQMimeType(C.QMimeType_new()) ret.isSubclass = true return ret } // NewQMimeType2 constructs a new QMimeType object. func NewQMimeType2(other *QMimeType) *QMimeType { - var outptr_QMimeType *C.QMimeType = nil - C.QMimeType_new2(other.cPointer(), &outptr_QMimeType) - ret := newQMimeType(outptr_QMimeType) + ret := newQMimeType(C.QMimeType_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qmimetype.h b/qt/gen_qmimetype.h index c5b26033..da419fce 100644 --- a/qt/gen_qmimetype.h +++ b/qt/gen_qmimetype.h @@ -20,8 +20,8 @@ class QMimeType; typedef struct QMimeType QMimeType; #endif -void QMimeType_new(QMimeType** outptr_QMimeType); -void QMimeType_new2(QMimeType* other, QMimeType** outptr_QMimeType); +QMimeType* QMimeType_new(); +QMimeType* QMimeType_new2(QMimeType* other); void QMimeType_OperatorAssign(QMimeType* self, QMimeType* other); void QMimeType_Swap(QMimeType* self, QMimeType* other); bool QMimeType_OperatorEqual(const QMimeType* self, QMimeType* other); diff --git a/qt/gen_qmouseeventtransition.cpp b/qt/gen_qmouseeventtransition.cpp index 287d671f..b6a6f1f2 100644 --- a/qt/gen_qmouseeventtransition.cpp +++ b/qt/gen_qmouseeventtransition.cpp @@ -95,36 +95,24 @@ public: }; -void QMouseEventTransition_new(QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQMouseEventTransition* ret = new MiqtVirtualQMouseEventTransition(); - *outptr_QMouseEventTransition = ret; - *outptr_QEventTransition = static_cast(ret); - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QMouseEventTransition* QMouseEventTransition_new() { + return new MiqtVirtualQMouseEventTransition(); } -void QMouseEventTransition_new2(QObject* object, int typeVal, int button, QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQMouseEventTransition* ret = new MiqtVirtualQMouseEventTransition(object, static_cast(typeVal), static_cast(button)); - *outptr_QMouseEventTransition = ret; - *outptr_QEventTransition = static_cast(ret); - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QMouseEventTransition* QMouseEventTransition_new2(QObject* object, int typeVal, int button) { + return new MiqtVirtualQMouseEventTransition(object, static_cast(typeVal), static_cast(button)); } -void QMouseEventTransition_new3(QState* sourceState, QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQMouseEventTransition* ret = new MiqtVirtualQMouseEventTransition(sourceState); - *outptr_QMouseEventTransition = ret; - *outptr_QEventTransition = static_cast(ret); - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QMouseEventTransition* QMouseEventTransition_new3(QState* sourceState) { + return new MiqtVirtualQMouseEventTransition(sourceState); } -void QMouseEventTransition_new4(QObject* object, int typeVal, int button, QState* sourceState, QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQMouseEventTransition* ret = new MiqtVirtualQMouseEventTransition(object, static_cast(typeVal), static_cast(button), sourceState); - *outptr_QMouseEventTransition = ret; - *outptr_QEventTransition = static_cast(ret); - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QMouseEventTransition* QMouseEventTransition_new4(QObject* object, int typeVal, int button, QState* sourceState) { + return new MiqtVirtualQMouseEventTransition(object, static_cast(typeVal), static_cast(button), sourceState); +} + +void QMouseEventTransition_virtbase(QMouseEventTransition* src, QEventTransition** outptr_QEventTransition) { + *outptr_QEventTransition = static_cast(src); } QMetaObject* QMouseEventTransition_MetaObject(const QMouseEventTransition* self) { diff --git a/qt/gen_qmouseeventtransition.go b/qt/gen_qmouseeventtransition.go index 441fc293..a9cbbf7b 100644 --- a/qt/gen_qmouseeventtransition.go +++ b/qt/gen_qmouseeventtransition.go @@ -35,72 +35,50 @@ func (this *QMouseEventTransition) UnsafePointer() unsafe.Pointer { } // newQMouseEventTransition constructs the type using only CGO pointers. -func newQMouseEventTransition(h *C.QMouseEventTransition, h_QEventTransition *C.QEventTransition, h_QAbstractTransition *C.QAbstractTransition, h_QObject *C.QObject) *QMouseEventTransition { +func newQMouseEventTransition(h *C.QMouseEventTransition) *QMouseEventTransition { if h == nil { return nil } + var outptr_QEventTransition *C.QEventTransition = nil + C.QMouseEventTransition_virtbase(h, &outptr_QEventTransition) + return &QMouseEventTransition{h: h, - QEventTransition: newQEventTransition(h_QEventTransition, h_QAbstractTransition, h_QObject)} + QEventTransition: newQEventTransition(outptr_QEventTransition)} } // UnsafeNewQMouseEventTransition constructs the type using only unsafe pointers. -func UnsafeNewQMouseEventTransition(h unsafe.Pointer, h_QEventTransition unsafe.Pointer, h_QAbstractTransition unsafe.Pointer, h_QObject unsafe.Pointer) *QMouseEventTransition { - if h == nil { - return nil - } - - return &QMouseEventTransition{h: (*C.QMouseEventTransition)(h), - QEventTransition: UnsafeNewQEventTransition(h_QEventTransition, h_QAbstractTransition, h_QObject)} +func UnsafeNewQMouseEventTransition(h unsafe.Pointer) *QMouseEventTransition { + return newQMouseEventTransition((*C.QMouseEventTransition)(h)) } // NewQMouseEventTransition constructs a new QMouseEventTransition object. func NewQMouseEventTransition() *QMouseEventTransition { - var outptr_QMouseEventTransition *C.QMouseEventTransition = nil - var outptr_QEventTransition *C.QEventTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QMouseEventTransition_new(&outptr_QMouseEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQMouseEventTransition(outptr_QMouseEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQMouseEventTransition(C.QMouseEventTransition_new()) ret.isSubclass = true return ret } // NewQMouseEventTransition2 constructs a new QMouseEventTransition object. func NewQMouseEventTransition2(object *QObject, typeVal QEvent__Type, button MouseButton) *QMouseEventTransition { - var outptr_QMouseEventTransition *C.QMouseEventTransition = nil - var outptr_QEventTransition *C.QEventTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QMouseEventTransition_new2(object.cPointer(), (C.int)(typeVal), (C.int)(button), &outptr_QMouseEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQMouseEventTransition(outptr_QMouseEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQMouseEventTransition(C.QMouseEventTransition_new2(object.cPointer(), (C.int)(typeVal), (C.int)(button))) ret.isSubclass = true return ret } // NewQMouseEventTransition3 constructs a new QMouseEventTransition object. func NewQMouseEventTransition3(sourceState *QState) *QMouseEventTransition { - var outptr_QMouseEventTransition *C.QMouseEventTransition = nil - var outptr_QEventTransition *C.QEventTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QMouseEventTransition_new3(sourceState.cPointer(), &outptr_QMouseEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQMouseEventTransition(outptr_QMouseEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQMouseEventTransition(C.QMouseEventTransition_new3(sourceState.cPointer())) ret.isSubclass = true return ret } // NewQMouseEventTransition4 constructs a new QMouseEventTransition object. func NewQMouseEventTransition4(object *QObject, typeVal QEvent__Type, button MouseButton, sourceState *QState) *QMouseEventTransition { - var outptr_QMouseEventTransition *C.QMouseEventTransition = nil - var outptr_QEventTransition *C.QEventTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QMouseEventTransition_new4(object.cPointer(), (C.int)(typeVal), (C.int)(button), sourceState.cPointer(), &outptr_QMouseEventTransition, &outptr_QEventTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQMouseEventTransition(outptr_QMouseEventTransition, outptr_QEventTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQMouseEventTransition(C.QMouseEventTransition_new4(object.cPointer(), (C.int)(typeVal), (C.int)(button), sourceState.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qmouseeventtransition.h b/qt/gen_qmouseeventtransition.h index e0f95711..ecc3532f 100644 --- a/qt/gen_qmouseeventtransition.h +++ b/qt/gen_qmouseeventtransition.h @@ -34,10 +34,11 @@ typedef struct QPainterPath QPainterPath; typedef struct QState QState; #endif -void QMouseEventTransition_new(QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); -void QMouseEventTransition_new2(QObject* object, int typeVal, int button, QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); -void QMouseEventTransition_new3(QState* sourceState, QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); -void QMouseEventTransition_new4(QObject* object, int typeVal, int button, QState* sourceState, QMouseEventTransition** outptr_QMouseEventTransition, QEventTransition** outptr_QEventTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +QMouseEventTransition* QMouseEventTransition_new(); +QMouseEventTransition* QMouseEventTransition_new2(QObject* object, int typeVal, int button); +QMouseEventTransition* QMouseEventTransition_new3(QState* sourceState); +QMouseEventTransition* QMouseEventTransition_new4(QObject* object, int typeVal, int button, QState* sourceState); +void QMouseEventTransition_virtbase(QMouseEventTransition* src, QEventTransition** outptr_QEventTransition); QMetaObject* QMouseEventTransition_MetaObject(const QMouseEventTransition* self); void* QMouseEventTransition_Metacast(QMouseEventTransition* self, const char* param1); struct miqt_string QMouseEventTransition_Tr(const char* s); diff --git a/qt/gen_qmovie.cpp b/qt/gen_qmovie.cpp index 823dd964..4a61b75f 100644 --- a/qt/gen_qmovie.cpp +++ b/qt/gen_qmovie.cpp @@ -207,59 +207,47 @@ public: }; -void QMovie_new(QMovie** outptr_QMovie, QObject** outptr_QObject) { - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); +QMovie* QMovie_new() { + return new MiqtVirtualQMovie(); } -void QMovie_new2(QIODevice* device, QMovie** outptr_QMovie, QObject** outptr_QObject) { - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(device); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); +QMovie* QMovie_new2(QIODevice* device) { + return new MiqtVirtualQMovie(device); } -void QMovie_new3(struct miqt_string fileName, QMovie** outptr_QMovie, QObject** outptr_QObject) { +QMovie* QMovie_new3(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(fileName_QString); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQMovie(fileName_QString); } -void QMovie_new4(QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject) { - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(parent); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); +QMovie* QMovie_new4(QObject* parent) { + return new MiqtVirtualQMovie(parent); } -void QMovie_new5(QIODevice* device, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject) { +QMovie* QMovie_new5(QIODevice* device, struct miqt_string format) { QByteArray format_QByteArray(format.data, format.len); - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(device, format_QByteArray); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQMovie(device, format_QByteArray); } -void QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject) { +QMovie* QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent) { QByteArray format_QByteArray(format.data, format.len); - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(device, format_QByteArray, parent); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQMovie(device, format_QByteArray, parent); } -void QMovie_new7(struct miqt_string fileName, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject) { +QMovie* QMovie_new7(struct miqt_string fileName, struct miqt_string format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(fileName_QString, format_QByteArray); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQMovie(fileName_QString, format_QByteArray); } -void QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject) { +QMovie* QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(fileName_QString, format_QByteArray, parent); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQMovie(fileName_QString, format_QByteArray, parent); +} + +void QMovie_virtbase(QMovie* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QMovie_MetaObject(const QMovie* self) { diff --git a/qt/gen_qmovie.go b/qt/gen_qmovie.go index 17d3b496..68d36356 100644 --- a/qt/gen_qmovie.go +++ b/qt/gen_qmovie.go @@ -50,42 +50,34 @@ func (this *QMovie) UnsafePointer() unsafe.Pointer { } // newQMovie constructs the type using only CGO pointers. -func newQMovie(h *C.QMovie, h_QObject *C.QObject) *QMovie { +func newQMovie(h *C.QMovie) *QMovie { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QMovie_virtbase(h, &outptr_QObject) + return &QMovie{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQMovie constructs the type using only unsafe pointers. -func UnsafeNewQMovie(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMovie { - if h == nil { - return nil - } - - return &QMovie{h: (*C.QMovie)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQMovie(h unsafe.Pointer) *QMovie { + return newQMovie((*C.QMovie)(h)) } // NewQMovie constructs a new QMovie object. func NewQMovie() *QMovie { - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new(&outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new()) ret.isSubclass = true return ret } // NewQMovie2 constructs a new QMovie object. func NewQMovie2(device *QIODevice) *QMovie { - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new2(device.cPointer(), &outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new2(device.cPointer())) ret.isSubclass = true return ret } @@ -96,22 +88,16 @@ func NewQMovie3(fileName string) *QMovie { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new3(fileName_ms, &outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new3(fileName_ms)) ret.isSubclass = true return ret } // NewQMovie4 constructs a new QMovie object. func NewQMovie4(parent *QObject) *QMovie { - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new4(parent.cPointer(), &outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new4(parent.cPointer())) ret.isSubclass = true return ret } @@ -121,11 +107,8 @@ func NewQMovie5(device *QIODevice, format []byte) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new5(device.cPointer(), format_alias, &outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new5(device.cPointer(), format_alias)) ret.isSubclass = true return ret } @@ -135,11 +118,8 @@ func NewQMovie6(device *QIODevice, format []byte, parent *QObject) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new6(device.cPointer(), format_alias, parent.cPointer(), &outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new6(device.cPointer(), format_alias, parent.cPointer())) ret.isSubclass = true return ret } @@ -153,11 +133,8 @@ func NewQMovie7(fileName string, format []byte) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new7(fileName_ms, format_alias, &outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new7(fileName_ms, format_alias)) ret.isSubclass = true return ret } @@ -171,11 +148,8 @@ func NewQMovie8(fileName string, format []byte, parent *QObject) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new8(fileName_ms, format_alias, parent.cPointer(), &outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new8(fileName_ms, format_alias, parent.cPointer())) ret.isSubclass = true return ret } @@ -226,7 +200,7 @@ func (this *QMovie) SetDevice(device *QIODevice) { } func (this *QMovie) Device() *QIODevice { - return newQIODevice(C.QMovie_Device(this.h), nil) + return newQIODevice(C.QMovie_Device(this.h)) } func (this *QMovie) SetFileName(fileName string) { @@ -279,13 +253,13 @@ func (this *QMovie) FrameRect() *QRect { } func (this *QMovie) CurrentImage() *QImage { - _goptr := newQImage(C.QMovie_CurrentImage(this.h), nil) + _goptr := newQImage(C.QMovie_CurrentImage(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QMovie) CurrentPixmap() *QPixmap { - _goptr := newQPixmap(C.QMovie_CurrentPixmap(this.h), nil) + _goptr := newQPixmap(C.QMovie_CurrentPixmap(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -623,7 +597,7 @@ func miqt_exec_callback_QMovie_TimerEvent(self *C.QMovie, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QMovie{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -649,7 +623,7 @@ func miqt_exec_callback_QMovie_ChildEvent(self *C.QMovie, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QMovie{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qmovie.h b/qt/gen_qmovie.h index 3ed97f7f..48f0a3da 100644 --- a/qt/gen_qmovie.h +++ b/qt/gen_qmovie.h @@ -44,14 +44,15 @@ typedef struct QSize QSize; typedef struct QTimerEvent QTimerEvent; #endif -void QMovie_new(QMovie** outptr_QMovie, QObject** outptr_QObject); -void QMovie_new2(QIODevice* device, QMovie** outptr_QMovie, QObject** outptr_QObject); -void QMovie_new3(struct miqt_string fileName, QMovie** outptr_QMovie, QObject** outptr_QObject); -void QMovie_new4(QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject); -void QMovie_new5(QIODevice* device, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject); -void QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject); -void QMovie_new7(struct miqt_string fileName, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject); -void QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject); +QMovie* QMovie_new(); +QMovie* QMovie_new2(QIODevice* device); +QMovie* QMovie_new3(struct miqt_string fileName); +QMovie* QMovie_new4(QObject* parent); +QMovie* QMovie_new5(QIODevice* device, struct miqt_string format); +QMovie* QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent); +QMovie* QMovie_new7(struct miqt_string fileName, struct miqt_string format); +QMovie* QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent); +void QMovie_virtbase(QMovie* src, QObject** outptr_QObject); QMetaObject* QMovie_MetaObject(const QMovie* self); void* QMovie_Metacast(QMovie* self, const char* param1); struct miqt_string QMovie_Tr(const char* s); diff --git a/qt/gen_qmutex.cpp b/qt/gen_qmutex.cpp index 16250c4d..e932684a 100644 --- a/qt/gen_qmutex.cpp +++ b/qt/gen_qmutex.cpp @@ -6,9 +6,8 @@ #include "gen_qmutex.h" #include "_cgo_export.h" -void QBasicMutex_new(QBasicMutex** outptr_QBasicMutex) { - QBasicMutex* ret = new QBasicMutex(); - *outptr_QBasicMutex = ret; +QBasicMutex* QBasicMutex_new() { + return new QBasicMutex(); } void QBasicMutex_Lock(QBasicMutex* self) { @@ -43,16 +42,16 @@ void QBasicMutex_Delete(QBasicMutex* self, bool isSubclass) { } } -void QMutex_new(QMutex** outptr_QMutex, QBasicMutex** outptr_QBasicMutex) { - QMutex* ret = new QMutex(); - *outptr_QMutex = ret; - *outptr_QBasicMutex = static_cast(ret); +QMutex* QMutex_new() { + return new QMutex(); } -void QMutex_new2(int mode, QMutex** outptr_QMutex, QBasicMutex** outptr_QBasicMutex) { - QMutex* ret = new QMutex(static_cast(mode)); - *outptr_QMutex = ret; - *outptr_QBasicMutex = static_cast(ret); +QMutex* QMutex_new2(int mode) { + return new QMutex(static_cast(mode)); +} + +void QMutex_virtbase(QMutex* src, QBasicMutex** outptr_QBasicMutex) { + *outptr_QBasicMutex = static_cast(src); } void QMutex_Lock(QMutex* self) { @@ -87,9 +86,8 @@ void QMutex_Delete(QMutex* self, bool isSubclass) { } } -void QRecursiveMutex_new(QRecursiveMutex** outptr_QRecursiveMutex) { - QRecursiveMutex* ret = new QRecursiveMutex(); - *outptr_QRecursiveMutex = ret; +QRecursiveMutex* QRecursiveMutex_new() { + return new QRecursiveMutex(); } void QRecursiveMutex_Delete(QRecursiveMutex* self, bool isSubclass) { @@ -100,14 +98,12 @@ void QRecursiveMutex_Delete(QRecursiveMutex* self, bool isSubclass) { } } -void QMutexLocker_new(QBasicMutex* m, QMutexLocker** outptr_QMutexLocker) { - QMutexLocker* ret = new QMutexLocker(m); - *outptr_QMutexLocker = ret; +QMutexLocker* QMutexLocker_new(QBasicMutex* m) { + return new QMutexLocker(m); } -void QMutexLocker_new2(QRecursiveMutex* m, QMutexLocker** outptr_QMutexLocker) { - QMutexLocker* ret = new QMutexLocker(m); - *outptr_QMutexLocker = ret; +QMutexLocker* QMutexLocker_new2(QRecursiveMutex* m) { + return new QMutexLocker(m); } void QMutexLocker_Unlock(QMutexLocker* self) { diff --git a/qt/gen_qmutex.go b/qt/gen_qmutex.go index f0182196..f4c13197 100644 --- a/qt/gen_qmutex.go +++ b/qt/gen_qmutex.go @@ -44,24 +44,19 @@ func newQBasicMutex(h *C.QBasicMutex) *QBasicMutex { if h == nil { return nil } + return &QBasicMutex{h: h} } // UnsafeNewQBasicMutex constructs the type using only unsafe pointers. func UnsafeNewQBasicMutex(h unsafe.Pointer) *QBasicMutex { - if h == nil { - return nil - } - - return &QBasicMutex{h: (*C.QBasicMutex)(h)} + return newQBasicMutex((*C.QBasicMutex)(h)) } // NewQBasicMutex constructs a new QBasicMutex object. func NewQBasicMutex() *QBasicMutex { - var outptr_QBasicMutex *C.QBasicMutex = nil - C.QBasicMutex_new(&outptr_QBasicMutex) - ret := newQBasicMutex(outptr_QBasicMutex) + ret := newQBasicMutex(C.QBasicMutex_new()) ret.isSubclass = true return ret } @@ -125,42 +120,34 @@ func (this *QMutex) UnsafePointer() unsafe.Pointer { } // newQMutex constructs the type using only CGO pointers. -func newQMutex(h *C.QMutex, h_QBasicMutex *C.QBasicMutex) *QMutex { +func newQMutex(h *C.QMutex) *QMutex { if h == nil { return nil } + var outptr_QBasicMutex *C.QBasicMutex = nil + C.QMutex_virtbase(h, &outptr_QBasicMutex) + return &QMutex{h: h, - QBasicMutex: newQBasicMutex(h_QBasicMutex)} + QBasicMutex: newQBasicMutex(outptr_QBasicMutex)} } // UnsafeNewQMutex constructs the type using only unsafe pointers. -func UnsafeNewQMutex(h unsafe.Pointer, h_QBasicMutex unsafe.Pointer) *QMutex { - if h == nil { - return nil - } - - return &QMutex{h: (*C.QMutex)(h), - QBasicMutex: UnsafeNewQBasicMutex(h_QBasicMutex)} +func UnsafeNewQMutex(h unsafe.Pointer) *QMutex { + return newQMutex((*C.QMutex)(h)) } // NewQMutex constructs a new QMutex object. func NewQMutex() *QMutex { - var outptr_QMutex *C.QMutex = nil - var outptr_QBasicMutex *C.QBasicMutex = nil - C.QMutex_new(&outptr_QMutex, &outptr_QBasicMutex) - ret := newQMutex(outptr_QMutex, outptr_QBasicMutex) + ret := newQMutex(C.QMutex_new()) ret.isSubclass = true return ret } // NewQMutex2 constructs a new QMutex object. func NewQMutex2(mode QMutex__RecursionMode) *QMutex { - var outptr_QMutex *C.QMutex = nil - var outptr_QBasicMutex *C.QBasicMutex = nil - C.QMutex_new2((C.int)(mode), &outptr_QMutex, &outptr_QBasicMutex) - ret := newQMutex(outptr_QMutex, outptr_QBasicMutex) + ret := newQMutex(C.QMutex_new2((C.int)(mode))) ret.isSubclass = true return ret } @@ -227,24 +214,19 @@ func newQRecursiveMutex(h *C.QRecursiveMutex) *QRecursiveMutex { if h == nil { return nil } + return &QRecursiveMutex{h: h} } // UnsafeNewQRecursiveMutex constructs the type using only unsafe pointers. func UnsafeNewQRecursiveMutex(h unsafe.Pointer) *QRecursiveMutex { - if h == nil { - return nil - } - - return &QRecursiveMutex{h: (*C.QRecursiveMutex)(h)} + return newQRecursiveMutex((*C.QRecursiveMutex)(h)) } // NewQRecursiveMutex constructs a new QRecursiveMutex object. func NewQRecursiveMutex() *QRecursiveMutex { - var outptr_QRecursiveMutex *C.QRecursiveMutex = nil - C.QRecursiveMutex_new(&outptr_QRecursiveMutex) - ret := newQRecursiveMutex(outptr_QRecursiveMutex) + ret := newQRecursiveMutex(C.QRecursiveMutex_new()) ret.isSubclass = true return ret } @@ -287,34 +269,27 @@ func newQMutexLocker(h *C.QMutexLocker) *QMutexLocker { if h == nil { return nil } + return &QMutexLocker{h: h} } // UnsafeNewQMutexLocker constructs the type using only unsafe pointers. func UnsafeNewQMutexLocker(h unsafe.Pointer) *QMutexLocker { - if h == nil { - return nil - } - - return &QMutexLocker{h: (*C.QMutexLocker)(h)} + return newQMutexLocker((*C.QMutexLocker)(h)) } // NewQMutexLocker constructs a new QMutexLocker object. func NewQMutexLocker(m *QBasicMutex) *QMutexLocker { - var outptr_QMutexLocker *C.QMutexLocker = nil - C.QMutexLocker_new(m.cPointer(), &outptr_QMutexLocker) - ret := newQMutexLocker(outptr_QMutexLocker) + ret := newQMutexLocker(C.QMutexLocker_new(m.cPointer())) ret.isSubclass = true return ret } // NewQMutexLocker2 constructs a new QMutexLocker object. func NewQMutexLocker2(m *QRecursiveMutex) *QMutexLocker { - var outptr_QMutexLocker *C.QMutexLocker = nil - C.QMutexLocker_new2(m.cPointer(), &outptr_QMutexLocker) - ret := newQMutexLocker(outptr_QMutexLocker) + ret := newQMutexLocker(C.QMutexLocker_new2(m.cPointer())) ret.isSubclass = true return ret } @@ -328,7 +303,7 @@ func (this *QMutexLocker) Relock() { } func (this *QMutexLocker) Mutex() *QMutex { - return newQMutex(C.QMutexLocker_Mutex(this.h), nil) + return newQMutex(C.QMutexLocker_Mutex(this.h)) } // Delete this object from C++ memory. diff --git a/qt/gen_qmutex.h b/qt/gen_qmutex.h index d5ef6528..5aa4b55c 100644 --- a/qt/gen_qmutex.h +++ b/qt/gen_qmutex.h @@ -26,7 +26,7 @@ typedef struct QMutexLocker QMutexLocker; typedef struct QRecursiveMutex QRecursiveMutex; #endif -void QBasicMutex_new(QBasicMutex** outptr_QBasicMutex); +QBasicMutex* QBasicMutex_new(); void QBasicMutex_Lock(QBasicMutex* self); void QBasicMutex_Unlock(QBasicMutex* self); bool QBasicMutex_TryLock(QBasicMutex* self); @@ -35,8 +35,9 @@ bool QBasicMutex_IsRecursive(QBasicMutex* self); bool QBasicMutex_IsRecursive2(const QBasicMutex* self); void QBasicMutex_Delete(QBasicMutex* self, bool isSubclass); -void QMutex_new(QMutex** outptr_QMutex, QBasicMutex** outptr_QBasicMutex); -void QMutex_new2(int mode, QMutex** outptr_QMutex, QBasicMutex** outptr_QBasicMutex); +QMutex* QMutex_new(); +QMutex* QMutex_new2(int mode); +void QMutex_virtbase(QMutex* src, QBasicMutex** outptr_QBasicMutex); void QMutex_Lock(QMutex* self); bool QMutex_TryLock(QMutex* self); void QMutex_Unlock(QMutex* self); @@ -45,11 +46,11 @@ bool QMutex_IsRecursive(const QMutex* self); bool QMutex_TryLock1(QMutex* self, int timeout); void QMutex_Delete(QMutex* self, bool isSubclass); -void QRecursiveMutex_new(QRecursiveMutex** outptr_QRecursiveMutex); +QRecursiveMutex* QRecursiveMutex_new(); void QRecursiveMutex_Delete(QRecursiveMutex* self, bool isSubclass); -void QMutexLocker_new(QBasicMutex* m, QMutexLocker** outptr_QMutexLocker); -void QMutexLocker_new2(QRecursiveMutex* m, QMutexLocker** outptr_QMutexLocker); +QMutexLocker* QMutexLocker_new(QBasicMutex* m); +QMutexLocker* QMutexLocker_new2(QRecursiveMutex* m); void QMutexLocker_Unlock(QMutexLocker* self); void QMutexLocker_Relock(QMutexLocker* self); QMutex* QMutexLocker_Mutex(const QMutexLocker* self); diff --git a/qt/gen_qnamespace.go b/qt/gen_qnamespace.go index 0ae39b2a..6bd59fc7 100644 --- a/qt/gen_qnamespace.go +++ b/qt/gen_qnamespace.go @@ -1725,16 +1725,13 @@ func newQInternal(h *C.QInternal) *QInternal { if h == nil { return nil } + return &QInternal{h: h} } // UnsafeNewQInternal constructs the type using only unsafe pointers. func UnsafeNewQInternal(h unsafe.Pointer) *QInternal { - if h == nil { - return nil - } - - return &QInternal{h: (*C.QInternal)(h)} + return newQInternal((*C.QInternal)(h)) } // Delete this object from C++ memory. diff --git a/qt/gen_qobject.cpp b/qt/gen_qobject.cpp index 7ccec9c9..2fcb5f0e 100644 --- a/qt/gen_qobject.cpp +++ b/qt/gen_qobject.cpp @@ -212,14 +212,12 @@ public: }; -void QObject_new(QObject** outptr_QObject) { - MiqtVirtualQObject* ret = new MiqtVirtualQObject(); - *outptr_QObject = ret; +QObject* QObject_new() { + return new MiqtVirtualQObject(); } -void QObject_new2(QObject* parent, QObject** outptr_QObject) { - MiqtVirtualQObject* ret = new MiqtVirtualQObject(parent); - *outptr_QObject = ret; +QObject* QObject_new2(QObject* parent) { + return new MiqtVirtualQObject(parent); } QMetaObject* QObject_MetaObject(const QObject* self) { @@ -557,9 +555,8 @@ void QObject_Delete(QObject* self, bool isSubclass) { } } -void QObjectUserData_new(QObjectUserData** outptr_QObjectUserData) { - QObjectUserData* ret = new QObjectUserData(); - *outptr_QObjectUserData = ret; +QObjectUserData* QObjectUserData_new() { + return new QObjectUserData(); } void QObjectUserData_Delete(QObjectUserData* self, bool isSubclass) { @@ -570,14 +567,12 @@ void QObjectUserData_Delete(QObjectUserData* self, bool isSubclass) { } } -void QSignalBlocker_new(QObject* o, QSignalBlocker** outptr_QSignalBlocker) { - QSignalBlocker* ret = new QSignalBlocker(o); - *outptr_QSignalBlocker = ret; +QSignalBlocker* QSignalBlocker_new(QObject* o) { + return new QSignalBlocker(o); } -void QSignalBlocker_new2(QObject* o, QSignalBlocker** outptr_QSignalBlocker) { - QSignalBlocker* ret = new QSignalBlocker(*o); - *outptr_QSignalBlocker = ret; +QSignalBlocker* QSignalBlocker_new2(QObject* o) { + return new QSignalBlocker(*o); } void QSignalBlocker_Reblock(QSignalBlocker* self) { diff --git a/qt/gen_qobject.go b/qt/gen_qobject.go index 2d563ef7..632d226c 100644 --- a/qt/gen_qobject.go +++ b/qt/gen_qobject.go @@ -44,16 +44,13 @@ func newQObjectData(h *C.QObjectData) *QObjectData { if h == nil { return nil } + return &QObjectData{h: h} } // UnsafeNewQObjectData constructs the type using only unsafe pointers. func UnsafeNewQObjectData(h unsafe.Pointer) *QObjectData { - if h == nil { - return nil - } - - return &QObjectData{h: (*C.QObjectData)(h)} + return newQObjectData((*C.QObjectData)(h)) } func (this *QObjectData) DynamicMetaObject() *QMetaObject { @@ -98,34 +95,27 @@ func newQObject(h *C.QObject) *QObject { if h == nil { return nil } + return &QObject{h: h} } // UnsafeNewQObject constructs the type using only unsafe pointers. func UnsafeNewQObject(h unsafe.Pointer) *QObject { - if h == nil { - return nil - } - - return &QObject{h: (*C.QObject)(h)} + return newQObject((*C.QObject)(h)) } // NewQObject constructs a new QObject object. func NewQObject() *QObject { - var outptr_QObject *C.QObject = nil - C.QObject_new(&outptr_QObject) - ret := newQObject(outptr_QObject) + ret := newQObject(C.QObject_new()) ret.isSubclass = true return ret } // NewQObject2 constructs a new QObject object. func NewQObject2(parent *QObject) *QObject { - var outptr_QObject *C.QObject = nil - C.QObject_new2(parent.cPointer(), &outptr_QObject) - ret := newQObject(outptr_QObject) + ret := newQObject(C.QObject_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -198,7 +188,7 @@ func (this *QObject) BlockSignals(b bool) bool { } func (this *QObject) Thread() *QThread { - return newQThread(C.QObject_Thread(this.h), nil) + return newQThread(C.QObject_Thread(this.h)) } func (this *QObject) MoveToThread(thread *QThread) { @@ -507,7 +497,7 @@ func miqt_exec_callback_QObject_TimerEvent(self *C.QObject, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QObject{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -533,7 +523,7 @@ func miqt_exec_callback_QObject_ChildEvent(self *C.QObject, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QObject{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -655,24 +645,19 @@ func newQObjectUserData(h *C.QObjectUserData) *QObjectUserData { if h == nil { return nil } + return &QObjectUserData{h: h} } // UnsafeNewQObjectUserData constructs the type using only unsafe pointers. func UnsafeNewQObjectUserData(h unsafe.Pointer) *QObjectUserData { - if h == nil { - return nil - } - - return &QObjectUserData{h: (*C.QObjectUserData)(h)} + return newQObjectUserData((*C.QObjectUserData)(h)) } // NewQObjectUserData constructs a new QObjectUserData object. func NewQObjectUserData() *QObjectUserData { - var outptr_QObjectUserData *C.QObjectUserData = nil - C.QObjectUserData_new(&outptr_QObjectUserData) - ret := newQObjectUserData(outptr_QObjectUserData) + ret := newQObjectUserData(C.QObjectUserData_new()) ret.isSubclass = true return ret } @@ -715,34 +700,27 @@ func newQSignalBlocker(h *C.QSignalBlocker) *QSignalBlocker { if h == nil { return nil } + return &QSignalBlocker{h: h} } // UnsafeNewQSignalBlocker constructs the type using only unsafe pointers. func UnsafeNewQSignalBlocker(h unsafe.Pointer) *QSignalBlocker { - if h == nil { - return nil - } - - return &QSignalBlocker{h: (*C.QSignalBlocker)(h)} + return newQSignalBlocker((*C.QSignalBlocker)(h)) } // NewQSignalBlocker constructs a new QSignalBlocker object. func NewQSignalBlocker(o *QObject) *QSignalBlocker { - var outptr_QSignalBlocker *C.QSignalBlocker = nil - C.QSignalBlocker_new(o.cPointer(), &outptr_QSignalBlocker) - ret := newQSignalBlocker(outptr_QSignalBlocker) + ret := newQSignalBlocker(C.QSignalBlocker_new(o.cPointer())) ret.isSubclass = true return ret } // NewQSignalBlocker2 constructs a new QSignalBlocker object. func NewQSignalBlocker2(o *QObject) *QSignalBlocker { - var outptr_QSignalBlocker *C.QSignalBlocker = nil - C.QSignalBlocker_new2(o.cPointer(), &outptr_QSignalBlocker) - ret := newQSignalBlocker(outptr_QSignalBlocker) + ret := newQSignalBlocker(C.QSignalBlocker_new2(o.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qobject.h b/qt/gen_qobject.h index be767f17..c6d9b51c 100644 --- a/qt/gen_qobject.h +++ b/qt/gen_qobject.h @@ -49,8 +49,8 @@ typedef struct QVariant QVariant; QMetaObject* QObjectData_DynamicMetaObject(const QObjectData* self); void QObjectData_Delete(QObjectData* self, bool isSubclass); -void QObject_new(QObject** outptr_QObject); -void QObject_new2(QObject* parent, QObject** outptr_QObject); +QObject* QObject_new(); +QObject* QObject_new2(QObject* parent); QMetaObject* QObject_MetaObject(const QObject* self); void* QObject_Metacast(QObject* self, const char* param1); struct miqt_string QObject_Tr(const char* s); @@ -120,11 +120,11 @@ void QObject_override_virtual_DisconnectNotify(void* self, intptr_t slot); void QObject_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QObject_Delete(QObject* self, bool isSubclass); -void QObjectUserData_new(QObjectUserData** outptr_QObjectUserData); +QObjectUserData* QObjectUserData_new(); void QObjectUserData_Delete(QObjectUserData* self, bool isSubclass); -void QSignalBlocker_new(QObject* o, QSignalBlocker** outptr_QSignalBlocker); -void QSignalBlocker_new2(QObject* o, QSignalBlocker** outptr_QSignalBlocker); +QSignalBlocker* QSignalBlocker_new(QObject* o); +QSignalBlocker* QSignalBlocker_new2(QObject* o); void QSignalBlocker_Reblock(QSignalBlocker* self); void QSignalBlocker_Unblock(QSignalBlocker* self); void QSignalBlocker_Delete(QSignalBlocker* self, bool isSubclass); diff --git a/qt/gen_qobjectcleanuphandler.cpp b/qt/gen_qobjectcleanuphandler.cpp index d56e201a..cca5b2bb 100644 --- a/qt/gen_qobjectcleanuphandler.cpp +++ b/qt/gen_qobjectcleanuphandler.cpp @@ -192,10 +192,12 @@ public: }; -void QObjectCleanupHandler_new(QObjectCleanupHandler** outptr_QObjectCleanupHandler, QObject** outptr_QObject) { - MiqtVirtualQObjectCleanupHandler* ret = new MiqtVirtualQObjectCleanupHandler(); - *outptr_QObjectCleanupHandler = ret; - *outptr_QObject = static_cast(ret); +QObjectCleanupHandler* QObjectCleanupHandler_new() { + return new MiqtVirtualQObjectCleanupHandler(); +} + +void QObjectCleanupHandler_virtbase(QObjectCleanupHandler* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QObjectCleanupHandler_MetaObject(const QObjectCleanupHandler* self) { diff --git a/qt/gen_qobjectcleanuphandler.go b/qt/gen_qobjectcleanuphandler.go index 91558b6f..e0bfa582 100644 --- a/qt/gen_qobjectcleanuphandler.go +++ b/qt/gen_qobjectcleanuphandler.go @@ -35,31 +35,26 @@ func (this *QObjectCleanupHandler) UnsafePointer() unsafe.Pointer { } // newQObjectCleanupHandler constructs the type using only CGO pointers. -func newQObjectCleanupHandler(h *C.QObjectCleanupHandler, h_QObject *C.QObject) *QObjectCleanupHandler { +func newQObjectCleanupHandler(h *C.QObjectCleanupHandler) *QObjectCleanupHandler { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QObjectCleanupHandler_virtbase(h, &outptr_QObject) + return &QObjectCleanupHandler{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQObjectCleanupHandler constructs the type using only unsafe pointers. -func UnsafeNewQObjectCleanupHandler(h unsafe.Pointer, h_QObject unsafe.Pointer) *QObjectCleanupHandler { - if h == nil { - return nil - } - - return &QObjectCleanupHandler{h: (*C.QObjectCleanupHandler)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQObjectCleanupHandler(h unsafe.Pointer) *QObjectCleanupHandler { + return newQObjectCleanupHandler((*C.QObjectCleanupHandler)(h)) } // NewQObjectCleanupHandler constructs a new QObjectCleanupHandler object. func NewQObjectCleanupHandler() *QObjectCleanupHandler { - var outptr_QObjectCleanupHandler *C.QObjectCleanupHandler = nil - var outptr_QObject *C.QObject = nil - C.QObjectCleanupHandler_new(&outptr_QObjectCleanupHandler, &outptr_QObject) - ret := newQObjectCleanupHandler(outptr_QObjectCleanupHandler, outptr_QObject) + ret := newQObjectCleanupHandler(C.QObjectCleanupHandler_new()) ret.isSubclass = true return ret } @@ -230,7 +225,7 @@ func miqt_exec_callback_QObjectCleanupHandler_TimerEvent(self *C.QObjectCleanupH } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -256,7 +251,7 @@ func miqt_exec_callback_QObjectCleanupHandler_ChildEvent(self *C.QObjectCleanupH } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qobjectcleanuphandler.h b/qt/gen_qobjectcleanuphandler.h index de0927f6..5f569477 100644 --- a/qt/gen_qobjectcleanuphandler.h +++ b/qt/gen_qobjectcleanuphandler.h @@ -32,7 +32,8 @@ typedef struct QObjectCleanupHandler QObjectCleanupHandler; typedef struct QTimerEvent QTimerEvent; #endif -void QObjectCleanupHandler_new(QObjectCleanupHandler** outptr_QObjectCleanupHandler, QObject** outptr_QObject); +QObjectCleanupHandler* QObjectCleanupHandler_new(); +void QObjectCleanupHandler_virtbase(QObjectCleanupHandler* src, QObject** outptr_QObject); QMetaObject* QObjectCleanupHandler_MetaObject(const QObjectCleanupHandler* self); void* QObjectCleanupHandler_Metacast(QObjectCleanupHandler* self, const char* param1); struct miqt_string QObjectCleanupHandler_Tr(const char* s); diff --git a/qt/gen_qobjectdefs.cpp b/qt/gen_qobjectdefs.cpp index 92dd0b92..54cbb136 100644 --- a/qt/gen_qobjectdefs.cpp +++ b/qt/gen_qobjectdefs.cpp @@ -16,24 +16,20 @@ #include "gen_qobjectdefs.h" #include "_cgo_export.h" -void QGenericArgument_new(QGenericArgument** outptr_QGenericArgument) { - QGenericArgument* ret = new QGenericArgument(); - *outptr_QGenericArgument = ret; +QGenericArgument* QGenericArgument_new() { + return new QGenericArgument(); } -void QGenericArgument_new2(QGenericArgument* param1, QGenericArgument** outptr_QGenericArgument) { - QGenericArgument* ret = new QGenericArgument(*param1); - *outptr_QGenericArgument = ret; +QGenericArgument* QGenericArgument_new2(QGenericArgument* param1) { + return new QGenericArgument(*param1); } -void QGenericArgument_new3(const char* aName, QGenericArgument** outptr_QGenericArgument) { - QGenericArgument* ret = new QGenericArgument(aName); - *outptr_QGenericArgument = ret; +QGenericArgument* QGenericArgument_new3(const char* aName) { + return new QGenericArgument(aName); } -void QGenericArgument_new4(const char* aName, const void* aData, QGenericArgument** outptr_QGenericArgument) { - QGenericArgument* ret = new QGenericArgument(aName, aData); - *outptr_QGenericArgument = ret; +QGenericArgument* QGenericArgument_new4(const char* aName, const void* aData) { + return new QGenericArgument(aName, aData); } void* QGenericArgument_Data(const QGenericArgument* self) { @@ -52,28 +48,24 @@ void QGenericArgument_Delete(QGenericArgument* self, bool isSubclass) { } } -void QGenericReturnArgument_new(QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { - QGenericReturnArgument* ret = new QGenericReturnArgument(); - *outptr_QGenericReturnArgument = ret; - *outptr_QGenericArgument = static_cast(ret); +QGenericReturnArgument* QGenericReturnArgument_new() { + return new QGenericReturnArgument(); } -void QGenericReturnArgument_new2(QGenericReturnArgument* param1, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { - QGenericReturnArgument* ret = new QGenericReturnArgument(*param1); - *outptr_QGenericReturnArgument = ret; - *outptr_QGenericArgument = static_cast(ret); +QGenericReturnArgument* QGenericReturnArgument_new2(QGenericReturnArgument* param1) { + return new QGenericReturnArgument(*param1); } -void QGenericReturnArgument_new3(const char* aName, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { - QGenericReturnArgument* ret = new QGenericReturnArgument(aName); - *outptr_QGenericReturnArgument = ret; - *outptr_QGenericArgument = static_cast(ret); +QGenericReturnArgument* QGenericReturnArgument_new3(const char* aName) { + return new QGenericReturnArgument(aName); } -void QGenericReturnArgument_new4(const char* aName, void* aData, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { - QGenericReturnArgument* ret = new QGenericReturnArgument(aName, aData); - *outptr_QGenericReturnArgument = ret; - *outptr_QGenericArgument = static_cast(ret); +QGenericReturnArgument* QGenericReturnArgument_new4(const char* aName, void* aData) { + return new QGenericReturnArgument(aName, aData); +} + +void QGenericReturnArgument_virtbase(QGenericReturnArgument* src, QGenericArgument** outptr_QGenericArgument) { + *outptr_QGenericArgument = static_cast(src); } void QGenericReturnArgument_Delete(QGenericReturnArgument* self, bool isSubclass) { @@ -84,14 +76,12 @@ void QGenericReturnArgument_Delete(QGenericReturnArgument* self, bool isSubclass } } -void QMetaObject_new(QMetaObject** outptr_QMetaObject) { - QMetaObject* ret = new QMetaObject(); - *outptr_QMetaObject = ret; +QMetaObject* QMetaObject_new() { + return new QMetaObject(); } -void QMetaObject_new2(QMetaObject* param1, QMetaObject** outptr_QMetaObject) { - QMetaObject* ret = new QMetaObject(*param1); - *outptr_QMetaObject = ret; +QMetaObject* QMetaObject_new2(QMetaObject* param1) { + return new QMetaObject(*param1); } const char* QMetaObject_ClassName(const QMetaObject* self) { @@ -502,14 +492,12 @@ void QMetaObject_Delete(QMetaObject* self, bool isSubclass) { } } -void QMetaObject__Connection_new(QMetaObject__Connection** outptr_QMetaObject__Connection) { - QMetaObject::Connection* ret = new QMetaObject::Connection(); - *outptr_QMetaObject__Connection = ret; +QMetaObject__Connection* QMetaObject__Connection_new() { + return new QMetaObject::Connection(); } -void QMetaObject__Connection_new2(QMetaObject__Connection* other, QMetaObject__Connection** outptr_QMetaObject__Connection) { - QMetaObject::Connection* ret = new QMetaObject::Connection(*other); - *outptr_QMetaObject__Connection = ret; +QMetaObject__Connection* QMetaObject__Connection_new2(QMetaObject__Connection* other) { + return new QMetaObject::Connection(*other); } void QMetaObject__Connection_OperatorAssign(QMetaObject__Connection* self, QMetaObject__Connection* other) { @@ -524,19 +512,16 @@ void QMetaObject__Connection_Delete(QMetaObject__Connection* self, bool isSubcla } } -void QMetaObject__SuperData_new(QMetaObject__SuperData** outptr_QMetaObject__SuperData) { - QMetaObject::SuperData* ret = new QMetaObject::SuperData(); - *outptr_QMetaObject__SuperData = ret; +QMetaObject__SuperData* QMetaObject__SuperData_new() { + return new QMetaObject::SuperData(); } -void QMetaObject__SuperData_new2(QMetaObject* mo, QMetaObject__SuperData** outptr_QMetaObject__SuperData) { - QMetaObject::SuperData* ret = new QMetaObject::SuperData(mo); - *outptr_QMetaObject__SuperData = ret; +QMetaObject__SuperData* QMetaObject__SuperData_new2(QMetaObject* mo) { + return new QMetaObject::SuperData(mo); } -void QMetaObject__SuperData_new3(QMetaObject__SuperData* param1, QMetaObject__SuperData** outptr_QMetaObject__SuperData) { - QMetaObject::SuperData* ret = new QMetaObject::SuperData(*param1); - *outptr_QMetaObject__SuperData = ret; +QMetaObject__SuperData* QMetaObject__SuperData_new3(QMetaObject__SuperData* param1) { + return new QMetaObject::SuperData(*param1); } QMetaObject* QMetaObject__SuperData_OperatorMinusGreater(const QMetaObject__SuperData* self) { diff --git a/qt/gen_qobjectdefs.go b/qt/gen_qobjectdefs.go index f1fcf38c..2d7e55b5 100644 --- a/qt/gen_qobjectdefs.go +++ b/qt/gen_qobjectdefs.go @@ -55,34 +55,27 @@ func newQGenericArgument(h *C.QGenericArgument) *QGenericArgument { if h == nil { return nil } + return &QGenericArgument{h: h} } // UnsafeNewQGenericArgument constructs the type using only unsafe pointers. func UnsafeNewQGenericArgument(h unsafe.Pointer) *QGenericArgument { - if h == nil { - return nil - } - - return &QGenericArgument{h: (*C.QGenericArgument)(h)} + return newQGenericArgument((*C.QGenericArgument)(h)) } // NewQGenericArgument constructs a new QGenericArgument object. func NewQGenericArgument() *QGenericArgument { - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericArgument_new(&outptr_QGenericArgument) - ret := newQGenericArgument(outptr_QGenericArgument) + ret := newQGenericArgument(C.QGenericArgument_new()) ret.isSubclass = true return ret } // NewQGenericArgument2 constructs a new QGenericArgument object. func NewQGenericArgument2(param1 *QGenericArgument) *QGenericArgument { - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericArgument_new2(param1.cPointer(), &outptr_QGenericArgument) - ret := newQGenericArgument(outptr_QGenericArgument) + ret := newQGenericArgument(C.QGenericArgument_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -91,10 +84,8 @@ func NewQGenericArgument2(param1 *QGenericArgument) *QGenericArgument { func NewQGenericArgument3(aName string) *QGenericArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericArgument_new3(aName_Cstring, &outptr_QGenericArgument) - ret := newQGenericArgument(outptr_QGenericArgument) + ret := newQGenericArgument(C.QGenericArgument_new3(aName_Cstring)) ret.isSubclass = true return ret } @@ -103,10 +94,8 @@ func NewQGenericArgument3(aName string) *QGenericArgument { func NewQGenericArgument4(aName string, aData unsafe.Pointer) *QGenericArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericArgument_new4(aName_Cstring, aData, &outptr_QGenericArgument) - ret := newQGenericArgument(outptr_QGenericArgument) + ret := newQGenericArgument(C.QGenericArgument_new4(aName_Cstring, aData)) ret.isSubclass = true return ret } @@ -155,42 +144,34 @@ func (this *QGenericReturnArgument) UnsafePointer() unsafe.Pointer { } // newQGenericReturnArgument constructs the type using only CGO pointers. -func newQGenericReturnArgument(h *C.QGenericReturnArgument, h_QGenericArgument *C.QGenericArgument) *QGenericReturnArgument { +func newQGenericReturnArgument(h *C.QGenericReturnArgument) *QGenericReturnArgument { if h == nil { return nil } + var outptr_QGenericArgument *C.QGenericArgument = nil + C.QGenericReturnArgument_virtbase(h, &outptr_QGenericArgument) + return &QGenericReturnArgument{h: h, - QGenericArgument: newQGenericArgument(h_QGenericArgument)} + QGenericArgument: newQGenericArgument(outptr_QGenericArgument)} } // UnsafeNewQGenericReturnArgument constructs the type using only unsafe pointers. -func UnsafeNewQGenericReturnArgument(h unsafe.Pointer, h_QGenericArgument unsafe.Pointer) *QGenericReturnArgument { - if h == nil { - return nil - } - - return &QGenericReturnArgument{h: (*C.QGenericReturnArgument)(h), - QGenericArgument: UnsafeNewQGenericArgument(h_QGenericArgument)} +func UnsafeNewQGenericReturnArgument(h unsafe.Pointer) *QGenericReturnArgument { + return newQGenericReturnArgument((*C.QGenericReturnArgument)(h)) } // NewQGenericReturnArgument constructs a new QGenericReturnArgument object. func NewQGenericReturnArgument() *QGenericReturnArgument { - var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericReturnArgument_new(&outptr_QGenericReturnArgument, &outptr_QGenericArgument) - ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret := newQGenericReturnArgument(C.QGenericReturnArgument_new()) ret.isSubclass = true return ret } // NewQGenericReturnArgument2 constructs a new QGenericReturnArgument object. func NewQGenericReturnArgument2(param1 *QGenericReturnArgument) *QGenericReturnArgument { - var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericReturnArgument_new2(param1.cPointer(), &outptr_QGenericReturnArgument, &outptr_QGenericArgument) - ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret := newQGenericReturnArgument(C.QGenericReturnArgument_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -199,11 +180,8 @@ func NewQGenericReturnArgument2(param1 *QGenericReturnArgument) *QGenericReturnA func NewQGenericReturnArgument3(aName string) *QGenericReturnArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericReturnArgument_new3(aName_Cstring, &outptr_QGenericReturnArgument, &outptr_QGenericArgument) - ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret := newQGenericReturnArgument(C.QGenericReturnArgument_new3(aName_Cstring)) ret.isSubclass = true return ret } @@ -212,11 +190,8 @@ func NewQGenericReturnArgument3(aName string) *QGenericReturnArgument { func NewQGenericReturnArgument4(aName string, aData unsafe.Pointer) *QGenericReturnArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericReturnArgument_new4(aName_Cstring, aData, &outptr_QGenericReturnArgument, &outptr_QGenericArgument) - ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret := newQGenericReturnArgument(C.QGenericReturnArgument_new4(aName_Cstring, aData)) ret.isSubclass = true return ret } @@ -259,34 +234,27 @@ func newQMetaObject(h *C.QMetaObject) *QMetaObject { if h == nil { return nil } + return &QMetaObject{h: h} } // UnsafeNewQMetaObject constructs the type using only unsafe pointers. func UnsafeNewQMetaObject(h unsafe.Pointer) *QMetaObject { - if h == nil { - return nil - } - - return &QMetaObject{h: (*C.QMetaObject)(h)} + return newQMetaObject((*C.QMetaObject)(h)) } // NewQMetaObject constructs a new QMetaObject object. func NewQMetaObject() *QMetaObject { - var outptr_QMetaObject *C.QMetaObject = nil - C.QMetaObject_new(&outptr_QMetaObject) - ret := newQMetaObject(outptr_QMetaObject) + ret := newQMetaObject(C.QMetaObject_new()) ret.isSubclass = true return ret } // NewQMetaObject2 constructs a new QMetaObject object. func NewQMetaObject2(param1 *QMetaObject) *QMetaObject { - var outptr_QMetaObject *C.QMetaObject = nil - C.QMetaObject_new2(param1.cPointer(), &outptr_QMetaObject) - ret := newQMetaObject(outptr_QMetaObject) + ret := newQMetaObject(C.QMetaObject_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -854,34 +822,27 @@ func newQMetaObject__Connection(h *C.QMetaObject__Connection) *QMetaObject__Conn if h == nil { return nil } + return &QMetaObject__Connection{h: h} } // UnsafeNewQMetaObject__Connection constructs the type using only unsafe pointers. func UnsafeNewQMetaObject__Connection(h unsafe.Pointer) *QMetaObject__Connection { - if h == nil { - return nil - } - - return &QMetaObject__Connection{h: (*C.QMetaObject__Connection)(h)} + return newQMetaObject__Connection((*C.QMetaObject__Connection)(h)) } // NewQMetaObject__Connection constructs a new QMetaObject::Connection object. func NewQMetaObject__Connection() *QMetaObject__Connection { - var outptr_QMetaObject__Connection *C.QMetaObject__Connection = nil - C.QMetaObject__Connection_new(&outptr_QMetaObject__Connection) - ret := newQMetaObject__Connection(outptr_QMetaObject__Connection) + ret := newQMetaObject__Connection(C.QMetaObject__Connection_new()) ret.isSubclass = true return ret } // NewQMetaObject__Connection2 constructs a new QMetaObject::Connection object. func NewQMetaObject__Connection2(other *QMetaObject__Connection) *QMetaObject__Connection { - var outptr_QMetaObject__Connection *C.QMetaObject__Connection = nil - C.QMetaObject__Connection_new2(other.cPointer(), &outptr_QMetaObject__Connection) - ret := newQMetaObject__Connection(outptr_QMetaObject__Connection) + ret := newQMetaObject__Connection(C.QMetaObject__Connection_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -928,44 +889,35 @@ func newQMetaObject__SuperData(h *C.QMetaObject__SuperData) *QMetaObject__SuperD if h == nil { return nil } + return &QMetaObject__SuperData{h: h} } // UnsafeNewQMetaObject__SuperData constructs the type using only unsafe pointers. func UnsafeNewQMetaObject__SuperData(h unsafe.Pointer) *QMetaObject__SuperData { - if h == nil { - return nil - } - - return &QMetaObject__SuperData{h: (*C.QMetaObject__SuperData)(h)} + return newQMetaObject__SuperData((*C.QMetaObject__SuperData)(h)) } // NewQMetaObject__SuperData constructs a new QMetaObject::SuperData object. func NewQMetaObject__SuperData() *QMetaObject__SuperData { - var outptr_QMetaObject__SuperData *C.QMetaObject__SuperData = nil - C.QMetaObject__SuperData_new(&outptr_QMetaObject__SuperData) - ret := newQMetaObject__SuperData(outptr_QMetaObject__SuperData) + ret := newQMetaObject__SuperData(C.QMetaObject__SuperData_new()) ret.isSubclass = true return ret } // NewQMetaObject__SuperData2 constructs a new QMetaObject::SuperData object. func NewQMetaObject__SuperData2(mo *QMetaObject) *QMetaObject__SuperData { - var outptr_QMetaObject__SuperData *C.QMetaObject__SuperData = nil - C.QMetaObject__SuperData_new2(mo.cPointer(), &outptr_QMetaObject__SuperData) - ret := newQMetaObject__SuperData(outptr_QMetaObject__SuperData) + ret := newQMetaObject__SuperData(C.QMetaObject__SuperData_new2(mo.cPointer())) ret.isSubclass = true return ret } // NewQMetaObject__SuperData3 constructs a new QMetaObject::SuperData object. func NewQMetaObject__SuperData3(param1 *QMetaObject__SuperData) *QMetaObject__SuperData { - var outptr_QMetaObject__SuperData *C.QMetaObject__SuperData = nil - C.QMetaObject__SuperData_new3(param1.cPointer(), &outptr_QMetaObject__SuperData) - ret := newQMetaObject__SuperData(outptr_QMetaObject__SuperData) + ret := newQMetaObject__SuperData(C.QMetaObject__SuperData_new3(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qobjectdefs.h b/qt/gen_qobjectdefs.h index 373d9e77..ed799493 100644 --- a/qt/gen_qobjectdefs.h +++ b/qt/gen_qobjectdefs.h @@ -46,22 +46,23 @@ typedef struct QMetaProperty QMetaProperty; typedef struct QObject QObject; #endif -void QGenericArgument_new(QGenericArgument** outptr_QGenericArgument); -void QGenericArgument_new2(QGenericArgument* param1, QGenericArgument** outptr_QGenericArgument); -void QGenericArgument_new3(const char* aName, QGenericArgument** outptr_QGenericArgument); -void QGenericArgument_new4(const char* aName, const void* aData, QGenericArgument** outptr_QGenericArgument); +QGenericArgument* QGenericArgument_new(); +QGenericArgument* QGenericArgument_new2(QGenericArgument* param1); +QGenericArgument* QGenericArgument_new3(const char* aName); +QGenericArgument* QGenericArgument_new4(const char* aName, const void* aData); void* QGenericArgument_Data(const QGenericArgument* self); const char* QGenericArgument_Name(const QGenericArgument* self); void QGenericArgument_Delete(QGenericArgument* self, bool isSubclass); -void QGenericReturnArgument_new(QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); -void QGenericReturnArgument_new2(QGenericReturnArgument* param1, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); -void QGenericReturnArgument_new3(const char* aName, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); -void QGenericReturnArgument_new4(const char* aName, void* aData, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); +QGenericReturnArgument* QGenericReturnArgument_new(); +QGenericReturnArgument* QGenericReturnArgument_new2(QGenericReturnArgument* param1); +QGenericReturnArgument* QGenericReturnArgument_new3(const char* aName); +QGenericReturnArgument* QGenericReturnArgument_new4(const char* aName, void* aData); +void QGenericReturnArgument_virtbase(QGenericReturnArgument* src, QGenericArgument** outptr_QGenericArgument); void QGenericReturnArgument_Delete(QGenericReturnArgument* self, bool isSubclass); -void QMetaObject_new(QMetaObject** outptr_QMetaObject); -void QMetaObject_new2(QMetaObject* param1, QMetaObject** outptr_QMetaObject); +QMetaObject* QMetaObject_new(); +QMetaObject* QMetaObject_new2(QMetaObject* param1); const char* QMetaObject_ClassName(const QMetaObject* self); QMetaObject* QMetaObject_SuperClass(const QMetaObject* self); bool QMetaObject_Inherits(const QMetaObject* self, QMetaObject* metaObject); @@ -158,14 +159,14 @@ QObject* QMetaObject_NewInstance9(const QMetaObject* self, QGenericArgument* val QObject* QMetaObject_NewInstance10(const QMetaObject* self, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7, QGenericArgument* val8, QGenericArgument* val9); void QMetaObject_Delete(QMetaObject* self, bool isSubclass); -void QMetaObject__Connection_new(QMetaObject__Connection** outptr_QMetaObject__Connection); -void QMetaObject__Connection_new2(QMetaObject__Connection* other, QMetaObject__Connection** outptr_QMetaObject__Connection); +QMetaObject__Connection* QMetaObject__Connection_new(); +QMetaObject__Connection* QMetaObject__Connection_new2(QMetaObject__Connection* other); void QMetaObject__Connection_OperatorAssign(QMetaObject__Connection* self, QMetaObject__Connection* other); void QMetaObject__Connection_Delete(QMetaObject__Connection* self, bool isSubclass); -void QMetaObject__SuperData_new(QMetaObject__SuperData** outptr_QMetaObject__SuperData); -void QMetaObject__SuperData_new2(QMetaObject* mo, QMetaObject__SuperData** outptr_QMetaObject__SuperData); -void QMetaObject__SuperData_new3(QMetaObject__SuperData* param1, QMetaObject__SuperData** outptr_QMetaObject__SuperData); +QMetaObject__SuperData* QMetaObject__SuperData_new(); +QMetaObject__SuperData* QMetaObject__SuperData_new2(QMetaObject* mo); +QMetaObject__SuperData* QMetaObject__SuperData_new3(QMetaObject__SuperData* param1); QMetaObject* QMetaObject__SuperData_OperatorMinusGreater(const QMetaObject__SuperData* self); void QMetaObject__SuperData_OperatorAssign(QMetaObject__SuperData* self, QMetaObject__SuperData* param1); void QMetaObject__SuperData_Delete(QMetaObject__SuperData* self, bool isSubclass); diff --git a/qt/gen_qoffscreensurface.cpp b/qt/gen_qoffscreensurface.cpp index 9e9632c6..bc046f79 100644 --- a/qt/gen_qoffscreensurface.cpp +++ b/qt/gen_qoffscreensurface.cpp @@ -265,25 +265,21 @@ public: }; -void QOffscreenSurface_new(QScreen* screen, QObject* parent, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface) { - MiqtVirtualQOffscreenSurface* ret = new MiqtVirtualQOffscreenSurface(screen, parent); - *outptr_QOffscreenSurface = ret; - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); +QOffscreenSurface* QOffscreenSurface_new(QScreen* screen, QObject* parent) { + return new MiqtVirtualQOffscreenSurface(screen, parent); } -void QOffscreenSurface_new2(QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface) { - MiqtVirtualQOffscreenSurface* ret = new MiqtVirtualQOffscreenSurface(); - *outptr_QOffscreenSurface = ret; - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); +QOffscreenSurface* QOffscreenSurface_new2() { + return new MiqtVirtualQOffscreenSurface(); } -void QOffscreenSurface_new3(QScreen* screen, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface) { - MiqtVirtualQOffscreenSurface* ret = new MiqtVirtualQOffscreenSurface(screen); - *outptr_QOffscreenSurface = ret; - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); +QOffscreenSurface* QOffscreenSurface_new3(QScreen* screen) { + return new MiqtVirtualQOffscreenSurface(screen); +} + +void QOffscreenSurface_virtbase(QOffscreenSurface* src, QObject** outptr_QObject, QSurface** outptr_QSurface) { + *outptr_QObject = static_cast(src); + *outptr_QSurface = static_cast(src); } QMetaObject* QOffscreenSurface_MetaObject(const QOffscreenSurface* self) { diff --git a/qt/gen_qoffscreensurface.go b/qt/gen_qoffscreensurface.go index 3e1761d3..2bb018fe 100644 --- a/qt/gen_qoffscreensurface.go +++ b/qt/gen_qoffscreensurface.go @@ -36,58 +36,44 @@ func (this *QOffscreenSurface) UnsafePointer() unsafe.Pointer { } // newQOffscreenSurface constructs the type using only CGO pointers. -func newQOffscreenSurface(h *C.QOffscreenSurface, h_QObject *C.QObject, h_QSurface *C.QSurface) *QOffscreenSurface { +func newQOffscreenSurface(h *C.QOffscreenSurface) *QOffscreenSurface { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + C.QOffscreenSurface_virtbase(h, &outptr_QObject, &outptr_QSurface) + return &QOffscreenSurface{h: h, - QObject: newQObject(h_QObject), - QSurface: newQSurface(h_QSurface)} + QObject: newQObject(outptr_QObject), + QSurface: newQSurface(outptr_QSurface)} } // UnsafeNewQOffscreenSurface constructs the type using only unsafe pointers. -func UnsafeNewQOffscreenSurface(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer) *QOffscreenSurface { - if h == nil { - return nil - } - - return &QOffscreenSurface{h: (*C.QOffscreenSurface)(h), - QObject: UnsafeNewQObject(h_QObject), - QSurface: UnsafeNewQSurface(h_QSurface)} +func UnsafeNewQOffscreenSurface(h unsafe.Pointer) *QOffscreenSurface { + return newQOffscreenSurface((*C.QOffscreenSurface)(h)) } // NewQOffscreenSurface constructs a new QOffscreenSurface object. func NewQOffscreenSurface(screen *QScreen, parent *QObject) *QOffscreenSurface { - var outptr_QOffscreenSurface *C.QOffscreenSurface = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - C.QOffscreenSurface_new(screen.cPointer(), parent.cPointer(), &outptr_QOffscreenSurface, &outptr_QObject, &outptr_QSurface) - ret := newQOffscreenSurface(outptr_QOffscreenSurface, outptr_QObject, outptr_QSurface) + ret := newQOffscreenSurface(C.QOffscreenSurface_new(screen.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQOffscreenSurface2 constructs a new QOffscreenSurface object. func NewQOffscreenSurface2() *QOffscreenSurface { - var outptr_QOffscreenSurface *C.QOffscreenSurface = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - C.QOffscreenSurface_new2(&outptr_QOffscreenSurface, &outptr_QObject, &outptr_QSurface) - ret := newQOffscreenSurface(outptr_QOffscreenSurface, outptr_QObject, outptr_QSurface) + ret := newQOffscreenSurface(C.QOffscreenSurface_new2()) ret.isSubclass = true return ret } // NewQOffscreenSurface3 constructs a new QOffscreenSurface object. func NewQOffscreenSurface3(screen *QScreen) *QOffscreenSurface { - var outptr_QOffscreenSurface *C.QOffscreenSurface = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - C.QOffscreenSurface_new3(screen.cPointer(), &outptr_QOffscreenSurface, &outptr_QObject, &outptr_QSurface) - ret := newQOffscreenSurface(outptr_QOffscreenSurface, outptr_QObject, outptr_QSurface) + ret := newQOffscreenSurface(C.QOffscreenSurface_new3(screen.cPointer())) ret.isSubclass = true return ret } @@ -159,7 +145,7 @@ func (this *QOffscreenSurface) Size() *QSize { } func (this *QOffscreenSurface) Screen() *QScreen { - return newQScreen(C.QOffscreenSurface_Screen(this.h), nil) + return newQScreen(C.QOffscreenSurface_Screen(this.h)) } func (this *QOffscreenSurface) SetScreen(screen *QScreen) { @@ -189,7 +175,7 @@ func miqt_exec_callback_QOffscreenSurface_ScreenChanged(cb C.intptr_t, screen *C } // Convert all CABI parameters to Go parameters - slotval1 := newQScreen(screen, nil) + slotval1 := newQScreen(screen) gofunc(slotval1) } @@ -395,7 +381,7 @@ func miqt_exec_callback_QOffscreenSurface_TimerEvent(self *C.QOffscreenSurface, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QOffscreenSurface{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -421,7 +407,7 @@ func miqt_exec_callback_QOffscreenSurface_ChildEvent(self *C.QOffscreenSurface, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QOffscreenSurface{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qoffscreensurface.h b/qt/gen_qoffscreensurface.h index 67f80b16..48184093 100644 --- a/qt/gen_qoffscreensurface.h +++ b/qt/gen_qoffscreensurface.h @@ -40,9 +40,10 @@ typedef struct QSurfaceFormat QSurfaceFormat; typedef struct QTimerEvent QTimerEvent; #endif -void QOffscreenSurface_new(QScreen* screen, QObject* parent, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface); -void QOffscreenSurface_new2(QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface); -void QOffscreenSurface_new3(QScreen* screen, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface); +QOffscreenSurface* QOffscreenSurface_new(QScreen* screen, QObject* parent); +QOffscreenSurface* QOffscreenSurface_new2(); +QOffscreenSurface* QOffscreenSurface_new3(QScreen* screen); +void QOffscreenSurface_virtbase(QOffscreenSurface* src, QObject** outptr_QObject, QSurface** outptr_QSurface); QMetaObject* QOffscreenSurface_MetaObject(const QOffscreenSurface* self); void* QOffscreenSurface_Metacast(QOffscreenSurface* self, const char* param1); struct miqt_string QOffscreenSurface_Tr(const char* s); diff --git a/qt/gen_qoperatingsystemversion.cpp b/qt/gen_qoperatingsystemversion.cpp index f06542fd..5a65915d 100644 --- a/qt/gen_qoperatingsystemversion.cpp +++ b/qt/gen_qoperatingsystemversion.cpp @@ -6,19 +6,16 @@ #include "gen_qoperatingsystemversion.h" #include "_cgo_export.h" -void QOperatingSystemVersion_new(int osType, int vmajor, QOperatingSystemVersion** outptr_QOperatingSystemVersion) { - QOperatingSystemVersion* ret = new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor)); - *outptr_QOperatingSystemVersion = ret; +QOperatingSystemVersion* QOperatingSystemVersion_new(int osType, int vmajor) { + return new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor)); } -void QOperatingSystemVersion_new2(int osType, int vmajor, int vminor, QOperatingSystemVersion** outptr_QOperatingSystemVersion) { - QOperatingSystemVersion* ret = new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor)); - *outptr_QOperatingSystemVersion = ret; +QOperatingSystemVersion* QOperatingSystemVersion_new2(int osType, int vmajor, int vminor) { + return new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor)); } -void QOperatingSystemVersion_new3(int osType, int vmajor, int vminor, int vmicro, QOperatingSystemVersion** outptr_QOperatingSystemVersion) { - QOperatingSystemVersion* ret = new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor), static_cast(vmicro)); - *outptr_QOperatingSystemVersion = ret; +QOperatingSystemVersion* QOperatingSystemVersion_new3(int osType, int vmajor, int vminor, int vmicro) { + return new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor), static_cast(vmicro)); } QOperatingSystemVersion* QOperatingSystemVersion_Current() { diff --git a/qt/gen_qoperatingsystemversion.go b/qt/gen_qoperatingsystemversion.go index 95435202..cc83cd66 100644 --- a/qt/gen_qoperatingsystemversion.go +++ b/qt/gen_qoperatingsystemversion.go @@ -49,44 +49,35 @@ func newQOperatingSystemVersion(h *C.QOperatingSystemVersion) *QOperatingSystemV if h == nil { return nil } + return &QOperatingSystemVersion{h: h} } // UnsafeNewQOperatingSystemVersion constructs the type using only unsafe pointers. func UnsafeNewQOperatingSystemVersion(h unsafe.Pointer) *QOperatingSystemVersion { - if h == nil { - return nil - } - - return &QOperatingSystemVersion{h: (*C.QOperatingSystemVersion)(h)} + return newQOperatingSystemVersion((*C.QOperatingSystemVersion)(h)) } // NewQOperatingSystemVersion constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion(osType QOperatingSystemVersion__OSType, vmajor int) *QOperatingSystemVersion { - var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil - C.QOperatingSystemVersion_new((C.int)(osType), (C.int)(vmajor), &outptr_QOperatingSystemVersion) - ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion) + ret := newQOperatingSystemVersion(C.QOperatingSystemVersion_new((C.int)(osType), (C.int)(vmajor))) ret.isSubclass = true return ret } // NewQOperatingSystemVersion2 constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion2(osType QOperatingSystemVersion__OSType, vmajor int, vminor int) *QOperatingSystemVersion { - var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil - C.QOperatingSystemVersion_new2((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), &outptr_QOperatingSystemVersion) - ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion) + ret := newQOperatingSystemVersion(C.QOperatingSystemVersion_new2((C.int)(osType), (C.int)(vmajor), (C.int)(vminor))) ret.isSubclass = true return ret } // NewQOperatingSystemVersion3 constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion3(osType QOperatingSystemVersion__OSType, vmajor int, vminor int, vmicro int) *QOperatingSystemVersion { - var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil - C.QOperatingSystemVersion_new3((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), (C.int)(vmicro), &outptr_QOperatingSystemVersion) - ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion) + ret := newQOperatingSystemVersion(C.QOperatingSystemVersion_new3((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), (C.int)(vmicro))) ret.isSubclass = true return ret } diff --git a/qt/gen_qoperatingsystemversion.h b/qt/gen_qoperatingsystemversion.h index ebeebd3f..8a58240e 100644 --- a/qt/gen_qoperatingsystemversion.h +++ b/qt/gen_qoperatingsystemversion.h @@ -20,9 +20,9 @@ class QOperatingSystemVersion; typedef struct QOperatingSystemVersion QOperatingSystemVersion; #endif -void QOperatingSystemVersion_new(int osType, int vmajor, QOperatingSystemVersion** outptr_QOperatingSystemVersion); -void QOperatingSystemVersion_new2(int osType, int vmajor, int vminor, QOperatingSystemVersion** outptr_QOperatingSystemVersion); -void QOperatingSystemVersion_new3(int osType, int vmajor, int vminor, int vmicro, QOperatingSystemVersion** outptr_QOperatingSystemVersion); +QOperatingSystemVersion* QOperatingSystemVersion_new(int osType, int vmajor); +QOperatingSystemVersion* QOperatingSystemVersion_new2(int osType, int vmajor, int vminor); +QOperatingSystemVersion* QOperatingSystemVersion_new3(int osType, int vmajor, int vminor, int vmicro); QOperatingSystemVersion* QOperatingSystemVersion_Current(); int QOperatingSystemVersion_CurrentType(); int QOperatingSystemVersion_MajorVersion(const QOperatingSystemVersion* self); diff --git a/qt/gen_qpagedpaintdevice.cpp b/qt/gen_qpagedpaintdevice.cpp index 12b13edb..c8f834d1 100644 --- a/qt/gen_qpagedpaintdevice.cpp +++ b/qt/gen_qpagedpaintdevice.cpp @@ -243,10 +243,12 @@ public: }; -void QPagedPaintDevice_new(QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPagedPaintDevice* ret = new MiqtVirtualQPagedPaintDevice(); - *outptr_QPagedPaintDevice = ret; - *outptr_QPaintDevice = static_cast(ret); +QPagedPaintDevice* QPagedPaintDevice_new() { + return new MiqtVirtualQPagedPaintDevice(); +} + +void QPagedPaintDevice_virtbase(QPagedPaintDevice* src, QPaintDevice** outptr_QPaintDevice) { + *outptr_QPaintDevice = static_cast(src); } bool QPagedPaintDevice_NewPage(QPagedPaintDevice* self) { diff --git a/qt/gen_qpagedpaintdevice.go b/qt/gen_qpagedpaintdevice.go index 896d4d62..e70022a7 100644 --- a/qt/gen_qpagedpaintdevice.go +++ b/qt/gen_qpagedpaintdevice.go @@ -175,31 +175,26 @@ func (this *QPagedPaintDevice) UnsafePointer() unsafe.Pointer { } // newQPagedPaintDevice constructs the type using only CGO pointers. -func newQPagedPaintDevice(h *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QPagedPaintDevice { +func newQPagedPaintDevice(h *C.QPagedPaintDevice) *QPagedPaintDevice { if h == nil { return nil } + var outptr_QPaintDevice *C.QPaintDevice = nil + C.QPagedPaintDevice_virtbase(h, &outptr_QPaintDevice) + return &QPagedPaintDevice{h: h, - QPaintDevice: newQPaintDevice(h_QPaintDevice)} + QPaintDevice: newQPaintDevice(outptr_QPaintDevice)} } // UnsafeNewQPagedPaintDevice constructs the type using only unsafe pointers. -func UnsafeNewQPagedPaintDevice(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPagedPaintDevice { - if h == nil { - return nil - } - - return &QPagedPaintDevice{h: (*C.QPagedPaintDevice)(h), - QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} +func UnsafeNewQPagedPaintDevice(h unsafe.Pointer) *QPagedPaintDevice { + return newQPagedPaintDevice((*C.QPagedPaintDevice)(h)) } // NewQPagedPaintDevice constructs a new QPagedPaintDevice object. func NewQPagedPaintDevice() *QPagedPaintDevice { - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPagedPaintDevice_new(&outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQPagedPaintDevice(outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQPagedPaintDevice(C.QPagedPaintDevice_new()) ret.isSubclass = true return ret } @@ -548,16 +543,13 @@ func newQPagedPaintDevice__Margins(h *C.QPagedPaintDevice__Margins) *QPagedPaint if h == nil { return nil } + return &QPagedPaintDevice__Margins{h: h} } // UnsafeNewQPagedPaintDevice__Margins constructs the type using only unsafe pointers. func UnsafeNewQPagedPaintDevice__Margins(h unsafe.Pointer) *QPagedPaintDevice__Margins { - if h == nil { - return nil - } - - return &QPagedPaintDevice__Margins{h: (*C.QPagedPaintDevice__Margins)(h)} + return newQPagedPaintDevice__Margins((*C.QPagedPaintDevice__Margins)(h)) } // Delete this object from C++ memory. diff --git a/qt/gen_qpagedpaintdevice.h b/qt/gen_qpagedpaintdevice.h index 8a07b28b..878fb24c 100644 --- a/qt/gen_qpagedpaintdevice.h +++ b/qt/gen_qpagedpaintdevice.h @@ -42,7 +42,8 @@ typedef struct QPoint QPoint; typedef struct QSizeF QSizeF; #endif -void QPagedPaintDevice_new(QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +QPagedPaintDevice* QPagedPaintDevice_new(); +void QPagedPaintDevice_virtbase(QPagedPaintDevice* src, QPaintDevice** outptr_QPaintDevice); bool QPagedPaintDevice_NewPage(QPagedPaintDevice* self); bool QPagedPaintDevice_SetPageLayout(QPagedPaintDevice* self, QPageLayout* pageLayout); bool QPagedPaintDevice_SetPageSize(QPagedPaintDevice* self, QPageSize* pageSize); diff --git a/qt/gen_qpagelayout.cpp b/qt/gen_qpagelayout.cpp index aafdbcb3..f2a4761a 100644 --- a/qt/gen_qpagelayout.cpp +++ b/qt/gen_qpagelayout.cpp @@ -8,29 +8,24 @@ #include "gen_qpagelayout.h" #include "_cgo_export.h" -void QPageLayout_new(QPageLayout** outptr_QPageLayout) { - QPageLayout* ret = new QPageLayout(); - *outptr_QPageLayout = ret; +QPageLayout* QPageLayout_new() { + return new QPageLayout(); } -void QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins, QPageLayout** outptr_QPageLayout) { - QPageLayout* ret = new QPageLayout(*pageSize, static_cast(orientation), *margins); - *outptr_QPageLayout = ret; +QPageLayout* QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins) { + return new QPageLayout(*pageSize, static_cast(orientation), *margins); } -void QPageLayout_new3(QPageLayout* other, QPageLayout** outptr_QPageLayout) { - QPageLayout* ret = new QPageLayout(*other); - *outptr_QPageLayout = ret; +QPageLayout* QPageLayout_new3(QPageLayout* other) { + return new QPageLayout(*other); } -void QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QPageLayout** outptr_QPageLayout) { - QPageLayout* ret = new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units)); - *outptr_QPageLayout = ret; +QPageLayout* QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units) { + return new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units)); } -void QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins, QPageLayout** outptr_QPageLayout) { - QPageLayout* ret = new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units), *minMargins); - *outptr_QPageLayout = ret; +QPageLayout* QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins) { + return new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units), *minMargins); } void QPageLayout_OperatorAssign(QPageLayout* self, QPageLayout* other) { diff --git a/qt/gen_qpagelayout.go b/qt/gen_qpagelayout.go index 55e6e9b0..7ee3657e 100644 --- a/qt/gen_qpagelayout.go +++ b/qt/gen_qpagelayout.go @@ -62,64 +62,51 @@ func newQPageLayout(h *C.QPageLayout) *QPageLayout { if h == nil { return nil } + return &QPageLayout{h: h} } // UnsafeNewQPageLayout constructs the type using only unsafe pointers. func UnsafeNewQPageLayout(h unsafe.Pointer) *QPageLayout { - if h == nil { - return nil - } - - return &QPageLayout{h: (*C.QPageLayout)(h)} + return newQPageLayout((*C.QPageLayout)(h)) } // NewQPageLayout constructs a new QPageLayout object. func NewQPageLayout() *QPageLayout { - var outptr_QPageLayout *C.QPageLayout = nil - C.QPageLayout_new(&outptr_QPageLayout) - ret := newQPageLayout(outptr_QPageLayout) + ret := newQPageLayout(C.QPageLayout_new()) ret.isSubclass = true return ret } // NewQPageLayout2 constructs a new QPageLayout object. func NewQPageLayout2(pageSize *QPageSize, orientation QPageLayout__Orientation, margins *QMarginsF) *QPageLayout { - var outptr_QPageLayout *C.QPageLayout = nil - C.QPageLayout_new2(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), &outptr_QPageLayout) - ret := newQPageLayout(outptr_QPageLayout) + ret := newQPageLayout(C.QPageLayout_new2(pageSize.cPointer(), (C.int)(orientation), margins.cPointer())) ret.isSubclass = true return ret } // NewQPageLayout3 constructs a new QPageLayout object. func NewQPageLayout3(other *QPageLayout) *QPageLayout { - var outptr_QPageLayout *C.QPageLayout = nil - C.QPageLayout_new3(other.cPointer(), &outptr_QPageLayout) - ret := newQPageLayout(outptr_QPageLayout) + ret := newQPageLayout(C.QPageLayout_new3(other.cPointer())) ret.isSubclass = true return ret } // NewQPageLayout4 constructs a new QPageLayout object. func NewQPageLayout4(pageSize *QPageSize, orientation QPageLayout__Orientation, margins *QMarginsF, units QPageLayout__Unit) *QPageLayout { - var outptr_QPageLayout *C.QPageLayout = nil - C.QPageLayout_new4(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units), &outptr_QPageLayout) - ret := newQPageLayout(outptr_QPageLayout) + ret := newQPageLayout(C.QPageLayout_new4(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units))) ret.isSubclass = true return ret } // NewQPageLayout5 constructs a new QPageLayout object. func NewQPageLayout5(pageSize *QPageSize, orientation QPageLayout__Orientation, margins *QMarginsF, units QPageLayout__Unit, minMargins *QMarginsF) *QPageLayout { - var outptr_QPageLayout *C.QPageLayout = nil - C.QPageLayout_new5(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units), minMargins.cPointer(), &outptr_QPageLayout) - ret := newQPageLayout(outptr_QPageLayout) + ret := newQPageLayout(C.QPageLayout_new5(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units), minMargins.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qpagelayout.h b/qt/gen_qpagelayout.h index c00ec4b2..fd9b5f3e 100644 --- a/qt/gen_qpagelayout.h +++ b/qt/gen_qpagelayout.h @@ -30,11 +30,11 @@ typedef struct QRect QRect; typedef struct QRectF QRectF; #endif -void QPageLayout_new(QPageLayout** outptr_QPageLayout); -void QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins, QPageLayout** outptr_QPageLayout); -void QPageLayout_new3(QPageLayout* other, QPageLayout** outptr_QPageLayout); -void QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QPageLayout** outptr_QPageLayout); -void QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins, QPageLayout** outptr_QPageLayout); +QPageLayout* QPageLayout_new(); +QPageLayout* QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins); +QPageLayout* QPageLayout_new3(QPageLayout* other); +QPageLayout* QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units); +QPageLayout* QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins); void QPageLayout_OperatorAssign(QPageLayout* self, QPageLayout* other); void QPageLayout_Swap(QPageLayout* self, QPageLayout* other); bool QPageLayout_IsEquivalentTo(const QPageLayout* self, QPageLayout* other); diff --git a/qt/gen_qpagesize.cpp b/qt/gen_qpagesize.cpp index f7121d1f..6f51efce 100644 --- a/qt/gen_qpagesize.cpp +++ b/qt/gen_qpagesize.cpp @@ -10,53 +10,44 @@ #include "gen_qpagesize.h" #include "_cgo_export.h" -void QPageSize_new(QPageSize** outptr_QPageSize) { - QPageSize* ret = new QPageSize(); - *outptr_QPageSize = ret; +QPageSize* QPageSize_new() { + return new QPageSize(); } -void QPageSize_new2(int pageSizeId, QPageSize** outptr_QPageSize) { - QPageSize* ret = new QPageSize(static_cast(pageSizeId)); - *outptr_QPageSize = ret; +QPageSize* QPageSize_new2(int pageSizeId) { + return new QPageSize(static_cast(pageSizeId)); } -void QPageSize_new3(QSize* pointSize, QPageSize** outptr_QPageSize) { - QPageSize* ret = new QPageSize(*pointSize); - *outptr_QPageSize = ret; +QPageSize* QPageSize_new3(QSize* pointSize) { + return new QPageSize(*pointSize); } -void QPageSize_new4(QSizeF* size, int units, QPageSize** outptr_QPageSize) { - QPageSize* ret = new QPageSize(*size, static_cast(units)); - *outptr_QPageSize = ret; +QPageSize* QPageSize_new4(QSizeF* size, int units) { + return new QPageSize(*size, static_cast(units)); } -void QPageSize_new5(QPageSize* other, QPageSize** outptr_QPageSize) { - QPageSize* ret = new QPageSize(*other); - *outptr_QPageSize = ret; +QPageSize* QPageSize_new5(QPageSize* other) { + return new QPageSize(*other); } -void QPageSize_new6(QSize* pointSize, struct miqt_string name, QPageSize** outptr_QPageSize) { +QPageSize* QPageSize_new6(QSize* pointSize, struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - QPageSize* ret = new QPageSize(*pointSize, name_QString); - *outptr_QPageSize = ret; + return new QPageSize(*pointSize, name_QString); } -void QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize) { +QPageSize* QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy) { QString name_QString = QString::fromUtf8(name.data, name.len); - QPageSize* ret = new QPageSize(*pointSize, name_QString, static_cast(matchPolicy)); - *outptr_QPageSize = ret; + return new QPageSize(*pointSize, name_QString, static_cast(matchPolicy)); } -void QPageSize_new8(QSizeF* size, int units, struct miqt_string name, QPageSize** outptr_QPageSize) { +QPageSize* QPageSize_new8(QSizeF* size, int units, struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - QPageSize* ret = new QPageSize(*size, static_cast(units), name_QString); - *outptr_QPageSize = ret; + return new QPageSize(*size, static_cast(units), name_QString); } -void QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize) { +QPageSize* QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy) { QString name_QString = QString::fromUtf8(name.data, name.len); - QPageSize* ret = new QPageSize(*size, static_cast(units), name_QString, static_cast(matchPolicy)); - *outptr_QPageSize = ret; + return new QPageSize(*size, static_cast(units), name_QString, static_cast(matchPolicy)); } void QPageSize_OperatorAssign(QPageSize* self, QPageSize* other) { diff --git a/qt/gen_qpagesize.go b/qt/gen_qpagesize.go index a6ee4cfd..6ecf8263 100644 --- a/qt/gen_qpagesize.go +++ b/qt/gen_qpagesize.go @@ -188,64 +188,51 @@ func newQPageSize(h *C.QPageSize) *QPageSize { if h == nil { return nil } + return &QPageSize{h: h} } // UnsafeNewQPageSize constructs the type using only unsafe pointers. func UnsafeNewQPageSize(h unsafe.Pointer) *QPageSize { - if h == nil { - return nil - } - - return &QPageSize{h: (*C.QPageSize)(h)} + return newQPageSize((*C.QPageSize)(h)) } // NewQPageSize constructs a new QPageSize object. func NewQPageSize() *QPageSize { - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new(&outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new()) ret.isSubclass = true return ret } // NewQPageSize2 constructs a new QPageSize object. func NewQPageSize2(pageSizeId QPageSize__PageSizeId) *QPageSize { - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new2((C.int)(pageSizeId), &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new2((C.int)(pageSizeId))) ret.isSubclass = true return ret } // NewQPageSize3 constructs a new QPageSize object. func NewQPageSize3(pointSize *QSize) *QPageSize { - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new3(pointSize.cPointer(), &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new3(pointSize.cPointer())) ret.isSubclass = true return ret } // NewQPageSize4 constructs a new QPageSize object. func NewQPageSize4(size *QSizeF, units QPageSize__Unit) *QPageSize { - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new4(size.cPointer(), (C.int)(units), &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new4(size.cPointer(), (C.int)(units))) ret.isSubclass = true return ret } // NewQPageSize5 constructs a new QPageSize object. func NewQPageSize5(other *QPageSize) *QPageSize { - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new5(other.cPointer(), &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new5(other.cPointer())) ret.isSubclass = true return ret } @@ -256,10 +243,8 @@ func NewQPageSize6(pointSize *QSize, name string) *QPageSize { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new6(pointSize.cPointer(), name_ms, &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new6(pointSize.cPointer(), name_ms)) ret.isSubclass = true return ret } @@ -270,10 +255,8 @@ func NewQPageSize7(pointSize *QSize, name string, matchPolicy QPageSize__SizeMat name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new7(pointSize.cPointer(), name_ms, (C.int)(matchPolicy), &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new7(pointSize.cPointer(), name_ms, (C.int)(matchPolicy))) ret.isSubclass = true return ret } @@ -284,10 +267,8 @@ func NewQPageSize8(size *QSizeF, units QPageSize__Unit, name string) *QPageSize name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new8(size.cPointer(), (C.int)(units), name_ms, &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new8(size.cPointer(), (C.int)(units), name_ms)) ret.isSubclass = true return ret } @@ -298,10 +279,8 @@ func NewQPageSize9(size *QSizeF, units QPageSize__Unit, name string, matchPolicy name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new9(size.cPointer(), (C.int)(units), name_ms, (C.int)(matchPolicy), &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new9(size.cPointer(), (C.int)(units), name_ms, (C.int)(matchPolicy))) ret.isSubclass = true return ret } diff --git a/qt/gen_qpagesize.h b/qt/gen_qpagesize.h index 07a07263..75d9a3d0 100644 --- a/qt/gen_qpagesize.h +++ b/qt/gen_qpagesize.h @@ -28,15 +28,15 @@ typedef struct QSize QSize; typedef struct QSizeF QSizeF; #endif -void QPageSize_new(QPageSize** outptr_QPageSize); -void QPageSize_new2(int pageSizeId, QPageSize** outptr_QPageSize); -void QPageSize_new3(QSize* pointSize, QPageSize** outptr_QPageSize); -void QPageSize_new4(QSizeF* size, int units, QPageSize** outptr_QPageSize); -void QPageSize_new5(QPageSize* other, QPageSize** outptr_QPageSize); -void QPageSize_new6(QSize* pointSize, struct miqt_string name, QPageSize** outptr_QPageSize); -void QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize); -void QPageSize_new8(QSizeF* size, int units, struct miqt_string name, QPageSize** outptr_QPageSize); -void QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize); +QPageSize* QPageSize_new(); +QPageSize* QPageSize_new2(int pageSizeId); +QPageSize* QPageSize_new3(QSize* pointSize); +QPageSize* QPageSize_new4(QSizeF* size, int units); +QPageSize* QPageSize_new5(QPageSize* other); +QPageSize* QPageSize_new6(QSize* pointSize, struct miqt_string name); +QPageSize* QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy); +QPageSize* QPageSize_new8(QSizeF* size, int units, struct miqt_string name); +QPageSize* QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy); void QPageSize_OperatorAssign(QPageSize* self, QPageSize* other); void QPageSize_Swap(QPageSize* self, QPageSize* other); bool QPageSize_IsEquivalentTo(const QPageSize* self, QPageSize* other); diff --git a/qt/gen_qpaintdevice.go b/qt/gen_qpaintdevice.go index 9804275d..54841057 100644 --- a/qt/gen_qpaintdevice.go +++ b/qt/gen_qpaintdevice.go @@ -54,16 +54,13 @@ func newQPaintDevice(h *C.QPaintDevice) *QPaintDevice { if h == nil { return nil } + return &QPaintDevice{h: h} } // UnsafeNewQPaintDevice constructs the type using only unsafe pointers. func UnsafeNewQPaintDevice(h unsafe.Pointer) *QPaintDevice { - if h == nil { - return nil - } - - return &QPaintDevice{h: (*C.QPaintDevice)(h)} + return newQPaintDevice((*C.QPaintDevice)(h)) } func (this *QPaintDevice) DevType() int { diff --git a/qt/gen_qpaintdevicewindow.cpp b/qt/gen_qpaintdevicewindow.cpp index e77c0838..44406140 100644 --- a/qt/gen_qpaintdevicewindow.cpp +++ b/qt/gen_qpaintdevicewindow.cpp @@ -16,6 +16,11 @@ #include "gen_qpaintdevicewindow.h" #include "_cgo_export.h" +void QPaintDeviceWindow_virtbase(QPaintDeviceWindow* src, QWindow** outptr_QWindow, QPaintDevice** outptr_QPaintDevice) { + *outptr_QWindow = static_cast(src); + *outptr_QPaintDevice = static_cast(src); +} + QMetaObject* QPaintDeviceWindow_MetaObject(const QPaintDeviceWindow* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/gen_qpaintdevicewindow.go b/qt/gen_qpaintdevicewindow.go index 1720a7fc..d27f516a 100644 --- a/qt/gen_qpaintdevicewindow.go +++ b/qt/gen_qpaintdevicewindow.go @@ -35,24 +35,22 @@ func (this *QPaintDeviceWindow) UnsafePointer() unsafe.Pointer { } // newQPaintDeviceWindow constructs the type using only CGO pointers. -func newQPaintDeviceWindow(h *C.QPaintDeviceWindow, h_QWindow *C.QWindow, h_QObject *C.QObject, h_QSurface *C.QSurface, h_QPaintDevice *C.QPaintDevice) *QPaintDeviceWindow { +func newQPaintDeviceWindow(h *C.QPaintDeviceWindow) *QPaintDeviceWindow { if h == nil { return nil } + var outptr_QWindow *C.QWindow = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + C.QPaintDeviceWindow_virtbase(h, &outptr_QWindow, &outptr_QPaintDevice) + return &QPaintDeviceWindow{h: h, - QWindow: newQWindow(h_QWindow, h_QObject, h_QSurface), - QPaintDevice: newQPaintDevice(h_QPaintDevice)} + QWindow: newQWindow(outptr_QWindow), + QPaintDevice: newQPaintDevice(outptr_QPaintDevice)} } // UnsafeNewQPaintDeviceWindow constructs the type using only unsafe pointers. -func UnsafeNewQPaintDeviceWindow(h unsafe.Pointer, h_QWindow unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPaintDeviceWindow { - if h == nil { - return nil - } - - return &QPaintDeviceWindow{h: (*C.QPaintDeviceWindow)(h), - QWindow: UnsafeNewQWindow(h_QWindow, h_QObject, h_QSurface), - QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} +func UnsafeNewQPaintDeviceWindow(h unsafe.Pointer) *QPaintDeviceWindow { + return newQPaintDeviceWindow((*C.QPaintDeviceWindow)(h)) } func (this *QPaintDeviceWindow) MetaObject() *QMetaObject { diff --git a/qt/gen_qpaintdevicewindow.h b/qt/gen_qpaintdevicewindow.h index 852e95f1..03e165f5 100644 --- a/qt/gen_qpaintdevicewindow.h +++ b/qt/gen_qpaintdevicewindow.h @@ -40,6 +40,7 @@ typedef struct QSurface QSurface; typedef struct QWindow QWindow; #endif +void QPaintDeviceWindow_virtbase(QPaintDeviceWindow* src, QWindow** outptr_QWindow, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPaintDeviceWindow_MetaObject(const QPaintDeviceWindow* self); void* QPaintDeviceWindow_Metacast(QPaintDeviceWindow* self, const char* param1); struct miqt_string QPaintDeviceWindow_Tr(const char* s); diff --git a/qt/gen_qpaintengine.cpp b/qt/gen_qpaintengine.cpp index a724f6c0..9e1cd26d 100644 --- a/qt/gen_qpaintengine.cpp +++ b/qt/gen_qpaintengine.cpp @@ -565,14 +565,12 @@ public: }; -void QPaintEngine_new(QPaintEngine** outptr_QPaintEngine) { - MiqtVirtualQPaintEngine* ret = new MiqtVirtualQPaintEngine(); - *outptr_QPaintEngine = ret; +QPaintEngine* QPaintEngine_new() { + return new MiqtVirtualQPaintEngine(); } -void QPaintEngine_new2(int features, QPaintEngine** outptr_QPaintEngine) { - MiqtVirtualQPaintEngine* ret = new MiqtVirtualQPaintEngine(static_cast(features)); - *outptr_QPaintEngine = ret; +QPaintEngine* QPaintEngine_new2(int features) { + return new MiqtVirtualQPaintEngine(static_cast(features)); } bool QPaintEngine_IsActive(const QPaintEngine* self) { diff --git a/qt/gen_qpaintengine.go b/qt/gen_qpaintengine.go index 1bf164d4..d53d37f1 100644 --- a/qt/gen_qpaintengine.go +++ b/qt/gen_qpaintengine.go @@ -126,16 +126,13 @@ func newQTextItem(h *C.QTextItem) *QTextItem { if h == nil { return nil } + return &QTextItem{h: h} } // UnsafeNewQTextItem constructs the type using only unsafe pointers. func UnsafeNewQTextItem(h unsafe.Pointer) *QTextItem { - if h == nil { - return nil - } - - return &QTextItem{h: (*C.QTextItem)(h)} + return newQTextItem((*C.QTextItem)(h)) } func (this *QTextItem) Descent() float64 { @@ -205,34 +202,27 @@ func newQPaintEngine(h *C.QPaintEngine) *QPaintEngine { if h == nil { return nil } + return &QPaintEngine{h: h} } // UnsafeNewQPaintEngine constructs the type using only unsafe pointers. func UnsafeNewQPaintEngine(h unsafe.Pointer) *QPaintEngine { - if h == nil { - return nil - } - - return &QPaintEngine{h: (*C.QPaintEngine)(h)} + return newQPaintEngine((*C.QPaintEngine)(h)) } // NewQPaintEngine constructs a new QPaintEngine object. func NewQPaintEngine() *QPaintEngine { - var outptr_QPaintEngine *C.QPaintEngine = nil - C.QPaintEngine_new(&outptr_QPaintEngine) - ret := newQPaintEngine(outptr_QPaintEngine) + ret := newQPaintEngine(C.QPaintEngine_new()) ret.isSubclass = true return ret } // NewQPaintEngine2 constructs a new QPaintEngine object. func NewQPaintEngine2(features QPaintEngine__PaintEngineFeature) *QPaintEngine { - var outptr_QPaintEngine *C.QPaintEngine = nil - C.QPaintEngine_new2((C.int)(features), &outptr_QPaintEngine) - ret := newQPaintEngine(outptr_QPaintEngine) + ret := newQPaintEngine(C.QPaintEngine_new2((C.int)(features))) ret.isSubclass = true return ret } @@ -770,7 +760,7 @@ func miqt_exec_callback_QPaintEngine_DrawPixmap(self *C.QPaintEngine, cb C.intpt // Convert all CABI parameters to Go parameters slotval1 := newQRectF(r) - slotval2 := newQPixmap(pm, nil) + slotval2 := newQPixmap(pm) slotval3 := newQRectF(sr) @@ -828,7 +818,7 @@ func miqt_exec_callback_QPaintEngine_DrawTiledPixmap(self *C.QPaintEngine, cb C. // Convert all CABI parameters to Go parameters slotval1 := newQRectF(r) - slotval2 := newQPixmap(pixmap, nil) + slotval2 := newQPixmap(pixmap) slotval3 := newQPointF(s) @@ -858,7 +848,7 @@ func miqt_exec_callback_QPaintEngine_DrawImage(self *C.QPaintEngine, cb C.intptr // Convert all CABI parameters to Go parameters slotval1 := newQRectF(r) - slotval2 := newQImage(pm, nil) + slotval2 := newQImage(pm) slotval3 := newQRectF(sr) @@ -952,16 +942,13 @@ func newQPaintEngineState(h *C.QPaintEngineState) *QPaintEngineState { if h == nil { return nil } + return &QPaintEngineState{h: h} } // UnsafeNewQPaintEngineState constructs the type using only unsafe pointers. func UnsafeNewQPaintEngineState(h unsafe.Pointer) *QPaintEngineState { - if h == nil { - return nil - } - - return &QPaintEngineState{h: (*C.QPaintEngineState)(h)} + return newQPaintEngineState((*C.QPaintEngineState)(h)) } func (this *QPaintEngineState) State() QPaintEngine__DirtyFlag { diff --git a/qt/gen_qpaintengine.h b/qt/gen_qpaintengine.h index dcd95025..e5aca81b 100644 --- a/qt/gen_qpaintengine.h +++ b/qt/gen_qpaintengine.h @@ -66,8 +66,8 @@ struct miqt_string QTextItem_Text(const QTextItem* self); QFont* QTextItem_Font(const QTextItem* self); void QTextItem_Delete(QTextItem* self, bool isSubclass); -void QPaintEngine_new(QPaintEngine** outptr_QPaintEngine); -void QPaintEngine_new2(int features, QPaintEngine** outptr_QPaintEngine); +QPaintEngine* QPaintEngine_new(); +QPaintEngine* QPaintEngine_new2(int features); bool QPaintEngine_IsActive(const QPaintEngine* self); void QPaintEngine_SetActive(QPaintEngine* self, bool newState); bool QPaintEngine_Begin(QPaintEngine* self, QPaintDevice* pdev); diff --git a/qt/gen_qpainter.cpp b/qt/gen_qpainter.cpp index dfd0c13a..78f5e867 100644 --- a/qt/gen_qpainter.cpp +++ b/qt/gen_qpainter.cpp @@ -33,14 +33,12 @@ #include "gen_qpainter.h" #include "_cgo_export.h" -void QPainter_new(QPainter** outptr_QPainter) { - QPainter* ret = new QPainter(); - *outptr_QPainter = ret; +QPainter* QPainter_new() { + return new QPainter(); } -void QPainter_new2(QPaintDevice* param1, QPainter** outptr_QPainter) { - QPainter* ret = new QPainter(param1); - *outptr_QPainter = ret; +QPainter* QPainter_new2(QPaintDevice* param1) { + return new QPainter(param1); } QPaintDevice* QPainter_Device(const QPainter* self) { diff --git a/qt/gen_qpainter.go b/qt/gen_qpainter.go index e43e3ee5..ee72d350 100644 --- a/qt/gen_qpainter.go +++ b/qt/gen_qpainter.go @@ -98,34 +98,27 @@ func newQPainter(h *C.QPainter) *QPainter { if h == nil { return nil } + return &QPainter{h: h} } // UnsafeNewQPainter constructs the type using only unsafe pointers. func UnsafeNewQPainter(h unsafe.Pointer) *QPainter { - if h == nil { - return nil - } - - return &QPainter{h: (*C.QPainter)(h)} + return newQPainter((*C.QPainter)(h)) } // NewQPainter constructs a new QPainter object. func NewQPainter() *QPainter { - var outptr_QPainter *C.QPainter = nil - C.QPainter_new(&outptr_QPainter) - ret := newQPainter(outptr_QPainter) + ret := newQPainter(C.QPainter_new()) ret.isSubclass = true return ret } // NewQPainter2 constructs a new QPainter object. func NewQPainter2(param1 *QPaintDevice) *QPainter { - var outptr_QPainter *C.QPainter = nil - C.QPainter_new2(param1.cPointer(), &outptr_QPainter) - ret := newQPainter(outptr_QPainter) + ret := newQPainter(C.QPainter_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1282,16 +1275,13 @@ func newQPainter__PixmapFragment(h *C.QPainter__PixmapFragment) *QPainter__Pixma if h == nil { return nil } + return &QPainter__PixmapFragment{h: h} } // UnsafeNewQPainter__PixmapFragment constructs the type using only unsafe pointers. func UnsafeNewQPainter__PixmapFragment(h unsafe.Pointer) *QPainter__PixmapFragment { - if h == nil { - return nil - } - - return &QPainter__PixmapFragment{h: (*C.QPainter__PixmapFragment)(h)} + return newQPainter__PixmapFragment((*C.QPainter__PixmapFragment)(h)) } func QPainter__PixmapFragment_Create(pos *QPointF, sourceRect *QRectF) *QPainter__PixmapFragment { diff --git a/qt/gen_qpainter.h b/qt/gen_qpainter.h index 69609f65..59189fa9 100644 --- a/qt/gen_qpainter.h +++ b/qt/gen_qpainter.h @@ -76,8 +76,8 @@ typedef struct QTextOption QTextOption; typedef struct QTransform QTransform; #endif -void QPainter_new(QPainter** outptr_QPainter); -void QPainter_new2(QPaintDevice* param1, QPainter** outptr_QPainter); +QPainter* QPainter_new(); +QPainter* QPainter_new2(QPaintDevice* param1); QPaintDevice* QPainter_Device(const QPainter* self); bool QPainter_Begin(QPainter* self, QPaintDevice* param1); bool QPainter_End(QPainter* self); diff --git a/qt/gen_qpainterpath.cpp b/qt/gen_qpainterpath.cpp index 710384b9..fea756d2 100644 --- a/qt/gen_qpainterpath.cpp +++ b/qt/gen_qpainterpath.cpp @@ -14,19 +14,16 @@ #include "gen_qpainterpath.h" #include "_cgo_export.h" -void QPainterPath_new(QPainterPath** outptr_QPainterPath) { - QPainterPath* ret = new QPainterPath(); - *outptr_QPainterPath = ret; +QPainterPath* QPainterPath_new() { + return new QPainterPath(); } -void QPainterPath_new2(QPointF* startPoint, QPainterPath** outptr_QPainterPath) { - QPainterPath* ret = new QPainterPath(*startPoint); - *outptr_QPainterPath = ret; +QPainterPath* QPainterPath_new2(QPointF* startPoint) { + return new QPainterPath(*startPoint); } -void QPainterPath_new3(QPainterPath* other, QPainterPath** outptr_QPainterPath) { - QPainterPath* ret = new QPainterPath(*other); - *outptr_QPainterPath = ret; +QPainterPath* QPainterPath_new3(QPainterPath* other) { + return new QPainterPath(*other); } void QPainterPath_OperatorAssign(QPainterPath* self, QPainterPath* other) { @@ -348,14 +345,12 @@ void QPainterPath_Delete(QPainterPath* self, bool isSubclass) { } } -void QPainterPathStroker_new(QPainterPathStroker** outptr_QPainterPathStroker) { - QPainterPathStroker* ret = new QPainterPathStroker(); - *outptr_QPainterPathStroker = ret; +QPainterPathStroker* QPainterPathStroker_new() { + return new QPainterPathStroker(); } -void QPainterPathStroker_new2(QPen* pen, QPainterPathStroker** outptr_QPainterPathStroker) { - QPainterPathStroker* ret = new QPainterPathStroker(*pen); - *outptr_QPainterPathStroker = ret; +QPainterPathStroker* QPainterPathStroker_new2(QPen* pen) { + return new QPainterPathStroker(*pen); } void QPainterPathStroker_SetWidth(QPainterPathStroker* self, double width) { diff --git a/qt/gen_qpainterpath.go b/qt/gen_qpainterpath.go index 7b77e707..8986ab3d 100644 --- a/qt/gen_qpainterpath.go +++ b/qt/gen_qpainterpath.go @@ -46,44 +46,35 @@ func newQPainterPath(h *C.QPainterPath) *QPainterPath { if h == nil { return nil } + return &QPainterPath{h: h} } // UnsafeNewQPainterPath constructs the type using only unsafe pointers. func UnsafeNewQPainterPath(h unsafe.Pointer) *QPainterPath { - if h == nil { - return nil - } - - return &QPainterPath{h: (*C.QPainterPath)(h)} + return newQPainterPath((*C.QPainterPath)(h)) } // NewQPainterPath constructs a new QPainterPath object. func NewQPainterPath() *QPainterPath { - var outptr_QPainterPath *C.QPainterPath = nil - C.QPainterPath_new(&outptr_QPainterPath) - ret := newQPainterPath(outptr_QPainterPath) + ret := newQPainterPath(C.QPainterPath_new()) ret.isSubclass = true return ret } // NewQPainterPath2 constructs a new QPainterPath object. func NewQPainterPath2(startPoint *QPointF) *QPainterPath { - var outptr_QPainterPath *C.QPainterPath = nil - C.QPainterPath_new2(startPoint.cPointer(), &outptr_QPainterPath) - ret := newQPainterPath(outptr_QPainterPath) + ret := newQPainterPath(C.QPainterPath_new2(startPoint.cPointer())) ret.isSubclass = true return ret } // NewQPainterPath3 constructs a new QPainterPath object. func NewQPainterPath3(other *QPainterPath) *QPainterPath { - var outptr_QPainterPath *C.QPainterPath = nil - C.QPainterPath_new3(other.cPointer(), &outptr_QPainterPath) - ret := newQPainterPath(outptr_QPainterPath) + ret := newQPainterPath(C.QPainterPath_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -468,34 +459,27 @@ func newQPainterPathStroker(h *C.QPainterPathStroker) *QPainterPathStroker { if h == nil { return nil } + return &QPainterPathStroker{h: h} } // UnsafeNewQPainterPathStroker constructs the type using only unsafe pointers. func UnsafeNewQPainterPathStroker(h unsafe.Pointer) *QPainterPathStroker { - if h == nil { - return nil - } - - return &QPainterPathStroker{h: (*C.QPainterPathStroker)(h)} + return newQPainterPathStroker((*C.QPainterPathStroker)(h)) } // NewQPainterPathStroker constructs a new QPainterPathStroker object. func NewQPainterPathStroker() *QPainterPathStroker { - var outptr_QPainterPathStroker *C.QPainterPathStroker = nil - C.QPainterPathStroker_new(&outptr_QPainterPathStroker) - ret := newQPainterPathStroker(outptr_QPainterPathStroker) + ret := newQPainterPathStroker(C.QPainterPathStroker_new()) ret.isSubclass = true return ret } // NewQPainterPathStroker2 constructs a new QPainterPathStroker object. func NewQPainterPathStroker2(pen *QPen) *QPainterPathStroker { - var outptr_QPainterPathStroker *C.QPainterPathStroker = nil - C.QPainterPathStroker_new2(pen.cPointer(), &outptr_QPainterPathStroker) - ret := newQPainterPathStroker(outptr_QPainterPathStroker) + ret := newQPainterPathStroker(C.QPainterPathStroker_new2(pen.cPointer())) ret.isSubclass = true return ret } @@ -616,16 +600,13 @@ func newQPainterPath__Element(h *C.QPainterPath__Element) *QPainterPath__Element if h == nil { return nil } + return &QPainterPath__Element{h: h} } // UnsafeNewQPainterPath__Element constructs the type using only unsafe pointers. func UnsafeNewQPainterPath__Element(h unsafe.Pointer) *QPainterPath__Element { - if h == nil { - return nil - } - - return &QPainterPath__Element{h: (*C.QPainterPath__Element)(h)} + return newQPainterPath__Element((*C.QPainterPath__Element)(h)) } func (this *QPainterPath__Element) IsMoveTo() bool { diff --git a/qt/gen_qpainterpath.h b/qt/gen_qpainterpath.h index b15bcc5b..a8037bd0 100644 --- a/qt/gen_qpainterpath.h +++ b/qt/gen_qpainterpath.h @@ -38,9 +38,9 @@ typedef struct QRectF QRectF; typedef struct QRegion QRegion; #endif -void QPainterPath_new(QPainterPath** outptr_QPainterPath); -void QPainterPath_new2(QPointF* startPoint, QPainterPath** outptr_QPainterPath); -void QPainterPath_new3(QPainterPath* other, QPainterPath** outptr_QPainterPath); +QPainterPath* QPainterPath_new(); +QPainterPath* QPainterPath_new2(QPointF* startPoint); +QPainterPath* QPainterPath_new3(QPainterPath* other); void QPainterPath_OperatorAssign(QPainterPath* self, QPainterPath* other); void QPainterPath_Swap(QPainterPath* self, QPainterPath* other); void QPainterPath_Clear(QPainterPath* self); @@ -118,8 +118,8 @@ void QPainterPath_AddRoundedRect4(QPainterPath* self, QRectF* rect, double xRadi void QPainterPath_AddRoundedRect7(QPainterPath* self, double x, double y, double w, double h, double xRadius, double yRadius, int mode); void QPainterPath_Delete(QPainterPath* self, bool isSubclass); -void QPainterPathStroker_new(QPainterPathStroker** outptr_QPainterPathStroker); -void QPainterPathStroker_new2(QPen* pen, QPainterPathStroker** outptr_QPainterPathStroker); +QPainterPathStroker* QPainterPathStroker_new(); +QPainterPathStroker* QPainterPathStroker_new2(QPen* pen); void QPainterPathStroker_SetWidth(QPainterPathStroker* self, double width); double QPainterPathStroker_Width(const QPainterPathStroker* self); void QPainterPathStroker_SetCapStyle(QPainterPathStroker* self, int style); diff --git a/qt/gen_qpalette.cpp b/qt/gen_qpalette.cpp index 56560eae..ab9b8092 100644 --- a/qt/gen_qpalette.cpp +++ b/qt/gen_qpalette.cpp @@ -5,39 +5,32 @@ #include "gen_qpalette.h" #include "_cgo_export.h" -void QPalette_new(QPalette** outptr_QPalette) { - QPalette* ret = new QPalette(); - *outptr_QPalette = ret; +QPalette* QPalette_new() { + return new QPalette(); } -void QPalette_new2(QColor* button, QPalette** outptr_QPalette) { - QPalette* ret = new QPalette(*button); - *outptr_QPalette = ret; +QPalette* QPalette_new2(QColor* button) { + return new QPalette(*button); } -void QPalette_new3(int button, QPalette** outptr_QPalette) { - QPalette* ret = new QPalette(static_cast(button)); - *outptr_QPalette = ret; +QPalette* QPalette_new3(int button) { + return new QPalette(static_cast(button)); } -void QPalette_new4(QColor* button, QColor* window, QPalette** outptr_QPalette) { - QPalette* ret = new QPalette(*button, *window); - *outptr_QPalette = ret; +QPalette* QPalette_new4(QColor* button, QColor* window) { + return new QPalette(*button, *window); } -void QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window, QPalette** outptr_QPalette) { - QPalette* ret = new QPalette(*windowText, *button, *light, *dark, *mid, *text, *bright_text, *base, *window); - *outptr_QPalette = ret; +QPalette* QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window) { + return new QPalette(*windowText, *button, *light, *dark, *mid, *text, *bright_text, *base, *window); } -void QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base, QPalette** outptr_QPalette) { - QPalette* ret = new QPalette(*windowText, *window, *light, *dark, *mid, *text, *base); - *outptr_QPalette = ret; +QPalette* QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base) { + return new QPalette(*windowText, *window, *light, *dark, *mid, *text, *base); } -void QPalette_new7(QPalette* palette, QPalette** outptr_QPalette) { - QPalette* ret = new QPalette(*palette); - *outptr_QPalette = ret; +QPalette* QPalette_new7(QPalette* palette) { + return new QPalette(*palette); } void QPalette_OperatorAssign(QPalette* self, QPalette* palette) { diff --git a/qt/gen_qpalette.go b/qt/gen_qpalette.go index f15a0c60..d461e164 100644 --- a/qt/gen_qpalette.go +++ b/qt/gen_qpalette.go @@ -78,84 +78,67 @@ func newQPalette(h *C.QPalette) *QPalette { if h == nil { return nil } + return &QPalette{h: h} } // UnsafeNewQPalette constructs the type using only unsafe pointers. func UnsafeNewQPalette(h unsafe.Pointer) *QPalette { - if h == nil { - return nil - } - - return &QPalette{h: (*C.QPalette)(h)} + return newQPalette((*C.QPalette)(h)) } // NewQPalette constructs a new QPalette object. func NewQPalette() *QPalette { - var outptr_QPalette *C.QPalette = nil - C.QPalette_new(&outptr_QPalette) - ret := newQPalette(outptr_QPalette) + ret := newQPalette(C.QPalette_new()) ret.isSubclass = true return ret } // NewQPalette2 constructs a new QPalette object. func NewQPalette2(button *QColor) *QPalette { - var outptr_QPalette *C.QPalette = nil - C.QPalette_new2(button.cPointer(), &outptr_QPalette) - ret := newQPalette(outptr_QPalette) + ret := newQPalette(C.QPalette_new2(button.cPointer())) ret.isSubclass = true return ret } // NewQPalette3 constructs a new QPalette object. func NewQPalette3(button GlobalColor) *QPalette { - var outptr_QPalette *C.QPalette = nil - C.QPalette_new3((C.int)(button), &outptr_QPalette) - ret := newQPalette(outptr_QPalette) + ret := newQPalette(C.QPalette_new3((C.int)(button))) ret.isSubclass = true return ret } // NewQPalette4 constructs a new QPalette object. func NewQPalette4(button *QColor, window *QColor) *QPalette { - var outptr_QPalette *C.QPalette = nil - C.QPalette_new4(button.cPointer(), window.cPointer(), &outptr_QPalette) - ret := newQPalette(outptr_QPalette) + ret := newQPalette(C.QPalette_new4(button.cPointer(), window.cPointer())) ret.isSubclass = true return ret } // NewQPalette5 constructs a new QPalette object. func NewQPalette5(windowText *QBrush, button *QBrush, light *QBrush, dark *QBrush, mid *QBrush, text *QBrush, bright_text *QBrush, base *QBrush, window *QBrush) *QPalette { - var outptr_QPalette *C.QPalette = nil - C.QPalette_new5(windowText.cPointer(), button.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), bright_text.cPointer(), base.cPointer(), window.cPointer(), &outptr_QPalette) - ret := newQPalette(outptr_QPalette) + ret := newQPalette(C.QPalette_new5(windowText.cPointer(), button.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), bright_text.cPointer(), base.cPointer(), window.cPointer())) ret.isSubclass = true return ret } // NewQPalette6 constructs a new QPalette object. func NewQPalette6(windowText *QColor, window *QColor, light *QColor, dark *QColor, mid *QColor, text *QColor, base *QColor) *QPalette { - var outptr_QPalette *C.QPalette = nil - C.QPalette_new6(windowText.cPointer(), window.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), base.cPointer(), &outptr_QPalette) - ret := newQPalette(outptr_QPalette) + ret := newQPalette(C.QPalette_new6(windowText.cPointer(), window.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), base.cPointer())) ret.isSubclass = true return ret } // NewQPalette7 constructs a new QPalette object. func NewQPalette7(palette *QPalette) *QPalette { - var outptr_QPalette *C.QPalette = nil - C.QPalette_new7(palette.cPointer(), &outptr_QPalette) - ret := newQPalette(outptr_QPalette) + ret := newQPalette(C.QPalette_new7(palette.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qpalette.h b/qt/gen_qpalette.h index 8a83ba17..c493ad04 100644 --- a/qt/gen_qpalette.h +++ b/qt/gen_qpalette.h @@ -24,13 +24,13 @@ typedef struct QColor QColor; typedef struct QPalette QPalette; #endif -void QPalette_new(QPalette** outptr_QPalette); -void QPalette_new2(QColor* button, QPalette** outptr_QPalette); -void QPalette_new3(int button, QPalette** outptr_QPalette); -void QPalette_new4(QColor* button, QColor* window, QPalette** outptr_QPalette); -void QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window, QPalette** outptr_QPalette); -void QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base, QPalette** outptr_QPalette); -void QPalette_new7(QPalette* palette, QPalette** outptr_QPalette); +QPalette* QPalette_new(); +QPalette* QPalette_new2(QColor* button); +QPalette* QPalette_new3(int button); +QPalette* QPalette_new4(QColor* button, QColor* window); +QPalette* QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window); +QPalette* QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base); +QPalette* QPalette_new7(QPalette* palette); void QPalette_OperatorAssign(QPalette* self, QPalette* palette); void QPalette_Swap(QPalette* self, QPalette* other); int QPalette_CurrentColorGroup(const QPalette* self); diff --git a/qt/gen_qparallelanimationgroup.cpp b/qt/gen_qparallelanimationgroup.cpp index d205918c..b4c25591 100644 --- a/qt/gen_qparallelanimationgroup.cpp +++ b/qt/gen_qparallelanimationgroup.cpp @@ -142,20 +142,16 @@ public: }; -void QParallelAnimationGroup_new(QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQParallelAnimationGroup* ret = new MiqtVirtualQParallelAnimationGroup(); - *outptr_QParallelAnimationGroup = ret; - *outptr_QAnimationGroup = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QParallelAnimationGroup* QParallelAnimationGroup_new() { + return new MiqtVirtualQParallelAnimationGroup(); } -void QParallelAnimationGroup_new2(QObject* parent, QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQParallelAnimationGroup* ret = new MiqtVirtualQParallelAnimationGroup(parent); - *outptr_QParallelAnimationGroup = ret; - *outptr_QAnimationGroup = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QParallelAnimationGroup* QParallelAnimationGroup_new2(QObject* parent) { + return new MiqtVirtualQParallelAnimationGroup(parent); +} + +void QParallelAnimationGroup_virtbase(QParallelAnimationGroup* src, QAnimationGroup** outptr_QAnimationGroup) { + *outptr_QAnimationGroup = static_cast(src); } QMetaObject* QParallelAnimationGroup_MetaObject(const QParallelAnimationGroup* self) { diff --git a/qt/gen_qparallelanimationgroup.go b/qt/gen_qparallelanimationgroup.go index 8b3f7334..5a413663 100644 --- a/qt/gen_qparallelanimationgroup.go +++ b/qt/gen_qparallelanimationgroup.go @@ -35,46 +35,34 @@ func (this *QParallelAnimationGroup) UnsafePointer() unsafe.Pointer { } // newQParallelAnimationGroup constructs the type using only CGO pointers. -func newQParallelAnimationGroup(h *C.QParallelAnimationGroup, h_QAnimationGroup *C.QAnimationGroup, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QParallelAnimationGroup { +func newQParallelAnimationGroup(h *C.QParallelAnimationGroup) *QParallelAnimationGroup { if h == nil { return nil } + var outptr_QAnimationGroup *C.QAnimationGroup = nil + C.QParallelAnimationGroup_virtbase(h, &outptr_QAnimationGroup) + return &QParallelAnimationGroup{h: h, - QAnimationGroup: newQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} + QAnimationGroup: newQAnimationGroup(outptr_QAnimationGroup)} } // UnsafeNewQParallelAnimationGroup constructs the type using only unsafe pointers. -func UnsafeNewQParallelAnimationGroup(h unsafe.Pointer, h_QAnimationGroup unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QParallelAnimationGroup { - if h == nil { - return nil - } - - return &QParallelAnimationGroup{h: (*C.QParallelAnimationGroup)(h), - QAnimationGroup: UnsafeNewQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} +func UnsafeNewQParallelAnimationGroup(h unsafe.Pointer) *QParallelAnimationGroup { + return newQParallelAnimationGroup((*C.QParallelAnimationGroup)(h)) } // NewQParallelAnimationGroup constructs a new QParallelAnimationGroup object. func NewQParallelAnimationGroup() *QParallelAnimationGroup { - var outptr_QParallelAnimationGroup *C.QParallelAnimationGroup = nil - var outptr_QAnimationGroup *C.QAnimationGroup = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QParallelAnimationGroup_new(&outptr_QParallelAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQParallelAnimationGroup(outptr_QParallelAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret := newQParallelAnimationGroup(C.QParallelAnimationGroup_new()) ret.isSubclass = true return ret } // NewQParallelAnimationGroup2 constructs a new QParallelAnimationGroup object. func NewQParallelAnimationGroup2(parent *QObject) *QParallelAnimationGroup { - var outptr_QParallelAnimationGroup *C.QParallelAnimationGroup = nil - var outptr_QAnimationGroup *C.QAnimationGroup = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QParallelAnimationGroup_new2(parent.cPointer(), &outptr_QParallelAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQParallelAnimationGroup(outptr_QParallelAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret := newQParallelAnimationGroup(C.QParallelAnimationGroup_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qparallelanimationgroup.h b/qt/gen_qparallelanimationgroup.h index c3e97a2b..44c5ea60 100644 --- a/qt/gen_qparallelanimationgroup.h +++ b/qt/gen_qparallelanimationgroup.h @@ -30,8 +30,9 @@ typedef struct QObject QObject; typedef struct QParallelAnimationGroup QParallelAnimationGroup; #endif -void QParallelAnimationGroup_new(QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QParallelAnimationGroup_new2(QObject* parent, QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +QParallelAnimationGroup* QParallelAnimationGroup_new(); +QParallelAnimationGroup* QParallelAnimationGroup_new2(QObject* parent); +void QParallelAnimationGroup_virtbase(QParallelAnimationGroup* src, QAnimationGroup** outptr_QAnimationGroup); QMetaObject* QParallelAnimationGroup_MetaObject(const QParallelAnimationGroup* self); void* QParallelAnimationGroup_Metacast(QParallelAnimationGroup* self, const char* param1); struct miqt_string QParallelAnimationGroup_Tr(const char* s); diff --git a/qt/gen_qpauseanimation.cpp b/qt/gen_qpauseanimation.cpp index d58cd897..14bbd108 100644 --- a/qt/gen_qpauseanimation.cpp +++ b/qt/gen_qpauseanimation.cpp @@ -143,32 +143,24 @@ public: }; -void QPauseAnimation_new(QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(); - *outptr_QPauseAnimation = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPauseAnimation* QPauseAnimation_new() { + return new MiqtVirtualQPauseAnimation(); } -void QPauseAnimation_new2(int msecs, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(static_cast(msecs)); - *outptr_QPauseAnimation = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPauseAnimation* QPauseAnimation_new2(int msecs) { + return new MiqtVirtualQPauseAnimation(static_cast(msecs)); } -void QPauseAnimation_new3(QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(parent); - *outptr_QPauseAnimation = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPauseAnimation* QPauseAnimation_new3(QObject* parent) { + return new MiqtVirtualQPauseAnimation(parent); } -void QPauseAnimation_new4(int msecs, QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(static_cast(msecs), parent); - *outptr_QPauseAnimation = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPauseAnimation* QPauseAnimation_new4(int msecs, QObject* parent) { + return new MiqtVirtualQPauseAnimation(static_cast(msecs), parent); +} + +void QPauseAnimation_virtbase(QPauseAnimation* src, QAbstractAnimation** outptr_QAbstractAnimation) { + *outptr_QAbstractAnimation = static_cast(src); } QMetaObject* QPauseAnimation_MetaObject(const QPauseAnimation* self) { diff --git a/qt/gen_qpauseanimation.go b/qt/gen_qpauseanimation.go index f7f628fd..16ce749c 100644 --- a/qt/gen_qpauseanimation.go +++ b/qt/gen_qpauseanimation.go @@ -35,68 +35,50 @@ func (this *QPauseAnimation) UnsafePointer() unsafe.Pointer { } // newQPauseAnimation constructs the type using only CGO pointers. -func newQPauseAnimation(h *C.QPauseAnimation, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QPauseAnimation { +func newQPauseAnimation(h *C.QPauseAnimation) *QPauseAnimation { if h == nil { return nil } + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + C.QPauseAnimation_virtbase(h, &outptr_QAbstractAnimation) + return &QPauseAnimation{h: h, - QAbstractAnimation: newQAbstractAnimation(h_QAbstractAnimation, h_QObject)} + QAbstractAnimation: newQAbstractAnimation(outptr_QAbstractAnimation)} } // UnsafeNewQPauseAnimation constructs the type using only unsafe pointers. -func UnsafeNewQPauseAnimation(h unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QPauseAnimation { - if h == nil { - return nil - } - - return &QPauseAnimation{h: (*C.QPauseAnimation)(h), - QAbstractAnimation: UnsafeNewQAbstractAnimation(h_QAbstractAnimation, h_QObject)} +func UnsafeNewQPauseAnimation(h unsafe.Pointer) *QPauseAnimation { + return newQPauseAnimation((*C.QPauseAnimation)(h)) } // NewQPauseAnimation constructs a new QPauseAnimation object. func NewQPauseAnimation() *QPauseAnimation { - var outptr_QPauseAnimation *C.QPauseAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPauseAnimation_new(&outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPauseAnimation(C.QPauseAnimation_new()) ret.isSubclass = true return ret } // NewQPauseAnimation2 constructs a new QPauseAnimation object. func NewQPauseAnimation2(msecs int) *QPauseAnimation { - var outptr_QPauseAnimation *C.QPauseAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPauseAnimation_new2((C.int)(msecs), &outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPauseAnimation(C.QPauseAnimation_new2((C.int)(msecs))) ret.isSubclass = true return ret } // NewQPauseAnimation3 constructs a new QPauseAnimation object. func NewQPauseAnimation3(parent *QObject) *QPauseAnimation { - var outptr_QPauseAnimation *C.QPauseAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPauseAnimation_new3(parent.cPointer(), &outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPauseAnimation(C.QPauseAnimation_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQPauseAnimation4 constructs a new QPauseAnimation object. func NewQPauseAnimation4(msecs int, parent *QObject) *QPauseAnimation { - var outptr_QPauseAnimation *C.QPauseAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPauseAnimation_new4((C.int)(msecs), parent.cPointer(), &outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPauseAnimation(C.QPauseAnimation_new4((C.int)(msecs), parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qpauseanimation.h b/qt/gen_qpauseanimation.h index 8bc883ba..d5535cf8 100644 --- a/qt/gen_qpauseanimation.h +++ b/qt/gen_qpauseanimation.h @@ -28,10 +28,11 @@ typedef struct QObject QObject; typedef struct QPauseAnimation QPauseAnimation; #endif -void QPauseAnimation_new(QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QPauseAnimation_new2(int msecs, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QPauseAnimation_new3(QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QPauseAnimation_new4(int msecs, QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +QPauseAnimation* QPauseAnimation_new(); +QPauseAnimation* QPauseAnimation_new2(int msecs); +QPauseAnimation* QPauseAnimation_new3(QObject* parent); +QPauseAnimation* QPauseAnimation_new4(int msecs, QObject* parent); +void QPauseAnimation_virtbase(QPauseAnimation* src, QAbstractAnimation** outptr_QAbstractAnimation); QMetaObject* QPauseAnimation_MetaObject(const QPauseAnimation* self); void* QPauseAnimation_Metacast(QPauseAnimation* self, const char* param1); struct miqt_string QPauseAnimation_Tr(const char* s); diff --git a/qt/gen_qpdfwriter.cpp b/qt/gen_qpdfwriter.cpp index 57b73eaa..2b36cee8 100644 --- a/qt/gen_qpdfwriter.cpp +++ b/qt/gen_qpdfwriter.cpp @@ -345,21 +345,18 @@ public: }; -void QPdfWriter_new(struct miqt_string filename, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { +QPdfWriter* QPdfWriter_new(struct miqt_string filename) { QString filename_QString = QString::fromUtf8(filename.data, filename.len); - MiqtVirtualQPdfWriter* ret = new MiqtVirtualQPdfWriter(filename_QString); - *outptr_QPdfWriter = ret; - *outptr_QObject = static_cast(ret); - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPdfWriter(filename_QString); } -void QPdfWriter_new2(QIODevice* device, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPdfWriter* ret = new MiqtVirtualQPdfWriter(device); - *outptr_QPdfWriter = ret; - *outptr_QObject = static_cast(ret); - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPdfWriter* QPdfWriter_new2(QIODevice* device) { + return new MiqtVirtualQPdfWriter(device); +} + +void QPdfWriter_virtbase(QPdfWriter* src, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice) { + *outptr_QObject = static_cast(src); + *outptr_QPagedPaintDevice = static_cast(src); } QMetaObject* QPdfWriter_MetaObject(const QPdfWriter* self) { diff --git a/qt/gen_qpdfwriter.go b/qt/gen_qpdfwriter.go index 04b169e2..766fa706 100644 --- a/qt/gen_qpdfwriter.go +++ b/qt/gen_qpdfwriter.go @@ -36,24 +36,22 @@ func (this *QPdfWriter) UnsafePointer() unsafe.Pointer { } // newQPdfWriter constructs the type using only CGO pointers. -func newQPdfWriter(h *C.QPdfWriter, h_QObject *C.QObject, h_QPagedPaintDevice *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QPdfWriter { +func newQPdfWriter(h *C.QPdfWriter) *QPdfWriter { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + C.QPdfWriter_virtbase(h, &outptr_QObject, &outptr_QPagedPaintDevice) + return &QPdfWriter{h: h, - QObject: newQObject(h_QObject), - QPagedPaintDevice: newQPagedPaintDevice(h_QPagedPaintDevice, h_QPaintDevice)} + QObject: newQObject(outptr_QObject), + QPagedPaintDevice: newQPagedPaintDevice(outptr_QPagedPaintDevice)} } // UnsafeNewQPdfWriter constructs the type using only unsafe pointers. -func UnsafeNewQPdfWriter(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QPagedPaintDevice unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPdfWriter { - if h == nil { - return nil - } - - return &QPdfWriter{h: (*C.QPdfWriter)(h), - QObject: UnsafeNewQObject(h_QObject), - QPagedPaintDevice: UnsafeNewQPagedPaintDevice(h_QPagedPaintDevice, h_QPaintDevice)} +func UnsafeNewQPdfWriter(h unsafe.Pointer) *QPdfWriter { + return newQPdfWriter((*C.QPdfWriter)(h)) } // NewQPdfWriter constructs a new QPdfWriter object. @@ -62,26 +60,16 @@ func NewQPdfWriter(filename string) *QPdfWriter { filename_ms.data = C.CString(filename) filename_ms.len = C.size_t(len(filename)) defer C.free(unsafe.Pointer(filename_ms.data)) - var outptr_QPdfWriter *C.QPdfWriter = nil - var outptr_QObject *C.QObject = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPdfWriter_new(filename_ms, &outptr_QPdfWriter, &outptr_QObject, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQPdfWriter(outptr_QPdfWriter, outptr_QObject, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQPdfWriter(C.QPdfWriter_new(filename_ms)) ret.isSubclass = true return ret } // NewQPdfWriter2 constructs a new QPdfWriter object. func NewQPdfWriter2(device *QIODevice) *QPdfWriter { - var outptr_QPdfWriter *C.QPdfWriter = nil - var outptr_QObject *C.QObject = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPdfWriter_new2(device.cPointer(), &outptr_QPdfWriter, &outptr_QObject, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQPdfWriter(outptr_QPdfWriter, outptr_QObject, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQPdfWriter(C.QPdfWriter_new2(device.cPointer())) ret.isSubclass = true return ret } @@ -494,7 +482,7 @@ func miqt_exec_callback_QPdfWriter_TimerEvent(self *C.QPdfWriter, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QPdfWriter{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -520,7 +508,7 @@ func miqt_exec_callback_QPdfWriter_ChildEvent(self *C.QPdfWriter, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QPdfWriter{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qpdfwriter.h b/qt/gen_qpdfwriter.h index 7bda2f6a..270f27fe 100644 --- a/qt/gen_qpdfwriter.h +++ b/qt/gen_qpdfwriter.h @@ -48,8 +48,9 @@ typedef struct QSizeF QSizeF; typedef struct QTimerEvent QTimerEvent; #endif -void QPdfWriter_new(struct miqt_string filename, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); -void QPdfWriter_new2(QIODevice* device, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +QPdfWriter* QPdfWriter_new(struct miqt_string filename); +QPdfWriter* QPdfWriter_new2(QIODevice* device); +void QPdfWriter_virtbase(QPdfWriter* src, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice); QMetaObject* QPdfWriter_MetaObject(const QPdfWriter* self); void* QPdfWriter_Metacast(QPdfWriter* self, const char* param1); struct miqt_string QPdfWriter_Tr(const char* s); diff --git a/qt/gen_qpen.cpp b/qt/gen_qpen.cpp index 5edcbff9..85ad872e 100644 --- a/qt/gen_qpen.cpp +++ b/qt/gen_qpen.cpp @@ -6,44 +6,36 @@ #include "gen_qpen.h" #include "_cgo_export.h" -void QPen_new(QPen** outptr_QPen) { - QPen* ret = new QPen(); - *outptr_QPen = ret; +QPen* QPen_new() { + return new QPen(); } -void QPen_new2(int param1, QPen** outptr_QPen) { - QPen* ret = new QPen(static_cast(param1)); - *outptr_QPen = ret; +QPen* QPen_new2(int param1) { + return new QPen(static_cast(param1)); } -void QPen_new3(QColor* color, QPen** outptr_QPen) { - QPen* ret = new QPen(*color); - *outptr_QPen = ret; +QPen* QPen_new3(QColor* color) { + return new QPen(*color); } -void QPen_new4(QBrush* brush, double width, QPen** outptr_QPen) { - QPen* ret = new QPen(*brush, static_cast(width)); - *outptr_QPen = ret; +QPen* QPen_new4(QBrush* brush, double width) { + return new QPen(*brush, static_cast(width)); } -void QPen_new5(QPen* pen, QPen** outptr_QPen) { - QPen* ret = new QPen(*pen); - *outptr_QPen = ret; +QPen* QPen_new5(QPen* pen) { + return new QPen(*pen); } -void QPen_new6(QBrush* brush, double width, int s, QPen** outptr_QPen) { - QPen* ret = new QPen(*brush, static_cast(width), static_cast(s)); - *outptr_QPen = ret; +QPen* QPen_new6(QBrush* brush, double width, int s) { + return new QPen(*brush, static_cast(width), static_cast(s)); } -void QPen_new7(QBrush* brush, double width, int s, int c, QPen** outptr_QPen) { - QPen* ret = new QPen(*brush, static_cast(width), static_cast(s), static_cast(c)); - *outptr_QPen = ret; +QPen* QPen_new7(QBrush* brush, double width, int s, int c) { + return new QPen(*brush, static_cast(width), static_cast(s), static_cast(c)); } -void QPen_new8(QBrush* brush, double width, int s, int c, int j, QPen** outptr_QPen) { - QPen* ret = new QPen(*brush, static_cast(width), static_cast(s), static_cast(c), static_cast(j)); - *outptr_QPen = ret; +QPen* QPen_new8(QBrush* brush, double width, int s, int c, int j) { + return new QPen(*brush, static_cast(width), static_cast(s), static_cast(c), static_cast(j)); } void QPen_OperatorAssign(QPen* self, QPen* pen) { diff --git a/qt/gen_qpen.go b/qt/gen_qpen.go index 136db10e..d6c8b467 100644 --- a/qt/gen_qpen.go +++ b/qt/gen_qpen.go @@ -37,94 +37,75 @@ func newQPen(h *C.QPen) *QPen { if h == nil { return nil } + return &QPen{h: h} } // UnsafeNewQPen constructs the type using only unsafe pointers. func UnsafeNewQPen(h unsafe.Pointer) *QPen { - if h == nil { - return nil - } - - return &QPen{h: (*C.QPen)(h)} + return newQPen((*C.QPen)(h)) } // NewQPen constructs a new QPen object. func NewQPen() *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new(&outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new()) ret.isSubclass = true return ret } // NewQPen2 constructs a new QPen object. func NewQPen2(param1 PenStyle) *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new2((C.int)(param1), &outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQPen3 constructs a new QPen object. func NewQPen3(color *QColor) *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new3(color.cPointer(), &outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new3(color.cPointer())) ret.isSubclass = true return ret } // NewQPen4 constructs a new QPen object. func NewQPen4(brush *QBrush, width float64) *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new4(brush.cPointer(), (C.double)(width), &outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new4(brush.cPointer(), (C.double)(width))) ret.isSubclass = true return ret } // NewQPen5 constructs a new QPen object. func NewQPen5(pen *QPen) *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new5(pen.cPointer(), &outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new5(pen.cPointer())) ret.isSubclass = true return ret } // NewQPen6 constructs a new QPen object. func NewQPen6(brush *QBrush, width float64, s PenStyle) *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new6(brush.cPointer(), (C.double)(width), (C.int)(s), &outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new6(brush.cPointer(), (C.double)(width), (C.int)(s))) ret.isSubclass = true return ret } // NewQPen7 constructs a new QPen object. func NewQPen7(brush *QBrush, width float64, s PenStyle, c PenCapStyle) *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new7(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c), &outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new7(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c))) ret.isSubclass = true return ret } // NewQPen8 constructs a new QPen object. func NewQPen8(brush *QBrush, width float64, s PenStyle, c PenCapStyle, j PenJoinStyle) *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new8(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c), (C.int)(j), &outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new8(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c), (C.int)(j))) ret.isSubclass = true return ret } diff --git a/qt/gen_qpen.h b/qt/gen_qpen.h index ad12f4b3..deb336a6 100644 --- a/qt/gen_qpen.h +++ b/qt/gen_qpen.h @@ -24,14 +24,14 @@ typedef struct QColor QColor; typedef struct QPen QPen; #endif -void QPen_new(QPen** outptr_QPen); -void QPen_new2(int param1, QPen** outptr_QPen); -void QPen_new3(QColor* color, QPen** outptr_QPen); -void QPen_new4(QBrush* brush, double width, QPen** outptr_QPen); -void QPen_new5(QPen* pen, QPen** outptr_QPen); -void QPen_new6(QBrush* brush, double width, int s, QPen** outptr_QPen); -void QPen_new7(QBrush* brush, double width, int s, int c, QPen** outptr_QPen); -void QPen_new8(QBrush* brush, double width, int s, int c, int j, QPen** outptr_QPen); +QPen* QPen_new(); +QPen* QPen_new2(int param1); +QPen* QPen_new3(QColor* color); +QPen* QPen_new4(QBrush* brush, double width); +QPen* QPen_new5(QPen* pen); +QPen* QPen_new6(QBrush* brush, double width, int s); +QPen* QPen_new7(QBrush* brush, double width, int s, int c); +QPen* QPen_new8(QBrush* brush, double width, int s, int c, int j); void QPen_OperatorAssign(QPen* self, QPen* pen); void QPen_Swap(QPen* self, QPen* other); int QPen_Style(const QPen* self); diff --git a/qt/gen_qpicture.cpp b/qt/gen_qpicture.cpp index 7bcaec94..ef7d3bd3 100644 --- a/qt/gen_qpicture.cpp +++ b/qt/gen_qpicture.cpp @@ -189,22 +189,20 @@ public: }; -void QPicture_new(QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPicture* ret = new MiqtVirtualQPicture(); - *outptr_QPicture = ret; - *outptr_QPaintDevice = static_cast(ret); +QPicture* QPicture_new() { + return new MiqtVirtualQPicture(); } -void QPicture_new2(QPicture* param1, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPicture* ret = new MiqtVirtualQPicture(*param1); - *outptr_QPicture = ret; - *outptr_QPaintDevice = static_cast(ret); +QPicture* QPicture_new2(QPicture* param1) { + return new MiqtVirtualQPicture(*param1); } -void QPicture_new3(int formatVersion, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPicture* ret = new MiqtVirtualQPicture(static_cast(formatVersion)); - *outptr_QPicture = ret; - *outptr_QPaintDevice = static_cast(ret); +QPicture* QPicture_new3(int formatVersion) { + return new MiqtVirtualQPicture(static_cast(formatVersion)); +} + +void QPicture_virtbase(QPicture* src, QPaintDevice** outptr_QPaintDevice) { + *outptr_QPaintDevice = static_cast(src); } bool QPicture_IsNull(const QPicture* self) { @@ -441,20 +439,17 @@ void QPicture_Delete(QPicture* self, bool isSubclass) { } } -void QPictureIO_new(QPictureIO** outptr_QPictureIO) { - QPictureIO* ret = new QPictureIO(); - *outptr_QPictureIO = ret; +QPictureIO* QPictureIO_new() { + return new QPictureIO(); } -void QPictureIO_new2(QIODevice* ioDevice, const char* format, QPictureIO** outptr_QPictureIO) { - QPictureIO* ret = new QPictureIO(ioDevice, format); - *outptr_QPictureIO = ret; +QPictureIO* QPictureIO_new2(QIODevice* ioDevice, const char* format) { + return new QPictureIO(ioDevice, format); } -void QPictureIO_new3(struct miqt_string fileName, const char* format, QPictureIO** outptr_QPictureIO) { +QPictureIO* QPictureIO_new3(struct miqt_string fileName, const char* format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QPictureIO* ret = new QPictureIO(fileName_QString, format); - *outptr_QPictureIO = ret; + return new QPictureIO(fileName_QString, format); } QPicture* QPictureIO_Picture(const QPictureIO* self) { diff --git a/qt/gen_qpicture.go b/qt/gen_qpicture.go index 2c04548c..748bbfa0 100644 --- a/qt/gen_qpicture.go +++ b/qt/gen_qpicture.go @@ -35,53 +35,42 @@ func (this *QPicture) UnsafePointer() unsafe.Pointer { } // newQPicture constructs the type using only CGO pointers. -func newQPicture(h *C.QPicture, h_QPaintDevice *C.QPaintDevice) *QPicture { +func newQPicture(h *C.QPicture) *QPicture { if h == nil { return nil } + var outptr_QPaintDevice *C.QPaintDevice = nil + C.QPicture_virtbase(h, &outptr_QPaintDevice) + return &QPicture{h: h, - QPaintDevice: newQPaintDevice(h_QPaintDevice)} + QPaintDevice: newQPaintDevice(outptr_QPaintDevice)} } // UnsafeNewQPicture constructs the type using only unsafe pointers. -func UnsafeNewQPicture(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPicture { - if h == nil { - return nil - } - - return &QPicture{h: (*C.QPicture)(h), - QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} +func UnsafeNewQPicture(h unsafe.Pointer) *QPicture { + return newQPicture((*C.QPicture)(h)) } // NewQPicture constructs a new QPicture object. func NewQPicture() *QPicture { - var outptr_QPicture *C.QPicture = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPicture_new(&outptr_QPicture, &outptr_QPaintDevice) - ret := newQPicture(outptr_QPicture, outptr_QPaintDevice) + ret := newQPicture(C.QPicture_new()) ret.isSubclass = true return ret } // NewQPicture2 constructs a new QPicture object. func NewQPicture2(param1 *QPicture) *QPicture { - var outptr_QPicture *C.QPicture = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPicture_new2(param1.cPointer(), &outptr_QPicture, &outptr_QPaintDevice) - ret := newQPicture(outptr_QPicture, outptr_QPaintDevice) + ret := newQPicture(C.QPicture_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQPicture3 constructs a new QPicture object. func NewQPicture3(formatVersion int) *QPicture { - var outptr_QPicture *C.QPicture = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPicture_new3((C.int)(formatVersion), &outptr_QPicture, &outptr_QPaintDevice) - ret := newQPicture(outptr_QPicture, outptr_QPaintDevice) + ret := newQPicture(C.QPicture_new3((C.int)(formatVersion))) ret.isSubclass = true return ret } @@ -486,24 +475,19 @@ func newQPictureIO(h *C.QPictureIO) *QPictureIO { if h == nil { return nil } + return &QPictureIO{h: h} } // UnsafeNewQPictureIO constructs the type using only unsafe pointers. func UnsafeNewQPictureIO(h unsafe.Pointer) *QPictureIO { - if h == nil { - return nil - } - - return &QPictureIO{h: (*C.QPictureIO)(h)} + return newQPictureIO((*C.QPictureIO)(h)) } // NewQPictureIO constructs a new QPictureIO object. func NewQPictureIO() *QPictureIO { - var outptr_QPictureIO *C.QPictureIO = nil - C.QPictureIO_new(&outptr_QPictureIO) - ret := newQPictureIO(outptr_QPictureIO) + ret := newQPictureIO(C.QPictureIO_new()) ret.isSubclass = true return ret } @@ -512,10 +496,8 @@ func NewQPictureIO() *QPictureIO { func NewQPictureIO2(ioDevice *QIODevice, format string) *QPictureIO { format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - var outptr_QPictureIO *C.QPictureIO = nil - C.QPictureIO_new2(ioDevice.cPointer(), format_Cstring, &outptr_QPictureIO) - ret := newQPictureIO(outptr_QPictureIO) + ret := newQPictureIO(C.QPictureIO_new2(ioDevice.cPointer(), format_Cstring)) ret.isSubclass = true return ret } @@ -528,16 +510,14 @@ func NewQPictureIO3(fileName string, format string) *QPictureIO { defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - var outptr_QPictureIO *C.QPictureIO = nil - C.QPictureIO_new3(fileName_ms, format_Cstring, &outptr_QPictureIO) - ret := newQPictureIO(outptr_QPictureIO) + ret := newQPictureIO(C.QPictureIO_new3(fileName_ms, format_Cstring)) ret.isSubclass = true return ret } func (this *QPictureIO) Picture() *QPicture { - return newQPicture(C.QPictureIO_Picture(this.h), nil) + return newQPicture(C.QPictureIO_Picture(this.h)) } func (this *QPictureIO) Status() int { @@ -550,7 +530,7 @@ func (this *QPictureIO) Format() string { } func (this *QPictureIO) IoDevice() *QIODevice { - return newQIODevice(C.QPictureIO_IoDevice(this.h), nil) + return newQIODevice(C.QPictureIO_IoDevice(this.h)) } func (this *QPictureIO) FileName() string { diff --git a/qt/gen_qpicture.h b/qt/gen_qpicture.h index 59d4e5bd..7da4ca9e 100644 --- a/qt/gen_qpicture.h +++ b/qt/gen_qpicture.h @@ -34,9 +34,10 @@ typedef struct QPoint QPoint; typedef struct QRect QRect; #endif -void QPicture_new(QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice); -void QPicture_new2(QPicture* param1, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice); -void QPicture_new3(int formatVersion, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice); +QPicture* QPicture_new(); +QPicture* QPicture_new2(QPicture* param1); +QPicture* QPicture_new3(int formatVersion); +void QPicture_virtbase(QPicture* src, QPaintDevice** outptr_QPaintDevice); bool QPicture_IsNull(const QPicture* self); int QPicture_DevType(const QPicture* self); unsigned int QPicture_Size(const QPicture* self); @@ -80,9 +81,9 @@ void QPicture_override_virtual_SharedPainter(void* self, intptr_t slot); QPainter* QPicture_virtualbase_SharedPainter(const void* self); void QPicture_Delete(QPicture* self, bool isSubclass); -void QPictureIO_new(QPictureIO** outptr_QPictureIO); -void QPictureIO_new2(QIODevice* ioDevice, const char* format, QPictureIO** outptr_QPictureIO); -void QPictureIO_new3(struct miqt_string fileName, const char* format, QPictureIO** outptr_QPictureIO); +QPictureIO* QPictureIO_new(); +QPictureIO* QPictureIO_new2(QIODevice* ioDevice, const char* format); +QPictureIO* QPictureIO_new3(struct miqt_string fileName, const char* format); QPicture* QPictureIO_Picture(const QPictureIO* self); int QPictureIO_Status(const QPictureIO* self); const char* QPictureIO_Format(const QPictureIO* self); diff --git a/qt/gen_qpictureformatplugin.cpp b/qt/gen_qpictureformatplugin.cpp index 5b5bb4b6..ac5884fa 100644 --- a/qt/gen_qpictureformatplugin.cpp +++ b/qt/gen_qpictureformatplugin.cpp @@ -301,16 +301,16 @@ public: }; -void QPictureFormatPlugin_new(QPictureFormatPlugin** outptr_QPictureFormatPlugin, QObject** outptr_QObject) { - MiqtVirtualQPictureFormatPlugin* ret = new MiqtVirtualQPictureFormatPlugin(); - *outptr_QPictureFormatPlugin = ret; - *outptr_QObject = static_cast(ret); +QPictureFormatPlugin* QPictureFormatPlugin_new() { + return new MiqtVirtualQPictureFormatPlugin(); } -void QPictureFormatPlugin_new2(QObject* parent, QPictureFormatPlugin** outptr_QPictureFormatPlugin, QObject** outptr_QObject) { - MiqtVirtualQPictureFormatPlugin* ret = new MiqtVirtualQPictureFormatPlugin(parent); - *outptr_QPictureFormatPlugin = ret; - *outptr_QObject = static_cast(ret); +QPictureFormatPlugin* QPictureFormatPlugin_new2(QObject* parent) { + return new MiqtVirtualQPictureFormatPlugin(parent); +} + +void QPictureFormatPlugin_virtbase(QPictureFormatPlugin* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QPictureFormatPlugin_MetaObject(const QPictureFormatPlugin* self) { diff --git a/qt/gen_qpictureformatplugin.go b/qt/gen_qpictureformatplugin.go index f486c0d4..ed2dadf8 100644 --- a/qt/gen_qpictureformatplugin.go +++ b/qt/gen_qpictureformatplugin.go @@ -35,42 +35,34 @@ func (this *QPictureFormatPlugin) UnsafePointer() unsafe.Pointer { } // newQPictureFormatPlugin constructs the type using only CGO pointers. -func newQPictureFormatPlugin(h *C.QPictureFormatPlugin, h_QObject *C.QObject) *QPictureFormatPlugin { +func newQPictureFormatPlugin(h *C.QPictureFormatPlugin) *QPictureFormatPlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QPictureFormatPlugin_virtbase(h, &outptr_QObject) + return &QPictureFormatPlugin{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQPictureFormatPlugin constructs the type using only unsafe pointers. -func UnsafeNewQPictureFormatPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QPictureFormatPlugin { - if h == nil { - return nil - } - - return &QPictureFormatPlugin{h: (*C.QPictureFormatPlugin)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQPictureFormatPlugin(h unsafe.Pointer) *QPictureFormatPlugin { + return newQPictureFormatPlugin((*C.QPictureFormatPlugin)(h)) } // NewQPictureFormatPlugin constructs a new QPictureFormatPlugin object. func NewQPictureFormatPlugin() *QPictureFormatPlugin { - var outptr_QPictureFormatPlugin *C.QPictureFormatPlugin = nil - var outptr_QObject *C.QObject = nil - C.QPictureFormatPlugin_new(&outptr_QPictureFormatPlugin, &outptr_QObject) - ret := newQPictureFormatPlugin(outptr_QPictureFormatPlugin, outptr_QObject) + ret := newQPictureFormatPlugin(C.QPictureFormatPlugin_new()) ret.isSubclass = true return ret } // NewQPictureFormatPlugin2 constructs a new QPictureFormatPlugin object. func NewQPictureFormatPlugin2(parent *QObject) *QPictureFormatPlugin { - var outptr_QPictureFormatPlugin *C.QPictureFormatPlugin = nil - var outptr_QObject *C.QObject = nil - C.QPictureFormatPlugin_new2(parent.cPointer(), &outptr_QPictureFormatPlugin, &outptr_QObject) - ret := newQPictureFormatPlugin(outptr_QPictureFormatPlugin, outptr_QObject) + ret := newQPictureFormatPlugin(C.QPictureFormatPlugin_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -215,7 +207,7 @@ func miqt_exec_callback_QPictureFormatPlugin_LoadPicture(self *C.QPictureFormatP filename_ret := C.GoStringN(filename_ms.data, C.int(int64(filename_ms.len))) C.free(unsafe.Pointer(filename_ms.data)) slotval2 := filename_ret - slotval3 := newQPicture(pic, nil) + slotval3 := newQPicture(pic) virtualReturn := gofunc((&QPictureFormatPlugin{h: self}).callVirtualBase_LoadPicture, slotval1, slotval2, slotval3) @@ -259,7 +251,7 @@ func miqt_exec_callback_QPictureFormatPlugin_SavePicture(self *C.QPictureFormatP filename_ret := C.GoStringN(filename_ms.data, C.int(int64(filename_ms.len))) C.free(unsafe.Pointer(filename_ms.data)) slotval2 := filename_ret - slotval3 := newQPicture(pic, nil) + slotval3 := newQPicture(pic) virtualReturn := gofunc((&QPictureFormatPlugin{h: self}).callVirtualBase_SavePicture, slotval1, slotval2, slotval3) @@ -370,7 +362,7 @@ func miqt_exec_callback_QPictureFormatPlugin_TimerEvent(self *C.QPictureFormatPl } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QPictureFormatPlugin{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -396,7 +388,7 @@ func miqt_exec_callback_QPictureFormatPlugin_ChildEvent(self *C.QPictureFormatPl } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QPictureFormatPlugin{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qpictureformatplugin.h b/qt/gen_qpictureformatplugin.h index e784514d..c18e8408 100644 --- a/qt/gen_qpictureformatplugin.h +++ b/qt/gen_qpictureformatplugin.h @@ -34,8 +34,9 @@ typedef struct QPictureFormatPlugin QPictureFormatPlugin; typedef struct QTimerEvent QTimerEvent; #endif -void QPictureFormatPlugin_new(QPictureFormatPlugin** outptr_QPictureFormatPlugin, QObject** outptr_QObject); -void QPictureFormatPlugin_new2(QObject* parent, QPictureFormatPlugin** outptr_QPictureFormatPlugin, QObject** outptr_QObject); +QPictureFormatPlugin* QPictureFormatPlugin_new(); +QPictureFormatPlugin* QPictureFormatPlugin_new2(QObject* parent); +void QPictureFormatPlugin_virtbase(QPictureFormatPlugin* src, QObject** outptr_QObject); QMetaObject* QPictureFormatPlugin_MetaObject(const QPictureFormatPlugin* self); void* QPictureFormatPlugin_Metacast(QPictureFormatPlugin* self, const char* param1); struct miqt_string QPictureFormatPlugin_Tr(const char* s); diff --git a/qt/gen_qpixelformat.cpp b/qt/gen_qpixelformat.cpp index a5747dfa..1fc72f38 100644 --- a/qt/gen_qpixelformat.cpp +++ b/qt/gen_qpixelformat.cpp @@ -3,29 +3,24 @@ #include "gen_qpixelformat.h" #include "_cgo_export.h" -void QPixelFormat_new(QPixelFormat** outptr_QPixelFormat) { - QPixelFormat* ret = new QPixelFormat(); - *outptr_QPixelFormat = ret; +QPixelFormat* QPixelFormat_new() { + return new QPixelFormat(); } -void QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, QPixelFormat** outptr_QPixelFormat) { - QPixelFormat* ret = new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation)); - *outptr_QPixelFormat = ret; +QPixelFormat* QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation) { + return new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation)); } -void QPixelFormat_new3(QPixelFormat* param1, QPixelFormat** outptr_QPixelFormat) { - QPixelFormat* ret = new QPixelFormat(*param1); - *outptr_QPixelFormat = ret; +QPixelFormat* QPixelFormat_new3(QPixelFormat* param1) { + return new QPixelFormat(*param1); } -void QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, QPixelFormat** outptr_QPixelFormat) { - QPixelFormat* ret = new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder)); - *outptr_QPixelFormat = ret; +QPixelFormat* QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder) { + return new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder)); } -void QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum, QPixelFormat** outptr_QPixelFormat) { - QPixelFormat* ret = new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder), static_cast(subEnum)); - *outptr_QPixelFormat = ret; +QPixelFormat* QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum) { + return new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder), static_cast(subEnum)); } int QPixelFormat_ColorModel(const QPixelFormat* self) { diff --git a/qt/gen_qpixelformat.go b/qt/gen_qpixelformat.go index 9ba57a83..0bb6dfe0 100644 --- a/qt/gen_qpixelformat.go +++ b/qt/gen_qpixelformat.go @@ -110,64 +110,51 @@ func newQPixelFormat(h *C.QPixelFormat) *QPixelFormat { if h == nil { return nil } + return &QPixelFormat{h: h} } // UnsafeNewQPixelFormat constructs the type using only unsafe pointers. func UnsafeNewQPixelFormat(h unsafe.Pointer) *QPixelFormat { - if h == nil { - return nil - } - - return &QPixelFormat{h: (*C.QPixelFormat)(h)} + return newQPixelFormat((*C.QPixelFormat)(h)) } // NewQPixelFormat constructs a new QPixelFormat object. func NewQPixelFormat() *QPixelFormat { - var outptr_QPixelFormat *C.QPixelFormat = nil - C.QPixelFormat_new(&outptr_QPixelFormat) - ret := newQPixelFormat(outptr_QPixelFormat) + ret := newQPixelFormat(C.QPixelFormat_new()) ret.isSubclass = true return ret } // NewQPixelFormat2 constructs a new QPixelFormat object. func NewQPixelFormat2(colorModel QPixelFormat__ColorModel, firstSize byte, secondSize byte, thirdSize byte, fourthSize byte, fifthSize byte, alphaSize byte, alphaUsage QPixelFormat__AlphaUsage, alphaPosition QPixelFormat__AlphaPosition, premultiplied QPixelFormat__AlphaPremultiplied, typeInterpretation QPixelFormat__TypeInterpretation) *QPixelFormat { - var outptr_QPixelFormat *C.QPixelFormat = nil - C.QPixelFormat_new2((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), &outptr_QPixelFormat) - ret := newQPixelFormat(outptr_QPixelFormat) + ret := newQPixelFormat(C.QPixelFormat_new2((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation))) ret.isSubclass = true return ret } // NewQPixelFormat3 constructs a new QPixelFormat object. func NewQPixelFormat3(param1 *QPixelFormat) *QPixelFormat { - var outptr_QPixelFormat *C.QPixelFormat = nil - C.QPixelFormat_new3(param1.cPointer(), &outptr_QPixelFormat) - ret := newQPixelFormat(outptr_QPixelFormat) + ret := newQPixelFormat(C.QPixelFormat_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQPixelFormat4 constructs a new QPixelFormat object. func NewQPixelFormat4(colorModel QPixelFormat__ColorModel, firstSize byte, secondSize byte, thirdSize byte, fourthSize byte, fifthSize byte, alphaSize byte, alphaUsage QPixelFormat__AlphaUsage, alphaPosition QPixelFormat__AlphaPosition, premultiplied QPixelFormat__AlphaPremultiplied, typeInterpretation QPixelFormat__TypeInterpretation, byteOrder QPixelFormat__ByteOrder) *QPixelFormat { - var outptr_QPixelFormat *C.QPixelFormat = nil - C.QPixelFormat_new4((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder), &outptr_QPixelFormat) - ret := newQPixelFormat(outptr_QPixelFormat) + ret := newQPixelFormat(C.QPixelFormat_new4((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder))) ret.isSubclass = true return ret } // NewQPixelFormat5 constructs a new QPixelFormat object. func NewQPixelFormat5(colorModel QPixelFormat__ColorModel, firstSize byte, secondSize byte, thirdSize byte, fourthSize byte, fifthSize byte, alphaSize byte, alphaUsage QPixelFormat__AlphaUsage, alphaPosition QPixelFormat__AlphaPosition, premultiplied QPixelFormat__AlphaPremultiplied, typeInterpretation QPixelFormat__TypeInterpretation, byteOrder QPixelFormat__ByteOrder, subEnum byte) *QPixelFormat { - var outptr_QPixelFormat *C.QPixelFormat = nil - C.QPixelFormat_new5((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder), (C.uchar)(subEnum), &outptr_QPixelFormat) - ret := newQPixelFormat(outptr_QPixelFormat) + ret := newQPixelFormat(C.QPixelFormat_new5((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder), (C.uchar)(subEnum))) ret.isSubclass = true return ret } diff --git a/qt/gen_qpixelformat.h b/qt/gen_qpixelformat.h index 7f1e405c..84a9ff38 100644 --- a/qt/gen_qpixelformat.h +++ b/qt/gen_qpixelformat.h @@ -20,11 +20,11 @@ class QPixelFormat; typedef struct QPixelFormat QPixelFormat; #endif -void QPixelFormat_new(QPixelFormat** outptr_QPixelFormat); -void QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, QPixelFormat** outptr_QPixelFormat); -void QPixelFormat_new3(QPixelFormat* param1, QPixelFormat** outptr_QPixelFormat); -void QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, QPixelFormat** outptr_QPixelFormat); -void QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum, QPixelFormat** outptr_QPixelFormat); +QPixelFormat* QPixelFormat_new(); +QPixelFormat* QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation); +QPixelFormat* QPixelFormat_new3(QPixelFormat* param1); +QPixelFormat* QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder); +QPixelFormat* QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum); int QPixelFormat_ColorModel(const QPixelFormat* self); unsigned char QPixelFormat_ChannelCount(const QPixelFormat* self); unsigned char QPixelFormat_RedSize(const QPixelFormat* self); diff --git a/qt/gen_qpixmap.cpp b/qt/gen_qpixmap.cpp index d911f4cc..5aa9fe4f 100644 --- a/qt/gen_qpixmap.cpp +++ b/qt/gen_qpixmap.cpp @@ -174,49 +174,39 @@ public: }; -void QPixmap_new(QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(); - *outptr_QPixmap = ret; - *outptr_QPaintDevice = static_cast(ret); +QPixmap* QPixmap_new() { + return new MiqtVirtualQPixmap(); } -void QPixmap_new2(int w, int h, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(static_cast(w), static_cast(h)); - *outptr_QPixmap = ret; - *outptr_QPaintDevice = static_cast(ret); +QPixmap* QPixmap_new2(int w, int h) { + return new MiqtVirtualQPixmap(static_cast(w), static_cast(h)); } -void QPixmap_new3(QSize* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(*param1); - *outptr_QPixmap = ret; - *outptr_QPaintDevice = static_cast(ret); +QPixmap* QPixmap_new3(QSize* param1) { + return new MiqtVirtualQPixmap(*param1); } -void QPixmap_new4(struct miqt_string fileName, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { +QPixmap* QPixmap_new4(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(fileName_QString); - *outptr_QPixmap = ret; - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPixmap(fileName_QString); } -void QPixmap_new5(QPixmap* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(*param1); - *outptr_QPixmap = ret; - *outptr_QPaintDevice = static_cast(ret); +QPixmap* QPixmap_new5(QPixmap* param1) { + return new MiqtVirtualQPixmap(*param1); } -void QPixmap_new6(struct miqt_string fileName, const char* format, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { +QPixmap* QPixmap_new6(struct miqt_string fileName, const char* format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(fileName_QString, format); - *outptr_QPixmap = ret; - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPixmap(fileName_QString, format); } -void QPixmap_new7(struct miqt_string fileName, const char* format, int flags, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { +QPixmap* QPixmap_new7(struct miqt_string fileName, const char* format, int flags) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(fileName_QString, format, static_cast(flags)); - *outptr_QPixmap = ret; - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPixmap(fileName_QString, format, static_cast(flags)); +} + +void QPixmap_virtbase(QPixmap* src, QPaintDevice** outptr_QPaintDevice) { + *outptr_QPaintDevice = static_cast(src); } void QPixmap_OperatorAssign(QPixmap* self, QPixmap* param1) { diff --git a/qt/gen_qpixmap.go b/qt/gen_qpixmap.go index e3035980..8f492d13 100644 --- a/qt/gen_qpixmap.go +++ b/qt/gen_qpixmap.go @@ -35,53 +35,42 @@ func (this *QPixmap) UnsafePointer() unsafe.Pointer { } // newQPixmap constructs the type using only CGO pointers. -func newQPixmap(h *C.QPixmap, h_QPaintDevice *C.QPaintDevice) *QPixmap { +func newQPixmap(h *C.QPixmap) *QPixmap { if h == nil { return nil } + var outptr_QPaintDevice *C.QPaintDevice = nil + C.QPixmap_virtbase(h, &outptr_QPaintDevice) + return &QPixmap{h: h, - QPaintDevice: newQPaintDevice(h_QPaintDevice)} + QPaintDevice: newQPaintDevice(outptr_QPaintDevice)} } // UnsafeNewQPixmap constructs the type using only unsafe pointers. -func UnsafeNewQPixmap(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPixmap { - if h == nil { - return nil - } - - return &QPixmap{h: (*C.QPixmap)(h), - QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} +func UnsafeNewQPixmap(h unsafe.Pointer) *QPixmap { + return newQPixmap((*C.QPixmap)(h)) } // NewQPixmap constructs a new QPixmap object. func NewQPixmap() *QPixmap { - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPixmap_new(&outptr_QPixmap, &outptr_QPaintDevice) - ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret := newQPixmap(C.QPixmap_new()) ret.isSubclass = true return ret } // NewQPixmap2 constructs a new QPixmap object. func NewQPixmap2(w int, h int) *QPixmap { - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPixmap_new2((C.int)(w), (C.int)(h), &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret := newQPixmap(C.QPixmap_new2((C.int)(w), (C.int)(h))) ret.isSubclass = true return ret } // NewQPixmap3 constructs a new QPixmap object. func NewQPixmap3(param1 *QSize) *QPixmap { - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPixmap_new3(param1.cPointer(), &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret := newQPixmap(C.QPixmap_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -92,22 +81,16 @@ func NewQPixmap4(fileName string) *QPixmap { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPixmap_new4(fileName_ms, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret := newQPixmap(C.QPixmap_new4(fileName_ms)) ret.isSubclass = true return ret } // NewQPixmap5 constructs a new QPixmap object. func NewQPixmap5(param1 *QPixmap) *QPixmap { - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPixmap_new5(param1.cPointer(), &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret := newQPixmap(C.QPixmap_new5(param1.cPointer())) ret.isSubclass = true return ret } @@ -120,11 +103,8 @@ func NewQPixmap6(fileName string, format string) *QPixmap { defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPixmap_new6(fileName_ms, format_Cstring, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret := newQPixmap(C.QPixmap_new6(fileName_ms, format_Cstring)) ret.isSubclass = true return ret } @@ -137,11 +117,8 @@ func NewQPixmap7(fileName string, format string, flags ImageConversionFlag) *QPi defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPixmap_new7(fileName_ms, format_Cstring, (C.int)(flags), &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret := newQPixmap(C.QPixmap_new7(fileName_ms, format_Cstring, (C.int)(flags))) ret.isSubclass = true return ret } @@ -203,7 +180,7 @@ func (this *QPixmap) Fill3(device *QPaintDevice, xofs int, yofs int) { } func (this *QPixmap) Mask() *QBitmap { - _goptr := newQBitmap(C.QPixmap_Mask(this.h), nil, nil) + _goptr := newQBitmap(C.QPixmap_Mask(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -229,61 +206,61 @@ func (this *QPixmap) HasAlphaChannel() bool { } func (this *QPixmap) CreateHeuristicMask() *QBitmap { - _goptr := newQBitmap(C.QPixmap_CreateHeuristicMask(this.h), nil, nil) + _goptr := newQBitmap(C.QPixmap_CreateHeuristicMask(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) CreateMaskFromColor(maskColor *QColor) *QBitmap { - _goptr := newQBitmap(C.QPixmap_CreateMaskFromColor(this.h, maskColor.cPointer()), nil, nil) + _goptr := newQBitmap(C.QPixmap_CreateMaskFromColor(this.h, maskColor.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWindow(param1 uintptr) *QPixmap { - _goptr := newQPixmap(C.QPixmap_GrabWindow((C.uintptr_t)(param1)), nil) + _goptr := newQPixmap(C.QPixmap_GrabWindow((C.uintptr_t)(param1))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWidget(widget *QObject, rect *QRect) *QPixmap { - _goptr := newQPixmap(C.QPixmap_GrabWidget(widget.cPointer(), rect.cPointer()), nil) + _goptr := newQPixmap(C.QPixmap_GrabWidget(widget.cPointer(), rect.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWidgetWithWidget(widget *QObject) *QPixmap { - _goptr := newQPixmap(C.QPixmap_GrabWidgetWithWidget(widget.cPointer()), nil) + _goptr := newQPixmap(C.QPixmap_GrabWidgetWithWidget(widget.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled(w int, h int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Scaled(this.h, (C.int)(w), (C.int)(h)), nil) + _goptr := newQPixmap(C.QPixmap_Scaled(this.h, (C.int)(w), (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledWithQSize(s *QSize) *QPixmap { - _goptr := newQPixmap(C.QPixmap_ScaledWithQSize(this.h, s.cPointer()), nil) + _goptr := newQPixmap(C.QPixmap_ScaledWithQSize(this.h, s.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToWidth(w int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_ScaledToWidth(this.h, (C.int)(w)), nil) + _goptr := newQPixmap(C.QPixmap_ScaledToWidth(this.h, (C.int)(w))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToHeight(h int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_ScaledToHeight(this.h, (C.int)(h)), nil) + _goptr := newQPixmap(C.QPixmap_ScaledToHeight(this.h, (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Transformed(param1 *QMatrix) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Transformed(this.h, param1.cPointer()), nil) + _goptr := newQPixmap(C.QPixmap_Transformed(this.h, param1.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -295,7 +272,7 @@ func QPixmap_TrueMatrix(m *QMatrix, w int, h int) *QMatrix { } func (this *QPixmap) TransformedWithQTransform(param1 *QTransform) *QPixmap { - _goptr := newQPixmap(C.QPixmap_TransformedWithQTransform(this.h, param1.cPointer()), nil) + _goptr := newQPixmap(C.QPixmap_TransformedWithQTransform(this.h, param1.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -307,19 +284,19 @@ func QPixmap_TrueMatrix2(m *QTransform, w int, h int) *QTransform { } func (this *QPixmap) ToImage() *QImage { - _goptr := newQImage(C.QPixmap_ToImage(this.h), nil) + _goptr := newQImage(C.QPixmap_ToImage(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImage(image *QImage) *QPixmap { - _goptr := newQPixmap(C.QPixmap_FromImage(image.cPointer()), nil) + _goptr := newQPixmap(C.QPixmap_FromImage(image.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImageReader(imageReader *QImageReader) *QPixmap { - _goptr := newQPixmap(C.QPixmap_FromImageReader(imageReader.cPointer()), nil) + _goptr := newQPixmap(C.QPixmap_FromImageReader(imageReader.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -360,13 +337,13 @@ func (this *QPixmap) ConvertFromImage(img *QImage) bool { } func (this *QPixmap) Copy(x int, y int, width int, height int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Copy(this.h, (C.int)(x), (C.int)(y), (C.int)(width), (C.int)(height)), nil) + _goptr := newQPixmap(C.QPixmap_Copy(this.h, (C.int)(x), (C.int)(y), (C.int)(width), (C.int)(height))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Copy2() *QPixmap { - _goptr := newQPixmap(C.QPixmap_Copy2(this.h), nil) + _goptr := newQPixmap(C.QPixmap_Copy2(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -408,121 +385,121 @@ func (this *QPixmap) Fill1(fillColor *QColor) { } func (this *QPixmap) CreateHeuristicMask1(clipTight bool) *QBitmap { - _goptr := newQBitmap(C.QPixmap_CreateHeuristicMask1(this.h, (C.bool)(clipTight)), nil, nil) + _goptr := newQBitmap(C.QPixmap_CreateHeuristicMask1(this.h, (C.bool)(clipTight))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) CreateMaskFromColor2(maskColor *QColor, mode MaskMode) *QBitmap { - _goptr := newQBitmap(C.QPixmap_CreateMaskFromColor2(this.h, maskColor.cPointer(), (C.int)(mode)), nil, nil) + _goptr := newQBitmap(C.QPixmap_CreateMaskFromColor2(this.h, maskColor.cPointer(), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWindow2(param1 uintptr, x int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_GrabWindow2((C.uintptr_t)(param1), (C.int)(x)), nil) + _goptr := newQPixmap(C.QPixmap_GrabWindow2((C.uintptr_t)(param1), (C.int)(x))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWindow3(param1 uintptr, x int, y int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_GrabWindow3((C.uintptr_t)(param1), (C.int)(x), (C.int)(y)), nil) + _goptr := newQPixmap(C.QPixmap_GrabWindow3((C.uintptr_t)(param1), (C.int)(x), (C.int)(y))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWindow4(param1 uintptr, x int, y int, w int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_GrabWindow4((C.uintptr_t)(param1), (C.int)(x), (C.int)(y), (C.int)(w)), nil) + _goptr := newQPixmap(C.QPixmap_GrabWindow4((C.uintptr_t)(param1), (C.int)(x), (C.int)(y), (C.int)(w))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWindow5(param1 uintptr, x int, y int, w int, h int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_GrabWindow5((C.uintptr_t)(param1), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h)), nil) + _goptr := newQPixmap(C.QPixmap_GrabWindow5((C.uintptr_t)(param1), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWidget2(widget *QObject, x int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_GrabWidget2(widget.cPointer(), (C.int)(x)), nil) + _goptr := newQPixmap(C.QPixmap_GrabWidget2(widget.cPointer(), (C.int)(x))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWidget3(widget *QObject, x int, y int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_GrabWidget3(widget.cPointer(), (C.int)(x), (C.int)(y)), nil) + _goptr := newQPixmap(C.QPixmap_GrabWidget3(widget.cPointer(), (C.int)(x), (C.int)(y))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWidget4(widget *QObject, x int, y int, w int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_GrabWidget4(widget.cPointer(), (C.int)(x), (C.int)(y), (C.int)(w)), nil) + _goptr := newQPixmap(C.QPixmap_GrabWidget4(widget.cPointer(), (C.int)(x), (C.int)(y), (C.int)(w))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_GrabWidget5(widget *QObject, x int, y int, w int, h int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_GrabWidget5(widget.cPointer(), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h)), nil) + _goptr := newQPixmap(C.QPixmap_GrabWidget5(widget.cPointer(), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled3(w int, h int, aspectMode AspectRatioMode) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Scaled3(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode)), nil) + _goptr := newQPixmap(C.QPixmap_Scaled3(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled4(w int, h int, aspectMode AspectRatioMode, mode TransformationMode) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Scaled4(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QPixmap_Scaled4(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled2(s *QSize, aspectMode AspectRatioMode) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Scaled2(this.h, s.cPointer(), (C.int)(aspectMode)), nil) + _goptr := newQPixmap(C.QPixmap_Scaled2(this.h, s.cPointer(), (C.int)(aspectMode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled32(s *QSize, aspectMode AspectRatioMode, mode TransformationMode) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Scaled32(this.h, s.cPointer(), (C.int)(aspectMode), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QPixmap_Scaled32(this.h, s.cPointer(), (C.int)(aspectMode), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToWidth2(w int, mode TransformationMode) *QPixmap { - _goptr := newQPixmap(C.QPixmap_ScaledToWidth2(this.h, (C.int)(w), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QPixmap_ScaledToWidth2(this.h, (C.int)(w), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToHeight2(h int, mode TransformationMode) *QPixmap { - _goptr := newQPixmap(C.QPixmap_ScaledToHeight2(this.h, (C.int)(h), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QPixmap_ScaledToHeight2(this.h, (C.int)(h), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Transformed2(param1 *QMatrix, mode TransformationMode) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Transformed2(this.h, param1.cPointer(), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QPixmap_Transformed2(this.h, param1.cPointer(), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Transformed22(param1 *QTransform, mode TransformationMode) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Transformed22(this.h, param1.cPointer(), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QPixmap_Transformed22(this.h, param1.cPointer(), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImage2(image *QImage, flags ImageConversionFlag) *QPixmap { - _goptr := newQPixmap(C.QPixmap_FromImage2(image.cPointer(), (C.int)(flags)), nil) + _goptr := newQPixmap(C.QPixmap_FromImage2(image.cPointer(), (C.int)(flags))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImageReader2(imageReader *QImageReader, flags ImageConversionFlag) *QPixmap { - _goptr := newQPixmap(C.QPixmap_FromImageReader2(imageReader.cPointer(), (C.int)(flags)), nil) + _goptr := newQPixmap(C.QPixmap_FromImageReader2(imageReader.cPointer(), (C.int)(flags))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -614,7 +591,7 @@ func (this *QPixmap) ConvertFromImage2(img *QImage, flags ImageConversionFlag) b } func (this *QPixmap) Copy1(rect *QRect) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Copy1(this.h, rect.cPointer()), nil) + _goptr := newQPixmap(C.QPixmap_Copy1(this.h, rect.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/gen_qpixmap.h b/qt/gen_qpixmap.h index e4363c13..87bea52a 100644 --- a/qt/gen_qpixmap.h +++ b/qt/gen_qpixmap.h @@ -50,13 +50,14 @@ typedef struct QSize QSize; typedef struct QTransform QTransform; #endif -void QPixmap_new(QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QPixmap_new2(int w, int h, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QPixmap_new3(QSize* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QPixmap_new4(struct miqt_string fileName, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QPixmap_new5(QPixmap* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QPixmap_new6(struct miqt_string fileName, const char* format, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QPixmap_new7(struct miqt_string fileName, const char* format, int flags, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +QPixmap* QPixmap_new(); +QPixmap* QPixmap_new2(int w, int h); +QPixmap* QPixmap_new3(QSize* param1); +QPixmap* QPixmap_new4(struct miqt_string fileName); +QPixmap* QPixmap_new5(QPixmap* param1); +QPixmap* QPixmap_new6(struct miqt_string fileName, const char* format); +QPixmap* QPixmap_new7(struct miqt_string fileName, const char* format, int flags); +void QPixmap_virtbase(QPixmap* src, QPaintDevice** outptr_QPaintDevice); void QPixmap_OperatorAssign(QPixmap* self, QPixmap* param1); void QPixmap_Swap(QPixmap* self, QPixmap* other); bool QPixmap_IsNull(const QPixmap* self); diff --git a/qt/gen_qpixmapcache.cpp b/qt/gen_qpixmapcache.cpp index 74b020e9..85ff64d1 100644 --- a/qt/gen_qpixmapcache.cpp +++ b/qt/gen_qpixmapcache.cpp @@ -69,14 +69,12 @@ void QPixmapCache_Delete(QPixmapCache* self, bool isSubclass) { } } -void QPixmapCache__Key_new(QPixmapCache__Key** outptr_QPixmapCache__Key) { - QPixmapCache::Key* ret = new QPixmapCache::Key(); - *outptr_QPixmapCache__Key = ret; +QPixmapCache__Key* QPixmapCache__Key_new() { + return new QPixmapCache::Key(); } -void QPixmapCache__Key_new2(QPixmapCache__Key* other, QPixmapCache__Key** outptr_QPixmapCache__Key) { - QPixmapCache::Key* ret = new QPixmapCache::Key(*other); - *outptr_QPixmapCache__Key = ret; +QPixmapCache__Key* QPixmapCache__Key_new2(QPixmapCache__Key* other) { + return new QPixmapCache::Key(*other); } bool QPixmapCache__Key_OperatorEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key) { diff --git a/qt/gen_qpixmapcache.go b/qt/gen_qpixmapcache.go index d70fa691..38aafce0 100644 --- a/qt/gen_qpixmapcache.go +++ b/qt/gen_qpixmapcache.go @@ -37,16 +37,13 @@ func newQPixmapCache(h *C.QPixmapCache) *QPixmapCache { if h == nil { return nil } + return &QPixmapCache{h: h} } // UnsafeNewQPixmapCache constructs the type using only unsafe pointers. func UnsafeNewQPixmapCache(h unsafe.Pointer) *QPixmapCache { - if h == nil { - return nil - } - - return &QPixmapCache{h: (*C.QPixmapCache)(h)} + return newQPixmapCache((*C.QPixmapCache)(h)) } func QPixmapCache_CacheLimit() int { @@ -62,7 +59,7 @@ func QPixmapCache_Find(key string) *QPixmap { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - return newQPixmap(C.QPixmapCache_Find(key_ms), nil) + return newQPixmap(C.QPixmapCache_Find(key_ms)) } func QPixmapCache_Find2(key string, pixmap *QPixmap) bool { @@ -157,34 +154,27 @@ func newQPixmapCache__Key(h *C.QPixmapCache__Key) *QPixmapCache__Key { if h == nil { return nil } + return &QPixmapCache__Key{h: h} } // UnsafeNewQPixmapCache__Key constructs the type using only unsafe pointers. func UnsafeNewQPixmapCache__Key(h unsafe.Pointer) *QPixmapCache__Key { - if h == nil { - return nil - } - - return &QPixmapCache__Key{h: (*C.QPixmapCache__Key)(h)} + return newQPixmapCache__Key((*C.QPixmapCache__Key)(h)) } // NewQPixmapCache__Key constructs a new QPixmapCache::Key object. func NewQPixmapCache__Key() *QPixmapCache__Key { - var outptr_QPixmapCache__Key *C.QPixmapCache__Key = nil - C.QPixmapCache__Key_new(&outptr_QPixmapCache__Key) - ret := newQPixmapCache__Key(outptr_QPixmapCache__Key) + ret := newQPixmapCache__Key(C.QPixmapCache__Key_new()) ret.isSubclass = true return ret } // NewQPixmapCache__Key2 constructs a new QPixmapCache::Key object. func NewQPixmapCache__Key2(other *QPixmapCache__Key) *QPixmapCache__Key { - var outptr_QPixmapCache__Key *C.QPixmapCache__Key = nil - C.QPixmapCache__Key_new2(other.cPointer(), &outptr_QPixmapCache__Key) - ret := newQPixmapCache__Key(outptr_QPixmapCache__Key) + ret := newQPixmapCache__Key(C.QPixmapCache__Key_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qpixmapcache.h b/qt/gen_qpixmapcache.h index d63ba993..bed57df3 100644 --- a/qt/gen_qpixmapcache.h +++ b/qt/gen_qpixmapcache.h @@ -42,8 +42,8 @@ void QPixmapCache_RemoveWithKey(QPixmapCache__Key* key); void QPixmapCache_Clear(); void QPixmapCache_Delete(QPixmapCache* self, bool isSubclass); -void QPixmapCache__Key_new(QPixmapCache__Key** outptr_QPixmapCache__Key); -void QPixmapCache__Key_new2(QPixmapCache__Key* other, QPixmapCache__Key** outptr_QPixmapCache__Key); +QPixmapCache__Key* QPixmapCache__Key_new(); +QPixmapCache__Key* QPixmapCache__Key_new2(QPixmapCache__Key* other); bool QPixmapCache__Key_OperatorEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key); bool QPixmapCache__Key_OperatorNotEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key); void QPixmapCache__Key_OperatorAssign(QPixmapCache__Key* self, QPixmapCache__Key* other); diff --git a/qt/gen_qplaintextedit.cpp b/qt/gen_qplaintextedit.cpp index a3e77c1b..59b12dc3 100644 --- a/qt/gen_qplaintextedit.cpp +++ b/qt/gen_qplaintextedit.cpp @@ -898,46 +898,26 @@ public: }; -void QPlainTextEdit_new(QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(parent); - *outptr_QPlainTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPlainTextEdit* QPlainTextEdit_new(QWidget* parent) { + return new MiqtVirtualQPlainTextEdit(parent); } -void QPlainTextEdit_new2(QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(); - *outptr_QPlainTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPlainTextEdit* QPlainTextEdit_new2() { + return new MiqtVirtualQPlainTextEdit(); } -void QPlainTextEdit_new3(struct miqt_string text, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QPlainTextEdit* QPlainTextEdit_new3(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(text_QString); - *outptr_QPlainTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPlainTextEdit(text_QString); } -void QPlainTextEdit_new4(struct miqt_string text, QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QPlainTextEdit* QPlainTextEdit_new4(struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(text_QString, parent); - *outptr_QPlainTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPlainTextEdit(text_QString, parent); +} + +void QPlainTextEdit_virtbase(QPlainTextEdit* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); } QMetaObject* QPlainTextEdit_MetaObject(const QPlainTextEdit* self) { @@ -2033,11 +2013,12 @@ public: }; -void QPlainTextDocumentLayout_new(QTextDocument* document, QPlainTextDocumentLayout** outptr_QPlainTextDocumentLayout, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject) { - MiqtVirtualQPlainTextDocumentLayout* ret = new MiqtVirtualQPlainTextDocumentLayout(document); - *outptr_QPlainTextDocumentLayout = ret; - *outptr_QAbstractTextDocumentLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPlainTextDocumentLayout* QPlainTextDocumentLayout_new(QTextDocument* document) { + return new MiqtVirtualQPlainTextDocumentLayout(document); +} + +void QPlainTextDocumentLayout_virtbase(QPlainTextDocumentLayout* src, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout) { + *outptr_QAbstractTextDocumentLayout = static_cast(src); } QMetaObject* QPlainTextDocumentLayout_MetaObject(const QPlainTextDocumentLayout* self) { diff --git a/qt/gen_qplaintextedit.go b/qt/gen_qplaintextedit.go index 6a3adc8d..39227194 100644 --- a/qt/gen_qplaintextedit.go +++ b/qt/gen_qplaintextedit.go @@ -42,50 +42,34 @@ func (this *QPlainTextEdit) UnsafePointer() unsafe.Pointer { } // newQPlainTextEdit constructs the type using only CGO pointers. -func newQPlainTextEdit(h *C.QPlainTextEdit, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPlainTextEdit { +func newQPlainTextEdit(h *C.QPlainTextEdit) *QPlainTextEdit { if h == nil { return nil } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QPlainTextEdit_virtbase(h, &outptr_QAbstractScrollArea) + return &QPlainTextEdit{h: h, - QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractScrollArea: newQAbstractScrollArea(outptr_QAbstractScrollArea)} } // UnsafeNewQPlainTextEdit constructs the type using only unsafe pointers. -func UnsafeNewQPlainTextEdit(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPlainTextEdit { - if h == nil { - return nil - } - - return &QPlainTextEdit{h: (*C.QPlainTextEdit)(h), - QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQPlainTextEdit(h unsafe.Pointer) *QPlainTextEdit { + return newQPlainTextEdit((*C.QPlainTextEdit)(h)) } // NewQPlainTextEdit constructs a new QPlainTextEdit object. func NewQPlainTextEdit(parent *QWidget) *QPlainTextEdit { - var outptr_QPlainTextEdit *C.QPlainTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPlainTextEdit_new(parent.cPointer(), &outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPlainTextEdit(C.QPlainTextEdit_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQPlainTextEdit2 constructs a new QPlainTextEdit object. func NewQPlainTextEdit2() *QPlainTextEdit { - var outptr_QPlainTextEdit *C.QPlainTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPlainTextEdit_new2(&outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPlainTextEdit(C.QPlainTextEdit_new2()) ret.isSubclass = true return ret } @@ -96,15 +80,8 @@ func NewQPlainTextEdit3(text string) *QPlainTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QPlainTextEdit *C.QPlainTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPlainTextEdit_new3(text_ms, &outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPlainTextEdit(C.QPlainTextEdit_new3(text_ms)) ret.isSubclass = true return ret } @@ -115,15 +92,8 @@ func NewQPlainTextEdit4(text string, parent *QWidget) *QPlainTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QPlainTextEdit *C.QPlainTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPlainTextEdit_new4(text_ms, parent.cPointer(), &outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPlainTextEdit(C.QPlainTextEdit_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -161,7 +131,7 @@ func (this *QPlainTextEdit) SetDocument(document *QTextDocument) { } func (this *QPlainTextEdit) Document() *QTextDocument { - return newQTextDocument(C.QPlainTextEdit_Document(this.h), nil) + return newQTextDocument(C.QPlainTextEdit_Document(this.h)) } func (this *QPlainTextEdit) SetPlaceholderText(placeholderText string) { @@ -214,7 +184,7 @@ func (this *QPlainTextEdit) SetCurrentCharFormat(format *QTextCharFormat) { } func (this *QPlainTextEdit) CurrentCharFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QPlainTextEdit_CurrentCharFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QPlainTextEdit_CurrentCharFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -324,11 +294,11 @@ func (this *QPlainTextEdit) LoadResource(typeVal int, name *QUrl) *QVariant { } func (this *QPlainTextEdit) CreateStandardContextMenu() *QMenu { - return newQMenu(C.QPlainTextEdit_CreateStandardContextMenu(this.h), nil, nil, nil) + return newQMenu(C.QPlainTextEdit_CreateStandardContextMenu(this.h)) } func (this *QPlainTextEdit) CreateStandardContextMenuWithPosition(position *QPoint) *QMenu { - return newQMenu(C.QPlainTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer()), nil, nil, nil) + return newQMenu(C.QPlainTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer())) } func (this *QPlainTextEdit) CursorForPosition(pos *QPoint) *QTextCursor { @@ -865,7 +835,7 @@ func miqt_exec_callback_QPlainTextEdit_TimerEvent(self *C.QPlainTextEdit, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -891,7 +861,7 @@ func miqt_exec_callback_QPlainTextEdit_KeyPressEvent(self *C.QPlainTextEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -917,7 +887,7 @@ func miqt_exec_callback_QPlainTextEdit_KeyReleaseEvent(self *C.QPlainTextEdit, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -943,7 +913,7 @@ func miqt_exec_callback_QPlainTextEdit_ResizeEvent(self *C.QPlainTextEdit, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -969,7 +939,7 @@ func miqt_exec_callback_QPlainTextEdit_PaintEvent(self *C.QPlainTextEdit, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -995,7 +965,7 @@ func miqt_exec_callback_QPlainTextEdit_MousePressEvent(self *C.QPlainTextEdit, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1021,7 +991,7 @@ func miqt_exec_callback_QPlainTextEdit_MouseMoveEvent(self *C.QPlainTextEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1047,7 +1017,7 @@ func miqt_exec_callback_QPlainTextEdit_MouseReleaseEvent(self *C.QPlainTextEdit, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1073,7 +1043,7 @@ func miqt_exec_callback_QPlainTextEdit_MouseDoubleClickEvent(self *C.QPlainTextE } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1127,7 +1097,7 @@ func miqt_exec_callback_QPlainTextEdit_ContextMenuEvent(self *C.QPlainTextEdit, } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(e, nil, nil) + slotval1 := newQContextMenuEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1153,7 +1123,7 @@ func miqt_exec_callback_QPlainTextEdit_DragEnterEvent(self *C.QPlainTextEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(e, nil, nil, nil) + slotval1 := newQDragEnterEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1179,7 +1149,7 @@ func miqt_exec_callback_QPlainTextEdit_DragLeaveEvent(self *C.QPlainTextEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(e, nil) + slotval1 := newQDragLeaveEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1205,7 +1175,7 @@ func miqt_exec_callback_QPlainTextEdit_DragMoveEvent(self *C.QPlainTextEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(e, nil, nil) + slotval1 := newQDragMoveEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1231,7 +1201,7 @@ func miqt_exec_callback_QPlainTextEdit_DropEvent(self *C.QPlainTextEdit, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(e, nil) + slotval1 := newQDropEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1257,7 +1227,7 @@ func miqt_exec_callback_QPlainTextEdit_FocusInEvent(self *C.QPlainTextEdit, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1283,7 +1253,7 @@ func miqt_exec_callback_QPlainTextEdit_FocusOutEvent(self *C.QPlainTextEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1309,7 +1279,7 @@ func miqt_exec_callback_QPlainTextEdit_ShowEvent(self *C.QPlainTextEdit, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1361,7 +1331,7 @@ func miqt_exec_callback_QPlainTextEdit_WheelEvent(self *C.QPlainTextEdit, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1369,7 +1339,7 @@ func miqt_exec_callback_QPlainTextEdit_WheelEvent(self *C.QPlainTextEdit, cb C.i func (this *QPlainTextEdit) callVirtualBase_CreateMimeDataFromSelection() *QMimeData { - return newQMimeData(C.QPlainTextEdit_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h)), nil) + return newQMimeData(C.QPlainTextEdit_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h))) } func (this *QPlainTextEdit) OnCreateMimeDataFromSelection(slot func(super func() *QMimeData) *QMimeData) { @@ -1412,7 +1382,7 @@ func miqt_exec_callback_QPlainTextEdit_CanInsertFromMimeData(self *C.QPlainTextE } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(source, nil) + slotval1 := newQMimeData(source) virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) @@ -1440,7 +1410,7 @@ func miqt_exec_callback_QPlainTextEdit_InsertFromMimeData(self *C.QPlainTextEdit } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(source, nil) + slotval1 := newQMimeData(source) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_InsertFromMimeData, slotval1) @@ -1466,7 +1436,7 @@ func miqt_exec_callback_QPlainTextEdit_InputMethodEvent(self *C.QPlainTextEdit, } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -1600,7 +1570,7 @@ func miqt_exec_callback_QPlainTextEdit_SetupViewport(self *C.QPlainTextEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(viewport, nil, nil) + slotval1 := newQWidget(viewport) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -1726,32 +1696,26 @@ func (this *QPlainTextDocumentLayout) UnsafePointer() unsafe.Pointer { } // newQPlainTextDocumentLayout constructs the type using only CGO pointers. -func newQPlainTextDocumentLayout(h *C.QPlainTextDocumentLayout, h_QAbstractTextDocumentLayout *C.QAbstractTextDocumentLayout, h_QObject *C.QObject) *QPlainTextDocumentLayout { +func newQPlainTextDocumentLayout(h *C.QPlainTextDocumentLayout) *QPlainTextDocumentLayout { if h == nil { return nil } + var outptr_QAbstractTextDocumentLayout *C.QAbstractTextDocumentLayout = nil + C.QPlainTextDocumentLayout_virtbase(h, &outptr_QAbstractTextDocumentLayout) + return &QPlainTextDocumentLayout{h: h, - QAbstractTextDocumentLayout: newQAbstractTextDocumentLayout(h_QAbstractTextDocumentLayout, h_QObject)} + QAbstractTextDocumentLayout: newQAbstractTextDocumentLayout(outptr_QAbstractTextDocumentLayout)} } // UnsafeNewQPlainTextDocumentLayout constructs the type using only unsafe pointers. -func UnsafeNewQPlainTextDocumentLayout(h unsafe.Pointer, h_QAbstractTextDocumentLayout unsafe.Pointer, h_QObject unsafe.Pointer) *QPlainTextDocumentLayout { - if h == nil { - return nil - } - - return &QPlainTextDocumentLayout{h: (*C.QPlainTextDocumentLayout)(h), - QAbstractTextDocumentLayout: UnsafeNewQAbstractTextDocumentLayout(h_QAbstractTextDocumentLayout, h_QObject)} +func UnsafeNewQPlainTextDocumentLayout(h unsafe.Pointer) *QPlainTextDocumentLayout { + return newQPlainTextDocumentLayout((*C.QPlainTextDocumentLayout)(h)) } // NewQPlainTextDocumentLayout constructs a new QPlainTextDocumentLayout object. func NewQPlainTextDocumentLayout(document *QTextDocument) *QPlainTextDocumentLayout { - var outptr_QPlainTextDocumentLayout *C.QPlainTextDocumentLayout = nil - var outptr_QAbstractTextDocumentLayout *C.QAbstractTextDocumentLayout = nil - var outptr_QObject *C.QObject = nil - C.QPlainTextDocumentLayout_new(document.cPointer(), &outptr_QPlainTextDocumentLayout, &outptr_QAbstractTextDocumentLayout, &outptr_QObject) - ret := newQPlainTextDocumentLayout(outptr_QPlainTextDocumentLayout, outptr_QAbstractTextDocumentLayout, outptr_QObject) + ret := newQPlainTextDocumentLayout(C.QPlainTextDocumentLayout_new(document.cPointer())) ret.isSubclass = true return ret } @@ -2006,7 +1970,7 @@ func miqt_exec_callback_QPlainTextDocumentLayout_FrameBoundingRect(self *C.QPlai } // Convert all CABI parameters to Go parameters - slotval1 := newQTextFrame(param1, nil, nil) + slotval1 := newQTextFrame(param1) virtualReturn := gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_FrameBoundingRect, slotval1) diff --git a/qt/gen_qplaintextedit.h b/qt/gen_qplaintextedit.h index f9b6bbc2..ec72f022 100644 --- a/qt/gen_qplaintextedit.h +++ b/qt/gen_qplaintextedit.h @@ -120,10 +120,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QPlainTextEdit_new(QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPlainTextEdit_new2(QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPlainTextEdit_new3(struct miqt_string text, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPlainTextEdit_new4(struct miqt_string text, QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QPlainTextEdit* QPlainTextEdit_new(QWidget* parent); +QPlainTextEdit* QPlainTextEdit_new2(); +QPlainTextEdit* QPlainTextEdit_new3(struct miqt_string text); +QPlainTextEdit* QPlainTextEdit_new4(struct miqt_string text, QWidget* parent); +void QPlainTextEdit_virtbase(QPlainTextEdit* src, QAbstractScrollArea** outptr_QAbstractScrollArea); QMetaObject* QPlainTextEdit_MetaObject(const QPlainTextEdit* self); void* QPlainTextEdit_Metacast(QPlainTextEdit* self, const char* param1); struct miqt_string QPlainTextEdit_Tr(const char* s); @@ -326,7 +327,8 @@ void QPlainTextEdit_override_virtual_ViewportSizeHint(void* self, intptr_t slot) QSize* QPlainTextEdit_virtualbase_ViewportSizeHint(const void* self); void QPlainTextEdit_Delete(QPlainTextEdit* self, bool isSubclass); -void QPlainTextDocumentLayout_new(QTextDocument* document, QPlainTextDocumentLayout** outptr_QPlainTextDocumentLayout, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject); +QPlainTextDocumentLayout* QPlainTextDocumentLayout_new(QTextDocument* document); +void QPlainTextDocumentLayout_virtbase(QPlainTextDocumentLayout* src, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout); QMetaObject* QPlainTextDocumentLayout_MetaObject(const QPlainTextDocumentLayout* self); void* QPlainTextDocumentLayout_Metacast(QPlainTextDocumentLayout* self, const char* param1); struct miqt_string QPlainTextDocumentLayout_Tr(const char* s); diff --git a/qt/gen_qplugin.go b/qt/gen_qplugin.go index c23c921b..bc716da1 100644 --- a/qt/gen_qplugin.go +++ b/qt/gen_qplugin.go @@ -37,16 +37,13 @@ func newQStaticPlugin(h *C.QStaticPlugin) *QStaticPlugin { if h == nil { return nil } + return &QStaticPlugin{h: h} } // UnsafeNewQStaticPlugin constructs the type using only unsafe pointers. func UnsafeNewQStaticPlugin(h unsafe.Pointer) *QStaticPlugin { - if h == nil { - return nil - } - - return &QStaticPlugin{h: (*C.QStaticPlugin)(h)} + return newQStaticPlugin((*C.QStaticPlugin)(h)) } func (this *QStaticPlugin) MetaData() *QJsonObject { diff --git a/qt/gen_qpluginloader.cpp b/qt/gen_qpluginloader.cpp index 07023ab4..463308d8 100644 --- a/qt/gen_qpluginloader.cpp +++ b/qt/gen_qpluginloader.cpp @@ -198,30 +198,26 @@ public: }; -void QPluginLoader_new(QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { - MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(); - *outptr_QPluginLoader = ret; - *outptr_QObject = static_cast(ret); +QPluginLoader* QPluginLoader_new() { + return new MiqtVirtualQPluginLoader(); } -void QPluginLoader_new2(struct miqt_string fileName, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { +QPluginLoader* QPluginLoader_new2(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(fileName_QString); - *outptr_QPluginLoader = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQPluginLoader(fileName_QString); } -void QPluginLoader_new3(QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { - MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(parent); - *outptr_QPluginLoader = ret; - *outptr_QObject = static_cast(ret); +QPluginLoader* QPluginLoader_new3(QObject* parent) { + return new MiqtVirtualQPluginLoader(parent); } -void QPluginLoader_new4(struct miqt_string fileName, QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { +QPluginLoader* QPluginLoader_new4(struct miqt_string fileName, QObject* parent) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(fileName_QString, parent); - *outptr_QPluginLoader = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQPluginLoader(fileName_QString, parent); +} + +void QPluginLoader_virtbase(QPluginLoader* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QPluginLoader_MetaObject(const QPluginLoader* self) { diff --git a/qt/gen_qpluginloader.go b/qt/gen_qpluginloader.go index 85031457..4e59613b 100644 --- a/qt/gen_qpluginloader.go +++ b/qt/gen_qpluginloader.go @@ -35,31 +35,26 @@ func (this *QPluginLoader) UnsafePointer() unsafe.Pointer { } // newQPluginLoader constructs the type using only CGO pointers. -func newQPluginLoader(h *C.QPluginLoader, h_QObject *C.QObject) *QPluginLoader { +func newQPluginLoader(h *C.QPluginLoader) *QPluginLoader { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QPluginLoader_virtbase(h, &outptr_QObject) + return &QPluginLoader{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQPluginLoader constructs the type using only unsafe pointers. -func UnsafeNewQPluginLoader(h unsafe.Pointer, h_QObject unsafe.Pointer) *QPluginLoader { - if h == nil { - return nil - } - - return &QPluginLoader{h: (*C.QPluginLoader)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQPluginLoader(h unsafe.Pointer) *QPluginLoader { + return newQPluginLoader((*C.QPluginLoader)(h)) } // NewQPluginLoader constructs a new QPluginLoader object. func NewQPluginLoader() *QPluginLoader { - var outptr_QPluginLoader *C.QPluginLoader = nil - var outptr_QObject *C.QObject = nil - C.QPluginLoader_new(&outptr_QPluginLoader, &outptr_QObject) - ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret := newQPluginLoader(C.QPluginLoader_new()) ret.isSubclass = true return ret } @@ -70,22 +65,16 @@ func NewQPluginLoader2(fileName string) *QPluginLoader { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QPluginLoader *C.QPluginLoader = nil - var outptr_QObject *C.QObject = nil - C.QPluginLoader_new2(fileName_ms, &outptr_QPluginLoader, &outptr_QObject) - ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret := newQPluginLoader(C.QPluginLoader_new2(fileName_ms)) ret.isSubclass = true return ret } // NewQPluginLoader3 constructs a new QPluginLoader object. func NewQPluginLoader3(parent *QObject) *QPluginLoader { - var outptr_QPluginLoader *C.QPluginLoader = nil - var outptr_QObject *C.QObject = nil - C.QPluginLoader_new3(parent.cPointer(), &outptr_QPluginLoader, &outptr_QObject) - ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret := newQPluginLoader(C.QPluginLoader_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -96,11 +85,8 @@ func NewQPluginLoader4(fileName string, parent *QObject) *QPluginLoader { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QPluginLoader *C.QPluginLoader = nil - var outptr_QObject *C.QObject = nil - C.QPluginLoader_new4(fileName_ms, parent.cPointer(), &outptr_QPluginLoader, &outptr_QObject) - ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret := newQPluginLoader(C.QPluginLoader_new4(fileName_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -329,7 +315,7 @@ func miqt_exec_callback_QPluginLoader_TimerEvent(self *C.QPluginLoader, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QPluginLoader{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -355,7 +341,7 @@ func miqt_exec_callback_QPluginLoader_ChildEvent(self *C.QPluginLoader, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QPluginLoader{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qpluginloader.h b/qt/gen_qpluginloader.h index 80dc36c5..dccd58a5 100644 --- a/qt/gen_qpluginloader.h +++ b/qt/gen_qpluginloader.h @@ -36,10 +36,11 @@ typedef struct QStaticPlugin QStaticPlugin; typedef struct QTimerEvent QTimerEvent; #endif -void QPluginLoader_new(QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); -void QPluginLoader_new2(struct miqt_string fileName, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); -void QPluginLoader_new3(QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); -void QPluginLoader_new4(struct miqt_string fileName, QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); +QPluginLoader* QPluginLoader_new(); +QPluginLoader* QPluginLoader_new2(struct miqt_string fileName); +QPluginLoader* QPluginLoader_new3(QObject* parent); +QPluginLoader* QPluginLoader_new4(struct miqt_string fileName, QObject* parent); +void QPluginLoader_virtbase(QPluginLoader* src, QObject** outptr_QObject); QMetaObject* QPluginLoader_MetaObject(const QPluginLoader* self); void* QPluginLoader_Metacast(QPluginLoader* self, const char* param1); struct miqt_string QPluginLoader_Tr(const char* s); diff --git a/qt/gen_qpoint.cpp b/qt/gen_qpoint.cpp index 72139762..bfe9ed2b 100644 --- a/qt/gen_qpoint.cpp +++ b/qt/gen_qpoint.cpp @@ -4,19 +4,16 @@ #include "gen_qpoint.h" #include "_cgo_export.h" -void QPoint_new(QPoint** outptr_QPoint) { - QPoint* ret = new QPoint(); - *outptr_QPoint = ret; +QPoint* QPoint_new() { + return new QPoint(); } -void QPoint_new2(int xpos, int ypos, QPoint** outptr_QPoint) { - QPoint* ret = new QPoint(static_cast(xpos), static_cast(ypos)); - *outptr_QPoint = ret; +QPoint* QPoint_new2(int xpos, int ypos) { + return new QPoint(static_cast(xpos), static_cast(ypos)); } -void QPoint_new3(QPoint* param1, QPoint** outptr_QPoint) { - QPoint* ret = new QPoint(*param1); - *outptr_QPoint = ret; +QPoint* QPoint_new3(QPoint* param1) { + return new QPoint(*param1); } bool QPoint_IsNull(const QPoint* self) { @@ -95,24 +92,20 @@ void QPoint_Delete(QPoint* self, bool isSubclass) { } } -void QPointF_new(QPointF** outptr_QPointF) { - QPointF* ret = new QPointF(); - *outptr_QPointF = ret; +QPointF* QPointF_new() { + return new QPointF(); } -void QPointF_new2(QPoint* p, QPointF** outptr_QPointF) { - QPointF* ret = new QPointF(*p); - *outptr_QPointF = ret; +QPointF* QPointF_new2(QPoint* p) { + return new QPointF(*p); } -void QPointF_new3(double xpos, double ypos, QPointF** outptr_QPointF) { - QPointF* ret = new QPointF(static_cast(xpos), static_cast(ypos)); - *outptr_QPointF = ret; +QPointF* QPointF_new3(double xpos, double ypos) { + return new QPointF(static_cast(xpos), static_cast(ypos)); } -void QPointF_new4(QPointF* param1, QPointF** outptr_QPointF) { - QPointF* ret = new QPointF(*param1); - *outptr_QPointF = ret; +QPointF* QPointF_new4(QPointF* param1) { + return new QPointF(*param1); } double QPointF_ManhattanLength(const QPointF* self) { diff --git a/qt/gen_qpoint.go b/qt/gen_qpoint.go index 703c3576..27ffed5b 100644 --- a/qt/gen_qpoint.go +++ b/qt/gen_qpoint.go @@ -37,44 +37,35 @@ func newQPoint(h *C.QPoint) *QPoint { if h == nil { return nil } + return &QPoint{h: h} } // UnsafeNewQPoint constructs the type using only unsafe pointers. func UnsafeNewQPoint(h unsafe.Pointer) *QPoint { - if h == nil { - return nil - } - - return &QPoint{h: (*C.QPoint)(h)} + return newQPoint((*C.QPoint)(h)) } // NewQPoint constructs a new QPoint object. func NewQPoint() *QPoint { - var outptr_QPoint *C.QPoint = nil - C.QPoint_new(&outptr_QPoint) - ret := newQPoint(outptr_QPoint) + ret := newQPoint(C.QPoint_new()) ret.isSubclass = true return ret } // NewQPoint2 constructs a new QPoint object. func NewQPoint2(xpos int, ypos int) *QPoint { - var outptr_QPoint *C.QPoint = nil - C.QPoint_new2((C.int)(xpos), (C.int)(ypos), &outptr_QPoint) - ret := newQPoint(outptr_QPoint) + ret := newQPoint(C.QPoint_new2((C.int)(xpos), (C.int)(ypos))) ret.isSubclass = true return ret } // NewQPoint3 constructs a new QPoint object. func NewQPoint3(param1 *QPoint) *QPoint { - var outptr_QPoint *C.QPoint = nil - C.QPoint_new3(param1.cPointer(), &outptr_QPoint) - ret := newQPoint(outptr_QPoint) + ret := newQPoint(C.QPoint_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -175,54 +166,43 @@ func newQPointF(h *C.QPointF) *QPointF { if h == nil { return nil } + return &QPointF{h: h} } // UnsafeNewQPointF constructs the type using only unsafe pointers. func UnsafeNewQPointF(h unsafe.Pointer) *QPointF { - if h == nil { - return nil - } - - return &QPointF{h: (*C.QPointF)(h)} + return newQPointF((*C.QPointF)(h)) } // NewQPointF constructs a new QPointF object. func NewQPointF() *QPointF { - var outptr_QPointF *C.QPointF = nil - C.QPointF_new(&outptr_QPointF) - ret := newQPointF(outptr_QPointF) + ret := newQPointF(C.QPointF_new()) ret.isSubclass = true return ret } // NewQPointF2 constructs a new QPointF object. func NewQPointF2(p *QPoint) *QPointF { - var outptr_QPointF *C.QPointF = nil - C.QPointF_new2(p.cPointer(), &outptr_QPointF) - ret := newQPointF(outptr_QPointF) + ret := newQPointF(C.QPointF_new2(p.cPointer())) ret.isSubclass = true return ret } // NewQPointF3 constructs a new QPointF object. func NewQPointF3(xpos float64, ypos float64) *QPointF { - var outptr_QPointF *C.QPointF = nil - C.QPointF_new3((C.double)(xpos), (C.double)(ypos), &outptr_QPointF) - ret := newQPointF(outptr_QPointF) + ret := newQPointF(C.QPointF_new3((C.double)(xpos), (C.double)(ypos))) ret.isSubclass = true return ret } // NewQPointF4 constructs a new QPointF object. func NewQPointF4(param1 *QPointF) *QPointF { - var outptr_QPointF *C.QPointF = nil - C.QPointF_new4(param1.cPointer(), &outptr_QPointF) - ret := newQPointF(outptr_QPointF) + ret := newQPointF(C.QPointF_new4(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qpoint.h b/qt/gen_qpoint.h index 63d2338b..1bcdcce9 100644 --- a/qt/gen_qpoint.h +++ b/qt/gen_qpoint.h @@ -22,9 +22,9 @@ typedef struct QPoint QPoint; typedef struct QPointF QPointF; #endif -void QPoint_new(QPoint** outptr_QPoint); -void QPoint_new2(int xpos, int ypos, QPoint** outptr_QPoint); -void QPoint_new3(QPoint* param1, QPoint** outptr_QPoint); +QPoint* QPoint_new(); +QPoint* QPoint_new2(int xpos, int ypos); +QPoint* QPoint_new3(QPoint* param1); bool QPoint_IsNull(const QPoint* self); int QPoint_X(const QPoint* self); int QPoint_Y(const QPoint* self); @@ -41,10 +41,10 @@ QPoint* QPoint_OperatorDivideAssign(QPoint* self, double divisor); int QPoint_DotProduct(QPoint* p1, QPoint* p2); void QPoint_Delete(QPoint* self, bool isSubclass); -void QPointF_new(QPointF** outptr_QPointF); -void QPointF_new2(QPoint* p, QPointF** outptr_QPointF); -void QPointF_new3(double xpos, double ypos, QPointF** outptr_QPointF); -void QPointF_new4(QPointF* param1, QPointF** outptr_QPointF); +QPointF* QPointF_new(); +QPointF* QPointF_new2(QPoint* p); +QPointF* QPointF_new3(double xpos, double ypos); +QPointF* QPointF_new4(QPointF* param1); double QPointF_ManhattanLength(const QPointF* self); bool QPointF_IsNull(const QPointF* self); double QPointF_X(const QPointF* self); diff --git a/qt/gen_qprocess.cpp b/qt/gen_qprocess.cpp index c41c1ced..9ad489bc 100644 --- a/qt/gen_qprocess.cpp +++ b/qt/gen_qprocess.cpp @@ -12,14 +12,12 @@ #include "gen_qprocess.h" #include "_cgo_export.h" -void QProcessEnvironment_new(QProcessEnvironment** outptr_QProcessEnvironment) { - QProcessEnvironment* ret = new QProcessEnvironment(); - *outptr_QProcessEnvironment = ret; +QProcessEnvironment* QProcessEnvironment_new() { + return new QProcessEnvironment(); } -void QProcessEnvironment_new2(QProcessEnvironment* other, QProcessEnvironment** outptr_QProcessEnvironment) { - QProcessEnvironment* ret = new QProcessEnvironment(*other); - *outptr_QProcessEnvironment = ret; +QProcessEnvironment* QProcessEnvironment_new2(QProcessEnvironment* other) { + return new QProcessEnvironment(*other); } void QProcessEnvironment_OperatorAssign(QProcessEnvironment* self, QProcessEnvironment* other) { @@ -551,18 +549,16 @@ public: }; -void QProcess_new(QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQProcess* ret = new MiqtVirtualQProcess(); - *outptr_QProcess = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QProcess* QProcess_new() { + return new MiqtVirtualQProcess(); } -void QProcess_new2(QObject* parent, QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQProcess* ret = new MiqtVirtualQProcess(parent); - *outptr_QProcess = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QProcess* QProcess_new2(QObject* parent) { + return new MiqtVirtualQProcess(parent); +} + +void QProcess_virtbase(QProcess* src, QIODevice** outptr_QIODevice) { + *outptr_QIODevice = static_cast(src); } QMetaObject* QProcess_MetaObject(const QProcess* self) { diff --git a/qt/gen_qprocess.go b/qt/gen_qprocess.go index 9b5392ba..85af292b 100644 --- a/qt/gen_qprocess.go +++ b/qt/gen_qprocess.go @@ -88,34 +88,27 @@ func newQProcessEnvironment(h *C.QProcessEnvironment) *QProcessEnvironment { if h == nil { return nil } + return &QProcessEnvironment{h: h} } // UnsafeNewQProcessEnvironment constructs the type using only unsafe pointers. func UnsafeNewQProcessEnvironment(h unsafe.Pointer) *QProcessEnvironment { - if h == nil { - return nil - } - - return &QProcessEnvironment{h: (*C.QProcessEnvironment)(h)} + return newQProcessEnvironment((*C.QProcessEnvironment)(h)) } // NewQProcessEnvironment constructs a new QProcessEnvironment object. func NewQProcessEnvironment() *QProcessEnvironment { - var outptr_QProcessEnvironment *C.QProcessEnvironment = nil - C.QProcessEnvironment_new(&outptr_QProcessEnvironment) - ret := newQProcessEnvironment(outptr_QProcessEnvironment) + ret := newQProcessEnvironment(C.QProcessEnvironment_new()) ret.isSubclass = true return ret } // NewQProcessEnvironment2 constructs a new QProcessEnvironment object. func NewQProcessEnvironment2(other *QProcessEnvironment) *QProcessEnvironment { - var outptr_QProcessEnvironment *C.QProcessEnvironment = nil - C.QProcessEnvironment_new2(other.cPointer(), &outptr_QProcessEnvironment) - ret := newQProcessEnvironment(outptr_QProcessEnvironment) + ret := newQProcessEnvironment(C.QProcessEnvironment_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -269,44 +262,34 @@ func (this *QProcess) UnsafePointer() unsafe.Pointer { } // newQProcess constructs the type using only CGO pointers. -func newQProcess(h *C.QProcess, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QProcess { +func newQProcess(h *C.QProcess) *QProcess { if h == nil { return nil } + var outptr_QIODevice *C.QIODevice = nil + C.QProcess_virtbase(h, &outptr_QIODevice) + return &QProcess{h: h, - QIODevice: newQIODevice(h_QIODevice, h_QObject)} + QIODevice: newQIODevice(outptr_QIODevice)} } // UnsafeNewQProcess constructs the type using only unsafe pointers. -func UnsafeNewQProcess(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QProcess { - if h == nil { - return nil - } - - return &QProcess{h: (*C.QProcess)(h), - QIODevice: UnsafeNewQIODevice(h_QIODevice, h_QObject)} +func UnsafeNewQProcess(h unsafe.Pointer) *QProcess { + return newQProcess((*C.QProcess)(h)) } // NewQProcess constructs a new QProcess object. func NewQProcess() *QProcess { - var outptr_QProcess *C.QProcess = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QProcess_new(&outptr_QProcess, &outptr_QIODevice, &outptr_QObject) - ret := newQProcess(outptr_QProcess, outptr_QIODevice, outptr_QObject) + ret := newQProcess(C.QProcess_new()) ret.isSubclass = true return ret } // NewQProcess2 constructs a new QProcess object. func NewQProcess2(parent *QObject) *QProcess { - var outptr_QProcess *C.QProcess = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QProcess_new2(parent.cPointer(), &outptr_QProcess, &outptr_QIODevice, &outptr_QObject) - ret := newQProcess(outptr_QProcess, outptr_QIODevice, outptr_QObject) + ret := newQProcess(C.QProcess_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qprocess.h b/qt/gen_qprocess.h index b382e61e..ffcc198e 100644 --- a/qt/gen_qprocess.h +++ b/qt/gen_qprocess.h @@ -28,8 +28,8 @@ typedef struct QProcess QProcess; typedef struct QProcessEnvironment QProcessEnvironment; #endif -void QProcessEnvironment_new(QProcessEnvironment** outptr_QProcessEnvironment); -void QProcessEnvironment_new2(QProcessEnvironment* other, QProcessEnvironment** outptr_QProcessEnvironment); +QProcessEnvironment* QProcessEnvironment_new(); +QProcessEnvironment* QProcessEnvironment_new2(QProcessEnvironment* other); void QProcessEnvironment_OperatorAssign(QProcessEnvironment* self, QProcessEnvironment* other); void QProcessEnvironment_Swap(QProcessEnvironment* self, QProcessEnvironment* other); bool QProcessEnvironment_OperatorEqual(const QProcessEnvironment* self, QProcessEnvironment* other); @@ -47,8 +47,9 @@ QProcessEnvironment* QProcessEnvironment_SystemEnvironment(); struct miqt_string QProcessEnvironment_Value2(const QProcessEnvironment* self, struct miqt_string name, struct miqt_string defaultValue); void QProcessEnvironment_Delete(QProcessEnvironment* self, bool isSubclass); -void QProcess_new(QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QProcess_new2(QObject* parent, QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +QProcess* QProcess_new(); +QProcess* QProcess_new2(QObject* parent); +void QProcess_virtbase(QProcess* src, QIODevice** outptr_QIODevice); QMetaObject* QProcess_MetaObject(const QProcess* self); void* QProcess_Metacast(QProcess* self, const char* param1); struct miqt_string QProcess_Tr(const char* s); diff --git a/qt/gen_qprogressbar.cpp b/qt/gen_qprogressbar.cpp index 8045c682..07143970 100644 --- a/qt/gen_qprogressbar.cpp +++ b/qt/gen_qprogressbar.cpp @@ -1050,20 +1050,16 @@ public: }; -void QProgressBar_new(QWidget* parent, QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQProgressBar* ret = new MiqtVirtualQProgressBar(parent); - *outptr_QProgressBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QProgressBar* QProgressBar_new(QWidget* parent) { + return new MiqtVirtualQProgressBar(parent); } -void QProgressBar_new2(QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQProgressBar* ret = new MiqtVirtualQProgressBar(); - *outptr_QProgressBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QProgressBar* QProgressBar_new2() { + return new MiqtVirtualQProgressBar(); +} + +void QProgressBar_virtbase(QProgressBar* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QProgressBar_MetaObject(const QProgressBar* self) { diff --git a/qt/gen_qprogressbar.go b/qt/gen_qprogressbar.go index 88e93cea..bc181747 100644 --- a/qt/gen_qprogressbar.go +++ b/qt/gen_qprogressbar.go @@ -42,46 +42,34 @@ func (this *QProgressBar) UnsafePointer() unsafe.Pointer { } // newQProgressBar constructs the type using only CGO pointers. -func newQProgressBar(h *C.QProgressBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QProgressBar { +func newQProgressBar(h *C.QProgressBar) *QProgressBar { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QProgressBar_virtbase(h, &outptr_QWidget) + return &QProgressBar{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQProgressBar constructs the type using only unsafe pointers. -func UnsafeNewQProgressBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QProgressBar { - if h == nil { - return nil - } - - return &QProgressBar{h: (*C.QProgressBar)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQProgressBar(h unsafe.Pointer) *QProgressBar { + return newQProgressBar((*C.QProgressBar)(h)) } // NewQProgressBar constructs a new QProgressBar object. func NewQProgressBar(parent *QWidget) *QProgressBar { - var outptr_QProgressBar *C.QProgressBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressBar_new(parent.cPointer(), &outptr_QProgressBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressBar(outptr_QProgressBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressBar(C.QProgressBar_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQProgressBar2 constructs a new QProgressBar object. func NewQProgressBar2() *QProgressBar { - var outptr_QProgressBar *C.QProgressBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressBar_new2(&outptr_QProgressBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressBar(outptr_QProgressBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressBar(C.QProgressBar_new2()) ret.isSubclass = true return ret } @@ -421,7 +409,7 @@ func miqt_exec_callback_QProgressBar_PaintEvent(self *C.QProgressBar, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QProgressBar{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -576,7 +564,7 @@ func miqt_exec_callback_QProgressBar_MousePressEvent(self *C.QProgressBar, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -602,7 +590,7 @@ func miqt_exec_callback_QProgressBar_MouseReleaseEvent(self *C.QProgressBar, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -628,7 +616,7 @@ func miqt_exec_callback_QProgressBar_MouseDoubleClickEvent(self *C.QProgressBar, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -654,7 +642,7 @@ func miqt_exec_callback_QProgressBar_MouseMoveEvent(self *C.QProgressBar, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -680,7 +668,7 @@ func miqt_exec_callback_QProgressBar_WheelEvent(self *C.QProgressBar, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -706,7 +694,7 @@ func miqt_exec_callback_QProgressBar_KeyPressEvent(self *C.QProgressBar, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -732,7 +720,7 @@ func miqt_exec_callback_QProgressBar_KeyReleaseEvent(self *C.QProgressBar, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -758,7 +746,7 @@ func miqt_exec_callback_QProgressBar_FocusInEvent(self *C.QProgressBar, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -784,7 +772,7 @@ func miqt_exec_callback_QProgressBar_FocusOutEvent(self *C.QProgressBar, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -862,7 +850,7 @@ func miqt_exec_callback_QProgressBar_MoveEvent(self *C.QProgressBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -888,7 +876,7 @@ func miqt_exec_callback_QProgressBar_ResizeEvent(self *C.QProgressBar, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -914,7 +902,7 @@ func miqt_exec_callback_QProgressBar_CloseEvent(self *C.QProgressBar, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -940,7 +928,7 @@ func miqt_exec_callback_QProgressBar_ContextMenuEvent(self *C.QProgressBar, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -966,7 +954,7 @@ func miqt_exec_callback_QProgressBar_TabletEvent(self *C.QProgressBar, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -992,7 +980,7 @@ func miqt_exec_callback_QProgressBar_ActionEvent(self *C.QProgressBar, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1018,7 +1006,7 @@ func miqt_exec_callback_QProgressBar_DragEnterEvent(self *C.QProgressBar, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1044,7 +1032,7 @@ func miqt_exec_callback_QProgressBar_DragMoveEvent(self *C.QProgressBar, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1070,7 +1058,7 @@ func miqt_exec_callback_QProgressBar_DragLeaveEvent(self *C.QProgressBar, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1096,7 +1084,7 @@ func miqt_exec_callback_QProgressBar_DropEvent(self *C.QProgressBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1122,7 +1110,7 @@ func miqt_exec_callback_QProgressBar_ShowEvent(self *C.QProgressBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1148,7 +1136,7 @@ func miqt_exec_callback_QProgressBar_HideEvent(self *C.QProgressBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1344,7 +1332,7 @@ func miqt_exec_callback_QProgressBar_InputMethodEvent(self *C.QProgressBar, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QProgressBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qprogressbar.h b/qt/gen_qprogressbar.h index 7ff7ccf6..f5b86277 100644 --- a/qt/gen_qprogressbar.h +++ b/qt/gen_qprogressbar.h @@ -76,8 +76,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QProgressBar_new(QWidget* parent, QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QProgressBar_new2(QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QProgressBar* QProgressBar_new(QWidget* parent); +QProgressBar* QProgressBar_new2(); +void QProgressBar_virtbase(QProgressBar* src, QWidget** outptr_QWidget); QMetaObject* QProgressBar_MetaObject(const QProgressBar* self); void* QProgressBar_Metacast(QProgressBar* self, const char* param1); struct miqt_string QProgressBar_Tr(const char* s); diff --git a/qt/gen_qprogressdialog.cpp b/qt/gen_qprogressdialog.cpp index bc478459..6069de3f 100644 --- a/qt/gen_qprogressdialog.cpp +++ b/qt/gen_qprogressdialog.cpp @@ -386,64 +386,38 @@ public: }; -void QProgressDialog_new(QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(parent); - *outptr_QProgressDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QProgressDialog* QProgressDialog_new(QWidget* parent) { + return new MiqtVirtualQProgressDialog(parent); } -void QProgressDialog_new2(QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(); - *outptr_QProgressDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QProgressDialog* QProgressDialog_new2() { + return new MiqtVirtualQProgressDialog(); } -void QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QProgressDialog* QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum) { QString labelText_QString = QString::fromUtf8(labelText.data, labelText.len); QString cancelButtonText_QString = QString::fromUtf8(cancelButtonText.data, cancelButtonText.len); - MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum)); - *outptr_QProgressDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum)); } -void QProgressDialog_new4(QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(parent, static_cast(flags)); - *outptr_QProgressDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QProgressDialog* QProgressDialog_new4(QWidget* parent, int flags) { + return new MiqtVirtualQProgressDialog(parent, static_cast(flags)); } -void QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QProgressDialog* QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent) { QString labelText_QString = QString::fromUtf8(labelText.data, labelText.len); QString cancelButtonText_QString = QString::fromUtf8(cancelButtonText.data, cancelButtonText.len); - MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent); - *outptr_QProgressDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent); } -void QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QProgressDialog* QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags) { QString labelText_QString = QString::fromUtf8(labelText.data, labelText.len); QString cancelButtonText_QString = QString::fromUtf8(cancelButtonText.data, cancelButtonText.len); - MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent, static_cast(flags)); - *outptr_QProgressDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent, static_cast(flags)); +} + +void QProgressDialog_virtbase(QProgressDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QProgressDialog_MetaObject(const QProgressDialog* self) { diff --git a/qt/gen_qprogressdialog.go b/qt/gen_qprogressdialog.go index d3eb3e23..1b10c428 100644 --- a/qt/gen_qprogressdialog.go +++ b/qt/gen_qprogressdialog.go @@ -35,48 +35,34 @@ func (this *QProgressDialog) UnsafePointer() unsafe.Pointer { } // newQProgressDialog constructs the type using only CGO pointers. -func newQProgressDialog(h *C.QProgressDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QProgressDialog { +func newQProgressDialog(h *C.QProgressDialog) *QProgressDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QProgressDialog_virtbase(h, &outptr_QDialog) + return &QProgressDialog{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQProgressDialog constructs the type using only unsafe pointers. -func UnsafeNewQProgressDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QProgressDialog { - if h == nil { - return nil - } - - return &QProgressDialog{h: (*C.QProgressDialog)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQProgressDialog(h unsafe.Pointer) *QProgressDialog { + return newQProgressDialog((*C.QProgressDialog)(h)) } // NewQProgressDialog constructs a new QProgressDialog object. func NewQProgressDialog(parent *QWidget) *QProgressDialog { - var outptr_QProgressDialog *C.QProgressDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressDialog_new(parent.cPointer(), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressDialog(C.QProgressDialog_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQProgressDialog2 constructs a new QProgressDialog object. func NewQProgressDialog2() *QProgressDialog { - var outptr_QProgressDialog *C.QProgressDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressDialog_new2(&outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressDialog(C.QProgressDialog_new2()) ret.isSubclass = true return ret } @@ -91,28 +77,16 @@ func NewQProgressDialog3(labelText string, cancelButtonText string, minimum int, cancelButtonText_ms.data = C.CString(cancelButtonText) cancelButtonText_ms.len = C.size_t(len(cancelButtonText)) defer C.free(unsafe.Pointer(cancelButtonText_ms.data)) - var outptr_QProgressDialog *C.QProgressDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressDialog_new3(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressDialog(C.QProgressDialog_new3(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum))) ret.isSubclass = true return ret } // NewQProgressDialog4 constructs a new QProgressDialog object. func NewQProgressDialog4(parent *QWidget, flags WindowType) *QProgressDialog { - var outptr_QProgressDialog *C.QProgressDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressDialog_new4(parent.cPointer(), (C.int)(flags), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressDialog(C.QProgressDialog_new4(parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -127,14 +101,8 @@ func NewQProgressDialog5(labelText string, cancelButtonText string, minimum int, cancelButtonText_ms.data = C.CString(cancelButtonText) cancelButtonText_ms.len = C.size_t(len(cancelButtonText)) defer C.free(unsafe.Pointer(cancelButtonText_ms.data)) - var outptr_QProgressDialog *C.QProgressDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressDialog_new5(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer(), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressDialog(C.QProgressDialog_new5(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer())) ret.isSubclass = true return ret } @@ -149,14 +117,8 @@ func NewQProgressDialog6(labelText string, cancelButtonText string, minimum int, cancelButtonText_ms.data = C.CString(cancelButtonText) cancelButtonText_ms.len = C.size_t(len(cancelButtonText)) defer C.free(unsafe.Pointer(cancelButtonText_ms.data)) - var outptr_QProgressDialog *C.QProgressDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressDialog_new6(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer(), (C.int)(flags), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressDialog(C.QProgressDialog_new6(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -402,7 +364,7 @@ func miqt_exec_callback_QProgressDialog_ResizeEvent(self *C.QProgressDialog, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QProgressDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -428,7 +390,7 @@ func miqt_exec_callback_QProgressDialog_CloseEvent(self *C.QProgressDialog, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QProgressDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -480,7 +442,7 @@ func miqt_exec_callback_QProgressDialog_ShowEvent(self *C.QProgressDialog, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QProgressDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -679,7 +641,7 @@ func miqt_exec_callback_QProgressDialog_KeyPressEvent(self *C.QProgressDialog, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QProgressDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -705,7 +667,7 @@ func miqt_exec_callback_QProgressDialog_ContextMenuEvent(self *C.QProgressDialog } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QProgressDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt/gen_qprogressdialog.h b/qt/gen_qprogressdialog.h index a82045ef..65a31e5f 100644 --- a/qt/gen_qprogressdialog.h +++ b/qt/gen_qprogressdialog.h @@ -50,12 +50,13 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QProgressDialog_new(QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QProgressDialog_new2(QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QProgressDialog_new4(QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QProgressDialog* QProgressDialog_new(QWidget* parent); +QProgressDialog* QProgressDialog_new2(); +QProgressDialog* QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum); +QProgressDialog* QProgressDialog_new4(QWidget* parent, int flags); +QProgressDialog* QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent); +QProgressDialog* QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags); +void QProgressDialog_virtbase(QProgressDialog* src, QDialog** outptr_QDialog); QMetaObject* QProgressDialog_MetaObject(const QProgressDialog* self); void* QProgressDialog_Metacast(QProgressDialog* self, const char* param1); struct miqt_string QProgressDialog_Tr(const char* s); diff --git a/qt/gen_qpropertyanimation.cpp b/qt/gen_qpropertyanimation.cpp index fe22f3cd..093f6d4d 100644 --- a/qt/gen_qpropertyanimation.cpp +++ b/qt/gen_qpropertyanimation.cpp @@ -177,38 +177,26 @@ public: }; -void QPropertyAnimation_new(QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(); - *outptr_QPropertyAnimation = ret; - *outptr_QVariantAnimation = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPropertyAnimation* QPropertyAnimation_new() { + return new MiqtVirtualQPropertyAnimation(); } -void QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { +QPropertyAnimation* QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName) { QByteArray propertyName_QByteArray(propertyName.data, propertyName.len); - MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(target, propertyName_QByteArray); - *outptr_QPropertyAnimation = ret; - *outptr_QVariantAnimation = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQPropertyAnimation(target, propertyName_QByteArray); } -void QPropertyAnimation_new3(QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(parent); - *outptr_QPropertyAnimation = ret; - *outptr_QVariantAnimation = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPropertyAnimation* QPropertyAnimation_new3(QObject* parent) { + return new MiqtVirtualQPropertyAnimation(parent); } -void QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { +QPropertyAnimation* QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent) { QByteArray propertyName_QByteArray(propertyName.data, propertyName.len); - MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(target, propertyName_QByteArray, parent); - *outptr_QPropertyAnimation = ret; - *outptr_QVariantAnimation = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQPropertyAnimation(target, propertyName_QByteArray, parent); +} + +void QPropertyAnimation_virtbase(QPropertyAnimation* src, QVariantAnimation** outptr_QVariantAnimation) { + *outptr_QVariantAnimation = static_cast(src); } QMetaObject* QPropertyAnimation_MetaObject(const QPropertyAnimation* self) { diff --git a/qt/gen_qpropertyanimation.go b/qt/gen_qpropertyanimation.go index 7169c0ce..88ea1dca 100644 --- a/qt/gen_qpropertyanimation.go +++ b/qt/gen_qpropertyanimation.go @@ -35,33 +35,26 @@ func (this *QPropertyAnimation) UnsafePointer() unsafe.Pointer { } // newQPropertyAnimation constructs the type using only CGO pointers. -func newQPropertyAnimation(h *C.QPropertyAnimation, h_QVariantAnimation *C.QVariantAnimation, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QPropertyAnimation { +func newQPropertyAnimation(h *C.QPropertyAnimation) *QPropertyAnimation { if h == nil { return nil } + var outptr_QVariantAnimation *C.QVariantAnimation = nil + C.QPropertyAnimation_virtbase(h, &outptr_QVariantAnimation) + return &QPropertyAnimation{h: h, - QVariantAnimation: newQVariantAnimation(h_QVariantAnimation, h_QAbstractAnimation, h_QObject)} + QVariantAnimation: newQVariantAnimation(outptr_QVariantAnimation)} } // UnsafeNewQPropertyAnimation constructs the type using only unsafe pointers. -func UnsafeNewQPropertyAnimation(h unsafe.Pointer, h_QVariantAnimation unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QPropertyAnimation { - if h == nil { - return nil - } - - return &QPropertyAnimation{h: (*C.QPropertyAnimation)(h), - QVariantAnimation: UnsafeNewQVariantAnimation(h_QVariantAnimation, h_QAbstractAnimation, h_QObject)} +func UnsafeNewQPropertyAnimation(h unsafe.Pointer) *QPropertyAnimation { + return newQPropertyAnimation((*C.QPropertyAnimation)(h)) } // NewQPropertyAnimation constructs a new QPropertyAnimation object. func NewQPropertyAnimation() *QPropertyAnimation { - var outptr_QPropertyAnimation *C.QPropertyAnimation = nil - var outptr_QVariantAnimation *C.QVariantAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPropertyAnimation_new(&outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPropertyAnimation(C.QPropertyAnimation_new()) ret.isSubclass = true return ret } @@ -71,26 +64,16 @@ func NewQPropertyAnimation2(target *QObject, propertyName []byte) *QPropertyAnim propertyName_alias := C.struct_miqt_string{} propertyName_alias.data = (*C.char)(unsafe.Pointer(&propertyName[0])) propertyName_alias.len = C.size_t(len(propertyName)) - var outptr_QPropertyAnimation *C.QPropertyAnimation = nil - var outptr_QVariantAnimation *C.QVariantAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPropertyAnimation_new2(target.cPointer(), propertyName_alias, &outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPropertyAnimation(C.QPropertyAnimation_new2(target.cPointer(), propertyName_alias)) ret.isSubclass = true return ret } // NewQPropertyAnimation3 constructs a new QPropertyAnimation object. func NewQPropertyAnimation3(parent *QObject) *QPropertyAnimation { - var outptr_QPropertyAnimation *C.QPropertyAnimation = nil - var outptr_QVariantAnimation *C.QVariantAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPropertyAnimation_new3(parent.cPointer(), &outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPropertyAnimation(C.QPropertyAnimation_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -100,13 +83,8 @@ func NewQPropertyAnimation4(target *QObject, propertyName []byte, parent *QObjec propertyName_alias := C.struct_miqt_string{} propertyName_alias.data = (*C.char)(unsafe.Pointer(&propertyName[0])) propertyName_alias.len = C.size_t(len(propertyName)) - var outptr_QPropertyAnimation *C.QPropertyAnimation = nil - var outptr_QVariantAnimation *C.QVariantAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPropertyAnimation_new4(target.cPointer(), propertyName_alias, parent.cPointer(), &outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPropertyAnimation(C.QPropertyAnimation_new4(target.cPointer(), propertyName_alias, parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qpropertyanimation.h b/qt/gen_qpropertyanimation.h index f1f853c9..8783c94c 100644 --- a/qt/gen_qpropertyanimation.h +++ b/qt/gen_qpropertyanimation.h @@ -32,10 +32,11 @@ typedef struct QVariant QVariant; typedef struct QVariantAnimation QVariantAnimation; #endif -void QPropertyAnimation_new(QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QPropertyAnimation_new3(QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +QPropertyAnimation* QPropertyAnimation_new(); +QPropertyAnimation* QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName); +QPropertyAnimation* QPropertyAnimation_new3(QObject* parent); +QPropertyAnimation* QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent); +void QPropertyAnimation_virtbase(QPropertyAnimation* src, QVariantAnimation** outptr_QVariantAnimation); QMetaObject* QPropertyAnimation_MetaObject(const QPropertyAnimation* self); void* QPropertyAnimation_Metacast(QPropertyAnimation* self, const char* param1); struct miqt_string QPropertyAnimation_Tr(const char* s); diff --git a/qt/gen_qproxystyle.cpp b/qt/gen_qproxystyle.cpp index bf104d12..414a9730 100644 --- a/qt/gen_qproxystyle.cpp +++ b/qt/gen_qproxystyle.cpp @@ -704,29 +704,21 @@ public: }; -void QProxyStyle_new(QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { - MiqtVirtualQProxyStyle* ret = new MiqtVirtualQProxyStyle(); - *outptr_QProxyStyle = ret; - *outptr_QCommonStyle = static_cast(ret); - *outptr_QStyle = static_cast(ret); - *outptr_QObject = static_cast(ret); +QProxyStyle* QProxyStyle_new() { + return new MiqtVirtualQProxyStyle(); } -void QProxyStyle_new2(struct miqt_string key, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { +QProxyStyle* QProxyStyle_new2(struct miqt_string key) { QString key_QString = QString::fromUtf8(key.data, key.len); - MiqtVirtualQProxyStyle* ret = new MiqtVirtualQProxyStyle(key_QString); - *outptr_QProxyStyle = ret; - *outptr_QCommonStyle = static_cast(ret); - *outptr_QStyle = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQProxyStyle(key_QString); } -void QProxyStyle_new3(QStyle* style, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { - MiqtVirtualQProxyStyle* ret = new MiqtVirtualQProxyStyle(style); - *outptr_QProxyStyle = ret; - *outptr_QCommonStyle = static_cast(ret); - *outptr_QStyle = static_cast(ret); - *outptr_QObject = static_cast(ret); +QProxyStyle* QProxyStyle_new3(QStyle* style) { + return new MiqtVirtualQProxyStyle(style); +} + +void QProxyStyle_virtbase(QProxyStyle* src, QCommonStyle** outptr_QCommonStyle) { + *outptr_QCommonStyle = static_cast(src); } QMetaObject* QProxyStyle_MetaObject(const QProxyStyle* self) { diff --git a/qt/gen_qproxystyle.go b/qt/gen_qproxystyle.go index dea87969..3e4bb5d1 100644 --- a/qt/gen_qproxystyle.go +++ b/qt/gen_qproxystyle.go @@ -35,33 +35,26 @@ func (this *QProxyStyle) UnsafePointer() unsafe.Pointer { } // newQProxyStyle constructs the type using only CGO pointers. -func newQProxyStyle(h *C.QProxyStyle, h_QCommonStyle *C.QCommonStyle, h_QStyle *C.QStyle, h_QObject *C.QObject) *QProxyStyle { +func newQProxyStyle(h *C.QProxyStyle) *QProxyStyle { if h == nil { return nil } + var outptr_QCommonStyle *C.QCommonStyle = nil + C.QProxyStyle_virtbase(h, &outptr_QCommonStyle) + return &QProxyStyle{h: h, - QCommonStyle: newQCommonStyle(h_QCommonStyle, h_QStyle, h_QObject)} + QCommonStyle: newQCommonStyle(outptr_QCommonStyle)} } // UnsafeNewQProxyStyle constructs the type using only unsafe pointers. -func UnsafeNewQProxyStyle(h unsafe.Pointer, h_QCommonStyle unsafe.Pointer, h_QStyle unsafe.Pointer, h_QObject unsafe.Pointer) *QProxyStyle { - if h == nil { - return nil - } - - return &QProxyStyle{h: (*C.QProxyStyle)(h), - QCommonStyle: UnsafeNewQCommonStyle(h_QCommonStyle, h_QStyle, h_QObject)} +func UnsafeNewQProxyStyle(h unsafe.Pointer) *QProxyStyle { + return newQProxyStyle((*C.QProxyStyle)(h)) } // NewQProxyStyle constructs a new QProxyStyle object. func NewQProxyStyle() *QProxyStyle { - var outptr_QProxyStyle *C.QProxyStyle = nil - var outptr_QCommonStyle *C.QCommonStyle = nil - var outptr_QStyle *C.QStyle = nil - var outptr_QObject *C.QObject = nil - C.QProxyStyle_new(&outptr_QProxyStyle, &outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) - ret := newQProxyStyle(outptr_QProxyStyle, outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret := newQProxyStyle(C.QProxyStyle_new()) ret.isSubclass = true return ret } @@ -72,26 +65,16 @@ func NewQProxyStyle2(key string) *QProxyStyle { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QProxyStyle *C.QProxyStyle = nil - var outptr_QCommonStyle *C.QCommonStyle = nil - var outptr_QStyle *C.QStyle = nil - var outptr_QObject *C.QObject = nil - C.QProxyStyle_new2(key_ms, &outptr_QProxyStyle, &outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) - ret := newQProxyStyle(outptr_QProxyStyle, outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret := newQProxyStyle(C.QProxyStyle_new2(key_ms)) ret.isSubclass = true return ret } // NewQProxyStyle3 constructs a new QProxyStyle object. func NewQProxyStyle3(style *QStyle) *QProxyStyle { - var outptr_QProxyStyle *C.QProxyStyle = nil - var outptr_QCommonStyle *C.QCommonStyle = nil - var outptr_QStyle *C.QStyle = nil - var outptr_QObject *C.QObject = nil - C.QProxyStyle_new3(style.cPointer(), &outptr_QProxyStyle, &outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) - ret := newQProxyStyle(outptr_QProxyStyle, outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret := newQProxyStyle(C.QProxyStyle_new3(style.cPointer())) ret.isSubclass = true return ret } @@ -125,7 +108,7 @@ func QProxyStyle_TrUtf8(s string) string { } func (this *QProxyStyle) BaseStyle() *QStyle { - return newQStyle(C.QProxyStyle_BaseStyle(this.h), nil) + return newQStyle(C.QProxyStyle_BaseStyle(this.h)) } func (this *QProxyStyle) SetBaseStyle(style *QStyle) { @@ -213,13 +196,13 @@ func (this *QProxyStyle) StandardIcon(standardIcon QStyle__StandardPixmap, optio } func (this *QProxyStyle) StandardPixmap(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _goptr := newQPixmap(C.QProxyStyle_StandardPixmap(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()), nil) + _goptr := newQPixmap(C.QProxyStyle_StandardPixmap(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QProxyStyle) GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { - _goptr := newQPixmap(C.QProxyStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()), nil) + _goptr := newQPixmap(C.QProxyStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -320,7 +303,7 @@ func miqt_exec_callback_QProxyStyle_DrawPrimitive(self *C.QProxyStyle, cb C.intp slotval3 := newQPainter(painter) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawPrimitive, slotval1, slotval2, slotval3, slotval4) @@ -352,7 +335,7 @@ func miqt_exec_callback_QProxyStyle_DrawControl(self *C.QProxyStyle, cb C.intptr slotval3 := newQPainter(painter) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawControl, slotval1, slotval2, slotval3, slotval4) @@ -380,11 +363,11 @@ func miqt_exec_callback_QProxyStyle_DrawComplexControl(self *C.QProxyStyle, cb C // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(control) - slotval2 := newQStyleOptionComplex(option, nil) + slotval2 := newQStyleOptionComplex(option) slotval3 := newQPainter(painter) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawComplexControl, slotval1, slotval2, slotval3, slotval4) @@ -460,7 +443,7 @@ func miqt_exec_callback_QProxyStyle_DrawItemPixmap(self *C.QProxyStyle, cb C.int slotval3 := (int)(alignment) - slotval4 := newQPixmap(pixmap, nil) + slotval4 := newQPixmap(pixmap) gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawItemPixmap, slotval1, slotval2, slotval3, slotval4) @@ -494,7 +477,7 @@ func miqt_exec_callback_QProxyStyle_SizeFromContents(self *C.QProxyStyle, cb C.i slotval3 := newQSize(size) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_SizeFromContents, slotval1, slotval2, slotval3, slotval4) @@ -528,7 +511,7 @@ func miqt_exec_callback_QProxyStyle_SubElementRect(self *C.QProxyStyle, cb C.int slotval2 := newQStyleOption(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_SubElementRect, slotval1, slotval2, slotval3) @@ -560,11 +543,11 @@ func miqt_exec_callback_QProxyStyle_SubControlRect(self *C.QProxyStyle, cb C.int // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(cc) - slotval2 := newQStyleOptionComplex(opt, nil) + slotval2 := newQStyleOptionComplex(opt) slotval3 := (QStyle__SubControl)(sc) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_SubControlRect, slotval1, slotval2, slotval3, slotval4) @@ -643,7 +626,7 @@ func miqt_exec_callback_QProxyStyle_ItemPixmapRect(self *C.QProxyStyle, cb C.int slotval2 := (int)(flags) - slotval3 := newQPixmap(pixmap, nil) + slotval3 := newQPixmap(pixmap) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_ItemPixmapRect, slotval1, slotval2, slotval3) @@ -673,11 +656,11 @@ func miqt_exec_callback_QProxyStyle_HitTestComplexControl(self *C.QProxyStyle, c // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(control) - slotval2 := newQStyleOptionComplex(option, nil) + slotval2 := newQStyleOptionComplex(option) slotval3 := newQPoint(pos) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_HitTestComplexControl, slotval1, slotval2, slotval3, slotval4) @@ -709,7 +692,7 @@ func miqt_exec_callback_QProxyStyle_StyleHint(self *C.QProxyStyle, cb C.intptr_t slotval2 := newQStyleOption(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) slotval4 := newQStyleHintReturn(returnData) @@ -743,7 +726,7 @@ func miqt_exec_callback_QProxyStyle_PixelMetric(self *C.QProxyStyle, cb C.intptr slotval2 := newQStyleOption(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_PixelMetric, slotval1, slotval2, slotval3) @@ -779,7 +762,7 @@ func miqt_exec_callback_QProxyStyle_LayoutSpacing(self *C.QProxyStyle, cb C.intp slotval4 := newQStyleOption(option) - slotval5 := newQWidget(widget, nil, nil) + slotval5 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_LayoutSpacing, slotval1, slotval2, slotval3, slotval4, slotval5) @@ -813,7 +796,7 @@ func miqt_exec_callback_QProxyStyle_StandardIcon(self *C.QProxyStyle, cb C.intpt slotval2 := newQStyleOption(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_StandardIcon, slotval1, slotval2, slotval3) @@ -823,7 +806,7 @@ func miqt_exec_callback_QProxyStyle_StandardIcon(self *C.QProxyStyle, cb C.intpt func (this *QProxyStyle) callVirtualBase_StandardPixmap(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _goptr := newQPixmap(C.QProxyStyle_virtualbase_StandardPixmap(unsafe.Pointer(this.h), (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()), nil) + _goptr := newQPixmap(C.QProxyStyle_virtualbase_StandardPixmap(unsafe.Pointer(this.h), (C.int)(standardPixmap), opt.cPointer(), widget.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -847,7 +830,7 @@ func miqt_exec_callback_QProxyStyle_StandardPixmap(self *C.QProxyStyle, cb C.int slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_StandardPixmap, slotval1, slotval2, slotval3) @@ -857,7 +840,7 @@ func miqt_exec_callback_QProxyStyle_StandardPixmap(self *C.QProxyStyle, cb C.int func (this *QProxyStyle) callVirtualBase_GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { - _goptr := newQPixmap(C.QProxyStyle_virtualbase_GeneratedIconPixmap(unsafe.Pointer(this.h), (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()), nil) + _goptr := newQPixmap(C.QProxyStyle_virtualbase_GeneratedIconPixmap(unsafe.Pointer(this.h), (C.int)(iconMode), pixmap.cPointer(), opt.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -879,7 +862,7 @@ func miqt_exec_callback_QProxyStyle_GeneratedIconPixmap(self *C.QProxyStyle, cb // Convert all CABI parameters to Go parameters slotval1 := (QIcon__Mode)(iconMode) - slotval2 := newQPixmap(pixmap, nil) + slotval2 := newQPixmap(pixmap) slotval3 := newQStyleOption(opt) @@ -936,7 +919,7 @@ func miqt_exec_callback_QProxyStyle_Polish(self *C.QProxyStyle, cb C.intptr_t, w } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QProxyStyle{h: self}).callVirtualBase_Polish, slotval1) @@ -988,7 +971,7 @@ func miqt_exec_callback_QProxyStyle_PolishWithApp(self *C.QProxyStyle, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQApplication(app, nil, nil, nil) + slotval1 := newQApplication(app) gofunc((&QProxyStyle{h: self}).callVirtualBase_PolishWithApp, slotval1) @@ -1014,7 +997,7 @@ func miqt_exec_callback_QProxyStyle_Unpolish(self *C.QProxyStyle, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QProxyStyle{h: self}).callVirtualBase_Unpolish, slotval1) @@ -1040,7 +1023,7 @@ func miqt_exec_callback_QProxyStyle_UnpolishWithApp(self *C.QProxyStyle, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQApplication(app, nil, nil, nil) + slotval1 := newQApplication(app) gofunc((&QProxyStyle{h: self}).callVirtualBase_UnpolishWithApp, slotval1) diff --git a/qt/gen_qproxystyle.h b/qt/gen_qproxystyle.h index c21dbf40..ba6c3c76 100644 --- a/qt/gen_qproxystyle.h +++ b/qt/gen_qproxystyle.h @@ -56,9 +56,10 @@ typedef struct QStyleOptionComplex QStyleOptionComplex; typedef struct QWidget QWidget; #endif -void QProxyStyle_new(QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); -void QProxyStyle_new2(struct miqt_string key, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); -void QProxyStyle_new3(QStyle* style, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); +QProxyStyle* QProxyStyle_new(); +QProxyStyle* QProxyStyle_new2(struct miqt_string key); +QProxyStyle* QProxyStyle_new3(QStyle* style); +void QProxyStyle_virtbase(QProxyStyle* src, QCommonStyle** outptr_QCommonStyle); QMetaObject* QProxyStyle_MetaObject(const QProxyStyle* self); void* QProxyStyle_Metacast(QProxyStyle* self, const char* param1); struct miqt_string QProxyStyle_Tr(const char* s); diff --git a/qt/gen_qpushbutton.cpp b/qt/gen_qpushbutton.cpp index bda4fd99..e1f7386e 100644 --- a/qt/gen_qpushbutton.cpp +++ b/qt/gen_qpushbutton.cpp @@ -413,62 +413,36 @@ public: }; -void QPushButton_new(QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(parent); - *outptr_QPushButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPushButton* QPushButton_new(QWidget* parent) { + return new MiqtVirtualQPushButton(parent); } -void QPushButton_new2(QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(); - *outptr_QPushButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPushButton* QPushButton_new2() { + return new MiqtVirtualQPushButton(); } -void QPushButton_new3(struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QPushButton* QPushButton_new3(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(text_QString); - *outptr_QPushButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPushButton(text_QString); } -void QPushButton_new4(QIcon* icon, struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QPushButton* QPushButton_new4(QIcon* icon, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(*icon, text_QString); - *outptr_QPushButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPushButton(*icon, text_QString); } -void QPushButton_new5(struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QPushButton* QPushButton_new5(struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(text_QString, parent); - *outptr_QPushButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPushButton(text_QString, parent); } -void QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QPushButton* QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(*icon, text_QString, parent); - *outptr_QPushButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPushButton(*icon, text_QString, parent); +} + +void QPushButton_virtbase(QPushButton* src, QAbstractButton** outptr_QAbstractButton) { + *outptr_QAbstractButton = static_cast(src); } QMetaObject* QPushButton_MetaObject(const QPushButton* self) { diff --git a/qt/gen_qpushbutton.go b/qt/gen_qpushbutton.go index e2f4fbb1..7a0ea0ce 100644 --- a/qt/gen_qpushbutton.go +++ b/qt/gen_qpushbutton.go @@ -35,48 +35,34 @@ func (this *QPushButton) UnsafePointer() unsafe.Pointer { } // newQPushButton constructs the type using only CGO pointers. -func newQPushButton(h *C.QPushButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPushButton { +func newQPushButton(h *C.QPushButton) *QPushButton { if h == nil { return nil } + var outptr_QAbstractButton *C.QAbstractButton = nil + C.QPushButton_virtbase(h, &outptr_QAbstractButton) + return &QPushButton{h: h, - QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractButton: newQAbstractButton(outptr_QAbstractButton)} } // UnsafeNewQPushButton constructs the type using only unsafe pointers. -func UnsafeNewQPushButton(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPushButton { - if h == nil { - return nil - } - - return &QPushButton{h: (*C.QPushButton)(h), - QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQPushButton(h unsafe.Pointer) *QPushButton { + return newQPushButton((*C.QPushButton)(h)) } // NewQPushButton constructs a new QPushButton object. func NewQPushButton(parent *QWidget) *QPushButton { - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPushButton_new(parent.cPointer(), &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPushButton(C.QPushButton_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQPushButton2 constructs a new QPushButton object. func NewQPushButton2() *QPushButton { - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPushButton_new2(&outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPushButton(C.QPushButton_new2()) ret.isSubclass = true return ret } @@ -87,14 +73,8 @@ func NewQPushButton3(text string) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPushButton_new3(text_ms, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPushButton(C.QPushButton_new3(text_ms)) ret.isSubclass = true return ret } @@ -105,14 +85,8 @@ func NewQPushButton4(icon *QIcon, text string) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPushButton_new4(icon.cPointer(), text_ms, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPushButton(C.QPushButton_new4(icon.cPointer(), text_ms)) ret.isSubclass = true return ret } @@ -123,14 +97,8 @@ func NewQPushButton5(text string, parent *QWidget) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPushButton_new5(text_ms, parent.cPointer(), &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPushButton(C.QPushButton_new5(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -141,14 +109,8 @@ func NewQPushButton6(icon *QIcon, text string, parent *QWidget) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPushButton_new6(icon.cPointer(), text_ms, parent.cPointer(), &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPushButton(C.QPushButton_new6(icon.cPointer(), text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -214,7 +176,7 @@ func (this *QPushButton) SetMenu(menu *QMenu) { } func (this *QPushButton) Menu() *QMenu { - return newQMenu(C.QPushButton_Menu(this.h), nil, nil, nil) + return newQMenu(C.QPushButton_Menu(this.h)) } func (this *QPushButton) SetFlat(flat bool) { @@ -375,7 +337,7 @@ func miqt_exec_callback_QPushButton_PaintEvent(self *C.QPushButton, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QPushButton{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -401,7 +363,7 @@ func miqt_exec_callback_QPushButton_KeyPressEvent(self *C.QPushButton, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QPushButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -427,7 +389,7 @@ func miqt_exec_callback_QPushButton_FocusInEvent(self *C.QPushButton, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QPushButton{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -453,7 +415,7 @@ func miqt_exec_callback_QPushButton_FocusOutEvent(self *C.QPushButton, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QPushButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -553,7 +515,7 @@ func miqt_exec_callback_QPushButton_KeyReleaseEvent(self *C.QPushButton, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QPushButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -579,7 +541,7 @@ func miqt_exec_callback_QPushButton_MousePressEvent(self *C.QPushButton, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QPushButton{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -605,7 +567,7 @@ func miqt_exec_callback_QPushButton_MouseReleaseEvent(self *C.QPushButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QPushButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -631,7 +593,7 @@ func miqt_exec_callback_QPushButton_MouseMoveEvent(self *C.QPushButton, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QPushButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -683,7 +645,7 @@ func miqt_exec_callback_QPushButton_TimerEvent(self *C.QPushButton, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QPushButton{h: self}).callVirtualBase_TimerEvent, slotval1) diff --git a/qt/gen_qpushbutton.h b/qt/gen_qpushbutton.h index afa7f75d..88e3502f 100644 --- a/qt/gen_qpushbutton.h +++ b/qt/gen_qpushbutton.h @@ -50,12 +50,13 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QPushButton_new(QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPushButton_new2(QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPushButton_new3(struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPushButton_new4(QIcon* icon, struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPushButton_new5(struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QPushButton* QPushButton_new(QWidget* parent); +QPushButton* QPushButton_new2(); +QPushButton* QPushButton_new3(struct miqt_string text); +QPushButton* QPushButton_new4(QIcon* icon, struct miqt_string text); +QPushButton* QPushButton_new5(struct miqt_string text, QWidget* parent); +QPushButton* QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent); +void QPushButton_virtbase(QPushButton* src, QAbstractButton** outptr_QAbstractButton); QMetaObject* QPushButton_MetaObject(const QPushButton* self); void* QPushButton_Metacast(QPushButton* self, const char* param1); struct miqt_string QPushButton_Tr(const char* s); diff --git a/qt/gen_qquaternion.cpp b/qt/gen_qquaternion.cpp index 832e42f9..2124e5c7 100644 --- a/qt/gen_qquaternion.cpp +++ b/qt/gen_qquaternion.cpp @@ -5,34 +5,28 @@ #include "gen_qquaternion.h" #include "_cgo_export.h" -void QQuaternion_new(QQuaternion** outptr_QQuaternion) { - QQuaternion* ret = new QQuaternion(); - *outptr_QQuaternion = ret; +QQuaternion* QQuaternion_new() { + return new QQuaternion(); } -void QQuaternion_new2(int param1, QQuaternion** outptr_QQuaternion) { - QQuaternion* ret = new QQuaternion(static_cast(param1)); - *outptr_QQuaternion = ret; +QQuaternion* QQuaternion_new2(int param1) { + return new QQuaternion(static_cast(param1)); } -void QQuaternion_new3(float scalar, float xpos, float ypos, float zpos, QQuaternion** outptr_QQuaternion) { - QQuaternion* ret = new QQuaternion(static_cast(scalar), static_cast(xpos), static_cast(ypos), static_cast(zpos)); - *outptr_QQuaternion = ret; +QQuaternion* QQuaternion_new3(float scalar, float xpos, float ypos, float zpos) { + return new QQuaternion(static_cast(scalar), static_cast(xpos), static_cast(ypos), static_cast(zpos)); } -void QQuaternion_new4(float scalar, QVector3D* vector, QQuaternion** outptr_QQuaternion) { - QQuaternion* ret = new QQuaternion(static_cast(scalar), *vector); - *outptr_QQuaternion = ret; +QQuaternion* QQuaternion_new4(float scalar, QVector3D* vector) { + return new QQuaternion(static_cast(scalar), *vector); } -void QQuaternion_new5(QVector4D* vector, QQuaternion** outptr_QQuaternion) { - QQuaternion* ret = new QQuaternion(*vector); - *outptr_QQuaternion = ret; +QQuaternion* QQuaternion_new5(QVector4D* vector) { + return new QQuaternion(*vector); } -void QQuaternion_new6(QQuaternion* param1, QQuaternion** outptr_QQuaternion) { - QQuaternion* ret = new QQuaternion(*param1); - *outptr_QQuaternion = ret; +QQuaternion* QQuaternion_new6(QQuaternion* param1) { + return new QQuaternion(*param1); } bool QQuaternion_IsNull(const QQuaternion* self) { diff --git a/qt/gen_qquaternion.go b/qt/gen_qquaternion.go index 88215195..9acc235b 100644 --- a/qt/gen_qquaternion.go +++ b/qt/gen_qquaternion.go @@ -37,74 +37,59 @@ func newQQuaternion(h *C.QQuaternion) *QQuaternion { if h == nil { return nil } + return &QQuaternion{h: h} } // UnsafeNewQQuaternion constructs the type using only unsafe pointers. func UnsafeNewQQuaternion(h unsafe.Pointer) *QQuaternion { - if h == nil { - return nil - } - - return &QQuaternion{h: (*C.QQuaternion)(h)} + return newQQuaternion((*C.QQuaternion)(h)) } // NewQQuaternion constructs a new QQuaternion object. func NewQQuaternion() *QQuaternion { - var outptr_QQuaternion *C.QQuaternion = nil - C.QQuaternion_new(&outptr_QQuaternion) - ret := newQQuaternion(outptr_QQuaternion) + ret := newQQuaternion(C.QQuaternion_new()) ret.isSubclass = true return ret } // NewQQuaternion2 constructs a new QQuaternion object. func NewQQuaternion2(param1 Initialization) *QQuaternion { - var outptr_QQuaternion *C.QQuaternion = nil - C.QQuaternion_new2((C.int)(param1), &outptr_QQuaternion) - ret := newQQuaternion(outptr_QQuaternion) + ret := newQQuaternion(C.QQuaternion_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQQuaternion3 constructs a new QQuaternion object. func NewQQuaternion3(scalar float32, xpos float32, ypos float32, zpos float32) *QQuaternion { - var outptr_QQuaternion *C.QQuaternion = nil - C.QQuaternion_new3((C.float)(scalar), (C.float)(xpos), (C.float)(ypos), (C.float)(zpos), &outptr_QQuaternion) - ret := newQQuaternion(outptr_QQuaternion) + ret := newQQuaternion(C.QQuaternion_new3((C.float)(scalar), (C.float)(xpos), (C.float)(ypos), (C.float)(zpos))) ret.isSubclass = true return ret } // NewQQuaternion4 constructs a new QQuaternion object. func NewQQuaternion4(scalar float32, vector *QVector3D) *QQuaternion { - var outptr_QQuaternion *C.QQuaternion = nil - C.QQuaternion_new4((C.float)(scalar), vector.cPointer(), &outptr_QQuaternion) - ret := newQQuaternion(outptr_QQuaternion) + ret := newQQuaternion(C.QQuaternion_new4((C.float)(scalar), vector.cPointer())) ret.isSubclass = true return ret } // NewQQuaternion5 constructs a new QQuaternion object. func NewQQuaternion5(vector *QVector4D) *QQuaternion { - var outptr_QQuaternion *C.QQuaternion = nil - C.QQuaternion_new5(vector.cPointer(), &outptr_QQuaternion) - ret := newQQuaternion(outptr_QQuaternion) + ret := newQQuaternion(C.QQuaternion_new5(vector.cPointer())) ret.isSubclass = true return ret } // NewQQuaternion6 constructs a new QQuaternion object. func NewQQuaternion6(param1 *QQuaternion) *QQuaternion { - var outptr_QQuaternion *C.QQuaternion = nil - C.QQuaternion_new6(param1.cPointer(), &outptr_QQuaternion) - ret := newQQuaternion(outptr_QQuaternion) + ret := newQQuaternion(C.QQuaternion_new6(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qquaternion.h b/qt/gen_qquaternion.h index cff44ba8..1b67c509 100644 --- a/qt/gen_qquaternion.h +++ b/qt/gen_qquaternion.h @@ -24,12 +24,12 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -void QQuaternion_new(QQuaternion** outptr_QQuaternion); -void QQuaternion_new2(int param1, QQuaternion** outptr_QQuaternion); -void QQuaternion_new3(float scalar, float xpos, float ypos, float zpos, QQuaternion** outptr_QQuaternion); -void QQuaternion_new4(float scalar, QVector3D* vector, QQuaternion** outptr_QQuaternion); -void QQuaternion_new5(QVector4D* vector, QQuaternion** outptr_QQuaternion); -void QQuaternion_new6(QQuaternion* param1, QQuaternion** outptr_QQuaternion); +QQuaternion* QQuaternion_new(); +QQuaternion* QQuaternion_new2(int param1); +QQuaternion* QQuaternion_new3(float scalar, float xpos, float ypos, float zpos); +QQuaternion* QQuaternion_new4(float scalar, QVector3D* vector); +QQuaternion* QQuaternion_new5(QVector4D* vector); +QQuaternion* QQuaternion_new6(QQuaternion* param1); bool QQuaternion_IsNull(const QQuaternion* self); bool QQuaternion_IsIdentity(const QQuaternion* self); QVector3D* QQuaternion_Vector(const QQuaternion* self); diff --git a/qt/gen_qradiobutton.cpp b/qt/gen_qradiobutton.cpp index ab135c96..811f8aa8 100644 --- a/qt/gen_qradiobutton.cpp +++ b/qt/gen_qradiobutton.cpp @@ -409,42 +409,26 @@ public: }; -void QRadioButton_new(QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(parent); - *outptr_QRadioButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QRadioButton* QRadioButton_new(QWidget* parent) { + return new MiqtVirtualQRadioButton(parent); } -void QRadioButton_new2(QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(); - *outptr_QRadioButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QRadioButton* QRadioButton_new2() { + return new MiqtVirtualQRadioButton(); } -void QRadioButton_new3(struct miqt_string text, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QRadioButton* QRadioButton_new3(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(text_QString); - *outptr_QRadioButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQRadioButton(text_QString); } -void QRadioButton_new4(struct miqt_string text, QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QRadioButton* QRadioButton_new4(struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(text_QString, parent); - *outptr_QRadioButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQRadioButton(text_QString, parent); +} + +void QRadioButton_virtbase(QRadioButton* src, QAbstractButton** outptr_QAbstractButton) { + *outptr_QAbstractButton = static_cast(src); } QMetaObject* QRadioButton_MetaObject(const QRadioButton* self) { diff --git a/qt/gen_qradiobutton.go b/qt/gen_qradiobutton.go index 1650dac1..514a545b 100644 --- a/qt/gen_qradiobutton.go +++ b/qt/gen_qradiobutton.go @@ -35,48 +35,34 @@ func (this *QRadioButton) UnsafePointer() unsafe.Pointer { } // newQRadioButton constructs the type using only CGO pointers. -func newQRadioButton(h *C.QRadioButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QRadioButton { +func newQRadioButton(h *C.QRadioButton) *QRadioButton { if h == nil { return nil } + var outptr_QAbstractButton *C.QAbstractButton = nil + C.QRadioButton_virtbase(h, &outptr_QAbstractButton) + return &QRadioButton{h: h, - QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractButton: newQAbstractButton(outptr_QAbstractButton)} } // UnsafeNewQRadioButton constructs the type using only unsafe pointers. -func UnsafeNewQRadioButton(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QRadioButton { - if h == nil { - return nil - } - - return &QRadioButton{h: (*C.QRadioButton)(h), - QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQRadioButton(h unsafe.Pointer) *QRadioButton { + return newQRadioButton((*C.QRadioButton)(h)) } // NewQRadioButton constructs a new QRadioButton object. func NewQRadioButton(parent *QWidget) *QRadioButton { - var outptr_QRadioButton *C.QRadioButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRadioButton_new(parent.cPointer(), &outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQRadioButton(C.QRadioButton_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQRadioButton2 constructs a new QRadioButton object. func NewQRadioButton2() *QRadioButton { - var outptr_QRadioButton *C.QRadioButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRadioButton_new2(&outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQRadioButton(C.QRadioButton_new2()) ret.isSubclass = true return ret } @@ -87,14 +73,8 @@ func NewQRadioButton3(text string) *QRadioButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QRadioButton *C.QRadioButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRadioButton_new3(text_ms, &outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQRadioButton(C.QRadioButton_new3(text_ms)) ret.isSubclass = true return ret } @@ -105,14 +85,8 @@ func NewQRadioButton4(text string, parent *QWidget) *QRadioButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QRadioButton *C.QRadioButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRadioButton_new4(text_ms, parent.cPointer(), &outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQRadioButton(C.QRadioButton_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -331,7 +305,7 @@ func miqt_exec_callback_QRadioButton_PaintEvent(self *C.QRadioButton, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QRadioButton{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -357,7 +331,7 @@ func miqt_exec_callback_QRadioButton_MouseMoveEvent(self *C.QRadioButton, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QRadioButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -429,7 +403,7 @@ func miqt_exec_callback_QRadioButton_KeyPressEvent(self *C.QRadioButton, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QRadioButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -455,7 +429,7 @@ func miqt_exec_callback_QRadioButton_KeyReleaseEvent(self *C.QRadioButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QRadioButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -481,7 +455,7 @@ func miqt_exec_callback_QRadioButton_MousePressEvent(self *C.QRadioButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QRadioButton{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -507,7 +481,7 @@ func miqt_exec_callback_QRadioButton_MouseReleaseEvent(self *C.QRadioButton, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QRadioButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -533,7 +507,7 @@ func miqt_exec_callback_QRadioButton_FocusInEvent(self *C.QRadioButton, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QRadioButton{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -559,7 +533,7 @@ func miqt_exec_callback_QRadioButton_FocusOutEvent(self *C.QRadioButton, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QRadioButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -611,7 +585,7 @@ func miqt_exec_callback_QRadioButton_TimerEvent(self *C.QRadioButton, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QRadioButton{h: self}).callVirtualBase_TimerEvent, slotval1) diff --git a/qt/gen_qradiobutton.h b/qt/gen_qradiobutton.h index ce112dce..a53c6e78 100644 --- a/qt/gen_qradiobutton.h +++ b/qt/gen_qradiobutton.h @@ -46,10 +46,11 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QRadioButton_new(QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QRadioButton_new2(QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QRadioButton_new3(struct miqt_string text, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QRadioButton_new4(struct miqt_string text, QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QRadioButton* QRadioButton_new(QWidget* parent); +QRadioButton* QRadioButton_new2(); +QRadioButton* QRadioButton_new3(struct miqt_string text); +QRadioButton* QRadioButton_new4(struct miqt_string text, QWidget* parent); +void QRadioButton_virtbase(QRadioButton* src, QAbstractButton** outptr_QAbstractButton); QMetaObject* QRadioButton_MetaObject(const QRadioButton* self); void* QRadioButton_Metacast(QRadioButton* self, const char* param1); struct miqt_string QRadioButton_Tr(const char* s); diff --git a/qt/gen_qrandom.cpp b/qt/gen_qrandom.cpp index 807cdca7..3368e0be 100644 --- a/qt/gen_qrandom.cpp +++ b/qt/gen_qrandom.cpp @@ -4,29 +4,24 @@ #include "gen_qrandom.h" #include "_cgo_export.h" -void QRandomGenerator_new(QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator* ret = new QRandomGenerator(); - *outptr_QRandomGenerator = ret; +QRandomGenerator* QRandomGenerator_new() { + return new QRandomGenerator(); } -void QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator* ret = new QRandomGenerator(static_cast(seedBuffer), (qsizetype)(lenVal)); - *outptr_QRandomGenerator = ret; +QRandomGenerator* QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal) { + return new QRandomGenerator(static_cast(seedBuffer), (qsizetype)(lenVal)); } -void QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator* ret = new QRandomGenerator(static_cast(begin), static_cast(end)); - *outptr_QRandomGenerator = ret; +QRandomGenerator* QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end) { + return new QRandomGenerator(static_cast(begin), static_cast(end)); } -void QRandomGenerator_new4(QRandomGenerator* other, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator* ret = new QRandomGenerator(*other); - *outptr_QRandomGenerator = ret; +QRandomGenerator* QRandomGenerator_new4(QRandomGenerator* other) { + return new QRandomGenerator(*other); } -void QRandomGenerator_new5(unsigned int seedValue, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator* ret = new QRandomGenerator(static_cast(seedValue)); - *outptr_QRandomGenerator = ret; +QRandomGenerator* QRandomGenerator_new5(unsigned int seedValue) { + return new QRandomGenerator(static_cast(seedValue)); } void QRandomGenerator_OperatorAssign(QRandomGenerator* self, QRandomGenerator* other) { @@ -120,40 +115,32 @@ void QRandomGenerator_Delete(QRandomGenerator* self, bool isSubclass) { } } -void QRandomGenerator64_new(QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator64* ret = new QRandomGenerator64(); - *outptr_QRandomGenerator64 = ret; - *outptr_QRandomGenerator = static_cast(ret); +QRandomGenerator64* QRandomGenerator64_new() { + return new QRandomGenerator64(); } -void QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator64* ret = new QRandomGenerator64(static_cast(seedBuffer), (qsizetype)(lenVal)); - *outptr_QRandomGenerator64 = ret; - *outptr_QRandomGenerator = static_cast(ret); +QRandomGenerator64* QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal) { + return new QRandomGenerator64(static_cast(seedBuffer), (qsizetype)(lenVal)); } -void QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator64* ret = new QRandomGenerator64(static_cast(begin), static_cast(end)); - *outptr_QRandomGenerator64 = ret; - *outptr_QRandomGenerator = static_cast(ret); +QRandomGenerator64* QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end) { + return new QRandomGenerator64(static_cast(begin), static_cast(end)); } -void QRandomGenerator64_new4(QRandomGenerator* other, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator64* ret = new QRandomGenerator64(*other); - *outptr_QRandomGenerator64 = ret; - *outptr_QRandomGenerator = static_cast(ret); +QRandomGenerator64* QRandomGenerator64_new4(QRandomGenerator* other) { + return new QRandomGenerator64(*other); } -void QRandomGenerator64_new5(QRandomGenerator64* param1, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator64* ret = new QRandomGenerator64(*param1); - *outptr_QRandomGenerator64 = ret; - *outptr_QRandomGenerator = static_cast(ret); +QRandomGenerator64* QRandomGenerator64_new5(QRandomGenerator64* param1) { + return new QRandomGenerator64(*param1); } -void QRandomGenerator64_new6(unsigned int seedValue, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator64* ret = new QRandomGenerator64(static_cast(seedValue)); - *outptr_QRandomGenerator64 = ret; - *outptr_QRandomGenerator = static_cast(ret); +QRandomGenerator64* QRandomGenerator64_new6(unsigned int seedValue) { + return new QRandomGenerator64(static_cast(seedValue)); +} + +void QRandomGenerator64_virtbase(QRandomGenerator64* src, QRandomGenerator** outptr_QRandomGenerator) { + *outptr_QRandomGenerator = static_cast(src); } unsigned long long QRandomGenerator64_Generate(QRandomGenerator64* self) { diff --git a/qt/gen_qrandom.go b/qt/gen_qrandom.go index 5c4a9e4f..f28cd875 100644 --- a/qt/gen_qrandom.go +++ b/qt/gen_qrandom.go @@ -37,64 +37,51 @@ func newQRandomGenerator(h *C.QRandomGenerator) *QRandomGenerator { if h == nil { return nil } + return &QRandomGenerator{h: h} } // UnsafeNewQRandomGenerator constructs the type using only unsafe pointers. func UnsafeNewQRandomGenerator(h unsafe.Pointer) *QRandomGenerator { - if h == nil { - return nil - } - - return &QRandomGenerator{h: (*C.QRandomGenerator)(h)} + return newQRandomGenerator((*C.QRandomGenerator)(h)) } // NewQRandomGenerator constructs a new QRandomGenerator object. func NewQRandomGenerator() *QRandomGenerator { - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator_new(&outptr_QRandomGenerator) - ret := newQRandomGenerator(outptr_QRandomGenerator) + ret := newQRandomGenerator(C.QRandomGenerator_new()) ret.isSubclass = true return ret } // NewQRandomGenerator2 constructs a new QRandomGenerator object. func NewQRandomGenerator2(seedBuffer *uint, lenVal int64) *QRandomGenerator { - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal), &outptr_QRandomGenerator) - ret := newQRandomGenerator(outptr_QRandomGenerator) + ret := newQRandomGenerator(C.QRandomGenerator_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal))) ret.isSubclass = true return ret } // NewQRandomGenerator3 constructs a new QRandomGenerator object. func NewQRandomGenerator3(begin *uint, end *uint) *QRandomGenerator { - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end)), &outptr_QRandomGenerator) - ret := newQRandomGenerator(outptr_QRandomGenerator) + ret := newQRandomGenerator(C.QRandomGenerator_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end)))) ret.isSubclass = true return ret } // NewQRandomGenerator4 constructs a new QRandomGenerator object. func NewQRandomGenerator4(other *QRandomGenerator) *QRandomGenerator { - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator_new4(other.cPointer(), &outptr_QRandomGenerator) - ret := newQRandomGenerator(outptr_QRandomGenerator) + ret := newQRandomGenerator(C.QRandomGenerator_new4(other.cPointer())) ret.isSubclass = true return ret } // NewQRandomGenerator5 constructs a new QRandomGenerator object. func NewQRandomGenerator5(seedValue uint) *QRandomGenerator { - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator_new5((C.uint)(seedValue), &outptr_QRandomGenerator) - ret := newQRandomGenerator(outptr_QRandomGenerator) + ret := newQRandomGenerator(C.QRandomGenerator_new5((C.uint)(seedValue))) ret.isSubclass = true return ret } @@ -212,86 +199,66 @@ func (this *QRandomGenerator64) UnsafePointer() unsafe.Pointer { } // newQRandomGenerator64 constructs the type using only CGO pointers. -func newQRandomGenerator64(h *C.QRandomGenerator64, h_QRandomGenerator *C.QRandomGenerator) *QRandomGenerator64 { +func newQRandomGenerator64(h *C.QRandomGenerator64) *QRandomGenerator64 { if h == nil { return nil } + var outptr_QRandomGenerator *C.QRandomGenerator = nil + C.QRandomGenerator64_virtbase(h, &outptr_QRandomGenerator) + return &QRandomGenerator64{h: h, - QRandomGenerator: newQRandomGenerator(h_QRandomGenerator)} + QRandomGenerator: newQRandomGenerator(outptr_QRandomGenerator)} } // UnsafeNewQRandomGenerator64 constructs the type using only unsafe pointers. -func UnsafeNewQRandomGenerator64(h unsafe.Pointer, h_QRandomGenerator unsafe.Pointer) *QRandomGenerator64 { - if h == nil { - return nil - } - - return &QRandomGenerator64{h: (*C.QRandomGenerator64)(h), - QRandomGenerator: UnsafeNewQRandomGenerator(h_QRandomGenerator)} +func UnsafeNewQRandomGenerator64(h unsafe.Pointer) *QRandomGenerator64 { + return newQRandomGenerator64((*C.QRandomGenerator64)(h)) } // NewQRandomGenerator64 constructs a new QRandomGenerator64 object. func NewQRandomGenerator64() *QRandomGenerator64 { - var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator64_new(&outptr_QRandomGenerator64, &outptr_QRandomGenerator) - ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret := newQRandomGenerator64(C.QRandomGenerator64_new()) ret.isSubclass = true return ret } // NewQRandomGenerator642 constructs a new QRandomGenerator64 object. func NewQRandomGenerator642(seedBuffer *uint, lenVal int64) *QRandomGenerator64 { - var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator64_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) - ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret := newQRandomGenerator64(C.QRandomGenerator64_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal))) ret.isSubclass = true return ret } // NewQRandomGenerator643 constructs a new QRandomGenerator64 object. func NewQRandomGenerator643(begin *uint, end *uint) *QRandomGenerator64 { - var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator64_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end)), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) - ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret := newQRandomGenerator64(C.QRandomGenerator64_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end)))) ret.isSubclass = true return ret } // NewQRandomGenerator644 constructs a new QRandomGenerator64 object. func NewQRandomGenerator644(other *QRandomGenerator) *QRandomGenerator64 { - var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator64_new4(other.cPointer(), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) - ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret := newQRandomGenerator64(C.QRandomGenerator64_new4(other.cPointer())) ret.isSubclass = true return ret } // NewQRandomGenerator645 constructs a new QRandomGenerator64 object. func NewQRandomGenerator645(param1 *QRandomGenerator64) *QRandomGenerator64 { - var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator64_new5(param1.cPointer(), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) - ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret := newQRandomGenerator64(C.QRandomGenerator64_new5(param1.cPointer())) ret.isSubclass = true return ret } // NewQRandomGenerator646 constructs a new QRandomGenerator64 object. func NewQRandomGenerator646(seedValue uint) *QRandomGenerator64 { - var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator64_new6((C.uint)(seedValue), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) - ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret := newQRandomGenerator64(C.QRandomGenerator64_new6((C.uint)(seedValue))) ret.isSubclass = true return ret } @@ -317,15 +284,15 @@ func QRandomGenerator64_Max() uint64 { } func QRandomGenerator64_System() *QRandomGenerator64 { - return newQRandomGenerator64(C.QRandomGenerator64_System(), nil) + return newQRandomGenerator64(C.QRandomGenerator64_System()) } func QRandomGenerator64_Global() *QRandomGenerator64 { - return newQRandomGenerator64(C.QRandomGenerator64_Global(), nil) + return newQRandomGenerator64(C.QRandomGenerator64_Global()) } func QRandomGenerator64_SecurelySeeded() *QRandomGenerator64 { - _goptr := newQRandomGenerator64(C.QRandomGenerator64_SecurelySeeded(), nil) + _goptr := newQRandomGenerator64(C.QRandomGenerator64_SecurelySeeded()) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/gen_qrandom.h b/qt/gen_qrandom.h index c79a6195..a5cb55dc 100644 --- a/qt/gen_qrandom.h +++ b/qt/gen_qrandom.h @@ -22,11 +22,11 @@ typedef struct QRandomGenerator QRandomGenerator; typedef struct QRandomGenerator64 QRandomGenerator64; #endif -void QRandomGenerator_new(QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator_new4(QRandomGenerator* other, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator_new5(unsigned int seedValue, QRandomGenerator** outptr_QRandomGenerator); +QRandomGenerator* QRandomGenerator_new(); +QRandomGenerator* QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal); +QRandomGenerator* QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end); +QRandomGenerator* QRandomGenerator_new4(QRandomGenerator* other); +QRandomGenerator* QRandomGenerator_new5(unsigned int seedValue); void QRandomGenerator_OperatorAssign(QRandomGenerator* self, QRandomGenerator* other); unsigned int QRandomGenerator_Generate(QRandomGenerator* self); unsigned long long QRandomGenerator_Generate64(QRandomGenerator* self); @@ -48,12 +48,13 @@ QRandomGenerator* QRandomGenerator_SecurelySeeded(); void QRandomGenerator_Seed1(QRandomGenerator* self, unsigned int s); void QRandomGenerator_Delete(QRandomGenerator* self, bool isSubclass); -void QRandomGenerator64_new(QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator64_new4(QRandomGenerator* other, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator64_new5(QRandomGenerator64* param1, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator64_new6(unsigned int seedValue, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); +QRandomGenerator64* QRandomGenerator64_new(); +QRandomGenerator64* QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal); +QRandomGenerator64* QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end); +QRandomGenerator64* QRandomGenerator64_new4(QRandomGenerator* other); +QRandomGenerator64* QRandomGenerator64_new5(QRandomGenerator64* param1); +QRandomGenerator64* QRandomGenerator64_new6(unsigned int seedValue); +void QRandomGenerator64_virtbase(QRandomGenerator64* src, QRandomGenerator** outptr_QRandomGenerator); unsigned long long QRandomGenerator64_Generate(QRandomGenerator64* self); unsigned long long QRandomGenerator64_OperatorCall(QRandomGenerator64* self); void QRandomGenerator64_Discard(QRandomGenerator64* self, unsigned long long z); diff --git a/qt/gen_qrasterwindow.cpp b/qt/gen_qrasterwindow.cpp index 97a76be3..7de4ba6c 100644 --- a/qt/gen_qrasterwindow.cpp +++ b/qt/gen_qrasterwindow.cpp @@ -144,24 +144,16 @@ public: }; -void QRasterWindow_new(QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQRasterWindow* ret = new MiqtVirtualQRasterWindow(); - *outptr_QRasterWindow = ret; - *outptr_QPaintDeviceWindow = static_cast(ret); - *outptr_QWindow = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QRasterWindow* QRasterWindow_new() { + return new MiqtVirtualQRasterWindow(); } -void QRasterWindow_new2(QWindow* parent, QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQRasterWindow* ret = new MiqtVirtualQRasterWindow(parent); - *outptr_QRasterWindow = ret; - *outptr_QPaintDeviceWindow = static_cast(ret); - *outptr_QWindow = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QRasterWindow* QRasterWindow_new2(QWindow* parent) { + return new MiqtVirtualQRasterWindow(parent); +} + +void QRasterWindow_virtbase(QRasterWindow* src, QPaintDeviceWindow** outptr_QPaintDeviceWindow) { + *outptr_QPaintDeviceWindow = static_cast(src); } QMetaObject* QRasterWindow_MetaObject(const QRasterWindow* self) { diff --git a/qt/gen_qrasterwindow.go b/qt/gen_qrasterwindow.go index d8b53d7f..f9db37d3 100644 --- a/qt/gen_qrasterwindow.go +++ b/qt/gen_qrasterwindow.go @@ -35,50 +35,34 @@ func (this *QRasterWindow) UnsafePointer() unsafe.Pointer { } // newQRasterWindow constructs the type using only CGO pointers. -func newQRasterWindow(h *C.QRasterWindow, h_QPaintDeviceWindow *C.QPaintDeviceWindow, h_QWindow *C.QWindow, h_QObject *C.QObject, h_QSurface *C.QSurface, h_QPaintDevice *C.QPaintDevice) *QRasterWindow { +func newQRasterWindow(h *C.QRasterWindow) *QRasterWindow { if h == nil { return nil } + var outptr_QPaintDeviceWindow *C.QPaintDeviceWindow = nil + C.QRasterWindow_virtbase(h, &outptr_QPaintDeviceWindow) + return &QRasterWindow{h: h, - QPaintDeviceWindow: newQPaintDeviceWindow(h_QPaintDeviceWindow, h_QWindow, h_QObject, h_QSurface, h_QPaintDevice)} + QPaintDeviceWindow: newQPaintDeviceWindow(outptr_QPaintDeviceWindow)} } // UnsafeNewQRasterWindow constructs the type using only unsafe pointers. -func UnsafeNewQRasterWindow(h unsafe.Pointer, h_QPaintDeviceWindow unsafe.Pointer, h_QWindow unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QRasterWindow { - if h == nil { - return nil - } - - return &QRasterWindow{h: (*C.QRasterWindow)(h), - QPaintDeviceWindow: UnsafeNewQPaintDeviceWindow(h_QPaintDeviceWindow, h_QWindow, h_QObject, h_QSurface, h_QPaintDevice)} +func UnsafeNewQRasterWindow(h unsafe.Pointer) *QRasterWindow { + return newQRasterWindow((*C.QRasterWindow)(h)) } // NewQRasterWindow constructs a new QRasterWindow object. func NewQRasterWindow() *QRasterWindow { - var outptr_QRasterWindow *C.QRasterWindow = nil - var outptr_QPaintDeviceWindow *C.QPaintDeviceWindow = nil - var outptr_QWindow *C.QWindow = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRasterWindow_new(&outptr_QRasterWindow, &outptr_QPaintDeviceWindow, &outptr_QWindow, &outptr_QObject, &outptr_QSurface, &outptr_QPaintDevice) - ret := newQRasterWindow(outptr_QRasterWindow, outptr_QPaintDeviceWindow, outptr_QWindow, outptr_QObject, outptr_QSurface, outptr_QPaintDevice) + ret := newQRasterWindow(C.QRasterWindow_new()) ret.isSubclass = true return ret } // NewQRasterWindow2 constructs a new QRasterWindow object. func NewQRasterWindow2(parent *QWindow) *QRasterWindow { - var outptr_QRasterWindow *C.QRasterWindow = nil - var outptr_QPaintDeviceWindow *C.QPaintDeviceWindow = nil - var outptr_QWindow *C.QWindow = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRasterWindow_new2(parent.cPointer(), &outptr_QRasterWindow, &outptr_QPaintDeviceWindow, &outptr_QWindow, &outptr_QObject, &outptr_QSurface, &outptr_QPaintDevice) - ret := newQRasterWindow(outptr_QRasterWindow, outptr_QPaintDeviceWindow, outptr_QWindow, outptr_QObject, outptr_QSurface, outptr_QPaintDevice) + ret := newQRasterWindow(C.QRasterWindow_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -231,7 +215,7 @@ func miqt_exec_callback_QRasterWindow_PaintEvent(self *C.QRasterWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QRasterWindow{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -257,7 +241,7 @@ func miqt_exec_callback_QRasterWindow_ExposeEvent(self *C.QRasterWindow, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQExposeEvent(param1, nil) + slotval1 := newQExposeEvent(param1) gofunc((&QRasterWindow{h: self}).callVirtualBase_ExposeEvent, slotval1) diff --git a/qt/gen_qrasterwindow.h b/qt/gen_qrasterwindow.h index 7b22bc55..d051e919 100644 --- a/qt/gen_qrasterwindow.h +++ b/qt/gen_qrasterwindow.h @@ -40,8 +40,9 @@ typedef struct QSurface QSurface; typedef struct QWindow QWindow; #endif -void QRasterWindow_new(QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice); -void QRasterWindow_new2(QWindow* parent, QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice); +QRasterWindow* QRasterWindow_new(); +QRasterWindow* QRasterWindow_new2(QWindow* parent); +void QRasterWindow_virtbase(QRasterWindow* src, QPaintDeviceWindow** outptr_QPaintDeviceWindow); QMetaObject* QRasterWindow_MetaObject(const QRasterWindow* self); void* QRasterWindow_Metacast(QRasterWindow* self, const char* param1); struct miqt_string QRasterWindow_Tr(const char* s); diff --git a/qt/gen_qrawfont.cpp b/qt/gen_qrawfont.cpp index 97db60dc..6025604c 100644 --- a/qt/gen_qrawfont.cpp +++ b/qt/gen_qrawfont.cpp @@ -15,38 +15,32 @@ #include "gen_qrawfont.h" #include "_cgo_export.h" -void QRawFont_new(QRawFont** outptr_QRawFont) { - QRawFont* ret = new QRawFont(); - *outptr_QRawFont = ret; +QRawFont* QRawFont_new() { + return new QRawFont(); } -void QRawFont_new2(struct miqt_string fileName, double pixelSize, QRawFont** outptr_QRawFont) { +QRawFont* QRawFont_new2(struct miqt_string fileName, double pixelSize) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QRawFont* ret = new QRawFont(fileName_QString, static_cast(pixelSize)); - *outptr_QRawFont = ret; + return new QRawFont(fileName_QString, static_cast(pixelSize)); } -void QRawFont_new3(struct miqt_string fontData, double pixelSize, QRawFont** outptr_QRawFont) { +QRawFont* QRawFont_new3(struct miqt_string fontData, double pixelSize) { QByteArray fontData_QByteArray(fontData.data, fontData.len); - QRawFont* ret = new QRawFont(fontData_QByteArray, static_cast(pixelSize)); - *outptr_QRawFont = ret; + return new QRawFont(fontData_QByteArray, static_cast(pixelSize)); } -void QRawFont_new4(QRawFont* other, QRawFont** outptr_QRawFont) { - QRawFont* ret = new QRawFont(*other); - *outptr_QRawFont = ret; +QRawFont* QRawFont_new4(QRawFont* other) { + return new QRawFont(*other); } -void QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont) { +QRawFont* QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QRawFont* ret = new QRawFont(fileName_QString, static_cast(pixelSize), static_cast(hintingPreference)); - *outptr_QRawFont = ret; + return new QRawFont(fileName_QString, static_cast(pixelSize), static_cast(hintingPreference)); } -void QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont) { +QRawFont* QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference) { QByteArray fontData_QByteArray(fontData.data, fontData.len); - QRawFont* ret = new QRawFont(fontData_QByteArray, static_cast(pixelSize), static_cast(hintingPreference)); - *outptr_QRawFont = ret; + return new QRawFont(fontData_QByteArray, static_cast(pixelSize), static_cast(hintingPreference)); } void QRawFont_OperatorAssign(QRawFont* self, QRawFont* other) { diff --git a/qt/gen_qrawfont.go b/qt/gen_qrawfont.go index bc234d94..603ee08b 100644 --- a/qt/gen_qrawfont.go +++ b/qt/gen_qrawfont.go @@ -52,24 +52,19 @@ func newQRawFont(h *C.QRawFont) *QRawFont { if h == nil { return nil } + return &QRawFont{h: h} } // UnsafeNewQRawFont constructs the type using only unsafe pointers. func UnsafeNewQRawFont(h unsafe.Pointer) *QRawFont { - if h == nil { - return nil - } - - return &QRawFont{h: (*C.QRawFont)(h)} + return newQRawFont((*C.QRawFont)(h)) } // NewQRawFont constructs a new QRawFont object. func NewQRawFont() *QRawFont { - var outptr_QRawFont *C.QRawFont = nil - C.QRawFont_new(&outptr_QRawFont) - ret := newQRawFont(outptr_QRawFont) + ret := newQRawFont(C.QRawFont_new()) ret.isSubclass = true return ret } @@ -80,10 +75,8 @@ func NewQRawFont2(fileName string, pixelSize float64) *QRawFont { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QRawFont *C.QRawFont = nil - C.QRawFont_new2(fileName_ms, (C.double)(pixelSize), &outptr_QRawFont) - ret := newQRawFont(outptr_QRawFont) + ret := newQRawFont(C.QRawFont_new2(fileName_ms, (C.double)(pixelSize))) ret.isSubclass = true return ret } @@ -93,20 +86,16 @@ func NewQRawFont3(fontData []byte, pixelSize float64) *QRawFont { fontData_alias := C.struct_miqt_string{} fontData_alias.data = (*C.char)(unsafe.Pointer(&fontData[0])) fontData_alias.len = C.size_t(len(fontData)) - var outptr_QRawFont *C.QRawFont = nil - C.QRawFont_new3(fontData_alias, (C.double)(pixelSize), &outptr_QRawFont) - ret := newQRawFont(outptr_QRawFont) + ret := newQRawFont(C.QRawFont_new3(fontData_alias, (C.double)(pixelSize))) ret.isSubclass = true return ret } // NewQRawFont4 constructs a new QRawFont object. func NewQRawFont4(other *QRawFont) *QRawFont { - var outptr_QRawFont *C.QRawFont = nil - C.QRawFont_new4(other.cPointer(), &outptr_QRawFont) - ret := newQRawFont(outptr_QRawFont) + ret := newQRawFont(C.QRawFont_new4(other.cPointer())) ret.isSubclass = true return ret } @@ -117,10 +106,8 @@ func NewQRawFont5(fileName string, pixelSize float64, hintingPreference QFont__H fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QRawFont *C.QRawFont = nil - C.QRawFont_new5(fileName_ms, (C.double)(pixelSize), (C.int)(hintingPreference), &outptr_QRawFont) - ret := newQRawFont(outptr_QRawFont) + ret := newQRawFont(C.QRawFont_new5(fileName_ms, (C.double)(pixelSize), (C.int)(hintingPreference))) ret.isSubclass = true return ret } @@ -130,10 +117,8 @@ func NewQRawFont6(fontData []byte, pixelSize float64, hintingPreference QFont__H fontData_alias := C.struct_miqt_string{} fontData_alias.data = (*C.char)(unsafe.Pointer(&fontData[0])) fontData_alias.len = C.size_t(len(fontData)) - var outptr_QRawFont *C.QRawFont = nil - C.QRawFont_new6(fontData_alias, (C.double)(pixelSize), (C.int)(hintingPreference), &outptr_QRawFont) - ret := newQRawFont(outptr_QRawFont) + ret := newQRawFont(C.QRawFont_new6(fontData_alias, (C.double)(pixelSize), (C.int)(hintingPreference))) ret.isSubclass = true return ret } @@ -243,7 +228,7 @@ func (this *QRawFont) AdvancesForGlyphIndexes4(glyphIndexes *uint, advances *QPo } func (this *QRawFont) AlphaMapForGlyph(glyphIndex uint) *QImage { - _goptr := newQImage(C.QRawFont_AlphaMapForGlyph(this.h, (C.uint)(glyphIndex)), nil) + _goptr := newQImage(C.QRawFont_AlphaMapForGlyph(this.h, (C.uint)(glyphIndex))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -361,13 +346,13 @@ func QRawFont_FromFont(font *QFont) *QRawFont { } func (this *QRawFont) AlphaMapForGlyph2(glyphIndex uint, antialiasingType QRawFont__AntialiasingType) *QImage { - _goptr := newQImage(C.QRawFont_AlphaMapForGlyph2(this.h, (C.uint)(glyphIndex), (C.int)(antialiasingType)), nil) + _goptr := newQImage(C.QRawFont_AlphaMapForGlyph2(this.h, (C.uint)(glyphIndex), (C.int)(antialiasingType))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QRawFont) AlphaMapForGlyph3(glyphIndex uint, antialiasingType QRawFont__AntialiasingType, transform *QTransform) *QImage { - _goptr := newQImage(C.QRawFont_AlphaMapForGlyph3(this.h, (C.uint)(glyphIndex), (C.int)(antialiasingType), transform.cPointer()), nil) + _goptr := newQImage(C.QRawFont_AlphaMapForGlyph3(this.h, (C.uint)(glyphIndex), (C.int)(antialiasingType), transform.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/gen_qrawfont.h b/qt/gen_qrawfont.h index 01a8b102..b84dd2d6 100644 --- a/qt/gen_qrawfont.h +++ b/qt/gen_qrawfont.h @@ -34,12 +34,12 @@ typedef struct QRectF QRectF; typedef struct QTransform QTransform; #endif -void QRawFont_new(QRawFont** outptr_QRawFont); -void QRawFont_new2(struct miqt_string fileName, double pixelSize, QRawFont** outptr_QRawFont); -void QRawFont_new3(struct miqt_string fontData, double pixelSize, QRawFont** outptr_QRawFont); -void QRawFont_new4(QRawFont* other, QRawFont** outptr_QRawFont); -void QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont); -void QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont); +QRawFont* QRawFont_new(); +QRawFont* QRawFont_new2(struct miqt_string fileName, double pixelSize); +QRawFont* QRawFont_new3(struct miqt_string fontData, double pixelSize); +QRawFont* QRawFont_new4(QRawFont* other); +QRawFont* QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference); +QRawFont* QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference); void QRawFont_OperatorAssign(QRawFont* self, QRawFont* other); void QRawFont_Swap(QRawFont* self, QRawFont* other); bool QRawFont_IsValid(const QRawFont* self); diff --git a/qt/gen_qreadwritelock.cpp b/qt/gen_qreadwritelock.cpp index 67011be5..7cb17962 100644 --- a/qt/gen_qreadwritelock.cpp +++ b/qt/gen_qreadwritelock.cpp @@ -5,14 +5,12 @@ #include "gen_qreadwritelock.h" #include "_cgo_export.h" -void QReadWriteLock_new(QReadWriteLock** outptr_QReadWriteLock) { - QReadWriteLock* ret = new QReadWriteLock(); - *outptr_QReadWriteLock = ret; +QReadWriteLock* QReadWriteLock_new() { + return new QReadWriteLock(); } -void QReadWriteLock_new2(int recursionMode, QReadWriteLock** outptr_QReadWriteLock) { - QReadWriteLock* ret = new QReadWriteLock(static_cast(recursionMode)); - *outptr_QReadWriteLock = ret; +QReadWriteLock* QReadWriteLock_new2(int recursionMode) { + return new QReadWriteLock(static_cast(recursionMode)); } void QReadWriteLock_LockForRead(QReadWriteLock* self) { @@ -51,9 +49,8 @@ void QReadWriteLock_Delete(QReadWriteLock* self, bool isSubclass) { } } -void QReadLocker_new(QReadWriteLock* readWriteLock, QReadLocker** outptr_QReadLocker) { - QReadLocker* ret = new QReadLocker(readWriteLock); - *outptr_QReadLocker = ret; +QReadLocker* QReadLocker_new(QReadWriteLock* readWriteLock) { + return new QReadLocker(readWriteLock); } void QReadLocker_Unlock(QReadLocker* self) { @@ -76,9 +73,8 @@ void QReadLocker_Delete(QReadLocker* self, bool isSubclass) { } } -void QWriteLocker_new(QReadWriteLock* readWriteLock, QWriteLocker** outptr_QWriteLocker) { - QWriteLocker* ret = new QWriteLocker(readWriteLock); - *outptr_QWriteLocker = ret; +QWriteLocker* QWriteLocker_new(QReadWriteLock* readWriteLock) { + return new QWriteLocker(readWriteLock); } void QWriteLocker_Unlock(QWriteLocker* self) { diff --git a/qt/gen_qreadwritelock.go b/qt/gen_qreadwritelock.go index 41ea1e02..1689523c 100644 --- a/qt/gen_qreadwritelock.go +++ b/qt/gen_qreadwritelock.go @@ -44,34 +44,27 @@ func newQReadWriteLock(h *C.QReadWriteLock) *QReadWriteLock { if h == nil { return nil } + return &QReadWriteLock{h: h} } // UnsafeNewQReadWriteLock constructs the type using only unsafe pointers. func UnsafeNewQReadWriteLock(h unsafe.Pointer) *QReadWriteLock { - if h == nil { - return nil - } - - return &QReadWriteLock{h: (*C.QReadWriteLock)(h)} + return newQReadWriteLock((*C.QReadWriteLock)(h)) } // NewQReadWriteLock constructs a new QReadWriteLock object. func NewQReadWriteLock() *QReadWriteLock { - var outptr_QReadWriteLock *C.QReadWriteLock = nil - C.QReadWriteLock_new(&outptr_QReadWriteLock) - ret := newQReadWriteLock(outptr_QReadWriteLock) + ret := newQReadWriteLock(C.QReadWriteLock_new()) ret.isSubclass = true return ret } // NewQReadWriteLock2 constructs a new QReadWriteLock object. func NewQReadWriteLock2(recursionMode QReadWriteLock__RecursionMode) *QReadWriteLock { - var outptr_QReadWriteLock *C.QReadWriteLock = nil - C.QReadWriteLock_new2((C.int)(recursionMode), &outptr_QReadWriteLock) - ret := newQReadWriteLock(outptr_QReadWriteLock) + ret := newQReadWriteLock(C.QReadWriteLock_new2((C.int)(recursionMode))) ret.isSubclass = true return ret } @@ -142,24 +135,19 @@ func newQReadLocker(h *C.QReadLocker) *QReadLocker { if h == nil { return nil } + return &QReadLocker{h: h} } // UnsafeNewQReadLocker constructs the type using only unsafe pointers. func UnsafeNewQReadLocker(h unsafe.Pointer) *QReadLocker { - if h == nil { - return nil - } - - return &QReadLocker{h: (*C.QReadLocker)(h)} + return newQReadLocker((*C.QReadLocker)(h)) } // NewQReadLocker constructs a new QReadLocker object. func NewQReadLocker(readWriteLock *QReadWriteLock) *QReadLocker { - var outptr_QReadLocker *C.QReadLocker = nil - C.QReadLocker_new(readWriteLock.cPointer(), &outptr_QReadLocker) - ret := newQReadLocker(outptr_QReadLocker) + ret := newQReadLocker(C.QReadLocker_new(readWriteLock.cPointer())) ret.isSubclass = true return ret } @@ -214,24 +202,19 @@ func newQWriteLocker(h *C.QWriteLocker) *QWriteLocker { if h == nil { return nil } + return &QWriteLocker{h: h} } // UnsafeNewQWriteLocker constructs the type using only unsafe pointers. func UnsafeNewQWriteLocker(h unsafe.Pointer) *QWriteLocker { - if h == nil { - return nil - } - - return &QWriteLocker{h: (*C.QWriteLocker)(h)} + return newQWriteLocker((*C.QWriteLocker)(h)) } // NewQWriteLocker constructs a new QWriteLocker object. func NewQWriteLocker(readWriteLock *QReadWriteLock) *QWriteLocker { - var outptr_QWriteLocker *C.QWriteLocker = nil - C.QWriteLocker_new(readWriteLock.cPointer(), &outptr_QWriteLocker) - ret := newQWriteLocker(outptr_QWriteLocker) + ret := newQWriteLocker(C.QWriteLocker_new(readWriteLock.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qreadwritelock.h b/qt/gen_qreadwritelock.h index a26a105d..fe298f52 100644 --- a/qt/gen_qreadwritelock.h +++ b/qt/gen_qreadwritelock.h @@ -24,8 +24,8 @@ typedef struct QReadWriteLock QReadWriteLock; typedef struct QWriteLocker QWriteLocker; #endif -void QReadWriteLock_new(QReadWriteLock** outptr_QReadWriteLock); -void QReadWriteLock_new2(int recursionMode, QReadWriteLock** outptr_QReadWriteLock); +QReadWriteLock* QReadWriteLock_new(); +QReadWriteLock* QReadWriteLock_new2(int recursionMode); void QReadWriteLock_LockForRead(QReadWriteLock* self); bool QReadWriteLock_TryLockForRead(QReadWriteLock* self); bool QReadWriteLock_TryLockForReadWithTimeout(QReadWriteLock* self, int timeout); @@ -35,13 +35,13 @@ bool QReadWriteLock_TryLockForWriteWithTimeout(QReadWriteLock* self, int timeout void QReadWriteLock_Unlock(QReadWriteLock* self); void QReadWriteLock_Delete(QReadWriteLock* self, bool isSubclass); -void QReadLocker_new(QReadWriteLock* readWriteLock, QReadLocker** outptr_QReadLocker); +QReadLocker* QReadLocker_new(QReadWriteLock* readWriteLock); void QReadLocker_Unlock(QReadLocker* self); void QReadLocker_Relock(QReadLocker* self); QReadWriteLock* QReadLocker_ReadWriteLock(const QReadLocker* self); void QReadLocker_Delete(QReadLocker* self, bool isSubclass); -void QWriteLocker_new(QReadWriteLock* readWriteLock, QWriteLocker** outptr_QWriteLocker); +QWriteLocker* QWriteLocker_new(QReadWriteLock* readWriteLock); void QWriteLocker_Unlock(QWriteLocker* self); void QWriteLocker_Relock(QWriteLocker* self); QReadWriteLock* QWriteLocker_ReadWriteLock(const QWriteLocker* self); diff --git a/qt/gen_qrect.cpp b/qt/gen_qrect.cpp index f900c91a..5b1224a6 100644 --- a/qt/gen_qrect.cpp +++ b/qt/gen_qrect.cpp @@ -10,29 +10,24 @@ #include "gen_qrect.h" #include "_cgo_export.h" -void QRect_new(QRect** outptr_QRect) { - QRect* ret = new QRect(); - *outptr_QRect = ret; +QRect* QRect_new() { + return new QRect(); } -void QRect_new2(QPoint* topleft, QPoint* bottomright, QRect** outptr_QRect) { - QRect* ret = new QRect(*topleft, *bottomright); - *outptr_QRect = ret; +QRect* QRect_new2(QPoint* topleft, QPoint* bottomright) { + return new QRect(*topleft, *bottomright); } -void QRect_new3(QPoint* topleft, QSize* size, QRect** outptr_QRect) { - QRect* ret = new QRect(*topleft, *size); - *outptr_QRect = ret; +QRect* QRect_new3(QPoint* topleft, QSize* size) { + return new QRect(*topleft, *size); } -void QRect_new4(int left, int top, int width, int height, QRect** outptr_QRect) { - QRect* ret = new QRect(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); - *outptr_QRect = ret; +QRect* QRect_new4(int left, int top, int width, int height) { + return new QRect(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); } -void QRect_new5(QRect* param1, QRect** outptr_QRect) { - QRect* ret = new QRect(*param1); - *outptr_QRect = ret; +QRect* QRect_new5(QRect* param1) { + return new QRect(*param1); } bool QRect_IsNull(const QRect* self) { @@ -327,34 +322,28 @@ void QRect_Delete(QRect* self, bool isSubclass) { } } -void QRectF_new(QRectF** outptr_QRectF) { - QRectF* ret = new QRectF(); - *outptr_QRectF = ret; +QRectF* QRectF_new() { + return new QRectF(); } -void QRectF_new2(QPointF* topleft, QSizeF* size, QRectF** outptr_QRectF) { - QRectF* ret = new QRectF(*topleft, *size); - *outptr_QRectF = ret; +QRectF* QRectF_new2(QPointF* topleft, QSizeF* size) { + return new QRectF(*topleft, *size); } -void QRectF_new3(QPointF* topleft, QPointF* bottomRight, QRectF** outptr_QRectF) { - QRectF* ret = new QRectF(*topleft, *bottomRight); - *outptr_QRectF = ret; +QRectF* QRectF_new3(QPointF* topleft, QPointF* bottomRight) { + return new QRectF(*topleft, *bottomRight); } -void QRectF_new4(double left, double top, double width, double height, QRectF** outptr_QRectF) { - QRectF* ret = new QRectF(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); - *outptr_QRectF = ret; +QRectF* QRectF_new4(double left, double top, double width, double height) { + return new QRectF(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); } -void QRectF_new5(QRect* rect, QRectF** outptr_QRectF) { - QRectF* ret = new QRectF(*rect); - *outptr_QRectF = ret; +QRectF* QRectF_new5(QRect* rect) { + return new QRectF(*rect); } -void QRectF_new6(QRectF* param1, QRectF** outptr_QRectF) { - QRectF* ret = new QRectF(*param1); - *outptr_QRectF = ret; +QRectF* QRectF_new6(QRectF* param1) { + return new QRectF(*param1); } bool QRectF_IsNull(const QRectF* self) { diff --git a/qt/gen_qrect.go b/qt/gen_qrect.go index 5d625dae..2540e9ee 100644 --- a/qt/gen_qrect.go +++ b/qt/gen_qrect.go @@ -37,64 +37,51 @@ func newQRect(h *C.QRect) *QRect { if h == nil { return nil } + return &QRect{h: h} } // UnsafeNewQRect constructs the type using only unsafe pointers. func UnsafeNewQRect(h unsafe.Pointer) *QRect { - if h == nil { - return nil - } - - return &QRect{h: (*C.QRect)(h)} + return newQRect((*C.QRect)(h)) } // NewQRect constructs a new QRect object. func NewQRect() *QRect { - var outptr_QRect *C.QRect = nil - C.QRect_new(&outptr_QRect) - ret := newQRect(outptr_QRect) + ret := newQRect(C.QRect_new()) ret.isSubclass = true return ret } // NewQRect2 constructs a new QRect object. func NewQRect2(topleft *QPoint, bottomright *QPoint) *QRect { - var outptr_QRect *C.QRect = nil - C.QRect_new2(topleft.cPointer(), bottomright.cPointer(), &outptr_QRect) - ret := newQRect(outptr_QRect) + ret := newQRect(C.QRect_new2(topleft.cPointer(), bottomright.cPointer())) ret.isSubclass = true return ret } // NewQRect3 constructs a new QRect object. func NewQRect3(topleft *QPoint, size *QSize) *QRect { - var outptr_QRect *C.QRect = nil - C.QRect_new3(topleft.cPointer(), size.cPointer(), &outptr_QRect) - ret := newQRect(outptr_QRect) + ret := newQRect(C.QRect_new3(topleft.cPointer(), size.cPointer())) ret.isSubclass = true return ret } // NewQRect4 constructs a new QRect object. func NewQRect4(left int, top int, width int, height int) *QRect { - var outptr_QRect *C.QRect = nil - C.QRect_new4((C.int)(left), (C.int)(top), (C.int)(width), (C.int)(height), &outptr_QRect) - ret := newQRect(outptr_QRect) + ret := newQRect(C.QRect_new4((C.int)(left), (C.int)(top), (C.int)(width), (C.int)(height))) ret.isSubclass = true return ret } // NewQRect5 constructs a new QRect object. func NewQRect5(param1 *QRect) *QRect { - var outptr_QRect *C.QRect = nil - C.QRect_new5(param1.cPointer(), &outptr_QRect) - ret := newQRect(outptr_QRect) + ret := newQRect(C.QRect_new5(param1.cPointer())) ret.isSubclass = true return ret } @@ -451,74 +438,59 @@ func newQRectF(h *C.QRectF) *QRectF { if h == nil { return nil } + return &QRectF{h: h} } // UnsafeNewQRectF constructs the type using only unsafe pointers. func UnsafeNewQRectF(h unsafe.Pointer) *QRectF { - if h == nil { - return nil - } - - return &QRectF{h: (*C.QRectF)(h)} + return newQRectF((*C.QRectF)(h)) } // NewQRectF constructs a new QRectF object. func NewQRectF() *QRectF { - var outptr_QRectF *C.QRectF = nil - C.QRectF_new(&outptr_QRectF) - ret := newQRectF(outptr_QRectF) + ret := newQRectF(C.QRectF_new()) ret.isSubclass = true return ret } // NewQRectF2 constructs a new QRectF object. func NewQRectF2(topleft *QPointF, size *QSizeF) *QRectF { - var outptr_QRectF *C.QRectF = nil - C.QRectF_new2(topleft.cPointer(), size.cPointer(), &outptr_QRectF) - ret := newQRectF(outptr_QRectF) + ret := newQRectF(C.QRectF_new2(topleft.cPointer(), size.cPointer())) ret.isSubclass = true return ret } // NewQRectF3 constructs a new QRectF object. func NewQRectF3(topleft *QPointF, bottomRight *QPointF) *QRectF { - var outptr_QRectF *C.QRectF = nil - C.QRectF_new3(topleft.cPointer(), bottomRight.cPointer(), &outptr_QRectF) - ret := newQRectF(outptr_QRectF) + ret := newQRectF(C.QRectF_new3(topleft.cPointer(), bottomRight.cPointer())) ret.isSubclass = true return ret } // NewQRectF4 constructs a new QRectF object. func NewQRectF4(left float64, top float64, width float64, height float64) *QRectF { - var outptr_QRectF *C.QRectF = nil - C.QRectF_new4((C.double)(left), (C.double)(top), (C.double)(width), (C.double)(height), &outptr_QRectF) - ret := newQRectF(outptr_QRectF) + ret := newQRectF(C.QRectF_new4((C.double)(left), (C.double)(top), (C.double)(width), (C.double)(height))) ret.isSubclass = true return ret } // NewQRectF5 constructs a new QRectF object. func NewQRectF5(rect *QRect) *QRectF { - var outptr_QRectF *C.QRectF = nil - C.QRectF_new5(rect.cPointer(), &outptr_QRectF) - ret := newQRectF(outptr_QRectF) + ret := newQRectF(C.QRectF_new5(rect.cPointer())) ret.isSubclass = true return ret } // NewQRectF6 constructs a new QRectF object. func NewQRectF6(param1 *QRectF) *QRectF { - var outptr_QRectF *C.QRectF = nil - C.QRectF_new6(param1.cPointer(), &outptr_QRectF) - ret := newQRectF(outptr_QRectF) + ret := newQRectF(C.QRectF_new6(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qrect.h b/qt/gen_qrect.h index f02af041..eef6cc6e 100644 --- a/qt/gen_qrect.h +++ b/qt/gen_qrect.h @@ -34,11 +34,11 @@ typedef struct QSize QSize; typedef struct QSizeF QSizeF; #endif -void QRect_new(QRect** outptr_QRect); -void QRect_new2(QPoint* topleft, QPoint* bottomright, QRect** outptr_QRect); -void QRect_new3(QPoint* topleft, QSize* size, QRect** outptr_QRect); -void QRect_new4(int left, int top, int width, int height, QRect** outptr_QRect); -void QRect_new5(QRect* param1, QRect** outptr_QRect); +QRect* QRect_new(); +QRect* QRect_new2(QPoint* topleft, QPoint* bottomright); +QRect* QRect_new3(QPoint* topleft, QSize* size); +QRect* QRect_new4(int left, int top, int width, int height); +QRect* QRect_new5(QRect* param1); bool QRect_IsNull(const QRect* self); bool QRect_IsEmpty(const QRect* self); bool QRect_IsValid(const QRect* self); @@ -111,12 +111,12 @@ bool QRect_Contains22(const QRect* self, QRect* r, bool proper); bool QRect_Contains23(const QRect* self, QPoint* p, bool proper); void QRect_Delete(QRect* self, bool isSubclass); -void QRectF_new(QRectF** outptr_QRectF); -void QRectF_new2(QPointF* topleft, QSizeF* size, QRectF** outptr_QRectF); -void QRectF_new3(QPointF* topleft, QPointF* bottomRight, QRectF** outptr_QRectF); -void QRectF_new4(double left, double top, double width, double height, QRectF** outptr_QRectF); -void QRectF_new5(QRect* rect, QRectF** outptr_QRectF); -void QRectF_new6(QRectF* param1, QRectF** outptr_QRectF); +QRectF* QRectF_new(); +QRectF* QRectF_new2(QPointF* topleft, QSizeF* size); +QRectF* QRectF_new3(QPointF* topleft, QPointF* bottomRight); +QRectF* QRectF_new4(double left, double top, double width, double height); +QRectF* QRectF_new5(QRect* rect); +QRectF* QRectF_new6(QRectF* param1); bool QRectF_IsNull(const QRectF* self); bool QRectF_IsEmpty(const QRectF* self); bool QRectF_IsValid(const QRectF* self); diff --git a/qt/gen_qregexp.cpp b/qt/gen_qregexp.cpp index 5536e6f8..b92ef788 100644 --- a/qt/gen_qregexp.cpp +++ b/qt/gen_qregexp.cpp @@ -7,32 +7,27 @@ #include "gen_qregexp.h" #include "_cgo_export.h" -void QRegExp_new(QRegExp** outptr_QRegExp) { - QRegExp* ret = new QRegExp(); - *outptr_QRegExp = ret; +QRegExp* QRegExp_new() { + return new QRegExp(); } -void QRegExp_new2(struct miqt_string pattern, QRegExp** outptr_QRegExp) { +QRegExp* QRegExp_new2(struct miqt_string pattern) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - QRegExp* ret = new QRegExp(pattern_QString); - *outptr_QRegExp = ret; + return new QRegExp(pattern_QString); } -void QRegExp_new3(QRegExp* rx, QRegExp** outptr_QRegExp) { - QRegExp* ret = new QRegExp(*rx); - *outptr_QRegExp = ret; +QRegExp* QRegExp_new3(QRegExp* rx) { + return new QRegExp(*rx); } -void QRegExp_new4(struct miqt_string pattern, int cs, QRegExp** outptr_QRegExp) { +QRegExp* QRegExp_new4(struct miqt_string pattern, int cs) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - QRegExp* ret = new QRegExp(pattern_QString, static_cast(cs)); - *outptr_QRegExp = ret; + return new QRegExp(pattern_QString, static_cast(cs)); } -void QRegExp_new5(struct miqt_string pattern, int cs, int syntax, QRegExp** outptr_QRegExp) { +QRegExp* QRegExp_new5(struct miqt_string pattern, int cs, int syntax) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - QRegExp* ret = new QRegExp(pattern_QString, static_cast(cs), static_cast(syntax)); - *outptr_QRegExp = ret; + return new QRegExp(pattern_QString, static_cast(cs), static_cast(syntax)); } void QRegExp_OperatorAssign(QRegExp* self, QRegExp* rx) { diff --git a/qt/gen_qregexp.go b/qt/gen_qregexp.go index 86f6573d..f5c565e2 100644 --- a/qt/gen_qregexp.go +++ b/qt/gen_qregexp.go @@ -56,24 +56,19 @@ func newQRegExp(h *C.QRegExp) *QRegExp { if h == nil { return nil } + return &QRegExp{h: h} } // UnsafeNewQRegExp constructs the type using only unsafe pointers. func UnsafeNewQRegExp(h unsafe.Pointer) *QRegExp { - if h == nil { - return nil - } - - return &QRegExp{h: (*C.QRegExp)(h)} + return newQRegExp((*C.QRegExp)(h)) } // NewQRegExp constructs a new QRegExp object. func NewQRegExp() *QRegExp { - var outptr_QRegExp *C.QRegExp = nil - C.QRegExp_new(&outptr_QRegExp) - ret := newQRegExp(outptr_QRegExp) + ret := newQRegExp(C.QRegExp_new()) ret.isSubclass = true return ret } @@ -84,20 +79,16 @@ func NewQRegExp2(pattern string) *QRegExp { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - var outptr_QRegExp *C.QRegExp = nil - C.QRegExp_new2(pattern_ms, &outptr_QRegExp) - ret := newQRegExp(outptr_QRegExp) + ret := newQRegExp(C.QRegExp_new2(pattern_ms)) ret.isSubclass = true return ret } // NewQRegExp3 constructs a new QRegExp object. func NewQRegExp3(rx *QRegExp) *QRegExp { - var outptr_QRegExp *C.QRegExp = nil - C.QRegExp_new3(rx.cPointer(), &outptr_QRegExp) - ret := newQRegExp(outptr_QRegExp) + ret := newQRegExp(C.QRegExp_new3(rx.cPointer())) ret.isSubclass = true return ret } @@ -108,10 +99,8 @@ func NewQRegExp4(pattern string, cs CaseSensitivity) *QRegExp { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - var outptr_QRegExp *C.QRegExp = nil - C.QRegExp_new4(pattern_ms, (C.int)(cs), &outptr_QRegExp) - ret := newQRegExp(outptr_QRegExp) + ret := newQRegExp(C.QRegExp_new4(pattern_ms, (C.int)(cs))) ret.isSubclass = true return ret } @@ -122,10 +111,8 @@ func NewQRegExp5(pattern string, cs CaseSensitivity, syntax QRegExp__PatternSynt pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - var outptr_QRegExp *C.QRegExp = nil - C.QRegExp_new5(pattern_ms, (C.int)(cs), (C.int)(syntax), &outptr_QRegExp) - ret := newQRegExp(outptr_QRegExp) + ret := newQRegExp(C.QRegExp_new5(pattern_ms, (C.int)(cs), (C.int)(syntax))) ret.isSubclass = true return ret } diff --git a/qt/gen_qregexp.h b/qt/gen_qregexp.h index a32fd1a3..2a9fcb49 100644 --- a/qt/gen_qregexp.h +++ b/qt/gen_qregexp.h @@ -20,11 +20,11 @@ class QRegExp; typedef struct QRegExp QRegExp; #endif -void QRegExp_new(QRegExp** outptr_QRegExp); -void QRegExp_new2(struct miqt_string pattern, QRegExp** outptr_QRegExp); -void QRegExp_new3(QRegExp* rx, QRegExp** outptr_QRegExp); -void QRegExp_new4(struct miqt_string pattern, int cs, QRegExp** outptr_QRegExp); -void QRegExp_new5(struct miqt_string pattern, int cs, int syntax, QRegExp** outptr_QRegExp); +QRegExp* QRegExp_new(); +QRegExp* QRegExp_new2(struct miqt_string pattern); +QRegExp* QRegExp_new3(QRegExp* rx); +QRegExp* QRegExp_new4(struct miqt_string pattern, int cs); +QRegExp* QRegExp_new5(struct miqt_string pattern, int cs, int syntax); void QRegExp_OperatorAssign(QRegExp* self, QRegExp* rx); void QRegExp_Swap(QRegExp* self, QRegExp* other); bool QRegExp_OperatorEqual(const QRegExp* self, QRegExp* rx); diff --git a/qt/gen_qregion.cpp b/qt/gen_qregion.cpp index 7907e55f..feab6294 100644 --- a/qt/gen_qregion.cpp +++ b/qt/gen_qregion.cpp @@ -7,39 +7,32 @@ #include "gen_qregion.h" #include "_cgo_export.h" -void QRegion_new(QRegion** outptr_QRegion) { - QRegion* ret = new QRegion(); - *outptr_QRegion = ret; +QRegion* QRegion_new() { + return new QRegion(); } -void QRegion_new2(int x, int y, int w, int h, QRegion** outptr_QRegion) { - QRegion* ret = new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); - *outptr_QRegion = ret; +QRegion* QRegion_new2(int x, int y, int w, int h) { + return new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); } -void QRegion_new3(QRect* r, QRegion** outptr_QRegion) { - QRegion* ret = new QRegion(*r); - *outptr_QRegion = ret; +QRegion* QRegion_new3(QRect* r) { + return new QRegion(*r); } -void QRegion_new4(QRegion* region, QRegion** outptr_QRegion) { - QRegion* ret = new QRegion(*region); - *outptr_QRegion = ret; +QRegion* QRegion_new4(QRegion* region) { + return new QRegion(*region); } -void QRegion_new5(QBitmap* bitmap, QRegion** outptr_QRegion) { - QRegion* ret = new QRegion(*bitmap); - *outptr_QRegion = ret; +QRegion* QRegion_new5(QBitmap* bitmap) { + return new QRegion(*bitmap); } -void QRegion_new6(int x, int y, int w, int h, int t, QRegion** outptr_QRegion) { - QRegion* ret = new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h), static_cast(t)); - *outptr_QRegion = ret; +QRegion* QRegion_new6(int x, int y, int w, int h, int t) { + return new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h), static_cast(t)); } -void QRegion_new7(QRect* r, int t, QRegion** outptr_QRegion) { - QRegion* ret = new QRegion(*r, static_cast(t)); - *outptr_QRegion = ret; +QRegion* QRegion_new7(QRect* r, int t) { + return new QRegion(*r, static_cast(t)); } void QRegion_OperatorAssign(QRegion* self, QRegion* param1) { diff --git a/qt/gen_qregion.go b/qt/gen_qregion.go index 74839a24..b364b31f 100644 --- a/qt/gen_qregion.go +++ b/qt/gen_qregion.go @@ -44,84 +44,67 @@ func newQRegion(h *C.QRegion) *QRegion { if h == nil { return nil } + return &QRegion{h: h} } // UnsafeNewQRegion constructs the type using only unsafe pointers. func UnsafeNewQRegion(h unsafe.Pointer) *QRegion { - if h == nil { - return nil - } - - return &QRegion{h: (*C.QRegion)(h)} + return newQRegion((*C.QRegion)(h)) } // NewQRegion constructs a new QRegion object. func NewQRegion() *QRegion { - var outptr_QRegion *C.QRegion = nil - C.QRegion_new(&outptr_QRegion) - ret := newQRegion(outptr_QRegion) + ret := newQRegion(C.QRegion_new()) ret.isSubclass = true return ret } // NewQRegion2 constructs a new QRegion object. func NewQRegion2(x int, y int, w int, h int) *QRegion { - var outptr_QRegion *C.QRegion = nil - C.QRegion_new2((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h), &outptr_QRegion) - ret := newQRegion(outptr_QRegion) + ret := newQRegion(C.QRegion_new2((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h))) ret.isSubclass = true return ret } // NewQRegion3 constructs a new QRegion object. func NewQRegion3(r *QRect) *QRegion { - var outptr_QRegion *C.QRegion = nil - C.QRegion_new3(r.cPointer(), &outptr_QRegion) - ret := newQRegion(outptr_QRegion) + ret := newQRegion(C.QRegion_new3(r.cPointer())) ret.isSubclass = true return ret } // NewQRegion4 constructs a new QRegion object. func NewQRegion4(region *QRegion) *QRegion { - var outptr_QRegion *C.QRegion = nil - C.QRegion_new4(region.cPointer(), &outptr_QRegion) - ret := newQRegion(outptr_QRegion) + ret := newQRegion(C.QRegion_new4(region.cPointer())) ret.isSubclass = true return ret } // NewQRegion5 constructs a new QRegion object. func NewQRegion5(bitmap *QBitmap) *QRegion { - var outptr_QRegion *C.QRegion = nil - C.QRegion_new5(bitmap.cPointer(), &outptr_QRegion) - ret := newQRegion(outptr_QRegion) + ret := newQRegion(C.QRegion_new5(bitmap.cPointer())) ret.isSubclass = true return ret } // NewQRegion6 constructs a new QRegion object. func NewQRegion6(x int, y int, w int, h int, t QRegion__RegionType) *QRegion { - var outptr_QRegion *C.QRegion = nil - C.QRegion_new6((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h), (C.int)(t), &outptr_QRegion) - ret := newQRegion(outptr_QRegion) + ret := newQRegion(C.QRegion_new6((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h), (C.int)(t))) ret.isSubclass = true return ret } // NewQRegion7 constructs a new QRegion object. func NewQRegion7(r *QRect, t QRegion__RegionType) *QRegion { - var outptr_QRegion *C.QRegion = nil - C.QRegion_new7(r.cPointer(), (C.int)(t), &outptr_QRegion) - ret := newQRegion(outptr_QRegion) + ret := newQRegion(C.QRegion_new7(r.cPointer(), (C.int)(t))) ret.isSubclass = true return ret } diff --git a/qt/gen_qregion.h b/qt/gen_qregion.h index 3d38581e..189da142 100644 --- a/qt/gen_qregion.h +++ b/qt/gen_qregion.h @@ -26,13 +26,13 @@ typedef struct QRect QRect; typedef struct QRegion QRegion; #endif -void QRegion_new(QRegion** outptr_QRegion); -void QRegion_new2(int x, int y, int w, int h, QRegion** outptr_QRegion); -void QRegion_new3(QRect* r, QRegion** outptr_QRegion); -void QRegion_new4(QRegion* region, QRegion** outptr_QRegion); -void QRegion_new5(QBitmap* bitmap, QRegion** outptr_QRegion); -void QRegion_new6(int x, int y, int w, int h, int t, QRegion** outptr_QRegion); -void QRegion_new7(QRect* r, int t, QRegion** outptr_QRegion); +QRegion* QRegion_new(); +QRegion* QRegion_new2(int x, int y, int w, int h); +QRegion* QRegion_new3(QRect* r); +QRegion* QRegion_new4(QRegion* region); +QRegion* QRegion_new5(QBitmap* bitmap); +QRegion* QRegion_new6(int x, int y, int w, int h, int t); +QRegion* QRegion_new7(QRect* r, int t); void QRegion_OperatorAssign(QRegion* self, QRegion* param1); void QRegion_Swap(QRegion* self, QRegion* other); bool QRegion_IsEmpty(const QRegion* self); diff --git a/qt/gen_qregularexpression.cpp b/qt/gen_qregularexpression.cpp index 266ee84e..411caef0 100644 --- a/qt/gen_qregularexpression.cpp +++ b/qt/gen_qregularexpression.cpp @@ -9,26 +9,22 @@ #include "gen_qregularexpression.h" #include "_cgo_export.h" -void QRegularExpression_new(QRegularExpression** outptr_QRegularExpression) { - QRegularExpression* ret = new QRegularExpression(); - *outptr_QRegularExpression = ret; +QRegularExpression* QRegularExpression_new() { + return new QRegularExpression(); } -void QRegularExpression_new2(struct miqt_string pattern, QRegularExpression** outptr_QRegularExpression) { +QRegularExpression* QRegularExpression_new2(struct miqt_string pattern) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - QRegularExpression* ret = new QRegularExpression(pattern_QString); - *outptr_QRegularExpression = ret; + return new QRegularExpression(pattern_QString); } -void QRegularExpression_new3(QRegularExpression* re, QRegularExpression** outptr_QRegularExpression) { - QRegularExpression* ret = new QRegularExpression(*re); - *outptr_QRegularExpression = ret; +QRegularExpression* QRegularExpression_new3(QRegularExpression* re) { + return new QRegularExpression(*re); } -void QRegularExpression_new4(struct miqt_string pattern, int options, QRegularExpression** outptr_QRegularExpression) { +QRegularExpression* QRegularExpression_new4(struct miqt_string pattern, int options) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - QRegularExpression* ret = new QRegularExpression(pattern_QString, static_cast(options)); - *outptr_QRegularExpression = ret; + return new QRegularExpression(pattern_QString, static_cast(options)); } int QRegularExpression_PatternOptions(const QRegularExpression* self) { @@ -203,14 +199,12 @@ void QRegularExpression_Delete(QRegularExpression* self, bool isSubclass) { } } -void QRegularExpressionMatch_new(QRegularExpressionMatch** outptr_QRegularExpressionMatch) { - QRegularExpressionMatch* ret = new QRegularExpressionMatch(); - *outptr_QRegularExpressionMatch = ret; +QRegularExpressionMatch* QRegularExpressionMatch_new() { + return new QRegularExpressionMatch(); } -void QRegularExpressionMatch_new2(QRegularExpressionMatch* match, QRegularExpressionMatch** outptr_QRegularExpressionMatch) { - QRegularExpressionMatch* ret = new QRegularExpressionMatch(*match); - *outptr_QRegularExpressionMatch = ret; +QRegularExpressionMatch* QRegularExpressionMatch_new2(QRegularExpressionMatch* match) { + return new QRegularExpressionMatch(*match); } void QRegularExpressionMatch_OperatorAssign(QRegularExpressionMatch* self, QRegularExpressionMatch* match) { @@ -352,14 +346,12 @@ void QRegularExpressionMatch_Delete(QRegularExpressionMatch* self, bool isSubcla } } -void QRegularExpressionMatchIterator_new(QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator) { - QRegularExpressionMatchIterator* ret = new QRegularExpressionMatchIterator(); - *outptr_QRegularExpressionMatchIterator = ret; +QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new() { + return new QRegularExpressionMatchIterator(); } -void QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator, QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator) { - QRegularExpressionMatchIterator* ret = new QRegularExpressionMatchIterator(*iterator); - *outptr_QRegularExpressionMatchIterator = ret; +QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator) { + return new QRegularExpressionMatchIterator(*iterator); } void QRegularExpressionMatchIterator_OperatorAssign(QRegularExpressionMatchIterator* self, QRegularExpressionMatchIterator* iterator) { diff --git a/qt/gen_qregularexpression.go b/qt/gen_qregularexpression.go index a53e0366..d8e1b199 100644 --- a/qt/gen_qregularexpression.go +++ b/qt/gen_qregularexpression.go @@ -69,24 +69,19 @@ func newQRegularExpression(h *C.QRegularExpression) *QRegularExpression { if h == nil { return nil } + return &QRegularExpression{h: h} } // UnsafeNewQRegularExpression constructs the type using only unsafe pointers. func UnsafeNewQRegularExpression(h unsafe.Pointer) *QRegularExpression { - if h == nil { - return nil - } - - return &QRegularExpression{h: (*C.QRegularExpression)(h)} + return newQRegularExpression((*C.QRegularExpression)(h)) } // NewQRegularExpression constructs a new QRegularExpression object. func NewQRegularExpression() *QRegularExpression { - var outptr_QRegularExpression *C.QRegularExpression = nil - C.QRegularExpression_new(&outptr_QRegularExpression) - ret := newQRegularExpression(outptr_QRegularExpression) + ret := newQRegularExpression(C.QRegularExpression_new()) ret.isSubclass = true return ret } @@ -97,20 +92,16 @@ func NewQRegularExpression2(pattern string) *QRegularExpression { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - var outptr_QRegularExpression *C.QRegularExpression = nil - C.QRegularExpression_new2(pattern_ms, &outptr_QRegularExpression) - ret := newQRegularExpression(outptr_QRegularExpression) + ret := newQRegularExpression(C.QRegularExpression_new2(pattern_ms)) ret.isSubclass = true return ret } // NewQRegularExpression3 constructs a new QRegularExpression object. func NewQRegularExpression3(re *QRegularExpression) *QRegularExpression { - var outptr_QRegularExpression *C.QRegularExpression = nil - C.QRegularExpression_new3(re.cPointer(), &outptr_QRegularExpression) - ret := newQRegularExpression(outptr_QRegularExpression) + ret := newQRegularExpression(C.QRegularExpression_new3(re.cPointer())) ret.isSubclass = true return ret } @@ -121,10 +112,8 @@ func NewQRegularExpression4(pattern string, options QRegularExpression__PatternO pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - var outptr_QRegularExpression *C.QRegularExpression = nil - C.QRegularExpression_new4(pattern_ms, (C.int)(options), &outptr_QRegularExpression) - ret := newQRegularExpression(outptr_QRegularExpression) + ret := newQRegularExpression(C.QRegularExpression_new4(pattern_ms, (C.int)(options))) ret.isSubclass = true return ret } @@ -355,34 +344,27 @@ func newQRegularExpressionMatch(h *C.QRegularExpressionMatch) *QRegularExpressio if h == nil { return nil } + return &QRegularExpressionMatch{h: h} } // UnsafeNewQRegularExpressionMatch constructs the type using only unsafe pointers. func UnsafeNewQRegularExpressionMatch(h unsafe.Pointer) *QRegularExpressionMatch { - if h == nil { - return nil - } - - return &QRegularExpressionMatch{h: (*C.QRegularExpressionMatch)(h)} + return newQRegularExpressionMatch((*C.QRegularExpressionMatch)(h)) } // NewQRegularExpressionMatch constructs a new QRegularExpressionMatch object. func NewQRegularExpressionMatch() *QRegularExpressionMatch { - var outptr_QRegularExpressionMatch *C.QRegularExpressionMatch = nil - C.QRegularExpressionMatch_new(&outptr_QRegularExpressionMatch) - ret := newQRegularExpressionMatch(outptr_QRegularExpressionMatch) + ret := newQRegularExpressionMatch(C.QRegularExpressionMatch_new()) ret.isSubclass = true return ret } // NewQRegularExpressionMatch2 constructs a new QRegularExpressionMatch object. func NewQRegularExpressionMatch2(match *QRegularExpressionMatch) *QRegularExpressionMatch { - var outptr_QRegularExpressionMatch *C.QRegularExpressionMatch = nil - C.QRegularExpressionMatch_new2(match.cPointer(), &outptr_QRegularExpressionMatch) - ret := newQRegularExpressionMatch(outptr_QRegularExpressionMatch) + ret := newQRegularExpressionMatch(C.QRegularExpressionMatch_new2(match.cPointer())) ret.isSubclass = true return ret } @@ -549,34 +531,27 @@ func newQRegularExpressionMatchIterator(h *C.QRegularExpressionMatchIterator) *Q if h == nil { return nil } + return &QRegularExpressionMatchIterator{h: h} } // UnsafeNewQRegularExpressionMatchIterator constructs the type using only unsafe pointers. func UnsafeNewQRegularExpressionMatchIterator(h unsafe.Pointer) *QRegularExpressionMatchIterator { - if h == nil { - return nil - } - - return &QRegularExpressionMatchIterator{h: (*C.QRegularExpressionMatchIterator)(h)} + return newQRegularExpressionMatchIterator((*C.QRegularExpressionMatchIterator)(h)) } // NewQRegularExpressionMatchIterator constructs a new QRegularExpressionMatchIterator object. func NewQRegularExpressionMatchIterator() *QRegularExpressionMatchIterator { - var outptr_QRegularExpressionMatchIterator *C.QRegularExpressionMatchIterator = nil - C.QRegularExpressionMatchIterator_new(&outptr_QRegularExpressionMatchIterator) - ret := newQRegularExpressionMatchIterator(outptr_QRegularExpressionMatchIterator) + ret := newQRegularExpressionMatchIterator(C.QRegularExpressionMatchIterator_new()) ret.isSubclass = true return ret } // NewQRegularExpressionMatchIterator2 constructs a new QRegularExpressionMatchIterator object. func NewQRegularExpressionMatchIterator2(iterator *QRegularExpressionMatchIterator) *QRegularExpressionMatchIterator { - var outptr_QRegularExpressionMatchIterator *C.QRegularExpressionMatchIterator = nil - C.QRegularExpressionMatchIterator_new2(iterator.cPointer(), &outptr_QRegularExpressionMatchIterator) - ret := newQRegularExpressionMatchIterator(outptr_QRegularExpressionMatchIterator) + ret := newQRegularExpressionMatchIterator(C.QRegularExpressionMatchIterator_new2(iterator.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qregularexpression.h b/qt/gen_qregularexpression.h index 7c422b46..cab51ea6 100644 --- a/qt/gen_qregularexpression.h +++ b/qt/gen_qregularexpression.h @@ -24,10 +24,10 @@ typedef struct QRegularExpressionMatch QRegularExpressionMatch; typedef struct QRegularExpressionMatchIterator QRegularExpressionMatchIterator; #endif -void QRegularExpression_new(QRegularExpression** outptr_QRegularExpression); -void QRegularExpression_new2(struct miqt_string pattern, QRegularExpression** outptr_QRegularExpression); -void QRegularExpression_new3(QRegularExpression* re, QRegularExpression** outptr_QRegularExpression); -void QRegularExpression_new4(struct miqt_string pattern, int options, QRegularExpression** outptr_QRegularExpression); +QRegularExpression* QRegularExpression_new(); +QRegularExpression* QRegularExpression_new2(struct miqt_string pattern); +QRegularExpression* QRegularExpression_new3(QRegularExpression* re); +QRegularExpression* QRegularExpression_new4(struct miqt_string pattern, int options); int QRegularExpression_PatternOptions(const QRegularExpression* self); void QRegularExpression_SetPatternOptions(QRegularExpression* self, int options); void QRegularExpression_OperatorAssign(QRegularExpression* self, QRegularExpression* re); @@ -55,8 +55,8 @@ QRegularExpressionMatchIterator* QRegularExpression_GlobalMatch3(const QRegularE QRegularExpressionMatchIterator* QRegularExpression_GlobalMatch4(const QRegularExpression* self, struct miqt_string subject, int offset, int matchType, int matchOptions); void QRegularExpression_Delete(QRegularExpression* self, bool isSubclass); -void QRegularExpressionMatch_new(QRegularExpressionMatch** outptr_QRegularExpressionMatch); -void QRegularExpressionMatch_new2(QRegularExpressionMatch* match, QRegularExpressionMatch** outptr_QRegularExpressionMatch); +QRegularExpressionMatch* QRegularExpressionMatch_new(); +QRegularExpressionMatch* QRegularExpressionMatch_new2(QRegularExpressionMatch* match); void QRegularExpressionMatch_OperatorAssign(QRegularExpressionMatch* self, QRegularExpressionMatch* match); void QRegularExpressionMatch_Swap(QRegularExpressionMatch* self, QRegularExpressionMatch* other); QRegularExpression* QRegularExpressionMatch_RegularExpression(const QRegularExpressionMatch* self); @@ -81,8 +81,8 @@ int QRegularExpressionMatch_CapturedLength1(const QRegularExpressionMatch* self, int QRegularExpressionMatch_CapturedEnd1(const QRegularExpressionMatch* self, int nth); void QRegularExpressionMatch_Delete(QRegularExpressionMatch* self, bool isSubclass); -void QRegularExpressionMatchIterator_new(QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator); -void QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator, QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator); +QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new(); +QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator); void QRegularExpressionMatchIterator_OperatorAssign(QRegularExpressionMatchIterator* self, QRegularExpressionMatchIterator* iterator); void QRegularExpressionMatchIterator_Swap(QRegularExpressionMatchIterator* self, QRegularExpressionMatchIterator* other); bool QRegularExpressionMatchIterator_IsValid(const QRegularExpressionMatchIterator* self); diff --git a/qt/gen_qresource.cpp b/qt/gen_qresource.cpp index feb48fb7..0235681d 100644 --- a/qt/gen_qresource.cpp +++ b/qt/gen_qresource.cpp @@ -10,21 +10,18 @@ #include "gen_qresource.h" #include "_cgo_export.h" -void QResource_new(QResource** outptr_QResource) { - QResource* ret = new QResource(); - *outptr_QResource = ret; +QResource* QResource_new() { + return new QResource(); } -void QResource_new2(struct miqt_string file, QResource** outptr_QResource) { +QResource* QResource_new2(struct miqt_string file) { QString file_QString = QString::fromUtf8(file.data, file.len); - QResource* ret = new QResource(file_QString); - *outptr_QResource = ret; + return new QResource(file_QString); } -void QResource_new3(struct miqt_string file, QLocale* locale, QResource** outptr_QResource) { +QResource* QResource_new3(struct miqt_string file, QLocale* locale) { QString file_QString = QString::fromUtf8(file.data, file.len); - QResource* ret = new QResource(file_QString, *locale); - *outptr_QResource = ret; + return new QResource(file_QString, *locale); } void QResource_SetFileName(QResource* self, struct miqt_string file) { diff --git a/qt/gen_qresource.go b/qt/gen_qresource.go index cf8a8b81..f485c97e 100644 --- a/qt/gen_qresource.go +++ b/qt/gen_qresource.go @@ -45,24 +45,19 @@ func newQResource(h *C.QResource) *QResource { if h == nil { return nil } + return &QResource{h: h} } // UnsafeNewQResource constructs the type using only unsafe pointers. func UnsafeNewQResource(h unsafe.Pointer) *QResource { - if h == nil { - return nil - } - - return &QResource{h: (*C.QResource)(h)} + return newQResource((*C.QResource)(h)) } // NewQResource constructs a new QResource object. func NewQResource() *QResource { - var outptr_QResource *C.QResource = nil - C.QResource_new(&outptr_QResource) - ret := newQResource(outptr_QResource) + ret := newQResource(C.QResource_new()) ret.isSubclass = true return ret } @@ -73,10 +68,8 @@ func NewQResource2(file string) *QResource { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - var outptr_QResource *C.QResource = nil - C.QResource_new2(file_ms, &outptr_QResource) - ret := newQResource(outptr_QResource) + ret := newQResource(C.QResource_new2(file_ms)) ret.isSubclass = true return ret } @@ -87,10 +80,8 @@ func NewQResource3(file string, locale *QLocale) *QResource { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - var outptr_QResource *C.QResource = nil - C.QResource_new3(file_ms, locale.cPointer(), &outptr_QResource) - ret := newQResource(outptr_QResource) + ret := newQResource(C.QResource_new3(file_ms, locale.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qresource.h b/qt/gen_qresource.h index 6d324158..ca40685e 100644 --- a/qt/gen_qresource.h +++ b/qt/gen_qresource.h @@ -24,9 +24,9 @@ typedef struct QLocale QLocale; typedef struct QResource QResource; #endif -void QResource_new(QResource** outptr_QResource); -void QResource_new2(struct miqt_string file, QResource** outptr_QResource); -void QResource_new3(struct miqt_string file, QLocale* locale, QResource** outptr_QResource); +QResource* QResource_new(); +QResource* QResource_new2(struct miqt_string file); +QResource* QResource_new3(struct miqt_string file, QLocale* locale); void QResource_SetFileName(QResource* self, struct miqt_string file); struct miqt_string QResource_FileName(const QResource* self); struct miqt_string QResource_AbsoluteFilePath(const QResource* self); diff --git a/qt/gen_qrgba64.cpp b/qt/gen_qrgba64.cpp index b008c03a..9ccf590e 100644 --- a/qt/gen_qrgba64.cpp +++ b/qt/gen_qrgba64.cpp @@ -3,14 +3,12 @@ #include "gen_qrgba64.h" #include "_cgo_export.h" -void QRgba64_new(QRgba64** outptr_QRgba64) { - QRgba64* ret = new QRgba64(); - *outptr_QRgba64 = ret; +QRgba64* QRgba64_new() { + return new QRgba64(); } -void QRgba64_new2(QRgba64* param1, QRgba64** outptr_QRgba64) { - QRgba64* ret = new QRgba64(*param1); - *outptr_QRgba64 = ret; +QRgba64* QRgba64_new2(QRgba64* param1) { + return new QRgba64(*param1); } QRgba64* QRgba64_FromRgba64(unsigned long long c) { diff --git a/qt/gen_qrgba64.go b/qt/gen_qrgba64.go index a00ceef0..0fa9d94a 100644 --- a/qt/gen_qrgba64.go +++ b/qt/gen_qrgba64.go @@ -37,34 +37,27 @@ func newQRgba64(h *C.QRgba64) *QRgba64 { if h == nil { return nil } + return &QRgba64{h: h} } // UnsafeNewQRgba64 constructs the type using only unsafe pointers. func UnsafeNewQRgba64(h unsafe.Pointer) *QRgba64 { - if h == nil { - return nil - } - - return &QRgba64{h: (*C.QRgba64)(h)} + return newQRgba64((*C.QRgba64)(h)) } // NewQRgba64 constructs a new QRgba64 object. func NewQRgba64() *QRgba64 { - var outptr_QRgba64 *C.QRgba64 = nil - C.QRgba64_new(&outptr_QRgba64) - ret := newQRgba64(outptr_QRgba64) + ret := newQRgba64(C.QRgba64_new()) ret.isSubclass = true return ret } // NewQRgba642 constructs a new QRgba64 object. func NewQRgba642(param1 *QRgba64) *QRgba64 { - var outptr_QRgba64 *C.QRgba64 = nil - C.QRgba64_new2(param1.cPointer(), &outptr_QRgba64) - ret := newQRgba64(outptr_QRgba64) + ret := newQRgba64(C.QRgba64_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qrgba64.h b/qt/gen_qrgba64.h index 66d07060..8caf82d1 100644 --- a/qt/gen_qrgba64.h +++ b/qt/gen_qrgba64.h @@ -20,8 +20,8 @@ class QRgba64; typedef struct QRgba64 QRgba64; #endif -void QRgba64_new(QRgba64** outptr_QRgba64); -void QRgba64_new2(QRgba64* param1, QRgba64** outptr_QRgba64); +QRgba64* QRgba64_new(); +QRgba64* QRgba64_new2(QRgba64* param1); QRgba64* QRgba64_FromRgba64(unsigned long long c); QRgba64* QRgba64_FromRgba642(uint16_t red, uint16_t green, uint16_t blue, uint16_t alpha); QRgba64* QRgba64_FromRgba(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha); diff --git a/qt/gen_qrubberband.cpp b/qt/gen_qrubberband.cpp index cfe9ebae..7ee6b386 100644 --- a/qt/gen_qrubberband.cpp +++ b/qt/gen_qrubberband.cpp @@ -1021,20 +1021,16 @@ public: }; -void QRubberBand_new(int param1, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQRubberBand* ret = new MiqtVirtualQRubberBand(static_cast(param1)); - *outptr_QRubberBand = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QRubberBand* QRubberBand_new(int param1) { + return new MiqtVirtualQRubberBand(static_cast(param1)); } -void QRubberBand_new2(int param1, QWidget* param2, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQRubberBand* ret = new MiqtVirtualQRubberBand(static_cast(param1), param2); - *outptr_QRubberBand = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QRubberBand* QRubberBand_new2(int param1, QWidget* param2) { + return new MiqtVirtualQRubberBand(static_cast(param1), param2); +} + +void QRubberBand_virtbase(QRubberBand* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QRubberBand_MetaObject(const QRubberBand* self) { diff --git a/qt/gen_qrubberband.go b/qt/gen_qrubberband.go index 915cd321..d3094e1a 100644 --- a/qt/gen_qrubberband.go +++ b/qt/gen_qrubberband.go @@ -42,46 +42,34 @@ func (this *QRubberBand) UnsafePointer() unsafe.Pointer { } // newQRubberBand constructs the type using only CGO pointers. -func newQRubberBand(h *C.QRubberBand, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QRubberBand { +func newQRubberBand(h *C.QRubberBand) *QRubberBand { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QRubberBand_virtbase(h, &outptr_QWidget) + return &QRubberBand{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQRubberBand constructs the type using only unsafe pointers. -func UnsafeNewQRubberBand(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QRubberBand { - if h == nil { - return nil - } - - return &QRubberBand{h: (*C.QRubberBand)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQRubberBand(h unsafe.Pointer) *QRubberBand { + return newQRubberBand((*C.QRubberBand)(h)) } // NewQRubberBand constructs a new QRubberBand object. func NewQRubberBand(param1 QRubberBand__Shape) *QRubberBand { - var outptr_QRubberBand *C.QRubberBand = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRubberBand_new((C.int)(param1), &outptr_QRubberBand, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQRubberBand(outptr_QRubberBand, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQRubberBand(C.QRubberBand_new((C.int)(param1))) ret.isSubclass = true return ret } // NewQRubberBand2 constructs a new QRubberBand object. func NewQRubberBand2(param1 QRubberBand__Shape, param2 *QWidget) *QRubberBand { - var outptr_QRubberBand *C.QRubberBand = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRubberBand_new2((C.int)(param1), param2.cPointer(), &outptr_QRubberBand, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQRubberBand(outptr_QRubberBand, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQRubberBand(C.QRubberBand_new2((C.int)(param1), param2.cPointer())) ret.isSubclass = true return ret } @@ -234,7 +222,7 @@ func miqt_exec_callback_QRubberBand_PaintEvent(self *C.QRubberBand, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QRubberBand{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -286,7 +274,7 @@ func miqt_exec_callback_QRubberBand_ShowEvent(self *C.QRubberBand, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QRubberBand{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -312,7 +300,7 @@ func miqt_exec_callback_QRubberBand_ResizeEvent(self *C.QRubberBand, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QRubberBand{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -338,7 +326,7 @@ func miqt_exec_callback_QRubberBand_MoveEvent(self *C.QRubberBand, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(param1, nil) + slotval1 := newQMoveEvent(param1) gofunc((&QRubberBand{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -547,7 +535,7 @@ func miqt_exec_callback_QRubberBand_MousePressEvent(self *C.QRubberBand, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -573,7 +561,7 @@ func miqt_exec_callback_QRubberBand_MouseReleaseEvent(self *C.QRubberBand, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -599,7 +587,7 @@ func miqt_exec_callback_QRubberBand_MouseDoubleClickEvent(self *C.QRubberBand, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -625,7 +613,7 @@ func miqt_exec_callback_QRubberBand_MouseMoveEvent(self *C.QRubberBand, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -651,7 +639,7 @@ func miqt_exec_callback_QRubberBand_WheelEvent(self *C.QRubberBand, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -677,7 +665,7 @@ func miqt_exec_callback_QRubberBand_KeyPressEvent(self *C.QRubberBand, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -703,7 +691,7 @@ func miqt_exec_callback_QRubberBand_KeyReleaseEvent(self *C.QRubberBand, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -729,7 +717,7 @@ func miqt_exec_callback_QRubberBand_FocusInEvent(self *C.QRubberBand, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -755,7 +743,7 @@ func miqt_exec_callback_QRubberBand_FocusOutEvent(self *C.QRubberBand, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -833,7 +821,7 @@ func miqt_exec_callback_QRubberBand_CloseEvent(self *C.QRubberBand, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -859,7 +847,7 @@ func miqt_exec_callback_QRubberBand_ContextMenuEvent(self *C.QRubberBand, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -885,7 +873,7 @@ func miqt_exec_callback_QRubberBand_TabletEvent(self *C.QRubberBand, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -911,7 +899,7 @@ func miqt_exec_callback_QRubberBand_ActionEvent(self *C.QRubberBand, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -937,7 +925,7 @@ func miqt_exec_callback_QRubberBand_DragEnterEvent(self *C.QRubberBand, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -963,7 +951,7 @@ func miqt_exec_callback_QRubberBand_DragMoveEvent(self *C.QRubberBand, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -989,7 +977,7 @@ func miqt_exec_callback_QRubberBand_DragLeaveEvent(self *C.QRubberBand, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1015,7 +1003,7 @@ func miqt_exec_callback_QRubberBand_DropEvent(self *C.QRubberBand, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1041,7 +1029,7 @@ func miqt_exec_callback_QRubberBand_HideEvent(self *C.QRubberBand, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1211,7 +1199,7 @@ func miqt_exec_callback_QRubberBand_InputMethodEvent(self *C.QRubberBand, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QRubberBand{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qrubberband.h b/qt/gen_qrubberband.h index 3edefa67..161d19c6 100644 --- a/qt/gen_qrubberband.h +++ b/qt/gen_qrubberband.h @@ -78,8 +78,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QRubberBand_new(int param1, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QRubberBand_new2(int param1, QWidget* param2, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QRubberBand* QRubberBand_new(int param1); +QRubberBand* QRubberBand_new2(int param1, QWidget* param2); +void QRubberBand_virtbase(QRubberBand* src, QWidget** outptr_QWidget); QMetaObject* QRubberBand_MetaObject(const QRubberBand* self); void* QRubberBand_Metacast(QRubberBand* self, const char* param1); struct miqt_string QRubberBand_Tr(const char* s); diff --git a/qt/gen_qrunnable.cpp b/qt/gen_qrunnable.cpp index c80d6c80..616eee59 100644 --- a/qt/gen_qrunnable.cpp +++ b/qt/gen_qrunnable.cpp @@ -27,9 +27,8 @@ public: }; -void QRunnable_new(QRunnable** outptr_QRunnable) { - MiqtVirtualQRunnable* ret = new MiqtVirtualQRunnable(); - *outptr_QRunnable = ret; +QRunnable* QRunnable_new() { + return new MiqtVirtualQRunnable(); } void QRunnable_Run(QRunnable* self) { diff --git a/qt/gen_qrunnable.go b/qt/gen_qrunnable.go index 712216be..02ded50f 100644 --- a/qt/gen_qrunnable.go +++ b/qt/gen_qrunnable.go @@ -38,24 +38,19 @@ func newQRunnable(h *C.QRunnable) *QRunnable { if h == nil { return nil } + return &QRunnable{h: h} } // UnsafeNewQRunnable constructs the type using only unsafe pointers. func UnsafeNewQRunnable(h unsafe.Pointer) *QRunnable { - if h == nil { - return nil - } - - return &QRunnable{h: (*C.QRunnable)(h)} + return newQRunnable((*C.QRunnable)(h)) } // NewQRunnable constructs a new QRunnable object. func NewQRunnable() *QRunnable { - var outptr_QRunnable *C.QRunnable = nil - C.QRunnable_new(&outptr_QRunnable) - ret := newQRunnable(outptr_QRunnable) + ret := newQRunnable(C.QRunnable_new()) ret.isSubclass = true return ret } diff --git a/qt/gen_qrunnable.h b/qt/gen_qrunnable.h index a1711d21..d457acf2 100644 --- a/qt/gen_qrunnable.h +++ b/qt/gen_qrunnable.h @@ -20,7 +20,7 @@ class QRunnable; typedef struct QRunnable QRunnable; #endif -void QRunnable_new(QRunnable** outptr_QRunnable); +QRunnable* QRunnable_new(); void QRunnable_Run(QRunnable* self); bool QRunnable_AutoDelete(const QRunnable* self); void QRunnable_SetAutoDelete(QRunnable* self, bool _autoDelete); diff --git a/qt/gen_qsavefile.cpp b/qt/gen_qsavefile.cpp index 57e6159f..6e1bc8a4 100644 --- a/qt/gen_qsavefile.cpp +++ b/qt/gen_qsavefile.cpp @@ -339,38 +339,26 @@ public: }; -void QSaveFile_new(struct miqt_string name, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { +QSaveFile* QSaveFile_new(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(name_QString); - *outptr_QSaveFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSaveFile(name_QString); } -void QSaveFile_new2(QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(); - *outptr_QSaveFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSaveFile* QSaveFile_new2() { + return new MiqtVirtualQSaveFile(); } -void QSaveFile_new3(struct miqt_string name, QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { +QSaveFile* QSaveFile_new3(struct miqt_string name, QObject* parent) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(name_QString, parent); - *outptr_QSaveFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSaveFile(name_QString, parent); } -void QSaveFile_new4(QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(parent); - *outptr_QSaveFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSaveFile* QSaveFile_new4(QObject* parent) { + return new MiqtVirtualQSaveFile(parent); +} + +void QSaveFile_virtbase(QSaveFile* src, QFileDevice** outptr_QFileDevice) { + *outptr_QFileDevice = static_cast(src); } QMetaObject* QSaveFile_MetaObject(const QSaveFile* self) { diff --git a/qt/gen_qsavefile.go b/qt/gen_qsavefile.go index c09347c6..9256739d 100644 --- a/qt/gen_qsavefile.go +++ b/qt/gen_qsavefile.go @@ -35,22 +35,20 @@ func (this *QSaveFile) UnsafePointer() unsafe.Pointer { } // newQSaveFile constructs the type using only CGO pointers. -func newQSaveFile(h *C.QSaveFile, h_QFileDevice *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QSaveFile { +func newQSaveFile(h *C.QSaveFile) *QSaveFile { if h == nil { return nil } + var outptr_QFileDevice *C.QFileDevice = nil + C.QSaveFile_virtbase(h, &outptr_QFileDevice) + return &QSaveFile{h: h, - QFileDevice: newQFileDevice(h_QFileDevice, h_QIODevice, h_QObject)} + QFileDevice: newQFileDevice(outptr_QFileDevice)} } // UnsafeNewQSaveFile constructs the type using only unsafe pointers. -func UnsafeNewQSaveFile(h unsafe.Pointer, h_QFileDevice unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QSaveFile { - if h == nil { - return nil - } - - return &QSaveFile{h: (*C.QSaveFile)(h), - QFileDevice: UnsafeNewQFileDevice(h_QFileDevice, h_QIODevice, h_QObject)} +func UnsafeNewQSaveFile(h unsafe.Pointer) *QSaveFile { + return newQSaveFile((*C.QSaveFile)(h)) } // NewQSaveFile constructs a new QSaveFile object. @@ -59,26 +57,16 @@ func NewQSaveFile(name string) *QSaveFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QSaveFile *C.QSaveFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QSaveFile_new(name_ms, &outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) - ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret := newQSaveFile(C.QSaveFile_new(name_ms)) ret.isSubclass = true return ret } // NewQSaveFile2 constructs a new QSaveFile object. func NewQSaveFile2() *QSaveFile { - var outptr_QSaveFile *C.QSaveFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QSaveFile_new2(&outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) - ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret := newQSaveFile(C.QSaveFile_new2()) ret.isSubclass = true return ret } @@ -89,26 +77,16 @@ func NewQSaveFile3(name string, parent *QObject) *QSaveFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QSaveFile *C.QSaveFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QSaveFile_new3(name_ms, parent.cPointer(), &outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) - ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret := newQSaveFile(C.QSaveFile_new3(name_ms, parent.cPointer())) ret.isSubclass = true return ret } // NewQSaveFile4 constructs a new QSaveFile object. func NewQSaveFile4(parent *QObject) *QSaveFile { - var outptr_QSaveFile *C.QSaveFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QSaveFile_new4(parent.cPointer(), &outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) - ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret := newQSaveFile(C.QSaveFile_new4(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qsavefile.h b/qt/gen_qsavefile.h index 322cf83e..a5c5e705 100644 --- a/qt/gen_qsavefile.h +++ b/qt/gen_qsavefile.h @@ -28,10 +28,11 @@ typedef struct QObject QObject; typedef struct QSaveFile QSaveFile; #endif -void QSaveFile_new(struct miqt_string name, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QSaveFile_new2(QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QSaveFile_new3(struct miqt_string name, QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QSaveFile_new4(QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +QSaveFile* QSaveFile_new(struct miqt_string name); +QSaveFile* QSaveFile_new2(); +QSaveFile* QSaveFile_new3(struct miqt_string name, QObject* parent); +QSaveFile* QSaveFile_new4(QObject* parent); +void QSaveFile_virtbase(QSaveFile* src, QFileDevice** outptr_QFileDevice); QMetaObject* QSaveFile_MetaObject(const QSaveFile* self); void* QSaveFile_Metacast(QSaveFile* self, const char* param1); struct miqt_string QSaveFile_Tr(const char* s); diff --git a/qt/gen_qscopedpointer.go b/qt/gen_qscopedpointer.go index 47c92bf6..58c6412d 100644 --- a/qt/gen_qscopedpointer.go +++ b/qt/gen_qscopedpointer.go @@ -37,16 +37,13 @@ func newQScopedPointerPodDeleter(h *C.QScopedPointerPodDeleter) *QScopedPointerP if h == nil { return nil } + return &QScopedPointerPodDeleter{h: h} } // UnsafeNewQScopedPointerPodDeleter constructs the type using only unsafe pointers. func UnsafeNewQScopedPointerPodDeleter(h unsafe.Pointer) *QScopedPointerPodDeleter { - if h == nil { - return nil - } - - return &QScopedPointerPodDeleter{h: (*C.QScopedPointerPodDeleter)(h)} + return newQScopedPointerPodDeleter((*C.QScopedPointerPodDeleter)(h)) } func QScopedPointerPodDeleter_Cleanup(pointer unsafe.Pointer) { diff --git a/qt/gen_qscreen.cpp b/qt/gen_qscreen.cpp index 504d452b..07e14df8 100644 --- a/qt/gen_qscreen.cpp +++ b/qt/gen_qscreen.cpp @@ -15,6 +15,10 @@ #include "gen_qscreen.h" #include "_cgo_export.h" +void QScreen_virtbase(QScreen* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QScreen_MetaObject(const QScreen* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/gen_qscreen.go b/qt/gen_qscreen.go index c4567fcb..a9a5528a 100644 --- a/qt/gen_qscreen.go +++ b/qt/gen_qscreen.go @@ -35,22 +35,20 @@ func (this *QScreen) UnsafePointer() unsafe.Pointer { } // newQScreen constructs the type using only CGO pointers. -func newQScreen(h *C.QScreen, h_QObject *C.QObject) *QScreen { +func newQScreen(h *C.QScreen) *QScreen { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QScreen_virtbase(h, &outptr_QObject) + return &QScreen{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQScreen constructs the type using only unsafe pointers. -func UnsafeNewQScreen(h unsafe.Pointer, h_QObject unsafe.Pointer) *QScreen { - if h == nil { - return nil - } - - return &QScreen{h: (*C.QScreen)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQScreen(h unsafe.Pointer) *QScreen { + return newQScreen((*C.QScreen)(h)) } func (this *QScreen) MetaObject() *QMetaObject { @@ -176,13 +174,13 @@ func (this *QScreen) VirtualSiblings() []*QScreen { _ret := make([]*QScreen, int(_ma.len)) _outCast := (*[0xffff]*C.QScreen)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQScreen(_outCast[i], nil) + _ret[i] = newQScreen(_outCast[i]) } return _ret } func (this *QScreen) VirtualSiblingAt(point QPoint) *QScreen { - return newQScreen(C.QScreen_VirtualSiblingAt(this.h, point.cPointer()), nil) + return newQScreen(C.QScreen_VirtualSiblingAt(this.h, point.cPointer())) } func (this *QScreen) VirtualSize() *QSize { @@ -254,7 +252,7 @@ func (this *QScreen) IsLandscape(orientation ScreenOrientation) bool { } func (this *QScreen) GrabWindow(window uintptr) *QPixmap { - _goptr := newQPixmap(C.QScreen_GrabWindow(this.h, (C.uintptr_t)(window)), nil) + _goptr := newQPixmap(C.QScreen_GrabWindow(this.h, (C.uintptr_t)(window))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -488,25 +486,25 @@ func QScreen_TrUtf83(s string, c string, n int) string { } func (this *QScreen) GrabWindow2(window uintptr, x int) *QPixmap { - _goptr := newQPixmap(C.QScreen_GrabWindow2(this.h, (C.uintptr_t)(window), (C.int)(x)), nil) + _goptr := newQPixmap(C.QScreen_GrabWindow2(this.h, (C.uintptr_t)(window), (C.int)(x))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QScreen) GrabWindow3(window uintptr, x int, y int) *QPixmap { - _goptr := newQPixmap(C.QScreen_GrabWindow3(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y)), nil) + _goptr := newQPixmap(C.QScreen_GrabWindow3(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QScreen) GrabWindow4(window uintptr, x int, y int, w int) *QPixmap { - _goptr := newQPixmap(C.QScreen_GrabWindow4(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y), (C.int)(w)), nil) + _goptr := newQPixmap(C.QScreen_GrabWindow4(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y), (C.int)(w))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QScreen) GrabWindow5(window uintptr, x int, y int, w int, h int) *QPixmap { - _goptr := newQPixmap(C.QScreen_GrabWindow5(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h)), nil) + _goptr := newQPixmap(C.QScreen_GrabWindow5(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/gen_qscreen.h b/qt/gen_qscreen.h index 116e9487..c0bec91f 100644 --- a/qt/gen_qscreen.h +++ b/qt/gen_qscreen.h @@ -36,6 +36,7 @@ typedef struct QSizeF QSizeF; typedef struct QTransform QTransform; #endif +void QScreen_virtbase(QScreen* src, QObject** outptr_QObject); QMetaObject* QScreen_MetaObject(const QScreen* self); void* QScreen_Metacast(QScreen* self, const char* param1); struct miqt_string QScreen_Tr(const char* s); diff --git a/qt/gen_qscrollarea.cpp b/qt/gen_qscrollarea.cpp index 1f05d0bd..6fdb7a81 100644 --- a/qt/gen_qscrollarea.cpp +++ b/qt/gen_qscrollarea.cpp @@ -554,24 +554,16 @@ public: }; -void QScrollArea_new(QWidget* parent, QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQScrollArea* ret = new MiqtVirtualQScrollArea(parent); - *outptr_QScrollArea = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QScrollArea* QScrollArea_new(QWidget* parent) { + return new MiqtVirtualQScrollArea(parent); } -void QScrollArea_new2(QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQScrollArea* ret = new MiqtVirtualQScrollArea(); - *outptr_QScrollArea = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QScrollArea* QScrollArea_new2() { + return new MiqtVirtualQScrollArea(); +} + +void QScrollArea_virtbase(QScrollArea* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); } QMetaObject* QScrollArea_MetaObject(const QScrollArea* self) { diff --git a/qt/gen_qscrollarea.go b/qt/gen_qscrollarea.go index a2b58517..4f9709ae 100644 --- a/qt/gen_qscrollarea.go +++ b/qt/gen_qscrollarea.go @@ -35,50 +35,34 @@ func (this *QScrollArea) UnsafePointer() unsafe.Pointer { } // newQScrollArea constructs the type using only CGO pointers. -func newQScrollArea(h *C.QScrollArea, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QScrollArea { +func newQScrollArea(h *C.QScrollArea) *QScrollArea { if h == nil { return nil } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QScrollArea_virtbase(h, &outptr_QAbstractScrollArea) + return &QScrollArea{h: h, - QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractScrollArea: newQAbstractScrollArea(outptr_QAbstractScrollArea)} } // UnsafeNewQScrollArea constructs the type using only unsafe pointers. -func UnsafeNewQScrollArea(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QScrollArea { - if h == nil { - return nil - } - - return &QScrollArea{h: (*C.QScrollArea)(h), - QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQScrollArea(h unsafe.Pointer) *QScrollArea { + return newQScrollArea((*C.QScrollArea)(h)) } // NewQScrollArea constructs a new QScrollArea object. func NewQScrollArea(parent *QWidget) *QScrollArea { - var outptr_QScrollArea *C.QScrollArea = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QScrollArea_new(parent.cPointer(), &outptr_QScrollArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQScrollArea(outptr_QScrollArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQScrollArea(C.QScrollArea_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQScrollArea2 constructs a new QScrollArea object. func NewQScrollArea2() *QScrollArea { - var outptr_QScrollArea *C.QScrollArea = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QScrollArea_new2(&outptr_QScrollArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQScrollArea(outptr_QScrollArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQScrollArea(C.QScrollArea_new2()) ret.isSubclass = true return ret } @@ -112,7 +96,7 @@ func QScrollArea_TrUtf8(s string) string { } func (this *QScrollArea) Widget() *QWidget { - return newQWidget(C.QScrollArea_Widget(this.h), nil, nil) + return newQWidget(C.QScrollArea_Widget(this.h)) } func (this *QScrollArea) SetWidget(widget *QWidget) { @@ -120,7 +104,7 @@ func (this *QScrollArea) SetWidget(widget *QWidget) { } func (this *QScrollArea) TakeWidget() *QWidget { - return newQWidget(C.QScrollArea_TakeWidget(this.h), nil, nil) + return newQWidget(C.QScrollArea_TakeWidget(this.h)) } func (this *QScrollArea) WidgetResizable() bool { @@ -350,7 +334,7 @@ func miqt_exec_callback_QScrollArea_ResizeEvent(self *C.QScrollArea, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -458,7 +442,7 @@ func miqt_exec_callback_QScrollArea_SetupViewport(self *C.QScrollArea, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(viewport, nil, nil) + slotval1 := newQWidget(viewport) gofunc((&QScrollArea{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -512,7 +496,7 @@ func miqt_exec_callback_QScrollArea_PaintEvent(self *C.QScrollArea, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -538,7 +522,7 @@ func miqt_exec_callback_QScrollArea_MousePressEvent(self *C.QScrollArea, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -564,7 +548,7 @@ func miqt_exec_callback_QScrollArea_MouseReleaseEvent(self *C.QScrollArea, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -590,7 +574,7 @@ func miqt_exec_callback_QScrollArea_MouseDoubleClickEvent(self *C.QScrollArea, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -616,7 +600,7 @@ func miqt_exec_callback_QScrollArea_MouseMoveEvent(self *C.QScrollArea, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -642,7 +626,7 @@ func miqt_exec_callback_QScrollArea_WheelEvent(self *C.QScrollArea, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(param1, nil, nil) + slotval1 := newQWheelEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -668,7 +652,7 @@ func miqt_exec_callback_QScrollArea_ContextMenuEvent(self *C.QScrollArea, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -694,7 +678,7 @@ func miqt_exec_callback_QScrollArea_DragEnterEvent(self *C.QScrollArea, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(param1, nil, nil, nil) + slotval1 := newQDragEnterEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -720,7 +704,7 @@ func miqt_exec_callback_QScrollArea_DragMoveEvent(self *C.QScrollArea, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(param1, nil, nil) + slotval1 := newQDragMoveEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -746,7 +730,7 @@ func miqt_exec_callback_QScrollArea_DragLeaveEvent(self *C.QScrollArea, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(param1, nil) + slotval1 := newQDragLeaveEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -772,7 +756,7 @@ func miqt_exec_callback_QScrollArea_DropEvent(self *C.QScrollArea, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(param1, nil) + slotval1 := newQDropEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_DropEvent, slotval1) @@ -798,7 +782,7 @@ func miqt_exec_callback_QScrollArea_KeyPressEvent(self *C.QScrollArea, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_KeyPressEvent, slotval1) diff --git a/qt/gen_qscrollarea.h b/qt/gen_qscrollarea.h index 4219d260..035b42f4 100644 --- a/qt/gen_qscrollarea.h +++ b/qt/gen_qscrollarea.h @@ -56,8 +56,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QScrollArea_new(QWidget* parent, QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QScrollArea_new2(QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QScrollArea* QScrollArea_new(QWidget* parent); +QScrollArea* QScrollArea_new2(); +void QScrollArea_virtbase(QScrollArea* src, QAbstractScrollArea** outptr_QAbstractScrollArea); QMetaObject* QScrollArea_MetaObject(const QScrollArea* self); void* QScrollArea_Metacast(QScrollArea* self, const char* param1); struct miqt_string QScrollArea_Tr(const char* s); diff --git a/qt/gen_qscrollbar.cpp b/qt/gen_qscrollbar.cpp index 780c5b9d..166c3ffa 100644 --- a/qt/gen_qscrollbar.cpp +++ b/qt/gen_qscrollbar.cpp @@ -342,40 +342,24 @@ public: }; -void QScrollBar_new(QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(parent); - *outptr_QScrollBar = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QScrollBar* QScrollBar_new(QWidget* parent) { + return new MiqtVirtualQScrollBar(parent); } -void QScrollBar_new2(QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(); - *outptr_QScrollBar = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QScrollBar* QScrollBar_new2() { + return new MiqtVirtualQScrollBar(); } -void QScrollBar_new3(int param1, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(static_cast(param1)); - *outptr_QScrollBar = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QScrollBar* QScrollBar_new3(int param1) { + return new MiqtVirtualQScrollBar(static_cast(param1)); } -void QScrollBar_new4(int param1, QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(static_cast(param1), parent); - *outptr_QScrollBar = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QScrollBar* QScrollBar_new4(int param1, QWidget* parent) { + return new MiqtVirtualQScrollBar(static_cast(param1), parent); +} + +void QScrollBar_virtbase(QScrollBar* src, QAbstractSlider** outptr_QAbstractSlider) { + *outptr_QAbstractSlider = static_cast(src); } QMetaObject* QScrollBar_MetaObject(const QScrollBar* self) { diff --git a/qt/gen_qscrollbar.go b/qt/gen_qscrollbar.go index f8296984..089a961d 100644 --- a/qt/gen_qscrollbar.go +++ b/qt/gen_qscrollbar.go @@ -35,76 +35,50 @@ func (this *QScrollBar) UnsafePointer() unsafe.Pointer { } // newQScrollBar constructs the type using only CGO pointers. -func newQScrollBar(h *C.QScrollBar, h_QAbstractSlider *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QScrollBar { +func newQScrollBar(h *C.QScrollBar) *QScrollBar { if h == nil { return nil } + var outptr_QAbstractSlider *C.QAbstractSlider = nil + C.QScrollBar_virtbase(h, &outptr_QAbstractSlider) + return &QScrollBar{h: h, - QAbstractSlider: newQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractSlider: newQAbstractSlider(outptr_QAbstractSlider)} } // UnsafeNewQScrollBar constructs the type using only unsafe pointers. -func UnsafeNewQScrollBar(h unsafe.Pointer, h_QAbstractSlider unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QScrollBar { - if h == nil { - return nil - } - - return &QScrollBar{h: (*C.QScrollBar)(h), - QAbstractSlider: UnsafeNewQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQScrollBar(h unsafe.Pointer) *QScrollBar { + return newQScrollBar((*C.QScrollBar)(h)) } // NewQScrollBar constructs a new QScrollBar object. func NewQScrollBar(parent *QWidget) *QScrollBar { - var outptr_QScrollBar *C.QScrollBar = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QScrollBar_new(parent.cPointer(), &outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQScrollBar(C.QScrollBar_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQScrollBar2 constructs a new QScrollBar object. func NewQScrollBar2() *QScrollBar { - var outptr_QScrollBar *C.QScrollBar = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QScrollBar_new2(&outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQScrollBar(C.QScrollBar_new2()) ret.isSubclass = true return ret } // NewQScrollBar3 constructs a new QScrollBar object. func NewQScrollBar3(param1 Orientation) *QScrollBar { - var outptr_QScrollBar *C.QScrollBar = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QScrollBar_new3((C.int)(param1), &outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQScrollBar(C.QScrollBar_new3((C.int)(param1))) ret.isSubclass = true return ret } // NewQScrollBar4 constructs a new QScrollBar object. func NewQScrollBar4(param1 Orientation, parent *QWidget) *QScrollBar { - var outptr_QScrollBar *C.QScrollBar = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QScrollBar_new4((C.int)(param1), parent.cPointer(), &outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQScrollBar(C.QScrollBar_new4((C.int)(param1), parent.cPointer())) ret.isSubclass = true return ret } @@ -266,7 +240,7 @@ func miqt_exec_callback_QScrollBar_WheelEvent(self *C.QScrollBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(param1, nil, nil) + slotval1 := newQWheelEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -292,7 +266,7 @@ func miqt_exec_callback_QScrollBar_PaintEvent(self *C.QScrollBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -318,7 +292,7 @@ func miqt_exec_callback_QScrollBar_MousePressEvent(self *C.QScrollBar, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -344,7 +318,7 @@ func miqt_exec_callback_QScrollBar_MouseReleaseEvent(self *C.QScrollBar, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -370,7 +344,7 @@ func miqt_exec_callback_QScrollBar_MouseMoveEvent(self *C.QScrollBar, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -396,7 +370,7 @@ func miqt_exec_callback_QScrollBar_HideEvent(self *C.QScrollBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(param1, nil) + slotval1 := newQHideEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_HideEvent, slotval1) @@ -448,7 +422,7 @@ func miqt_exec_callback_QScrollBar_ContextMenuEvent(self *C.QScrollBar, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -474,7 +448,7 @@ func miqt_exec_callback_QScrollBar_KeyPressEvent(self *C.QScrollBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(ev, nil, nil) + slotval1 := newQKeyEvent(ev) gofunc((&QScrollBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -500,7 +474,7 @@ func miqt_exec_callback_QScrollBar_TimerEvent(self *C.QScrollBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_TimerEvent, slotval1) diff --git a/qt/gen_qscrollbar.h b/qt/gen_qscrollbar.h index 80a9512d..de08d169 100644 --- a/qt/gen_qscrollbar.h +++ b/qt/gen_qscrollbar.h @@ -48,10 +48,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QScrollBar_new(QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QScrollBar_new2(QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QScrollBar_new3(int param1, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QScrollBar_new4(int param1, QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QScrollBar* QScrollBar_new(QWidget* parent); +QScrollBar* QScrollBar_new2(); +QScrollBar* QScrollBar_new3(int param1); +QScrollBar* QScrollBar_new4(int param1, QWidget* parent); +void QScrollBar_virtbase(QScrollBar* src, QAbstractSlider** outptr_QAbstractSlider); QMetaObject* QScrollBar_MetaObject(const QScrollBar* self); void* QScrollBar_Metacast(QScrollBar* self, const char* param1); struct miqt_string QScrollBar_Tr(const char* s); diff --git a/qt/gen_qscroller.cpp b/qt/gen_qscroller.cpp index 42c48098..df085f7c 100644 --- a/qt/gen_qscroller.cpp +++ b/qt/gen_qscroller.cpp @@ -12,6 +12,10 @@ #include "gen_qscroller.h" #include "_cgo_export.h" +void QScroller_virtbase(QScroller* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QScroller_MetaObject(const QScroller* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/gen_qscroller.go b/qt/gen_qscroller.go index adc5d641..16bc706a 100644 --- a/qt/gen_qscroller.go +++ b/qt/gen_qscroller.go @@ -60,22 +60,20 @@ func (this *QScroller) UnsafePointer() unsafe.Pointer { } // newQScroller constructs the type using only CGO pointers. -func newQScroller(h *C.QScroller, h_QObject *C.QObject) *QScroller { +func newQScroller(h *C.QScroller) *QScroller { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QScroller_virtbase(h, &outptr_QObject) + return &QScroller{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQScroller constructs the type using only unsafe pointers. -func UnsafeNewQScroller(h unsafe.Pointer, h_QObject unsafe.Pointer) *QScroller { - if h == nil { - return nil - } - - return &QScroller{h: (*C.QScroller)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQScroller(h unsafe.Pointer) *QScroller { + return newQScroller((*C.QScroller)(h)) } func (this *QScroller) MetaObject() *QMetaObject { @@ -111,11 +109,11 @@ func QScroller_HasScroller(target *QObject) bool { } func QScroller_Scroller(target *QObject) *QScroller { - return newQScroller(C.QScroller_Scroller(target.cPointer()), nil) + return newQScroller(C.QScroller_Scroller(target.cPointer())) } func QScroller_ScrollerWithTarget(target *QObject) *QScroller { - return newQScroller(C.QScroller_ScrollerWithTarget(target.cPointer()), nil) + return newQScroller(C.QScroller_ScrollerWithTarget(target.cPointer())) } func QScroller_GrabGesture(target *QObject) GestureType { @@ -135,7 +133,7 @@ func QScroller_ActiveScrollers() []*QScroller { _ret := make([]*QScroller, int(_ma.len)) _outCast := (*[0xffff]*C.QScroller)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQScroller(_outCast[i], nil) + _ret[i] = newQScroller(_outCast[i]) } return _ret } diff --git a/qt/gen_qscroller.h b/qt/gen_qscroller.h index 390d2683..05ea8821 100644 --- a/qt/gen_qscroller.h +++ b/qt/gen_qscroller.h @@ -30,6 +30,7 @@ typedef struct QScroller QScroller; typedef struct QScrollerProperties QScrollerProperties; #endif +void QScroller_virtbase(QScroller* src, QObject** outptr_QObject); QMetaObject* QScroller_MetaObject(const QScroller* self); void* QScroller_Metacast(QScroller* self, const char* param1); struct miqt_string QScroller_Tr(const char* s); diff --git a/qt/gen_qscrollerproperties.cpp b/qt/gen_qscrollerproperties.cpp index 416ea728..477f9ebf 100644 --- a/qt/gen_qscrollerproperties.cpp +++ b/qt/gen_qscrollerproperties.cpp @@ -4,14 +4,12 @@ #include "gen_qscrollerproperties.h" #include "_cgo_export.h" -void QScrollerProperties_new(QScrollerProperties** outptr_QScrollerProperties) { - QScrollerProperties* ret = new QScrollerProperties(); - *outptr_QScrollerProperties = ret; +QScrollerProperties* QScrollerProperties_new() { + return new QScrollerProperties(); } -void QScrollerProperties_new2(QScrollerProperties* sp, QScrollerProperties** outptr_QScrollerProperties) { - QScrollerProperties* ret = new QScrollerProperties(*sp); - *outptr_QScrollerProperties = ret; +QScrollerProperties* QScrollerProperties_new2(QScrollerProperties* sp) { + return new QScrollerProperties(*sp); } void QScrollerProperties_OperatorAssign(QScrollerProperties* self, QScrollerProperties* sp) { diff --git a/qt/gen_qscrollerproperties.go b/qt/gen_qscrollerproperties.go index f17baec5..17c2dcf9 100644 --- a/qt/gen_qscrollerproperties.go +++ b/qt/gen_qscrollerproperties.go @@ -80,34 +80,27 @@ func newQScrollerProperties(h *C.QScrollerProperties) *QScrollerProperties { if h == nil { return nil } + return &QScrollerProperties{h: h} } // UnsafeNewQScrollerProperties constructs the type using only unsafe pointers. func UnsafeNewQScrollerProperties(h unsafe.Pointer) *QScrollerProperties { - if h == nil { - return nil - } - - return &QScrollerProperties{h: (*C.QScrollerProperties)(h)} + return newQScrollerProperties((*C.QScrollerProperties)(h)) } // NewQScrollerProperties constructs a new QScrollerProperties object. func NewQScrollerProperties() *QScrollerProperties { - var outptr_QScrollerProperties *C.QScrollerProperties = nil - C.QScrollerProperties_new(&outptr_QScrollerProperties) - ret := newQScrollerProperties(outptr_QScrollerProperties) + ret := newQScrollerProperties(C.QScrollerProperties_new()) ret.isSubclass = true return ret } // NewQScrollerProperties2 constructs a new QScrollerProperties object. func NewQScrollerProperties2(sp *QScrollerProperties) *QScrollerProperties { - var outptr_QScrollerProperties *C.QScrollerProperties = nil - C.QScrollerProperties_new2(sp.cPointer(), &outptr_QScrollerProperties) - ret := newQScrollerProperties(outptr_QScrollerProperties) + ret := newQScrollerProperties(C.QScrollerProperties_new2(sp.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qscrollerproperties.h b/qt/gen_qscrollerproperties.h index 5f9114c0..688e19cb 100644 --- a/qt/gen_qscrollerproperties.h +++ b/qt/gen_qscrollerproperties.h @@ -22,8 +22,8 @@ typedef struct QScrollerProperties QScrollerProperties; typedef struct QVariant QVariant; #endif -void QScrollerProperties_new(QScrollerProperties** outptr_QScrollerProperties); -void QScrollerProperties_new2(QScrollerProperties* sp, QScrollerProperties** outptr_QScrollerProperties); +QScrollerProperties* QScrollerProperties_new(); +QScrollerProperties* QScrollerProperties_new2(QScrollerProperties* sp); void QScrollerProperties_OperatorAssign(QScrollerProperties* self, QScrollerProperties* sp); bool QScrollerProperties_OperatorEqual(const QScrollerProperties* self, QScrollerProperties* sp); bool QScrollerProperties_OperatorNotEqual(const QScrollerProperties* self, QScrollerProperties* sp); diff --git a/qt/gen_qsemaphore.cpp b/qt/gen_qsemaphore.cpp index 5def7910..da26ebdb 100644 --- a/qt/gen_qsemaphore.cpp +++ b/qt/gen_qsemaphore.cpp @@ -4,14 +4,12 @@ #include "gen_qsemaphore.h" #include "_cgo_export.h" -void QSemaphore_new(QSemaphore** outptr_QSemaphore) { - QSemaphore* ret = new QSemaphore(); - *outptr_QSemaphore = ret; +QSemaphore* QSemaphore_new() { + return new QSemaphore(); } -void QSemaphore_new2(int n, QSemaphore** outptr_QSemaphore) { - QSemaphore* ret = new QSemaphore(static_cast(n)); - *outptr_QSemaphore = ret; +QSemaphore* QSemaphore_new2(int n) { + return new QSemaphore(static_cast(n)); } void QSemaphore_Acquire(QSemaphore* self) { @@ -54,29 +52,24 @@ void QSemaphore_Delete(QSemaphore* self, bool isSubclass) { } } -void QSemaphoreReleaser_new(QSemaphoreReleaser** outptr_QSemaphoreReleaser) { - QSemaphoreReleaser* ret = new QSemaphoreReleaser(); - *outptr_QSemaphoreReleaser = ret; +QSemaphoreReleaser* QSemaphoreReleaser_new() { + return new QSemaphoreReleaser(); } -void QSemaphoreReleaser_new2(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { - QSemaphoreReleaser* ret = new QSemaphoreReleaser(*sem); - *outptr_QSemaphoreReleaser = ret; +QSemaphoreReleaser* QSemaphoreReleaser_new2(QSemaphore* sem) { + return new QSemaphoreReleaser(*sem); } -void QSemaphoreReleaser_new3(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { - QSemaphoreReleaser* ret = new QSemaphoreReleaser(sem); - *outptr_QSemaphoreReleaser = ret; +QSemaphoreReleaser* QSemaphoreReleaser_new3(QSemaphore* sem) { + return new QSemaphoreReleaser(sem); } -void QSemaphoreReleaser_new4(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { - QSemaphoreReleaser* ret = new QSemaphoreReleaser(*sem, static_cast(n)); - *outptr_QSemaphoreReleaser = ret; +QSemaphoreReleaser* QSemaphoreReleaser_new4(QSemaphore* sem, int n) { + return new QSemaphoreReleaser(*sem, static_cast(n)); } -void QSemaphoreReleaser_new5(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { - QSemaphoreReleaser* ret = new QSemaphoreReleaser(sem, static_cast(n)); - *outptr_QSemaphoreReleaser = ret; +QSemaphoreReleaser* QSemaphoreReleaser_new5(QSemaphore* sem, int n) { + return new QSemaphoreReleaser(sem, static_cast(n)); } void QSemaphoreReleaser_Swap(QSemaphoreReleaser* self, QSemaphoreReleaser* other) { diff --git a/qt/gen_qsemaphore.go b/qt/gen_qsemaphore.go index 4ffbba34..867bbf9e 100644 --- a/qt/gen_qsemaphore.go +++ b/qt/gen_qsemaphore.go @@ -37,34 +37,27 @@ func newQSemaphore(h *C.QSemaphore) *QSemaphore { if h == nil { return nil } + return &QSemaphore{h: h} } // UnsafeNewQSemaphore constructs the type using only unsafe pointers. func UnsafeNewQSemaphore(h unsafe.Pointer) *QSemaphore { - if h == nil { - return nil - } - - return &QSemaphore{h: (*C.QSemaphore)(h)} + return newQSemaphore((*C.QSemaphore)(h)) } // NewQSemaphore constructs a new QSemaphore object. func NewQSemaphore() *QSemaphore { - var outptr_QSemaphore *C.QSemaphore = nil - C.QSemaphore_new(&outptr_QSemaphore) - ret := newQSemaphore(outptr_QSemaphore) + ret := newQSemaphore(C.QSemaphore_new()) ret.isSubclass = true return ret } // NewQSemaphore2 constructs a new QSemaphore object. func NewQSemaphore2(n int) *QSemaphore { - var outptr_QSemaphore *C.QSemaphore = nil - C.QSemaphore_new2((C.int)(n), &outptr_QSemaphore) - ret := newQSemaphore(outptr_QSemaphore) + ret := newQSemaphore(C.QSemaphore_new2((C.int)(n))) ret.isSubclass = true return ret } @@ -139,64 +132,51 @@ func newQSemaphoreReleaser(h *C.QSemaphoreReleaser) *QSemaphoreReleaser { if h == nil { return nil } + return &QSemaphoreReleaser{h: h} } // UnsafeNewQSemaphoreReleaser constructs the type using only unsafe pointers. func UnsafeNewQSemaphoreReleaser(h unsafe.Pointer) *QSemaphoreReleaser { - if h == nil { - return nil - } - - return &QSemaphoreReleaser{h: (*C.QSemaphoreReleaser)(h)} + return newQSemaphoreReleaser((*C.QSemaphoreReleaser)(h)) } // NewQSemaphoreReleaser constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser() *QSemaphoreReleaser { - var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil - C.QSemaphoreReleaser_new(&outptr_QSemaphoreReleaser) - ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(C.QSemaphoreReleaser_new()) ret.isSubclass = true return ret } // NewQSemaphoreReleaser2 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser2(sem *QSemaphore) *QSemaphoreReleaser { - var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil - C.QSemaphoreReleaser_new2(sem.cPointer(), &outptr_QSemaphoreReleaser) - ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(C.QSemaphoreReleaser_new2(sem.cPointer())) ret.isSubclass = true return ret } // NewQSemaphoreReleaser3 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser3(sem *QSemaphore) *QSemaphoreReleaser { - var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil - C.QSemaphoreReleaser_new3(sem.cPointer(), &outptr_QSemaphoreReleaser) - ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(C.QSemaphoreReleaser_new3(sem.cPointer())) ret.isSubclass = true return ret } // NewQSemaphoreReleaser4 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser4(sem *QSemaphore, n int) *QSemaphoreReleaser { - var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil - C.QSemaphoreReleaser_new4(sem.cPointer(), (C.int)(n), &outptr_QSemaphoreReleaser) - ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(C.QSemaphoreReleaser_new4(sem.cPointer(), (C.int)(n))) ret.isSubclass = true return ret } // NewQSemaphoreReleaser5 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser5(sem *QSemaphore, n int) *QSemaphoreReleaser { - var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil - C.QSemaphoreReleaser_new5(sem.cPointer(), (C.int)(n), &outptr_QSemaphoreReleaser) - ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(C.QSemaphoreReleaser_new5(sem.cPointer(), (C.int)(n))) ret.isSubclass = true return ret } diff --git a/qt/gen_qsemaphore.h b/qt/gen_qsemaphore.h index 4d37412d..71b7f5e4 100644 --- a/qt/gen_qsemaphore.h +++ b/qt/gen_qsemaphore.h @@ -22,8 +22,8 @@ typedef struct QSemaphore QSemaphore; typedef struct QSemaphoreReleaser QSemaphoreReleaser; #endif -void QSemaphore_new(QSemaphore** outptr_QSemaphore); -void QSemaphore_new2(int n, QSemaphore** outptr_QSemaphore); +QSemaphore* QSemaphore_new(); +QSemaphore* QSemaphore_new2(int n); void QSemaphore_Acquire(QSemaphore* self); bool QSemaphore_TryAcquire(QSemaphore* self); bool QSemaphore_TryAcquire2(QSemaphore* self, int n, int timeout); @@ -34,11 +34,11 @@ bool QSemaphore_TryAcquire1(QSemaphore* self, int n); void QSemaphore_Release1(QSemaphore* self, int n); void QSemaphore_Delete(QSemaphore* self, bool isSubclass); -void QSemaphoreReleaser_new(QSemaphoreReleaser** outptr_QSemaphoreReleaser); -void QSemaphoreReleaser_new2(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser); -void QSemaphoreReleaser_new3(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser); -void QSemaphoreReleaser_new4(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser); -void QSemaphoreReleaser_new5(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser); +QSemaphoreReleaser* QSemaphoreReleaser_new(); +QSemaphoreReleaser* QSemaphoreReleaser_new2(QSemaphore* sem); +QSemaphoreReleaser* QSemaphoreReleaser_new3(QSemaphore* sem); +QSemaphoreReleaser* QSemaphoreReleaser_new4(QSemaphore* sem, int n); +QSemaphoreReleaser* QSemaphoreReleaser_new5(QSemaphore* sem, int n); void QSemaphoreReleaser_Swap(QSemaphoreReleaser* self, QSemaphoreReleaser* other); QSemaphore* QSemaphoreReleaser_Semaphore(const QSemaphoreReleaser* self); QSemaphore* QSemaphoreReleaser_Cancel(QSemaphoreReleaser* self); diff --git a/qt/gen_qsequentialanimationgroup.cpp b/qt/gen_qsequentialanimationgroup.cpp index 15e51b8e..60c84185 100644 --- a/qt/gen_qsequentialanimationgroup.cpp +++ b/qt/gen_qsequentialanimationgroup.cpp @@ -143,20 +143,16 @@ public: }; -void QSequentialAnimationGroup_new(QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQSequentialAnimationGroup* ret = new MiqtVirtualQSequentialAnimationGroup(); - *outptr_QSequentialAnimationGroup = ret; - *outptr_QAnimationGroup = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSequentialAnimationGroup* QSequentialAnimationGroup_new() { + return new MiqtVirtualQSequentialAnimationGroup(); } -void QSequentialAnimationGroup_new2(QObject* parent, QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQSequentialAnimationGroup* ret = new MiqtVirtualQSequentialAnimationGroup(parent); - *outptr_QSequentialAnimationGroup = ret; - *outptr_QAnimationGroup = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSequentialAnimationGroup* QSequentialAnimationGroup_new2(QObject* parent) { + return new MiqtVirtualQSequentialAnimationGroup(parent); +} + +void QSequentialAnimationGroup_virtbase(QSequentialAnimationGroup* src, QAnimationGroup** outptr_QAnimationGroup) { + *outptr_QAnimationGroup = static_cast(src); } QMetaObject* QSequentialAnimationGroup_MetaObject(const QSequentialAnimationGroup* self) { diff --git a/qt/gen_qsequentialanimationgroup.go b/qt/gen_qsequentialanimationgroup.go index 8388752a..c6456120 100644 --- a/qt/gen_qsequentialanimationgroup.go +++ b/qt/gen_qsequentialanimationgroup.go @@ -35,46 +35,34 @@ func (this *QSequentialAnimationGroup) UnsafePointer() unsafe.Pointer { } // newQSequentialAnimationGroup constructs the type using only CGO pointers. -func newQSequentialAnimationGroup(h *C.QSequentialAnimationGroup, h_QAnimationGroup *C.QAnimationGroup, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QSequentialAnimationGroup { +func newQSequentialAnimationGroup(h *C.QSequentialAnimationGroup) *QSequentialAnimationGroup { if h == nil { return nil } + var outptr_QAnimationGroup *C.QAnimationGroup = nil + C.QSequentialAnimationGroup_virtbase(h, &outptr_QAnimationGroup) + return &QSequentialAnimationGroup{h: h, - QAnimationGroup: newQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} + QAnimationGroup: newQAnimationGroup(outptr_QAnimationGroup)} } // UnsafeNewQSequentialAnimationGroup constructs the type using only unsafe pointers. -func UnsafeNewQSequentialAnimationGroup(h unsafe.Pointer, h_QAnimationGroup unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QSequentialAnimationGroup { - if h == nil { - return nil - } - - return &QSequentialAnimationGroup{h: (*C.QSequentialAnimationGroup)(h), - QAnimationGroup: UnsafeNewQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} +func UnsafeNewQSequentialAnimationGroup(h unsafe.Pointer) *QSequentialAnimationGroup { + return newQSequentialAnimationGroup((*C.QSequentialAnimationGroup)(h)) } // NewQSequentialAnimationGroup constructs a new QSequentialAnimationGroup object. func NewQSequentialAnimationGroup() *QSequentialAnimationGroup { - var outptr_QSequentialAnimationGroup *C.QSequentialAnimationGroup = nil - var outptr_QAnimationGroup *C.QAnimationGroup = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QSequentialAnimationGroup_new(&outptr_QSequentialAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQSequentialAnimationGroup(outptr_QSequentialAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret := newQSequentialAnimationGroup(C.QSequentialAnimationGroup_new()) ret.isSubclass = true return ret } // NewQSequentialAnimationGroup2 constructs a new QSequentialAnimationGroup object. func NewQSequentialAnimationGroup2(parent *QObject) *QSequentialAnimationGroup { - var outptr_QSequentialAnimationGroup *C.QSequentialAnimationGroup = nil - var outptr_QAnimationGroup *C.QAnimationGroup = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QSequentialAnimationGroup_new2(parent.cPointer(), &outptr_QSequentialAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQSequentialAnimationGroup(outptr_QSequentialAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret := newQSequentialAnimationGroup(C.QSequentialAnimationGroup_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -108,15 +96,15 @@ func QSequentialAnimationGroup_TrUtf8(s string) string { } func (this *QSequentialAnimationGroup) AddPause(msecs int) *QPauseAnimation { - return newQPauseAnimation(C.QSequentialAnimationGroup_AddPause(this.h, (C.int)(msecs)), nil, nil) + return newQPauseAnimation(C.QSequentialAnimationGroup_AddPause(this.h, (C.int)(msecs))) } func (this *QSequentialAnimationGroup) InsertPause(index int, msecs int) *QPauseAnimation { - return newQPauseAnimation(C.QSequentialAnimationGroup_InsertPause(this.h, (C.int)(index), (C.int)(msecs)), nil, nil) + return newQPauseAnimation(C.QSequentialAnimationGroup_InsertPause(this.h, (C.int)(index), (C.int)(msecs))) } func (this *QSequentialAnimationGroup) CurrentAnimation() *QAbstractAnimation { - return newQAbstractAnimation(C.QSequentialAnimationGroup_CurrentAnimation(this.h), nil) + return newQAbstractAnimation(C.QSequentialAnimationGroup_CurrentAnimation(this.h)) } func (this *QSequentialAnimationGroup) Duration() int { @@ -138,7 +126,7 @@ func miqt_exec_callback_QSequentialAnimationGroup_CurrentAnimationChanged(cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractAnimation(current, nil) + slotval1 := newQAbstractAnimation(current) gofunc(slotval1) } diff --git a/qt/gen_qsequentialanimationgroup.h b/qt/gen_qsequentialanimationgroup.h index 8fe077ca..b21d392a 100644 --- a/qt/gen_qsequentialanimationgroup.h +++ b/qt/gen_qsequentialanimationgroup.h @@ -32,8 +32,9 @@ typedef struct QPauseAnimation QPauseAnimation; typedef struct QSequentialAnimationGroup QSequentialAnimationGroup; #endif -void QSequentialAnimationGroup_new(QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QSequentialAnimationGroup_new2(QObject* parent, QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +QSequentialAnimationGroup* QSequentialAnimationGroup_new(); +QSequentialAnimationGroup* QSequentialAnimationGroup_new2(QObject* parent); +void QSequentialAnimationGroup_virtbase(QSequentialAnimationGroup* src, QAnimationGroup** outptr_QAnimationGroup); QMetaObject* QSequentialAnimationGroup_MetaObject(const QSequentialAnimationGroup* self); void* QSequentialAnimationGroup_Metacast(QSequentialAnimationGroup* self, const char* param1); struct miqt_string QSequentialAnimationGroup_Tr(const char* s); diff --git a/qt/gen_qsessionmanager.cpp b/qt/gen_qsessionmanager.cpp index f56d84e3..674235da 100644 --- a/qt/gen_qsessionmanager.cpp +++ b/qt/gen_qsessionmanager.cpp @@ -9,6 +9,10 @@ #include "gen_qsessionmanager.h" #include "_cgo_export.h" +void QSessionManager_virtbase(QSessionManager* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QSessionManager_MetaObject(const QSessionManager* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/gen_qsessionmanager.go b/qt/gen_qsessionmanager.go index 2020097e..e87ad8fb 100644 --- a/qt/gen_qsessionmanager.go +++ b/qt/gen_qsessionmanager.go @@ -42,22 +42,20 @@ func (this *QSessionManager) UnsafePointer() unsafe.Pointer { } // newQSessionManager constructs the type using only CGO pointers. -func newQSessionManager(h *C.QSessionManager, h_QObject *C.QObject) *QSessionManager { +func newQSessionManager(h *C.QSessionManager) *QSessionManager { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSessionManager_virtbase(h, &outptr_QObject) + return &QSessionManager{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQSessionManager constructs the type using only unsafe pointers. -func UnsafeNewQSessionManager(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSessionManager { - if h == nil { - return nil - } - - return &QSessionManager{h: (*C.QSessionManager)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQSessionManager(h unsafe.Pointer) *QSessionManager { + return newQSessionManager((*C.QSessionManager)(h)) } func (this *QSessionManager) MetaObject() *QMetaObject { diff --git a/qt/gen_qsessionmanager.h b/qt/gen_qsessionmanager.h index 4e600bf3..37cbf514 100644 --- a/qt/gen_qsessionmanager.h +++ b/qt/gen_qsessionmanager.h @@ -24,6 +24,7 @@ typedef struct QObject QObject; typedef struct QSessionManager QSessionManager; #endif +void QSessionManager_virtbase(QSessionManager* src, QObject** outptr_QObject); QMetaObject* QSessionManager_MetaObject(const QSessionManager* self); void* QSessionManager_Metacast(QSessionManager* self, const char* param1); struct miqt_string QSessionManager_Tr(const char* s); diff --git a/qt/gen_qsettings.cpp b/qt/gen_qsettings.cpp index 022e9c17..e2e35622 100644 --- a/qt/gen_qsettings.cpp +++ b/qt/gen_qsettings.cpp @@ -209,111 +209,85 @@ public: }; -void QSettings_new(struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new(struct miqt_string organization) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(organization_QString); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(organization_QString); } -void QSettings_new2(int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new2(int scope, struct miqt_string organization) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), organization_QString); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(static_cast(scope), organization_QString); } -void QSettings_new3(int format, int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new3(int format, int scope, struct miqt_string organization) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString); } -void QSettings_new4(struct miqt_string fileName, int format, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new4(struct miqt_string fileName, int format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(fileName_QString, static_cast(format)); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(fileName_QString, static_cast(format)); } -void QSettings_new5(QSettings** outptr_QSettings, QObject** outptr_QObject) { - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); +QSettings* QSettings_new5() { + return new MiqtVirtualQSettings(); } -void QSettings_new6(int scope, QSettings** outptr_QSettings, QObject** outptr_QObject) { - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope)); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); +QSettings* QSettings_new6(int scope) { + return new MiqtVirtualQSettings(static_cast(scope)); } -void QSettings_new7(struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new7(struct miqt_string organization, struct miqt_string application) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(organization_QString, application_QString); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(organization_QString, application_QString); } -void QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(organization_QString, application_QString, parent); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(organization_QString, application_QString, parent); } -void QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), organization_QString, application_QString); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(static_cast(scope), organization_QString, application_QString); } -void QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), organization_QString, application_QString, parent); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(static_cast(scope), organization_QString, application_QString, parent); } -void QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString, application_QString); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString, application_QString); } -void QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString, application_QString, parent); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString, application_QString, parent); } -void QSettings_new13(struct miqt_string fileName, int format, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new13(struct miqt_string fileName, int format, QObject* parent) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(fileName_QString, static_cast(format), parent); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(fileName_QString, static_cast(format), parent); } -void QSettings_new14(QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(parent); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); +QSettings* QSettings_new14(QObject* parent) { + return new MiqtVirtualQSettings(parent); } -void QSettings_new15(int scope, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), parent); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); +QSettings* QSettings_new15(int scope, QObject* parent) { + return new MiqtVirtualQSettings(static_cast(scope), parent); +} + +void QSettings_virtbase(QSettings* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSettings_MetaObject(const QSettings* self) { diff --git a/qt/gen_qsettings.go b/qt/gen_qsettings.go index 3de3b608..b5746b20 100644 --- a/qt/gen_qsettings.go +++ b/qt/gen_qsettings.go @@ -74,22 +74,20 @@ func (this *QSettings) UnsafePointer() unsafe.Pointer { } // newQSettings constructs the type using only CGO pointers. -func newQSettings(h *C.QSettings, h_QObject *C.QObject) *QSettings { +func newQSettings(h *C.QSettings) *QSettings { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSettings_virtbase(h, &outptr_QObject) + return &QSettings{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQSettings constructs the type using only unsafe pointers. -func UnsafeNewQSettings(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSettings { - if h == nil { - return nil - } - - return &QSettings{h: (*C.QSettings)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQSettings(h unsafe.Pointer) *QSettings { + return newQSettings((*C.QSettings)(h)) } // NewQSettings constructs a new QSettings object. @@ -98,11 +96,8 @@ func NewQSettings(organization string) *QSettings { organization_ms.data = C.CString(organization) organization_ms.len = C.size_t(len(organization)) defer C.free(unsafe.Pointer(organization_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new(organization_ms, &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new(organization_ms)) ret.isSubclass = true return ret } @@ -113,11 +108,8 @@ func NewQSettings2(scope QSettings__Scope, organization string) *QSettings { organization_ms.data = C.CString(organization) organization_ms.len = C.size_t(len(organization)) defer C.free(unsafe.Pointer(organization_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new2((C.int)(scope), organization_ms, &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new2((C.int)(scope), organization_ms)) ret.isSubclass = true return ret } @@ -128,11 +120,8 @@ func NewQSettings3(format QSettings__Format, scope QSettings__Scope, organizatio organization_ms.data = C.CString(organization) organization_ms.len = C.size_t(len(organization)) defer C.free(unsafe.Pointer(organization_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new3((C.int)(format), (C.int)(scope), organization_ms, &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new3((C.int)(format), (C.int)(scope), organization_ms)) ret.isSubclass = true return ret } @@ -143,33 +132,24 @@ func NewQSettings4(fileName string, format QSettings__Format) *QSettings { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new4(fileName_ms, (C.int)(format), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new4(fileName_ms, (C.int)(format))) ret.isSubclass = true return ret } // NewQSettings5 constructs a new QSettings object. func NewQSettings5() *QSettings { - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new5(&outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new5()) ret.isSubclass = true return ret } // NewQSettings6 constructs a new QSettings object. func NewQSettings6(scope QSettings__Scope) *QSettings { - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new6((C.int)(scope), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new6((C.int)(scope))) ret.isSubclass = true return ret } @@ -184,11 +164,8 @@ func NewQSettings7(organization string, application string) *QSettings { application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new7(organization_ms, application_ms, &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new7(organization_ms, application_ms)) ret.isSubclass = true return ret } @@ -203,11 +180,8 @@ func NewQSettings8(organization string, application string, parent *QObject) *QS application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new8(organization_ms, application_ms, parent.cPointer(), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new8(organization_ms, application_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -222,11 +196,8 @@ func NewQSettings9(scope QSettings__Scope, organization string, application stri application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new9((C.int)(scope), organization_ms, application_ms, &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new9((C.int)(scope), organization_ms, application_ms)) ret.isSubclass = true return ret } @@ -241,11 +212,8 @@ func NewQSettings10(scope QSettings__Scope, organization string, application str application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new10((C.int)(scope), organization_ms, application_ms, parent.cPointer(), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new10((C.int)(scope), organization_ms, application_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -260,11 +228,8 @@ func NewQSettings11(format QSettings__Format, scope QSettings__Scope, organizati application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new11((C.int)(format), (C.int)(scope), organization_ms, application_ms, &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new11((C.int)(format), (C.int)(scope), organization_ms, application_ms)) ret.isSubclass = true return ret } @@ -279,11 +244,8 @@ func NewQSettings12(format QSettings__Format, scope QSettings__Scope, organizati application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new12((C.int)(format), (C.int)(scope), organization_ms, application_ms, parent.cPointer(), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new12((C.int)(format), (C.int)(scope), organization_ms, application_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -294,33 +256,24 @@ func NewQSettings13(fileName string, format QSettings__Format, parent *QObject) fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new13(fileName_ms, (C.int)(format), parent.cPointer(), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new13(fileName_ms, (C.int)(format), parent.cPointer())) ret.isSubclass = true return ret } // NewQSettings14 constructs a new QSettings object. func NewQSettings14(parent *QObject) *QSettings { - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new14(parent.cPointer(), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new14(parent.cPointer())) ret.isSubclass = true return ret } // NewQSettings15 constructs a new QSettings object. func NewQSettings15(scope QSettings__Scope, parent *QObject) *QSettings { - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new15((C.int)(scope), parent.cPointer(), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new15((C.int)(scope), parent.cPointer())) ret.isSubclass = true return ret } @@ -716,7 +669,7 @@ func miqt_exec_callback_QSettings_TimerEvent(self *C.QSettings, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QSettings{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -742,7 +695,7 @@ func miqt_exec_callback_QSettings_ChildEvent(self *C.QSettings, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QSettings{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qsettings.h b/qt/gen_qsettings.h index c7d6d5c1..99a6957f 100644 --- a/qt/gen_qsettings.h +++ b/qt/gen_qsettings.h @@ -36,21 +36,22 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -void QSettings_new(struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new2(int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new3(int format, int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new4(struct miqt_string fileName, int format, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new5(QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new6(int scope, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new7(struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new13(struct miqt_string fileName, int format, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new14(QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new15(int scope, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); +QSettings* QSettings_new(struct miqt_string organization); +QSettings* QSettings_new2(int scope, struct miqt_string organization); +QSettings* QSettings_new3(int format, int scope, struct miqt_string organization); +QSettings* QSettings_new4(struct miqt_string fileName, int format); +QSettings* QSettings_new5(); +QSettings* QSettings_new6(int scope); +QSettings* QSettings_new7(struct miqt_string organization, struct miqt_string application); +QSettings* QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent); +QSettings* QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application); +QSettings* QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent); +QSettings* QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application); +QSettings* QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent); +QSettings* QSettings_new13(struct miqt_string fileName, int format, QObject* parent); +QSettings* QSettings_new14(QObject* parent); +QSettings* QSettings_new15(int scope, QObject* parent); +void QSettings_virtbase(QSettings* src, QObject** outptr_QObject); QMetaObject* QSettings_MetaObject(const QSettings* self); void* QSettings_Metacast(QSettings* self, const char* param1); struct miqt_string QSettings_Tr(const char* s); diff --git a/qt/gen_qshareddata.cpp b/qt/gen_qshareddata.cpp index 5410375c..a5eb3cc3 100644 --- a/qt/gen_qshareddata.cpp +++ b/qt/gen_qshareddata.cpp @@ -3,14 +3,12 @@ #include "gen_qshareddata.h" #include "_cgo_export.h" -void QSharedData_new(QSharedData** outptr_QSharedData) { - QSharedData* ret = new QSharedData(); - *outptr_QSharedData = ret; +QSharedData* QSharedData_new() { + return new QSharedData(); } -void QSharedData_new2(QSharedData* param1, QSharedData** outptr_QSharedData) { - QSharedData* ret = new QSharedData(*param1); - *outptr_QSharedData = ret; +QSharedData* QSharedData_new2(QSharedData* param1) { + return new QSharedData(*param1); } void QSharedData_Delete(QSharedData* self, bool isSubclass) { diff --git a/qt/gen_qshareddata.go b/qt/gen_qshareddata.go index d324f332..eb6f7687 100644 --- a/qt/gen_qshareddata.go +++ b/qt/gen_qshareddata.go @@ -37,34 +37,27 @@ func newQSharedData(h *C.QSharedData) *QSharedData { if h == nil { return nil } + return &QSharedData{h: h} } // UnsafeNewQSharedData constructs the type using only unsafe pointers. func UnsafeNewQSharedData(h unsafe.Pointer) *QSharedData { - if h == nil { - return nil - } - - return &QSharedData{h: (*C.QSharedData)(h)} + return newQSharedData((*C.QSharedData)(h)) } // NewQSharedData constructs a new QSharedData object. func NewQSharedData() *QSharedData { - var outptr_QSharedData *C.QSharedData = nil - C.QSharedData_new(&outptr_QSharedData) - ret := newQSharedData(outptr_QSharedData) + ret := newQSharedData(C.QSharedData_new()) ret.isSubclass = true return ret } // NewQSharedData2 constructs a new QSharedData object. func NewQSharedData2(param1 *QSharedData) *QSharedData { - var outptr_QSharedData *C.QSharedData = nil - C.QSharedData_new2(param1.cPointer(), &outptr_QSharedData) - ret := newQSharedData(outptr_QSharedData) + ret := newQSharedData(C.QSharedData_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qshareddata.h b/qt/gen_qshareddata.h index 21641baf..145e2ae4 100644 --- a/qt/gen_qshareddata.h +++ b/qt/gen_qshareddata.h @@ -20,8 +20,8 @@ class QSharedData; typedef struct QSharedData QSharedData; #endif -void QSharedData_new(QSharedData** outptr_QSharedData); -void QSharedData_new2(QSharedData* param1, QSharedData** outptr_QSharedData); +QSharedData* QSharedData_new(); +QSharedData* QSharedData_new2(QSharedData* param1); void QSharedData_Delete(QSharedData* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qsharedmemory.cpp b/qt/gen_qsharedmemory.cpp index 1cabbef6..98b63db8 100644 --- a/qt/gen_qsharedmemory.cpp +++ b/qt/gen_qsharedmemory.cpp @@ -195,30 +195,26 @@ public: }; -void QSharedMemory_new(QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { - MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(); - *outptr_QSharedMemory = ret; - *outptr_QObject = static_cast(ret); +QSharedMemory* QSharedMemory_new() { + return new MiqtVirtualQSharedMemory(); } -void QSharedMemory_new2(struct miqt_string key, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { +QSharedMemory* QSharedMemory_new2(struct miqt_string key) { QString key_QString = QString::fromUtf8(key.data, key.len); - MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(key_QString); - *outptr_QSharedMemory = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSharedMemory(key_QString); } -void QSharedMemory_new3(QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { - MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(parent); - *outptr_QSharedMemory = ret; - *outptr_QObject = static_cast(ret); +QSharedMemory* QSharedMemory_new3(QObject* parent) { + return new MiqtVirtualQSharedMemory(parent); } -void QSharedMemory_new4(struct miqt_string key, QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { +QSharedMemory* QSharedMemory_new4(struct miqt_string key, QObject* parent) { QString key_QString = QString::fromUtf8(key.data, key.len); - MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(key_QString, parent); - *outptr_QSharedMemory = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSharedMemory(key_QString, parent); +} + +void QSharedMemory_virtbase(QSharedMemory* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSharedMemory_MetaObject(const QSharedMemory* self) { diff --git a/qt/gen_qsharedmemory.go b/qt/gen_qsharedmemory.go index a8b4c565..00408722 100644 --- a/qt/gen_qsharedmemory.go +++ b/qt/gen_qsharedmemory.go @@ -56,31 +56,26 @@ func (this *QSharedMemory) UnsafePointer() unsafe.Pointer { } // newQSharedMemory constructs the type using only CGO pointers. -func newQSharedMemory(h *C.QSharedMemory, h_QObject *C.QObject) *QSharedMemory { +func newQSharedMemory(h *C.QSharedMemory) *QSharedMemory { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSharedMemory_virtbase(h, &outptr_QObject) + return &QSharedMemory{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQSharedMemory constructs the type using only unsafe pointers. -func UnsafeNewQSharedMemory(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSharedMemory { - if h == nil { - return nil - } - - return &QSharedMemory{h: (*C.QSharedMemory)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQSharedMemory(h unsafe.Pointer) *QSharedMemory { + return newQSharedMemory((*C.QSharedMemory)(h)) } // NewQSharedMemory constructs a new QSharedMemory object. func NewQSharedMemory() *QSharedMemory { - var outptr_QSharedMemory *C.QSharedMemory = nil - var outptr_QObject *C.QObject = nil - C.QSharedMemory_new(&outptr_QSharedMemory, &outptr_QObject) - ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret := newQSharedMemory(C.QSharedMemory_new()) ret.isSubclass = true return ret } @@ -91,22 +86,16 @@ func NewQSharedMemory2(key string) *QSharedMemory { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QSharedMemory *C.QSharedMemory = nil - var outptr_QObject *C.QObject = nil - C.QSharedMemory_new2(key_ms, &outptr_QSharedMemory, &outptr_QObject) - ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret := newQSharedMemory(C.QSharedMemory_new2(key_ms)) ret.isSubclass = true return ret } // NewQSharedMemory3 constructs a new QSharedMemory object. func NewQSharedMemory3(parent *QObject) *QSharedMemory { - var outptr_QSharedMemory *C.QSharedMemory = nil - var outptr_QObject *C.QObject = nil - C.QSharedMemory_new3(parent.cPointer(), &outptr_QSharedMemory, &outptr_QObject) - ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret := newQSharedMemory(C.QSharedMemory_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -117,11 +106,8 @@ func NewQSharedMemory4(key string, parent *QObject) *QSharedMemory { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QSharedMemory *C.QSharedMemory = nil - var outptr_QObject *C.QObject = nil - C.QSharedMemory_new4(key_ms, parent.cPointer(), &outptr_QSharedMemory, &outptr_QObject) - ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret := newQSharedMemory(C.QSharedMemory_new4(key_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -365,7 +351,7 @@ func miqt_exec_callback_QSharedMemory_TimerEvent(self *C.QSharedMemory, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QSharedMemory{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -391,7 +377,7 @@ func miqt_exec_callback_QSharedMemory_ChildEvent(self *C.QSharedMemory, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QSharedMemory{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qsharedmemory.h b/qt/gen_qsharedmemory.h index d1c3a9d7..531f7047 100644 --- a/qt/gen_qsharedmemory.h +++ b/qt/gen_qsharedmemory.h @@ -32,10 +32,11 @@ typedef struct QSharedMemory QSharedMemory; typedef struct QTimerEvent QTimerEvent; #endif -void QSharedMemory_new(QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); -void QSharedMemory_new2(struct miqt_string key, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); -void QSharedMemory_new3(QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); -void QSharedMemory_new4(struct miqt_string key, QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); +QSharedMemory* QSharedMemory_new(); +QSharedMemory* QSharedMemory_new2(struct miqt_string key); +QSharedMemory* QSharedMemory_new3(QObject* parent); +QSharedMemory* QSharedMemory_new4(struct miqt_string key, QObject* parent); +void QSharedMemory_virtbase(QSharedMemory* src, QObject** outptr_QObject); QMetaObject* QSharedMemory_MetaObject(const QSharedMemory* self); void* QSharedMemory_Metacast(QSharedMemory* self, const char* param1); struct miqt_string QSharedMemory_Tr(const char* s); diff --git a/qt/gen_qshortcut.cpp b/qt/gen_qshortcut.cpp index 361c075a..d11e8374 100644 --- a/qt/gen_qshortcut.cpp +++ b/qt/gen_qshortcut.cpp @@ -198,34 +198,28 @@ public: }; -void QShortcut_new(QWidget* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { - MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(parent); - *outptr_QShortcut = ret; - *outptr_QObject = static_cast(ret); +QShortcut* QShortcut_new(QWidget* parent) { + return new MiqtVirtualQShortcut(parent); } -void QShortcut_new2(QKeySequence* key, QWidget* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { - MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent); - *outptr_QShortcut = ret; - *outptr_QObject = static_cast(ret); +QShortcut* QShortcut_new2(QKeySequence* key, QWidget* parent) { + return new MiqtVirtualQShortcut(*key, parent); } -void QShortcut_new3(QKeySequence* key, QWidget* parent, const char* member, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { - MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent, member); - *outptr_QShortcut = ret; - *outptr_QObject = static_cast(ret); +QShortcut* QShortcut_new3(QKeySequence* key, QWidget* parent, const char* member) { + return new MiqtVirtualQShortcut(*key, parent, member); } -void QShortcut_new4(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { - MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent, member, ambiguousMember); - *outptr_QShortcut = ret; - *outptr_QObject = static_cast(ret); +QShortcut* QShortcut_new4(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember) { + return new MiqtVirtualQShortcut(*key, parent, member, ambiguousMember); } -void QShortcut_new5(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember, int shortcutContext, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { - MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent, member, ambiguousMember, static_cast(shortcutContext)); - *outptr_QShortcut = ret; - *outptr_QObject = static_cast(ret); +QShortcut* QShortcut_new5(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember, int shortcutContext) { + return new MiqtVirtualQShortcut(*key, parent, member, ambiguousMember, static_cast(shortcutContext)); +} + +void QShortcut_virtbase(QShortcut* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QShortcut_MetaObject(const QShortcut* self) { diff --git a/qt/gen_qshortcut.go b/qt/gen_qshortcut.go index 47b40e1b..aca960f2 100644 --- a/qt/gen_qshortcut.go +++ b/qt/gen_qshortcut.go @@ -35,42 +35,34 @@ func (this *QShortcut) UnsafePointer() unsafe.Pointer { } // newQShortcut constructs the type using only CGO pointers. -func newQShortcut(h *C.QShortcut, h_QObject *C.QObject) *QShortcut { +func newQShortcut(h *C.QShortcut) *QShortcut { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QShortcut_virtbase(h, &outptr_QObject) + return &QShortcut{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQShortcut constructs the type using only unsafe pointers. -func UnsafeNewQShortcut(h unsafe.Pointer, h_QObject unsafe.Pointer) *QShortcut { - if h == nil { - return nil - } - - return &QShortcut{h: (*C.QShortcut)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQShortcut(h unsafe.Pointer) *QShortcut { + return newQShortcut((*C.QShortcut)(h)) } // NewQShortcut constructs a new QShortcut object. func NewQShortcut(parent *QWidget) *QShortcut { - var outptr_QShortcut *C.QShortcut = nil - var outptr_QObject *C.QObject = nil - C.QShortcut_new(parent.cPointer(), &outptr_QShortcut, &outptr_QObject) - ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret := newQShortcut(C.QShortcut_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQShortcut2 constructs a new QShortcut object. func NewQShortcut2(key *QKeySequence, parent *QWidget) *QShortcut { - var outptr_QShortcut *C.QShortcut = nil - var outptr_QObject *C.QObject = nil - C.QShortcut_new2(key.cPointer(), parent.cPointer(), &outptr_QShortcut, &outptr_QObject) - ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret := newQShortcut(C.QShortcut_new2(key.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -79,11 +71,8 @@ func NewQShortcut2(key *QKeySequence, parent *QWidget) *QShortcut { func NewQShortcut3(key *QKeySequence, parent *QWidget, member string) *QShortcut { member_Cstring := C.CString(member) defer C.free(unsafe.Pointer(member_Cstring)) - var outptr_QShortcut *C.QShortcut = nil - var outptr_QObject *C.QObject = nil - C.QShortcut_new3(key.cPointer(), parent.cPointer(), member_Cstring, &outptr_QShortcut, &outptr_QObject) - ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret := newQShortcut(C.QShortcut_new3(key.cPointer(), parent.cPointer(), member_Cstring)) ret.isSubclass = true return ret } @@ -94,11 +83,8 @@ func NewQShortcut4(key *QKeySequence, parent *QWidget, member string, ambiguousM defer C.free(unsafe.Pointer(member_Cstring)) ambiguousMember_Cstring := C.CString(ambiguousMember) defer C.free(unsafe.Pointer(ambiguousMember_Cstring)) - var outptr_QShortcut *C.QShortcut = nil - var outptr_QObject *C.QObject = nil - C.QShortcut_new4(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, &outptr_QShortcut, &outptr_QObject) - ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret := newQShortcut(C.QShortcut_new4(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring)) ret.isSubclass = true return ret } @@ -109,11 +95,8 @@ func NewQShortcut5(key *QKeySequence, parent *QWidget, member string, ambiguousM defer C.free(unsafe.Pointer(member_Cstring)) ambiguousMember_Cstring := C.CString(ambiguousMember) defer C.free(unsafe.Pointer(ambiguousMember_Cstring)) - var outptr_QShortcut *C.QShortcut = nil - var outptr_QObject *C.QObject = nil - C.QShortcut_new5(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, (C.int)(shortcutContext), &outptr_QShortcut, &outptr_QObject) - ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret := newQShortcut(C.QShortcut_new5(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, (C.int)(shortcutContext))) ret.isSubclass = true return ret } @@ -200,7 +183,7 @@ func (this *QShortcut) Id() int { } func (this *QShortcut) ParentWidget() *QWidget { - return newQWidget(C.QShortcut_ParentWidget(this.h), nil, nil) + return newQWidget(C.QShortcut_ParentWidget(this.h)) } func (this *QShortcut) Activated() { @@ -359,7 +342,7 @@ func miqt_exec_callback_QShortcut_TimerEvent(self *C.QShortcut, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QShortcut{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -385,7 +368,7 @@ func miqt_exec_callback_QShortcut_ChildEvent(self *C.QShortcut, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QShortcut{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qshortcut.h b/qt/gen_qshortcut.h index 402d2760..ab100cbe 100644 --- a/qt/gen_qshortcut.h +++ b/qt/gen_qshortcut.h @@ -36,11 +36,12 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QShortcut_new(QWidget* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject); -void QShortcut_new2(QKeySequence* key, QWidget* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject); -void QShortcut_new3(QKeySequence* key, QWidget* parent, const char* member, QShortcut** outptr_QShortcut, QObject** outptr_QObject); -void QShortcut_new4(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember, QShortcut** outptr_QShortcut, QObject** outptr_QObject); -void QShortcut_new5(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember, int shortcutContext, QShortcut** outptr_QShortcut, QObject** outptr_QObject); +QShortcut* QShortcut_new(QWidget* parent); +QShortcut* QShortcut_new2(QKeySequence* key, QWidget* parent); +QShortcut* QShortcut_new3(QKeySequence* key, QWidget* parent, const char* member); +QShortcut* QShortcut_new4(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember); +QShortcut* QShortcut_new5(QKeySequence* key, QWidget* parent, const char* member, const char* ambiguousMember, int shortcutContext); +void QShortcut_virtbase(QShortcut* src, QObject** outptr_QObject); QMetaObject* QShortcut_MetaObject(const QShortcut* self); void* QShortcut_Metacast(QShortcut* self, const char* param1); struct miqt_string QShortcut_Tr(const char* s); diff --git a/qt/gen_qsignalmapper.cpp b/qt/gen_qsignalmapper.cpp index 5aa87822..70500ff1 100644 --- a/qt/gen_qsignalmapper.cpp +++ b/qt/gen_qsignalmapper.cpp @@ -194,16 +194,16 @@ public: }; -void QSignalMapper_new(QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject) { - MiqtVirtualQSignalMapper* ret = new MiqtVirtualQSignalMapper(); - *outptr_QSignalMapper = ret; - *outptr_QObject = static_cast(ret); +QSignalMapper* QSignalMapper_new() { + return new MiqtVirtualQSignalMapper(); } -void QSignalMapper_new2(QObject* parent, QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject) { - MiqtVirtualQSignalMapper* ret = new MiqtVirtualQSignalMapper(parent); - *outptr_QSignalMapper = ret; - *outptr_QObject = static_cast(ret); +QSignalMapper* QSignalMapper_new2(QObject* parent) { + return new MiqtVirtualQSignalMapper(parent); +} + +void QSignalMapper_virtbase(QSignalMapper* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSignalMapper_MetaObject(const QSignalMapper* self) { diff --git a/qt/gen_qsignalmapper.go b/qt/gen_qsignalmapper.go index 1a1f07a6..8a949706 100644 --- a/qt/gen_qsignalmapper.go +++ b/qt/gen_qsignalmapper.go @@ -35,42 +35,34 @@ func (this *QSignalMapper) UnsafePointer() unsafe.Pointer { } // newQSignalMapper constructs the type using only CGO pointers. -func newQSignalMapper(h *C.QSignalMapper, h_QObject *C.QObject) *QSignalMapper { +func newQSignalMapper(h *C.QSignalMapper) *QSignalMapper { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSignalMapper_virtbase(h, &outptr_QObject) + return &QSignalMapper{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQSignalMapper constructs the type using only unsafe pointers. -func UnsafeNewQSignalMapper(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSignalMapper { - if h == nil { - return nil - } - - return &QSignalMapper{h: (*C.QSignalMapper)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQSignalMapper(h unsafe.Pointer) *QSignalMapper { + return newQSignalMapper((*C.QSignalMapper)(h)) } // NewQSignalMapper constructs a new QSignalMapper object. func NewQSignalMapper() *QSignalMapper { - var outptr_QSignalMapper *C.QSignalMapper = nil - var outptr_QObject *C.QObject = nil - C.QSignalMapper_new(&outptr_QSignalMapper, &outptr_QObject) - ret := newQSignalMapper(outptr_QSignalMapper, outptr_QObject) + ret := newQSignalMapper(C.QSignalMapper_new()) ret.isSubclass = true return ret } // NewQSignalMapper2 constructs a new QSignalMapper object. func NewQSignalMapper2(parent *QObject) *QSignalMapper { - var outptr_QSignalMapper *C.QSignalMapper = nil - var outptr_QObject *C.QObject = nil - C.QSignalMapper_new2(parent.cPointer(), &outptr_QSignalMapper, &outptr_QObject) - ret := newQSignalMapper(outptr_QSignalMapper, outptr_QObject) + ret := newQSignalMapper(C.QSignalMapper_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -209,7 +201,7 @@ func miqt_exec_callback_QSignalMapper_MappedWithQWidget(cb C.intptr_t, param1 *C } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(param1, nil, nil) + slotval1 := newQWidget(param1) gofunc(slotval1) } @@ -296,7 +288,7 @@ func miqt_exec_callback_QSignalMapper_MappedWidget(cb C.intptr_t, param1 *C.QWid } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(param1, nil, nil) + slotval1 := newQWidget(param1) gofunc(slotval1) } @@ -451,7 +443,7 @@ func miqt_exec_callback_QSignalMapper_TimerEvent(self *C.QSignalMapper, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QSignalMapper{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -477,7 +469,7 @@ func miqt_exec_callback_QSignalMapper_ChildEvent(self *C.QSignalMapper, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QSignalMapper{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qsignalmapper.h b/qt/gen_qsignalmapper.h index 8f5761b7..b9fb4412 100644 --- a/qt/gen_qsignalmapper.h +++ b/qt/gen_qsignalmapper.h @@ -34,8 +34,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QSignalMapper_new(QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject); -void QSignalMapper_new2(QObject* parent, QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject); +QSignalMapper* QSignalMapper_new(); +QSignalMapper* QSignalMapper_new2(QObject* parent); +void QSignalMapper_virtbase(QSignalMapper* src, QObject** outptr_QObject); QMetaObject* QSignalMapper_MetaObject(const QSignalMapper* self); void* QSignalMapper_Metacast(QSignalMapper* self, const char* param1); struct miqt_string QSignalMapper_Tr(const char* s); diff --git a/qt/gen_qsignaltransition.cpp b/qt/gen_qsignaltransition.cpp index 274b34f5..55c47f8e 100644 --- a/qt/gen_qsignaltransition.cpp +++ b/qt/gen_qsignaltransition.cpp @@ -94,32 +94,24 @@ public: }; -void QSignalTransition_new(QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQSignalTransition* ret = new MiqtVirtualQSignalTransition(); - *outptr_QSignalTransition = ret; - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSignalTransition* QSignalTransition_new() { + return new MiqtVirtualQSignalTransition(); } -void QSignalTransition_new2(QObject* sender, const char* signal, QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQSignalTransition* ret = new MiqtVirtualQSignalTransition(sender, signal); - *outptr_QSignalTransition = ret; - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSignalTransition* QSignalTransition_new2(QObject* sender, const char* signal) { + return new MiqtVirtualQSignalTransition(sender, signal); } -void QSignalTransition_new3(QState* sourceState, QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQSignalTransition* ret = new MiqtVirtualQSignalTransition(sourceState); - *outptr_QSignalTransition = ret; - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSignalTransition* QSignalTransition_new3(QState* sourceState) { + return new MiqtVirtualQSignalTransition(sourceState); } -void QSignalTransition_new4(QObject* sender, const char* signal, QState* sourceState, QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject) { - MiqtVirtualQSignalTransition* ret = new MiqtVirtualQSignalTransition(sender, signal, sourceState); - *outptr_QSignalTransition = ret; - *outptr_QAbstractTransition = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSignalTransition* QSignalTransition_new4(QObject* sender, const char* signal, QState* sourceState) { + return new MiqtVirtualQSignalTransition(sender, signal, sourceState); +} + +void QSignalTransition_virtbase(QSignalTransition* src, QAbstractTransition** outptr_QAbstractTransition) { + *outptr_QAbstractTransition = static_cast(src); } QMetaObject* QSignalTransition_MetaObject(const QSignalTransition* self) { diff --git a/qt/gen_qsignaltransition.go b/qt/gen_qsignaltransition.go index 2cc1018e..5ca4e411 100644 --- a/qt/gen_qsignaltransition.go +++ b/qt/gen_qsignaltransition.go @@ -35,32 +35,26 @@ func (this *QSignalTransition) UnsafePointer() unsafe.Pointer { } // newQSignalTransition constructs the type using only CGO pointers. -func newQSignalTransition(h *C.QSignalTransition, h_QAbstractTransition *C.QAbstractTransition, h_QObject *C.QObject) *QSignalTransition { +func newQSignalTransition(h *C.QSignalTransition) *QSignalTransition { if h == nil { return nil } + var outptr_QAbstractTransition *C.QAbstractTransition = nil + C.QSignalTransition_virtbase(h, &outptr_QAbstractTransition) + return &QSignalTransition{h: h, - QAbstractTransition: newQAbstractTransition(h_QAbstractTransition, h_QObject)} + QAbstractTransition: newQAbstractTransition(outptr_QAbstractTransition)} } // UnsafeNewQSignalTransition constructs the type using only unsafe pointers. -func UnsafeNewQSignalTransition(h unsafe.Pointer, h_QAbstractTransition unsafe.Pointer, h_QObject unsafe.Pointer) *QSignalTransition { - if h == nil { - return nil - } - - return &QSignalTransition{h: (*C.QSignalTransition)(h), - QAbstractTransition: UnsafeNewQAbstractTransition(h_QAbstractTransition, h_QObject)} +func UnsafeNewQSignalTransition(h unsafe.Pointer) *QSignalTransition { + return newQSignalTransition((*C.QSignalTransition)(h)) } // NewQSignalTransition constructs a new QSignalTransition object. func NewQSignalTransition() *QSignalTransition { - var outptr_QSignalTransition *C.QSignalTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QSignalTransition_new(&outptr_QSignalTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQSignalTransition(outptr_QSignalTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQSignalTransition(C.QSignalTransition_new()) ret.isSubclass = true return ret } @@ -69,24 +63,16 @@ func NewQSignalTransition() *QSignalTransition { func NewQSignalTransition2(sender *QObject, signal string) *QSignalTransition { signal_Cstring := C.CString(signal) defer C.free(unsafe.Pointer(signal_Cstring)) - var outptr_QSignalTransition *C.QSignalTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QSignalTransition_new2(sender.cPointer(), signal_Cstring, &outptr_QSignalTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQSignalTransition(outptr_QSignalTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQSignalTransition(C.QSignalTransition_new2(sender.cPointer(), signal_Cstring)) ret.isSubclass = true return ret } // NewQSignalTransition3 constructs a new QSignalTransition object. func NewQSignalTransition3(sourceState *QState) *QSignalTransition { - var outptr_QSignalTransition *C.QSignalTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QSignalTransition_new3(sourceState.cPointer(), &outptr_QSignalTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQSignalTransition(outptr_QSignalTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQSignalTransition(C.QSignalTransition_new3(sourceState.cPointer())) ret.isSubclass = true return ret } @@ -95,12 +81,8 @@ func NewQSignalTransition3(sourceState *QState) *QSignalTransition { func NewQSignalTransition4(sender *QObject, signal string, sourceState *QState) *QSignalTransition { signal_Cstring := C.CString(signal) defer C.free(unsafe.Pointer(signal_Cstring)) - var outptr_QSignalTransition *C.QSignalTransition = nil - var outptr_QAbstractTransition *C.QAbstractTransition = nil - var outptr_QObject *C.QObject = nil - C.QSignalTransition_new4(sender.cPointer(), signal_Cstring, sourceState.cPointer(), &outptr_QSignalTransition, &outptr_QAbstractTransition, &outptr_QObject) - ret := newQSignalTransition(outptr_QSignalTransition, outptr_QAbstractTransition, outptr_QObject) + ret := newQSignalTransition(C.QSignalTransition_new4(sender.cPointer(), signal_Cstring, sourceState.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qsignaltransition.h b/qt/gen_qsignaltransition.h index bdfea215..28c68675 100644 --- a/qt/gen_qsignaltransition.h +++ b/qt/gen_qsignaltransition.h @@ -30,10 +30,11 @@ typedef struct QSignalTransition QSignalTransition; typedef struct QState QState; #endif -void QSignalTransition_new(QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); -void QSignalTransition_new2(QObject* sender, const char* signal, QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); -void QSignalTransition_new3(QState* sourceState, QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); -void QSignalTransition_new4(QObject* sender, const char* signal, QState* sourceState, QSignalTransition** outptr_QSignalTransition, QAbstractTransition** outptr_QAbstractTransition, QObject** outptr_QObject); +QSignalTransition* QSignalTransition_new(); +QSignalTransition* QSignalTransition_new2(QObject* sender, const char* signal); +QSignalTransition* QSignalTransition_new3(QState* sourceState); +QSignalTransition* QSignalTransition_new4(QObject* sender, const char* signal, QState* sourceState); +void QSignalTransition_virtbase(QSignalTransition* src, QAbstractTransition** outptr_QAbstractTransition); QMetaObject* QSignalTransition_MetaObject(const QSignalTransition* self); void* QSignalTransition_Metacast(QSignalTransition* self, const char* param1); struct miqt_string QSignalTransition_Tr(const char* s); diff --git a/qt/gen_qsize.cpp b/qt/gen_qsize.cpp index bbfae404..cea6e575 100644 --- a/qt/gen_qsize.cpp +++ b/qt/gen_qsize.cpp @@ -6,19 +6,16 @@ #include "gen_qsize.h" #include "_cgo_export.h" -void QSize_new(QSize** outptr_QSize) { - QSize* ret = new QSize(); - *outptr_QSize = ret; +QSize* QSize_new() { + return new QSize(); } -void QSize_new2(int w, int h, QSize** outptr_QSize) { - QSize* ret = new QSize(static_cast(w), static_cast(h)); - *outptr_QSize = ret; +QSize* QSize_new2(int w, int h) { + return new QSize(static_cast(w), static_cast(h)); } -void QSize_new3(QSize* param1, QSize** outptr_QSize) { - QSize* ret = new QSize(*param1); - *outptr_QSize = ret; +QSize* QSize_new3(QSize* param1) { + return new QSize(*param1); } bool QSize_IsNull(const QSize* self) { @@ -121,24 +118,20 @@ void QSize_Delete(QSize* self, bool isSubclass) { } } -void QSizeF_new(QSizeF** outptr_QSizeF) { - QSizeF* ret = new QSizeF(); - *outptr_QSizeF = ret; +QSizeF* QSizeF_new() { + return new QSizeF(); } -void QSizeF_new2(QSize* sz, QSizeF** outptr_QSizeF) { - QSizeF* ret = new QSizeF(*sz); - *outptr_QSizeF = ret; +QSizeF* QSizeF_new2(QSize* sz) { + return new QSizeF(*sz); } -void QSizeF_new3(double w, double h, QSizeF** outptr_QSizeF) { - QSizeF* ret = new QSizeF(static_cast(w), static_cast(h)); - *outptr_QSizeF = ret; +QSizeF* QSizeF_new3(double w, double h) { + return new QSizeF(static_cast(w), static_cast(h)); } -void QSizeF_new4(QSizeF* param1, QSizeF** outptr_QSizeF) { - QSizeF* ret = new QSizeF(*param1); - *outptr_QSizeF = ret; +QSizeF* QSizeF_new4(QSizeF* param1) { + return new QSizeF(*param1); } bool QSizeF_IsNull(const QSizeF* self) { diff --git a/qt/gen_qsize.go b/qt/gen_qsize.go index f760fc79..4edb82a4 100644 --- a/qt/gen_qsize.go +++ b/qt/gen_qsize.go @@ -37,44 +37,35 @@ func newQSize(h *C.QSize) *QSize { if h == nil { return nil } + return &QSize{h: h} } // UnsafeNewQSize constructs the type using only unsafe pointers. func UnsafeNewQSize(h unsafe.Pointer) *QSize { - if h == nil { - return nil - } - - return &QSize{h: (*C.QSize)(h)} + return newQSize((*C.QSize)(h)) } // NewQSize constructs a new QSize object. func NewQSize() *QSize { - var outptr_QSize *C.QSize = nil - C.QSize_new(&outptr_QSize) - ret := newQSize(outptr_QSize) + ret := newQSize(C.QSize_new()) ret.isSubclass = true return ret } // NewQSize2 constructs a new QSize object. func NewQSize2(w int, h int) *QSize { - var outptr_QSize *C.QSize = nil - C.QSize_new2((C.int)(w), (C.int)(h), &outptr_QSize) - ret := newQSize(outptr_QSize) + ret := newQSize(C.QSize_new2((C.int)(w), (C.int)(h))) ret.isSubclass = true return ret } // NewQSize3 constructs a new QSize object. func NewQSize3(param1 *QSize) *QSize { - var outptr_QSize *C.QSize = nil - C.QSize_new3(param1.cPointer(), &outptr_QSize) - ret := newQSize(outptr_QSize) + ret := newQSize(C.QSize_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -215,54 +206,43 @@ func newQSizeF(h *C.QSizeF) *QSizeF { if h == nil { return nil } + return &QSizeF{h: h} } // UnsafeNewQSizeF constructs the type using only unsafe pointers. func UnsafeNewQSizeF(h unsafe.Pointer) *QSizeF { - if h == nil { - return nil - } - - return &QSizeF{h: (*C.QSizeF)(h)} + return newQSizeF((*C.QSizeF)(h)) } // NewQSizeF constructs a new QSizeF object. func NewQSizeF() *QSizeF { - var outptr_QSizeF *C.QSizeF = nil - C.QSizeF_new(&outptr_QSizeF) - ret := newQSizeF(outptr_QSizeF) + ret := newQSizeF(C.QSizeF_new()) ret.isSubclass = true return ret } // NewQSizeF2 constructs a new QSizeF object. func NewQSizeF2(sz *QSize) *QSizeF { - var outptr_QSizeF *C.QSizeF = nil - C.QSizeF_new2(sz.cPointer(), &outptr_QSizeF) - ret := newQSizeF(outptr_QSizeF) + ret := newQSizeF(C.QSizeF_new2(sz.cPointer())) ret.isSubclass = true return ret } // NewQSizeF3 constructs a new QSizeF object. func NewQSizeF3(w float64, h float64) *QSizeF { - var outptr_QSizeF *C.QSizeF = nil - C.QSizeF_new3((C.double)(w), (C.double)(h), &outptr_QSizeF) - ret := newQSizeF(outptr_QSizeF) + ret := newQSizeF(C.QSizeF_new3((C.double)(w), (C.double)(h))) ret.isSubclass = true return ret } // NewQSizeF4 constructs a new QSizeF object. func NewQSizeF4(param1 *QSizeF) *QSizeF { - var outptr_QSizeF *C.QSizeF = nil - C.QSizeF_new4(param1.cPointer(), &outptr_QSizeF) - ret := newQSizeF(outptr_QSizeF) + ret := newQSizeF(C.QSizeF_new4(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qsize.h b/qt/gen_qsize.h index 19d1ae4b..4dcc3363 100644 --- a/qt/gen_qsize.h +++ b/qt/gen_qsize.h @@ -26,9 +26,9 @@ typedef struct QSize QSize; typedef struct QSizeF QSizeF; #endif -void QSize_new(QSize** outptr_QSize); -void QSize_new2(int w, int h, QSize** outptr_QSize); -void QSize_new3(QSize* param1, QSize** outptr_QSize); +QSize* QSize_new(); +QSize* QSize_new2(int w, int h); +QSize* QSize_new3(QSize* param1); bool QSize_IsNull(const QSize* self); bool QSize_IsEmpty(const QSize* self); bool QSize_IsValid(const QSize* self); @@ -52,10 +52,10 @@ QSize* QSize_OperatorMultiplyAssign(QSize* self, double c); QSize* QSize_OperatorDivideAssign(QSize* self, double c); void QSize_Delete(QSize* self, bool isSubclass); -void QSizeF_new(QSizeF** outptr_QSizeF); -void QSizeF_new2(QSize* sz, QSizeF** outptr_QSizeF); -void QSizeF_new3(double w, double h, QSizeF** outptr_QSizeF); -void QSizeF_new4(QSizeF* param1, QSizeF** outptr_QSizeF); +QSizeF* QSizeF_new(); +QSizeF* QSizeF_new2(QSize* sz); +QSizeF* QSizeF_new3(double w, double h); +QSizeF* QSizeF_new4(QSizeF* param1); bool QSizeF_IsNull(const QSizeF* self); bool QSizeF_IsEmpty(const QSizeF* self); bool QSizeF_IsValid(const QSizeF* self); diff --git a/qt/gen_qsizegrip.cpp b/qt/gen_qsizegrip.cpp index e059857e..22f0c2d8 100644 --- a/qt/gen_qsizegrip.cpp +++ b/qt/gen_qsizegrip.cpp @@ -1043,12 +1043,12 @@ public: }; -void QSizeGrip_new(QWidget* parent, QSizeGrip** outptr_QSizeGrip, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSizeGrip* ret = new MiqtVirtualQSizeGrip(parent); - *outptr_QSizeGrip = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSizeGrip* QSizeGrip_new(QWidget* parent) { + return new MiqtVirtualQSizeGrip(parent); +} + +void QSizeGrip_virtbase(QSizeGrip* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QSizeGrip_MetaObject(const QSizeGrip* self) { diff --git a/qt/gen_qsizegrip.go b/qt/gen_qsizegrip.go index c25a30dc..54b8fed4 100644 --- a/qt/gen_qsizegrip.go +++ b/qt/gen_qsizegrip.go @@ -35,33 +35,26 @@ func (this *QSizeGrip) UnsafePointer() unsafe.Pointer { } // newQSizeGrip constructs the type using only CGO pointers. -func newQSizeGrip(h *C.QSizeGrip, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSizeGrip { +func newQSizeGrip(h *C.QSizeGrip) *QSizeGrip { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QSizeGrip_virtbase(h, &outptr_QWidget) + return &QSizeGrip{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQSizeGrip constructs the type using only unsafe pointers. -func UnsafeNewQSizeGrip(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSizeGrip { - if h == nil { - return nil - } - - return &QSizeGrip{h: (*C.QSizeGrip)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQSizeGrip(h unsafe.Pointer) *QSizeGrip { + return newQSizeGrip((*C.QSizeGrip)(h)) } // NewQSizeGrip constructs a new QSizeGrip object. func NewQSizeGrip(parent *QWidget) *QSizeGrip { - var outptr_QSizeGrip *C.QSizeGrip = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSizeGrip_new(parent.cPointer(), &outptr_QSizeGrip, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSizeGrip(outptr_QSizeGrip, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSizeGrip(C.QSizeGrip_new(parent.cPointer())) ret.isSubclass = true return ret } @@ -221,7 +214,7 @@ func miqt_exec_callback_QSizeGrip_PaintEvent(self *C.QSizeGrip, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QSizeGrip{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -247,7 +240,7 @@ func miqt_exec_callback_QSizeGrip_MousePressEvent(self *C.QSizeGrip, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QSizeGrip{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -273,7 +266,7 @@ func miqt_exec_callback_QSizeGrip_MouseMoveEvent(self *C.QSizeGrip, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QSizeGrip{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -299,7 +292,7 @@ func miqt_exec_callback_QSizeGrip_MouseReleaseEvent(self *C.QSizeGrip, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(mouseEvent, nil, nil) + slotval1 := newQMouseEvent(mouseEvent) gofunc((&QSizeGrip{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -325,7 +318,7 @@ func miqt_exec_callback_QSizeGrip_MoveEvent(self *C.QSizeGrip, cb C.intptr_t, mo } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(moveEvent, nil) + slotval1 := newQMoveEvent(moveEvent) gofunc((&QSizeGrip{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -351,7 +344,7 @@ func miqt_exec_callback_QSizeGrip_ShowEvent(self *C.QSizeGrip, cb C.intptr_t, sh } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(showEvent, nil) + slotval1 := newQShowEvent(showEvent) gofunc((&QSizeGrip{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -377,7 +370,7 @@ func miqt_exec_callback_QSizeGrip_HideEvent(self *C.QSizeGrip, cb C.intptr_t, hi } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(hideEvent, nil) + slotval1 := newQHideEvent(hideEvent) gofunc((&QSizeGrip{h: self}).callVirtualBase_HideEvent, slotval1) @@ -591,7 +584,7 @@ func miqt_exec_callback_QSizeGrip_MouseDoubleClickEvent(self *C.QSizeGrip, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -617,7 +610,7 @@ func miqt_exec_callback_QSizeGrip_WheelEvent(self *C.QSizeGrip, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -643,7 +636,7 @@ func miqt_exec_callback_QSizeGrip_KeyPressEvent(self *C.QSizeGrip, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -669,7 +662,7 @@ func miqt_exec_callback_QSizeGrip_KeyReleaseEvent(self *C.QSizeGrip, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -695,7 +688,7 @@ func miqt_exec_callback_QSizeGrip_FocusInEvent(self *C.QSizeGrip, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -721,7 +714,7 @@ func miqt_exec_callback_QSizeGrip_FocusOutEvent(self *C.QSizeGrip, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -799,7 +792,7 @@ func miqt_exec_callback_QSizeGrip_ResizeEvent(self *C.QSizeGrip, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -825,7 +818,7 @@ func miqt_exec_callback_QSizeGrip_CloseEvent(self *C.QSizeGrip, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -851,7 +844,7 @@ func miqt_exec_callback_QSizeGrip_ContextMenuEvent(self *C.QSizeGrip, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -877,7 +870,7 @@ func miqt_exec_callback_QSizeGrip_TabletEvent(self *C.QSizeGrip, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -903,7 +896,7 @@ func miqt_exec_callback_QSizeGrip_ActionEvent(self *C.QSizeGrip, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -929,7 +922,7 @@ func miqt_exec_callback_QSizeGrip_DragEnterEvent(self *C.QSizeGrip, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -955,7 +948,7 @@ func miqt_exec_callback_QSizeGrip_DragMoveEvent(self *C.QSizeGrip, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -981,7 +974,7 @@ func miqt_exec_callback_QSizeGrip_DragLeaveEvent(self *C.QSizeGrip, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1007,7 +1000,7 @@ func miqt_exec_callback_QSizeGrip_DropEvent(self *C.QSizeGrip, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1203,7 +1196,7 @@ func miqt_exec_callback_QSizeGrip_InputMethodEvent(self *C.QSizeGrip, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QSizeGrip{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qsizegrip.h b/qt/gen_qsizegrip.h index 87694038..f7952f14 100644 --- a/qt/gen_qsizegrip.h +++ b/qt/gen_qsizegrip.h @@ -76,7 +76,8 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QSizeGrip_new(QWidget* parent, QSizeGrip** outptr_QSizeGrip, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QSizeGrip* QSizeGrip_new(QWidget* parent); +void QSizeGrip_virtbase(QSizeGrip* src, QWidget** outptr_QWidget); QMetaObject* QSizeGrip_MetaObject(const QSizeGrip* self); void* QSizeGrip_Metacast(QSizeGrip* self, const char* param1); struct miqt_string QSizeGrip_Tr(const char* s); diff --git a/qt/gen_qsizepolicy.cpp b/qt/gen_qsizepolicy.cpp index 0d11a31c..a5e94620 100644 --- a/qt/gen_qsizepolicy.cpp +++ b/qt/gen_qsizepolicy.cpp @@ -3,24 +3,20 @@ #include "gen_qsizepolicy.h" #include "_cgo_export.h" -void QSizePolicy_new(QSizePolicy** outptr_QSizePolicy) { - QSizePolicy* ret = new QSizePolicy(); - *outptr_QSizePolicy = ret; +QSizePolicy* QSizePolicy_new() { + return new QSizePolicy(); } -void QSizePolicy_new2(int horizontal, int vertical, QSizePolicy** outptr_QSizePolicy) { - QSizePolicy* ret = new QSizePolicy(static_cast(horizontal), static_cast(vertical)); - *outptr_QSizePolicy = ret; +QSizePolicy* QSizePolicy_new2(int horizontal, int vertical) { + return new QSizePolicy(static_cast(horizontal), static_cast(vertical)); } -void QSizePolicy_new3(QSizePolicy* param1, QSizePolicy** outptr_QSizePolicy) { - QSizePolicy* ret = new QSizePolicy(*param1); - *outptr_QSizePolicy = ret; +QSizePolicy* QSizePolicy_new3(QSizePolicy* param1) { + return new QSizePolicy(*param1); } -void QSizePolicy_new4(int horizontal, int vertical, int typeVal, QSizePolicy** outptr_QSizePolicy) { - QSizePolicy* ret = new QSizePolicy(static_cast(horizontal), static_cast(vertical), static_cast(typeVal)); - *outptr_QSizePolicy = ret; +QSizePolicy* QSizePolicy_new4(int horizontal, int vertical, int typeVal) { + return new QSizePolicy(static_cast(horizontal), static_cast(vertical), static_cast(typeVal)); } int QSizePolicy_HorizontalPolicy(const QSizePolicy* self) { diff --git a/qt/gen_qsizepolicy.go b/qt/gen_qsizepolicy.go index 41e8c62b..c144dd18 100644 --- a/qt/gen_qsizepolicy.go +++ b/qt/gen_qsizepolicy.go @@ -78,54 +78,43 @@ func newQSizePolicy(h *C.QSizePolicy) *QSizePolicy { if h == nil { return nil } + return &QSizePolicy{h: h} } // UnsafeNewQSizePolicy constructs the type using only unsafe pointers. func UnsafeNewQSizePolicy(h unsafe.Pointer) *QSizePolicy { - if h == nil { - return nil - } - - return &QSizePolicy{h: (*C.QSizePolicy)(h)} + return newQSizePolicy((*C.QSizePolicy)(h)) } // NewQSizePolicy constructs a new QSizePolicy object. func NewQSizePolicy() *QSizePolicy { - var outptr_QSizePolicy *C.QSizePolicy = nil - C.QSizePolicy_new(&outptr_QSizePolicy) - ret := newQSizePolicy(outptr_QSizePolicy) + ret := newQSizePolicy(C.QSizePolicy_new()) ret.isSubclass = true return ret } // NewQSizePolicy2 constructs a new QSizePolicy object. func NewQSizePolicy2(horizontal QSizePolicy__Policy, vertical QSizePolicy__Policy) *QSizePolicy { - var outptr_QSizePolicy *C.QSizePolicy = nil - C.QSizePolicy_new2((C.int)(horizontal), (C.int)(vertical), &outptr_QSizePolicy) - ret := newQSizePolicy(outptr_QSizePolicy) + ret := newQSizePolicy(C.QSizePolicy_new2((C.int)(horizontal), (C.int)(vertical))) ret.isSubclass = true return ret } // NewQSizePolicy3 constructs a new QSizePolicy object. func NewQSizePolicy3(param1 *QSizePolicy) *QSizePolicy { - var outptr_QSizePolicy *C.QSizePolicy = nil - C.QSizePolicy_new3(param1.cPointer(), &outptr_QSizePolicy) - ret := newQSizePolicy(outptr_QSizePolicy) + ret := newQSizePolicy(C.QSizePolicy_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQSizePolicy4 constructs a new QSizePolicy object. func NewQSizePolicy4(horizontal QSizePolicy__Policy, vertical QSizePolicy__Policy, typeVal QSizePolicy__ControlType) *QSizePolicy { - var outptr_QSizePolicy *C.QSizePolicy = nil - C.QSizePolicy_new4((C.int)(horizontal), (C.int)(vertical), (C.int)(typeVal), &outptr_QSizePolicy) - ret := newQSizePolicy(outptr_QSizePolicy) + ret := newQSizePolicy(C.QSizePolicy_new4((C.int)(horizontal), (C.int)(vertical), (C.int)(typeVal))) ret.isSubclass = true return ret } diff --git a/qt/gen_qsizepolicy.h b/qt/gen_qsizepolicy.h index e19b97f6..eb9c1c0c 100644 --- a/qt/gen_qsizepolicy.h +++ b/qt/gen_qsizepolicy.h @@ -20,10 +20,10 @@ class QSizePolicy; typedef struct QSizePolicy QSizePolicy; #endif -void QSizePolicy_new(QSizePolicy** outptr_QSizePolicy); -void QSizePolicy_new2(int horizontal, int vertical, QSizePolicy** outptr_QSizePolicy); -void QSizePolicy_new3(QSizePolicy* param1, QSizePolicy** outptr_QSizePolicy); -void QSizePolicy_new4(int horizontal, int vertical, int typeVal, QSizePolicy** outptr_QSizePolicy); +QSizePolicy* QSizePolicy_new(); +QSizePolicy* QSizePolicy_new2(int horizontal, int vertical); +QSizePolicy* QSizePolicy_new3(QSizePolicy* param1); +QSizePolicy* QSizePolicy_new4(int horizontal, int vertical, int typeVal); int QSizePolicy_HorizontalPolicy(const QSizePolicy* self); int QSizePolicy_VerticalPolicy(const QSizePolicy* self); int QSizePolicy_ControlType(const QSizePolicy* self); diff --git a/qt/gen_qslider.cpp b/qt/gen_qslider.cpp index 608817dd..11f4ef5b 100644 --- a/qt/gen_qslider.cpp +++ b/qt/gen_qslider.cpp @@ -314,40 +314,24 @@ public: }; -void QSlider_new(QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(parent); - *outptr_QSlider = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSlider* QSlider_new(QWidget* parent) { + return new MiqtVirtualQSlider(parent); } -void QSlider_new2(QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(); - *outptr_QSlider = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSlider* QSlider_new2() { + return new MiqtVirtualQSlider(); } -void QSlider_new3(int orientation, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(static_cast(orientation)); - *outptr_QSlider = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSlider* QSlider_new3(int orientation) { + return new MiqtVirtualQSlider(static_cast(orientation)); } -void QSlider_new4(int orientation, QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(static_cast(orientation), parent); - *outptr_QSlider = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSlider* QSlider_new4(int orientation, QWidget* parent) { + return new MiqtVirtualQSlider(static_cast(orientation), parent); +} + +void QSlider_virtbase(QSlider* src, QAbstractSlider** outptr_QAbstractSlider) { + *outptr_QAbstractSlider = static_cast(src); } QMetaObject* QSlider_MetaObject(const QSlider* self) { diff --git a/qt/gen_qslider.go b/qt/gen_qslider.go index c9118306..c1179d10 100644 --- a/qt/gen_qslider.go +++ b/qt/gen_qslider.go @@ -46,76 +46,50 @@ func (this *QSlider) UnsafePointer() unsafe.Pointer { } // newQSlider constructs the type using only CGO pointers. -func newQSlider(h *C.QSlider, h_QAbstractSlider *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSlider { +func newQSlider(h *C.QSlider) *QSlider { if h == nil { return nil } + var outptr_QAbstractSlider *C.QAbstractSlider = nil + C.QSlider_virtbase(h, &outptr_QAbstractSlider) + return &QSlider{h: h, - QAbstractSlider: newQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractSlider: newQAbstractSlider(outptr_QAbstractSlider)} } // UnsafeNewQSlider constructs the type using only unsafe pointers. -func UnsafeNewQSlider(h unsafe.Pointer, h_QAbstractSlider unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSlider { - if h == nil { - return nil - } - - return &QSlider{h: (*C.QSlider)(h), - QAbstractSlider: UnsafeNewQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQSlider(h unsafe.Pointer) *QSlider { + return newQSlider((*C.QSlider)(h)) } // NewQSlider constructs a new QSlider object. func NewQSlider(parent *QWidget) *QSlider { - var outptr_QSlider *C.QSlider = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSlider_new(parent.cPointer(), &outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSlider(C.QSlider_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQSlider2 constructs a new QSlider object. func NewQSlider2() *QSlider { - var outptr_QSlider *C.QSlider = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSlider_new2(&outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSlider(C.QSlider_new2()) ret.isSubclass = true return ret } // NewQSlider3 constructs a new QSlider object. func NewQSlider3(orientation Orientation) *QSlider { - var outptr_QSlider *C.QSlider = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSlider_new3((C.int)(orientation), &outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSlider(C.QSlider_new3((C.int)(orientation))) ret.isSubclass = true return ret } // NewQSlider4 constructs a new QSlider object. func NewQSlider4(orientation Orientation, parent *QWidget) *QSlider { - var outptr_QSlider *C.QSlider = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSlider_new4((C.int)(orientation), parent.cPointer(), &outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSlider(C.QSlider_new4((C.int)(orientation), parent.cPointer())) ret.isSubclass = true return ret } @@ -326,7 +300,7 @@ func miqt_exec_callback_QSlider_PaintEvent(self *C.QSlider, cb C.intptr_t, ev *C } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(ev, nil) + slotval1 := newQPaintEvent(ev) gofunc((&QSlider{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -352,7 +326,7 @@ func miqt_exec_callback_QSlider_MousePressEvent(self *C.QSlider, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QSlider{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -378,7 +352,7 @@ func miqt_exec_callback_QSlider_MouseReleaseEvent(self *C.QSlider, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QSlider{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -404,7 +378,7 @@ func miqt_exec_callback_QSlider_MouseMoveEvent(self *C.QSlider, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QSlider{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -456,7 +430,7 @@ func miqt_exec_callback_QSlider_KeyPressEvent(self *C.QSlider, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(ev, nil, nil) + slotval1 := newQKeyEvent(ev) gofunc((&QSlider{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -482,7 +456,7 @@ func miqt_exec_callback_QSlider_TimerEvent(self *C.QSlider, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QSlider{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -508,7 +482,7 @@ func miqt_exec_callback_QSlider_WheelEvent(self *C.QSlider, cb C.intptr_t, e *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QSlider{h: self}).callVirtualBase_WheelEvent, slotval1) diff --git a/qt/gen_qslider.h b/qt/gen_qslider.h index 665ae644..b6808255 100644 --- a/qt/gen_qslider.h +++ b/qt/gen_qslider.h @@ -44,10 +44,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QSlider_new(QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSlider_new2(QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSlider_new3(int orientation, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSlider_new4(int orientation, QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QSlider* QSlider_new(QWidget* parent); +QSlider* QSlider_new2(); +QSlider* QSlider_new3(int orientation); +QSlider* QSlider_new4(int orientation, QWidget* parent); +void QSlider_virtbase(QSlider* src, QAbstractSlider** outptr_QAbstractSlider); QMetaObject* QSlider_MetaObject(const QSlider* self); void* QSlider_Metacast(QSlider* self, const char* param1); struct miqt_string QSlider_Tr(const char* s); diff --git a/qt/gen_qsocketnotifier.cpp b/qt/gen_qsocketnotifier.cpp index 7d97a3f3..134d0bef 100644 --- a/qt/gen_qsocketnotifier.cpp +++ b/qt/gen_qsocketnotifier.cpp @@ -194,16 +194,16 @@ public: }; -void QSocketNotifier_new(intptr_t socket, int param2, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject) { - MiqtVirtualQSocketNotifier* ret = new MiqtVirtualQSocketNotifier((qintptr)(socket), static_cast(param2)); - *outptr_QSocketNotifier = ret; - *outptr_QObject = static_cast(ret); +QSocketNotifier* QSocketNotifier_new(intptr_t socket, int param2) { + return new MiqtVirtualQSocketNotifier((qintptr)(socket), static_cast(param2)); } -void QSocketNotifier_new2(intptr_t socket, int param2, QObject* parent, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject) { - MiqtVirtualQSocketNotifier* ret = new MiqtVirtualQSocketNotifier((qintptr)(socket), static_cast(param2), parent); - *outptr_QSocketNotifier = ret; - *outptr_QObject = static_cast(ret); +QSocketNotifier* QSocketNotifier_new2(intptr_t socket, int param2, QObject* parent) { + return new MiqtVirtualQSocketNotifier((qintptr)(socket), static_cast(param2), parent); +} + +void QSocketNotifier_virtbase(QSocketNotifier* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSocketNotifier_MetaObject(const QSocketNotifier* self) { @@ -362,22 +362,19 @@ void QSocketNotifier_Delete(QSocketNotifier* self, bool isSubclass) { } } -void QSocketDescriptor_new(QSocketDescriptor** outptr_QSocketDescriptor) { - QSocketDescriptor* ret = new QSocketDescriptor(); - *outptr_QSocketDescriptor = ret; +QSocketDescriptor* QSocketDescriptor_new() { + return new QSocketDescriptor(); } -void QSocketDescriptor_new2(QSocketDescriptor* param1, QSocketDescriptor** outptr_QSocketDescriptor) { - QSocketDescriptor* ret = new QSocketDescriptor(*param1); - *outptr_QSocketDescriptor = ret; +QSocketDescriptor* QSocketDescriptor_new2(QSocketDescriptor* param1) { + return new QSocketDescriptor(*param1); } -void QSocketDescriptor_new3(int descriptor, QSocketDescriptor** outptr_QSocketDescriptor) { +QSocketDescriptor* QSocketDescriptor_new3(int descriptor) { #ifndef Q_OS_LINUX - return; + return nullptr; #else - QSocketDescriptor* ret = new QSocketDescriptor(static_cast(descriptor)); - *outptr_QSocketDescriptor = ret; + return new QSocketDescriptor(static_cast(descriptor)); #endif } diff --git a/qt/gen_qsocketnotifier.go b/qt/gen_qsocketnotifier.go index 3e35a8f3..2648dad1 100644 --- a/qt/gen_qsocketnotifier.go +++ b/qt/gen_qsocketnotifier.go @@ -43,42 +43,34 @@ func (this *QSocketNotifier) UnsafePointer() unsafe.Pointer { } // newQSocketNotifier constructs the type using only CGO pointers. -func newQSocketNotifier(h *C.QSocketNotifier, h_QObject *C.QObject) *QSocketNotifier { +func newQSocketNotifier(h *C.QSocketNotifier) *QSocketNotifier { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSocketNotifier_virtbase(h, &outptr_QObject) + return &QSocketNotifier{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQSocketNotifier constructs the type using only unsafe pointers. -func UnsafeNewQSocketNotifier(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSocketNotifier { - if h == nil { - return nil - } - - return &QSocketNotifier{h: (*C.QSocketNotifier)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQSocketNotifier(h unsafe.Pointer) *QSocketNotifier { + return newQSocketNotifier((*C.QSocketNotifier)(h)) } // NewQSocketNotifier constructs a new QSocketNotifier object. func NewQSocketNotifier(socket uintptr, param2 QSocketNotifier__Type) *QSocketNotifier { - var outptr_QSocketNotifier *C.QSocketNotifier = nil - var outptr_QObject *C.QObject = nil - C.QSocketNotifier_new((C.intptr_t)(socket), (C.int)(param2), &outptr_QSocketNotifier, &outptr_QObject) - ret := newQSocketNotifier(outptr_QSocketNotifier, outptr_QObject) + ret := newQSocketNotifier(C.QSocketNotifier_new((C.intptr_t)(socket), (C.int)(param2))) ret.isSubclass = true return ret } // NewQSocketNotifier2 constructs a new QSocketNotifier object. func NewQSocketNotifier2(socket uintptr, param2 QSocketNotifier__Type, parent *QObject) *QSocketNotifier { - var outptr_QSocketNotifier *C.QSocketNotifier = nil - var outptr_QObject *C.QObject = nil - C.QSocketNotifier_new2((C.intptr_t)(socket), (C.int)(param2), parent.cPointer(), &outptr_QSocketNotifier, &outptr_QObject) - ret := newQSocketNotifier(outptr_QSocketNotifier, outptr_QObject) + ret := newQSocketNotifier(C.QSocketNotifier_new2((C.intptr_t)(socket), (C.int)(param2), parent.cPointer())) ret.isSubclass = true return ret } @@ -249,7 +241,7 @@ func miqt_exec_callback_QSocketNotifier_TimerEvent(self *C.QSocketNotifier, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QSocketNotifier{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -275,7 +267,7 @@ func miqt_exec_callback_QSocketNotifier_ChildEvent(self *C.QSocketNotifier, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QSocketNotifier{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -397,34 +389,27 @@ func newQSocketDescriptor(h *C.QSocketDescriptor) *QSocketDescriptor { if h == nil { return nil } + return &QSocketDescriptor{h: h} } // UnsafeNewQSocketDescriptor constructs the type using only unsafe pointers. func UnsafeNewQSocketDescriptor(h unsafe.Pointer) *QSocketDescriptor { - if h == nil { - return nil - } - - return &QSocketDescriptor{h: (*C.QSocketDescriptor)(h)} + return newQSocketDescriptor((*C.QSocketDescriptor)(h)) } // NewQSocketDescriptor constructs a new QSocketDescriptor object. func NewQSocketDescriptor() *QSocketDescriptor { - var outptr_QSocketDescriptor *C.QSocketDescriptor = nil - C.QSocketDescriptor_new(&outptr_QSocketDescriptor) - ret := newQSocketDescriptor(outptr_QSocketDescriptor) + ret := newQSocketDescriptor(C.QSocketDescriptor_new()) ret.isSubclass = true return ret } // NewQSocketDescriptor2 constructs a new QSocketDescriptor object. func NewQSocketDescriptor2(param1 *QSocketDescriptor) *QSocketDescriptor { - var outptr_QSocketDescriptor *C.QSocketDescriptor = nil - C.QSocketDescriptor_new2(param1.cPointer(), &outptr_QSocketDescriptor) - ret := newQSocketDescriptor(outptr_QSocketDescriptor) + ret := newQSocketDescriptor(C.QSocketDescriptor_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -435,10 +420,8 @@ func NewQSocketDescriptor3(descriptor int) *QSocketDescriptor { if runtime.GOOS != "linux" { panic("Unsupported OS") } - var outptr_QSocketDescriptor *C.QSocketDescriptor = nil - C.QSocketDescriptor_new3((C.int)(descriptor), &outptr_QSocketDescriptor) - ret := newQSocketDescriptor(outptr_QSocketDescriptor) + ret := newQSocketDescriptor(C.QSocketDescriptor_new3((C.int)(descriptor))) ret.isSubclass = true return ret } diff --git a/qt/gen_qsocketnotifier.h b/qt/gen_qsocketnotifier.h index 2af4938e..bf67db92 100644 --- a/qt/gen_qsocketnotifier.h +++ b/qt/gen_qsocketnotifier.h @@ -34,8 +34,9 @@ typedef struct QSocketNotifier QSocketNotifier; typedef struct QTimerEvent QTimerEvent; #endif -void QSocketNotifier_new(intptr_t socket, int param2, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject); -void QSocketNotifier_new2(intptr_t socket, int param2, QObject* parent, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject); +QSocketNotifier* QSocketNotifier_new(intptr_t socket, int param2); +QSocketNotifier* QSocketNotifier_new2(intptr_t socket, int param2, QObject* parent); +void QSocketNotifier_virtbase(QSocketNotifier* src, QObject** outptr_QObject); QMetaObject* QSocketNotifier_MetaObject(const QSocketNotifier* self); void* QSocketNotifier_Metacast(QSocketNotifier* self, const char* param1); struct miqt_string QSocketNotifier_Tr(const char* s); @@ -65,9 +66,9 @@ void QSocketNotifier_override_virtual_DisconnectNotify(void* self, intptr_t slot void QSocketNotifier_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QSocketNotifier_Delete(QSocketNotifier* self, bool isSubclass); -void QSocketDescriptor_new(QSocketDescriptor** outptr_QSocketDescriptor); -void QSocketDescriptor_new2(QSocketDescriptor* param1, QSocketDescriptor** outptr_QSocketDescriptor); -void QSocketDescriptor_new3(int descriptor, QSocketDescriptor** outptr_QSocketDescriptor); +QSocketDescriptor* QSocketDescriptor_new(); +QSocketDescriptor* QSocketDescriptor_new2(QSocketDescriptor* param1); +QSocketDescriptor* QSocketDescriptor_new3(int descriptor); bool QSocketDescriptor_IsValid(const QSocketDescriptor* self); void QSocketDescriptor_Delete(QSocketDescriptor* self, bool isSubclass); diff --git a/qt/gen_qsortfilterproxymodel.cpp b/qt/gen_qsortfilterproxymodel.cpp index 18776f31..c2d9facc 100644 --- a/qt/gen_qsortfilterproxymodel.cpp +++ b/qt/gen_qsortfilterproxymodel.cpp @@ -1130,20 +1130,16 @@ public: }; -void QSortFilterProxyModel_new(QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQSortFilterProxyModel* ret = new MiqtVirtualQSortFilterProxyModel(); - *outptr_QSortFilterProxyModel = ret; - *outptr_QAbstractProxyModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSortFilterProxyModel* QSortFilterProxyModel_new() { + return new MiqtVirtualQSortFilterProxyModel(); } -void QSortFilterProxyModel_new2(QObject* parent, QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQSortFilterProxyModel* ret = new MiqtVirtualQSortFilterProxyModel(parent); - *outptr_QSortFilterProxyModel = ret; - *outptr_QAbstractProxyModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSortFilterProxyModel* QSortFilterProxyModel_new2(QObject* parent) { + return new MiqtVirtualQSortFilterProxyModel(parent); +} + +void QSortFilterProxyModel_virtbase(QSortFilterProxyModel* src, QAbstractProxyModel** outptr_QAbstractProxyModel) { + *outptr_QAbstractProxyModel = static_cast(src); } QMetaObject* QSortFilterProxyModel_MetaObject(const QSortFilterProxyModel* self) { diff --git a/qt/gen_qsortfilterproxymodel.go b/qt/gen_qsortfilterproxymodel.go index e2fd4319..15086138 100644 --- a/qt/gen_qsortfilterproxymodel.go +++ b/qt/gen_qsortfilterproxymodel.go @@ -35,46 +35,34 @@ func (this *QSortFilterProxyModel) UnsafePointer() unsafe.Pointer { } // newQSortFilterProxyModel constructs the type using only CGO pointers. -func newQSortFilterProxyModel(h *C.QSortFilterProxyModel, h_QAbstractProxyModel *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QSortFilterProxyModel { +func newQSortFilterProxyModel(h *C.QSortFilterProxyModel) *QSortFilterProxyModel { if h == nil { return nil } + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + C.QSortFilterProxyModel_virtbase(h, &outptr_QAbstractProxyModel) + return &QSortFilterProxyModel{h: h, - QAbstractProxyModel: newQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} + QAbstractProxyModel: newQAbstractProxyModel(outptr_QAbstractProxyModel)} } // UnsafeNewQSortFilterProxyModel constructs the type using only unsafe pointers. -func UnsafeNewQSortFilterProxyModel(h unsafe.Pointer, h_QAbstractProxyModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QSortFilterProxyModel { - if h == nil { - return nil - } - - return &QSortFilterProxyModel{h: (*C.QSortFilterProxyModel)(h), - QAbstractProxyModel: UnsafeNewQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} +func UnsafeNewQSortFilterProxyModel(h unsafe.Pointer) *QSortFilterProxyModel { + return newQSortFilterProxyModel((*C.QSortFilterProxyModel)(h)) } // NewQSortFilterProxyModel constructs a new QSortFilterProxyModel object. func NewQSortFilterProxyModel() *QSortFilterProxyModel { - var outptr_QSortFilterProxyModel *C.QSortFilterProxyModel = nil - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QSortFilterProxyModel_new(&outptr_QSortFilterProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQSortFilterProxyModel(outptr_QSortFilterProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQSortFilterProxyModel(C.QSortFilterProxyModel_new()) ret.isSubclass = true return ret } // NewQSortFilterProxyModel2 constructs a new QSortFilterProxyModel object. func NewQSortFilterProxyModel2(parent *QObject) *QSortFilterProxyModel { - var outptr_QSortFilterProxyModel *C.QSortFilterProxyModel = nil - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QSortFilterProxyModel_new2(parent.cPointer(), &outptr_QSortFilterProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQSortFilterProxyModel(outptr_QSortFilterProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQSortFilterProxyModel(C.QSortFilterProxyModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -324,7 +312,7 @@ func (this *QSortFilterProxyModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QSortFilterProxyModel_MimeData(this.h, indexes_ma), nil) + return newQMimeData(C.QSortFilterProxyModel_MimeData(this.h, indexes_ma)) } func (this *QSortFilterProxyModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -608,7 +596,7 @@ func miqt_exec_callback_QSortFilterProxyModel_SetSourceModel(self *C.QSortFilter } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(sourceModel, nil) + slotval1 := newQAbstractItemModel(sourceModel) gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) @@ -1146,7 +1134,7 @@ func (this *QSortFilterProxyModel) callVirtualBase_MimeData(indexes []QModelInde } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QSortFilterProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QSortFilterProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QSortFilterProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -1200,7 +1188,7 @@ func miqt_exec_callback_QSortFilterProxyModel_DropMimeData(self *C.QSortFilterPr } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -1815,7 +1803,7 @@ func miqt_exec_callback_QSortFilterProxyModel_CanDropMimeData(self *C.QSortFilte } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt/gen_qsortfilterproxymodel.h b/qt/gen_qsortfilterproxymodel.h index c1fb82e7..3e94c9c2 100644 --- a/qt/gen_qsortfilterproxymodel.h +++ b/qt/gen_qsortfilterproxymodel.h @@ -42,8 +42,9 @@ typedef struct QSortFilterProxyModel QSortFilterProxyModel; typedef struct QVariant QVariant; #endif -void QSortFilterProxyModel_new(QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QSortFilterProxyModel_new2(QObject* parent, QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QSortFilterProxyModel* QSortFilterProxyModel_new(); +QSortFilterProxyModel* QSortFilterProxyModel_new2(QObject* parent); +void QSortFilterProxyModel_virtbase(QSortFilterProxyModel* src, QAbstractProxyModel** outptr_QAbstractProxyModel); QMetaObject* QSortFilterProxyModel_MetaObject(const QSortFilterProxyModel* self); void* QSortFilterProxyModel_Metacast(QSortFilterProxyModel* self, const char* param1); struct miqt_string QSortFilterProxyModel_Tr(const char* s); diff --git a/qt/gen_qspinbox.cpp b/qt/gen_qspinbox.cpp index 5807f2b6..16ad4e65 100644 --- a/qt/gen_qspinbox.cpp +++ b/qt/gen_qspinbox.cpp @@ -708,22 +708,16 @@ public: }; -void QSpinBox_new(QWidget* parent, QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSpinBox* ret = new MiqtVirtualQSpinBox(parent); - *outptr_QSpinBox = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSpinBox* QSpinBox_new(QWidget* parent) { + return new MiqtVirtualQSpinBox(parent); } -void QSpinBox_new2(QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSpinBox* ret = new MiqtVirtualQSpinBox(); - *outptr_QSpinBox = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSpinBox* QSpinBox_new2() { + return new MiqtVirtualQSpinBox(); +} + +void QSpinBox_virtbase(QSpinBox* src, QAbstractSpinBox** outptr_QAbstractSpinBox) { + *outptr_QAbstractSpinBox = static_cast(src); } QMetaObject* QSpinBox_MetaObject(const QSpinBox* self) { @@ -1851,22 +1845,16 @@ public: }; -void QDoubleSpinBox_new(QWidget* parent, QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDoubleSpinBox* ret = new MiqtVirtualQDoubleSpinBox(parent); - *outptr_QDoubleSpinBox = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDoubleSpinBox* QDoubleSpinBox_new(QWidget* parent) { + return new MiqtVirtualQDoubleSpinBox(parent); } -void QDoubleSpinBox_new2(QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDoubleSpinBox* ret = new MiqtVirtualQDoubleSpinBox(); - *outptr_QDoubleSpinBox = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDoubleSpinBox* QDoubleSpinBox_new2() { + return new MiqtVirtualQDoubleSpinBox(); +} + +void QDoubleSpinBox_virtbase(QDoubleSpinBox* src, QAbstractSpinBox** outptr_QAbstractSpinBox) { + *outptr_QAbstractSpinBox = static_cast(src); } QMetaObject* QDoubleSpinBox_MetaObject(const QDoubleSpinBox* self) { diff --git a/qt/gen_qspinbox.go b/qt/gen_qspinbox.go index 3919cec6..9a33a128 100644 --- a/qt/gen_qspinbox.go +++ b/qt/gen_qspinbox.go @@ -35,48 +35,34 @@ func (this *QSpinBox) UnsafePointer() unsafe.Pointer { } // newQSpinBox constructs the type using only CGO pointers. -func newQSpinBox(h *C.QSpinBox, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSpinBox { +func newQSpinBox(h *C.QSpinBox) *QSpinBox { if h == nil { return nil } + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + C.QSpinBox_virtbase(h, &outptr_QAbstractSpinBox) + return &QSpinBox{h: h, - QAbstractSpinBox: newQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractSpinBox: newQAbstractSpinBox(outptr_QAbstractSpinBox)} } // UnsafeNewQSpinBox constructs the type using only unsafe pointers. -func UnsafeNewQSpinBox(h unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSpinBox { - if h == nil { - return nil - } - - return &QSpinBox{h: (*C.QSpinBox)(h), - QAbstractSpinBox: UnsafeNewQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQSpinBox(h unsafe.Pointer) *QSpinBox { + return newQSpinBox((*C.QSpinBox)(h)) } // NewQSpinBox constructs a new QSpinBox object. func NewQSpinBox(parent *QWidget) *QSpinBox { - var outptr_QSpinBox *C.QSpinBox = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSpinBox_new(parent.cPointer(), &outptr_QSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSpinBox(outptr_QSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSpinBox(C.QSpinBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQSpinBox2 constructs a new QSpinBox object. func NewQSpinBox2() *QSpinBox { - var outptr_QSpinBox *C.QSpinBox = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSpinBox_new2(&outptr_QSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSpinBox(outptr_QSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSpinBox(C.QSpinBox_new2()) ret.isSubclass = true return ret } @@ -635,7 +621,7 @@ func miqt_exec_callback_QSpinBox_ResizeEvent(self *C.QSpinBox, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -661,7 +647,7 @@ func miqt_exec_callback_QSpinBox_KeyPressEvent(self *C.QSpinBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -687,7 +673,7 @@ func miqt_exec_callback_QSpinBox_KeyReleaseEvent(self *C.QSpinBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -713,7 +699,7 @@ func miqt_exec_callback_QSpinBox_WheelEvent(self *C.QSpinBox, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -739,7 +725,7 @@ func miqt_exec_callback_QSpinBox_FocusInEvent(self *C.QSpinBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -765,7 +751,7 @@ func miqt_exec_callback_QSpinBox_FocusOutEvent(self *C.QSpinBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -791,7 +777,7 @@ func miqt_exec_callback_QSpinBox_ContextMenuEvent(self *C.QSpinBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -843,7 +829,7 @@ func miqt_exec_callback_QSpinBox_CloseEvent(self *C.QSpinBox, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -869,7 +855,7 @@ func miqt_exec_callback_QSpinBox_HideEvent(self *C.QSpinBox, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_HideEvent, slotval1) @@ -895,7 +881,7 @@ func miqt_exec_callback_QSpinBox_MousePressEvent(self *C.QSpinBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -921,7 +907,7 @@ func miqt_exec_callback_QSpinBox_MouseReleaseEvent(self *C.QSpinBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -947,7 +933,7 @@ func miqt_exec_callback_QSpinBox_MouseMoveEvent(self *C.QSpinBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -973,7 +959,7 @@ func miqt_exec_callback_QSpinBox_TimerEvent(self *C.QSpinBox, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -999,7 +985,7 @@ func miqt_exec_callback_QSpinBox_PaintEvent(self *C.QSpinBox, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1025,7 +1011,7 @@ func miqt_exec_callback_QSpinBox_ShowEvent(self *C.QSpinBox, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1091,48 +1077,34 @@ func (this *QDoubleSpinBox) UnsafePointer() unsafe.Pointer { } // newQDoubleSpinBox constructs the type using only CGO pointers. -func newQDoubleSpinBox(h *C.QDoubleSpinBox, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDoubleSpinBox { +func newQDoubleSpinBox(h *C.QDoubleSpinBox) *QDoubleSpinBox { if h == nil { return nil } + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + C.QDoubleSpinBox_virtbase(h, &outptr_QAbstractSpinBox) + return &QDoubleSpinBox{h: h, - QAbstractSpinBox: newQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractSpinBox: newQAbstractSpinBox(outptr_QAbstractSpinBox)} } // UnsafeNewQDoubleSpinBox constructs the type using only unsafe pointers. -func UnsafeNewQDoubleSpinBox(h unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDoubleSpinBox { - if h == nil { - return nil - } - - return &QDoubleSpinBox{h: (*C.QDoubleSpinBox)(h), - QAbstractSpinBox: UnsafeNewQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQDoubleSpinBox(h unsafe.Pointer) *QDoubleSpinBox { + return newQDoubleSpinBox((*C.QDoubleSpinBox)(h)) } // NewQDoubleSpinBox constructs a new QDoubleSpinBox object. func NewQDoubleSpinBox(parent *QWidget) *QDoubleSpinBox { - var outptr_QDoubleSpinBox *C.QDoubleSpinBox = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDoubleSpinBox_new(parent.cPointer(), &outptr_QDoubleSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDoubleSpinBox(outptr_QDoubleSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDoubleSpinBox(C.QDoubleSpinBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQDoubleSpinBox2 constructs a new QDoubleSpinBox object. func NewQDoubleSpinBox2() *QDoubleSpinBox { - var outptr_QDoubleSpinBox *C.QDoubleSpinBox = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDoubleSpinBox_new2(&outptr_QDoubleSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDoubleSpinBox(outptr_QDoubleSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDoubleSpinBox(C.QDoubleSpinBox_new2()) ret.isSubclass = true return ret } @@ -1722,7 +1694,7 @@ func miqt_exec_callback_QDoubleSpinBox_ResizeEvent(self *C.QDoubleSpinBox, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1748,7 +1720,7 @@ func miqt_exec_callback_QDoubleSpinBox_KeyPressEvent(self *C.QDoubleSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1774,7 +1746,7 @@ func miqt_exec_callback_QDoubleSpinBox_KeyReleaseEvent(self *C.QDoubleSpinBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1800,7 +1772,7 @@ func miqt_exec_callback_QDoubleSpinBox_WheelEvent(self *C.QDoubleSpinBox, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1826,7 +1798,7 @@ func miqt_exec_callback_QDoubleSpinBox_FocusInEvent(self *C.QDoubleSpinBox, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1852,7 +1824,7 @@ func miqt_exec_callback_QDoubleSpinBox_FocusOutEvent(self *C.QDoubleSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1878,7 +1850,7 @@ func miqt_exec_callback_QDoubleSpinBox_ContextMenuEvent(self *C.QDoubleSpinBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1930,7 +1902,7 @@ func miqt_exec_callback_QDoubleSpinBox_CloseEvent(self *C.QDoubleSpinBox, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1956,7 +1928,7 @@ func miqt_exec_callback_QDoubleSpinBox_HideEvent(self *C.QDoubleSpinBox, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1982,7 +1954,7 @@ func miqt_exec_callback_QDoubleSpinBox_MousePressEvent(self *C.QDoubleSpinBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -2008,7 +1980,7 @@ func miqt_exec_callback_QDoubleSpinBox_MouseReleaseEvent(self *C.QDoubleSpinBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -2034,7 +2006,7 @@ func miqt_exec_callback_QDoubleSpinBox_MouseMoveEvent(self *C.QDoubleSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -2060,7 +2032,7 @@ func miqt_exec_callback_QDoubleSpinBox_TimerEvent(self *C.QDoubleSpinBox, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -2086,7 +2058,7 @@ func miqt_exec_callback_QDoubleSpinBox_PaintEvent(self *C.QDoubleSpinBox, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -2112,7 +2084,7 @@ func miqt_exec_callback_QDoubleSpinBox_ShowEvent(self *C.QDoubleSpinBox, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ShowEvent, slotval1) diff --git a/qt/gen_qspinbox.h b/qt/gen_qspinbox.h index 64e38c99..aec5e7e2 100644 --- a/qt/gen_qspinbox.h +++ b/qt/gen_qspinbox.h @@ -60,8 +60,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QSpinBox_new(QWidget* parent, QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSpinBox_new2(QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QSpinBox* QSpinBox_new(QWidget* parent); +QSpinBox* QSpinBox_new2(); +void QSpinBox_virtbase(QSpinBox* src, QAbstractSpinBox** outptr_QAbstractSpinBox); QMetaObject* QSpinBox_MetaObject(const QSpinBox* self); void* QSpinBox_Metacast(QSpinBox* self, const char* param1); struct miqt_string QSpinBox_Tr(const char* s); @@ -155,8 +156,9 @@ void QSpinBox_override_virtual_StepEnabled(void* self, intptr_t slot); int QSpinBox_virtualbase_StepEnabled(const void* self); void QSpinBox_Delete(QSpinBox* self, bool isSubclass); -void QDoubleSpinBox_new(QWidget* parent, QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDoubleSpinBox_new2(QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QDoubleSpinBox* QDoubleSpinBox_new(QWidget* parent); +QDoubleSpinBox* QDoubleSpinBox_new2(); +void QDoubleSpinBox_virtbase(QDoubleSpinBox* src, QAbstractSpinBox** outptr_QAbstractSpinBox); QMetaObject* QDoubleSpinBox_MetaObject(const QDoubleSpinBox* self); void* QDoubleSpinBox_Metacast(QDoubleSpinBox* self, const char* param1); struct miqt_string QDoubleSpinBox_Tr(const char* s); diff --git a/qt/gen_qsplashscreen.cpp b/qt/gen_qsplashscreen.cpp index 8daefd17..4b58dd86 100644 --- a/qt/gen_qsplashscreen.cpp +++ b/qt/gen_qsplashscreen.cpp @@ -1054,76 +1054,44 @@ public: }; -void QSplashScreen_new(QWidget* parent, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(parent); - *outptr_QSplashScreen = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplashScreen* QSplashScreen_new(QWidget* parent) { + return new MiqtVirtualQSplashScreen(parent); } -void QSplashScreen_new2(QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(); - *outptr_QSplashScreen = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplashScreen* QSplashScreen_new2() { + return new MiqtVirtualQSplashScreen(); } -void QSplashScreen_new3(QScreen* screen, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(screen); - *outptr_QSplashScreen = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplashScreen* QSplashScreen_new3(QScreen* screen) { + return new MiqtVirtualQSplashScreen(screen); } -void QSplashScreen_new4(QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(*pixmap); - *outptr_QSplashScreen = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplashScreen* QSplashScreen_new4(QPixmap* pixmap) { + return new MiqtVirtualQSplashScreen(*pixmap); } -void QSplashScreen_new5(QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(*pixmap, static_cast(f)); - *outptr_QSplashScreen = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplashScreen* QSplashScreen_new5(QPixmap* pixmap, int f) { + return new MiqtVirtualQSplashScreen(*pixmap, static_cast(f)); } -void QSplashScreen_new6(QScreen* screen, QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(screen, *pixmap); - *outptr_QSplashScreen = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplashScreen* QSplashScreen_new6(QScreen* screen, QPixmap* pixmap) { + return new MiqtVirtualQSplashScreen(screen, *pixmap); } -void QSplashScreen_new7(QScreen* screen, QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(screen, *pixmap, static_cast(f)); - *outptr_QSplashScreen = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplashScreen* QSplashScreen_new7(QScreen* screen, QPixmap* pixmap, int f) { + return new MiqtVirtualQSplashScreen(screen, *pixmap, static_cast(f)); } -void QSplashScreen_new8(QWidget* parent, QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(parent, *pixmap); - *outptr_QSplashScreen = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplashScreen* QSplashScreen_new8(QWidget* parent, QPixmap* pixmap) { + return new MiqtVirtualQSplashScreen(parent, *pixmap); } -void QSplashScreen_new9(QWidget* parent, QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(parent, *pixmap, static_cast(f)); - *outptr_QSplashScreen = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplashScreen* QSplashScreen_new9(QWidget* parent, QPixmap* pixmap, int f) { + return new MiqtVirtualQSplashScreen(parent, *pixmap, static_cast(f)); +} + +void QSplashScreen_virtbase(QSplashScreen* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QSplashScreen_MetaObject(const QSplashScreen* self) { diff --git a/qt/gen_qsplashscreen.go b/qt/gen_qsplashscreen.go index 466c3744..59e3a60d 100644 --- a/qt/gen_qsplashscreen.go +++ b/qt/gen_qsplashscreen.go @@ -35,137 +35,90 @@ func (this *QSplashScreen) UnsafePointer() unsafe.Pointer { } // newQSplashScreen constructs the type using only CGO pointers. -func newQSplashScreen(h *C.QSplashScreen, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSplashScreen { +func newQSplashScreen(h *C.QSplashScreen) *QSplashScreen { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QSplashScreen_virtbase(h, &outptr_QWidget) + return &QSplashScreen{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQSplashScreen constructs the type using only unsafe pointers. -func UnsafeNewQSplashScreen(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSplashScreen { - if h == nil { - return nil - } - - return &QSplashScreen{h: (*C.QSplashScreen)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQSplashScreen(h unsafe.Pointer) *QSplashScreen { + return newQSplashScreen((*C.QSplashScreen)(h)) } // NewQSplashScreen constructs a new QSplashScreen object. func NewQSplashScreen(parent *QWidget) *QSplashScreen { - var outptr_QSplashScreen *C.QSplashScreen = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplashScreen_new(parent.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplashScreen(C.QSplashScreen_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQSplashScreen2 constructs a new QSplashScreen object. func NewQSplashScreen2() *QSplashScreen { - var outptr_QSplashScreen *C.QSplashScreen = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplashScreen_new2(&outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplashScreen(C.QSplashScreen_new2()) ret.isSubclass = true return ret } // NewQSplashScreen3 constructs a new QSplashScreen object. func NewQSplashScreen3(screen *QScreen) *QSplashScreen { - var outptr_QSplashScreen *C.QSplashScreen = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplashScreen_new3(screen.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplashScreen(C.QSplashScreen_new3(screen.cPointer())) ret.isSubclass = true return ret } // NewQSplashScreen4 constructs a new QSplashScreen object. func NewQSplashScreen4(pixmap *QPixmap) *QSplashScreen { - var outptr_QSplashScreen *C.QSplashScreen = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplashScreen_new4(pixmap.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplashScreen(C.QSplashScreen_new4(pixmap.cPointer())) ret.isSubclass = true return ret } // NewQSplashScreen5 constructs a new QSplashScreen object. func NewQSplashScreen5(pixmap *QPixmap, f WindowType) *QSplashScreen { - var outptr_QSplashScreen *C.QSplashScreen = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplashScreen_new5(pixmap.cPointer(), (C.int)(f), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplashScreen(C.QSplashScreen_new5(pixmap.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } // NewQSplashScreen6 constructs a new QSplashScreen object. func NewQSplashScreen6(screen *QScreen, pixmap *QPixmap) *QSplashScreen { - var outptr_QSplashScreen *C.QSplashScreen = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplashScreen_new6(screen.cPointer(), pixmap.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplashScreen(C.QSplashScreen_new6(screen.cPointer(), pixmap.cPointer())) ret.isSubclass = true return ret } // NewQSplashScreen7 constructs a new QSplashScreen object. func NewQSplashScreen7(screen *QScreen, pixmap *QPixmap, f WindowType) *QSplashScreen { - var outptr_QSplashScreen *C.QSplashScreen = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplashScreen_new7(screen.cPointer(), pixmap.cPointer(), (C.int)(f), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplashScreen(C.QSplashScreen_new7(screen.cPointer(), pixmap.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } // NewQSplashScreen8 constructs a new QSplashScreen object. func NewQSplashScreen8(parent *QWidget, pixmap *QPixmap) *QSplashScreen { - var outptr_QSplashScreen *C.QSplashScreen = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplashScreen_new8(parent.cPointer(), pixmap.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplashScreen(C.QSplashScreen_new8(parent.cPointer(), pixmap.cPointer())) ret.isSubclass = true return ret } // NewQSplashScreen9 constructs a new QSplashScreen object. func NewQSplashScreen9(parent *QWidget, pixmap *QPixmap, f WindowType) *QSplashScreen { - var outptr_QSplashScreen *C.QSplashScreen = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplashScreen_new9(parent.cPointer(), pixmap.cPointer(), (C.int)(f), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplashScreen(C.QSplashScreen_new9(parent.cPointer(), pixmap.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -203,7 +156,7 @@ func (this *QSplashScreen) SetPixmap(pixmap *QPixmap) { } func (this *QSplashScreen) Pixmap() *QPixmap { - _goptr := newQPixmap(C.QSplashScreen_Pixmap(this.h), nil) + _goptr := newQPixmap(C.QSplashScreen_Pixmap(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -396,7 +349,7 @@ func miqt_exec_callback_QSplashScreen_MousePressEvent(self *C.QSplashScreen, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QSplashScreen{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -605,7 +558,7 @@ func miqt_exec_callback_QSplashScreen_MouseReleaseEvent(self *C.QSplashScreen, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -631,7 +584,7 @@ func miqt_exec_callback_QSplashScreen_MouseDoubleClickEvent(self *C.QSplashScree } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -657,7 +610,7 @@ func miqt_exec_callback_QSplashScreen_MouseMoveEvent(self *C.QSplashScreen, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -683,7 +636,7 @@ func miqt_exec_callback_QSplashScreen_WheelEvent(self *C.QSplashScreen, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -709,7 +662,7 @@ func miqt_exec_callback_QSplashScreen_KeyPressEvent(self *C.QSplashScreen, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -735,7 +688,7 @@ func miqt_exec_callback_QSplashScreen_KeyReleaseEvent(self *C.QSplashScreen, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -761,7 +714,7 @@ func miqt_exec_callback_QSplashScreen_FocusInEvent(self *C.QSplashScreen, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -787,7 +740,7 @@ func miqt_exec_callback_QSplashScreen_FocusOutEvent(self *C.QSplashScreen, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -865,7 +818,7 @@ func miqt_exec_callback_QSplashScreen_PaintEvent(self *C.QSplashScreen, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -891,7 +844,7 @@ func miqt_exec_callback_QSplashScreen_MoveEvent(self *C.QSplashScreen, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -917,7 +870,7 @@ func miqt_exec_callback_QSplashScreen_ResizeEvent(self *C.QSplashScreen, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -943,7 +896,7 @@ func miqt_exec_callback_QSplashScreen_CloseEvent(self *C.QSplashScreen, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -969,7 +922,7 @@ func miqt_exec_callback_QSplashScreen_ContextMenuEvent(self *C.QSplashScreen, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -995,7 +948,7 @@ func miqt_exec_callback_QSplashScreen_TabletEvent(self *C.QSplashScreen, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1021,7 +974,7 @@ func miqt_exec_callback_QSplashScreen_ActionEvent(self *C.QSplashScreen, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1047,7 +1000,7 @@ func miqt_exec_callback_QSplashScreen_DragEnterEvent(self *C.QSplashScreen, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1073,7 +1026,7 @@ func miqt_exec_callback_QSplashScreen_DragMoveEvent(self *C.QSplashScreen, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1099,7 +1052,7 @@ func miqt_exec_callback_QSplashScreen_DragLeaveEvent(self *C.QSplashScreen, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1125,7 +1078,7 @@ func miqt_exec_callback_QSplashScreen_DropEvent(self *C.QSplashScreen, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1151,7 +1104,7 @@ func miqt_exec_callback_QSplashScreen_ShowEvent(self *C.QSplashScreen, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1177,7 +1130,7 @@ func miqt_exec_callback_QSplashScreen_HideEvent(self *C.QSplashScreen, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1373,7 +1326,7 @@ func miqt_exec_callback_QSplashScreen_InputMethodEvent(self *C.QSplashScreen, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QSplashScreen{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qsplashscreen.h b/qt/gen_qsplashscreen.h index 60679e38..40efce85 100644 --- a/qt/gen_qsplashscreen.h +++ b/qt/gen_qsplashscreen.h @@ -82,15 +82,16 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QSplashScreen_new(QWidget* parent, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplashScreen_new2(QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplashScreen_new3(QScreen* screen, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplashScreen_new4(QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplashScreen_new5(QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplashScreen_new6(QScreen* screen, QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplashScreen_new7(QScreen* screen, QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplashScreen_new8(QWidget* parent, QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplashScreen_new9(QWidget* parent, QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QSplashScreen* QSplashScreen_new(QWidget* parent); +QSplashScreen* QSplashScreen_new2(); +QSplashScreen* QSplashScreen_new3(QScreen* screen); +QSplashScreen* QSplashScreen_new4(QPixmap* pixmap); +QSplashScreen* QSplashScreen_new5(QPixmap* pixmap, int f); +QSplashScreen* QSplashScreen_new6(QScreen* screen, QPixmap* pixmap); +QSplashScreen* QSplashScreen_new7(QScreen* screen, QPixmap* pixmap, int f); +QSplashScreen* QSplashScreen_new8(QWidget* parent, QPixmap* pixmap); +QSplashScreen* QSplashScreen_new9(QWidget* parent, QPixmap* pixmap, int f); +void QSplashScreen_virtbase(QSplashScreen* src, QWidget** outptr_QWidget); QMetaObject* QSplashScreen_MetaObject(const QSplashScreen* self); void* QSplashScreen_Metacast(QSplashScreen* self, const char* param1); struct miqt_string QSplashScreen_Tr(const char* s); diff --git a/qt/gen_qsplitter.cpp b/qt/gen_qsplitter.cpp index df601469..a6e3c6f9 100644 --- a/qt/gen_qsplitter.cpp +++ b/qt/gen_qsplitter.cpp @@ -236,40 +236,24 @@ public: }; -void QSplitter_new(QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(parent); - *outptr_QSplitter = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplitter* QSplitter_new(QWidget* parent) { + return new MiqtVirtualQSplitter(parent); } -void QSplitter_new2(QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(); - *outptr_QSplitter = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplitter* QSplitter_new2() { + return new MiqtVirtualQSplitter(); } -void QSplitter_new3(int param1, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(static_cast(param1)); - *outptr_QSplitter = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplitter* QSplitter_new3(int param1) { + return new MiqtVirtualQSplitter(static_cast(param1)); } -void QSplitter_new4(int param1, QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(static_cast(param1), parent); - *outptr_QSplitter = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplitter* QSplitter_new4(int param1, QWidget* parent) { + return new MiqtVirtualQSplitter(static_cast(param1), parent); +} + +void QSplitter_virtbase(QSplitter* src, QFrame** outptr_QFrame) { + *outptr_QFrame = static_cast(src); } QMetaObject* QSplitter_MetaObject(const QSplitter* self) { @@ -1544,12 +1528,12 @@ public: }; -void QSplitterHandle_new(int o, QSplitter* parent, QSplitterHandle** outptr_QSplitterHandle, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplitterHandle* ret = new MiqtVirtualQSplitterHandle(static_cast(o), parent); - *outptr_QSplitterHandle = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplitterHandle* QSplitterHandle_new(int o, QSplitter* parent) { + return new MiqtVirtualQSplitterHandle(static_cast(o), parent); +} + +void QSplitterHandle_virtbase(QSplitterHandle* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QSplitterHandle_MetaObject(const QSplitterHandle* self) { diff --git a/qt/gen_qsplitter.go b/qt/gen_qsplitter.go index a9e4a5b5..323c63b7 100644 --- a/qt/gen_qsplitter.go +++ b/qt/gen_qsplitter.go @@ -35,76 +35,50 @@ func (this *QSplitter) UnsafePointer() unsafe.Pointer { } // newQSplitter constructs the type using only CGO pointers. -func newQSplitter(h *C.QSplitter, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSplitter { +func newQSplitter(h *C.QSplitter) *QSplitter { if h == nil { return nil } + var outptr_QFrame *C.QFrame = nil + C.QSplitter_virtbase(h, &outptr_QFrame) + return &QSplitter{h: h, - QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QFrame: newQFrame(outptr_QFrame)} } // UnsafeNewQSplitter constructs the type using only unsafe pointers. -func UnsafeNewQSplitter(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSplitter { - if h == nil { - return nil - } - - return &QSplitter{h: (*C.QSplitter)(h), - QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQSplitter(h unsafe.Pointer) *QSplitter { + return newQSplitter((*C.QSplitter)(h)) } // NewQSplitter constructs a new QSplitter object. func NewQSplitter(parent *QWidget) *QSplitter { - var outptr_QSplitter *C.QSplitter = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplitter_new(parent.cPointer(), &outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplitter(C.QSplitter_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQSplitter2 constructs a new QSplitter object. func NewQSplitter2() *QSplitter { - var outptr_QSplitter *C.QSplitter = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplitter_new2(&outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplitter(C.QSplitter_new2()) ret.isSubclass = true return ret } // NewQSplitter3 constructs a new QSplitter object. func NewQSplitter3(param1 Orientation) *QSplitter { - var outptr_QSplitter *C.QSplitter = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplitter_new3((C.int)(param1), &outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplitter(C.QSplitter_new3((C.int)(param1))) ret.isSubclass = true return ret } // NewQSplitter4 constructs a new QSplitter object. func NewQSplitter4(param1 Orientation, parent *QWidget) *QSplitter { - var outptr_QSplitter *C.QSplitter = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplitter_new4((C.int)(param1), parent.cPointer(), &outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplitter(C.QSplitter_new4((C.int)(param1), parent.cPointer())) ret.isSubclass = true return ret } @@ -146,7 +120,7 @@ func (this *QSplitter) InsertWidget(index int, widget *QWidget) { } func (this *QSplitter) ReplaceWidget(index int, widget *QWidget) *QWidget { - return newQWidget(C.QSplitter_ReplaceWidget(this.h, (C.int)(index), widget.cPointer()), nil, nil) + return newQWidget(C.QSplitter_ReplaceWidget(this.h, (C.int)(index), widget.cPointer())) } func (this *QSplitter) SetOrientation(orientation Orientation) { @@ -244,7 +218,7 @@ func (this *QSplitter) IndexOf(w *QWidget) int { } func (this *QSplitter) Widget(index int) *QWidget { - return newQWidget(C.QSplitter_Widget(this.h, (C.int)(index)), nil, nil) + return newQWidget(C.QSplitter_Widget(this.h, (C.int)(index))) } func (this *QSplitter) Count() int { @@ -256,7 +230,7 @@ func (this *QSplitter) GetRange(index int, param2 *int, param3 *int) { } func (this *QSplitter) Handle(index int) *QSplitterHandle { - return newQSplitterHandle(C.QSplitter_Handle(this.h, (C.int)(index)), nil, nil, nil) + return newQSplitterHandle(C.QSplitter_Handle(this.h, (C.int)(index))) } func (this *QSplitter) SetStretchFactor(index int, stretch int) { @@ -389,7 +363,7 @@ func miqt_exec_callback_QSplitter_MinimumSizeHint(self *C.QSplitter, cb C.intptr func (this *QSplitter) callVirtualBase_CreateHandle() *QSplitterHandle { - return newQSplitterHandle(C.QSplitter_virtualbase_CreateHandle(unsafe.Pointer(this.h)), nil, nil, nil) + return newQSplitterHandle(C.QSplitter_virtualbase_CreateHandle(unsafe.Pointer(this.h))) } func (this *QSplitter) OnCreateHandle(slot func(super func() *QSplitterHandle) *QSplitterHandle) { @@ -432,7 +406,7 @@ func miqt_exec_callback_QSplitter_ChildEvent(self *C.QSplitter, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(param1, nil) + slotval1 := newQChildEvent(param1) gofunc((&QSplitter{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -486,7 +460,7 @@ func miqt_exec_callback_QSplitter_ResizeEvent(self *C.QSplitter, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QSplitter{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -538,7 +512,7 @@ func miqt_exec_callback_QSplitter_PaintEvent(self *C.QSplitter, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QSplitter{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -579,33 +553,26 @@ func (this *QSplitterHandle) UnsafePointer() unsafe.Pointer { } // newQSplitterHandle constructs the type using only CGO pointers. -func newQSplitterHandle(h *C.QSplitterHandle, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSplitterHandle { +func newQSplitterHandle(h *C.QSplitterHandle) *QSplitterHandle { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QSplitterHandle_virtbase(h, &outptr_QWidget) + return &QSplitterHandle{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQSplitterHandle constructs the type using only unsafe pointers. -func UnsafeNewQSplitterHandle(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSplitterHandle { - if h == nil { - return nil - } - - return &QSplitterHandle{h: (*C.QSplitterHandle)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQSplitterHandle(h unsafe.Pointer) *QSplitterHandle { + return newQSplitterHandle((*C.QSplitterHandle)(h)) } // NewQSplitterHandle constructs a new QSplitterHandle object. func NewQSplitterHandle(o Orientation, parent *QSplitter) *QSplitterHandle { - var outptr_QSplitterHandle *C.QSplitterHandle = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplitterHandle_new((C.int)(o), parent.cPointer(), &outptr_QSplitterHandle, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplitterHandle(outptr_QSplitterHandle, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplitterHandle(C.QSplitterHandle_new((C.int)(o), parent.cPointer())) ret.isSubclass = true return ret } @@ -651,7 +618,7 @@ func (this *QSplitterHandle) OpaqueResize() bool { } func (this *QSplitterHandle) Splitter() *QSplitter { - return newQSplitter(C.QSplitterHandle_Splitter(this.h), nil, nil, nil, nil) + return newQSplitter(C.QSplitterHandle_Splitter(this.h)) } func (this *QSplitterHandle) SizeHint() *QSize { @@ -751,7 +718,7 @@ func miqt_exec_callback_QSplitterHandle_PaintEvent(self *C.QSplitterHandle, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QSplitterHandle{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -777,7 +744,7 @@ func miqt_exec_callback_QSplitterHandle_MouseMoveEvent(self *C.QSplitterHandle, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QSplitterHandle{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -803,7 +770,7 @@ func miqt_exec_callback_QSplitterHandle_MousePressEvent(self *C.QSplitterHandle, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QSplitterHandle{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -829,7 +796,7 @@ func miqt_exec_callback_QSplitterHandle_MouseReleaseEvent(self *C.QSplitterHandl } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QSplitterHandle{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -855,7 +822,7 @@ func miqt_exec_callback_QSplitterHandle_ResizeEvent(self *C.QSplitterHandle, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QSplitterHandle{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1065,7 +1032,7 @@ func miqt_exec_callback_QSplitterHandle_MouseDoubleClickEvent(self *C.QSplitterH } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1091,7 +1058,7 @@ func miqt_exec_callback_QSplitterHandle_WheelEvent(self *C.QSplitterHandle, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1117,7 +1084,7 @@ func miqt_exec_callback_QSplitterHandle_KeyPressEvent(self *C.QSplitterHandle, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1143,7 +1110,7 @@ func miqt_exec_callback_QSplitterHandle_KeyReleaseEvent(self *C.QSplitterHandle, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1169,7 +1136,7 @@ func miqt_exec_callback_QSplitterHandle_FocusInEvent(self *C.QSplitterHandle, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1195,7 +1162,7 @@ func miqt_exec_callback_QSplitterHandle_FocusOutEvent(self *C.QSplitterHandle, c } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1273,7 +1240,7 @@ func miqt_exec_callback_QSplitterHandle_MoveEvent(self *C.QSplitterHandle, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1299,7 +1266,7 @@ func miqt_exec_callback_QSplitterHandle_CloseEvent(self *C.QSplitterHandle, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1325,7 +1292,7 @@ func miqt_exec_callback_QSplitterHandle_ContextMenuEvent(self *C.QSplitterHandle } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1351,7 +1318,7 @@ func miqt_exec_callback_QSplitterHandle_TabletEvent(self *C.QSplitterHandle, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1377,7 +1344,7 @@ func miqt_exec_callback_QSplitterHandle_ActionEvent(self *C.QSplitterHandle, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1403,7 +1370,7 @@ func miqt_exec_callback_QSplitterHandle_DragEnterEvent(self *C.QSplitterHandle, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1429,7 +1396,7 @@ func miqt_exec_callback_QSplitterHandle_DragMoveEvent(self *C.QSplitterHandle, c } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1455,7 +1422,7 @@ func miqt_exec_callback_QSplitterHandle_DragLeaveEvent(self *C.QSplitterHandle, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1481,7 +1448,7 @@ func miqt_exec_callback_QSplitterHandle_DropEvent(self *C.QSplitterHandle, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1507,7 +1474,7 @@ func miqt_exec_callback_QSplitterHandle_ShowEvent(self *C.QSplitterHandle, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1533,7 +1500,7 @@ func miqt_exec_callback_QSplitterHandle_HideEvent(self *C.QSplitterHandle, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1729,7 +1696,7 @@ func miqt_exec_callback_QSplitterHandle_InputMethodEvent(self *C.QSplitterHandle } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QSplitterHandle{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qsplitter.h b/qt/gen_qsplitter.h index 601c33e3..955123e5 100644 --- a/qt/gen_qsplitter.h +++ b/qt/gen_qsplitter.h @@ -82,10 +82,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QSplitter_new(QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplitter_new2(QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplitter_new3(int param1, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplitter_new4(int param1, QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QSplitter* QSplitter_new(QWidget* parent); +QSplitter* QSplitter_new2(); +QSplitter* QSplitter_new3(int param1); +QSplitter* QSplitter_new4(int param1, QWidget* parent); +void QSplitter_virtbase(QSplitter* src, QFrame** outptr_QFrame); QMetaObject* QSplitter_MetaObject(const QSplitter* self); void* QSplitter_Metacast(QSplitter* self, const char* param1); struct miqt_string QSplitter_Tr(const char* s); @@ -146,7 +147,8 @@ void QSplitter_override_virtual_PaintEvent(void* self, intptr_t slot); void QSplitter_virtualbase_PaintEvent(void* self, QPaintEvent* param1); void QSplitter_Delete(QSplitter* self, bool isSubclass); -void QSplitterHandle_new(int o, QSplitter* parent, QSplitterHandle** outptr_QSplitterHandle, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QSplitterHandle* QSplitterHandle_new(int o, QSplitter* parent); +void QSplitterHandle_virtbase(QSplitterHandle* src, QWidget** outptr_QWidget); QMetaObject* QSplitterHandle_MetaObject(const QSplitterHandle* self); void* QSplitterHandle_Metacast(QSplitterHandle* self, const char* param1); struct miqt_string QSplitterHandle_Tr(const char* s); diff --git a/qt/gen_qstackedlayout.cpp b/qt/gen_qstackedlayout.cpp index 4fea5046..f3988160 100644 --- a/qt/gen_qstackedlayout.cpp +++ b/qt/gen_qstackedlayout.cpp @@ -436,28 +436,20 @@ public: }; -void QStackedLayout_new(QWidget* parent, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQStackedLayout* ret = new MiqtVirtualQStackedLayout(parent); - *outptr_QStackedLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QStackedLayout* QStackedLayout_new(QWidget* parent) { + return new MiqtVirtualQStackedLayout(parent); } -void QStackedLayout_new2(QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQStackedLayout* ret = new MiqtVirtualQStackedLayout(); - *outptr_QStackedLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QStackedLayout* QStackedLayout_new2() { + return new MiqtVirtualQStackedLayout(); } -void QStackedLayout_new3(QLayout* parentLayout, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQStackedLayout* ret = new MiqtVirtualQStackedLayout(parentLayout); - *outptr_QStackedLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QStackedLayout* QStackedLayout_new3(QLayout* parentLayout) { + return new MiqtVirtualQStackedLayout(parentLayout); +} + +void QStackedLayout_virtbase(QStackedLayout* src, QLayout** outptr_QLayout) { + *outptr_QLayout = static_cast(src); } QMetaObject* QStackedLayout_MetaObject(const QStackedLayout* self) { diff --git a/qt/gen_qstackedlayout.go b/qt/gen_qstackedlayout.go index 0ada8f2c..a4886ef0 100644 --- a/qt/gen_qstackedlayout.go +++ b/qt/gen_qstackedlayout.go @@ -42,59 +42,42 @@ func (this *QStackedLayout) UnsafePointer() unsafe.Pointer { } // newQStackedLayout constructs the type using only CGO pointers. -func newQStackedLayout(h *C.QStackedLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QStackedLayout { +func newQStackedLayout(h *C.QStackedLayout) *QStackedLayout { if h == nil { return nil } + var outptr_QLayout *C.QLayout = nil + C.QStackedLayout_virtbase(h, &outptr_QLayout) + return &QStackedLayout{h: h, - QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} + QLayout: newQLayout(outptr_QLayout)} } // UnsafeNewQStackedLayout constructs the type using only unsafe pointers. -func UnsafeNewQStackedLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QStackedLayout { - if h == nil { - return nil - } - - return &QStackedLayout{h: (*C.QStackedLayout)(h), - QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} +func UnsafeNewQStackedLayout(h unsafe.Pointer) *QStackedLayout { + return newQStackedLayout((*C.QStackedLayout)(h)) } // NewQStackedLayout constructs a new QStackedLayout object. func NewQStackedLayout(parent *QWidget) *QStackedLayout { - var outptr_QStackedLayout *C.QStackedLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QStackedLayout_new(parent.cPointer(), &outptr_QStackedLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQStackedLayout(outptr_QStackedLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQStackedLayout(C.QStackedLayout_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQStackedLayout2 constructs a new QStackedLayout object. func NewQStackedLayout2() *QStackedLayout { - var outptr_QStackedLayout *C.QStackedLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QStackedLayout_new2(&outptr_QStackedLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQStackedLayout(outptr_QStackedLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQStackedLayout(C.QStackedLayout_new2()) ret.isSubclass = true return ret } // NewQStackedLayout3 constructs a new QStackedLayout object. func NewQStackedLayout3(parentLayout *QLayout) *QStackedLayout { - var outptr_QStackedLayout *C.QStackedLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QStackedLayout_new3(parentLayout.cPointer(), &outptr_QStackedLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQStackedLayout(outptr_QStackedLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQStackedLayout(C.QStackedLayout_new3(parentLayout.cPointer())) ret.isSubclass = true return ret } @@ -136,7 +119,7 @@ func (this *QStackedLayout) InsertWidget(index int, w *QWidget) int { } func (this *QStackedLayout) CurrentWidget() *QWidget { - return newQWidget(C.QStackedLayout_CurrentWidget(this.h), nil, nil) + return newQWidget(C.QStackedLayout_CurrentWidget(this.h)) } func (this *QStackedLayout) CurrentIndex() int { @@ -144,7 +127,7 @@ func (this *QStackedLayout) CurrentIndex() int { } func (this *QStackedLayout) Widget(param1 int) *QWidget { - return newQWidget(C.QStackedLayout_Widget(this.h, (C.int)(param1)), nil, nil) + return newQWidget(C.QStackedLayout_Widget(this.h, (C.int)(param1))) } func (this *QStackedLayout) Count() int { @@ -649,7 +632,7 @@ func miqt_exec_callback_QStackedLayout_IndexOf(self *C.QStackedLayout, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(param1, nil, nil) + slotval1 := newQWidget(param1) virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_IndexOf, slotval1) @@ -709,7 +692,7 @@ func miqt_exec_callback_QStackedLayout_ControlTypes(self *C.QStackedLayout, cb C func (this *QStackedLayout) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QStackedLayout_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QStackedLayout_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QStackedLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -752,7 +735,7 @@ func miqt_exec_callback_QStackedLayout_ChildEvent(self *C.QStackedLayout, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(e, nil) + slotval1 := newQChildEvent(e) gofunc((&QStackedLayout{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qstackedlayout.h b/qt/gen_qstackedlayout.h index 190aedd0..0bd0b4f1 100644 --- a/qt/gen_qstackedlayout.h +++ b/qt/gen_qstackedlayout.h @@ -36,9 +36,10 @@ typedef struct QStackedLayout QStackedLayout; typedef struct QWidget QWidget; #endif -void QStackedLayout_new(QWidget* parent, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QStackedLayout_new2(QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QStackedLayout_new3(QLayout* parentLayout, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +QStackedLayout* QStackedLayout_new(QWidget* parent); +QStackedLayout* QStackedLayout_new2(); +QStackedLayout* QStackedLayout_new3(QLayout* parentLayout); +void QStackedLayout_virtbase(QStackedLayout* src, QLayout** outptr_QLayout); QMetaObject* QStackedLayout_MetaObject(const QStackedLayout* self); void* QStackedLayout_Metacast(QStackedLayout* self, const char* param1); struct miqt_string QStackedLayout_Tr(const char* s); diff --git a/qt/gen_qstackedwidget.cpp b/qt/gen_qstackedwidget.cpp index 9ab30d99..6fd275c9 100644 --- a/qt/gen_qstackedwidget.cpp +++ b/qt/gen_qstackedwidget.cpp @@ -117,22 +117,16 @@ public: }; -void QStackedWidget_new(QWidget* parent, QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQStackedWidget* ret = new MiqtVirtualQStackedWidget(parent); - *outptr_QStackedWidget = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QStackedWidget* QStackedWidget_new(QWidget* parent) { + return new MiqtVirtualQStackedWidget(parent); } -void QStackedWidget_new2(QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQStackedWidget* ret = new MiqtVirtualQStackedWidget(); - *outptr_QStackedWidget = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QStackedWidget* QStackedWidget_new2() { + return new MiqtVirtualQStackedWidget(); +} + +void QStackedWidget_virtbase(QStackedWidget* src, QFrame** outptr_QFrame) { + *outptr_QFrame = static_cast(src); } QMetaObject* QStackedWidget_MetaObject(const QStackedWidget* self) { diff --git a/qt/gen_qstackedwidget.go b/qt/gen_qstackedwidget.go index 3d86556c..9251b1dc 100644 --- a/qt/gen_qstackedwidget.go +++ b/qt/gen_qstackedwidget.go @@ -35,48 +35,34 @@ func (this *QStackedWidget) UnsafePointer() unsafe.Pointer { } // newQStackedWidget constructs the type using only CGO pointers. -func newQStackedWidget(h *C.QStackedWidget, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QStackedWidget { +func newQStackedWidget(h *C.QStackedWidget) *QStackedWidget { if h == nil { return nil } + var outptr_QFrame *C.QFrame = nil + C.QStackedWidget_virtbase(h, &outptr_QFrame) + return &QStackedWidget{h: h, - QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QFrame: newQFrame(outptr_QFrame)} } // UnsafeNewQStackedWidget constructs the type using only unsafe pointers. -func UnsafeNewQStackedWidget(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QStackedWidget { - if h == nil { - return nil - } - - return &QStackedWidget{h: (*C.QStackedWidget)(h), - QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQStackedWidget(h unsafe.Pointer) *QStackedWidget { + return newQStackedWidget((*C.QStackedWidget)(h)) } // NewQStackedWidget constructs a new QStackedWidget object. func NewQStackedWidget(parent *QWidget) *QStackedWidget { - var outptr_QStackedWidget *C.QStackedWidget = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QStackedWidget_new(parent.cPointer(), &outptr_QStackedWidget, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQStackedWidget(outptr_QStackedWidget, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQStackedWidget(C.QStackedWidget_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQStackedWidget2 constructs a new QStackedWidget object. func NewQStackedWidget2() *QStackedWidget { - var outptr_QStackedWidget *C.QStackedWidget = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QStackedWidget_new2(&outptr_QStackedWidget, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQStackedWidget(outptr_QStackedWidget, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQStackedWidget(C.QStackedWidget_new2()) ret.isSubclass = true return ret } @@ -122,7 +108,7 @@ func (this *QStackedWidget) RemoveWidget(w *QWidget) { } func (this *QStackedWidget) CurrentWidget() *QWidget { - return newQWidget(C.QStackedWidget_CurrentWidget(this.h), nil, nil) + return newQWidget(C.QStackedWidget_CurrentWidget(this.h)) } func (this *QStackedWidget) CurrentIndex() int { @@ -134,7 +120,7 @@ func (this *QStackedWidget) IndexOf(param1 *QWidget) int { } func (this *QStackedWidget) Widget(param1 int) *QWidget { - return newQWidget(C.QStackedWidget_Widget(this.h, (C.int)(param1)), nil, nil) + return newQWidget(C.QStackedWidget_Widget(this.h, (C.int)(param1))) } func (this *QStackedWidget) Count() int { @@ -308,7 +294,7 @@ func miqt_exec_callback_QStackedWidget_PaintEvent(self *C.QStackedWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QStackedWidget{h: self}).callVirtualBase_PaintEvent, slotval1) diff --git a/qt/gen_qstackedwidget.h b/qt/gen_qstackedwidget.h index ebba3e99..1b361f58 100644 --- a/qt/gen_qstackedwidget.h +++ b/qt/gen_qstackedwidget.h @@ -36,8 +36,9 @@ typedef struct QStackedWidget QStackedWidget; typedef struct QWidget QWidget; #endif -void QStackedWidget_new(QWidget* parent, QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QStackedWidget_new2(QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QStackedWidget* QStackedWidget_new(QWidget* parent); +QStackedWidget* QStackedWidget_new2(); +void QStackedWidget_virtbase(QStackedWidget* src, QFrame** outptr_QFrame); QMetaObject* QStackedWidget_MetaObject(const QStackedWidget* self); void* QStackedWidget_Metacast(QStackedWidget* self, const char* param1); struct miqt_string QStackedWidget_Tr(const char* s); diff --git a/qt/gen_qstandarditemmodel.cpp b/qt/gen_qstandarditemmodel.cpp index 19c21079..eb7515c0 100644 --- a/qt/gen_qstandarditemmodel.cpp +++ b/qt/gen_qstandarditemmodel.cpp @@ -205,31 +205,26 @@ public: }; -void QStandardItem_new(QStandardItem** outptr_QStandardItem) { - MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(); - *outptr_QStandardItem = ret; +QStandardItem* QStandardItem_new() { + return new MiqtVirtualQStandardItem(); } -void QStandardItem_new2(struct miqt_string text, QStandardItem** outptr_QStandardItem) { +QStandardItem* QStandardItem_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(text_QString); - *outptr_QStandardItem = ret; + return new MiqtVirtualQStandardItem(text_QString); } -void QStandardItem_new3(QIcon* icon, struct miqt_string text, QStandardItem** outptr_QStandardItem) { +QStandardItem* QStandardItem_new3(QIcon* icon, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(*icon, text_QString); - *outptr_QStandardItem = ret; + return new MiqtVirtualQStandardItem(*icon, text_QString); } -void QStandardItem_new4(int rows, QStandardItem** outptr_QStandardItem) { - MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(static_cast(rows)); - *outptr_QStandardItem = ret; +QStandardItem* QStandardItem_new4(int rows) { + return new MiqtVirtualQStandardItem(static_cast(rows)); } -void QStandardItem_new5(int rows, int columns, QStandardItem** outptr_QStandardItem) { - MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(static_cast(rows), static_cast(columns)); - *outptr_QStandardItem = ret; +QStandardItem* QStandardItem_new5(int rows, int columns) { + return new MiqtVirtualQStandardItem(static_cast(rows), static_cast(columns)); } QVariant* QStandardItem_Data(const QStandardItem* self, int role) { @@ -1773,32 +1768,24 @@ public: }; -void QStandardItemModel_new(QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(); - *outptr_QStandardItemModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStandardItemModel* QStandardItemModel_new() { + return new MiqtVirtualQStandardItemModel(); } -void QStandardItemModel_new2(int rows, int columns, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(static_cast(rows), static_cast(columns)); - *outptr_QStandardItemModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStandardItemModel* QStandardItemModel_new2(int rows, int columns) { + return new MiqtVirtualQStandardItemModel(static_cast(rows), static_cast(columns)); } -void QStandardItemModel_new3(QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(parent); - *outptr_QStandardItemModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStandardItemModel* QStandardItemModel_new3(QObject* parent) { + return new MiqtVirtualQStandardItemModel(parent); } -void QStandardItemModel_new4(int rows, int columns, QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(static_cast(rows), static_cast(columns), parent); - *outptr_QStandardItemModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStandardItemModel* QStandardItemModel_new4(int rows, int columns, QObject* parent) { + return new MiqtVirtualQStandardItemModel(static_cast(rows), static_cast(columns), parent); +} + +void QStandardItemModel_virtbase(QStandardItemModel* src, QAbstractItemModel** outptr_QAbstractItemModel) { + *outptr_QAbstractItemModel = static_cast(src); } QMetaObject* QStandardItemModel_MetaObject(const QStandardItemModel* self) { diff --git a/qt/gen_qstandarditemmodel.go b/qt/gen_qstandarditemmodel.go index 118cd55a..8af05ec9 100644 --- a/qt/gen_qstandarditemmodel.go +++ b/qt/gen_qstandarditemmodel.go @@ -45,24 +45,19 @@ func newQStandardItem(h *C.QStandardItem) *QStandardItem { if h == nil { return nil } + return &QStandardItem{h: h} } // UnsafeNewQStandardItem constructs the type using only unsafe pointers. func UnsafeNewQStandardItem(h unsafe.Pointer) *QStandardItem { - if h == nil { - return nil - } - - return &QStandardItem{h: (*C.QStandardItem)(h)} + return newQStandardItem((*C.QStandardItem)(h)) } // NewQStandardItem constructs a new QStandardItem object. func NewQStandardItem() *QStandardItem { - var outptr_QStandardItem *C.QStandardItem = nil - C.QStandardItem_new(&outptr_QStandardItem) - ret := newQStandardItem(outptr_QStandardItem) + ret := newQStandardItem(C.QStandardItem_new()) ret.isSubclass = true return ret } @@ -73,10 +68,8 @@ func NewQStandardItem2(text string) *QStandardItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QStandardItem *C.QStandardItem = nil - C.QStandardItem_new2(text_ms, &outptr_QStandardItem) - ret := newQStandardItem(outptr_QStandardItem) + ret := newQStandardItem(C.QStandardItem_new2(text_ms)) ret.isSubclass = true return ret } @@ -87,30 +80,24 @@ func NewQStandardItem3(icon *QIcon, text string) *QStandardItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QStandardItem *C.QStandardItem = nil - C.QStandardItem_new3(icon.cPointer(), text_ms, &outptr_QStandardItem) - ret := newQStandardItem(outptr_QStandardItem) + ret := newQStandardItem(C.QStandardItem_new3(icon.cPointer(), text_ms)) ret.isSubclass = true return ret } // NewQStandardItem4 constructs a new QStandardItem object. func NewQStandardItem4(rows int) *QStandardItem { - var outptr_QStandardItem *C.QStandardItem = nil - C.QStandardItem_new4((C.int)(rows), &outptr_QStandardItem) - ret := newQStandardItem(outptr_QStandardItem) + ret := newQStandardItem(C.QStandardItem_new4((C.int)(rows))) ret.isSubclass = true return ret } // NewQStandardItem5 constructs a new QStandardItem object. func NewQStandardItem5(rows int, columns int) *QStandardItem { - var outptr_QStandardItem *C.QStandardItem = nil - C.QStandardItem_new5((C.int)(rows), (C.int)(columns), &outptr_QStandardItem) - ret := newQStandardItem(outptr_QStandardItem) + ret := newQStandardItem(C.QStandardItem_new5((C.int)(rows), (C.int)(columns))) ret.isSubclass = true return ret } @@ -384,7 +371,7 @@ func (this *QStandardItem) Index() *QModelIndex { } func (this *QStandardItem) Model() *QStandardItemModel { - return newQStandardItemModel(C.QStandardItem_Model(this.h), nil, nil) + return newQStandardItemModel(C.QStandardItem_Model(this.h)) } func (this *QStandardItem) RowCount() int { @@ -794,68 +781,50 @@ func (this *QStandardItemModel) UnsafePointer() unsafe.Pointer { } // newQStandardItemModel constructs the type using only CGO pointers. -func newQStandardItemModel(h *C.QStandardItemModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QStandardItemModel { +func newQStandardItemModel(h *C.QStandardItemModel) *QStandardItemModel { if h == nil { return nil } + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + C.QStandardItemModel_virtbase(h, &outptr_QAbstractItemModel) + return &QStandardItemModel{h: h, - QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} + QAbstractItemModel: newQAbstractItemModel(outptr_QAbstractItemModel)} } // UnsafeNewQStandardItemModel constructs the type using only unsafe pointers. -func UnsafeNewQStandardItemModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QStandardItemModel { - if h == nil { - return nil - } - - return &QStandardItemModel{h: (*C.QStandardItemModel)(h), - QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} +func UnsafeNewQStandardItemModel(h unsafe.Pointer) *QStandardItemModel { + return newQStandardItemModel((*C.QStandardItemModel)(h)) } // NewQStandardItemModel constructs a new QStandardItemModel object. func NewQStandardItemModel() *QStandardItemModel { - var outptr_QStandardItemModel *C.QStandardItemModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStandardItemModel_new(&outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStandardItemModel(C.QStandardItemModel_new()) ret.isSubclass = true return ret } // NewQStandardItemModel2 constructs a new QStandardItemModel object. func NewQStandardItemModel2(rows int, columns int) *QStandardItemModel { - var outptr_QStandardItemModel *C.QStandardItemModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStandardItemModel_new2((C.int)(rows), (C.int)(columns), &outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStandardItemModel(C.QStandardItemModel_new2((C.int)(rows), (C.int)(columns))) ret.isSubclass = true return ret } // NewQStandardItemModel3 constructs a new QStandardItemModel object. func NewQStandardItemModel3(parent *QObject) *QStandardItemModel { - var outptr_QStandardItemModel *C.QStandardItemModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStandardItemModel_new3(parent.cPointer(), &outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStandardItemModel(C.QStandardItemModel_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQStandardItemModel4 constructs a new QStandardItemModel object. func NewQStandardItemModel4(rows int, columns int, parent *QObject) *QStandardItemModel { - var outptr_QStandardItemModel *C.QStandardItemModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStandardItemModel_new4((C.int)(rows), (C.int)(columns), parent.cPointer(), &outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStandardItemModel(C.QStandardItemModel_new4((C.int)(rows), (C.int)(columns), parent.cPointer())) ret.isSubclass = true return ret } @@ -1248,7 +1217,7 @@ func (this *QStandardItemModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QStandardItemModel_MimeData(this.h, indexes_ma), nil) + return newQMimeData(C.QStandardItemModel_MimeData(this.h, indexes_ma)) } func (this *QStandardItemModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -2052,7 +2021,7 @@ func (this *QStandardItemModel) callVirtualBase_MimeData(indexes []QModelIndex) } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QStandardItemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QStandardItemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QStandardItemModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -2106,7 +2075,7 @@ func miqt_exec_callback_QStandardItemModel_DropMimeData(self *C.QStandardItemMod } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -2142,7 +2111,7 @@ func miqt_exec_callback_QStandardItemModel_CanDropMimeData(self *C.QStandardItem } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt/gen_qstandarditemmodel.h b/qt/gen_qstandarditemmodel.h index eedbe1af..f79ae623 100644 --- a/qt/gen_qstandarditemmodel.h +++ b/qt/gen_qstandarditemmodel.h @@ -44,11 +44,11 @@ typedef struct QStandardItemModel QStandardItemModel; typedef struct QVariant QVariant; #endif -void QStandardItem_new(QStandardItem** outptr_QStandardItem); -void QStandardItem_new2(struct miqt_string text, QStandardItem** outptr_QStandardItem); -void QStandardItem_new3(QIcon* icon, struct miqt_string text, QStandardItem** outptr_QStandardItem); -void QStandardItem_new4(int rows, QStandardItem** outptr_QStandardItem); -void QStandardItem_new5(int rows, int columns, QStandardItem** outptr_QStandardItem); +QStandardItem* QStandardItem_new(); +QStandardItem* QStandardItem_new2(struct miqt_string text); +QStandardItem* QStandardItem_new3(QIcon* icon, struct miqt_string text); +QStandardItem* QStandardItem_new4(int rows); +QStandardItem* QStandardItem_new5(int rows, int columns); QVariant* QStandardItem_Data(const QStandardItem* self, int role); void QStandardItem_SetData(QStandardItem* self, QVariant* value, int role); void QStandardItem_ClearData(QStandardItem* self); @@ -153,10 +153,11 @@ void QStandardItem_override_virtual_OperatorLesser(void* self, intptr_t slot); bool QStandardItem_virtualbase_OperatorLesser(const void* self, QStandardItem* other); void QStandardItem_Delete(QStandardItem* self, bool isSubclass); -void QStandardItemModel_new(QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QStandardItemModel_new2(int rows, int columns, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QStandardItemModel_new3(QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QStandardItemModel_new4(int rows, int columns, QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QStandardItemModel* QStandardItemModel_new(); +QStandardItemModel* QStandardItemModel_new2(int rows, int columns); +QStandardItemModel* QStandardItemModel_new3(QObject* parent); +QStandardItemModel* QStandardItemModel_new4(int rows, int columns, QObject* parent); +void QStandardItemModel_virtbase(QStandardItemModel* src, QAbstractItemModel** outptr_QAbstractItemModel); QMetaObject* QStandardItemModel_MetaObject(const QStandardItemModel* self); void* QStandardItemModel_Metacast(QStandardItemModel* self, const char* param1); struct miqt_string QStandardItemModel_Tr(const char* s); diff --git a/qt/gen_qstandardpaths.go b/qt/gen_qstandardpaths.go index 48aea22a..a9e1861b 100644 --- a/qt/gen_qstandardpaths.go +++ b/qt/gen_qstandardpaths.go @@ -68,16 +68,13 @@ func newQStandardPaths(h *C.QStandardPaths) *QStandardPaths { if h == nil { return nil } + return &QStandardPaths{h: h} } // UnsafeNewQStandardPaths constructs the type using only unsafe pointers. func UnsafeNewQStandardPaths(h unsafe.Pointer) *QStandardPaths { - if h == nil { - return nil - } - - return &QStandardPaths{h: (*C.QStandardPaths)(h)} + return newQStandardPaths((*C.QStandardPaths)(h)) } func QStandardPaths_WritableLocation(typeVal QStandardPaths__StandardLocation) string { diff --git a/qt/gen_qstate.cpp b/qt/gen_qstate.cpp index f57ee373..e97b5ffe 100644 --- a/qt/gen_qstate.cpp +++ b/qt/gen_qstate.cpp @@ -97,32 +97,24 @@ public: }; -void QState_new(QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { - MiqtVirtualQState* ret = new MiqtVirtualQState(); - *outptr_QState = ret; - *outptr_QAbstractState = static_cast(ret); - *outptr_QObject = static_cast(ret); +QState* QState_new() { + return new MiqtVirtualQState(); } -void QState_new2(int childMode, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { - MiqtVirtualQState* ret = new MiqtVirtualQState(static_cast(childMode)); - *outptr_QState = ret; - *outptr_QAbstractState = static_cast(ret); - *outptr_QObject = static_cast(ret); +QState* QState_new2(int childMode) { + return new MiqtVirtualQState(static_cast(childMode)); } -void QState_new3(QState* parent, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { - MiqtVirtualQState* ret = new MiqtVirtualQState(parent); - *outptr_QState = ret; - *outptr_QAbstractState = static_cast(ret); - *outptr_QObject = static_cast(ret); +QState* QState_new3(QState* parent) { + return new MiqtVirtualQState(parent); } -void QState_new4(int childMode, QState* parent, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { - MiqtVirtualQState* ret = new MiqtVirtualQState(static_cast(childMode), parent); - *outptr_QState = ret; - *outptr_QAbstractState = static_cast(ret); - *outptr_QObject = static_cast(ret); +QState* QState_new4(int childMode, QState* parent) { + return new MiqtVirtualQState(static_cast(childMode), parent); +} + +void QState_virtbase(QState* src, QAbstractState** outptr_QAbstractState) { + *outptr_QAbstractState = static_cast(src); } QMetaObject* QState_MetaObject(const QState* self) { diff --git a/qt/gen_qstate.go b/qt/gen_qstate.go index 0c6675fa..9e9e5607 100644 --- a/qt/gen_qstate.go +++ b/qt/gen_qstate.go @@ -49,68 +49,50 @@ func (this *QState) UnsafePointer() unsafe.Pointer { } // newQState constructs the type using only CGO pointers. -func newQState(h *C.QState, h_QAbstractState *C.QAbstractState, h_QObject *C.QObject) *QState { +func newQState(h *C.QState) *QState { if h == nil { return nil } + var outptr_QAbstractState *C.QAbstractState = nil + C.QState_virtbase(h, &outptr_QAbstractState) + return &QState{h: h, - QAbstractState: newQAbstractState(h_QAbstractState, h_QObject)} + QAbstractState: newQAbstractState(outptr_QAbstractState)} } // UnsafeNewQState constructs the type using only unsafe pointers. -func UnsafeNewQState(h unsafe.Pointer, h_QAbstractState unsafe.Pointer, h_QObject unsafe.Pointer) *QState { - if h == nil { - return nil - } - - return &QState{h: (*C.QState)(h), - QAbstractState: UnsafeNewQAbstractState(h_QAbstractState, h_QObject)} +func UnsafeNewQState(h unsafe.Pointer) *QState { + return newQState((*C.QState)(h)) } // NewQState constructs a new QState object. func NewQState() *QState { - var outptr_QState *C.QState = nil - var outptr_QAbstractState *C.QAbstractState = nil - var outptr_QObject *C.QObject = nil - C.QState_new(&outptr_QState, &outptr_QAbstractState, &outptr_QObject) - ret := newQState(outptr_QState, outptr_QAbstractState, outptr_QObject) + ret := newQState(C.QState_new()) ret.isSubclass = true return ret } // NewQState2 constructs a new QState object. func NewQState2(childMode QState__ChildMode) *QState { - var outptr_QState *C.QState = nil - var outptr_QAbstractState *C.QAbstractState = nil - var outptr_QObject *C.QObject = nil - C.QState_new2((C.int)(childMode), &outptr_QState, &outptr_QAbstractState, &outptr_QObject) - ret := newQState(outptr_QState, outptr_QAbstractState, outptr_QObject) + ret := newQState(C.QState_new2((C.int)(childMode))) ret.isSubclass = true return ret } // NewQState3 constructs a new QState object. func NewQState3(parent *QState) *QState { - var outptr_QState *C.QState = nil - var outptr_QAbstractState *C.QAbstractState = nil - var outptr_QObject *C.QObject = nil - C.QState_new3(parent.cPointer(), &outptr_QState, &outptr_QAbstractState, &outptr_QObject) - ret := newQState(outptr_QState, outptr_QAbstractState, outptr_QObject) + ret := newQState(C.QState_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQState4 constructs a new QState object. func NewQState4(childMode QState__ChildMode, parent *QState) *QState { - var outptr_QState *C.QState = nil - var outptr_QAbstractState *C.QAbstractState = nil - var outptr_QObject *C.QObject = nil - C.QState_new4((C.int)(childMode), parent.cPointer(), &outptr_QState, &outptr_QAbstractState, &outptr_QObject) - ret := newQState(outptr_QState, outptr_QAbstractState, outptr_QObject) + ret := newQState(C.QState_new4((C.int)(childMode), parent.cPointer())) ret.isSubclass = true return ret } @@ -144,7 +126,7 @@ func QState_TrUtf8(s string) string { } func (this *QState) ErrorState() *QAbstractState { - return newQAbstractState(C.QState_ErrorState(this.h), nil) + return newQAbstractState(C.QState_ErrorState(this.h)) } func (this *QState) SetErrorState(state *QAbstractState) { @@ -158,11 +140,11 @@ func (this *QState) AddTransition(transition *QAbstractTransition) { func (this *QState) AddTransition2(sender *QObject, signal string, target *QAbstractState) *QSignalTransition { signal_Cstring := C.CString(signal) defer C.free(unsafe.Pointer(signal_Cstring)) - return newQSignalTransition(C.QState_AddTransition2(this.h, sender.cPointer(), signal_Cstring, target.cPointer()), nil, nil) + return newQSignalTransition(C.QState_AddTransition2(this.h, sender.cPointer(), signal_Cstring, target.cPointer())) } func (this *QState) AddTransitionWithTarget(target *QAbstractState) *QAbstractTransition { - return newQAbstractTransition(C.QState_AddTransitionWithTarget(this.h, target.cPointer()), nil) + return newQAbstractTransition(C.QState_AddTransitionWithTarget(this.h, target.cPointer())) } func (this *QState) RemoveTransition(transition *QAbstractTransition) { @@ -174,13 +156,13 @@ func (this *QState) Transitions() []*QAbstractTransition { _ret := make([]*QAbstractTransition, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractTransition)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAbstractTransition(_outCast[i], nil) + _ret[i] = newQAbstractTransition(_outCast[i]) } return _ret } func (this *QState) InitialState() *QAbstractState { - return newQAbstractState(C.QState_InitialState(this.h), nil) + return newQAbstractState(C.QState_InitialState(this.h)) } func (this *QState) SetInitialState(state *QAbstractState) { diff --git a/qt/gen_qstate.h b/qt/gen_qstate.h index 4d38c662..16afb01f 100644 --- a/qt/gen_qstate.h +++ b/qt/gen_qstate.h @@ -34,10 +34,11 @@ typedef struct QState QState; typedef struct QVariant QVariant; #endif -void QState_new(QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); -void QState_new2(int childMode, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); -void QState_new3(QState* parent, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); -void QState_new4(int childMode, QState* parent, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); +QState* QState_new(); +QState* QState_new2(int childMode); +QState* QState_new3(QState* parent); +QState* QState_new4(int childMode, QState* parent); +void QState_virtbase(QState* src, QAbstractState** outptr_QAbstractState); QMetaObject* QState_MetaObject(const QState* self); void* QState_Metacast(QState* self, const char* param1); struct miqt_string QState_Tr(const char* s); diff --git a/qt/gen_qstatemachine.cpp b/qt/gen_qstatemachine.cpp index 63276c6f..74516821 100644 --- a/qt/gen_qstatemachine.cpp +++ b/qt/gen_qstatemachine.cpp @@ -219,36 +219,24 @@ public: }; -void QStateMachine_new(QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { - MiqtVirtualQStateMachine* ret = new MiqtVirtualQStateMachine(); - *outptr_QStateMachine = ret; - *outptr_QState = static_cast(ret); - *outptr_QAbstractState = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStateMachine* QStateMachine_new() { + return new MiqtVirtualQStateMachine(); } -void QStateMachine_new2(int childMode, QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { - MiqtVirtualQStateMachine* ret = new MiqtVirtualQStateMachine(static_cast(childMode)); - *outptr_QStateMachine = ret; - *outptr_QState = static_cast(ret); - *outptr_QAbstractState = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStateMachine* QStateMachine_new2(int childMode) { + return new MiqtVirtualQStateMachine(static_cast(childMode)); } -void QStateMachine_new3(QObject* parent, QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { - MiqtVirtualQStateMachine* ret = new MiqtVirtualQStateMachine(parent); - *outptr_QStateMachine = ret; - *outptr_QState = static_cast(ret); - *outptr_QAbstractState = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStateMachine* QStateMachine_new3(QObject* parent) { + return new MiqtVirtualQStateMachine(parent); } -void QStateMachine_new4(int childMode, QObject* parent, QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject) { - MiqtVirtualQStateMachine* ret = new MiqtVirtualQStateMachine(static_cast(childMode), parent); - *outptr_QStateMachine = ret; - *outptr_QState = static_cast(ret); - *outptr_QAbstractState = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStateMachine* QStateMachine_new4(int childMode, QObject* parent) { + return new MiqtVirtualQStateMachine(static_cast(childMode), parent); +} + +void QStateMachine_virtbase(QStateMachine* src, QState** outptr_QState) { + *outptr_QState = static_cast(src); } QMetaObject* QStateMachine_MetaObject(const QStateMachine* self) { @@ -525,10 +513,12 @@ void QStateMachine_Delete(QStateMachine* self, bool isSubclass) { } } -void QStateMachine__SignalEvent_new(QStateMachine__SignalEvent* param1, QStateMachine__SignalEvent** outptr_QStateMachine__SignalEvent, QEvent** outptr_QEvent) { - QStateMachine::SignalEvent* ret = new QStateMachine::SignalEvent(*param1); - *outptr_QStateMachine__SignalEvent = ret; - *outptr_QEvent = static_cast(ret); +QStateMachine__SignalEvent* QStateMachine__SignalEvent_new(QStateMachine__SignalEvent* param1) { + return new QStateMachine::SignalEvent(*param1); +} + +void QStateMachine__SignalEvent_virtbase(QStateMachine__SignalEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QObject* QStateMachine__SignalEvent_Sender(const QStateMachine__SignalEvent* self) { @@ -547,16 +537,16 @@ void QStateMachine__SignalEvent_Delete(QStateMachine__SignalEvent* self, bool is } } -void QStateMachine__WrappedEvent_new(QObject* object, QEvent* event, QStateMachine__WrappedEvent** outptr_QStateMachine__WrappedEvent, QEvent** outptr_QEvent) { - QStateMachine::WrappedEvent* ret = new QStateMachine::WrappedEvent(object, event); - *outptr_QStateMachine__WrappedEvent = ret; - *outptr_QEvent = static_cast(ret); +QStateMachine__WrappedEvent* QStateMachine__WrappedEvent_new(QObject* object, QEvent* event) { + return new QStateMachine::WrappedEvent(object, event); } -void QStateMachine__WrappedEvent_new2(QStateMachine__WrappedEvent* param1, QStateMachine__WrappedEvent** outptr_QStateMachine__WrappedEvent, QEvent** outptr_QEvent) { - QStateMachine::WrappedEvent* ret = new QStateMachine::WrappedEvent(*param1); - *outptr_QStateMachine__WrappedEvent = ret; - *outptr_QEvent = static_cast(ret); +QStateMachine__WrappedEvent* QStateMachine__WrappedEvent_new2(QStateMachine__WrappedEvent* param1) { + return new QStateMachine::WrappedEvent(*param1); +} + +void QStateMachine__WrappedEvent_virtbase(QStateMachine__WrappedEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QObject* QStateMachine__WrappedEvent_Object(const QStateMachine__WrappedEvent* self) { diff --git a/qt/gen_qstatemachine.go b/qt/gen_qstatemachine.go index fe504364..3df7c131 100644 --- a/qt/gen_qstatemachine.go +++ b/qt/gen_qstatemachine.go @@ -52,72 +52,50 @@ func (this *QStateMachine) UnsafePointer() unsafe.Pointer { } // newQStateMachine constructs the type using only CGO pointers. -func newQStateMachine(h *C.QStateMachine, h_QState *C.QState, h_QAbstractState *C.QAbstractState, h_QObject *C.QObject) *QStateMachine { +func newQStateMachine(h *C.QStateMachine) *QStateMachine { if h == nil { return nil } + var outptr_QState *C.QState = nil + C.QStateMachine_virtbase(h, &outptr_QState) + return &QStateMachine{h: h, - QState: newQState(h_QState, h_QAbstractState, h_QObject)} + QState: newQState(outptr_QState)} } // UnsafeNewQStateMachine constructs the type using only unsafe pointers. -func UnsafeNewQStateMachine(h unsafe.Pointer, h_QState unsafe.Pointer, h_QAbstractState unsafe.Pointer, h_QObject unsafe.Pointer) *QStateMachine { - if h == nil { - return nil - } - - return &QStateMachine{h: (*C.QStateMachine)(h), - QState: UnsafeNewQState(h_QState, h_QAbstractState, h_QObject)} +func UnsafeNewQStateMachine(h unsafe.Pointer) *QStateMachine { + return newQStateMachine((*C.QStateMachine)(h)) } // NewQStateMachine constructs a new QStateMachine object. func NewQStateMachine() *QStateMachine { - var outptr_QStateMachine *C.QStateMachine = nil - var outptr_QState *C.QState = nil - var outptr_QAbstractState *C.QAbstractState = nil - var outptr_QObject *C.QObject = nil - C.QStateMachine_new(&outptr_QStateMachine, &outptr_QState, &outptr_QAbstractState, &outptr_QObject) - ret := newQStateMachine(outptr_QStateMachine, outptr_QState, outptr_QAbstractState, outptr_QObject) + ret := newQStateMachine(C.QStateMachine_new()) ret.isSubclass = true return ret } // NewQStateMachine2 constructs a new QStateMachine object. func NewQStateMachine2(childMode QState__ChildMode) *QStateMachine { - var outptr_QStateMachine *C.QStateMachine = nil - var outptr_QState *C.QState = nil - var outptr_QAbstractState *C.QAbstractState = nil - var outptr_QObject *C.QObject = nil - C.QStateMachine_new2((C.int)(childMode), &outptr_QStateMachine, &outptr_QState, &outptr_QAbstractState, &outptr_QObject) - ret := newQStateMachine(outptr_QStateMachine, outptr_QState, outptr_QAbstractState, outptr_QObject) + ret := newQStateMachine(C.QStateMachine_new2((C.int)(childMode))) ret.isSubclass = true return ret } // NewQStateMachine3 constructs a new QStateMachine object. func NewQStateMachine3(parent *QObject) *QStateMachine { - var outptr_QStateMachine *C.QStateMachine = nil - var outptr_QState *C.QState = nil - var outptr_QAbstractState *C.QAbstractState = nil - var outptr_QObject *C.QObject = nil - C.QStateMachine_new3(parent.cPointer(), &outptr_QStateMachine, &outptr_QState, &outptr_QAbstractState, &outptr_QObject) - ret := newQStateMachine(outptr_QStateMachine, outptr_QState, outptr_QAbstractState, outptr_QObject) + ret := newQStateMachine(C.QStateMachine_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQStateMachine4 constructs a new QStateMachine object. func NewQStateMachine4(childMode QState__ChildMode, parent *QObject) *QStateMachine { - var outptr_QStateMachine *C.QStateMachine = nil - var outptr_QState *C.QState = nil - var outptr_QAbstractState *C.QAbstractState = nil - var outptr_QObject *C.QObject = nil - C.QStateMachine_new4((C.int)(childMode), parent.cPointer(), &outptr_QStateMachine, &outptr_QState, &outptr_QAbstractState, &outptr_QObject) - ret := newQStateMachine(outptr_QStateMachine, outptr_QState, outptr_QAbstractState, outptr_QObject) + ret := newQStateMachine(C.QStateMachine_new4((C.int)(childMode), parent.cPointer())) ret.isSubclass = true return ret } @@ -194,7 +172,7 @@ func (this *QStateMachine) DefaultAnimations() []*QAbstractAnimation { _ret := make([]*QAbstractAnimation, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractAnimation)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAbstractAnimation(_outCast[i], nil) + _ret[i] = newQAbstractAnimation(_outCast[i]) } return _ret } @@ -228,7 +206,7 @@ func (this *QStateMachine) Configuration() map[*QAbstractState]struct{} { _ret := make(map[*QAbstractState]struct{}, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractState)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _element := newQAbstractState(_outCast[i], nil) + _element := newQAbstractState(_outCast[i]) _ret[_element] = struct{}{} } @@ -568,31 +546,26 @@ func (this *QStateMachine__SignalEvent) UnsafePointer() unsafe.Pointer { } // newQStateMachine__SignalEvent constructs the type using only CGO pointers. -func newQStateMachine__SignalEvent(h *C.QStateMachine__SignalEvent, h_QEvent *C.QEvent) *QStateMachine__SignalEvent { +func newQStateMachine__SignalEvent(h *C.QStateMachine__SignalEvent) *QStateMachine__SignalEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QStateMachine__SignalEvent_virtbase(h, &outptr_QEvent) + return &QStateMachine__SignalEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQStateMachine__SignalEvent constructs the type using only unsafe pointers. -func UnsafeNewQStateMachine__SignalEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QStateMachine__SignalEvent { - if h == nil { - return nil - } - - return &QStateMachine__SignalEvent{h: (*C.QStateMachine__SignalEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQStateMachine__SignalEvent(h unsafe.Pointer) *QStateMachine__SignalEvent { + return newQStateMachine__SignalEvent((*C.QStateMachine__SignalEvent)(h)) } // NewQStateMachine__SignalEvent constructs a new QStateMachine::SignalEvent object. func NewQStateMachine__SignalEvent(param1 *QStateMachine__SignalEvent) *QStateMachine__SignalEvent { - var outptr_QStateMachine__SignalEvent *C.QStateMachine__SignalEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QStateMachine__SignalEvent_new(param1.cPointer(), &outptr_QStateMachine__SignalEvent, &outptr_QEvent) - ret := newQStateMachine__SignalEvent(outptr_QStateMachine__SignalEvent, outptr_QEvent) + ret := newQStateMachine__SignalEvent(C.QStateMachine__SignalEvent_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -640,42 +613,34 @@ func (this *QStateMachine__WrappedEvent) UnsafePointer() unsafe.Pointer { } // newQStateMachine__WrappedEvent constructs the type using only CGO pointers. -func newQStateMachine__WrappedEvent(h *C.QStateMachine__WrappedEvent, h_QEvent *C.QEvent) *QStateMachine__WrappedEvent { +func newQStateMachine__WrappedEvent(h *C.QStateMachine__WrappedEvent) *QStateMachine__WrappedEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QStateMachine__WrappedEvent_virtbase(h, &outptr_QEvent) + return &QStateMachine__WrappedEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQStateMachine__WrappedEvent constructs the type using only unsafe pointers. -func UnsafeNewQStateMachine__WrappedEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QStateMachine__WrappedEvent { - if h == nil { - return nil - } - - return &QStateMachine__WrappedEvent{h: (*C.QStateMachine__WrappedEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQStateMachine__WrappedEvent(h unsafe.Pointer) *QStateMachine__WrappedEvent { + return newQStateMachine__WrappedEvent((*C.QStateMachine__WrappedEvent)(h)) } // NewQStateMachine__WrappedEvent constructs a new QStateMachine::WrappedEvent object. func NewQStateMachine__WrappedEvent(object *QObject, event *QEvent) *QStateMachine__WrappedEvent { - var outptr_QStateMachine__WrappedEvent *C.QStateMachine__WrappedEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QStateMachine__WrappedEvent_new(object.cPointer(), event.cPointer(), &outptr_QStateMachine__WrappedEvent, &outptr_QEvent) - ret := newQStateMachine__WrappedEvent(outptr_QStateMachine__WrappedEvent, outptr_QEvent) + ret := newQStateMachine__WrappedEvent(C.QStateMachine__WrappedEvent_new(object.cPointer(), event.cPointer())) ret.isSubclass = true return ret } // NewQStateMachine__WrappedEvent2 constructs a new QStateMachine::WrappedEvent object. func NewQStateMachine__WrappedEvent2(param1 *QStateMachine__WrappedEvent) *QStateMachine__WrappedEvent { - var outptr_QStateMachine__WrappedEvent *C.QStateMachine__WrappedEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QStateMachine__WrappedEvent_new2(param1.cPointer(), &outptr_QStateMachine__WrappedEvent, &outptr_QEvent) - ret := newQStateMachine__WrappedEvent(outptr_QStateMachine__WrappedEvent, outptr_QEvent) + ret := newQStateMachine__WrappedEvent(C.QStateMachine__WrappedEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qstatemachine.h b/qt/gen_qstatemachine.h index 191e52d2..aad5946c 100644 --- a/qt/gen_qstatemachine.h +++ b/qt/gen_qstatemachine.h @@ -44,10 +44,11 @@ typedef struct QStateMachine__SignalEvent QStateMachine__SignalEvent; typedef struct QStateMachine__WrappedEvent QStateMachine__WrappedEvent; #endif -void QStateMachine_new(QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); -void QStateMachine_new2(int childMode, QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); -void QStateMachine_new3(QObject* parent, QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); -void QStateMachine_new4(int childMode, QObject* parent, QStateMachine** outptr_QStateMachine, QState** outptr_QState, QAbstractState** outptr_QAbstractState, QObject** outptr_QObject); +QStateMachine* QStateMachine_new(); +QStateMachine* QStateMachine_new2(int childMode); +QStateMachine* QStateMachine_new3(QObject* parent); +QStateMachine* QStateMachine_new4(int childMode, QObject* parent); +void QStateMachine_virtbase(QStateMachine* src, QState** outptr_QState); QMetaObject* QStateMachine_MetaObject(const QStateMachine* self); void* QStateMachine_Metacast(QStateMachine* self, const char* param1); struct miqt_string QStateMachine_Tr(const char* s); @@ -105,13 +106,15 @@ void QStateMachine_override_virtual_Event(void* self, intptr_t slot); bool QStateMachine_virtualbase_Event(void* self, QEvent* e); void QStateMachine_Delete(QStateMachine* self, bool isSubclass); -void QStateMachine__SignalEvent_new(QStateMachine__SignalEvent* param1, QStateMachine__SignalEvent** outptr_QStateMachine__SignalEvent, QEvent** outptr_QEvent); +QStateMachine__SignalEvent* QStateMachine__SignalEvent_new(QStateMachine__SignalEvent* param1); +void QStateMachine__SignalEvent_virtbase(QStateMachine__SignalEvent* src, QEvent** outptr_QEvent); QObject* QStateMachine__SignalEvent_Sender(const QStateMachine__SignalEvent* self); int QStateMachine__SignalEvent_SignalIndex(const QStateMachine__SignalEvent* self); void QStateMachine__SignalEvent_Delete(QStateMachine__SignalEvent* self, bool isSubclass); -void QStateMachine__WrappedEvent_new(QObject* object, QEvent* event, QStateMachine__WrappedEvent** outptr_QStateMachine__WrappedEvent, QEvent** outptr_QEvent); -void QStateMachine__WrappedEvent_new2(QStateMachine__WrappedEvent* param1, QStateMachine__WrappedEvent** outptr_QStateMachine__WrappedEvent, QEvent** outptr_QEvent); +QStateMachine__WrappedEvent* QStateMachine__WrappedEvent_new(QObject* object, QEvent* event); +QStateMachine__WrappedEvent* QStateMachine__WrappedEvent_new2(QStateMachine__WrappedEvent* param1); +void QStateMachine__WrappedEvent_virtbase(QStateMachine__WrappedEvent* src, QEvent** outptr_QEvent); QObject* QStateMachine__WrappedEvent_Object(const QStateMachine__WrappedEvent* self); QEvent* QStateMachine__WrappedEvent_Event(const QStateMachine__WrappedEvent* self); void QStateMachine__WrappedEvent_Delete(QStateMachine__WrappedEvent* self, bool isSubclass); diff --git a/qt/gen_qstatictext.cpp b/qt/gen_qstatictext.cpp index e98bc412..c4e1fe44 100644 --- a/qt/gen_qstatictext.cpp +++ b/qt/gen_qstatictext.cpp @@ -10,20 +10,17 @@ #include "gen_qstatictext.h" #include "_cgo_export.h" -void QStaticText_new(QStaticText** outptr_QStaticText) { - QStaticText* ret = new QStaticText(); - *outptr_QStaticText = ret; +QStaticText* QStaticText_new() { + return new QStaticText(); } -void QStaticText_new2(struct miqt_string text, QStaticText** outptr_QStaticText) { +QStaticText* QStaticText_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - QStaticText* ret = new QStaticText(text_QString); - *outptr_QStaticText = ret; + return new QStaticText(text_QString); } -void QStaticText_new3(QStaticText* other, QStaticText** outptr_QStaticText) { - QStaticText* ret = new QStaticText(*other); - *outptr_QStaticText = ret; +QStaticText* QStaticText_new3(QStaticText* other) { + return new QStaticText(*other); } void QStaticText_OperatorAssign(QStaticText* self, QStaticText* param1) { diff --git a/qt/gen_qstatictext.go b/qt/gen_qstatictext.go index 8de33ad2..9f2fc67d 100644 --- a/qt/gen_qstatictext.go +++ b/qt/gen_qstatictext.go @@ -44,24 +44,19 @@ func newQStaticText(h *C.QStaticText) *QStaticText { if h == nil { return nil } + return &QStaticText{h: h} } // UnsafeNewQStaticText constructs the type using only unsafe pointers. func UnsafeNewQStaticText(h unsafe.Pointer) *QStaticText { - if h == nil { - return nil - } - - return &QStaticText{h: (*C.QStaticText)(h)} + return newQStaticText((*C.QStaticText)(h)) } // NewQStaticText constructs a new QStaticText object. func NewQStaticText() *QStaticText { - var outptr_QStaticText *C.QStaticText = nil - C.QStaticText_new(&outptr_QStaticText) - ret := newQStaticText(outptr_QStaticText) + ret := newQStaticText(C.QStaticText_new()) ret.isSubclass = true return ret } @@ -72,20 +67,16 @@ func NewQStaticText2(text string) *QStaticText { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QStaticText *C.QStaticText = nil - C.QStaticText_new2(text_ms, &outptr_QStaticText) - ret := newQStaticText(outptr_QStaticText) + ret := newQStaticText(C.QStaticText_new2(text_ms)) ret.isSubclass = true return ret } // NewQStaticText3 constructs a new QStaticText object. func NewQStaticText3(other *QStaticText) *QStaticText { - var outptr_QStaticText *C.QStaticText = nil - C.QStaticText_new3(other.cPointer(), &outptr_QStaticText) - ret := newQStaticText(outptr_QStaticText) + ret := newQStaticText(C.QStaticText_new3(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qstatictext.h b/qt/gen_qstatictext.h index c3bad277..eca9f66b 100644 --- a/qt/gen_qstatictext.h +++ b/qt/gen_qstatictext.h @@ -28,9 +28,9 @@ typedef struct QTextOption QTextOption; typedef struct QTransform QTransform; #endif -void QStaticText_new(QStaticText** outptr_QStaticText); -void QStaticText_new2(struct miqt_string text, QStaticText** outptr_QStaticText); -void QStaticText_new3(QStaticText* other, QStaticText** outptr_QStaticText); +QStaticText* QStaticText_new(); +QStaticText* QStaticText_new2(struct miqt_string text); +QStaticText* QStaticText_new3(QStaticText* other); void QStaticText_OperatorAssign(QStaticText* self, QStaticText* param1); void QStaticText_Swap(QStaticText* self, QStaticText* other); void QStaticText_SetText(QStaticText* self, struct miqt_string text); diff --git a/qt/gen_qstatusbar.cpp b/qt/gen_qstatusbar.cpp index 54b68bc9..bfb09acf 100644 --- a/qt/gen_qstatusbar.cpp +++ b/qt/gen_qstatusbar.cpp @@ -1020,20 +1020,16 @@ public: }; -void QStatusBar_new(QWidget* parent, QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQStatusBar* ret = new MiqtVirtualQStatusBar(parent); - *outptr_QStatusBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QStatusBar* QStatusBar_new(QWidget* parent) { + return new MiqtVirtualQStatusBar(parent); } -void QStatusBar_new2(QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQStatusBar* ret = new MiqtVirtualQStatusBar(); - *outptr_QStatusBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QStatusBar* QStatusBar_new2() { + return new MiqtVirtualQStatusBar(); +} + +void QStatusBar_virtbase(QStatusBar* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QStatusBar_MetaObject(const QStatusBar* self) { diff --git a/qt/gen_qstatusbar.go b/qt/gen_qstatusbar.go index 2a773689..6d80d34a 100644 --- a/qt/gen_qstatusbar.go +++ b/qt/gen_qstatusbar.go @@ -35,46 +35,34 @@ func (this *QStatusBar) UnsafePointer() unsafe.Pointer { } // newQStatusBar constructs the type using only CGO pointers. -func newQStatusBar(h *C.QStatusBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QStatusBar { +func newQStatusBar(h *C.QStatusBar) *QStatusBar { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QStatusBar_virtbase(h, &outptr_QWidget) + return &QStatusBar{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQStatusBar constructs the type using only unsafe pointers. -func UnsafeNewQStatusBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QStatusBar { - if h == nil { - return nil - } - - return &QStatusBar{h: (*C.QStatusBar)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQStatusBar(h unsafe.Pointer) *QStatusBar { + return newQStatusBar((*C.QStatusBar)(h)) } // NewQStatusBar constructs a new QStatusBar object. func NewQStatusBar(parent *QWidget) *QStatusBar { - var outptr_QStatusBar *C.QStatusBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QStatusBar_new(parent.cPointer(), &outptr_QStatusBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQStatusBar(outptr_QStatusBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQStatusBar(C.QStatusBar_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQStatusBar2 constructs a new QStatusBar object. func NewQStatusBar2() *QStatusBar { - var outptr_QStatusBar *C.QStatusBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QStatusBar_new2(&outptr_QStatusBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQStatusBar(outptr_QStatusBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQStatusBar(C.QStatusBar_new2()) ret.isSubclass = true return ret } @@ -269,7 +257,7 @@ func miqt_exec_callback_QStatusBar_ShowEvent(self *C.QStatusBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QStatusBar{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -295,7 +283,7 @@ func miqt_exec_callback_QStatusBar_PaintEvent(self *C.QStatusBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QStatusBar{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -321,7 +309,7 @@ func miqt_exec_callback_QStatusBar_ResizeEvent(self *C.QStatusBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QStatusBar{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -558,7 +546,7 @@ func miqt_exec_callback_QStatusBar_MousePressEvent(self *C.QStatusBar, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -584,7 +572,7 @@ func miqt_exec_callback_QStatusBar_MouseReleaseEvent(self *C.QStatusBar, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -610,7 +598,7 @@ func miqt_exec_callback_QStatusBar_MouseDoubleClickEvent(self *C.QStatusBar, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -636,7 +624,7 @@ func miqt_exec_callback_QStatusBar_MouseMoveEvent(self *C.QStatusBar, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -662,7 +650,7 @@ func miqt_exec_callback_QStatusBar_WheelEvent(self *C.QStatusBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -688,7 +676,7 @@ func miqt_exec_callback_QStatusBar_KeyPressEvent(self *C.QStatusBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -714,7 +702,7 @@ func miqt_exec_callback_QStatusBar_KeyReleaseEvent(self *C.QStatusBar, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -740,7 +728,7 @@ func miqt_exec_callback_QStatusBar_FocusInEvent(self *C.QStatusBar, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -766,7 +754,7 @@ func miqt_exec_callback_QStatusBar_FocusOutEvent(self *C.QStatusBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -844,7 +832,7 @@ func miqt_exec_callback_QStatusBar_MoveEvent(self *C.QStatusBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -870,7 +858,7 @@ func miqt_exec_callback_QStatusBar_CloseEvent(self *C.QStatusBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -896,7 +884,7 @@ func miqt_exec_callback_QStatusBar_ContextMenuEvent(self *C.QStatusBar, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -922,7 +910,7 @@ func miqt_exec_callback_QStatusBar_TabletEvent(self *C.QStatusBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -948,7 +936,7 @@ func miqt_exec_callback_QStatusBar_ActionEvent(self *C.QStatusBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -974,7 +962,7 @@ func miqt_exec_callback_QStatusBar_DragEnterEvent(self *C.QStatusBar, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1000,7 +988,7 @@ func miqt_exec_callback_QStatusBar_DragMoveEvent(self *C.QStatusBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1026,7 +1014,7 @@ func miqt_exec_callback_QStatusBar_DragLeaveEvent(self *C.QStatusBar, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1052,7 +1040,7 @@ func miqt_exec_callback_QStatusBar_DropEvent(self *C.QStatusBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1078,7 +1066,7 @@ func miqt_exec_callback_QStatusBar_HideEvent(self *C.QStatusBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1274,7 +1262,7 @@ func miqt_exec_callback_QStatusBar_InputMethodEvent(self *C.QStatusBar, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QStatusBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qstatusbar.h b/qt/gen_qstatusbar.h index 63475dd6..1a4de11f 100644 --- a/qt/gen_qstatusbar.h +++ b/qt/gen_qstatusbar.h @@ -76,8 +76,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QStatusBar_new(QWidget* parent, QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QStatusBar_new2(QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QStatusBar* QStatusBar_new(QWidget* parent); +QStatusBar* QStatusBar_new2(); +void QStatusBar_virtbase(QStatusBar* src, QWidget** outptr_QWidget); QMetaObject* QStatusBar_MetaObject(const QStatusBar* self); void* QStatusBar_Metacast(QStatusBar* self, const char* param1); struct miqt_string QStatusBar_Tr(const char* s); diff --git a/qt/gen_qstorageinfo.cpp b/qt/gen_qstorageinfo.cpp index bd643154..dffa6c97 100644 --- a/qt/gen_qstorageinfo.cpp +++ b/qt/gen_qstorageinfo.cpp @@ -9,25 +9,21 @@ #include "gen_qstorageinfo.h" #include "_cgo_export.h" -void QStorageInfo_new(QStorageInfo** outptr_QStorageInfo) { - QStorageInfo* ret = new QStorageInfo(); - *outptr_QStorageInfo = ret; +QStorageInfo* QStorageInfo_new() { + return new QStorageInfo(); } -void QStorageInfo_new2(struct miqt_string path, QStorageInfo** outptr_QStorageInfo) { +QStorageInfo* QStorageInfo_new2(struct miqt_string path) { QString path_QString = QString::fromUtf8(path.data, path.len); - QStorageInfo* ret = new QStorageInfo(path_QString); - *outptr_QStorageInfo = ret; + return new QStorageInfo(path_QString); } -void QStorageInfo_new3(QDir* dir, QStorageInfo** outptr_QStorageInfo) { - QStorageInfo* ret = new QStorageInfo(*dir); - *outptr_QStorageInfo = ret; +QStorageInfo* QStorageInfo_new3(QDir* dir) { + return new QStorageInfo(*dir); } -void QStorageInfo_new4(QStorageInfo* other, QStorageInfo** outptr_QStorageInfo) { - QStorageInfo* ret = new QStorageInfo(*other); - *outptr_QStorageInfo = ret; +QStorageInfo* QStorageInfo_new4(QStorageInfo* other) { + return new QStorageInfo(*other); } void QStorageInfo_OperatorAssign(QStorageInfo* self, QStorageInfo* other) { diff --git a/qt/gen_qstorageinfo.go b/qt/gen_qstorageinfo.go index eb7c027f..fee2f3f3 100644 --- a/qt/gen_qstorageinfo.go +++ b/qt/gen_qstorageinfo.go @@ -37,24 +37,19 @@ func newQStorageInfo(h *C.QStorageInfo) *QStorageInfo { if h == nil { return nil } + return &QStorageInfo{h: h} } // UnsafeNewQStorageInfo constructs the type using only unsafe pointers. func UnsafeNewQStorageInfo(h unsafe.Pointer) *QStorageInfo { - if h == nil { - return nil - } - - return &QStorageInfo{h: (*C.QStorageInfo)(h)} + return newQStorageInfo((*C.QStorageInfo)(h)) } // NewQStorageInfo constructs a new QStorageInfo object. func NewQStorageInfo() *QStorageInfo { - var outptr_QStorageInfo *C.QStorageInfo = nil - C.QStorageInfo_new(&outptr_QStorageInfo) - ret := newQStorageInfo(outptr_QStorageInfo) + ret := newQStorageInfo(C.QStorageInfo_new()) ret.isSubclass = true return ret } @@ -65,30 +60,24 @@ func NewQStorageInfo2(path string) *QStorageInfo { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - var outptr_QStorageInfo *C.QStorageInfo = nil - C.QStorageInfo_new2(path_ms, &outptr_QStorageInfo) - ret := newQStorageInfo(outptr_QStorageInfo) + ret := newQStorageInfo(C.QStorageInfo_new2(path_ms)) ret.isSubclass = true return ret } // NewQStorageInfo3 constructs a new QStorageInfo object. func NewQStorageInfo3(dir *QDir) *QStorageInfo { - var outptr_QStorageInfo *C.QStorageInfo = nil - C.QStorageInfo_new3(dir.cPointer(), &outptr_QStorageInfo) - ret := newQStorageInfo(outptr_QStorageInfo) + ret := newQStorageInfo(C.QStorageInfo_new3(dir.cPointer())) ret.isSubclass = true return ret } // NewQStorageInfo4 constructs a new QStorageInfo object. func NewQStorageInfo4(other *QStorageInfo) *QStorageInfo { - var outptr_QStorageInfo *C.QStorageInfo = nil - C.QStorageInfo_new4(other.cPointer(), &outptr_QStorageInfo) - ret := newQStorageInfo(outptr_QStorageInfo) + ret := newQStorageInfo(C.QStorageInfo_new4(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qstorageinfo.h b/qt/gen_qstorageinfo.h index bbbb8a0f..e6297d69 100644 --- a/qt/gen_qstorageinfo.h +++ b/qt/gen_qstorageinfo.h @@ -22,10 +22,10 @@ typedef struct QDir QDir; typedef struct QStorageInfo QStorageInfo; #endif -void QStorageInfo_new(QStorageInfo** outptr_QStorageInfo); -void QStorageInfo_new2(struct miqt_string path, QStorageInfo** outptr_QStorageInfo); -void QStorageInfo_new3(QDir* dir, QStorageInfo** outptr_QStorageInfo); -void QStorageInfo_new4(QStorageInfo* other, QStorageInfo** outptr_QStorageInfo); +QStorageInfo* QStorageInfo_new(); +QStorageInfo* QStorageInfo_new2(struct miqt_string path); +QStorageInfo* QStorageInfo_new3(QDir* dir); +QStorageInfo* QStorageInfo_new4(QStorageInfo* other); void QStorageInfo_OperatorAssign(QStorageInfo* self, QStorageInfo* other); void QStorageInfo_Swap(QStorageInfo* self, QStorageInfo* other); void QStorageInfo_SetPath(QStorageInfo* self, struct miqt_string path); diff --git a/qt/gen_qstringbuilder.go b/qt/gen_qstringbuilder.go index 9a97943b..188aca16 100644 --- a/qt/gen_qstringbuilder.go +++ b/qt/gen_qstringbuilder.go @@ -37,16 +37,13 @@ func newQAbstractConcatenable(h *C.QAbstractConcatenable) *QAbstractConcatenable if h == nil { return nil } + return &QAbstractConcatenable{h: h} } // UnsafeNewQAbstractConcatenable constructs the type using only unsafe pointers. func UnsafeNewQAbstractConcatenable(h unsafe.Pointer) *QAbstractConcatenable { - if h == nil { - return nil - } - - return &QAbstractConcatenable{h: (*C.QAbstractConcatenable)(h)} + return newQAbstractConcatenable((*C.QAbstractConcatenable)(h)) } // Delete this object from C++ memory. diff --git a/qt/gen_qstringlistmodel.cpp b/qt/gen_qstringlistmodel.cpp index 246b7835..2697dbdc 100644 --- a/qt/gen_qstringlistmodel.cpp +++ b/qt/gen_qstringlistmodel.cpp @@ -442,15 +442,11 @@ public: }; -void QStringListModel_new(QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(); - *outptr_QStringListModel = ret; - *outptr_QAbstractListModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStringListModel* QStringListModel_new() { + return new MiqtVirtualQStringListModel(); } -void QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { +QStringListModel* QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -458,22 +454,14 @@ void QStringListModel_new2(struct miqt_array /* of struct miqt_string */ string QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(strings_QList); - *outptr_QStringListModel = ret; - *outptr_QAbstractListModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQStringListModel(strings_QList); } -void QStringListModel_new3(QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(parent); - *outptr_QStringListModel = ret; - *outptr_QAbstractListModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStringListModel* QStringListModel_new3(QObject* parent) { + return new MiqtVirtualQStringListModel(parent); } -void QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { +QStringListModel* QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -481,11 +469,11 @@ void QStringListModel_new4(struct miqt_array /* of struct miqt_string */ string QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(strings_QList, parent); - *outptr_QStringListModel = ret; - *outptr_QAbstractListModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQStringListModel(strings_QList, parent); +} + +void QStringListModel_virtbase(QStringListModel* src, QAbstractListModel** outptr_QAbstractListModel) { + *outptr_QAbstractListModel = static_cast(src); } QMetaObject* QStringListModel_MetaObject(const QStringListModel* self) { diff --git a/qt/gen_qstringlistmodel.go b/qt/gen_qstringlistmodel.go index 0abbe98b..e17e41d7 100644 --- a/qt/gen_qstringlistmodel.go +++ b/qt/gen_qstringlistmodel.go @@ -35,33 +35,26 @@ func (this *QStringListModel) UnsafePointer() unsafe.Pointer { } // newQStringListModel constructs the type using only CGO pointers. -func newQStringListModel(h *C.QStringListModel, h_QAbstractListModel *C.QAbstractListModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QStringListModel { +func newQStringListModel(h *C.QStringListModel) *QStringListModel { if h == nil { return nil } + var outptr_QAbstractListModel *C.QAbstractListModel = nil + C.QStringListModel_virtbase(h, &outptr_QAbstractListModel) + return &QStringListModel{h: h, - QAbstractListModel: newQAbstractListModel(h_QAbstractListModel, h_QAbstractItemModel, h_QObject)} + QAbstractListModel: newQAbstractListModel(outptr_QAbstractListModel)} } // UnsafeNewQStringListModel constructs the type using only unsafe pointers. -func UnsafeNewQStringListModel(h unsafe.Pointer, h_QAbstractListModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QStringListModel { - if h == nil { - return nil - } - - return &QStringListModel{h: (*C.QStringListModel)(h), - QAbstractListModel: UnsafeNewQAbstractListModel(h_QAbstractListModel, h_QAbstractItemModel, h_QObject)} +func UnsafeNewQStringListModel(h unsafe.Pointer) *QStringListModel { + return newQStringListModel((*C.QStringListModel)(h)) } // NewQStringListModel constructs a new QStringListModel object. func NewQStringListModel() *QStringListModel { - var outptr_QStringListModel *C.QStringListModel = nil - var outptr_QAbstractListModel *C.QAbstractListModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStringListModel_new(&outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStringListModel(C.QStringListModel_new()) ret.isSubclass = true return ret } @@ -78,26 +71,16 @@ func NewQStringListModel2(strings []string) *QStringListModel { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QStringListModel *C.QStringListModel = nil - var outptr_QAbstractListModel *C.QAbstractListModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStringListModel_new2(strings_ma, &outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStringListModel(C.QStringListModel_new2(strings_ma)) ret.isSubclass = true return ret } // NewQStringListModel3 constructs a new QStringListModel object. func NewQStringListModel3(parent *QObject) *QStringListModel { - var outptr_QStringListModel *C.QStringListModel = nil - var outptr_QAbstractListModel *C.QAbstractListModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStringListModel_new3(parent.cPointer(), &outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStringListModel(C.QStringListModel_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -114,13 +97,8 @@ func NewQStringListModel4(strings []string, parent *QObject) *QStringListModel { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QStringListModel *C.QStringListModel = nil - var outptr_QAbstractListModel *C.QAbstractListModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStringListModel_new4(strings_ma, parent.cPointer(), &outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStringListModel(C.QStringListModel_new4(strings_ma, parent.cPointer())) ret.isSubclass = true return ret } @@ -779,7 +757,7 @@ func miqt_exec_callback_QStringListModel_DropMimeData(self *C.QStringListModel, } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt/gen_qstringlistmodel.h b/qt/gen_qstringlistmodel.h index 83a9da12..5d38d4dd 100644 --- a/qt/gen_qstringlistmodel.h +++ b/qt/gen_qstringlistmodel.h @@ -34,10 +34,11 @@ typedef struct QStringListModel QStringListModel; typedef struct QVariant QVariant; #endif -void QStringListModel_new(QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QStringListModel_new3(QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QStringListModel* QStringListModel_new(); +QStringListModel* QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings); +QStringListModel* QStringListModel_new3(QObject* parent); +QStringListModel* QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent); +void QStringListModel_virtbase(QStringListModel* src, QAbstractListModel** outptr_QAbstractListModel); QMetaObject* QStringListModel_MetaObject(const QStringListModel* self); void* QStringListModel_Metacast(QStringListModel* self, const char* param1); struct miqt_string QStringListModel_Tr(const char* s); diff --git a/qt/gen_qstringliteral.go b/qt/gen_qstringliteral.go index 32795e73..882d9ef2 100644 --- a/qt/gen_qstringliteral.go +++ b/qt/gen_qstringliteral.go @@ -37,16 +37,13 @@ func newQStringDataPtr(h *C.QStringDataPtr) *QStringDataPtr { if h == nil { return nil } + return &QStringDataPtr{h: h} } // UnsafeNewQStringDataPtr constructs the type using only unsafe pointers. func UnsafeNewQStringDataPtr(h unsafe.Pointer) *QStringDataPtr { - if h == nil { - return nil - } - - return &QStringDataPtr{h: (*C.QStringDataPtr)(h)} + return newQStringDataPtr((*C.QStringDataPtr)(h)) } // Delete this object from C++ memory. diff --git a/qt/gen_qstringmatcher.cpp b/qt/gen_qstringmatcher.cpp index bdb9965c..ef51bc02 100644 --- a/qt/gen_qstringmatcher.cpp +++ b/qt/gen_qstringmatcher.cpp @@ -7,36 +7,30 @@ #include "gen_qstringmatcher.h" #include "_cgo_export.h" -void QStringMatcher_new(QStringMatcher** outptr_QStringMatcher) { - QStringMatcher* ret = new QStringMatcher(); - *outptr_QStringMatcher = ret; +QStringMatcher* QStringMatcher_new() { + return new QStringMatcher(); } -void QStringMatcher_new2(struct miqt_string pattern, QStringMatcher** outptr_QStringMatcher) { +QStringMatcher* QStringMatcher_new2(struct miqt_string pattern) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - QStringMatcher* ret = new QStringMatcher(pattern_QString); - *outptr_QStringMatcher = ret; + return new QStringMatcher(pattern_QString); } -void QStringMatcher_new3(QChar* uc, int lenVal, QStringMatcher** outptr_QStringMatcher) { - QStringMatcher* ret = new QStringMatcher(uc, static_cast(lenVal)); - *outptr_QStringMatcher = ret; +QStringMatcher* QStringMatcher_new3(QChar* uc, int lenVal) { + return new QStringMatcher(uc, static_cast(lenVal)); } -void QStringMatcher_new4(QStringMatcher* other, QStringMatcher** outptr_QStringMatcher) { - QStringMatcher* ret = new QStringMatcher(*other); - *outptr_QStringMatcher = ret; +QStringMatcher* QStringMatcher_new4(QStringMatcher* other) { + return new QStringMatcher(*other); } -void QStringMatcher_new5(struct miqt_string pattern, int cs, QStringMatcher** outptr_QStringMatcher) { +QStringMatcher* QStringMatcher_new5(struct miqt_string pattern, int cs) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - QStringMatcher* ret = new QStringMatcher(pattern_QString, static_cast(cs)); - *outptr_QStringMatcher = ret; + return new QStringMatcher(pattern_QString, static_cast(cs)); } -void QStringMatcher_new6(QChar* uc, int lenVal, int cs, QStringMatcher** outptr_QStringMatcher) { - QStringMatcher* ret = new QStringMatcher(uc, static_cast(lenVal), static_cast(cs)); - *outptr_QStringMatcher = ret; +QStringMatcher* QStringMatcher_new6(QChar* uc, int lenVal, int cs) { + return new QStringMatcher(uc, static_cast(lenVal), static_cast(cs)); } void QStringMatcher_OperatorAssign(QStringMatcher* self, QStringMatcher* other) { diff --git a/qt/gen_qstringmatcher.go b/qt/gen_qstringmatcher.go index 584c36fc..604fb786 100644 --- a/qt/gen_qstringmatcher.go +++ b/qt/gen_qstringmatcher.go @@ -37,24 +37,19 @@ func newQStringMatcher(h *C.QStringMatcher) *QStringMatcher { if h == nil { return nil } + return &QStringMatcher{h: h} } // UnsafeNewQStringMatcher constructs the type using only unsafe pointers. func UnsafeNewQStringMatcher(h unsafe.Pointer) *QStringMatcher { - if h == nil { - return nil - } - - return &QStringMatcher{h: (*C.QStringMatcher)(h)} + return newQStringMatcher((*C.QStringMatcher)(h)) } // NewQStringMatcher constructs a new QStringMatcher object. func NewQStringMatcher() *QStringMatcher { - var outptr_QStringMatcher *C.QStringMatcher = nil - C.QStringMatcher_new(&outptr_QStringMatcher) - ret := newQStringMatcher(outptr_QStringMatcher) + ret := newQStringMatcher(C.QStringMatcher_new()) ret.isSubclass = true return ret } @@ -65,30 +60,24 @@ func NewQStringMatcher2(pattern string) *QStringMatcher { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - var outptr_QStringMatcher *C.QStringMatcher = nil - C.QStringMatcher_new2(pattern_ms, &outptr_QStringMatcher) - ret := newQStringMatcher(outptr_QStringMatcher) + ret := newQStringMatcher(C.QStringMatcher_new2(pattern_ms)) ret.isSubclass = true return ret } // NewQStringMatcher3 constructs a new QStringMatcher object. func NewQStringMatcher3(uc *QChar, lenVal int) *QStringMatcher { - var outptr_QStringMatcher *C.QStringMatcher = nil - C.QStringMatcher_new3(uc.cPointer(), (C.int)(lenVal), &outptr_QStringMatcher) - ret := newQStringMatcher(outptr_QStringMatcher) + ret := newQStringMatcher(C.QStringMatcher_new3(uc.cPointer(), (C.int)(lenVal))) ret.isSubclass = true return ret } // NewQStringMatcher4 constructs a new QStringMatcher object. func NewQStringMatcher4(other *QStringMatcher) *QStringMatcher { - var outptr_QStringMatcher *C.QStringMatcher = nil - C.QStringMatcher_new4(other.cPointer(), &outptr_QStringMatcher) - ret := newQStringMatcher(outptr_QStringMatcher) + ret := newQStringMatcher(C.QStringMatcher_new4(other.cPointer())) ret.isSubclass = true return ret } @@ -99,20 +88,16 @@ func NewQStringMatcher5(pattern string, cs CaseSensitivity) *QStringMatcher { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - var outptr_QStringMatcher *C.QStringMatcher = nil - C.QStringMatcher_new5(pattern_ms, (C.int)(cs), &outptr_QStringMatcher) - ret := newQStringMatcher(outptr_QStringMatcher) + ret := newQStringMatcher(C.QStringMatcher_new5(pattern_ms, (C.int)(cs))) ret.isSubclass = true return ret } // NewQStringMatcher6 constructs a new QStringMatcher object. func NewQStringMatcher6(uc *QChar, lenVal int, cs CaseSensitivity) *QStringMatcher { - var outptr_QStringMatcher *C.QStringMatcher = nil - C.QStringMatcher_new6(uc.cPointer(), (C.int)(lenVal), (C.int)(cs), &outptr_QStringMatcher) - ret := newQStringMatcher(outptr_QStringMatcher) + ret := newQStringMatcher(C.QStringMatcher_new6(uc.cPointer(), (C.int)(lenVal), (C.int)(cs))) ret.isSubclass = true return ret } diff --git a/qt/gen_qstringmatcher.h b/qt/gen_qstringmatcher.h index 98400372..85a74d67 100644 --- a/qt/gen_qstringmatcher.h +++ b/qt/gen_qstringmatcher.h @@ -22,12 +22,12 @@ typedef struct QChar QChar; typedef struct QStringMatcher QStringMatcher; #endif -void QStringMatcher_new(QStringMatcher** outptr_QStringMatcher); -void QStringMatcher_new2(struct miqt_string pattern, QStringMatcher** outptr_QStringMatcher); -void QStringMatcher_new3(QChar* uc, int lenVal, QStringMatcher** outptr_QStringMatcher); -void QStringMatcher_new4(QStringMatcher* other, QStringMatcher** outptr_QStringMatcher); -void QStringMatcher_new5(struct miqt_string pattern, int cs, QStringMatcher** outptr_QStringMatcher); -void QStringMatcher_new6(QChar* uc, int lenVal, int cs, QStringMatcher** outptr_QStringMatcher); +QStringMatcher* QStringMatcher_new(); +QStringMatcher* QStringMatcher_new2(struct miqt_string pattern); +QStringMatcher* QStringMatcher_new3(QChar* uc, int lenVal); +QStringMatcher* QStringMatcher_new4(QStringMatcher* other); +QStringMatcher* QStringMatcher_new5(struct miqt_string pattern, int cs); +QStringMatcher* QStringMatcher_new6(QChar* uc, int lenVal, int cs); void QStringMatcher_OperatorAssign(QStringMatcher* self, QStringMatcher* other); void QStringMatcher_SetPattern(QStringMatcher* self, struct miqt_string pattern); void QStringMatcher_SetCaseSensitivity(QStringMatcher* self, int cs); diff --git a/qt/gen_qstringview.cpp b/qt/gen_qstringview.cpp index d930d4d9..20def41d 100644 --- a/qt/gen_qstringview.cpp +++ b/qt/gen_qstringview.cpp @@ -9,9 +9,8 @@ #include "gen_qstringview.h" #include "_cgo_export.h" -void QStringView_new(QStringView** outptr_QStringView) { - QStringView* ret = new QStringView(); - *outptr_QStringView = ret; +QStringView* QStringView_new() { + return new QStringView(); } struct miqt_string QStringView_ToString(const QStringView* self) { diff --git a/qt/gen_qstringview.go b/qt/gen_qstringview.go index 3660b131..c3ff8323 100644 --- a/qt/gen_qstringview.go +++ b/qt/gen_qstringview.go @@ -37,24 +37,19 @@ func newQStringView(h *C.QStringView) *QStringView { if h == nil { return nil } + return &QStringView{h: h} } // UnsafeNewQStringView constructs the type using only unsafe pointers. func UnsafeNewQStringView(h unsafe.Pointer) *QStringView { - if h == nil { - return nil - } - - return &QStringView{h: (*C.QStringView)(h)} + return newQStringView((*C.QStringView)(h)) } // NewQStringView constructs a new QStringView object. func NewQStringView() *QStringView { - var outptr_QStringView *C.QStringView = nil - C.QStringView_new(&outptr_QStringView) - ret := newQStringView(outptr_QStringView) + ret := newQStringView(C.QStringView_new()) ret.isSubclass = true return ret } diff --git a/qt/gen_qstringview.h b/qt/gen_qstringview.h index b3e07693..892df68e 100644 --- a/qt/gen_qstringview.h +++ b/qt/gen_qstringview.h @@ -22,7 +22,7 @@ typedef struct QChar QChar; typedef struct QStringView QStringView; #endif -void QStringView_new(QStringView** outptr_QStringView); +QStringView* QStringView_new(); struct miqt_string QStringView_ToString(const QStringView* self); ptrdiff_t QStringView_Size(const QStringView* self); QChar* QStringView_Data(const QStringView* self); diff --git a/qt/gen_qstyle.cpp b/qt/gen_qstyle.cpp index bc61ea9f..35831408 100644 --- a/qt/gen_qstyle.cpp +++ b/qt/gen_qstyle.cpp @@ -756,10 +756,12 @@ public: }; -void QStyle_new(QStyle** outptr_QStyle, QObject** outptr_QObject) { - MiqtVirtualQStyle* ret = new MiqtVirtualQStyle(); - *outptr_QStyle = ret; - *outptr_QObject = static_cast(ret); +QStyle* QStyle_new() { + return new MiqtVirtualQStyle(); +} + +void QStyle_virtbase(QStyle* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QStyle_MetaObject(const QStyle* self) { diff --git a/qt/gen_qstyle.go b/qt/gen_qstyle.go index 7e319350..8704fb1e 100644 --- a/qt/gen_qstyle.go +++ b/qt/gen_qstyle.go @@ -658,31 +658,26 @@ func (this *QStyle) UnsafePointer() unsafe.Pointer { } // newQStyle constructs the type using only CGO pointers. -func newQStyle(h *C.QStyle, h_QObject *C.QObject) *QStyle { +func newQStyle(h *C.QStyle) *QStyle { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QStyle_virtbase(h, &outptr_QObject) + return &QStyle{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQStyle constructs the type using only unsafe pointers. -func UnsafeNewQStyle(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStyle { - if h == nil { - return nil - } - - return &QStyle{h: (*C.QStyle)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQStyle(h unsafe.Pointer) *QStyle { + return newQStyle((*C.QStyle)(h)) } // NewQStyle constructs a new QStyle object. func NewQStyle() *QStyle { - var outptr_QStyle *C.QStyle = nil - var outptr_QObject *C.QObject = nil - C.QStyle_new(&outptr_QStyle, &outptr_QObject) - ret := newQStyle(outptr_QStyle, outptr_QObject) + ret := newQStyle(C.QStyle_new()) ret.isSubclass = true return ret } @@ -812,7 +807,7 @@ func (this *QStyle) StyleHint(stylehint QStyle__StyleHint, opt *QStyleOption, wi } func (this *QStyle) StandardPixmap(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _goptr := newQPixmap(C.QStyle_StandardPixmap(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()), nil) + _goptr := newQPixmap(C.QStyle_StandardPixmap(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -824,7 +819,7 @@ func (this *QStyle) StandardIcon(standardIcon QStyle__StandardPixmap, option *QS } func (this *QStyle) GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { - _goptr := newQPixmap(C.QStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()), nil) + _goptr := newQPixmap(C.QStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -868,7 +863,7 @@ func (this *QStyle) CombinedLayoutSpacing(controls1 QSizePolicy__ControlType, co } func (this *QStyle) Proxy() *QStyle { - return newQStyle(C.QStyle_Proxy(this.h), nil) + return newQStyle(C.QStyle_Proxy(this.h)) } func QStyle_Tr2(s string, c string) string { @@ -951,7 +946,7 @@ func miqt_exec_callback_QStyle_Polish(self *C.QStyle, cb C.intptr_t, widget *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QStyle{h: self}).callVirtualBase_Polish, slotval1) @@ -977,7 +972,7 @@ func miqt_exec_callback_QStyle_Unpolish(self *C.QStyle, cb C.intptr_t, widget *C } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QStyle{h: self}).callVirtualBase_Unpolish, slotval1) @@ -1003,7 +998,7 @@ func miqt_exec_callback_QStyle_PolishWithApplication(self *C.QStyle, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQApplication(application, nil, nil, nil) + slotval1 := newQApplication(application) gofunc((&QStyle{h: self}).callVirtualBase_PolishWithApplication, slotval1) @@ -1029,7 +1024,7 @@ func miqt_exec_callback_QStyle_UnpolishWithApplication(self *C.QStyle, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQApplication(application, nil, nil, nil) + slotval1 := newQApplication(application) gofunc((&QStyle{h: self}).callVirtualBase_UnpolishWithApplication, slotval1) @@ -1132,7 +1127,7 @@ func miqt_exec_callback_QStyle_ItemPixmapRect(self *C.QStyle, cb C.intptr_t, r * slotval2 := (int)(flags) - slotval3 := newQPixmap(pixmap, nil) + slotval3 := newQPixmap(pixmap) virtualReturn := gofunc((&QStyle{h: self}).callVirtualBase_ItemPixmapRect, slotval1, slotval2, slotval3) @@ -1210,7 +1205,7 @@ func miqt_exec_callback_QStyle_DrawItemPixmap(self *C.QStyle, cb C.intptr_t, pai slotval3 := (int)(alignment) - slotval4 := newQPixmap(pixmap, nil) + slotval4 := newQPixmap(pixmap) gofunc((&QStyle{h: self}).callVirtualBase_DrawItemPixmap, slotval1, slotval2, slotval3, slotval4) @@ -1263,7 +1258,7 @@ func miqt_exec_callback_QStyle_DrawPrimitive(self *C.QStyle, cb C.intptr_t, pe C slotval3 := newQPainter(p) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) gofunc(slotval1, slotval2, slotval3, slotval4) @@ -1289,7 +1284,7 @@ func miqt_exec_callback_QStyle_DrawControl(self *C.QStyle, cb C.intptr_t, elemen slotval3 := newQPainter(p) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) gofunc(slotval1, slotval2, slotval3, slotval4) @@ -1313,7 +1308,7 @@ func miqt_exec_callback_QStyle_SubElementRect(self *C.QStyle, cb C.intptr_t, sub slotval2 := newQStyleOption(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc(slotval1, slotval2, slotval3) @@ -1337,11 +1332,11 @@ func miqt_exec_callback_QStyle_DrawComplexControl(self *C.QStyle, cb C.intptr_t, // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(cc) - slotval2 := newQStyleOptionComplex(opt, nil) + slotval2 := newQStyleOptionComplex(opt) slotval3 := newQPainter(p) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) gofunc(slotval1, slotval2, slotval3, slotval4) @@ -1363,11 +1358,11 @@ func miqt_exec_callback_QStyle_HitTestComplexControl(self *C.QStyle, cb C.intptr // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(cc) - slotval2 := newQStyleOptionComplex(opt, nil) + slotval2 := newQStyleOptionComplex(opt) slotval3 := newQPoint(pt) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4) @@ -1391,11 +1386,11 @@ func miqt_exec_callback_QStyle_SubControlRect(self *C.QStyle, cb C.intptr_t, cc // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(cc) - slotval2 := newQStyleOptionComplex(opt, nil) + slotval2 := newQStyleOptionComplex(opt) slotval3 := (QStyle__SubControl)(sc) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4) @@ -1421,7 +1416,7 @@ func miqt_exec_callback_QStyle_PixelMetric(self *C.QStyle, cb C.intptr_t, metric slotval2 := newQStyleOption(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc(slotval1, slotval2, slotval3) @@ -1449,7 +1444,7 @@ func miqt_exec_callback_QStyle_SizeFromContents(self *C.QStyle, cb C.intptr_t, c slotval3 := newQSize(contentsSize) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4) @@ -1475,7 +1470,7 @@ func miqt_exec_callback_QStyle_StyleHint(self *C.QStyle, cb C.intptr_t, stylehin slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) slotval4 := newQStyleHintReturn(returnData) @@ -1503,7 +1498,7 @@ func miqt_exec_callback_QStyle_StandardPixmap(self *C.QStyle, cb C.intptr_t, sta slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc(slotval1, slotval2, slotval3) @@ -1529,7 +1524,7 @@ func miqt_exec_callback_QStyle_StandardIcon(self *C.QStyle, cb C.intptr_t, stand slotval2 := newQStyleOption(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc(slotval1, slotval2, slotval3) @@ -1553,7 +1548,7 @@ func miqt_exec_callback_QStyle_GeneratedIconPixmap(self *C.QStyle, cb C.intptr_t // Convert all CABI parameters to Go parameters slotval1 := (QIcon__Mode)(iconMode) - slotval2 := newQPixmap(pixmap, nil) + slotval2 := newQPixmap(pixmap) slotval3 := newQStyleOption(opt) @@ -1585,7 +1580,7 @@ func miqt_exec_callback_QStyle_LayoutSpacing(self *C.QStyle, cb C.intptr_t, cont slotval4 := newQStyleOption(option) - slotval5 := newQWidget(widget, nil, nil) + slotval5 := newQWidget(widget) virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4, slotval5) @@ -1671,7 +1666,7 @@ func miqt_exec_callback_QStyle_TimerEvent(self *C.QStyle, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QStyle{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1697,7 +1692,7 @@ func miqt_exec_callback_QStyle_ChildEvent(self *C.QStyle, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QStyle{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qstyle.h b/qt/gen_qstyle.h index fc1c45c6..7d31cfd7 100644 --- a/qt/gen_qstyle.h +++ b/qt/gen_qstyle.h @@ -58,7 +58,8 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QStyle_new(QStyle** outptr_QStyle, QObject** outptr_QObject); +QStyle* QStyle_new(); +void QStyle_virtbase(QStyle* src, QObject** outptr_QObject); QMetaObject* QStyle_MetaObject(const QStyle* self); void* QStyle_Metacast(QStyle* self, const char* param1); struct miqt_string QStyle_Tr(const char* s); diff --git a/qt/gen_qstyleditemdelegate.cpp b/qt/gen_qstyleditemdelegate.cpp index 717a6de1..3f9a6bb3 100644 --- a/qt/gen_qstyleditemdelegate.cpp +++ b/qt/gen_qstyleditemdelegate.cpp @@ -415,18 +415,16 @@ public: }; -void QStyledItemDelegate_new(QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { - MiqtVirtualQStyledItemDelegate* ret = new MiqtVirtualQStyledItemDelegate(); - *outptr_QStyledItemDelegate = ret; - *outptr_QAbstractItemDelegate = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStyledItemDelegate* QStyledItemDelegate_new() { + return new MiqtVirtualQStyledItemDelegate(); } -void QStyledItemDelegate_new2(QObject* parent, QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { - MiqtVirtualQStyledItemDelegate* ret = new MiqtVirtualQStyledItemDelegate(parent); - *outptr_QStyledItemDelegate = ret; - *outptr_QAbstractItemDelegate = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStyledItemDelegate* QStyledItemDelegate_new2(QObject* parent) { + return new MiqtVirtualQStyledItemDelegate(parent); +} + +void QStyledItemDelegate_virtbase(QStyledItemDelegate* src, QAbstractItemDelegate** outptr_QAbstractItemDelegate) { + *outptr_QAbstractItemDelegate = static_cast(src); } QMetaObject* QStyledItemDelegate_MetaObject(const QStyledItemDelegate* self) { diff --git a/qt/gen_qstyleditemdelegate.go b/qt/gen_qstyleditemdelegate.go index 4168841b..f0e19b62 100644 --- a/qt/gen_qstyleditemdelegate.go +++ b/qt/gen_qstyleditemdelegate.go @@ -35,44 +35,34 @@ func (this *QStyledItemDelegate) UnsafePointer() unsafe.Pointer { } // newQStyledItemDelegate constructs the type using only CGO pointers. -func newQStyledItemDelegate(h *C.QStyledItemDelegate, h_QAbstractItemDelegate *C.QAbstractItemDelegate, h_QObject *C.QObject) *QStyledItemDelegate { +func newQStyledItemDelegate(h *C.QStyledItemDelegate) *QStyledItemDelegate { if h == nil { return nil } + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + C.QStyledItemDelegate_virtbase(h, &outptr_QAbstractItemDelegate) + return &QStyledItemDelegate{h: h, - QAbstractItemDelegate: newQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} + QAbstractItemDelegate: newQAbstractItemDelegate(outptr_QAbstractItemDelegate)} } // UnsafeNewQStyledItemDelegate constructs the type using only unsafe pointers. -func UnsafeNewQStyledItemDelegate(h unsafe.Pointer, h_QAbstractItemDelegate unsafe.Pointer, h_QObject unsafe.Pointer) *QStyledItemDelegate { - if h == nil { - return nil - } - - return &QStyledItemDelegate{h: (*C.QStyledItemDelegate)(h), - QAbstractItemDelegate: UnsafeNewQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} +func UnsafeNewQStyledItemDelegate(h unsafe.Pointer) *QStyledItemDelegate { + return newQStyledItemDelegate((*C.QStyledItemDelegate)(h)) } // NewQStyledItemDelegate constructs a new QStyledItemDelegate object. func NewQStyledItemDelegate() *QStyledItemDelegate { - var outptr_QStyledItemDelegate *C.QStyledItemDelegate = nil - var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil - var outptr_QObject *C.QObject = nil - C.QStyledItemDelegate_new(&outptr_QStyledItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) - ret := newQStyledItemDelegate(outptr_QStyledItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret := newQStyledItemDelegate(C.QStyledItemDelegate_new()) ret.isSubclass = true return ret } // NewQStyledItemDelegate2 constructs a new QStyledItemDelegate object. func NewQStyledItemDelegate2(parent *QObject) *QStyledItemDelegate { - var outptr_QStyledItemDelegate *C.QStyledItemDelegate = nil - var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil - var outptr_QObject *C.QObject = nil - C.QStyledItemDelegate_new2(parent.cPointer(), &outptr_QStyledItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) - ret := newQStyledItemDelegate(outptr_QStyledItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret := newQStyledItemDelegate(C.QStyledItemDelegate_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -116,7 +106,7 @@ func (this *QStyledItemDelegate) SizeHint(option *QStyleOptionViewItem, index *Q } func (this *QStyledItemDelegate) CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return newQWidget(C.QStyledItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer()), nil, nil) + return newQWidget(C.QStyledItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer())) } func (this *QStyledItemDelegate) SetEditorData(editor *QWidget, index *QModelIndex) { @@ -212,7 +202,7 @@ func miqt_exec_callback_QStyledItemDelegate_Paint(self *C.QStyledItemDelegate, c // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -242,7 +232,7 @@ func miqt_exec_callback_QStyledItemDelegate_SizeHint(self *C.QStyledItemDelegate } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) slotval2 := newQModelIndex(index) @@ -254,7 +244,7 @@ func miqt_exec_callback_QStyledItemDelegate_SizeHint(self *C.QStyledItemDelegate func (this *QStyledItemDelegate) callVirtualBase_CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return newQWidget(C.QStyledItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer()), nil, nil) + return newQWidget(C.QStyledItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer())) } func (this *QStyledItemDelegate) OnCreateEditor(slot func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) { @@ -272,9 +262,9 @@ func miqt_exec_callback_QStyledItemDelegate_CreateEditor(self *C.QStyledItemDele } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(parent, nil, nil) + slotval1 := newQWidget(parent) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -304,7 +294,7 @@ func miqt_exec_callback_QStyledItemDelegate_SetEditorData(self *C.QStyledItemDel } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := newQModelIndex(index) @@ -332,9 +322,9 @@ func miqt_exec_callback_QStyledItemDelegate_SetModelData(self *C.QStyledItemDele } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) - slotval2 := newQAbstractItemModel(model, nil) + slotval2 := newQAbstractItemModel(model) slotval3 := newQModelIndex(index) @@ -362,9 +352,9 @@ func miqt_exec_callback_QStyledItemDelegate_UpdateEditorGeometry(self *C.QStyled } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -428,7 +418,7 @@ func miqt_exec_callback_QStyledItemDelegate_InitStyleOption(self *C.QStyledItemD } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) slotval2 := newQModelIndex(index) @@ -488,9 +478,9 @@ func miqt_exec_callback_QStyledItemDelegate_EditorEvent(self *C.QStyledItemDeleg // Convert all CABI parameters to Go parameters slotval1 := newQEvent(event) - slotval2 := newQAbstractItemModel(model, nil) + slotval2 := newQAbstractItemModel(model) - slotval3 := newQStyleOptionViewItem(option, nil) + slotval3 := newQStyleOptionViewItem(option) slotval4 := newQModelIndex(index) @@ -520,7 +510,7 @@ func miqt_exec_callback_QStyledItemDelegate_DestroyEditor(self *C.QStyledItemDel } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := newQModelIndex(index) @@ -548,11 +538,11 @@ func miqt_exec_callback_QStyledItemDelegate_HelpEvent(self *C.QStyledItemDelegat } // Convert all CABI parameters to Go parameters - slotval1 := newQHelpEvent(event, nil) + slotval1 := newQHelpEvent(event) - slotval2 := newQAbstractItemView(view, nil, nil, nil, nil, nil) + slotval2 := newQAbstractItemView(view) - slotval3 := newQStyleOptionViewItem(option, nil) + slotval3 := newQStyleOptionViewItem(option) slotval4 := newQModelIndex(index) diff --git a/qt/gen_qstyleditemdelegate.h b/qt/gen_qstyleditemdelegate.h index 0b49d75f..bedb822e 100644 --- a/qt/gen_qstyleditemdelegate.h +++ b/qt/gen_qstyleditemdelegate.h @@ -50,8 +50,9 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QStyledItemDelegate_new(QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); -void QStyledItemDelegate_new2(QObject* parent, QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); +QStyledItemDelegate* QStyledItemDelegate_new(); +QStyledItemDelegate* QStyledItemDelegate_new2(QObject* parent); +void QStyledItemDelegate_virtbase(QStyledItemDelegate* src, QAbstractItemDelegate** outptr_QAbstractItemDelegate); QMetaObject* QStyledItemDelegate_MetaObject(const QStyledItemDelegate* self); void* QStyledItemDelegate_Metacast(QStyledItemDelegate* self, const char* param1); struct miqt_string QStyledItemDelegate_Tr(const char* s); diff --git a/qt/gen_qstylefactory.go b/qt/gen_qstylefactory.go index de3eb181..028fbb26 100644 --- a/qt/gen_qstylefactory.go +++ b/qt/gen_qstylefactory.go @@ -37,16 +37,13 @@ func newQStyleFactory(h *C.QStyleFactory) *QStyleFactory { if h == nil { return nil } + return &QStyleFactory{h: h} } // UnsafeNewQStyleFactory constructs the type using only unsafe pointers. func UnsafeNewQStyleFactory(h unsafe.Pointer) *QStyleFactory { - if h == nil { - return nil - } - - return &QStyleFactory{h: (*C.QStyleFactory)(h)} + return newQStyleFactory((*C.QStyleFactory)(h)) } func QStyleFactory_Keys() []string { @@ -67,7 +64,7 @@ func QStyleFactory_Create(param1 string) *QStyle { param1_ms.data = C.CString(param1) param1_ms.len = C.size_t(len(param1)) defer C.free(unsafe.Pointer(param1_ms.data)) - return newQStyle(C.QStyleFactory_Create(param1_ms), nil) + return newQStyle(C.QStyleFactory_Create(param1_ms)) } // Delete this object from C++ memory. diff --git a/qt/gen_qstylehints.cpp b/qt/gen_qstylehints.cpp index c67e00f4..183b69d3 100644 --- a/qt/gen_qstylehints.cpp +++ b/qt/gen_qstylehints.cpp @@ -9,6 +9,10 @@ #include "gen_qstylehints.h" #include "_cgo_export.h" +void QStyleHints_virtbase(QStyleHints* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QStyleHints_MetaObject(const QStyleHints* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/gen_qstylehints.go b/qt/gen_qstylehints.go index 3d1343b0..b7b4d924 100644 --- a/qt/gen_qstylehints.go +++ b/qt/gen_qstylehints.go @@ -35,22 +35,20 @@ func (this *QStyleHints) UnsafePointer() unsafe.Pointer { } // newQStyleHints constructs the type using only CGO pointers. -func newQStyleHints(h *C.QStyleHints, h_QObject *C.QObject) *QStyleHints { +func newQStyleHints(h *C.QStyleHints) *QStyleHints { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QStyleHints_virtbase(h, &outptr_QObject) + return &QStyleHints{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQStyleHints constructs the type using only unsafe pointers. -func UnsafeNewQStyleHints(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStyleHints { - if h == nil { - return nil - } - - return &QStyleHints{h: (*C.QStyleHints)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQStyleHints(h unsafe.Pointer) *QStyleHints { + return newQStyleHints((*C.QStyleHints)(h)) } func (this *QStyleHints) MetaObject() *QMetaObject { diff --git a/qt/gen_qstylehints.h b/qt/gen_qstylehints.h index 7f600ced..6076498d 100644 --- a/qt/gen_qstylehints.h +++ b/qt/gen_qstylehints.h @@ -26,6 +26,7 @@ typedef struct QObject QObject; typedef struct QStyleHints QStyleHints; #endif +void QStyleHints_virtbase(QStyleHints* src, QObject** outptr_QObject); QMetaObject* QStyleHints_MetaObject(const QStyleHints* self); void* QStyleHints_Metacast(QStyleHints* self, const char* param1); struct miqt_string QStyleHints_Tr(const char* s); diff --git a/qt/gen_qstyleoption.cpp b/qt/gen_qstyleoption.cpp index 117ebec7..25432ac0 100644 --- a/qt/gen_qstyleoption.cpp +++ b/qt/gen_qstyleoption.cpp @@ -32,24 +32,20 @@ #include "gen_qstyleoption.h" #include "_cgo_export.h" -void QStyleOption_new(QStyleOption** outptr_QStyleOption) { - QStyleOption* ret = new QStyleOption(); - *outptr_QStyleOption = ret; +QStyleOption* QStyleOption_new() { + return new QStyleOption(); } -void QStyleOption_new2(QStyleOption* other, QStyleOption** outptr_QStyleOption) { - QStyleOption* ret = new QStyleOption(*other); - *outptr_QStyleOption = ret; +QStyleOption* QStyleOption_new2(QStyleOption* other) { + return new QStyleOption(*other); } -void QStyleOption_new3(int version, QStyleOption** outptr_QStyleOption) { - QStyleOption* ret = new QStyleOption(static_cast(version)); - *outptr_QStyleOption = ret; +QStyleOption* QStyleOption_new3(int version) { + return new QStyleOption(static_cast(version)); } -void QStyleOption_new4(int version, int typeVal, QStyleOption** outptr_QStyleOption) { - QStyleOption* ret = new QStyleOption(static_cast(version), static_cast(typeVal)); - *outptr_QStyleOption = ret; +QStyleOption* QStyleOption_new4(int version, int typeVal) { + return new QStyleOption(static_cast(version), static_cast(typeVal)); } void QStyleOption_Init(QStyleOption* self, QWidget* w) { @@ -72,16 +68,16 @@ void QStyleOption_Delete(QStyleOption* self, bool isSubclass) { } } -void QStyleOptionFocusRect_new(QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption) { - QStyleOptionFocusRect* ret = new QStyleOptionFocusRect(); - *outptr_QStyleOptionFocusRect = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionFocusRect* QStyleOptionFocusRect_new() { + return new QStyleOptionFocusRect(); } -void QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other, QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption) { - QStyleOptionFocusRect* ret = new QStyleOptionFocusRect(*other); - *outptr_QStyleOptionFocusRect = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionFocusRect* QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other) { + return new QStyleOptionFocusRect(*other); +} + +void QStyleOptionFocusRect_virtbase(QStyleOptionFocusRect* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionFocusRect_Delete(QStyleOptionFocusRect* self, bool isSubclass) { @@ -92,16 +88,16 @@ void QStyleOptionFocusRect_Delete(QStyleOptionFocusRect* self, bool isSubclass) } } -void QStyleOptionFrame_new(QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption) { - QStyleOptionFrame* ret = new QStyleOptionFrame(); - *outptr_QStyleOptionFrame = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionFrame* QStyleOptionFrame_new() { + return new QStyleOptionFrame(); } -void QStyleOptionFrame_new2(QStyleOptionFrame* other, QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption) { - QStyleOptionFrame* ret = new QStyleOptionFrame(*other); - *outptr_QStyleOptionFrame = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionFrame* QStyleOptionFrame_new2(QStyleOptionFrame* other) { + return new QStyleOptionFrame(*other); +} + +void QStyleOptionFrame_virtbase(QStyleOptionFrame* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionFrame_Delete(QStyleOptionFrame* self, bool isSubclass) { @@ -112,16 +108,16 @@ void QStyleOptionFrame_Delete(QStyleOptionFrame* self, bool isSubclass) { } } -void QStyleOptionTabWidgetFrame_new(QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption) { - QStyleOptionTabWidgetFrame* ret = new QStyleOptionTabWidgetFrame(); - *outptr_QStyleOptionTabWidgetFrame = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new() { + return new QStyleOptionTabWidgetFrame(); } -void QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other, QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption) { - QStyleOptionTabWidgetFrame* ret = new QStyleOptionTabWidgetFrame(*other); - *outptr_QStyleOptionTabWidgetFrame = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other) { + return new QStyleOptionTabWidgetFrame(*other); +} + +void QStyleOptionTabWidgetFrame_virtbase(QStyleOptionTabWidgetFrame* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionTabWidgetFrame_Delete(QStyleOptionTabWidgetFrame* self, bool isSubclass) { @@ -132,16 +128,16 @@ void QStyleOptionTabWidgetFrame_Delete(QStyleOptionTabWidgetFrame* self, bool is } } -void QStyleOptionTabBarBase_new(QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption) { - QStyleOptionTabBarBase* ret = new QStyleOptionTabBarBase(); - *outptr_QStyleOptionTabBarBase = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTabBarBase* QStyleOptionTabBarBase_new() { + return new QStyleOptionTabBarBase(); } -void QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other, QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption) { - QStyleOptionTabBarBase* ret = new QStyleOptionTabBarBase(*other); - *outptr_QStyleOptionTabBarBase = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTabBarBase* QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other) { + return new QStyleOptionTabBarBase(*other); +} + +void QStyleOptionTabBarBase_virtbase(QStyleOptionTabBarBase* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionTabBarBase_Delete(QStyleOptionTabBarBase* self, bool isSubclass) { @@ -152,16 +148,16 @@ void QStyleOptionTabBarBase_Delete(QStyleOptionTabBarBase* self, bool isSubclass } } -void QStyleOptionHeader_new(QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption) { - QStyleOptionHeader* ret = new QStyleOptionHeader(); - *outptr_QStyleOptionHeader = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionHeader* QStyleOptionHeader_new() { + return new QStyleOptionHeader(); } -void QStyleOptionHeader_new2(QStyleOptionHeader* other, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption) { - QStyleOptionHeader* ret = new QStyleOptionHeader(*other); - *outptr_QStyleOptionHeader = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionHeader* QStyleOptionHeader_new2(QStyleOptionHeader* other) { + return new QStyleOptionHeader(*other); +} + +void QStyleOptionHeader_virtbase(QStyleOptionHeader* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionHeader_Delete(QStyleOptionHeader* self, bool isSubclass) { @@ -172,16 +168,16 @@ void QStyleOptionHeader_Delete(QStyleOptionHeader* self, bool isSubclass) { } } -void QStyleOptionButton_new(QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption) { - QStyleOptionButton* ret = new QStyleOptionButton(); - *outptr_QStyleOptionButton = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionButton* QStyleOptionButton_new() { + return new QStyleOptionButton(); } -void QStyleOptionButton_new2(QStyleOptionButton* other, QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption) { - QStyleOptionButton* ret = new QStyleOptionButton(*other); - *outptr_QStyleOptionButton = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionButton* QStyleOptionButton_new2(QStyleOptionButton* other) { + return new QStyleOptionButton(*other); +} + +void QStyleOptionButton_virtbase(QStyleOptionButton* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionButton_Delete(QStyleOptionButton* self, bool isSubclass) { @@ -192,16 +188,16 @@ void QStyleOptionButton_Delete(QStyleOptionButton* self, bool isSubclass) { } } -void QStyleOptionTab_new(QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption) { - QStyleOptionTab* ret = new QStyleOptionTab(); - *outptr_QStyleOptionTab = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTab* QStyleOptionTab_new() { + return new QStyleOptionTab(); } -void QStyleOptionTab_new2(QStyleOptionTab* other, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption) { - QStyleOptionTab* ret = new QStyleOptionTab(*other); - *outptr_QStyleOptionTab = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTab* QStyleOptionTab_new2(QStyleOptionTab* other) { + return new QStyleOptionTab(*other); +} + +void QStyleOptionTab_virtbase(QStyleOptionTab* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionTab_Delete(QStyleOptionTab* self, bool isSubclass) { @@ -212,18 +208,16 @@ void QStyleOptionTab_Delete(QStyleOptionTab* self, bool isSubclass) { } } -void QStyleOptionTabV4_new(QStyleOptionTabV4** outptr_QStyleOptionTabV4, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption) { - QStyleOptionTabV4* ret = new QStyleOptionTabV4(); - *outptr_QStyleOptionTabV4 = ret; - *outptr_QStyleOptionTab = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTabV4* QStyleOptionTabV4_new() { + return new QStyleOptionTabV4(); } -void QStyleOptionTabV4_new2(QStyleOptionTabV4* param1, QStyleOptionTabV4** outptr_QStyleOptionTabV4, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption) { - QStyleOptionTabV4* ret = new QStyleOptionTabV4(*param1); - *outptr_QStyleOptionTabV4 = ret; - *outptr_QStyleOptionTab = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTabV4* QStyleOptionTabV4_new2(QStyleOptionTabV4* param1) { + return new QStyleOptionTabV4(*param1); +} + +void QStyleOptionTabV4_virtbase(QStyleOptionTabV4* src, QStyleOptionTab** outptr_QStyleOptionTab) { + *outptr_QStyleOptionTab = static_cast(src); } void QStyleOptionTabV4_OperatorAssign(QStyleOptionTabV4* self, QStyleOptionTabV4* param1) { @@ -238,16 +232,16 @@ void QStyleOptionTabV4_Delete(QStyleOptionTabV4* self, bool isSubclass) { } } -void QStyleOptionToolBar_new(QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption) { - QStyleOptionToolBar* ret = new QStyleOptionToolBar(); - *outptr_QStyleOptionToolBar = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionToolBar* QStyleOptionToolBar_new() { + return new QStyleOptionToolBar(); } -void QStyleOptionToolBar_new2(QStyleOptionToolBar* other, QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption) { - QStyleOptionToolBar* ret = new QStyleOptionToolBar(*other); - *outptr_QStyleOptionToolBar = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionToolBar* QStyleOptionToolBar_new2(QStyleOptionToolBar* other) { + return new QStyleOptionToolBar(*other); +} + +void QStyleOptionToolBar_virtbase(QStyleOptionToolBar* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionToolBar_Delete(QStyleOptionToolBar* self, bool isSubclass) { @@ -258,16 +252,16 @@ void QStyleOptionToolBar_Delete(QStyleOptionToolBar* self, bool isSubclass) { } } -void QStyleOptionProgressBar_new(QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption) { - QStyleOptionProgressBar* ret = new QStyleOptionProgressBar(); - *outptr_QStyleOptionProgressBar = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionProgressBar* QStyleOptionProgressBar_new() { + return new QStyleOptionProgressBar(); } -void QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other, QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption) { - QStyleOptionProgressBar* ret = new QStyleOptionProgressBar(*other); - *outptr_QStyleOptionProgressBar = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionProgressBar* QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other) { + return new QStyleOptionProgressBar(*other); +} + +void QStyleOptionProgressBar_virtbase(QStyleOptionProgressBar* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionProgressBar_Delete(QStyleOptionProgressBar* self, bool isSubclass) { @@ -278,16 +272,16 @@ void QStyleOptionProgressBar_Delete(QStyleOptionProgressBar* self, bool isSubcla } } -void QStyleOptionMenuItem_new(QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption) { - QStyleOptionMenuItem* ret = new QStyleOptionMenuItem(); - *outptr_QStyleOptionMenuItem = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionMenuItem* QStyleOptionMenuItem_new() { + return new QStyleOptionMenuItem(); } -void QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other, QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption) { - QStyleOptionMenuItem* ret = new QStyleOptionMenuItem(*other); - *outptr_QStyleOptionMenuItem = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionMenuItem* QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other) { + return new QStyleOptionMenuItem(*other); +} + +void QStyleOptionMenuItem_virtbase(QStyleOptionMenuItem* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionMenuItem_Delete(QStyleOptionMenuItem* self, bool isSubclass) { @@ -298,16 +292,16 @@ void QStyleOptionMenuItem_Delete(QStyleOptionMenuItem* self, bool isSubclass) { } } -void QStyleOptionDockWidget_new(QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption) { - QStyleOptionDockWidget* ret = new QStyleOptionDockWidget(); - *outptr_QStyleOptionDockWidget = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionDockWidget* QStyleOptionDockWidget_new() { + return new QStyleOptionDockWidget(); } -void QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other, QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption) { - QStyleOptionDockWidget* ret = new QStyleOptionDockWidget(*other); - *outptr_QStyleOptionDockWidget = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionDockWidget* QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other) { + return new QStyleOptionDockWidget(*other); +} + +void QStyleOptionDockWidget_virtbase(QStyleOptionDockWidget* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionDockWidget_Delete(QStyleOptionDockWidget* self, bool isSubclass) { @@ -318,16 +312,16 @@ void QStyleOptionDockWidget_Delete(QStyleOptionDockWidget* self, bool isSubclass } } -void QStyleOptionViewItem_new(QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption) { - QStyleOptionViewItem* ret = new QStyleOptionViewItem(); - *outptr_QStyleOptionViewItem = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionViewItem* QStyleOptionViewItem_new() { + return new QStyleOptionViewItem(); } -void QStyleOptionViewItem_new2(QStyleOptionViewItem* other, QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption) { - QStyleOptionViewItem* ret = new QStyleOptionViewItem(*other); - *outptr_QStyleOptionViewItem = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionViewItem* QStyleOptionViewItem_new2(QStyleOptionViewItem* other) { + return new QStyleOptionViewItem(*other); +} + +void QStyleOptionViewItem_virtbase(QStyleOptionViewItem* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionViewItem_Delete(QStyleOptionViewItem* self, bool isSubclass) { @@ -338,16 +332,16 @@ void QStyleOptionViewItem_Delete(QStyleOptionViewItem* self, bool isSubclass) { } } -void QStyleOptionToolBox_new(QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption) { - QStyleOptionToolBox* ret = new QStyleOptionToolBox(); - *outptr_QStyleOptionToolBox = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionToolBox* QStyleOptionToolBox_new() { + return new QStyleOptionToolBox(); } -void QStyleOptionToolBox_new2(QStyleOptionToolBox* other, QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption) { - QStyleOptionToolBox* ret = new QStyleOptionToolBox(*other); - *outptr_QStyleOptionToolBox = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionToolBox* QStyleOptionToolBox_new2(QStyleOptionToolBox* other) { + return new QStyleOptionToolBox(*other); +} + +void QStyleOptionToolBox_virtbase(QStyleOptionToolBox* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionToolBox_Delete(QStyleOptionToolBox* self, bool isSubclass) { @@ -358,16 +352,16 @@ void QStyleOptionToolBox_Delete(QStyleOptionToolBox* self, bool isSubclass) { } } -void QStyleOptionRubberBand_new(QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption) { - QStyleOptionRubberBand* ret = new QStyleOptionRubberBand(); - *outptr_QStyleOptionRubberBand = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionRubberBand* QStyleOptionRubberBand_new() { + return new QStyleOptionRubberBand(); } -void QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other, QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption) { - QStyleOptionRubberBand* ret = new QStyleOptionRubberBand(*other); - *outptr_QStyleOptionRubberBand = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionRubberBand* QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other) { + return new QStyleOptionRubberBand(*other); +} + +void QStyleOptionRubberBand_virtbase(QStyleOptionRubberBand* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionRubberBand_Delete(QStyleOptionRubberBand* self, bool isSubclass) { @@ -378,28 +372,24 @@ void QStyleOptionRubberBand_Delete(QStyleOptionRubberBand* self, bool isSubclass } } -void QStyleOptionComplex_new(QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionComplex* ret = new QStyleOptionComplex(); - *outptr_QStyleOptionComplex = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionComplex* QStyleOptionComplex_new() { + return new QStyleOptionComplex(); } -void QStyleOptionComplex_new2(QStyleOptionComplex* other, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionComplex* ret = new QStyleOptionComplex(*other); - *outptr_QStyleOptionComplex = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionComplex* QStyleOptionComplex_new2(QStyleOptionComplex* other) { + return new QStyleOptionComplex(*other); } -void QStyleOptionComplex_new3(int version, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionComplex* ret = new QStyleOptionComplex(static_cast(version)); - *outptr_QStyleOptionComplex = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionComplex* QStyleOptionComplex_new3(int version) { + return new QStyleOptionComplex(static_cast(version)); } -void QStyleOptionComplex_new4(int version, int typeVal, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionComplex* ret = new QStyleOptionComplex(static_cast(version), static_cast(typeVal)); - *outptr_QStyleOptionComplex = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionComplex* QStyleOptionComplex_new4(int version, int typeVal) { + return new QStyleOptionComplex(static_cast(version), static_cast(typeVal)); +} + +void QStyleOptionComplex_virtbase(QStyleOptionComplex* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionComplex_Delete(QStyleOptionComplex* self, bool isSubclass) { @@ -410,18 +400,16 @@ void QStyleOptionComplex_Delete(QStyleOptionComplex* self, bool isSubclass) { } } -void QStyleOptionSlider_new(QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionSlider* ret = new QStyleOptionSlider(); - *outptr_QStyleOptionSlider = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionSlider* QStyleOptionSlider_new() { + return new QStyleOptionSlider(); } -void QStyleOptionSlider_new2(QStyleOptionSlider* other, QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionSlider* ret = new QStyleOptionSlider(*other); - *outptr_QStyleOptionSlider = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionSlider* QStyleOptionSlider_new2(QStyleOptionSlider* other) { + return new QStyleOptionSlider(*other); +} + +void QStyleOptionSlider_virtbase(QStyleOptionSlider* src, QStyleOptionComplex** outptr_QStyleOptionComplex) { + *outptr_QStyleOptionComplex = static_cast(src); } void QStyleOptionSlider_Delete(QStyleOptionSlider* self, bool isSubclass) { @@ -432,18 +420,16 @@ void QStyleOptionSlider_Delete(QStyleOptionSlider* self, bool isSubclass) { } } -void QStyleOptionSpinBox_new(QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionSpinBox* ret = new QStyleOptionSpinBox(); - *outptr_QStyleOptionSpinBox = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionSpinBox* QStyleOptionSpinBox_new() { + return new QStyleOptionSpinBox(); } -void QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other, QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionSpinBox* ret = new QStyleOptionSpinBox(*other); - *outptr_QStyleOptionSpinBox = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionSpinBox* QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other) { + return new QStyleOptionSpinBox(*other); +} + +void QStyleOptionSpinBox_virtbase(QStyleOptionSpinBox* src, QStyleOptionComplex** outptr_QStyleOptionComplex) { + *outptr_QStyleOptionComplex = static_cast(src); } void QStyleOptionSpinBox_Delete(QStyleOptionSpinBox* self, bool isSubclass) { @@ -454,18 +440,16 @@ void QStyleOptionSpinBox_Delete(QStyleOptionSpinBox* self, bool isSubclass) { } } -void QStyleOptionToolButton_new(QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionToolButton* ret = new QStyleOptionToolButton(); - *outptr_QStyleOptionToolButton = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionToolButton* QStyleOptionToolButton_new() { + return new QStyleOptionToolButton(); } -void QStyleOptionToolButton_new2(QStyleOptionToolButton* other, QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionToolButton* ret = new QStyleOptionToolButton(*other); - *outptr_QStyleOptionToolButton = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionToolButton* QStyleOptionToolButton_new2(QStyleOptionToolButton* other) { + return new QStyleOptionToolButton(*other); +} + +void QStyleOptionToolButton_virtbase(QStyleOptionToolButton* src, QStyleOptionComplex** outptr_QStyleOptionComplex) { + *outptr_QStyleOptionComplex = static_cast(src); } void QStyleOptionToolButton_Delete(QStyleOptionToolButton* self, bool isSubclass) { @@ -476,18 +460,16 @@ void QStyleOptionToolButton_Delete(QStyleOptionToolButton* self, bool isSubclass } } -void QStyleOptionComboBox_new(QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionComboBox* ret = new QStyleOptionComboBox(); - *outptr_QStyleOptionComboBox = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionComboBox* QStyleOptionComboBox_new() { + return new QStyleOptionComboBox(); } -void QStyleOptionComboBox_new2(QStyleOptionComboBox* other, QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionComboBox* ret = new QStyleOptionComboBox(*other); - *outptr_QStyleOptionComboBox = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionComboBox* QStyleOptionComboBox_new2(QStyleOptionComboBox* other) { + return new QStyleOptionComboBox(*other); +} + +void QStyleOptionComboBox_virtbase(QStyleOptionComboBox* src, QStyleOptionComplex** outptr_QStyleOptionComplex) { + *outptr_QStyleOptionComplex = static_cast(src); } void QStyleOptionComboBox_Delete(QStyleOptionComboBox* self, bool isSubclass) { @@ -498,18 +480,16 @@ void QStyleOptionComboBox_Delete(QStyleOptionComboBox* self, bool isSubclass) { } } -void QStyleOptionTitleBar_new(QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionTitleBar* ret = new QStyleOptionTitleBar(); - *outptr_QStyleOptionTitleBar = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTitleBar* QStyleOptionTitleBar_new() { + return new QStyleOptionTitleBar(); } -void QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other, QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionTitleBar* ret = new QStyleOptionTitleBar(*other); - *outptr_QStyleOptionTitleBar = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTitleBar* QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other) { + return new QStyleOptionTitleBar(*other); +} + +void QStyleOptionTitleBar_virtbase(QStyleOptionTitleBar* src, QStyleOptionComplex** outptr_QStyleOptionComplex) { + *outptr_QStyleOptionComplex = static_cast(src); } void QStyleOptionTitleBar_Delete(QStyleOptionTitleBar* self, bool isSubclass) { @@ -520,18 +500,16 @@ void QStyleOptionTitleBar_Delete(QStyleOptionTitleBar* self, bool isSubclass) { } } -void QStyleOptionGroupBox_new(QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionGroupBox* ret = new QStyleOptionGroupBox(); - *outptr_QStyleOptionGroupBox = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionGroupBox* QStyleOptionGroupBox_new() { + return new QStyleOptionGroupBox(); } -void QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other, QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionGroupBox* ret = new QStyleOptionGroupBox(*other); - *outptr_QStyleOptionGroupBox = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionGroupBox* QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other) { + return new QStyleOptionGroupBox(*other); +} + +void QStyleOptionGroupBox_virtbase(QStyleOptionGroupBox* src, QStyleOptionComplex** outptr_QStyleOptionComplex) { + *outptr_QStyleOptionComplex = static_cast(src); } void QStyleOptionGroupBox_Delete(QStyleOptionGroupBox* self, bool isSubclass) { @@ -542,18 +520,16 @@ void QStyleOptionGroupBox_Delete(QStyleOptionGroupBox* self, bool isSubclass) { } } -void QStyleOptionSizeGrip_new(QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionSizeGrip* ret = new QStyleOptionSizeGrip(); - *outptr_QStyleOptionSizeGrip = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionSizeGrip* QStyleOptionSizeGrip_new() { + return new QStyleOptionSizeGrip(); } -void QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other, QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionSizeGrip* ret = new QStyleOptionSizeGrip(*other); - *outptr_QStyleOptionSizeGrip = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionSizeGrip* QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other) { + return new QStyleOptionSizeGrip(*other); +} + +void QStyleOptionSizeGrip_virtbase(QStyleOptionSizeGrip* src, QStyleOptionComplex** outptr_QStyleOptionComplex) { + *outptr_QStyleOptionComplex = static_cast(src); } void QStyleOptionSizeGrip_Delete(QStyleOptionSizeGrip* self, bool isSubclass) { @@ -564,16 +540,16 @@ void QStyleOptionSizeGrip_Delete(QStyleOptionSizeGrip* self, bool isSubclass) { } } -void QStyleOptionGraphicsItem_new(QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption) { - QStyleOptionGraphicsItem* ret = new QStyleOptionGraphicsItem(); - *outptr_QStyleOptionGraphicsItem = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new() { + return new QStyleOptionGraphicsItem(); } -void QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other, QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption) { - QStyleOptionGraphicsItem* ret = new QStyleOptionGraphicsItem(*other); - *outptr_QStyleOptionGraphicsItem = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other) { + return new QStyleOptionGraphicsItem(*other); +} + +void QStyleOptionGraphicsItem_virtbase(QStyleOptionGraphicsItem* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } double QStyleOptionGraphicsItem_LevelOfDetailFromTransform(QTransform* worldTransform) { @@ -589,24 +565,20 @@ void QStyleOptionGraphicsItem_Delete(QStyleOptionGraphicsItem* self, bool isSubc } } -void QStyleHintReturn_new(QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturn* ret = new QStyleHintReturn(); - *outptr_QStyleHintReturn = ret; +QStyleHintReturn* QStyleHintReturn_new() { + return new QStyleHintReturn(); } -void QStyleHintReturn_new2(QStyleHintReturn* param1, QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturn* ret = new QStyleHintReturn(*param1); - *outptr_QStyleHintReturn = ret; +QStyleHintReturn* QStyleHintReturn_new2(QStyleHintReturn* param1) { + return new QStyleHintReturn(*param1); } -void QStyleHintReturn_new3(int version, QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturn* ret = new QStyleHintReturn(static_cast(version)); - *outptr_QStyleHintReturn = ret; +QStyleHintReturn* QStyleHintReturn_new3(int version) { + return new QStyleHintReturn(static_cast(version)); } -void QStyleHintReturn_new4(int version, int typeVal, QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturn* ret = new QStyleHintReturn(static_cast(version), static_cast(typeVal)); - *outptr_QStyleHintReturn = ret; +QStyleHintReturn* QStyleHintReturn_new4(int version, int typeVal) { + return new QStyleHintReturn(static_cast(version), static_cast(typeVal)); } void QStyleHintReturn_OperatorAssign(QStyleHintReturn* self, QStyleHintReturn* param1) { @@ -621,16 +593,16 @@ void QStyleHintReturn_Delete(QStyleHintReturn* self, bool isSubclass) { } } -void QStyleHintReturnMask_new(QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturnMask* ret = new QStyleHintReturnMask(); - *outptr_QStyleHintReturnMask = ret; - *outptr_QStyleHintReturn = static_cast(ret); +QStyleHintReturnMask* QStyleHintReturnMask_new() { + return new QStyleHintReturnMask(); } -void QStyleHintReturnMask_new2(QStyleHintReturnMask* param1, QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturnMask* ret = new QStyleHintReturnMask(*param1); - *outptr_QStyleHintReturnMask = ret; - *outptr_QStyleHintReturn = static_cast(ret); +QStyleHintReturnMask* QStyleHintReturnMask_new2(QStyleHintReturnMask* param1) { + return new QStyleHintReturnMask(*param1); +} + +void QStyleHintReturnMask_virtbase(QStyleHintReturnMask* src, QStyleHintReturn** outptr_QStyleHintReturn) { + *outptr_QStyleHintReturn = static_cast(src); } void QStyleHintReturnMask_OperatorAssign(QStyleHintReturnMask* self, QStyleHintReturnMask* param1) { @@ -645,16 +617,16 @@ void QStyleHintReturnMask_Delete(QStyleHintReturnMask* self, bool isSubclass) { } } -void QStyleHintReturnVariant_new(QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturnVariant* ret = new QStyleHintReturnVariant(); - *outptr_QStyleHintReturnVariant = ret; - *outptr_QStyleHintReturn = static_cast(ret); +QStyleHintReturnVariant* QStyleHintReturnVariant_new() { + return new QStyleHintReturnVariant(); } -void QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1, QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturnVariant* ret = new QStyleHintReturnVariant(*param1); - *outptr_QStyleHintReturnVariant = ret; - *outptr_QStyleHintReturn = static_cast(ret); +QStyleHintReturnVariant* QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1) { + return new QStyleHintReturnVariant(*param1); +} + +void QStyleHintReturnVariant_virtbase(QStyleHintReturnVariant* src, QStyleHintReturn** outptr_QStyleHintReturn) { + *outptr_QStyleHintReturn = static_cast(src); } void QStyleHintReturnVariant_OperatorAssign(QStyleHintReturnVariant* self, QStyleHintReturnVariant* param1) { diff --git a/qt/gen_qstyleoption.go b/qt/gen_qstyleoption.go index 39d07eff..6605eb48 100644 --- a/qt/gen_qstyleoption.go +++ b/qt/gen_qstyleoption.go @@ -578,54 +578,43 @@ func newQStyleOption(h *C.QStyleOption) *QStyleOption { if h == nil { return nil } + return &QStyleOption{h: h} } // UnsafeNewQStyleOption constructs the type using only unsafe pointers. func UnsafeNewQStyleOption(h unsafe.Pointer) *QStyleOption { - if h == nil { - return nil - } - - return &QStyleOption{h: (*C.QStyleOption)(h)} + return newQStyleOption((*C.QStyleOption)(h)) } // NewQStyleOption constructs a new QStyleOption object. func NewQStyleOption() *QStyleOption { - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOption_new(&outptr_QStyleOption) - ret := newQStyleOption(outptr_QStyleOption) + ret := newQStyleOption(C.QStyleOption_new()) ret.isSubclass = true return ret } // NewQStyleOption2 constructs a new QStyleOption object. func NewQStyleOption2(other *QStyleOption) *QStyleOption { - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOption_new2(other.cPointer(), &outptr_QStyleOption) - ret := newQStyleOption(outptr_QStyleOption) + ret := newQStyleOption(C.QStyleOption_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQStyleOption3 constructs a new QStyleOption object. func NewQStyleOption3(version int) *QStyleOption { - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOption_new3((C.int)(version), &outptr_QStyleOption) - ret := newQStyleOption(outptr_QStyleOption) + ret := newQStyleOption(C.QStyleOption_new3((C.int)(version))) ret.isSubclass = true return ret } // NewQStyleOption4 constructs a new QStyleOption object. func NewQStyleOption4(version int, typeVal int) *QStyleOption { - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOption_new4((C.int)(version), (C.int)(typeVal), &outptr_QStyleOption) - ret := newQStyleOption(outptr_QStyleOption) + ret := newQStyleOption(C.QStyleOption_new4((C.int)(version), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -677,42 +666,34 @@ func (this *QStyleOptionFocusRect) UnsafePointer() unsafe.Pointer { } // newQStyleOptionFocusRect constructs the type using only CGO pointers. -func newQStyleOptionFocusRect(h *C.QStyleOptionFocusRect, h_QStyleOption *C.QStyleOption) *QStyleOptionFocusRect { +func newQStyleOptionFocusRect(h *C.QStyleOptionFocusRect) *QStyleOptionFocusRect { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionFocusRect_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionFocusRect{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionFocusRect constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionFocusRect(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionFocusRect { - if h == nil { - return nil - } - - return &QStyleOptionFocusRect{h: (*C.QStyleOptionFocusRect)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionFocusRect(h unsafe.Pointer) *QStyleOptionFocusRect { + return newQStyleOptionFocusRect((*C.QStyleOptionFocusRect)(h)) } // NewQStyleOptionFocusRect constructs a new QStyleOptionFocusRect object. func NewQStyleOptionFocusRect() *QStyleOptionFocusRect { - var outptr_QStyleOptionFocusRect *C.QStyleOptionFocusRect = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionFocusRect_new(&outptr_QStyleOptionFocusRect, &outptr_QStyleOption) - ret := newQStyleOptionFocusRect(outptr_QStyleOptionFocusRect, outptr_QStyleOption) + ret := newQStyleOptionFocusRect(C.QStyleOptionFocusRect_new()) ret.isSubclass = true return ret } // NewQStyleOptionFocusRect2 constructs a new QStyleOptionFocusRect object. func NewQStyleOptionFocusRect2(other *QStyleOptionFocusRect) *QStyleOptionFocusRect { - var outptr_QStyleOptionFocusRect *C.QStyleOptionFocusRect = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionFocusRect_new2(other.cPointer(), &outptr_QStyleOptionFocusRect, &outptr_QStyleOption) - ret := newQStyleOptionFocusRect(outptr_QStyleOptionFocusRect, outptr_QStyleOption) + ret := newQStyleOptionFocusRect(C.QStyleOptionFocusRect_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -752,42 +733,34 @@ func (this *QStyleOptionFrame) UnsafePointer() unsafe.Pointer { } // newQStyleOptionFrame constructs the type using only CGO pointers. -func newQStyleOptionFrame(h *C.QStyleOptionFrame, h_QStyleOption *C.QStyleOption) *QStyleOptionFrame { +func newQStyleOptionFrame(h *C.QStyleOptionFrame) *QStyleOptionFrame { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionFrame_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionFrame{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionFrame constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionFrame(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionFrame { - if h == nil { - return nil - } - - return &QStyleOptionFrame{h: (*C.QStyleOptionFrame)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionFrame(h unsafe.Pointer) *QStyleOptionFrame { + return newQStyleOptionFrame((*C.QStyleOptionFrame)(h)) } // NewQStyleOptionFrame constructs a new QStyleOptionFrame object. func NewQStyleOptionFrame() *QStyleOptionFrame { - var outptr_QStyleOptionFrame *C.QStyleOptionFrame = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionFrame_new(&outptr_QStyleOptionFrame, &outptr_QStyleOption) - ret := newQStyleOptionFrame(outptr_QStyleOptionFrame, outptr_QStyleOption) + ret := newQStyleOptionFrame(C.QStyleOptionFrame_new()) ret.isSubclass = true return ret } // NewQStyleOptionFrame2 constructs a new QStyleOptionFrame object. func NewQStyleOptionFrame2(other *QStyleOptionFrame) *QStyleOptionFrame { - var outptr_QStyleOptionFrame *C.QStyleOptionFrame = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionFrame_new2(other.cPointer(), &outptr_QStyleOptionFrame, &outptr_QStyleOption) - ret := newQStyleOptionFrame(outptr_QStyleOptionFrame, outptr_QStyleOption) + ret := newQStyleOptionFrame(C.QStyleOptionFrame_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -827,42 +800,34 @@ func (this *QStyleOptionTabWidgetFrame) UnsafePointer() unsafe.Pointer { } // newQStyleOptionTabWidgetFrame constructs the type using only CGO pointers. -func newQStyleOptionTabWidgetFrame(h *C.QStyleOptionTabWidgetFrame, h_QStyleOption *C.QStyleOption) *QStyleOptionTabWidgetFrame { +func newQStyleOptionTabWidgetFrame(h *C.QStyleOptionTabWidgetFrame) *QStyleOptionTabWidgetFrame { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionTabWidgetFrame_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionTabWidgetFrame{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionTabWidgetFrame constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionTabWidgetFrame(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTabWidgetFrame { - if h == nil { - return nil - } - - return &QStyleOptionTabWidgetFrame{h: (*C.QStyleOptionTabWidgetFrame)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionTabWidgetFrame(h unsafe.Pointer) *QStyleOptionTabWidgetFrame { + return newQStyleOptionTabWidgetFrame((*C.QStyleOptionTabWidgetFrame)(h)) } // NewQStyleOptionTabWidgetFrame constructs a new QStyleOptionTabWidgetFrame object. func NewQStyleOptionTabWidgetFrame() *QStyleOptionTabWidgetFrame { - var outptr_QStyleOptionTabWidgetFrame *C.QStyleOptionTabWidgetFrame = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTabWidgetFrame_new(&outptr_QStyleOptionTabWidgetFrame, &outptr_QStyleOption) - ret := newQStyleOptionTabWidgetFrame(outptr_QStyleOptionTabWidgetFrame, outptr_QStyleOption) + ret := newQStyleOptionTabWidgetFrame(C.QStyleOptionTabWidgetFrame_new()) ret.isSubclass = true return ret } // NewQStyleOptionTabWidgetFrame2 constructs a new QStyleOptionTabWidgetFrame object. func NewQStyleOptionTabWidgetFrame2(other *QStyleOptionTabWidgetFrame) *QStyleOptionTabWidgetFrame { - var outptr_QStyleOptionTabWidgetFrame *C.QStyleOptionTabWidgetFrame = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTabWidgetFrame_new2(other.cPointer(), &outptr_QStyleOptionTabWidgetFrame, &outptr_QStyleOption) - ret := newQStyleOptionTabWidgetFrame(outptr_QStyleOptionTabWidgetFrame, outptr_QStyleOption) + ret := newQStyleOptionTabWidgetFrame(C.QStyleOptionTabWidgetFrame_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -902,42 +867,34 @@ func (this *QStyleOptionTabBarBase) UnsafePointer() unsafe.Pointer { } // newQStyleOptionTabBarBase constructs the type using only CGO pointers. -func newQStyleOptionTabBarBase(h *C.QStyleOptionTabBarBase, h_QStyleOption *C.QStyleOption) *QStyleOptionTabBarBase { +func newQStyleOptionTabBarBase(h *C.QStyleOptionTabBarBase) *QStyleOptionTabBarBase { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionTabBarBase_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionTabBarBase{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionTabBarBase constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionTabBarBase(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTabBarBase { - if h == nil { - return nil - } - - return &QStyleOptionTabBarBase{h: (*C.QStyleOptionTabBarBase)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionTabBarBase(h unsafe.Pointer) *QStyleOptionTabBarBase { + return newQStyleOptionTabBarBase((*C.QStyleOptionTabBarBase)(h)) } // NewQStyleOptionTabBarBase constructs a new QStyleOptionTabBarBase object. func NewQStyleOptionTabBarBase() *QStyleOptionTabBarBase { - var outptr_QStyleOptionTabBarBase *C.QStyleOptionTabBarBase = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTabBarBase_new(&outptr_QStyleOptionTabBarBase, &outptr_QStyleOption) - ret := newQStyleOptionTabBarBase(outptr_QStyleOptionTabBarBase, outptr_QStyleOption) + ret := newQStyleOptionTabBarBase(C.QStyleOptionTabBarBase_new()) ret.isSubclass = true return ret } // NewQStyleOptionTabBarBase2 constructs a new QStyleOptionTabBarBase object. func NewQStyleOptionTabBarBase2(other *QStyleOptionTabBarBase) *QStyleOptionTabBarBase { - var outptr_QStyleOptionTabBarBase *C.QStyleOptionTabBarBase = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTabBarBase_new2(other.cPointer(), &outptr_QStyleOptionTabBarBase, &outptr_QStyleOption) - ret := newQStyleOptionTabBarBase(outptr_QStyleOptionTabBarBase, outptr_QStyleOption) + ret := newQStyleOptionTabBarBase(C.QStyleOptionTabBarBase_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -977,42 +934,34 @@ func (this *QStyleOptionHeader) UnsafePointer() unsafe.Pointer { } // newQStyleOptionHeader constructs the type using only CGO pointers. -func newQStyleOptionHeader(h *C.QStyleOptionHeader, h_QStyleOption *C.QStyleOption) *QStyleOptionHeader { +func newQStyleOptionHeader(h *C.QStyleOptionHeader) *QStyleOptionHeader { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionHeader_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionHeader{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionHeader constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionHeader(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionHeader { - if h == nil { - return nil - } - - return &QStyleOptionHeader{h: (*C.QStyleOptionHeader)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionHeader(h unsafe.Pointer) *QStyleOptionHeader { + return newQStyleOptionHeader((*C.QStyleOptionHeader)(h)) } // NewQStyleOptionHeader constructs a new QStyleOptionHeader object. func NewQStyleOptionHeader() *QStyleOptionHeader { - var outptr_QStyleOptionHeader *C.QStyleOptionHeader = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionHeader_new(&outptr_QStyleOptionHeader, &outptr_QStyleOption) - ret := newQStyleOptionHeader(outptr_QStyleOptionHeader, outptr_QStyleOption) + ret := newQStyleOptionHeader(C.QStyleOptionHeader_new()) ret.isSubclass = true return ret } // NewQStyleOptionHeader2 constructs a new QStyleOptionHeader object. func NewQStyleOptionHeader2(other *QStyleOptionHeader) *QStyleOptionHeader { - var outptr_QStyleOptionHeader *C.QStyleOptionHeader = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionHeader_new2(other.cPointer(), &outptr_QStyleOptionHeader, &outptr_QStyleOption) - ret := newQStyleOptionHeader(outptr_QStyleOptionHeader, outptr_QStyleOption) + ret := newQStyleOptionHeader(C.QStyleOptionHeader_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1052,42 +1001,34 @@ func (this *QStyleOptionButton) UnsafePointer() unsafe.Pointer { } // newQStyleOptionButton constructs the type using only CGO pointers. -func newQStyleOptionButton(h *C.QStyleOptionButton, h_QStyleOption *C.QStyleOption) *QStyleOptionButton { +func newQStyleOptionButton(h *C.QStyleOptionButton) *QStyleOptionButton { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionButton_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionButton{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionButton constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionButton(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionButton { - if h == nil { - return nil - } - - return &QStyleOptionButton{h: (*C.QStyleOptionButton)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionButton(h unsafe.Pointer) *QStyleOptionButton { + return newQStyleOptionButton((*C.QStyleOptionButton)(h)) } // NewQStyleOptionButton constructs a new QStyleOptionButton object. func NewQStyleOptionButton() *QStyleOptionButton { - var outptr_QStyleOptionButton *C.QStyleOptionButton = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionButton_new(&outptr_QStyleOptionButton, &outptr_QStyleOption) - ret := newQStyleOptionButton(outptr_QStyleOptionButton, outptr_QStyleOption) + ret := newQStyleOptionButton(C.QStyleOptionButton_new()) ret.isSubclass = true return ret } // NewQStyleOptionButton2 constructs a new QStyleOptionButton object. func NewQStyleOptionButton2(other *QStyleOptionButton) *QStyleOptionButton { - var outptr_QStyleOptionButton *C.QStyleOptionButton = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionButton_new2(other.cPointer(), &outptr_QStyleOptionButton, &outptr_QStyleOption) - ret := newQStyleOptionButton(outptr_QStyleOptionButton, outptr_QStyleOption) + ret := newQStyleOptionButton(C.QStyleOptionButton_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1127,42 +1068,34 @@ func (this *QStyleOptionTab) UnsafePointer() unsafe.Pointer { } // newQStyleOptionTab constructs the type using only CGO pointers. -func newQStyleOptionTab(h *C.QStyleOptionTab, h_QStyleOption *C.QStyleOption) *QStyleOptionTab { +func newQStyleOptionTab(h *C.QStyleOptionTab) *QStyleOptionTab { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionTab_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionTab{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionTab constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionTab(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTab { - if h == nil { - return nil - } - - return &QStyleOptionTab{h: (*C.QStyleOptionTab)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionTab(h unsafe.Pointer) *QStyleOptionTab { + return newQStyleOptionTab((*C.QStyleOptionTab)(h)) } // NewQStyleOptionTab constructs a new QStyleOptionTab object. func NewQStyleOptionTab() *QStyleOptionTab { - var outptr_QStyleOptionTab *C.QStyleOptionTab = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTab_new(&outptr_QStyleOptionTab, &outptr_QStyleOption) - ret := newQStyleOptionTab(outptr_QStyleOptionTab, outptr_QStyleOption) + ret := newQStyleOptionTab(C.QStyleOptionTab_new()) ret.isSubclass = true return ret } // NewQStyleOptionTab2 constructs a new QStyleOptionTab object. func NewQStyleOptionTab2(other *QStyleOptionTab) *QStyleOptionTab { - var outptr_QStyleOptionTab *C.QStyleOptionTab = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTab_new2(other.cPointer(), &outptr_QStyleOptionTab, &outptr_QStyleOption) - ret := newQStyleOptionTab(outptr_QStyleOptionTab, outptr_QStyleOption) + ret := newQStyleOptionTab(C.QStyleOptionTab_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1202,44 +1135,34 @@ func (this *QStyleOptionTabV4) UnsafePointer() unsafe.Pointer { } // newQStyleOptionTabV4 constructs the type using only CGO pointers. -func newQStyleOptionTabV4(h *C.QStyleOptionTabV4, h_QStyleOptionTab *C.QStyleOptionTab, h_QStyleOption *C.QStyleOption) *QStyleOptionTabV4 { +func newQStyleOptionTabV4(h *C.QStyleOptionTabV4) *QStyleOptionTabV4 { if h == nil { return nil } + var outptr_QStyleOptionTab *C.QStyleOptionTab = nil + C.QStyleOptionTabV4_virtbase(h, &outptr_QStyleOptionTab) + return &QStyleOptionTabV4{h: h, - QStyleOptionTab: newQStyleOptionTab(h_QStyleOptionTab, h_QStyleOption)} + QStyleOptionTab: newQStyleOptionTab(outptr_QStyleOptionTab)} } // UnsafeNewQStyleOptionTabV4 constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionTabV4(h unsafe.Pointer, h_QStyleOptionTab unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTabV4 { - if h == nil { - return nil - } - - return &QStyleOptionTabV4{h: (*C.QStyleOptionTabV4)(h), - QStyleOptionTab: UnsafeNewQStyleOptionTab(h_QStyleOptionTab, h_QStyleOption)} +func UnsafeNewQStyleOptionTabV4(h unsafe.Pointer) *QStyleOptionTabV4 { + return newQStyleOptionTabV4((*C.QStyleOptionTabV4)(h)) } // NewQStyleOptionTabV4 constructs a new QStyleOptionTabV4 object. func NewQStyleOptionTabV4() *QStyleOptionTabV4 { - var outptr_QStyleOptionTabV4 *C.QStyleOptionTabV4 = nil - var outptr_QStyleOptionTab *C.QStyleOptionTab = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTabV4_new(&outptr_QStyleOptionTabV4, &outptr_QStyleOptionTab, &outptr_QStyleOption) - ret := newQStyleOptionTabV4(outptr_QStyleOptionTabV4, outptr_QStyleOptionTab, outptr_QStyleOption) + ret := newQStyleOptionTabV4(C.QStyleOptionTabV4_new()) ret.isSubclass = true return ret } // NewQStyleOptionTabV42 constructs a new QStyleOptionTabV4 object. func NewQStyleOptionTabV42(param1 *QStyleOptionTabV4) *QStyleOptionTabV4 { - var outptr_QStyleOptionTabV4 *C.QStyleOptionTabV4 = nil - var outptr_QStyleOptionTab *C.QStyleOptionTab = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTabV4_new2(param1.cPointer(), &outptr_QStyleOptionTabV4, &outptr_QStyleOptionTab, &outptr_QStyleOption) - ret := newQStyleOptionTabV4(outptr_QStyleOptionTabV4, outptr_QStyleOptionTab, outptr_QStyleOption) + ret := newQStyleOptionTabV4(C.QStyleOptionTabV4_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1283,42 +1206,34 @@ func (this *QStyleOptionToolBar) UnsafePointer() unsafe.Pointer { } // newQStyleOptionToolBar constructs the type using only CGO pointers. -func newQStyleOptionToolBar(h *C.QStyleOptionToolBar, h_QStyleOption *C.QStyleOption) *QStyleOptionToolBar { +func newQStyleOptionToolBar(h *C.QStyleOptionToolBar) *QStyleOptionToolBar { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionToolBar_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionToolBar{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionToolBar constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionToolBar(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionToolBar { - if h == nil { - return nil - } - - return &QStyleOptionToolBar{h: (*C.QStyleOptionToolBar)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionToolBar(h unsafe.Pointer) *QStyleOptionToolBar { + return newQStyleOptionToolBar((*C.QStyleOptionToolBar)(h)) } // NewQStyleOptionToolBar constructs a new QStyleOptionToolBar object. func NewQStyleOptionToolBar() *QStyleOptionToolBar { - var outptr_QStyleOptionToolBar *C.QStyleOptionToolBar = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionToolBar_new(&outptr_QStyleOptionToolBar, &outptr_QStyleOption) - ret := newQStyleOptionToolBar(outptr_QStyleOptionToolBar, outptr_QStyleOption) + ret := newQStyleOptionToolBar(C.QStyleOptionToolBar_new()) ret.isSubclass = true return ret } // NewQStyleOptionToolBar2 constructs a new QStyleOptionToolBar object. func NewQStyleOptionToolBar2(other *QStyleOptionToolBar) *QStyleOptionToolBar { - var outptr_QStyleOptionToolBar *C.QStyleOptionToolBar = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionToolBar_new2(other.cPointer(), &outptr_QStyleOptionToolBar, &outptr_QStyleOption) - ret := newQStyleOptionToolBar(outptr_QStyleOptionToolBar, outptr_QStyleOption) + ret := newQStyleOptionToolBar(C.QStyleOptionToolBar_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1358,42 +1273,34 @@ func (this *QStyleOptionProgressBar) UnsafePointer() unsafe.Pointer { } // newQStyleOptionProgressBar constructs the type using only CGO pointers. -func newQStyleOptionProgressBar(h *C.QStyleOptionProgressBar, h_QStyleOption *C.QStyleOption) *QStyleOptionProgressBar { +func newQStyleOptionProgressBar(h *C.QStyleOptionProgressBar) *QStyleOptionProgressBar { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionProgressBar_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionProgressBar{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionProgressBar constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionProgressBar(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionProgressBar { - if h == nil { - return nil - } - - return &QStyleOptionProgressBar{h: (*C.QStyleOptionProgressBar)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionProgressBar(h unsafe.Pointer) *QStyleOptionProgressBar { + return newQStyleOptionProgressBar((*C.QStyleOptionProgressBar)(h)) } // NewQStyleOptionProgressBar constructs a new QStyleOptionProgressBar object. func NewQStyleOptionProgressBar() *QStyleOptionProgressBar { - var outptr_QStyleOptionProgressBar *C.QStyleOptionProgressBar = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionProgressBar_new(&outptr_QStyleOptionProgressBar, &outptr_QStyleOption) - ret := newQStyleOptionProgressBar(outptr_QStyleOptionProgressBar, outptr_QStyleOption) + ret := newQStyleOptionProgressBar(C.QStyleOptionProgressBar_new()) ret.isSubclass = true return ret } // NewQStyleOptionProgressBar2 constructs a new QStyleOptionProgressBar object. func NewQStyleOptionProgressBar2(other *QStyleOptionProgressBar) *QStyleOptionProgressBar { - var outptr_QStyleOptionProgressBar *C.QStyleOptionProgressBar = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionProgressBar_new2(other.cPointer(), &outptr_QStyleOptionProgressBar, &outptr_QStyleOption) - ret := newQStyleOptionProgressBar(outptr_QStyleOptionProgressBar, outptr_QStyleOption) + ret := newQStyleOptionProgressBar(C.QStyleOptionProgressBar_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1433,42 +1340,34 @@ func (this *QStyleOptionMenuItem) UnsafePointer() unsafe.Pointer { } // newQStyleOptionMenuItem constructs the type using only CGO pointers. -func newQStyleOptionMenuItem(h *C.QStyleOptionMenuItem, h_QStyleOption *C.QStyleOption) *QStyleOptionMenuItem { +func newQStyleOptionMenuItem(h *C.QStyleOptionMenuItem) *QStyleOptionMenuItem { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionMenuItem_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionMenuItem{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionMenuItem constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionMenuItem(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionMenuItem { - if h == nil { - return nil - } - - return &QStyleOptionMenuItem{h: (*C.QStyleOptionMenuItem)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionMenuItem(h unsafe.Pointer) *QStyleOptionMenuItem { + return newQStyleOptionMenuItem((*C.QStyleOptionMenuItem)(h)) } // NewQStyleOptionMenuItem constructs a new QStyleOptionMenuItem object. func NewQStyleOptionMenuItem() *QStyleOptionMenuItem { - var outptr_QStyleOptionMenuItem *C.QStyleOptionMenuItem = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionMenuItem_new(&outptr_QStyleOptionMenuItem, &outptr_QStyleOption) - ret := newQStyleOptionMenuItem(outptr_QStyleOptionMenuItem, outptr_QStyleOption) + ret := newQStyleOptionMenuItem(C.QStyleOptionMenuItem_new()) ret.isSubclass = true return ret } // NewQStyleOptionMenuItem2 constructs a new QStyleOptionMenuItem object. func NewQStyleOptionMenuItem2(other *QStyleOptionMenuItem) *QStyleOptionMenuItem { - var outptr_QStyleOptionMenuItem *C.QStyleOptionMenuItem = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionMenuItem_new2(other.cPointer(), &outptr_QStyleOptionMenuItem, &outptr_QStyleOption) - ret := newQStyleOptionMenuItem(outptr_QStyleOptionMenuItem, outptr_QStyleOption) + ret := newQStyleOptionMenuItem(C.QStyleOptionMenuItem_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1508,42 +1407,34 @@ func (this *QStyleOptionDockWidget) UnsafePointer() unsafe.Pointer { } // newQStyleOptionDockWidget constructs the type using only CGO pointers. -func newQStyleOptionDockWidget(h *C.QStyleOptionDockWidget, h_QStyleOption *C.QStyleOption) *QStyleOptionDockWidget { +func newQStyleOptionDockWidget(h *C.QStyleOptionDockWidget) *QStyleOptionDockWidget { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionDockWidget_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionDockWidget{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionDockWidget constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionDockWidget(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionDockWidget { - if h == nil { - return nil - } - - return &QStyleOptionDockWidget{h: (*C.QStyleOptionDockWidget)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionDockWidget(h unsafe.Pointer) *QStyleOptionDockWidget { + return newQStyleOptionDockWidget((*C.QStyleOptionDockWidget)(h)) } // NewQStyleOptionDockWidget constructs a new QStyleOptionDockWidget object. func NewQStyleOptionDockWidget() *QStyleOptionDockWidget { - var outptr_QStyleOptionDockWidget *C.QStyleOptionDockWidget = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionDockWidget_new(&outptr_QStyleOptionDockWidget, &outptr_QStyleOption) - ret := newQStyleOptionDockWidget(outptr_QStyleOptionDockWidget, outptr_QStyleOption) + ret := newQStyleOptionDockWidget(C.QStyleOptionDockWidget_new()) ret.isSubclass = true return ret } // NewQStyleOptionDockWidget2 constructs a new QStyleOptionDockWidget object. func NewQStyleOptionDockWidget2(other *QStyleOptionDockWidget) *QStyleOptionDockWidget { - var outptr_QStyleOptionDockWidget *C.QStyleOptionDockWidget = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionDockWidget_new2(other.cPointer(), &outptr_QStyleOptionDockWidget, &outptr_QStyleOption) - ret := newQStyleOptionDockWidget(outptr_QStyleOptionDockWidget, outptr_QStyleOption) + ret := newQStyleOptionDockWidget(C.QStyleOptionDockWidget_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1583,42 +1474,34 @@ func (this *QStyleOptionViewItem) UnsafePointer() unsafe.Pointer { } // newQStyleOptionViewItem constructs the type using only CGO pointers. -func newQStyleOptionViewItem(h *C.QStyleOptionViewItem, h_QStyleOption *C.QStyleOption) *QStyleOptionViewItem { +func newQStyleOptionViewItem(h *C.QStyleOptionViewItem) *QStyleOptionViewItem { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionViewItem_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionViewItem{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionViewItem constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionViewItem(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionViewItem { - if h == nil { - return nil - } - - return &QStyleOptionViewItem{h: (*C.QStyleOptionViewItem)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionViewItem(h unsafe.Pointer) *QStyleOptionViewItem { + return newQStyleOptionViewItem((*C.QStyleOptionViewItem)(h)) } // NewQStyleOptionViewItem constructs a new QStyleOptionViewItem object. func NewQStyleOptionViewItem() *QStyleOptionViewItem { - var outptr_QStyleOptionViewItem *C.QStyleOptionViewItem = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionViewItem_new(&outptr_QStyleOptionViewItem, &outptr_QStyleOption) - ret := newQStyleOptionViewItem(outptr_QStyleOptionViewItem, outptr_QStyleOption) + ret := newQStyleOptionViewItem(C.QStyleOptionViewItem_new()) ret.isSubclass = true return ret } // NewQStyleOptionViewItem2 constructs a new QStyleOptionViewItem object. func NewQStyleOptionViewItem2(other *QStyleOptionViewItem) *QStyleOptionViewItem { - var outptr_QStyleOptionViewItem *C.QStyleOptionViewItem = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionViewItem_new2(other.cPointer(), &outptr_QStyleOptionViewItem, &outptr_QStyleOption) - ret := newQStyleOptionViewItem(outptr_QStyleOptionViewItem, outptr_QStyleOption) + ret := newQStyleOptionViewItem(C.QStyleOptionViewItem_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1658,42 +1541,34 @@ func (this *QStyleOptionToolBox) UnsafePointer() unsafe.Pointer { } // newQStyleOptionToolBox constructs the type using only CGO pointers. -func newQStyleOptionToolBox(h *C.QStyleOptionToolBox, h_QStyleOption *C.QStyleOption) *QStyleOptionToolBox { +func newQStyleOptionToolBox(h *C.QStyleOptionToolBox) *QStyleOptionToolBox { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionToolBox_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionToolBox{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionToolBox constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionToolBox(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionToolBox { - if h == nil { - return nil - } - - return &QStyleOptionToolBox{h: (*C.QStyleOptionToolBox)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionToolBox(h unsafe.Pointer) *QStyleOptionToolBox { + return newQStyleOptionToolBox((*C.QStyleOptionToolBox)(h)) } // NewQStyleOptionToolBox constructs a new QStyleOptionToolBox object. func NewQStyleOptionToolBox() *QStyleOptionToolBox { - var outptr_QStyleOptionToolBox *C.QStyleOptionToolBox = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionToolBox_new(&outptr_QStyleOptionToolBox, &outptr_QStyleOption) - ret := newQStyleOptionToolBox(outptr_QStyleOptionToolBox, outptr_QStyleOption) + ret := newQStyleOptionToolBox(C.QStyleOptionToolBox_new()) ret.isSubclass = true return ret } // NewQStyleOptionToolBox2 constructs a new QStyleOptionToolBox object. func NewQStyleOptionToolBox2(other *QStyleOptionToolBox) *QStyleOptionToolBox { - var outptr_QStyleOptionToolBox *C.QStyleOptionToolBox = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionToolBox_new2(other.cPointer(), &outptr_QStyleOptionToolBox, &outptr_QStyleOption) - ret := newQStyleOptionToolBox(outptr_QStyleOptionToolBox, outptr_QStyleOption) + ret := newQStyleOptionToolBox(C.QStyleOptionToolBox_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1733,42 +1608,34 @@ func (this *QStyleOptionRubberBand) UnsafePointer() unsafe.Pointer { } // newQStyleOptionRubberBand constructs the type using only CGO pointers. -func newQStyleOptionRubberBand(h *C.QStyleOptionRubberBand, h_QStyleOption *C.QStyleOption) *QStyleOptionRubberBand { +func newQStyleOptionRubberBand(h *C.QStyleOptionRubberBand) *QStyleOptionRubberBand { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionRubberBand_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionRubberBand{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionRubberBand constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionRubberBand(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionRubberBand { - if h == nil { - return nil - } - - return &QStyleOptionRubberBand{h: (*C.QStyleOptionRubberBand)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionRubberBand(h unsafe.Pointer) *QStyleOptionRubberBand { + return newQStyleOptionRubberBand((*C.QStyleOptionRubberBand)(h)) } // NewQStyleOptionRubberBand constructs a new QStyleOptionRubberBand object. func NewQStyleOptionRubberBand() *QStyleOptionRubberBand { - var outptr_QStyleOptionRubberBand *C.QStyleOptionRubberBand = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionRubberBand_new(&outptr_QStyleOptionRubberBand, &outptr_QStyleOption) - ret := newQStyleOptionRubberBand(outptr_QStyleOptionRubberBand, outptr_QStyleOption) + ret := newQStyleOptionRubberBand(C.QStyleOptionRubberBand_new()) ret.isSubclass = true return ret } // NewQStyleOptionRubberBand2 constructs a new QStyleOptionRubberBand object. func NewQStyleOptionRubberBand2(other *QStyleOptionRubberBand) *QStyleOptionRubberBand { - var outptr_QStyleOptionRubberBand *C.QStyleOptionRubberBand = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionRubberBand_new2(other.cPointer(), &outptr_QStyleOptionRubberBand, &outptr_QStyleOption) - ret := newQStyleOptionRubberBand(outptr_QStyleOptionRubberBand, outptr_QStyleOption) + ret := newQStyleOptionRubberBand(C.QStyleOptionRubberBand_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1808,64 +1675,50 @@ func (this *QStyleOptionComplex) UnsafePointer() unsafe.Pointer { } // newQStyleOptionComplex constructs the type using only CGO pointers. -func newQStyleOptionComplex(h *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionComplex { +func newQStyleOptionComplex(h *C.QStyleOptionComplex) *QStyleOptionComplex { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionComplex_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionComplex{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionComplex constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionComplex(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionComplex { - if h == nil { - return nil - } - - return &QStyleOptionComplex{h: (*C.QStyleOptionComplex)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionComplex(h unsafe.Pointer) *QStyleOptionComplex { + return newQStyleOptionComplex((*C.QStyleOptionComplex)(h)) } // NewQStyleOptionComplex constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex() *QStyleOptionComplex { - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionComplex_new(&outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionComplex(C.QStyleOptionComplex_new()) ret.isSubclass = true return ret } // NewQStyleOptionComplex2 constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex2(other *QStyleOptionComplex) *QStyleOptionComplex { - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionComplex_new2(other.cPointer(), &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionComplex(C.QStyleOptionComplex_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQStyleOptionComplex3 constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex3(version int) *QStyleOptionComplex { - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionComplex_new3((C.int)(version), &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionComplex(C.QStyleOptionComplex_new3((C.int)(version))) ret.isSubclass = true return ret } // NewQStyleOptionComplex4 constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex4(version int, typeVal int) *QStyleOptionComplex { - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionComplex_new4((C.int)(version), (C.int)(typeVal), &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionComplex(C.QStyleOptionComplex_new4((C.int)(version), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -1905,44 +1758,34 @@ func (this *QStyleOptionSlider) UnsafePointer() unsafe.Pointer { } // newQStyleOptionSlider constructs the type using only CGO pointers. -func newQStyleOptionSlider(h *C.QStyleOptionSlider, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionSlider { +func newQStyleOptionSlider(h *C.QStyleOptionSlider) *QStyleOptionSlider { if h == nil { return nil } + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + C.QStyleOptionSlider_virtbase(h, &outptr_QStyleOptionComplex) + return &QStyleOptionSlider{h: h, - QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} + QStyleOptionComplex: newQStyleOptionComplex(outptr_QStyleOptionComplex)} } // UnsafeNewQStyleOptionSlider constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionSlider(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionSlider { - if h == nil { - return nil - } - - return &QStyleOptionSlider{h: (*C.QStyleOptionSlider)(h), - QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} +func UnsafeNewQStyleOptionSlider(h unsafe.Pointer) *QStyleOptionSlider { + return newQStyleOptionSlider((*C.QStyleOptionSlider)(h)) } // NewQStyleOptionSlider constructs a new QStyleOptionSlider object. func NewQStyleOptionSlider() *QStyleOptionSlider { - var outptr_QStyleOptionSlider *C.QStyleOptionSlider = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionSlider_new(&outptr_QStyleOptionSlider, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionSlider(outptr_QStyleOptionSlider, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionSlider(C.QStyleOptionSlider_new()) ret.isSubclass = true return ret } // NewQStyleOptionSlider2 constructs a new QStyleOptionSlider object. func NewQStyleOptionSlider2(other *QStyleOptionSlider) *QStyleOptionSlider { - var outptr_QStyleOptionSlider *C.QStyleOptionSlider = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionSlider_new2(other.cPointer(), &outptr_QStyleOptionSlider, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionSlider(outptr_QStyleOptionSlider, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionSlider(C.QStyleOptionSlider_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1982,44 +1825,34 @@ func (this *QStyleOptionSpinBox) UnsafePointer() unsafe.Pointer { } // newQStyleOptionSpinBox constructs the type using only CGO pointers. -func newQStyleOptionSpinBox(h *C.QStyleOptionSpinBox, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionSpinBox { +func newQStyleOptionSpinBox(h *C.QStyleOptionSpinBox) *QStyleOptionSpinBox { if h == nil { return nil } + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + C.QStyleOptionSpinBox_virtbase(h, &outptr_QStyleOptionComplex) + return &QStyleOptionSpinBox{h: h, - QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} + QStyleOptionComplex: newQStyleOptionComplex(outptr_QStyleOptionComplex)} } // UnsafeNewQStyleOptionSpinBox constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionSpinBox(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionSpinBox { - if h == nil { - return nil - } - - return &QStyleOptionSpinBox{h: (*C.QStyleOptionSpinBox)(h), - QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} +func UnsafeNewQStyleOptionSpinBox(h unsafe.Pointer) *QStyleOptionSpinBox { + return newQStyleOptionSpinBox((*C.QStyleOptionSpinBox)(h)) } // NewQStyleOptionSpinBox constructs a new QStyleOptionSpinBox object. func NewQStyleOptionSpinBox() *QStyleOptionSpinBox { - var outptr_QStyleOptionSpinBox *C.QStyleOptionSpinBox = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionSpinBox_new(&outptr_QStyleOptionSpinBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionSpinBox(outptr_QStyleOptionSpinBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionSpinBox(C.QStyleOptionSpinBox_new()) ret.isSubclass = true return ret } // NewQStyleOptionSpinBox2 constructs a new QStyleOptionSpinBox object. func NewQStyleOptionSpinBox2(other *QStyleOptionSpinBox) *QStyleOptionSpinBox { - var outptr_QStyleOptionSpinBox *C.QStyleOptionSpinBox = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionSpinBox_new2(other.cPointer(), &outptr_QStyleOptionSpinBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionSpinBox(outptr_QStyleOptionSpinBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionSpinBox(C.QStyleOptionSpinBox_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -2059,44 +1892,34 @@ func (this *QStyleOptionToolButton) UnsafePointer() unsafe.Pointer { } // newQStyleOptionToolButton constructs the type using only CGO pointers. -func newQStyleOptionToolButton(h *C.QStyleOptionToolButton, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionToolButton { +func newQStyleOptionToolButton(h *C.QStyleOptionToolButton) *QStyleOptionToolButton { if h == nil { return nil } + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + C.QStyleOptionToolButton_virtbase(h, &outptr_QStyleOptionComplex) + return &QStyleOptionToolButton{h: h, - QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} + QStyleOptionComplex: newQStyleOptionComplex(outptr_QStyleOptionComplex)} } // UnsafeNewQStyleOptionToolButton constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionToolButton(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionToolButton { - if h == nil { - return nil - } - - return &QStyleOptionToolButton{h: (*C.QStyleOptionToolButton)(h), - QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} +func UnsafeNewQStyleOptionToolButton(h unsafe.Pointer) *QStyleOptionToolButton { + return newQStyleOptionToolButton((*C.QStyleOptionToolButton)(h)) } // NewQStyleOptionToolButton constructs a new QStyleOptionToolButton object. func NewQStyleOptionToolButton() *QStyleOptionToolButton { - var outptr_QStyleOptionToolButton *C.QStyleOptionToolButton = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionToolButton_new(&outptr_QStyleOptionToolButton, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionToolButton(outptr_QStyleOptionToolButton, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionToolButton(C.QStyleOptionToolButton_new()) ret.isSubclass = true return ret } // NewQStyleOptionToolButton2 constructs a new QStyleOptionToolButton object. func NewQStyleOptionToolButton2(other *QStyleOptionToolButton) *QStyleOptionToolButton { - var outptr_QStyleOptionToolButton *C.QStyleOptionToolButton = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionToolButton_new2(other.cPointer(), &outptr_QStyleOptionToolButton, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionToolButton(outptr_QStyleOptionToolButton, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionToolButton(C.QStyleOptionToolButton_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -2136,44 +1959,34 @@ func (this *QStyleOptionComboBox) UnsafePointer() unsafe.Pointer { } // newQStyleOptionComboBox constructs the type using only CGO pointers. -func newQStyleOptionComboBox(h *C.QStyleOptionComboBox, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionComboBox { +func newQStyleOptionComboBox(h *C.QStyleOptionComboBox) *QStyleOptionComboBox { if h == nil { return nil } + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + C.QStyleOptionComboBox_virtbase(h, &outptr_QStyleOptionComplex) + return &QStyleOptionComboBox{h: h, - QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} + QStyleOptionComplex: newQStyleOptionComplex(outptr_QStyleOptionComplex)} } // UnsafeNewQStyleOptionComboBox constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionComboBox(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionComboBox { - if h == nil { - return nil - } - - return &QStyleOptionComboBox{h: (*C.QStyleOptionComboBox)(h), - QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} +func UnsafeNewQStyleOptionComboBox(h unsafe.Pointer) *QStyleOptionComboBox { + return newQStyleOptionComboBox((*C.QStyleOptionComboBox)(h)) } // NewQStyleOptionComboBox constructs a new QStyleOptionComboBox object. func NewQStyleOptionComboBox() *QStyleOptionComboBox { - var outptr_QStyleOptionComboBox *C.QStyleOptionComboBox = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionComboBox_new(&outptr_QStyleOptionComboBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionComboBox(outptr_QStyleOptionComboBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionComboBox(C.QStyleOptionComboBox_new()) ret.isSubclass = true return ret } // NewQStyleOptionComboBox2 constructs a new QStyleOptionComboBox object. func NewQStyleOptionComboBox2(other *QStyleOptionComboBox) *QStyleOptionComboBox { - var outptr_QStyleOptionComboBox *C.QStyleOptionComboBox = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionComboBox_new2(other.cPointer(), &outptr_QStyleOptionComboBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionComboBox(outptr_QStyleOptionComboBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionComboBox(C.QStyleOptionComboBox_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -2213,44 +2026,34 @@ func (this *QStyleOptionTitleBar) UnsafePointer() unsafe.Pointer { } // newQStyleOptionTitleBar constructs the type using only CGO pointers. -func newQStyleOptionTitleBar(h *C.QStyleOptionTitleBar, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionTitleBar { +func newQStyleOptionTitleBar(h *C.QStyleOptionTitleBar) *QStyleOptionTitleBar { if h == nil { return nil } + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + C.QStyleOptionTitleBar_virtbase(h, &outptr_QStyleOptionComplex) + return &QStyleOptionTitleBar{h: h, - QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} + QStyleOptionComplex: newQStyleOptionComplex(outptr_QStyleOptionComplex)} } // UnsafeNewQStyleOptionTitleBar constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionTitleBar(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTitleBar { - if h == nil { - return nil - } - - return &QStyleOptionTitleBar{h: (*C.QStyleOptionTitleBar)(h), - QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} +func UnsafeNewQStyleOptionTitleBar(h unsafe.Pointer) *QStyleOptionTitleBar { + return newQStyleOptionTitleBar((*C.QStyleOptionTitleBar)(h)) } // NewQStyleOptionTitleBar constructs a new QStyleOptionTitleBar object. func NewQStyleOptionTitleBar() *QStyleOptionTitleBar { - var outptr_QStyleOptionTitleBar *C.QStyleOptionTitleBar = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTitleBar_new(&outptr_QStyleOptionTitleBar, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionTitleBar(outptr_QStyleOptionTitleBar, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionTitleBar(C.QStyleOptionTitleBar_new()) ret.isSubclass = true return ret } // NewQStyleOptionTitleBar2 constructs a new QStyleOptionTitleBar object. func NewQStyleOptionTitleBar2(other *QStyleOptionTitleBar) *QStyleOptionTitleBar { - var outptr_QStyleOptionTitleBar *C.QStyleOptionTitleBar = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTitleBar_new2(other.cPointer(), &outptr_QStyleOptionTitleBar, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionTitleBar(outptr_QStyleOptionTitleBar, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionTitleBar(C.QStyleOptionTitleBar_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -2290,44 +2093,34 @@ func (this *QStyleOptionGroupBox) UnsafePointer() unsafe.Pointer { } // newQStyleOptionGroupBox constructs the type using only CGO pointers. -func newQStyleOptionGroupBox(h *C.QStyleOptionGroupBox, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionGroupBox { +func newQStyleOptionGroupBox(h *C.QStyleOptionGroupBox) *QStyleOptionGroupBox { if h == nil { return nil } + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + C.QStyleOptionGroupBox_virtbase(h, &outptr_QStyleOptionComplex) + return &QStyleOptionGroupBox{h: h, - QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} + QStyleOptionComplex: newQStyleOptionComplex(outptr_QStyleOptionComplex)} } // UnsafeNewQStyleOptionGroupBox constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionGroupBox(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionGroupBox { - if h == nil { - return nil - } - - return &QStyleOptionGroupBox{h: (*C.QStyleOptionGroupBox)(h), - QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} +func UnsafeNewQStyleOptionGroupBox(h unsafe.Pointer) *QStyleOptionGroupBox { + return newQStyleOptionGroupBox((*C.QStyleOptionGroupBox)(h)) } // NewQStyleOptionGroupBox constructs a new QStyleOptionGroupBox object. func NewQStyleOptionGroupBox() *QStyleOptionGroupBox { - var outptr_QStyleOptionGroupBox *C.QStyleOptionGroupBox = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionGroupBox_new(&outptr_QStyleOptionGroupBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionGroupBox(outptr_QStyleOptionGroupBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionGroupBox(C.QStyleOptionGroupBox_new()) ret.isSubclass = true return ret } // NewQStyleOptionGroupBox2 constructs a new QStyleOptionGroupBox object. func NewQStyleOptionGroupBox2(other *QStyleOptionGroupBox) *QStyleOptionGroupBox { - var outptr_QStyleOptionGroupBox *C.QStyleOptionGroupBox = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionGroupBox_new2(other.cPointer(), &outptr_QStyleOptionGroupBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionGroupBox(outptr_QStyleOptionGroupBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionGroupBox(C.QStyleOptionGroupBox_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -2367,44 +2160,34 @@ func (this *QStyleOptionSizeGrip) UnsafePointer() unsafe.Pointer { } // newQStyleOptionSizeGrip constructs the type using only CGO pointers. -func newQStyleOptionSizeGrip(h *C.QStyleOptionSizeGrip, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionSizeGrip { +func newQStyleOptionSizeGrip(h *C.QStyleOptionSizeGrip) *QStyleOptionSizeGrip { if h == nil { return nil } + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + C.QStyleOptionSizeGrip_virtbase(h, &outptr_QStyleOptionComplex) + return &QStyleOptionSizeGrip{h: h, - QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} + QStyleOptionComplex: newQStyleOptionComplex(outptr_QStyleOptionComplex)} } // UnsafeNewQStyleOptionSizeGrip constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionSizeGrip(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionSizeGrip { - if h == nil { - return nil - } - - return &QStyleOptionSizeGrip{h: (*C.QStyleOptionSizeGrip)(h), - QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} +func UnsafeNewQStyleOptionSizeGrip(h unsafe.Pointer) *QStyleOptionSizeGrip { + return newQStyleOptionSizeGrip((*C.QStyleOptionSizeGrip)(h)) } // NewQStyleOptionSizeGrip constructs a new QStyleOptionSizeGrip object. func NewQStyleOptionSizeGrip() *QStyleOptionSizeGrip { - var outptr_QStyleOptionSizeGrip *C.QStyleOptionSizeGrip = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionSizeGrip_new(&outptr_QStyleOptionSizeGrip, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionSizeGrip(outptr_QStyleOptionSizeGrip, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionSizeGrip(C.QStyleOptionSizeGrip_new()) ret.isSubclass = true return ret } // NewQStyleOptionSizeGrip2 constructs a new QStyleOptionSizeGrip object. func NewQStyleOptionSizeGrip2(other *QStyleOptionSizeGrip) *QStyleOptionSizeGrip { - var outptr_QStyleOptionSizeGrip *C.QStyleOptionSizeGrip = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionSizeGrip_new2(other.cPointer(), &outptr_QStyleOptionSizeGrip, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionSizeGrip(outptr_QStyleOptionSizeGrip, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionSizeGrip(C.QStyleOptionSizeGrip_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -2444,42 +2227,34 @@ func (this *QStyleOptionGraphicsItem) UnsafePointer() unsafe.Pointer { } // newQStyleOptionGraphicsItem constructs the type using only CGO pointers. -func newQStyleOptionGraphicsItem(h *C.QStyleOptionGraphicsItem, h_QStyleOption *C.QStyleOption) *QStyleOptionGraphicsItem { +func newQStyleOptionGraphicsItem(h *C.QStyleOptionGraphicsItem) *QStyleOptionGraphicsItem { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionGraphicsItem_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionGraphicsItem{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionGraphicsItem constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionGraphicsItem(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionGraphicsItem { - if h == nil { - return nil - } - - return &QStyleOptionGraphicsItem{h: (*C.QStyleOptionGraphicsItem)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionGraphicsItem(h unsafe.Pointer) *QStyleOptionGraphicsItem { + return newQStyleOptionGraphicsItem((*C.QStyleOptionGraphicsItem)(h)) } // NewQStyleOptionGraphicsItem constructs a new QStyleOptionGraphicsItem object. func NewQStyleOptionGraphicsItem() *QStyleOptionGraphicsItem { - var outptr_QStyleOptionGraphicsItem *C.QStyleOptionGraphicsItem = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionGraphicsItem_new(&outptr_QStyleOptionGraphicsItem, &outptr_QStyleOption) - ret := newQStyleOptionGraphicsItem(outptr_QStyleOptionGraphicsItem, outptr_QStyleOption) + ret := newQStyleOptionGraphicsItem(C.QStyleOptionGraphicsItem_new()) ret.isSubclass = true return ret } // NewQStyleOptionGraphicsItem2 constructs a new QStyleOptionGraphicsItem object. func NewQStyleOptionGraphicsItem2(other *QStyleOptionGraphicsItem) *QStyleOptionGraphicsItem { - var outptr_QStyleOptionGraphicsItem *C.QStyleOptionGraphicsItem = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionGraphicsItem_new2(other.cPointer(), &outptr_QStyleOptionGraphicsItem, &outptr_QStyleOption) - ret := newQStyleOptionGraphicsItem(outptr_QStyleOptionGraphicsItem, outptr_QStyleOption) + ret := newQStyleOptionGraphicsItem(C.QStyleOptionGraphicsItem_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -2526,54 +2301,43 @@ func newQStyleHintReturn(h *C.QStyleHintReturn) *QStyleHintReturn { if h == nil { return nil } + return &QStyleHintReturn{h: h} } // UnsafeNewQStyleHintReturn constructs the type using only unsafe pointers. func UnsafeNewQStyleHintReturn(h unsafe.Pointer) *QStyleHintReturn { - if h == nil { - return nil - } - - return &QStyleHintReturn{h: (*C.QStyleHintReturn)(h)} + return newQStyleHintReturn((*C.QStyleHintReturn)(h)) } // NewQStyleHintReturn constructs a new QStyleHintReturn object. func NewQStyleHintReturn() *QStyleHintReturn { - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturn_new(&outptr_QStyleHintReturn) - ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret := newQStyleHintReturn(C.QStyleHintReturn_new()) ret.isSubclass = true return ret } // NewQStyleHintReturn2 constructs a new QStyleHintReturn object. func NewQStyleHintReturn2(param1 *QStyleHintReturn) *QStyleHintReturn { - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturn_new2(param1.cPointer(), &outptr_QStyleHintReturn) - ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret := newQStyleHintReturn(C.QStyleHintReturn_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQStyleHintReturn3 constructs a new QStyleHintReturn object. func NewQStyleHintReturn3(version int) *QStyleHintReturn { - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturn_new3((C.int)(version), &outptr_QStyleHintReturn) - ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret := newQStyleHintReturn(C.QStyleHintReturn_new3((C.int)(version))) ret.isSubclass = true return ret } // NewQStyleHintReturn4 constructs a new QStyleHintReturn object. func NewQStyleHintReturn4(version int, typeVal int) *QStyleHintReturn { - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturn_new4((C.int)(version), (C.int)(typeVal), &outptr_QStyleHintReturn) - ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret := newQStyleHintReturn(C.QStyleHintReturn_new4((C.int)(version), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -2617,42 +2381,34 @@ func (this *QStyleHintReturnMask) UnsafePointer() unsafe.Pointer { } // newQStyleHintReturnMask constructs the type using only CGO pointers. -func newQStyleHintReturnMask(h *C.QStyleHintReturnMask, h_QStyleHintReturn *C.QStyleHintReturn) *QStyleHintReturnMask { +func newQStyleHintReturnMask(h *C.QStyleHintReturnMask) *QStyleHintReturnMask { if h == nil { return nil } + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + C.QStyleHintReturnMask_virtbase(h, &outptr_QStyleHintReturn) + return &QStyleHintReturnMask{h: h, - QStyleHintReturn: newQStyleHintReturn(h_QStyleHintReturn)} + QStyleHintReturn: newQStyleHintReturn(outptr_QStyleHintReturn)} } // UnsafeNewQStyleHintReturnMask constructs the type using only unsafe pointers. -func UnsafeNewQStyleHintReturnMask(h unsafe.Pointer, h_QStyleHintReturn unsafe.Pointer) *QStyleHintReturnMask { - if h == nil { - return nil - } - - return &QStyleHintReturnMask{h: (*C.QStyleHintReturnMask)(h), - QStyleHintReturn: UnsafeNewQStyleHintReturn(h_QStyleHintReturn)} +func UnsafeNewQStyleHintReturnMask(h unsafe.Pointer) *QStyleHintReturnMask { + return newQStyleHintReturnMask((*C.QStyleHintReturnMask)(h)) } // NewQStyleHintReturnMask constructs a new QStyleHintReturnMask object. func NewQStyleHintReturnMask() *QStyleHintReturnMask { - var outptr_QStyleHintReturnMask *C.QStyleHintReturnMask = nil - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturnMask_new(&outptr_QStyleHintReturnMask, &outptr_QStyleHintReturn) - ret := newQStyleHintReturnMask(outptr_QStyleHintReturnMask, outptr_QStyleHintReturn) + ret := newQStyleHintReturnMask(C.QStyleHintReturnMask_new()) ret.isSubclass = true return ret } // NewQStyleHintReturnMask2 constructs a new QStyleHintReturnMask object. func NewQStyleHintReturnMask2(param1 *QStyleHintReturnMask) *QStyleHintReturnMask { - var outptr_QStyleHintReturnMask *C.QStyleHintReturnMask = nil - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturnMask_new2(param1.cPointer(), &outptr_QStyleHintReturnMask, &outptr_QStyleHintReturn) - ret := newQStyleHintReturnMask(outptr_QStyleHintReturnMask, outptr_QStyleHintReturn) + ret := newQStyleHintReturnMask(C.QStyleHintReturnMask_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -2696,42 +2452,34 @@ func (this *QStyleHintReturnVariant) UnsafePointer() unsafe.Pointer { } // newQStyleHintReturnVariant constructs the type using only CGO pointers. -func newQStyleHintReturnVariant(h *C.QStyleHintReturnVariant, h_QStyleHintReturn *C.QStyleHintReturn) *QStyleHintReturnVariant { +func newQStyleHintReturnVariant(h *C.QStyleHintReturnVariant) *QStyleHintReturnVariant { if h == nil { return nil } + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + C.QStyleHintReturnVariant_virtbase(h, &outptr_QStyleHintReturn) + return &QStyleHintReturnVariant{h: h, - QStyleHintReturn: newQStyleHintReturn(h_QStyleHintReturn)} + QStyleHintReturn: newQStyleHintReturn(outptr_QStyleHintReturn)} } // UnsafeNewQStyleHintReturnVariant constructs the type using only unsafe pointers. -func UnsafeNewQStyleHintReturnVariant(h unsafe.Pointer, h_QStyleHintReturn unsafe.Pointer) *QStyleHintReturnVariant { - if h == nil { - return nil - } - - return &QStyleHintReturnVariant{h: (*C.QStyleHintReturnVariant)(h), - QStyleHintReturn: UnsafeNewQStyleHintReturn(h_QStyleHintReturn)} +func UnsafeNewQStyleHintReturnVariant(h unsafe.Pointer) *QStyleHintReturnVariant { + return newQStyleHintReturnVariant((*C.QStyleHintReturnVariant)(h)) } // NewQStyleHintReturnVariant constructs a new QStyleHintReturnVariant object. func NewQStyleHintReturnVariant() *QStyleHintReturnVariant { - var outptr_QStyleHintReturnVariant *C.QStyleHintReturnVariant = nil - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturnVariant_new(&outptr_QStyleHintReturnVariant, &outptr_QStyleHintReturn) - ret := newQStyleHintReturnVariant(outptr_QStyleHintReturnVariant, outptr_QStyleHintReturn) + ret := newQStyleHintReturnVariant(C.QStyleHintReturnVariant_new()) ret.isSubclass = true return ret } // NewQStyleHintReturnVariant2 constructs a new QStyleHintReturnVariant object. func NewQStyleHintReturnVariant2(param1 *QStyleHintReturnVariant) *QStyleHintReturnVariant { - var outptr_QStyleHintReturnVariant *C.QStyleHintReturnVariant = nil - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturnVariant_new2(param1.cPointer(), &outptr_QStyleHintReturnVariant, &outptr_QStyleHintReturn) - ret := newQStyleHintReturnVariant(outptr_QStyleHintReturnVariant, outptr_QStyleHintReturn) + ret := newQStyleHintReturnVariant(C.QStyleHintReturnVariant_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qstyleoption.h b/qt/gen_qstyleoption.h index d24e45f0..ea4c66d7 100644 --- a/qt/gen_qstyleoption.h +++ b/qt/gen_qstyleoption.h @@ -78,129 +78,155 @@ typedef struct QTransform QTransform; typedef struct QWidget QWidget; #endif -void QStyleOption_new(QStyleOption** outptr_QStyleOption); -void QStyleOption_new2(QStyleOption* other, QStyleOption** outptr_QStyleOption); -void QStyleOption_new3(int version, QStyleOption** outptr_QStyleOption); -void QStyleOption_new4(int version, int typeVal, QStyleOption** outptr_QStyleOption); +QStyleOption* QStyleOption_new(); +QStyleOption* QStyleOption_new2(QStyleOption* other); +QStyleOption* QStyleOption_new3(int version); +QStyleOption* QStyleOption_new4(int version, int typeVal); void QStyleOption_Init(QStyleOption* self, QWidget* w); void QStyleOption_InitFrom(QStyleOption* self, QWidget* w); void QStyleOption_OperatorAssign(QStyleOption* self, QStyleOption* other); void QStyleOption_Delete(QStyleOption* self, bool isSubclass); -void QStyleOptionFocusRect_new(QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption); -void QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other, QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption); +QStyleOptionFocusRect* QStyleOptionFocusRect_new(); +QStyleOptionFocusRect* QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other); +void QStyleOptionFocusRect_virtbase(QStyleOptionFocusRect* src, QStyleOption** outptr_QStyleOption); void QStyleOptionFocusRect_Delete(QStyleOptionFocusRect* self, bool isSubclass); -void QStyleOptionFrame_new(QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption); -void QStyleOptionFrame_new2(QStyleOptionFrame* other, QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption); +QStyleOptionFrame* QStyleOptionFrame_new(); +QStyleOptionFrame* QStyleOptionFrame_new2(QStyleOptionFrame* other); +void QStyleOptionFrame_virtbase(QStyleOptionFrame* src, QStyleOption** outptr_QStyleOption); void QStyleOptionFrame_Delete(QStyleOptionFrame* self, bool isSubclass); -void QStyleOptionTabWidgetFrame_new(QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption); -void QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other, QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption); +QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new(); +QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other); +void QStyleOptionTabWidgetFrame_virtbase(QStyleOptionTabWidgetFrame* src, QStyleOption** outptr_QStyleOption); void QStyleOptionTabWidgetFrame_Delete(QStyleOptionTabWidgetFrame* self, bool isSubclass); -void QStyleOptionTabBarBase_new(QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption); -void QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other, QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption); +QStyleOptionTabBarBase* QStyleOptionTabBarBase_new(); +QStyleOptionTabBarBase* QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other); +void QStyleOptionTabBarBase_virtbase(QStyleOptionTabBarBase* src, QStyleOption** outptr_QStyleOption); void QStyleOptionTabBarBase_Delete(QStyleOptionTabBarBase* self, bool isSubclass); -void QStyleOptionHeader_new(QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption); -void QStyleOptionHeader_new2(QStyleOptionHeader* other, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption); +QStyleOptionHeader* QStyleOptionHeader_new(); +QStyleOptionHeader* QStyleOptionHeader_new2(QStyleOptionHeader* other); +void QStyleOptionHeader_virtbase(QStyleOptionHeader* src, QStyleOption** outptr_QStyleOption); void QStyleOptionHeader_Delete(QStyleOptionHeader* self, bool isSubclass); -void QStyleOptionButton_new(QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption); -void QStyleOptionButton_new2(QStyleOptionButton* other, QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption); +QStyleOptionButton* QStyleOptionButton_new(); +QStyleOptionButton* QStyleOptionButton_new2(QStyleOptionButton* other); +void QStyleOptionButton_virtbase(QStyleOptionButton* src, QStyleOption** outptr_QStyleOption); void QStyleOptionButton_Delete(QStyleOptionButton* self, bool isSubclass); -void QStyleOptionTab_new(QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption); -void QStyleOptionTab_new2(QStyleOptionTab* other, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption); +QStyleOptionTab* QStyleOptionTab_new(); +QStyleOptionTab* QStyleOptionTab_new2(QStyleOptionTab* other); +void QStyleOptionTab_virtbase(QStyleOptionTab* src, QStyleOption** outptr_QStyleOption); void QStyleOptionTab_Delete(QStyleOptionTab* self, bool isSubclass); -void QStyleOptionTabV4_new(QStyleOptionTabV4** outptr_QStyleOptionTabV4, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption); -void QStyleOptionTabV4_new2(QStyleOptionTabV4* param1, QStyleOptionTabV4** outptr_QStyleOptionTabV4, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption); +QStyleOptionTabV4* QStyleOptionTabV4_new(); +QStyleOptionTabV4* QStyleOptionTabV4_new2(QStyleOptionTabV4* param1); +void QStyleOptionTabV4_virtbase(QStyleOptionTabV4* src, QStyleOptionTab** outptr_QStyleOptionTab); void QStyleOptionTabV4_OperatorAssign(QStyleOptionTabV4* self, QStyleOptionTabV4* param1); void QStyleOptionTabV4_Delete(QStyleOptionTabV4* self, bool isSubclass); -void QStyleOptionToolBar_new(QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption); -void QStyleOptionToolBar_new2(QStyleOptionToolBar* other, QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption); +QStyleOptionToolBar* QStyleOptionToolBar_new(); +QStyleOptionToolBar* QStyleOptionToolBar_new2(QStyleOptionToolBar* other); +void QStyleOptionToolBar_virtbase(QStyleOptionToolBar* src, QStyleOption** outptr_QStyleOption); void QStyleOptionToolBar_Delete(QStyleOptionToolBar* self, bool isSubclass); -void QStyleOptionProgressBar_new(QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption); -void QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other, QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption); +QStyleOptionProgressBar* QStyleOptionProgressBar_new(); +QStyleOptionProgressBar* QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other); +void QStyleOptionProgressBar_virtbase(QStyleOptionProgressBar* src, QStyleOption** outptr_QStyleOption); void QStyleOptionProgressBar_Delete(QStyleOptionProgressBar* self, bool isSubclass); -void QStyleOptionMenuItem_new(QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption); -void QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other, QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption); +QStyleOptionMenuItem* QStyleOptionMenuItem_new(); +QStyleOptionMenuItem* QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other); +void QStyleOptionMenuItem_virtbase(QStyleOptionMenuItem* src, QStyleOption** outptr_QStyleOption); void QStyleOptionMenuItem_Delete(QStyleOptionMenuItem* self, bool isSubclass); -void QStyleOptionDockWidget_new(QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption); -void QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other, QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption); +QStyleOptionDockWidget* QStyleOptionDockWidget_new(); +QStyleOptionDockWidget* QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other); +void QStyleOptionDockWidget_virtbase(QStyleOptionDockWidget* src, QStyleOption** outptr_QStyleOption); void QStyleOptionDockWidget_Delete(QStyleOptionDockWidget* self, bool isSubclass); -void QStyleOptionViewItem_new(QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption); -void QStyleOptionViewItem_new2(QStyleOptionViewItem* other, QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption); +QStyleOptionViewItem* QStyleOptionViewItem_new(); +QStyleOptionViewItem* QStyleOptionViewItem_new2(QStyleOptionViewItem* other); +void QStyleOptionViewItem_virtbase(QStyleOptionViewItem* src, QStyleOption** outptr_QStyleOption); void QStyleOptionViewItem_Delete(QStyleOptionViewItem* self, bool isSubclass); -void QStyleOptionToolBox_new(QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption); -void QStyleOptionToolBox_new2(QStyleOptionToolBox* other, QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption); +QStyleOptionToolBox* QStyleOptionToolBox_new(); +QStyleOptionToolBox* QStyleOptionToolBox_new2(QStyleOptionToolBox* other); +void QStyleOptionToolBox_virtbase(QStyleOptionToolBox* src, QStyleOption** outptr_QStyleOption); void QStyleOptionToolBox_Delete(QStyleOptionToolBox* self, bool isSubclass); -void QStyleOptionRubberBand_new(QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption); -void QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other, QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption); +QStyleOptionRubberBand* QStyleOptionRubberBand_new(); +QStyleOptionRubberBand* QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other); +void QStyleOptionRubberBand_virtbase(QStyleOptionRubberBand* src, QStyleOption** outptr_QStyleOption); void QStyleOptionRubberBand_Delete(QStyleOptionRubberBand* self, bool isSubclass); -void QStyleOptionComplex_new(QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionComplex_new2(QStyleOptionComplex* other, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionComplex_new3(int version, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionComplex_new4(int version, int typeVal, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionComplex* QStyleOptionComplex_new(); +QStyleOptionComplex* QStyleOptionComplex_new2(QStyleOptionComplex* other); +QStyleOptionComplex* QStyleOptionComplex_new3(int version); +QStyleOptionComplex* QStyleOptionComplex_new4(int version, int typeVal); +void QStyleOptionComplex_virtbase(QStyleOptionComplex* src, QStyleOption** outptr_QStyleOption); void QStyleOptionComplex_Delete(QStyleOptionComplex* self, bool isSubclass); -void QStyleOptionSlider_new(QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionSlider_new2(QStyleOptionSlider* other, QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionSlider* QStyleOptionSlider_new(); +QStyleOptionSlider* QStyleOptionSlider_new2(QStyleOptionSlider* other); +void QStyleOptionSlider_virtbase(QStyleOptionSlider* src, QStyleOptionComplex** outptr_QStyleOptionComplex); void QStyleOptionSlider_Delete(QStyleOptionSlider* self, bool isSubclass); -void QStyleOptionSpinBox_new(QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other, QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionSpinBox* QStyleOptionSpinBox_new(); +QStyleOptionSpinBox* QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other); +void QStyleOptionSpinBox_virtbase(QStyleOptionSpinBox* src, QStyleOptionComplex** outptr_QStyleOptionComplex); void QStyleOptionSpinBox_Delete(QStyleOptionSpinBox* self, bool isSubclass); -void QStyleOptionToolButton_new(QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionToolButton_new2(QStyleOptionToolButton* other, QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionToolButton* QStyleOptionToolButton_new(); +QStyleOptionToolButton* QStyleOptionToolButton_new2(QStyleOptionToolButton* other); +void QStyleOptionToolButton_virtbase(QStyleOptionToolButton* src, QStyleOptionComplex** outptr_QStyleOptionComplex); void QStyleOptionToolButton_Delete(QStyleOptionToolButton* self, bool isSubclass); -void QStyleOptionComboBox_new(QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionComboBox_new2(QStyleOptionComboBox* other, QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionComboBox* QStyleOptionComboBox_new(); +QStyleOptionComboBox* QStyleOptionComboBox_new2(QStyleOptionComboBox* other); +void QStyleOptionComboBox_virtbase(QStyleOptionComboBox* src, QStyleOptionComplex** outptr_QStyleOptionComplex); void QStyleOptionComboBox_Delete(QStyleOptionComboBox* self, bool isSubclass); -void QStyleOptionTitleBar_new(QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other, QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionTitleBar* QStyleOptionTitleBar_new(); +QStyleOptionTitleBar* QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other); +void QStyleOptionTitleBar_virtbase(QStyleOptionTitleBar* src, QStyleOptionComplex** outptr_QStyleOptionComplex); void QStyleOptionTitleBar_Delete(QStyleOptionTitleBar* self, bool isSubclass); -void QStyleOptionGroupBox_new(QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other, QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionGroupBox* QStyleOptionGroupBox_new(); +QStyleOptionGroupBox* QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other); +void QStyleOptionGroupBox_virtbase(QStyleOptionGroupBox* src, QStyleOptionComplex** outptr_QStyleOptionComplex); void QStyleOptionGroupBox_Delete(QStyleOptionGroupBox* self, bool isSubclass); -void QStyleOptionSizeGrip_new(QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other, QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionSizeGrip* QStyleOptionSizeGrip_new(); +QStyleOptionSizeGrip* QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other); +void QStyleOptionSizeGrip_virtbase(QStyleOptionSizeGrip* src, QStyleOptionComplex** outptr_QStyleOptionComplex); void QStyleOptionSizeGrip_Delete(QStyleOptionSizeGrip* self, bool isSubclass); -void QStyleOptionGraphicsItem_new(QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption); -void QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other, QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption); +QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new(); +QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other); +void QStyleOptionGraphicsItem_virtbase(QStyleOptionGraphicsItem* src, QStyleOption** outptr_QStyleOption); double QStyleOptionGraphicsItem_LevelOfDetailFromTransform(QTransform* worldTransform); void QStyleOptionGraphicsItem_Delete(QStyleOptionGraphicsItem* self, bool isSubclass); -void QStyleHintReturn_new(QStyleHintReturn** outptr_QStyleHintReturn); -void QStyleHintReturn_new2(QStyleHintReturn* param1, QStyleHintReturn** outptr_QStyleHintReturn); -void QStyleHintReturn_new3(int version, QStyleHintReturn** outptr_QStyleHintReturn); -void QStyleHintReturn_new4(int version, int typeVal, QStyleHintReturn** outptr_QStyleHintReturn); +QStyleHintReturn* QStyleHintReturn_new(); +QStyleHintReturn* QStyleHintReturn_new2(QStyleHintReturn* param1); +QStyleHintReturn* QStyleHintReturn_new3(int version); +QStyleHintReturn* QStyleHintReturn_new4(int version, int typeVal); void QStyleHintReturn_OperatorAssign(QStyleHintReturn* self, QStyleHintReturn* param1); void QStyleHintReturn_Delete(QStyleHintReturn* self, bool isSubclass); -void QStyleHintReturnMask_new(QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn); -void QStyleHintReturnMask_new2(QStyleHintReturnMask* param1, QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn); +QStyleHintReturnMask* QStyleHintReturnMask_new(); +QStyleHintReturnMask* QStyleHintReturnMask_new2(QStyleHintReturnMask* param1); +void QStyleHintReturnMask_virtbase(QStyleHintReturnMask* src, QStyleHintReturn** outptr_QStyleHintReturn); void QStyleHintReturnMask_OperatorAssign(QStyleHintReturnMask* self, QStyleHintReturnMask* param1); void QStyleHintReturnMask_Delete(QStyleHintReturnMask* self, bool isSubclass); -void QStyleHintReturnVariant_new(QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn); -void QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1, QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn); +QStyleHintReturnVariant* QStyleHintReturnVariant_new(); +QStyleHintReturnVariant* QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1); +void QStyleHintReturnVariant_virtbase(QStyleHintReturnVariant* src, QStyleHintReturn** outptr_QStyleHintReturn); void QStyleHintReturnVariant_OperatorAssign(QStyleHintReturnVariant* self, QStyleHintReturnVariant* param1); void QStyleHintReturnVariant_Delete(QStyleHintReturnVariant* self, bool isSubclass); diff --git a/qt/gen_qstylepainter.cpp b/qt/gen_qstylepainter.cpp index d0f15ade..b9ac7929 100644 --- a/qt/gen_qstylepainter.cpp +++ b/qt/gen_qstylepainter.cpp @@ -15,22 +15,20 @@ #include "gen_qstylepainter.h" #include "_cgo_export.h" -void QStylePainter_new(QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter) { - QStylePainter* ret = new QStylePainter(w); - *outptr_QStylePainter = ret; - *outptr_QPainter = static_cast(ret); +QStylePainter* QStylePainter_new(QWidget* w) { + return new QStylePainter(w); } -void QStylePainter_new2(QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter) { - QStylePainter* ret = new QStylePainter(); - *outptr_QStylePainter = ret; - *outptr_QPainter = static_cast(ret); +QStylePainter* QStylePainter_new2() { + return new QStylePainter(); } -void QStylePainter_new3(QPaintDevice* pd, QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter) { - QStylePainter* ret = new QStylePainter(pd, w); - *outptr_QStylePainter = ret; - *outptr_QPainter = static_cast(ret); +QStylePainter* QStylePainter_new3(QPaintDevice* pd, QWidget* w) { + return new QStylePainter(pd, w); +} + +void QStylePainter_virtbase(QStylePainter* src, QPainter** outptr_QPainter) { + *outptr_QPainter = static_cast(src); } bool QStylePainter_Begin(QStylePainter* self, QWidget* w) { diff --git a/qt/gen_qstylepainter.go b/qt/gen_qstylepainter.go index 4b85f073..73eed10e 100644 --- a/qt/gen_qstylepainter.go +++ b/qt/gen_qstylepainter.go @@ -34,53 +34,42 @@ func (this *QStylePainter) UnsafePointer() unsafe.Pointer { } // newQStylePainter constructs the type using only CGO pointers. -func newQStylePainter(h *C.QStylePainter, h_QPainter *C.QPainter) *QStylePainter { +func newQStylePainter(h *C.QStylePainter) *QStylePainter { if h == nil { return nil } + var outptr_QPainter *C.QPainter = nil + C.QStylePainter_virtbase(h, &outptr_QPainter) + return &QStylePainter{h: h, - QPainter: newQPainter(h_QPainter)} + QPainter: newQPainter(outptr_QPainter)} } // UnsafeNewQStylePainter constructs the type using only unsafe pointers. -func UnsafeNewQStylePainter(h unsafe.Pointer, h_QPainter unsafe.Pointer) *QStylePainter { - if h == nil { - return nil - } - - return &QStylePainter{h: (*C.QStylePainter)(h), - QPainter: UnsafeNewQPainter(h_QPainter)} +func UnsafeNewQStylePainter(h unsafe.Pointer) *QStylePainter { + return newQStylePainter((*C.QStylePainter)(h)) } // NewQStylePainter constructs a new QStylePainter object. func NewQStylePainter(w *QWidget) *QStylePainter { - var outptr_QStylePainter *C.QStylePainter = nil - var outptr_QPainter *C.QPainter = nil - C.QStylePainter_new(w.cPointer(), &outptr_QStylePainter, &outptr_QPainter) - ret := newQStylePainter(outptr_QStylePainter, outptr_QPainter) + ret := newQStylePainter(C.QStylePainter_new(w.cPointer())) ret.isSubclass = true return ret } // NewQStylePainter2 constructs a new QStylePainter object. func NewQStylePainter2() *QStylePainter { - var outptr_QStylePainter *C.QStylePainter = nil - var outptr_QPainter *C.QPainter = nil - C.QStylePainter_new2(&outptr_QStylePainter, &outptr_QPainter) - ret := newQStylePainter(outptr_QStylePainter, outptr_QPainter) + ret := newQStylePainter(C.QStylePainter_new2()) ret.isSubclass = true return ret } // NewQStylePainter3 constructs a new QStylePainter object. func NewQStylePainter3(pd *QPaintDevice, w *QWidget) *QStylePainter { - var outptr_QStylePainter *C.QStylePainter = nil - var outptr_QPainter *C.QPainter = nil - C.QStylePainter_new3(pd.cPointer(), w.cPointer(), &outptr_QStylePainter, &outptr_QPainter) - ret := newQStylePainter(outptr_QStylePainter, outptr_QPainter) + ret := newQStylePainter(C.QStylePainter_new3(pd.cPointer(), w.cPointer())) ret.isSubclass = true return ret } @@ -118,7 +107,7 @@ func (this *QStylePainter) DrawItemPixmap(r *QRect, flags int, pixmap *QPixmap) } func (this *QStylePainter) Style() *QStyle { - return newQStyle(C.QStylePainter_Style(this.h), nil) + return newQStyle(C.QStylePainter_Style(this.h)) } func (this *QStylePainter) DrawItemText6(r *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { diff --git a/qt/gen_qstylepainter.h b/qt/gen_qstylepainter.h index b195e863..78a90cdd 100644 --- a/qt/gen_qstylepainter.h +++ b/qt/gen_qstylepainter.h @@ -38,9 +38,10 @@ typedef struct QStylePainter QStylePainter; typedef struct QWidget QWidget; #endif -void QStylePainter_new(QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter); -void QStylePainter_new2(QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter); -void QStylePainter_new3(QPaintDevice* pd, QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter); +QStylePainter* QStylePainter_new(QWidget* w); +QStylePainter* QStylePainter_new2(); +QStylePainter* QStylePainter_new3(QPaintDevice* pd, QWidget* w); +void QStylePainter_virtbase(QStylePainter* src, QPainter** outptr_QPainter); bool QStylePainter_Begin(QStylePainter* self, QWidget* w); bool QStylePainter_Begin2(QStylePainter* self, QPaintDevice* pd, QWidget* w); void QStylePainter_DrawPrimitive(QStylePainter* self, int pe, QStyleOption* opt); diff --git a/qt/gen_qstyleplugin.cpp b/qt/gen_qstyleplugin.cpp index baeeb7e8..9e68f9a2 100644 --- a/qt/gen_qstyleplugin.cpp +++ b/qt/gen_qstyleplugin.cpp @@ -217,16 +217,16 @@ public: }; -void QStylePlugin_new(QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject) { - MiqtVirtualQStylePlugin* ret = new MiqtVirtualQStylePlugin(); - *outptr_QStylePlugin = ret; - *outptr_QObject = static_cast(ret); +QStylePlugin* QStylePlugin_new() { + return new MiqtVirtualQStylePlugin(); } -void QStylePlugin_new2(QObject* parent, QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject) { - MiqtVirtualQStylePlugin* ret = new MiqtVirtualQStylePlugin(parent); - *outptr_QStylePlugin = ret; - *outptr_QObject = static_cast(ret); +QStylePlugin* QStylePlugin_new2(QObject* parent) { + return new MiqtVirtualQStylePlugin(parent); +} + +void QStylePlugin_virtbase(QStylePlugin* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QStylePlugin_MetaObject(const QStylePlugin* self) { diff --git a/qt/gen_qstyleplugin.go b/qt/gen_qstyleplugin.go index cc6d1400..68d37341 100644 --- a/qt/gen_qstyleplugin.go +++ b/qt/gen_qstyleplugin.go @@ -35,42 +35,34 @@ func (this *QStylePlugin) UnsafePointer() unsafe.Pointer { } // newQStylePlugin constructs the type using only CGO pointers. -func newQStylePlugin(h *C.QStylePlugin, h_QObject *C.QObject) *QStylePlugin { +func newQStylePlugin(h *C.QStylePlugin) *QStylePlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QStylePlugin_virtbase(h, &outptr_QObject) + return &QStylePlugin{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQStylePlugin constructs the type using only unsafe pointers. -func UnsafeNewQStylePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStylePlugin { - if h == nil { - return nil - } - - return &QStylePlugin{h: (*C.QStylePlugin)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQStylePlugin(h unsafe.Pointer) *QStylePlugin { + return newQStylePlugin((*C.QStylePlugin)(h)) } // NewQStylePlugin constructs a new QStylePlugin object. func NewQStylePlugin() *QStylePlugin { - var outptr_QStylePlugin *C.QStylePlugin = nil - var outptr_QObject *C.QObject = nil - C.QStylePlugin_new(&outptr_QStylePlugin, &outptr_QObject) - ret := newQStylePlugin(outptr_QStylePlugin, outptr_QObject) + ret := newQStylePlugin(C.QStylePlugin_new()) ret.isSubclass = true return ret } // NewQStylePlugin2 constructs a new QStylePlugin object. func NewQStylePlugin2(parent *QObject) *QStylePlugin { - var outptr_QStylePlugin *C.QStylePlugin = nil - var outptr_QObject *C.QObject = nil - C.QStylePlugin_new2(parent.cPointer(), &outptr_QStylePlugin, &outptr_QObject) - ret := newQStylePlugin(outptr_QStylePlugin, outptr_QObject) + ret := newQStylePlugin(C.QStylePlugin_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -108,7 +100,7 @@ func (this *QStylePlugin) Create(key string) *QStyle { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - return newQStyle(C.QStylePlugin_Create(this.h, key_ms), nil) + return newQStyle(C.QStylePlugin_Create(this.h, key_ms)) } func QStylePlugin_Tr2(s string, c string) string { @@ -258,7 +250,7 @@ func miqt_exec_callback_QStylePlugin_TimerEvent(self *C.QStylePlugin, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QStylePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -284,7 +276,7 @@ func miqt_exec_callback_QStylePlugin_ChildEvent(self *C.QStylePlugin, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QStylePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qstyleplugin.h b/qt/gen_qstyleplugin.h index bf601372..4068de86 100644 --- a/qt/gen_qstyleplugin.h +++ b/qt/gen_qstyleplugin.h @@ -34,8 +34,9 @@ typedef struct QStylePlugin QStylePlugin; typedef struct QTimerEvent QTimerEvent; #endif -void QStylePlugin_new(QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject); -void QStylePlugin_new2(QObject* parent, QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject); +QStylePlugin* QStylePlugin_new(); +QStylePlugin* QStylePlugin_new2(QObject* parent); +void QStylePlugin_virtbase(QStylePlugin* src, QObject** outptr_QObject); QMetaObject* QStylePlugin_MetaObject(const QStylePlugin* self); void* QStylePlugin_Metacast(QStylePlugin* self, const char* param1); struct miqt_string QStylePlugin_Tr(const char* s); diff --git a/qt/gen_qsurface.go b/qt/gen_qsurface.go index 228364db..a351852e 100644 --- a/qt/gen_qsurface.go +++ b/qt/gen_qsurface.go @@ -55,16 +55,13 @@ func newQSurface(h *C.QSurface) *QSurface { if h == nil { return nil } + return &QSurface{h: h} } // UnsafeNewQSurface constructs the type using only unsafe pointers. func UnsafeNewQSurface(h unsafe.Pointer) *QSurface { - if h == nil { - return nil - } - - return &QSurface{h: (*C.QSurface)(h)} + return newQSurface((*C.QSurface)(h)) } func (this *QSurface) SurfaceClass() QSurface__SurfaceClass { diff --git a/qt/gen_qsurfaceformat.cpp b/qt/gen_qsurfaceformat.cpp index 40ab9dbf..1e1dc00e 100644 --- a/qt/gen_qsurfaceformat.cpp +++ b/qt/gen_qsurfaceformat.cpp @@ -4,19 +4,16 @@ #include "gen_qsurfaceformat.h" #include "_cgo_export.h" -void QSurfaceFormat_new(QSurfaceFormat** outptr_QSurfaceFormat) { - QSurfaceFormat* ret = new QSurfaceFormat(); - *outptr_QSurfaceFormat = ret; +QSurfaceFormat* QSurfaceFormat_new() { + return new QSurfaceFormat(); } -void QSurfaceFormat_new2(int options, QSurfaceFormat** outptr_QSurfaceFormat) { - QSurfaceFormat* ret = new QSurfaceFormat(static_cast(options)); - *outptr_QSurfaceFormat = ret; +QSurfaceFormat* QSurfaceFormat_new2(int options) { + return new QSurfaceFormat(static_cast(options)); } -void QSurfaceFormat_new3(QSurfaceFormat* other, QSurfaceFormat** outptr_QSurfaceFormat) { - QSurfaceFormat* ret = new QSurfaceFormat(*other); - *outptr_QSurfaceFormat = ret; +QSurfaceFormat* QSurfaceFormat_new3(QSurfaceFormat* other) { + return new QSurfaceFormat(*other); } void QSurfaceFormat_OperatorAssign(QSurfaceFormat* self, QSurfaceFormat* other) { diff --git a/qt/gen_qsurfaceformat.go b/qt/gen_qsurfaceformat.go index abb2ceb8..606e21cd 100644 --- a/qt/gen_qsurfaceformat.go +++ b/qt/gen_qsurfaceformat.go @@ -79,44 +79,35 @@ func newQSurfaceFormat(h *C.QSurfaceFormat) *QSurfaceFormat { if h == nil { return nil } + return &QSurfaceFormat{h: h} } // UnsafeNewQSurfaceFormat constructs the type using only unsafe pointers. func UnsafeNewQSurfaceFormat(h unsafe.Pointer) *QSurfaceFormat { - if h == nil { - return nil - } - - return &QSurfaceFormat{h: (*C.QSurfaceFormat)(h)} + return newQSurfaceFormat((*C.QSurfaceFormat)(h)) } // NewQSurfaceFormat constructs a new QSurfaceFormat object. func NewQSurfaceFormat() *QSurfaceFormat { - var outptr_QSurfaceFormat *C.QSurfaceFormat = nil - C.QSurfaceFormat_new(&outptr_QSurfaceFormat) - ret := newQSurfaceFormat(outptr_QSurfaceFormat) + ret := newQSurfaceFormat(C.QSurfaceFormat_new()) ret.isSubclass = true return ret } // NewQSurfaceFormat2 constructs a new QSurfaceFormat object. func NewQSurfaceFormat2(options QSurfaceFormat__FormatOption) *QSurfaceFormat { - var outptr_QSurfaceFormat *C.QSurfaceFormat = nil - C.QSurfaceFormat_new2((C.int)(options), &outptr_QSurfaceFormat) - ret := newQSurfaceFormat(outptr_QSurfaceFormat) + ret := newQSurfaceFormat(C.QSurfaceFormat_new2((C.int)(options))) ret.isSubclass = true return ret } // NewQSurfaceFormat3 constructs a new QSurfaceFormat object. func NewQSurfaceFormat3(other *QSurfaceFormat) *QSurfaceFormat { - var outptr_QSurfaceFormat *C.QSurfaceFormat = nil - C.QSurfaceFormat_new3(other.cPointer(), &outptr_QSurfaceFormat) - ret := newQSurfaceFormat(outptr_QSurfaceFormat) + ret := newQSurfaceFormat(C.QSurfaceFormat_new3(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qsurfaceformat.h b/qt/gen_qsurfaceformat.h index ba2bbf9e..fbec6c4a 100644 --- a/qt/gen_qsurfaceformat.h +++ b/qt/gen_qsurfaceformat.h @@ -20,9 +20,9 @@ class QSurfaceFormat; typedef struct QSurfaceFormat QSurfaceFormat; #endif -void QSurfaceFormat_new(QSurfaceFormat** outptr_QSurfaceFormat); -void QSurfaceFormat_new2(int options, QSurfaceFormat** outptr_QSurfaceFormat); -void QSurfaceFormat_new3(QSurfaceFormat* other, QSurfaceFormat** outptr_QSurfaceFormat); +QSurfaceFormat* QSurfaceFormat_new(); +QSurfaceFormat* QSurfaceFormat_new2(int options); +QSurfaceFormat* QSurfaceFormat_new3(QSurfaceFormat* other); void QSurfaceFormat_OperatorAssign(QSurfaceFormat* self, QSurfaceFormat* other); void QSurfaceFormat_SetDepthBufferSize(QSurfaceFormat* self, int size); int QSurfaceFormat_DepthBufferSize(const QSurfaceFormat* self); diff --git a/qt/gen_qsyntaxhighlighter.cpp b/qt/gen_qsyntaxhighlighter.cpp index 417e4fc1..33e86351 100644 --- a/qt/gen_qsyntaxhighlighter.cpp +++ b/qt/gen_qsyntaxhighlighter.cpp @@ -218,16 +218,16 @@ public: }; -void QSyntaxHighlighter_new(QObject* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject) { - MiqtVirtualQSyntaxHighlighter* ret = new MiqtVirtualQSyntaxHighlighter(parent); - *outptr_QSyntaxHighlighter = ret; - *outptr_QObject = static_cast(ret); +QSyntaxHighlighter* QSyntaxHighlighter_new(QObject* parent) { + return new MiqtVirtualQSyntaxHighlighter(parent); } -void QSyntaxHighlighter_new2(QTextDocument* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject) { - MiqtVirtualQSyntaxHighlighter* ret = new MiqtVirtualQSyntaxHighlighter(parent); - *outptr_QSyntaxHighlighter = ret; - *outptr_QObject = static_cast(ret); +QSyntaxHighlighter* QSyntaxHighlighter_new2(QTextDocument* parent) { + return new MiqtVirtualQSyntaxHighlighter(parent); +} + +void QSyntaxHighlighter_virtbase(QSyntaxHighlighter* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSyntaxHighlighter_MetaObject(const QSyntaxHighlighter* self) { diff --git a/qt/gen_qsyntaxhighlighter.go b/qt/gen_qsyntaxhighlighter.go index 2bdf8541..21c60859 100644 --- a/qt/gen_qsyntaxhighlighter.go +++ b/qt/gen_qsyntaxhighlighter.go @@ -35,42 +35,34 @@ func (this *QSyntaxHighlighter) UnsafePointer() unsafe.Pointer { } // newQSyntaxHighlighter constructs the type using only CGO pointers. -func newQSyntaxHighlighter(h *C.QSyntaxHighlighter, h_QObject *C.QObject) *QSyntaxHighlighter { +func newQSyntaxHighlighter(h *C.QSyntaxHighlighter) *QSyntaxHighlighter { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSyntaxHighlighter_virtbase(h, &outptr_QObject) + return &QSyntaxHighlighter{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQSyntaxHighlighter constructs the type using only unsafe pointers. -func UnsafeNewQSyntaxHighlighter(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSyntaxHighlighter { - if h == nil { - return nil - } - - return &QSyntaxHighlighter{h: (*C.QSyntaxHighlighter)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQSyntaxHighlighter(h unsafe.Pointer) *QSyntaxHighlighter { + return newQSyntaxHighlighter((*C.QSyntaxHighlighter)(h)) } // NewQSyntaxHighlighter constructs a new QSyntaxHighlighter object. func NewQSyntaxHighlighter(parent *QObject) *QSyntaxHighlighter { - var outptr_QSyntaxHighlighter *C.QSyntaxHighlighter = nil - var outptr_QObject *C.QObject = nil - C.QSyntaxHighlighter_new(parent.cPointer(), &outptr_QSyntaxHighlighter, &outptr_QObject) - ret := newQSyntaxHighlighter(outptr_QSyntaxHighlighter, outptr_QObject) + ret := newQSyntaxHighlighter(C.QSyntaxHighlighter_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQSyntaxHighlighter2 constructs a new QSyntaxHighlighter object. func NewQSyntaxHighlighter2(parent *QTextDocument) *QSyntaxHighlighter { - var outptr_QSyntaxHighlighter *C.QSyntaxHighlighter = nil - var outptr_QObject *C.QObject = nil - C.QSyntaxHighlighter_new2(parent.cPointer(), &outptr_QSyntaxHighlighter, &outptr_QObject) - ret := newQSyntaxHighlighter(outptr_QSyntaxHighlighter, outptr_QObject) + ret := newQSyntaxHighlighter(C.QSyntaxHighlighter_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -108,7 +100,7 @@ func (this *QSyntaxHighlighter) SetDocument(doc *QTextDocument) { } func (this *QSyntaxHighlighter) Document() *QTextDocument { - return newQTextDocument(C.QSyntaxHighlighter_Document(this.h), nil) + return newQTextDocument(C.QSyntaxHighlighter_Document(this.h)) } func (this *QSyntaxHighlighter) Rehighlight() { @@ -264,7 +256,7 @@ func miqt_exec_callback_QSyntaxHighlighter_TimerEvent(self *C.QSyntaxHighlighter } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QSyntaxHighlighter{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -290,7 +282,7 @@ func miqt_exec_callback_QSyntaxHighlighter_ChildEvent(self *C.QSyntaxHighlighter } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QSyntaxHighlighter{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qsyntaxhighlighter.h b/qt/gen_qsyntaxhighlighter.h index 863d1f28..72dbab43 100644 --- a/qt/gen_qsyntaxhighlighter.h +++ b/qt/gen_qsyntaxhighlighter.h @@ -36,8 +36,9 @@ typedef struct QTextDocument QTextDocument; typedef struct QTimerEvent QTimerEvent; #endif -void QSyntaxHighlighter_new(QObject* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject); -void QSyntaxHighlighter_new2(QTextDocument* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject); +QSyntaxHighlighter* QSyntaxHighlighter_new(QObject* parent); +QSyntaxHighlighter* QSyntaxHighlighter_new2(QTextDocument* parent); +void QSyntaxHighlighter_virtbase(QSyntaxHighlighter* src, QObject** outptr_QObject); QMetaObject* QSyntaxHighlighter_MetaObject(const QSyntaxHighlighter* self); void* QSyntaxHighlighter_Metacast(QSyntaxHighlighter* self, const char* param1); struct miqt_string QSyntaxHighlighter_Tr(const char* s); diff --git a/qt/gen_qsystemsemaphore.cpp b/qt/gen_qsystemsemaphore.cpp index 5085d9d7..009947f2 100644 --- a/qt/gen_qsystemsemaphore.cpp +++ b/qt/gen_qsystemsemaphore.cpp @@ -6,22 +6,19 @@ #include "gen_qsystemsemaphore.h" #include "_cgo_export.h" -void QSystemSemaphore_new(struct miqt_string key, QSystemSemaphore** outptr_QSystemSemaphore) { +QSystemSemaphore* QSystemSemaphore_new(struct miqt_string key) { QString key_QString = QString::fromUtf8(key.data, key.len); - QSystemSemaphore* ret = new QSystemSemaphore(key_QString); - *outptr_QSystemSemaphore = ret; + return new QSystemSemaphore(key_QString); } -void QSystemSemaphore_new2(struct miqt_string key, int initialValue, QSystemSemaphore** outptr_QSystemSemaphore) { +QSystemSemaphore* QSystemSemaphore_new2(struct miqt_string key, int initialValue) { QString key_QString = QString::fromUtf8(key.data, key.len); - QSystemSemaphore* ret = new QSystemSemaphore(key_QString, static_cast(initialValue)); - *outptr_QSystemSemaphore = ret; + return new QSystemSemaphore(key_QString, static_cast(initialValue)); } -void QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode, QSystemSemaphore** outptr_QSystemSemaphore) { +QSystemSemaphore* QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode) { QString key_QString = QString::fromUtf8(key.data, key.len); - QSystemSemaphore* ret = new QSystemSemaphore(key_QString, static_cast(initialValue), static_cast(mode)); - *outptr_QSystemSemaphore = ret; + return new QSystemSemaphore(key_QString, static_cast(initialValue), static_cast(mode)); } void QSystemSemaphore_SetKey(QSystemSemaphore* self, struct miqt_string key) { diff --git a/qt/gen_qsystemsemaphore.go b/qt/gen_qsystemsemaphore.go index a0ee859c..d3d6a91e 100644 --- a/qt/gen_qsystemsemaphore.go +++ b/qt/gen_qsystemsemaphore.go @@ -56,16 +56,13 @@ func newQSystemSemaphore(h *C.QSystemSemaphore) *QSystemSemaphore { if h == nil { return nil } + return &QSystemSemaphore{h: h} } // UnsafeNewQSystemSemaphore constructs the type using only unsafe pointers. func UnsafeNewQSystemSemaphore(h unsafe.Pointer) *QSystemSemaphore { - if h == nil { - return nil - } - - return &QSystemSemaphore{h: (*C.QSystemSemaphore)(h)} + return newQSystemSemaphore((*C.QSystemSemaphore)(h)) } // NewQSystemSemaphore constructs a new QSystemSemaphore object. @@ -74,10 +71,8 @@ func NewQSystemSemaphore(key string) *QSystemSemaphore { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QSystemSemaphore *C.QSystemSemaphore = nil - C.QSystemSemaphore_new(key_ms, &outptr_QSystemSemaphore) - ret := newQSystemSemaphore(outptr_QSystemSemaphore) + ret := newQSystemSemaphore(C.QSystemSemaphore_new(key_ms)) ret.isSubclass = true return ret } @@ -88,10 +83,8 @@ func NewQSystemSemaphore2(key string, initialValue int) *QSystemSemaphore { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QSystemSemaphore *C.QSystemSemaphore = nil - C.QSystemSemaphore_new2(key_ms, (C.int)(initialValue), &outptr_QSystemSemaphore) - ret := newQSystemSemaphore(outptr_QSystemSemaphore) + ret := newQSystemSemaphore(C.QSystemSemaphore_new2(key_ms, (C.int)(initialValue))) ret.isSubclass = true return ret } @@ -102,10 +95,8 @@ func NewQSystemSemaphore3(key string, initialValue int, mode QSystemSemaphore__A key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QSystemSemaphore *C.QSystemSemaphore = nil - C.QSystemSemaphore_new3(key_ms, (C.int)(initialValue), (C.int)(mode), &outptr_QSystemSemaphore) - ret := newQSystemSemaphore(outptr_QSystemSemaphore) + ret := newQSystemSemaphore(C.QSystemSemaphore_new3(key_ms, (C.int)(initialValue), (C.int)(mode))) ret.isSubclass = true return ret } diff --git a/qt/gen_qsystemsemaphore.h b/qt/gen_qsystemsemaphore.h index 427ad524..222f0e6a 100644 --- a/qt/gen_qsystemsemaphore.h +++ b/qt/gen_qsystemsemaphore.h @@ -20,9 +20,9 @@ class QSystemSemaphore; typedef struct QSystemSemaphore QSystemSemaphore; #endif -void QSystemSemaphore_new(struct miqt_string key, QSystemSemaphore** outptr_QSystemSemaphore); -void QSystemSemaphore_new2(struct miqt_string key, int initialValue, QSystemSemaphore** outptr_QSystemSemaphore); -void QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode, QSystemSemaphore** outptr_QSystemSemaphore); +QSystemSemaphore* QSystemSemaphore_new(struct miqt_string key); +QSystemSemaphore* QSystemSemaphore_new2(struct miqt_string key, int initialValue); +QSystemSemaphore* QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode); void QSystemSemaphore_SetKey(QSystemSemaphore* self, struct miqt_string key); struct miqt_string QSystemSemaphore_Key(const QSystemSemaphore* self); bool QSystemSemaphore_Acquire(QSystemSemaphore* self); diff --git a/qt/gen_qsystemtrayicon.cpp b/qt/gen_qsystemtrayicon.cpp index 8513389b..71805812 100644 --- a/qt/gen_qsystemtrayicon.cpp +++ b/qt/gen_qsystemtrayicon.cpp @@ -198,28 +198,24 @@ public: }; -void QSystemTrayIcon_new(QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { - MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(); - *outptr_QSystemTrayIcon = ret; - *outptr_QObject = static_cast(ret); +QSystemTrayIcon* QSystemTrayIcon_new() { + return new MiqtVirtualQSystemTrayIcon(); } -void QSystemTrayIcon_new2(QIcon* icon, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { - MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(*icon); - *outptr_QSystemTrayIcon = ret; - *outptr_QObject = static_cast(ret); +QSystemTrayIcon* QSystemTrayIcon_new2(QIcon* icon) { + return new MiqtVirtualQSystemTrayIcon(*icon); } -void QSystemTrayIcon_new3(QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { - MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(parent); - *outptr_QSystemTrayIcon = ret; - *outptr_QObject = static_cast(ret); +QSystemTrayIcon* QSystemTrayIcon_new3(QObject* parent) { + return new MiqtVirtualQSystemTrayIcon(parent); } -void QSystemTrayIcon_new4(QIcon* icon, QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { - MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(*icon, parent); - *outptr_QSystemTrayIcon = ret; - *outptr_QObject = static_cast(ret); +QSystemTrayIcon* QSystemTrayIcon_new4(QIcon* icon, QObject* parent) { + return new MiqtVirtualQSystemTrayIcon(*icon, parent); +} + +void QSystemTrayIcon_virtbase(QSystemTrayIcon* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSystemTrayIcon_MetaObject(const QSystemTrayIcon* self) { diff --git a/qt/gen_qsystemtrayicon.go b/qt/gen_qsystemtrayicon.go index 2e6ef0fb..901cb90b 100644 --- a/qt/gen_qsystemtrayicon.go +++ b/qt/gen_qsystemtrayicon.go @@ -54,64 +54,50 @@ func (this *QSystemTrayIcon) UnsafePointer() unsafe.Pointer { } // newQSystemTrayIcon constructs the type using only CGO pointers. -func newQSystemTrayIcon(h *C.QSystemTrayIcon, h_QObject *C.QObject) *QSystemTrayIcon { +func newQSystemTrayIcon(h *C.QSystemTrayIcon) *QSystemTrayIcon { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSystemTrayIcon_virtbase(h, &outptr_QObject) + return &QSystemTrayIcon{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQSystemTrayIcon constructs the type using only unsafe pointers. -func UnsafeNewQSystemTrayIcon(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSystemTrayIcon { - if h == nil { - return nil - } - - return &QSystemTrayIcon{h: (*C.QSystemTrayIcon)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQSystemTrayIcon(h unsafe.Pointer) *QSystemTrayIcon { + return newQSystemTrayIcon((*C.QSystemTrayIcon)(h)) } // NewQSystemTrayIcon constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon() *QSystemTrayIcon { - var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil - var outptr_QObject *C.QObject = nil - C.QSystemTrayIcon_new(&outptr_QSystemTrayIcon, &outptr_QObject) - ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret := newQSystemTrayIcon(C.QSystemTrayIcon_new()) ret.isSubclass = true return ret } // NewQSystemTrayIcon2 constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon2(icon *QIcon) *QSystemTrayIcon { - var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil - var outptr_QObject *C.QObject = nil - C.QSystemTrayIcon_new2(icon.cPointer(), &outptr_QSystemTrayIcon, &outptr_QObject) - ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret := newQSystemTrayIcon(C.QSystemTrayIcon_new2(icon.cPointer())) ret.isSubclass = true return ret } // NewQSystemTrayIcon3 constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon3(parent *QObject) *QSystemTrayIcon { - var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil - var outptr_QObject *C.QObject = nil - C.QSystemTrayIcon_new3(parent.cPointer(), &outptr_QSystemTrayIcon, &outptr_QObject) - ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret := newQSystemTrayIcon(C.QSystemTrayIcon_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQSystemTrayIcon4 constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon4(icon *QIcon, parent *QObject) *QSystemTrayIcon { - var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil - var outptr_QObject *C.QObject = nil - C.QSystemTrayIcon_new4(icon.cPointer(), parent.cPointer(), &outptr_QSystemTrayIcon, &outptr_QObject) - ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret := newQSystemTrayIcon(C.QSystemTrayIcon_new4(icon.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -149,7 +135,7 @@ func (this *QSystemTrayIcon) SetContextMenu(menu *QMenu) { } func (this *QSystemTrayIcon) ContextMenu() *QMenu { - return newQMenu(C.QSystemTrayIcon_ContextMenu(this.h), nil, nil, nil) + return newQMenu(C.QSystemTrayIcon_ContextMenu(this.h)) } func (this *QSystemTrayIcon) Icon() *QIcon { @@ -426,7 +412,7 @@ func miqt_exec_callback_QSystemTrayIcon_TimerEvent(self *C.QSystemTrayIcon, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -452,7 +438,7 @@ func miqt_exec_callback_QSystemTrayIcon_ChildEvent(self *C.QSystemTrayIcon, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qsystemtrayicon.h b/qt/gen_qsystemtrayicon.h index fa47f10f..e0aa7199 100644 --- a/qt/gen_qsystemtrayicon.h +++ b/qt/gen_qsystemtrayicon.h @@ -38,10 +38,11 @@ typedef struct QSystemTrayIcon QSystemTrayIcon; typedef struct QTimerEvent QTimerEvent; #endif -void QSystemTrayIcon_new(QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); -void QSystemTrayIcon_new2(QIcon* icon, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); -void QSystemTrayIcon_new3(QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); -void QSystemTrayIcon_new4(QIcon* icon, QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); +QSystemTrayIcon* QSystemTrayIcon_new(); +QSystemTrayIcon* QSystemTrayIcon_new2(QIcon* icon); +QSystemTrayIcon* QSystemTrayIcon_new3(QObject* parent); +QSystemTrayIcon* QSystemTrayIcon_new4(QIcon* icon, QObject* parent); +void QSystemTrayIcon_virtbase(QSystemTrayIcon* src, QObject** outptr_QObject); QMetaObject* QSystemTrayIcon_MetaObject(const QSystemTrayIcon* self); void* QSystemTrayIcon_Metacast(QSystemTrayIcon* self, const char* param1); struct miqt_string QSystemTrayIcon_Tr(const char* s); diff --git a/qt/gen_qtabbar.cpp b/qt/gen_qtabbar.cpp index 5f8a54fc..0fbc32a0 100644 --- a/qt/gen_qtabbar.cpp +++ b/qt/gen_qtabbar.cpp @@ -1165,20 +1165,16 @@ public: }; -void QTabBar_new(QWidget* parent, QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTabBar* ret = new MiqtVirtualQTabBar(parent); - *outptr_QTabBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTabBar* QTabBar_new(QWidget* parent) { + return new MiqtVirtualQTabBar(parent); } -void QTabBar_new2(QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTabBar* ret = new MiqtVirtualQTabBar(); - *outptr_QTabBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTabBar* QTabBar_new2() { + return new MiqtVirtualQTabBar(); +} + +void QTabBar_virtbase(QTabBar* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QTabBar_MetaObject(const QTabBar* self) { diff --git a/qt/gen_qtabbar.go b/qt/gen_qtabbar.go index 6f52486a..fd4384eb 100644 --- a/qt/gen_qtabbar.go +++ b/qt/gen_qtabbar.go @@ -63,46 +63,34 @@ func (this *QTabBar) UnsafePointer() unsafe.Pointer { } // newQTabBar constructs the type using only CGO pointers. -func newQTabBar(h *C.QTabBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTabBar { +func newQTabBar(h *C.QTabBar) *QTabBar { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QTabBar_virtbase(h, &outptr_QWidget) + return &QTabBar{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQTabBar constructs the type using only unsafe pointers. -func UnsafeNewQTabBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTabBar { - if h == nil { - return nil - } - - return &QTabBar{h: (*C.QTabBar)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTabBar(h unsafe.Pointer) *QTabBar { + return newQTabBar((*C.QTabBar)(h)) } // NewQTabBar constructs a new QTabBar object. func NewQTabBar(parent *QWidget) *QTabBar { - var outptr_QTabBar *C.QTabBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTabBar_new(parent.cPointer(), &outptr_QTabBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTabBar(outptr_QTabBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTabBar(C.QTabBar_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTabBar2 constructs a new QTabBar object. func NewQTabBar2() *QTabBar { - var outptr_QTabBar *C.QTabBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTabBar_new2(&outptr_QTabBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTabBar(outptr_QTabBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTabBar(C.QTabBar_new2()) ret.isSubclass = true return ret } @@ -351,7 +339,7 @@ func (this *QTabBar) SetTabButton(index int, position QTabBar__ButtonPosition, w } func (this *QTabBar) TabButton(index int, position QTabBar__ButtonPosition) *QWidget { - return newQWidget(C.QTabBar_TabButton(this.h, (C.int)(index), (C.int)(position)), nil, nil) + return newQWidget(C.QTabBar_TabButton(this.h, (C.int)(index), (C.int)(position))) } func (this *QTabBar) SelectionBehaviorOnRemove() QTabBar__SelectionBehavior { @@ -804,7 +792,7 @@ func miqt_exec_callback_QTabBar_ResizeEvent(self *C.QTabBar, cb C.intptr_t, para } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -830,7 +818,7 @@ func miqt_exec_callback_QTabBar_ShowEvent(self *C.QTabBar, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -856,7 +844,7 @@ func miqt_exec_callback_QTabBar_HideEvent(self *C.QTabBar, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(param1, nil) + slotval1 := newQHideEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_HideEvent, slotval1) @@ -882,7 +870,7 @@ func miqt_exec_callback_QTabBar_PaintEvent(self *C.QTabBar, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -908,7 +896,7 @@ func miqt_exec_callback_QTabBar_MousePressEvent(self *C.QTabBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -934,7 +922,7 @@ func miqt_exec_callback_QTabBar_MouseMoveEvent(self *C.QTabBar, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -960,7 +948,7 @@ func miqt_exec_callback_QTabBar_MouseReleaseEvent(self *C.QTabBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -986,7 +974,7 @@ func miqt_exec_callback_QTabBar_WheelEvent(self *C.QTabBar, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1012,7 +1000,7 @@ func miqt_exec_callback_QTabBar_KeyPressEvent(self *C.QTabBar, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1064,7 +1052,7 @@ func miqt_exec_callback_QTabBar_TimerEvent(self *C.QTabBar, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1219,7 +1207,7 @@ func miqt_exec_callback_QTabBar_MouseDoubleClickEvent(self *C.QTabBar, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1245,7 +1233,7 @@ func miqt_exec_callback_QTabBar_KeyReleaseEvent(self *C.QTabBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1271,7 +1259,7 @@ func miqt_exec_callback_QTabBar_FocusInEvent(self *C.QTabBar, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1297,7 +1285,7 @@ func miqt_exec_callback_QTabBar_FocusOutEvent(self *C.QTabBar, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1375,7 +1363,7 @@ func miqt_exec_callback_QTabBar_MoveEvent(self *C.QTabBar, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1401,7 +1389,7 @@ func miqt_exec_callback_QTabBar_CloseEvent(self *C.QTabBar, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1427,7 +1415,7 @@ func miqt_exec_callback_QTabBar_ContextMenuEvent(self *C.QTabBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1453,7 +1441,7 @@ func miqt_exec_callback_QTabBar_TabletEvent(self *C.QTabBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1479,7 +1467,7 @@ func miqt_exec_callback_QTabBar_ActionEvent(self *C.QTabBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1505,7 +1493,7 @@ func miqt_exec_callback_QTabBar_DragEnterEvent(self *C.QTabBar, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1531,7 +1519,7 @@ func miqt_exec_callback_QTabBar_DragMoveEvent(self *C.QTabBar, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1557,7 +1545,7 @@ func miqt_exec_callback_QTabBar_DragLeaveEvent(self *C.QTabBar, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1583,7 +1571,7 @@ func miqt_exec_callback_QTabBar_DropEvent(self *C.QTabBar, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1753,7 +1741,7 @@ func miqt_exec_callback_QTabBar_InputMethodEvent(self *C.QTabBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qtabbar.h b/qt/gen_qtabbar.h index bf48f912..49d73a9c 100644 --- a/qt/gen_qtabbar.h +++ b/qt/gen_qtabbar.h @@ -84,8 +84,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QTabBar_new(QWidget* parent, QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTabBar_new2(QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTabBar* QTabBar_new(QWidget* parent); +QTabBar* QTabBar_new2(); +void QTabBar_virtbase(QTabBar* src, QWidget** outptr_QWidget); QMetaObject* QTabBar_MetaObject(const QTabBar* self); void* QTabBar_Metacast(QTabBar* self, const char* param1); struct miqt_string QTabBar_Tr(const char* s); diff --git a/qt/gen_qtableview.cpp b/qt/gen_qtableview.cpp index 4b3d68ad..4eb60692 100644 --- a/qt/gen_qtableview.cpp +++ b/qt/gen_qtableview.cpp @@ -1555,26 +1555,16 @@ public: }; -void QTableView_new(QWidget* parent, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTableView* ret = new MiqtVirtualQTableView(parent); - *outptr_QTableView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTableView* QTableView_new(QWidget* parent) { + return new MiqtVirtualQTableView(parent); } -void QTableView_new2(QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTableView* ret = new MiqtVirtualQTableView(); - *outptr_QTableView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTableView* QTableView_new2() { + return new MiqtVirtualQTableView(); +} + +void QTableView_virtbase(QTableView* src, QAbstractItemView** outptr_QAbstractItemView) { + *outptr_QAbstractItemView = static_cast(src); } QMetaObject* QTableView_MetaObject(const QTableView* self) { diff --git a/qt/gen_qtableview.go b/qt/gen_qtableview.go index a46871a7..22bfb605 100644 --- a/qt/gen_qtableview.go +++ b/qt/gen_qtableview.go @@ -35,52 +35,34 @@ func (this *QTableView) UnsafePointer() unsafe.Pointer { } // newQTableView constructs the type using only CGO pointers. -func newQTableView(h *C.QTableView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTableView { +func newQTableView(h *C.QTableView) *QTableView { if h == nil { return nil } + var outptr_QAbstractItemView *C.QAbstractItemView = nil + C.QTableView_virtbase(h, &outptr_QAbstractItemView) + return &QTableView{h: h, - QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractItemView: newQAbstractItemView(outptr_QAbstractItemView)} } // UnsafeNewQTableView constructs the type using only unsafe pointers. -func UnsafeNewQTableView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTableView { - if h == nil { - return nil - } - - return &QTableView{h: (*C.QTableView)(h), - QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTableView(h unsafe.Pointer) *QTableView { + return newQTableView((*C.QTableView)(h)) } // NewQTableView constructs a new QTableView object. func NewQTableView(parent *QWidget) *QTableView { - var outptr_QTableView *C.QTableView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTableView_new(parent.cPointer(), &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTableView(outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTableView(C.QTableView_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTableView2 constructs a new QTableView object. func NewQTableView2() *QTableView { - var outptr_QTableView *C.QTableView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTableView_new2(&outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTableView(outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTableView(C.QTableView_new2()) ret.isSubclass = true return ret } @@ -130,11 +112,11 @@ func (this *QTableView) DoItemsLayout() { } func (this *QTableView) HorizontalHeader() *QHeaderView { - return newQHeaderView(C.QTableView_HorizontalHeader(this.h), nil, nil, nil, nil, nil, nil) + return newQHeaderView(C.QTableView_HorizontalHeader(this.h)) } func (this *QTableView) VerticalHeader() *QHeaderView { - return newQHeaderView(C.QTableView_VerticalHeader(this.h), nil, nil, nil, nil, nil, nil) + return newQHeaderView(C.QTableView_VerticalHeader(this.h)) } func (this *QTableView) SetHorizontalHeader(header *QHeaderView) { @@ -377,7 +359,7 @@ func miqt_exec_callback_QTableView_SetModel(self *C.QTableView, cb C.intptr_t, m } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc((&QTableView{h: self}).callVirtualBase_SetModel, slotval1) @@ -429,7 +411,7 @@ func miqt_exec_callback_QTableView_SetSelectionModel(self *C.QTableView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QTableView{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -576,7 +558,7 @@ func miqt_exec_callback_QTableView_ScrollContentsBy(self *C.QTableView, cb C.int func (this *QTableView) callVirtualBase_ViewOptions() *QStyleOptionViewItem { - _goptr := newQStyleOptionViewItem(C.QTableView_virtualbase_ViewOptions(unsafe.Pointer(this.h)), nil) + _goptr := newQStyleOptionViewItem(C.QTableView_virtualbase_ViewOptions(unsafe.Pointer(this.h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -621,7 +603,7 @@ func miqt_exec_callback_QTableView_PaintEvent(self *C.QTableView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QTableView{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -647,7 +629,7 @@ func miqt_exec_callback_QTableView_TimerEvent(self *C.QTableView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1403,7 +1385,7 @@ func miqt_exec_callback_QTableView_CloseEditor(self *C.QTableView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) @@ -1431,7 +1413,7 @@ func miqt_exec_callback_QTableView_CommitData(self *C.QTableView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc((&QTableView{h: self}).callVirtualBase_CommitData, slotval1) @@ -1655,7 +1637,7 @@ func miqt_exec_callback_QTableView_MousePressEvent(self *C.QTableView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1681,7 +1663,7 @@ func miqt_exec_callback_QTableView_MouseMoveEvent(self *C.QTableView, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1707,7 +1689,7 @@ func miqt_exec_callback_QTableView_MouseReleaseEvent(self *C.QTableView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1733,7 +1715,7 @@ func miqt_exec_callback_QTableView_MouseDoubleClickEvent(self *C.QTableView, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1759,7 +1741,7 @@ func miqt_exec_callback_QTableView_DragEnterEvent(self *C.QTableView, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1785,7 +1767,7 @@ func miqt_exec_callback_QTableView_DragMoveEvent(self *C.QTableView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1811,7 +1793,7 @@ func miqt_exec_callback_QTableView_DragLeaveEvent(self *C.QTableView, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1837,7 +1819,7 @@ func miqt_exec_callback_QTableView_DropEvent(self *C.QTableView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1863,7 +1845,7 @@ func miqt_exec_callback_QTableView_FocusInEvent(self *C.QTableView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1889,7 +1871,7 @@ func miqt_exec_callback_QTableView_FocusOutEvent(self *C.QTableView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1915,7 +1897,7 @@ func miqt_exec_callback_QTableView_KeyPressEvent(self *C.QTableView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1941,7 +1923,7 @@ func miqt_exec_callback_QTableView_ResizeEvent(self *C.QTableView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1967,7 +1949,7 @@ func miqt_exec_callback_QTableView_InputMethodEvent(self *C.QTableView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qtableview.h b/qt/gen_qtableview.h index 2006ead1..344d3247 100644 --- a/qt/gen_qtableview.h +++ b/qt/gen_qtableview.h @@ -80,8 +80,9 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QTableView_new(QWidget* parent, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTableView_new2(QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTableView* QTableView_new(QWidget* parent); +QTableView* QTableView_new2(); +void QTableView_virtbase(QTableView* src, QAbstractItemView** outptr_QAbstractItemView); QMetaObject* QTableView_MetaObject(const QTableView* self); void* QTableView_Metacast(QTableView* self, const char* param1); struct miqt_string QTableView_Tr(const char* s); diff --git a/qt/gen_qtablewidget.cpp b/qt/gen_qtablewidget.cpp index 0e0df451..1188b1e6 100644 --- a/qt/gen_qtablewidget.cpp +++ b/qt/gen_qtablewidget.cpp @@ -36,19 +36,16 @@ #include "gen_qtablewidget.h" #include "_cgo_export.h" -void QTableWidgetSelectionRange_new(QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange) { - QTableWidgetSelectionRange* ret = new QTableWidgetSelectionRange(); - *outptr_QTableWidgetSelectionRange = ret; +QTableWidgetSelectionRange* QTableWidgetSelectionRange_new() { + return new QTableWidgetSelectionRange(); } -void QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right, QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange) { - QTableWidgetSelectionRange* ret = new QTableWidgetSelectionRange(static_cast(top), static_cast(left), static_cast(bottom), static_cast(right)); - *outptr_QTableWidgetSelectionRange = ret; +QTableWidgetSelectionRange* QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right) { + return new QTableWidgetSelectionRange(static_cast(top), static_cast(left), static_cast(bottom), static_cast(right)); } -void QTableWidgetSelectionRange_new3(QTableWidgetSelectionRange* other, QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange) { - QTableWidgetSelectionRange* ret = new QTableWidgetSelectionRange(*other); - *outptr_QTableWidgetSelectionRange = ret; +QTableWidgetSelectionRange* QTableWidgetSelectionRange_new3(QTableWidgetSelectionRange* other) { + return new QTableWidgetSelectionRange(*other); } void QTableWidgetSelectionRange_OperatorAssign(QTableWidgetSelectionRange* self, QTableWidgetSelectionRange* other) { @@ -251,43 +248,36 @@ public: }; -void QTableWidgetItem_new(QTableWidgetItem** outptr_QTableWidgetItem) { - MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(); - *outptr_QTableWidgetItem = ret; +QTableWidgetItem* QTableWidgetItem_new() { + return new MiqtVirtualQTableWidgetItem(); } -void QTableWidgetItem_new2(struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem) { +QTableWidgetItem* QTableWidgetItem_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(text_QString); - *outptr_QTableWidgetItem = ret; + return new MiqtVirtualQTableWidgetItem(text_QString); } -void QTableWidgetItem_new3(QIcon* icon, struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem) { +QTableWidgetItem* QTableWidgetItem_new3(QIcon* icon, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(*icon, text_QString); - *outptr_QTableWidgetItem = ret; + return new MiqtVirtualQTableWidgetItem(*icon, text_QString); } -void QTableWidgetItem_new4(QTableWidgetItem* other, QTableWidgetItem** outptr_QTableWidgetItem) { - MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(*other); - *outptr_QTableWidgetItem = ret; +QTableWidgetItem* QTableWidgetItem_new4(QTableWidgetItem* other) { + return new MiqtVirtualQTableWidgetItem(*other); } -void QTableWidgetItem_new5(int typeVal, QTableWidgetItem** outptr_QTableWidgetItem) { - MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(static_cast(typeVal)); - *outptr_QTableWidgetItem = ret; +QTableWidgetItem* QTableWidgetItem_new5(int typeVal) { + return new MiqtVirtualQTableWidgetItem(static_cast(typeVal)); } -void QTableWidgetItem_new6(struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem) { +QTableWidgetItem* QTableWidgetItem_new6(struct miqt_string text, int typeVal) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(text_QString, static_cast(typeVal)); - *outptr_QTableWidgetItem = ret; + return new MiqtVirtualQTableWidgetItem(text_QString, static_cast(typeVal)); } -void QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem) { +QTableWidgetItem* QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(*icon, text_QString, static_cast(typeVal)); - *outptr_QTableWidgetItem = ret; + return new MiqtVirtualQTableWidgetItem(*icon, text_QString, static_cast(typeVal)); } QTableWidgetItem* QTableWidgetItem_Clone(const QTableWidgetItem* self) { @@ -1364,52 +1354,24 @@ public: }; -void QTableWidget_new(QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(parent); - *outptr_QTableWidget = ret; - *outptr_QTableView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTableWidget* QTableWidget_new(QWidget* parent) { + return new MiqtVirtualQTableWidget(parent); } -void QTableWidget_new2(QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(); - *outptr_QTableWidget = ret; - *outptr_QTableView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTableWidget* QTableWidget_new2() { + return new MiqtVirtualQTableWidget(); } -void QTableWidget_new3(int rows, int columns, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(static_cast(rows), static_cast(columns)); - *outptr_QTableWidget = ret; - *outptr_QTableView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTableWidget* QTableWidget_new3(int rows, int columns) { + return new MiqtVirtualQTableWidget(static_cast(rows), static_cast(columns)); } -void QTableWidget_new4(int rows, int columns, QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(static_cast(rows), static_cast(columns), parent); - *outptr_QTableWidget = ret; - *outptr_QTableView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTableWidget* QTableWidget_new4(int rows, int columns, QWidget* parent) { + return new MiqtVirtualQTableWidget(static_cast(rows), static_cast(columns), parent); +} + +void QTableWidget_virtbase(QTableWidget* src, QTableView** outptr_QTableView) { + *outptr_QTableView = static_cast(src); } QMetaObject* QTableWidget_MetaObject(const QTableWidget* self) { diff --git a/qt/gen_qtablewidget.go b/qt/gen_qtablewidget.go index 12a90f4b..83a21c41 100644 --- a/qt/gen_qtablewidget.go +++ b/qt/gen_qtablewidget.go @@ -45,44 +45,35 @@ func newQTableWidgetSelectionRange(h *C.QTableWidgetSelectionRange) *QTableWidge if h == nil { return nil } + return &QTableWidgetSelectionRange{h: h} } // UnsafeNewQTableWidgetSelectionRange constructs the type using only unsafe pointers. func UnsafeNewQTableWidgetSelectionRange(h unsafe.Pointer) *QTableWidgetSelectionRange { - if h == nil { - return nil - } - - return &QTableWidgetSelectionRange{h: (*C.QTableWidgetSelectionRange)(h)} + return newQTableWidgetSelectionRange((*C.QTableWidgetSelectionRange)(h)) } // NewQTableWidgetSelectionRange constructs a new QTableWidgetSelectionRange object. func NewQTableWidgetSelectionRange() *QTableWidgetSelectionRange { - var outptr_QTableWidgetSelectionRange *C.QTableWidgetSelectionRange = nil - C.QTableWidgetSelectionRange_new(&outptr_QTableWidgetSelectionRange) - ret := newQTableWidgetSelectionRange(outptr_QTableWidgetSelectionRange) + ret := newQTableWidgetSelectionRange(C.QTableWidgetSelectionRange_new()) ret.isSubclass = true return ret } // NewQTableWidgetSelectionRange2 constructs a new QTableWidgetSelectionRange object. func NewQTableWidgetSelectionRange2(top int, left int, bottom int, right int) *QTableWidgetSelectionRange { - var outptr_QTableWidgetSelectionRange *C.QTableWidgetSelectionRange = nil - C.QTableWidgetSelectionRange_new2((C.int)(top), (C.int)(left), (C.int)(bottom), (C.int)(right), &outptr_QTableWidgetSelectionRange) - ret := newQTableWidgetSelectionRange(outptr_QTableWidgetSelectionRange) + ret := newQTableWidgetSelectionRange(C.QTableWidgetSelectionRange_new2((C.int)(top), (C.int)(left), (C.int)(bottom), (C.int)(right))) ret.isSubclass = true return ret } // NewQTableWidgetSelectionRange3 constructs a new QTableWidgetSelectionRange object. func NewQTableWidgetSelectionRange3(other *QTableWidgetSelectionRange) *QTableWidgetSelectionRange { - var outptr_QTableWidgetSelectionRange *C.QTableWidgetSelectionRange = nil - C.QTableWidgetSelectionRange_new3(other.cPointer(), &outptr_QTableWidgetSelectionRange) - ret := newQTableWidgetSelectionRange(outptr_QTableWidgetSelectionRange) + ret := newQTableWidgetSelectionRange(C.QTableWidgetSelectionRange_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -153,24 +144,19 @@ func newQTableWidgetItem(h *C.QTableWidgetItem) *QTableWidgetItem { if h == nil { return nil } + return &QTableWidgetItem{h: h} } // UnsafeNewQTableWidgetItem constructs the type using only unsafe pointers. func UnsafeNewQTableWidgetItem(h unsafe.Pointer) *QTableWidgetItem { - if h == nil { - return nil - } - - return &QTableWidgetItem{h: (*C.QTableWidgetItem)(h)} + return newQTableWidgetItem((*C.QTableWidgetItem)(h)) } // NewQTableWidgetItem constructs a new QTableWidgetItem object. func NewQTableWidgetItem() *QTableWidgetItem { - var outptr_QTableWidgetItem *C.QTableWidgetItem = nil - C.QTableWidgetItem_new(&outptr_QTableWidgetItem) - ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret := newQTableWidgetItem(C.QTableWidgetItem_new()) ret.isSubclass = true return ret } @@ -181,10 +167,8 @@ func NewQTableWidgetItem2(text string) *QTableWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTableWidgetItem *C.QTableWidgetItem = nil - C.QTableWidgetItem_new2(text_ms, &outptr_QTableWidgetItem) - ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret := newQTableWidgetItem(C.QTableWidgetItem_new2(text_ms)) ret.isSubclass = true return ret } @@ -195,30 +179,24 @@ func NewQTableWidgetItem3(icon *QIcon, text string) *QTableWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTableWidgetItem *C.QTableWidgetItem = nil - C.QTableWidgetItem_new3(icon.cPointer(), text_ms, &outptr_QTableWidgetItem) - ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret := newQTableWidgetItem(C.QTableWidgetItem_new3(icon.cPointer(), text_ms)) ret.isSubclass = true return ret } // NewQTableWidgetItem4 constructs a new QTableWidgetItem object. func NewQTableWidgetItem4(other *QTableWidgetItem) *QTableWidgetItem { - var outptr_QTableWidgetItem *C.QTableWidgetItem = nil - C.QTableWidgetItem_new4(other.cPointer(), &outptr_QTableWidgetItem) - ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret := newQTableWidgetItem(C.QTableWidgetItem_new4(other.cPointer())) ret.isSubclass = true return ret } // NewQTableWidgetItem5 constructs a new QTableWidgetItem object. func NewQTableWidgetItem5(typeVal int) *QTableWidgetItem { - var outptr_QTableWidgetItem *C.QTableWidgetItem = nil - C.QTableWidgetItem_new5((C.int)(typeVal), &outptr_QTableWidgetItem) - ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret := newQTableWidgetItem(C.QTableWidgetItem_new5((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -229,10 +207,8 @@ func NewQTableWidgetItem6(text string, typeVal int) *QTableWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTableWidgetItem *C.QTableWidgetItem = nil - C.QTableWidgetItem_new6(text_ms, (C.int)(typeVal), &outptr_QTableWidgetItem) - ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret := newQTableWidgetItem(C.QTableWidgetItem_new6(text_ms, (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -243,10 +219,8 @@ func NewQTableWidgetItem7(icon *QIcon, text string, typeVal int) *QTableWidgetIt text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTableWidgetItem *C.QTableWidgetItem = nil - C.QTableWidgetItem_new7(icon.cPointer(), text_ms, (C.int)(typeVal), &outptr_QTableWidgetItem) - ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret := newQTableWidgetItem(C.QTableWidgetItem_new7(icon.cPointer(), text_ms, (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -256,7 +230,7 @@ func (this *QTableWidgetItem) Clone() *QTableWidgetItem { } func (this *QTableWidgetItem) TableWidget() *QTableWidget { - return newQTableWidget(C.QTableWidgetItem_TableWidget(this.h), nil, nil, nil, nil, nil, nil, nil) + return newQTableWidget(C.QTableWidgetItem_TableWidget(this.h)) } func (this *QTableWidgetItem) Row() int { @@ -657,88 +631,50 @@ func (this *QTableWidget) UnsafePointer() unsafe.Pointer { } // newQTableWidget constructs the type using only CGO pointers. -func newQTableWidget(h *C.QTableWidget, h_QTableView *C.QTableView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTableWidget { +func newQTableWidget(h *C.QTableWidget) *QTableWidget { if h == nil { return nil } + var outptr_QTableView *C.QTableView = nil + C.QTableWidget_virtbase(h, &outptr_QTableView) + return &QTableWidget{h: h, - QTableView: newQTableView(h_QTableView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QTableView: newQTableView(outptr_QTableView)} } // UnsafeNewQTableWidget constructs the type using only unsafe pointers. -func UnsafeNewQTableWidget(h unsafe.Pointer, h_QTableView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTableWidget { - if h == nil { - return nil - } - - return &QTableWidget{h: (*C.QTableWidget)(h), - QTableView: UnsafeNewQTableView(h_QTableView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTableWidget(h unsafe.Pointer) *QTableWidget { + return newQTableWidget((*C.QTableWidget)(h)) } // NewQTableWidget constructs a new QTableWidget object. func NewQTableWidget(parent *QWidget) *QTableWidget { - var outptr_QTableWidget *C.QTableWidget = nil - var outptr_QTableView *C.QTableView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTableWidget_new(parent.cPointer(), &outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTableWidget(C.QTableWidget_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTableWidget2 constructs a new QTableWidget object. func NewQTableWidget2() *QTableWidget { - var outptr_QTableWidget *C.QTableWidget = nil - var outptr_QTableView *C.QTableView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTableWidget_new2(&outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTableWidget(C.QTableWidget_new2()) ret.isSubclass = true return ret } // NewQTableWidget3 constructs a new QTableWidget object. func NewQTableWidget3(rows int, columns int) *QTableWidget { - var outptr_QTableWidget *C.QTableWidget = nil - var outptr_QTableView *C.QTableView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTableWidget_new3((C.int)(rows), (C.int)(columns), &outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTableWidget(C.QTableWidget_new3((C.int)(rows), (C.int)(columns))) ret.isSubclass = true return ret } // NewQTableWidget4 constructs a new QTableWidget object. func NewQTableWidget4(rows int, columns int, parent *QWidget) *QTableWidget { - var outptr_QTableWidget *C.QTableWidget = nil - var outptr_QTableView *C.QTableView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTableWidget_new4((C.int)(rows), (C.int)(columns), parent.cPointer(), &outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTableWidget(C.QTableWidget_new4((C.int)(rows), (C.int)(columns), parent.cPointer())) ret.isSubclass = true return ret } @@ -916,7 +852,7 @@ func (this *QTableWidget) IsPersistentEditorOpen(item *QTableWidgetItem) bool { } func (this *QTableWidget) CellWidget(row int, column int) *QWidget { - return newQWidget(C.QTableWidget_CellWidget(this.h, (C.int)(row), (C.int)(column)), nil, nil) + return newQWidget(C.QTableWidget_CellWidget(this.h, (C.int)(row), (C.int)(column))) } func (this *QTableWidget) SetCellWidget(row int, column int, widget *QWidget) { @@ -1482,7 +1418,7 @@ func (this *QTableWidget) callVirtualBase_MimeData(items []*QTableWidgetItem) *Q } items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} - return newQMimeData(C.QTableWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma), nil) + return newQMimeData(C.QTableWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma)) } func (this *QTableWidget) OnMimeData(slot func(super func(items []*QTableWidgetItem) *QMimeData, items []*QTableWidgetItem) *QMimeData) { @@ -1538,7 +1474,7 @@ func miqt_exec_callback_QTableWidget_DropMimeData(self *C.QTableWidget, cb C.int slotval2 := (int)(column) - slotval3 := newQMimeData(data, nil) + slotval3 := newQMimeData(data) slotval4 := (DropAction)(action) @@ -1593,7 +1529,7 @@ func miqt_exec_callback_QTableWidget_DropEvent(self *C.QTableWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QTableWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1645,7 +1581,7 @@ func miqt_exec_callback_QTableWidget_SetSelectionModel(self *C.QTableWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QTableWidget{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -1792,7 +1728,7 @@ func miqt_exec_callback_QTableWidget_ScrollContentsBy(self *C.QTableWidget, cb C func (this *QTableWidget) callVirtualBase_ViewOptions() *QStyleOptionViewItem { - _goptr := newQStyleOptionViewItem(C.QTableWidget_virtualbase_ViewOptions(unsafe.Pointer(this.h)), nil) + _goptr := newQStyleOptionViewItem(C.QTableWidget_virtualbase_ViewOptions(unsafe.Pointer(this.h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -1837,7 +1773,7 @@ func miqt_exec_callback_QTableWidget_PaintEvent(self *C.QTableWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QTableWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1863,7 +1799,7 @@ func miqt_exec_callback_QTableWidget_TimerEvent(self *C.QTableWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTableWidget{h: self}).callVirtualBase_TimerEvent, slotval1) diff --git a/qt/gen_qtablewidget.h b/qt/gen_qtablewidget.h index 8aa13118..6d94d12b 100644 --- a/qt/gen_qtablewidget.h +++ b/qt/gen_qtablewidget.h @@ -78,9 +78,9 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QTableWidgetSelectionRange_new(QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange); -void QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right, QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange); -void QTableWidgetSelectionRange_new3(QTableWidgetSelectionRange* other, QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange); +QTableWidgetSelectionRange* QTableWidgetSelectionRange_new(); +QTableWidgetSelectionRange* QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right); +QTableWidgetSelectionRange* QTableWidgetSelectionRange_new3(QTableWidgetSelectionRange* other); void QTableWidgetSelectionRange_OperatorAssign(QTableWidgetSelectionRange* self, QTableWidgetSelectionRange* other); int QTableWidgetSelectionRange_TopRow(const QTableWidgetSelectionRange* self); int QTableWidgetSelectionRange_BottomRow(const QTableWidgetSelectionRange* self); @@ -90,13 +90,13 @@ int QTableWidgetSelectionRange_RowCount(const QTableWidgetSelectionRange* self); int QTableWidgetSelectionRange_ColumnCount(const QTableWidgetSelectionRange* self); void QTableWidgetSelectionRange_Delete(QTableWidgetSelectionRange* self, bool isSubclass); -void QTableWidgetItem_new(QTableWidgetItem** outptr_QTableWidgetItem); -void QTableWidgetItem_new2(struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem); -void QTableWidgetItem_new3(QIcon* icon, struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem); -void QTableWidgetItem_new4(QTableWidgetItem* other, QTableWidgetItem** outptr_QTableWidgetItem); -void QTableWidgetItem_new5(int typeVal, QTableWidgetItem** outptr_QTableWidgetItem); -void QTableWidgetItem_new6(struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem); -void QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem); +QTableWidgetItem* QTableWidgetItem_new(); +QTableWidgetItem* QTableWidgetItem_new2(struct miqt_string text); +QTableWidgetItem* QTableWidgetItem_new3(QIcon* icon, struct miqt_string text); +QTableWidgetItem* QTableWidgetItem_new4(QTableWidgetItem* other); +QTableWidgetItem* QTableWidgetItem_new5(int typeVal); +QTableWidgetItem* QTableWidgetItem_new6(struct miqt_string text, int typeVal); +QTableWidgetItem* QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal); QTableWidgetItem* QTableWidgetItem_Clone(const QTableWidgetItem* self); QTableWidget* QTableWidgetItem_TableWidget(const QTableWidgetItem* self); int QTableWidgetItem_Row(const QTableWidgetItem* self); @@ -152,10 +152,11 @@ void QTableWidgetItem_override_virtual_Write(void* self, intptr_t slot); void QTableWidgetItem_virtualbase_Write(const void* self, QDataStream* out); void QTableWidgetItem_Delete(QTableWidgetItem* self, bool isSubclass); -void QTableWidget_new(QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTableWidget_new2(QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTableWidget_new3(int rows, int columns, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTableWidget_new4(int rows, int columns, QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTableWidget* QTableWidget_new(QWidget* parent); +QTableWidget* QTableWidget_new2(); +QTableWidget* QTableWidget_new3(int rows, int columns); +QTableWidget* QTableWidget_new4(int rows, int columns, QWidget* parent); +void QTableWidget_virtbase(QTableWidget* src, QTableView** outptr_QTableView); QMetaObject* QTableWidget_MetaObject(const QTableWidget* self); void* QTableWidget_Metacast(QTableWidget* self, const char* param1); struct miqt_string QTableWidget_Tr(const char* s); diff --git a/qt/gen_qtabwidget.cpp b/qt/gen_qtabwidget.cpp index 8eb16d68..c1f5e65a 100644 --- a/qt/gen_qtabwidget.cpp +++ b/qt/gen_qtabwidget.cpp @@ -1070,20 +1070,16 @@ public: }; -void QTabWidget_new(QWidget* parent, QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTabWidget* ret = new MiqtVirtualQTabWidget(parent); - *outptr_QTabWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTabWidget* QTabWidget_new(QWidget* parent) { + return new MiqtVirtualQTabWidget(parent); } -void QTabWidget_new2(QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTabWidget* ret = new MiqtVirtualQTabWidget(); - *outptr_QTabWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTabWidget* QTabWidget_new2() { + return new MiqtVirtualQTabWidget(); +} + +void QTabWidget_virtbase(QTabWidget* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QTabWidget_MetaObject(const QTabWidget* self) { diff --git a/qt/gen_qtabwidget.go b/qt/gen_qtabwidget.go index a4bb5406..b4c3669b 100644 --- a/qt/gen_qtabwidget.go +++ b/qt/gen_qtabwidget.go @@ -51,46 +51,34 @@ func (this *QTabWidget) UnsafePointer() unsafe.Pointer { } // newQTabWidget constructs the type using only CGO pointers. -func newQTabWidget(h *C.QTabWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTabWidget { +func newQTabWidget(h *C.QTabWidget) *QTabWidget { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QTabWidget_virtbase(h, &outptr_QWidget) + return &QTabWidget{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQTabWidget constructs the type using only unsafe pointers. -func UnsafeNewQTabWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTabWidget { - if h == nil { - return nil - } - - return &QTabWidget{h: (*C.QTabWidget)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTabWidget(h unsafe.Pointer) *QTabWidget { + return newQTabWidget((*C.QTabWidget)(h)) } // NewQTabWidget constructs a new QTabWidget object. func NewQTabWidget(parent *QWidget) *QTabWidget { - var outptr_QTabWidget *C.QTabWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTabWidget_new(parent.cPointer(), &outptr_QTabWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTabWidget(outptr_QTabWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTabWidget(C.QTabWidget_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTabWidget2 constructs a new QTabWidget object. func NewQTabWidget2() *QTabWidget { - var outptr_QTabWidget *C.QTabWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTabWidget_new2(&outptr_QTabWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTabWidget(outptr_QTabWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTabWidget(C.QTabWidget_new2()) ret.isSubclass = true return ret } @@ -235,11 +223,11 @@ func (this *QTabWidget) CurrentIndex() int { } func (this *QTabWidget) CurrentWidget() *QWidget { - return newQWidget(C.QTabWidget_CurrentWidget(this.h), nil, nil) + return newQWidget(C.QTabWidget_CurrentWidget(this.h)) } func (this *QTabWidget) Widget(index int) *QWidget { - return newQWidget(C.QTabWidget_Widget(this.h, (C.int)(index)), nil, nil) + return newQWidget(C.QTabWidget_Widget(this.h, (C.int)(index))) } func (this *QTabWidget) IndexOf(widget *QWidget) int { @@ -307,7 +295,7 @@ func (this *QTabWidget) SetCornerWidget(w *QWidget) { } func (this *QTabWidget) CornerWidget() *QWidget { - return newQWidget(C.QTabWidget_CornerWidget(this.h), nil, nil) + return newQWidget(C.QTabWidget_CornerWidget(this.h)) } func (this *QTabWidget) ElideMode() TextElideMode { @@ -357,7 +345,7 @@ func (this *QTabWidget) Clear() { } func (this *QTabWidget) TabBar() *QTabBar { - return newQTabBar(C.QTabWidget_TabBar(this.h), nil, nil, nil) + return newQTabBar(C.QTabWidget_TabBar(this.h)) } func (this *QTabWidget) SetCurrentIndex(index int) { @@ -497,7 +485,7 @@ func (this *QTabWidget) SetCornerWidget2(w *QWidget, corner Corner) { } func (this *QTabWidget) CornerWidget1(corner Corner) *QWidget { - return newQWidget(C.QTabWidget_CornerWidget1(this.h, (C.int)(corner)), nil, nil) + return newQWidget(C.QTabWidget_CornerWidget1(this.h, (C.int)(corner))) } func (this *QTabWidget) callVirtualBase_SizeHint() *QSize { @@ -679,7 +667,7 @@ func miqt_exec_callback_QTabWidget_ShowEvent(self *C.QTabWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QTabWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -705,7 +693,7 @@ func miqt_exec_callback_QTabWidget_ResizeEvent(self *C.QTabWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QTabWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -731,7 +719,7 @@ func miqt_exec_callback_QTabWidget_KeyPressEvent(self *C.QTabWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QTabWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -757,7 +745,7 @@ func miqt_exec_callback_QTabWidget_PaintEvent(self *C.QTabWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QTabWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -913,7 +901,7 @@ func miqt_exec_callback_QTabWidget_MousePressEvent(self *C.QTabWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -939,7 +927,7 @@ func miqt_exec_callback_QTabWidget_MouseReleaseEvent(self *C.QTabWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -965,7 +953,7 @@ func miqt_exec_callback_QTabWidget_MouseDoubleClickEvent(self *C.QTabWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -991,7 +979,7 @@ func miqt_exec_callback_QTabWidget_MouseMoveEvent(self *C.QTabWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1017,7 +1005,7 @@ func miqt_exec_callback_QTabWidget_WheelEvent(self *C.QTabWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1043,7 +1031,7 @@ func miqt_exec_callback_QTabWidget_KeyReleaseEvent(self *C.QTabWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1069,7 +1057,7 @@ func miqt_exec_callback_QTabWidget_FocusInEvent(self *C.QTabWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1095,7 +1083,7 @@ func miqt_exec_callback_QTabWidget_FocusOutEvent(self *C.QTabWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1173,7 +1161,7 @@ func miqt_exec_callback_QTabWidget_MoveEvent(self *C.QTabWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1199,7 +1187,7 @@ func miqt_exec_callback_QTabWidget_CloseEvent(self *C.QTabWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1225,7 +1213,7 @@ func miqt_exec_callback_QTabWidget_ContextMenuEvent(self *C.QTabWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1251,7 +1239,7 @@ func miqt_exec_callback_QTabWidget_TabletEvent(self *C.QTabWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1277,7 +1265,7 @@ func miqt_exec_callback_QTabWidget_ActionEvent(self *C.QTabWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1303,7 +1291,7 @@ func miqt_exec_callback_QTabWidget_DragEnterEvent(self *C.QTabWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1329,7 +1317,7 @@ func miqt_exec_callback_QTabWidget_DragMoveEvent(self *C.QTabWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1355,7 +1343,7 @@ func miqt_exec_callback_QTabWidget_DragLeaveEvent(self *C.QTabWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1381,7 +1369,7 @@ func miqt_exec_callback_QTabWidget_DropEvent(self *C.QTabWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1407,7 +1395,7 @@ func miqt_exec_callback_QTabWidget_HideEvent(self *C.QTabWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1577,7 +1565,7 @@ func miqt_exec_callback_QTabWidget_InputMethodEvent(self *C.QTabWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QTabWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qtabwidget.h b/qt/gen_qtabwidget.h index 460cd127..d1f058c5 100644 --- a/qt/gen_qtabwidget.h +++ b/qt/gen_qtabwidget.h @@ -80,8 +80,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QTabWidget_new(QWidget* parent, QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTabWidget_new2(QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTabWidget* QTabWidget_new(QWidget* parent); +QTabWidget* QTabWidget_new2(); +void QTabWidget_virtbase(QTabWidget* src, QWidget** outptr_QWidget); QMetaObject* QTabWidget_MetaObject(const QTabWidget* self); void* QTabWidget_Metacast(QTabWidget* self, const char* param1); struct miqt_string QTabWidget_Tr(const char* s); diff --git a/qt/gen_qtemporarydir.cpp b/qt/gen_qtemporarydir.cpp index 4963253c..130c8107 100644 --- a/qt/gen_qtemporarydir.cpp +++ b/qt/gen_qtemporarydir.cpp @@ -6,15 +6,13 @@ #include "gen_qtemporarydir.h" #include "_cgo_export.h" -void QTemporaryDir_new(QTemporaryDir** outptr_QTemporaryDir) { - QTemporaryDir* ret = new QTemporaryDir(); - *outptr_QTemporaryDir = ret; +QTemporaryDir* QTemporaryDir_new() { + return new QTemporaryDir(); } -void QTemporaryDir_new2(struct miqt_string templateName, QTemporaryDir** outptr_QTemporaryDir) { +QTemporaryDir* QTemporaryDir_new2(struct miqt_string templateName) { QString templateName_QString = QString::fromUtf8(templateName.data, templateName.len); - QTemporaryDir* ret = new QTemporaryDir(templateName_QString); - *outptr_QTemporaryDir = ret; + return new QTemporaryDir(templateName_QString); } bool QTemporaryDir_IsValid(const QTemporaryDir* self) { diff --git a/qt/gen_qtemporarydir.go b/qt/gen_qtemporarydir.go index 9ef62e65..2b2be237 100644 --- a/qt/gen_qtemporarydir.go +++ b/qt/gen_qtemporarydir.go @@ -37,24 +37,19 @@ func newQTemporaryDir(h *C.QTemporaryDir) *QTemporaryDir { if h == nil { return nil } + return &QTemporaryDir{h: h} } // UnsafeNewQTemporaryDir constructs the type using only unsafe pointers. func UnsafeNewQTemporaryDir(h unsafe.Pointer) *QTemporaryDir { - if h == nil { - return nil - } - - return &QTemporaryDir{h: (*C.QTemporaryDir)(h)} + return newQTemporaryDir((*C.QTemporaryDir)(h)) } // NewQTemporaryDir constructs a new QTemporaryDir object. func NewQTemporaryDir() *QTemporaryDir { - var outptr_QTemporaryDir *C.QTemporaryDir = nil - C.QTemporaryDir_new(&outptr_QTemporaryDir) - ret := newQTemporaryDir(outptr_QTemporaryDir) + ret := newQTemporaryDir(C.QTemporaryDir_new()) ret.isSubclass = true return ret } @@ -65,10 +60,8 @@ func NewQTemporaryDir2(templateName string) *QTemporaryDir { templateName_ms.data = C.CString(templateName) templateName_ms.len = C.size_t(len(templateName)) defer C.free(unsafe.Pointer(templateName_ms.data)) - var outptr_QTemporaryDir *C.QTemporaryDir = nil - C.QTemporaryDir_new2(templateName_ms, &outptr_QTemporaryDir) - ret := newQTemporaryDir(outptr_QTemporaryDir) + ret := newQTemporaryDir(C.QTemporaryDir_new2(templateName_ms)) ret.isSubclass = true return ret } diff --git a/qt/gen_qtemporarydir.h b/qt/gen_qtemporarydir.h index 3a774358..d0075464 100644 --- a/qt/gen_qtemporarydir.h +++ b/qt/gen_qtemporarydir.h @@ -20,8 +20,8 @@ class QTemporaryDir; typedef struct QTemporaryDir QTemporaryDir; #endif -void QTemporaryDir_new(QTemporaryDir** outptr_QTemporaryDir); -void QTemporaryDir_new2(struct miqt_string templateName, QTemporaryDir** outptr_QTemporaryDir); +QTemporaryDir* QTemporaryDir_new(); +QTemporaryDir* QTemporaryDir_new2(struct miqt_string templateName); bool QTemporaryDir_IsValid(const QTemporaryDir* self); struct miqt_string QTemporaryDir_ErrorString(const QTemporaryDir* self); bool QTemporaryDir_AutoRemove(const QTemporaryDir* self); diff --git a/qt/gen_qtemporaryfile.cpp b/qt/gen_qtemporaryfile.cpp index afa0f61c..5403faea 100644 --- a/qt/gen_qtemporaryfile.cpp +++ b/qt/gen_qtemporaryfile.cpp @@ -171,42 +171,26 @@ public: }; -void QTemporaryFile_new(QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(); - *outptr_QTemporaryFile = ret; - *outptr_QFile = static_cast(ret); - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTemporaryFile* QTemporaryFile_new() { + return new MiqtVirtualQTemporaryFile(); } -void QTemporaryFile_new2(struct miqt_string templateName, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { +QTemporaryFile* QTemporaryFile_new2(struct miqt_string templateName) { QString templateName_QString = QString::fromUtf8(templateName.data, templateName.len); - MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(templateName_QString); - *outptr_QTemporaryFile = ret; - *outptr_QFile = static_cast(ret); - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQTemporaryFile(templateName_QString); } -void QTemporaryFile_new3(QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(parent); - *outptr_QTemporaryFile = ret; - *outptr_QFile = static_cast(ret); - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTemporaryFile* QTemporaryFile_new3(QObject* parent) { + return new MiqtVirtualQTemporaryFile(parent); } -void QTemporaryFile_new4(struct miqt_string templateName, QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { +QTemporaryFile* QTemporaryFile_new4(struct miqt_string templateName, QObject* parent) { QString templateName_QString = QString::fromUtf8(templateName.data, templateName.len); - MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(templateName_QString, parent); - *outptr_QTemporaryFile = ret; - *outptr_QFile = static_cast(ret); - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQTemporaryFile(templateName_QString, parent); +} + +void QTemporaryFile_virtbase(QTemporaryFile* src, QFile** outptr_QFile) { + *outptr_QFile = static_cast(src); } QMetaObject* QTemporaryFile_MetaObject(const QTemporaryFile* self) { diff --git a/qt/gen_qtemporaryfile.go b/qt/gen_qtemporaryfile.go index df24de8b..9c6a9958 100644 --- a/qt/gen_qtemporaryfile.go +++ b/qt/gen_qtemporaryfile.go @@ -35,34 +35,26 @@ func (this *QTemporaryFile) UnsafePointer() unsafe.Pointer { } // newQTemporaryFile constructs the type using only CGO pointers. -func newQTemporaryFile(h *C.QTemporaryFile, h_QFile *C.QFile, h_QFileDevice *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QTemporaryFile { +func newQTemporaryFile(h *C.QTemporaryFile) *QTemporaryFile { if h == nil { return nil } + var outptr_QFile *C.QFile = nil + C.QTemporaryFile_virtbase(h, &outptr_QFile) + return &QTemporaryFile{h: h, - QFile: newQFile(h_QFile, h_QFileDevice, h_QIODevice, h_QObject)} + QFile: newQFile(outptr_QFile)} } // UnsafeNewQTemporaryFile constructs the type using only unsafe pointers. -func UnsafeNewQTemporaryFile(h unsafe.Pointer, h_QFile unsafe.Pointer, h_QFileDevice unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QTemporaryFile { - if h == nil { - return nil - } - - return &QTemporaryFile{h: (*C.QTemporaryFile)(h), - QFile: UnsafeNewQFile(h_QFile, h_QFileDevice, h_QIODevice, h_QObject)} +func UnsafeNewQTemporaryFile(h unsafe.Pointer) *QTemporaryFile { + return newQTemporaryFile((*C.QTemporaryFile)(h)) } // NewQTemporaryFile constructs a new QTemporaryFile object. func NewQTemporaryFile() *QTemporaryFile { - var outptr_QTemporaryFile *C.QTemporaryFile = nil - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QTemporaryFile_new(&outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) - ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret := newQTemporaryFile(C.QTemporaryFile_new()) ret.isSubclass = true return ret } @@ -73,28 +65,16 @@ func NewQTemporaryFile2(templateName string) *QTemporaryFile { templateName_ms.data = C.CString(templateName) templateName_ms.len = C.size_t(len(templateName)) defer C.free(unsafe.Pointer(templateName_ms.data)) - var outptr_QTemporaryFile *C.QTemporaryFile = nil - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QTemporaryFile_new2(templateName_ms, &outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) - ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret := newQTemporaryFile(C.QTemporaryFile_new2(templateName_ms)) ret.isSubclass = true return ret } // NewQTemporaryFile3 constructs a new QTemporaryFile object. func NewQTemporaryFile3(parent *QObject) *QTemporaryFile { - var outptr_QTemporaryFile *C.QTemporaryFile = nil - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QTemporaryFile_new3(parent.cPointer(), &outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) - ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret := newQTemporaryFile(C.QTemporaryFile_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -105,14 +85,8 @@ func NewQTemporaryFile4(templateName string, parent *QObject) *QTemporaryFile { templateName_ms.data = C.CString(templateName) templateName_ms.len = C.size_t(len(templateName)) defer C.free(unsafe.Pointer(templateName_ms.data)) - var outptr_QTemporaryFile *C.QTemporaryFile = nil - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QTemporaryFile_new4(templateName_ms, parent.cPointer(), &outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject) - ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject) + ret := newQTemporaryFile(C.QTemporaryFile_new4(templateName_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -192,11 +166,11 @@ func QTemporaryFile_CreateLocalFile(fileName string) *QTemporaryFile { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - return newQTemporaryFile(C.QTemporaryFile_CreateLocalFile(fileName_ms), nil, nil, nil, nil) + return newQTemporaryFile(C.QTemporaryFile_CreateLocalFile(fileName_ms)) } func QTemporaryFile_CreateLocalFileWithFile(file *QFile) *QTemporaryFile { - return newQTemporaryFile(C.QTemporaryFile_CreateLocalFileWithFile(file.cPointer()), nil, nil, nil, nil) + return newQTemporaryFile(C.QTemporaryFile_CreateLocalFileWithFile(file.cPointer())) } func QTemporaryFile_CreateNativeFile(fileName string) *QTemporaryFile { @@ -204,11 +178,11 @@ func QTemporaryFile_CreateNativeFile(fileName string) *QTemporaryFile { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - return newQTemporaryFile(C.QTemporaryFile_CreateNativeFile(fileName_ms), nil, nil, nil, nil) + return newQTemporaryFile(C.QTemporaryFile_CreateNativeFile(fileName_ms)) } func QTemporaryFile_CreateNativeFileWithFile(file *QFile) *QTemporaryFile { - return newQTemporaryFile(C.QTemporaryFile_CreateNativeFileWithFile(file.cPointer()), nil, nil, nil, nil) + return newQTemporaryFile(C.QTemporaryFile_CreateNativeFileWithFile(file.cPointer())) } func QTemporaryFile_Tr2(s string, c string) string { diff --git a/qt/gen_qtemporaryfile.h b/qt/gen_qtemporaryfile.h index 9d79a731..a54dd961 100644 --- a/qt/gen_qtemporaryfile.h +++ b/qt/gen_qtemporaryfile.h @@ -30,10 +30,11 @@ typedef struct QObject QObject; typedef struct QTemporaryFile QTemporaryFile; #endif -void QTemporaryFile_new(QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QTemporaryFile_new2(struct miqt_string templateName, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QTemporaryFile_new3(QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QTemporaryFile_new4(struct miqt_string templateName, QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +QTemporaryFile* QTemporaryFile_new(); +QTemporaryFile* QTemporaryFile_new2(struct miqt_string templateName); +QTemporaryFile* QTemporaryFile_new3(QObject* parent); +QTemporaryFile* QTemporaryFile_new4(struct miqt_string templateName, QObject* parent); +void QTemporaryFile_virtbase(QTemporaryFile* src, QFile** outptr_QFile); QMetaObject* QTemporaryFile_MetaObject(const QTemporaryFile* self); void* QTemporaryFile_Metacast(QTemporaryFile* self, const char* param1); struct miqt_string QTemporaryFile_Tr(const char* s); diff --git a/qt/gen_qtextboundaryfinder.cpp b/qt/gen_qtextboundaryfinder.cpp index 396cf94e..a08f87ba 100644 --- a/qt/gen_qtextboundaryfinder.cpp +++ b/qt/gen_qtextboundaryfinder.cpp @@ -7,35 +7,29 @@ #include "gen_qtextboundaryfinder.h" #include "_cgo_export.h" -void QTextBoundaryFinder_new(QTextBoundaryFinder** outptr_QTextBoundaryFinder) { - QTextBoundaryFinder* ret = new QTextBoundaryFinder(); - *outptr_QTextBoundaryFinder = ret; +QTextBoundaryFinder* QTextBoundaryFinder_new() { + return new QTextBoundaryFinder(); } -void QTextBoundaryFinder_new2(QTextBoundaryFinder* other, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { - QTextBoundaryFinder* ret = new QTextBoundaryFinder(*other); - *outptr_QTextBoundaryFinder = ret; +QTextBoundaryFinder* QTextBoundaryFinder_new2(QTextBoundaryFinder* other) { + return new QTextBoundaryFinder(*other); } -void QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { +QTextBoundaryFinder* QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal) { QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len); - QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), stringVal_QString); - *outptr_QTextBoundaryFinder = ret; + return new QTextBoundaryFinder(static_cast(typeVal), stringVal_QString); } -void QTextBoundaryFinder_new4(int typeVal, QChar* chars, int length, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { - QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), chars, static_cast(length)); - *outptr_QTextBoundaryFinder = ret; +QTextBoundaryFinder* QTextBoundaryFinder_new4(int typeVal, QChar* chars, int length) { + return new QTextBoundaryFinder(static_cast(typeVal), chars, static_cast(length)); } -void QTextBoundaryFinder_new5(int typeVal, QChar* chars, int length, unsigned char* buffer, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { - QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), chars, static_cast(length), static_cast(buffer)); - *outptr_QTextBoundaryFinder = ret; +QTextBoundaryFinder* QTextBoundaryFinder_new5(int typeVal, QChar* chars, int length, unsigned char* buffer) { + return new QTextBoundaryFinder(static_cast(typeVal), chars, static_cast(length), static_cast(buffer)); } -void QTextBoundaryFinder_new6(int typeVal, QChar* chars, int length, unsigned char* buffer, int bufferSize, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { - QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), chars, static_cast(length), static_cast(buffer), static_cast(bufferSize)); - *outptr_QTextBoundaryFinder = ret; +QTextBoundaryFinder* QTextBoundaryFinder_new6(int typeVal, QChar* chars, int length, unsigned char* buffer, int bufferSize) { + return new QTextBoundaryFinder(static_cast(typeVal), chars, static_cast(length), static_cast(buffer), static_cast(bufferSize)); } void QTextBoundaryFinder_OperatorAssign(QTextBoundaryFinder* self, QTextBoundaryFinder* other) { diff --git a/qt/gen_qtextboundaryfinder.go b/qt/gen_qtextboundaryfinder.go index 4b69aff8..6a4fbbd7 100644 --- a/qt/gen_qtextboundaryfinder.go +++ b/qt/gen_qtextboundaryfinder.go @@ -57,34 +57,27 @@ func newQTextBoundaryFinder(h *C.QTextBoundaryFinder) *QTextBoundaryFinder { if h == nil { return nil } + return &QTextBoundaryFinder{h: h} } // UnsafeNewQTextBoundaryFinder constructs the type using only unsafe pointers. func UnsafeNewQTextBoundaryFinder(h unsafe.Pointer) *QTextBoundaryFinder { - if h == nil { - return nil - } - - return &QTextBoundaryFinder{h: (*C.QTextBoundaryFinder)(h)} + return newQTextBoundaryFinder((*C.QTextBoundaryFinder)(h)) } // NewQTextBoundaryFinder constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder() *QTextBoundaryFinder { - var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil - C.QTextBoundaryFinder_new(&outptr_QTextBoundaryFinder) - ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(C.QTextBoundaryFinder_new()) ret.isSubclass = true return ret } // NewQTextBoundaryFinder2 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder2(other *QTextBoundaryFinder) *QTextBoundaryFinder { - var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil - C.QTextBoundaryFinder_new2(other.cPointer(), &outptr_QTextBoundaryFinder) - ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(C.QTextBoundaryFinder_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -95,40 +88,32 @@ func NewQTextBoundaryFinder3(typeVal QTextBoundaryFinder__BoundaryType, stringVa stringVal_ms.data = C.CString(stringVal) stringVal_ms.len = C.size_t(len(stringVal)) defer C.free(unsafe.Pointer(stringVal_ms.data)) - var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil - C.QTextBoundaryFinder_new3((C.int)(typeVal), stringVal_ms, &outptr_QTextBoundaryFinder) - ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(C.QTextBoundaryFinder_new3((C.int)(typeVal), stringVal_ms)) ret.isSubclass = true return ret } // NewQTextBoundaryFinder4 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder4(typeVal QTextBoundaryFinder__BoundaryType, chars *QChar, length int) *QTextBoundaryFinder { - var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil - C.QTextBoundaryFinder_new4((C.int)(typeVal), chars.cPointer(), (C.int)(length), &outptr_QTextBoundaryFinder) - ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(C.QTextBoundaryFinder_new4((C.int)(typeVal), chars.cPointer(), (C.int)(length))) ret.isSubclass = true return ret } // NewQTextBoundaryFinder5 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder5(typeVal QTextBoundaryFinder__BoundaryType, chars *QChar, length int, buffer *byte) *QTextBoundaryFinder { - var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil - C.QTextBoundaryFinder_new5((C.int)(typeVal), chars.cPointer(), (C.int)(length), (*C.uchar)(unsafe.Pointer(buffer)), &outptr_QTextBoundaryFinder) - ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(C.QTextBoundaryFinder_new5((C.int)(typeVal), chars.cPointer(), (C.int)(length), (*C.uchar)(unsafe.Pointer(buffer)))) ret.isSubclass = true return ret } // NewQTextBoundaryFinder6 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder6(typeVal QTextBoundaryFinder__BoundaryType, chars *QChar, length int, buffer *byte, bufferSize int) *QTextBoundaryFinder { - var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil - C.QTextBoundaryFinder_new6((C.int)(typeVal), chars.cPointer(), (C.int)(length), (*C.uchar)(unsafe.Pointer(buffer)), (C.int)(bufferSize), &outptr_QTextBoundaryFinder) - ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(C.QTextBoundaryFinder_new6((C.int)(typeVal), chars.cPointer(), (C.int)(length), (*C.uchar)(unsafe.Pointer(buffer)), (C.int)(bufferSize))) ret.isSubclass = true return ret } diff --git a/qt/gen_qtextboundaryfinder.h b/qt/gen_qtextboundaryfinder.h index a889c58d..ef92070a 100644 --- a/qt/gen_qtextboundaryfinder.h +++ b/qt/gen_qtextboundaryfinder.h @@ -22,12 +22,12 @@ typedef struct QChar QChar; typedef struct QTextBoundaryFinder QTextBoundaryFinder; #endif -void QTextBoundaryFinder_new(QTextBoundaryFinder** outptr_QTextBoundaryFinder); -void QTextBoundaryFinder_new2(QTextBoundaryFinder* other, QTextBoundaryFinder** outptr_QTextBoundaryFinder); -void QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal, QTextBoundaryFinder** outptr_QTextBoundaryFinder); -void QTextBoundaryFinder_new4(int typeVal, QChar* chars, int length, QTextBoundaryFinder** outptr_QTextBoundaryFinder); -void QTextBoundaryFinder_new5(int typeVal, QChar* chars, int length, unsigned char* buffer, QTextBoundaryFinder** outptr_QTextBoundaryFinder); -void QTextBoundaryFinder_new6(int typeVal, QChar* chars, int length, unsigned char* buffer, int bufferSize, QTextBoundaryFinder** outptr_QTextBoundaryFinder); +QTextBoundaryFinder* QTextBoundaryFinder_new(); +QTextBoundaryFinder* QTextBoundaryFinder_new2(QTextBoundaryFinder* other); +QTextBoundaryFinder* QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal); +QTextBoundaryFinder* QTextBoundaryFinder_new4(int typeVal, QChar* chars, int length); +QTextBoundaryFinder* QTextBoundaryFinder_new5(int typeVal, QChar* chars, int length, unsigned char* buffer); +QTextBoundaryFinder* QTextBoundaryFinder_new6(int typeVal, QChar* chars, int length, unsigned char* buffer, int bufferSize); void QTextBoundaryFinder_OperatorAssign(QTextBoundaryFinder* self, QTextBoundaryFinder* other); bool QTextBoundaryFinder_IsValid(const QTextBoundaryFinder* self); int QTextBoundaryFinder_Type(const QTextBoundaryFinder* self); diff --git a/qt/gen_qtextbrowser.cpp b/qt/gen_qtextbrowser.cpp index 8d9d236b..9f0c7cea 100644 --- a/qt/gen_qtextbrowser.cpp +++ b/qt/gen_qtextbrowser.cpp @@ -857,26 +857,16 @@ public: }; -void QTextBrowser_new(QWidget* parent, QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTextBrowser* ret = new MiqtVirtualQTextBrowser(parent); - *outptr_QTextBrowser = ret; - *outptr_QTextEdit = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTextBrowser* QTextBrowser_new(QWidget* parent) { + return new MiqtVirtualQTextBrowser(parent); } -void QTextBrowser_new2(QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTextBrowser* ret = new MiqtVirtualQTextBrowser(); - *outptr_QTextBrowser = ret; - *outptr_QTextEdit = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTextBrowser* QTextBrowser_new2() { + return new MiqtVirtualQTextBrowser(); +} + +void QTextBrowser_virtbase(QTextBrowser* src, QTextEdit** outptr_QTextEdit) { + *outptr_QTextEdit = static_cast(src); } QMetaObject* QTextBrowser_MetaObject(const QTextBrowser* self) { diff --git a/qt/gen_qtextbrowser.go b/qt/gen_qtextbrowser.go index b386428b..b7ba889f 100644 --- a/qt/gen_qtextbrowser.go +++ b/qt/gen_qtextbrowser.go @@ -35,52 +35,34 @@ func (this *QTextBrowser) UnsafePointer() unsafe.Pointer { } // newQTextBrowser constructs the type using only CGO pointers. -func newQTextBrowser(h *C.QTextBrowser, h_QTextEdit *C.QTextEdit, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTextBrowser { +func newQTextBrowser(h *C.QTextBrowser) *QTextBrowser { if h == nil { return nil } + var outptr_QTextEdit *C.QTextEdit = nil + C.QTextBrowser_virtbase(h, &outptr_QTextEdit) + return &QTextBrowser{h: h, - QTextEdit: newQTextEdit(h_QTextEdit, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QTextEdit: newQTextEdit(outptr_QTextEdit)} } // UnsafeNewQTextBrowser constructs the type using only unsafe pointers. -func UnsafeNewQTextBrowser(h unsafe.Pointer, h_QTextEdit unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTextBrowser { - if h == nil { - return nil - } - - return &QTextBrowser{h: (*C.QTextBrowser)(h), - QTextEdit: UnsafeNewQTextEdit(h_QTextEdit, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTextBrowser(h unsafe.Pointer) *QTextBrowser { + return newQTextBrowser((*C.QTextBrowser)(h)) } // NewQTextBrowser constructs a new QTextBrowser object. func NewQTextBrowser(parent *QWidget) *QTextBrowser { - var outptr_QTextBrowser *C.QTextBrowser = nil - var outptr_QTextEdit *C.QTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTextBrowser_new(parent.cPointer(), &outptr_QTextBrowser, &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTextBrowser(outptr_QTextBrowser, outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTextBrowser(C.QTextBrowser_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTextBrowser2 constructs a new QTextBrowser object. func NewQTextBrowser2() *QTextBrowser { - var outptr_QTextBrowser *C.QTextBrowser = nil - var outptr_QTextEdit *C.QTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTextBrowser_new2(&outptr_QTextBrowser, &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTextBrowser(outptr_QTextBrowser, outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTextBrowser(C.QTextBrowser_new2()) ret.isSubclass = true return ret } @@ -615,7 +597,7 @@ func miqt_exec_callback_QTextBrowser_KeyPressEvent(self *C.QTextBrowser, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(ev, nil, nil) + slotval1 := newQKeyEvent(ev) gofunc((&QTextBrowser{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -641,7 +623,7 @@ func miqt_exec_callback_QTextBrowser_MouseMoveEvent(self *C.QTextBrowser, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QTextBrowser{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -667,7 +649,7 @@ func miqt_exec_callback_QTextBrowser_MousePressEvent(self *C.QTextBrowser, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QTextBrowser{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -693,7 +675,7 @@ func miqt_exec_callback_QTextBrowser_MouseReleaseEvent(self *C.QTextBrowser, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QTextBrowser{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -719,7 +701,7 @@ func miqt_exec_callback_QTextBrowser_FocusOutEvent(self *C.QTextBrowser, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(ev, nil) + slotval1 := newQFocusEvent(ev) gofunc((&QTextBrowser{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -773,7 +755,7 @@ func miqt_exec_callback_QTextBrowser_PaintEvent(self *C.QTextBrowser, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -829,7 +811,7 @@ func miqt_exec_callback_QTextBrowser_TimerEvent(self *C.QTextBrowser, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -855,7 +837,7 @@ func miqt_exec_callback_QTextBrowser_KeyReleaseEvent(self *C.QTextBrowser, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -881,7 +863,7 @@ func miqt_exec_callback_QTextBrowser_ResizeEvent(self *C.QTextBrowser, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -907,7 +889,7 @@ func miqt_exec_callback_QTextBrowser_MouseDoubleClickEvent(self *C.QTextBrowser, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -933,7 +915,7 @@ func miqt_exec_callback_QTextBrowser_ContextMenuEvent(self *C.QTextBrowser, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(e, nil, nil) + slotval1 := newQContextMenuEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -959,7 +941,7 @@ func miqt_exec_callback_QTextBrowser_DragEnterEvent(self *C.QTextBrowser, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(e, nil, nil, nil) + slotval1 := newQDragEnterEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -985,7 +967,7 @@ func miqt_exec_callback_QTextBrowser_DragLeaveEvent(self *C.QTextBrowser, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(e, nil) + slotval1 := newQDragLeaveEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1011,7 +993,7 @@ func miqt_exec_callback_QTextBrowser_DragMoveEvent(self *C.QTextBrowser, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(e, nil, nil) + slotval1 := newQDragMoveEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1037,7 +1019,7 @@ func miqt_exec_callback_QTextBrowser_DropEvent(self *C.QTextBrowser, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(e, nil) + slotval1 := newQDropEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1063,7 +1045,7 @@ func miqt_exec_callback_QTextBrowser_FocusInEvent(self *C.QTextBrowser, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1089,7 +1071,7 @@ func miqt_exec_callback_QTextBrowser_ShowEvent(self *C.QTextBrowser, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QTextBrowser{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1141,7 +1123,7 @@ func miqt_exec_callback_QTextBrowser_WheelEvent(self *C.QTextBrowser, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1149,7 +1131,7 @@ func miqt_exec_callback_QTextBrowser_WheelEvent(self *C.QTextBrowser, cb C.intpt func (this *QTextBrowser) callVirtualBase_CreateMimeDataFromSelection() *QMimeData { - return newQMimeData(C.QTextBrowser_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h)), nil) + return newQMimeData(C.QTextBrowser_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h))) } func (this *QTextBrowser) OnCreateMimeDataFromSelection(slot func(super func() *QMimeData) *QMimeData) { @@ -1192,7 +1174,7 @@ func miqt_exec_callback_QTextBrowser_CanInsertFromMimeData(self *C.QTextBrowser, } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(source, nil) + slotval1 := newQMimeData(source) virtualReturn := gofunc((&QTextBrowser{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) @@ -1220,7 +1202,7 @@ func miqt_exec_callback_QTextBrowser_InsertFromMimeData(self *C.QTextBrowser, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(source, nil) + slotval1 := newQMimeData(source) gofunc((&QTextBrowser{h: self}).callVirtualBase_InsertFromMimeData, slotval1) @@ -1246,7 +1228,7 @@ func miqt_exec_callback_QTextBrowser_InputMethodEvent(self *C.QTextBrowser, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QTextBrowser{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qtextbrowser.h b/qt/gen_qtextbrowser.h index 686c761d..3e07e51b 100644 --- a/qt/gen_qtextbrowser.h +++ b/qt/gen_qtextbrowser.h @@ -72,8 +72,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QTextBrowser_new(QWidget* parent, QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTextBrowser_new2(QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTextBrowser* QTextBrowser_new(QWidget* parent); +QTextBrowser* QTextBrowser_new2(); +void QTextBrowser_virtbase(QTextBrowser* src, QTextEdit** outptr_QTextEdit); QMetaObject* QTextBrowser_MetaObject(const QTextBrowser* self); void* QTextBrowser_Metacast(QTextBrowser* self, const char* param1); struct miqt_string QTextBrowser_Tr(const char* s); diff --git a/qt/gen_qtextcodec.cpp b/qt/gen_qtextcodec.cpp index ed3bf03b..6b391e55 100644 --- a/qt/gen_qtextcodec.cpp +++ b/qt/gen_qtextcodec.cpp @@ -213,14 +213,12 @@ QTextEncoder* QTextCodec_MakeEncoder1(const QTextCodec* self, int flags) { return self->makeEncoder(static_cast(flags)); } -void QTextEncoder_new(QTextCodec* codec, QTextEncoder** outptr_QTextEncoder) { - QTextEncoder* ret = new QTextEncoder(codec); - *outptr_QTextEncoder = ret; +QTextEncoder* QTextEncoder_new(QTextCodec* codec) { + return new QTextEncoder(codec); } -void QTextEncoder_new2(QTextCodec* codec, int flags, QTextEncoder** outptr_QTextEncoder) { - QTextEncoder* ret = new QTextEncoder(codec, static_cast(flags)); - *outptr_QTextEncoder = ret; +QTextEncoder* QTextEncoder_new2(QTextCodec* codec, int flags) { + return new QTextEncoder(codec, static_cast(flags)); } struct miqt_string QTextEncoder_FromUnicode(QTextEncoder* self, struct miqt_string str) { @@ -254,14 +252,12 @@ void QTextEncoder_Delete(QTextEncoder* self, bool isSubclass) { } } -void QTextDecoder_new(QTextCodec* codec, QTextDecoder** outptr_QTextDecoder) { - QTextDecoder* ret = new QTextDecoder(codec); - *outptr_QTextDecoder = ret; +QTextDecoder* QTextDecoder_new(QTextCodec* codec) { + return new QTextDecoder(codec); } -void QTextDecoder_new2(QTextCodec* codec, int flags, QTextDecoder** outptr_QTextDecoder) { - QTextDecoder* ret = new QTextDecoder(codec, static_cast(flags)); - *outptr_QTextDecoder = ret; +QTextDecoder* QTextDecoder_new2(QTextCodec* codec, int flags) { + return new QTextDecoder(codec, static_cast(flags)); } struct miqt_string QTextDecoder_ToUnicode(QTextDecoder* self, const char* chars, int lenVal) { @@ -303,14 +299,12 @@ void QTextDecoder_Delete(QTextDecoder* self, bool isSubclass) { } } -void QTextCodec__ConverterState_new(QTextCodec__ConverterState** outptr_QTextCodec__ConverterState) { - QTextCodec::ConverterState* ret = new QTextCodec::ConverterState(); - *outptr_QTextCodec__ConverterState = ret; +QTextCodec__ConverterState* QTextCodec__ConverterState_new() { + return new QTextCodec::ConverterState(); } -void QTextCodec__ConverterState_new2(int f, QTextCodec__ConverterState** outptr_QTextCodec__ConverterState) { - QTextCodec::ConverterState* ret = new QTextCodec::ConverterState(static_cast(f)); - *outptr_QTextCodec__ConverterState = ret; +QTextCodec__ConverterState* QTextCodec__ConverterState_new2(int f) { + return new QTextCodec::ConverterState(static_cast(f)); } void QTextCodec__ConverterState_Delete(QTextCodec__ConverterState* self, bool isSubclass) { diff --git a/qt/gen_qtextcodec.go b/qt/gen_qtextcodec.go index cd840222..8272d202 100644 --- a/qt/gen_qtextcodec.go +++ b/qt/gen_qtextcodec.go @@ -46,16 +46,13 @@ func newQTextCodec(h *C.QTextCodec) *QTextCodec { if h == nil { return nil } + return &QTextCodec{h: h} } // UnsafeNewQTextCodec constructs the type using only unsafe pointers. func UnsafeNewQTextCodec(h unsafe.Pointer) *QTextCodec { - if h == nil { - return nil - } - - return &QTextCodec{h: (*C.QTextCodec)(h)} + return newQTextCodec((*C.QTextCodec)(h)) } func QTextCodec_CodecForName(name []byte) *QTextCodec { @@ -272,34 +269,27 @@ func newQTextEncoder(h *C.QTextEncoder) *QTextEncoder { if h == nil { return nil } + return &QTextEncoder{h: h} } // UnsafeNewQTextEncoder constructs the type using only unsafe pointers. func UnsafeNewQTextEncoder(h unsafe.Pointer) *QTextEncoder { - if h == nil { - return nil - } - - return &QTextEncoder{h: (*C.QTextEncoder)(h)} + return newQTextEncoder((*C.QTextEncoder)(h)) } // NewQTextEncoder constructs a new QTextEncoder object. func NewQTextEncoder(codec *QTextCodec) *QTextEncoder { - var outptr_QTextEncoder *C.QTextEncoder = nil - C.QTextEncoder_new(codec.cPointer(), &outptr_QTextEncoder) - ret := newQTextEncoder(outptr_QTextEncoder) + ret := newQTextEncoder(C.QTextEncoder_new(codec.cPointer())) ret.isSubclass = true return ret } // NewQTextEncoder2 constructs a new QTextEncoder object. func NewQTextEncoder2(codec *QTextCodec, flags QTextCodec__ConversionFlag) *QTextEncoder { - var outptr_QTextEncoder *C.QTextEncoder = nil - C.QTextEncoder_new2(codec.cPointer(), (C.int)(flags), &outptr_QTextEncoder) - ret := newQTextEncoder(outptr_QTextEncoder) + ret := newQTextEncoder(C.QTextEncoder_new2(codec.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -364,34 +354,27 @@ func newQTextDecoder(h *C.QTextDecoder) *QTextDecoder { if h == nil { return nil } + return &QTextDecoder{h: h} } // UnsafeNewQTextDecoder constructs the type using only unsafe pointers. func UnsafeNewQTextDecoder(h unsafe.Pointer) *QTextDecoder { - if h == nil { - return nil - } - - return &QTextDecoder{h: (*C.QTextDecoder)(h)} + return newQTextDecoder((*C.QTextDecoder)(h)) } // NewQTextDecoder constructs a new QTextDecoder object. func NewQTextDecoder(codec *QTextCodec) *QTextDecoder { - var outptr_QTextDecoder *C.QTextDecoder = nil - C.QTextDecoder_new(codec.cPointer(), &outptr_QTextDecoder) - ret := newQTextDecoder(outptr_QTextDecoder) + ret := newQTextDecoder(C.QTextDecoder_new(codec.cPointer())) ret.isSubclass = true return ret } // NewQTextDecoder2 constructs a new QTextDecoder object. func NewQTextDecoder2(codec *QTextCodec, flags QTextCodec__ConversionFlag) *QTextDecoder { - var outptr_QTextDecoder *C.QTextDecoder = nil - C.QTextDecoder_new2(codec.cPointer(), (C.int)(flags), &outptr_QTextDecoder) - ret := newQTextDecoder(outptr_QTextDecoder) + ret := newQTextDecoder(C.QTextDecoder_new2(codec.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -461,34 +444,27 @@ func newQTextCodec__ConverterState(h *C.QTextCodec__ConverterState) *QTextCodec_ if h == nil { return nil } + return &QTextCodec__ConverterState{h: h} } // UnsafeNewQTextCodec__ConverterState constructs the type using only unsafe pointers. func UnsafeNewQTextCodec__ConverterState(h unsafe.Pointer) *QTextCodec__ConverterState { - if h == nil { - return nil - } - - return &QTextCodec__ConverterState{h: (*C.QTextCodec__ConverterState)(h)} + return newQTextCodec__ConverterState((*C.QTextCodec__ConverterState)(h)) } // NewQTextCodec__ConverterState constructs a new QTextCodec::ConverterState object. func NewQTextCodec__ConverterState() *QTextCodec__ConverterState { - var outptr_QTextCodec__ConverterState *C.QTextCodec__ConverterState = nil - C.QTextCodec__ConverterState_new(&outptr_QTextCodec__ConverterState) - ret := newQTextCodec__ConverterState(outptr_QTextCodec__ConverterState) + ret := newQTextCodec__ConverterState(C.QTextCodec__ConverterState_new()) ret.isSubclass = true return ret } // NewQTextCodec__ConverterState2 constructs a new QTextCodec::ConverterState object. func NewQTextCodec__ConverterState2(f QTextCodec__ConversionFlag) *QTextCodec__ConverterState { - var outptr_QTextCodec__ConverterState *C.QTextCodec__ConverterState = nil - C.QTextCodec__ConverterState_new2((C.int)(f), &outptr_QTextCodec__ConverterState) - ret := newQTextCodec__ConverterState(outptr_QTextCodec__ConverterState) + ret := newQTextCodec__ConverterState(C.QTextCodec__ConverterState_new2((C.int)(f))) ret.isSubclass = true return ret } diff --git a/qt/gen_qtextcodec.h b/qt/gen_qtextcodec.h index ed18cac4..543a8d20 100644 --- a/qt/gen_qtextcodec.h +++ b/qt/gen_qtextcodec.h @@ -62,23 +62,23 @@ struct miqt_string QTextCodec_FromUnicode3(const QTextCodec* self, QChar* in, in QTextDecoder* QTextCodec_MakeDecoder1(const QTextCodec* self, int flags); QTextEncoder* QTextCodec_MakeEncoder1(const QTextCodec* self, int flags); -void QTextEncoder_new(QTextCodec* codec, QTextEncoder** outptr_QTextEncoder); -void QTextEncoder_new2(QTextCodec* codec, int flags, QTextEncoder** outptr_QTextEncoder); +QTextEncoder* QTextEncoder_new(QTextCodec* codec); +QTextEncoder* QTextEncoder_new2(QTextCodec* codec, int flags); struct miqt_string QTextEncoder_FromUnicode(QTextEncoder* self, struct miqt_string str); struct miqt_string QTextEncoder_FromUnicode2(QTextEncoder* self, QChar* uc, int lenVal); bool QTextEncoder_HasFailure(const QTextEncoder* self); void QTextEncoder_Delete(QTextEncoder* self, bool isSubclass); -void QTextDecoder_new(QTextCodec* codec, QTextDecoder** outptr_QTextDecoder); -void QTextDecoder_new2(QTextCodec* codec, int flags, QTextDecoder** outptr_QTextDecoder); +QTextDecoder* QTextDecoder_new(QTextCodec* codec); +QTextDecoder* QTextDecoder_new2(QTextCodec* codec, int flags); struct miqt_string QTextDecoder_ToUnicode(QTextDecoder* self, const char* chars, int lenVal); struct miqt_string QTextDecoder_ToUnicodeWithBa(QTextDecoder* self, struct miqt_string ba); bool QTextDecoder_HasFailure(const QTextDecoder* self); bool QTextDecoder_NeedsMoreData(const QTextDecoder* self); void QTextDecoder_Delete(QTextDecoder* self, bool isSubclass); -void QTextCodec__ConverterState_new(QTextCodec__ConverterState** outptr_QTextCodec__ConverterState); -void QTextCodec__ConverterState_new2(int f, QTextCodec__ConverterState** outptr_QTextCodec__ConverterState); +QTextCodec__ConverterState* QTextCodec__ConverterState_new(); +QTextCodec__ConverterState* QTextCodec__ConverterState_new2(int f); void QTextCodec__ConverterState_Delete(QTextCodec__ConverterState* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qtextcursor.cpp b/qt/gen_qtextcursor.cpp index 74e32ce2..db1b6879 100644 --- a/qt/gen_qtextcursor.cpp +++ b/qt/gen_qtextcursor.cpp @@ -19,29 +19,24 @@ #include "gen_qtextcursor.h" #include "_cgo_export.h" -void QTextCursor_new(QTextCursor** outptr_QTextCursor) { - QTextCursor* ret = new QTextCursor(); - *outptr_QTextCursor = ret; +QTextCursor* QTextCursor_new() { + return new QTextCursor(); } -void QTextCursor_new2(QTextDocument* document, QTextCursor** outptr_QTextCursor) { - QTextCursor* ret = new QTextCursor(document); - *outptr_QTextCursor = ret; +QTextCursor* QTextCursor_new2(QTextDocument* document) { + return new QTextCursor(document); } -void QTextCursor_new3(QTextFrame* frame, QTextCursor** outptr_QTextCursor) { - QTextCursor* ret = new QTextCursor(frame); - *outptr_QTextCursor = ret; +QTextCursor* QTextCursor_new3(QTextFrame* frame) { + return new QTextCursor(frame); } -void QTextCursor_new4(QTextBlock* block, QTextCursor** outptr_QTextCursor) { - QTextCursor* ret = new QTextCursor(*block); - *outptr_QTextCursor = ret; +QTextCursor* QTextCursor_new4(QTextBlock* block) { + return new QTextCursor(*block); } -void QTextCursor_new5(QTextCursor* cursor, QTextCursor** outptr_QTextCursor) { - QTextCursor* ret = new QTextCursor(*cursor); - *outptr_QTextCursor = ret; +QTextCursor* QTextCursor_new5(QTextCursor* cursor) { + return new QTextCursor(*cursor); } void QTextCursor_OperatorAssign(QTextCursor* self, QTextCursor* other) { diff --git a/qt/gen_qtextcursor.go b/qt/gen_qtextcursor.go index a5d568bc..ecc39ddf 100644 --- a/qt/gen_qtextcursor.go +++ b/qt/gen_qtextcursor.go @@ -83,64 +83,51 @@ func newQTextCursor(h *C.QTextCursor) *QTextCursor { if h == nil { return nil } + return &QTextCursor{h: h} } // UnsafeNewQTextCursor constructs the type using only unsafe pointers. func UnsafeNewQTextCursor(h unsafe.Pointer) *QTextCursor { - if h == nil { - return nil - } - - return &QTextCursor{h: (*C.QTextCursor)(h)} + return newQTextCursor((*C.QTextCursor)(h)) } // NewQTextCursor constructs a new QTextCursor object. func NewQTextCursor() *QTextCursor { - var outptr_QTextCursor *C.QTextCursor = nil - C.QTextCursor_new(&outptr_QTextCursor) - ret := newQTextCursor(outptr_QTextCursor) + ret := newQTextCursor(C.QTextCursor_new()) ret.isSubclass = true return ret } // NewQTextCursor2 constructs a new QTextCursor object. func NewQTextCursor2(document *QTextDocument) *QTextCursor { - var outptr_QTextCursor *C.QTextCursor = nil - C.QTextCursor_new2(document.cPointer(), &outptr_QTextCursor) - ret := newQTextCursor(outptr_QTextCursor) + ret := newQTextCursor(C.QTextCursor_new2(document.cPointer())) ret.isSubclass = true return ret } // NewQTextCursor3 constructs a new QTextCursor object. func NewQTextCursor3(frame *QTextFrame) *QTextCursor { - var outptr_QTextCursor *C.QTextCursor = nil - C.QTextCursor_new3(frame.cPointer(), &outptr_QTextCursor) - ret := newQTextCursor(outptr_QTextCursor) + ret := newQTextCursor(C.QTextCursor_new3(frame.cPointer())) ret.isSubclass = true return ret } // NewQTextCursor4 constructs a new QTextCursor object. func NewQTextCursor4(block *QTextBlock) *QTextCursor { - var outptr_QTextCursor *C.QTextCursor = nil - C.QTextCursor_new4(block.cPointer(), &outptr_QTextCursor) - ret := newQTextCursor(outptr_QTextCursor) + ret := newQTextCursor(C.QTextCursor_new4(block.cPointer())) ret.isSubclass = true return ret } // NewQTextCursor5 constructs a new QTextCursor object. func NewQTextCursor5(cursor *QTextCursor) *QTextCursor { - var outptr_QTextCursor *C.QTextCursor = nil - C.QTextCursor_new5(cursor.cPointer(), &outptr_QTextCursor) - ret := newQTextCursor(outptr_QTextCursor) + ret := newQTextCursor(C.QTextCursor_new5(cursor.cPointer())) ret.isSubclass = true return ret } @@ -277,7 +264,7 @@ func (this *QTextCursor) Block() *QTextBlock { } func (this *QTextCursor) CharFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QTextCursor_CharFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QTextCursor_CharFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -291,7 +278,7 @@ func (this *QTextCursor) MergeCharFormat(modifier *QTextCharFormat) { } func (this *QTextCursor) BlockFormat() *QTextBlockFormat { - _goptr := newQTextBlockFormat(C.QTextCursor_BlockFormat(this.h), nil) + _goptr := newQTextBlockFormat(C.QTextCursor_BlockFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -305,7 +292,7 @@ func (this *QTextCursor) MergeBlockFormat(modifier *QTextBlockFormat) { } func (this *QTextCursor) BlockCharFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QTextCursor_BlockCharFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QTextCursor_BlockCharFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -347,43 +334,43 @@ func (this *QTextCursor) InsertBlock2(format *QTextBlockFormat, charFormat *QTex } func (this *QTextCursor) InsertList(format *QTextListFormat) *QTextList { - return newQTextList(C.QTextCursor_InsertList(this.h, format.cPointer()), nil, nil, nil) + return newQTextList(C.QTextCursor_InsertList(this.h, format.cPointer())) } func (this *QTextCursor) InsertListWithStyle(style QTextListFormat__Style) *QTextList { - return newQTextList(C.QTextCursor_InsertListWithStyle(this.h, (C.int)(style)), nil, nil, nil) + return newQTextList(C.QTextCursor_InsertListWithStyle(this.h, (C.int)(style))) } func (this *QTextCursor) CreateList(format *QTextListFormat) *QTextList { - return newQTextList(C.QTextCursor_CreateList(this.h, format.cPointer()), nil, nil, nil) + return newQTextList(C.QTextCursor_CreateList(this.h, format.cPointer())) } func (this *QTextCursor) CreateListWithStyle(style QTextListFormat__Style) *QTextList { - return newQTextList(C.QTextCursor_CreateListWithStyle(this.h, (C.int)(style)), nil, nil, nil) + return newQTextList(C.QTextCursor_CreateListWithStyle(this.h, (C.int)(style))) } func (this *QTextCursor) CurrentList() *QTextList { - return newQTextList(C.QTextCursor_CurrentList(this.h), nil, nil, nil) + return newQTextList(C.QTextCursor_CurrentList(this.h)) } func (this *QTextCursor) InsertTable(rows int, cols int, format *QTextTableFormat) *QTextTable { - return newQTextTable(C.QTextCursor_InsertTable(this.h, (C.int)(rows), (C.int)(cols), format.cPointer()), nil, nil, nil) + return newQTextTable(C.QTextCursor_InsertTable(this.h, (C.int)(rows), (C.int)(cols), format.cPointer())) } func (this *QTextCursor) InsertTable2(rows int, cols int) *QTextTable { - return newQTextTable(C.QTextCursor_InsertTable2(this.h, (C.int)(rows), (C.int)(cols)), nil, nil, nil) + return newQTextTable(C.QTextCursor_InsertTable2(this.h, (C.int)(rows), (C.int)(cols))) } func (this *QTextCursor) CurrentTable() *QTextTable { - return newQTextTable(C.QTextCursor_CurrentTable(this.h), nil, nil, nil) + return newQTextTable(C.QTextCursor_CurrentTable(this.h)) } func (this *QTextCursor) InsertFrame(format *QTextFrameFormat) *QTextFrame { - return newQTextFrame(C.QTextCursor_InsertFrame(this.h, format.cPointer()), nil, nil) + return newQTextFrame(C.QTextCursor_InsertFrame(this.h, format.cPointer())) } func (this *QTextCursor) CurrentFrame() *QTextFrame { - return newQTextFrame(C.QTextCursor_CurrentFrame(this.h), nil, nil) + return newQTextFrame(C.QTextCursor_CurrentFrame(this.h)) } func (this *QTextCursor) InsertFragment(fragment *QTextDocumentFragment) { @@ -467,7 +454,7 @@ func (this *QTextCursor) ColumnNumber() int { } func (this *QTextCursor) Document() *QTextDocument { - return newQTextDocument(C.QTextCursor_Document(this.h), nil) + return newQTextDocument(C.QTextCursor_Document(this.h)) } func (this *QTextCursor) SetPosition2(pos int, mode QTextCursor__MoveMode) { diff --git a/qt/gen_qtextcursor.h b/qt/gen_qtextcursor.h index 1a12dc5e..e32199e3 100644 --- a/qt/gen_qtextcursor.h +++ b/qt/gen_qtextcursor.h @@ -46,11 +46,11 @@ typedef struct QTextTable QTextTable; typedef struct QTextTableFormat QTextTableFormat; #endif -void QTextCursor_new(QTextCursor** outptr_QTextCursor); -void QTextCursor_new2(QTextDocument* document, QTextCursor** outptr_QTextCursor); -void QTextCursor_new3(QTextFrame* frame, QTextCursor** outptr_QTextCursor); -void QTextCursor_new4(QTextBlock* block, QTextCursor** outptr_QTextCursor); -void QTextCursor_new5(QTextCursor* cursor, QTextCursor** outptr_QTextCursor); +QTextCursor* QTextCursor_new(); +QTextCursor* QTextCursor_new2(QTextDocument* document); +QTextCursor* QTextCursor_new3(QTextFrame* frame); +QTextCursor* QTextCursor_new4(QTextBlock* block); +QTextCursor* QTextCursor_new5(QTextCursor* cursor); void QTextCursor_OperatorAssign(QTextCursor* self, QTextCursor* other); void QTextCursor_Swap(QTextCursor* self, QTextCursor* other); bool QTextCursor_IsNull(const QTextCursor* self); diff --git a/qt/gen_qtextdocument.cpp b/qt/gen_qtextdocument.cpp index 9f02b8ed..628c5a1e 100644 --- a/qt/gen_qtextdocument.cpp +++ b/qt/gen_qtextdocument.cpp @@ -309,30 +309,26 @@ public: }; -void QTextDocument_new(QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { - MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(); - *outptr_QTextDocument = ret; - *outptr_QObject = static_cast(ret); +QTextDocument* QTextDocument_new() { + return new MiqtVirtualQTextDocument(); } -void QTextDocument_new2(struct miqt_string text, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { +QTextDocument* QTextDocument_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(text_QString); - *outptr_QTextDocument = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQTextDocument(text_QString); } -void QTextDocument_new3(QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { - MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(parent); - *outptr_QTextDocument = ret; - *outptr_QObject = static_cast(ret); +QTextDocument* QTextDocument_new3(QObject* parent) { + return new MiqtVirtualQTextDocument(parent); } -void QTextDocument_new4(struct miqt_string text, QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { +QTextDocument* QTextDocument_new4(struct miqt_string text, QObject* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(text_QString, parent); - *outptr_QTextDocument = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQTextDocument(text_QString, parent); +} + +void QTextDocument_virtbase(QTextDocument* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QTextDocument_MetaObject(const QTextDocument* self) { diff --git a/qt/gen_qtextdocument.go b/qt/gen_qtextdocument.go index 61ae7249..1ad5b619 100644 --- a/qt/gen_qtextdocument.go +++ b/qt/gen_qtextdocument.go @@ -80,16 +80,13 @@ func newQAbstractUndoItem(h *C.QAbstractUndoItem) *QAbstractUndoItem { if h == nil { return nil } + return &QAbstractUndoItem{h: h} } // UnsafeNewQAbstractUndoItem constructs the type using only unsafe pointers. func UnsafeNewQAbstractUndoItem(h unsafe.Pointer) *QAbstractUndoItem { - if h == nil { - return nil - } - - return &QAbstractUndoItem{h: (*C.QAbstractUndoItem)(h)} + return newQAbstractUndoItem((*C.QAbstractUndoItem)(h)) } func (this *QAbstractUndoItem) Undo() { @@ -139,31 +136,26 @@ func (this *QTextDocument) UnsafePointer() unsafe.Pointer { } // newQTextDocument constructs the type using only CGO pointers. -func newQTextDocument(h *C.QTextDocument, h_QObject *C.QObject) *QTextDocument { +func newQTextDocument(h *C.QTextDocument) *QTextDocument { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QTextDocument_virtbase(h, &outptr_QObject) + return &QTextDocument{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQTextDocument constructs the type using only unsafe pointers. -func UnsafeNewQTextDocument(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTextDocument { - if h == nil { - return nil - } - - return &QTextDocument{h: (*C.QTextDocument)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQTextDocument(h unsafe.Pointer) *QTextDocument { + return newQTextDocument((*C.QTextDocument)(h)) } // NewQTextDocument constructs a new QTextDocument object. func NewQTextDocument() *QTextDocument { - var outptr_QTextDocument *C.QTextDocument = nil - var outptr_QObject *C.QObject = nil - C.QTextDocument_new(&outptr_QTextDocument, &outptr_QObject) - ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret := newQTextDocument(C.QTextDocument_new()) ret.isSubclass = true return ret } @@ -174,22 +166,16 @@ func NewQTextDocument2(text string) *QTextDocument { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTextDocument *C.QTextDocument = nil - var outptr_QObject *C.QObject = nil - C.QTextDocument_new2(text_ms, &outptr_QTextDocument, &outptr_QObject) - ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret := newQTextDocument(C.QTextDocument_new2(text_ms)) ret.isSubclass = true return ret } // NewQTextDocument3 constructs a new QTextDocument object. func NewQTextDocument3(parent *QObject) *QTextDocument { - var outptr_QTextDocument *C.QTextDocument = nil - var outptr_QObject *C.QObject = nil - C.QTextDocument_new3(parent.cPointer(), &outptr_QTextDocument, &outptr_QObject) - ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret := newQTextDocument(C.QTextDocument_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -200,11 +186,8 @@ func NewQTextDocument4(text string, parent *QObject) *QTextDocument { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTextDocument *C.QTextDocument = nil - var outptr_QObject *C.QObject = nil - C.QTextDocument_new4(text_ms, parent.cPointer(), &outptr_QTextDocument, &outptr_QObject) - ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret := newQTextDocument(C.QTextDocument_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -238,7 +221,7 @@ func QTextDocument_TrUtf8(s string) string { } func (this *QTextDocument) Clone() *QTextDocument { - return newQTextDocument(C.QTextDocument_Clone(this.h), nil) + return newQTextDocument(C.QTextDocument_Clone(this.h)) } func (this *QTextDocument) IsEmpty() bool { @@ -282,7 +265,7 @@ func (this *QTextDocument) SetDocumentLayout(layout *QAbstractTextDocumentLayout } func (this *QTextDocument) DocumentLayout() *QAbstractTextDocumentLayout { - return newQAbstractTextDocumentLayout(C.QTextDocument_DocumentLayout(this.h), nil) + return newQAbstractTextDocumentLayout(C.QTextDocument_DocumentLayout(this.h)) } func (this *QTextDocument) SetMetaInformation(info QTextDocument__MetaInformation, param2 string) { @@ -403,19 +386,19 @@ func (this *QTextDocument) Find5(expr *QRegularExpression, cursor *QTextCursor) } func (this *QTextDocument) FrameAt(pos int) *QTextFrame { - return newQTextFrame(C.QTextDocument_FrameAt(this.h, (C.int)(pos)), nil, nil) + return newQTextFrame(C.QTextDocument_FrameAt(this.h, (C.int)(pos))) } func (this *QTextDocument) RootFrame() *QTextFrame { - return newQTextFrame(C.QTextDocument_RootFrame(this.h), nil, nil) + return newQTextFrame(C.QTextDocument_RootFrame(this.h)) } func (this *QTextDocument) Object(objectIndex int) *QTextObject { - return newQTextObject(C.QTextDocument_Object(this.h, (C.int)(objectIndex)), nil) + return newQTextObject(C.QTextDocument_Object(this.h, (C.int)(objectIndex))) } func (this *QTextDocument) ObjectForFormat(param1 *QTextFormat) *QTextObject { - return newQTextObject(C.QTextDocument_ObjectForFormat(this.h, param1.cPointer()), nil) + return newQTextObject(C.QTextDocument_ObjectForFormat(this.h, param1.cPointer())) } func (this *QTextDocument) FindBlock(pos int) *QTextBlock { @@ -899,7 +882,7 @@ func QTextDocument_TrUtf83(s string, c string, n int) string { } func (this *QTextDocument) Clone1(parent *QObject) *QTextDocument { - return newQTextDocument(C.QTextDocument_Clone1(this.h, parent.cPointer()), nil) + return newQTextDocument(C.QTextDocument_Clone1(this.h, parent.cPointer())) } func (this *QTextDocument) ToHtml1(encoding []byte) string { @@ -1030,7 +1013,7 @@ func miqt_exec_callback_QTextDocument_Clear(self *C.QTextDocument, cb C.intptr_t func (this *QTextDocument) callVirtualBase_CreateObject(f *QTextFormat) *QTextObject { - return newQTextObject(C.QTextDocument_virtualbase_CreateObject(unsafe.Pointer(this.h), f.cPointer()), nil) + return newQTextObject(C.QTextDocument_virtualbase_CreateObject(unsafe.Pointer(this.h), f.cPointer())) } func (this *QTextDocument) OnCreateObject(slot func(super func(f *QTextFormat) *QTextObject, f *QTextFormat) *QTextObject) { @@ -1166,7 +1149,7 @@ func miqt_exec_callback_QTextDocument_TimerEvent(self *C.QTextDocument, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTextDocument{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1192,7 +1175,7 @@ func miqt_exec_callback_QTextDocument_ChildEvent(self *C.QTextDocument, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QTextDocument{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qtextdocument.h b/qt/gen_qtextdocument.h index 5db0600b..b2c9bd7d 100644 --- a/qt/gen_qtextdocument.h +++ b/qt/gen_qtextdocument.h @@ -73,10 +73,11 @@ void QAbstractUndoItem_Redo(QAbstractUndoItem* self); void QAbstractUndoItem_OperatorAssign(QAbstractUndoItem* self, QAbstractUndoItem* param1); void QAbstractUndoItem_Delete(QAbstractUndoItem* self, bool isSubclass); -void QTextDocument_new(QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); -void QTextDocument_new2(struct miqt_string text, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); -void QTextDocument_new3(QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); -void QTextDocument_new4(struct miqt_string text, QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); +QTextDocument* QTextDocument_new(); +QTextDocument* QTextDocument_new2(struct miqt_string text); +QTextDocument* QTextDocument_new3(QObject* parent); +QTextDocument* QTextDocument_new4(struct miqt_string text, QObject* parent); +void QTextDocument_virtbase(QTextDocument* src, QObject** outptr_QObject); QMetaObject* QTextDocument_MetaObject(const QTextDocument* self); void* QTextDocument_Metacast(QTextDocument* self, const char* param1); struct miqt_string QTextDocument_Tr(const char* s); diff --git a/qt/gen_qtextdocumentfragment.cpp b/qt/gen_qtextdocumentfragment.cpp index be2d95d2..9c923f5c 100644 --- a/qt/gen_qtextdocumentfragment.cpp +++ b/qt/gen_qtextdocumentfragment.cpp @@ -9,24 +9,20 @@ #include "gen_qtextdocumentfragment.h" #include "_cgo_export.h" -void QTextDocumentFragment_new(QTextDocumentFragment** outptr_QTextDocumentFragment) { - QTextDocumentFragment* ret = new QTextDocumentFragment(); - *outptr_QTextDocumentFragment = ret; +QTextDocumentFragment* QTextDocumentFragment_new() { + return new QTextDocumentFragment(); } -void QTextDocumentFragment_new2(QTextDocument* document, QTextDocumentFragment** outptr_QTextDocumentFragment) { - QTextDocumentFragment* ret = new QTextDocumentFragment(document); - *outptr_QTextDocumentFragment = ret; +QTextDocumentFragment* QTextDocumentFragment_new2(QTextDocument* document) { + return new QTextDocumentFragment(document); } -void QTextDocumentFragment_new3(QTextCursor* rangeVal, QTextDocumentFragment** outptr_QTextDocumentFragment) { - QTextDocumentFragment* ret = new QTextDocumentFragment(*rangeVal); - *outptr_QTextDocumentFragment = ret; +QTextDocumentFragment* QTextDocumentFragment_new3(QTextCursor* rangeVal) { + return new QTextDocumentFragment(*rangeVal); } -void QTextDocumentFragment_new4(QTextDocumentFragment* rhs, QTextDocumentFragment** outptr_QTextDocumentFragment) { - QTextDocumentFragment* ret = new QTextDocumentFragment(*rhs); - *outptr_QTextDocumentFragment = ret; +QTextDocumentFragment* QTextDocumentFragment_new4(QTextDocumentFragment* rhs) { + return new QTextDocumentFragment(*rhs); } void QTextDocumentFragment_OperatorAssign(QTextDocumentFragment* self, QTextDocumentFragment* rhs) { diff --git a/qt/gen_qtextdocumentfragment.go b/qt/gen_qtextdocumentfragment.go index 5dd13798..db37b2ee 100644 --- a/qt/gen_qtextdocumentfragment.go +++ b/qt/gen_qtextdocumentfragment.go @@ -37,54 +37,43 @@ func newQTextDocumentFragment(h *C.QTextDocumentFragment) *QTextDocumentFragment if h == nil { return nil } + return &QTextDocumentFragment{h: h} } // UnsafeNewQTextDocumentFragment constructs the type using only unsafe pointers. func UnsafeNewQTextDocumentFragment(h unsafe.Pointer) *QTextDocumentFragment { - if h == nil { - return nil - } - - return &QTextDocumentFragment{h: (*C.QTextDocumentFragment)(h)} + return newQTextDocumentFragment((*C.QTextDocumentFragment)(h)) } // NewQTextDocumentFragment constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment() *QTextDocumentFragment { - var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil - C.QTextDocumentFragment_new(&outptr_QTextDocumentFragment) - ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(C.QTextDocumentFragment_new()) ret.isSubclass = true return ret } // NewQTextDocumentFragment2 constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment2(document *QTextDocument) *QTextDocumentFragment { - var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil - C.QTextDocumentFragment_new2(document.cPointer(), &outptr_QTextDocumentFragment) - ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(C.QTextDocumentFragment_new2(document.cPointer())) ret.isSubclass = true return ret } // NewQTextDocumentFragment3 constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment3(rangeVal *QTextCursor) *QTextDocumentFragment { - var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil - C.QTextDocumentFragment_new3(rangeVal.cPointer(), &outptr_QTextDocumentFragment) - ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(C.QTextDocumentFragment_new3(rangeVal.cPointer())) ret.isSubclass = true return ret } // NewQTextDocumentFragment4 constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment4(rhs *QTextDocumentFragment) *QTextDocumentFragment { - var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil - C.QTextDocumentFragment_new4(rhs.cPointer(), &outptr_QTextDocumentFragment) - ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(C.QTextDocumentFragment_new4(rhs.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qtextdocumentfragment.h b/qt/gen_qtextdocumentfragment.h index fc7d24d4..df87cc7a 100644 --- a/qt/gen_qtextdocumentfragment.h +++ b/qt/gen_qtextdocumentfragment.h @@ -24,10 +24,10 @@ typedef struct QTextDocument QTextDocument; typedef struct QTextDocumentFragment QTextDocumentFragment; #endif -void QTextDocumentFragment_new(QTextDocumentFragment** outptr_QTextDocumentFragment); -void QTextDocumentFragment_new2(QTextDocument* document, QTextDocumentFragment** outptr_QTextDocumentFragment); -void QTextDocumentFragment_new3(QTextCursor* rangeVal, QTextDocumentFragment** outptr_QTextDocumentFragment); -void QTextDocumentFragment_new4(QTextDocumentFragment* rhs, QTextDocumentFragment** outptr_QTextDocumentFragment); +QTextDocumentFragment* QTextDocumentFragment_new(); +QTextDocumentFragment* QTextDocumentFragment_new2(QTextDocument* document); +QTextDocumentFragment* QTextDocumentFragment_new3(QTextCursor* rangeVal); +QTextDocumentFragment* QTextDocumentFragment_new4(QTextDocumentFragment* rhs); void QTextDocumentFragment_OperatorAssign(QTextDocumentFragment* self, QTextDocumentFragment* rhs); bool QTextDocumentFragment_IsEmpty(const QTextDocumentFragment* self); struct miqt_string QTextDocumentFragment_ToPlainText(const QTextDocumentFragment* self); diff --git a/qt/gen_qtextdocumentwriter.cpp b/qt/gen_qtextdocumentwriter.cpp index 1fd6205e..3ff7b5bd 100644 --- a/qt/gen_qtextdocumentwriter.cpp +++ b/qt/gen_qtextdocumentwriter.cpp @@ -12,28 +12,24 @@ #include "gen_qtextdocumentwriter.h" #include "_cgo_export.h" -void QTextDocumentWriter_new(QTextDocumentWriter** outptr_QTextDocumentWriter) { - QTextDocumentWriter* ret = new QTextDocumentWriter(); - *outptr_QTextDocumentWriter = ret; +QTextDocumentWriter* QTextDocumentWriter_new() { + return new QTextDocumentWriter(); } -void QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter) { +QTextDocumentWriter* QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format) { QByteArray format_QByteArray(format.data, format.len); - QTextDocumentWriter* ret = new QTextDocumentWriter(device, format_QByteArray); - *outptr_QTextDocumentWriter = ret; + return new QTextDocumentWriter(device, format_QByteArray); } -void QTextDocumentWriter_new3(struct miqt_string fileName, QTextDocumentWriter** outptr_QTextDocumentWriter) { +QTextDocumentWriter* QTextDocumentWriter_new3(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QTextDocumentWriter* ret = new QTextDocumentWriter(fileName_QString); - *outptr_QTextDocumentWriter = ret; + return new QTextDocumentWriter(fileName_QString); } -void QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter) { +QTextDocumentWriter* QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - QTextDocumentWriter* ret = new QTextDocumentWriter(fileName_QString, format_QByteArray); - *outptr_QTextDocumentWriter = ret; + return new QTextDocumentWriter(fileName_QString, format_QByteArray); } void QTextDocumentWriter_SetFormat(QTextDocumentWriter* self, struct miqt_string format) { diff --git a/qt/gen_qtextdocumentwriter.go b/qt/gen_qtextdocumentwriter.go index 4f152321..67612d06 100644 --- a/qt/gen_qtextdocumentwriter.go +++ b/qt/gen_qtextdocumentwriter.go @@ -37,24 +37,19 @@ func newQTextDocumentWriter(h *C.QTextDocumentWriter) *QTextDocumentWriter { if h == nil { return nil } + return &QTextDocumentWriter{h: h} } // UnsafeNewQTextDocumentWriter constructs the type using only unsafe pointers. func UnsafeNewQTextDocumentWriter(h unsafe.Pointer) *QTextDocumentWriter { - if h == nil { - return nil - } - - return &QTextDocumentWriter{h: (*C.QTextDocumentWriter)(h)} + return newQTextDocumentWriter((*C.QTextDocumentWriter)(h)) } // NewQTextDocumentWriter constructs a new QTextDocumentWriter object. func NewQTextDocumentWriter() *QTextDocumentWriter { - var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil - C.QTextDocumentWriter_new(&outptr_QTextDocumentWriter) - ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(C.QTextDocumentWriter_new()) ret.isSubclass = true return ret } @@ -64,10 +59,8 @@ func NewQTextDocumentWriter2(device *QIODevice, format []byte) *QTextDocumentWri format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil - C.QTextDocumentWriter_new2(device.cPointer(), format_alias, &outptr_QTextDocumentWriter) - ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(C.QTextDocumentWriter_new2(device.cPointer(), format_alias)) ret.isSubclass = true return ret } @@ -78,10 +71,8 @@ func NewQTextDocumentWriter3(fileName string) *QTextDocumentWriter { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil - C.QTextDocumentWriter_new3(fileName_ms, &outptr_QTextDocumentWriter) - ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(C.QTextDocumentWriter_new3(fileName_ms)) ret.isSubclass = true return ret } @@ -95,10 +86,8 @@ func NewQTextDocumentWriter4(fileName string, format []byte) *QTextDocumentWrite format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil - C.QTextDocumentWriter_new4(fileName_ms, format_alias, &outptr_QTextDocumentWriter) - ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(C.QTextDocumentWriter_new4(fileName_ms, format_alias)) ret.isSubclass = true return ret } @@ -122,7 +111,7 @@ func (this *QTextDocumentWriter) SetDevice(device *QIODevice) { } func (this *QTextDocumentWriter) Device() *QIODevice { - return newQIODevice(C.QTextDocumentWriter_Device(this.h), nil) + return newQIODevice(C.QTextDocumentWriter_Device(this.h)) } func (this *QTextDocumentWriter) SetFileName(fileName string) { diff --git a/qt/gen_qtextdocumentwriter.h b/qt/gen_qtextdocumentwriter.h index f0406ced..7e5ac8b6 100644 --- a/qt/gen_qtextdocumentwriter.h +++ b/qt/gen_qtextdocumentwriter.h @@ -28,10 +28,10 @@ typedef struct QTextDocumentFragment QTextDocumentFragment; typedef struct QTextDocumentWriter QTextDocumentWriter; #endif -void QTextDocumentWriter_new(QTextDocumentWriter** outptr_QTextDocumentWriter); -void QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter); -void QTextDocumentWriter_new3(struct miqt_string fileName, QTextDocumentWriter** outptr_QTextDocumentWriter); -void QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter); +QTextDocumentWriter* QTextDocumentWriter_new(); +QTextDocumentWriter* QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format); +QTextDocumentWriter* QTextDocumentWriter_new3(struct miqt_string fileName); +QTextDocumentWriter* QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format); void QTextDocumentWriter_SetFormat(QTextDocumentWriter* self, struct miqt_string format); struct miqt_string QTextDocumentWriter_Format(const QTextDocumentWriter* self); void QTextDocumentWriter_SetDevice(QTextDocumentWriter* self, QIODevice* device); diff --git a/qt/gen_qtextedit.cpp b/qt/gen_qtextedit.cpp index 24c6a07e..b6b5639c 100644 --- a/qt/gen_qtextedit.cpp +++ b/qt/gen_qtextedit.cpp @@ -889,46 +889,26 @@ public: }; -void QTextEdit_new(QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(parent); - *outptr_QTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTextEdit* QTextEdit_new(QWidget* parent) { + return new MiqtVirtualQTextEdit(parent); } -void QTextEdit_new2(QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(); - *outptr_QTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTextEdit* QTextEdit_new2() { + return new MiqtVirtualQTextEdit(); } -void QTextEdit_new3(struct miqt_string text, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QTextEdit* QTextEdit_new3(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(text_QString); - *outptr_QTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQTextEdit(text_QString); } -void QTextEdit_new4(struct miqt_string text, QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QTextEdit* QTextEdit_new4(struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(text_QString, parent); - *outptr_QTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQTextEdit(text_QString, parent); +} + +void QTextEdit_virtbase(QTextEdit* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); } QMetaObject* QTextEdit_MetaObject(const QTextEdit* self) { @@ -1860,9 +1840,8 @@ void QTextEdit_Delete(QTextEdit* self, bool isSubclass) { } } -void QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1, QTextEdit__ExtraSelection** outptr_QTextEdit__ExtraSelection) { - QTextEdit::ExtraSelection* ret = new QTextEdit::ExtraSelection(*param1); - *outptr_QTextEdit__ExtraSelection = ret; +QTextEdit__ExtraSelection* QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1) { + return new QTextEdit::ExtraSelection(*param1); } void QTextEdit__ExtraSelection_OperatorAssign(QTextEdit__ExtraSelection* self, QTextEdit__ExtraSelection* param1) { diff --git a/qt/gen_qtextedit.go b/qt/gen_qtextedit.go index 9996d907..a8268a2c 100644 --- a/qt/gen_qtextedit.go +++ b/qt/gen_qtextedit.go @@ -52,50 +52,34 @@ func (this *QTextEdit) UnsafePointer() unsafe.Pointer { } // newQTextEdit constructs the type using only CGO pointers. -func newQTextEdit(h *C.QTextEdit, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTextEdit { +func newQTextEdit(h *C.QTextEdit) *QTextEdit { if h == nil { return nil } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QTextEdit_virtbase(h, &outptr_QAbstractScrollArea) + return &QTextEdit{h: h, - QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractScrollArea: newQAbstractScrollArea(outptr_QAbstractScrollArea)} } // UnsafeNewQTextEdit constructs the type using only unsafe pointers. -func UnsafeNewQTextEdit(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTextEdit { - if h == nil { - return nil - } - - return &QTextEdit{h: (*C.QTextEdit)(h), - QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTextEdit(h unsafe.Pointer) *QTextEdit { + return newQTextEdit((*C.QTextEdit)(h)) } // NewQTextEdit constructs a new QTextEdit object. func NewQTextEdit(parent *QWidget) *QTextEdit { - var outptr_QTextEdit *C.QTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTextEdit_new(parent.cPointer(), &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTextEdit(C.QTextEdit_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTextEdit2 constructs a new QTextEdit object. func NewQTextEdit2() *QTextEdit { - var outptr_QTextEdit *C.QTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTextEdit_new2(&outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTextEdit(C.QTextEdit_new2()) ret.isSubclass = true return ret } @@ -106,15 +90,8 @@ func NewQTextEdit3(text string) *QTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTextEdit *C.QTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTextEdit_new3(text_ms, &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTextEdit(C.QTextEdit_new3(text_ms)) ret.isSubclass = true return ret } @@ -125,15 +102,8 @@ func NewQTextEdit4(text string, parent *QWidget) *QTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTextEdit *C.QTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTextEdit_new4(text_ms, parent.cPointer(), &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTextEdit(C.QTextEdit_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -171,7 +141,7 @@ func (this *QTextEdit) SetDocument(document *QTextDocument) { } func (this *QTextEdit) Document() *QTextDocument { - return newQTextDocument(C.QTextEdit_Document(this.h), nil) + return newQTextDocument(C.QTextEdit_Document(this.h)) } func (this *QTextEdit) SetPlaceholderText(placeholderText string) { @@ -269,7 +239,7 @@ func (this *QTextEdit) SetCurrentCharFormat(format *QTextCharFormat) { } func (this *QTextEdit) CurrentCharFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QTextEdit_CurrentCharFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QTextEdit_CurrentCharFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -385,11 +355,11 @@ func (this *QTextEdit) LoadResource(typeVal int, name *QUrl) *QVariant { } func (this *QTextEdit) CreateStandardContextMenu() *QMenu { - return newQMenu(C.QTextEdit_CreateStandardContextMenu(this.h), nil, nil, nil) + return newQMenu(C.QTextEdit_CreateStandardContextMenu(this.h)) } func (this *QTextEdit) CreateStandardContextMenuWithPosition(position *QPoint) *QMenu { - return newQMenu(C.QTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer()), nil, nil, nil) + return newQMenu(C.QTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer())) } func (this *QTextEdit) CursorForPosition(pos *QPoint) *QTextCursor { @@ -715,7 +685,7 @@ func miqt_exec_callback_QTextEdit_CurrentCharFormatChanged(cb C.intptr_t, format } // Convert all CABI parameters to Go parameters - slotval1 := newQTextCharFormat(format, nil) + slotval1 := newQTextCharFormat(format) gofunc(slotval1) } @@ -963,7 +933,7 @@ func miqt_exec_callback_QTextEdit_TimerEvent(self *C.QTextEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -989,7 +959,7 @@ func miqt_exec_callback_QTextEdit_KeyPressEvent(self *C.QTextEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1015,7 +985,7 @@ func miqt_exec_callback_QTextEdit_KeyReleaseEvent(self *C.QTextEdit, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1041,7 +1011,7 @@ func miqt_exec_callback_QTextEdit_ResizeEvent(self *C.QTextEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1067,7 +1037,7 @@ func miqt_exec_callback_QTextEdit_PaintEvent(self *C.QTextEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1093,7 +1063,7 @@ func miqt_exec_callback_QTextEdit_MousePressEvent(self *C.QTextEdit, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1119,7 +1089,7 @@ func miqt_exec_callback_QTextEdit_MouseMoveEvent(self *C.QTextEdit, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1145,7 +1115,7 @@ func miqt_exec_callback_QTextEdit_MouseReleaseEvent(self *C.QTextEdit, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1171,7 +1141,7 @@ func miqt_exec_callback_QTextEdit_MouseDoubleClickEvent(self *C.QTextEdit, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1225,7 +1195,7 @@ func miqt_exec_callback_QTextEdit_ContextMenuEvent(self *C.QTextEdit, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(e, nil, nil) + slotval1 := newQContextMenuEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1251,7 +1221,7 @@ func miqt_exec_callback_QTextEdit_DragEnterEvent(self *C.QTextEdit, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(e, nil, nil, nil) + slotval1 := newQDragEnterEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1277,7 +1247,7 @@ func miqt_exec_callback_QTextEdit_DragLeaveEvent(self *C.QTextEdit, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(e, nil) + slotval1 := newQDragLeaveEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1303,7 +1273,7 @@ func miqt_exec_callback_QTextEdit_DragMoveEvent(self *C.QTextEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(e, nil, nil) + slotval1 := newQDragMoveEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1329,7 +1299,7 @@ func miqt_exec_callback_QTextEdit_DropEvent(self *C.QTextEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(e, nil) + slotval1 := newQDropEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1355,7 +1325,7 @@ func miqt_exec_callback_QTextEdit_FocusInEvent(self *C.QTextEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1381,7 +1351,7 @@ func miqt_exec_callback_QTextEdit_FocusOutEvent(self *C.QTextEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1407,7 +1377,7 @@ func miqt_exec_callback_QTextEdit_ShowEvent(self *C.QTextEdit, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QTextEdit{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1459,7 +1429,7 @@ func miqt_exec_callback_QTextEdit_WheelEvent(self *C.QTextEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1467,7 +1437,7 @@ func miqt_exec_callback_QTextEdit_WheelEvent(self *C.QTextEdit, cb C.intptr_t, e func (this *QTextEdit) callVirtualBase_CreateMimeDataFromSelection() *QMimeData { - return newQMimeData(C.QTextEdit_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h)), nil) + return newQMimeData(C.QTextEdit_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h))) } func (this *QTextEdit) OnCreateMimeDataFromSelection(slot func(super func() *QMimeData) *QMimeData) { @@ -1510,7 +1480,7 @@ func miqt_exec_callback_QTextEdit_CanInsertFromMimeData(self *C.QTextEdit, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(source, nil) + slotval1 := newQMimeData(source) virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) @@ -1538,7 +1508,7 @@ func miqt_exec_callback_QTextEdit_InsertFromMimeData(self *C.QTextEdit, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(source, nil) + slotval1 := newQMimeData(source) gofunc((&QTextEdit{h: self}).callVirtualBase_InsertFromMimeData, slotval1) @@ -1564,7 +1534,7 @@ func miqt_exec_callback_QTextEdit_InputMethodEvent(self *C.QTextEdit, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QTextEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -1698,7 +1668,7 @@ func miqt_exec_callback_QTextEdit_SetupViewport(self *C.QTextEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(viewport, nil, nil) + slotval1 := newQWidget(viewport) gofunc((&QTextEdit{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -1827,24 +1797,19 @@ func newQTextEdit__ExtraSelection(h *C.QTextEdit__ExtraSelection) *QTextEdit__Ex if h == nil { return nil } + return &QTextEdit__ExtraSelection{h: h} } // UnsafeNewQTextEdit__ExtraSelection constructs the type using only unsafe pointers. func UnsafeNewQTextEdit__ExtraSelection(h unsafe.Pointer) *QTextEdit__ExtraSelection { - if h == nil { - return nil - } - - return &QTextEdit__ExtraSelection{h: (*C.QTextEdit__ExtraSelection)(h)} + return newQTextEdit__ExtraSelection((*C.QTextEdit__ExtraSelection)(h)) } // NewQTextEdit__ExtraSelection constructs a new QTextEdit::ExtraSelection object. func NewQTextEdit__ExtraSelection(param1 *QTextEdit__ExtraSelection) *QTextEdit__ExtraSelection { - var outptr_QTextEdit__ExtraSelection *C.QTextEdit__ExtraSelection = nil - C.QTextEdit__ExtraSelection_new(param1.cPointer(), &outptr_QTextEdit__ExtraSelection) - ret := newQTextEdit__ExtraSelection(outptr_QTextEdit__ExtraSelection) + ret := newQTextEdit__ExtraSelection(C.QTextEdit__ExtraSelection_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qtextedit.h b/qt/gen_qtextedit.h index 046e55de..bf1ff1c6 100644 --- a/qt/gen_qtextedit.h +++ b/qt/gen_qtextedit.h @@ -98,10 +98,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QTextEdit_new(QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTextEdit_new2(QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTextEdit_new3(struct miqt_string text, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTextEdit_new4(struct miqt_string text, QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTextEdit* QTextEdit_new(QWidget* parent); +QTextEdit* QTextEdit_new2(); +QTextEdit* QTextEdit_new3(struct miqt_string text); +QTextEdit* QTextEdit_new4(struct miqt_string text, QWidget* parent); +void QTextEdit_virtbase(QTextEdit* src, QAbstractScrollArea** outptr_QAbstractScrollArea); QMetaObject* QTextEdit_MetaObject(const QTextEdit* self); void* QTextEdit_Metacast(QTextEdit* self, const char* param1); struct miqt_string QTextEdit_Tr(const char* s); @@ -323,7 +324,7 @@ void QTextEdit_override_virtual_ViewportSizeHint(void* self, intptr_t slot); QSize* QTextEdit_virtualbase_ViewportSizeHint(const void* self); void QTextEdit_Delete(QTextEdit* self, bool isSubclass); -void QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1, QTextEdit__ExtraSelection** outptr_QTextEdit__ExtraSelection); +QTextEdit__ExtraSelection* QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1); void QTextEdit__ExtraSelection_OperatorAssign(QTextEdit__ExtraSelection* self, QTextEdit__ExtraSelection* param1); void QTextEdit__ExtraSelection_Delete(QTextEdit__ExtraSelection* self, bool isSubclass); diff --git a/qt/gen_qtextformat.cpp b/qt/gen_qtextformat.cpp index b1813360..5b124fe3 100644 --- a/qt/gen_qtextformat.cpp +++ b/qt/gen_qtextformat.cpp @@ -22,19 +22,16 @@ #include "gen_qtextformat.h" #include "_cgo_export.h" -void QTextLength_new(QTextLength** outptr_QTextLength) { - QTextLength* ret = new QTextLength(); - *outptr_QTextLength = ret; +QTextLength* QTextLength_new() { + return new QTextLength(); } -void QTextLength_new2(int typeVal, double value, QTextLength** outptr_QTextLength) { - QTextLength* ret = new QTextLength(static_cast(typeVal), static_cast(value)); - *outptr_QTextLength = ret; +QTextLength* QTextLength_new2(int typeVal, double value) { + return new QTextLength(static_cast(typeVal), static_cast(value)); } -void QTextLength_new3(QTextLength* param1, QTextLength** outptr_QTextLength) { - QTextLength* ret = new QTextLength(*param1); - *outptr_QTextLength = ret; +QTextLength* QTextLength_new3(QTextLength* param1) { + return new QTextLength(*param1); } int QTextLength_Type(const QTextLength* self) { @@ -68,19 +65,16 @@ void QTextLength_Delete(QTextLength* self, bool isSubclass) { } } -void QTextFormat_new(QTextFormat** outptr_QTextFormat) { - QTextFormat* ret = new QTextFormat(); - *outptr_QTextFormat = ret; +QTextFormat* QTextFormat_new() { + return new QTextFormat(); } -void QTextFormat_new2(int typeVal, QTextFormat** outptr_QTextFormat) { - QTextFormat* ret = new QTextFormat(static_cast(typeVal)); - *outptr_QTextFormat = ret; +QTextFormat* QTextFormat_new2(int typeVal) { + return new QTextFormat(static_cast(typeVal)); } -void QTextFormat_new3(QTextFormat* rhs, QTextFormat** outptr_QTextFormat) { - QTextFormat* ret = new QTextFormat(*rhs); - *outptr_QTextFormat = ret; +QTextFormat* QTextFormat_new3(QTextFormat* rhs) { + return new QTextFormat(*rhs); } void QTextFormat_OperatorAssign(QTextFormat* self, QTextFormat* rhs) { @@ -329,16 +323,16 @@ void QTextFormat_Delete(QTextFormat* self, bool isSubclass) { } } -void QTextCharFormat_new(QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { - QTextCharFormat* ret = new QTextCharFormat(); - *outptr_QTextCharFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextCharFormat* QTextCharFormat_new() { + return new QTextCharFormat(); } -void QTextCharFormat_new2(QTextCharFormat* param1, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { - QTextCharFormat* ret = new QTextCharFormat(*param1); - *outptr_QTextCharFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextCharFormat* QTextCharFormat_new2(QTextCharFormat* param1) { + return new QTextCharFormat(*param1); +} + +void QTextCharFormat_virtbase(QTextCharFormat* src, QTextFormat** outptr_QTextFormat) { + *outptr_QTextFormat = static_cast(src); } bool QTextCharFormat_IsValid(const QTextCharFormat* self) { @@ -682,16 +676,16 @@ void QTextCharFormat_Delete(QTextCharFormat* self, bool isSubclass) { } } -void QTextBlockFormat_new(QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat) { - QTextBlockFormat* ret = new QTextBlockFormat(); - *outptr_QTextBlockFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextBlockFormat* QTextBlockFormat_new() { + return new QTextBlockFormat(); } -void QTextBlockFormat_new2(QTextBlockFormat* param1, QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat) { - QTextBlockFormat* ret = new QTextBlockFormat(*param1); - *outptr_QTextBlockFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextBlockFormat* QTextBlockFormat_new2(QTextBlockFormat* param1) { + return new QTextBlockFormat(*param1); +} + +void QTextBlockFormat_virtbase(QTextBlockFormat* src, QTextFormat** outptr_QTextFormat) { + *outptr_QTextFormat = static_cast(src); } bool QTextBlockFormat_IsValid(const QTextBlockFormat* self) { @@ -843,16 +837,16 @@ void QTextBlockFormat_Delete(QTextBlockFormat* self, bool isSubclass) { } } -void QTextListFormat_new(QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat) { - QTextListFormat* ret = new QTextListFormat(); - *outptr_QTextListFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextListFormat* QTextListFormat_new() { + return new QTextListFormat(); } -void QTextListFormat_new2(QTextListFormat* param1, QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat) { - QTextListFormat* ret = new QTextListFormat(*param1); - *outptr_QTextListFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextListFormat* QTextListFormat_new2(QTextListFormat* param1) { + return new QTextListFormat(*param1); +} + +void QTextListFormat_virtbase(QTextListFormat* src, QTextFormat** outptr_QTextFormat) { + *outptr_QTextFormat = static_cast(src); } bool QTextListFormat_IsValid(const QTextListFormat* self) { @@ -916,11 +910,12 @@ void QTextListFormat_Delete(QTextListFormat* self, bool isSubclass) { } } -void QTextImageFormat_new(QTextImageFormat** outptr_QTextImageFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { - QTextImageFormat* ret = new QTextImageFormat(); - *outptr_QTextImageFormat = ret; - *outptr_QTextCharFormat = static_cast(ret); - *outptr_QTextFormat = static_cast(ret); +QTextImageFormat* QTextImageFormat_new() { + return new QTextImageFormat(); +} + +void QTextImageFormat_virtbase(QTextImageFormat* src, QTextCharFormat** outptr_QTextCharFormat) { + *outptr_QTextCharFormat = static_cast(src); } bool QTextImageFormat_IsValid(const QTextImageFormat* self) { @@ -981,16 +976,16 @@ void QTextImageFormat_Delete(QTextImageFormat* self, bool isSubclass) { } } -void QTextFrameFormat_new(QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat) { - QTextFrameFormat* ret = new QTextFrameFormat(); - *outptr_QTextFrameFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextFrameFormat* QTextFrameFormat_new() { + return new QTextFrameFormat(); } -void QTextFrameFormat_new2(QTextFrameFormat* param1, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat) { - QTextFrameFormat* ret = new QTextFrameFormat(*param1); - *outptr_QTextFrameFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextFrameFormat* QTextFrameFormat_new2(QTextFrameFormat* param1) { + return new QTextFrameFormat(*param1); +} + +void QTextFrameFormat_virtbase(QTextFrameFormat* src, QTextFormat** outptr_QTextFormat) { + *outptr_QTextFormat = static_cast(src); } bool QTextFrameFormat_IsValid(const QTextFrameFormat* self) { @@ -1127,11 +1122,12 @@ void QTextFrameFormat_Delete(QTextFrameFormat* self, bool isSubclass) { } } -void QTextTableFormat_new(QTextTableFormat** outptr_QTextTableFormat, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat) { - QTextTableFormat* ret = new QTextTableFormat(); - *outptr_QTextTableFormat = ret; - *outptr_QTextFrameFormat = static_cast(ret); - *outptr_QTextFormat = static_cast(ret); +QTextTableFormat* QTextTableFormat_new() { + return new QTextTableFormat(); +} + +void QTextTableFormat_virtbase(QTextTableFormat* src, QTextFrameFormat** outptr_QTextFrameFormat) { + *outptr_QTextFrameFormat = static_cast(src); } bool QTextTableFormat_IsValid(const QTextTableFormat* self) { @@ -1224,11 +1220,12 @@ void QTextTableFormat_Delete(QTextTableFormat* self, bool isSubclass) { } } -void QTextTableCellFormat_new(QTextTableCellFormat** outptr_QTextTableCellFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { - QTextTableCellFormat* ret = new QTextTableCellFormat(); - *outptr_QTextTableCellFormat = ret; - *outptr_QTextCharFormat = static_cast(ret); - *outptr_QTextFormat = static_cast(ret); +QTextTableCellFormat* QTextTableCellFormat_new() { + return new QTextTableCellFormat(); +} + +void QTextTableCellFormat_virtbase(QTextTableCellFormat* src, QTextCharFormat** outptr_QTextCharFormat) { + *outptr_QTextCharFormat = static_cast(src); } bool QTextTableCellFormat_IsValid(const QTextTableCellFormat* self) { diff --git a/qt/gen_qtextformat.go b/qt/gen_qtextformat.go index 517c95e8..8088b8f9 100644 --- a/qt/gen_qtextformat.go +++ b/qt/gen_qtextformat.go @@ -273,44 +273,35 @@ func newQTextLength(h *C.QTextLength) *QTextLength { if h == nil { return nil } + return &QTextLength{h: h} } // UnsafeNewQTextLength constructs the type using only unsafe pointers. func UnsafeNewQTextLength(h unsafe.Pointer) *QTextLength { - if h == nil { - return nil - } - - return &QTextLength{h: (*C.QTextLength)(h)} + return newQTextLength((*C.QTextLength)(h)) } // NewQTextLength constructs a new QTextLength object. func NewQTextLength() *QTextLength { - var outptr_QTextLength *C.QTextLength = nil - C.QTextLength_new(&outptr_QTextLength) - ret := newQTextLength(outptr_QTextLength) + ret := newQTextLength(C.QTextLength_new()) ret.isSubclass = true return ret } // NewQTextLength2 constructs a new QTextLength object. func NewQTextLength2(typeVal QTextLength__Type, value float64) *QTextLength { - var outptr_QTextLength *C.QTextLength = nil - C.QTextLength_new2((C.int)(typeVal), (C.double)(value), &outptr_QTextLength) - ret := newQTextLength(outptr_QTextLength) + ret := newQTextLength(C.QTextLength_new2((C.int)(typeVal), (C.double)(value))) ret.isSubclass = true return ret } // NewQTextLength3 constructs a new QTextLength object. func NewQTextLength3(param1 *QTextLength) *QTextLength { - var outptr_QTextLength *C.QTextLength = nil - C.QTextLength_new3(param1.cPointer(), &outptr_QTextLength) - ret := newQTextLength(outptr_QTextLength) + ret := newQTextLength(C.QTextLength_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -373,44 +364,35 @@ func newQTextFormat(h *C.QTextFormat) *QTextFormat { if h == nil { return nil } + return &QTextFormat{h: h} } // UnsafeNewQTextFormat constructs the type using only unsafe pointers. func UnsafeNewQTextFormat(h unsafe.Pointer) *QTextFormat { - if h == nil { - return nil - } - - return &QTextFormat{h: (*C.QTextFormat)(h)} + return newQTextFormat((*C.QTextFormat)(h)) } // NewQTextFormat constructs a new QTextFormat object. func NewQTextFormat() *QTextFormat { - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextFormat_new(&outptr_QTextFormat) - ret := newQTextFormat(outptr_QTextFormat) + ret := newQTextFormat(C.QTextFormat_new()) ret.isSubclass = true return ret } // NewQTextFormat2 constructs a new QTextFormat object. func NewQTextFormat2(typeVal int) *QTextFormat { - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextFormat_new2((C.int)(typeVal), &outptr_QTextFormat) - ret := newQTextFormat(outptr_QTextFormat) + ret := newQTextFormat(C.QTextFormat_new2((C.int)(typeVal))) ret.isSubclass = true return ret } // NewQTextFormat3 constructs a new QTextFormat object. func NewQTextFormat3(rhs *QTextFormat) *QTextFormat { - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextFormat_new3(rhs.cPointer(), &outptr_QTextFormat) - ret := newQTextFormat(outptr_QTextFormat) + ret := newQTextFormat(C.QTextFormat_new3(rhs.cPointer())) ret.isSubclass = true return ret } @@ -588,43 +570,43 @@ func (this *QTextFormat) IsTableCellFormat() bool { } func (this *QTextFormat) ToBlockFormat() *QTextBlockFormat { - _goptr := newQTextBlockFormat(C.QTextFormat_ToBlockFormat(this.h), nil) + _goptr := newQTextBlockFormat(C.QTextFormat_ToBlockFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToCharFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QTextFormat_ToCharFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QTextFormat_ToCharFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToListFormat() *QTextListFormat { - _goptr := newQTextListFormat(C.QTextFormat_ToListFormat(this.h), nil) + _goptr := newQTextListFormat(C.QTextFormat_ToListFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToTableFormat() *QTextTableFormat { - _goptr := newQTextTableFormat(C.QTextFormat_ToTableFormat(this.h), nil, nil) + _goptr := newQTextTableFormat(C.QTextFormat_ToTableFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToFrameFormat() *QTextFrameFormat { - _goptr := newQTextFrameFormat(C.QTextFormat_ToFrameFormat(this.h), nil) + _goptr := newQTextFrameFormat(C.QTextFormat_ToFrameFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToImageFormat() *QTextImageFormat { - _goptr := newQTextImageFormat(C.QTextFormat_ToImageFormat(this.h), nil, nil) + _goptr := newQTextImageFormat(C.QTextFormat_ToImageFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToTableCellFormat() *QTextTableCellFormat { - _goptr := newQTextTableCellFormat(C.QTextFormat_ToTableCellFormat(this.h), nil, nil) + _goptr := newQTextTableCellFormat(C.QTextFormat_ToTableCellFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -708,42 +690,34 @@ func (this *QTextCharFormat) UnsafePointer() unsafe.Pointer { } // newQTextCharFormat constructs the type using only CGO pointers. -func newQTextCharFormat(h *C.QTextCharFormat, h_QTextFormat *C.QTextFormat) *QTextCharFormat { +func newQTextCharFormat(h *C.QTextCharFormat) *QTextCharFormat { if h == nil { return nil } + var outptr_QTextFormat *C.QTextFormat = nil + C.QTextCharFormat_virtbase(h, &outptr_QTextFormat) + return &QTextCharFormat{h: h, - QTextFormat: newQTextFormat(h_QTextFormat)} + QTextFormat: newQTextFormat(outptr_QTextFormat)} } // UnsafeNewQTextCharFormat constructs the type using only unsafe pointers. -func UnsafeNewQTextCharFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextCharFormat { - if h == nil { - return nil - } - - return &QTextCharFormat{h: (*C.QTextCharFormat)(h), - QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} +func UnsafeNewQTextCharFormat(h unsafe.Pointer) *QTextCharFormat { + return newQTextCharFormat((*C.QTextCharFormat)(h)) } // NewQTextCharFormat constructs a new QTextCharFormat object. func NewQTextCharFormat() *QTextCharFormat { - var outptr_QTextCharFormat *C.QTextCharFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextCharFormat_new(&outptr_QTextCharFormat, &outptr_QTextFormat) - ret := newQTextCharFormat(outptr_QTextCharFormat, outptr_QTextFormat) + ret := newQTextCharFormat(C.QTextCharFormat_new()) ret.isSubclass = true return ret } // NewQTextCharFormat2 constructs a new QTextCharFormat object. func NewQTextCharFormat2(param1 *QTextCharFormat) *QTextCharFormat { - var outptr_QTextCharFormat *C.QTextCharFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextCharFormat_new2(param1.cPointer(), &outptr_QTextCharFormat, &outptr_QTextFormat) - ret := newQTextCharFormat(outptr_QTextCharFormat, outptr_QTextFormat) + ret := newQTextCharFormat(C.QTextCharFormat_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1114,42 +1088,34 @@ func (this *QTextBlockFormat) UnsafePointer() unsafe.Pointer { } // newQTextBlockFormat constructs the type using only CGO pointers. -func newQTextBlockFormat(h *C.QTextBlockFormat, h_QTextFormat *C.QTextFormat) *QTextBlockFormat { +func newQTextBlockFormat(h *C.QTextBlockFormat) *QTextBlockFormat { if h == nil { return nil } + var outptr_QTextFormat *C.QTextFormat = nil + C.QTextBlockFormat_virtbase(h, &outptr_QTextFormat) + return &QTextBlockFormat{h: h, - QTextFormat: newQTextFormat(h_QTextFormat)} + QTextFormat: newQTextFormat(outptr_QTextFormat)} } // UnsafeNewQTextBlockFormat constructs the type using only unsafe pointers. -func UnsafeNewQTextBlockFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextBlockFormat { - if h == nil { - return nil - } - - return &QTextBlockFormat{h: (*C.QTextBlockFormat)(h), - QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} +func UnsafeNewQTextBlockFormat(h unsafe.Pointer) *QTextBlockFormat { + return newQTextBlockFormat((*C.QTextBlockFormat)(h)) } // NewQTextBlockFormat constructs a new QTextBlockFormat object. func NewQTextBlockFormat() *QTextBlockFormat { - var outptr_QTextBlockFormat *C.QTextBlockFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextBlockFormat_new(&outptr_QTextBlockFormat, &outptr_QTextFormat) - ret := newQTextBlockFormat(outptr_QTextBlockFormat, outptr_QTextFormat) + ret := newQTextBlockFormat(C.QTextBlockFormat_new()) ret.isSubclass = true return ret } // NewQTextBlockFormat2 constructs a new QTextBlockFormat object. func NewQTextBlockFormat2(param1 *QTextBlockFormat) *QTextBlockFormat { - var outptr_QTextBlockFormat *C.QTextBlockFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextBlockFormat_new2(param1.cPointer(), &outptr_QTextBlockFormat, &outptr_QTextFormat) - ret := newQTextBlockFormat(outptr_QTextBlockFormat, outptr_QTextFormat) + ret := newQTextBlockFormat(C.QTextBlockFormat_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1319,42 +1285,34 @@ func (this *QTextListFormat) UnsafePointer() unsafe.Pointer { } // newQTextListFormat constructs the type using only CGO pointers. -func newQTextListFormat(h *C.QTextListFormat, h_QTextFormat *C.QTextFormat) *QTextListFormat { +func newQTextListFormat(h *C.QTextListFormat) *QTextListFormat { if h == nil { return nil } + var outptr_QTextFormat *C.QTextFormat = nil + C.QTextListFormat_virtbase(h, &outptr_QTextFormat) + return &QTextListFormat{h: h, - QTextFormat: newQTextFormat(h_QTextFormat)} + QTextFormat: newQTextFormat(outptr_QTextFormat)} } // UnsafeNewQTextListFormat constructs the type using only unsafe pointers. -func UnsafeNewQTextListFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextListFormat { - if h == nil { - return nil - } - - return &QTextListFormat{h: (*C.QTextListFormat)(h), - QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} +func UnsafeNewQTextListFormat(h unsafe.Pointer) *QTextListFormat { + return newQTextListFormat((*C.QTextListFormat)(h)) } // NewQTextListFormat constructs a new QTextListFormat object. func NewQTextListFormat() *QTextListFormat { - var outptr_QTextListFormat *C.QTextListFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextListFormat_new(&outptr_QTextListFormat, &outptr_QTextFormat) - ret := newQTextListFormat(outptr_QTextListFormat, outptr_QTextFormat) + ret := newQTextListFormat(C.QTextListFormat_new()) ret.isSubclass = true return ret } // NewQTextListFormat2 constructs a new QTextListFormat object. func NewQTextListFormat2(param1 *QTextListFormat) *QTextListFormat { - var outptr_QTextListFormat *C.QTextListFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextListFormat_new2(param1.cPointer(), &outptr_QTextListFormat, &outptr_QTextFormat) - ret := newQTextListFormat(outptr_QTextListFormat, outptr_QTextFormat) + ret := newQTextListFormat(C.QTextListFormat_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1444,32 +1402,26 @@ func (this *QTextImageFormat) UnsafePointer() unsafe.Pointer { } // newQTextImageFormat constructs the type using only CGO pointers. -func newQTextImageFormat(h *C.QTextImageFormat, h_QTextCharFormat *C.QTextCharFormat, h_QTextFormat *C.QTextFormat) *QTextImageFormat { +func newQTextImageFormat(h *C.QTextImageFormat) *QTextImageFormat { if h == nil { return nil } + var outptr_QTextCharFormat *C.QTextCharFormat = nil + C.QTextImageFormat_virtbase(h, &outptr_QTextCharFormat) + return &QTextImageFormat{h: h, - QTextCharFormat: newQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} + QTextCharFormat: newQTextCharFormat(outptr_QTextCharFormat)} } // UnsafeNewQTextImageFormat constructs the type using only unsafe pointers. -func UnsafeNewQTextImageFormat(h unsafe.Pointer, h_QTextCharFormat unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextImageFormat { - if h == nil { - return nil - } - - return &QTextImageFormat{h: (*C.QTextImageFormat)(h), - QTextCharFormat: UnsafeNewQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} +func UnsafeNewQTextImageFormat(h unsafe.Pointer) *QTextImageFormat { + return newQTextImageFormat((*C.QTextImageFormat)(h)) } // NewQTextImageFormat constructs a new QTextImageFormat object. func NewQTextImageFormat() *QTextImageFormat { - var outptr_QTextImageFormat *C.QTextImageFormat = nil - var outptr_QTextCharFormat *C.QTextCharFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextImageFormat_new(&outptr_QTextImageFormat, &outptr_QTextCharFormat, &outptr_QTextFormat) - ret := newQTextImageFormat(outptr_QTextImageFormat, outptr_QTextCharFormat, outptr_QTextFormat) + ret := newQTextImageFormat(C.QTextImageFormat_new()) ret.isSubclass = true return ret } @@ -1556,42 +1508,34 @@ func (this *QTextFrameFormat) UnsafePointer() unsafe.Pointer { } // newQTextFrameFormat constructs the type using only CGO pointers. -func newQTextFrameFormat(h *C.QTextFrameFormat, h_QTextFormat *C.QTextFormat) *QTextFrameFormat { +func newQTextFrameFormat(h *C.QTextFrameFormat) *QTextFrameFormat { if h == nil { return nil } + var outptr_QTextFormat *C.QTextFormat = nil + C.QTextFrameFormat_virtbase(h, &outptr_QTextFormat) + return &QTextFrameFormat{h: h, - QTextFormat: newQTextFormat(h_QTextFormat)} + QTextFormat: newQTextFormat(outptr_QTextFormat)} } // UnsafeNewQTextFrameFormat constructs the type using only unsafe pointers. -func UnsafeNewQTextFrameFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextFrameFormat { - if h == nil { - return nil - } - - return &QTextFrameFormat{h: (*C.QTextFrameFormat)(h), - QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} +func UnsafeNewQTextFrameFormat(h unsafe.Pointer) *QTextFrameFormat { + return newQTextFrameFormat((*C.QTextFrameFormat)(h)) } // NewQTextFrameFormat constructs a new QTextFrameFormat object. func NewQTextFrameFormat() *QTextFrameFormat { - var outptr_QTextFrameFormat *C.QTextFrameFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextFrameFormat_new(&outptr_QTextFrameFormat, &outptr_QTextFormat) - ret := newQTextFrameFormat(outptr_QTextFrameFormat, outptr_QTextFormat) + ret := newQTextFrameFormat(C.QTextFrameFormat_new()) ret.isSubclass = true return ret } // NewQTextFrameFormat2 constructs a new QTextFrameFormat object. func NewQTextFrameFormat2(param1 *QTextFrameFormat) *QTextFrameFormat { - var outptr_QTextFrameFormat *C.QTextFrameFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextFrameFormat_new2(param1.cPointer(), &outptr_QTextFrameFormat, &outptr_QTextFormat) - ret := newQTextFrameFormat(outptr_QTextFrameFormat, outptr_QTextFormat) + ret := newQTextFrameFormat(C.QTextFrameFormat_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1753,32 +1697,26 @@ func (this *QTextTableFormat) UnsafePointer() unsafe.Pointer { } // newQTextTableFormat constructs the type using only CGO pointers. -func newQTextTableFormat(h *C.QTextTableFormat, h_QTextFrameFormat *C.QTextFrameFormat, h_QTextFormat *C.QTextFormat) *QTextTableFormat { +func newQTextTableFormat(h *C.QTextTableFormat) *QTextTableFormat { if h == nil { return nil } + var outptr_QTextFrameFormat *C.QTextFrameFormat = nil + C.QTextTableFormat_virtbase(h, &outptr_QTextFrameFormat) + return &QTextTableFormat{h: h, - QTextFrameFormat: newQTextFrameFormat(h_QTextFrameFormat, h_QTextFormat)} + QTextFrameFormat: newQTextFrameFormat(outptr_QTextFrameFormat)} } // UnsafeNewQTextTableFormat constructs the type using only unsafe pointers. -func UnsafeNewQTextTableFormat(h unsafe.Pointer, h_QTextFrameFormat unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextTableFormat { - if h == nil { - return nil - } - - return &QTextTableFormat{h: (*C.QTextTableFormat)(h), - QTextFrameFormat: UnsafeNewQTextFrameFormat(h_QTextFrameFormat, h_QTextFormat)} +func UnsafeNewQTextTableFormat(h unsafe.Pointer) *QTextTableFormat { + return newQTextTableFormat((*C.QTextTableFormat)(h)) } // NewQTextTableFormat constructs a new QTextTableFormat object. func NewQTextTableFormat() *QTextTableFormat { - var outptr_QTextTableFormat *C.QTextTableFormat = nil - var outptr_QTextFrameFormat *C.QTextFrameFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextTableFormat_new(&outptr_QTextTableFormat, &outptr_QTextFrameFormat, &outptr_QTextFormat) - ret := newQTextTableFormat(outptr_QTextTableFormat, outptr_QTextFrameFormat, outptr_QTextFormat) + ret := newQTextTableFormat(C.QTextTableFormat_new()) ret.isSubclass = true return ret } @@ -1896,32 +1834,26 @@ func (this *QTextTableCellFormat) UnsafePointer() unsafe.Pointer { } // newQTextTableCellFormat constructs the type using only CGO pointers. -func newQTextTableCellFormat(h *C.QTextTableCellFormat, h_QTextCharFormat *C.QTextCharFormat, h_QTextFormat *C.QTextFormat) *QTextTableCellFormat { +func newQTextTableCellFormat(h *C.QTextTableCellFormat) *QTextTableCellFormat { if h == nil { return nil } + var outptr_QTextCharFormat *C.QTextCharFormat = nil + C.QTextTableCellFormat_virtbase(h, &outptr_QTextCharFormat) + return &QTextTableCellFormat{h: h, - QTextCharFormat: newQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} + QTextCharFormat: newQTextCharFormat(outptr_QTextCharFormat)} } // UnsafeNewQTextTableCellFormat constructs the type using only unsafe pointers. -func UnsafeNewQTextTableCellFormat(h unsafe.Pointer, h_QTextCharFormat unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextTableCellFormat { - if h == nil { - return nil - } - - return &QTextTableCellFormat{h: (*C.QTextTableCellFormat)(h), - QTextCharFormat: UnsafeNewQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} +func UnsafeNewQTextTableCellFormat(h unsafe.Pointer) *QTextTableCellFormat { + return newQTextTableCellFormat((*C.QTextTableCellFormat)(h)) } // NewQTextTableCellFormat constructs a new QTextTableCellFormat object. func NewQTextTableCellFormat() *QTextTableCellFormat { - var outptr_QTextTableCellFormat *C.QTextTableCellFormat = nil - var outptr_QTextCharFormat *C.QTextCharFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextTableCellFormat_new(&outptr_QTextTableCellFormat, &outptr_QTextCharFormat, &outptr_QTextFormat) - ret := newQTextTableCellFormat(outptr_QTextTableCellFormat, outptr_QTextCharFormat, outptr_QTextFormat) + ret := newQTextTableCellFormat(C.QTextTableCellFormat_new()) ret.isSubclass = true return ret } diff --git a/qt/gen_qtextformat.h b/qt/gen_qtextformat.h index d6bec3f1..4df67156 100644 --- a/qt/gen_qtextformat.h +++ b/qt/gen_qtextformat.h @@ -52,9 +52,9 @@ typedef struct QTextTableFormat QTextTableFormat; typedef struct QVariant QVariant; #endif -void QTextLength_new(QTextLength** outptr_QTextLength); -void QTextLength_new2(int typeVal, double value, QTextLength** outptr_QTextLength); -void QTextLength_new3(QTextLength* param1, QTextLength** outptr_QTextLength); +QTextLength* QTextLength_new(); +QTextLength* QTextLength_new2(int typeVal, double value); +QTextLength* QTextLength_new3(QTextLength* param1); int QTextLength_Type(const QTextLength* self); double QTextLength_Value(const QTextLength* self, double maximumLength); double QTextLength_RawValue(const QTextLength* self); @@ -62,9 +62,9 @@ bool QTextLength_OperatorEqual(const QTextLength* self, QTextLength* other); bool QTextLength_OperatorNotEqual(const QTextLength* self, QTextLength* other); void QTextLength_Delete(QTextLength* self, bool isSubclass); -void QTextFormat_new(QTextFormat** outptr_QTextFormat); -void QTextFormat_new2(int typeVal, QTextFormat** outptr_QTextFormat); -void QTextFormat_new3(QTextFormat* rhs, QTextFormat** outptr_QTextFormat); +QTextFormat* QTextFormat_new(); +QTextFormat* QTextFormat_new2(int typeVal); +QTextFormat* QTextFormat_new3(QTextFormat* rhs); void QTextFormat_OperatorAssign(QTextFormat* self, QTextFormat* rhs); void QTextFormat_Swap(QTextFormat* self, QTextFormat* other); void QTextFormat_Merge(QTextFormat* self, QTextFormat* other); @@ -117,8 +117,9 @@ QBrush* QTextFormat_Foreground(const QTextFormat* self); void QTextFormat_ClearForeground(QTextFormat* self); void QTextFormat_Delete(QTextFormat* self, bool isSubclass); -void QTextCharFormat_new(QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); -void QTextCharFormat_new2(QTextCharFormat* param1, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); +QTextCharFormat* QTextCharFormat_new(); +QTextCharFormat* QTextCharFormat_new2(QTextCharFormat* param1); +void QTextCharFormat_virtbase(QTextCharFormat* src, QTextFormat** outptr_QTextFormat); bool QTextCharFormat_IsValid(const QTextCharFormat* self); void QTextCharFormat_SetFont(QTextCharFormat* self, QFont* font, int behavior); void QTextCharFormat_SetFontWithFont(QTextCharFormat* self, QFont* font); @@ -186,8 +187,9 @@ int QTextCharFormat_TableCellColumnSpan(const QTextCharFormat* self); void QTextCharFormat_SetFontStyleHint2(QTextCharFormat* self, int hint, int strategy); void QTextCharFormat_Delete(QTextCharFormat* self, bool isSubclass); -void QTextBlockFormat_new(QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat); -void QTextBlockFormat_new2(QTextBlockFormat* param1, QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat); +QTextBlockFormat* QTextBlockFormat_new(); +QTextBlockFormat* QTextBlockFormat_new2(QTextBlockFormat* param1); +void QTextBlockFormat_virtbase(QTextBlockFormat* src, QTextFormat** outptr_QTextFormat); bool QTextBlockFormat_IsValid(const QTextBlockFormat* self); void QTextBlockFormat_SetAlignment(QTextBlockFormat* self, int alignment); int QTextBlockFormat_Alignment(const QTextBlockFormat* self); @@ -219,8 +221,9 @@ void QTextBlockFormat_SetMarker(QTextBlockFormat* self, int marker); int QTextBlockFormat_Marker(const QTextBlockFormat* self); void QTextBlockFormat_Delete(QTextBlockFormat* self, bool isSubclass); -void QTextListFormat_new(QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat); -void QTextListFormat_new2(QTextListFormat* param1, QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat); +QTextListFormat* QTextListFormat_new(); +QTextListFormat* QTextListFormat_new2(QTextListFormat* param1); +void QTextListFormat_virtbase(QTextListFormat* src, QTextFormat** outptr_QTextFormat); bool QTextListFormat_IsValid(const QTextListFormat* self); void QTextListFormat_SetStyle(QTextListFormat* self, int style); int QTextListFormat_Style(const QTextListFormat* self); @@ -232,7 +235,8 @@ void QTextListFormat_SetNumberSuffix(QTextListFormat* self, struct miqt_string n struct miqt_string QTextListFormat_NumberSuffix(const QTextListFormat* self); void QTextListFormat_Delete(QTextListFormat* self, bool isSubclass); -void QTextImageFormat_new(QTextImageFormat** outptr_QTextImageFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); +QTextImageFormat* QTextImageFormat_new(); +void QTextImageFormat_virtbase(QTextImageFormat* src, QTextCharFormat** outptr_QTextCharFormat); bool QTextImageFormat_IsValid(const QTextImageFormat* self); void QTextImageFormat_SetName(QTextImageFormat* self, struct miqt_string name); struct miqt_string QTextImageFormat_Name(const QTextImageFormat* self); @@ -245,8 +249,9 @@ int QTextImageFormat_Quality(const QTextImageFormat* self); void QTextImageFormat_SetQuality1(QTextImageFormat* self, int quality); void QTextImageFormat_Delete(QTextImageFormat* self, bool isSubclass); -void QTextFrameFormat_new(QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat); -void QTextFrameFormat_new2(QTextFrameFormat* param1, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat); +QTextFrameFormat* QTextFrameFormat_new(); +QTextFrameFormat* QTextFrameFormat_new2(QTextFrameFormat* param1); +void QTextFrameFormat_virtbase(QTextFrameFormat* src, QTextFormat** outptr_QTextFormat); bool QTextFrameFormat_IsValid(const QTextFrameFormat* self); void QTextFrameFormat_SetPosition(QTextFrameFormat* self, int f); int QTextFrameFormat_Position(const QTextFrameFormat* self); @@ -278,7 +283,8 @@ void QTextFrameFormat_SetPageBreakPolicy(QTextFrameFormat* self, int flags); int QTextFrameFormat_PageBreakPolicy(const QTextFrameFormat* self); void QTextFrameFormat_Delete(QTextFrameFormat* self, bool isSubclass); -void QTextTableFormat_new(QTextTableFormat** outptr_QTextTableFormat, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat); +QTextTableFormat* QTextTableFormat_new(); +void QTextTableFormat_virtbase(QTextTableFormat* src, QTextFrameFormat** outptr_QTextFrameFormat); bool QTextTableFormat_IsValid(const QTextTableFormat* self); int QTextTableFormat_Columns(const QTextTableFormat* self); void QTextTableFormat_SetColumns(QTextTableFormat* self, int columns); @@ -297,7 +303,8 @@ void QTextTableFormat_SetBorderCollapse(QTextTableFormat* self, bool borderColla bool QTextTableFormat_BorderCollapse(const QTextTableFormat* self); void QTextTableFormat_Delete(QTextTableFormat* self, bool isSubclass); -void QTextTableCellFormat_new(QTextTableCellFormat** outptr_QTextTableCellFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); +QTextTableCellFormat* QTextTableCellFormat_new(); +void QTextTableCellFormat_virtbase(QTextTableCellFormat* src, QTextCharFormat** outptr_QTextCharFormat); bool QTextTableCellFormat_IsValid(const QTextTableCellFormat* self); void QTextTableCellFormat_SetTopPadding(QTextTableCellFormat* self, double padding); double QTextTableCellFormat_TopPadding(const QTextTableCellFormat* self); diff --git a/qt/gen_qtextlayout.cpp b/qt/gen_qtextlayout.cpp index 21c95f5f..2c0072e3 100644 --- a/qt/gen_qtextlayout.cpp +++ b/qt/gen_qtextlayout.cpp @@ -20,9 +20,8 @@ #include "gen_qtextlayout.h" #include "_cgo_export.h" -void QTextInlineObject_new(QTextInlineObject** outptr_QTextInlineObject) { - QTextInlineObject* ret = new QTextInlineObject(); - *outptr_QTextInlineObject = ret; +QTextInlineObject* QTextInlineObject_new() { + return new QTextInlineObject(); } bool QTextInlineObject_IsValid(const QTextInlineObject* self) { @@ -90,32 +89,27 @@ void QTextInlineObject_Delete(QTextInlineObject* self, bool isSubclass) { } } -void QTextLayout_new(QTextLayout** outptr_QTextLayout) { - QTextLayout* ret = new QTextLayout(); - *outptr_QTextLayout = ret; +QTextLayout* QTextLayout_new() { + return new QTextLayout(); } -void QTextLayout_new2(struct miqt_string text, QTextLayout** outptr_QTextLayout) { +QTextLayout* QTextLayout_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - QTextLayout* ret = new QTextLayout(text_QString); - *outptr_QTextLayout = ret; + return new QTextLayout(text_QString); } -void QTextLayout_new3(struct miqt_string text, QFont* font, QTextLayout** outptr_QTextLayout) { +QTextLayout* QTextLayout_new3(struct miqt_string text, QFont* font) { QString text_QString = QString::fromUtf8(text.data, text.len); - QTextLayout* ret = new QTextLayout(text_QString, *font); - *outptr_QTextLayout = ret; + return new QTextLayout(text_QString, *font); } -void QTextLayout_new4(QTextBlock* b, QTextLayout** outptr_QTextLayout) { - QTextLayout* ret = new QTextLayout(*b); - *outptr_QTextLayout = ret; +QTextLayout* QTextLayout_new4(QTextBlock* b) { + return new QTextLayout(*b); } -void QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice, QTextLayout** outptr_QTextLayout) { +QTextLayout* QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - QTextLayout* ret = new QTextLayout(text_QString, *font, paintdevice); - *outptr_QTextLayout = ret; + return new QTextLayout(text_QString, *font, paintdevice); } void QTextLayout_SetFont(QTextLayout* self, QFont* f) { @@ -408,9 +402,8 @@ void QTextLayout_Delete(QTextLayout* self, bool isSubclass) { } } -void QTextLine_new(QTextLine** outptr_QTextLine) { - QTextLine* ret = new QTextLine(); - *outptr_QTextLine = ret; +QTextLine* QTextLine_new() { + return new QTextLine(); } bool QTextLine_IsValid(const QTextLine* self) { diff --git a/qt/gen_qtextlayout.go b/qt/gen_qtextlayout.go index 447e9a87..a91f702b 100644 --- a/qt/gen_qtextlayout.go +++ b/qt/gen_qtextlayout.go @@ -58,24 +58,19 @@ func newQTextInlineObject(h *C.QTextInlineObject) *QTextInlineObject { if h == nil { return nil } + return &QTextInlineObject{h: h} } // UnsafeNewQTextInlineObject constructs the type using only unsafe pointers. func UnsafeNewQTextInlineObject(h unsafe.Pointer) *QTextInlineObject { - if h == nil { - return nil - } - - return &QTextInlineObject{h: (*C.QTextInlineObject)(h)} + return newQTextInlineObject((*C.QTextInlineObject)(h)) } // NewQTextInlineObject constructs a new QTextInlineObject object. func NewQTextInlineObject() *QTextInlineObject { - var outptr_QTextInlineObject *C.QTextInlineObject = nil - C.QTextInlineObject_new(&outptr_QTextInlineObject) - ret := newQTextInlineObject(outptr_QTextInlineObject) + ret := newQTextInlineObject(C.QTextInlineObject_new()) ret.isSubclass = true return ret } @@ -174,24 +169,19 @@ func newQTextLayout(h *C.QTextLayout) *QTextLayout { if h == nil { return nil } + return &QTextLayout{h: h} } // UnsafeNewQTextLayout constructs the type using only unsafe pointers. func UnsafeNewQTextLayout(h unsafe.Pointer) *QTextLayout { - if h == nil { - return nil - } - - return &QTextLayout{h: (*C.QTextLayout)(h)} + return newQTextLayout((*C.QTextLayout)(h)) } // NewQTextLayout constructs a new QTextLayout object. func NewQTextLayout() *QTextLayout { - var outptr_QTextLayout *C.QTextLayout = nil - C.QTextLayout_new(&outptr_QTextLayout) - ret := newQTextLayout(outptr_QTextLayout) + ret := newQTextLayout(C.QTextLayout_new()) ret.isSubclass = true return ret } @@ -202,10 +192,8 @@ func NewQTextLayout2(text string) *QTextLayout { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTextLayout *C.QTextLayout = nil - C.QTextLayout_new2(text_ms, &outptr_QTextLayout) - ret := newQTextLayout(outptr_QTextLayout) + ret := newQTextLayout(C.QTextLayout_new2(text_ms)) ret.isSubclass = true return ret } @@ -216,20 +204,16 @@ func NewQTextLayout3(text string, font *QFont) *QTextLayout { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTextLayout *C.QTextLayout = nil - C.QTextLayout_new3(text_ms, font.cPointer(), &outptr_QTextLayout) - ret := newQTextLayout(outptr_QTextLayout) + ret := newQTextLayout(C.QTextLayout_new3(text_ms, font.cPointer())) ret.isSubclass = true return ret } // NewQTextLayout4 constructs a new QTextLayout object. func NewQTextLayout4(b *QTextBlock) *QTextLayout { - var outptr_QTextLayout *C.QTextLayout = nil - C.QTextLayout_new4(b.cPointer(), &outptr_QTextLayout) - ret := newQTextLayout(outptr_QTextLayout) + ret := newQTextLayout(C.QTextLayout_new4(b.cPointer())) ret.isSubclass = true return ret } @@ -240,10 +224,8 @@ func NewQTextLayout5(text string, font *QFont, paintdevice *QPaintDevice) *QText text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTextLayout *C.QTextLayout = nil - C.QTextLayout_new5(text_ms, font.cPointer(), paintdevice.cPointer(), &outptr_QTextLayout) - ret := newQTextLayout(outptr_QTextLayout) + ret := newQTextLayout(C.QTextLayout_new5(text_ms, font.cPointer(), paintdevice.cPointer())) ret.isSubclass = true return ret } @@ -568,24 +550,19 @@ func newQTextLine(h *C.QTextLine) *QTextLine { if h == nil { return nil } + return &QTextLine{h: h} } // UnsafeNewQTextLine constructs the type using only unsafe pointers. func UnsafeNewQTextLine(h unsafe.Pointer) *QTextLine { - if h == nil { - return nil - } - - return &QTextLine{h: (*C.QTextLine)(h)} + return newQTextLine((*C.QTextLine)(h)) } // NewQTextLine constructs a new QTextLine object. func NewQTextLine() *QTextLine { - var outptr_QTextLine *C.QTextLine = nil - C.QTextLine_new(&outptr_QTextLine) - ret := newQTextLine(outptr_QTextLine) + ret := newQTextLine(C.QTextLine_new()) ret.isSubclass = true return ret } @@ -790,16 +767,13 @@ func newQTextLayout__FormatRange(h *C.QTextLayout__FormatRange) *QTextLayout__Fo if h == nil { return nil } + return &QTextLayout__FormatRange{h: h} } // UnsafeNewQTextLayout__FormatRange constructs the type using only unsafe pointers. func UnsafeNewQTextLayout__FormatRange(h unsafe.Pointer) *QTextLayout__FormatRange { - if h == nil { - return nil - } - - return &QTextLayout__FormatRange{h: (*C.QTextLayout__FormatRange)(h)} + return newQTextLayout__FormatRange((*C.QTextLayout__FormatRange)(h)) } // Delete this object from C++ memory. diff --git a/qt/gen_qtextlayout.h b/qt/gen_qtextlayout.h index c4406649..3d643d27 100644 --- a/qt/gen_qtextlayout.h +++ b/qt/gen_qtextlayout.h @@ -50,7 +50,7 @@ typedef struct QTextLine QTextLine; typedef struct QTextOption QTextOption; #endif -void QTextInlineObject_new(QTextInlineObject** outptr_QTextInlineObject); +QTextInlineObject* QTextInlineObject_new(); bool QTextInlineObject_IsValid(const QTextInlineObject* self); QRectF* QTextInlineObject_Rect(const QTextInlineObject* self); double QTextInlineObject_Width(const QTextInlineObject* self); @@ -66,11 +66,11 @@ int QTextInlineObject_FormatIndex(const QTextInlineObject* self); QTextFormat* QTextInlineObject_Format(const QTextInlineObject* self); void QTextInlineObject_Delete(QTextInlineObject* self, bool isSubclass); -void QTextLayout_new(QTextLayout** outptr_QTextLayout); -void QTextLayout_new2(struct miqt_string text, QTextLayout** outptr_QTextLayout); -void QTextLayout_new3(struct miqt_string text, QFont* font, QTextLayout** outptr_QTextLayout); -void QTextLayout_new4(QTextBlock* b, QTextLayout** outptr_QTextLayout); -void QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice, QTextLayout** outptr_QTextLayout); +QTextLayout* QTextLayout_new(); +QTextLayout* QTextLayout_new2(struct miqt_string text); +QTextLayout* QTextLayout_new3(struct miqt_string text, QFont* font); +QTextLayout* QTextLayout_new4(QTextBlock* b); +QTextLayout* QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice); void QTextLayout_SetFont(QTextLayout* self, QFont* f); QFont* QTextLayout_Font(const QTextLayout* self); void QTextLayout_SetRawFont(QTextLayout* self, QRawFont* rawFont); @@ -121,7 +121,7 @@ struct miqt_array /* of QGlyphRun* */ QTextLayout_GlyphRuns1(const QTextLayout* struct miqt_array /* of QGlyphRun* */ QTextLayout_GlyphRuns2(const QTextLayout* self, int from, int length); void QTextLayout_Delete(QTextLayout* self, bool isSubclass); -void QTextLine_new(QTextLine** outptr_QTextLine); +QTextLine* QTextLine_new(); bool QTextLine_IsValid(const QTextLine* self); QRectF* QTextLine_Rect(const QTextLine* self); double QTextLine_X(const QTextLine* self); diff --git a/qt/gen_qtextlist.cpp b/qt/gen_qtextlist.cpp index 0c144cee..df849c0b 100644 --- a/qt/gen_qtextlist.cpp +++ b/qt/gen_qtextlist.cpp @@ -100,12 +100,12 @@ public: }; -void QTextList_new(QTextDocument* doc, QTextList** outptr_QTextList, QTextBlockGroup** outptr_QTextBlockGroup, QTextObject** outptr_QTextObject, QObject** outptr_QObject) { - MiqtVirtualQTextList* ret = new MiqtVirtualQTextList(doc); - *outptr_QTextList = ret; - *outptr_QTextBlockGroup = static_cast(ret); - *outptr_QTextObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTextList* QTextList_new(QTextDocument* doc) { + return new MiqtVirtualQTextList(doc); +} + +void QTextList_virtbase(QTextList* src, QTextBlockGroup** outptr_QTextBlockGroup) { + *outptr_QTextBlockGroup = static_cast(src); } QMetaObject* QTextList_MetaObject(const QTextList* self) { diff --git a/qt/gen_qtextlist.go b/qt/gen_qtextlist.go index 16f3dcb3..78cfdf86 100644 --- a/qt/gen_qtextlist.go +++ b/qt/gen_qtextlist.go @@ -35,33 +35,26 @@ func (this *QTextList) UnsafePointer() unsafe.Pointer { } // newQTextList constructs the type using only CGO pointers. -func newQTextList(h *C.QTextList, h_QTextBlockGroup *C.QTextBlockGroup, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextList { +func newQTextList(h *C.QTextList) *QTextList { if h == nil { return nil } + var outptr_QTextBlockGroup *C.QTextBlockGroup = nil + C.QTextList_virtbase(h, &outptr_QTextBlockGroup) + return &QTextList{h: h, - QTextBlockGroup: newQTextBlockGroup(h_QTextBlockGroup, h_QTextObject, h_QObject)} + QTextBlockGroup: newQTextBlockGroup(outptr_QTextBlockGroup)} } // UnsafeNewQTextList constructs the type using only unsafe pointers. -func UnsafeNewQTextList(h unsafe.Pointer, h_QTextBlockGroup unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextList { - if h == nil { - return nil - } - - return &QTextList{h: (*C.QTextList)(h), - QTextBlockGroup: UnsafeNewQTextBlockGroup(h_QTextBlockGroup, h_QTextObject, h_QObject)} +func UnsafeNewQTextList(h unsafe.Pointer) *QTextList { + return newQTextList((*C.QTextList)(h)) } // NewQTextList constructs a new QTextList object. func NewQTextList(doc *QTextDocument) *QTextList { - var outptr_QTextList *C.QTextList = nil - var outptr_QTextBlockGroup *C.QTextBlockGroup = nil - var outptr_QTextObject *C.QTextObject = nil - var outptr_QObject *C.QObject = nil - C.QTextList_new(doc.cPointer(), &outptr_QTextList, &outptr_QTextBlockGroup, &outptr_QTextObject, &outptr_QObject) - ret := newQTextList(outptr_QTextList, outptr_QTextBlockGroup, outptr_QTextObject, outptr_QObject) + ret := newQTextList(C.QTextList_new(doc.cPointer())) ret.isSubclass = true return ret } @@ -136,7 +129,7 @@ func (this *QTextList) SetFormat(format *QTextListFormat) { } func (this *QTextList) Format() *QTextListFormat { - _goptr := newQTextListFormat(C.QTextList_Format(this.h), nil) + _goptr := newQTextListFormat(C.QTextList_Format(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/gen_qtextlist.h b/qt/gen_qtextlist.h index baa892f7..1a7da334 100644 --- a/qt/gen_qtextlist.h +++ b/qt/gen_qtextlist.h @@ -34,7 +34,8 @@ typedef struct QTextListFormat QTextListFormat; typedef struct QTextObject QTextObject; #endif -void QTextList_new(QTextDocument* doc, QTextList** outptr_QTextList, QTextBlockGroup** outptr_QTextBlockGroup, QTextObject** outptr_QTextObject, QObject** outptr_QObject); +QTextList* QTextList_new(QTextDocument* doc); +void QTextList_virtbase(QTextList* src, QTextBlockGroup** outptr_QTextBlockGroup); QMetaObject* QTextList_MetaObject(const QTextList* self); void* QTextList_Metacast(QTextList* self, const char* param1); struct miqt_string QTextList_Tr(const char* s); diff --git a/qt/gen_qtextobject.cpp b/qt/gen_qtextobject.cpp index a8ff27a5..ea0f99fa 100644 --- a/qt/gen_qtextobject.cpp +++ b/qt/gen_qtextobject.cpp @@ -27,6 +27,10 @@ #include "gen_qtextobject.h" #include "_cgo_export.h" +void QTextObject_virtbase(QTextObject* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QTextObject_MetaObject(const QTextObject* self) { return (QMetaObject*) self->metaObject(); } @@ -117,6 +121,10 @@ struct miqt_string QTextObject_TrUtf83(const char* s, const char* c, int n) { return _ms; } +void QTextBlockGroup_virtbase(QTextBlockGroup* src, QTextObject** outptr_QTextObject) { + *outptr_QTextObject = static_cast(src); +} + QMetaObject* QTextBlockGroup_MetaObject(const QTextBlockGroup* self) { return (QMetaObject*) self->metaObject(); } @@ -203,11 +211,12 @@ void QTextFrameLayoutData_Delete(QTextFrameLayoutData* self, bool isSubclass) { } } -void QTextFrame_new(QTextDocument* doc, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject) { - QTextFrame* ret = new QTextFrame(doc); - *outptr_QTextFrame = ret; - *outptr_QTextObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTextFrame* QTextFrame_new(QTextDocument* doc) { + return new QTextFrame(doc); +} + +void QTextFrame_virtbase(QTextFrame* src, QTextObject** outptr_QTextObject) { + *outptr_QTextObject = static_cast(src); } QMetaObject* QTextFrame_MetaObject(const QTextFrame* self) { @@ -361,14 +370,12 @@ void QTextBlockUserData_Delete(QTextBlockUserData* self, bool isSubclass) { } } -void QTextBlock_new(QTextBlock** outptr_QTextBlock) { - QTextBlock* ret = new QTextBlock(); - *outptr_QTextBlock = ret; +QTextBlock* QTextBlock_new() { + return new QTextBlock(); } -void QTextBlock_new2(QTextBlock* o, QTextBlock** outptr_QTextBlock) { - QTextBlock* ret = new QTextBlock(*o); - *outptr_QTextBlock = ret; +QTextBlock* QTextBlock_new2(QTextBlock* o) { + return new QTextBlock(*o); } void QTextBlock_OperatorAssign(QTextBlock* self, QTextBlock* o) { @@ -540,14 +547,12 @@ void QTextBlock_Delete(QTextBlock* self, bool isSubclass) { } } -void QTextFragment_new(QTextFragment** outptr_QTextFragment) { - QTextFragment* ret = new QTextFragment(); - *outptr_QTextFragment = ret; +QTextFragment* QTextFragment_new() { + return new QTextFragment(); } -void QTextFragment_new2(QTextFragment* o, QTextFragment** outptr_QTextFragment) { - QTextFragment* ret = new QTextFragment(*o); - *outptr_QTextFragment = ret; +QTextFragment* QTextFragment_new2(QTextFragment* o) { + return new QTextFragment(*o); } void QTextFragment_OperatorAssign(QTextFragment* self, QTextFragment* o) { @@ -648,14 +653,12 @@ void QTextFragment_Delete(QTextFragment* self, bool isSubclass) { } } -void QTextFrame__iterator_new(QTextFrame__iterator** outptr_QTextFrame__iterator) { - QTextFrame::iterator* ret = new QTextFrame::iterator(); - *outptr_QTextFrame__iterator = ret; +QTextFrame__iterator* QTextFrame__iterator_new() { + return new QTextFrame::iterator(); } -void QTextFrame__iterator_new2(QTextFrame__iterator* o, QTextFrame__iterator** outptr_QTextFrame__iterator) { - QTextFrame::iterator* ret = new QTextFrame::iterator(*o); - *outptr_QTextFrame__iterator = ret; +QTextFrame__iterator* QTextFrame__iterator_new2(QTextFrame__iterator* o) { + return new QTextFrame::iterator(*o); } void QTextFrame__iterator_OperatorAssign(QTextFrame__iterator* self, QTextFrame__iterator* o) { @@ -714,14 +717,12 @@ void QTextFrame__iterator_Delete(QTextFrame__iterator* self, bool isSubclass) { } } -void QTextBlock__iterator_new(QTextBlock__iterator** outptr_QTextBlock__iterator) { - QTextBlock::iterator* ret = new QTextBlock::iterator(); - *outptr_QTextBlock__iterator = ret; +QTextBlock__iterator* QTextBlock__iterator_new() { + return new QTextBlock::iterator(); } -void QTextBlock__iterator_new2(QTextBlock__iterator* o, QTextBlock__iterator** outptr_QTextBlock__iterator) { - QTextBlock::iterator* ret = new QTextBlock::iterator(*o); - *outptr_QTextBlock__iterator = ret; +QTextBlock__iterator* QTextBlock__iterator_new2(QTextBlock__iterator* o) { + return new QTextBlock::iterator(*o); } void QTextBlock__iterator_OperatorAssign(QTextBlock__iterator* self, QTextBlock__iterator* o) { diff --git a/qt/gen_qtextobject.go b/qt/gen_qtextobject.go index 63e31676..0a7b6028 100644 --- a/qt/gen_qtextobject.go +++ b/qt/gen_qtextobject.go @@ -34,22 +34,20 @@ func (this *QTextObject) UnsafePointer() unsafe.Pointer { } // newQTextObject constructs the type using only CGO pointers. -func newQTextObject(h *C.QTextObject, h_QObject *C.QObject) *QTextObject { +func newQTextObject(h *C.QTextObject) *QTextObject { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QTextObject_virtbase(h, &outptr_QObject) + return &QTextObject{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQTextObject constructs the type using only unsafe pointers. -func UnsafeNewQTextObject(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTextObject { - if h == nil { - return nil - } - - return &QTextObject{h: (*C.QTextObject)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQTextObject(h unsafe.Pointer) *QTextObject { + return newQTextObject((*C.QTextObject)(h)) } func (this *QTextObject) MetaObject() *QMetaObject { @@ -91,7 +89,7 @@ func (this *QTextObject) FormatIndex() int { } func (this *QTextObject) Document() *QTextDocument { - return newQTextDocument(C.QTextObject_Document(this.h), nil) + return newQTextDocument(C.QTextObject_Document(this.h)) } func (this *QTextObject) ObjectIndex() int { @@ -163,22 +161,20 @@ func (this *QTextBlockGroup) UnsafePointer() unsafe.Pointer { } // newQTextBlockGroup constructs the type using only CGO pointers. -func newQTextBlockGroup(h *C.QTextBlockGroup, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextBlockGroup { +func newQTextBlockGroup(h *C.QTextBlockGroup) *QTextBlockGroup { if h == nil { return nil } + var outptr_QTextObject *C.QTextObject = nil + C.QTextBlockGroup_virtbase(h, &outptr_QTextObject) + return &QTextBlockGroup{h: h, - QTextObject: newQTextObject(h_QTextObject, h_QObject)} + QTextObject: newQTextObject(outptr_QTextObject)} } // UnsafeNewQTextBlockGroup constructs the type using only unsafe pointers. -func UnsafeNewQTextBlockGroup(h unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextBlockGroup { - if h == nil { - return nil - } - - return &QTextBlockGroup{h: (*C.QTextBlockGroup)(h), - QTextObject: UnsafeNewQTextObject(h_QTextObject, h_QObject)} +func UnsafeNewQTextBlockGroup(h unsafe.Pointer) *QTextBlockGroup { + return newQTextBlockGroup((*C.QTextBlockGroup)(h)) } func (this *QTextBlockGroup) MetaObject() *QMetaObject { @@ -277,16 +273,13 @@ func newQTextFrameLayoutData(h *C.QTextFrameLayoutData) *QTextFrameLayoutData { if h == nil { return nil } + return &QTextFrameLayoutData{h: h} } // UnsafeNewQTextFrameLayoutData constructs the type using only unsafe pointers. func UnsafeNewQTextFrameLayoutData(h unsafe.Pointer) *QTextFrameLayoutData { - if h == nil { - return nil - } - - return &QTextFrameLayoutData{h: (*C.QTextFrameLayoutData)(h)} + return newQTextFrameLayoutData((*C.QTextFrameLayoutData)(h)) } func (this *QTextFrameLayoutData) OperatorAssign(param1 *QTextFrameLayoutData) { @@ -328,32 +321,26 @@ func (this *QTextFrame) UnsafePointer() unsafe.Pointer { } // newQTextFrame constructs the type using only CGO pointers. -func newQTextFrame(h *C.QTextFrame, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextFrame { +func newQTextFrame(h *C.QTextFrame) *QTextFrame { if h == nil { return nil } + var outptr_QTextObject *C.QTextObject = nil + C.QTextFrame_virtbase(h, &outptr_QTextObject) + return &QTextFrame{h: h, - QTextObject: newQTextObject(h_QTextObject, h_QObject)} + QTextObject: newQTextObject(outptr_QTextObject)} } // UnsafeNewQTextFrame constructs the type using only unsafe pointers. -func UnsafeNewQTextFrame(h unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextFrame { - if h == nil { - return nil - } - - return &QTextFrame{h: (*C.QTextFrame)(h), - QTextObject: UnsafeNewQTextObject(h_QTextObject, h_QObject)} +func UnsafeNewQTextFrame(h unsafe.Pointer) *QTextFrame { + return newQTextFrame((*C.QTextFrame)(h)) } // NewQTextFrame constructs a new QTextFrame object. func NewQTextFrame(doc *QTextDocument) *QTextFrame { - var outptr_QTextFrame *C.QTextFrame = nil - var outptr_QTextObject *C.QTextObject = nil - var outptr_QObject *C.QObject = nil - C.QTextFrame_new(doc.cPointer(), &outptr_QTextFrame, &outptr_QTextObject, &outptr_QObject) - ret := newQTextFrame(outptr_QTextFrame, outptr_QTextObject, outptr_QObject) + ret := newQTextFrame(C.QTextFrame_new(doc.cPointer())) ret.isSubclass = true return ret } @@ -391,7 +378,7 @@ func (this *QTextFrame) SetFrameFormat(format *QTextFrameFormat) { } func (this *QTextFrame) FrameFormat() *QTextFrameFormat { - _goptr := newQTextFrameFormat(C.QTextFrame_FrameFormat(this.h), nil) + _goptr := newQTextFrameFormat(C.QTextFrame_FrameFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -429,13 +416,13 @@ func (this *QTextFrame) ChildFrames() []*QTextFrame { _ret := make([]*QTextFrame, int(_ma.len)) _outCast := (*[0xffff]*C.QTextFrame)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQTextFrame(_outCast[i], nil, nil) + _ret[i] = newQTextFrame(_outCast[i]) } return _ret } func (this *QTextFrame) ParentFrame() *QTextFrame { - return newQTextFrame(C.QTextFrame_ParentFrame(this.h), nil, nil) + return newQTextFrame(C.QTextFrame_ParentFrame(this.h)) } func (this *QTextFrame) Begin() *QTextFrame__iterator { @@ -532,16 +519,13 @@ func newQTextBlockUserData(h *C.QTextBlockUserData) *QTextBlockUserData { if h == nil { return nil } + return &QTextBlockUserData{h: h} } // UnsafeNewQTextBlockUserData constructs the type using only unsafe pointers. func UnsafeNewQTextBlockUserData(h unsafe.Pointer) *QTextBlockUserData { - if h == nil { - return nil - } - - return &QTextBlockUserData{h: (*C.QTextBlockUserData)(h)} + return newQTextBlockUserData((*C.QTextBlockUserData)(h)) } func (this *QTextBlockUserData) OperatorAssign(param1 *QTextBlockUserData) { @@ -586,34 +570,27 @@ func newQTextBlock(h *C.QTextBlock) *QTextBlock { if h == nil { return nil } + return &QTextBlock{h: h} } // UnsafeNewQTextBlock constructs the type using only unsafe pointers. func UnsafeNewQTextBlock(h unsafe.Pointer) *QTextBlock { - if h == nil { - return nil - } - - return &QTextBlock{h: (*C.QTextBlock)(h)} + return newQTextBlock((*C.QTextBlock)(h)) } // NewQTextBlock constructs a new QTextBlock object. func NewQTextBlock() *QTextBlock { - var outptr_QTextBlock *C.QTextBlock = nil - C.QTextBlock_new(&outptr_QTextBlock) - ret := newQTextBlock(outptr_QTextBlock) + ret := newQTextBlock(C.QTextBlock_new()) ret.isSubclass = true return ret } // NewQTextBlock2 constructs a new QTextBlock object. func NewQTextBlock2(o *QTextBlock) *QTextBlock { - var outptr_QTextBlock *C.QTextBlock = nil - C.QTextBlock_new2(o.cPointer(), &outptr_QTextBlock) - ret := newQTextBlock(outptr_QTextBlock) + ret := newQTextBlock(C.QTextBlock_new2(o.cPointer())) ret.isSubclass = true return ret } @@ -659,7 +636,7 @@ func (this *QTextBlock) ClearLayout() { } func (this *QTextBlock) BlockFormat() *QTextBlockFormat { - _goptr := newQTextBlockFormat(C.QTextBlock_BlockFormat(this.h), nil) + _goptr := newQTextBlockFormat(C.QTextBlock_BlockFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -669,7 +646,7 @@ func (this *QTextBlock) BlockFormatIndex() int { } func (this *QTextBlock) CharFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QTextBlock_CharFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QTextBlock_CharFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -702,11 +679,11 @@ func (this *QTextBlock) TextFormats() []QTextLayout__FormatRange { } func (this *QTextBlock) Document() *QTextDocument { - return newQTextDocument(C.QTextBlock_Document(this.h), nil) + return newQTextDocument(C.QTextBlock_Document(this.h)) } func (this *QTextBlock) TextList() *QTextList { - return newQTextList(C.QTextBlock_TextList(this.h), nil, nil, nil) + return newQTextList(C.QTextBlock_TextList(this.h)) } func (this *QTextBlock) UserData() *QTextBlockUserData { @@ -823,34 +800,27 @@ func newQTextFragment(h *C.QTextFragment) *QTextFragment { if h == nil { return nil } + return &QTextFragment{h: h} } // UnsafeNewQTextFragment constructs the type using only unsafe pointers. func UnsafeNewQTextFragment(h unsafe.Pointer) *QTextFragment { - if h == nil { - return nil - } - - return &QTextFragment{h: (*C.QTextFragment)(h)} + return newQTextFragment((*C.QTextFragment)(h)) } // NewQTextFragment constructs a new QTextFragment object. func NewQTextFragment() *QTextFragment { - var outptr_QTextFragment *C.QTextFragment = nil - C.QTextFragment_new(&outptr_QTextFragment) - ret := newQTextFragment(outptr_QTextFragment) + ret := newQTextFragment(C.QTextFragment_new()) ret.isSubclass = true return ret } // NewQTextFragment2 constructs a new QTextFragment object. func NewQTextFragment2(o *QTextFragment) *QTextFragment { - var outptr_QTextFragment *C.QTextFragment = nil - C.QTextFragment_new2(o.cPointer(), &outptr_QTextFragment) - ret := newQTextFragment(outptr_QTextFragment) + ret := newQTextFragment(C.QTextFragment_new2(o.cPointer())) ret.isSubclass = true return ret } @@ -888,7 +858,7 @@ func (this *QTextFragment) Contains(position int) bool { } func (this *QTextFragment) CharFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QTextFragment_CharFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QTextFragment_CharFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -978,34 +948,27 @@ func newQTextFrame__iterator(h *C.QTextFrame__iterator) *QTextFrame__iterator { if h == nil { return nil } + return &QTextFrame__iterator{h: h} } // UnsafeNewQTextFrame__iterator constructs the type using only unsafe pointers. func UnsafeNewQTextFrame__iterator(h unsafe.Pointer) *QTextFrame__iterator { - if h == nil { - return nil - } - - return &QTextFrame__iterator{h: (*C.QTextFrame__iterator)(h)} + return newQTextFrame__iterator((*C.QTextFrame__iterator)(h)) } // NewQTextFrame__iterator constructs a new QTextFrame::iterator object. func NewQTextFrame__iterator() *QTextFrame__iterator { - var outptr_QTextFrame__iterator *C.QTextFrame__iterator = nil - C.QTextFrame__iterator_new(&outptr_QTextFrame__iterator) - ret := newQTextFrame__iterator(outptr_QTextFrame__iterator) + ret := newQTextFrame__iterator(C.QTextFrame__iterator_new()) ret.isSubclass = true return ret } // NewQTextFrame__iterator2 constructs a new QTextFrame::iterator object. func NewQTextFrame__iterator2(o *QTextFrame__iterator) *QTextFrame__iterator { - var outptr_QTextFrame__iterator *C.QTextFrame__iterator = nil - C.QTextFrame__iterator_new2(o.cPointer(), &outptr_QTextFrame__iterator) - ret := newQTextFrame__iterator(outptr_QTextFrame__iterator) + ret := newQTextFrame__iterator(C.QTextFrame__iterator_new2(o.cPointer())) ret.isSubclass = true return ret } @@ -1015,11 +978,11 @@ func (this *QTextFrame__iterator) OperatorAssign(o *QTextFrame__iterator) { } func (this *QTextFrame__iterator) ParentFrame() *QTextFrame { - return newQTextFrame(C.QTextFrame__iterator_ParentFrame(this.h), nil, nil) + return newQTextFrame(C.QTextFrame__iterator_ParentFrame(this.h)) } func (this *QTextFrame__iterator) CurrentFrame() *QTextFrame { - return newQTextFrame(C.QTextFrame__iterator_CurrentFrame(this.h), nil, nil) + return newQTextFrame(C.QTextFrame__iterator_CurrentFrame(this.h)) } func (this *QTextFrame__iterator) CurrentBlock() *QTextBlock { @@ -1098,34 +1061,27 @@ func newQTextBlock__iterator(h *C.QTextBlock__iterator) *QTextBlock__iterator { if h == nil { return nil } + return &QTextBlock__iterator{h: h} } // UnsafeNewQTextBlock__iterator constructs the type using only unsafe pointers. func UnsafeNewQTextBlock__iterator(h unsafe.Pointer) *QTextBlock__iterator { - if h == nil { - return nil - } - - return &QTextBlock__iterator{h: (*C.QTextBlock__iterator)(h)} + return newQTextBlock__iterator((*C.QTextBlock__iterator)(h)) } // NewQTextBlock__iterator constructs a new QTextBlock::iterator object. func NewQTextBlock__iterator() *QTextBlock__iterator { - var outptr_QTextBlock__iterator *C.QTextBlock__iterator = nil - C.QTextBlock__iterator_new(&outptr_QTextBlock__iterator) - ret := newQTextBlock__iterator(outptr_QTextBlock__iterator) + ret := newQTextBlock__iterator(C.QTextBlock__iterator_new()) ret.isSubclass = true return ret } // NewQTextBlock__iterator2 constructs a new QTextBlock::iterator object. func NewQTextBlock__iterator2(o *QTextBlock__iterator) *QTextBlock__iterator { - var outptr_QTextBlock__iterator *C.QTextBlock__iterator = nil - C.QTextBlock__iterator_new2(o.cPointer(), &outptr_QTextBlock__iterator) - ret := newQTextBlock__iterator(outptr_QTextBlock__iterator) + ret := newQTextBlock__iterator(C.QTextBlock__iterator_new2(o.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qtextobject.h b/qt/gen_qtextobject.h index d4aab01d..11f2308a 100644 --- a/qt/gen_qtextobject.h +++ b/qt/gen_qtextobject.h @@ -72,6 +72,7 @@ typedef struct QTextList QTextList; typedef struct QTextObject QTextObject; #endif +void QTextObject_virtbase(QTextObject* src, QObject** outptr_QObject); QMetaObject* QTextObject_MetaObject(const QTextObject* self); void* QTextObject_Metacast(QTextObject* self, const char* param1); struct miqt_string QTextObject_Tr(const char* s); @@ -85,6 +86,7 @@ struct miqt_string QTextObject_Tr3(const char* s, const char* c, int n); struct miqt_string QTextObject_TrUtf82(const char* s, const char* c); struct miqt_string QTextObject_TrUtf83(const char* s, const char* c, int n); +void QTextBlockGroup_virtbase(QTextBlockGroup* src, QTextObject** outptr_QTextObject); QMetaObject* QTextBlockGroup_MetaObject(const QTextBlockGroup* self); void* QTextBlockGroup_Metacast(QTextBlockGroup* self, const char* param1); struct miqt_string QTextBlockGroup_Tr(const char* s); @@ -100,7 +102,8 @@ struct miqt_string QTextBlockGroup_TrUtf83(const char* s, const char* c, int n); void QTextFrameLayoutData_OperatorAssign(QTextFrameLayoutData* self, QTextFrameLayoutData* param1); void QTextFrameLayoutData_Delete(QTextFrameLayoutData* self, bool isSubclass); -void QTextFrame_new(QTextDocument* doc, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject); +QTextFrame* QTextFrame_new(QTextDocument* doc); +void QTextFrame_virtbase(QTextFrame* src, QTextObject** outptr_QTextObject); QMetaObject* QTextFrame_MetaObject(const QTextFrame* self); void* QTextFrame_Metacast(QTextFrame* self, const char* param1); struct miqt_string QTextFrame_Tr(const char* s); @@ -126,8 +129,8 @@ void QTextFrame_Delete(QTextFrame* self, bool isSubclass); void QTextBlockUserData_OperatorAssign(QTextBlockUserData* self, QTextBlockUserData* param1); void QTextBlockUserData_Delete(QTextBlockUserData* self, bool isSubclass); -void QTextBlock_new(QTextBlock** outptr_QTextBlock); -void QTextBlock_new2(QTextBlock* o, QTextBlock** outptr_QTextBlock); +QTextBlock* QTextBlock_new(); +QTextBlock* QTextBlock_new2(QTextBlock* o); void QTextBlock_OperatorAssign(QTextBlock* self, QTextBlock* o); bool QTextBlock_IsValid(const QTextBlock* self); bool QTextBlock_OperatorEqual(const QTextBlock* self, QTextBlock* o); @@ -166,8 +169,8 @@ QTextBlock* QTextBlock_Previous(const QTextBlock* self); int QTextBlock_FragmentIndex(const QTextBlock* self); void QTextBlock_Delete(QTextBlock* self, bool isSubclass); -void QTextFragment_new(QTextFragment** outptr_QTextFragment); -void QTextFragment_new2(QTextFragment* o, QTextFragment** outptr_QTextFragment); +QTextFragment* QTextFragment_new(); +QTextFragment* QTextFragment_new2(QTextFragment* o); void QTextFragment_OperatorAssign(QTextFragment* self, QTextFragment* o); bool QTextFragment_IsValid(const QTextFragment* self); bool QTextFragment_OperatorEqual(const QTextFragment* self, QTextFragment* o); @@ -184,8 +187,8 @@ struct miqt_array /* of QGlyphRun* */ QTextFragment_GlyphRuns1(const QTextFragm struct miqt_array /* of QGlyphRun* */ QTextFragment_GlyphRuns2(const QTextFragment* self, int from, int length); void QTextFragment_Delete(QTextFragment* self, bool isSubclass); -void QTextFrame__iterator_new(QTextFrame__iterator** outptr_QTextFrame__iterator); -void QTextFrame__iterator_new2(QTextFrame__iterator* o, QTextFrame__iterator** outptr_QTextFrame__iterator); +QTextFrame__iterator* QTextFrame__iterator_new(); +QTextFrame__iterator* QTextFrame__iterator_new2(QTextFrame__iterator* o); void QTextFrame__iterator_OperatorAssign(QTextFrame__iterator* self, QTextFrame__iterator* o); QTextFrame* QTextFrame__iterator_ParentFrame(const QTextFrame__iterator* self); QTextFrame* QTextFrame__iterator_CurrentFrame(const QTextFrame__iterator* self); @@ -199,8 +202,8 @@ QTextFrame__iterator* QTextFrame__iterator_OperatorMinusMinus(QTextFrame__iterat QTextFrame__iterator* QTextFrame__iterator_OperatorMinusMinusWithInt(QTextFrame__iterator* self, int param1); void QTextFrame__iterator_Delete(QTextFrame__iterator* self, bool isSubclass); -void QTextBlock__iterator_new(QTextBlock__iterator** outptr_QTextBlock__iterator); -void QTextBlock__iterator_new2(QTextBlock__iterator* o, QTextBlock__iterator** outptr_QTextBlock__iterator); +QTextBlock__iterator* QTextBlock__iterator_new(); +QTextBlock__iterator* QTextBlock__iterator_new2(QTextBlock__iterator* o); void QTextBlock__iterator_OperatorAssign(QTextBlock__iterator* self, QTextBlock__iterator* o); QTextFragment* QTextBlock__iterator_Fragment(const QTextBlock__iterator* self); bool QTextBlock__iterator_AtEnd(const QTextBlock__iterator* self); diff --git a/qt/gen_qtextoption.cpp b/qt/gen_qtextoption.cpp index 2ee2e73d..709a3d85 100644 --- a/qt/gen_qtextoption.cpp +++ b/qt/gen_qtextoption.cpp @@ -6,19 +6,16 @@ #include "gen_qtextoption.h" #include "_cgo_export.h" -void QTextOption_new(QTextOption** outptr_QTextOption) { - QTextOption* ret = new QTextOption(); - *outptr_QTextOption = ret; +QTextOption* QTextOption_new() { + return new QTextOption(); } -void QTextOption_new2(int alignment, QTextOption** outptr_QTextOption) { - QTextOption* ret = new QTextOption(static_cast(alignment)); - *outptr_QTextOption = ret; +QTextOption* QTextOption_new2(int alignment) { + return new QTextOption(static_cast(alignment)); } -void QTextOption_new3(QTextOption* o, QTextOption** outptr_QTextOption) { - QTextOption* ret = new QTextOption(*o); - *outptr_QTextOption = ret; +QTextOption* QTextOption_new3(QTextOption* o) { + return new QTextOption(*o); } void QTextOption_OperatorAssign(QTextOption* self, QTextOption* o) { @@ -141,24 +138,20 @@ void QTextOption_Delete(QTextOption* self, bool isSubclass) { } } -void QTextOption__Tab_new(QTextOption__Tab** outptr_QTextOption__Tab) { - QTextOption::Tab* ret = new QTextOption::Tab(); - *outptr_QTextOption__Tab = ret; +QTextOption__Tab* QTextOption__Tab_new() { + return new QTextOption::Tab(); } -void QTextOption__Tab_new2(double pos, int tabType, QTextOption__Tab** outptr_QTextOption__Tab) { - QTextOption::Tab* ret = new QTextOption::Tab(static_cast(pos), static_cast(tabType)); - *outptr_QTextOption__Tab = ret; +QTextOption__Tab* QTextOption__Tab_new2(double pos, int tabType) { + return new QTextOption::Tab(static_cast(pos), static_cast(tabType)); } -void QTextOption__Tab_new3(QTextOption__Tab* param1, QTextOption__Tab** outptr_QTextOption__Tab) { - QTextOption::Tab* ret = new QTextOption::Tab(*param1); - *outptr_QTextOption__Tab = ret; +QTextOption__Tab* QTextOption__Tab_new3(QTextOption__Tab* param1) { + return new QTextOption::Tab(*param1); } -void QTextOption__Tab_new4(double pos, int tabType, QChar* delim, QTextOption__Tab** outptr_QTextOption__Tab) { - QTextOption::Tab* ret = new QTextOption::Tab(static_cast(pos), static_cast(tabType), *delim); - *outptr_QTextOption__Tab = ret; +QTextOption__Tab* QTextOption__Tab_new4(double pos, int tabType, QChar* delim) { + return new QTextOption::Tab(static_cast(pos), static_cast(tabType), *delim); } bool QTextOption__Tab_OperatorEqual(const QTextOption__Tab* self, QTextOption__Tab* other) { diff --git a/qt/gen_qtextoption.go b/qt/gen_qtextoption.go index 33f38981..a0ae401c 100644 --- a/qt/gen_qtextoption.go +++ b/qt/gen_qtextoption.go @@ -67,44 +67,35 @@ func newQTextOption(h *C.QTextOption) *QTextOption { if h == nil { return nil } + return &QTextOption{h: h} } // UnsafeNewQTextOption constructs the type using only unsafe pointers. func UnsafeNewQTextOption(h unsafe.Pointer) *QTextOption { - if h == nil { - return nil - } - - return &QTextOption{h: (*C.QTextOption)(h)} + return newQTextOption((*C.QTextOption)(h)) } // NewQTextOption constructs a new QTextOption object. func NewQTextOption() *QTextOption { - var outptr_QTextOption *C.QTextOption = nil - C.QTextOption_new(&outptr_QTextOption) - ret := newQTextOption(outptr_QTextOption) + ret := newQTextOption(C.QTextOption_new()) ret.isSubclass = true return ret } // NewQTextOption2 constructs a new QTextOption object. func NewQTextOption2(alignment AlignmentFlag) *QTextOption { - var outptr_QTextOption *C.QTextOption = nil - C.QTextOption_new2((C.int)(alignment), &outptr_QTextOption) - ret := newQTextOption(outptr_QTextOption) + ret := newQTextOption(C.QTextOption_new2((C.int)(alignment))) ret.isSubclass = true return ret } // NewQTextOption3 constructs a new QTextOption object. func NewQTextOption3(o *QTextOption) *QTextOption { - var outptr_QTextOption *C.QTextOption = nil - C.QTextOption_new3(o.cPointer(), &outptr_QTextOption) - ret := newQTextOption(outptr_QTextOption) + ret := newQTextOption(C.QTextOption_new3(o.cPointer())) ret.isSubclass = true return ret } @@ -249,54 +240,43 @@ func newQTextOption__Tab(h *C.QTextOption__Tab) *QTextOption__Tab { if h == nil { return nil } + return &QTextOption__Tab{h: h} } // UnsafeNewQTextOption__Tab constructs the type using only unsafe pointers. func UnsafeNewQTextOption__Tab(h unsafe.Pointer) *QTextOption__Tab { - if h == nil { - return nil - } - - return &QTextOption__Tab{h: (*C.QTextOption__Tab)(h)} + return newQTextOption__Tab((*C.QTextOption__Tab)(h)) } // NewQTextOption__Tab constructs a new QTextOption::Tab object. func NewQTextOption__Tab() *QTextOption__Tab { - var outptr_QTextOption__Tab *C.QTextOption__Tab = nil - C.QTextOption__Tab_new(&outptr_QTextOption__Tab) - ret := newQTextOption__Tab(outptr_QTextOption__Tab) + ret := newQTextOption__Tab(C.QTextOption__Tab_new()) ret.isSubclass = true return ret } // NewQTextOption__Tab2 constructs a new QTextOption::Tab object. func NewQTextOption__Tab2(pos float64, tabType QTextOption__TabType) *QTextOption__Tab { - var outptr_QTextOption__Tab *C.QTextOption__Tab = nil - C.QTextOption__Tab_new2((C.double)(pos), (C.int)(tabType), &outptr_QTextOption__Tab) - ret := newQTextOption__Tab(outptr_QTextOption__Tab) + ret := newQTextOption__Tab(C.QTextOption__Tab_new2((C.double)(pos), (C.int)(tabType))) ret.isSubclass = true return ret } // NewQTextOption__Tab3 constructs a new QTextOption::Tab object. func NewQTextOption__Tab3(param1 *QTextOption__Tab) *QTextOption__Tab { - var outptr_QTextOption__Tab *C.QTextOption__Tab = nil - C.QTextOption__Tab_new3(param1.cPointer(), &outptr_QTextOption__Tab) - ret := newQTextOption__Tab(outptr_QTextOption__Tab) + ret := newQTextOption__Tab(C.QTextOption__Tab_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQTextOption__Tab4 constructs a new QTextOption::Tab object. func NewQTextOption__Tab4(pos float64, tabType QTextOption__TabType, delim QChar) *QTextOption__Tab { - var outptr_QTextOption__Tab *C.QTextOption__Tab = nil - C.QTextOption__Tab_new4((C.double)(pos), (C.int)(tabType), delim.cPointer(), &outptr_QTextOption__Tab) - ret := newQTextOption__Tab(outptr_QTextOption__Tab) + ret := newQTextOption__Tab(C.QTextOption__Tab_new4((C.double)(pos), (C.int)(tabType), delim.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qtextoption.h b/qt/gen_qtextoption.h index 321cd8b9..3fd0dfdb 100644 --- a/qt/gen_qtextoption.h +++ b/qt/gen_qtextoption.h @@ -28,9 +28,9 @@ typedef struct QTextOption QTextOption; typedef struct QTextOption__Tab QTextOption__Tab; #endif -void QTextOption_new(QTextOption** outptr_QTextOption); -void QTextOption_new2(int alignment, QTextOption** outptr_QTextOption); -void QTextOption_new3(QTextOption* o, QTextOption** outptr_QTextOption); +QTextOption* QTextOption_new(); +QTextOption* QTextOption_new2(int alignment); +QTextOption* QTextOption_new3(QTextOption* o); void QTextOption_OperatorAssign(QTextOption* self, QTextOption* o); void QTextOption_SetAlignment(QTextOption* self, int alignment); int QTextOption_Alignment(const QTextOption* self); @@ -52,10 +52,10 @@ void QTextOption_SetUseDesignMetrics(QTextOption* self, bool b); bool QTextOption_UseDesignMetrics(const QTextOption* self); void QTextOption_Delete(QTextOption* self, bool isSubclass); -void QTextOption__Tab_new(QTextOption__Tab** outptr_QTextOption__Tab); -void QTextOption__Tab_new2(double pos, int tabType, QTextOption__Tab** outptr_QTextOption__Tab); -void QTextOption__Tab_new3(QTextOption__Tab* param1, QTextOption__Tab** outptr_QTextOption__Tab); -void QTextOption__Tab_new4(double pos, int tabType, QChar* delim, QTextOption__Tab** outptr_QTextOption__Tab); +QTextOption__Tab* QTextOption__Tab_new(); +QTextOption__Tab* QTextOption__Tab_new2(double pos, int tabType); +QTextOption__Tab* QTextOption__Tab_new3(QTextOption__Tab* param1); +QTextOption__Tab* QTextOption__Tab_new4(double pos, int tabType, QChar* delim); bool QTextOption__Tab_OperatorEqual(const QTextOption__Tab* self, QTextOption__Tab* other); bool QTextOption__Tab_OperatorNotEqual(const QTextOption__Tab* self, QTextOption__Tab* other); void QTextOption__Tab_Delete(QTextOption__Tab* self, bool isSubclass); diff --git a/qt/gen_qtextstream.cpp b/qt/gen_qtextstream.cpp index a068c76e..797744c0 100644 --- a/qt/gen_qtextstream.cpp +++ b/qt/gen_qtextstream.cpp @@ -11,26 +11,22 @@ #include "gen_qtextstream.h" #include "_cgo_export.h" -void QTextStream_new(QTextStream** outptr_QTextStream) { - QTextStream* ret = new QTextStream(); - *outptr_QTextStream = ret; +QTextStream* QTextStream_new() { + return new QTextStream(); } -void QTextStream_new2(QIODevice* device, QTextStream** outptr_QTextStream) { - QTextStream* ret = new QTextStream(device); - *outptr_QTextStream = ret; +QTextStream* QTextStream_new2(QIODevice* device) { + return new QTextStream(device); } -void QTextStream_new3(struct miqt_string array, QTextStream** outptr_QTextStream) { +QTextStream* QTextStream_new3(struct miqt_string array) { QByteArray array_QByteArray(array.data, array.len); - QTextStream* ret = new QTextStream(array_QByteArray); - *outptr_QTextStream = ret; + return new QTextStream(array_QByteArray); } -void QTextStream_new4(struct miqt_string array, int openMode, QTextStream** outptr_QTextStream) { +QTextStream* QTextStream_new4(struct miqt_string array, int openMode) { QByteArray array_QByteArray(array.data, array.len); - QTextStream* ret = new QTextStream(array_QByteArray, static_cast(openMode)); - *outptr_QTextStream = ret; + return new QTextStream(array_QByteArray, static_cast(openMode)); } void QTextStream_SetCodec(QTextStream* self, QTextCodec* codec) { diff --git a/qt/gen_qtextstream.go b/qt/gen_qtextstream.go index 93a251b5..d2d999c2 100644 --- a/qt/gen_qtextstream.go +++ b/qt/gen_qtextstream.go @@ -73,34 +73,27 @@ func newQTextStream(h *C.QTextStream) *QTextStream { if h == nil { return nil } + return &QTextStream{h: h} } // UnsafeNewQTextStream constructs the type using only unsafe pointers. func UnsafeNewQTextStream(h unsafe.Pointer) *QTextStream { - if h == nil { - return nil - } - - return &QTextStream{h: (*C.QTextStream)(h)} + return newQTextStream((*C.QTextStream)(h)) } // NewQTextStream constructs a new QTextStream object. func NewQTextStream() *QTextStream { - var outptr_QTextStream *C.QTextStream = nil - C.QTextStream_new(&outptr_QTextStream) - ret := newQTextStream(outptr_QTextStream) + ret := newQTextStream(C.QTextStream_new()) ret.isSubclass = true return ret } // NewQTextStream2 constructs a new QTextStream object. func NewQTextStream2(device *QIODevice) *QTextStream { - var outptr_QTextStream *C.QTextStream = nil - C.QTextStream_new2(device.cPointer(), &outptr_QTextStream) - ret := newQTextStream(outptr_QTextStream) + ret := newQTextStream(C.QTextStream_new2(device.cPointer())) ret.isSubclass = true return ret } @@ -110,10 +103,8 @@ func NewQTextStream3(array []byte) *QTextStream { array_alias := C.struct_miqt_string{} array_alias.data = (*C.char)(unsafe.Pointer(&array[0])) array_alias.len = C.size_t(len(array)) - var outptr_QTextStream *C.QTextStream = nil - C.QTextStream_new3(array_alias, &outptr_QTextStream) - ret := newQTextStream(outptr_QTextStream) + ret := newQTextStream(C.QTextStream_new3(array_alias)) ret.isSubclass = true return ret } @@ -123,10 +114,8 @@ func NewQTextStream4(array []byte, openMode QIODevice__OpenModeFlag) *QTextStrea array_alias := C.struct_miqt_string{} array_alias.data = (*C.char)(unsafe.Pointer(&array[0])) array_alias.len = C.size_t(len(array)) - var outptr_QTextStream *C.QTextStream = nil - C.QTextStream_new4(array_alias, (C.int)(openMode), &outptr_QTextStream) - ret := newQTextStream(outptr_QTextStream) + ret := newQTextStream(C.QTextStream_new4(array_alias, (C.int)(openMode))) ret.isSubclass = true return ret } @@ -176,7 +165,7 @@ func (this *QTextStream) SetDevice(device *QIODevice) { } func (this *QTextStream) Device() *QIODevice { - return newQIODevice(C.QTextStream_Device(this.h), nil) + return newQIODevice(C.QTextStream_Device(this.h)) } func (this *QTextStream) String() string { diff --git a/qt/gen_qtextstream.h b/qt/gen_qtextstream.h index 976ae10d..926171f4 100644 --- a/qt/gen_qtextstream.h +++ b/qt/gen_qtextstream.h @@ -28,10 +28,10 @@ typedef struct QTextCodec QTextCodec; typedef struct QTextStream QTextStream; #endif -void QTextStream_new(QTextStream** outptr_QTextStream); -void QTextStream_new2(QIODevice* device, QTextStream** outptr_QTextStream); -void QTextStream_new3(struct miqt_string array, QTextStream** outptr_QTextStream); -void QTextStream_new4(struct miqt_string array, int openMode, QTextStream** outptr_QTextStream); +QTextStream* QTextStream_new(); +QTextStream* QTextStream_new2(QIODevice* device); +QTextStream* QTextStream_new3(struct miqt_string array); +QTextStream* QTextStream_new4(struct miqt_string array, int openMode); void QTextStream_SetCodec(QTextStream* self, QTextCodec* codec); void QTextStream_SetCodecWithCodecName(QTextStream* self, const char* codecName); QTextCodec* QTextStream_Codec(const QTextStream* self); diff --git a/qt/gen_qtexttable.cpp b/qt/gen_qtexttable.cpp index eaa70a71..443e61fa 100644 --- a/qt/gen_qtexttable.cpp +++ b/qt/gen_qtexttable.cpp @@ -16,14 +16,12 @@ #include "gen_qtexttable.h" #include "_cgo_export.h" -void QTextTableCell_new(QTextTableCell** outptr_QTextTableCell) { - QTextTableCell* ret = new QTextTableCell(); - *outptr_QTextTableCell = ret; +QTextTableCell* QTextTableCell_new() { + return new QTextTableCell(); } -void QTextTableCell_new2(QTextTableCell* o, QTextTableCell** outptr_QTextTableCell) { - QTextTableCell* ret = new QTextTableCell(*o); - *outptr_QTextTableCell = ret; +QTextTableCell* QTextTableCell_new2(QTextTableCell* o) { + return new QTextTableCell(*o); } void QTextTableCell_OperatorAssign(QTextTableCell* self, QTextTableCell* o) { @@ -102,12 +100,12 @@ void QTextTableCell_Delete(QTextTableCell* self, bool isSubclass) { } } -void QTextTable_new(QTextDocument* doc, QTextTable** outptr_QTextTable, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject) { - QTextTable* ret = new QTextTable(doc); - *outptr_QTextTable = ret; - *outptr_QTextFrame = static_cast(ret); - *outptr_QTextObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTextTable* QTextTable_new(QTextDocument* doc) { + return new QTextTable(doc); +} + +void QTextTable_virtbase(QTextTable* src, QTextFrame** outptr_QTextFrame) { + *outptr_QTextFrame = static_cast(src); } QMetaObject* QTextTable_MetaObject(const QTextTable* self) { diff --git a/qt/gen_qtexttable.go b/qt/gen_qtexttable.go index 8e8ed8a5..72540f46 100644 --- a/qt/gen_qtexttable.go +++ b/qt/gen_qtexttable.go @@ -37,34 +37,27 @@ func newQTextTableCell(h *C.QTextTableCell) *QTextTableCell { if h == nil { return nil } + return &QTextTableCell{h: h} } // UnsafeNewQTextTableCell constructs the type using only unsafe pointers. func UnsafeNewQTextTableCell(h unsafe.Pointer) *QTextTableCell { - if h == nil { - return nil - } - - return &QTextTableCell{h: (*C.QTextTableCell)(h)} + return newQTextTableCell((*C.QTextTableCell)(h)) } // NewQTextTableCell constructs a new QTextTableCell object. func NewQTextTableCell() *QTextTableCell { - var outptr_QTextTableCell *C.QTextTableCell = nil - C.QTextTableCell_new(&outptr_QTextTableCell) - ret := newQTextTableCell(outptr_QTextTableCell) + ret := newQTextTableCell(C.QTextTableCell_new()) ret.isSubclass = true return ret } // NewQTextTableCell2 constructs a new QTextTableCell object. func NewQTextTableCell2(o *QTextTableCell) *QTextTableCell { - var outptr_QTextTableCell *C.QTextTableCell = nil - C.QTextTableCell_new2(o.cPointer(), &outptr_QTextTableCell) - ret := newQTextTableCell(outptr_QTextTableCell) + ret := newQTextTableCell(C.QTextTableCell_new2(o.cPointer())) ret.isSubclass = true return ret } @@ -78,7 +71,7 @@ func (this *QTextTableCell) SetFormat(format *QTextCharFormat) { } func (this *QTextTableCell) Format() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QTextTableCell_Format(this.h), nil) + _goptr := newQTextCharFormat(C.QTextTableCell_Format(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -182,33 +175,26 @@ func (this *QTextTable) UnsafePointer() unsafe.Pointer { } // newQTextTable constructs the type using only CGO pointers. -func newQTextTable(h *C.QTextTable, h_QTextFrame *C.QTextFrame, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextTable { +func newQTextTable(h *C.QTextTable) *QTextTable { if h == nil { return nil } + var outptr_QTextFrame *C.QTextFrame = nil + C.QTextTable_virtbase(h, &outptr_QTextFrame) + return &QTextTable{h: h, - QTextFrame: newQTextFrame(h_QTextFrame, h_QTextObject, h_QObject)} + QTextFrame: newQTextFrame(outptr_QTextFrame)} } // UnsafeNewQTextTable constructs the type using only unsafe pointers. -func UnsafeNewQTextTable(h unsafe.Pointer, h_QTextFrame unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextTable { - if h == nil { - return nil - } - - return &QTextTable{h: (*C.QTextTable)(h), - QTextFrame: UnsafeNewQTextFrame(h_QTextFrame, h_QTextObject, h_QObject)} +func UnsafeNewQTextTable(h unsafe.Pointer) *QTextTable { + return newQTextTable((*C.QTextTable)(h)) } // NewQTextTable constructs a new QTextTable object. func NewQTextTable(doc *QTextDocument) *QTextTable { - var outptr_QTextTable *C.QTextTable = nil - var outptr_QTextFrame *C.QTextFrame = nil - var outptr_QTextObject *C.QTextObject = nil - var outptr_QObject *C.QObject = nil - C.QTextTable_new(doc.cPointer(), &outptr_QTextTable, &outptr_QTextFrame, &outptr_QTextObject, &outptr_QObject) - ret := newQTextTable(outptr_QTextTable, outptr_QTextFrame, outptr_QTextObject, outptr_QObject) + ret := newQTextTable(C.QTextTable_new(doc.cPointer())) ret.isSubclass = true return ret } @@ -324,7 +310,7 @@ func (this *QTextTable) SetFormat(format *QTextTableFormat) { } func (this *QTextTable) Format() *QTextTableFormat { - _goptr := newQTextTableFormat(C.QTextTable_Format(this.h), nil, nil) + _goptr := newQTextTableFormat(C.QTextTable_Format(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/gen_qtexttable.h b/qt/gen_qtexttable.h index 39621830..212d9070 100644 --- a/qt/gen_qtexttable.h +++ b/qt/gen_qtexttable.h @@ -44,8 +44,8 @@ typedef struct QTextTableCell QTextTableCell; typedef struct QTextTableFormat QTextTableFormat; #endif -void QTextTableCell_new(QTextTableCell** outptr_QTextTableCell); -void QTextTableCell_new2(QTextTableCell* o, QTextTableCell** outptr_QTextTableCell); +QTextTableCell* QTextTableCell_new(); +QTextTableCell* QTextTableCell_new2(QTextTableCell* o); void QTextTableCell_OperatorAssign(QTextTableCell* self, QTextTableCell* o); void QTextTableCell_SetFormat(QTextTableCell* self, QTextCharFormat* format); QTextCharFormat* QTextTableCell_Format(const QTextTableCell* self); @@ -65,7 +65,8 @@ QTextFrame__iterator* QTextTableCell_End(const QTextTableCell* self); int QTextTableCell_TableCellFormatIndex(const QTextTableCell* self); void QTextTableCell_Delete(QTextTableCell* self, bool isSubclass); -void QTextTable_new(QTextDocument* doc, QTextTable** outptr_QTextTable, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject); +QTextTable* QTextTable_new(QTextDocument* doc); +void QTextTable_virtbase(QTextTable* src, QTextFrame** outptr_QTextFrame); QMetaObject* QTextTable_MetaObject(const QTextTable* self); void* QTextTable_Metacast(QTextTable* self, const char* param1); struct miqt_string QTextTable_Tr(const char* s); diff --git a/qt/gen_qthread.cpp b/qt/gen_qthread.cpp index 8c90cb63..9dff88d7 100644 --- a/qt/gen_qthread.cpp +++ b/qt/gen_qthread.cpp @@ -218,16 +218,16 @@ public: }; -void QThread_new(QThread** outptr_QThread, QObject** outptr_QObject) { - MiqtVirtualQThread* ret = new MiqtVirtualQThread(); - *outptr_QThread = ret; - *outptr_QObject = static_cast(ret); +QThread* QThread_new() { + return new MiqtVirtualQThread(); } -void QThread_new2(QObject* parent, QThread** outptr_QThread, QObject** outptr_QObject) { - MiqtVirtualQThread* ret = new MiqtVirtualQThread(parent); - *outptr_QThread = ret; - *outptr_QObject = static_cast(ret); +QThread* QThread_new2(QObject* parent) { + return new MiqtVirtualQThread(parent); +} + +void QThread_virtbase(QThread* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QThread_MetaObject(const QThread* self) { diff --git a/qt/gen_qthread.go b/qt/gen_qthread.go index fbf0aa14..d33e9e51 100644 --- a/qt/gen_qthread.go +++ b/qt/gen_qthread.go @@ -48,42 +48,34 @@ func (this *QThread) UnsafePointer() unsafe.Pointer { } // newQThread constructs the type using only CGO pointers. -func newQThread(h *C.QThread, h_QObject *C.QObject) *QThread { +func newQThread(h *C.QThread) *QThread { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QThread_virtbase(h, &outptr_QObject) + return &QThread{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQThread constructs the type using only unsafe pointers. -func UnsafeNewQThread(h unsafe.Pointer, h_QObject unsafe.Pointer) *QThread { - if h == nil { - return nil - } - - return &QThread{h: (*C.QThread)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQThread(h unsafe.Pointer) *QThread { + return newQThread((*C.QThread)(h)) } // NewQThread constructs a new QThread object. func NewQThread() *QThread { - var outptr_QThread *C.QThread = nil - var outptr_QObject *C.QObject = nil - C.QThread_new(&outptr_QThread, &outptr_QObject) - ret := newQThread(outptr_QThread, outptr_QObject) + ret := newQThread(C.QThread_new()) ret.isSubclass = true return ret } // NewQThread2 constructs a new QThread object. func NewQThread2(parent *QObject) *QThread { - var outptr_QThread *C.QThread = nil - var outptr_QObject *C.QObject = nil - C.QThread_new2(parent.cPointer(), &outptr_QThread, &outptr_QObject) - ret := newQThread(outptr_QThread, outptr_QObject) + ret := newQThread(C.QThread_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -121,7 +113,7 @@ func QThread_CurrentThreadId() unsafe.Pointer { } func QThread_CurrentThread() *QThread { - return newQThread(C.QThread_CurrentThread(), nil) + return newQThread(C.QThread_CurrentThread()) } func QThread_IdealThreadCount() int { @@ -169,7 +161,7 @@ func (this *QThread) Exit() { } func (this *QThread) EventDispatcher() *QAbstractEventDispatcher { - return newQAbstractEventDispatcher(C.QThread_EventDispatcher(this.h), nil) + return newQAbstractEventDispatcher(C.QThread_EventDispatcher(this.h)) } func (this *QThread) SetEventDispatcher(eventDispatcher *QAbstractEventDispatcher) { @@ -373,7 +365,7 @@ func miqt_exec_callback_QThread_TimerEvent(self *C.QThread, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QThread{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -399,7 +391,7 @@ func miqt_exec_callback_QThread_ChildEvent(self *C.QThread, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QThread{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qthread.h b/qt/gen_qthread.h index af41839a..d794c654 100644 --- a/qt/gen_qthread.h +++ b/qt/gen_qthread.h @@ -36,8 +36,9 @@ typedef struct QThread QThread; typedef struct QTimerEvent QTimerEvent; #endif -void QThread_new(QThread** outptr_QThread, QObject** outptr_QObject); -void QThread_new2(QObject* parent, QThread** outptr_QThread, QObject** outptr_QObject); +QThread* QThread_new(); +QThread* QThread_new2(QObject* parent); +void QThread_virtbase(QThread* src, QObject** outptr_QObject); QMetaObject* QThread_MetaObject(const QThread* self); void* QThread_Metacast(QThread* self, const char* param1); struct miqt_string QThread_Tr(const char* s); diff --git a/qt/gen_qthreadpool.cpp b/qt/gen_qthreadpool.cpp index a1c00d96..937371e2 100644 --- a/qt/gen_qthreadpool.cpp +++ b/qt/gen_qthreadpool.cpp @@ -195,16 +195,16 @@ public: }; -void QThreadPool_new(QThreadPool** outptr_QThreadPool, QObject** outptr_QObject) { - MiqtVirtualQThreadPool* ret = new MiqtVirtualQThreadPool(); - *outptr_QThreadPool = ret; - *outptr_QObject = static_cast(ret); +QThreadPool* QThreadPool_new() { + return new MiqtVirtualQThreadPool(); } -void QThreadPool_new2(QObject* parent, QThreadPool** outptr_QThreadPool, QObject** outptr_QObject) { - MiqtVirtualQThreadPool* ret = new MiqtVirtualQThreadPool(parent); - *outptr_QThreadPool = ret; - *outptr_QObject = static_cast(ret); +QThreadPool* QThreadPool_new2(QObject* parent) { + return new MiqtVirtualQThreadPool(parent); +} + +void QThreadPool_virtbase(QThreadPool* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QThreadPool_MetaObject(const QThreadPool* self) { diff --git a/qt/gen_qthreadpool.go b/qt/gen_qthreadpool.go index a99d3975..3b20f246 100644 --- a/qt/gen_qthreadpool.go +++ b/qt/gen_qthreadpool.go @@ -35,42 +35,34 @@ func (this *QThreadPool) UnsafePointer() unsafe.Pointer { } // newQThreadPool constructs the type using only CGO pointers. -func newQThreadPool(h *C.QThreadPool, h_QObject *C.QObject) *QThreadPool { +func newQThreadPool(h *C.QThreadPool) *QThreadPool { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QThreadPool_virtbase(h, &outptr_QObject) + return &QThreadPool{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQThreadPool constructs the type using only unsafe pointers. -func UnsafeNewQThreadPool(h unsafe.Pointer, h_QObject unsafe.Pointer) *QThreadPool { - if h == nil { - return nil - } - - return &QThreadPool{h: (*C.QThreadPool)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQThreadPool(h unsafe.Pointer) *QThreadPool { + return newQThreadPool((*C.QThreadPool)(h)) } // NewQThreadPool constructs a new QThreadPool object. func NewQThreadPool() *QThreadPool { - var outptr_QThreadPool *C.QThreadPool = nil - var outptr_QObject *C.QObject = nil - C.QThreadPool_new(&outptr_QThreadPool, &outptr_QObject) - ret := newQThreadPool(outptr_QThreadPool, outptr_QObject) + ret := newQThreadPool(C.QThreadPool_new()) ret.isSubclass = true return ret } // NewQThreadPool2 constructs a new QThreadPool object. func NewQThreadPool2(parent *QObject) *QThreadPool { - var outptr_QThreadPool *C.QThreadPool = nil - var outptr_QObject *C.QObject = nil - C.QThreadPool_new2(parent.cPointer(), &outptr_QThreadPool, &outptr_QObject) - ret := newQThreadPool(outptr_QThreadPool, outptr_QObject) + ret := newQThreadPool(C.QThreadPool_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -104,7 +96,7 @@ func QThreadPool_TrUtf8(s string) string { } func QThreadPool_GlobalInstance() *QThreadPool { - return newQThreadPool(C.QThreadPool_GlobalInstance(), nil) + return newQThreadPool(C.QThreadPool_GlobalInstance()) } func (this *QThreadPool) Start(runnable *QRunnable) { @@ -301,7 +293,7 @@ func miqt_exec_callback_QThreadPool_TimerEvent(self *C.QThreadPool, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QThreadPool{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -327,7 +319,7 @@ func miqt_exec_callback_QThreadPool_ChildEvent(self *C.QThreadPool, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QThreadPool{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qthreadpool.h b/qt/gen_qthreadpool.h index d3b52f7e..aaacdcf7 100644 --- a/qt/gen_qthreadpool.h +++ b/qt/gen_qthreadpool.h @@ -36,8 +36,9 @@ typedef struct QThreadPool QThreadPool; typedef struct QTimerEvent QTimerEvent; #endif -void QThreadPool_new(QThreadPool** outptr_QThreadPool, QObject** outptr_QObject); -void QThreadPool_new2(QObject* parent, QThreadPool** outptr_QThreadPool, QObject** outptr_QObject); +QThreadPool* QThreadPool_new(); +QThreadPool* QThreadPool_new2(QObject* parent); +void QThreadPool_virtbase(QThreadPool* src, QObject** outptr_QObject); QMetaObject* QThreadPool_MetaObject(const QThreadPool* self); void* QThreadPool_Metacast(QThreadPool* self, const char* param1); struct miqt_string QThreadPool_Tr(const char* s); diff --git a/qt/gen_qthreadstorage.cpp b/qt/gen_qthreadstorage.cpp index e694cada..f9f9ef4d 100644 --- a/qt/gen_qthreadstorage.cpp +++ b/qt/gen_qthreadstorage.cpp @@ -3,9 +3,8 @@ #include "gen_qthreadstorage.h" #include "_cgo_export.h" -void QThreadStorageData_new(QThreadStorageData* param1, QThreadStorageData** outptr_QThreadStorageData) { - QThreadStorageData* ret = new QThreadStorageData(*param1); - *outptr_QThreadStorageData = ret; +QThreadStorageData* QThreadStorageData_new(QThreadStorageData* param1) { + return new QThreadStorageData(*param1); } void QThreadStorageData_Delete(QThreadStorageData* self, bool isSubclass) { diff --git a/qt/gen_qthreadstorage.go b/qt/gen_qthreadstorage.go index 314dbf54..09872659 100644 --- a/qt/gen_qthreadstorage.go +++ b/qt/gen_qthreadstorage.go @@ -37,24 +37,19 @@ func newQThreadStorageData(h *C.QThreadStorageData) *QThreadStorageData { if h == nil { return nil } + return &QThreadStorageData{h: h} } // UnsafeNewQThreadStorageData constructs the type using only unsafe pointers. func UnsafeNewQThreadStorageData(h unsafe.Pointer) *QThreadStorageData { - if h == nil { - return nil - } - - return &QThreadStorageData{h: (*C.QThreadStorageData)(h)} + return newQThreadStorageData((*C.QThreadStorageData)(h)) } // NewQThreadStorageData constructs a new QThreadStorageData object. func NewQThreadStorageData(param1 *QThreadStorageData) *QThreadStorageData { - var outptr_QThreadStorageData *C.QThreadStorageData = nil - C.QThreadStorageData_new(param1.cPointer(), &outptr_QThreadStorageData) - ret := newQThreadStorageData(outptr_QThreadStorageData) + ret := newQThreadStorageData(C.QThreadStorageData_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qthreadstorage.h b/qt/gen_qthreadstorage.h index 6895508c..84c71108 100644 --- a/qt/gen_qthreadstorage.h +++ b/qt/gen_qthreadstorage.h @@ -20,7 +20,7 @@ class QThreadStorageData; typedef struct QThreadStorageData QThreadStorageData; #endif -void QThreadStorageData_new(QThreadStorageData* param1, QThreadStorageData** outptr_QThreadStorageData); +QThreadStorageData* QThreadStorageData_new(QThreadStorageData* param1); void QThreadStorageData_Delete(QThreadStorageData* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/gen_qtimeline.cpp b/qt/gen_qtimeline.cpp index 5694ce46..586be0a2 100644 --- a/qt/gen_qtimeline.cpp +++ b/qt/gen_qtimeline.cpp @@ -219,22 +219,20 @@ public: }; -void QTimeLine_new(QTimeLine** outptr_QTimeLine, QObject** outptr_QObject) { - MiqtVirtualQTimeLine* ret = new MiqtVirtualQTimeLine(); - *outptr_QTimeLine = ret; - *outptr_QObject = static_cast(ret); +QTimeLine* QTimeLine_new() { + return new MiqtVirtualQTimeLine(); } -void QTimeLine_new2(int duration, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject) { - MiqtVirtualQTimeLine* ret = new MiqtVirtualQTimeLine(static_cast(duration)); - *outptr_QTimeLine = ret; - *outptr_QObject = static_cast(ret); +QTimeLine* QTimeLine_new2(int duration) { + return new MiqtVirtualQTimeLine(static_cast(duration)); } -void QTimeLine_new3(int duration, QObject* parent, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject) { - MiqtVirtualQTimeLine* ret = new MiqtVirtualQTimeLine(static_cast(duration), parent); - *outptr_QTimeLine = ret; - *outptr_QObject = static_cast(ret); +QTimeLine* QTimeLine_new3(int duration, QObject* parent) { + return new MiqtVirtualQTimeLine(static_cast(duration), parent); +} + +void QTimeLine_virtbase(QTimeLine* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QTimeLine_MetaObject(const QTimeLine* self) { diff --git a/qt/gen_qtimeline.go b/qt/gen_qtimeline.go index ca98d417..0e7b958f 100644 --- a/qt/gen_qtimeline.go +++ b/qt/gen_qtimeline.go @@ -61,53 +61,42 @@ func (this *QTimeLine) UnsafePointer() unsafe.Pointer { } // newQTimeLine constructs the type using only CGO pointers. -func newQTimeLine(h *C.QTimeLine, h_QObject *C.QObject) *QTimeLine { +func newQTimeLine(h *C.QTimeLine) *QTimeLine { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QTimeLine_virtbase(h, &outptr_QObject) + return &QTimeLine{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQTimeLine constructs the type using only unsafe pointers. -func UnsafeNewQTimeLine(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTimeLine { - if h == nil { - return nil - } - - return &QTimeLine{h: (*C.QTimeLine)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQTimeLine(h unsafe.Pointer) *QTimeLine { + return newQTimeLine((*C.QTimeLine)(h)) } // NewQTimeLine constructs a new QTimeLine object. func NewQTimeLine() *QTimeLine { - var outptr_QTimeLine *C.QTimeLine = nil - var outptr_QObject *C.QObject = nil - C.QTimeLine_new(&outptr_QTimeLine, &outptr_QObject) - ret := newQTimeLine(outptr_QTimeLine, outptr_QObject) + ret := newQTimeLine(C.QTimeLine_new()) ret.isSubclass = true return ret } // NewQTimeLine2 constructs a new QTimeLine object. func NewQTimeLine2(duration int) *QTimeLine { - var outptr_QTimeLine *C.QTimeLine = nil - var outptr_QObject *C.QObject = nil - C.QTimeLine_new2((C.int)(duration), &outptr_QTimeLine, &outptr_QObject) - ret := newQTimeLine(outptr_QTimeLine, outptr_QObject) + ret := newQTimeLine(C.QTimeLine_new2((C.int)(duration))) ret.isSubclass = true return ret } // NewQTimeLine3 constructs a new QTimeLine object. func NewQTimeLine3(duration int, parent *QObject) *QTimeLine { - var outptr_QTimeLine *C.QTimeLine = nil - var outptr_QObject *C.QObject = nil - C.QTimeLine_new3((C.int)(duration), parent.cPointer(), &outptr_QTimeLine, &outptr_QObject) - ret := newQTimeLine(outptr_QTimeLine, outptr_QObject) + ret := newQTimeLine(C.QTimeLine_new3((C.int)(duration), parent.cPointer())) ret.isSubclass = true return ret } @@ -350,7 +339,7 @@ func miqt_exec_callback_QTimeLine_TimerEvent(self *C.QTimeLine, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTimeLine{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -434,7 +423,7 @@ func miqt_exec_callback_QTimeLine_ChildEvent(self *C.QTimeLine, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QTimeLine{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qtimeline.h b/qt/gen_qtimeline.h index 915f4798..36c15571 100644 --- a/qt/gen_qtimeline.h +++ b/qt/gen_qtimeline.h @@ -34,9 +34,10 @@ typedef struct QTimeLine QTimeLine; typedef struct QTimerEvent QTimerEvent; #endif -void QTimeLine_new(QTimeLine** outptr_QTimeLine, QObject** outptr_QObject); -void QTimeLine_new2(int duration, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject); -void QTimeLine_new3(int duration, QObject* parent, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject); +QTimeLine* QTimeLine_new(); +QTimeLine* QTimeLine_new2(int duration); +QTimeLine* QTimeLine_new3(int duration, QObject* parent); +void QTimeLine_virtbase(QTimeLine* src, QObject** outptr_QObject); QMetaObject* QTimeLine_MetaObject(const QTimeLine* self); void* QTimeLine_Metacast(QTimeLine* self, const char* param1); struct miqt_string QTimeLine_Tr(const char* s); diff --git a/qt/gen_qtimer.cpp b/qt/gen_qtimer.cpp index 31683528..395f8a6b 100644 --- a/qt/gen_qtimer.cpp +++ b/qt/gen_qtimer.cpp @@ -193,16 +193,16 @@ public: }; -void QTimer_new(QTimer** outptr_QTimer, QObject** outptr_QObject) { - MiqtVirtualQTimer* ret = new MiqtVirtualQTimer(); - *outptr_QTimer = ret; - *outptr_QObject = static_cast(ret); +QTimer* QTimer_new() { + return new MiqtVirtualQTimer(); } -void QTimer_new2(QObject* parent, QTimer** outptr_QTimer, QObject** outptr_QObject) { - MiqtVirtualQTimer* ret = new MiqtVirtualQTimer(parent); - *outptr_QTimer = ret; - *outptr_QObject = static_cast(ret); +QTimer* QTimer_new2(QObject* parent) { + return new MiqtVirtualQTimer(parent); +} + +void QTimer_virtbase(QTimer* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QTimer_MetaObject(const QTimer* self) { diff --git a/qt/gen_qtimer.go b/qt/gen_qtimer.go index adfb214f..dff39c1c 100644 --- a/qt/gen_qtimer.go +++ b/qt/gen_qtimer.go @@ -35,42 +35,34 @@ func (this *QTimer) UnsafePointer() unsafe.Pointer { } // newQTimer constructs the type using only CGO pointers. -func newQTimer(h *C.QTimer, h_QObject *C.QObject) *QTimer { +func newQTimer(h *C.QTimer) *QTimer { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QTimer_virtbase(h, &outptr_QObject) + return &QTimer{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQTimer constructs the type using only unsafe pointers. -func UnsafeNewQTimer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTimer { - if h == nil { - return nil - } - - return &QTimer{h: (*C.QTimer)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQTimer(h unsafe.Pointer) *QTimer { + return newQTimer((*C.QTimer)(h)) } // NewQTimer constructs a new QTimer object. func NewQTimer() *QTimer { - var outptr_QTimer *C.QTimer = nil - var outptr_QObject *C.QObject = nil - C.QTimer_new(&outptr_QTimer, &outptr_QObject) - ret := newQTimer(outptr_QTimer, outptr_QObject) + ret := newQTimer(C.QTimer_new()) ret.isSubclass = true return ret } // NewQTimer2 constructs a new QTimer object. func NewQTimer2(parent *QObject) *QTimer { - var outptr_QTimer *C.QTimer = nil - var outptr_QObject *C.QObject = nil - C.QTimer_new2(parent.cPointer(), &outptr_QTimer, &outptr_QObject) - ret := newQTimer(outptr_QTimer, outptr_QObject) + ret := newQTimer(C.QTimer_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -215,7 +207,7 @@ func miqt_exec_callback_QTimer_TimerEvent(self *C.QTimer, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QTimer{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -299,7 +291,7 @@ func miqt_exec_callback_QTimer_ChildEvent(self *C.QTimer, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QTimer{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qtimer.h b/qt/gen_qtimer.h index 1fdd0484..fd5875f0 100644 --- a/qt/gen_qtimer.h +++ b/qt/gen_qtimer.h @@ -32,8 +32,9 @@ typedef struct QTimer QTimer; typedef struct QTimerEvent QTimerEvent; #endif -void QTimer_new(QTimer** outptr_QTimer, QObject** outptr_QObject); -void QTimer_new2(QObject* parent, QTimer** outptr_QTimer, QObject** outptr_QObject); +QTimer* QTimer_new(); +QTimer* QTimer_new2(QObject* parent); +void QTimer_virtbase(QTimer* src, QObject** outptr_QObject); QMetaObject* QTimer_MetaObject(const QTimer* self); void* QTimer_Metacast(QTimer* self, const char* param1); struct miqt_string QTimer_Tr(const char* s); diff --git a/qt/gen_qtimezone.cpp b/qt/gen_qtimezone.cpp index 4b2ddb51..14d63624 100644 --- a/qt/gen_qtimezone.cpp +++ b/qt/gen_qtimezone.cpp @@ -11,50 +11,43 @@ #include "gen_qtimezone.h" #include "_cgo_export.h" -void QTimeZone_new(QTimeZone** outptr_QTimeZone) { - QTimeZone* ret = new QTimeZone(); - *outptr_QTimeZone = ret; +QTimeZone* QTimeZone_new() { + return new QTimeZone(); } -void QTimeZone_new2(struct miqt_string ianaId, QTimeZone** outptr_QTimeZone) { +QTimeZone* QTimeZone_new2(struct miqt_string ianaId) { QByteArray ianaId_QByteArray(ianaId.data, ianaId.len); - QTimeZone* ret = new QTimeZone(ianaId_QByteArray); - *outptr_QTimeZone = ret; + return new QTimeZone(ianaId_QByteArray); } -void QTimeZone_new3(int offsetSeconds, QTimeZone** outptr_QTimeZone) { - QTimeZone* ret = new QTimeZone(static_cast(offsetSeconds)); - *outptr_QTimeZone = ret; +QTimeZone* QTimeZone_new3(int offsetSeconds) { + return new QTimeZone(static_cast(offsetSeconds)); } -void QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, QTimeZone** outptr_QTimeZone) { +QTimeZone* QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation) { QByteArray zoneId_QByteArray(zoneId.data, zoneId.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString abbreviation_QString = QString::fromUtf8(abbreviation.data, abbreviation.len); - QTimeZone* ret = new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString); - *outptr_QTimeZone = ret; + return new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString); } -void QTimeZone_new5(QTimeZone* other, QTimeZone** outptr_QTimeZone) { - QTimeZone* ret = new QTimeZone(*other); - *outptr_QTimeZone = ret; +QTimeZone* QTimeZone_new5(QTimeZone* other) { + return new QTimeZone(*other); } -void QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country, QTimeZone** outptr_QTimeZone) { +QTimeZone* QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country) { QByteArray zoneId_QByteArray(zoneId.data, zoneId.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString abbreviation_QString = QString::fromUtf8(abbreviation.data, abbreviation.len); - QTimeZone* ret = new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(country)); - *outptr_QTimeZone = ret; + return new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(country)); } -void QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country, struct miqt_string comment, QTimeZone** outptr_QTimeZone) { +QTimeZone* QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country, struct miqt_string comment) { QByteArray zoneId_QByteArray(zoneId.data, zoneId.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString abbreviation_QString = QString::fromUtf8(abbreviation.data, abbreviation.len); QString comment_QString = QString::fromUtf8(comment.data, comment.len); - QTimeZone* ret = new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(country), comment_QString); - *outptr_QTimeZone = ret; + return new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(country), comment_QString); } void QTimeZone_OperatorAssign(QTimeZone* self, QTimeZone* other) { @@ -372,9 +365,8 @@ void QTimeZone_Delete(QTimeZone* self, bool isSubclass) { } } -void QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1, QTimeZone__OffsetData** outptr_QTimeZone__OffsetData) { - QTimeZone::OffsetData* ret = new QTimeZone::OffsetData(*param1); - *outptr_QTimeZone__OffsetData = ret; +QTimeZone__OffsetData* QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1) { + return new QTimeZone::OffsetData(*param1); } void QTimeZone__OffsetData_OperatorAssign(QTimeZone__OffsetData* self, QTimeZone__OffsetData* param1) { diff --git a/qt/gen_qtimezone.go b/qt/gen_qtimezone.go index 1c37b1e6..b73a6151 100644 --- a/qt/gen_qtimezone.go +++ b/qt/gen_qtimezone.go @@ -61,24 +61,19 @@ func newQTimeZone(h *C.QTimeZone) *QTimeZone { if h == nil { return nil } + return &QTimeZone{h: h} } // UnsafeNewQTimeZone constructs the type using only unsafe pointers. func UnsafeNewQTimeZone(h unsafe.Pointer) *QTimeZone { - if h == nil { - return nil - } - - return &QTimeZone{h: (*C.QTimeZone)(h)} + return newQTimeZone((*C.QTimeZone)(h)) } // NewQTimeZone constructs a new QTimeZone object. func NewQTimeZone() *QTimeZone { - var outptr_QTimeZone *C.QTimeZone = nil - C.QTimeZone_new(&outptr_QTimeZone) - ret := newQTimeZone(outptr_QTimeZone) + ret := newQTimeZone(C.QTimeZone_new()) ret.isSubclass = true return ret } @@ -88,20 +83,16 @@ func NewQTimeZone2(ianaId []byte) *QTimeZone { ianaId_alias := C.struct_miqt_string{} ianaId_alias.data = (*C.char)(unsafe.Pointer(&ianaId[0])) ianaId_alias.len = C.size_t(len(ianaId)) - var outptr_QTimeZone *C.QTimeZone = nil - C.QTimeZone_new2(ianaId_alias, &outptr_QTimeZone) - ret := newQTimeZone(outptr_QTimeZone) + ret := newQTimeZone(C.QTimeZone_new2(ianaId_alias)) ret.isSubclass = true return ret } // NewQTimeZone3 constructs a new QTimeZone object. func NewQTimeZone3(offsetSeconds int) *QTimeZone { - var outptr_QTimeZone *C.QTimeZone = nil - C.QTimeZone_new3((C.int)(offsetSeconds), &outptr_QTimeZone) - ret := newQTimeZone(outptr_QTimeZone) + ret := newQTimeZone(C.QTimeZone_new3((C.int)(offsetSeconds))) ret.isSubclass = true return ret } @@ -119,20 +110,16 @@ func NewQTimeZone4(zoneId []byte, offsetSeconds int, name string, abbreviation s abbreviation_ms.data = C.CString(abbreviation) abbreviation_ms.len = C.size_t(len(abbreviation)) defer C.free(unsafe.Pointer(abbreviation_ms.data)) - var outptr_QTimeZone *C.QTimeZone = nil - C.QTimeZone_new4(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, &outptr_QTimeZone) - ret := newQTimeZone(outptr_QTimeZone) + ret := newQTimeZone(C.QTimeZone_new4(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms)) ret.isSubclass = true return ret } // NewQTimeZone5 constructs a new QTimeZone object. func NewQTimeZone5(other *QTimeZone) *QTimeZone { - var outptr_QTimeZone *C.QTimeZone = nil - C.QTimeZone_new5(other.cPointer(), &outptr_QTimeZone) - ret := newQTimeZone(outptr_QTimeZone) + ret := newQTimeZone(C.QTimeZone_new5(other.cPointer())) ret.isSubclass = true return ret } @@ -150,10 +137,8 @@ func NewQTimeZone6(zoneId []byte, offsetSeconds int, name string, abbreviation s abbreviation_ms.data = C.CString(abbreviation) abbreviation_ms.len = C.size_t(len(abbreviation)) defer C.free(unsafe.Pointer(abbreviation_ms.data)) - var outptr_QTimeZone *C.QTimeZone = nil - C.QTimeZone_new6(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.int)(country), &outptr_QTimeZone) - ret := newQTimeZone(outptr_QTimeZone) + ret := newQTimeZone(C.QTimeZone_new6(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.int)(country))) ret.isSubclass = true return ret } @@ -175,10 +160,8 @@ func NewQTimeZone7(zoneId []byte, offsetSeconds int, name string, abbreviation s comment_ms.data = C.CString(comment) comment_ms.len = C.size_t(len(comment)) defer C.free(unsafe.Pointer(comment_ms.data)) - var outptr_QTimeZone *C.QTimeZone = nil - C.QTimeZone_new7(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.int)(country), comment_ms, &outptr_QTimeZone) - ret := newQTimeZone(outptr_QTimeZone) + ret := newQTimeZone(C.QTimeZone_new7(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.int)(country), comment_ms)) ret.isSubclass = true return ret } @@ -481,24 +464,19 @@ func newQTimeZone__OffsetData(h *C.QTimeZone__OffsetData) *QTimeZone__OffsetData if h == nil { return nil } + return &QTimeZone__OffsetData{h: h} } // UnsafeNewQTimeZone__OffsetData constructs the type using only unsafe pointers. func UnsafeNewQTimeZone__OffsetData(h unsafe.Pointer) *QTimeZone__OffsetData { - if h == nil { - return nil - } - - return &QTimeZone__OffsetData{h: (*C.QTimeZone__OffsetData)(h)} + return newQTimeZone__OffsetData((*C.QTimeZone__OffsetData)(h)) } // NewQTimeZone__OffsetData constructs a new QTimeZone::OffsetData object. func NewQTimeZone__OffsetData(param1 *QTimeZone__OffsetData) *QTimeZone__OffsetData { - var outptr_QTimeZone__OffsetData *C.QTimeZone__OffsetData = nil - C.QTimeZone__OffsetData_new(param1.cPointer(), &outptr_QTimeZone__OffsetData) - ret := newQTimeZone__OffsetData(outptr_QTimeZone__OffsetData) + ret := newQTimeZone__OffsetData(C.QTimeZone__OffsetData_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qtimezone.h b/qt/gen_qtimezone.h index 202d7ff1..21325f58 100644 --- a/qt/gen_qtimezone.h +++ b/qt/gen_qtimezone.h @@ -30,13 +30,13 @@ typedef struct QTimeZone QTimeZone; typedef struct QTimeZone__OffsetData QTimeZone__OffsetData; #endif -void QTimeZone_new(QTimeZone** outptr_QTimeZone); -void QTimeZone_new2(struct miqt_string ianaId, QTimeZone** outptr_QTimeZone); -void QTimeZone_new3(int offsetSeconds, QTimeZone** outptr_QTimeZone); -void QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, QTimeZone** outptr_QTimeZone); -void QTimeZone_new5(QTimeZone* other, QTimeZone** outptr_QTimeZone); -void QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country, QTimeZone** outptr_QTimeZone); -void QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country, struct miqt_string comment, QTimeZone** outptr_QTimeZone); +QTimeZone* QTimeZone_new(); +QTimeZone* QTimeZone_new2(struct miqt_string ianaId); +QTimeZone* QTimeZone_new3(int offsetSeconds); +QTimeZone* QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation); +QTimeZone* QTimeZone_new5(QTimeZone* other); +QTimeZone* QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country); +QTimeZone* QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, int country, struct miqt_string comment); void QTimeZone_OperatorAssign(QTimeZone* self, QTimeZone* other); void QTimeZone_Swap(QTimeZone* self, QTimeZone* other); bool QTimeZone_IsValid(const QTimeZone* self); @@ -74,7 +74,7 @@ struct miqt_string QTimeZone_DisplayName22(const QTimeZone* self, int timeType, struct miqt_string QTimeZone_DisplayName32(const QTimeZone* self, int timeType, int nameType, QLocale* locale); void QTimeZone_Delete(QTimeZone* self, bool isSubclass); -void QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1, QTimeZone__OffsetData** outptr_QTimeZone__OffsetData); +QTimeZone__OffsetData* QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1); void QTimeZone__OffsetData_OperatorAssign(QTimeZone__OffsetData* self, QTimeZone__OffsetData* param1); void QTimeZone__OffsetData_Delete(QTimeZone__OffsetData* self, bool isSubclass); diff --git a/qt/gen_qtoolbar.cpp b/qt/gen_qtoolbar.cpp index 5dabf549..57342e16 100644 --- a/qt/gen_qtoolbar.cpp +++ b/qt/gen_qtoolbar.cpp @@ -1025,38 +1025,26 @@ public: }; -void QToolBar_new(QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(parent); - *outptr_QToolBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QToolBar* QToolBar_new(QWidget* parent) { + return new MiqtVirtualQToolBar(parent); } -void QToolBar_new2(struct miqt_string title, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QToolBar* QToolBar_new2(struct miqt_string title) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(title_QString); - *outptr_QToolBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQToolBar(title_QString); } -void QToolBar_new3(QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(); - *outptr_QToolBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QToolBar* QToolBar_new3() { + return new MiqtVirtualQToolBar(); } -void QToolBar_new4(struct miqt_string title, QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QToolBar* QToolBar_new4(struct miqt_string title, QWidget* parent) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(title_QString, parent); - *outptr_QToolBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQToolBar(title_QString, parent); +} + +void QToolBar_virtbase(QToolBar* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QToolBar_MetaObject(const QToolBar* self) { diff --git a/qt/gen_qtoolbar.go b/qt/gen_qtoolbar.go index 98a0f504..83f46d2e 100644 --- a/qt/gen_qtoolbar.go +++ b/qt/gen_qtoolbar.go @@ -35,33 +35,26 @@ func (this *QToolBar) UnsafePointer() unsafe.Pointer { } // newQToolBar constructs the type using only CGO pointers. -func newQToolBar(h *C.QToolBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QToolBar { +func newQToolBar(h *C.QToolBar) *QToolBar { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QToolBar_virtbase(h, &outptr_QWidget) + return &QToolBar{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQToolBar constructs the type using only unsafe pointers. -func UnsafeNewQToolBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QToolBar { - if h == nil { - return nil - } - - return &QToolBar{h: (*C.QToolBar)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQToolBar(h unsafe.Pointer) *QToolBar { + return newQToolBar((*C.QToolBar)(h)) } // NewQToolBar constructs a new QToolBar object. func NewQToolBar(parent *QWidget) *QToolBar { - var outptr_QToolBar *C.QToolBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolBar_new(parent.cPointer(), &outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolBar(C.QToolBar_new(parent.cPointer())) ret.isSubclass = true return ret } @@ -72,26 +65,16 @@ func NewQToolBar2(title string) *QToolBar { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QToolBar *C.QToolBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolBar_new2(title_ms, &outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolBar(C.QToolBar_new2(title_ms)) ret.isSubclass = true return ret } // NewQToolBar3 constructs a new QToolBar object. func NewQToolBar3() *QToolBar { - var outptr_QToolBar *C.QToolBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolBar_new3(&outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolBar(C.QToolBar_new3()) ret.isSubclass = true return ret } @@ -102,13 +85,8 @@ func NewQToolBar4(title string, parent *QWidget) *QToolBar { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QToolBar *C.QToolBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolBar_new4(title_ms, parent.cPointer(), &outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolBar(C.QToolBar_new4(title_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -178,7 +156,7 @@ func (this *QToolBar) AddAction(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QToolBar_AddAction(this.h, text_ms), nil) + return newQAction(C.QToolBar_AddAction(this.h, text_ms)) } func (this *QToolBar) AddAction2(icon *QIcon, text string) *QAction { @@ -186,23 +164,23 @@ func (this *QToolBar) AddAction2(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QToolBar_AddAction2(this.h, icon.cPointer(), text_ms), nil) + return newQAction(C.QToolBar_AddAction2(this.h, icon.cPointer(), text_ms)) } func (this *QToolBar) AddSeparator() *QAction { - return newQAction(C.QToolBar_AddSeparator(this.h), nil) + return newQAction(C.QToolBar_AddSeparator(this.h)) } func (this *QToolBar) InsertSeparator(before *QAction) *QAction { - return newQAction(C.QToolBar_InsertSeparator(this.h, before.cPointer()), nil) + return newQAction(C.QToolBar_InsertSeparator(this.h, before.cPointer())) } func (this *QToolBar) AddWidget(widget *QWidget) *QAction { - return newQAction(C.QToolBar_AddWidget(this.h, widget.cPointer()), nil) + return newQAction(C.QToolBar_AddWidget(this.h, widget.cPointer())) } func (this *QToolBar) InsertWidget(before *QAction, widget *QWidget) *QAction { - return newQAction(C.QToolBar_InsertWidget(this.h, before.cPointer(), widget.cPointer()), nil) + return newQAction(C.QToolBar_InsertWidget(this.h, before.cPointer(), widget.cPointer())) } func (this *QToolBar) ActionGeometry(action *QAction) *QRect { @@ -212,15 +190,15 @@ func (this *QToolBar) ActionGeometry(action *QAction) *QRect { } func (this *QToolBar) ActionAt(p *QPoint) *QAction { - return newQAction(C.QToolBar_ActionAt(this.h, p.cPointer()), nil) + return newQAction(C.QToolBar_ActionAt(this.h, p.cPointer())) } func (this *QToolBar) ActionAt2(x int, y int) *QAction { - return newQAction(C.QToolBar_ActionAt2(this.h, (C.int)(x), (C.int)(y)), nil) + return newQAction(C.QToolBar_ActionAt2(this.h, (C.int)(x), (C.int)(y))) } func (this *QToolBar) ToggleViewAction() *QAction { - return newQAction(C.QToolBar_ToggleViewAction(this.h), nil) + return newQAction(C.QToolBar_ToggleViewAction(this.h)) } func (this *QToolBar) IconSize() *QSize { @@ -234,7 +212,7 @@ func (this *QToolBar) ToolButtonStyle() ToolButtonStyle { } func (this *QToolBar) WidgetForAction(action *QAction) *QWidget { - return newQWidget(C.QToolBar_WidgetForAction(this.h, action.cPointer()), nil, nil) + return newQWidget(C.QToolBar_WidgetForAction(this.h, action.cPointer())) } func (this *QToolBar) IsFloatable() bool { @@ -272,7 +250,7 @@ func miqt_exec_callback_QToolBar_ActionTriggered(cb C.intptr_t, action *C.QActio } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(action, nil) + slotval1 := newQAction(action) gofunc(slotval1) } @@ -481,7 +459,7 @@ func miqt_exec_callback_QToolBar_ActionEvent(self *C.QToolBar, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -533,7 +511,7 @@ func miqt_exec_callback_QToolBar_PaintEvent(self *C.QToolBar, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -770,7 +748,7 @@ func miqt_exec_callback_QToolBar_MousePressEvent(self *C.QToolBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -796,7 +774,7 @@ func miqt_exec_callback_QToolBar_MouseReleaseEvent(self *C.QToolBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -822,7 +800,7 @@ func miqt_exec_callback_QToolBar_MouseDoubleClickEvent(self *C.QToolBar, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -848,7 +826,7 @@ func miqt_exec_callback_QToolBar_MouseMoveEvent(self *C.QToolBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -874,7 +852,7 @@ func miqt_exec_callback_QToolBar_WheelEvent(self *C.QToolBar, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -900,7 +878,7 @@ func miqt_exec_callback_QToolBar_KeyPressEvent(self *C.QToolBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -926,7 +904,7 @@ func miqt_exec_callback_QToolBar_KeyReleaseEvent(self *C.QToolBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -952,7 +930,7 @@ func miqt_exec_callback_QToolBar_FocusInEvent(self *C.QToolBar, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -978,7 +956,7 @@ func miqt_exec_callback_QToolBar_FocusOutEvent(self *C.QToolBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1056,7 +1034,7 @@ func miqt_exec_callback_QToolBar_MoveEvent(self *C.QToolBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1082,7 +1060,7 @@ func miqt_exec_callback_QToolBar_ResizeEvent(self *C.QToolBar, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1108,7 +1086,7 @@ func miqt_exec_callback_QToolBar_CloseEvent(self *C.QToolBar, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1134,7 +1112,7 @@ func miqt_exec_callback_QToolBar_ContextMenuEvent(self *C.QToolBar, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1160,7 +1138,7 @@ func miqt_exec_callback_QToolBar_TabletEvent(self *C.QToolBar, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1186,7 +1164,7 @@ func miqt_exec_callback_QToolBar_DragEnterEvent(self *C.QToolBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1212,7 +1190,7 @@ func miqt_exec_callback_QToolBar_DragMoveEvent(self *C.QToolBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1238,7 +1216,7 @@ func miqt_exec_callback_QToolBar_DragLeaveEvent(self *C.QToolBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1264,7 +1242,7 @@ func miqt_exec_callback_QToolBar_DropEvent(self *C.QToolBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1290,7 +1268,7 @@ func miqt_exec_callback_QToolBar_ShowEvent(self *C.QToolBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1316,7 +1294,7 @@ func miqt_exec_callback_QToolBar_HideEvent(self *C.QToolBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1486,7 +1464,7 @@ func miqt_exec_callback_QToolBar_InputMethodEvent(self *C.QToolBar, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QToolBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qtoolbar.h b/qt/gen_qtoolbar.h index fba36d2f..e4a4cb5a 100644 --- a/qt/gen_qtoolbar.h +++ b/qt/gen_qtoolbar.h @@ -82,10 +82,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QToolBar_new(QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QToolBar_new2(struct miqt_string title, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QToolBar_new3(QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QToolBar_new4(struct miqt_string title, QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QToolBar* QToolBar_new(QWidget* parent); +QToolBar* QToolBar_new2(struct miqt_string title); +QToolBar* QToolBar_new3(); +QToolBar* QToolBar_new4(struct miqt_string title, QWidget* parent); +void QToolBar_virtbase(QToolBar* src, QWidget** outptr_QWidget); QMetaObject* QToolBar_MetaObject(const QToolBar* self); void* QToolBar_Metacast(QToolBar* self, const char* param1); struct miqt_string QToolBar_Tr(const char* s); diff --git a/qt/gen_qtoolbox.cpp b/qt/gen_qtoolbox.cpp index a0da80f6..29074c5d 100644 --- a/qt/gen_qtoolbox.cpp +++ b/qt/gen_qtoolbox.cpp @@ -192,31 +192,20 @@ public: }; -void QToolBox_new(QWidget* parent, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQToolBox* ret = new MiqtVirtualQToolBox(parent); - *outptr_QToolBox = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QToolBox* QToolBox_new(QWidget* parent) { + return new MiqtVirtualQToolBox(parent); } -void QToolBox_new2(QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQToolBox* ret = new MiqtVirtualQToolBox(); - *outptr_QToolBox = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QToolBox* QToolBox_new2() { + return new MiqtVirtualQToolBox(); } -void QToolBox_new3(QWidget* parent, int f, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQToolBox* ret = new MiqtVirtualQToolBox(parent, static_cast(f)); - *outptr_QToolBox = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QToolBox* QToolBox_new3(QWidget* parent, int f) { + return new MiqtVirtualQToolBox(parent, static_cast(f)); +} + +void QToolBox_virtbase(QToolBox* src, QFrame** outptr_QFrame) { + *outptr_QFrame = static_cast(src); } QMetaObject* QToolBox_MetaObject(const QToolBox* self) { diff --git a/qt/gen_qtoolbox.go b/qt/gen_qtoolbox.go index 4b3aeda7..b972bd2c 100644 --- a/qt/gen_qtoolbox.go +++ b/qt/gen_qtoolbox.go @@ -35,62 +35,42 @@ func (this *QToolBox) UnsafePointer() unsafe.Pointer { } // newQToolBox constructs the type using only CGO pointers. -func newQToolBox(h *C.QToolBox, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QToolBox { +func newQToolBox(h *C.QToolBox) *QToolBox { if h == nil { return nil } + var outptr_QFrame *C.QFrame = nil + C.QToolBox_virtbase(h, &outptr_QFrame) + return &QToolBox{h: h, - QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QFrame: newQFrame(outptr_QFrame)} } // UnsafeNewQToolBox constructs the type using only unsafe pointers. -func UnsafeNewQToolBox(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QToolBox { - if h == nil { - return nil - } - - return &QToolBox{h: (*C.QToolBox)(h), - QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQToolBox(h unsafe.Pointer) *QToolBox { + return newQToolBox((*C.QToolBox)(h)) } // NewQToolBox constructs a new QToolBox object. func NewQToolBox(parent *QWidget) *QToolBox { - var outptr_QToolBox *C.QToolBox = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolBox_new(parent.cPointer(), &outptr_QToolBox, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolBox(outptr_QToolBox, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolBox(C.QToolBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQToolBox2 constructs a new QToolBox object. func NewQToolBox2() *QToolBox { - var outptr_QToolBox *C.QToolBox = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolBox_new2(&outptr_QToolBox, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolBox(outptr_QToolBox, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolBox(C.QToolBox_new2()) ret.isSubclass = true return ret } // NewQToolBox3 constructs a new QToolBox object. func NewQToolBox3(parent *QWidget, f WindowType) *QToolBox { - var outptr_QToolBox *C.QToolBox = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolBox_new3(parent.cPointer(), (C.int)(f), &outptr_QToolBox, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolBox(outptr_QToolBox, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolBox(C.QToolBox_new3(parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -212,11 +192,11 @@ func (this *QToolBox) CurrentIndex() int { } func (this *QToolBox) CurrentWidget() *QWidget { - return newQWidget(C.QToolBox_CurrentWidget(this.h), nil, nil) + return newQWidget(C.QToolBox_CurrentWidget(this.h)) } func (this *QToolBox) Widget(index int) *QWidget { - return newQWidget(C.QToolBox_Widget(this.h, (C.int)(index)), nil, nil) + return newQWidget(C.QToolBox_Widget(this.h, (C.int)(index))) } func (this *QToolBox) IndexOf(widget *QWidget) int { @@ -399,7 +379,7 @@ func miqt_exec_callback_QToolBox_ShowEvent(self *C.QToolBox, cb C.intptr_t, e *C } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(e, nil) + slotval1 := newQShowEvent(e) gofunc((&QToolBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -478,7 +458,7 @@ func miqt_exec_callback_QToolBox_PaintEvent(self *C.QToolBox, cb C.intptr_t, par } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QToolBox{h: self}).callVirtualBase_PaintEvent, slotval1) diff --git a/qt/gen_qtoolbox.h b/qt/gen_qtoolbox.h index e5d2e363..be7255b3 100644 --- a/qt/gen_qtoolbox.h +++ b/qt/gen_qtoolbox.h @@ -40,9 +40,10 @@ typedef struct QToolBox QToolBox; typedef struct QWidget QWidget; #endif -void QToolBox_new(QWidget* parent, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QToolBox_new2(QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QToolBox_new3(QWidget* parent, int f, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QToolBox* QToolBox_new(QWidget* parent); +QToolBox* QToolBox_new2(); +QToolBox* QToolBox_new3(QWidget* parent, int f); +void QToolBox_virtbase(QToolBox* src, QFrame** outptr_QFrame); QMetaObject* QToolBox_MetaObject(const QToolBox* self); void* QToolBox_Metacast(QToolBox* self, const char* param1); struct miqt_string QToolBox_Tr(const char* s); diff --git a/qt/gen_qtoolbutton.cpp b/qt/gen_qtoolbutton.cpp index 4ee0c9e0..74597472 100644 --- a/qt/gen_qtoolbutton.cpp +++ b/qt/gen_qtoolbutton.cpp @@ -482,22 +482,16 @@ public: }; -void QToolButton_new(QWidget* parent, QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQToolButton* ret = new MiqtVirtualQToolButton(parent); - *outptr_QToolButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QToolButton* QToolButton_new(QWidget* parent) { + return new MiqtVirtualQToolButton(parent); } -void QToolButton_new2(QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQToolButton* ret = new MiqtVirtualQToolButton(); - *outptr_QToolButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QToolButton* QToolButton_new2() { + return new MiqtVirtualQToolButton(); +} + +void QToolButton_virtbase(QToolButton* src, QAbstractButton** outptr_QAbstractButton) { + *outptr_QAbstractButton = static_cast(src); } QMetaObject* QToolButton_MetaObject(const QToolButton* self) { diff --git a/qt/gen_qtoolbutton.go b/qt/gen_qtoolbutton.go index b36fe84b..70131aab 100644 --- a/qt/gen_qtoolbutton.go +++ b/qt/gen_qtoolbutton.go @@ -43,48 +43,34 @@ func (this *QToolButton) UnsafePointer() unsafe.Pointer { } // newQToolButton constructs the type using only CGO pointers. -func newQToolButton(h *C.QToolButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QToolButton { +func newQToolButton(h *C.QToolButton) *QToolButton { if h == nil { return nil } + var outptr_QAbstractButton *C.QAbstractButton = nil + C.QToolButton_virtbase(h, &outptr_QAbstractButton) + return &QToolButton{h: h, - QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractButton: newQAbstractButton(outptr_QAbstractButton)} } // UnsafeNewQToolButton constructs the type using only unsafe pointers. -func UnsafeNewQToolButton(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QToolButton { - if h == nil { - return nil - } - - return &QToolButton{h: (*C.QToolButton)(h), - QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQToolButton(h unsafe.Pointer) *QToolButton { + return newQToolButton((*C.QToolButton)(h)) } // NewQToolButton constructs a new QToolButton object. func NewQToolButton(parent *QWidget) *QToolButton { - var outptr_QToolButton *C.QToolButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolButton_new(parent.cPointer(), &outptr_QToolButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolButton(outptr_QToolButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolButton(C.QToolButton_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQToolButton2 constructs a new QToolButton object. func NewQToolButton2() *QToolButton { - var outptr_QToolButton *C.QToolButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolButton_new2(&outptr_QToolButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolButton(outptr_QToolButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolButton(C.QToolButton_new2()) ret.isSubclass = true return ret } @@ -146,7 +132,7 @@ func (this *QToolButton) SetMenu(menu *QMenu) { } func (this *QToolButton) Menu() *QMenu { - return newQMenu(C.QToolButton_Menu(this.h), nil, nil, nil) + return newQMenu(C.QToolButton_Menu(this.h)) } func (this *QToolButton) SetPopupMode(mode QToolButton__ToolButtonPopupMode) { @@ -158,7 +144,7 @@ func (this *QToolButton) PopupMode() QToolButton__ToolButtonPopupMode { } func (this *QToolButton) DefaultAction() *QAction { - return newQAction(C.QToolButton_DefaultAction(this.h), nil) + return newQAction(C.QToolButton_DefaultAction(this.h)) } func (this *QToolButton) SetAutoRaise(enable bool) { @@ -196,7 +182,7 @@ func miqt_exec_callback_QToolButton_Triggered(cb C.intptr_t, param1 *C.QAction) } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(param1, nil) + slotval1 := newQAction(param1) gofunc(slotval1) } @@ -347,7 +333,7 @@ func miqt_exec_callback_QToolButton_MousePressEvent(self *C.QToolButton, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QToolButton{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -373,7 +359,7 @@ func miqt_exec_callback_QToolButton_MouseReleaseEvent(self *C.QToolButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QToolButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -399,7 +385,7 @@ func miqt_exec_callback_QToolButton_PaintEvent(self *C.QToolButton, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QToolButton{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -425,7 +411,7 @@ func miqt_exec_callback_QToolButton_ActionEvent(self *C.QToolButton, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(param1, nil) + slotval1 := newQActionEvent(param1) gofunc((&QToolButton{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -503,7 +489,7 @@ func miqt_exec_callback_QToolButton_TimerEvent(self *C.QToolButton, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QToolButton{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -629,7 +615,7 @@ func miqt_exec_callback_QToolButton_KeyPressEvent(self *C.QToolButton, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QToolButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -655,7 +641,7 @@ func miqt_exec_callback_QToolButton_KeyReleaseEvent(self *C.QToolButton, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QToolButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -681,7 +667,7 @@ func miqt_exec_callback_QToolButton_MouseMoveEvent(self *C.QToolButton, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QToolButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -707,7 +693,7 @@ func miqt_exec_callback_QToolButton_FocusInEvent(self *C.QToolButton, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QToolButton{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -733,7 +719,7 @@ func miqt_exec_callback_QToolButton_FocusOutEvent(self *C.QToolButton, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QToolButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) diff --git a/qt/gen_qtoolbutton.h b/qt/gen_qtoolbutton.h index 7656acf9..efeecc85 100644 --- a/qt/gen_qtoolbutton.h +++ b/qt/gen_qtoolbutton.h @@ -52,8 +52,9 @@ typedef struct QToolButton QToolButton; typedef struct QWidget QWidget; #endif -void QToolButton_new(QWidget* parent, QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QToolButton_new2(QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QToolButton* QToolButton_new(QWidget* parent); +QToolButton* QToolButton_new2(); +void QToolButton_virtbase(QToolButton* src, QAbstractButton** outptr_QAbstractButton); QMetaObject* QToolButton_MetaObject(const QToolButton* self); void* QToolButton_Metacast(QToolButton* self, const char* param1); struct miqt_string QToolButton_Tr(const char* s); diff --git a/qt/gen_qtooltip.go b/qt/gen_qtooltip.go index e5cb51a2..199d2610 100644 --- a/qt/gen_qtooltip.go +++ b/qt/gen_qtooltip.go @@ -37,16 +37,13 @@ func newQToolTip(h *C.QToolTip) *QToolTip { if h == nil { return nil } + return &QToolTip{h: h} } // UnsafeNewQToolTip constructs the type using only unsafe pointers. func UnsafeNewQToolTip(h unsafe.Pointer) *QToolTip { - if h == nil { - return nil - } - - return &QToolTip{h: (*C.QToolTip)(h)} + return newQToolTip((*C.QToolTip)(h)) } func QToolTip_ShowText(pos *QPoint, text string) { diff --git a/qt/gen_qtouchdevice.cpp b/qt/gen_qtouchdevice.cpp index d82c579f..f01a4ab2 100644 --- a/qt/gen_qtouchdevice.cpp +++ b/qt/gen_qtouchdevice.cpp @@ -7,9 +7,8 @@ #include "gen_qtouchdevice.h" #include "_cgo_export.h" -void QTouchDevice_new(QTouchDevice** outptr_QTouchDevice) { - QTouchDevice* ret = new QTouchDevice(); - *outptr_QTouchDevice = ret; +QTouchDevice* QTouchDevice_new() { + return new QTouchDevice(); } struct miqt_array /* of QTouchDevice* */ QTouchDevice_Devices() { diff --git a/qt/gen_qtouchdevice.go b/qt/gen_qtouchdevice.go index e2e16bb0..a043b822 100644 --- a/qt/gen_qtouchdevice.go +++ b/qt/gen_qtouchdevice.go @@ -56,24 +56,19 @@ func newQTouchDevice(h *C.QTouchDevice) *QTouchDevice { if h == nil { return nil } + return &QTouchDevice{h: h} } // UnsafeNewQTouchDevice constructs the type using only unsafe pointers. func UnsafeNewQTouchDevice(h unsafe.Pointer) *QTouchDevice { - if h == nil { - return nil - } - - return &QTouchDevice{h: (*C.QTouchDevice)(h)} + return newQTouchDevice((*C.QTouchDevice)(h)) } // NewQTouchDevice constructs a new QTouchDevice object. func NewQTouchDevice() *QTouchDevice { - var outptr_QTouchDevice *C.QTouchDevice = nil - C.QTouchDevice_new(&outptr_QTouchDevice) - ret := newQTouchDevice(outptr_QTouchDevice) + ret := newQTouchDevice(C.QTouchDevice_new()) ret.isSubclass = true return ret } diff --git a/qt/gen_qtouchdevice.h b/qt/gen_qtouchdevice.h index 211e8592..c780708e 100644 --- a/qt/gen_qtouchdevice.h +++ b/qt/gen_qtouchdevice.h @@ -20,7 +20,7 @@ class QTouchDevice; typedef struct QTouchDevice QTouchDevice; #endif -void QTouchDevice_new(QTouchDevice** outptr_QTouchDevice); +QTouchDevice* QTouchDevice_new(); struct miqt_array /* of QTouchDevice* */ QTouchDevice_Devices(); struct miqt_string QTouchDevice_Name(const QTouchDevice* self); int QTouchDevice_Type(const QTouchDevice* self); diff --git a/qt/gen_qtransform.cpp b/qt/gen_qtransform.cpp index 83c2cf5d..3a57c410 100644 --- a/qt/gen_qtransform.cpp +++ b/qt/gen_qtransform.cpp @@ -12,39 +12,32 @@ #include "gen_qtransform.h" #include "_cgo_export.h" -void QTransform_new(int param1, QTransform** outptr_QTransform) { - QTransform* ret = new QTransform(static_cast(param1)); - *outptr_QTransform = ret; +QTransform* QTransform_new(int param1) { + return new QTransform(static_cast(param1)); } -void QTransform_new2(QTransform** outptr_QTransform) { - QTransform* ret = new QTransform(); - *outptr_QTransform = ret; +QTransform* QTransform_new2() { + return new QTransform(); } -void QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, QTransform** outptr_QTransform) { - QTransform* ret = new QTransform(static_cast(h11), static_cast(h12), static_cast(h13), static_cast(h21), static_cast(h22), static_cast(h23), static_cast(h31), static_cast(h32)); - *outptr_QTransform = ret; +QTransform* QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32) { + return new QTransform(static_cast(h11), static_cast(h12), static_cast(h13), static_cast(h21), static_cast(h22), static_cast(h23), static_cast(h31), static_cast(h32)); } -void QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy, QTransform** outptr_QTransform) { - QTransform* ret = new QTransform(static_cast(h11), static_cast(h12), static_cast(h21), static_cast(h22), static_cast(dx), static_cast(dy)); - *outptr_QTransform = ret; +QTransform* QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy) { + return new QTransform(static_cast(h11), static_cast(h12), static_cast(h21), static_cast(h22), static_cast(dx), static_cast(dy)); } -void QTransform_new5(QMatrix* mtx, QTransform** outptr_QTransform) { - QTransform* ret = new QTransform(*mtx); - *outptr_QTransform = ret; +QTransform* QTransform_new5(QMatrix* mtx) { + return new QTransform(*mtx); } -void QTransform_new6(QTransform* other, QTransform** outptr_QTransform) { - QTransform* ret = new QTransform(*other); - *outptr_QTransform = ret; +QTransform* QTransform_new6(QTransform* other) { + return new QTransform(*other); } -void QTransform_new7(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33, QTransform** outptr_QTransform) { - QTransform* ret = new QTransform(static_cast(h11), static_cast(h12), static_cast(h13), static_cast(h21), static_cast(h22), static_cast(h23), static_cast(h31), static_cast(h32), static_cast(h33)); - *outptr_QTransform = ret; +QTransform* QTransform_new7(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33) { + return new QTransform(static_cast(h11), static_cast(h12), static_cast(h13), static_cast(h21), static_cast(h22), static_cast(h23), static_cast(h31), static_cast(h32), static_cast(h33)); } void QTransform_OperatorAssign(QTransform* self, QTransform* param1) { diff --git a/qt/gen_qtransform.go b/qt/gen_qtransform.go index 1de26548..427855d1 100644 --- a/qt/gen_qtransform.go +++ b/qt/gen_qtransform.go @@ -48,84 +48,67 @@ func newQTransform(h *C.QTransform) *QTransform { if h == nil { return nil } + return &QTransform{h: h} } // UnsafeNewQTransform constructs the type using only unsafe pointers. func UnsafeNewQTransform(h unsafe.Pointer) *QTransform { - if h == nil { - return nil - } - - return &QTransform{h: (*C.QTransform)(h)} + return newQTransform((*C.QTransform)(h)) } // NewQTransform constructs a new QTransform object. func NewQTransform(param1 Initialization) *QTransform { - var outptr_QTransform *C.QTransform = nil - C.QTransform_new((C.int)(param1), &outptr_QTransform) - ret := newQTransform(outptr_QTransform) + ret := newQTransform(C.QTransform_new((C.int)(param1))) ret.isSubclass = true return ret } // NewQTransform2 constructs a new QTransform object. func NewQTransform2() *QTransform { - var outptr_QTransform *C.QTransform = nil - C.QTransform_new2(&outptr_QTransform) - ret := newQTransform(outptr_QTransform) + ret := newQTransform(C.QTransform_new2()) ret.isSubclass = true return ret } // NewQTransform3 constructs a new QTransform object. func NewQTransform3(h11 float64, h12 float64, h13 float64, h21 float64, h22 float64, h23 float64, h31 float64, h32 float64) *QTransform { - var outptr_QTransform *C.QTransform = nil - C.QTransform_new3((C.double)(h11), (C.double)(h12), (C.double)(h13), (C.double)(h21), (C.double)(h22), (C.double)(h23), (C.double)(h31), (C.double)(h32), &outptr_QTransform) - ret := newQTransform(outptr_QTransform) + ret := newQTransform(C.QTransform_new3((C.double)(h11), (C.double)(h12), (C.double)(h13), (C.double)(h21), (C.double)(h22), (C.double)(h23), (C.double)(h31), (C.double)(h32))) ret.isSubclass = true return ret } // NewQTransform4 constructs a new QTransform object. func NewQTransform4(h11 float64, h12 float64, h21 float64, h22 float64, dx float64, dy float64) *QTransform { - var outptr_QTransform *C.QTransform = nil - C.QTransform_new4((C.double)(h11), (C.double)(h12), (C.double)(h21), (C.double)(h22), (C.double)(dx), (C.double)(dy), &outptr_QTransform) - ret := newQTransform(outptr_QTransform) + ret := newQTransform(C.QTransform_new4((C.double)(h11), (C.double)(h12), (C.double)(h21), (C.double)(h22), (C.double)(dx), (C.double)(dy))) ret.isSubclass = true return ret } // NewQTransform5 constructs a new QTransform object. func NewQTransform5(mtx *QMatrix) *QTransform { - var outptr_QTransform *C.QTransform = nil - C.QTransform_new5(mtx.cPointer(), &outptr_QTransform) - ret := newQTransform(outptr_QTransform) + ret := newQTransform(C.QTransform_new5(mtx.cPointer())) ret.isSubclass = true return ret } // NewQTransform6 constructs a new QTransform object. func NewQTransform6(other *QTransform) *QTransform { - var outptr_QTransform *C.QTransform = nil - C.QTransform_new6(other.cPointer(), &outptr_QTransform) - ret := newQTransform(outptr_QTransform) + ret := newQTransform(C.QTransform_new6(other.cPointer())) ret.isSubclass = true return ret } // NewQTransform7 constructs a new QTransform object. func NewQTransform7(h11 float64, h12 float64, h13 float64, h21 float64, h22 float64, h23 float64, h31 float64, h32 float64, h33 float64) *QTransform { - var outptr_QTransform *C.QTransform = nil - C.QTransform_new7((C.double)(h11), (C.double)(h12), (C.double)(h13), (C.double)(h21), (C.double)(h22), (C.double)(h23), (C.double)(h31), (C.double)(h32), (C.double)(h33), &outptr_QTransform) - ret := newQTransform(outptr_QTransform) + ret := newQTransform(C.QTransform_new7((C.double)(h11), (C.double)(h12), (C.double)(h13), (C.double)(h21), (C.double)(h22), (C.double)(h23), (C.double)(h31), (C.double)(h32), (C.double)(h33))) ret.isSubclass = true return ret } diff --git a/qt/gen_qtransform.h b/qt/gen_qtransform.h index 4d14781f..6964c667 100644 --- a/qt/gen_qtransform.h +++ b/qt/gen_qtransform.h @@ -38,13 +38,13 @@ typedef struct QRegion QRegion; typedef struct QTransform QTransform; #endif -void QTransform_new(int param1, QTransform** outptr_QTransform); -void QTransform_new2(QTransform** outptr_QTransform); -void QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, QTransform** outptr_QTransform); -void QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy, QTransform** outptr_QTransform); -void QTransform_new5(QMatrix* mtx, QTransform** outptr_QTransform); -void QTransform_new6(QTransform* other, QTransform** outptr_QTransform); -void QTransform_new7(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33, QTransform** outptr_QTransform); +QTransform* QTransform_new(int param1); +QTransform* QTransform_new2(); +QTransform* QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32); +QTransform* QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy); +QTransform* QTransform_new5(QMatrix* mtx); +QTransform* QTransform_new6(QTransform* other); +QTransform* QTransform_new7(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33); void QTransform_OperatorAssign(QTransform* self, QTransform* param1); bool QTransform_IsAffine(const QTransform* self); bool QTransform_IsIdentity(const QTransform* self); diff --git a/qt/gen_qtranslator.cpp b/qt/gen_qtranslator.cpp index 6ca27206..97cab191 100644 --- a/qt/gen_qtranslator.cpp +++ b/qt/gen_qtranslator.cpp @@ -250,16 +250,16 @@ public: }; -void QTranslator_new(QTranslator** outptr_QTranslator, QObject** outptr_QObject) { - MiqtVirtualQTranslator* ret = new MiqtVirtualQTranslator(); - *outptr_QTranslator = ret; - *outptr_QObject = static_cast(ret); +QTranslator* QTranslator_new() { + return new MiqtVirtualQTranslator(); } -void QTranslator_new2(QObject* parent, QTranslator** outptr_QTranslator, QObject** outptr_QObject) { - MiqtVirtualQTranslator* ret = new MiqtVirtualQTranslator(parent); - *outptr_QTranslator = ret; - *outptr_QObject = static_cast(ret); +QTranslator* QTranslator_new2(QObject* parent) { + return new MiqtVirtualQTranslator(parent); +} + +void QTranslator_virtbase(QTranslator* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QTranslator_MetaObject(const QTranslator* self) { diff --git a/qt/gen_qtranslator.go b/qt/gen_qtranslator.go index 41028ce8..4d4ce42a 100644 --- a/qt/gen_qtranslator.go +++ b/qt/gen_qtranslator.go @@ -35,42 +35,34 @@ func (this *QTranslator) UnsafePointer() unsafe.Pointer { } // newQTranslator constructs the type using only CGO pointers. -func newQTranslator(h *C.QTranslator, h_QObject *C.QObject) *QTranslator { +func newQTranslator(h *C.QTranslator) *QTranslator { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QTranslator_virtbase(h, &outptr_QObject) + return &QTranslator{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQTranslator constructs the type using only unsafe pointers. -func UnsafeNewQTranslator(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTranslator { - if h == nil { - return nil - } - - return &QTranslator{h: (*C.QTranslator)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQTranslator(h unsafe.Pointer) *QTranslator { + return newQTranslator((*C.QTranslator)(h)) } // NewQTranslator constructs a new QTranslator object. func NewQTranslator() *QTranslator { - var outptr_QTranslator *C.QTranslator = nil - var outptr_QObject *C.QObject = nil - C.QTranslator_new(&outptr_QTranslator, &outptr_QObject) - ret := newQTranslator(outptr_QTranslator, outptr_QObject) + ret := newQTranslator(C.QTranslator_new()) ret.isSubclass = true return ret } // NewQTranslator2 constructs a new QTranslator object. func NewQTranslator2(parent *QObject) *QTranslator { - var outptr_QTranslator *C.QTranslator = nil - var outptr_QObject *C.QObject = nil - C.QTranslator_new2(parent.cPointer(), &outptr_QTranslator, &outptr_QObject) - ret := newQTranslator(outptr_QTranslator, outptr_QObject) + ret := newQTranslator(C.QTranslator_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -454,7 +446,7 @@ func miqt_exec_callback_QTranslator_TimerEvent(self *C.QTranslator, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTranslator{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -480,7 +472,7 @@ func miqt_exec_callback_QTranslator_ChildEvent(self *C.QTranslator, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QTranslator{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qtranslator.h b/qt/gen_qtranslator.h index 3a30f39d..3175c1e0 100644 --- a/qt/gen_qtranslator.h +++ b/qt/gen_qtranslator.h @@ -34,8 +34,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QTranslator QTranslator; #endif -void QTranslator_new(QTranslator** outptr_QTranslator, QObject** outptr_QObject); -void QTranslator_new2(QObject* parent, QTranslator** outptr_QTranslator, QObject** outptr_QObject); +QTranslator* QTranslator_new(); +QTranslator* QTranslator_new2(QObject* parent); +void QTranslator_virtbase(QTranslator* src, QObject** outptr_QObject); QMetaObject* QTranslator_MetaObject(const QTranslator* self); void* QTranslator_Metacast(QTranslator* self, const char* param1); struct miqt_string QTranslator_Tr(const char* s); diff --git a/qt/gen_qtransposeproxymodel.cpp b/qt/gen_qtransposeproxymodel.cpp index 013b8179..f1359b91 100644 --- a/qt/gen_qtransposeproxymodel.cpp +++ b/qt/gen_qtransposeproxymodel.cpp @@ -1063,20 +1063,16 @@ public: }; -void QTransposeProxyModel_new(QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQTransposeProxyModel* ret = new MiqtVirtualQTransposeProxyModel(); - *outptr_QTransposeProxyModel = ret; - *outptr_QAbstractProxyModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTransposeProxyModel* QTransposeProxyModel_new() { + return new MiqtVirtualQTransposeProxyModel(); } -void QTransposeProxyModel_new2(QObject* parent, QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQTransposeProxyModel* ret = new MiqtVirtualQTransposeProxyModel(parent); - *outptr_QTransposeProxyModel = ret; - *outptr_QAbstractProxyModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTransposeProxyModel* QTransposeProxyModel_new2(QObject* parent) { + return new MiqtVirtualQTransposeProxyModel(parent); +} + +void QTransposeProxyModel_virtbase(QTransposeProxyModel* src, QAbstractProxyModel** outptr_QAbstractProxyModel) { + *outptr_QAbstractProxyModel = static_cast(src); } QMetaObject* QTransposeProxyModel_MetaObject(const QTransposeProxyModel* self) { diff --git a/qt/gen_qtransposeproxymodel.go b/qt/gen_qtransposeproxymodel.go index a2f0decb..03771884 100644 --- a/qt/gen_qtransposeproxymodel.go +++ b/qt/gen_qtransposeproxymodel.go @@ -35,46 +35,34 @@ func (this *QTransposeProxyModel) UnsafePointer() unsafe.Pointer { } // newQTransposeProxyModel constructs the type using only CGO pointers. -func newQTransposeProxyModel(h *C.QTransposeProxyModel, h_QAbstractProxyModel *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QTransposeProxyModel { +func newQTransposeProxyModel(h *C.QTransposeProxyModel) *QTransposeProxyModel { if h == nil { return nil } + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + C.QTransposeProxyModel_virtbase(h, &outptr_QAbstractProxyModel) + return &QTransposeProxyModel{h: h, - QAbstractProxyModel: newQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} + QAbstractProxyModel: newQAbstractProxyModel(outptr_QAbstractProxyModel)} } // UnsafeNewQTransposeProxyModel constructs the type using only unsafe pointers. -func UnsafeNewQTransposeProxyModel(h unsafe.Pointer, h_QAbstractProxyModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QTransposeProxyModel { - if h == nil { - return nil - } - - return &QTransposeProxyModel{h: (*C.QTransposeProxyModel)(h), - QAbstractProxyModel: UnsafeNewQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} +func UnsafeNewQTransposeProxyModel(h unsafe.Pointer) *QTransposeProxyModel { + return newQTransposeProxyModel((*C.QTransposeProxyModel)(h)) } // NewQTransposeProxyModel constructs a new QTransposeProxyModel object. func NewQTransposeProxyModel() *QTransposeProxyModel { - var outptr_QTransposeProxyModel *C.QTransposeProxyModel = nil - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QTransposeProxyModel_new(&outptr_QTransposeProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQTransposeProxyModel(outptr_QTransposeProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQTransposeProxyModel(C.QTransposeProxyModel_new()) ret.isSubclass = true return ret } // NewQTransposeProxyModel2 constructs a new QTransposeProxyModel object. func NewQTransposeProxyModel2(parent *QObject) *QTransposeProxyModel { - var outptr_QTransposeProxyModel *C.QTransposeProxyModel = nil - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QTransposeProxyModel_new2(parent.cPointer(), &outptr_QTransposeProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQTransposeProxyModel(outptr_QTransposeProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQTransposeProxyModel(C.QTransposeProxyModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -287,7 +275,7 @@ func miqt_exec_callback_QTransposeProxyModel_SetSourceModel(self *C.QTransposePr } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(newSourceModel, nil) + slotval1 := newQAbstractItemModel(newSourceModel) gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) @@ -1267,7 +1255,7 @@ func (this *QTransposeProxyModel) callVirtualBase_MimeData(indexes []QModelIndex } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QTransposeProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QTransposeProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QTransposeProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -1321,7 +1309,7 @@ func miqt_exec_callback_QTransposeProxyModel_CanDropMimeData(self *C.QTransposeP } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -1357,7 +1345,7 @@ func miqt_exec_callback_QTransposeProxyModel_DropMimeData(self *C.QTransposeProx } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt/gen_qtransposeproxymodel.h b/qt/gen_qtransposeproxymodel.h index 28323f2e..af6ec0a4 100644 --- a/qt/gen_qtransposeproxymodel.h +++ b/qt/gen_qtransposeproxymodel.h @@ -38,8 +38,9 @@ typedef struct QTransposeProxyModel QTransposeProxyModel; typedef struct QVariant QVariant; #endif -void QTransposeProxyModel_new(QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QTransposeProxyModel_new2(QObject* parent, QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QTransposeProxyModel* QTransposeProxyModel_new(); +QTransposeProxyModel* QTransposeProxyModel_new2(QObject* parent); +void QTransposeProxyModel_virtbase(QTransposeProxyModel* src, QAbstractProxyModel** outptr_QAbstractProxyModel); QMetaObject* QTransposeProxyModel_MetaObject(const QTransposeProxyModel* self); void* QTransposeProxyModel_Metacast(QTransposeProxyModel* self, const char* param1); struct miqt_string QTransposeProxyModel_Tr(const char* s); diff --git a/qt/gen_qtreeview.cpp b/qt/gen_qtreeview.cpp index b48b7a76..099afc9e 100644 --- a/qt/gen_qtreeview.cpp +++ b/qt/gen_qtreeview.cpp @@ -1616,26 +1616,16 @@ public: }; -void QTreeView_new(QWidget* parent, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTreeView* ret = new MiqtVirtualQTreeView(parent); - *outptr_QTreeView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTreeView* QTreeView_new(QWidget* parent) { + return new MiqtVirtualQTreeView(parent); } -void QTreeView_new2(QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTreeView* ret = new MiqtVirtualQTreeView(); - *outptr_QTreeView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTreeView* QTreeView_new2() { + return new MiqtVirtualQTreeView(); +} + +void QTreeView_virtbase(QTreeView* src, QAbstractItemView** outptr_QAbstractItemView) { + *outptr_QAbstractItemView = static_cast(src); } QMetaObject* QTreeView_MetaObject(const QTreeView* self) { diff --git a/qt/gen_qtreeview.go b/qt/gen_qtreeview.go index d0455e4e..9fb6af08 100644 --- a/qt/gen_qtreeview.go +++ b/qt/gen_qtreeview.go @@ -35,52 +35,34 @@ func (this *QTreeView) UnsafePointer() unsafe.Pointer { } // newQTreeView constructs the type using only CGO pointers. -func newQTreeView(h *C.QTreeView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTreeView { +func newQTreeView(h *C.QTreeView) *QTreeView { if h == nil { return nil } + var outptr_QAbstractItemView *C.QAbstractItemView = nil + C.QTreeView_virtbase(h, &outptr_QAbstractItemView) + return &QTreeView{h: h, - QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractItemView: newQAbstractItemView(outptr_QAbstractItemView)} } // UnsafeNewQTreeView constructs the type using only unsafe pointers. -func UnsafeNewQTreeView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTreeView { - if h == nil { - return nil - } - - return &QTreeView{h: (*C.QTreeView)(h), - QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTreeView(h unsafe.Pointer) *QTreeView { + return newQTreeView((*C.QTreeView)(h)) } // NewQTreeView constructs a new QTreeView object. func NewQTreeView(parent *QWidget) *QTreeView { - var outptr_QTreeView *C.QTreeView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTreeView_new(parent.cPointer(), &outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTreeView(outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTreeView(C.QTreeView_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTreeView2 constructs a new QTreeView object. func NewQTreeView2() *QTreeView { - var outptr_QTreeView *C.QTreeView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTreeView_new2(&outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTreeView(outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTreeView(C.QTreeView_new2()) ret.isSubclass = true return ret } @@ -126,7 +108,7 @@ func (this *QTreeView) SetSelectionModel(selectionModel *QItemSelectionModel) { } func (this *QTreeView) Header() *QHeaderView { - return newQHeaderView(C.QTreeView_Header(this.h), nil, nil, nil, nil, nil, nil) + return newQHeaderView(C.QTreeView_Header(this.h)) } func (this *QTreeView) SetHeader(header *QHeaderView) { @@ -491,7 +473,7 @@ func miqt_exec_callback_QTreeView_SetModel(self *C.QTreeView, cb C.intptr_t, mod } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc((&QTreeView{h: self}).callVirtualBase_SetModel, slotval1) @@ -543,7 +525,7 @@ func miqt_exec_callback_QTreeView_SetSelectionModel(self *C.QTreeView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QTreeView{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -1094,7 +1076,7 @@ func miqt_exec_callback_QTreeView_TimerEvent(self *C.QTreeView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1120,7 +1102,7 @@ func miqt_exec_callback_QTreeView_PaintEvent(self *C.QTreeView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1148,7 +1130,7 @@ func miqt_exec_callback_QTreeView_DrawRow(self *C.QTreeView, cb C.intptr_t, pain // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(options, nil) + slotval2 := newQStyleOptionViewItem(options) slotval3 := newQModelIndex(index) @@ -1206,7 +1188,7 @@ func miqt_exec_callback_QTreeView_MousePressEvent(self *C.QTreeView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1232,7 +1214,7 @@ func miqt_exec_callback_QTreeView_MouseReleaseEvent(self *C.QTreeView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1258,7 +1240,7 @@ func miqt_exec_callback_QTreeView_MouseDoubleClickEvent(self *C.QTreeView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1284,7 +1266,7 @@ func miqt_exec_callback_QTreeView_MouseMoveEvent(self *C.QTreeView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1310,7 +1292,7 @@ func miqt_exec_callback_QTreeView_KeyPressEvent(self *C.QTreeView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1336,7 +1318,7 @@ func miqt_exec_callback_QTreeView_DragMoveEvent(self *C.QTreeView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1734,7 +1716,7 @@ func miqt_exec_callback_QTreeView_CloseEditor(self *C.QTreeView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) @@ -1762,7 +1744,7 @@ func miqt_exec_callback_QTreeView_CommitData(self *C.QTreeView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc((&QTreeView{h: self}).callVirtualBase_CommitData, slotval1) @@ -1884,7 +1866,7 @@ func miqt_exec_callback_QTreeView_StartDrag(self *C.QTreeView, cb C.intptr_t, su func (this *QTreeView) callVirtualBase_ViewOptions() *QStyleOptionViewItem { - _goptr := newQStyleOptionViewItem(C.QTreeView_virtualbase_ViewOptions(unsafe.Pointer(this.h)), nil) + _goptr := newQStyleOptionViewItem(C.QTreeView_virtualbase_ViewOptions(unsafe.Pointer(this.h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -1985,7 +1967,7 @@ func miqt_exec_callback_QTreeView_DragEnterEvent(self *C.QTreeView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -2011,7 +1993,7 @@ func miqt_exec_callback_QTreeView_DragLeaveEvent(self *C.QTreeView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -2037,7 +2019,7 @@ func miqt_exec_callback_QTreeView_DropEvent(self *C.QTreeView, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -2063,7 +2045,7 @@ func miqt_exec_callback_QTreeView_FocusInEvent(self *C.QTreeView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -2089,7 +2071,7 @@ func miqt_exec_callback_QTreeView_FocusOutEvent(self *C.QTreeView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -2115,7 +2097,7 @@ func miqt_exec_callback_QTreeView_ResizeEvent(self *C.QTreeView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -2141,7 +2123,7 @@ func miqt_exec_callback_QTreeView_InputMethodEvent(self *C.QTreeView, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qtreeview.h b/qt/gen_qtreeview.h index 18d8be93..6c1db3be 100644 --- a/qt/gen_qtreeview.h +++ b/qt/gen_qtreeview.h @@ -82,8 +82,9 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QTreeView_new(QWidget* parent, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTreeView_new2(QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTreeView* QTreeView_new(QWidget* parent); +QTreeView* QTreeView_new2(); +void QTreeView_virtbase(QTreeView* src, QAbstractItemView** outptr_QAbstractItemView); QMetaObject* QTreeView_MetaObject(const QTreeView* self); void* QTreeView_Metacast(QTreeView* self, const char* param1); struct miqt_string QTreeView_Tr(const char* s); diff --git a/qt/gen_qtreewidget.cpp b/qt/gen_qtreewidget.cpp index aff9989d..41b0bc8a 100644 --- a/qt/gen_qtreewidget.cpp +++ b/qt/gen_qtreewidget.cpp @@ -215,12 +215,11 @@ public: }; -void QTreeWidgetItem_new(QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new() { + return new MiqtVirtualQTreeWidgetItem(); } -void QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem) { +QTreeWidgetItem* QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -228,16 +227,14 @@ void QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(strings_QList); - *outptr_QTreeWidgetItem = ret; + return new MiqtVirtualQTreeWidgetItem(strings_QList); } -void QTreeWidgetItem_new3(QTreeWidget* treeview, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new3(QTreeWidget* treeview) { + return new MiqtVirtualQTreeWidgetItem(treeview); } -void QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem) { +QTreeWidgetItem* QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -245,21 +242,18 @@ void QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, strings_QList); - *outptr_QTreeWidgetItem = ret; + return new MiqtVirtualQTreeWidgetItem(treeview, strings_QList); } -void QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, after); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after) { + return new MiqtVirtualQTreeWidgetItem(treeview, after); } -void QTreeWidgetItem_new6(QTreeWidgetItem* parent, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new6(QTreeWidgetItem* parent) { + return new MiqtVirtualQTreeWidgetItem(parent); } -void QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem) { +QTreeWidgetItem* QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -267,26 +261,22 @@ void QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struc QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, strings_QList); - *outptr_QTreeWidgetItem = ret; + return new MiqtVirtualQTreeWidgetItem(parent, strings_QList); } -void QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, after); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after) { + return new MiqtVirtualQTreeWidgetItem(parent, after); } -void QTreeWidgetItem_new9(QTreeWidgetItem* other, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(*other); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new9(QTreeWidgetItem* other) { + return new MiqtVirtualQTreeWidgetItem(*other); } -void QTreeWidgetItem_new10(int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new10(int typeVal) { + return new MiqtVirtualQTreeWidgetItem(static_cast(typeVal)); } -void QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { +QTreeWidgetItem* QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -294,16 +284,14 @@ void QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ string QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(strings_QList, static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; + return new MiqtVirtualQTreeWidgetItem(strings_QList, static_cast(typeVal)); } -void QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal) { + return new MiqtVirtualQTreeWidgetItem(treeview, static_cast(typeVal)); } -void QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { +QTreeWidgetItem* QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -311,21 +299,18 @@ void QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, strings_QList, static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; + return new MiqtVirtualQTreeWidgetItem(treeview, strings_QList, static_cast(typeVal)); } -void QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, after, static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal) { + return new MiqtVirtualQTreeWidgetItem(treeview, after, static_cast(typeVal)); } -void QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal) { + return new MiqtVirtualQTreeWidgetItem(parent, static_cast(typeVal)); } -void QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { +QTreeWidgetItem* QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -333,13 +318,11 @@ void QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of stru QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, strings_QList, static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; + return new MiqtVirtualQTreeWidgetItem(parent, strings_QList, static_cast(typeVal)); } -void QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, after, static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal) { + return new MiqtVirtualQTreeWidgetItem(parent, after, static_cast(typeVal)); } QTreeWidgetItem* QTreeWidgetItem_Clone(const QTreeWidgetItem* self) { @@ -1881,28 +1864,16 @@ public: }; -void QTreeWidget_new(QWidget* parent, QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTreeWidget* ret = new MiqtVirtualQTreeWidget(parent); - *outptr_QTreeWidget = ret; - *outptr_QTreeView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTreeWidget* QTreeWidget_new(QWidget* parent) { + return new MiqtVirtualQTreeWidget(parent); } -void QTreeWidget_new2(QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTreeWidget* ret = new MiqtVirtualQTreeWidget(); - *outptr_QTreeWidget = ret; - *outptr_QTreeView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTreeWidget* QTreeWidget_new2() { + return new MiqtVirtualQTreeWidget(); +} + +void QTreeWidget_virtbase(QTreeWidget* src, QTreeView** outptr_QTreeView) { + *outptr_QTreeView = static_cast(src); } QMetaObject* QTreeWidget_MetaObject(const QTreeWidget* self) { diff --git a/qt/gen_qtreewidget.go b/qt/gen_qtreewidget.go index 6cadc26f..f838dadf 100644 --- a/qt/gen_qtreewidget.go +++ b/qt/gen_qtreewidget.go @@ -53,24 +53,19 @@ func newQTreeWidgetItem(h *C.QTreeWidgetItem) *QTreeWidgetItem { if h == nil { return nil } + return &QTreeWidgetItem{h: h} } // UnsafeNewQTreeWidgetItem constructs the type using only unsafe pointers. func UnsafeNewQTreeWidgetItem(h unsafe.Pointer) *QTreeWidgetItem { - if h == nil { - return nil - } - - return &QTreeWidgetItem{h: (*C.QTreeWidgetItem)(h)} + return newQTreeWidgetItem((*C.QTreeWidgetItem)(h)) } // NewQTreeWidgetItem constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem() *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new(&outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new()) ret.isSubclass = true return ret } @@ -87,20 +82,16 @@ func NewQTreeWidgetItem2(strings []string) *QTreeWidgetItem { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new2(strings_ma, &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new2(strings_ma)) ret.isSubclass = true return ret } // NewQTreeWidgetItem3 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem3(treeview *QTreeWidget) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new3(treeview.cPointer(), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new3(treeview.cPointer())) ret.isSubclass = true return ret } @@ -117,30 +108,24 @@ func NewQTreeWidgetItem4(treeview *QTreeWidget, strings []string) *QTreeWidgetIt strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new4(treeview.cPointer(), strings_ma, &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new4(treeview.cPointer(), strings_ma)) ret.isSubclass = true return ret } // NewQTreeWidgetItem5 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem5(treeview *QTreeWidget, after *QTreeWidgetItem) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new5(treeview.cPointer(), after.cPointer(), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new5(treeview.cPointer(), after.cPointer())) ret.isSubclass = true return ret } // NewQTreeWidgetItem6 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem6(parent *QTreeWidgetItem) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new6(parent.cPointer(), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new6(parent.cPointer())) ret.isSubclass = true return ret } @@ -157,40 +142,32 @@ func NewQTreeWidgetItem7(parent *QTreeWidgetItem, strings []string) *QTreeWidget strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new7(parent.cPointer(), strings_ma, &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new7(parent.cPointer(), strings_ma)) ret.isSubclass = true return ret } // NewQTreeWidgetItem8 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem8(parent *QTreeWidgetItem, after *QTreeWidgetItem) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new8(parent.cPointer(), after.cPointer(), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new8(parent.cPointer(), after.cPointer())) ret.isSubclass = true return ret } // NewQTreeWidgetItem9 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem9(other *QTreeWidgetItem) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new9(other.cPointer(), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new9(other.cPointer())) ret.isSubclass = true return ret } // NewQTreeWidgetItem10 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem10(typeVal int) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new10((C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new10((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -207,20 +184,16 @@ func NewQTreeWidgetItem11(strings []string, typeVal int) *QTreeWidgetItem { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new11(strings_ma, (C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new11(strings_ma, (C.int)(typeVal))) ret.isSubclass = true return ret } // NewQTreeWidgetItem12 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem12(treeview *QTreeWidget, typeVal int) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new12(treeview.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new12(treeview.cPointer(), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -237,30 +210,24 @@ func NewQTreeWidgetItem13(treeview *QTreeWidget, strings []string, typeVal int) strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new13(treeview.cPointer(), strings_ma, (C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new13(treeview.cPointer(), strings_ma, (C.int)(typeVal))) ret.isSubclass = true return ret } // NewQTreeWidgetItem14 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem14(treeview *QTreeWidget, after *QTreeWidgetItem, typeVal int) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new14(treeview.cPointer(), after.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new14(treeview.cPointer(), after.cPointer(), (C.int)(typeVal))) ret.isSubclass = true return ret } // NewQTreeWidgetItem15 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem15(parent *QTreeWidgetItem, typeVal int) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new15(parent.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new15(parent.cPointer(), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -277,20 +244,16 @@ func NewQTreeWidgetItem16(parent *QTreeWidgetItem, strings []string, typeVal int strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new16(parent.cPointer(), strings_ma, (C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new16(parent.cPointer(), strings_ma, (C.int)(typeVal))) ret.isSubclass = true return ret } // NewQTreeWidgetItem17 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem17(parent *QTreeWidgetItem, after *QTreeWidgetItem, typeVal int) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new17(parent.cPointer(), after.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new17(parent.cPointer(), after.cPointer(), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -300,7 +263,7 @@ func (this *QTreeWidgetItem) Clone() *QTreeWidgetItem { } func (this *QTreeWidgetItem) TreeWidget() *QTreeWidget { - return newQTreeWidget(C.QTreeWidgetItem_TreeWidget(this.h), nil, nil, nil, nil, nil, nil, nil) + return newQTreeWidget(C.QTreeWidgetItem_TreeWidget(this.h)) } func (this *QTreeWidgetItem) SetSelected(selectVal bool) { @@ -807,54 +770,34 @@ func (this *QTreeWidget) UnsafePointer() unsafe.Pointer { } // newQTreeWidget constructs the type using only CGO pointers. -func newQTreeWidget(h *C.QTreeWidget, h_QTreeView *C.QTreeView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTreeWidget { +func newQTreeWidget(h *C.QTreeWidget) *QTreeWidget { if h == nil { return nil } + var outptr_QTreeView *C.QTreeView = nil + C.QTreeWidget_virtbase(h, &outptr_QTreeView) + return &QTreeWidget{h: h, - QTreeView: newQTreeView(h_QTreeView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QTreeView: newQTreeView(outptr_QTreeView)} } // UnsafeNewQTreeWidget constructs the type using only unsafe pointers. -func UnsafeNewQTreeWidget(h unsafe.Pointer, h_QTreeView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTreeWidget { - if h == nil { - return nil - } - - return &QTreeWidget{h: (*C.QTreeWidget)(h), - QTreeView: UnsafeNewQTreeView(h_QTreeView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTreeWidget(h unsafe.Pointer) *QTreeWidget { + return newQTreeWidget((*C.QTreeWidget)(h)) } // NewQTreeWidget constructs a new QTreeWidget object. func NewQTreeWidget(parent *QWidget) *QTreeWidget { - var outptr_QTreeWidget *C.QTreeWidget = nil - var outptr_QTreeView *C.QTreeView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTreeWidget_new(parent.cPointer(), &outptr_QTreeWidget, &outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTreeWidget(outptr_QTreeWidget, outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTreeWidget(C.QTreeWidget_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTreeWidget2 constructs a new QTreeWidget object. func NewQTreeWidget2() *QTreeWidget { - var outptr_QTreeWidget *C.QTreeWidget = nil - var outptr_QTreeView *C.QTreeView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTreeWidget_new2(&outptr_QTreeWidget, &outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTreeWidget(outptr_QTreeWidget, outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTreeWidget(C.QTreeWidget_new2()) ret.isSubclass = true return ret } @@ -1032,7 +975,7 @@ func (this *QTreeWidget) IsPersistentEditorOpen(item *QTreeWidgetItem) bool { } func (this *QTreeWidget) ItemWidget(item *QTreeWidgetItem, column int) *QWidget { - return newQWidget(C.QTreeWidget_ItemWidget(this.h, item.cPointer(), (C.int)(column)), nil, nil) + return newQWidget(C.QTreeWidget_ItemWidget(this.h, item.cPointer(), (C.int)(column))) } func (this *QTreeWidget) SetItemWidget(item *QTreeWidgetItem, column int, widget *QWidget) { @@ -1436,7 +1379,7 @@ func miqt_exec_callback_QTreeWidget_SetSelectionModel(self *C.QTreeWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QTreeWidget{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -1522,7 +1465,7 @@ func (this *QTreeWidget) callVirtualBase_MimeData(items []*QTreeWidgetItem) *QMi } items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} - return newQMimeData(C.QTreeWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma), nil) + return newQMimeData(C.QTreeWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma)) } func (this *QTreeWidget) OnMimeData(slot func(super func(items []*QTreeWidgetItem) *QMimeData, items []*QTreeWidgetItem) *QMimeData) { @@ -1578,7 +1521,7 @@ func miqt_exec_callback_QTreeWidget_DropMimeData(self *C.QTreeWidget, cb C.intpt slotval2 := (int)(index) - slotval3 := newQMimeData(data, nil) + slotval3 := newQMimeData(data) slotval4 := (DropAction)(action) @@ -1633,7 +1576,7 @@ func miqt_exec_callback_QTreeWidget_DropEvent(self *C.QTreeWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -2210,7 +2153,7 @@ func miqt_exec_callback_QTreeWidget_TimerEvent(self *C.QTreeWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -2236,7 +2179,7 @@ func miqt_exec_callback_QTreeWidget_PaintEvent(self *C.QTreeWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -2264,7 +2207,7 @@ func miqt_exec_callback_QTreeWidget_DrawRow(self *C.QTreeWidget, cb C.intptr_t, // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(options, nil) + slotval2 := newQStyleOptionViewItem(options) slotval3 := newQModelIndex(index) @@ -2322,7 +2265,7 @@ func miqt_exec_callback_QTreeWidget_MousePressEvent(self *C.QTreeWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -2348,7 +2291,7 @@ func miqt_exec_callback_QTreeWidget_MouseReleaseEvent(self *C.QTreeWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -2374,7 +2317,7 @@ func miqt_exec_callback_QTreeWidget_MouseDoubleClickEvent(self *C.QTreeWidget, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -2400,7 +2343,7 @@ func miqt_exec_callback_QTreeWidget_MouseMoveEvent(self *C.QTreeWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -2426,7 +2369,7 @@ func miqt_exec_callback_QTreeWidget_KeyPressEvent(self *C.QTreeWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -2452,7 +2395,7 @@ func miqt_exec_callback_QTreeWidget_DragMoveEvent(self *C.QTreeWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) diff --git a/qt/gen_qtreewidget.h b/qt/gen_qtreewidget.h index c9f00686..ad2586c7 100644 --- a/qt/gen_qtreewidget.h +++ b/qt/gen_qtreewidget.h @@ -84,23 +84,23 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QTreeWidgetItem_new(QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new3(QTreeWidget* treeview, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new6(QTreeWidgetItem* parent, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new9(QTreeWidgetItem* other, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new10(int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +QTreeWidgetItem* QTreeWidgetItem_new(); +QTreeWidgetItem* QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings); +QTreeWidgetItem* QTreeWidgetItem_new3(QTreeWidget* treeview); +QTreeWidgetItem* QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings); +QTreeWidgetItem* QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after); +QTreeWidgetItem* QTreeWidgetItem_new6(QTreeWidgetItem* parent); +QTreeWidgetItem* QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings); +QTreeWidgetItem* QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after); +QTreeWidgetItem* QTreeWidgetItem_new9(QTreeWidgetItem* other); +QTreeWidgetItem* QTreeWidgetItem_new10(int typeVal); +QTreeWidgetItem* QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal); +QTreeWidgetItem* QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal); +QTreeWidgetItem* QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal); +QTreeWidgetItem* QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal); +QTreeWidgetItem* QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal); +QTreeWidgetItem* QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal); +QTreeWidgetItem* QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal); QTreeWidgetItem* QTreeWidgetItem_Clone(const QTreeWidgetItem* self); QTreeWidget* QTreeWidgetItem_TreeWidget(const QTreeWidgetItem* self); void QTreeWidgetItem_SetSelected(QTreeWidgetItem* self, bool selectVal); @@ -177,8 +177,9 @@ void QTreeWidgetItem_override_virtual_Write(void* self, intptr_t slot); void QTreeWidgetItem_virtualbase_Write(const void* self, QDataStream* out); void QTreeWidgetItem_Delete(QTreeWidgetItem* self, bool isSubclass); -void QTreeWidget_new(QWidget* parent, QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTreeWidget_new2(QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTreeWidget* QTreeWidget_new(QWidget* parent); +QTreeWidget* QTreeWidget_new2(); +void QTreeWidget_virtbase(QTreeWidget* src, QTreeView** outptr_QTreeView); QMetaObject* QTreeWidget_MetaObject(const QTreeWidget* self); void* QTreeWidget_Metacast(QTreeWidget* self, const char* param1); struct miqt_string QTreeWidget_Tr(const char* s); diff --git a/qt/gen_qtreewidgetitemiterator.cpp b/qt/gen_qtreewidgetitemiterator.cpp index e0f1499c..a0262248 100644 --- a/qt/gen_qtreewidgetitemiterator.cpp +++ b/qt/gen_qtreewidgetitemiterator.cpp @@ -5,29 +5,24 @@ #include "gen_qtreewidgetitemiterator.h" #include "_cgo_export.h" -void QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { - QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(*it); - *outptr_QTreeWidgetItemIterator = ret; +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it) { + return new QTreeWidgetItemIterator(*it); } -void QTreeWidgetItemIterator_new2(QTreeWidget* widget, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { - QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(widget); - *outptr_QTreeWidgetItemIterator = ret; +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new2(QTreeWidget* widget) { + return new QTreeWidgetItemIterator(widget); } -void QTreeWidgetItemIterator_new3(QTreeWidgetItem* item, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { - QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(item); - *outptr_QTreeWidgetItemIterator = ret; +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new3(QTreeWidgetItem* item) { + return new QTreeWidgetItemIterator(item); } -void QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { - QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(widget, static_cast(flags)); - *outptr_QTreeWidgetItemIterator = ret; +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags) { + return new QTreeWidgetItemIterator(widget, static_cast(flags)); } -void QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { - QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(item, static_cast(flags)); - *outptr_QTreeWidgetItemIterator = ret; +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags) { + return new QTreeWidgetItemIterator(item, static_cast(flags)); } void QTreeWidgetItemIterator_OperatorAssign(QTreeWidgetItemIterator* self, QTreeWidgetItemIterator* it) { diff --git a/qt/gen_qtreewidgetitemiterator.go b/qt/gen_qtreewidgetitemiterator.go index 659b92b4..32f0b004 100644 --- a/qt/gen_qtreewidgetitemiterator.go +++ b/qt/gen_qtreewidgetitemiterator.go @@ -62,64 +62,51 @@ func newQTreeWidgetItemIterator(h *C.QTreeWidgetItemIterator) *QTreeWidgetItemIt if h == nil { return nil } + return &QTreeWidgetItemIterator{h: h} } // UnsafeNewQTreeWidgetItemIterator constructs the type using only unsafe pointers. func UnsafeNewQTreeWidgetItemIterator(h unsafe.Pointer) *QTreeWidgetItemIterator { - if h == nil { - return nil - } - - return &QTreeWidgetItemIterator{h: (*C.QTreeWidgetItemIterator)(h)} + return newQTreeWidgetItemIterator((*C.QTreeWidgetItemIterator)(h)) } // NewQTreeWidgetItemIterator constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator(it *QTreeWidgetItemIterator) *QTreeWidgetItemIterator { - var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil - C.QTreeWidgetItemIterator_new(it.cPointer(), &outptr_QTreeWidgetItemIterator) - ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(C.QTreeWidgetItemIterator_new(it.cPointer())) ret.isSubclass = true return ret } // NewQTreeWidgetItemIterator2 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator2(widget *QTreeWidget) *QTreeWidgetItemIterator { - var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil - C.QTreeWidgetItemIterator_new2(widget.cPointer(), &outptr_QTreeWidgetItemIterator) - ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(C.QTreeWidgetItemIterator_new2(widget.cPointer())) ret.isSubclass = true return ret } // NewQTreeWidgetItemIterator3 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator3(item *QTreeWidgetItem) *QTreeWidgetItemIterator { - var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil - C.QTreeWidgetItemIterator_new3(item.cPointer(), &outptr_QTreeWidgetItemIterator) - ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(C.QTreeWidgetItemIterator_new3(item.cPointer())) ret.isSubclass = true return ret } // NewQTreeWidgetItemIterator4 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator4(widget *QTreeWidget, flags QTreeWidgetItemIterator__IteratorFlag) *QTreeWidgetItemIterator { - var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil - C.QTreeWidgetItemIterator_new4(widget.cPointer(), (C.int)(flags), &outptr_QTreeWidgetItemIterator) - ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(C.QTreeWidgetItemIterator_new4(widget.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } // NewQTreeWidgetItemIterator5 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator5(item *QTreeWidgetItem, flags QTreeWidgetItemIterator__IteratorFlag) *QTreeWidgetItemIterator { - var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil - C.QTreeWidgetItemIterator_new5(item.cPointer(), (C.int)(flags), &outptr_QTreeWidgetItemIterator) - ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(C.QTreeWidgetItemIterator_new5(item.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } diff --git a/qt/gen_qtreewidgetitemiterator.h b/qt/gen_qtreewidgetitemiterator.h index 02d8a5e9..b42ddaa4 100644 --- a/qt/gen_qtreewidgetitemiterator.h +++ b/qt/gen_qtreewidgetitemiterator.h @@ -24,11 +24,11 @@ typedef struct QTreeWidgetItem QTreeWidgetItem; typedef struct QTreeWidgetItemIterator QTreeWidgetItemIterator; #endif -void QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); -void QTreeWidgetItemIterator_new2(QTreeWidget* widget, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); -void QTreeWidgetItemIterator_new3(QTreeWidgetItem* item, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); -void QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); -void QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it); +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new2(QTreeWidget* widget); +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new3(QTreeWidgetItem* item); +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags); +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags); void QTreeWidgetItemIterator_OperatorAssign(QTreeWidgetItemIterator* self, QTreeWidgetItemIterator* it); QTreeWidgetItemIterator* QTreeWidgetItemIterator_OperatorPlusPlus(QTreeWidgetItemIterator* self); QTreeWidgetItemIterator* QTreeWidgetItemIterator_OperatorPlusPlusWithInt(QTreeWidgetItemIterator* self, int param1); diff --git a/qt/gen_qundogroup.cpp b/qt/gen_qundogroup.cpp index 0b004d98..bef1817e 100644 --- a/qt/gen_qundogroup.cpp +++ b/qt/gen_qundogroup.cpp @@ -196,16 +196,16 @@ public: }; -void QUndoGroup_new(QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject) { - MiqtVirtualQUndoGroup* ret = new MiqtVirtualQUndoGroup(); - *outptr_QUndoGroup = ret; - *outptr_QObject = static_cast(ret); +QUndoGroup* QUndoGroup_new() { + return new MiqtVirtualQUndoGroup(); } -void QUndoGroup_new2(QObject* parent, QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject) { - MiqtVirtualQUndoGroup* ret = new MiqtVirtualQUndoGroup(parent); - *outptr_QUndoGroup = ret; - *outptr_QObject = static_cast(ret); +QUndoGroup* QUndoGroup_new2(QObject* parent) { + return new MiqtVirtualQUndoGroup(parent); +} + +void QUndoGroup_virtbase(QUndoGroup* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QUndoGroup_MetaObject(const QUndoGroup* self) { diff --git a/qt/gen_qundogroup.go b/qt/gen_qundogroup.go index b889be2c..4847f994 100644 --- a/qt/gen_qundogroup.go +++ b/qt/gen_qundogroup.go @@ -35,42 +35,34 @@ func (this *QUndoGroup) UnsafePointer() unsafe.Pointer { } // newQUndoGroup constructs the type using only CGO pointers. -func newQUndoGroup(h *C.QUndoGroup, h_QObject *C.QObject) *QUndoGroup { +func newQUndoGroup(h *C.QUndoGroup) *QUndoGroup { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QUndoGroup_virtbase(h, &outptr_QObject) + return &QUndoGroup{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQUndoGroup constructs the type using only unsafe pointers. -func UnsafeNewQUndoGroup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QUndoGroup { - if h == nil { - return nil - } - - return &QUndoGroup{h: (*C.QUndoGroup)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQUndoGroup(h unsafe.Pointer) *QUndoGroup { + return newQUndoGroup((*C.QUndoGroup)(h)) } // NewQUndoGroup constructs a new QUndoGroup object. func NewQUndoGroup() *QUndoGroup { - var outptr_QUndoGroup *C.QUndoGroup = nil - var outptr_QObject *C.QObject = nil - C.QUndoGroup_new(&outptr_QUndoGroup, &outptr_QObject) - ret := newQUndoGroup(outptr_QUndoGroup, outptr_QObject) + ret := newQUndoGroup(C.QUndoGroup_new()) ret.isSubclass = true return ret } // NewQUndoGroup2 constructs a new QUndoGroup object. func NewQUndoGroup2(parent *QObject) *QUndoGroup { - var outptr_QUndoGroup *C.QUndoGroup = nil - var outptr_QObject *C.QObject = nil - C.QUndoGroup_new2(parent.cPointer(), &outptr_QUndoGroup, &outptr_QObject) - ret := newQUndoGroup(outptr_QUndoGroup, outptr_QObject) + ret := newQUndoGroup(C.QUndoGroup_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -116,21 +108,21 @@ func (this *QUndoGroup) Stacks() []*QUndoStack { _ret := make([]*QUndoStack, int(_ma.len)) _outCast := (*[0xffff]*C.QUndoStack)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQUndoStack(_outCast[i], nil) + _ret[i] = newQUndoStack(_outCast[i]) } return _ret } func (this *QUndoGroup) ActiveStack() *QUndoStack { - return newQUndoStack(C.QUndoGroup_ActiveStack(this.h), nil) + return newQUndoStack(C.QUndoGroup_ActiveStack(this.h)) } func (this *QUndoGroup) CreateUndoAction(parent *QObject) *QAction { - return newQAction(C.QUndoGroup_CreateUndoAction(this.h, parent.cPointer()), nil) + return newQAction(C.QUndoGroup_CreateUndoAction(this.h, parent.cPointer())) } func (this *QUndoGroup) CreateRedoAction(parent *QObject) *QAction { - return newQAction(C.QUndoGroup_CreateRedoAction(this.h, parent.cPointer()), nil) + return newQAction(C.QUndoGroup_CreateRedoAction(this.h, parent.cPointer())) } func (this *QUndoGroup) CanUndo() bool { @@ -186,7 +178,7 @@ func miqt_exec_callback_QUndoGroup_ActiveStackChanged(cb C.intptr_t, stack *C.QU } // Convert all CABI parameters to Go parameters - slotval1 := newQUndoStack(stack, nil) + slotval1 := newQUndoStack(stack) gofunc(slotval1) } @@ -374,7 +366,7 @@ func (this *QUndoGroup) CreateUndoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return newQAction(C.QUndoGroup_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms), nil) + return newQAction(C.QUndoGroup_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms)) } func (this *QUndoGroup) CreateRedoAction2(parent *QObject, prefix string) *QAction { @@ -382,7 +374,7 @@ func (this *QUndoGroup) CreateRedoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return newQAction(C.QUndoGroup_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms), nil) + return newQAction(C.QUndoGroup_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms)) } func (this *QUndoGroup) callVirtualBase_Event(event *QEvent) bool { @@ -463,7 +455,7 @@ func miqt_exec_callback_QUndoGroup_TimerEvent(self *C.QUndoGroup, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QUndoGroup{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -489,7 +481,7 @@ func miqt_exec_callback_QUndoGroup_ChildEvent(self *C.QUndoGroup, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QUndoGroup{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qundogroup.h b/qt/gen_qundogroup.h index 683141d6..20f0eda6 100644 --- a/qt/gen_qundogroup.h +++ b/qt/gen_qundogroup.h @@ -36,8 +36,9 @@ typedef struct QUndoGroup QUndoGroup; typedef struct QUndoStack QUndoStack; #endif -void QUndoGroup_new(QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject); -void QUndoGroup_new2(QObject* parent, QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject); +QUndoGroup* QUndoGroup_new(); +QUndoGroup* QUndoGroup_new2(QObject* parent); +void QUndoGroup_virtbase(QUndoGroup* src, QObject** outptr_QObject); QMetaObject* QUndoGroup_MetaObject(const QUndoGroup* self); void* QUndoGroup_Metacast(QUndoGroup* self, const char* param1); struct miqt_string QUndoGroup_Tr(const char* s); diff --git a/qt/gen_qundostack.cpp b/qt/gen_qundostack.cpp index 6596ada3..aeee2539 100644 --- a/qt/gen_qundostack.cpp +++ b/qt/gen_qundostack.cpp @@ -117,26 +117,22 @@ public: }; -void QUndoCommand_new(QUndoCommand** outptr_QUndoCommand) { - MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(); - *outptr_QUndoCommand = ret; +QUndoCommand* QUndoCommand_new() { + return new MiqtVirtualQUndoCommand(); } -void QUndoCommand_new2(struct miqt_string text, QUndoCommand** outptr_QUndoCommand) { +QUndoCommand* QUndoCommand_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(text_QString); - *outptr_QUndoCommand = ret; + return new MiqtVirtualQUndoCommand(text_QString); } -void QUndoCommand_new3(QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand) { - MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(parent); - *outptr_QUndoCommand = ret; +QUndoCommand* QUndoCommand_new3(QUndoCommand* parent) { + return new MiqtVirtualQUndoCommand(parent); } -void QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand) { +QUndoCommand* QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(text_QString, parent); - *outptr_QUndoCommand = ret; + return new MiqtVirtualQUndoCommand(text_QString, parent); } void QUndoCommand_Undo(QUndoCommand* self) { @@ -419,16 +415,16 @@ public: }; -void QUndoStack_new(QUndoStack** outptr_QUndoStack, QObject** outptr_QObject) { - MiqtVirtualQUndoStack* ret = new MiqtVirtualQUndoStack(); - *outptr_QUndoStack = ret; - *outptr_QObject = static_cast(ret); +QUndoStack* QUndoStack_new() { + return new MiqtVirtualQUndoStack(); } -void QUndoStack_new2(QObject* parent, QUndoStack** outptr_QUndoStack, QObject** outptr_QObject) { - MiqtVirtualQUndoStack* ret = new MiqtVirtualQUndoStack(parent); - *outptr_QUndoStack = ret; - *outptr_QObject = static_cast(ret); +QUndoStack* QUndoStack_new2(QObject* parent) { + return new MiqtVirtualQUndoStack(parent); +} + +void QUndoStack_virtbase(QUndoStack* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QUndoStack_MetaObject(const QUndoStack* self) { diff --git a/qt/gen_qundostack.go b/qt/gen_qundostack.go index 71e28268..b71287ef 100644 --- a/qt/gen_qundostack.go +++ b/qt/gen_qundostack.go @@ -38,24 +38,19 @@ func newQUndoCommand(h *C.QUndoCommand) *QUndoCommand { if h == nil { return nil } + return &QUndoCommand{h: h} } // UnsafeNewQUndoCommand constructs the type using only unsafe pointers. func UnsafeNewQUndoCommand(h unsafe.Pointer) *QUndoCommand { - if h == nil { - return nil - } - - return &QUndoCommand{h: (*C.QUndoCommand)(h)} + return newQUndoCommand((*C.QUndoCommand)(h)) } // NewQUndoCommand constructs a new QUndoCommand object. func NewQUndoCommand() *QUndoCommand { - var outptr_QUndoCommand *C.QUndoCommand = nil - C.QUndoCommand_new(&outptr_QUndoCommand) - ret := newQUndoCommand(outptr_QUndoCommand) + ret := newQUndoCommand(C.QUndoCommand_new()) ret.isSubclass = true return ret } @@ -66,20 +61,16 @@ func NewQUndoCommand2(text string) *QUndoCommand { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QUndoCommand *C.QUndoCommand = nil - C.QUndoCommand_new2(text_ms, &outptr_QUndoCommand) - ret := newQUndoCommand(outptr_QUndoCommand) + ret := newQUndoCommand(C.QUndoCommand_new2(text_ms)) ret.isSubclass = true return ret } // NewQUndoCommand3 constructs a new QUndoCommand object. func NewQUndoCommand3(parent *QUndoCommand) *QUndoCommand { - var outptr_QUndoCommand *C.QUndoCommand = nil - C.QUndoCommand_new3(parent.cPointer(), &outptr_QUndoCommand) - ret := newQUndoCommand(outptr_QUndoCommand) + ret := newQUndoCommand(C.QUndoCommand_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -90,10 +81,8 @@ func NewQUndoCommand4(text string, parent *QUndoCommand) *QUndoCommand { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QUndoCommand *C.QUndoCommand = nil - C.QUndoCommand_new4(text_ms, parent.cPointer(), &outptr_QUndoCommand) - ret := newQUndoCommand(outptr_QUndoCommand) + ret := newQUndoCommand(C.QUndoCommand_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -286,42 +275,34 @@ func (this *QUndoStack) UnsafePointer() unsafe.Pointer { } // newQUndoStack constructs the type using only CGO pointers. -func newQUndoStack(h *C.QUndoStack, h_QObject *C.QObject) *QUndoStack { +func newQUndoStack(h *C.QUndoStack) *QUndoStack { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QUndoStack_virtbase(h, &outptr_QObject) + return &QUndoStack{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQUndoStack constructs the type using only unsafe pointers. -func UnsafeNewQUndoStack(h unsafe.Pointer, h_QObject unsafe.Pointer) *QUndoStack { - if h == nil { - return nil - } - - return &QUndoStack{h: (*C.QUndoStack)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQUndoStack(h unsafe.Pointer) *QUndoStack { + return newQUndoStack((*C.QUndoStack)(h)) } // NewQUndoStack constructs a new QUndoStack object. func NewQUndoStack() *QUndoStack { - var outptr_QUndoStack *C.QUndoStack = nil - var outptr_QObject *C.QObject = nil - C.QUndoStack_new(&outptr_QUndoStack, &outptr_QObject) - ret := newQUndoStack(outptr_QUndoStack, outptr_QObject) + ret := newQUndoStack(C.QUndoStack_new()) ret.isSubclass = true return ret } // NewQUndoStack2 constructs a new QUndoStack object. func NewQUndoStack2(parent *QObject) *QUndoStack { - var outptr_QUndoStack *C.QUndoStack = nil - var outptr_QObject *C.QObject = nil - C.QUndoStack_new2(parent.cPointer(), &outptr_QUndoStack, &outptr_QObject) - ret := newQUndoStack(outptr_QUndoStack, outptr_QObject) + ret := newQUndoStack(C.QUndoStack_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -400,11 +381,11 @@ func (this *QUndoStack) Text(idx int) string { } func (this *QUndoStack) CreateUndoAction(parent *QObject) *QAction { - return newQAction(C.QUndoStack_CreateUndoAction(this.h, parent.cPointer()), nil) + return newQAction(C.QUndoStack_CreateUndoAction(this.h, parent.cPointer())) } func (this *QUndoStack) CreateRedoAction(parent *QObject) *QAction { - return newQAction(C.QUndoStack_CreateRedoAction(this.h, parent.cPointer()), nil) + return newQAction(C.QUndoStack_CreateRedoAction(this.h, parent.cPointer())) } func (this *QUndoStack) IsActive() bool { @@ -650,7 +631,7 @@ func (this *QUndoStack) CreateUndoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return newQAction(C.QUndoStack_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms), nil) + return newQAction(C.QUndoStack_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms)) } func (this *QUndoStack) CreateRedoAction2(parent *QObject, prefix string) *QAction { @@ -658,7 +639,7 @@ func (this *QUndoStack) CreateRedoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return newQAction(C.QUndoStack_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms), nil) + return newQAction(C.QUndoStack_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms)) } func (this *QUndoStack) SetActive1(active bool) { @@ -743,7 +724,7 @@ func miqt_exec_callback_QUndoStack_TimerEvent(self *C.QUndoStack, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QUndoStack{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -769,7 +750,7 @@ func miqt_exec_callback_QUndoStack_ChildEvent(self *C.QUndoStack, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QUndoStack{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qundostack.h b/qt/gen_qundostack.h index a52b9b13..593d3b21 100644 --- a/qt/gen_qundostack.h +++ b/qt/gen_qundostack.h @@ -36,10 +36,10 @@ typedef struct QUndoCommand QUndoCommand; typedef struct QUndoStack QUndoStack; #endif -void QUndoCommand_new(QUndoCommand** outptr_QUndoCommand); -void QUndoCommand_new2(struct miqt_string text, QUndoCommand** outptr_QUndoCommand); -void QUndoCommand_new3(QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand); -void QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand); +QUndoCommand* QUndoCommand_new(); +QUndoCommand* QUndoCommand_new2(struct miqt_string text); +QUndoCommand* QUndoCommand_new3(QUndoCommand* parent); +QUndoCommand* QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent); void QUndoCommand_Undo(QUndoCommand* self); void QUndoCommand_Redo(QUndoCommand* self); struct miqt_string QUndoCommand_Text(const QUndoCommand* self); @@ -61,8 +61,9 @@ void QUndoCommand_override_virtual_MergeWith(void* self, intptr_t slot); bool QUndoCommand_virtualbase_MergeWith(void* self, QUndoCommand* other); void QUndoCommand_Delete(QUndoCommand* self, bool isSubclass); -void QUndoStack_new(QUndoStack** outptr_QUndoStack, QObject** outptr_QObject); -void QUndoStack_new2(QObject* parent, QUndoStack** outptr_QUndoStack, QObject** outptr_QObject); +QUndoStack* QUndoStack_new(); +QUndoStack* QUndoStack_new2(QObject* parent); +void QUndoStack_virtbase(QUndoStack* src, QObject** outptr_QObject); QMetaObject* QUndoStack_MetaObject(const QUndoStack* self); void* QUndoStack_Metacast(QUndoStack* self, const char* param1); struct miqt_string QUndoStack_Tr(const char* s); diff --git a/qt/gen_qundoview.cpp b/qt/gen_qundoview.cpp index 6ac8f533..8de8570a 100644 --- a/qt/gen_qundoview.cpp +++ b/qt/gen_qundoview.cpp @@ -898,76 +898,32 @@ public: }; -void QUndoView_new(QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(parent); - *outptr_QUndoView = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QUndoView* QUndoView_new(QWidget* parent) { + return new MiqtVirtualQUndoView(parent); } -void QUndoView_new2(QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(); - *outptr_QUndoView = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QUndoView* QUndoView_new2() { + return new MiqtVirtualQUndoView(); } -void QUndoView_new3(QUndoStack* stack, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(stack); - *outptr_QUndoView = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QUndoView* QUndoView_new3(QUndoStack* stack) { + return new MiqtVirtualQUndoView(stack); } -void QUndoView_new4(QUndoGroup* group, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(group); - *outptr_QUndoView = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QUndoView* QUndoView_new4(QUndoGroup* group) { + return new MiqtVirtualQUndoView(group); } -void QUndoView_new5(QUndoStack* stack, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(stack, parent); - *outptr_QUndoView = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QUndoView* QUndoView_new5(QUndoStack* stack, QWidget* parent) { + return new MiqtVirtualQUndoView(stack, parent); } -void QUndoView_new6(QUndoGroup* group, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(group, parent); - *outptr_QUndoView = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QUndoView* QUndoView_new6(QUndoGroup* group, QWidget* parent) { + return new MiqtVirtualQUndoView(group, parent); +} + +void QUndoView_virtbase(QUndoView* src, QListView** outptr_QListView) { + *outptr_QListView = static_cast(src); } QMetaObject* QUndoView_MetaObject(const QUndoView* self) { diff --git a/qt/gen_qundoview.go b/qt/gen_qundoview.go index 787b7ac4..2feb9c63 100644 --- a/qt/gen_qundoview.go +++ b/qt/gen_qundoview.go @@ -35,122 +35,66 @@ func (this *QUndoView) UnsafePointer() unsafe.Pointer { } // newQUndoView constructs the type using only CGO pointers. -func newQUndoView(h *C.QUndoView, h_QListView *C.QListView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QUndoView { +func newQUndoView(h *C.QUndoView) *QUndoView { if h == nil { return nil } + var outptr_QListView *C.QListView = nil + C.QUndoView_virtbase(h, &outptr_QListView) + return &QUndoView{h: h, - QListView: newQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QListView: newQListView(outptr_QListView)} } // UnsafeNewQUndoView constructs the type using only unsafe pointers. -func UnsafeNewQUndoView(h unsafe.Pointer, h_QListView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QUndoView { - if h == nil { - return nil - } - - return &QUndoView{h: (*C.QUndoView)(h), - QListView: UnsafeNewQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQUndoView(h unsafe.Pointer) *QUndoView { + return newQUndoView((*C.QUndoView)(h)) } // NewQUndoView constructs a new QUndoView object. func NewQUndoView(parent *QWidget) *QUndoView { - var outptr_QUndoView *C.QUndoView = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QUndoView_new(parent.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQUndoView(C.QUndoView_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQUndoView2 constructs a new QUndoView object. func NewQUndoView2() *QUndoView { - var outptr_QUndoView *C.QUndoView = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QUndoView_new2(&outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQUndoView(C.QUndoView_new2()) ret.isSubclass = true return ret } // NewQUndoView3 constructs a new QUndoView object. func NewQUndoView3(stack *QUndoStack) *QUndoView { - var outptr_QUndoView *C.QUndoView = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QUndoView_new3(stack.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQUndoView(C.QUndoView_new3(stack.cPointer())) ret.isSubclass = true return ret } // NewQUndoView4 constructs a new QUndoView object. func NewQUndoView4(group *QUndoGroup) *QUndoView { - var outptr_QUndoView *C.QUndoView = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QUndoView_new4(group.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQUndoView(C.QUndoView_new4(group.cPointer())) ret.isSubclass = true return ret } // NewQUndoView5 constructs a new QUndoView object. func NewQUndoView5(stack *QUndoStack, parent *QWidget) *QUndoView { - var outptr_QUndoView *C.QUndoView = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QUndoView_new5(stack.cPointer(), parent.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQUndoView(C.QUndoView_new5(stack.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQUndoView6 constructs a new QUndoView object. func NewQUndoView6(group *QUndoGroup, parent *QWidget) *QUndoView { - var outptr_QUndoView *C.QUndoView = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QUndoView_new6(group.cPointer(), parent.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQUndoView(C.QUndoView_new6(group.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -184,11 +128,11 @@ func QUndoView_TrUtf8(s string) string { } func (this *QUndoView) Stack() *QUndoStack { - return newQUndoStack(C.QUndoView_Stack(this.h), nil) + return newQUndoStack(C.QUndoView_Stack(this.h)) } func (this *QUndoView) Group() *QUndoGroup { - return newQUndoGroup(C.QUndoView_Group(this.h), nil) + return newQUndoGroup(C.QUndoView_Group(this.h)) } func (this *QUndoView) SetEmptyLabel(label string) { @@ -606,7 +550,7 @@ func miqt_exec_callback_QUndoView_MouseMoveEvent(self *C.QUndoView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -632,7 +576,7 @@ func miqt_exec_callback_QUndoView_MouseReleaseEvent(self *C.QUndoView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -658,7 +602,7 @@ func miqt_exec_callback_QUndoView_WheelEvent(self *C.QUndoView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -684,7 +628,7 @@ func miqt_exec_callback_QUndoView_TimerEvent(self *C.QUndoView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -710,7 +654,7 @@ func miqt_exec_callback_QUndoView_ResizeEvent(self *C.QUndoView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -736,7 +680,7 @@ func miqt_exec_callback_QUndoView_DragMoveEvent(self *C.QUndoView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(e, nil, nil) + slotval1 := newQDragMoveEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -762,7 +706,7 @@ func miqt_exec_callback_QUndoView_DragLeaveEvent(self *C.QUndoView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(e, nil) + slotval1 := newQDragLeaveEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -788,7 +732,7 @@ func miqt_exec_callback_QUndoView_DropEvent(self *C.QUndoView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(e, nil) + slotval1 := newQDropEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -822,7 +766,7 @@ func miqt_exec_callback_QUndoView_StartDrag(self *C.QUndoView, cb C.intptr_t, su func (this *QUndoView) callVirtualBase_ViewOptions() *QStyleOptionViewItem { - _goptr := newQStyleOptionViewItem(C.QUndoView_virtualbase_ViewOptions(unsafe.Pointer(this.h)), nil) + _goptr := newQStyleOptionViewItem(C.QUndoView_virtualbase_ViewOptions(unsafe.Pointer(this.h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -867,7 +811,7 @@ func miqt_exec_callback_QUndoView_PaintEvent(self *C.QUndoView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_PaintEvent, slotval1) diff --git a/qt/gen_qundoview.h b/qt/gen_qundoview.h index e5360888..867cb66e 100644 --- a/qt/gen_qundoview.h +++ b/qt/gen_qundoview.h @@ -74,12 +74,13 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QUndoView_new(QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QUndoView_new2(QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QUndoView_new3(QUndoStack* stack, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QUndoView_new4(QUndoGroup* group, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QUndoView_new5(QUndoStack* stack, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QUndoView_new6(QUndoGroup* group, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QUndoView* QUndoView_new(QWidget* parent); +QUndoView* QUndoView_new2(); +QUndoView* QUndoView_new3(QUndoStack* stack); +QUndoView* QUndoView_new4(QUndoGroup* group); +QUndoView* QUndoView_new5(QUndoStack* stack, QWidget* parent); +QUndoView* QUndoView_new6(QUndoGroup* group, QWidget* parent); +void QUndoView_virtbase(QUndoView* src, QListView** outptr_QListView); QMetaObject* QUndoView_MetaObject(const QUndoView* self); void* QUndoView_Metacast(QUndoView* self, const char* param1); struct miqt_string QUndoView_Tr(const char* s); diff --git a/qt/gen_qurl.cpp b/qt/gen_qurl.cpp index 1a38b16e..d25d28f6 100644 --- a/qt/gen_qurl.cpp +++ b/qt/gen_qurl.cpp @@ -9,26 +9,22 @@ #include "gen_qurl.h" #include "_cgo_export.h" -void QUrl_new(QUrl** outptr_QUrl) { - QUrl* ret = new QUrl(); - *outptr_QUrl = ret; +QUrl* QUrl_new() { + return new QUrl(); } -void QUrl_new2(QUrl* copyVal, QUrl** outptr_QUrl) { - QUrl* ret = new QUrl(*copyVal); - *outptr_QUrl = ret; +QUrl* QUrl_new2(QUrl* copyVal) { + return new QUrl(*copyVal); } -void QUrl_new3(struct miqt_string url, QUrl** outptr_QUrl) { +QUrl* QUrl_new3(struct miqt_string url) { QString url_QString = QString::fromUtf8(url.data, url.len); - QUrl* ret = new QUrl(url_QString); - *outptr_QUrl = ret; + return new QUrl(url_QString); } -void QUrl_new4(struct miqt_string url, int mode, QUrl** outptr_QUrl) { +QUrl* QUrl_new4(struct miqt_string url, int mode) { QString url_QString = QString::fromUtf8(url.data, url.len); - QUrl* ret = new QUrl(url_QString, static_cast(mode)); - *outptr_QUrl = ret; + return new QUrl(url_QString, static_cast(mode)); } void QUrl_OperatorAssign(QUrl* self, QUrl* copyVal) { diff --git a/qt/gen_qurl.go b/qt/gen_qurl.go index 326823da..7a990fb8 100644 --- a/qt/gen_qurl.go +++ b/qt/gen_qurl.go @@ -83,34 +83,27 @@ func newQUrl(h *C.QUrl) *QUrl { if h == nil { return nil } + return &QUrl{h: h} } // UnsafeNewQUrl constructs the type using only unsafe pointers. func UnsafeNewQUrl(h unsafe.Pointer) *QUrl { - if h == nil { - return nil - } - - return &QUrl{h: (*C.QUrl)(h)} + return newQUrl((*C.QUrl)(h)) } // NewQUrl constructs a new QUrl object. func NewQUrl() *QUrl { - var outptr_QUrl *C.QUrl = nil - C.QUrl_new(&outptr_QUrl) - ret := newQUrl(outptr_QUrl) + ret := newQUrl(C.QUrl_new()) ret.isSubclass = true return ret } // NewQUrl2 constructs a new QUrl object. func NewQUrl2(copyVal *QUrl) *QUrl { - var outptr_QUrl *C.QUrl = nil - C.QUrl_new2(copyVal.cPointer(), &outptr_QUrl) - ret := newQUrl(outptr_QUrl) + ret := newQUrl(C.QUrl_new2(copyVal.cPointer())) ret.isSubclass = true return ret } @@ -121,10 +114,8 @@ func NewQUrl3(url string) *QUrl { url_ms.data = C.CString(url) url_ms.len = C.size_t(len(url)) defer C.free(unsafe.Pointer(url_ms.data)) - var outptr_QUrl *C.QUrl = nil - C.QUrl_new3(url_ms, &outptr_QUrl) - ret := newQUrl(outptr_QUrl) + ret := newQUrl(C.QUrl_new3(url_ms)) ret.isSubclass = true return ret } @@ -135,10 +126,8 @@ func NewQUrl4(url string, mode QUrl__ParsingMode) *QUrl { url_ms.data = C.CString(url) url_ms.len = C.size_t(len(url)) defer C.free(unsafe.Pointer(url_ms.data)) - var outptr_QUrl *C.QUrl = nil - C.QUrl_new4(url_ms, (C.int)(mode), &outptr_QUrl) - ret := newQUrl(outptr_QUrl) + ret := newQUrl(C.QUrl_new4(url_ms, (C.int)(mode))) ret.isSubclass = true return ret } diff --git a/qt/gen_qurl.h b/qt/gen_qurl.h index 36edd29d..89b34f00 100644 --- a/qt/gen_qurl.h +++ b/qt/gen_qurl.h @@ -22,10 +22,10 @@ typedef struct QUrl QUrl; typedef struct QUrlQuery QUrlQuery; #endif -void QUrl_new(QUrl** outptr_QUrl); -void QUrl_new2(QUrl* copyVal, QUrl** outptr_QUrl); -void QUrl_new3(struct miqt_string url, QUrl** outptr_QUrl); -void QUrl_new4(struct miqt_string url, int mode, QUrl** outptr_QUrl); +QUrl* QUrl_new(); +QUrl* QUrl_new2(QUrl* copyVal); +QUrl* QUrl_new3(struct miqt_string url); +QUrl* QUrl_new4(struct miqt_string url, int mode); void QUrl_OperatorAssign(QUrl* self, QUrl* copyVal); void QUrl_OperatorAssignWithUrl(QUrl* self, struct miqt_string url); void QUrl_Swap(QUrl* self, QUrl* other); diff --git a/qt/gen_qurlquery.cpp b/qt/gen_qurlquery.cpp index 00e11b57..a2018ec6 100644 --- a/qt/gen_qurlquery.cpp +++ b/qt/gen_qurlquery.cpp @@ -10,25 +10,21 @@ #include "gen_qurlquery.h" #include "_cgo_export.h" -void QUrlQuery_new(QUrlQuery** outptr_QUrlQuery) { - QUrlQuery* ret = new QUrlQuery(); - *outptr_QUrlQuery = ret; +QUrlQuery* QUrlQuery_new() { + return new QUrlQuery(); } -void QUrlQuery_new2(QUrl* url, QUrlQuery** outptr_QUrlQuery) { - QUrlQuery* ret = new QUrlQuery(*url); - *outptr_QUrlQuery = ret; +QUrlQuery* QUrlQuery_new2(QUrl* url) { + return new QUrlQuery(*url); } -void QUrlQuery_new3(struct miqt_string queryString, QUrlQuery** outptr_QUrlQuery) { +QUrlQuery* QUrlQuery_new3(struct miqt_string queryString) { QString queryString_QString = QString::fromUtf8(queryString.data, queryString.len); - QUrlQuery* ret = new QUrlQuery(queryString_QString); - *outptr_QUrlQuery = ret; + return new QUrlQuery(queryString_QString); } -void QUrlQuery_new4(QUrlQuery* other, QUrlQuery** outptr_QUrlQuery) { - QUrlQuery* ret = new QUrlQuery(*other); - *outptr_QUrlQuery = ret; +QUrlQuery* QUrlQuery_new4(QUrlQuery* other) { + return new QUrlQuery(*other); } void QUrlQuery_OperatorAssign(QUrlQuery* self, QUrlQuery* other) { diff --git a/qt/gen_qurlquery.go b/qt/gen_qurlquery.go index 31be1694..7534eb87 100644 --- a/qt/gen_qurlquery.go +++ b/qt/gen_qurlquery.go @@ -37,34 +37,27 @@ func newQUrlQuery(h *C.QUrlQuery) *QUrlQuery { if h == nil { return nil } + return &QUrlQuery{h: h} } // UnsafeNewQUrlQuery constructs the type using only unsafe pointers. func UnsafeNewQUrlQuery(h unsafe.Pointer) *QUrlQuery { - if h == nil { - return nil - } - - return &QUrlQuery{h: (*C.QUrlQuery)(h)} + return newQUrlQuery((*C.QUrlQuery)(h)) } // NewQUrlQuery constructs a new QUrlQuery object. func NewQUrlQuery() *QUrlQuery { - var outptr_QUrlQuery *C.QUrlQuery = nil - C.QUrlQuery_new(&outptr_QUrlQuery) - ret := newQUrlQuery(outptr_QUrlQuery) + ret := newQUrlQuery(C.QUrlQuery_new()) ret.isSubclass = true return ret } // NewQUrlQuery2 constructs a new QUrlQuery object. func NewQUrlQuery2(url *QUrl) *QUrlQuery { - var outptr_QUrlQuery *C.QUrlQuery = nil - C.QUrlQuery_new2(url.cPointer(), &outptr_QUrlQuery) - ret := newQUrlQuery(outptr_QUrlQuery) + ret := newQUrlQuery(C.QUrlQuery_new2(url.cPointer())) ret.isSubclass = true return ret } @@ -75,20 +68,16 @@ func NewQUrlQuery3(queryString string) *QUrlQuery { queryString_ms.data = C.CString(queryString) queryString_ms.len = C.size_t(len(queryString)) defer C.free(unsafe.Pointer(queryString_ms.data)) - var outptr_QUrlQuery *C.QUrlQuery = nil - C.QUrlQuery_new3(queryString_ms, &outptr_QUrlQuery) - ret := newQUrlQuery(outptr_QUrlQuery) + ret := newQUrlQuery(C.QUrlQuery_new3(queryString_ms)) ret.isSubclass = true return ret } // NewQUrlQuery4 constructs a new QUrlQuery object. func NewQUrlQuery4(other *QUrlQuery) *QUrlQuery { - var outptr_QUrlQuery *C.QUrlQuery = nil - C.QUrlQuery_new4(other.cPointer(), &outptr_QUrlQuery) - ret := newQUrlQuery(outptr_QUrlQuery) + ret := newQUrlQuery(C.QUrlQuery_new4(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qurlquery.h b/qt/gen_qurlquery.h index 9dfda84e..f7e4c0e8 100644 --- a/qt/gen_qurlquery.h +++ b/qt/gen_qurlquery.h @@ -24,10 +24,10 @@ typedef struct QUrl QUrl; typedef struct QUrlQuery QUrlQuery; #endif -void QUrlQuery_new(QUrlQuery** outptr_QUrlQuery); -void QUrlQuery_new2(QUrl* url, QUrlQuery** outptr_QUrlQuery); -void QUrlQuery_new3(struct miqt_string queryString, QUrlQuery** outptr_QUrlQuery); -void QUrlQuery_new4(QUrlQuery* other, QUrlQuery** outptr_QUrlQuery); +QUrlQuery* QUrlQuery_new(); +QUrlQuery* QUrlQuery_new2(QUrl* url); +QUrlQuery* QUrlQuery_new3(struct miqt_string queryString); +QUrlQuery* QUrlQuery_new4(QUrlQuery* other); void QUrlQuery_OperatorAssign(QUrlQuery* self, QUrlQuery* other); bool QUrlQuery_OperatorEqual(const QUrlQuery* self, QUrlQuery* other); bool QUrlQuery_OperatorNotEqual(const QUrlQuery* self, QUrlQuery* other); diff --git a/qt/gen_quuid.cpp b/qt/gen_quuid.cpp index e8c6011f..ffc2c91a 100644 --- a/qt/gen_quuid.cpp +++ b/qt/gen_quuid.cpp @@ -7,36 +7,30 @@ #include "gen_quuid.h" #include "_cgo_export.h" -void QUuid_new(QUuid** outptr_QUuid) { - QUuid* ret = new QUuid(); - *outptr_QUuid = ret; +QUuid* QUuid_new() { + return new QUuid(); } -void QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8, QUuid** outptr_QUuid) { - QUuid* ret = new QUuid(static_cast(l), static_cast(w1), static_cast(w2), static_cast(b1), static_cast(b2), static_cast(b3), static_cast(b4), static_cast(b5), static_cast(b6), static_cast(b7), static_cast(b8)); - *outptr_QUuid = ret; +QUuid* QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8) { + return new QUuid(static_cast(l), static_cast(w1), static_cast(w2), static_cast(b1), static_cast(b2), static_cast(b3), static_cast(b4), static_cast(b5), static_cast(b6), static_cast(b7), static_cast(b8)); } -void QUuid_new3(struct miqt_string param1, QUuid** outptr_QUuid) { +QUuid* QUuid_new3(struct miqt_string param1) { QString param1_QString = QString::fromUtf8(param1.data, param1.len); - QUuid* ret = new QUuid(param1_QString); - *outptr_QUuid = ret; + return new QUuid(param1_QString); } -void QUuid_new4(const char* param1, QUuid** outptr_QUuid) { - QUuid* ret = new QUuid(param1); - *outptr_QUuid = ret; +QUuid* QUuid_new4(const char* param1) { + return new QUuid(param1); } -void QUuid_new5(struct miqt_string param1, QUuid** outptr_QUuid) { +QUuid* QUuid_new5(struct miqt_string param1) { QByteArray param1_QByteArray(param1.data, param1.len); - QUuid* ret = new QUuid(param1_QByteArray); - *outptr_QUuid = ret; + return new QUuid(param1_QByteArray); } -void QUuid_new6(QUuid* param1, QUuid** outptr_QUuid) { - QUuid* ret = new QUuid(*param1); - *outptr_QUuid = ret; +QUuid* QUuid_new6(QUuid* param1) { + return new QUuid(*param1); } struct miqt_string QUuid_ToString(const QUuid* self) { diff --git a/qt/gen_quuid.go b/qt/gen_quuid.go index 53ead669..9aa33bf3 100644 --- a/qt/gen_quuid.go +++ b/qt/gen_quuid.go @@ -67,34 +67,27 @@ func newQUuid(h *C.QUuid) *QUuid { if h == nil { return nil } + return &QUuid{h: h} } // UnsafeNewQUuid constructs the type using only unsafe pointers. func UnsafeNewQUuid(h unsafe.Pointer) *QUuid { - if h == nil { - return nil - } - - return &QUuid{h: (*C.QUuid)(h)} + return newQUuid((*C.QUuid)(h)) } // NewQUuid constructs a new QUuid object. func NewQUuid() *QUuid { - var outptr_QUuid *C.QUuid = nil - C.QUuid_new(&outptr_QUuid) - ret := newQUuid(outptr_QUuid) + ret := newQUuid(C.QUuid_new()) ret.isSubclass = true return ret } // NewQUuid2 constructs a new QUuid object. func NewQUuid2(l uint, w1 uint16, w2 uint16, b1 byte, b2 byte, b3 byte, b4 byte, b5 byte, b6 byte, b7 byte, b8 byte) *QUuid { - var outptr_QUuid *C.QUuid = nil - C.QUuid_new2((C.uint)(l), (C.uint16_t)(w1), (C.uint16_t)(w2), (C.uchar)(b1), (C.uchar)(b2), (C.uchar)(b3), (C.uchar)(b4), (C.uchar)(b5), (C.uchar)(b6), (C.uchar)(b7), (C.uchar)(b8), &outptr_QUuid) - ret := newQUuid(outptr_QUuid) + ret := newQUuid(C.QUuid_new2((C.uint)(l), (C.uint16_t)(w1), (C.uint16_t)(w2), (C.uchar)(b1), (C.uchar)(b2), (C.uchar)(b3), (C.uchar)(b4), (C.uchar)(b5), (C.uchar)(b6), (C.uchar)(b7), (C.uchar)(b8))) ret.isSubclass = true return ret } @@ -105,10 +98,8 @@ func NewQUuid3(param1 string) *QUuid { param1_ms.data = C.CString(param1) param1_ms.len = C.size_t(len(param1)) defer C.free(unsafe.Pointer(param1_ms.data)) - var outptr_QUuid *C.QUuid = nil - C.QUuid_new3(param1_ms, &outptr_QUuid) - ret := newQUuid(outptr_QUuid) + ret := newQUuid(C.QUuid_new3(param1_ms)) ret.isSubclass = true return ret } @@ -117,10 +108,8 @@ func NewQUuid3(param1 string) *QUuid { func NewQUuid4(param1 string) *QUuid { param1_Cstring := C.CString(param1) defer C.free(unsafe.Pointer(param1_Cstring)) - var outptr_QUuid *C.QUuid = nil - C.QUuid_new4(param1_Cstring, &outptr_QUuid) - ret := newQUuid(outptr_QUuid) + ret := newQUuid(C.QUuid_new4(param1_Cstring)) ret.isSubclass = true return ret } @@ -130,20 +119,16 @@ func NewQUuid5(param1 []byte) *QUuid { param1_alias := C.struct_miqt_string{} param1_alias.data = (*C.char)(unsafe.Pointer(¶m1[0])) param1_alias.len = C.size_t(len(param1)) - var outptr_QUuid *C.QUuid = nil - C.QUuid_new5(param1_alias, &outptr_QUuid) - ret := newQUuid(outptr_QUuid) + ret := newQUuid(C.QUuid_new5(param1_alias)) ret.isSubclass = true return ret } // NewQUuid6 constructs a new QUuid object. func NewQUuid6(param1 *QUuid) *QUuid { - var outptr_QUuid *C.QUuid = nil - C.QUuid_new6(param1.cPointer(), &outptr_QUuid) - ret := newQUuid(outptr_QUuid) + ret := newQUuid(C.QUuid_new6(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_quuid.h b/qt/gen_quuid.h index b5fd206e..7223b2d6 100644 --- a/qt/gen_quuid.h +++ b/qt/gen_quuid.h @@ -20,12 +20,12 @@ class QUuid; typedef struct QUuid QUuid; #endif -void QUuid_new(QUuid** outptr_QUuid); -void QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8, QUuid** outptr_QUuid); -void QUuid_new3(struct miqt_string param1, QUuid** outptr_QUuid); -void QUuid_new4(const char* param1, QUuid** outptr_QUuid); -void QUuid_new5(struct miqt_string param1, QUuid** outptr_QUuid); -void QUuid_new6(QUuid* param1, QUuid** outptr_QUuid); +QUuid* QUuid_new(); +QUuid* QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8); +QUuid* QUuid_new3(struct miqt_string param1); +QUuid* QUuid_new4(const char* param1); +QUuid* QUuid_new5(struct miqt_string param1); +QUuid* QUuid_new6(QUuid* param1); struct miqt_string QUuid_ToString(const QUuid* self); struct miqt_string QUuid_ToStringWithMode(const QUuid* self, int mode); struct miqt_string QUuid_ToByteArray(const QUuid* self); diff --git a/qt/gen_qvalidator.cpp b/qt/gen_qvalidator.cpp index 9a305c47..817602b3 100644 --- a/qt/gen_qvalidator.cpp +++ b/qt/gen_qvalidator.cpp @@ -256,16 +256,16 @@ public: }; -void QValidator_new(QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQValidator* ret = new MiqtVirtualQValidator(); - *outptr_QValidator = ret; - *outptr_QObject = static_cast(ret); +QValidator* QValidator_new() { + return new MiqtVirtualQValidator(); } -void QValidator_new2(QObject* parent, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQValidator* ret = new MiqtVirtualQValidator(parent); - *outptr_QValidator = ret; - *outptr_QObject = static_cast(ret); +QValidator* QValidator_new2(QObject* parent) { + return new MiqtVirtualQValidator(parent); +} + +void QValidator_virtbase(QValidator* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QValidator_MetaObject(const QValidator* self) { @@ -549,32 +549,24 @@ public: }; -void QIntValidator_new(QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(); - *outptr_QIntValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QIntValidator* QIntValidator_new() { + return new MiqtVirtualQIntValidator(); } -void QIntValidator_new2(int bottom, int top, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(static_cast(bottom), static_cast(top)); - *outptr_QIntValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QIntValidator* QIntValidator_new2(int bottom, int top) { + return new MiqtVirtualQIntValidator(static_cast(bottom), static_cast(top)); } -void QIntValidator_new3(QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(parent); - *outptr_QIntValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QIntValidator* QIntValidator_new3(QObject* parent) { + return new MiqtVirtualQIntValidator(parent); } -void QIntValidator_new4(int bottom, int top, QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(static_cast(bottom), static_cast(top), parent); - *outptr_QIntValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QIntValidator* QIntValidator_new4(int bottom, int top, QObject* parent) { + return new MiqtVirtualQIntValidator(static_cast(bottom), static_cast(top), parent); +} + +void QIntValidator_virtbase(QIntValidator* src, QValidator** outptr_QValidator) { + *outptr_QValidator = static_cast(src); } QMetaObject* QIntValidator_MetaObject(const QIntValidator* self) { @@ -839,32 +831,24 @@ public: }; -void QDoubleValidator_new(QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(); - *outptr_QDoubleValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QDoubleValidator* QDoubleValidator_new() { + return new MiqtVirtualQDoubleValidator(); } -void QDoubleValidator_new2(double bottom, double top, int decimals, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals)); - *outptr_QDoubleValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QDoubleValidator* QDoubleValidator_new2(double bottom, double top, int decimals) { + return new MiqtVirtualQDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals)); } -void QDoubleValidator_new3(QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(parent); - *outptr_QDoubleValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QDoubleValidator* QDoubleValidator_new3(QObject* parent) { + return new MiqtVirtualQDoubleValidator(parent); } -void QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals), parent); - *outptr_QDoubleValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QDoubleValidator* QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent) { + return new MiqtVirtualQDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals), parent); +} + +void QDoubleValidator_virtbase(QDoubleValidator* src, QValidator** outptr_QValidator) { + *outptr_QValidator = static_cast(src); } QMetaObject* QDoubleValidator_MetaObject(const QDoubleValidator* self) { @@ -1138,32 +1122,24 @@ public: }; -void QRegExpValidator_new(QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQRegExpValidator* ret = new MiqtVirtualQRegExpValidator(); - *outptr_QRegExpValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QRegExpValidator* QRegExpValidator_new() { + return new MiqtVirtualQRegExpValidator(); } -void QRegExpValidator_new2(QRegExp* rx, QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQRegExpValidator* ret = new MiqtVirtualQRegExpValidator(*rx); - *outptr_QRegExpValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QRegExpValidator* QRegExpValidator_new2(QRegExp* rx) { + return new MiqtVirtualQRegExpValidator(*rx); } -void QRegExpValidator_new3(QObject* parent, QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQRegExpValidator* ret = new MiqtVirtualQRegExpValidator(parent); - *outptr_QRegExpValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QRegExpValidator* QRegExpValidator_new3(QObject* parent) { + return new MiqtVirtualQRegExpValidator(parent); } -void QRegExpValidator_new4(QRegExp* rx, QObject* parent, QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQRegExpValidator* ret = new MiqtVirtualQRegExpValidator(*rx, parent); - *outptr_QRegExpValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QRegExpValidator* QRegExpValidator_new4(QRegExp* rx, QObject* parent) { + return new MiqtVirtualQRegExpValidator(*rx, parent); +} + +void QRegExpValidator_virtbase(QRegExpValidator* src, QValidator** outptr_QValidator) { + *outptr_QValidator = static_cast(src); } QMetaObject* QRegExpValidator_MetaObject(const QRegExpValidator* self) { @@ -1370,32 +1346,24 @@ public: }; -void QRegularExpressionValidator_new(QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(); - *outptr_QRegularExpressionValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QRegularExpressionValidator* QRegularExpressionValidator_new() { + return new MiqtVirtualQRegularExpressionValidator(); } -void QRegularExpressionValidator_new2(QRegularExpression* re, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(*re); - *outptr_QRegularExpressionValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QRegularExpressionValidator* QRegularExpressionValidator_new2(QRegularExpression* re) { + return new MiqtVirtualQRegularExpressionValidator(*re); } -void QRegularExpressionValidator_new3(QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(parent); - *outptr_QRegularExpressionValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QRegularExpressionValidator* QRegularExpressionValidator_new3(QObject* parent) { + return new MiqtVirtualQRegularExpressionValidator(parent); } -void QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(*re, parent); - *outptr_QRegularExpressionValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QRegularExpressionValidator* QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent) { + return new MiqtVirtualQRegularExpressionValidator(*re, parent); +} + +void QRegularExpressionValidator_virtbase(QRegularExpressionValidator* src, QValidator** outptr_QValidator) { + *outptr_QValidator = static_cast(src); } QMetaObject* QRegularExpressionValidator_MetaObject(const QRegularExpressionValidator* self) { diff --git a/qt/gen_qvalidator.go b/qt/gen_qvalidator.go index a18ac226..c2501be5 100644 --- a/qt/gen_qvalidator.go +++ b/qt/gen_qvalidator.go @@ -50,42 +50,34 @@ func (this *QValidator) UnsafePointer() unsafe.Pointer { } // newQValidator constructs the type using only CGO pointers. -func newQValidator(h *C.QValidator, h_QObject *C.QObject) *QValidator { +func newQValidator(h *C.QValidator) *QValidator { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QValidator_virtbase(h, &outptr_QObject) + return &QValidator{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQValidator constructs the type using only unsafe pointers. -func UnsafeNewQValidator(h unsafe.Pointer, h_QObject unsafe.Pointer) *QValidator { - if h == nil { - return nil - } - - return &QValidator{h: (*C.QValidator)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQValidator(h unsafe.Pointer) *QValidator { + return newQValidator((*C.QValidator)(h)) } // NewQValidator constructs a new QValidator object. func NewQValidator() *QValidator { - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QValidator_new(&outptr_QValidator, &outptr_QObject) - ret := newQValidator(outptr_QValidator, outptr_QObject) + ret := newQValidator(C.QValidator_new()) ret.isSubclass = true return ret } // NewQValidator2 constructs a new QValidator object. func NewQValidator2(parent *QObject) *QValidator { - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QValidator_new2(parent.cPointer(), &outptr_QValidator, &outptr_QObject) - ret := newQValidator(outptr_QValidator, outptr_QObject) + ret := newQValidator(C.QValidator_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -342,7 +334,7 @@ func miqt_exec_callback_QValidator_TimerEvent(self *C.QValidator, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QValidator{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -368,7 +360,7 @@ func miqt_exec_callback_QValidator_ChildEvent(self *C.QValidator, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QValidator{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -487,68 +479,50 @@ func (this *QIntValidator) UnsafePointer() unsafe.Pointer { } // newQIntValidator constructs the type using only CGO pointers. -func newQIntValidator(h *C.QIntValidator, h_QValidator *C.QValidator, h_QObject *C.QObject) *QIntValidator { +func newQIntValidator(h *C.QIntValidator) *QIntValidator { if h == nil { return nil } + var outptr_QValidator *C.QValidator = nil + C.QIntValidator_virtbase(h, &outptr_QValidator) + return &QIntValidator{h: h, - QValidator: newQValidator(h_QValidator, h_QObject)} + QValidator: newQValidator(outptr_QValidator)} } // UnsafeNewQIntValidator constructs the type using only unsafe pointers. -func UnsafeNewQIntValidator(h unsafe.Pointer, h_QValidator unsafe.Pointer, h_QObject unsafe.Pointer) *QIntValidator { - if h == nil { - return nil - } - - return &QIntValidator{h: (*C.QIntValidator)(h), - QValidator: UnsafeNewQValidator(h_QValidator, h_QObject)} +func UnsafeNewQIntValidator(h unsafe.Pointer) *QIntValidator { + return newQIntValidator((*C.QIntValidator)(h)) } // NewQIntValidator constructs a new QIntValidator object. func NewQIntValidator() *QIntValidator { - var outptr_QIntValidator *C.QIntValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QIntValidator_new(&outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) - ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret := newQIntValidator(C.QIntValidator_new()) ret.isSubclass = true return ret } // NewQIntValidator2 constructs a new QIntValidator object. func NewQIntValidator2(bottom int, top int) *QIntValidator { - var outptr_QIntValidator *C.QIntValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QIntValidator_new2((C.int)(bottom), (C.int)(top), &outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) - ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret := newQIntValidator(C.QIntValidator_new2((C.int)(bottom), (C.int)(top))) ret.isSubclass = true return ret } // NewQIntValidator3 constructs a new QIntValidator object. func NewQIntValidator3(parent *QObject) *QIntValidator { - var outptr_QIntValidator *C.QIntValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QIntValidator_new3(parent.cPointer(), &outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) - ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret := newQIntValidator(C.QIntValidator_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQIntValidator4 constructs a new QIntValidator object. func NewQIntValidator4(bottom int, top int, parent *QObject) *QIntValidator { - var outptr_QIntValidator *C.QIntValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QIntValidator_new4((C.int)(bottom), (C.int)(top), parent.cPointer(), &outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) - ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret := newQIntValidator(C.QIntValidator_new4((C.int)(bottom), (C.int)(top), parent.cPointer())) ret.isSubclass = true return ret } @@ -833,68 +807,50 @@ func (this *QDoubleValidator) UnsafePointer() unsafe.Pointer { } // newQDoubleValidator constructs the type using only CGO pointers. -func newQDoubleValidator(h *C.QDoubleValidator, h_QValidator *C.QValidator, h_QObject *C.QObject) *QDoubleValidator { +func newQDoubleValidator(h *C.QDoubleValidator) *QDoubleValidator { if h == nil { return nil } + var outptr_QValidator *C.QValidator = nil + C.QDoubleValidator_virtbase(h, &outptr_QValidator) + return &QDoubleValidator{h: h, - QValidator: newQValidator(h_QValidator, h_QObject)} + QValidator: newQValidator(outptr_QValidator)} } // UnsafeNewQDoubleValidator constructs the type using only unsafe pointers. -func UnsafeNewQDoubleValidator(h unsafe.Pointer, h_QValidator unsafe.Pointer, h_QObject unsafe.Pointer) *QDoubleValidator { - if h == nil { - return nil - } - - return &QDoubleValidator{h: (*C.QDoubleValidator)(h), - QValidator: UnsafeNewQValidator(h_QValidator, h_QObject)} +func UnsafeNewQDoubleValidator(h unsafe.Pointer) *QDoubleValidator { + return newQDoubleValidator((*C.QDoubleValidator)(h)) } // NewQDoubleValidator constructs a new QDoubleValidator object. func NewQDoubleValidator() *QDoubleValidator { - var outptr_QDoubleValidator *C.QDoubleValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QDoubleValidator_new(&outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) - ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret := newQDoubleValidator(C.QDoubleValidator_new()) ret.isSubclass = true return ret } // NewQDoubleValidator2 constructs a new QDoubleValidator object. func NewQDoubleValidator2(bottom float64, top float64, decimals int) *QDoubleValidator { - var outptr_QDoubleValidator *C.QDoubleValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QDoubleValidator_new2((C.double)(bottom), (C.double)(top), (C.int)(decimals), &outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) - ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret := newQDoubleValidator(C.QDoubleValidator_new2((C.double)(bottom), (C.double)(top), (C.int)(decimals))) ret.isSubclass = true return ret } // NewQDoubleValidator3 constructs a new QDoubleValidator object. func NewQDoubleValidator3(parent *QObject) *QDoubleValidator { - var outptr_QDoubleValidator *C.QDoubleValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QDoubleValidator_new3(parent.cPointer(), &outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) - ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret := newQDoubleValidator(C.QDoubleValidator_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQDoubleValidator4 constructs a new QDoubleValidator object. func NewQDoubleValidator4(bottom float64, top float64, decimals int, parent *QObject) *QDoubleValidator { - var outptr_QDoubleValidator *C.QDoubleValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QDoubleValidator_new4((C.double)(bottom), (C.double)(top), (C.int)(decimals), parent.cPointer(), &outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) - ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret := newQDoubleValidator(C.QDoubleValidator_new4((C.double)(bottom), (C.double)(top), (C.int)(decimals), parent.cPointer())) ret.isSubclass = true return ret } @@ -1229,68 +1185,50 @@ func (this *QRegExpValidator) UnsafePointer() unsafe.Pointer { } // newQRegExpValidator constructs the type using only CGO pointers. -func newQRegExpValidator(h *C.QRegExpValidator, h_QValidator *C.QValidator, h_QObject *C.QObject) *QRegExpValidator { +func newQRegExpValidator(h *C.QRegExpValidator) *QRegExpValidator { if h == nil { return nil } + var outptr_QValidator *C.QValidator = nil + C.QRegExpValidator_virtbase(h, &outptr_QValidator) + return &QRegExpValidator{h: h, - QValidator: newQValidator(h_QValidator, h_QObject)} + QValidator: newQValidator(outptr_QValidator)} } // UnsafeNewQRegExpValidator constructs the type using only unsafe pointers. -func UnsafeNewQRegExpValidator(h unsafe.Pointer, h_QValidator unsafe.Pointer, h_QObject unsafe.Pointer) *QRegExpValidator { - if h == nil { - return nil - } - - return &QRegExpValidator{h: (*C.QRegExpValidator)(h), - QValidator: UnsafeNewQValidator(h_QValidator, h_QObject)} +func UnsafeNewQRegExpValidator(h unsafe.Pointer) *QRegExpValidator { + return newQRegExpValidator((*C.QRegExpValidator)(h)) } // NewQRegExpValidator constructs a new QRegExpValidator object. func NewQRegExpValidator() *QRegExpValidator { - var outptr_QRegExpValidator *C.QRegExpValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QRegExpValidator_new(&outptr_QRegExpValidator, &outptr_QValidator, &outptr_QObject) - ret := newQRegExpValidator(outptr_QRegExpValidator, outptr_QValidator, outptr_QObject) + ret := newQRegExpValidator(C.QRegExpValidator_new()) ret.isSubclass = true return ret } // NewQRegExpValidator2 constructs a new QRegExpValidator object. func NewQRegExpValidator2(rx *QRegExp) *QRegExpValidator { - var outptr_QRegExpValidator *C.QRegExpValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QRegExpValidator_new2(rx.cPointer(), &outptr_QRegExpValidator, &outptr_QValidator, &outptr_QObject) - ret := newQRegExpValidator(outptr_QRegExpValidator, outptr_QValidator, outptr_QObject) + ret := newQRegExpValidator(C.QRegExpValidator_new2(rx.cPointer())) ret.isSubclass = true return ret } // NewQRegExpValidator3 constructs a new QRegExpValidator object. func NewQRegExpValidator3(parent *QObject) *QRegExpValidator { - var outptr_QRegExpValidator *C.QRegExpValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QRegExpValidator_new3(parent.cPointer(), &outptr_QRegExpValidator, &outptr_QValidator, &outptr_QObject) - ret := newQRegExpValidator(outptr_QRegExpValidator, outptr_QValidator, outptr_QObject) + ret := newQRegExpValidator(C.QRegExpValidator_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQRegExpValidator4 constructs a new QRegExpValidator object. func NewQRegExpValidator4(rx *QRegExp, parent *QObject) *QRegExpValidator { - var outptr_QRegExpValidator *C.QRegExpValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QRegExpValidator_new4(rx.cPointer(), parent.cPointer(), &outptr_QRegExpValidator, &outptr_QValidator, &outptr_QObject) - ret := newQRegExpValidator(outptr_QRegExpValidator, outptr_QValidator, outptr_QObject) + ret := newQRegExpValidator(C.QRegExpValidator_new4(rx.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -1507,68 +1445,50 @@ func (this *QRegularExpressionValidator) UnsafePointer() unsafe.Pointer { } // newQRegularExpressionValidator constructs the type using only CGO pointers. -func newQRegularExpressionValidator(h *C.QRegularExpressionValidator, h_QValidator *C.QValidator, h_QObject *C.QObject) *QRegularExpressionValidator { +func newQRegularExpressionValidator(h *C.QRegularExpressionValidator) *QRegularExpressionValidator { if h == nil { return nil } + var outptr_QValidator *C.QValidator = nil + C.QRegularExpressionValidator_virtbase(h, &outptr_QValidator) + return &QRegularExpressionValidator{h: h, - QValidator: newQValidator(h_QValidator, h_QObject)} + QValidator: newQValidator(outptr_QValidator)} } // UnsafeNewQRegularExpressionValidator constructs the type using only unsafe pointers. -func UnsafeNewQRegularExpressionValidator(h unsafe.Pointer, h_QValidator unsafe.Pointer, h_QObject unsafe.Pointer) *QRegularExpressionValidator { - if h == nil { - return nil - } - - return &QRegularExpressionValidator{h: (*C.QRegularExpressionValidator)(h), - QValidator: UnsafeNewQValidator(h_QValidator, h_QObject)} +func UnsafeNewQRegularExpressionValidator(h unsafe.Pointer) *QRegularExpressionValidator { + return newQRegularExpressionValidator((*C.QRegularExpressionValidator)(h)) } // NewQRegularExpressionValidator constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator() *QRegularExpressionValidator { - var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QRegularExpressionValidator_new(&outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) - ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret := newQRegularExpressionValidator(C.QRegularExpressionValidator_new()) ret.isSubclass = true return ret } // NewQRegularExpressionValidator2 constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator2(re *QRegularExpression) *QRegularExpressionValidator { - var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QRegularExpressionValidator_new2(re.cPointer(), &outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) - ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret := newQRegularExpressionValidator(C.QRegularExpressionValidator_new2(re.cPointer())) ret.isSubclass = true return ret } // NewQRegularExpressionValidator3 constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator3(parent *QObject) *QRegularExpressionValidator { - var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QRegularExpressionValidator_new3(parent.cPointer(), &outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) - ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret := newQRegularExpressionValidator(C.QRegularExpressionValidator_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQRegularExpressionValidator4 constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator4(re *QRegularExpression, parent *QObject) *QRegularExpressionValidator { - var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QRegularExpressionValidator_new4(re.cPointer(), parent.cPointer(), &outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) - ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret := newQRegularExpressionValidator(C.QRegularExpressionValidator_new4(re.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qvalidator.h b/qt/gen_qvalidator.h index 53a918f2..e9c7e51a 100644 --- a/qt/gen_qvalidator.h +++ b/qt/gen_qvalidator.h @@ -46,8 +46,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QValidator QValidator; #endif -void QValidator_new(QValidator** outptr_QValidator, QObject** outptr_QObject); -void QValidator_new2(QObject* parent, QValidator** outptr_QValidator, QObject** outptr_QObject); +QValidator* QValidator_new(); +QValidator* QValidator_new2(QObject* parent); +void QValidator_virtbase(QValidator* src, QObject** outptr_QObject); QMetaObject* QValidator_MetaObject(const QValidator* self); void* QValidator_Metacast(QValidator* self, const char* param1); struct miqt_string QValidator_Tr(const char* s); @@ -82,10 +83,11 @@ void QValidator_override_virtual_DisconnectNotify(void* self, intptr_t slot); void QValidator_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QValidator_Delete(QValidator* self, bool isSubclass); -void QIntValidator_new(QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QIntValidator_new2(int bottom, int top, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QIntValidator_new3(QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QIntValidator_new4(int bottom, int top, QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +QIntValidator* QIntValidator_new(); +QIntValidator* QIntValidator_new2(int bottom, int top); +QIntValidator* QIntValidator_new3(QObject* parent); +QIntValidator* QIntValidator_new4(int bottom, int top, QObject* parent); +void QIntValidator_virtbase(QIntValidator* src, QValidator** outptr_QValidator); QMetaObject* QIntValidator_MetaObject(const QIntValidator* self); void* QIntValidator_Metacast(QIntValidator* self, const char* param1); struct miqt_string QIntValidator_Tr(const char* s); @@ -113,10 +115,11 @@ void QIntValidator_override_virtual_SetRange(void* self, intptr_t slot); void QIntValidator_virtualbase_SetRange(void* self, int bottom, int top); void QIntValidator_Delete(QIntValidator* self, bool isSubclass); -void QDoubleValidator_new(QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QDoubleValidator_new2(double bottom, double top, int decimals, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QDoubleValidator_new3(QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +QDoubleValidator* QDoubleValidator_new(); +QDoubleValidator* QDoubleValidator_new2(double bottom, double top, int decimals); +QDoubleValidator* QDoubleValidator_new3(QObject* parent); +QDoubleValidator* QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent); +void QDoubleValidator_virtbase(QDoubleValidator* src, QValidator** outptr_QValidator); QMetaObject* QDoubleValidator_MetaObject(const QDoubleValidator* self); void* QDoubleValidator_Metacast(QDoubleValidator* self, const char* param1); struct miqt_string QDoubleValidator_Tr(const char* s); @@ -151,10 +154,11 @@ void QDoubleValidator_override_virtual_Fixup(void* self, intptr_t slot); void QDoubleValidator_virtualbase_Fixup(const void* self, struct miqt_string param1); void QDoubleValidator_Delete(QDoubleValidator* self, bool isSubclass); -void QRegExpValidator_new(QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QRegExpValidator_new2(QRegExp* rx, QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QRegExpValidator_new3(QObject* parent, QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QRegExpValidator_new4(QRegExp* rx, QObject* parent, QRegExpValidator** outptr_QRegExpValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +QRegExpValidator* QRegExpValidator_new(); +QRegExpValidator* QRegExpValidator_new2(QRegExp* rx); +QRegExpValidator* QRegExpValidator_new3(QObject* parent); +QRegExpValidator* QRegExpValidator_new4(QRegExp* rx, QObject* parent); +void QRegExpValidator_virtbase(QRegExpValidator* src, QValidator** outptr_QValidator); QMetaObject* QRegExpValidator_MetaObject(const QRegExpValidator* self); void* QRegExpValidator_Metacast(QRegExpValidator* self, const char* param1); struct miqt_string QRegExpValidator_Tr(const char* s); @@ -174,10 +178,11 @@ void QRegExpValidator_override_virtual_Fixup(void* self, intptr_t slot); void QRegExpValidator_virtualbase_Fixup(const void* self, struct miqt_string param1); void QRegExpValidator_Delete(QRegExpValidator* self, bool isSubclass); -void QRegularExpressionValidator_new(QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QRegularExpressionValidator_new2(QRegularExpression* re, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QRegularExpressionValidator_new3(QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +QRegularExpressionValidator* QRegularExpressionValidator_new(); +QRegularExpressionValidator* QRegularExpressionValidator_new2(QRegularExpression* re); +QRegularExpressionValidator* QRegularExpressionValidator_new3(QObject* parent); +QRegularExpressionValidator* QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent); +void QRegularExpressionValidator_virtbase(QRegularExpressionValidator* src, QValidator** outptr_QValidator); QMetaObject* QRegularExpressionValidator_MetaObject(const QRegularExpressionValidator* self); void* QRegularExpressionValidator_Metacast(QRegularExpressionValidator* self, const char* param1); struct miqt_string QRegularExpressionValidator_Tr(const char* s); diff --git a/qt/gen_qvariant.cpp b/qt/gen_qvariant.cpp index b5b2d085..f89c9d74 100644 --- a/qt/gen_qvariant.cpp +++ b/qt/gen_qvariant.cpp @@ -39,94 +39,77 @@ #include "gen_qvariant.h" #include "_cgo_export.h" -void QVariant_new(QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(); - *outptr_QVariant = ret; +QVariant* QVariant_new() { + return new QVariant(); } -void QVariant_new2(int typeVal, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(typeVal)); - *outptr_QVariant = ret; +QVariant* QVariant_new2(int typeVal) { + return new QVariant(static_cast(typeVal)); } -void QVariant_new3(int typeId, const void* copyVal, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(typeId), copyVal); - *outptr_QVariant = ret; +QVariant* QVariant_new3(int typeId, const void* copyVal) { + return new QVariant(static_cast(typeId), copyVal); } -void QVariant_new4(int typeId, const void* copyVal, unsigned int flags, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(typeId), copyVal, static_cast(flags)); - *outptr_QVariant = ret; +QVariant* QVariant_new4(int typeId, const void* copyVal, unsigned int flags) { + return new QVariant(static_cast(typeId), copyVal, static_cast(flags)); } -void QVariant_new5(QVariant* other, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*other); - *outptr_QVariant = ret; +QVariant* QVariant_new5(QVariant* other) { + return new QVariant(*other); } -void QVariant_new6(QDataStream* s, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*s); - *outptr_QVariant = ret; +QVariant* QVariant_new6(QDataStream* s) { + return new QVariant(*s); } -void QVariant_new7(int i, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(i)); - *outptr_QVariant = ret; +QVariant* QVariant_new7(int i) { + return new QVariant(static_cast(i)); } -void QVariant_new8(unsigned int ui, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(ui)); - *outptr_QVariant = ret; +QVariant* QVariant_new8(unsigned int ui) { + return new QVariant(static_cast(ui)); } -void QVariant_new9(long long ll, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(ll)); - *outptr_QVariant = ret; +QVariant* QVariant_new9(long long ll) { + return new QVariant(static_cast(ll)); } -void QVariant_new10(unsigned long long ull, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(ull)); - *outptr_QVariant = ret; +QVariant* QVariant_new10(unsigned long long ull) { + return new QVariant(static_cast(ull)); } -void QVariant_new11(bool b, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(b); - *outptr_QVariant = ret; +QVariant* QVariant_new11(bool b) { + return new QVariant(b); } -void QVariant_new12(double d, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(d)); - *outptr_QVariant = ret; +QVariant* QVariant_new12(double d) { + return new QVariant(static_cast(d)); } -void QVariant_new13(float f, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(f)); - *outptr_QVariant = ret; +QVariant* QVariant_new13(float f) { + return new QVariant(static_cast(f)); } -void QVariant_new14(const char* str, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(str); - *outptr_QVariant = ret; +QVariant* QVariant_new14(const char* str) { + return new QVariant(str); } -void QVariant_new15(struct miqt_string bytearray, QVariant** outptr_QVariant) { +QVariant* QVariant_new15(struct miqt_string bytearray) { QByteArray bytearray_QByteArray(bytearray.data, bytearray.len); - QVariant* ret = new QVariant(bytearray_QByteArray); - *outptr_QVariant = ret; + return new QVariant(bytearray_QByteArray); } -void QVariant_new16(QBitArray* bitarray, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*bitarray); - *outptr_QVariant = ret; +QVariant* QVariant_new16(QBitArray* bitarray) { + return new QVariant(*bitarray); } -void QVariant_new17(struct miqt_string stringVal, QVariant** outptr_QVariant) { +QVariant* QVariant_new17(struct miqt_string stringVal) { QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len); - QVariant* ret = new QVariant(stringVal_QString); - *outptr_QVariant = ret; + return new QVariant(stringVal_QString); } -void QVariant_new18(struct miqt_array /* of struct miqt_string */ stringlist, QVariant** outptr_QVariant) { +QVariant* QVariant_new18(struct miqt_array /* of struct miqt_string */ stringlist) { QStringList stringlist_QList; stringlist_QList.reserve(stringlist.len); struct miqt_string* stringlist_arr = static_cast(stringlist.data); @@ -134,31 +117,26 @@ void QVariant_new18(struct miqt_array /* of struct miqt_string */ stringlist, Q QString stringlist_arr_i_QString = QString::fromUtf8(stringlist_arr[i].data, stringlist_arr[i].len); stringlist_QList.push_back(stringlist_arr_i_QString); } - QVariant* ret = new QVariant(stringlist_QList); - *outptr_QVariant = ret; + return new QVariant(stringlist_QList); } -void QVariant_new19(QChar* qchar, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*qchar); - *outptr_QVariant = ret; +QVariant* QVariant_new19(QChar* qchar) { + return new QVariant(*qchar); } -void QVariant_new20(QDate* date, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*date); - *outptr_QVariant = ret; +QVariant* QVariant_new20(QDate* date) { + return new QVariant(*date); } -void QVariant_new21(QTime* time, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*time); - *outptr_QVariant = ret; +QVariant* QVariant_new21(QTime* time) { + return new QVariant(*time); } -void QVariant_new22(QDateTime* datetime, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*datetime); - *outptr_QVariant = ret; +QVariant* QVariant_new22(QDateTime* datetime) { + return new QVariant(*datetime); } -void QVariant_new23(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal, QVariant** outptr_QVariant) { +QVariant* QVariant_new23(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal) { QMap mapVal_QMap; struct miqt_string* mapVal_karr = static_cast(mapVal.keys); QVariant** mapVal_varr = static_cast(mapVal.values); @@ -166,11 +144,10 @@ void QVariant_new23(struct miqt_map /* of struct miqt_string to QVariant* */ ma QString mapVal_karr_i_QString = QString::fromUtf8(mapVal_karr[i].data, mapVal_karr[i].len); mapVal_QMap[mapVal_karr_i_QString] = *(mapVal_varr[i]); } - QVariant* ret = new QVariant(mapVal_QMap); - *outptr_QVariant = ret; + return new QVariant(mapVal_QMap); } -void QVariant_new24(struct miqt_map /* of struct miqt_string to QVariant* */ hash, QVariant** outptr_QVariant) { +QVariant* QVariant_new24(struct miqt_map /* of struct miqt_string to QVariant* */ hash) { QHash hash_QMap; hash_QMap.reserve(hash.len); struct miqt_string* hash_karr = static_cast(hash.keys); @@ -179,108 +156,87 @@ void QVariant_new24(struct miqt_map /* of struct miqt_string to QVariant* */ ha QString hash_karr_i_QString = QString::fromUtf8(hash_karr[i].data, hash_karr[i].len); hash_QMap[hash_karr_i_QString] = *(hash_varr[i]); } - QVariant* ret = new QVariant(hash_QMap); - *outptr_QVariant = ret; + return new QVariant(hash_QMap); } -void QVariant_new25(QSize* size, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*size); - *outptr_QVariant = ret; +QVariant* QVariant_new25(QSize* size) { + return new QVariant(*size); } -void QVariant_new26(QSizeF* size, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*size); - *outptr_QVariant = ret; +QVariant* QVariant_new26(QSizeF* size) { + return new QVariant(*size); } -void QVariant_new27(QPoint* pt, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*pt); - *outptr_QVariant = ret; +QVariant* QVariant_new27(QPoint* pt) { + return new QVariant(*pt); } -void QVariant_new28(QPointF* pt, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*pt); - *outptr_QVariant = ret; +QVariant* QVariant_new28(QPointF* pt) { + return new QVariant(*pt); } -void QVariant_new29(QLine* line, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*line); - *outptr_QVariant = ret; +QVariant* QVariant_new29(QLine* line) { + return new QVariant(*line); } -void QVariant_new30(QLineF* line, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*line); - *outptr_QVariant = ret; +QVariant* QVariant_new30(QLineF* line) { + return new QVariant(*line); } -void QVariant_new31(QRect* rect, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*rect); - *outptr_QVariant = ret; +QVariant* QVariant_new31(QRect* rect) { + return new QVariant(*rect); } -void QVariant_new32(QRectF* rect, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*rect); - *outptr_QVariant = ret; +QVariant* QVariant_new32(QRectF* rect) { + return new QVariant(*rect); } -void QVariant_new33(QLocale* locale, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*locale); - *outptr_QVariant = ret; +QVariant* QVariant_new33(QLocale* locale) { + return new QVariant(*locale); } -void QVariant_new34(QRegExp* regExp, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*regExp); - *outptr_QVariant = ret; +QVariant* QVariant_new34(QRegExp* regExp) { + return new QVariant(*regExp); } -void QVariant_new35(QRegularExpression* re, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*re); - *outptr_QVariant = ret; +QVariant* QVariant_new35(QRegularExpression* re) { + return new QVariant(*re); } -void QVariant_new36(QEasingCurve* easing, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*easing); - *outptr_QVariant = ret; +QVariant* QVariant_new36(QEasingCurve* easing) { + return new QVariant(*easing); } -void QVariant_new37(QUuid* uuid, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*uuid); - *outptr_QVariant = ret; +QVariant* QVariant_new37(QUuid* uuid) { + return new QVariant(*uuid); } -void QVariant_new38(QUrl* url, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*url); - *outptr_QVariant = ret; +QVariant* QVariant_new38(QUrl* url) { + return new QVariant(*url); } -void QVariant_new39(QJsonValue* jsonValue, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*jsonValue); - *outptr_QVariant = ret; +QVariant* QVariant_new39(QJsonValue* jsonValue) { + return new QVariant(*jsonValue); } -void QVariant_new40(QJsonObject* jsonObject, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*jsonObject); - *outptr_QVariant = ret; +QVariant* QVariant_new40(QJsonObject* jsonObject) { + return new QVariant(*jsonObject); } -void QVariant_new41(QJsonArray* jsonArray, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*jsonArray); - *outptr_QVariant = ret; +QVariant* QVariant_new41(QJsonArray* jsonArray) { + return new QVariant(*jsonArray); } -void QVariant_new42(QJsonDocument* jsonDocument, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*jsonDocument); - *outptr_QVariant = ret; +QVariant* QVariant_new42(QJsonDocument* jsonDocument) { + return new QVariant(*jsonDocument); } -void QVariant_new43(QModelIndex* modelIndex, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*modelIndex); - *outptr_QVariant = ret; +QVariant* QVariant_new43(QModelIndex* modelIndex) { + return new QVariant(*modelIndex); } -void QVariant_new44(QPersistentModelIndex* modelIndex, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*modelIndex); - *outptr_QVariant = ret; +QVariant* QVariant_new44(QPersistentModelIndex* modelIndex) { + return new QVariant(*modelIndex); } void QVariant_OperatorAssign(QVariant* self, QVariant* other) { @@ -651,14 +607,12 @@ void QVariant_Delete(QVariant* self, bool isSubclass) { } } -void QVariantComparisonHelper_new(QVariant* varVal, QVariantComparisonHelper** outptr_QVariantComparisonHelper) { - QVariantComparisonHelper* ret = new QVariantComparisonHelper(*varVal); - *outptr_QVariantComparisonHelper = ret; +QVariantComparisonHelper* QVariantComparisonHelper_new(QVariant* varVal) { + return new QVariantComparisonHelper(*varVal); } -void QVariantComparisonHelper_new2(QVariantComparisonHelper* param1, QVariantComparisonHelper** outptr_QVariantComparisonHelper) { - QVariantComparisonHelper* ret = new QVariantComparisonHelper(*param1); - *outptr_QVariantComparisonHelper = ret; +QVariantComparisonHelper* QVariantComparisonHelper_new2(QVariantComparisonHelper* param1) { + return new QVariantComparisonHelper(*param1); } void QVariantComparisonHelper_Delete(QVariantComparisonHelper* self, bool isSubclass) { @@ -677,9 +631,8 @@ void QVariant__Handler_Delete(QVariant__Handler* self, bool isSubclass) { } } -void QSequentialIterable__const_iterator_new(QSequentialIterable__const_iterator* other, QSequentialIterable__const_iterator** outptr_QSequentialIterable__const_iterator) { - QSequentialIterable::const_iterator* ret = new QSequentialIterable::const_iterator(*other); - *outptr_QSequentialIterable__const_iterator = ret; +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_new(QSequentialIterable__const_iterator* other) { + return new QSequentialIterable::const_iterator(*other); } void QSequentialIterable__const_iterator_OperatorAssign(QSequentialIterable__const_iterator* self, QSequentialIterable__const_iterator* other) { @@ -746,9 +699,8 @@ void QSequentialIterable__const_iterator_Delete(QSequentialIterable__const_itera } } -void QAssociativeIterable__const_iterator_new(QAssociativeIterable__const_iterator* other, QAssociativeIterable__const_iterator** outptr_QAssociativeIterable__const_iterator) { - QAssociativeIterable::const_iterator* ret = new QAssociativeIterable::const_iterator(*other); - *outptr_QAssociativeIterable__const_iterator = ret; +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_new(QAssociativeIterable__const_iterator* other) { + return new QAssociativeIterable::const_iterator(*other); } void QAssociativeIterable__const_iterator_OperatorAssign(QAssociativeIterable__const_iterator* self, QAssociativeIterable__const_iterator* other) { diff --git a/qt/gen_qvariant.go b/qt/gen_qvariant.go index e9dc03c3..bc656f02 100644 --- a/qt/gen_qvariant.go +++ b/qt/gen_qvariant.go @@ -104,144 +104,115 @@ func newQVariant(h *C.QVariant) *QVariant { if h == nil { return nil } + return &QVariant{h: h} } // UnsafeNewQVariant constructs the type using only unsafe pointers. func UnsafeNewQVariant(h unsafe.Pointer) *QVariant { - if h == nil { - return nil - } - - return &QVariant{h: (*C.QVariant)(h)} + return newQVariant((*C.QVariant)(h)) } // NewQVariant constructs a new QVariant object. func NewQVariant() *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new(&outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new()) ret.isSubclass = true return ret } // NewQVariant2 constructs a new QVariant object. func NewQVariant2(typeVal QVariant__Type) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new2((C.int)(typeVal), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new2((C.int)(typeVal))) ret.isSubclass = true return ret } // NewQVariant3 constructs a new QVariant object. func NewQVariant3(typeId int, copyVal unsafe.Pointer) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new3((C.int)(typeId), copyVal, &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new3((C.int)(typeId), copyVal)) ret.isSubclass = true return ret } // NewQVariant4 constructs a new QVariant object. func NewQVariant4(typeId int, copyVal unsafe.Pointer, flags uint) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new4((C.int)(typeId), copyVal, (C.uint)(flags), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new4((C.int)(typeId), copyVal, (C.uint)(flags))) ret.isSubclass = true return ret } // NewQVariant5 constructs a new QVariant object. func NewQVariant5(other *QVariant) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new5(other.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new5(other.cPointer())) ret.isSubclass = true return ret } // NewQVariant6 constructs a new QVariant object. func NewQVariant6(s *QDataStream) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new6(s.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new6(s.cPointer())) ret.isSubclass = true return ret } // NewQVariant7 constructs a new QVariant object. func NewQVariant7(i int) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new7((C.int)(i), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new7((C.int)(i))) ret.isSubclass = true return ret } // NewQVariant8 constructs a new QVariant object. func NewQVariant8(ui uint) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new8((C.uint)(ui), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new8((C.uint)(ui))) ret.isSubclass = true return ret } // NewQVariant9 constructs a new QVariant object. func NewQVariant9(ll int64) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new9((C.longlong)(ll), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new9((C.longlong)(ll))) ret.isSubclass = true return ret } // NewQVariant10 constructs a new QVariant object. func NewQVariant10(ull uint64) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new10((C.ulonglong)(ull), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new10((C.ulonglong)(ull))) ret.isSubclass = true return ret } // NewQVariant11 constructs a new QVariant object. func NewQVariant11(b bool) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new11((C.bool)(b), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new11((C.bool)(b))) ret.isSubclass = true return ret } // NewQVariant12 constructs a new QVariant object. func NewQVariant12(d float64) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new12((C.double)(d), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new12((C.double)(d))) ret.isSubclass = true return ret } // NewQVariant13 constructs a new QVariant object. func NewQVariant13(f float32) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new13((C.float)(f), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new13((C.float)(f))) ret.isSubclass = true return ret } @@ -250,10 +221,8 @@ func NewQVariant13(f float32) *QVariant { func NewQVariant14(str string) *QVariant { str_Cstring := C.CString(str) defer C.free(unsafe.Pointer(str_Cstring)) - var outptr_QVariant *C.QVariant = nil - C.QVariant_new14(str_Cstring, &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new14(str_Cstring)) ret.isSubclass = true return ret } @@ -263,20 +232,16 @@ func NewQVariant15(bytearray []byte) *QVariant { bytearray_alias := C.struct_miqt_string{} bytearray_alias.data = (*C.char)(unsafe.Pointer(&bytearray[0])) bytearray_alias.len = C.size_t(len(bytearray)) - var outptr_QVariant *C.QVariant = nil - C.QVariant_new15(bytearray_alias, &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new15(bytearray_alias)) ret.isSubclass = true return ret } // NewQVariant16 constructs a new QVariant object. func NewQVariant16(bitarray *QBitArray) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new16(bitarray.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new16(bitarray.cPointer())) ret.isSubclass = true return ret } @@ -287,10 +252,8 @@ func NewQVariant17(stringVal string) *QVariant { stringVal_ms.data = C.CString(stringVal) stringVal_ms.len = C.size_t(len(stringVal)) defer C.free(unsafe.Pointer(stringVal_ms.data)) - var outptr_QVariant *C.QVariant = nil - C.QVariant_new17(stringVal_ms, &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new17(stringVal_ms)) ret.isSubclass = true return ret } @@ -307,50 +270,40 @@ func NewQVariant18(stringlist []string) *QVariant { stringlist_CArray[i] = stringlist_i_ms } stringlist_ma := C.struct_miqt_array{len: C.size_t(len(stringlist)), data: unsafe.Pointer(stringlist_CArray)} - var outptr_QVariant *C.QVariant = nil - C.QVariant_new18(stringlist_ma, &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new18(stringlist_ma)) ret.isSubclass = true return ret } // NewQVariant19 constructs a new QVariant object. func NewQVariant19(qchar QChar) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new19(qchar.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new19(qchar.cPointer())) ret.isSubclass = true return ret } // NewQVariant20 constructs a new QVariant object. func NewQVariant20(date *QDate) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new20(date.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new20(date.cPointer())) ret.isSubclass = true return ret } // NewQVariant21 constructs a new QVariant object. func NewQVariant21(time *QTime) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new21(time.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new21(time.cPointer())) ret.isSubclass = true return ret } // NewQVariant22 constructs a new QVariant object. func NewQVariant22(datetime *QDateTime) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new22(datetime.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new22(datetime.cPointer())) ret.isSubclass = true return ret } @@ -376,10 +329,8 @@ func NewQVariant23(mapVal map[string]QVariant) *QVariant { keys: unsafe.Pointer(mapVal_Keys_CArray), values: unsafe.Pointer(mapVal_Values_CArray), } - var outptr_QVariant *C.QVariant = nil - C.QVariant_new23(mapVal_mm, &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new23(mapVal_mm)) ret.isSubclass = true return ret } @@ -405,210 +356,168 @@ func NewQVariant24(hash map[string]QVariant) *QVariant { keys: unsafe.Pointer(hash_Keys_CArray), values: unsafe.Pointer(hash_Values_CArray), } - var outptr_QVariant *C.QVariant = nil - C.QVariant_new24(hash_mm, &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new24(hash_mm)) ret.isSubclass = true return ret } // NewQVariant25 constructs a new QVariant object. func NewQVariant25(size *QSize) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new25(size.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new25(size.cPointer())) ret.isSubclass = true return ret } // NewQVariant26 constructs a new QVariant object. func NewQVariant26(size *QSizeF) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new26(size.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new26(size.cPointer())) ret.isSubclass = true return ret } // NewQVariant27 constructs a new QVariant object. func NewQVariant27(pt *QPoint) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new27(pt.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new27(pt.cPointer())) ret.isSubclass = true return ret } // NewQVariant28 constructs a new QVariant object. func NewQVariant28(pt *QPointF) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new28(pt.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new28(pt.cPointer())) ret.isSubclass = true return ret } // NewQVariant29 constructs a new QVariant object. func NewQVariant29(line *QLine) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new29(line.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new29(line.cPointer())) ret.isSubclass = true return ret } // NewQVariant30 constructs a new QVariant object. func NewQVariant30(line *QLineF) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new30(line.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new30(line.cPointer())) ret.isSubclass = true return ret } // NewQVariant31 constructs a new QVariant object. func NewQVariant31(rect *QRect) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new31(rect.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new31(rect.cPointer())) ret.isSubclass = true return ret } // NewQVariant32 constructs a new QVariant object. func NewQVariant32(rect *QRectF) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new32(rect.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new32(rect.cPointer())) ret.isSubclass = true return ret } // NewQVariant33 constructs a new QVariant object. func NewQVariant33(locale *QLocale) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new33(locale.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new33(locale.cPointer())) ret.isSubclass = true return ret } // NewQVariant34 constructs a new QVariant object. func NewQVariant34(regExp *QRegExp) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new34(regExp.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new34(regExp.cPointer())) ret.isSubclass = true return ret } // NewQVariant35 constructs a new QVariant object. func NewQVariant35(re *QRegularExpression) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new35(re.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new35(re.cPointer())) ret.isSubclass = true return ret } // NewQVariant36 constructs a new QVariant object. func NewQVariant36(easing *QEasingCurve) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new36(easing.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new36(easing.cPointer())) ret.isSubclass = true return ret } // NewQVariant37 constructs a new QVariant object. func NewQVariant37(uuid *QUuid) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new37(uuid.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new37(uuid.cPointer())) ret.isSubclass = true return ret } // NewQVariant38 constructs a new QVariant object. func NewQVariant38(url *QUrl) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new38(url.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new38(url.cPointer())) ret.isSubclass = true return ret } // NewQVariant39 constructs a new QVariant object. func NewQVariant39(jsonValue *QJsonValue) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new39(jsonValue.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new39(jsonValue.cPointer())) ret.isSubclass = true return ret } // NewQVariant40 constructs a new QVariant object. func NewQVariant40(jsonObject *QJsonObject) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new40(jsonObject.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new40(jsonObject.cPointer())) ret.isSubclass = true return ret } // NewQVariant41 constructs a new QVariant object. func NewQVariant41(jsonArray *QJsonArray) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new41(jsonArray.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new41(jsonArray.cPointer())) ret.isSubclass = true return ret } // NewQVariant42 constructs a new QVariant object. func NewQVariant42(jsonDocument *QJsonDocument) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new42(jsonDocument.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new42(jsonDocument.cPointer())) ret.isSubclass = true return ret } // NewQVariant43 constructs a new QVariant object. func NewQVariant43(modelIndex *QModelIndex) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new43(modelIndex.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new43(modelIndex.cPointer())) ret.isSubclass = true return ret } // NewQVariant44 constructs a new QVariant object. func NewQVariant44(modelIndex *QPersistentModelIndex) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new44(modelIndex.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new44(modelIndex.cPointer())) ret.isSubclass = true return ret } @@ -1030,34 +939,27 @@ func newQVariantComparisonHelper(h *C.QVariantComparisonHelper) *QVariantCompari if h == nil { return nil } + return &QVariantComparisonHelper{h: h} } // UnsafeNewQVariantComparisonHelper constructs the type using only unsafe pointers. func UnsafeNewQVariantComparisonHelper(h unsafe.Pointer) *QVariantComparisonHelper { - if h == nil { - return nil - } - - return &QVariantComparisonHelper{h: (*C.QVariantComparisonHelper)(h)} + return newQVariantComparisonHelper((*C.QVariantComparisonHelper)(h)) } // NewQVariantComparisonHelper constructs a new QVariantComparisonHelper object. func NewQVariantComparisonHelper(varVal *QVariant) *QVariantComparisonHelper { - var outptr_QVariantComparisonHelper *C.QVariantComparisonHelper = nil - C.QVariantComparisonHelper_new(varVal.cPointer(), &outptr_QVariantComparisonHelper) - ret := newQVariantComparisonHelper(outptr_QVariantComparisonHelper) + ret := newQVariantComparisonHelper(C.QVariantComparisonHelper_new(varVal.cPointer())) ret.isSubclass = true return ret } // NewQVariantComparisonHelper2 constructs a new QVariantComparisonHelper object. func NewQVariantComparisonHelper2(param1 *QVariantComparisonHelper) *QVariantComparisonHelper { - var outptr_QVariantComparisonHelper *C.QVariantComparisonHelper = nil - C.QVariantComparisonHelper_new2(param1.cPointer(), &outptr_QVariantComparisonHelper) - ret := newQVariantComparisonHelper(outptr_QVariantComparisonHelper) + ret := newQVariantComparisonHelper(C.QVariantComparisonHelper_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1100,16 +1002,13 @@ func newQVariant__Handler(h *C.QVariant__Handler) *QVariant__Handler { if h == nil { return nil } + return &QVariant__Handler{h: h} } // UnsafeNewQVariant__Handler constructs the type using only unsafe pointers. func UnsafeNewQVariant__Handler(h unsafe.Pointer) *QVariant__Handler { - if h == nil { - return nil - } - - return &QVariant__Handler{h: (*C.QVariant__Handler)(h)} + return newQVariant__Handler((*C.QVariant__Handler)(h)) } // Delete this object from C++ memory. @@ -1150,24 +1049,19 @@ func newQSequentialIterable__const_iterator(h *C.QSequentialIterable__const_iter if h == nil { return nil } + return &QSequentialIterable__const_iterator{h: h} } // UnsafeNewQSequentialIterable__const_iterator constructs the type using only unsafe pointers. func UnsafeNewQSequentialIterable__const_iterator(h unsafe.Pointer) *QSequentialIterable__const_iterator { - if h == nil { - return nil - } - - return &QSequentialIterable__const_iterator{h: (*C.QSequentialIterable__const_iterator)(h)} + return newQSequentialIterable__const_iterator((*C.QSequentialIterable__const_iterator)(h)) } // NewQSequentialIterable__const_iterator constructs a new QSequentialIterable::const_iterator object. func NewQSequentialIterable__const_iterator(other *QSequentialIterable__const_iterator) *QSequentialIterable__const_iterator { - var outptr_QSequentialIterable__const_iterator *C.QSequentialIterable__const_iterator = nil - C.QSequentialIterable__const_iterator_new(other.cPointer(), &outptr_QSequentialIterable__const_iterator) - ret := newQSequentialIterable__const_iterator(outptr_QSequentialIterable__const_iterator) + ret := newQSequentialIterable__const_iterator(C.QSequentialIterable__const_iterator_new(other.cPointer())) ret.isSubclass = true return ret } @@ -1268,24 +1162,19 @@ func newQAssociativeIterable__const_iterator(h *C.QAssociativeIterable__const_it if h == nil { return nil } + return &QAssociativeIterable__const_iterator{h: h} } // UnsafeNewQAssociativeIterable__const_iterator constructs the type using only unsafe pointers. func UnsafeNewQAssociativeIterable__const_iterator(h unsafe.Pointer) *QAssociativeIterable__const_iterator { - if h == nil { - return nil - } - - return &QAssociativeIterable__const_iterator{h: (*C.QAssociativeIterable__const_iterator)(h)} + return newQAssociativeIterable__const_iterator((*C.QAssociativeIterable__const_iterator)(h)) } // NewQAssociativeIterable__const_iterator constructs a new QAssociativeIterable::const_iterator object. func NewQAssociativeIterable__const_iterator(other *QAssociativeIterable__const_iterator) *QAssociativeIterable__const_iterator { - var outptr_QAssociativeIterable__const_iterator *C.QAssociativeIterable__const_iterator = nil - C.QAssociativeIterable__const_iterator_new(other.cPointer(), &outptr_QAssociativeIterable__const_iterator) - ret := newQAssociativeIterable__const_iterator(outptr_QAssociativeIterable__const_iterator) + ret := newQAssociativeIterable__const_iterator(C.QAssociativeIterable__const_iterator_new(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qvariant.h b/qt/gen_qvariant.h index e1248598..5c869105 100644 --- a/qt/gen_qvariant.h +++ b/qt/gen_qvariant.h @@ -92,50 +92,50 @@ typedef struct QVariant__Handler QVariant__Handler; typedef struct QVariantComparisonHelper QVariantComparisonHelper; #endif -void QVariant_new(QVariant** outptr_QVariant); -void QVariant_new2(int typeVal, QVariant** outptr_QVariant); -void QVariant_new3(int typeId, const void* copyVal, QVariant** outptr_QVariant); -void QVariant_new4(int typeId, const void* copyVal, unsigned int flags, QVariant** outptr_QVariant); -void QVariant_new5(QVariant* other, QVariant** outptr_QVariant); -void QVariant_new6(QDataStream* s, QVariant** outptr_QVariant); -void QVariant_new7(int i, QVariant** outptr_QVariant); -void QVariant_new8(unsigned int ui, QVariant** outptr_QVariant); -void QVariant_new9(long long ll, QVariant** outptr_QVariant); -void QVariant_new10(unsigned long long ull, QVariant** outptr_QVariant); -void QVariant_new11(bool b, QVariant** outptr_QVariant); -void QVariant_new12(double d, QVariant** outptr_QVariant); -void QVariant_new13(float f, QVariant** outptr_QVariant); -void QVariant_new14(const char* str, QVariant** outptr_QVariant); -void QVariant_new15(struct miqt_string bytearray, QVariant** outptr_QVariant); -void QVariant_new16(QBitArray* bitarray, QVariant** outptr_QVariant); -void QVariant_new17(struct miqt_string stringVal, QVariant** outptr_QVariant); -void QVariant_new18(struct miqt_array /* of struct miqt_string */ stringlist, QVariant** outptr_QVariant); -void QVariant_new19(QChar* qchar, QVariant** outptr_QVariant); -void QVariant_new20(QDate* date, QVariant** outptr_QVariant); -void QVariant_new21(QTime* time, QVariant** outptr_QVariant); -void QVariant_new22(QDateTime* datetime, QVariant** outptr_QVariant); -void QVariant_new23(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal, QVariant** outptr_QVariant); -void QVariant_new24(struct miqt_map /* of struct miqt_string to QVariant* */ hash, QVariant** outptr_QVariant); -void QVariant_new25(QSize* size, QVariant** outptr_QVariant); -void QVariant_new26(QSizeF* size, QVariant** outptr_QVariant); -void QVariant_new27(QPoint* pt, QVariant** outptr_QVariant); -void QVariant_new28(QPointF* pt, QVariant** outptr_QVariant); -void QVariant_new29(QLine* line, QVariant** outptr_QVariant); -void QVariant_new30(QLineF* line, QVariant** outptr_QVariant); -void QVariant_new31(QRect* rect, QVariant** outptr_QVariant); -void QVariant_new32(QRectF* rect, QVariant** outptr_QVariant); -void QVariant_new33(QLocale* locale, QVariant** outptr_QVariant); -void QVariant_new34(QRegExp* regExp, QVariant** outptr_QVariant); -void QVariant_new35(QRegularExpression* re, QVariant** outptr_QVariant); -void QVariant_new36(QEasingCurve* easing, QVariant** outptr_QVariant); -void QVariant_new37(QUuid* uuid, QVariant** outptr_QVariant); -void QVariant_new38(QUrl* url, QVariant** outptr_QVariant); -void QVariant_new39(QJsonValue* jsonValue, QVariant** outptr_QVariant); -void QVariant_new40(QJsonObject* jsonObject, QVariant** outptr_QVariant); -void QVariant_new41(QJsonArray* jsonArray, QVariant** outptr_QVariant); -void QVariant_new42(QJsonDocument* jsonDocument, QVariant** outptr_QVariant); -void QVariant_new43(QModelIndex* modelIndex, QVariant** outptr_QVariant); -void QVariant_new44(QPersistentModelIndex* modelIndex, QVariant** outptr_QVariant); +QVariant* QVariant_new(); +QVariant* QVariant_new2(int typeVal); +QVariant* QVariant_new3(int typeId, const void* copyVal); +QVariant* QVariant_new4(int typeId, const void* copyVal, unsigned int flags); +QVariant* QVariant_new5(QVariant* other); +QVariant* QVariant_new6(QDataStream* s); +QVariant* QVariant_new7(int i); +QVariant* QVariant_new8(unsigned int ui); +QVariant* QVariant_new9(long long ll); +QVariant* QVariant_new10(unsigned long long ull); +QVariant* QVariant_new11(bool b); +QVariant* QVariant_new12(double d); +QVariant* QVariant_new13(float f); +QVariant* QVariant_new14(const char* str); +QVariant* QVariant_new15(struct miqt_string bytearray); +QVariant* QVariant_new16(QBitArray* bitarray); +QVariant* QVariant_new17(struct miqt_string stringVal); +QVariant* QVariant_new18(struct miqt_array /* of struct miqt_string */ stringlist); +QVariant* QVariant_new19(QChar* qchar); +QVariant* QVariant_new20(QDate* date); +QVariant* QVariant_new21(QTime* time); +QVariant* QVariant_new22(QDateTime* datetime); +QVariant* QVariant_new23(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal); +QVariant* QVariant_new24(struct miqt_map /* of struct miqt_string to QVariant* */ hash); +QVariant* QVariant_new25(QSize* size); +QVariant* QVariant_new26(QSizeF* size); +QVariant* QVariant_new27(QPoint* pt); +QVariant* QVariant_new28(QPointF* pt); +QVariant* QVariant_new29(QLine* line); +QVariant* QVariant_new30(QLineF* line); +QVariant* QVariant_new31(QRect* rect); +QVariant* QVariant_new32(QRectF* rect); +QVariant* QVariant_new33(QLocale* locale); +QVariant* QVariant_new34(QRegExp* regExp); +QVariant* QVariant_new35(QRegularExpression* re); +QVariant* QVariant_new36(QEasingCurve* easing); +QVariant* QVariant_new37(QUuid* uuid); +QVariant* QVariant_new38(QUrl* url); +QVariant* QVariant_new39(QJsonValue* jsonValue); +QVariant* QVariant_new40(QJsonObject* jsonObject); +QVariant* QVariant_new41(QJsonArray* jsonArray); +QVariant* QVariant_new42(QJsonDocument* jsonDocument); +QVariant* QVariant_new43(QModelIndex* modelIndex); +QVariant* QVariant_new44(QPersistentModelIndex* modelIndex); void QVariant_OperatorAssign(QVariant* self, QVariant* other); void QVariant_Swap(QVariant* self, QVariant* other); int QVariant_Type(const QVariant* self); @@ -208,13 +208,13 @@ float QVariant_ToFloat1(const QVariant* self, bool* ok); double QVariant_ToReal1(const QVariant* self, bool* ok); void QVariant_Delete(QVariant* self, bool isSubclass); -void QVariantComparisonHelper_new(QVariant* varVal, QVariantComparisonHelper** outptr_QVariantComparisonHelper); -void QVariantComparisonHelper_new2(QVariantComparisonHelper* param1, QVariantComparisonHelper** outptr_QVariantComparisonHelper); +QVariantComparisonHelper* QVariantComparisonHelper_new(QVariant* varVal); +QVariantComparisonHelper* QVariantComparisonHelper_new2(QVariantComparisonHelper* param1); void QVariantComparisonHelper_Delete(QVariantComparisonHelper* self, bool isSubclass); void QVariant__Handler_Delete(QVariant__Handler* self, bool isSubclass); -void QSequentialIterable__const_iterator_new(QSequentialIterable__const_iterator* other, QSequentialIterable__const_iterator** outptr_QSequentialIterable__const_iterator); +QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_new(QSequentialIterable__const_iterator* other); void QSequentialIterable__const_iterator_OperatorAssign(QSequentialIterable__const_iterator* self, QSequentialIterable__const_iterator* other); QVariant* QSequentialIterable__const_iterator_OperatorMultiply(const QSequentialIterable__const_iterator* self); bool QSequentialIterable__const_iterator_OperatorEqual(const QSequentialIterable__const_iterator* self, QSequentialIterable__const_iterator* o); @@ -229,7 +229,7 @@ QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_Operato QSequentialIterable__const_iterator* QSequentialIterable__const_iterator_OperatorMinus(const QSequentialIterable__const_iterator* self, int j); void QSequentialIterable__const_iterator_Delete(QSequentialIterable__const_iterator* self, bool isSubclass); -void QAssociativeIterable__const_iterator_new(QAssociativeIterable__const_iterator* other, QAssociativeIterable__const_iterator** outptr_QAssociativeIterable__const_iterator); +QAssociativeIterable__const_iterator* QAssociativeIterable__const_iterator_new(QAssociativeIterable__const_iterator* other); void QAssociativeIterable__const_iterator_OperatorAssign(QAssociativeIterable__const_iterator* self, QAssociativeIterable__const_iterator* other); QVariant* QAssociativeIterable__const_iterator_Key(const QAssociativeIterable__const_iterator* self); QVariant* QAssociativeIterable__const_iterator_Value(const QAssociativeIterable__const_iterator* self); diff --git a/qt/gen_qvariantanimation.cpp b/qt/gen_qvariantanimation.cpp index 51b13502..53816e61 100644 --- a/qt/gen_qvariantanimation.cpp +++ b/qt/gen_qvariantanimation.cpp @@ -201,18 +201,16 @@ public: }; -void QVariantAnimation_new(QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQVariantAnimation* ret = new MiqtVirtualQVariantAnimation(); - *outptr_QVariantAnimation = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QVariantAnimation* QVariantAnimation_new() { + return new MiqtVirtualQVariantAnimation(); } -void QVariantAnimation_new2(QObject* parent, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQVariantAnimation* ret = new MiqtVirtualQVariantAnimation(parent); - *outptr_QVariantAnimation = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QVariantAnimation* QVariantAnimation_new2(QObject* parent) { + return new MiqtVirtualQVariantAnimation(parent); +} + +void QVariantAnimation_virtbase(QVariantAnimation* src, QAbstractAnimation** outptr_QAbstractAnimation) { + *outptr_QAbstractAnimation = static_cast(src); } QMetaObject* QVariantAnimation_MetaObject(const QVariantAnimation* self) { diff --git a/qt/gen_qvariantanimation.go b/qt/gen_qvariantanimation.go index 8d76ac22..7a488cea 100644 --- a/qt/gen_qvariantanimation.go +++ b/qt/gen_qvariantanimation.go @@ -35,44 +35,34 @@ func (this *QVariantAnimation) UnsafePointer() unsafe.Pointer { } // newQVariantAnimation constructs the type using only CGO pointers. -func newQVariantAnimation(h *C.QVariantAnimation, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QVariantAnimation { +func newQVariantAnimation(h *C.QVariantAnimation) *QVariantAnimation { if h == nil { return nil } + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + C.QVariantAnimation_virtbase(h, &outptr_QAbstractAnimation) + return &QVariantAnimation{h: h, - QAbstractAnimation: newQAbstractAnimation(h_QAbstractAnimation, h_QObject)} + QAbstractAnimation: newQAbstractAnimation(outptr_QAbstractAnimation)} } // UnsafeNewQVariantAnimation constructs the type using only unsafe pointers. -func UnsafeNewQVariantAnimation(h unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QVariantAnimation { - if h == nil { - return nil - } - - return &QVariantAnimation{h: (*C.QVariantAnimation)(h), - QAbstractAnimation: UnsafeNewQAbstractAnimation(h_QAbstractAnimation, h_QObject)} +func UnsafeNewQVariantAnimation(h unsafe.Pointer) *QVariantAnimation { + return newQVariantAnimation((*C.QVariantAnimation)(h)) } // NewQVariantAnimation constructs a new QVariantAnimation object. func NewQVariantAnimation() *QVariantAnimation { - var outptr_QVariantAnimation *C.QVariantAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QVariantAnimation_new(&outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQVariantAnimation(outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQVariantAnimation(C.QVariantAnimation_new()) ret.isSubclass = true return ret } // NewQVariantAnimation2 constructs a new QVariantAnimation object. func NewQVariantAnimation2(parent *QObject) *QVariantAnimation { - var outptr_QVariantAnimation *C.QVariantAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QVariantAnimation_new2(parent.cPointer(), &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQVariantAnimation(outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQVariantAnimation(C.QVariantAnimation_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qvariantanimation.h b/qt/gen_qvariantanimation.h index 620601cf..06c11785 100644 --- a/qt/gen_qvariantanimation.h +++ b/qt/gen_qvariantanimation.h @@ -32,8 +32,9 @@ typedef struct QVariant QVariant; typedef struct QVariantAnimation QVariantAnimation; #endif -void QVariantAnimation_new(QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QVariantAnimation_new2(QObject* parent, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +QVariantAnimation* QVariantAnimation_new(); +QVariantAnimation* QVariantAnimation_new2(QObject* parent); +void QVariantAnimation_virtbase(QVariantAnimation* src, QAbstractAnimation** outptr_QAbstractAnimation); QMetaObject* QVariantAnimation_MetaObject(const QVariantAnimation* self); void* QVariantAnimation_Metacast(QVariantAnimation* self, const char* param1); struct miqt_string QVariantAnimation_Tr(const char* s); diff --git a/qt/gen_qvector2d.cpp b/qt/gen_qvector2d.cpp index 19d2ac86..2997d7a3 100644 --- a/qt/gen_qvector2d.cpp +++ b/qt/gen_qvector2d.cpp @@ -7,44 +7,36 @@ #include "gen_qvector2d.h" #include "_cgo_export.h" -void QVector2D_new(QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new() { + return new QVector2D(); } -void QVector2D_new2(int param1, QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(static_cast(param1)); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new2(int param1) { + return new QVector2D(static_cast(param1)); } -void QVector2D_new3(float xpos, float ypos, QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(static_cast(xpos), static_cast(ypos)); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new3(float xpos, float ypos) { + return new QVector2D(static_cast(xpos), static_cast(ypos)); } -void QVector2D_new4(QPoint* point, QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(*point); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new4(QPoint* point) { + return new QVector2D(*point); } -void QVector2D_new5(QPointF* point, QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(*point); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new5(QPointF* point) { + return new QVector2D(*point); } -void QVector2D_new6(QVector3D* vector, QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(*vector); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new6(QVector3D* vector) { + return new QVector2D(*vector); } -void QVector2D_new7(QVector4D* vector, QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(*vector); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new7(QVector4D* vector) { + return new QVector2D(*vector); } -void QVector2D_new8(QVector2D* param1, QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(*param1); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new8(QVector2D* param1) { + return new QVector2D(*param1); } bool QVector2D_IsNull(const QVector2D* self) { diff --git a/qt/gen_qvector2d.go b/qt/gen_qvector2d.go index 008b886a..8f43b8a1 100644 --- a/qt/gen_qvector2d.go +++ b/qt/gen_qvector2d.go @@ -37,94 +37,75 @@ func newQVector2D(h *C.QVector2D) *QVector2D { if h == nil { return nil } + return &QVector2D{h: h} } // UnsafeNewQVector2D constructs the type using only unsafe pointers. func UnsafeNewQVector2D(h unsafe.Pointer) *QVector2D { - if h == nil { - return nil - } - - return &QVector2D{h: (*C.QVector2D)(h)} + return newQVector2D((*C.QVector2D)(h)) } // NewQVector2D constructs a new QVector2D object. func NewQVector2D() *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new(&outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new()) ret.isSubclass = true return ret } // NewQVector2D2 constructs a new QVector2D object. func NewQVector2D2(param1 Initialization) *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new2((C.int)(param1), &outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQVector2D3 constructs a new QVector2D object. func NewQVector2D3(xpos float32, ypos float32) *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new3((C.float)(xpos), (C.float)(ypos), &outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new3((C.float)(xpos), (C.float)(ypos))) ret.isSubclass = true return ret } // NewQVector2D4 constructs a new QVector2D object. func NewQVector2D4(point *QPoint) *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new4(point.cPointer(), &outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new4(point.cPointer())) ret.isSubclass = true return ret } // NewQVector2D5 constructs a new QVector2D object. func NewQVector2D5(point *QPointF) *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new5(point.cPointer(), &outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new5(point.cPointer())) ret.isSubclass = true return ret } // NewQVector2D6 constructs a new QVector2D object. func NewQVector2D6(vector *QVector3D) *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new6(vector.cPointer(), &outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new6(vector.cPointer())) ret.isSubclass = true return ret } // NewQVector2D7 constructs a new QVector2D object. func NewQVector2D7(vector *QVector4D) *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new7(vector.cPointer(), &outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new7(vector.cPointer())) ret.isSubclass = true return ret } // NewQVector2D8 constructs a new QVector2D object. func NewQVector2D8(param1 *QVector2D) *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new8(param1.cPointer(), &outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new8(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qvector2d.h b/qt/gen_qvector2d.h index 341249ea..76ec011a 100644 --- a/qt/gen_qvector2d.h +++ b/qt/gen_qvector2d.h @@ -28,14 +28,14 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -void QVector2D_new(QVector2D** outptr_QVector2D); -void QVector2D_new2(int param1, QVector2D** outptr_QVector2D); -void QVector2D_new3(float xpos, float ypos, QVector2D** outptr_QVector2D); -void QVector2D_new4(QPoint* point, QVector2D** outptr_QVector2D); -void QVector2D_new5(QPointF* point, QVector2D** outptr_QVector2D); -void QVector2D_new6(QVector3D* vector, QVector2D** outptr_QVector2D); -void QVector2D_new7(QVector4D* vector, QVector2D** outptr_QVector2D); -void QVector2D_new8(QVector2D* param1, QVector2D** outptr_QVector2D); +QVector2D* QVector2D_new(); +QVector2D* QVector2D_new2(int param1); +QVector2D* QVector2D_new3(float xpos, float ypos); +QVector2D* QVector2D_new4(QPoint* point); +QVector2D* QVector2D_new5(QPointF* point); +QVector2D* QVector2D_new6(QVector3D* vector); +QVector2D* QVector2D_new7(QVector4D* vector); +QVector2D* QVector2D_new8(QVector2D* param1); bool QVector2D_IsNull(const QVector2D* self); float QVector2D_X(const QVector2D* self); float QVector2D_Y(const QVector2D* self); diff --git a/qt/gen_qvector3d.cpp b/qt/gen_qvector3d.cpp index ce4e379e..0ba64cca 100644 --- a/qt/gen_qvector3d.cpp +++ b/qt/gen_qvector3d.cpp @@ -9,49 +9,40 @@ #include "gen_qvector3d.h" #include "_cgo_export.h" -void QVector3D_new(QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new() { + return new QVector3D(); } -void QVector3D_new2(int param1, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(static_cast(param1)); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new2(int param1) { + return new QVector3D(static_cast(param1)); } -void QVector3D_new3(float xpos, float ypos, float zpos, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(static_cast(xpos), static_cast(ypos), static_cast(zpos)); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new3(float xpos, float ypos, float zpos) { + return new QVector3D(static_cast(xpos), static_cast(ypos), static_cast(zpos)); } -void QVector3D_new4(QPoint* point, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(*point); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new4(QPoint* point) { + return new QVector3D(*point); } -void QVector3D_new5(QPointF* point, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(*point); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new5(QPointF* point) { + return new QVector3D(*point); } -void QVector3D_new6(QVector2D* vector, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(*vector); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new6(QVector2D* vector) { + return new QVector3D(*vector); } -void QVector3D_new7(QVector2D* vector, float zpos, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(*vector, static_cast(zpos)); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new7(QVector2D* vector, float zpos) { + return new QVector3D(*vector, static_cast(zpos)); } -void QVector3D_new8(QVector4D* vector, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(*vector); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new8(QVector4D* vector) { + return new QVector3D(*vector); } -void QVector3D_new9(QVector3D* param1, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(*param1); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new9(QVector3D* param1) { + return new QVector3D(*param1); } bool QVector3D_IsNull(const QVector3D* self) { diff --git a/qt/gen_qvector3d.go b/qt/gen_qvector3d.go index 1318a92a..01203458 100644 --- a/qt/gen_qvector3d.go +++ b/qt/gen_qvector3d.go @@ -37,104 +37,83 @@ func newQVector3D(h *C.QVector3D) *QVector3D { if h == nil { return nil } + return &QVector3D{h: h} } // UnsafeNewQVector3D constructs the type using only unsafe pointers. func UnsafeNewQVector3D(h unsafe.Pointer) *QVector3D { - if h == nil { - return nil - } - - return &QVector3D{h: (*C.QVector3D)(h)} + return newQVector3D((*C.QVector3D)(h)) } // NewQVector3D constructs a new QVector3D object. func NewQVector3D() *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new(&outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new()) ret.isSubclass = true return ret } // NewQVector3D2 constructs a new QVector3D object. func NewQVector3D2(param1 Initialization) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new2((C.int)(param1), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQVector3D3 constructs a new QVector3D object. func NewQVector3D3(xpos float32, ypos float32, zpos float32) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos))) ret.isSubclass = true return ret } // NewQVector3D4 constructs a new QVector3D object. func NewQVector3D4(point *QPoint) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new4(point.cPointer(), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new4(point.cPointer())) ret.isSubclass = true return ret } // NewQVector3D5 constructs a new QVector3D object. func NewQVector3D5(point *QPointF) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new5(point.cPointer(), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new5(point.cPointer())) ret.isSubclass = true return ret } // NewQVector3D6 constructs a new QVector3D object. func NewQVector3D6(vector *QVector2D) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new6(vector.cPointer(), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new6(vector.cPointer())) ret.isSubclass = true return ret } // NewQVector3D7 constructs a new QVector3D object. func NewQVector3D7(vector *QVector2D, zpos float32) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new7(vector.cPointer(), (C.float)(zpos), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new7(vector.cPointer(), (C.float)(zpos))) ret.isSubclass = true return ret } // NewQVector3D8 constructs a new QVector3D object. func NewQVector3D8(vector *QVector4D) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new8(vector.cPointer(), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new8(vector.cPointer())) ret.isSubclass = true return ret } // NewQVector3D9 constructs a new QVector3D object. func NewQVector3D9(param1 *QVector3D) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new9(param1.cPointer(), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new9(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qvector3d.h b/qt/gen_qvector3d.h index 751d7052..cb57aa70 100644 --- a/qt/gen_qvector3d.h +++ b/qt/gen_qvector3d.h @@ -32,15 +32,15 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -void QVector3D_new(QVector3D** outptr_QVector3D); -void QVector3D_new2(int param1, QVector3D** outptr_QVector3D); -void QVector3D_new3(float xpos, float ypos, float zpos, QVector3D** outptr_QVector3D); -void QVector3D_new4(QPoint* point, QVector3D** outptr_QVector3D); -void QVector3D_new5(QPointF* point, QVector3D** outptr_QVector3D); -void QVector3D_new6(QVector2D* vector, QVector3D** outptr_QVector3D); -void QVector3D_new7(QVector2D* vector, float zpos, QVector3D** outptr_QVector3D); -void QVector3D_new8(QVector4D* vector, QVector3D** outptr_QVector3D); -void QVector3D_new9(QVector3D* param1, QVector3D** outptr_QVector3D); +QVector3D* QVector3D_new(); +QVector3D* QVector3D_new2(int param1); +QVector3D* QVector3D_new3(float xpos, float ypos, float zpos); +QVector3D* QVector3D_new4(QPoint* point); +QVector3D* QVector3D_new5(QPointF* point); +QVector3D* QVector3D_new6(QVector2D* vector); +QVector3D* QVector3D_new7(QVector2D* vector, float zpos); +QVector3D* QVector3D_new8(QVector4D* vector); +QVector3D* QVector3D_new9(QVector3D* param1); bool QVector3D_IsNull(const QVector3D* self); float QVector3D_X(const QVector3D* self); float QVector3D_Y(const QVector3D* self); diff --git a/qt/gen_qvector4d.cpp b/qt/gen_qvector4d.cpp index 191e3fa6..78649b0a 100644 --- a/qt/gen_qvector4d.cpp +++ b/qt/gen_qvector4d.cpp @@ -7,54 +7,44 @@ #include "gen_qvector4d.h" #include "_cgo_export.h" -void QVector4D_new(QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new() { + return new QVector4D(); } -void QVector4D_new2(int param1, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(static_cast(param1)); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new2(int param1) { + return new QVector4D(static_cast(param1)); } -void QVector4D_new3(float xpos, float ypos, float zpos, float wpos, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(static_cast(xpos), static_cast(ypos), static_cast(zpos), static_cast(wpos)); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new3(float xpos, float ypos, float zpos, float wpos) { + return new QVector4D(static_cast(xpos), static_cast(ypos), static_cast(zpos), static_cast(wpos)); } -void QVector4D_new4(QPoint* point, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(*point); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new4(QPoint* point) { + return new QVector4D(*point); } -void QVector4D_new5(QPointF* point, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(*point); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new5(QPointF* point) { + return new QVector4D(*point); } -void QVector4D_new6(QVector2D* vector, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(*vector); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new6(QVector2D* vector) { + return new QVector4D(*vector); } -void QVector4D_new7(QVector2D* vector, float zpos, float wpos, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(*vector, static_cast(zpos), static_cast(wpos)); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new7(QVector2D* vector, float zpos, float wpos) { + return new QVector4D(*vector, static_cast(zpos), static_cast(wpos)); } -void QVector4D_new8(QVector3D* vector, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(*vector); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new8(QVector3D* vector) { + return new QVector4D(*vector); } -void QVector4D_new9(QVector3D* vector, float wpos, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(*vector, static_cast(wpos)); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new9(QVector3D* vector, float wpos) { + return new QVector4D(*vector, static_cast(wpos)); } -void QVector4D_new10(QVector4D* param1, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(*param1); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new10(QVector4D* param1) { + return new QVector4D(*param1); } bool QVector4D_IsNull(const QVector4D* self) { diff --git a/qt/gen_qvector4d.go b/qt/gen_qvector4d.go index 4669e351..dce35e9c 100644 --- a/qt/gen_qvector4d.go +++ b/qt/gen_qvector4d.go @@ -37,114 +37,91 @@ func newQVector4D(h *C.QVector4D) *QVector4D { if h == nil { return nil } + return &QVector4D{h: h} } // UnsafeNewQVector4D constructs the type using only unsafe pointers. func UnsafeNewQVector4D(h unsafe.Pointer) *QVector4D { - if h == nil { - return nil - } - - return &QVector4D{h: (*C.QVector4D)(h)} + return newQVector4D((*C.QVector4D)(h)) } // NewQVector4D constructs a new QVector4D object. func NewQVector4D() *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new(&outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new()) ret.isSubclass = true return ret } // NewQVector4D2 constructs a new QVector4D object. func NewQVector4D2(param1 Initialization) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new2((C.int)(param1), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQVector4D3 constructs a new QVector4D object. func NewQVector4D3(xpos float32, ypos float32, zpos float32, wpos float32) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos), (C.float)(wpos), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos), (C.float)(wpos))) ret.isSubclass = true return ret } // NewQVector4D4 constructs a new QVector4D object. func NewQVector4D4(point *QPoint) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new4(point.cPointer(), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new4(point.cPointer())) ret.isSubclass = true return ret } // NewQVector4D5 constructs a new QVector4D object. func NewQVector4D5(point *QPointF) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new5(point.cPointer(), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new5(point.cPointer())) ret.isSubclass = true return ret } // NewQVector4D6 constructs a new QVector4D object. func NewQVector4D6(vector *QVector2D) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new6(vector.cPointer(), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new6(vector.cPointer())) ret.isSubclass = true return ret } // NewQVector4D7 constructs a new QVector4D object. func NewQVector4D7(vector *QVector2D, zpos float32, wpos float32) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new7(vector.cPointer(), (C.float)(zpos), (C.float)(wpos), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new7(vector.cPointer(), (C.float)(zpos), (C.float)(wpos))) ret.isSubclass = true return ret } // NewQVector4D8 constructs a new QVector4D object. func NewQVector4D8(vector *QVector3D) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new8(vector.cPointer(), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new8(vector.cPointer())) ret.isSubclass = true return ret } // NewQVector4D9 constructs a new QVector4D object. func NewQVector4D9(vector *QVector3D, wpos float32) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new9(vector.cPointer(), (C.float)(wpos), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new9(vector.cPointer(), (C.float)(wpos))) ret.isSubclass = true return ret } // NewQVector4D10 constructs a new QVector4D object. func NewQVector4D10(param1 *QVector4D) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new10(param1.cPointer(), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new10(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/gen_qvector4d.h b/qt/gen_qvector4d.h index 1bfef5d8..e7f0f8f1 100644 --- a/qt/gen_qvector4d.h +++ b/qt/gen_qvector4d.h @@ -28,16 +28,16 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -void QVector4D_new(QVector4D** outptr_QVector4D); -void QVector4D_new2(int param1, QVector4D** outptr_QVector4D); -void QVector4D_new3(float xpos, float ypos, float zpos, float wpos, QVector4D** outptr_QVector4D); -void QVector4D_new4(QPoint* point, QVector4D** outptr_QVector4D); -void QVector4D_new5(QPointF* point, QVector4D** outptr_QVector4D); -void QVector4D_new6(QVector2D* vector, QVector4D** outptr_QVector4D); -void QVector4D_new7(QVector2D* vector, float zpos, float wpos, QVector4D** outptr_QVector4D); -void QVector4D_new8(QVector3D* vector, QVector4D** outptr_QVector4D); -void QVector4D_new9(QVector3D* vector, float wpos, QVector4D** outptr_QVector4D); -void QVector4D_new10(QVector4D* param1, QVector4D** outptr_QVector4D); +QVector4D* QVector4D_new(); +QVector4D* QVector4D_new2(int param1); +QVector4D* QVector4D_new3(float xpos, float ypos, float zpos, float wpos); +QVector4D* QVector4D_new4(QPoint* point); +QVector4D* QVector4D_new5(QPointF* point); +QVector4D* QVector4D_new6(QVector2D* vector); +QVector4D* QVector4D_new7(QVector2D* vector, float zpos, float wpos); +QVector4D* QVector4D_new8(QVector3D* vector); +QVector4D* QVector4D_new9(QVector3D* vector, float wpos); +QVector4D* QVector4D_new10(QVector4D* param1); bool QVector4D_IsNull(const QVector4D* self); float QVector4D_X(const QVector4D* self); float QVector4D_Y(const QVector4D* self); diff --git a/qt/gen_qversionnumber.cpp b/qt/gen_qversionnumber.cpp index bb704c38..f4c8eb7d 100644 --- a/qt/gen_qversionnumber.cpp +++ b/qt/gen_qversionnumber.cpp @@ -7,35 +7,30 @@ #include "gen_qversionnumber.h" #include "_cgo_export.h" -void QVersionNumber_new(QVersionNumber** outptr_QVersionNumber) { - QVersionNumber* ret = new QVersionNumber(); - *outptr_QVersionNumber = ret; +QVersionNumber* QVersionNumber_new() { + return new QVersionNumber(); } -void QVersionNumber_new2(struct miqt_array /* of int */ seg, QVersionNumber** outptr_QVersionNumber) { +QVersionNumber* QVersionNumber_new2(struct miqt_array /* of int */ seg) { QVector seg_QList; seg_QList.reserve(seg.len); int* seg_arr = static_cast(seg.data); for(size_t i = 0; i < seg.len; ++i) { seg_QList.push_back(static_cast(seg_arr[i])); } - QVersionNumber* ret = new QVersionNumber(seg_QList); - *outptr_QVersionNumber = ret; + return new QVersionNumber(seg_QList); } -void QVersionNumber_new3(int maj, QVersionNumber** outptr_QVersionNumber) { - QVersionNumber* ret = new QVersionNumber(static_cast(maj)); - *outptr_QVersionNumber = ret; +QVersionNumber* QVersionNumber_new3(int maj) { + return new QVersionNumber(static_cast(maj)); } -void QVersionNumber_new4(int maj, int min, QVersionNumber** outptr_QVersionNumber) { - QVersionNumber* ret = new QVersionNumber(static_cast(maj), static_cast(min)); - *outptr_QVersionNumber = ret; +QVersionNumber* QVersionNumber_new4(int maj, int min) { + return new QVersionNumber(static_cast(maj), static_cast(min)); } -void QVersionNumber_new5(int maj, int min, int mic, QVersionNumber** outptr_QVersionNumber) { - QVersionNumber* ret = new QVersionNumber(static_cast(maj), static_cast(min), static_cast(mic)); - *outptr_QVersionNumber = ret; +QVersionNumber* QVersionNumber_new5(int maj, int min, int mic) { + return new QVersionNumber(static_cast(maj), static_cast(min), static_cast(mic)); } bool QVersionNumber_IsNull(const QVersionNumber* self) { diff --git a/qt/gen_qversionnumber.go b/qt/gen_qversionnumber.go index 3defdb17..1715b35c 100644 --- a/qt/gen_qversionnumber.go +++ b/qt/gen_qversionnumber.go @@ -37,24 +37,19 @@ func newQVersionNumber(h *C.QVersionNumber) *QVersionNumber { if h == nil { return nil } + return &QVersionNumber{h: h} } // UnsafeNewQVersionNumber constructs the type using only unsafe pointers. func UnsafeNewQVersionNumber(h unsafe.Pointer) *QVersionNumber { - if h == nil { - return nil - } - - return &QVersionNumber{h: (*C.QVersionNumber)(h)} + return newQVersionNumber((*C.QVersionNumber)(h)) } // NewQVersionNumber constructs a new QVersionNumber object. func NewQVersionNumber() *QVersionNumber { - var outptr_QVersionNumber *C.QVersionNumber = nil - C.QVersionNumber_new(&outptr_QVersionNumber) - ret := newQVersionNumber(outptr_QVersionNumber) + ret := newQVersionNumber(C.QVersionNumber_new()) ret.isSubclass = true return ret } @@ -67,40 +62,32 @@ func NewQVersionNumber2(seg []int) *QVersionNumber { seg_CArray[i] = (C.int)(seg[i]) } seg_ma := C.struct_miqt_array{len: C.size_t(len(seg)), data: unsafe.Pointer(seg_CArray)} - var outptr_QVersionNumber *C.QVersionNumber = nil - C.QVersionNumber_new2(seg_ma, &outptr_QVersionNumber) - ret := newQVersionNumber(outptr_QVersionNumber) + ret := newQVersionNumber(C.QVersionNumber_new2(seg_ma)) ret.isSubclass = true return ret } // NewQVersionNumber3 constructs a new QVersionNumber object. func NewQVersionNumber3(maj int) *QVersionNumber { - var outptr_QVersionNumber *C.QVersionNumber = nil - C.QVersionNumber_new3((C.int)(maj), &outptr_QVersionNumber) - ret := newQVersionNumber(outptr_QVersionNumber) + ret := newQVersionNumber(C.QVersionNumber_new3((C.int)(maj))) ret.isSubclass = true return ret } // NewQVersionNumber4 constructs a new QVersionNumber object. func NewQVersionNumber4(maj int, min int) *QVersionNumber { - var outptr_QVersionNumber *C.QVersionNumber = nil - C.QVersionNumber_new4((C.int)(maj), (C.int)(min), &outptr_QVersionNumber) - ret := newQVersionNumber(outptr_QVersionNumber) + ret := newQVersionNumber(C.QVersionNumber_new4((C.int)(maj), (C.int)(min))) ret.isSubclass = true return ret } // NewQVersionNumber5 constructs a new QVersionNumber object. func NewQVersionNumber5(maj int, min int, mic int) *QVersionNumber { - var outptr_QVersionNumber *C.QVersionNumber = nil - C.QVersionNumber_new5((C.int)(maj), (C.int)(min), (C.int)(mic), &outptr_QVersionNumber) - ret := newQVersionNumber(outptr_QVersionNumber) + ret := newQVersionNumber(C.QVersionNumber_new5((C.int)(maj), (C.int)(min), (C.int)(mic))) ret.isSubclass = true return ret } diff --git a/qt/gen_qversionnumber.h b/qt/gen_qversionnumber.h index 08e80a15..bdc4d316 100644 --- a/qt/gen_qversionnumber.h +++ b/qt/gen_qversionnumber.h @@ -20,11 +20,11 @@ class QVersionNumber; typedef struct QVersionNumber QVersionNumber; #endif -void QVersionNumber_new(QVersionNumber** outptr_QVersionNumber); -void QVersionNumber_new2(struct miqt_array /* of int */ seg, QVersionNumber** outptr_QVersionNumber); -void QVersionNumber_new3(int maj, QVersionNumber** outptr_QVersionNumber); -void QVersionNumber_new4(int maj, int min, QVersionNumber** outptr_QVersionNumber); -void QVersionNumber_new5(int maj, int min, int mic, QVersionNumber** outptr_QVersionNumber); +QVersionNumber* QVersionNumber_new(); +QVersionNumber* QVersionNumber_new2(struct miqt_array /* of int */ seg); +QVersionNumber* QVersionNumber_new3(int maj); +QVersionNumber* QVersionNumber_new4(int maj, int min); +QVersionNumber* QVersionNumber_new5(int maj, int min, int mic); bool QVersionNumber_IsNull(const QVersionNumber* self); bool QVersionNumber_IsNormalized(const QVersionNumber* self); int QVersionNumber_MajorVersion(const QVersionNumber* self); diff --git a/qt/gen_qwaitcondition.cpp b/qt/gen_qwaitcondition.cpp index 180ef11e..d625dceb 100644 --- a/qt/gen_qwaitcondition.cpp +++ b/qt/gen_qwaitcondition.cpp @@ -6,9 +6,8 @@ #include "gen_qwaitcondition.h" #include "_cgo_export.h" -void QWaitCondition_new(QWaitCondition** outptr_QWaitCondition) { - QWaitCondition* ret = new QWaitCondition(); - *outptr_QWaitCondition = ret; +QWaitCondition* QWaitCondition_new() { + return new QWaitCondition(); } bool QWaitCondition_Wait(QWaitCondition* self, QMutex* lockedMutex) { diff --git a/qt/gen_qwaitcondition.go b/qt/gen_qwaitcondition.go index 7a8e823f..654502cf 100644 --- a/qt/gen_qwaitcondition.go +++ b/qt/gen_qwaitcondition.go @@ -37,24 +37,19 @@ func newQWaitCondition(h *C.QWaitCondition) *QWaitCondition { if h == nil { return nil } + return &QWaitCondition{h: h} } // UnsafeNewQWaitCondition constructs the type using only unsafe pointers. func UnsafeNewQWaitCondition(h unsafe.Pointer) *QWaitCondition { - if h == nil { - return nil - } - - return &QWaitCondition{h: (*C.QWaitCondition)(h)} + return newQWaitCondition((*C.QWaitCondition)(h)) } // NewQWaitCondition constructs a new QWaitCondition object. func NewQWaitCondition() *QWaitCondition { - var outptr_QWaitCondition *C.QWaitCondition = nil - C.QWaitCondition_new(&outptr_QWaitCondition) - ret := newQWaitCondition(outptr_QWaitCondition) + ret := newQWaitCondition(C.QWaitCondition_new()) ret.isSubclass = true return ret } diff --git a/qt/gen_qwaitcondition.h b/qt/gen_qwaitcondition.h index e551de64..07558724 100644 --- a/qt/gen_qwaitcondition.h +++ b/qt/gen_qwaitcondition.h @@ -26,7 +26,7 @@ typedef struct QReadWriteLock QReadWriteLock; typedef struct QWaitCondition QWaitCondition; #endif -void QWaitCondition_new(QWaitCondition** outptr_QWaitCondition); +QWaitCondition* QWaitCondition_new(); bool QWaitCondition_Wait(QWaitCondition* self, QMutex* lockedMutex); bool QWaitCondition_Wait2(QWaitCondition* self, QMutex* lockedMutex, unsigned long time); bool QWaitCondition_WaitWithLockedReadWriteLock(QWaitCondition* self, QReadWriteLock* lockedReadWriteLock); diff --git a/qt/gen_qwhatsthis.go b/qt/gen_qwhatsthis.go index 66adc6da..8eb50697 100644 --- a/qt/gen_qwhatsthis.go +++ b/qt/gen_qwhatsthis.go @@ -37,16 +37,13 @@ func newQWhatsThis(h *C.QWhatsThis) *QWhatsThis { if h == nil { return nil } + return &QWhatsThis{h: h} } // UnsafeNewQWhatsThis constructs the type using only unsafe pointers. func UnsafeNewQWhatsThis(h unsafe.Pointer) *QWhatsThis { - if h == nil { - return nil - } - - return &QWhatsThis{h: (*C.QWhatsThis)(h)} + return newQWhatsThis((*C.QWhatsThis)(h)) } func QWhatsThis_EnterWhatsThisMode() { @@ -74,7 +71,7 @@ func QWhatsThis_HideText() { } func QWhatsThis_CreateAction() *QAction { - return newQAction(C.QWhatsThis_CreateAction(), nil) + return newQAction(C.QWhatsThis_CreateAction()) } func QWhatsThis_ShowText3(pos *QPoint, text string, w *QWidget) { @@ -86,7 +83,7 @@ func QWhatsThis_ShowText3(pos *QPoint, text string, w *QWidget) { } func QWhatsThis_CreateAction1(parent *QObject) *QAction { - return newQAction(C.QWhatsThis_CreateAction1(parent.cPointer()), nil) + return newQAction(C.QWhatsThis_CreateAction1(parent.cPointer())) } // Delete this object from C++ memory. diff --git a/qt/gen_qwidget.cpp b/qt/gen_qwidget.cpp index f4255539..d1082663 100644 --- a/qt/gen_qwidget.cpp +++ b/qt/gen_qwidget.cpp @@ -61,9 +61,8 @@ #include "gen_qwidget.h" #include "_cgo_export.h" -void QWidgetData_new(QWidgetData* param1, QWidgetData** outptr_QWidgetData) { - QWidgetData* ret = new QWidgetData(*param1); - *outptr_QWidgetData = ret; +QWidgetData* QWidgetData_new(QWidgetData* param1) { + return new QWidgetData(*param1); } void QWidgetData_OperatorAssign(QWidgetData* self, QWidgetData* param1) { @@ -1212,25 +1211,21 @@ public: }; -void QWidget_new(QWidget* parent, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWidget* ret = new MiqtVirtualQWidget(parent); - *outptr_QWidget = ret; - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWidget* QWidget_new(QWidget* parent) { + return new MiqtVirtualQWidget(parent); } -void QWidget_new2(QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWidget* ret = new MiqtVirtualQWidget(); - *outptr_QWidget = ret; - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWidget* QWidget_new2() { + return new MiqtVirtualQWidget(); } -void QWidget_new3(QWidget* parent, int f, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWidget* ret = new MiqtVirtualQWidget(parent, static_cast(f)); - *outptr_QWidget = ret; - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWidget* QWidget_new3(QWidget* parent, int f) { + return new MiqtVirtualQWidget(parent, static_cast(f)); +} + +void QWidget_virtbase(QWidget* src, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + *outptr_QObject = static_cast(src); + *outptr_QPaintDevice = static_cast(src); } QMetaObject* QWidget_MetaObject(const QWidget* self) { diff --git a/qt/gen_qwidget.go b/qt/gen_qwidget.go index b0d10188..2ea5fcd2 100644 --- a/qt/gen_qwidget.go +++ b/qt/gen_qwidget.go @@ -46,24 +46,19 @@ func newQWidgetData(h *C.QWidgetData) *QWidgetData { if h == nil { return nil } + return &QWidgetData{h: h} } // UnsafeNewQWidgetData constructs the type using only unsafe pointers. func UnsafeNewQWidgetData(h unsafe.Pointer) *QWidgetData { - if h == nil { - return nil - } - - return &QWidgetData{h: (*C.QWidgetData)(h)} + return newQWidgetData((*C.QWidgetData)(h)) } // NewQWidgetData constructs a new QWidgetData object. func NewQWidgetData(param1 *QWidgetData) *QWidgetData { - var outptr_QWidgetData *C.QWidgetData = nil - C.QWidgetData_new(param1.cPointer(), &outptr_QWidgetData) - ret := newQWidgetData(outptr_QWidgetData) + ret := newQWidgetData(C.QWidgetData_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -108,58 +103,44 @@ func (this *QWidget) UnsafePointer() unsafe.Pointer { } // newQWidget constructs the type using only CGO pointers. -func newQWidget(h *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWidget { +func newQWidget(h *C.QWidget) *QWidget { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + C.QWidget_virtbase(h, &outptr_QObject, &outptr_QPaintDevice) + return &QWidget{h: h, - QObject: newQObject(h_QObject), - QPaintDevice: newQPaintDevice(h_QPaintDevice)} + QObject: newQObject(outptr_QObject), + QPaintDevice: newQPaintDevice(outptr_QPaintDevice)} } // UnsafeNewQWidget constructs the type using only unsafe pointers. -func UnsafeNewQWidget(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWidget { - if h == nil { - return nil - } - - return &QWidget{h: (*C.QWidget)(h), - QObject: UnsafeNewQObject(h_QObject), - QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} +func UnsafeNewQWidget(h unsafe.Pointer) *QWidget { + return newQWidget((*C.QWidget)(h)) } // NewQWidget constructs a new QWidget object. func NewQWidget(parent *QWidget) *QWidget { - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWidget_new(parent.cPointer(), &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWidget(outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWidget(C.QWidget_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQWidget2 constructs a new QWidget object. func NewQWidget2() *QWidget { - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWidget_new2(&outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWidget(outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWidget(C.QWidget_new2()) ret.isSubclass = true return ret } // NewQWidget3 constructs a new QWidget object. func NewQWidget3(parent *QWidget, f WindowType) *QWidget { - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWidget_new3(parent.cPointer(), (C.int)(f), &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWidget(outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWidget(C.QWidget_new3(parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -213,7 +194,7 @@ func (this *QWidget) EffectiveWinId() uintptr { } func (this *QWidget) Style() *QStyle { - return newQStyle(C.QWidget_Style(this.h), nil) + return newQStyle(C.QWidget_Style(this.h)) } func (this *QWidget) SetStyle(style *QStyle) { @@ -473,15 +454,15 @@ func (this *QWidget) MapFrom(param1 *QWidget, param2 *QPoint) *QPoint { } func (this *QWidget) Window() *QWidget { - return newQWidget(C.QWidget_Window(this.h), nil, nil) + return newQWidget(C.QWidget_Window(this.h)) } func (this *QWidget) NativeParentWidget() *QWidget { - return newQWidget(C.QWidget_NativeParentWidget(this.h), nil, nil) + return newQWidget(C.QWidget_NativeParentWidget(this.h)) } func (this *QWidget) TopLevelWidget() *QWidget { - return newQWidget(C.QWidget_TopLevelWidget(this.h), nil, nil) + return newQWidget(C.QWidget_TopLevelWidget(this.h)) } func (this *QWidget) Palette() *QPalette { @@ -589,13 +570,13 @@ func (this *QWidget) RenderWithPainter(painter *QPainter) { } func (this *QWidget) Grab() *QPixmap { - _goptr := newQPixmap(C.QWidget_Grab(this.h), nil) + _goptr := newQPixmap(C.QWidget_Grab(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QWidget) GraphicsEffect() *QGraphicsEffect { - return newQGraphicsEffect(C.QWidget_GraphicsEffect(this.h), nil) + return newQGraphicsEffect(C.QWidget_GraphicsEffect(this.h)) } func (this *QWidget) SetGraphicsEffect(effect *QGraphicsEffect) { @@ -865,7 +846,7 @@ func (this *QWidget) SetFocusProxy(focusProxy *QWidget) { } func (this *QWidget) FocusProxy() *QWidget { - return newQWidget(C.QWidget_FocusProxy(this.h), nil, nil) + return newQWidget(C.QWidget_FocusProxy(this.h)) } func (this *QWidget) ContextMenuPolicy() ContextMenuPolicy { @@ -913,11 +894,11 @@ func (this *QWidget) SetShortcutAutoRepeat(id int) { } func QWidget_MouseGrabber() *QWidget { - return newQWidget(C.QWidget_MouseGrabber(), nil, nil) + return newQWidget(C.QWidget_MouseGrabber()) } func QWidget_KeyboardGrabber() *QWidget { - return newQWidget(C.QWidget_KeyboardGrabber(), nil, nil) + return newQWidget(C.QWidget_KeyboardGrabber()) } func (this *QWidget) UpdatesEnabled() bool { @@ -929,7 +910,7 @@ func (this *QWidget) SetUpdatesEnabled(enable bool) { } func (this *QWidget) GraphicsProxyWidget() *QGraphicsProxyWidget { - return newQGraphicsProxyWidget(C.QWidget_GraphicsProxyWidget(this.h), nil, nil, nil, nil, nil) + return newQGraphicsProxyWidget(C.QWidget_GraphicsProxyWidget(this.h)) } func (this *QWidget) Update() { @@ -1155,7 +1136,7 @@ func (this *QWidget) ContentsRect() *QRect { } func (this *QWidget) Layout() *QLayout { - return newQLayout(C.QWidget_Layout(this.h), nil, nil) + return newQLayout(C.QWidget_Layout(this.h)) } func (this *QWidget) SetLayout(layout *QLayout) { @@ -1183,15 +1164,15 @@ func (this *QWidget) Scroll2(dx int, dy int, param3 *QRect) { } func (this *QWidget) FocusWidget() *QWidget { - return newQWidget(C.QWidget_FocusWidget(this.h), nil, nil) + return newQWidget(C.QWidget_FocusWidget(this.h)) } func (this *QWidget) NextInFocusChain() *QWidget { - return newQWidget(C.QWidget_NextInFocusChain(this.h), nil, nil) + return newQWidget(C.QWidget_NextInFocusChain(this.h)) } func (this *QWidget) PreviousInFocusChain() *QWidget { - return newQWidget(C.QWidget_PreviousInFocusChain(this.h), nil, nil) + return newQWidget(C.QWidget_PreviousInFocusChain(this.h)) } func (this *QWidget) AcceptDrops() bool { @@ -1239,13 +1220,13 @@ func (this *QWidget) Actions() []*QAction { _ret := make([]*QAction, int(_ma.len)) _outCast := (*[0xffff]*C.QAction)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAction(_outCast[i], nil) + _ret[i] = newQAction(_outCast[i]) } return _ret } func (this *QWidget) ParentWidget() *QWidget { - return newQWidget(C.QWidget_ParentWidget(this.h), nil, nil) + return newQWidget(C.QWidget_ParentWidget(this.h)) } func (this *QWidget) SetWindowFlags(typeVal WindowType) { @@ -1269,15 +1250,15 @@ func (this *QWidget) WindowType() WindowType { } func QWidget_Find(param1 uintptr) *QWidget { - return newQWidget(C.QWidget_Find((C.uintptr_t)(param1)), nil, nil) + return newQWidget(C.QWidget_Find((C.uintptr_t)(param1))) } func (this *QWidget) ChildAt(x int, y int) *QWidget { - return newQWidget(C.QWidget_ChildAt(this.h, (C.int)(x), (C.int)(y)), nil, nil) + return newQWidget(C.QWidget_ChildAt(this.h, (C.int)(x), (C.int)(y))) } func (this *QWidget) ChildAtWithQPoint(p *QPoint) *QWidget { - return newQWidget(C.QWidget_ChildAtWithQPoint(this.h, p.cPointer()), nil, nil) + return newQWidget(C.QWidget_ChildAtWithQPoint(this.h, p.cPointer())) } func (this *QWidget) SetAttribute(param1 WidgetAttribute) { @@ -1313,15 +1294,15 @@ func (this *QWidget) BackingStore() *QBackingStore { } func (this *QWidget) WindowHandle() *QWindow { - return newQWindow(C.QWidget_WindowHandle(this.h), nil, nil) + return newQWindow(C.QWidget_WindowHandle(this.h)) } func (this *QWidget) Screen() *QScreen { - return newQScreen(C.QWidget_Screen(this.h), nil) + return newQScreen(C.QWidget_Screen(this.h)) } func QWidget_CreateWindowContainer(window *QWindow) *QWidget { - return newQWidget(C.QWidget_CreateWindowContainer(window.cPointer()), nil, nil) + return newQWidget(C.QWidget_CreateWindowContainer(window.cPointer())) } func (this *QWidget) WindowTitleChanged(title string) { @@ -1501,7 +1482,7 @@ func (this *QWidget) Render42(painter *QPainter, targetOffset *QPoint, sourceReg } func (this *QWidget) Grab1(rectangle *QRect) *QPixmap { - _goptr := newQPixmap(C.QWidget_Grab1(this.h, rectangle.cPointer()), nil) + _goptr := newQPixmap(C.QWidget_Grab1(this.h, rectangle.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -1531,11 +1512,11 @@ func (this *QWidget) SetAttribute2(param1 WidgetAttribute, on bool) { } func QWidget_CreateWindowContainer2(window *QWindow, parent *QWidget) *QWidget { - return newQWidget(C.QWidget_CreateWindowContainer2(window.cPointer(), parent.cPointer()), nil, nil) + return newQWidget(C.QWidget_CreateWindowContainer2(window.cPointer(), parent.cPointer())) } func QWidget_CreateWindowContainer3(window *QWindow, parent *QWidget, flags WindowType) *QWidget { - return newQWidget(C.QWidget_CreateWindowContainer3(window.cPointer(), parent.cPointer(), (C.int)(flags)), nil, nil) + return newQWidget(C.QWidget_CreateWindowContainer3(window.cPointer(), parent.cPointer(), (C.int)(flags))) } func (this *QWidget) callVirtualBase_DevType() int { @@ -1769,7 +1750,7 @@ func miqt_exec_callback_QWidget_MousePressEvent(self *C.QWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1795,7 +1776,7 @@ func miqt_exec_callback_QWidget_MouseReleaseEvent(self *C.QWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1821,7 +1802,7 @@ func miqt_exec_callback_QWidget_MouseDoubleClickEvent(self *C.QWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1847,7 +1828,7 @@ func miqt_exec_callback_QWidget_MouseMoveEvent(self *C.QWidget, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1873,7 +1854,7 @@ func miqt_exec_callback_QWidget_WheelEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1899,7 +1880,7 @@ func miqt_exec_callback_QWidget_KeyPressEvent(self *C.QWidget, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1925,7 +1906,7 @@ func miqt_exec_callback_QWidget_KeyReleaseEvent(self *C.QWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1951,7 +1932,7 @@ func miqt_exec_callback_QWidget_FocusInEvent(self *C.QWidget, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1977,7 +1958,7 @@ func miqt_exec_callback_QWidget_FocusOutEvent(self *C.QWidget, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -2055,7 +2036,7 @@ func miqt_exec_callback_QWidget_PaintEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -2081,7 +2062,7 @@ func miqt_exec_callback_QWidget_MoveEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -2107,7 +2088,7 @@ func miqt_exec_callback_QWidget_ResizeEvent(self *C.QWidget, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -2133,7 +2114,7 @@ func miqt_exec_callback_QWidget_CloseEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -2159,7 +2140,7 @@ func miqt_exec_callback_QWidget_ContextMenuEvent(self *C.QWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -2185,7 +2166,7 @@ func miqt_exec_callback_QWidget_TabletEvent(self *C.QWidget, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -2211,7 +2192,7 @@ func miqt_exec_callback_QWidget_ActionEvent(self *C.QWidget, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -2237,7 +2218,7 @@ func miqt_exec_callback_QWidget_DragEnterEvent(self *C.QWidget, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -2263,7 +2244,7 @@ func miqt_exec_callback_QWidget_DragMoveEvent(self *C.QWidget, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -2289,7 +2270,7 @@ func miqt_exec_callback_QWidget_DragLeaveEvent(self *C.QWidget, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -2315,7 +2296,7 @@ func miqt_exec_callback_QWidget_DropEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -2341,7 +2322,7 @@ func miqt_exec_callback_QWidget_ShowEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -2367,7 +2348,7 @@ func miqt_exec_callback_QWidget_HideEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -2563,7 +2544,7 @@ func miqt_exec_callback_QWidget_InputMethodEvent(self *C.QWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -2677,7 +2658,7 @@ func miqt_exec_callback_QWidget_TimerEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -2703,7 +2684,7 @@ func miqt_exec_callback_QWidget_ChildEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qwidget.h b/qt/gen_qwidget.h index 709dfa3b..62811d2f 100644 --- a/qt/gen_qwidget.h +++ b/qt/gen_qwidget.h @@ -126,13 +126,14 @@ typedef struct QWidgetData QWidgetData; typedef struct QWindow QWindow; #endif -void QWidgetData_new(QWidgetData* param1, QWidgetData** outptr_QWidgetData); +QWidgetData* QWidgetData_new(QWidgetData* param1); void QWidgetData_OperatorAssign(QWidgetData* self, QWidgetData* param1); void QWidgetData_Delete(QWidgetData* self, bool isSubclass); -void QWidget_new(QWidget* parent, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWidget_new2(QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWidget_new3(QWidget* parent, int f, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QWidget* QWidget_new(QWidget* parent); +QWidget* QWidget_new2(); +QWidget* QWidget_new3(QWidget* parent, int f); +void QWidget_virtbase(QWidget* src, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QWidget_MetaObject(const QWidget* self); void* QWidget_Metacast(QWidget* self, const char* param1); struct miqt_string QWidget_Tr(const char* s); diff --git a/qt/gen_qwidgetaction.cpp b/qt/gen_qwidgetaction.cpp index e9516537..a750d813 100644 --- a/qt/gen_qwidgetaction.cpp +++ b/qt/gen_qwidgetaction.cpp @@ -114,11 +114,12 @@ public: }; -void QWidgetAction_new(QObject* parent, QWidgetAction** outptr_QWidgetAction, QAction** outptr_QAction, QObject** outptr_QObject) { - MiqtVirtualQWidgetAction* ret = new MiqtVirtualQWidgetAction(parent); - *outptr_QWidgetAction = ret; - *outptr_QAction = static_cast(ret); - *outptr_QObject = static_cast(ret); +QWidgetAction* QWidgetAction_new(QObject* parent) { + return new MiqtVirtualQWidgetAction(parent); +} + +void QWidgetAction_virtbase(QWidgetAction* src, QAction** outptr_QAction) { + *outptr_QAction = static_cast(src); } QMetaObject* QWidgetAction_MetaObject(const QWidgetAction* self) { diff --git a/qt/gen_qwidgetaction.go b/qt/gen_qwidgetaction.go index bb1015f8..a181da15 100644 --- a/qt/gen_qwidgetaction.go +++ b/qt/gen_qwidgetaction.go @@ -35,32 +35,26 @@ func (this *QWidgetAction) UnsafePointer() unsafe.Pointer { } // newQWidgetAction constructs the type using only CGO pointers. -func newQWidgetAction(h *C.QWidgetAction, h_QAction *C.QAction, h_QObject *C.QObject) *QWidgetAction { +func newQWidgetAction(h *C.QWidgetAction) *QWidgetAction { if h == nil { return nil } + var outptr_QAction *C.QAction = nil + C.QWidgetAction_virtbase(h, &outptr_QAction) + return &QWidgetAction{h: h, - QAction: newQAction(h_QAction, h_QObject)} + QAction: newQAction(outptr_QAction)} } // UnsafeNewQWidgetAction constructs the type using only unsafe pointers. -func UnsafeNewQWidgetAction(h unsafe.Pointer, h_QAction unsafe.Pointer, h_QObject unsafe.Pointer) *QWidgetAction { - if h == nil { - return nil - } - - return &QWidgetAction{h: (*C.QWidgetAction)(h), - QAction: UnsafeNewQAction(h_QAction, h_QObject)} +func UnsafeNewQWidgetAction(h unsafe.Pointer) *QWidgetAction { + return newQWidgetAction((*C.QWidgetAction)(h)) } // NewQWidgetAction constructs a new QWidgetAction object. func NewQWidgetAction(parent *QObject) *QWidgetAction { - var outptr_QWidgetAction *C.QWidgetAction = nil - var outptr_QAction *C.QAction = nil - var outptr_QObject *C.QObject = nil - C.QWidgetAction_new(parent.cPointer(), &outptr_QWidgetAction, &outptr_QAction, &outptr_QObject) - ret := newQWidgetAction(outptr_QWidgetAction, outptr_QAction, outptr_QObject) + ret := newQWidgetAction(C.QWidgetAction_new(parent.cPointer())) ret.isSubclass = true return ret } @@ -98,11 +92,11 @@ func (this *QWidgetAction) SetDefaultWidget(w *QWidget) { } func (this *QWidgetAction) DefaultWidget() *QWidget { - return newQWidget(C.QWidgetAction_DefaultWidget(this.h), nil, nil) + return newQWidget(C.QWidgetAction_DefaultWidget(this.h)) } func (this *QWidgetAction) RequestWidget(parent *QWidget) *QWidget { - return newQWidget(C.QWidgetAction_RequestWidget(this.h, parent.cPointer()), nil, nil) + return newQWidget(C.QWidgetAction_RequestWidget(this.h, parent.cPointer())) } func (this *QWidgetAction) ReleaseWidget(widget *QWidget) { @@ -213,7 +207,7 @@ func miqt_exec_callback_QWidgetAction_EventFilter(self *C.QWidgetAction, cb C.in func (this *QWidgetAction) callVirtualBase_CreateWidget(parent *QWidget) *QWidget { - return newQWidget(C.QWidgetAction_virtualbase_CreateWidget(unsafe.Pointer(this.h), parent.cPointer()), nil, nil) + return newQWidget(C.QWidgetAction_virtualbase_CreateWidget(unsafe.Pointer(this.h), parent.cPointer())) } func (this *QWidgetAction) OnCreateWidget(slot func(super func(parent *QWidget) *QWidget, parent *QWidget) *QWidget) { @@ -231,7 +225,7 @@ func miqt_exec_callback_QWidgetAction_CreateWidget(self *C.QWidgetAction, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(parent, nil, nil) + slotval1 := newQWidget(parent) virtualReturn := gofunc((&QWidgetAction{h: self}).callVirtualBase_CreateWidget, slotval1) @@ -259,7 +253,7 @@ func miqt_exec_callback_QWidgetAction_DeleteWidget(self *C.QWidgetAction, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QWidgetAction{h: self}).callVirtualBase_DeleteWidget, slotval1) diff --git a/qt/gen_qwidgetaction.h b/qt/gen_qwidgetaction.h index ab4401a5..66c96d67 100644 --- a/qt/gen_qwidgetaction.h +++ b/qt/gen_qwidgetaction.h @@ -30,7 +30,8 @@ typedef struct QWidget QWidget; typedef struct QWidgetAction QWidgetAction; #endif -void QWidgetAction_new(QObject* parent, QWidgetAction** outptr_QWidgetAction, QAction** outptr_QAction, QObject** outptr_QObject); +QWidgetAction* QWidgetAction_new(QObject* parent); +void QWidgetAction_virtbase(QWidgetAction* src, QAction** outptr_QAction); QMetaObject* QWidgetAction_MetaObject(const QWidgetAction* self); void* QWidgetAction_Metacast(QWidgetAction* self, const char* param1); struct miqt_string QWidgetAction_Tr(const char* s); diff --git a/qt/gen_qwindow.cpp b/qt/gen_qwindow.cpp index 4bbd76e2..b343ed3b 100644 --- a/qt/gen_qwindow.cpp +++ b/qt/gen_qwindow.cpp @@ -743,25 +743,21 @@ public: }; -void QWindow_new(QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface) { - MiqtVirtualQWindow* ret = new MiqtVirtualQWindow(); - *outptr_QWindow = ret; - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); +QWindow* QWindow_new() { + return new MiqtVirtualQWindow(); } -void QWindow_new2(QWindow* parent, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface) { - MiqtVirtualQWindow* ret = new MiqtVirtualQWindow(parent); - *outptr_QWindow = ret; - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); +QWindow* QWindow_new2(QWindow* parent) { + return new MiqtVirtualQWindow(parent); } -void QWindow_new3(QScreen* screen, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface) { - MiqtVirtualQWindow* ret = new MiqtVirtualQWindow(screen); - *outptr_QWindow = ret; - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); +QWindow* QWindow_new3(QScreen* screen) { + return new MiqtVirtualQWindow(screen); +} + +void QWindow_virtbase(QWindow* src, QObject** outptr_QObject, QSurface** outptr_QSurface) { + *outptr_QObject = static_cast(src); + *outptr_QSurface = static_cast(src); } QMetaObject* QWindow_MetaObject(const QWindow* self) { diff --git a/qt/gen_qwindow.go b/qt/gen_qwindow.go index 4bb48c23..157d371f 100644 --- a/qt/gen_qwindow.go +++ b/qt/gen_qwindow.go @@ -54,58 +54,44 @@ func (this *QWindow) UnsafePointer() unsafe.Pointer { } // newQWindow constructs the type using only CGO pointers. -func newQWindow(h *C.QWindow, h_QObject *C.QObject, h_QSurface *C.QSurface) *QWindow { +func newQWindow(h *C.QWindow) *QWindow { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + C.QWindow_virtbase(h, &outptr_QObject, &outptr_QSurface) + return &QWindow{h: h, - QObject: newQObject(h_QObject), - QSurface: newQSurface(h_QSurface)} + QObject: newQObject(outptr_QObject), + QSurface: newQSurface(outptr_QSurface)} } // UnsafeNewQWindow constructs the type using only unsafe pointers. -func UnsafeNewQWindow(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer) *QWindow { - if h == nil { - return nil - } - - return &QWindow{h: (*C.QWindow)(h), - QObject: UnsafeNewQObject(h_QObject), - QSurface: UnsafeNewQSurface(h_QSurface)} +func UnsafeNewQWindow(h unsafe.Pointer) *QWindow { + return newQWindow((*C.QWindow)(h)) } // NewQWindow constructs a new QWindow object. func NewQWindow() *QWindow { - var outptr_QWindow *C.QWindow = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - C.QWindow_new(&outptr_QWindow, &outptr_QObject, &outptr_QSurface) - ret := newQWindow(outptr_QWindow, outptr_QObject, outptr_QSurface) + ret := newQWindow(C.QWindow_new()) ret.isSubclass = true return ret } // NewQWindow2 constructs a new QWindow object. func NewQWindow2(parent *QWindow) *QWindow { - var outptr_QWindow *C.QWindow = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - C.QWindow_new2(parent.cPointer(), &outptr_QWindow, &outptr_QObject, &outptr_QSurface) - ret := newQWindow(outptr_QWindow, outptr_QObject, outptr_QSurface) + ret := newQWindow(C.QWindow_new2(parent.cPointer())) ret.isSubclass = true return ret } // NewQWindow3 constructs a new QWindow object. func NewQWindow3(screen *QScreen) *QWindow { - var outptr_QWindow *C.QWindow = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - C.QWindow_new3(screen.cPointer(), &outptr_QWindow, &outptr_QObject, &outptr_QSurface) - ret := newQWindow(outptr_QWindow, outptr_QObject, outptr_QSurface) + ret := newQWindow(C.QWindow_new3(screen.cPointer())) ret.isSubclass = true return ret } @@ -167,11 +153,11 @@ func (this *QWindow) WinId() uintptr { } func (this *QWindow) Parent(mode QWindow__AncestorMode) *QWindow { - return newQWindow(C.QWindow_Parent(this.h, (C.int)(mode)), nil, nil) + return newQWindow(C.QWindow_Parent(this.h, (C.int)(mode))) } func (this *QWindow) Parent2() *QWindow { - return newQWindow(C.QWindow_Parent2(this.h), nil, nil) + return newQWindow(C.QWindow_Parent2(this.h)) } func (this *QWindow) SetParent(parent *QWindow) { @@ -288,7 +274,7 @@ func (this *QWindow) SetTransientParent(parent *QWindow) { } func (this *QWindow) TransientParent() *QWindow { - return newQWindow(C.QWindow_TransientParent(this.h), nil, nil) + return newQWindow(C.QWindow_TransientParent(this.h)) } func (this *QWindow) IsAncestorOf(child *QWindow) bool { @@ -465,7 +451,7 @@ func (this *QWindow) SetMouseGrabEnabled(grab bool) bool { } func (this *QWindow) Screen() *QScreen { - return newQScreen(C.QWindow_Screen(this.h), nil) + return newQScreen(C.QWindow_Screen(this.h)) } func (this *QWindow) SetScreen(screen *QScreen) { @@ -507,7 +493,7 @@ func (this *QWindow) UnsetCursor() { } func QWindow_FromWinId(id uintptr) *QWindow { - return newQWindow(C.QWindow_FromWinId((C.uintptr_t)(id)), nil, nil) + return newQWindow(C.QWindow_FromWinId((C.uintptr_t)(id))) } func (this *QWindow) RequestActivate() { @@ -633,7 +619,7 @@ func miqt_exec_callback_QWindow_ScreenChanged(cb C.intptr_t, screen *C.QScreen) } // Convert all CABI parameters to Go parameters - slotval1 := newQScreen(screen, nil) + slotval1 := newQScreen(screen) gofunc(slotval1) } @@ -997,7 +983,7 @@ func miqt_exec_callback_QWindow_TransientParentChanged(cb C.intptr_t, transientP } // Convert all CABI parameters to Go parameters - slotval1 := newQWindow(transientParent, nil, nil) + slotval1 := newQWindow(transientParent) gofunc(slotval1) } @@ -1203,7 +1189,7 @@ func miqt_exec_callback_QWindow_ExposeEvent(self *C.QWindow, cb C.intptr_t, para } // Convert all CABI parameters to Go parameters - slotval1 := newQExposeEvent(param1, nil) + slotval1 := newQExposeEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_ExposeEvent, slotval1) @@ -1229,7 +1215,7 @@ func miqt_exec_callback_QWindow_ResizeEvent(self *C.QWindow, cb C.intptr_t, para } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1255,7 +1241,7 @@ func miqt_exec_callback_QWindow_MoveEvent(self *C.QWindow, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(param1, nil) + slotval1 := newQMoveEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1281,7 +1267,7 @@ func miqt_exec_callback_QWindow_FocusInEvent(self *C.QWindow, cb C.intptr_t, par } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1307,7 +1293,7 @@ func miqt_exec_callback_QWindow_FocusOutEvent(self *C.QWindow, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1333,7 +1319,7 @@ func miqt_exec_callback_QWindow_ShowEvent(self *C.QWindow, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1359,7 +1345,7 @@ func miqt_exec_callback_QWindow_HideEvent(self *C.QWindow, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(param1, nil) + slotval1 := newQHideEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1413,7 +1399,7 @@ func miqt_exec_callback_QWindow_KeyPressEvent(self *C.QWindow, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1439,7 +1425,7 @@ func miqt_exec_callback_QWindow_KeyReleaseEvent(self *C.QWindow, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1465,7 +1451,7 @@ func miqt_exec_callback_QWindow_MousePressEvent(self *C.QWindow, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1491,7 +1477,7 @@ func miqt_exec_callback_QWindow_MouseReleaseEvent(self *C.QWindow, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1517,7 +1503,7 @@ func miqt_exec_callback_QWindow_MouseDoubleClickEvent(self *C.QWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1543,7 +1529,7 @@ func miqt_exec_callback_QWindow_MouseMoveEvent(self *C.QWindow, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1569,7 +1555,7 @@ func miqt_exec_callback_QWindow_WheelEvent(self *C.QWindow, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(param1, nil, nil) + slotval1 := newQWheelEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1595,7 +1581,7 @@ func miqt_exec_callback_QWindow_TouchEvent(self *C.QWindow, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQTouchEvent(param1, nil, nil) + slotval1 := newQTouchEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_TouchEvent, slotval1) @@ -1621,7 +1607,7 @@ func miqt_exec_callback_QWindow_TabletEvent(self *C.QWindow, cb C.intptr_t, para } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(param1, nil, nil) + slotval1 := newQTabletEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1714,7 +1700,7 @@ func miqt_exec_callback_QWindow_TimerEvent(self *C.QWindow, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QWindow{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1740,7 +1726,7 @@ func miqt_exec_callback_QWindow_ChildEvent(self *C.QWindow, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QWindow{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/gen_qwindow.h b/qt/gen_qwindow.h index 0e7d6044..fdc153b2 100644 --- a/qt/gen_qwindow.h +++ b/qt/gen_qwindow.h @@ -76,9 +76,10 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWindow QWindow; #endif -void QWindow_new(QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface); -void QWindow_new2(QWindow* parent, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface); -void QWindow_new3(QScreen* screen, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface); +QWindow* QWindow_new(); +QWindow* QWindow_new2(QWindow* parent); +QWindow* QWindow_new3(QScreen* screen); +void QWindow_virtbase(QWindow* src, QObject** outptr_QObject, QSurface** outptr_QSurface); QMetaObject* QWindow_MetaObject(const QWindow* self); void* QWindow_Metacast(QWindow* self, const char* param1); struct miqt_string QWindow_Tr(const char* s); diff --git a/qt/gen_qwizard.cpp b/qt/gen_qwizard.cpp index 7e62a924..2015cc46 100644 --- a/qt/gen_qwizard.cpp +++ b/qt/gen_qwizard.cpp @@ -517,31 +517,20 @@ public: }; -void QWizard_new(QWidget* parent, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWizard* ret = new MiqtVirtualQWizard(parent); - *outptr_QWizard = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWizard* QWizard_new(QWidget* parent) { + return new MiqtVirtualQWizard(parent); } -void QWizard_new2(QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWizard* ret = new MiqtVirtualQWizard(); - *outptr_QWizard = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWizard* QWizard_new2() { + return new MiqtVirtualQWizard(); } -void QWizard_new3(QWidget* parent, int flags, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWizard* ret = new MiqtVirtualQWizard(parent, static_cast(flags)); - *outptr_QWizard = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWizard* QWizard_new3(QWidget* parent, int flags) { + return new MiqtVirtualQWizard(parent, static_cast(flags)); +} + +void QWizard_virtbase(QWizard* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QWizard_MetaObject(const QWizard* self) { @@ -2152,20 +2141,16 @@ public: }; -void QWizardPage_new(QWidget* parent, QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWizardPage* ret = new MiqtVirtualQWizardPage(parent); - *outptr_QWizardPage = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWizardPage* QWizardPage_new(QWidget* parent) { + return new MiqtVirtualQWizardPage(parent); } -void QWizardPage_new2(QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWizardPage* ret = new MiqtVirtualQWizardPage(); - *outptr_QWizardPage = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWizardPage* QWizardPage_new2() { + return new MiqtVirtualQWizardPage(); +} + +void QWizardPage_virtbase(QWizardPage* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QWizardPage_MetaObject(const QWizardPage* self) { diff --git a/qt/gen_qwizard.go b/qt/gen_qwizard.go index d78e2d43..ee790966 100644 --- a/qt/gen_qwizard.go +++ b/qt/gen_qwizard.go @@ -95,62 +95,42 @@ func (this *QWizard) UnsafePointer() unsafe.Pointer { } // newQWizard constructs the type using only CGO pointers. -func newQWizard(h *C.QWizard, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWizard { +func newQWizard(h *C.QWizard) *QWizard { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QWizard_virtbase(h, &outptr_QDialog) + return &QWizard{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQWizard constructs the type using only unsafe pointers. -func UnsafeNewQWizard(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWizard { - if h == nil { - return nil - } - - return &QWizard{h: (*C.QWizard)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQWizard(h unsafe.Pointer) *QWizard { + return newQWizard((*C.QWizard)(h)) } // NewQWizard constructs a new QWizard object. func NewQWizard(parent *QWidget) *QWizard { - var outptr_QWizard *C.QWizard = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWizard_new(parent.cPointer(), &outptr_QWizard, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWizard(outptr_QWizard, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWizard(C.QWizard_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQWizard2 constructs a new QWizard object. func NewQWizard2() *QWizard { - var outptr_QWizard *C.QWizard = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWizard_new2(&outptr_QWizard, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWizard(outptr_QWizard, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWizard(C.QWizard_new2()) ret.isSubclass = true return ret } // NewQWizard3 constructs a new QWizard object. func NewQWizard3(parent *QWidget, flags WindowType) *QWizard { - var outptr_QWizard *C.QWizard = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWizard_new3(parent.cPointer(), (C.int)(flags), &outptr_QWizard, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWizard(outptr_QWizard, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWizard(C.QWizard_new3(parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -196,7 +176,7 @@ func (this *QWizard) RemovePage(id int) { } func (this *QWizard) Page(id int) *QWizardPage { - return newQWizardPage(C.QWizard_Page(this.h, (C.int)(id)), nil, nil, nil) + return newQWizardPage(C.QWizard_Page(this.h, (C.int)(id))) } func (this *QWizard) HasVisitedPage(id int) bool { @@ -242,7 +222,7 @@ func (this *QWizard) StartId() int { } func (this *QWizard) CurrentPage() *QWizardPage { - return newQWizardPage(C.QWizard_CurrentPage(this.h), nil, nil, nil) + return newQWizardPage(C.QWizard_CurrentPage(this.h)) } func (this *QWizard) CurrentId() int { @@ -329,7 +309,7 @@ func (this *QWizard) SetButton(which QWizard__WizardButton, button *QAbstractBut } func (this *QWizard) Button(which QWizard__WizardButton) *QAbstractButton { - return newQAbstractButton(C.QWizard_Button(this.h, (C.int)(which)), nil, nil, nil) + return newQAbstractButton(C.QWizard_Button(this.h, (C.int)(which))) } func (this *QWizard) SetTitleFormat(format TextFormat) { @@ -353,7 +333,7 @@ func (this *QWizard) SetPixmap(which QWizard__WizardPixmap, pixmap *QPixmap) { } func (this *QWizard) Pixmap(which QWizard__WizardPixmap) *QPixmap { - _goptr := newQPixmap(C.QWizard_Pixmap(this.h, (C.int)(which)), nil) + _goptr := newQPixmap(C.QWizard_Pixmap(this.h, (C.int)(which))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -363,7 +343,7 @@ func (this *QWizard) SetSideWidget(widget *QWidget) { } func (this *QWizard) SideWidget() *QWidget { - return newQWidget(C.QWizard_SideWidget(this.h), nil, nil) + return newQWidget(C.QWizard_SideWidget(this.h)) } func (this *QWizard) SetDefaultProperty(className string, property string, changedSignal string) { @@ -694,7 +674,7 @@ func miqt_exec_callback_QWizard_ResizeEvent(self *C.QWizard, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QWizard{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -720,7 +700,7 @@ func miqt_exec_callback_QWizard_PaintEvent(self *C.QWizard, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QWizard{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -945,7 +925,7 @@ func miqt_exec_callback_QWizard_KeyPressEvent(self *C.QWizard, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QWizard{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -971,7 +951,7 @@ func miqt_exec_callback_QWizard_CloseEvent(self *C.QWizard, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(param1, nil) + slotval1 := newQCloseEvent(param1) gofunc((&QWizard{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -997,7 +977,7 @@ func miqt_exec_callback_QWizard_ShowEvent(self *C.QWizard, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QWizard{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1023,7 +1003,7 @@ func miqt_exec_callback_QWizard_ContextMenuEvent(self *C.QWizard, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QWizard{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1094,46 +1074,34 @@ func (this *QWizardPage) UnsafePointer() unsafe.Pointer { } // newQWizardPage constructs the type using only CGO pointers. -func newQWizardPage(h *C.QWizardPage, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWizardPage { +func newQWizardPage(h *C.QWizardPage) *QWizardPage { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QWizardPage_virtbase(h, &outptr_QWidget) + return &QWizardPage{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQWizardPage constructs the type using only unsafe pointers. -func UnsafeNewQWizardPage(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWizardPage { - if h == nil { - return nil - } - - return &QWizardPage{h: (*C.QWizardPage)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQWizardPage(h unsafe.Pointer) *QWizardPage { + return newQWizardPage((*C.QWizardPage)(h)) } // NewQWizardPage constructs a new QWizardPage object. func NewQWizardPage(parent *QWidget) *QWizardPage { - var outptr_QWizardPage *C.QWizardPage = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWizardPage_new(parent.cPointer(), &outptr_QWizardPage, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWizardPage(outptr_QWizardPage, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWizardPage(C.QWizardPage_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQWizardPage2 constructs a new QWizardPage object. func NewQWizardPage2() *QWizardPage { - var outptr_QWizardPage *C.QWizardPage = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWizardPage_new2(&outptr_QWizardPage, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWizardPage(outptr_QWizardPage, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWizardPage(C.QWizardPage_new2()) ret.isSubclass = true return ret } @@ -1201,7 +1169,7 @@ func (this *QWizardPage) SetPixmap(which QWizard__WizardPixmap, pixmap *QPixmap) } func (this *QWizardPage) Pixmap(which QWizard__WizardPixmap) *QPixmap { - _goptr := newQPixmap(C.QWizardPage_Pixmap(this.h, (C.int)(which)), nil) + _goptr := newQPixmap(C.QWizardPage_Pixmap(this.h, (C.int)(which))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -1670,7 +1638,7 @@ func miqt_exec_callback_QWizardPage_MousePressEvent(self *C.QWizardPage, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1696,7 +1664,7 @@ func miqt_exec_callback_QWizardPage_MouseReleaseEvent(self *C.QWizardPage, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1722,7 +1690,7 @@ func miqt_exec_callback_QWizardPage_MouseDoubleClickEvent(self *C.QWizardPage, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1748,7 +1716,7 @@ func miqt_exec_callback_QWizardPage_MouseMoveEvent(self *C.QWizardPage, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1774,7 +1742,7 @@ func miqt_exec_callback_QWizardPage_WheelEvent(self *C.QWizardPage, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1800,7 +1768,7 @@ func miqt_exec_callback_QWizardPage_KeyPressEvent(self *C.QWizardPage, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1826,7 +1794,7 @@ func miqt_exec_callback_QWizardPage_KeyReleaseEvent(self *C.QWizardPage, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1852,7 +1820,7 @@ func miqt_exec_callback_QWizardPage_FocusInEvent(self *C.QWizardPage, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1878,7 +1846,7 @@ func miqt_exec_callback_QWizardPage_FocusOutEvent(self *C.QWizardPage, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1956,7 +1924,7 @@ func miqt_exec_callback_QWizardPage_PaintEvent(self *C.QWizardPage, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1982,7 +1950,7 @@ func miqt_exec_callback_QWizardPage_MoveEvent(self *C.QWizardPage, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -2008,7 +1976,7 @@ func miqt_exec_callback_QWizardPage_ResizeEvent(self *C.QWizardPage, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -2034,7 +2002,7 @@ func miqt_exec_callback_QWizardPage_CloseEvent(self *C.QWizardPage, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -2060,7 +2028,7 @@ func miqt_exec_callback_QWizardPage_ContextMenuEvent(self *C.QWizardPage, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -2086,7 +2054,7 @@ func miqt_exec_callback_QWizardPage_TabletEvent(self *C.QWizardPage, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -2112,7 +2080,7 @@ func miqt_exec_callback_QWizardPage_ActionEvent(self *C.QWizardPage, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -2138,7 +2106,7 @@ func miqt_exec_callback_QWizardPage_DragEnterEvent(self *C.QWizardPage, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -2164,7 +2132,7 @@ func miqt_exec_callback_QWizardPage_DragMoveEvent(self *C.QWizardPage, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -2190,7 +2158,7 @@ func miqt_exec_callback_QWizardPage_DragLeaveEvent(self *C.QWizardPage, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -2216,7 +2184,7 @@ func miqt_exec_callback_QWizardPage_DropEvent(self *C.QWizardPage, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_DropEvent, slotval1) @@ -2242,7 +2210,7 @@ func miqt_exec_callback_QWizardPage_ShowEvent(self *C.QWizardPage, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -2268,7 +2236,7 @@ func miqt_exec_callback_QWizardPage_HideEvent(self *C.QWizardPage, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_HideEvent, slotval1) @@ -2464,7 +2432,7 @@ func miqt_exec_callback_QWizardPage_InputMethodEvent(self *C.QWizardPage, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QWizardPage{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/gen_qwizard.h b/qt/gen_qwizard.h index 45a944ec..77401b3d 100644 --- a/qt/gen_qwizard.h +++ b/qt/gen_qwizard.h @@ -84,9 +84,10 @@ typedef struct QWizard QWizard; typedef struct QWizardPage QWizardPage; #endif -void QWizard_new(QWidget* parent, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWizard_new2(QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWizard_new3(QWidget* parent, int flags, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QWizard* QWizard_new(QWidget* parent); +QWizard* QWizard_new2(); +QWizard* QWizard_new3(QWidget* parent, int flags); +void QWizard_virtbase(QWizard* src, QDialog** outptr_QDialog); QMetaObject* QWizard_MetaObject(const QWizard* self); void* QWizard_Metacast(QWizard* self, const char* param1); struct miqt_string QWizard_Tr(const char* s); @@ -195,8 +196,9 @@ void QWizard_override_virtual_EventFilter(void* self, intptr_t slot); bool QWizard_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); void QWizard_Delete(QWizard* self, bool isSubclass); -void QWizardPage_new(QWidget* parent, QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWizardPage_new2(QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QWizardPage* QWizardPage_new(QWidget* parent); +QWizardPage* QWizardPage_new2(); +void QWizardPage_virtbase(QWizardPage* src, QWidget** outptr_QWidget); QMetaObject* QWizardPage_MetaObject(const QWizardPage* self); void* QWizardPage_Metacast(QWizardPage* self, const char* param1); struct miqt_string QWizardPage_Tr(const char* s); diff --git a/qt/gen_qxmlstream.cpp b/qt/gen_qxmlstream.cpp index 01b1ce34..ebd9bd39 100644 --- a/qt/gen_qxmlstream.cpp +++ b/qt/gen_qxmlstream.cpp @@ -17,20 +17,17 @@ #include "gen_qxmlstream.h" #include "_cgo_export.h" -void QXmlStreamStringRef_new(QXmlStreamStringRef** outptr_QXmlStreamStringRef) { - QXmlStreamStringRef* ret = new QXmlStreamStringRef(); - *outptr_QXmlStreamStringRef = ret; +QXmlStreamStringRef* QXmlStreamStringRef_new() { + return new QXmlStreamStringRef(); } -void QXmlStreamStringRef_new2(struct miqt_string aString, QXmlStreamStringRef** outptr_QXmlStreamStringRef) { +QXmlStreamStringRef* QXmlStreamStringRef_new2(struct miqt_string aString) { QString aString_QString = QString::fromUtf8(aString.data, aString.len); - QXmlStreamStringRef* ret = new QXmlStreamStringRef(aString_QString); - *outptr_QXmlStreamStringRef = ret; + return new QXmlStreamStringRef(aString_QString); } -void QXmlStreamStringRef_new3(QXmlStreamStringRef* other, QXmlStreamStringRef** outptr_QXmlStreamStringRef) { - QXmlStreamStringRef* ret = new QXmlStreamStringRef(*other); - *outptr_QXmlStreamStringRef = ret; +QXmlStreamStringRef* QXmlStreamStringRef_new3(QXmlStreamStringRef* other) { + return new QXmlStreamStringRef(*other); } void QXmlStreamStringRef_OperatorAssign(QXmlStreamStringRef* self, QXmlStreamStringRef* other) { @@ -72,29 +69,25 @@ void QXmlStreamStringRef_Delete(QXmlStreamStringRef* self, bool isSubclass) { } } -void QXmlStreamAttribute_new(QXmlStreamAttribute** outptr_QXmlStreamAttribute) { - QXmlStreamAttribute* ret = new QXmlStreamAttribute(); - *outptr_QXmlStreamAttribute = ret; +QXmlStreamAttribute* QXmlStreamAttribute_new() { + return new QXmlStreamAttribute(); } -void QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute) { +QXmlStreamAttribute* QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value) { QString qualifiedName_QString = QString::fromUtf8(qualifiedName.data, qualifiedName.len); QString value_QString = QString::fromUtf8(value.data, value.len); - QXmlStreamAttribute* ret = new QXmlStreamAttribute(qualifiedName_QString, value_QString); - *outptr_QXmlStreamAttribute = ret; + return new QXmlStreamAttribute(qualifiedName_QString, value_QString); } -void QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute) { +QXmlStreamAttribute* QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value) { QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString value_QString = QString::fromUtf8(value.data, value.len); - QXmlStreamAttribute* ret = new QXmlStreamAttribute(namespaceUri_QString, name_QString, value_QString); - *outptr_QXmlStreamAttribute = ret; + return new QXmlStreamAttribute(namespaceUri_QString, name_QString, value_QString); } -void QXmlStreamAttribute_new4(QXmlStreamAttribute* param1, QXmlStreamAttribute** outptr_QXmlStreamAttribute) { - QXmlStreamAttribute* ret = new QXmlStreamAttribute(*param1); - *outptr_QXmlStreamAttribute = ret; +QXmlStreamAttribute* QXmlStreamAttribute_new4(QXmlStreamAttribute* param1) { + return new QXmlStreamAttribute(*param1); } void QXmlStreamAttribute_OperatorAssign(QXmlStreamAttribute* self, QXmlStreamAttribute* param1) { @@ -121,21 +114,18 @@ void QXmlStreamAttribute_Delete(QXmlStreamAttribute* self, bool isSubclass) { } } -void QXmlStreamNamespaceDeclaration_new(QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration) { - QXmlStreamNamespaceDeclaration* ret = new QXmlStreamNamespaceDeclaration(); - *outptr_QXmlStreamNamespaceDeclaration = ret; +QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new() { + return new QXmlStreamNamespaceDeclaration(); } -void QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri, QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration) { +QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri) { QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len); - QXmlStreamNamespaceDeclaration* ret = new QXmlStreamNamespaceDeclaration(prefix_QString, namespaceUri_QString); - *outptr_QXmlStreamNamespaceDeclaration = ret; + return new QXmlStreamNamespaceDeclaration(prefix_QString, namespaceUri_QString); } -void QXmlStreamNamespaceDeclaration_new3(QXmlStreamNamespaceDeclaration* param1, QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration) { - QXmlStreamNamespaceDeclaration* ret = new QXmlStreamNamespaceDeclaration(*param1); - *outptr_QXmlStreamNamespaceDeclaration = ret; +QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new3(QXmlStreamNamespaceDeclaration* param1) { + return new QXmlStreamNamespaceDeclaration(*param1); } void QXmlStreamNamespaceDeclaration_OperatorAssign(QXmlStreamNamespaceDeclaration* self, QXmlStreamNamespaceDeclaration* param1) { @@ -158,14 +148,12 @@ void QXmlStreamNamespaceDeclaration_Delete(QXmlStreamNamespaceDeclaration* self, } } -void QXmlStreamNotationDeclaration_new(QXmlStreamNotationDeclaration** outptr_QXmlStreamNotationDeclaration) { - QXmlStreamNotationDeclaration* ret = new QXmlStreamNotationDeclaration(); - *outptr_QXmlStreamNotationDeclaration = ret; +QXmlStreamNotationDeclaration* QXmlStreamNotationDeclaration_new() { + return new QXmlStreamNotationDeclaration(); } -void QXmlStreamNotationDeclaration_new2(QXmlStreamNotationDeclaration* param1, QXmlStreamNotationDeclaration** outptr_QXmlStreamNotationDeclaration) { - QXmlStreamNotationDeclaration* ret = new QXmlStreamNotationDeclaration(*param1); - *outptr_QXmlStreamNotationDeclaration = ret; +QXmlStreamNotationDeclaration* QXmlStreamNotationDeclaration_new2(QXmlStreamNotationDeclaration* param1) { + return new QXmlStreamNotationDeclaration(*param1); } void QXmlStreamNotationDeclaration_OperatorAssign(QXmlStreamNotationDeclaration* self, QXmlStreamNotationDeclaration* param1) { @@ -188,14 +176,12 @@ void QXmlStreamNotationDeclaration_Delete(QXmlStreamNotationDeclaration* self, b } } -void QXmlStreamEntityDeclaration_new(QXmlStreamEntityDeclaration** outptr_QXmlStreamEntityDeclaration) { - QXmlStreamEntityDeclaration* ret = new QXmlStreamEntityDeclaration(); - *outptr_QXmlStreamEntityDeclaration = ret; +QXmlStreamEntityDeclaration* QXmlStreamEntityDeclaration_new() { + return new QXmlStreamEntityDeclaration(); } -void QXmlStreamEntityDeclaration_new2(QXmlStreamEntityDeclaration* param1, QXmlStreamEntityDeclaration** outptr_QXmlStreamEntityDeclaration) { - QXmlStreamEntityDeclaration* ret = new QXmlStreamEntityDeclaration(*param1); - *outptr_QXmlStreamEntityDeclaration = ret; +QXmlStreamEntityDeclaration* QXmlStreamEntityDeclaration_new2(QXmlStreamEntityDeclaration* param1) { + return new QXmlStreamEntityDeclaration(*param1); } void QXmlStreamEntityDeclaration_OperatorAssign(QXmlStreamEntityDeclaration* self, QXmlStreamEntityDeclaration* param1) { @@ -251,31 +237,26 @@ void QXmlStreamEntityResolver_Delete(QXmlStreamEntityResolver* self, bool isSubc } } -void QXmlStreamReader_new(QXmlStreamReader** outptr_QXmlStreamReader) { - QXmlStreamReader* ret = new QXmlStreamReader(); - *outptr_QXmlStreamReader = ret; +QXmlStreamReader* QXmlStreamReader_new() { + return new QXmlStreamReader(); } -void QXmlStreamReader_new2(QIODevice* device, QXmlStreamReader** outptr_QXmlStreamReader) { - QXmlStreamReader* ret = new QXmlStreamReader(device); - *outptr_QXmlStreamReader = ret; +QXmlStreamReader* QXmlStreamReader_new2(QIODevice* device) { + return new QXmlStreamReader(device); } -void QXmlStreamReader_new3(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader) { +QXmlStreamReader* QXmlStreamReader_new3(struct miqt_string data) { QByteArray data_QByteArray(data.data, data.len); - QXmlStreamReader* ret = new QXmlStreamReader(data_QByteArray); - *outptr_QXmlStreamReader = ret; + return new QXmlStreamReader(data_QByteArray); } -void QXmlStreamReader_new4(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader) { +QXmlStreamReader* QXmlStreamReader_new4(struct miqt_string data) { QString data_QString = QString::fromUtf8(data.data, data.len); - QXmlStreamReader* ret = new QXmlStreamReader(data_QString); - *outptr_QXmlStreamReader = ret; + return new QXmlStreamReader(data_QString); } -void QXmlStreamReader_new5(const char* data, QXmlStreamReader** outptr_QXmlStreamReader) { - QXmlStreamReader* ret = new QXmlStreamReader(data); - *outptr_QXmlStreamReader = ret; +QXmlStreamReader* QXmlStreamReader_new5(const char* data) { + return new QXmlStreamReader(data); } void QXmlStreamReader_SetDevice(QXmlStreamReader* self, QIODevice* device) { @@ -536,14 +517,12 @@ void QXmlStreamReader_Delete(QXmlStreamReader* self, bool isSubclass) { } } -void QXmlStreamWriter_new(QXmlStreamWriter** outptr_QXmlStreamWriter) { - QXmlStreamWriter* ret = new QXmlStreamWriter(); - *outptr_QXmlStreamWriter = ret; +QXmlStreamWriter* QXmlStreamWriter_new() { + return new QXmlStreamWriter(); } -void QXmlStreamWriter_new2(QIODevice* device, QXmlStreamWriter** outptr_QXmlStreamWriter) { - QXmlStreamWriter* ret = new QXmlStreamWriter(device); - *outptr_QXmlStreamWriter = ret; +QXmlStreamWriter* QXmlStreamWriter_new2(QIODevice* device) { + return new QXmlStreamWriter(device); } void QXmlStreamWriter_SetDevice(QXmlStreamWriter* self, QIODevice* device) { diff --git a/qt/gen_qxmlstream.go b/qt/gen_qxmlstream.go index 498ea3ec..7e256a1c 100644 --- a/qt/gen_qxmlstream.go +++ b/qt/gen_qxmlstream.go @@ -71,24 +71,19 @@ func newQXmlStreamStringRef(h *C.QXmlStreamStringRef) *QXmlStreamStringRef { if h == nil { return nil } + return &QXmlStreamStringRef{h: h} } // UnsafeNewQXmlStreamStringRef constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamStringRef(h unsafe.Pointer) *QXmlStreamStringRef { - if h == nil { - return nil - } - - return &QXmlStreamStringRef{h: (*C.QXmlStreamStringRef)(h)} + return newQXmlStreamStringRef((*C.QXmlStreamStringRef)(h)) } // NewQXmlStreamStringRef constructs a new QXmlStreamStringRef object. func NewQXmlStreamStringRef() *QXmlStreamStringRef { - var outptr_QXmlStreamStringRef *C.QXmlStreamStringRef = nil - C.QXmlStreamStringRef_new(&outptr_QXmlStreamStringRef) - ret := newQXmlStreamStringRef(outptr_QXmlStreamStringRef) + ret := newQXmlStreamStringRef(C.QXmlStreamStringRef_new()) ret.isSubclass = true return ret } @@ -99,20 +94,16 @@ func NewQXmlStreamStringRef2(aString string) *QXmlStreamStringRef { aString_ms.data = C.CString(aString) aString_ms.len = C.size_t(len(aString)) defer C.free(unsafe.Pointer(aString_ms.data)) - var outptr_QXmlStreamStringRef *C.QXmlStreamStringRef = nil - C.QXmlStreamStringRef_new2(aString_ms, &outptr_QXmlStreamStringRef) - ret := newQXmlStreamStringRef(outptr_QXmlStreamStringRef) + ret := newQXmlStreamStringRef(C.QXmlStreamStringRef_new2(aString_ms)) ret.isSubclass = true return ret } // NewQXmlStreamStringRef3 constructs a new QXmlStreamStringRef object. func NewQXmlStreamStringRef3(other *QXmlStreamStringRef) *QXmlStreamStringRef { - var outptr_QXmlStreamStringRef *C.QXmlStreamStringRef = nil - C.QXmlStreamStringRef_new3(other.cPointer(), &outptr_QXmlStreamStringRef) - ret := newQXmlStreamStringRef(outptr_QXmlStreamStringRef) + ret := newQXmlStreamStringRef(C.QXmlStreamStringRef_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -182,24 +173,19 @@ func newQXmlStreamAttribute(h *C.QXmlStreamAttribute) *QXmlStreamAttribute { if h == nil { return nil } + return &QXmlStreamAttribute{h: h} } // UnsafeNewQXmlStreamAttribute constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamAttribute(h unsafe.Pointer) *QXmlStreamAttribute { - if h == nil { - return nil - } - - return &QXmlStreamAttribute{h: (*C.QXmlStreamAttribute)(h)} + return newQXmlStreamAttribute((*C.QXmlStreamAttribute)(h)) } // NewQXmlStreamAttribute constructs a new QXmlStreamAttribute object. func NewQXmlStreamAttribute() *QXmlStreamAttribute { - var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil - C.QXmlStreamAttribute_new(&outptr_QXmlStreamAttribute) - ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(C.QXmlStreamAttribute_new()) ret.isSubclass = true return ret } @@ -214,10 +200,8 @@ func NewQXmlStreamAttribute2(qualifiedName string, value string) *QXmlStreamAttr value_ms.data = C.CString(value) value_ms.len = C.size_t(len(value)) defer C.free(unsafe.Pointer(value_ms.data)) - var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil - C.QXmlStreamAttribute_new2(qualifiedName_ms, value_ms, &outptr_QXmlStreamAttribute) - ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(C.QXmlStreamAttribute_new2(qualifiedName_ms, value_ms)) ret.isSubclass = true return ret } @@ -236,20 +220,16 @@ func NewQXmlStreamAttribute3(namespaceUri string, name string, value string) *QX value_ms.data = C.CString(value) value_ms.len = C.size_t(len(value)) defer C.free(unsafe.Pointer(value_ms.data)) - var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil - C.QXmlStreamAttribute_new3(namespaceUri_ms, name_ms, value_ms, &outptr_QXmlStreamAttribute) - ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(C.QXmlStreamAttribute_new3(namespaceUri_ms, name_ms, value_ms)) ret.isSubclass = true return ret } // NewQXmlStreamAttribute4 constructs a new QXmlStreamAttribute object. func NewQXmlStreamAttribute4(param1 *QXmlStreamAttribute) *QXmlStreamAttribute { - var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil - C.QXmlStreamAttribute_new4(param1.cPointer(), &outptr_QXmlStreamAttribute) - ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(C.QXmlStreamAttribute_new4(param1.cPointer())) ret.isSubclass = true return ret } @@ -308,24 +288,19 @@ func newQXmlStreamNamespaceDeclaration(h *C.QXmlStreamNamespaceDeclaration) *QXm if h == nil { return nil } + return &QXmlStreamNamespaceDeclaration{h: h} } // UnsafeNewQXmlStreamNamespaceDeclaration constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamNamespaceDeclaration(h unsafe.Pointer) *QXmlStreamNamespaceDeclaration { - if h == nil { - return nil - } - - return &QXmlStreamNamespaceDeclaration{h: (*C.QXmlStreamNamespaceDeclaration)(h)} + return newQXmlStreamNamespaceDeclaration((*C.QXmlStreamNamespaceDeclaration)(h)) } // NewQXmlStreamNamespaceDeclaration constructs a new QXmlStreamNamespaceDeclaration object. func NewQXmlStreamNamespaceDeclaration() *QXmlStreamNamespaceDeclaration { - var outptr_QXmlStreamNamespaceDeclaration *C.QXmlStreamNamespaceDeclaration = nil - C.QXmlStreamNamespaceDeclaration_new(&outptr_QXmlStreamNamespaceDeclaration) - ret := newQXmlStreamNamespaceDeclaration(outptr_QXmlStreamNamespaceDeclaration) + ret := newQXmlStreamNamespaceDeclaration(C.QXmlStreamNamespaceDeclaration_new()) ret.isSubclass = true return ret } @@ -340,20 +315,16 @@ func NewQXmlStreamNamespaceDeclaration2(prefix string, namespaceUri string) *QXm namespaceUri_ms.data = C.CString(namespaceUri) namespaceUri_ms.len = C.size_t(len(namespaceUri)) defer C.free(unsafe.Pointer(namespaceUri_ms.data)) - var outptr_QXmlStreamNamespaceDeclaration *C.QXmlStreamNamespaceDeclaration = nil - C.QXmlStreamNamespaceDeclaration_new2(prefix_ms, namespaceUri_ms, &outptr_QXmlStreamNamespaceDeclaration) - ret := newQXmlStreamNamespaceDeclaration(outptr_QXmlStreamNamespaceDeclaration) + ret := newQXmlStreamNamespaceDeclaration(C.QXmlStreamNamespaceDeclaration_new2(prefix_ms, namespaceUri_ms)) ret.isSubclass = true return ret } // NewQXmlStreamNamespaceDeclaration3 constructs a new QXmlStreamNamespaceDeclaration object. func NewQXmlStreamNamespaceDeclaration3(param1 *QXmlStreamNamespaceDeclaration) *QXmlStreamNamespaceDeclaration { - var outptr_QXmlStreamNamespaceDeclaration *C.QXmlStreamNamespaceDeclaration = nil - C.QXmlStreamNamespaceDeclaration_new3(param1.cPointer(), &outptr_QXmlStreamNamespaceDeclaration) - ret := newQXmlStreamNamespaceDeclaration(outptr_QXmlStreamNamespaceDeclaration) + ret := newQXmlStreamNamespaceDeclaration(C.QXmlStreamNamespaceDeclaration_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -408,34 +379,27 @@ func newQXmlStreamNotationDeclaration(h *C.QXmlStreamNotationDeclaration) *QXmlS if h == nil { return nil } + return &QXmlStreamNotationDeclaration{h: h} } // UnsafeNewQXmlStreamNotationDeclaration constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamNotationDeclaration(h unsafe.Pointer) *QXmlStreamNotationDeclaration { - if h == nil { - return nil - } - - return &QXmlStreamNotationDeclaration{h: (*C.QXmlStreamNotationDeclaration)(h)} + return newQXmlStreamNotationDeclaration((*C.QXmlStreamNotationDeclaration)(h)) } // NewQXmlStreamNotationDeclaration constructs a new QXmlStreamNotationDeclaration object. func NewQXmlStreamNotationDeclaration() *QXmlStreamNotationDeclaration { - var outptr_QXmlStreamNotationDeclaration *C.QXmlStreamNotationDeclaration = nil - C.QXmlStreamNotationDeclaration_new(&outptr_QXmlStreamNotationDeclaration) - ret := newQXmlStreamNotationDeclaration(outptr_QXmlStreamNotationDeclaration) + ret := newQXmlStreamNotationDeclaration(C.QXmlStreamNotationDeclaration_new()) ret.isSubclass = true return ret } // NewQXmlStreamNotationDeclaration2 constructs a new QXmlStreamNotationDeclaration object. func NewQXmlStreamNotationDeclaration2(param1 *QXmlStreamNotationDeclaration) *QXmlStreamNotationDeclaration { - var outptr_QXmlStreamNotationDeclaration *C.QXmlStreamNotationDeclaration = nil - C.QXmlStreamNotationDeclaration_new2(param1.cPointer(), &outptr_QXmlStreamNotationDeclaration) - ret := newQXmlStreamNotationDeclaration(outptr_QXmlStreamNotationDeclaration) + ret := newQXmlStreamNotationDeclaration(C.QXmlStreamNotationDeclaration_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -490,34 +454,27 @@ func newQXmlStreamEntityDeclaration(h *C.QXmlStreamEntityDeclaration) *QXmlStrea if h == nil { return nil } + return &QXmlStreamEntityDeclaration{h: h} } // UnsafeNewQXmlStreamEntityDeclaration constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamEntityDeclaration(h unsafe.Pointer) *QXmlStreamEntityDeclaration { - if h == nil { - return nil - } - - return &QXmlStreamEntityDeclaration{h: (*C.QXmlStreamEntityDeclaration)(h)} + return newQXmlStreamEntityDeclaration((*C.QXmlStreamEntityDeclaration)(h)) } // NewQXmlStreamEntityDeclaration constructs a new QXmlStreamEntityDeclaration object. func NewQXmlStreamEntityDeclaration() *QXmlStreamEntityDeclaration { - var outptr_QXmlStreamEntityDeclaration *C.QXmlStreamEntityDeclaration = nil - C.QXmlStreamEntityDeclaration_new(&outptr_QXmlStreamEntityDeclaration) - ret := newQXmlStreamEntityDeclaration(outptr_QXmlStreamEntityDeclaration) + ret := newQXmlStreamEntityDeclaration(C.QXmlStreamEntityDeclaration_new()) ret.isSubclass = true return ret } // NewQXmlStreamEntityDeclaration2 constructs a new QXmlStreamEntityDeclaration object. func NewQXmlStreamEntityDeclaration2(param1 *QXmlStreamEntityDeclaration) *QXmlStreamEntityDeclaration { - var outptr_QXmlStreamEntityDeclaration *C.QXmlStreamEntityDeclaration = nil - C.QXmlStreamEntityDeclaration_new2(param1.cPointer(), &outptr_QXmlStreamEntityDeclaration) - ret := newQXmlStreamEntityDeclaration(outptr_QXmlStreamEntityDeclaration) + ret := newQXmlStreamEntityDeclaration(C.QXmlStreamEntityDeclaration_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -572,16 +529,13 @@ func newQXmlStreamEntityResolver(h *C.QXmlStreamEntityResolver) *QXmlStreamEntit if h == nil { return nil } + return &QXmlStreamEntityResolver{h: h} } // UnsafeNewQXmlStreamEntityResolver constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamEntityResolver(h unsafe.Pointer) *QXmlStreamEntityResolver { - if h == nil { - return nil - } - - return &QXmlStreamEntityResolver{h: (*C.QXmlStreamEntityResolver)(h)} + return newQXmlStreamEntityResolver((*C.QXmlStreamEntityResolver)(h)) } func (this *QXmlStreamEntityResolver) ResolveEntity(publicId string, systemId string) string { @@ -648,34 +602,27 @@ func newQXmlStreamReader(h *C.QXmlStreamReader) *QXmlStreamReader { if h == nil { return nil } + return &QXmlStreamReader{h: h} } // UnsafeNewQXmlStreamReader constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamReader(h unsafe.Pointer) *QXmlStreamReader { - if h == nil { - return nil - } - - return &QXmlStreamReader{h: (*C.QXmlStreamReader)(h)} + return newQXmlStreamReader((*C.QXmlStreamReader)(h)) } // NewQXmlStreamReader constructs a new QXmlStreamReader object. func NewQXmlStreamReader() *QXmlStreamReader { - var outptr_QXmlStreamReader *C.QXmlStreamReader = nil - C.QXmlStreamReader_new(&outptr_QXmlStreamReader) - ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret := newQXmlStreamReader(C.QXmlStreamReader_new()) ret.isSubclass = true return ret } // NewQXmlStreamReader2 constructs a new QXmlStreamReader object. func NewQXmlStreamReader2(device *QIODevice) *QXmlStreamReader { - var outptr_QXmlStreamReader *C.QXmlStreamReader = nil - C.QXmlStreamReader_new2(device.cPointer(), &outptr_QXmlStreamReader) - ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret := newQXmlStreamReader(C.QXmlStreamReader_new2(device.cPointer())) ret.isSubclass = true return ret } @@ -685,10 +632,8 @@ func NewQXmlStreamReader3(data []byte) *QXmlStreamReader { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QXmlStreamReader *C.QXmlStreamReader = nil - C.QXmlStreamReader_new3(data_alias, &outptr_QXmlStreamReader) - ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret := newQXmlStreamReader(C.QXmlStreamReader_new3(data_alias)) ret.isSubclass = true return ret } @@ -699,10 +644,8 @@ func NewQXmlStreamReader4(data string) *QXmlStreamReader { data_ms.data = C.CString(data) data_ms.len = C.size_t(len(data)) defer C.free(unsafe.Pointer(data_ms.data)) - var outptr_QXmlStreamReader *C.QXmlStreamReader = nil - C.QXmlStreamReader_new4(data_ms, &outptr_QXmlStreamReader) - ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret := newQXmlStreamReader(C.QXmlStreamReader_new4(data_ms)) ret.isSubclass = true return ret } @@ -711,10 +654,8 @@ func NewQXmlStreamReader4(data string) *QXmlStreamReader { func NewQXmlStreamReader5(data string) *QXmlStreamReader { data_Cstring := C.CString(data) defer C.free(unsafe.Pointer(data_Cstring)) - var outptr_QXmlStreamReader *C.QXmlStreamReader = nil - C.QXmlStreamReader_new5(data_Cstring, &outptr_QXmlStreamReader) - ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret := newQXmlStreamReader(C.QXmlStreamReader_new5(data_Cstring)) ret.isSubclass = true return ret } @@ -724,7 +665,7 @@ func (this *QXmlStreamReader) SetDevice(device *QIODevice) { } func (this *QXmlStreamReader) Device() *QIODevice { - return newQIODevice(C.QXmlStreamReader_Device(this.h), nil) + return newQIODevice(C.QXmlStreamReader_Device(this.h)) } func (this *QXmlStreamReader) AddData(data []byte) { @@ -992,34 +933,27 @@ func newQXmlStreamWriter(h *C.QXmlStreamWriter) *QXmlStreamWriter { if h == nil { return nil } + return &QXmlStreamWriter{h: h} } // UnsafeNewQXmlStreamWriter constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamWriter(h unsafe.Pointer) *QXmlStreamWriter { - if h == nil { - return nil - } - - return &QXmlStreamWriter{h: (*C.QXmlStreamWriter)(h)} + return newQXmlStreamWriter((*C.QXmlStreamWriter)(h)) } // NewQXmlStreamWriter constructs a new QXmlStreamWriter object. func NewQXmlStreamWriter() *QXmlStreamWriter { - var outptr_QXmlStreamWriter *C.QXmlStreamWriter = nil - C.QXmlStreamWriter_new(&outptr_QXmlStreamWriter) - ret := newQXmlStreamWriter(outptr_QXmlStreamWriter) + ret := newQXmlStreamWriter(C.QXmlStreamWriter_new()) ret.isSubclass = true return ret } // NewQXmlStreamWriter2 constructs a new QXmlStreamWriter object. func NewQXmlStreamWriter2(device *QIODevice) *QXmlStreamWriter { - var outptr_QXmlStreamWriter *C.QXmlStreamWriter = nil - C.QXmlStreamWriter_new2(device.cPointer(), &outptr_QXmlStreamWriter) - ret := newQXmlStreamWriter(outptr_QXmlStreamWriter) + ret := newQXmlStreamWriter(C.QXmlStreamWriter_new2(device.cPointer())) ret.isSubclass = true return ret } @@ -1029,7 +963,7 @@ func (this *QXmlStreamWriter) SetDevice(device *QIODevice) { } func (this *QXmlStreamWriter) Device() *QIODevice { - return newQIODevice(C.QXmlStreamWriter_Device(this.h), nil) + return newQIODevice(C.QXmlStreamWriter_Device(this.h)) } func (this *QXmlStreamWriter) SetCodec(codec *QTextCodec) { diff --git a/qt/gen_qxmlstream.h b/qt/gen_qxmlstream.h index a034dd4f..0dd9d37e 100644 --- a/qt/gen_qxmlstream.h +++ b/qt/gen_qxmlstream.h @@ -38,9 +38,9 @@ typedef struct QXmlStreamStringRef QXmlStreamStringRef; typedef struct QXmlStreamWriter QXmlStreamWriter; #endif -void QXmlStreamStringRef_new(QXmlStreamStringRef** outptr_QXmlStreamStringRef); -void QXmlStreamStringRef_new2(struct miqt_string aString, QXmlStreamStringRef** outptr_QXmlStreamStringRef); -void QXmlStreamStringRef_new3(QXmlStreamStringRef* other, QXmlStreamStringRef** outptr_QXmlStreamStringRef); +QXmlStreamStringRef* QXmlStreamStringRef_new(); +QXmlStreamStringRef* QXmlStreamStringRef_new2(struct miqt_string aString); +QXmlStreamStringRef* QXmlStreamStringRef_new3(QXmlStreamStringRef* other); void QXmlStreamStringRef_OperatorAssign(QXmlStreamStringRef* self, QXmlStreamStringRef* other); void QXmlStreamStringRef_Swap(QXmlStreamStringRef* self, QXmlStreamStringRef* other); void QXmlStreamStringRef_Clear(QXmlStreamStringRef* self); @@ -49,33 +49,33 @@ int QXmlStreamStringRef_Position(const QXmlStreamStringRef* self); int QXmlStreamStringRef_Size(const QXmlStreamStringRef* self); void QXmlStreamStringRef_Delete(QXmlStreamStringRef* self, bool isSubclass); -void QXmlStreamAttribute_new(QXmlStreamAttribute** outptr_QXmlStreamAttribute); -void QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute); -void QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute); -void QXmlStreamAttribute_new4(QXmlStreamAttribute* param1, QXmlStreamAttribute** outptr_QXmlStreamAttribute); +QXmlStreamAttribute* QXmlStreamAttribute_new(); +QXmlStreamAttribute* QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value); +QXmlStreamAttribute* QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value); +QXmlStreamAttribute* QXmlStreamAttribute_new4(QXmlStreamAttribute* param1); void QXmlStreamAttribute_OperatorAssign(QXmlStreamAttribute* self, QXmlStreamAttribute* param1); bool QXmlStreamAttribute_IsDefault(const QXmlStreamAttribute* self); bool QXmlStreamAttribute_OperatorEqual(const QXmlStreamAttribute* self, QXmlStreamAttribute* other); bool QXmlStreamAttribute_OperatorNotEqual(const QXmlStreamAttribute* self, QXmlStreamAttribute* other); void QXmlStreamAttribute_Delete(QXmlStreamAttribute* self, bool isSubclass); -void QXmlStreamNamespaceDeclaration_new(QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration); -void QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri, QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration); -void QXmlStreamNamespaceDeclaration_new3(QXmlStreamNamespaceDeclaration* param1, QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration); +QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new(); +QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri); +QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new3(QXmlStreamNamespaceDeclaration* param1); void QXmlStreamNamespaceDeclaration_OperatorAssign(QXmlStreamNamespaceDeclaration* self, QXmlStreamNamespaceDeclaration* param1); bool QXmlStreamNamespaceDeclaration_OperatorEqual(const QXmlStreamNamespaceDeclaration* self, QXmlStreamNamespaceDeclaration* other); bool QXmlStreamNamespaceDeclaration_OperatorNotEqual(const QXmlStreamNamespaceDeclaration* self, QXmlStreamNamespaceDeclaration* other); void QXmlStreamNamespaceDeclaration_Delete(QXmlStreamNamespaceDeclaration* self, bool isSubclass); -void QXmlStreamNotationDeclaration_new(QXmlStreamNotationDeclaration** outptr_QXmlStreamNotationDeclaration); -void QXmlStreamNotationDeclaration_new2(QXmlStreamNotationDeclaration* param1, QXmlStreamNotationDeclaration** outptr_QXmlStreamNotationDeclaration); +QXmlStreamNotationDeclaration* QXmlStreamNotationDeclaration_new(); +QXmlStreamNotationDeclaration* QXmlStreamNotationDeclaration_new2(QXmlStreamNotationDeclaration* param1); void QXmlStreamNotationDeclaration_OperatorAssign(QXmlStreamNotationDeclaration* self, QXmlStreamNotationDeclaration* param1); bool QXmlStreamNotationDeclaration_OperatorEqual(const QXmlStreamNotationDeclaration* self, QXmlStreamNotationDeclaration* other); bool QXmlStreamNotationDeclaration_OperatorNotEqual(const QXmlStreamNotationDeclaration* self, QXmlStreamNotationDeclaration* other); void QXmlStreamNotationDeclaration_Delete(QXmlStreamNotationDeclaration* self, bool isSubclass); -void QXmlStreamEntityDeclaration_new(QXmlStreamEntityDeclaration** outptr_QXmlStreamEntityDeclaration); -void QXmlStreamEntityDeclaration_new2(QXmlStreamEntityDeclaration* param1, QXmlStreamEntityDeclaration** outptr_QXmlStreamEntityDeclaration); +QXmlStreamEntityDeclaration* QXmlStreamEntityDeclaration_new(); +QXmlStreamEntityDeclaration* QXmlStreamEntityDeclaration_new2(QXmlStreamEntityDeclaration* param1); void QXmlStreamEntityDeclaration_OperatorAssign(QXmlStreamEntityDeclaration* self, QXmlStreamEntityDeclaration* param1); bool QXmlStreamEntityDeclaration_OperatorEqual(const QXmlStreamEntityDeclaration* self, QXmlStreamEntityDeclaration* other); bool QXmlStreamEntityDeclaration_OperatorNotEqual(const QXmlStreamEntityDeclaration* self, QXmlStreamEntityDeclaration* other); @@ -85,11 +85,11 @@ struct miqt_string QXmlStreamEntityResolver_ResolveEntity(QXmlStreamEntityResolv struct miqt_string QXmlStreamEntityResolver_ResolveUndeclaredEntity(QXmlStreamEntityResolver* self, struct miqt_string name); void QXmlStreamEntityResolver_Delete(QXmlStreamEntityResolver* self, bool isSubclass); -void QXmlStreamReader_new(QXmlStreamReader** outptr_QXmlStreamReader); -void QXmlStreamReader_new2(QIODevice* device, QXmlStreamReader** outptr_QXmlStreamReader); -void QXmlStreamReader_new3(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader); -void QXmlStreamReader_new4(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader); -void QXmlStreamReader_new5(const char* data, QXmlStreamReader** outptr_QXmlStreamReader); +QXmlStreamReader* QXmlStreamReader_new(); +QXmlStreamReader* QXmlStreamReader_new2(QIODevice* device); +QXmlStreamReader* QXmlStreamReader_new3(struct miqt_string data); +QXmlStreamReader* QXmlStreamReader_new4(struct miqt_string data); +QXmlStreamReader* QXmlStreamReader_new5(const char* data); void QXmlStreamReader_SetDevice(QXmlStreamReader* self, QIODevice* device); QIODevice* QXmlStreamReader_Device(const QXmlStreamReader* self); void QXmlStreamReader_AddData(QXmlStreamReader* self, struct miqt_string data); @@ -137,8 +137,8 @@ struct miqt_string QXmlStreamReader_ReadElementText1(QXmlStreamReader* self, int void QXmlStreamReader_RaiseError1(QXmlStreamReader* self, struct miqt_string message); void QXmlStreamReader_Delete(QXmlStreamReader* self, bool isSubclass); -void QXmlStreamWriter_new(QXmlStreamWriter** outptr_QXmlStreamWriter); -void QXmlStreamWriter_new2(QIODevice* device, QXmlStreamWriter** outptr_QXmlStreamWriter); +QXmlStreamWriter* QXmlStreamWriter_new(); +QXmlStreamWriter* QXmlStreamWriter_new2(QIODevice* device); void QXmlStreamWriter_SetDevice(QXmlStreamWriter* self, QIODevice* device); QIODevice* QXmlStreamWriter_Device(const QXmlStreamWriter* self); void QXmlStreamWriter_SetCodec(QXmlStreamWriter* self, QTextCodec* codec); diff --git a/qt/multimedia/gen_qabstractvideobuffer.cpp b/qt/multimedia/gen_qabstractvideobuffer.cpp index cc2e8d7d..aca79064 100644 --- a/qt/multimedia/gen_qabstractvideobuffer.cpp +++ b/qt/multimedia/gen_qabstractvideobuffer.cpp @@ -108,9 +108,8 @@ public: }; -void QAbstractVideoBuffer_new(int typeVal, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer) { - MiqtVirtualQAbstractVideoBuffer* ret = new MiqtVirtualQAbstractVideoBuffer(static_cast(typeVal)); - *outptr_QAbstractVideoBuffer = ret; +QAbstractVideoBuffer* QAbstractVideoBuffer_new(int typeVal) { + return new MiqtVirtualQAbstractVideoBuffer(static_cast(typeVal)); } void QAbstractVideoBuffer_Release(QAbstractVideoBuffer* self) { @@ -287,10 +286,12 @@ public: }; -void QAbstractPlanarVideoBuffer_new(int typeVal, QAbstractPlanarVideoBuffer** outptr_QAbstractPlanarVideoBuffer, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer) { - MiqtVirtualQAbstractPlanarVideoBuffer* ret = new MiqtVirtualQAbstractPlanarVideoBuffer(static_cast(typeVal)); - *outptr_QAbstractPlanarVideoBuffer = ret; - *outptr_QAbstractVideoBuffer = static_cast(ret); +QAbstractPlanarVideoBuffer* QAbstractPlanarVideoBuffer_new(int typeVal) { + return new MiqtVirtualQAbstractPlanarVideoBuffer(static_cast(typeVal)); +} + +void QAbstractPlanarVideoBuffer_virtbase(QAbstractPlanarVideoBuffer* src, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer) { + *outptr_QAbstractVideoBuffer = static_cast(src); } unsigned char* QAbstractPlanarVideoBuffer_Map(QAbstractPlanarVideoBuffer* self, int mode, int* numBytes, int* bytesPerLine) { diff --git a/qt/multimedia/gen_qabstractvideobuffer.go b/qt/multimedia/gen_qabstractvideobuffer.go index 9dd5376e..ccfaaa74 100644 --- a/qt/multimedia/gen_qabstractvideobuffer.go +++ b/qt/multimedia/gen_qabstractvideobuffer.go @@ -61,24 +61,19 @@ func newQAbstractVideoBuffer(h *C.QAbstractVideoBuffer) *QAbstractVideoBuffer { if h == nil { return nil } + return &QAbstractVideoBuffer{h: h} } // UnsafeNewQAbstractVideoBuffer constructs the type using only unsafe pointers. func UnsafeNewQAbstractVideoBuffer(h unsafe.Pointer) *QAbstractVideoBuffer { - if h == nil { - return nil - } - - return &QAbstractVideoBuffer{h: (*C.QAbstractVideoBuffer)(h)} + return newQAbstractVideoBuffer((*C.QAbstractVideoBuffer)(h)) } // NewQAbstractVideoBuffer constructs a new QAbstractVideoBuffer object. func NewQAbstractVideoBuffer(typeVal QAbstractVideoBuffer__HandleType) *QAbstractVideoBuffer { - var outptr_QAbstractVideoBuffer *C.QAbstractVideoBuffer = nil - C.QAbstractVideoBuffer_new((C.int)(typeVal), &outptr_QAbstractVideoBuffer) - ret := newQAbstractVideoBuffer(outptr_QAbstractVideoBuffer) + ret := newQAbstractVideoBuffer(C.QAbstractVideoBuffer_new((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -256,31 +251,26 @@ func (this *QAbstractPlanarVideoBuffer) UnsafePointer() unsafe.Pointer { } // newQAbstractPlanarVideoBuffer constructs the type using only CGO pointers. -func newQAbstractPlanarVideoBuffer(h *C.QAbstractPlanarVideoBuffer, h_QAbstractVideoBuffer *C.QAbstractVideoBuffer) *QAbstractPlanarVideoBuffer { +func newQAbstractPlanarVideoBuffer(h *C.QAbstractPlanarVideoBuffer) *QAbstractPlanarVideoBuffer { if h == nil { return nil } + var outptr_QAbstractVideoBuffer *C.QAbstractVideoBuffer = nil + C.QAbstractPlanarVideoBuffer_virtbase(h, &outptr_QAbstractVideoBuffer) + return &QAbstractPlanarVideoBuffer{h: h, - QAbstractVideoBuffer: newQAbstractVideoBuffer(h_QAbstractVideoBuffer)} + QAbstractVideoBuffer: newQAbstractVideoBuffer(outptr_QAbstractVideoBuffer)} } // UnsafeNewQAbstractPlanarVideoBuffer constructs the type using only unsafe pointers. -func UnsafeNewQAbstractPlanarVideoBuffer(h unsafe.Pointer, h_QAbstractVideoBuffer unsafe.Pointer) *QAbstractPlanarVideoBuffer { - if h == nil { - return nil - } - - return &QAbstractPlanarVideoBuffer{h: (*C.QAbstractPlanarVideoBuffer)(h), - QAbstractVideoBuffer: UnsafeNewQAbstractVideoBuffer(h_QAbstractVideoBuffer)} +func UnsafeNewQAbstractPlanarVideoBuffer(h unsafe.Pointer) *QAbstractPlanarVideoBuffer { + return newQAbstractPlanarVideoBuffer((*C.QAbstractPlanarVideoBuffer)(h)) } // NewQAbstractPlanarVideoBuffer constructs a new QAbstractPlanarVideoBuffer object. func NewQAbstractPlanarVideoBuffer(typeVal QAbstractVideoBuffer__HandleType) *QAbstractPlanarVideoBuffer { - var outptr_QAbstractPlanarVideoBuffer *C.QAbstractPlanarVideoBuffer = nil - var outptr_QAbstractVideoBuffer *C.QAbstractVideoBuffer = nil - C.QAbstractPlanarVideoBuffer_new((C.int)(typeVal), &outptr_QAbstractPlanarVideoBuffer, &outptr_QAbstractVideoBuffer) - ret := newQAbstractPlanarVideoBuffer(outptr_QAbstractPlanarVideoBuffer, outptr_QAbstractVideoBuffer) + ret := newQAbstractPlanarVideoBuffer(C.QAbstractPlanarVideoBuffer_new((C.int)(typeVal))) ret.isSubclass = true return ret } diff --git a/qt/multimedia/gen_qabstractvideobuffer.h b/qt/multimedia/gen_qabstractvideobuffer.h index d8d9d123..20015d5e 100644 --- a/qt/multimedia/gen_qabstractvideobuffer.h +++ b/qt/multimedia/gen_qabstractvideobuffer.h @@ -24,7 +24,7 @@ typedef struct QAbstractVideoBuffer QAbstractVideoBuffer; typedef struct QVariant QVariant; #endif -void QAbstractVideoBuffer_new(int typeVal, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer); +QAbstractVideoBuffer* QAbstractVideoBuffer_new(int typeVal); void QAbstractVideoBuffer_Release(QAbstractVideoBuffer* self); int QAbstractVideoBuffer_HandleType(const QAbstractVideoBuffer* self); int QAbstractVideoBuffer_MapMode(const QAbstractVideoBuffer* self); @@ -43,7 +43,8 @@ void QAbstractVideoBuffer_override_virtual_Handle(void* self, intptr_t slot); QVariant* QAbstractVideoBuffer_virtualbase_Handle(const void* self); void QAbstractVideoBuffer_Delete(QAbstractVideoBuffer* self, bool isSubclass); -void QAbstractPlanarVideoBuffer_new(int typeVal, QAbstractPlanarVideoBuffer** outptr_QAbstractPlanarVideoBuffer, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer); +QAbstractPlanarVideoBuffer* QAbstractPlanarVideoBuffer_new(int typeVal); +void QAbstractPlanarVideoBuffer_virtbase(QAbstractPlanarVideoBuffer* src, QAbstractVideoBuffer** outptr_QAbstractVideoBuffer); unsigned char* QAbstractPlanarVideoBuffer_Map(QAbstractPlanarVideoBuffer* self, int mode, int* numBytes, int* bytesPerLine); void QAbstractPlanarVideoBuffer_override_virtual_Map(void* self, intptr_t slot); unsigned char* QAbstractPlanarVideoBuffer_virtualbase_Map(void* self, int mode, int* numBytes, int* bytesPerLine); diff --git a/qt/multimedia/gen_qabstractvideofilter.cpp b/qt/multimedia/gen_qabstractvideofilter.cpp index a3016a59..b30d5317 100644 --- a/qt/multimedia/gen_qabstractvideofilter.cpp +++ b/qt/multimedia/gen_qabstractvideofilter.cpp @@ -227,16 +227,16 @@ public: }; -void QAbstractVideoFilter_new(QAbstractVideoFilter** outptr_QAbstractVideoFilter, QObject** outptr_QObject) { - MiqtVirtualQAbstractVideoFilter* ret = new MiqtVirtualQAbstractVideoFilter(); - *outptr_QAbstractVideoFilter = ret; - *outptr_QObject = static_cast(ret); +QAbstractVideoFilter* QAbstractVideoFilter_new() { + return new MiqtVirtualQAbstractVideoFilter(); } -void QAbstractVideoFilter_new2(QObject* parent, QAbstractVideoFilter** outptr_QAbstractVideoFilter, QObject** outptr_QObject) { - MiqtVirtualQAbstractVideoFilter* ret = new MiqtVirtualQAbstractVideoFilter(parent); - *outptr_QAbstractVideoFilter = ret; - *outptr_QObject = static_cast(ret); +QAbstractVideoFilter* QAbstractVideoFilter_new2(QObject* parent) { + return new MiqtVirtualQAbstractVideoFilter(parent); +} + +void QAbstractVideoFilter_virtbase(QAbstractVideoFilter* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAbstractVideoFilter_MetaObject(const QAbstractVideoFilter* self) { diff --git a/qt/multimedia/gen_qabstractvideofilter.go b/qt/multimedia/gen_qabstractvideofilter.go index 00f54e9f..9c14f47c 100644 --- a/qt/multimedia/gen_qabstractvideofilter.go +++ b/qt/multimedia/gen_qabstractvideofilter.go @@ -45,16 +45,13 @@ func newQVideoFilterRunnable(h *C.QVideoFilterRunnable) *QVideoFilterRunnable { if h == nil { return nil } + return &QVideoFilterRunnable{h: h} } // UnsafeNewQVideoFilterRunnable constructs the type using only unsafe pointers. func UnsafeNewQVideoFilterRunnable(h unsafe.Pointer) *QVideoFilterRunnable { - if h == nil { - return nil - } - - return &QVideoFilterRunnable{h: (*C.QVideoFilterRunnable)(h)} + return newQVideoFilterRunnable((*C.QVideoFilterRunnable)(h)) } func (this *QVideoFilterRunnable) Run(input *QVideoFrame, surfaceFormat *QVideoSurfaceFormat, flags QVideoFilterRunnable__RunFlag) *QVideoFrame { @@ -102,42 +99,34 @@ func (this *QAbstractVideoFilter) UnsafePointer() unsafe.Pointer { } // newQAbstractVideoFilter constructs the type using only CGO pointers. -func newQAbstractVideoFilter(h *C.QAbstractVideoFilter, h_QObject *C.QObject) *QAbstractVideoFilter { +func newQAbstractVideoFilter(h *C.QAbstractVideoFilter) *QAbstractVideoFilter { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractVideoFilter_virtbase(h, &outptr_QObject) + return &QAbstractVideoFilter{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAbstractVideoFilter constructs the type using only unsafe pointers. -func UnsafeNewQAbstractVideoFilter(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractVideoFilter { - if h == nil { - return nil - } - - return &QAbstractVideoFilter{h: (*C.QAbstractVideoFilter)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractVideoFilter(h unsafe.Pointer) *QAbstractVideoFilter { + return newQAbstractVideoFilter((*C.QAbstractVideoFilter)(h)) } // NewQAbstractVideoFilter constructs a new QAbstractVideoFilter object. func NewQAbstractVideoFilter() *QAbstractVideoFilter { - var outptr_QAbstractVideoFilter *C.QAbstractVideoFilter = nil - var outptr_QObject *C.QObject = nil - C.QAbstractVideoFilter_new(&outptr_QAbstractVideoFilter, &outptr_QObject) - ret := newQAbstractVideoFilter(outptr_QAbstractVideoFilter, outptr_QObject) + ret := newQAbstractVideoFilter(C.QAbstractVideoFilter_new()) ret.isSubclass = true return ret } // NewQAbstractVideoFilter2 constructs a new QAbstractVideoFilter object. func NewQAbstractVideoFilter2(parent *qt.QObject) *QAbstractVideoFilter { - var outptr_QAbstractVideoFilter *C.QAbstractVideoFilter = nil - var outptr_QObject *C.QObject = nil - C.QAbstractVideoFilter_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAbstractVideoFilter, &outptr_QObject) - ret := newQAbstractVideoFilter(outptr_QAbstractVideoFilter, outptr_QObject) + ret := newQAbstractVideoFilter(C.QAbstractVideoFilter_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -340,7 +329,7 @@ func miqt_exec_callback_QAbstractVideoFilter_TimerEvent(self *C.QAbstractVideoFi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QAbstractVideoFilter{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -366,7 +355,7 @@ func miqt_exec_callback_QAbstractVideoFilter_ChildEvent(self *C.QAbstractVideoFi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QAbstractVideoFilter{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/multimedia/gen_qabstractvideofilter.h b/qt/multimedia/gen_qabstractvideofilter.h index e0a94a18..299e42ed 100644 --- a/qt/multimedia/gen_qabstractvideofilter.h +++ b/qt/multimedia/gen_qabstractvideofilter.h @@ -42,8 +42,9 @@ QVideoFrame* QVideoFilterRunnable_Run(QVideoFilterRunnable* self, QVideoFrame* i void QVideoFilterRunnable_OperatorAssign(QVideoFilterRunnable* self, QVideoFilterRunnable* param1); void QVideoFilterRunnable_Delete(QVideoFilterRunnable* self, bool isSubclass); -void QAbstractVideoFilter_new(QAbstractVideoFilter** outptr_QAbstractVideoFilter, QObject** outptr_QObject); -void QAbstractVideoFilter_new2(QObject* parent, QAbstractVideoFilter** outptr_QAbstractVideoFilter, QObject** outptr_QObject); +QAbstractVideoFilter* QAbstractVideoFilter_new(); +QAbstractVideoFilter* QAbstractVideoFilter_new2(QObject* parent); +void QAbstractVideoFilter_virtbase(QAbstractVideoFilter* src, QObject** outptr_QObject); QMetaObject* QAbstractVideoFilter_MetaObject(const QAbstractVideoFilter* self); void* QAbstractVideoFilter_Metacast(QAbstractVideoFilter* self, const char* param1); struct miqt_string QAbstractVideoFilter_Tr(const char* s); diff --git a/qt/multimedia/gen_qabstractvideosurface.cpp b/qt/multimedia/gen_qabstractvideosurface.cpp index 91aa5201..794ccf4d 100644 --- a/qt/multimedia/gen_qabstractvideosurface.cpp +++ b/qt/multimedia/gen_qabstractvideosurface.cpp @@ -336,16 +336,16 @@ public: }; -void QAbstractVideoSurface_new(QAbstractVideoSurface** outptr_QAbstractVideoSurface, QObject** outptr_QObject) { - MiqtVirtualQAbstractVideoSurface* ret = new MiqtVirtualQAbstractVideoSurface(); - *outptr_QAbstractVideoSurface = ret; - *outptr_QObject = static_cast(ret); +QAbstractVideoSurface* QAbstractVideoSurface_new() { + return new MiqtVirtualQAbstractVideoSurface(); } -void QAbstractVideoSurface_new2(QObject* parent, QAbstractVideoSurface** outptr_QAbstractVideoSurface, QObject** outptr_QObject) { - MiqtVirtualQAbstractVideoSurface* ret = new MiqtVirtualQAbstractVideoSurface(parent); - *outptr_QAbstractVideoSurface = ret; - *outptr_QObject = static_cast(ret); +QAbstractVideoSurface* QAbstractVideoSurface_new2(QObject* parent) { + return new MiqtVirtualQAbstractVideoSurface(parent); +} + +void QAbstractVideoSurface_virtbase(QAbstractVideoSurface* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAbstractVideoSurface_MetaObject(const QAbstractVideoSurface* self) { diff --git a/qt/multimedia/gen_qabstractvideosurface.go b/qt/multimedia/gen_qabstractvideosurface.go index bb5ce2bb..5330947b 100644 --- a/qt/multimedia/gen_qabstractvideosurface.go +++ b/qt/multimedia/gen_qabstractvideosurface.go @@ -46,42 +46,34 @@ func (this *QAbstractVideoSurface) UnsafePointer() unsafe.Pointer { } // newQAbstractVideoSurface constructs the type using only CGO pointers. -func newQAbstractVideoSurface(h *C.QAbstractVideoSurface, h_QObject *C.QObject) *QAbstractVideoSurface { +func newQAbstractVideoSurface(h *C.QAbstractVideoSurface) *QAbstractVideoSurface { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractVideoSurface_virtbase(h, &outptr_QObject) + return &QAbstractVideoSurface{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAbstractVideoSurface constructs the type using only unsafe pointers. -func UnsafeNewQAbstractVideoSurface(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractVideoSurface { - if h == nil { - return nil - } - - return &QAbstractVideoSurface{h: (*C.QAbstractVideoSurface)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractVideoSurface(h unsafe.Pointer) *QAbstractVideoSurface { + return newQAbstractVideoSurface((*C.QAbstractVideoSurface)(h)) } // NewQAbstractVideoSurface constructs a new QAbstractVideoSurface object. func NewQAbstractVideoSurface() *QAbstractVideoSurface { - var outptr_QAbstractVideoSurface *C.QAbstractVideoSurface = nil - var outptr_QObject *C.QObject = nil - C.QAbstractVideoSurface_new(&outptr_QAbstractVideoSurface, &outptr_QObject) - ret := newQAbstractVideoSurface(outptr_QAbstractVideoSurface, outptr_QObject) + ret := newQAbstractVideoSurface(C.QAbstractVideoSurface_new()) ret.isSubclass = true return ret } // NewQAbstractVideoSurface2 constructs a new QAbstractVideoSurface object. func NewQAbstractVideoSurface2(parent *qt.QObject) *QAbstractVideoSurface { - var outptr_QAbstractVideoSurface *C.QAbstractVideoSurface = nil - var outptr_QObject *C.QObject = nil - C.QAbstractVideoSurface_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAbstractVideoSurface, &outptr_QObject) - ret := newQAbstractVideoSurface(outptr_QAbstractVideoSurface, outptr_QObject) + ret := newQAbstractVideoSurface(C.QAbstractVideoSurface_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -524,7 +516,7 @@ func miqt_exec_callback_QAbstractVideoSurface_TimerEvent(self *C.QAbstractVideoS } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QAbstractVideoSurface{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -550,7 +542,7 @@ func miqt_exec_callback_QAbstractVideoSurface_ChildEvent(self *C.QAbstractVideoS } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QAbstractVideoSurface{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/multimedia/gen_qabstractvideosurface.h b/qt/multimedia/gen_qabstractvideosurface.h index f6693677..b8f8ee98 100644 --- a/qt/multimedia/gen_qabstractvideosurface.h +++ b/qt/multimedia/gen_qabstractvideosurface.h @@ -38,8 +38,9 @@ typedef struct QVideoFrame QVideoFrame; typedef struct QVideoSurfaceFormat QVideoSurfaceFormat; #endif -void QAbstractVideoSurface_new(QAbstractVideoSurface** outptr_QAbstractVideoSurface, QObject** outptr_QObject); -void QAbstractVideoSurface_new2(QObject* parent, QAbstractVideoSurface** outptr_QAbstractVideoSurface, QObject** outptr_QObject); +QAbstractVideoSurface* QAbstractVideoSurface_new(); +QAbstractVideoSurface* QAbstractVideoSurface_new2(QObject* parent); +void QAbstractVideoSurface_virtbase(QAbstractVideoSurface* src, QObject** outptr_QObject); QMetaObject* QAbstractVideoSurface_MetaObject(const QAbstractVideoSurface* self); void* QAbstractVideoSurface_Metacast(QAbstractVideoSurface* self, const char* param1); struct miqt_string QAbstractVideoSurface_Tr(const char* s); diff --git a/qt/multimedia/gen_qaudiobuffer.cpp b/qt/multimedia/gen_qaudiobuffer.cpp index 075a6cb5..d167d3b0 100644 --- a/qt/multimedia/gen_qaudiobuffer.cpp +++ b/qt/multimedia/gen_qaudiobuffer.cpp @@ -5,36 +5,30 @@ #include "gen_qaudiobuffer.h" #include "_cgo_export.h" -void QAudioBuffer_new(QAudioBuffer** outptr_QAudioBuffer) { - QAudioBuffer* ret = new QAudioBuffer(); - *outptr_QAudioBuffer = ret; +QAudioBuffer* QAudioBuffer_new() { + return new QAudioBuffer(); } -void QAudioBuffer_new2(QAudioBuffer* other, QAudioBuffer** outptr_QAudioBuffer) { - QAudioBuffer* ret = new QAudioBuffer(*other); - *outptr_QAudioBuffer = ret; +QAudioBuffer* QAudioBuffer_new2(QAudioBuffer* other) { + return new QAudioBuffer(*other); } -void QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer) { +QAudioBuffer* QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format) { QByteArray data_QByteArray(data.data, data.len); - QAudioBuffer* ret = new QAudioBuffer(data_QByteArray, *format); - *outptr_QAudioBuffer = ret; + return new QAudioBuffer(data_QByteArray, *format); } -void QAudioBuffer_new4(int numFrames, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer) { - QAudioBuffer* ret = new QAudioBuffer(static_cast(numFrames), *format); - *outptr_QAudioBuffer = ret; +QAudioBuffer* QAudioBuffer_new4(int numFrames, QAudioFormat* format) { + return new QAudioBuffer(static_cast(numFrames), *format); } -void QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer) { +QAudioBuffer* QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime) { QByteArray data_QByteArray(data.data, data.len); - QAudioBuffer* ret = new QAudioBuffer(data_QByteArray, *format, static_cast(startTime)); - *outptr_QAudioBuffer = ret; + return new QAudioBuffer(data_QByteArray, *format, static_cast(startTime)); } -void QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer) { - QAudioBuffer* ret = new QAudioBuffer(static_cast(numFrames), *format, static_cast(startTime)); - *outptr_QAudioBuffer = ret; +QAudioBuffer* QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime) { + return new QAudioBuffer(static_cast(numFrames), *format, static_cast(startTime)); } void QAudioBuffer_OperatorAssign(QAudioBuffer* self, QAudioBuffer* other) { diff --git a/qt/multimedia/gen_qaudiobuffer.go b/qt/multimedia/gen_qaudiobuffer.go index ea158064..3a56d6a0 100644 --- a/qt/multimedia/gen_qaudiobuffer.go +++ b/qt/multimedia/gen_qaudiobuffer.go @@ -37,34 +37,27 @@ func newQAudioBuffer(h *C.QAudioBuffer) *QAudioBuffer { if h == nil { return nil } + return &QAudioBuffer{h: h} } // UnsafeNewQAudioBuffer constructs the type using only unsafe pointers. func UnsafeNewQAudioBuffer(h unsafe.Pointer) *QAudioBuffer { - if h == nil { - return nil - } - - return &QAudioBuffer{h: (*C.QAudioBuffer)(h)} + return newQAudioBuffer((*C.QAudioBuffer)(h)) } // NewQAudioBuffer constructs a new QAudioBuffer object. func NewQAudioBuffer() *QAudioBuffer { - var outptr_QAudioBuffer *C.QAudioBuffer = nil - C.QAudioBuffer_new(&outptr_QAudioBuffer) - ret := newQAudioBuffer(outptr_QAudioBuffer) + ret := newQAudioBuffer(C.QAudioBuffer_new()) ret.isSubclass = true return ret } // NewQAudioBuffer2 constructs a new QAudioBuffer object. func NewQAudioBuffer2(other *QAudioBuffer) *QAudioBuffer { - var outptr_QAudioBuffer *C.QAudioBuffer = nil - C.QAudioBuffer_new2(other.cPointer(), &outptr_QAudioBuffer) - ret := newQAudioBuffer(outptr_QAudioBuffer) + ret := newQAudioBuffer(C.QAudioBuffer_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -74,20 +67,16 @@ func NewQAudioBuffer3(data []byte, format *QAudioFormat) *QAudioBuffer { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QAudioBuffer *C.QAudioBuffer = nil - C.QAudioBuffer_new3(data_alias, format.cPointer(), &outptr_QAudioBuffer) - ret := newQAudioBuffer(outptr_QAudioBuffer) + ret := newQAudioBuffer(C.QAudioBuffer_new3(data_alias, format.cPointer())) ret.isSubclass = true return ret } // NewQAudioBuffer4 constructs a new QAudioBuffer object. func NewQAudioBuffer4(numFrames int, format *QAudioFormat) *QAudioBuffer { - var outptr_QAudioBuffer *C.QAudioBuffer = nil - C.QAudioBuffer_new4((C.int)(numFrames), format.cPointer(), &outptr_QAudioBuffer) - ret := newQAudioBuffer(outptr_QAudioBuffer) + ret := newQAudioBuffer(C.QAudioBuffer_new4((C.int)(numFrames), format.cPointer())) ret.isSubclass = true return ret } @@ -97,20 +86,16 @@ func NewQAudioBuffer5(data []byte, format *QAudioFormat, startTime int64) *QAudi data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QAudioBuffer *C.QAudioBuffer = nil - C.QAudioBuffer_new5(data_alias, format.cPointer(), (C.longlong)(startTime), &outptr_QAudioBuffer) - ret := newQAudioBuffer(outptr_QAudioBuffer) + ret := newQAudioBuffer(C.QAudioBuffer_new5(data_alias, format.cPointer(), (C.longlong)(startTime))) ret.isSubclass = true return ret } // NewQAudioBuffer6 constructs a new QAudioBuffer object. func NewQAudioBuffer6(numFrames int, format *QAudioFormat, startTime int64) *QAudioBuffer { - var outptr_QAudioBuffer *C.QAudioBuffer = nil - C.QAudioBuffer_new6((C.int)(numFrames), format.cPointer(), (C.longlong)(startTime), &outptr_QAudioBuffer) - ret := newQAudioBuffer(outptr_QAudioBuffer) + ret := newQAudioBuffer(C.QAudioBuffer_new6((C.int)(numFrames), format.cPointer(), (C.longlong)(startTime))) ret.isSubclass = true return ret } diff --git a/qt/multimedia/gen_qaudiobuffer.h b/qt/multimedia/gen_qaudiobuffer.h index d84a4d77..38ac3ffe 100644 --- a/qt/multimedia/gen_qaudiobuffer.h +++ b/qt/multimedia/gen_qaudiobuffer.h @@ -22,12 +22,12 @@ typedef struct QAudioBuffer QAudioBuffer; typedef struct QAudioFormat QAudioFormat; #endif -void QAudioBuffer_new(QAudioBuffer** outptr_QAudioBuffer); -void QAudioBuffer_new2(QAudioBuffer* other, QAudioBuffer** outptr_QAudioBuffer); -void QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer); -void QAudioBuffer_new4(int numFrames, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer); -void QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer); -void QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer); +QAudioBuffer* QAudioBuffer_new(); +QAudioBuffer* QAudioBuffer_new2(QAudioBuffer* other); +QAudioBuffer* QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format); +QAudioBuffer* QAudioBuffer_new4(int numFrames, QAudioFormat* format); +QAudioBuffer* QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime); +QAudioBuffer* QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime); void QAudioBuffer_OperatorAssign(QAudioBuffer* self, QAudioBuffer* other); bool QAudioBuffer_IsValid(const QAudioBuffer* self); QAudioFormat* QAudioBuffer_Format(const QAudioBuffer* self); diff --git a/qt/multimedia/gen_qaudiodecoder.cpp b/qt/multimedia/gen_qaudiodecoder.cpp index cdbb8e3b..23010031 100644 --- a/qt/multimedia/gen_qaudiodecoder.cpp +++ b/qt/multimedia/gen_qaudiodecoder.cpp @@ -138,18 +138,16 @@ public: }; -void QAudioDecoder_new(QAudioDecoder** outptr_QAudioDecoder, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { - MiqtVirtualQAudioDecoder* ret = new MiqtVirtualQAudioDecoder(); - *outptr_QAudioDecoder = ret; - *outptr_QMediaObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAudioDecoder* QAudioDecoder_new() { + return new MiqtVirtualQAudioDecoder(); } -void QAudioDecoder_new2(QObject* parent, QAudioDecoder** outptr_QAudioDecoder, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { - MiqtVirtualQAudioDecoder* ret = new MiqtVirtualQAudioDecoder(parent); - *outptr_QAudioDecoder = ret; - *outptr_QMediaObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAudioDecoder* QAudioDecoder_new2(QObject* parent) { + return new MiqtVirtualQAudioDecoder(parent); +} + +void QAudioDecoder_virtbase(QAudioDecoder* src, QMediaObject** outptr_QMediaObject) { + *outptr_QMediaObject = static_cast(src); } QMetaObject* QAudioDecoder_MetaObject(const QAudioDecoder* self) { diff --git a/qt/multimedia/gen_qaudiodecoder.go b/qt/multimedia/gen_qaudiodecoder.go index 6a3412a6..f72aa8a6 100644 --- a/qt/multimedia/gen_qaudiodecoder.go +++ b/qt/multimedia/gen_qaudiodecoder.go @@ -53,44 +53,34 @@ func (this *QAudioDecoder) UnsafePointer() unsafe.Pointer { } // newQAudioDecoder constructs the type using only CGO pointers. -func newQAudioDecoder(h *C.QAudioDecoder, h_QMediaObject *C.QMediaObject, h_QObject *C.QObject) *QAudioDecoder { +func newQAudioDecoder(h *C.QAudioDecoder) *QAudioDecoder { if h == nil { return nil } + var outptr_QMediaObject *C.QMediaObject = nil + C.QAudioDecoder_virtbase(h, &outptr_QMediaObject) + return &QAudioDecoder{h: h, - QMediaObject: newQMediaObject(h_QMediaObject, h_QObject)} + QMediaObject: newQMediaObject(outptr_QMediaObject)} } // UnsafeNewQAudioDecoder constructs the type using only unsafe pointers. -func UnsafeNewQAudioDecoder(h unsafe.Pointer, h_QMediaObject unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioDecoder { - if h == nil { - return nil - } - - return &QAudioDecoder{h: (*C.QAudioDecoder)(h), - QMediaObject: UnsafeNewQMediaObject(h_QMediaObject, h_QObject)} +func UnsafeNewQAudioDecoder(h unsafe.Pointer) *QAudioDecoder { + return newQAudioDecoder((*C.QAudioDecoder)(h)) } // NewQAudioDecoder constructs a new QAudioDecoder object. func NewQAudioDecoder() *QAudioDecoder { - var outptr_QAudioDecoder *C.QAudioDecoder = nil - var outptr_QMediaObject *C.QMediaObject = nil - var outptr_QObject *C.QObject = nil - C.QAudioDecoder_new(&outptr_QAudioDecoder, &outptr_QMediaObject, &outptr_QObject) - ret := newQAudioDecoder(outptr_QAudioDecoder, outptr_QMediaObject, outptr_QObject) + ret := newQAudioDecoder(C.QAudioDecoder_new()) ret.isSubclass = true return ret } // NewQAudioDecoder2 constructs a new QAudioDecoder object. func NewQAudioDecoder2(parent *qt.QObject) *QAudioDecoder { - var outptr_QAudioDecoder *C.QAudioDecoder = nil - var outptr_QMediaObject *C.QMediaObject = nil - var outptr_QObject *C.QObject = nil - C.QAudioDecoder_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioDecoder, &outptr_QMediaObject, &outptr_QObject) - ret := newQAudioDecoder(outptr_QAudioDecoder, outptr_QMediaObject, outptr_QObject) + ret := newQAudioDecoder(C.QAudioDecoder_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -151,7 +141,7 @@ func (this *QAudioDecoder) SetSourceFilename(fileName string) { } func (this *QAudioDecoder) SourceDevice() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioDecoder_SourceDevice(this.h)), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioDecoder_SourceDevice(this.h))) } func (this *QAudioDecoder) SetSourceDevice(device *qt.QIODevice) { @@ -552,7 +542,7 @@ func miqt_exec_callback_QAudioDecoder_Availability(self *C.QAudioDecoder, cb C.i func (this *QAudioDecoder) callVirtualBase_Service() *QMediaService { - return newQMediaService(C.QAudioDecoder_virtualbase_Service(unsafe.Pointer(this.h)), nil) + return newQMediaService(C.QAudioDecoder_virtualbase_Service(unsafe.Pointer(this.h))) } func (this *QAudioDecoder) OnService(slot func(super func() *QMediaService) *QMediaService) { diff --git a/qt/multimedia/gen_qaudiodecoder.h b/qt/multimedia/gen_qaudiodecoder.h index 2b40f9e1..121f2e23 100644 --- a/qt/multimedia/gen_qaudiodecoder.h +++ b/qt/multimedia/gen_qaudiodecoder.h @@ -34,8 +34,9 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -void QAudioDecoder_new(QAudioDecoder** outptr_QAudioDecoder, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); -void QAudioDecoder_new2(QObject* parent, QAudioDecoder** outptr_QAudioDecoder, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); +QAudioDecoder* QAudioDecoder_new(); +QAudioDecoder* QAudioDecoder_new2(QObject* parent); +void QAudioDecoder_virtbase(QAudioDecoder* src, QMediaObject** outptr_QMediaObject); QMetaObject* QAudioDecoder_MetaObject(const QAudioDecoder* self); void* QAudioDecoder_Metacast(QAudioDecoder* self, const char* param1); struct miqt_string QAudioDecoder_Tr(const char* s); diff --git a/qt/multimedia/gen_qaudiodecodercontrol.cpp b/qt/multimedia/gen_qaudiodecodercontrol.cpp index 574c020f..d4e5de19 100644 --- a/qt/multimedia/gen_qaudiodecodercontrol.cpp +++ b/qt/multimedia/gen_qaudiodecodercontrol.cpp @@ -12,6 +12,10 @@ #include "gen_qaudiodecodercontrol.h" #include "_cgo_export.h" +void QAudioDecoderControl_virtbase(QAudioDecoderControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QAudioDecoderControl_MetaObject(const QAudioDecoderControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qaudiodecodercontrol.go b/qt/multimedia/gen_qaudiodecodercontrol.go index 6772bd4b..819bbfeb 100644 --- a/qt/multimedia/gen_qaudiodecodercontrol.go +++ b/qt/multimedia/gen_qaudiodecodercontrol.go @@ -36,22 +36,20 @@ func (this *QAudioDecoderControl) UnsafePointer() unsafe.Pointer { } // newQAudioDecoderControl constructs the type using only CGO pointers. -func newQAudioDecoderControl(h *C.QAudioDecoderControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QAudioDecoderControl { +func newQAudioDecoderControl(h *C.QAudioDecoderControl) *QAudioDecoderControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QAudioDecoderControl_virtbase(h, &outptr_QMediaControl) + return &QAudioDecoderControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQAudioDecoderControl constructs the type using only unsafe pointers. -func UnsafeNewQAudioDecoderControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioDecoderControl { - if h == nil { - return nil - } - - return &QAudioDecoderControl{h: (*C.QAudioDecoderControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQAudioDecoderControl(h unsafe.Pointer) *QAudioDecoderControl { + return newQAudioDecoderControl((*C.QAudioDecoderControl)(h)) } func (this *QAudioDecoderControl) MetaObject() *qt.QMetaObject { @@ -102,7 +100,7 @@ func (this *QAudioDecoderControl) SetSourceFilename(fileName string) { } func (this *QAudioDecoderControl) SourceDevice() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioDecoderControl_SourceDevice(this.h)), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioDecoderControl_SourceDevice(this.h))) } func (this *QAudioDecoderControl) SetSourceDevice(device *qt.QIODevice) { diff --git a/qt/multimedia/gen_qaudiodecodercontrol.h b/qt/multimedia/gen_qaudiodecodercontrol.h index 86088cd4..1d05a958 100644 --- a/qt/multimedia/gen_qaudiodecodercontrol.h +++ b/qt/multimedia/gen_qaudiodecodercontrol.h @@ -32,6 +32,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QAudioDecoderControl_virtbase(QAudioDecoderControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QAudioDecoderControl_MetaObject(const QAudioDecoderControl* self); void* QAudioDecoderControl_Metacast(QAudioDecoderControl* self, const char* param1); struct miqt_string QAudioDecoderControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qaudiodeviceinfo.cpp b/qt/multimedia/gen_qaudiodeviceinfo.cpp index adbe3b55..f23c8e9d 100644 --- a/qt/multimedia/gen_qaudiodeviceinfo.cpp +++ b/qt/multimedia/gen_qaudiodeviceinfo.cpp @@ -8,14 +8,12 @@ #include "gen_qaudiodeviceinfo.h" #include "_cgo_export.h" -void QAudioDeviceInfo_new(QAudioDeviceInfo** outptr_QAudioDeviceInfo) { - QAudioDeviceInfo* ret = new QAudioDeviceInfo(); - *outptr_QAudioDeviceInfo = ret; +QAudioDeviceInfo* QAudioDeviceInfo_new() { + return new QAudioDeviceInfo(); } -void QAudioDeviceInfo_new2(QAudioDeviceInfo* other, QAudioDeviceInfo** outptr_QAudioDeviceInfo) { - QAudioDeviceInfo* ret = new QAudioDeviceInfo(*other); - *outptr_QAudioDeviceInfo = ret; +QAudioDeviceInfo* QAudioDeviceInfo_new2(QAudioDeviceInfo* other) { + return new QAudioDeviceInfo(*other); } void QAudioDeviceInfo_OperatorAssign(QAudioDeviceInfo* self, QAudioDeviceInfo* other) { diff --git a/qt/multimedia/gen_qaudiodeviceinfo.go b/qt/multimedia/gen_qaudiodeviceinfo.go index ba7b3cc6..91a4baa8 100644 --- a/qt/multimedia/gen_qaudiodeviceinfo.go +++ b/qt/multimedia/gen_qaudiodeviceinfo.go @@ -37,34 +37,27 @@ func newQAudioDeviceInfo(h *C.QAudioDeviceInfo) *QAudioDeviceInfo { if h == nil { return nil } + return &QAudioDeviceInfo{h: h} } // UnsafeNewQAudioDeviceInfo constructs the type using only unsafe pointers. func UnsafeNewQAudioDeviceInfo(h unsafe.Pointer) *QAudioDeviceInfo { - if h == nil { - return nil - } - - return &QAudioDeviceInfo{h: (*C.QAudioDeviceInfo)(h)} + return newQAudioDeviceInfo((*C.QAudioDeviceInfo)(h)) } // NewQAudioDeviceInfo constructs a new QAudioDeviceInfo object. func NewQAudioDeviceInfo() *QAudioDeviceInfo { - var outptr_QAudioDeviceInfo *C.QAudioDeviceInfo = nil - C.QAudioDeviceInfo_new(&outptr_QAudioDeviceInfo) - ret := newQAudioDeviceInfo(outptr_QAudioDeviceInfo) + ret := newQAudioDeviceInfo(C.QAudioDeviceInfo_new()) ret.isSubclass = true return ret } // NewQAudioDeviceInfo2 constructs a new QAudioDeviceInfo object. func NewQAudioDeviceInfo2(other *QAudioDeviceInfo) *QAudioDeviceInfo { - var outptr_QAudioDeviceInfo *C.QAudioDeviceInfo = nil - C.QAudioDeviceInfo_new2(other.cPointer(), &outptr_QAudioDeviceInfo) - ret := newQAudioDeviceInfo(outptr_QAudioDeviceInfo) + ret := newQAudioDeviceInfo(C.QAudioDeviceInfo_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/multimedia/gen_qaudiodeviceinfo.h b/qt/multimedia/gen_qaudiodeviceinfo.h index 6ff1bcb8..e30d7681 100644 --- a/qt/multimedia/gen_qaudiodeviceinfo.h +++ b/qt/multimedia/gen_qaudiodeviceinfo.h @@ -22,8 +22,8 @@ typedef struct QAudioDeviceInfo QAudioDeviceInfo; typedef struct QAudioFormat QAudioFormat; #endif -void QAudioDeviceInfo_new(QAudioDeviceInfo** outptr_QAudioDeviceInfo); -void QAudioDeviceInfo_new2(QAudioDeviceInfo* other, QAudioDeviceInfo** outptr_QAudioDeviceInfo); +QAudioDeviceInfo* QAudioDeviceInfo_new(); +QAudioDeviceInfo* QAudioDeviceInfo_new2(QAudioDeviceInfo* other); void QAudioDeviceInfo_OperatorAssign(QAudioDeviceInfo* self, QAudioDeviceInfo* other); bool QAudioDeviceInfo_OperatorEqual(const QAudioDeviceInfo* self, QAudioDeviceInfo* other); bool QAudioDeviceInfo_OperatorNotEqual(const QAudioDeviceInfo* self, QAudioDeviceInfo* other); diff --git a/qt/multimedia/gen_qaudioencodersettingscontrol.cpp b/qt/multimedia/gen_qaudioencodersettingscontrol.cpp index fb234e1f..bf7d0291 100644 --- a/qt/multimedia/gen_qaudioencodersettingscontrol.cpp +++ b/qt/multimedia/gen_qaudioencodersettingscontrol.cpp @@ -11,6 +11,10 @@ #include "gen_qaudioencodersettingscontrol.h" #include "_cgo_export.h" +void QAudioEncoderSettingsControl_virtbase(QAudioEncoderSettingsControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QAudioEncoderSettingsControl_MetaObject(const QAudioEncoderSettingsControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qaudioencodersettingscontrol.go b/qt/multimedia/gen_qaudioencodersettingscontrol.go index 8d523561..598d9350 100644 --- a/qt/multimedia/gen_qaudioencodersettingscontrol.go +++ b/qt/multimedia/gen_qaudioencodersettingscontrol.go @@ -35,22 +35,20 @@ func (this *QAudioEncoderSettingsControl) UnsafePointer() unsafe.Pointer { } // newQAudioEncoderSettingsControl constructs the type using only CGO pointers. -func newQAudioEncoderSettingsControl(h *C.QAudioEncoderSettingsControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QAudioEncoderSettingsControl { +func newQAudioEncoderSettingsControl(h *C.QAudioEncoderSettingsControl) *QAudioEncoderSettingsControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QAudioEncoderSettingsControl_virtbase(h, &outptr_QMediaControl) + return &QAudioEncoderSettingsControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQAudioEncoderSettingsControl constructs the type using only unsafe pointers. -func UnsafeNewQAudioEncoderSettingsControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioEncoderSettingsControl { - if h == nil { - return nil - } - - return &QAudioEncoderSettingsControl{h: (*C.QAudioEncoderSettingsControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQAudioEncoderSettingsControl(h unsafe.Pointer) *QAudioEncoderSettingsControl { + return newQAudioEncoderSettingsControl((*C.QAudioEncoderSettingsControl)(h)) } func (this *QAudioEncoderSettingsControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qaudioencodersettingscontrol.h b/qt/multimedia/gen_qaudioencodersettingscontrol.h index fe514b49..516e953e 100644 --- a/qt/multimedia/gen_qaudioencodersettingscontrol.h +++ b/qt/multimedia/gen_qaudioencodersettingscontrol.h @@ -28,6 +28,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QAudioEncoderSettingsControl_virtbase(QAudioEncoderSettingsControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QAudioEncoderSettingsControl_MetaObject(const QAudioEncoderSettingsControl* self); void* QAudioEncoderSettingsControl_Metacast(QAudioEncoderSettingsControl* self, const char* param1); struct miqt_string QAudioEncoderSettingsControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qaudioformat.cpp b/qt/multimedia/gen_qaudioformat.cpp index ab83a030..4df7cd81 100644 --- a/qt/multimedia/gen_qaudioformat.cpp +++ b/qt/multimedia/gen_qaudioformat.cpp @@ -6,14 +6,12 @@ #include "gen_qaudioformat.h" #include "_cgo_export.h" -void QAudioFormat_new(QAudioFormat** outptr_QAudioFormat) { - QAudioFormat* ret = new QAudioFormat(); - *outptr_QAudioFormat = ret; +QAudioFormat* QAudioFormat_new() { + return new QAudioFormat(); } -void QAudioFormat_new2(QAudioFormat* other, QAudioFormat** outptr_QAudioFormat) { - QAudioFormat* ret = new QAudioFormat(*other); - *outptr_QAudioFormat = ret; +QAudioFormat* QAudioFormat_new2(QAudioFormat* other) { + return new QAudioFormat(*other); } void QAudioFormat_OperatorAssign(QAudioFormat* self, QAudioFormat* other) { diff --git a/qt/multimedia/gen_qaudioformat.go b/qt/multimedia/gen_qaudioformat.go index e8cb73bd..e070d19c 100644 --- a/qt/multimedia/gen_qaudioformat.go +++ b/qt/multimedia/gen_qaudioformat.go @@ -53,34 +53,27 @@ func newQAudioFormat(h *C.QAudioFormat) *QAudioFormat { if h == nil { return nil } + return &QAudioFormat{h: h} } // UnsafeNewQAudioFormat constructs the type using only unsafe pointers. func UnsafeNewQAudioFormat(h unsafe.Pointer) *QAudioFormat { - if h == nil { - return nil - } - - return &QAudioFormat{h: (*C.QAudioFormat)(h)} + return newQAudioFormat((*C.QAudioFormat)(h)) } // NewQAudioFormat constructs a new QAudioFormat object. func NewQAudioFormat() *QAudioFormat { - var outptr_QAudioFormat *C.QAudioFormat = nil - C.QAudioFormat_new(&outptr_QAudioFormat) - ret := newQAudioFormat(outptr_QAudioFormat) + ret := newQAudioFormat(C.QAudioFormat_new()) ret.isSubclass = true return ret } // NewQAudioFormat2 constructs a new QAudioFormat object. func NewQAudioFormat2(other *QAudioFormat) *QAudioFormat { - var outptr_QAudioFormat *C.QAudioFormat = nil - C.QAudioFormat_new2(other.cPointer(), &outptr_QAudioFormat) - ret := newQAudioFormat(outptr_QAudioFormat) + ret := newQAudioFormat(C.QAudioFormat_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/multimedia/gen_qaudioformat.h b/qt/multimedia/gen_qaudioformat.h index d6457e0e..0939dced 100644 --- a/qt/multimedia/gen_qaudioformat.h +++ b/qt/multimedia/gen_qaudioformat.h @@ -20,8 +20,8 @@ class QAudioFormat; typedef struct QAudioFormat QAudioFormat; #endif -void QAudioFormat_new(QAudioFormat** outptr_QAudioFormat); -void QAudioFormat_new2(QAudioFormat* other, QAudioFormat** outptr_QAudioFormat); +QAudioFormat* QAudioFormat_new(); +QAudioFormat* QAudioFormat_new2(QAudioFormat* other); void QAudioFormat_OperatorAssign(QAudioFormat* self, QAudioFormat* other); bool QAudioFormat_OperatorEqual(const QAudioFormat* self, QAudioFormat* other); bool QAudioFormat_OperatorNotEqual(const QAudioFormat* self, QAudioFormat* other); diff --git a/qt/multimedia/gen_qaudioinput.cpp b/qt/multimedia/gen_qaudioinput.cpp index c2717940..7c51c3d3 100644 --- a/qt/multimedia/gen_qaudioinput.cpp +++ b/qt/multimedia/gen_qaudioinput.cpp @@ -200,40 +200,32 @@ public: }; -void QAudioInput_new(QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { - MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(); - *outptr_QAudioInput = ret; - *outptr_QObject = static_cast(ret); +QAudioInput* QAudioInput_new() { + return new MiqtVirtualQAudioInput(); } -void QAudioInput_new2(QAudioDeviceInfo* audioDeviceInfo, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { - MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(*audioDeviceInfo); - *outptr_QAudioInput = ret; - *outptr_QObject = static_cast(ret); +QAudioInput* QAudioInput_new2(QAudioDeviceInfo* audioDeviceInfo) { + return new MiqtVirtualQAudioInput(*audioDeviceInfo); } -void QAudioInput_new3(QAudioFormat* format, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { - MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(*format); - *outptr_QAudioInput = ret; - *outptr_QObject = static_cast(ret); +QAudioInput* QAudioInput_new3(QAudioFormat* format) { + return new MiqtVirtualQAudioInput(*format); } -void QAudioInput_new4(QAudioFormat* format, QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { - MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(*format, parent); - *outptr_QAudioInput = ret; - *outptr_QObject = static_cast(ret); +QAudioInput* QAudioInput_new4(QAudioFormat* format, QObject* parent) { + return new MiqtVirtualQAudioInput(*format, parent); } -void QAudioInput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { - MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(*audioDeviceInfo, *format); - *outptr_QAudioInput = ret; - *outptr_QObject = static_cast(ret); +QAudioInput* QAudioInput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format) { + return new MiqtVirtualQAudioInput(*audioDeviceInfo, *format); } -void QAudioInput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { - MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(*audioDeviceInfo, *format, parent); - *outptr_QAudioInput = ret; - *outptr_QObject = static_cast(ret); +QAudioInput* QAudioInput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent) { + return new MiqtVirtualQAudioInput(*audioDeviceInfo, *format, parent); +} + +void QAudioInput_virtbase(QAudioInput* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAudioInput_MetaObject(const QAudioInput* self) { diff --git a/qt/multimedia/gen_qaudioinput.go b/qt/multimedia/gen_qaudioinput.go index f1894f62..29bc6844 100644 --- a/qt/multimedia/gen_qaudioinput.go +++ b/qt/multimedia/gen_qaudioinput.go @@ -36,86 +36,66 @@ func (this *QAudioInput) UnsafePointer() unsafe.Pointer { } // newQAudioInput constructs the type using only CGO pointers. -func newQAudioInput(h *C.QAudioInput, h_QObject *C.QObject) *QAudioInput { +func newQAudioInput(h *C.QAudioInput) *QAudioInput { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAudioInput_virtbase(h, &outptr_QObject) + return &QAudioInput{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAudioInput constructs the type using only unsafe pointers. -func UnsafeNewQAudioInput(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioInput { - if h == nil { - return nil - } - - return &QAudioInput{h: (*C.QAudioInput)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAudioInput(h unsafe.Pointer) *QAudioInput { + return newQAudioInput((*C.QAudioInput)(h)) } // NewQAudioInput constructs a new QAudioInput object. func NewQAudioInput() *QAudioInput { - var outptr_QAudioInput *C.QAudioInput = nil - var outptr_QObject *C.QObject = nil - C.QAudioInput_new(&outptr_QAudioInput, &outptr_QObject) - ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret := newQAudioInput(C.QAudioInput_new()) ret.isSubclass = true return ret } // NewQAudioInput2 constructs a new QAudioInput object. func NewQAudioInput2(audioDeviceInfo *QAudioDeviceInfo) *QAudioInput { - var outptr_QAudioInput *C.QAudioInput = nil - var outptr_QObject *C.QObject = nil - C.QAudioInput_new2(audioDeviceInfo.cPointer(), &outptr_QAudioInput, &outptr_QObject) - ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret := newQAudioInput(C.QAudioInput_new2(audioDeviceInfo.cPointer())) ret.isSubclass = true return ret } // NewQAudioInput3 constructs a new QAudioInput object. func NewQAudioInput3(format *QAudioFormat) *QAudioInput { - var outptr_QAudioInput *C.QAudioInput = nil - var outptr_QObject *C.QObject = nil - C.QAudioInput_new3(format.cPointer(), &outptr_QAudioInput, &outptr_QObject) - ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret := newQAudioInput(C.QAudioInput_new3(format.cPointer())) ret.isSubclass = true return ret } // NewQAudioInput4 constructs a new QAudioInput object. func NewQAudioInput4(format *QAudioFormat, parent *qt.QObject) *QAudioInput { - var outptr_QAudioInput *C.QAudioInput = nil - var outptr_QObject *C.QObject = nil - C.QAudioInput_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioInput, &outptr_QObject) - ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret := newQAudioInput(C.QAudioInput_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQAudioInput5 constructs a new QAudioInput object. func NewQAudioInput5(audioDeviceInfo *QAudioDeviceInfo, format *QAudioFormat) *QAudioInput { - var outptr_QAudioInput *C.QAudioInput = nil - var outptr_QObject *C.QObject = nil - C.QAudioInput_new5(audioDeviceInfo.cPointer(), format.cPointer(), &outptr_QAudioInput, &outptr_QObject) - ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret := newQAudioInput(C.QAudioInput_new5(audioDeviceInfo.cPointer(), format.cPointer())) ret.isSubclass = true return ret } // NewQAudioInput6 constructs a new QAudioInput object. func NewQAudioInput6(audioDeviceInfo *QAudioDeviceInfo, format *QAudioFormat, parent *qt.QObject) *QAudioInput { - var outptr_QAudioInput *C.QAudioInput = nil - var outptr_QObject *C.QObject = nil - C.QAudioInput_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioInput, &outptr_QObject) - ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret := newQAudioInput(C.QAudioInput_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -159,7 +139,7 @@ func (this *QAudioInput) Start(device *qt.QIODevice) { } func (this *QAudioInput) Start2() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioInput_Start2(this.h)), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioInput_Start2(this.h))) } func (this *QAudioInput) Stop() { @@ -385,7 +365,7 @@ func miqt_exec_callback_QAudioInput_TimerEvent(self *C.QAudioInput, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QAudioInput{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -411,7 +391,7 @@ func miqt_exec_callback_QAudioInput_ChildEvent(self *C.QAudioInput, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QAudioInput{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/multimedia/gen_qaudioinput.h b/qt/multimedia/gen_qaudioinput.h index e625e159..696d702c 100644 --- a/qt/multimedia/gen_qaudioinput.h +++ b/qt/multimedia/gen_qaudioinput.h @@ -38,12 +38,13 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QAudioInput_new(QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); -void QAudioInput_new2(QAudioDeviceInfo* audioDeviceInfo, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); -void QAudioInput_new3(QAudioFormat* format, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); -void QAudioInput_new4(QAudioFormat* format, QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); -void QAudioInput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); -void QAudioInput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); +QAudioInput* QAudioInput_new(); +QAudioInput* QAudioInput_new2(QAudioDeviceInfo* audioDeviceInfo); +QAudioInput* QAudioInput_new3(QAudioFormat* format); +QAudioInput* QAudioInput_new4(QAudioFormat* format, QObject* parent); +QAudioInput* QAudioInput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format); +QAudioInput* QAudioInput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent); +void QAudioInput_virtbase(QAudioInput* src, QObject** outptr_QObject); QMetaObject* QAudioInput_MetaObject(const QAudioInput* self); void* QAudioInput_Metacast(QAudioInput* self, const char* param1); struct miqt_string QAudioInput_Tr(const char* s); diff --git a/qt/multimedia/gen_qaudioinputselectorcontrol.cpp b/qt/multimedia/gen_qaudioinputselectorcontrol.cpp index 1de45243..0579e620 100644 --- a/qt/multimedia/gen_qaudioinputselectorcontrol.cpp +++ b/qt/multimedia/gen_qaudioinputselectorcontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qaudioinputselectorcontrol.h" #include "_cgo_export.h" +void QAudioInputSelectorControl_virtbase(QAudioInputSelectorControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QAudioInputSelectorControl_MetaObject(const QAudioInputSelectorControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qaudioinputselectorcontrol.go b/qt/multimedia/gen_qaudioinputselectorcontrol.go index e2a79ad1..97ea6db3 100644 --- a/qt/multimedia/gen_qaudioinputselectorcontrol.go +++ b/qt/multimedia/gen_qaudioinputselectorcontrol.go @@ -36,22 +36,20 @@ func (this *QAudioInputSelectorControl) UnsafePointer() unsafe.Pointer { } // newQAudioInputSelectorControl constructs the type using only CGO pointers. -func newQAudioInputSelectorControl(h *C.QAudioInputSelectorControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QAudioInputSelectorControl { +func newQAudioInputSelectorControl(h *C.QAudioInputSelectorControl) *QAudioInputSelectorControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QAudioInputSelectorControl_virtbase(h, &outptr_QMediaControl) + return &QAudioInputSelectorControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQAudioInputSelectorControl constructs the type using only unsafe pointers. -func UnsafeNewQAudioInputSelectorControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioInputSelectorControl { - if h == nil { - return nil - } - - return &QAudioInputSelectorControl{h: (*C.QAudioInputSelectorControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQAudioInputSelectorControl(h unsafe.Pointer) *QAudioInputSelectorControl { + return newQAudioInputSelectorControl((*C.QAudioInputSelectorControl)(h)) } func (this *QAudioInputSelectorControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qaudioinputselectorcontrol.h b/qt/multimedia/gen_qaudioinputselectorcontrol.h index 0f4d07a8..5db31c59 100644 --- a/qt/multimedia/gen_qaudioinputselectorcontrol.h +++ b/qt/multimedia/gen_qaudioinputselectorcontrol.h @@ -26,6 +26,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QAudioInputSelectorControl_virtbase(QAudioInputSelectorControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QAudioInputSelectorControl_MetaObject(const QAudioInputSelectorControl* self); void* QAudioInputSelectorControl_Metacast(QAudioInputSelectorControl* self, const char* param1); struct miqt_string QAudioInputSelectorControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qaudiooutput.cpp b/qt/multimedia/gen_qaudiooutput.cpp index 52fc7a05..e4467527 100644 --- a/qt/multimedia/gen_qaudiooutput.cpp +++ b/qt/multimedia/gen_qaudiooutput.cpp @@ -200,40 +200,32 @@ public: }; -void QAudioOutput_new(QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { - MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(); - *outptr_QAudioOutput = ret; - *outptr_QObject = static_cast(ret); +QAudioOutput* QAudioOutput_new() { + return new MiqtVirtualQAudioOutput(); } -void QAudioOutput_new2(QAudioDeviceInfo* audioDeviceInfo, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { - MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(*audioDeviceInfo); - *outptr_QAudioOutput = ret; - *outptr_QObject = static_cast(ret); +QAudioOutput* QAudioOutput_new2(QAudioDeviceInfo* audioDeviceInfo) { + return new MiqtVirtualQAudioOutput(*audioDeviceInfo); } -void QAudioOutput_new3(QAudioFormat* format, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { - MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(*format); - *outptr_QAudioOutput = ret; - *outptr_QObject = static_cast(ret); +QAudioOutput* QAudioOutput_new3(QAudioFormat* format) { + return new MiqtVirtualQAudioOutput(*format); } -void QAudioOutput_new4(QAudioFormat* format, QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { - MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(*format, parent); - *outptr_QAudioOutput = ret; - *outptr_QObject = static_cast(ret); +QAudioOutput* QAudioOutput_new4(QAudioFormat* format, QObject* parent) { + return new MiqtVirtualQAudioOutput(*format, parent); } -void QAudioOutput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { - MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(*audioDeviceInfo, *format); - *outptr_QAudioOutput = ret; - *outptr_QObject = static_cast(ret); +QAudioOutput* QAudioOutput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format) { + return new MiqtVirtualQAudioOutput(*audioDeviceInfo, *format); } -void QAudioOutput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { - MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(*audioDeviceInfo, *format, parent); - *outptr_QAudioOutput = ret; - *outptr_QObject = static_cast(ret); +QAudioOutput* QAudioOutput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent) { + return new MiqtVirtualQAudioOutput(*audioDeviceInfo, *format, parent); +} + +void QAudioOutput_virtbase(QAudioOutput* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAudioOutput_MetaObject(const QAudioOutput* self) { diff --git a/qt/multimedia/gen_qaudiooutput.go b/qt/multimedia/gen_qaudiooutput.go index fc71b320..5f3837fc 100644 --- a/qt/multimedia/gen_qaudiooutput.go +++ b/qt/multimedia/gen_qaudiooutput.go @@ -36,86 +36,66 @@ func (this *QAudioOutput) UnsafePointer() unsafe.Pointer { } // newQAudioOutput constructs the type using only CGO pointers. -func newQAudioOutput(h *C.QAudioOutput, h_QObject *C.QObject) *QAudioOutput { +func newQAudioOutput(h *C.QAudioOutput) *QAudioOutput { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAudioOutput_virtbase(h, &outptr_QObject) + return &QAudioOutput{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAudioOutput constructs the type using only unsafe pointers. -func UnsafeNewQAudioOutput(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioOutput { - if h == nil { - return nil - } - - return &QAudioOutput{h: (*C.QAudioOutput)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAudioOutput(h unsafe.Pointer) *QAudioOutput { + return newQAudioOutput((*C.QAudioOutput)(h)) } // NewQAudioOutput constructs a new QAudioOutput object. func NewQAudioOutput() *QAudioOutput { - var outptr_QAudioOutput *C.QAudioOutput = nil - var outptr_QObject *C.QObject = nil - C.QAudioOutput_new(&outptr_QAudioOutput, &outptr_QObject) - ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret := newQAudioOutput(C.QAudioOutput_new()) ret.isSubclass = true return ret } // NewQAudioOutput2 constructs a new QAudioOutput object. func NewQAudioOutput2(audioDeviceInfo *QAudioDeviceInfo) *QAudioOutput { - var outptr_QAudioOutput *C.QAudioOutput = nil - var outptr_QObject *C.QObject = nil - C.QAudioOutput_new2(audioDeviceInfo.cPointer(), &outptr_QAudioOutput, &outptr_QObject) - ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret := newQAudioOutput(C.QAudioOutput_new2(audioDeviceInfo.cPointer())) ret.isSubclass = true return ret } // NewQAudioOutput3 constructs a new QAudioOutput object. func NewQAudioOutput3(format *QAudioFormat) *QAudioOutput { - var outptr_QAudioOutput *C.QAudioOutput = nil - var outptr_QObject *C.QObject = nil - C.QAudioOutput_new3(format.cPointer(), &outptr_QAudioOutput, &outptr_QObject) - ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret := newQAudioOutput(C.QAudioOutput_new3(format.cPointer())) ret.isSubclass = true return ret } // NewQAudioOutput4 constructs a new QAudioOutput object. func NewQAudioOutput4(format *QAudioFormat, parent *qt.QObject) *QAudioOutput { - var outptr_QAudioOutput *C.QAudioOutput = nil - var outptr_QObject *C.QObject = nil - C.QAudioOutput_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioOutput, &outptr_QObject) - ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret := newQAudioOutput(C.QAudioOutput_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQAudioOutput5 constructs a new QAudioOutput object. func NewQAudioOutput5(audioDeviceInfo *QAudioDeviceInfo, format *QAudioFormat) *QAudioOutput { - var outptr_QAudioOutput *C.QAudioOutput = nil - var outptr_QObject *C.QObject = nil - C.QAudioOutput_new5(audioDeviceInfo.cPointer(), format.cPointer(), &outptr_QAudioOutput, &outptr_QObject) - ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret := newQAudioOutput(C.QAudioOutput_new5(audioDeviceInfo.cPointer(), format.cPointer())) ret.isSubclass = true return ret } // NewQAudioOutput6 constructs a new QAudioOutput object. func NewQAudioOutput6(audioDeviceInfo *QAudioDeviceInfo, format *QAudioFormat, parent *qt.QObject) *QAudioOutput { - var outptr_QAudioOutput *C.QAudioOutput = nil - var outptr_QObject *C.QObject = nil - C.QAudioOutput_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioOutput, &outptr_QObject) - ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret := newQAudioOutput(C.QAudioOutput_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -159,7 +139,7 @@ func (this *QAudioOutput) Start(device *qt.QIODevice) { } func (this *QAudioOutput) Start2() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioOutput_Start2(this.h)), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioOutput_Start2(this.h))) } func (this *QAudioOutput) Stop() { @@ -400,7 +380,7 @@ func miqt_exec_callback_QAudioOutput_TimerEvent(self *C.QAudioOutput, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QAudioOutput{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -426,7 +406,7 @@ func miqt_exec_callback_QAudioOutput_ChildEvent(self *C.QAudioOutput, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QAudioOutput{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/multimedia/gen_qaudiooutput.h b/qt/multimedia/gen_qaudiooutput.h index 07ad903b..64755c97 100644 --- a/qt/multimedia/gen_qaudiooutput.h +++ b/qt/multimedia/gen_qaudiooutput.h @@ -38,12 +38,13 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QAudioOutput_new(QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); -void QAudioOutput_new2(QAudioDeviceInfo* audioDeviceInfo, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); -void QAudioOutput_new3(QAudioFormat* format, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); -void QAudioOutput_new4(QAudioFormat* format, QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); -void QAudioOutput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); -void QAudioOutput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); +QAudioOutput* QAudioOutput_new(); +QAudioOutput* QAudioOutput_new2(QAudioDeviceInfo* audioDeviceInfo); +QAudioOutput* QAudioOutput_new3(QAudioFormat* format); +QAudioOutput* QAudioOutput_new4(QAudioFormat* format, QObject* parent); +QAudioOutput* QAudioOutput_new5(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format); +QAudioOutput* QAudioOutput_new6(QAudioDeviceInfo* audioDeviceInfo, QAudioFormat* format, QObject* parent); +void QAudioOutput_virtbase(QAudioOutput* src, QObject** outptr_QObject); QMetaObject* QAudioOutput_MetaObject(const QAudioOutput* self); void* QAudioOutput_Metacast(QAudioOutput* self, const char* param1); struct miqt_string QAudioOutput_Tr(const char* s); diff --git a/qt/multimedia/gen_qaudiooutputselectorcontrol.cpp b/qt/multimedia/gen_qaudiooutputselectorcontrol.cpp index 9639cf27..12d89d45 100644 --- a/qt/multimedia/gen_qaudiooutputselectorcontrol.cpp +++ b/qt/multimedia/gen_qaudiooutputselectorcontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qaudiooutputselectorcontrol.h" #include "_cgo_export.h" +void QAudioOutputSelectorControl_virtbase(QAudioOutputSelectorControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QAudioOutputSelectorControl_MetaObject(const QAudioOutputSelectorControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qaudiooutputselectorcontrol.go b/qt/multimedia/gen_qaudiooutputselectorcontrol.go index eeeb6011..bab9d1b2 100644 --- a/qt/multimedia/gen_qaudiooutputselectorcontrol.go +++ b/qt/multimedia/gen_qaudiooutputselectorcontrol.go @@ -36,22 +36,20 @@ func (this *QAudioOutputSelectorControl) UnsafePointer() unsafe.Pointer { } // newQAudioOutputSelectorControl constructs the type using only CGO pointers. -func newQAudioOutputSelectorControl(h *C.QAudioOutputSelectorControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QAudioOutputSelectorControl { +func newQAudioOutputSelectorControl(h *C.QAudioOutputSelectorControl) *QAudioOutputSelectorControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QAudioOutputSelectorControl_virtbase(h, &outptr_QMediaControl) + return &QAudioOutputSelectorControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQAudioOutputSelectorControl constructs the type using only unsafe pointers. -func UnsafeNewQAudioOutputSelectorControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioOutputSelectorControl { - if h == nil { - return nil - } - - return &QAudioOutputSelectorControl{h: (*C.QAudioOutputSelectorControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQAudioOutputSelectorControl(h unsafe.Pointer) *QAudioOutputSelectorControl { + return newQAudioOutputSelectorControl((*C.QAudioOutputSelectorControl)(h)) } func (this *QAudioOutputSelectorControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qaudiooutputselectorcontrol.h b/qt/multimedia/gen_qaudiooutputselectorcontrol.h index 6496cadb..3f352fb0 100644 --- a/qt/multimedia/gen_qaudiooutputselectorcontrol.h +++ b/qt/multimedia/gen_qaudiooutputselectorcontrol.h @@ -26,6 +26,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QAudioOutputSelectorControl_virtbase(QAudioOutputSelectorControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QAudioOutputSelectorControl_MetaObject(const QAudioOutputSelectorControl* self); void* QAudioOutputSelectorControl_Metacast(QAudioOutputSelectorControl* self, const char* param1); struct miqt_string QAudioOutputSelectorControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qaudioprobe.cpp b/qt/multimedia/gen_qaudioprobe.cpp index 91f079dc..af39b48c 100644 --- a/qt/multimedia/gen_qaudioprobe.cpp +++ b/qt/multimedia/gen_qaudioprobe.cpp @@ -196,16 +196,16 @@ public: }; -void QAudioProbe_new(QAudioProbe** outptr_QAudioProbe, QObject** outptr_QObject) { - MiqtVirtualQAudioProbe* ret = new MiqtVirtualQAudioProbe(); - *outptr_QAudioProbe = ret; - *outptr_QObject = static_cast(ret); +QAudioProbe* QAudioProbe_new() { + return new MiqtVirtualQAudioProbe(); } -void QAudioProbe_new2(QObject* parent, QAudioProbe** outptr_QAudioProbe, QObject** outptr_QObject) { - MiqtVirtualQAudioProbe* ret = new MiqtVirtualQAudioProbe(parent); - *outptr_QAudioProbe = ret; - *outptr_QObject = static_cast(ret); +QAudioProbe* QAudioProbe_new2(QObject* parent) { + return new MiqtVirtualQAudioProbe(parent); +} + +void QAudioProbe_virtbase(QAudioProbe* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAudioProbe_MetaObject(const QAudioProbe* self) { diff --git a/qt/multimedia/gen_qaudioprobe.go b/qt/multimedia/gen_qaudioprobe.go index eca7b9a9..14e047ef 100644 --- a/qt/multimedia/gen_qaudioprobe.go +++ b/qt/multimedia/gen_qaudioprobe.go @@ -36,42 +36,34 @@ func (this *QAudioProbe) UnsafePointer() unsafe.Pointer { } // newQAudioProbe constructs the type using only CGO pointers. -func newQAudioProbe(h *C.QAudioProbe, h_QObject *C.QObject) *QAudioProbe { +func newQAudioProbe(h *C.QAudioProbe) *QAudioProbe { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAudioProbe_virtbase(h, &outptr_QObject) + return &QAudioProbe{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAudioProbe constructs the type using only unsafe pointers. -func UnsafeNewQAudioProbe(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioProbe { - if h == nil { - return nil - } - - return &QAudioProbe{h: (*C.QAudioProbe)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAudioProbe(h unsafe.Pointer) *QAudioProbe { + return newQAudioProbe((*C.QAudioProbe)(h)) } // NewQAudioProbe constructs a new QAudioProbe object. func NewQAudioProbe() *QAudioProbe { - var outptr_QAudioProbe *C.QAudioProbe = nil - var outptr_QObject *C.QObject = nil - C.QAudioProbe_new(&outptr_QAudioProbe, &outptr_QObject) - ret := newQAudioProbe(outptr_QAudioProbe, outptr_QObject) + ret := newQAudioProbe(C.QAudioProbe_new()) ret.isSubclass = true return ret } // NewQAudioProbe2 constructs a new QAudioProbe object. func NewQAudioProbe2(parent *qt.QObject) *QAudioProbe { - var outptr_QAudioProbe *C.QAudioProbe = nil - var outptr_QObject *C.QObject = nil - C.QAudioProbe_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioProbe, &outptr_QObject) - ret := newQAudioProbe(outptr_QAudioProbe, outptr_QObject) + ret := newQAudioProbe(C.QAudioProbe_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -275,7 +267,7 @@ func miqt_exec_callback_QAudioProbe_TimerEvent(self *C.QAudioProbe, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QAudioProbe{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -301,7 +293,7 @@ func miqt_exec_callback_QAudioProbe_ChildEvent(self *C.QAudioProbe, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QAudioProbe{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/multimedia/gen_qaudioprobe.h b/qt/multimedia/gen_qaudioprobe.h index 9cc21123..0d0eab0a 100644 --- a/qt/multimedia/gen_qaudioprobe.h +++ b/qt/multimedia/gen_qaudioprobe.h @@ -38,8 +38,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QAudioProbe_new(QAudioProbe** outptr_QAudioProbe, QObject** outptr_QObject); -void QAudioProbe_new2(QObject* parent, QAudioProbe** outptr_QAudioProbe, QObject** outptr_QObject); +QAudioProbe* QAudioProbe_new(); +QAudioProbe* QAudioProbe_new2(QObject* parent); +void QAudioProbe_virtbase(QAudioProbe* src, QObject** outptr_QObject); QMetaObject* QAudioProbe_MetaObject(const QAudioProbe* self); void* QAudioProbe_Metacast(QAudioProbe* self, const char* param1); struct miqt_string QAudioProbe_Tr(const char* s); diff --git a/qt/multimedia/gen_qaudiorecorder.cpp b/qt/multimedia/gen_qaudiorecorder.cpp index 54c8e999..5c018199 100644 --- a/qt/multimedia/gen_qaudiorecorder.cpp +++ b/qt/multimedia/gen_qaudiorecorder.cpp @@ -67,20 +67,16 @@ public: }; -void QAudioRecorder_new(QAudioRecorder** outptr_QAudioRecorder, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQAudioRecorder* ret = new MiqtVirtualQAudioRecorder(); - *outptr_QAudioRecorder = ret; - *outptr_QMediaRecorder = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QAudioRecorder* QAudioRecorder_new() { + return new MiqtVirtualQAudioRecorder(); } -void QAudioRecorder_new2(QObject* parent, QAudioRecorder** outptr_QAudioRecorder, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQAudioRecorder* ret = new MiqtVirtualQAudioRecorder(parent); - *outptr_QAudioRecorder = ret; - *outptr_QMediaRecorder = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QAudioRecorder* QAudioRecorder_new2(QObject* parent) { + return new MiqtVirtualQAudioRecorder(parent); +} + +void QAudioRecorder_virtbase(QAudioRecorder* src, QMediaRecorder** outptr_QMediaRecorder) { + *outptr_QMediaRecorder = static_cast(src); } QMetaObject* QAudioRecorder_MetaObject(const QAudioRecorder* self) { diff --git a/qt/multimedia/gen_qaudiorecorder.go b/qt/multimedia/gen_qaudiorecorder.go index c061b387..20b08201 100644 --- a/qt/multimedia/gen_qaudiorecorder.go +++ b/qt/multimedia/gen_qaudiorecorder.go @@ -36,46 +36,34 @@ func (this *QAudioRecorder) UnsafePointer() unsafe.Pointer { } // newQAudioRecorder constructs the type using only CGO pointers. -func newQAudioRecorder(h *C.QAudioRecorder, h_QMediaRecorder *C.QMediaRecorder, h_QObject *C.QObject, h_QMediaBindableInterface *C.QMediaBindableInterface) *QAudioRecorder { +func newQAudioRecorder(h *C.QAudioRecorder) *QAudioRecorder { if h == nil { return nil } + var outptr_QMediaRecorder *C.QMediaRecorder = nil + C.QAudioRecorder_virtbase(h, &outptr_QMediaRecorder) + return &QAudioRecorder{h: h, - QMediaRecorder: newQMediaRecorder(h_QMediaRecorder, h_QObject, h_QMediaBindableInterface)} + QMediaRecorder: newQMediaRecorder(outptr_QMediaRecorder)} } // UnsafeNewQAudioRecorder constructs the type using only unsafe pointers. -func UnsafeNewQAudioRecorder(h unsafe.Pointer, h_QMediaRecorder unsafe.Pointer, h_QObject unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QAudioRecorder { - if h == nil { - return nil - } - - return &QAudioRecorder{h: (*C.QAudioRecorder)(h), - QMediaRecorder: UnsafeNewQMediaRecorder(h_QMediaRecorder, h_QObject, h_QMediaBindableInterface)} +func UnsafeNewQAudioRecorder(h unsafe.Pointer) *QAudioRecorder { + return newQAudioRecorder((*C.QAudioRecorder)(h)) } // NewQAudioRecorder constructs a new QAudioRecorder object. func NewQAudioRecorder() *QAudioRecorder { - var outptr_QAudioRecorder *C.QAudioRecorder = nil - var outptr_QMediaRecorder *C.QMediaRecorder = nil - var outptr_QObject *C.QObject = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QAudioRecorder_new(&outptr_QAudioRecorder, &outptr_QMediaRecorder, &outptr_QObject, &outptr_QMediaBindableInterface) - ret := newQAudioRecorder(outptr_QAudioRecorder, outptr_QMediaRecorder, outptr_QObject, outptr_QMediaBindableInterface) + ret := newQAudioRecorder(C.QAudioRecorder_new()) ret.isSubclass = true return ret } // NewQAudioRecorder2 constructs a new QAudioRecorder object. func NewQAudioRecorder2(parent *qt.QObject) *QAudioRecorder { - var outptr_QAudioRecorder *C.QAudioRecorder = nil - var outptr_QMediaRecorder *C.QMediaRecorder = nil - var outptr_QObject *C.QObject = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QAudioRecorder_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioRecorder, &outptr_QMediaRecorder, &outptr_QObject, &outptr_QMediaBindableInterface) - ret := newQAudioRecorder(outptr_QAudioRecorder, outptr_QMediaRecorder, outptr_QObject, outptr_QMediaBindableInterface) + ret := newQAudioRecorder(C.QAudioRecorder_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -244,7 +232,7 @@ func QAudioRecorder_TrUtf83(s string, c string, n int) string { func (this *QAudioRecorder) callVirtualBase_MediaObject() *QMediaObject { - return newQMediaObject(C.QAudioRecorder_virtualbase_MediaObject(unsafe.Pointer(this.h)), nil) + return newQMediaObject(C.QAudioRecorder_virtualbase_MediaObject(unsafe.Pointer(this.h))) } func (this *QAudioRecorder) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { @@ -287,7 +275,7 @@ func miqt_exec_callback_QAudioRecorder_SetMediaObject(self *C.QAudioRecorder, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMediaObject(object, nil) + slotval1 := newQMediaObject(object) virtualReturn := gofunc((&QAudioRecorder{h: self}).callVirtualBase_SetMediaObject, slotval1) diff --git a/qt/multimedia/gen_qaudiorecorder.h b/qt/multimedia/gen_qaudiorecorder.h index f203e218..16b28227 100644 --- a/qt/multimedia/gen_qaudiorecorder.h +++ b/qt/multimedia/gen_qaudiorecorder.h @@ -30,8 +30,9 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -void QAudioRecorder_new(QAudioRecorder** outptr_QAudioRecorder, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); -void QAudioRecorder_new2(QObject* parent, QAudioRecorder** outptr_QAudioRecorder, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); +QAudioRecorder* QAudioRecorder_new(); +QAudioRecorder* QAudioRecorder_new2(QObject* parent); +void QAudioRecorder_virtbase(QAudioRecorder* src, QMediaRecorder** outptr_QMediaRecorder); QMetaObject* QAudioRecorder_MetaObject(const QAudioRecorder* self); void* QAudioRecorder_Metacast(QAudioRecorder* self, const char* param1); struct miqt_string QAudioRecorder_Tr(const char* s); diff --git a/qt/multimedia/gen_qaudiorolecontrol.cpp b/qt/multimedia/gen_qaudiorolecontrol.cpp index dd6ca81e..ef250519 100644 --- a/qt/multimedia/gen_qaudiorolecontrol.cpp +++ b/qt/multimedia/gen_qaudiorolecontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qaudiorolecontrol.h" #include "_cgo_export.h" +void QAudioRoleControl_virtbase(QAudioRoleControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QAudioRoleControl_MetaObject(const QAudioRoleControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qaudiorolecontrol.go b/qt/multimedia/gen_qaudiorolecontrol.go index ad00a674..0077c318 100644 --- a/qt/multimedia/gen_qaudiorolecontrol.go +++ b/qt/multimedia/gen_qaudiorolecontrol.go @@ -36,22 +36,20 @@ func (this *QAudioRoleControl) UnsafePointer() unsafe.Pointer { } // newQAudioRoleControl constructs the type using only CGO pointers. -func newQAudioRoleControl(h *C.QAudioRoleControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QAudioRoleControl { +func newQAudioRoleControl(h *C.QAudioRoleControl) *QAudioRoleControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QAudioRoleControl_virtbase(h, &outptr_QMediaControl) + return &QAudioRoleControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQAudioRoleControl constructs the type using only unsafe pointers. -func UnsafeNewQAudioRoleControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioRoleControl { - if h == nil { - return nil - } - - return &QAudioRoleControl{h: (*C.QAudioRoleControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQAudioRoleControl(h unsafe.Pointer) *QAudioRoleControl { + return newQAudioRoleControl((*C.QAudioRoleControl)(h)) } func (this *QAudioRoleControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qaudiorolecontrol.h b/qt/multimedia/gen_qaudiorolecontrol.h index f34097ba..36ea3db0 100644 --- a/qt/multimedia/gen_qaudiorolecontrol.h +++ b/qt/multimedia/gen_qaudiorolecontrol.h @@ -26,6 +26,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QAudioRoleControl_virtbase(QAudioRoleControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QAudioRoleControl_MetaObject(const QAudioRoleControl* self); void* QAudioRoleControl_Metacast(QAudioRoleControl* self, const char* param1); struct miqt_string QAudioRoleControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qaudiosystem.cpp b/qt/multimedia/gen_qaudiosystem.cpp index fd4f3ed7..5f5e6000 100644 --- a/qt/multimedia/gen_qaudiosystem.cpp +++ b/qt/multimedia/gen_qaudiosystem.cpp @@ -13,6 +13,10 @@ #include "gen_qaudiosystem.h" #include "_cgo_export.h" +void QAbstractAudioDeviceInfo_virtbase(QAbstractAudioDeviceInfo* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QAbstractAudioDeviceInfo_MetaObject(const QAbstractAudioDeviceInfo* self) { return (QMetaObject*) self->metaObject(); } @@ -201,6 +205,10 @@ void QAbstractAudioDeviceInfo_Delete(QAbstractAudioDeviceInfo* self, bool isSubc } } +void QAbstractAudioOutput_virtbase(QAbstractAudioOutput* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QAbstractAudioOutput_MetaObject(const QAbstractAudioOutput* self) { return (QMetaObject*) self->metaObject(); } @@ -418,6 +426,10 @@ void QAbstractAudioOutput_Delete(QAbstractAudioOutput* self, bool isSubclass) { } } +void QAbstractAudioInput_virtbase(QAbstractAudioInput* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QAbstractAudioInput_MetaObject(const QAbstractAudioInput* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qaudiosystem.go b/qt/multimedia/gen_qaudiosystem.go index 54a2d385..1723e05f 100644 --- a/qt/multimedia/gen_qaudiosystem.go +++ b/qt/multimedia/gen_qaudiosystem.go @@ -36,22 +36,20 @@ func (this *QAbstractAudioDeviceInfo) UnsafePointer() unsafe.Pointer { } // newQAbstractAudioDeviceInfo constructs the type using only CGO pointers. -func newQAbstractAudioDeviceInfo(h *C.QAbstractAudioDeviceInfo, h_QObject *C.QObject) *QAbstractAudioDeviceInfo { +func newQAbstractAudioDeviceInfo(h *C.QAbstractAudioDeviceInfo) *QAbstractAudioDeviceInfo { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractAudioDeviceInfo_virtbase(h, &outptr_QObject) + return &QAbstractAudioDeviceInfo{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAbstractAudioDeviceInfo constructs the type using only unsafe pointers. -func UnsafeNewQAbstractAudioDeviceInfo(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractAudioDeviceInfo { - if h == nil { - return nil - } - - return &QAbstractAudioDeviceInfo{h: (*C.QAbstractAudioDeviceInfo)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractAudioDeviceInfo(h unsafe.Pointer) *QAbstractAudioDeviceInfo { + return newQAbstractAudioDeviceInfo((*C.QAbstractAudioDeviceInfo)(h)) } func (this *QAbstractAudioDeviceInfo) MetaObject() *qt.QMetaObject { @@ -241,22 +239,20 @@ func (this *QAbstractAudioOutput) UnsafePointer() unsafe.Pointer { } // newQAbstractAudioOutput constructs the type using only CGO pointers. -func newQAbstractAudioOutput(h *C.QAbstractAudioOutput, h_QObject *C.QObject) *QAbstractAudioOutput { +func newQAbstractAudioOutput(h *C.QAbstractAudioOutput) *QAbstractAudioOutput { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractAudioOutput_virtbase(h, &outptr_QObject) + return &QAbstractAudioOutput{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAbstractAudioOutput constructs the type using only unsafe pointers. -func UnsafeNewQAbstractAudioOutput(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractAudioOutput { - if h == nil { - return nil - } - - return &QAbstractAudioOutput{h: (*C.QAbstractAudioOutput)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractAudioOutput(h unsafe.Pointer) *QAbstractAudioOutput { + return newQAbstractAudioOutput((*C.QAbstractAudioOutput)(h)) } func (this *QAbstractAudioOutput) MetaObject() *qt.QMetaObject { @@ -292,7 +288,7 @@ func (this *QAbstractAudioOutput) Start(device *qt.QIODevice) { } func (this *QAbstractAudioOutput) Start2() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractAudioOutput_Start2(this.h)), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractAudioOutput_Start2(this.h))) } func (this *QAbstractAudioOutput) Stop() { @@ -520,22 +516,20 @@ func (this *QAbstractAudioInput) UnsafePointer() unsafe.Pointer { } // newQAbstractAudioInput constructs the type using only CGO pointers. -func newQAbstractAudioInput(h *C.QAbstractAudioInput, h_QObject *C.QObject) *QAbstractAudioInput { +func newQAbstractAudioInput(h *C.QAbstractAudioInput) *QAbstractAudioInput { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractAudioInput_virtbase(h, &outptr_QObject) + return &QAbstractAudioInput{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAbstractAudioInput constructs the type using only unsafe pointers. -func UnsafeNewQAbstractAudioInput(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractAudioInput { - if h == nil { - return nil - } - - return &QAbstractAudioInput{h: (*C.QAbstractAudioInput)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractAudioInput(h unsafe.Pointer) *QAbstractAudioInput { + return newQAbstractAudioInput((*C.QAbstractAudioInput)(h)) } func (this *QAbstractAudioInput) MetaObject() *qt.QMetaObject { @@ -571,7 +565,7 @@ func (this *QAbstractAudioInput) Start(device *qt.QIODevice) { } func (this *QAbstractAudioInput) Start2() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractAudioInput_Start2(this.h)), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractAudioInput_Start2(this.h))) } func (this *QAbstractAudioInput) Stop() { diff --git a/qt/multimedia/gen_qaudiosystem.h b/qt/multimedia/gen_qaudiosystem.h index e7af74bd..931d8aba 100644 --- a/qt/multimedia/gen_qaudiosystem.h +++ b/qt/multimedia/gen_qaudiosystem.h @@ -32,6 +32,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QAbstractAudioDeviceInfo_virtbase(QAbstractAudioDeviceInfo* src, QObject** outptr_QObject); QMetaObject* QAbstractAudioDeviceInfo_MetaObject(const QAbstractAudioDeviceInfo* self); void* QAbstractAudioDeviceInfo_Metacast(QAbstractAudioDeviceInfo* self, const char* param1); struct miqt_string QAbstractAudioDeviceInfo_Tr(const char* s); @@ -51,6 +52,7 @@ struct miqt_string QAbstractAudioDeviceInfo_TrUtf82(const char* s, const char* c struct miqt_string QAbstractAudioDeviceInfo_TrUtf83(const char* s, const char* c, int n); void QAbstractAudioDeviceInfo_Delete(QAbstractAudioDeviceInfo* self, bool isSubclass); +void QAbstractAudioOutput_virtbase(QAbstractAudioOutput* src, QObject** outptr_QObject); QMetaObject* QAbstractAudioOutput_MetaObject(const QAbstractAudioOutput* self); void* QAbstractAudioOutput_Metacast(QAbstractAudioOutput* self, const char* param1); struct miqt_string QAbstractAudioOutput_Tr(const char* s); @@ -89,6 +91,7 @@ struct miqt_string QAbstractAudioOutput_TrUtf82(const char* s, const char* c); struct miqt_string QAbstractAudioOutput_TrUtf83(const char* s, const char* c, int n); void QAbstractAudioOutput_Delete(QAbstractAudioOutput* self, bool isSubclass); +void QAbstractAudioInput_virtbase(QAbstractAudioInput* src, QObject** outptr_QObject); QMetaObject* QAbstractAudioInput_MetaObject(const QAbstractAudioInput* self); void* QAbstractAudioInput_Metacast(QAbstractAudioInput* self, const char* param1); struct miqt_string QAbstractAudioInput_Tr(const char* s); diff --git a/qt/multimedia/gen_qaudiosystemplugin.cpp b/qt/multimedia/gen_qaudiosystemplugin.cpp index 992b4958..b83ccacb 100644 --- a/qt/multimedia/gen_qaudiosystemplugin.cpp +++ b/qt/multimedia/gen_qaudiosystemplugin.cpp @@ -333,18 +333,17 @@ public: }; -void QAudioSystemPlugin_new(QAudioSystemPlugin** outptr_QAudioSystemPlugin, QObject** outptr_QObject, QAudioSystemFactoryInterface** outptr_QAudioSystemFactoryInterface) { - MiqtVirtualQAudioSystemPlugin* ret = new MiqtVirtualQAudioSystemPlugin(); - *outptr_QAudioSystemPlugin = ret; - *outptr_QObject = static_cast(ret); - *outptr_QAudioSystemFactoryInterface = static_cast(ret); +QAudioSystemPlugin* QAudioSystemPlugin_new() { + return new MiqtVirtualQAudioSystemPlugin(); } -void QAudioSystemPlugin_new2(QObject* parent, QAudioSystemPlugin** outptr_QAudioSystemPlugin, QObject** outptr_QObject, QAudioSystemFactoryInterface** outptr_QAudioSystemFactoryInterface) { - MiqtVirtualQAudioSystemPlugin* ret = new MiqtVirtualQAudioSystemPlugin(parent); - *outptr_QAudioSystemPlugin = ret; - *outptr_QObject = static_cast(ret); - *outptr_QAudioSystemFactoryInterface = static_cast(ret); +QAudioSystemPlugin* QAudioSystemPlugin_new2(QObject* parent) { + return new MiqtVirtualQAudioSystemPlugin(parent); +} + +void QAudioSystemPlugin_virtbase(QAudioSystemPlugin* src, QObject** outptr_QObject, QAudioSystemFactoryInterface** outptr_QAudioSystemFactoryInterface) { + *outptr_QObject = static_cast(src); + *outptr_QAudioSystemFactoryInterface = static_cast(src); } QMetaObject* QAudioSystemPlugin_MetaObject(const QAudioSystemPlugin* self) { diff --git a/qt/multimedia/gen_qaudiosystemplugin.go b/qt/multimedia/gen_qaudiosystemplugin.go index 2084489d..4377ec20 100644 --- a/qt/multimedia/gen_qaudiosystemplugin.go +++ b/qt/multimedia/gen_qaudiosystemplugin.go @@ -39,16 +39,13 @@ func newQAudioSystemFactoryInterface(h *C.QAudioSystemFactoryInterface) *QAudioS if h == nil { return nil } + return &QAudioSystemFactoryInterface{h: h} } // UnsafeNewQAudioSystemFactoryInterface constructs the type using only unsafe pointers. func UnsafeNewQAudioSystemFactoryInterface(h unsafe.Pointer) *QAudioSystemFactoryInterface { - if h == nil { - return nil - } - - return &QAudioSystemFactoryInterface{h: (*C.QAudioSystemFactoryInterface)(h)} + return newQAudioSystemFactoryInterface((*C.QAudioSystemFactoryInterface)(h)) } func (this *QAudioSystemFactoryInterface) AvailableDevices(param1 QAudio__Mode) [][]byte { @@ -68,21 +65,21 @@ func (this *QAudioSystemFactoryInterface) CreateInput(device []byte) *QAbstractA device_alias := C.struct_miqt_string{} device_alias.data = (*C.char)(unsafe.Pointer(&device[0])) device_alias.len = C.size_t(len(device)) - return newQAbstractAudioInput(C.QAudioSystemFactoryInterface_CreateInput(this.h, device_alias), nil) + return newQAbstractAudioInput(C.QAudioSystemFactoryInterface_CreateInput(this.h, device_alias)) } func (this *QAudioSystemFactoryInterface) CreateOutput(device []byte) *QAbstractAudioOutput { device_alias := C.struct_miqt_string{} device_alias.data = (*C.char)(unsafe.Pointer(&device[0])) device_alias.len = C.size_t(len(device)) - return newQAbstractAudioOutput(C.QAudioSystemFactoryInterface_CreateOutput(this.h, device_alias), nil) + return newQAbstractAudioOutput(C.QAudioSystemFactoryInterface_CreateOutput(this.h, device_alias)) } func (this *QAudioSystemFactoryInterface) CreateDeviceInfo(device []byte, mode QAudio__Mode) *QAbstractAudioDeviceInfo { device_alias := C.struct_miqt_string{} device_alias.data = (*C.char)(unsafe.Pointer(&device[0])) device_alias.len = C.size_t(len(device)) - return newQAbstractAudioDeviceInfo(C.QAudioSystemFactoryInterface_CreateDeviceInfo(this.h, device_alias, (C.int)(mode)), nil) + return newQAbstractAudioDeviceInfo(C.QAudioSystemFactoryInterface_CreateDeviceInfo(this.h, device_alias, (C.int)(mode))) } func (this *QAudioSystemFactoryInterface) OperatorAssign(param1 *QAudioSystemFactoryInterface) { @@ -125,46 +122,36 @@ func (this *QAudioSystemPlugin) UnsafePointer() unsafe.Pointer { } // newQAudioSystemPlugin constructs the type using only CGO pointers. -func newQAudioSystemPlugin(h *C.QAudioSystemPlugin, h_QObject *C.QObject, h_QAudioSystemFactoryInterface *C.QAudioSystemFactoryInterface) *QAudioSystemPlugin { +func newQAudioSystemPlugin(h *C.QAudioSystemPlugin) *QAudioSystemPlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QAudioSystemFactoryInterface *C.QAudioSystemFactoryInterface = nil + C.QAudioSystemPlugin_virtbase(h, &outptr_QObject, &outptr_QAudioSystemFactoryInterface) + return &QAudioSystemPlugin{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject)), - QAudioSystemFactoryInterface: newQAudioSystemFactoryInterface(h_QAudioSystemFactoryInterface)} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject)), + QAudioSystemFactoryInterface: newQAudioSystemFactoryInterface(outptr_QAudioSystemFactoryInterface)} } // UnsafeNewQAudioSystemPlugin constructs the type using only unsafe pointers. -func UnsafeNewQAudioSystemPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QAudioSystemFactoryInterface unsafe.Pointer) *QAudioSystemPlugin { - if h == nil { - return nil - } - - return &QAudioSystemPlugin{h: (*C.QAudioSystemPlugin)(h), - QObject: qt.UnsafeNewQObject(h_QObject), - QAudioSystemFactoryInterface: UnsafeNewQAudioSystemFactoryInterface(h_QAudioSystemFactoryInterface)} +func UnsafeNewQAudioSystemPlugin(h unsafe.Pointer) *QAudioSystemPlugin { + return newQAudioSystemPlugin((*C.QAudioSystemPlugin)(h)) } // NewQAudioSystemPlugin constructs a new QAudioSystemPlugin object. func NewQAudioSystemPlugin() *QAudioSystemPlugin { - var outptr_QAudioSystemPlugin *C.QAudioSystemPlugin = nil - var outptr_QObject *C.QObject = nil - var outptr_QAudioSystemFactoryInterface *C.QAudioSystemFactoryInterface = nil - C.QAudioSystemPlugin_new(&outptr_QAudioSystemPlugin, &outptr_QObject, &outptr_QAudioSystemFactoryInterface) - ret := newQAudioSystemPlugin(outptr_QAudioSystemPlugin, outptr_QObject, outptr_QAudioSystemFactoryInterface) + ret := newQAudioSystemPlugin(C.QAudioSystemPlugin_new()) ret.isSubclass = true return ret } // NewQAudioSystemPlugin2 constructs a new QAudioSystemPlugin object. func NewQAudioSystemPlugin2(parent *qt.QObject) *QAudioSystemPlugin { - var outptr_QAudioSystemPlugin *C.QAudioSystemPlugin = nil - var outptr_QObject *C.QObject = nil - var outptr_QAudioSystemFactoryInterface *C.QAudioSystemFactoryInterface = nil - C.QAudioSystemPlugin_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioSystemPlugin, &outptr_QObject, &outptr_QAudioSystemFactoryInterface) - ret := newQAudioSystemPlugin(outptr_QAudioSystemPlugin, outptr_QObject, outptr_QAudioSystemFactoryInterface) + ret := newQAudioSystemPlugin(C.QAudioSystemPlugin_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -214,21 +201,21 @@ func (this *QAudioSystemPlugin) CreateInput(device []byte) *QAbstractAudioInput device_alias := C.struct_miqt_string{} device_alias.data = (*C.char)(unsafe.Pointer(&device[0])) device_alias.len = C.size_t(len(device)) - return newQAbstractAudioInput(C.QAudioSystemPlugin_CreateInput(this.h, device_alias), nil) + return newQAbstractAudioInput(C.QAudioSystemPlugin_CreateInput(this.h, device_alias)) } func (this *QAudioSystemPlugin) CreateOutput(device []byte) *QAbstractAudioOutput { device_alias := C.struct_miqt_string{} device_alias.data = (*C.char)(unsafe.Pointer(&device[0])) device_alias.len = C.size_t(len(device)) - return newQAbstractAudioOutput(C.QAudioSystemPlugin_CreateOutput(this.h, device_alias), nil) + return newQAbstractAudioOutput(C.QAudioSystemPlugin_CreateOutput(this.h, device_alias)) } func (this *QAudioSystemPlugin) CreateDeviceInfo(device []byte, mode QAudio__Mode) *QAbstractAudioDeviceInfo { device_alias := C.struct_miqt_string{} device_alias.data = (*C.char)(unsafe.Pointer(&device[0])) device_alias.len = C.size_t(len(device)) - return newQAbstractAudioDeviceInfo(C.QAudioSystemPlugin_CreateDeviceInfo(this.h, device_alias, (C.int)(mode)), nil) + return newQAbstractAudioDeviceInfo(C.QAudioSystemPlugin_CreateDeviceInfo(this.h, device_alias, (C.int)(mode))) } func QAudioSystemPlugin_Tr2(s string, c string) string { @@ -460,7 +447,7 @@ func miqt_exec_callback_QAudioSystemPlugin_TimerEvent(self *C.QAudioSystemPlugin } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QAudioSystemPlugin{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -486,7 +473,7 @@ func miqt_exec_callback_QAudioSystemPlugin_ChildEvent(self *C.QAudioSystemPlugin } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QAudioSystemPlugin{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/multimedia/gen_qaudiosystemplugin.h b/qt/multimedia/gen_qaudiosystemplugin.h index a0319686..fa0a1e01 100644 --- a/qt/multimedia/gen_qaudiosystemplugin.h +++ b/qt/multimedia/gen_qaudiosystemplugin.h @@ -47,8 +47,9 @@ QAbstractAudioDeviceInfo* QAudioSystemFactoryInterface_CreateDeviceInfo(QAudioSy void QAudioSystemFactoryInterface_OperatorAssign(QAudioSystemFactoryInterface* self, QAudioSystemFactoryInterface* param1); void QAudioSystemFactoryInterface_Delete(QAudioSystemFactoryInterface* self, bool isSubclass); -void QAudioSystemPlugin_new(QAudioSystemPlugin** outptr_QAudioSystemPlugin, QObject** outptr_QObject, QAudioSystemFactoryInterface** outptr_QAudioSystemFactoryInterface); -void QAudioSystemPlugin_new2(QObject* parent, QAudioSystemPlugin** outptr_QAudioSystemPlugin, QObject** outptr_QObject, QAudioSystemFactoryInterface** outptr_QAudioSystemFactoryInterface); +QAudioSystemPlugin* QAudioSystemPlugin_new(); +QAudioSystemPlugin* QAudioSystemPlugin_new2(QObject* parent); +void QAudioSystemPlugin_virtbase(QAudioSystemPlugin* src, QObject** outptr_QObject, QAudioSystemFactoryInterface** outptr_QAudioSystemFactoryInterface); QMetaObject* QAudioSystemPlugin_MetaObject(const QAudioSystemPlugin* self); void* QAudioSystemPlugin_Metacast(QAudioSystemPlugin* self, const char* param1); struct miqt_string QAudioSystemPlugin_Tr(const char* s); diff --git a/qt/multimedia/gen_qcamera.cpp b/qt/multimedia/gen_qcamera.cpp index 702e4fb8..5dc93d56 100644 --- a/qt/multimedia/gen_qcamera.cpp +++ b/qt/multimedia/gen_qcamera.cpp @@ -152,62 +152,42 @@ public: }; -void QCamera_new(QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { - MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(); - *outptr_QCamera = ret; - *outptr_QMediaObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QCamera* QCamera_new() { + return new MiqtVirtualQCamera(); } -void QCamera_new2(struct miqt_string deviceName, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { +QCamera* QCamera_new2(struct miqt_string deviceName) { QByteArray deviceName_QByteArray(deviceName.data, deviceName.len); - MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(deviceName_QByteArray); - *outptr_QCamera = ret; - *outptr_QMediaObject = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQCamera(deviceName_QByteArray); } -void QCamera_new3(QCameraInfo* cameraInfo, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { - MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(*cameraInfo); - *outptr_QCamera = ret; - *outptr_QMediaObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QCamera* QCamera_new3(QCameraInfo* cameraInfo) { + return new MiqtVirtualQCamera(*cameraInfo); } -void QCamera_new4(int position, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { - MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(static_cast(position)); - *outptr_QCamera = ret; - *outptr_QMediaObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QCamera* QCamera_new4(int position) { + return new MiqtVirtualQCamera(static_cast(position)); } -void QCamera_new5(QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { - MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(parent); - *outptr_QCamera = ret; - *outptr_QMediaObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QCamera* QCamera_new5(QObject* parent) { + return new MiqtVirtualQCamera(parent); } -void QCamera_new6(struct miqt_string deviceName, QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { +QCamera* QCamera_new6(struct miqt_string deviceName, QObject* parent) { QByteArray deviceName_QByteArray(deviceName.data, deviceName.len); - MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(deviceName_QByteArray, parent); - *outptr_QCamera = ret; - *outptr_QMediaObject = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQCamera(deviceName_QByteArray, parent); } -void QCamera_new7(QCameraInfo* cameraInfo, QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { - MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(*cameraInfo, parent); - *outptr_QCamera = ret; - *outptr_QMediaObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QCamera* QCamera_new7(QCameraInfo* cameraInfo, QObject* parent) { + return new MiqtVirtualQCamera(*cameraInfo, parent); } -void QCamera_new8(int position, QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { - MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(static_cast(position), parent); - *outptr_QCamera = ret; - *outptr_QMediaObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QCamera* QCamera_new8(int position, QObject* parent) { + return new MiqtVirtualQCamera(static_cast(position), parent); +} + +void QCamera_virtbase(QCamera* src, QMediaObject** outptr_QMediaObject) { + *outptr_QMediaObject = static_cast(src); } QMetaObject* QCamera_MetaObject(const QCamera* self) { @@ -706,19 +686,16 @@ void QCamera_Delete(QCamera* self, bool isSubclass) { } } -void QCamera__FrameRateRange_new(QCamera__FrameRateRange** outptr_QCamera__FrameRateRange) { - QCamera::FrameRateRange* ret = new QCamera::FrameRateRange(); - *outptr_QCamera__FrameRateRange = ret; +QCamera__FrameRateRange* QCamera__FrameRateRange_new() { + return new QCamera::FrameRateRange(); } -void QCamera__FrameRateRange_new2(double minimum, double maximum, QCamera__FrameRateRange** outptr_QCamera__FrameRateRange) { - QCamera::FrameRateRange* ret = new QCamera::FrameRateRange(static_cast(minimum), static_cast(maximum)); - *outptr_QCamera__FrameRateRange = ret; +QCamera__FrameRateRange* QCamera__FrameRateRange_new2(double minimum, double maximum) { + return new QCamera::FrameRateRange(static_cast(minimum), static_cast(maximum)); } -void QCamera__FrameRateRange_new3(QCamera__FrameRateRange* param1, QCamera__FrameRateRange** outptr_QCamera__FrameRateRange) { - QCamera::FrameRateRange* ret = new QCamera::FrameRateRange(*param1); - *outptr_QCamera__FrameRateRange = ret; +QCamera__FrameRateRange* QCamera__FrameRateRange_new3(QCamera__FrameRateRange* param1) { + return new QCamera::FrameRateRange(*param1); } void QCamera__FrameRateRange_Delete(QCamera__FrameRateRange* self, bool isSubclass) { diff --git a/qt/multimedia/gen_qcamera.go b/qt/multimedia/gen_qcamera.go index 98d93618..7a5cfc74 100644 --- a/qt/multimedia/gen_qcamera.go +++ b/qt/multimedia/gen_qcamera.go @@ -111,32 +111,26 @@ func (this *QCamera) UnsafePointer() unsafe.Pointer { } // newQCamera constructs the type using only CGO pointers. -func newQCamera(h *C.QCamera, h_QMediaObject *C.QMediaObject, h_QObject *C.QObject) *QCamera { +func newQCamera(h *C.QCamera) *QCamera { if h == nil { return nil } + var outptr_QMediaObject *C.QMediaObject = nil + C.QCamera_virtbase(h, &outptr_QMediaObject) + return &QCamera{h: h, - QMediaObject: newQMediaObject(h_QMediaObject, h_QObject)} + QMediaObject: newQMediaObject(outptr_QMediaObject)} } // UnsafeNewQCamera constructs the type using only unsafe pointers. -func UnsafeNewQCamera(h unsafe.Pointer, h_QMediaObject unsafe.Pointer, h_QObject unsafe.Pointer) *QCamera { - if h == nil { - return nil - } - - return &QCamera{h: (*C.QCamera)(h), - QMediaObject: UnsafeNewQMediaObject(h_QMediaObject, h_QObject)} +func UnsafeNewQCamera(h unsafe.Pointer) *QCamera { + return newQCamera((*C.QCamera)(h)) } // NewQCamera constructs a new QCamera object. func NewQCamera() *QCamera { - var outptr_QCamera *C.QCamera = nil - var outptr_QMediaObject *C.QMediaObject = nil - var outptr_QObject *C.QObject = nil - C.QCamera_new(&outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) - ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret := newQCamera(C.QCamera_new()) ret.isSubclass = true return ret } @@ -146,48 +140,32 @@ func NewQCamera2(deviceName []byte) *QCamera { deviceName_alias := C.struct_miqt_string{} deviceName_alias.data = (*C.char)(unsafe.Pointer(&deviceName[0])) deviceName_alias.len = C.size_t(len(deviceName)) - var outptr_QCamera *C.QCamera = nil - var outptr_QMediaObject *C.QMediaObject = nil - var outptr_QObject *C.QObject = nil - C.QCamera_new2(deviceName_alias, &outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) - ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret := newQCamera(C.QCamera_new2(deviceName_alias)) ret.isSubclass = true return ret } // NewQCamera3 constructs a new QCamera object. func NewQCamera3(cameraInfo *QCameraInfo) *QCamera { - var outptr_QCamera *C.QCamera = nil - var outptr_QMediaObject *C.QMediaObject = nil - var outptr_QObject *C.QObject = nil - C.QCamera_new3(cameraInfo.cPointer(), &outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) - ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret := newQCamera(C.QCamera_new3(cameraInfo.cPointer())) ret.isSubclass = true return ret } // NewQCamera4 constructs a new QCamera object. func NewQCamera4(position QCamera__Position) *QCamera { - var outptr_QCamera *C.QCamera = nil - var outptr_QMediaObject *C.QMediaObject = nil - var outptr_QObject *C.QObject = nil - C.QCamera_new4((C.int)(position), &outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) - ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret := newQCamera(C.QCamera_new4((C.int)(position))) ret.isSubclass = true return ret } // NewQCamera5 constructs a new QCamera object. func NewQCamera5(parent *qt.QObject) *QCamera { - var outptr_QCamera *C.QCamera = nil - var outptr_QMediaObject *C.QMediaObject = nil - var outptr_QObject *C.QObject = nil - C.QCamera_new5((*C.QObject)(parent.UnsafePointer()), &outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) - ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret := newQCamera(C.QCamera_new5((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -197,36 +175,24 @@ func NewQCamera6(deviceName []byte, parent *qt.QObject) *QCamera { deviceName_alias := C.struct_miqt_string{} deviceName_alias.data = (*C.char)(unsafe.Pointer(&deviceName[0])) deviceName_alias.len = C.size_t(len(deviceName)) - var outptr_QCamera *C.QCamera = nil - var outptr_QMediaObject *C.QMediaObject = nil - var outptr_QObject *C.QObject = nil - C.QCamera_new6(deviceName_alias, (*C.QObject)(parent.UnsafePointer()), &outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) - ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret := newQCamera(C.QCamera_new6(deviceName_alias, (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQCamera7 constructs a new QCamera object. func NewQCamera7(cameraInfo *QCameraInfo, parent *qt.QObject) *QCamera { - var outptr_QCamera *C.QCamera = nil - var outptr_QMediaObject *C.QMediaObject = nil - var outptr_QObject *C.QObject = nil - C.QCamera_new7(cameraInfo.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) - ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret := newQCamera(C.QCamera_new7(cameraInfo.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQCamera8 constructs a new QCamera object. func NewQCamera8(position QCamera__Position, parent *qt.QObject) *QCamera { - var outptr_QCamera *C.QCamera = nil - var outptr_QMediaObject *C.QMediaObject = nil - var outptr_QObject *C.QObject = nil - C.QCamera_new8((C.int)(position), (*C.QObject)(parent.UnsafePointer()), &outptr_QCamera, &outptr_QMediaObject, &outptr_QObject) - ret := newQCamera(outptr_QCamera, outptr_QMediaObject, outptr_QObject) + ret := newQCamera(C.QCamera_new8((C.int)(position), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -303,15 +269,15 @@ func (this *QCamera) IsCaptureModeSupported(mode QCamera__CaptureMode) bool { } func (this *QCamera) Exposure() *QCameraExposure { - return newQCameraExposure(C.QCamera_Exposure(this.h), nil) + return newQCameraExposure(C.QCamera_Exposure(this.h)) } func (this *QCamera) Focus() *QCameraFocus { - return newQCameraFocus(C.QCamera_Focus(this.h), nil) + return newQCameraFocus(C.QCamera_Focus(this.h)) } func (this *QCamera) ImageProcessing() *QCameraImageProcessing { - return newQCameraImageProcessing(C.QCamera_ImageProcessing(this.h), nil) + return newQCameraImageProcessing(C.QCamera_ImageProcessing(this.h)) } func (this *QCamera) SetViewfinder(viewfinder *QVideoWidget) { @@ -767,7 +733,7 @@ func miqt_exec_callback_QCamera_IsAvailable(self *C.QCamera, cb C.intptr_t) C.bo func (this *QCamera) callVirtualBase_Service() *QMediaService { - return newQMediaService(C.QCamera_virtualbase_Service(unsafe.Pointer(this.h)), nil) + return newQMediaService(C.QCamera_virtualbase_Service(unsafe.Pointer(this.h))) } func (this *QCamera) OnService(slot func(super func() *QMediaService) *QMediaService) { @@ -882,44 +848,35 @@ func newQCamera__FrameRateRange(h *C.QCamera__FrameRateRange) *QCamera__FrameRat if h == nil { return nil } + return &QCamera__FrameRateRange{h: h} } // UnsafeNewQCamera__FrameRateRange constructs the type using only unsafe pointers. func UnsafeNewQCamera__FrameRateRange(h unsafe.Pointer) *QCamera__FrameRateRange { - if h == nil { - return nil - } - - return &QCamera__FrameRateRange{h: (*C.QCamera__FrameRateRange)(h)} + return newQCamera__FrameRateRange((*C.QCamera__FrameRateRange)(h)) } // NewQCamera__FrameRateRange constructs a new QCamera::FrameRateRange object. func NewQCamera__FrameRateRange() *QCamera__FrameRateRange { - var outptr_QCamera__FrameRateRange *C.QCamera__FrameRateRange = nil - C.QCamera__FrameRateRange_new(&outptr_QCamera__FrameRateRange) - ret := newQCamera__FrameRateRange(outptr_QCamera__FrameRateRange) + ret := newQCamera__FrameRateRange(C.QCamera__FrameRateRange_new()) ret.isSubclass = true return ret } // NewQCamera__FrameRateRange2 constructs a new QCamera::FrameRateRange object. func NewQCamera__FrameRateRange2(minimum float64, maximum float64) *QCamera__FrameRateRange { - var outptr_QCamera__FrameRateRange *C.QCamera__FrameRateRange = nil - C.QCamera__FrameRateRange_new2((C.double)(minimum), (C.double)(maximum), &outptr_QCamera__FrameRateRange) - ret := newQCamera__FrameRateRange(outptr_QCamera__FrameRateRange) + ret := newQCamera__FrameRateRange(C.QCamera__FrameRateRange_new2((C.double)(minimum), (C.double)(maximum))) ret.isSubclass = true return ret } // NewQCamera__FrameRateRange3 constructs a new QCamera::FrameRateRange object. func NewQCamera__FrameRateRange3(param1 *QCamera__FrameRateRange) *QCamera__FrameRateRange { - var outptr_QCamera__FrameRateRange *C.QCamera__FrameRateRange = nil - C.QCamera__FrameRateRange_new3(param1.cPointer(), &outptr_QCamera__FrameRateRange) - ret := newQCamera__FrameRateRange(outptr_QCamera__FrameRateRange) + ret := newQCamera__FrameRateRange(C.QCamera__FrameRateRange_new3(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/multimedia/gen_qcamera.h b/qt/multimedia/gen_qcamera.h index 2ff55678..327859c1 100644 --- a/qt/multimedia/gen_qcamera.h +++ b/qt/multimedia/gen_qcamera.h @@ -52,14 +52,15 @@ typedef struct QSize QSize; typedef struct QVideoWidget QVideoWidget; #endif -void QCamera_new(QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); -void QCamera_new2(struct miqt_string deviceName, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); -void QCamera_new3(QCameraInfo* cameraInfo, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); -void QCamera_new4(int position, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); -void QCamera_new5(QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); -void QCamera_new6(struct miqt_string deviceName, QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); -void QCamera_new7(QCameraInfo* cameraInfo, QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); -void QCamera_new8(int position, QObject* parent, QCamera** outptr_QCamera, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); +QCamera* QCamera_new(); +QCamera* QCamera_new2(struct miqt_string deviceName); +QCamera* QCamera_new3(QCameraInfo* cameraInfo); +QCamera* QCamera_new4(int position); +QCamera* QCamera_new5(QObject* parent); +QCamera* QCamera_new6(struct miqt_string deviceName, QObject* parent); +QCamera* QCamera_new7(QCameraInfo* cameraInfo, QObject* parent); +QCamera* QCamera_new8(int position, QObject* parent); +void QCamera_virtbase(QCamera* src, QMediaObject** outptr_QMediaObject); QMetaObject* QCamera_MetaObject(const QCamera* self); void* QCamera_Metacast(QCamera* self, const char* param1); struct miqt_string QCamera_Tr(const char* s); @@ -136,9 +137,9 @@ void QCamera_override_virtual_Unbind(void* self, intptr_t slot); void QCamera_virtualbase_Unbind(void* self, QObject* param1); void QCamera_Delete(QCamera* self, bool isSubclass); -void QCamera__FrameRateRange_new(QCamera__FrameRateRange** outptr_QCamera__FrameRateRange); -void QCamera__FrameRateRange_new2(double minimum, double maximum, QCamera__FrameRateRange** outptr_QCamera__FrameRateRange); -void QCamera__FrameRateRange_new3(QCamera__FrameRateRange* param1, QCamera__FrameRateRange** outptr_QCamera__FrameRateRange); +QCamera__FrameRateRange* QCamera__FrameRateRange_new(); +QCamera__FrameRateRange* QCamera__FrameRateRange_new2(double minimum, double maximum); +QCamera__FrameRateRange* QCamera__FrameRateRange_new3(QCamera__FrameRateRange* param1); void QCamera__FrameRateRange_Delete(QCamera__FrameRateRange* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt/multimedia/gen_qcameracapturebufferformatcontrol.cpp b/qt/multimedia/gen_qcameracapturebufferformatcontrol.cpp index f959480d..b36a0650 100644 --- a/qt/multimedia/gen_qcameracapturebufferformatcontrol.cpp +++ b/qt/multimedia/gen_qcameracapturebufferformatcontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qcameracapturebufferformatcontrol.h" #include "_cgo_export.h" +void QCameraCaptureBufferFormatControl_virtbase(QCameraCaptureBufferFormatControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QCameraCaptureBufferFormatControl_MetaObject(const QCameraCaptureBufferFormatControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcameracapturebufferformatcontrol.go b/qt/multimedia/gen_qcameracapturebufferformatcontrol.go index b6307c1e..2d13a9ee 100644 --- a/qt/multimedia/gen_qcameracapturebufferformatcontrol.go +++ b/qt/multimedia/gen_qcameracapturebufferformatcontrol.go @@ -36,22 +36,20 @@ func (this *QCameraCaptureBufferFormatControl) UnsafePointer() unsafe.Pointer { } // newQCameraCaptureBufferFormatControl constructs the type using only CGO pointers. -func newQCameraCaptureBufferFormatControl(h *C.QCameraCaptureBufferFormatControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraCaptureBufferFormatControl { +func newQCameraCaptureBufferFormatControl(h *C.QCameraCaptureBufferFormatControl) *QCameraCaptureBufferFormatControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QCameraCaptureBufferFormatControl_virtbase(h, &outptr_QMediaControl) + return &QCameraCaptureBufferFormatControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQCameraCaptureBufferFormatControl constructs the type using only unsafe pointers. -func UnsafeNewQCameraCaptureBufferFormatControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraCaptureBufferFormatControl { - if h == nil { - return nil - } - - return &QCameraCaptureBufferFormatControl{h: (*C.QCameraCaptureBufferFormatControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQCameraCaptureBufferFormatControl(h unsafe.Pointer) *QCameraCaptureBufferFormatControl { + return newQCameraCaptureBufferFormatControl((*C.QCameraCaptureBufferFormatControl)(h)) } func (this *QCameraCaptureBufferFormatControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcameracapturebufferformatcontrol.h b/qt/multimedia/gen_qcameracapturebufferformatcontrol.h index e5377b6f..7b40de1a 100644 --- a/qt/multimedia/gen_qcameracapturebufferformatcontrol.h +++ b/qt/multimedia/gen_qcameracapturebufferformatcontrol.h @@ -26,6 +26,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QCameraCaptureBufferFormatControl_virtbase(QCameraCaptureBufferFormatControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QCameraCaptureBufferFormatControl_MetaObject(const QCameraCaptureBufferFormatControl* self); void* QCameraCaptureBufferFormatControl_Metacast(QCameraCaptureBufferFormatControl* self, const char* param1); struct miqt_string QCameraCaptureBufferFormatControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qcameracapturedestinationcontrol.cpp b/qt/multimedia/gen_qcameracapturedestinationcontrol.cpp index b3da2fd1..8dae64fb 100644 --- a/qt/multimedia/gen_qcameracapturedestinationcontrol.cpp +++ b/qt/multimedia/gen_qcameracapturedestinationcontrol.cpp @@ -9,6 +9,10 @@ #include "gen_qcameracapturedestinationcontrol.h" #include "_cgo_export.h" +void QCameraCaptureDestinationControl_virtbase(QCameraCaptureDestinationControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QCameraCaptureDestinationControl_MetaObject(const QCameraCaptureDestinationControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcameracapturedestinationcontrol.go b/qt/multimedia/gen_qcameracapturedestinationcontrol.go index dc97fa81..7356cf7d 100644 --- a/qt/multimedia/gen_qcameracapturedestinationcontrol.go +++ b/qt/multimedia/gen_qcameracapturedestinationcontrol.go @@ -36,22 +36,20 @@ func (this *QCameraCaptureDestinationControl) UnsafePointer() unsafe.Pointer { } // newQCameraCaptureDestinationControl constructs the type using only CGO pointers. -func newQCameraCaptureDestinationControl(h *C.QCameraCaptureDestinationControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraCaptureDestinationControl { +func newQCameraCaptureDestinationControl(h *C.QCameraCaptureDestinationControl) *QCameraCaptureDestinationControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QCameraCaptureDestinationControl_virtbase(h, &outptr_QMediaControl) + return &QCameraCaptureDestinationControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQCameraCaptureDestinationControl constructs the type using only unsafe pointers. -func UnsafeNewQCameraCaptureDestinationControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraCaptureDestinationControl { - if h == nil { - return nil - } - - return &QCameraCaptureDestinationControl{h: (*C.QCameraCaptureDestinationControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQCameraCaptureDestinationControl(h unsafe.Pointer) *QCameraCaptureDestinationControl { + return newQCameraCaptureDestinationControl((*C.QCameraCaptureDestinationControl)(h)) } func (this *QCameraCaptureDestinationControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcameracapturedestinationcontrol.h b/qt/multimedia/gen_qcameracapturedestinationcontrol.h index 6e4926bb..1ccbef54 100644 --- a/qt/multimedia/gen_qcameracapturedestinationcontrol.h +++ b/qt/multimedia/gen_qcameracapturedestinationcontrol.h @@ -26,6 +26,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QCameraCaptureDestinationControl_virtbase(QCameraCaptureDestinationControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QCameraCaptureDestinationControl_MetaObject(const QCameraCaptureDestinationControl* self); void* QCameraCaptureDestinationControl_Metacast(QCameraCaptureDestinationControl* self, const char* param1); struct miqt_string QCameraCaptureDestinationControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qcameracontrol.cpp b/qt/multimedia/gen_qcameracontrol.cpp index 9ba9d951..9fc11b92 100644 --- a/qt/multimedia/gen_qcameracontrol.cpp +++ b/qt/multimedia/gen_qcameracontrol.cpp @@ -9,6 +9,10 @@ #include "gen_qcameracontrol.h" #include "_cgo_export.h" +void QCameraControl_virtbase(QCameraControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QCameraControl_MetaObject(const QCameraControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcameracontrol.go b/qt/multimedia/gen_qcameracontrol.go index e7e01e7f..d3f315c1 100644 --- a/qt/multimedia/gen_qcameracontrol.go +++ b/qt/multimedia/gen_qcameracontrol.go @@ -46,22 +46,20 @@ func (this *QCameraControl) UnsafePointer() unsafe.Pointer { } // newQCameraControl constructs the type using only CGO pointers. -func newQCameraControl(h *C.QCameraControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraControl { +func newQCameraControl(h *C.QCameraControl) *QCameraControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QCameraControl_virtbase(h, &outptr_QMediaControl) + return &QCameraControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQCameraControl constructs the type using only unsafe pointers. -func UnsafeNewQCameraControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraControl { - if h == nil { - return nil - } - - return &QCameraControl{h: (*C.QCameraControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQCameraControl(h unsafe.Pointer) *QCameraControl { + return newQCameraControl((*C.QCameraControl)(h)) } func (this *QCameraControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcameracontrol.h b/qt/multimedia/gen_qcameracontrol.h index 6b167b2c..4ecb3b36 100644 --- a/qt/multimedia/gen_qcameracontrol.h +++ b/qt/multimedia/gen_qcameracontrol.h @@ -26,6 +26,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QCameraControl_virtbase(QCameraControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QCameraControl_MetaObject(const QCameraControl* self); void* QCameraControl_Metacast(QCameraControl* self, const char* param1); struct miqt_string QCameraControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qcameraexposure.cpp b/qt/multimedia/gen_qcameraexposure.cpp index 2df53f9e..d84ac91e 100644 --- a/qt/multimedia/gen_qcameraexposure.cpp +++ b/qt/multimedia/gen_qcameraexposure.cpp @@ -10,6 +10,10 @@ #include "gen_qcameraexposure.h" #include "_cgo_export.h" +void QCameraExposure_virtbase(QCameraExposure* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QCameraExposure_MetaObject(const QCameraExposure* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcameraexposure.go b/qt/multimedia/gen_qcameraexposure.go index 22e4593f..3adfafb9 100644 --- a/qt/multimedia/gen_qcameraexposure.go +++ b/qt/multimedia/gen_qcameraexposure.go @@ -85,22 +85,20 @@ func (this *QCameraExposure) UnsafePointer() unsafe.Pointer { } // newQCameraExposure constructs the type using only CGO pointers. -func newQCameraExposure(h *C.QCameraExposure, h_QObject *C.QObject) *QCameraExposure { +func newQCameraExposure(h *C.QCameraExposure) *QCameraExposure { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QCameraExposure_virtbase(h, &outptr_QObject) + return &QCameraExposure{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQCameraExposure constructs the type using only unsafe pointers. -func UnsafeNewQCameraExposure(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraExposure { - if h == nil { - return nil - } - - return &QCameraExposure{h: (*C.QCameraExposure)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQCameraExposure(h unsafe.Pointer) *QCameraExposure { + return newQCameraExposure((*C.QCameraExposure)(h)) } func (this *QCameraExposure) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcameraexposure.h b/qt/multimedia/gen_qcameraexposure.h index cea55878..4f33b0d1 100644 --- a/qt/multimedia/gen_qcameraexposure.h +++ b/qt/multimedia/gen_qcameraexposure.h @@ -26,6 +26,7 @@ typedef struct QObject QObject; typedef struct QPointF QPointF; #endif +void QCameraExposure_virtbase(QCameraExposure* src, QObject** outptr_QObject); QMetaObject* QCameraExposure_MetaObject(const QCameraExposure* self); void* QCameraExposure_Metacast(QCameraExposure* self, const char* param1); struct miqt_string QCameraExposure_Tr(const char* s); diff --git a/qt/multimedia/gen_qcameraexposurecontrol.cpp b/qt/multimedia/gen_qcameraexposurecontrol.cpp index c12406aa..16ac3d38 100644 --- a/qt/multimedia/gen_qcameraexposurecontrol.cpp +++ b/qt/multimedia/gen_qcameraexposurecontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qcameraexposurecontrol.h" #include "_cgo_export.h" +void QCameraExposureControl_virtbase(QCameraExposureControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QCameraExposureControl_MetaObject(const QCameraExposureControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcameraexposurecontrol.go b/qt/multimedia/gen_qcameraexposurecontrol.go index 36b6bd04..c9400fd6 100644 --- a/qt/multimedia/gen_qcameraexposurecontrol.go +++ b/qt/multimedia/gen_qcameraexposurecontrol.go @@ -52,22 +52,20 @@ func (this *QCameraExposureControl) UnsafePointer() unsafe.Pointer { } // newQCameraExposureControl constructs the type using only CGO pointers. -func newQCameraExposureControl(h *C.QCameraExposureControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraExposureControl { +func newQCameraExposureControl(h *C.QCameraExposureControl) *QCameraExposureControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QCameraExposureControl_virtbase(h, &outptr_QMediaControl) + return &QCameraExposureControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQCameraExposureControl constructs the type using only unsafe pointers. -func UnsafeNewQCameraExposureControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraExposureControl { - if h == nil { - return nil - } - - return &QCameraExposureControl{h: (*C.QCameraExposureControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQCameraExposureControl(h unsafe.Pointer) *QCameraExposureControl { + return newQCameraExposureControl((*C.QCameraExposureControl)(h)) } func (this *QCameraExposureControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcameraexposurecontrol.h b/qt/multimedia/gen_qcameraexposurecontrol.h index ceee65f2..ed856163 100644 --- a/qt/multimedia/gen_qcameraexposurecontrol.h +++ b/qt/multimedia/gen_qcameraexposurecontrol.h @@ -28,6 +28,7 @@ typedef struct QObject QObject; typedef struct QVariant QVariant; #endif +void QCameraExposureControl_virtbase(QCameraExposureControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QCameraExposureControl_MetaObject(const QCameraExposureControl* self); void* QCameraExposureControl_Metacast(QCameraExposureControl* self, const char* param1); struct miqt_string QCameraExposureControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qcamerafeedbackcontrol.cpp b/qt/multimedia/gen_qcamerafeedbackcontrol.cpp index e02d1493..f89a89ac 100644 --- a/qt/multimedia/gen_qcamerafeedbackcontrol.cpp +++ b/qt/multimedia/gen_qcamerafeedbackcontrol.cpp @@ -9,6 +9,10 @@ #include "gen_qcamerafeedbackcontrol.h" #include "_cgo_export.h" +void QCameraFeedbackControl_virtbase(QCameraFeedbackControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QCameraFeedbackControl_MetaObject(const QCameraFeedbackControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcamerafeedbackcontrol.go b/qt/multimedia/gen_qcamerafeedbackcontrol.go index 12773622..4e5e54e3 100644 --- a/qt/multimedia/gen_qcamerafeedbackcontrol.go +++ b/qt/multimedia/gen_qcamerafeedbackcontrol.go @@ -51,22 +51,20 @@ func (this *QCameraFeedbackControl) UnsafePointer() unsafe.Pointer { } // newQCameraFeedbackControl constructs the type using only CGO pointers. -func newQCameraFeedbackControl(h *C.QCameraFeedbackControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraFeedbackControl { +func newQCameraFeedbackControl(h *C.QCameraFeedbackControl) *QCameraFeedbackControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QCameraFeedbackControl_virtbase(h, &outptr_QMediaControl) + return &QCameraFeedbackControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQCameraFeedbackControl constructs the type using only unsafe pointers. -func UnsafeNewQCameraFeedbackControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraFeedbackControl { - if h == nil { - return nil - } - - return &QCameraFeedbackControl{h: (*C.QCameraFeedbackControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQCameraFeedbackControl(h unsafe.Pointer) *QCameraFeedbackControl { + return newQCameraFeedbackControl((*C.QCameraFeedbackControl)(h)) } func (this *QCameraFeedbackControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcamerafeedbackcontrol.h b/qt/multimedia/gen_qcamerafeedbackcontrol.h index 07124a54..09567b2c 100644 --- a/qt/multimedia/gen_qcamerafeedbackcontrol.h +++ b/qt/multimedia/gen_qcamerafeedbackcontrol.h @@ -26,6 +26,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QCameraFeedbackControl_virtbase(QCameraFeedbackControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QCameraFeedbackControl_MetaObject(const QCameraFeedbackControl* self); void* QCameraFeedbackControl_Metacast(QCameraFeedbackControl* self, const char* param1); struct miqt_string QCameraFeedbackControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qcameraflashcontrol.cpp b/qt/multimedia/gen_qcameraflashcontrol.cpp index 5f563202..abdbd235 100644 --- a/qt/multimedia/gen_qcameraflashcontrol.cpp +++ b/qt/multimedia/gen_qcameraflashcontrol.cpp @@ -9,6 +9,10 @@ #include "gen_qcameraflashcontrol.h" #include "_cgo_export.h" +void QCameraFlashControl_virtbase(QCameraFlashControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QCameraFlashControl_MetaObject(const QCameraFlashControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcameraflashcontrol.go b/qt/multimedia/gen_qcameraflashcontrol.go index 6dfd93e4..08d825ff 100644 --- a/qt/multimedia/gen_qcameraflashcontrol.go +++ b/qt/multimedia/gen_qcameraflashcontrol.go @@ -36,22 +36,20 @@ func (this *QCameraFlashControl) UnsafePointer() unsafe.Pointer { } // newQCameraFlashControl constructs the type using only CGO pointers. -func newQCameraFlashControl(h *C.QCameraFlashControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraFlashControl { +func newQCameraFlashControl(h *C.QCameraFlashControl) *QCameraFlashControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QCameraFlashControl_virtbase(h, &outptr_QMediaControl) + return &QCameraFlashControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQCameraFlashControl constructs the type using only unsafe pointers. -func UnsafeNewQCameraFlashControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraFlashControl { - if h == nil { - return nil - } - - return &QCameraFlashControl{h: (*C.QCameraFlashControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQCameraFlashControl(h unsafe.Pointer) *QCameraFlashControl { + return newQCameraFlashControl((*C.QCameraFlashControl)(h)) } func (this *QCameraFlashControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcameraflashcontrol.h b/qt/multimedia/gen_qcameraflashcontrol.h index 2a60b3e9..97984215 100644 --- a/qt/multimedia/gen_qcameraflashcontrol.h +++ b/qt/multimedia/gen_qcameraflashcontrol.h @@ -26,6 +26,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QCameraFlashControl_virtbase(QCameraFlashControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QCameraFlashControl_MetaObject(const QCameraFlashControl* self); void* QCameraFlashControl_Metacast(QCameraFlashControl* self, const char* param1); struct miqt_string QCameraFlashControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qcamerafocus.cpp b/qt/multimedia/gen_qcamerafocus.cpp index 30d3d59a..6ca016f5 100644 --- a/qt/multimedia/gen_qcamerafocus.cpp +++ b/qt/multimedia/gen_qcamerafocus.cpp @@ -12,24 +12,20 @@ #include "gen_qcamerafocus.h" #include "_cgo_export.h" -void QCameraFocusZone_new(QCameraFocusZone** outptr_QCameraFocusZone) { - QCameraFocusZone* ret = new QCameraFocusZone(); - *outptr_QCameraFocusZone = ret; +QCameraFocusZone* QCameraFocusZone_new() { + return new QCameraFocusZone(); } -void QCameraFocusZone_new2(QRectF* area, QCameraFocusZone** outptr_QCameraFocusZone) { - QCameraFocusZone* ret = new QCameraFocusZone(*area); - *outptr_QCameraFocusZone = ret; +QCameraFocusZone* QCameraFocusZone_new2(QRectF* area) { + return new QCameraFocusZone(*area); } -void QCameraFocusZone_new3(QCameraFocusZone* other, QCameraFocusZone** outptr_QCameraFocusZone) { - QCameraFocusZone* ret = new QCameraFocusZone(*other); - *outptr_QCameraFocusZone = ret; +QCameraFocusZone* QCameraFocusZone_new3(QCameraFocusZone* other) { + return new QCameraFocusZone(*other); } -void QCameraFocusZone_new4(QRectF* area, int status, QCameraFocusZone** outptr_QCameraFocusZone) { - QCameraFocusZone* ret = new QCameraFocusZone(*area, static_cast(status)); - *outptr_QCameraFocusZone = ret; +QCameraFocusZone* QCameraFocusZone_new4(QRectF* area, int status) { + return new QCameraFocusZone(*area, static_cast(status)); } void QCameraFocusZone_OperatorAssign(QCameraFocusZone* self, QCameraFocusZone* other) { @@ -69,6 +65,10 @@ void QCameraFocusZone_Delete(QCameraFocusZone* self, bool isSubclass) { } } +void QCameraFocus_virtbase(QCameraFocus* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QCameraFocus_MetaObject(const QCameraFocus* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcamerafocus.go b/qt/multimedia/gen_qcamerafocus.go index cf80a73d..ce042b22 100644 --- a/qt/multimedia/gen_qcamerafocus.go +++ b/qt/multimedia/gen_qcamerafocus.go @@ -68,54 +68,43 @@ func newQCameraFocusZone(h *C.QCameraFocusZone) *QCameraFocusZone { if h == nil { return nil } + return &QCameraFocusZone{h: h} } // UnsafeNewQCameraFocusZone constructs the type using only unsafe pointers. func UnsafeNewQCameraFocusZone(h unsafe.Pointer) *QCameraFocusZone { - if h == nil { - return nil - } - - return &QCameraFocusZone{h: (*C.QCameraFocusZone)(h)} + return newQCameraFocusZone((*C.QCameraFocusZone)(h)) } // NewQCameraFocusZone constructs a new QCameraFocusZone object. func NewQCameraFocusZone() *QCameraFocusZone { - var outptr_QCameraFocusZone *C.QCameraFocusZone = nil - C.QCameraFocusZone_new(&outptr_QCameraFocusZone) - ret := newQCameraFocusZone(outptr_QCameraFocusZone) + ret := newQCameraFocusZone(C.QCameraFocusZone_new()) ret.isSubclass = true return ret } // NewQCameraFocusZone2 constructs a new QCameraFocusZone object. func NewQCameraFocusZone2(area *qt.QRectF) *QCameraFocusZone { - var outptr_QCameraFocusZone *C.QCameraFocusZone = nil - C.QCameraFocusZone_new2((*C.QRectF)(area.UnsafePointer()), &outptr_QCameraFocusZone) - ret := newQCameraFocusZone(outptr_QCameraFocusZone) + ret := newQCameraFocusZone(C.QCameraFocusZone_new2((*C.QRectF)(area.UnsafePointer()))) ret.isSubclass = true return ret } // NewQCameraFocusZone3 constructs a new QCameraFocusZone object. func NewQCameraFocusZone3(other *QCameraFocusZone) *QCameraFocusZone { - var outptr_QCameraFocusZone *C.QCameraFocusZone = nil - C.QCameraFocusZone_new3(other.cPointer(), &outptr_QCameraFocusZone) - ret := newQCameraFocusZone(outptr_QCameraFocusZone) + ret := newQCameraFocusZone(C.QCameraFocusZone_new3(other.cPointer())) ret.isSubclass = true return ret } // NewQCameraFocusZone4 constructs a new QCameraFocusZone object. func NewQCameraFocusZone4(area *qt.QRectF, status QCameraFocusZone__FocusZoneStatus) *QCameraFocusZone { - var outptr_QCameraFocusZone *C.QCameraFocusZone = nil - C.QCameraFocusZone_new4((*C.QRectF)(area.UnsafePointer()), (C.int)(status), &outptr_QCameraFocusZone) - ret := newQCameraFocusZone(outptr_QCameraFocusZone) + ret := newQCameraFocusZone(C.QCameraFocusZone_new4((*C.QRectF)(area.UnsafePointer()), (C.int)(status))) ret.isSubclass = true return ret } @@ -185,22 +174,20 @@ func (this *QCameraFocus) UnsafePointer() unsafe.Pointer { } // newQCameraFocus constructs the type using only CGO pointers. -func newQCameraFocus(h *C.QCameraFocus, h_QObject *C.QObject) *QCameraFocus { +func newQCameraFocus(h *C.QCameraFocus) *QCameraFocus { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QCameraFocus_virtbase(h, &outptr_QObject) + return &QCameraFocus{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQCameraFocus constructs the type using only unsafe pointers. -func UnsafeNewQCameraFocus(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraFocus { - if h == nil { - return nil - } - - return &QCameraFocus{h: (*C.QCameraFocus)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQCameraFocus(h unsafe.Pointer) *QCameraFocus { + return newQCameraFocus((*C.QCameraFocus)(h)) } func (this *QCameraFocus) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcamerafocus.h b/qt/multimedia/gen_qcamerafocus.h index c0145696..58f1cf8b 100644 --- a/qt/multimedia/gen_qcamerafocus.h +++ b/qt/multimedia/gen_qcamerafocus.h @@ -30,10 +30,10 @@ typedef struct QPointF QPointF; typedef struct QRectF QRectF; #endif -void QCameraFocusZone_new(QCameraFocusZone** outptr_QCameraFocusZone); -void QCameraFocusZone_new2(QRectF* area, QCameraFocusZone** outptr_QCameraFocusZone); -void QCameraFocusZone_new3(QCameraFocusZone* other, QCameraFocusZone** outptr_QCameraFocusZone); -void QCameraFocusZone_new4(QRectF* area, int status, QCameraFocusZone** outptr_QCameraFocusZone); +QCameraFocusZone* QCameraFocusZone_new(); +QCameraFocusZone* QCameraFocusZone_new2(QRectF* area); +QCameraFocusZone* QCameraFocusZone_new3(QCameraFocusZone* other); +QCameraFocusZone* QCameraFocusZone_new4(QRectF* area, int status); void QCameraFocusZone_OperatorAssign(QCameraFocusZone* self, QCameraFocusZone* other); bool QCameraFocusZone_OperatorEqual(const QCameraFocusZone* self, QCameraFocusZone* other); bool QCameraFocusZone_OperatorNotEqual(const QCameraFocusZone* self, QCameraFocusZone* other); @@ -43,6 +43,7 @@ int QCameraFocusZone_Status(const QCameraFocusZone* self); void QCameraFocusZone_SetStatus(QCameraFocusZone* self, int status); void QCameraFocusZone_Delete(QCameraFocusZone* self, bool isSubclass); +void QCameraFocus_virtbase(QCameraFocus* src, QObject** outptr_QObject); QMetaObject* QCameraFocus_MetaObject(const QCameraFocus* self); void* QCameraFocus_Metacast(QCameraFocus* self, const char* param1); struct miqt_string QCameraFocus_Tr(const char* s); diff --git a/qt/multimedia/gen_qcamerafocuscontrol.cpp b/qt/multimedia/gen_qcamerafocuscontrol.cpp index f0a2c2e4..d4110c62 100644 --- a/qt/multimedia/gen_qcamerafocuscontrol.cpp +++ b/qt/multimedia/gen_qcamerafocuscontrol.cpp @@ -12,6 +12,10 @@ #include "gen_qcamerafocuscontrol.h" #include "_cgo_export.h" +void QCameraFocusControl_virtbase(QCameraFocusControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QCameraFocusControl_MetaObject(const QCameraFocusControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcamerafocuscontrol.go b/qt/multimedia/gen_qcamerafocuscontrol.go index 2b6be47d..b314bd0b 100644 --- a/qt/multimedia/gen_qcamerafocuscontrol.go +++ b/qt/multimedia/gen_qcamerafocuscontrol.go @@ -36,22 +36,20 @@ func (this *QCameraFocusControl) UnsafePointer() unsafe.Pointer { } // newQCameraFocusControl constructs the type using only CGO pointers. -func newQCameraFocusControl(h *C.QCameraFocusControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraFocusControl { +func newQCameraFocusControl(h *C.QCameraFocusControl) *QCameraFocusControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QCameraFocusControl_virtbase(h, &outptr_QMediaControl) + return &QCameraFocusControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQCameraFocusControl constructs the type using only unsafe pointers. -func UnsafeNewQCameraFocusControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraFocusControl { - if h == nil { - return nil - } - - return &QCameraFocusControl{h: (*C.QCameraFocusControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQCameraFocusControl(h unsafe.Pointer) *QCameraFocusControl { + return newQCameraFocusControl((*C.QCameraFocusControl)(h)) } func (this *QCameraFocusControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcamerafocuscontrol.h b/qt/multimedia/gen_qcamerafocuscontrol.h index bd3056dc..2346a58e 100644 --- a/qt/multimedia/gen_qcamerafocuscontrol.h +++ b/qt/multimedia/gen_qcamerafocuscontrol.h @@ -30,6 +30,7 @@ typedef struct QObject QObject; typedef struct QPointF QPointF; #endif +void QCameraFocusControl_virtbase(QCameraFocusControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QCameraFocusControl_MetaObject(const QCameraFocusControl* self); void* QCameraFocusControl_Metacast(QCameraFocusControl* self, const char* param1); struct miqt_string QCameraFocusControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qcameraimagecapture.cpp b/qt/multimedia/gen_qcameraimagecapture.cpp index a80e83c0..826651f5 100644 --- a/qt/multimedia/gen_qcameraimagecapture.cpp +++ b/qt/multimedia/gen_qcameraimagecapture.cpp @@ -246,18 +246,17 @@ public: }; -void QCameraImageCapture_new(QMediaObject* mediaObject, QCameraImageCapture** outptr_QCameraImageCapture, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQCameraImageCapture* ret = new MiqtVirtualQCameraImageCapture(mediaObject); - *outptr_QCameraImageCapture = ret; - *outptr_QObject = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QCameraImageCapture* QCameraImageCapture_new(QMediaObject* mediaObject) { + return new MiqtVirtualQCameraImageCapture(mediaObject); } -void QCameraImageCapture_new2(QMediaObject* mediaObject, QObject* parent, QCameraImageCapture** outptr_QCameraImageCapture, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQCameraImageCapture* ret = new MiqtVirtualQCameraImageCapture(mediaObject, parent); - *outptr_QCameraImageCapture = ret; - *outptr_QObject = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QCameraImageCapture* QCameraImageCapture_new2(QMediaObject* mediaObject, QObject* parent) { + return new MiqtVirtualQCameraImageCapture(mediaObject, parent); +} + +void QCameraImageCapture_virtbase(QCameraImageCapture* src, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { + *outptr_QObject = static_cast(src); + *outptr_QMediaBindableInterface = static_cast(src); } QMetaObject* QCameraImageCapture_MetaObject(const QCameraImageCapture* self) { diff --git a/qt/multimedia/gen_qcameraimagecapture.go b/qt/multimedia/gen_qcameraimagecapture.go index 6c3eba48..4af55a54 100644 --- a/qt/multimedia/gen_qcameraimagecapture.go +++ b/qt/multimedia/gen_qcameraimagecapture.go @@ -61,46 +61,36 @@ func (this *QCameraImageCapture) UnsafePointer() unsafe.Pointer { } // newQCameraImageCapture constructs the type using only CGO pointers. -func newQCameraImageCapture(h *C.QCameraImageCapture, h_QObject *C.QObject, h_QMediaBindableInterface *C.QMediaBindableInterface) *QCameraImageCapture { +func newQCameraImageCapture(h *C.QCameraImageCapture) *QCameraImageCapture { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + C.QCameraImageCapture_virtbase(h, &outptr_QObject, &outptr_QMediaBindableInterface) + return &QCameraImageCapture{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject)), - QMediaBindableInterface: newQMediaBindableInterface(h_QMediaBindableInterface)} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject)), + QMediaBindableInterface: newQMediaBindableInterface(outptr_QMediaBindableInterface)} } // UnsafeNewQCameraImageCapture constructs the type using only unsafe pointers. -func UnsafeNewQCameraImageCapture(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QCameraImageCapture { - if h == nil { - return nil - } - - return &QCameraImageCapture{h: (*C.QCameraImageCapture)(h), - QObject: qt.UnsafeNewQObject(h_QObject), - QMediaBindableInterface: UnsafeNewQMediaBindableInterface(h_QMediaBindableInterface)} +func UnsafeNewQCameraImageCapture(h unsafe.Pointer) *QCameraImageCapture { + return newQCameraImageCapture((*C.QCameraImageCapture)(h)) } // NewQCameraImageCapture constructs a new QCameraImageCapture object. func NewQCameraImageCapture(mediaObject *QMediaObject) *QCameraImageCapture { - var outptr_QCameraImageCapture *C.QCameraImageCapture = nil - var outptr_QObject *C.QObject = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QCameraImageCapture_new(mediaObject.cPointer(), &outptr_QCameraImageCapture, &outptr_QObject, &outptr_QMediaBindableInterface) - ret := newQCameraImageCapture(outptr_QCameraImageCapture, outptr_QObject, outptr_QMediaBindableInterface) + ret := newQCameraImageCapture(C.QCameraImageCapture_new(mediaObject.cPointer())) ret.isSubclass = true return ret } // NewQCameraImageCapture2 constructs a new QCameraImageCapture object. func NewQCameraImageCapture2(mediaObject *QMediaObject, parent *qt.QObject) *QCameraImageCapture { - var outptr_QCameraImageCapture *C.QCameraImageCapture = nil - var outptr_QObject *C.QObject = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QCameraImageCapture_new2(mediaObject.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QCameraImageCapture, &outptr_QObject, &outptr_QMediaBindableInterface) - ret := newQCameraImageCapture(outptr_QCameraImageCapture, outptr_QObject, outptr_QMediaBindableInterface) + ret := newQCameraImageCapture(C.QCameraImageCapture_new2(mediaObject.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -142,7 +132,7 @@ func (this *QCameraImageCapture) Availability() QMultimedia__AvailabilityStatus } func (this *QCameraImageCapture) MediaObject() *QMediaObject { - return newQMediaObject(C.QCameraImageCapture_MediaObject(this.h), nil) + return newQMediaObject(C.QCameraImageCapture_MediaObject(this.h)) } func (this *QCameraImageCapture) Error() QCameraImageCapture__Error { @@ -372,7 +362,7 @@ func miqt_exec_callback_QCameraImageCapture_ImageCaptured(cb C.intptr_t, id C.in // Convert all CABI parameters to Go parameters slotval1 := (int)(id) - slotval2 := qt.UnsafeNewQImage(unsafe.Pointer(preview), nil) + slotval2 := qt.UnsafeNewQImage(unsafe.Pointer(preview)) gofunc(slotval1, slotval2) } @@ -536,7 +526,7 @@ func (this *QCameraImageCapture) Capture1(location string) int { func (this *QCameraImageCapture) callVirtualBase_MediaObject() *QMediaObject { - return newQMediaObject(C.QCameraImageCapture_virtualbase_MediaObject(unsafe.Pointer(this.h)), nil) + return newQMediaObject(C.QCameraImageCapture_virtualbase_MediaObject(unsafe.Pointer(this.h))) } func (this *QCameraImageCapture) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { @@ -579,7 +569,7 @@ func miqt_exec_callback_QCameraImageCapture_SetMediaObject(self *C.QCameraImageC } // Convert all CABI parameters to Go parameters - slotval1 := newQMediaObject(mediaObject, nil) + slotval1 := newQMediaObject(mediaObject) virtualReturn := gofunc((&QCameraImageCapture{h: self}).callVirtualBase_SetMediaObject, slotval1) @@ -665,7 +655,7 @@ func miqt_exec_callback_QCameraImageCapture_TimerEvent(self *C.QCameraImageCaptu } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QCameraImageCapture{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -691,7 +681,7 @@ func miqt_exec_callback_QCameraImageCapture_ChildEvent(self *C.QCameraImageCaptu } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QCameraImageCapture{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/multimedia/gen_qcameraimagecapture.h b/qt/multimedia/gen_qcameraimagecapture.h index f95797ca..d7a34473 100644 --- a/qt/multimedia/gen_qcameraimagecapture.h +++ b/qt/multimedia/gen_qcameraimagecapture.h @@ -46,8 +46,9 @@ typedef struct QVariant QVariant; typedef struct QVideoFrame QVideoFrame; #endif -void QCameraImageCapture_new(QMediaObject* mediaObject, QCameraImageCapture** outptr_QCameraImageCapture, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); -void QCameraImageCapture_new2(QMediaObject* mediaObject, QObject* parent, QCameraImageCapture** outptr_QCameraImageCapture, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); +QCameraImageCapture* QCameraImageCapture_new(QMediaObject* mediaObject); +QCameraImageCapture* QCameraImageCapture_new2(QMediaObject* mediaObject, QObject* parent); +void QCameraImageCapture_virtbase(QCameraImageCapture* src, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); QMetaObject* QCameraImageCapture_MetaObject(const QCameraImageCapture* self); void* QCameraImageCapture_Metacast(QCameraImageCapture* self, const char* param1); struct miqt_string QCameraImageCapture_Tr(const char* s); diff --git a/qt/multimedia/gen_qcameraimagecapturecontrol.cpp b/qt/multimedia/gen_qcameraimagecapturecontrol.cpp index 011925ec..c0d532c5 100644 --- a/qt/multimedia/gen_qcameraimagecapturecontrol.cpp +++ b/qt/multimedia/gen_qcameraimagecapturecontrol.cpp @@ -12,6 +12,10 @@ #include "gen_qcameraimagecapturecontrol.h" #include "_cgo_export.h" +void QCameraImageCaptureControl_virtbase(QCameraImageCaptureControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QCameraImageCaptureControl_MetaObject(const QCameraImageCaptureControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcameraimagecapturecontrol.go b/qt/multimedia/gen_qcameraimagecapturecontrol.go index 1c620654..42fe3a6e 100644 --- a/qt/multimedia/gen_qcameraimagecapturecontrol.go +++ b/qt/multimedia/gen_qcameraimagecapturecontrol.go @@ -36,22 +36,20 @@ func (this *QCameraImageCaptureControl) UnsafePointer() unsafe.Pointer { } // newQCameraImageCaptureControl constructs the type using only CGO pointers. -func newQCameraImageCaptureControl(h *C.QCameraImageCaptureControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraImageCaptureControl { +func newQCameraImageCaptureControl(h *C.QCameraImageCaptureControl) *QCameraImageCaptureControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QCameraImageCaptureControl_virtbase(h, &outptr_QMediaControl) + return &QCameraImageCaptureControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQCameraImageCaptureControl constructs the type using only unsafe pointers. -func UnsafeNewQCameraImageCaptureControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraImageCaptureControl { - if h == nil { - return nil - } - - return &QCameraImageCaptureControl{h: (*C.QCameraImageCaptureControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQCameraImageCaptureControl(h unsafe.Pointer) *QCameraImageCaptureControl { + return newQCameraImageCaptureControl((*C.QCameraImageCaptureControl)(h)) } func (this *QCameraImageCaptureControl) MetaObject() *qt.QMetaObject { @@ -163,7 +161,7 @@ func miqt_exec_callback_QCameraImageCaptureControl_ImageCaptured(cb C.intptr_t, // Convert all CABI parameters to Go parameters slotval1 := (int)(requestId) - slotval2 := qt.UnsafeNewQImage(unsafe.Pointer(preview), nil) + slotval2 := qt.UnsafeNewQImage(unsafe.Pointer(preview)) gofunc(slotval1, slotval2) } diff --git a/qt/multimedia/gen_qcameraimagecapturecontrol.h b/qt/multimedia/gen_qcameraimagecapturecontrol.h index 1a5ac541..ae6886bf 100644 --- a/qt/multimedia/gen_qcameraimagecapturecontrol.h +++ b/qt/multimedia/gen_qcameraimagecapturecontrol.h @@ -32,6 +32,7 @@ typedef struct QVariant QVariant; typedef struct QVideoFrame QVideoFrame; #endif +void QCameraImageCaptureControl_virtbase(QCameraImageCaptureControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QCameraImageCaptureControl_MetaObject(const QCameraImageCaptureControl* self); void* QCameraImageCaptureControl_Metacast(QCameraImageCaptureControl* self, const char* param1); struct miqt_string QCameraImageCaptureControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qcameraimageprocessing.cpp b/qt/multimedia/gen_qcameraimageprocessing.cpp index d51831f0..e62143f4 100644 --- a/qt/multimedia/gen_qcameraimageprocessing.cpp +++ b/qt/multimedia/gen_qcameraimageprocessing.cpp @@ -8,6 +8,10 @@ #include "gen_qcameraimageprocessing.h" #include "_cgo_export.h" +void QCameraImageProcessing_virtbase(QCameraImageProcessing* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QCameraImageProcessing_MetaObject(const QCameraImageProcessing* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcameraimageprocessing.go b/qt/multimedia/gen_qcameraimageprocessing.go index 9a2c40f3..5039126f 100644 --- a/qt/multimedia/gen_qcameraimageprocessing.go +++ b/qt/multimedia/gen_qcameraimageprocessing.go @@ -64,22 +64,20 @@ func (this *QCameraImageProcessing) UnsafePointer() unsafe.Pointer { } // newQCameraImageProcessing constructs the type using only CGO pointers. -func newQCameraImageProcessing(h *C.QCameraImageProcessing, h_QObject *C.QObject) *QCameraImageProcessing { +func newQCameraImageProcessing(h *C.QCameraImageProcessing) *QCameraImageProcessing { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QCameraImageProcessing_virtbase(h, &outptr_QObject) + return &QCameraImageProcessing{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQCameraImageProcessing constructs the type using only unsafe pointers. -func UnsafeNewQCameraImageProcessing(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraImageProcessing { - if h == nil { - return nil - } - - return &QCameraImageProcessing{h: (*C.QCameraImageProcessing)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQCameraImageProcessing(h unsafe.Pointer) *QCameraImageProcessing { + return newQCameraImageProcessing((*C.QCameraImageProcessing)(h)) } func (this *QCameraImageProcessing) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcameraimageprocessing.h b/qt/multimedia/gen_qcameraimageprocessing.h index 5a2ead99..9a8210ab 100644 --- a/qt/multimedia/gen_qcameraimageprocessing.h +++ b/qt/multimedia/gen_qcameraimageprocessing.h @@ -24,6 +24,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QCameraImageProcessing_virtbase(QCameraImageProcessing* src, QObject** outptr_QObject); QMetaObject* QCameraImageProcessing_MetaObject(const QCameraImageProcessing* self); void* QCameraImageProcessing_Metacast(QCameraImageProcessing* self, const char* param1); struct miqt_string QCameraImageProcessing_Tr(const char* s); diff --git a/qt/multimedia/gen_qcameraimageprocessingcontrol.cpp b/qt/multimedia/gen_qcameraimageprocessingcontrol.cpp index 280a72c4..5ee51af1 100644 --- a/qt/multimedia/gen_qcameraimageprocessingcontrol.cpp +++ b/qt/multimedia/gen_qcameraimageprocessingcontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qcameraimageprocessingcontrol.h" #include "_cgo_export.h" +void QCameraImageProcessingControl_virtbase(QCameraImageProcessingControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QCameraImageProcessingControl_MetaObject(const QCameraImageProcessingControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcameraimageprocessingcontrol.go b/qt/multimedia/gen_qcameraimageprocessingcontrol.go index 756e9393..6c599ba8 100644 --- a/qt/multimedia/gen_qcameraimageprocessingcontrol.go +++ b/qt/multimedia/gen_qcameraimageprocessingcontrol.go @@ -54,22 +54,20 @@ func (this *QCameraImageProcessingControl) UnsafePointer() unsafe.Pointer { } // newQCameraImageProcessingControl constructs the type using only CGO pointers. -func newQCameraImageProcessingControl(h *C.QCameraImageProcessingControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraImageProcessingControl { +func newQCameraImageProcessingControl(h *C.QCameraImageProcessingControl) *QCameraImageProcessingControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QCameraImageProcessingControl_virtbase(h, &outptr_QMediaControl) + return &QCameraImageProcessingControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQCameraImageProcessingControl constructs the type using only unsafe pointers. -func UnsafeNewQCameraImageProcessingControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraImageProcessingControl { - if h == nil { - return nil - } - - return &QCameraImageProcessingControl{h: (*C.QCameraImageProcessingControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQCameraImageProcessingControl(h unsafe.Pointer) *QCameraImageProcessingControl { + return newQCameraImageProcessingControl((*C.QCameraImageProcessingControl)(h)) } func (this *QCameraImageProcessingControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcameraimageprocessingcontrol.h b/qt/multimedia/gen_qcameraimageprocessingcontrol.h index 89565bec..9284ce29 100644 --- a/qt/multimedia/gen_qcameraimageprocessingcontrol.h +++ b/qt/multimedia/gen_qcameraimageprocessingcontrol.h @@ -28,6 +28,7 @@ typedef struct QObject QObject; typedef struct QVariant QVariant; #endif +void QCameraImageProcessingControl_virtbase(QCameraImageProcessingControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QCameraImageProcessingControl_MetaObject(const QCameraImageProcessingControl* self); void* QCameraImageProcessingControl_Metacast(QCameraImageProcessingControl* self, const char* param1); struct miqt_string QCameraImageProcessingControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qcamerainfo.cpp b/qt/multimedia/gen_qcamerainfo.cpp index 89be2dfc..17ca1023 100644 --- a/qt/multimedia/gen_qcamerainfo.cpp +++ b/qt/multimedia/gen_qcamerainfo.cpp @@ -9,25 +9,21 @@ #include "gen_qcamerainfo.h" #include "_cgo_export.h" -void QCameraInfo_new(QCameraInfo** outptr_QCameraInfo) { - QCameraInfo* ret = new QCameraInfo(); - *outptr_QCameraInfo = ret; +QCameraInfo* QCameraInfo_new() { + return new QCameraInfo(); } -void QCameraInfo_new2(QCamera* camera, QCameraInfo** outptr_QCameraInfo) { - QCameraInfo* ret = new QCameraInfo(*camera); - *outptr_QCameraInfo = ret; +QCameraInfo* QCameraInfo_new2(QCamera* camera) { + return new QCameraInfo(*camera); } -void QCameraInfo_new3(QCameraInfo* other, QCameraInfo** outptr_QCameraInfo) { - QCameraInfo* ret = new QCameraInfo(*other); - *outptr_QCameraInfo = ret; +QCameraInfo* QCameraInfo_new3(QCameraInfo* other) { + return new QCameraInfo(*other); } -void QCameraInfo_new4(struct miqt_string name, QCameraInfo** outptr_QCameraInfo) { +QCameraInfo* QCameraInfo_new4(struct miqt_string name) { QByteArray name_QByteArray(name.data, name.len); - QCameraInfo* ret = new QCameraInfo(name_QByteArray); - *outptr_QCameraInfo = ret; + return new QCameraInfo(name_QByteArray); } void QCameraInfo_OperatorAssign(QCameraInfo* self, QCameraInfo* other) { diff --git a/qt/multimedia/gen_qcamerainfo.go b/qt/multimedia/gen_qcamerainfo.go index 89206585..cfb73fef 100644 --- a/qt/multimedia/gen_qcamerainfo.go +++ b/qt/multimedia/gen_qcamerainfo.go @@ -37,44 +37,35 @@ func newQCameraInfo(h *C.QCameraInfo) *QCameraInfo { if h == nil { return nil } + return &QCameraInfo{h: h} } // UnsafeNewQCameraInfo constructs the type using only unsafe pointers. func UnsafeNewQCameraInfo(h unsafe.Pointer) *QCameraInfo { - if h == nil { - return nil - } - - return &QCameraInfo{h: (*C.QCameraInfo)(h)} + return newQCameraInfo((*C.QCameraInfo)(h)) } // NewQCameraInfo constructs a new QCameraInfo object. func NewQCameraInfo() *QCameraInfo { - var outptr_QCameraInfo *C.QCameraInfo = nil - C.QCameraInfo_new(&outptr_QCameraInfo) - ret := newQCameraInfo(outptr_QCameraInfo) + ret := newQCameraInfo(C.QCameraInfo_new()) ret.isSubclass = true return ret } // NewQCameraInfo2 constructs a new QCameraInfo object. func NewQCameraInfo2(camera *QCamera) *QCameraInfo { - var outptr_QCameraInfo *C.QCameraInfo = nil - C.QCameraInfo_new2(camera.cPointer(), &outptr_QCameraInfo) - ret := newQCameraInfo(outptr_QCameraInfo) + ret := newQCameraInfo(C.QCameraInfo_new2(camera.cPointer())) ret.isSubclass = true return ret } // NewQCameraInfo3 constructs a new QCameraInfo object. func NewQCameraInfo3(other *QCameraInfo) *QCameraInfo { - var outptr_QCameraInfo *C.QCameraInfo = nil - C.QCameraInfo_new3(other.cPointer(), &outptr_QCameraInfo) - ret := newQCameraInfo(outptr_QCameraInfo) + ret := newQCameraInfo(C.QCameraInfo_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -84,10 +75,8 @@ func NewQCameraInfo4(name []byte) *QCameraInfo { name_alias := C.struct_miqt_string{} name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) name_alias.len = C.size_t(len(name)) - var outptr_QCameraInfo *C.QCameraInfo = nil - C.QCameraInfo_new4(name_alias, &outptr_QCameraInfo) - ret := newQCameraInfo(outptr_QCameraInfo) + ret := newQCameraInfo(C.QCameraInfo_new4(name_alias)) ret.isSubclass = true return ret } diff --git a/qt/multimedia/gen_qcamerainfo.h b/qt/multimedia/gen_qcamerainfo.h index 665e62a2..8ffaffab 100644 --- a/qt/multimedia/gen_qcamerainfo.h +++ b/qt/multimedia/gen_qcamerainfo.h @@ -22,10 +22,10 @@ typedef struct QCamera QCamera; typedef struct QCameraInfo QCameraInfo; #endif -void QCameraInfo_new(QCameraInfo** outptr_QCameraInfo); -void QCameraInfo_new2(QCamera* camera, QCameraInfo** outptr_QCameraInfo); -void QCameraInfo_new3(QCameraInfo* other, QCameraInfo** outptr_QCameraInfo); -void QCameraInfo_new4(struct miqt_string name, QCameraInfo** outptr_QCameraInfo); +QCameraInfo* QCameraInfo_new(); +QCameraInfo* QCameraInfo_new2(QCamera* camera); +QCameraInfo* QCameraInfo_new3(QCameraInfo* other); +QCameraInfo* QCameraInfo_new4(struct miqt_string name); void QCameraInfo_OperatorAssign(QCameraInfo* self, QCameraInfo* other); bool QCameraInfo_OperatorEqual(const QCameraInfo* self, QCameraInfo* other); bool QCameraInfo_OperatorNotEqual(const QCameraInfo* self, QCameraInfo* other); diff --git a/qt/multimedia/gen_qcamerainfocontrol.cpp b/qt/multimedia/gen_qcamerainfocontrol.cpp index 86a1ce74..2f2e9abe 100644 --- a/qt/multimedia/gen_qcamerainfocontrol.cpp +++ b/qt/multimedia/gen_qcamerainfocontrol.cpp @@ -9,6 +9,10 @@ #include "gen_qcamerainfocontrol.h" #include "_cgo_export.h" +void QCameraInfoControl_virtbase(QCameraInfoControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QCameraInfoControl_MetaObject(const QCameraInfoControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcamerainfocontrol.go b/qt/multimedia/gen_qcamerainfocontrol.go index 47ac80eb..76abbfd4 100644 --- a/qt/multimedia/gen_qcamerainfocontrol.go +++ b/qt/multimedia/gen_qcamerainfocontrol.go @@ -35,22 +35,20 @@ func (this *QCameraInfoControl) UnsafePointer() unsafe.Pointer { } // newQCameraInfoControl constructs the type using only CGO pointers. -func newQCameraInfoControl(h *C.QCameraInfoControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraInfoControl { +func newQCameraInfoControl(h *C.QCameraInfoControl) *QCameraInfoControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QCameraInfoControl_virtbase(h, &outptr_QMediaControl) + return &QCameraInfoControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQCameraInfoControl constructs the type using only unsafe pointers. -func UnsafeNewQCameraInfoControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraInfoControl { - if h == nil { - return nil - } - - return &QCameraInfoControl{h: (*C.QCameraInfoControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQCameraInfoControl(h unsafe.Pointer) *QCameraInfoControl { + return newQCameraInfoControl((*C.QCameraInfoControl)(h)) } func (this *QCameraInfoControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcamerainfocontrol.h b/qt/multimedia/gen_qcamerainfocontrol.h index 75b59e58..5eb67f5a 100644 --- a/qt/multimedia/gen_qcamerainfocontrol.h +++ b/qt/multimedia/gen_qcamerainfocontrol.h @@ -26,6 +26,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QCameraInfoControl_virtbase(QCameraInfoControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QCameraInfoControl_MetaObject(const QCameraInfoControl* self); void* QCameraInfoControl_Metacast(QCameraInfoControl* self, const char* param1); struct miqt_string QCameraInfoControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qcameralockscontrol.cpp b/qt/multimedia/gen_qcameralockscontrol.cpp index 17b536d5..41256afc 100644 --- a/qt/multimedia/gen_qcameralockscontrol.cpp +++ b/qt/multimedia/gen_qcameralockscontrol.cpp @@ -9,6 +9,10 @@ #include "gen_qcameralockscontrol.h" #include "_cgo_export.h" +void QCameraLocksControl_virtbase(QCameraLocksControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QCameraLocksControl_MetaObject(const QCameraLocksControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcameralockscontrol.go b/qt/multimedia/gen_qcameralockscontrol.go index eaeb9ff3..637ba143 100644 --- a/qt/multimedia/gen_qcameralockscontrol.go +++ b/qt/multimedia/gen_qcameralockscontrol.go @@ -36,22 +36,20 @@ func (this *QCameraLocksControl) UnsafePointer() unsafe.Pointer { } // newQCameraLocksControl constructs the type using only CGO pointers. -func newQCameraLocksControl(h *C.QCameraLocksControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraLocksControl { +func newQCameraLocksControl(h *C.QCameraLocksControl) *QCameraLocksControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QCameraLocksControl_virtbase(h, &outptr_QMediaControl) + return &QCameraLocksControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQCameraLocksControl constructs the type using only unsafe pointers. -func UnsafeNewQCameraLocksControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraLocksControl { - if h == nil { - return nil - } - - return &QCameraLocksControl{h: (*C.QCameraLocksControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQCameraLocksControl(h unsafe.Pointer) *QCameraLocksControl { + return newQCameraLocksControl((*C.QCameraLocksControl)(h)) } func (this *QCameraLocksControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcameralockscontrol.h b/qt/multimedia/gen_qcameralockscontrol.h index 52ed03d6..f016598b 100644 --- a/qt/multimedia/gen_qcameralockscontrol.h +++ b/qt/multimedia/gen_qcameralockscontrol.h @@ -26,6 +26,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QCameraLocksControl_virtbase(QCameraLocksControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QCameraLocksControl_MetaObject(const QCameraLocksControl* self); void* QCameraLocksControl_Metacast(QCameraLocksControl* self, const char* param1); struct miqt_string QCameraLocksControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qcameraviewfinder.cpp b/qt/multimedia/gen_qcameraviewfinder.cpp index f4778e1a..3531d747 100644 --- a/qt/multimedia/gen_qcameraviewfinder.cpp +++ b/qt/multimedia/gen_qcameraviewfinder.cpp @@ -240,24 +240,16 @@ public: }; -void QCameraViewfinder_new(QWidget* parent, QCameraViewfinder** outptr_QCameraViewfinder, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQCameraViewfinder* ret = new MiqtVirtualQCameraViewfinder(parent); - *outptr_QCameraViewfinder = ret; - *outptr_QVideoWidget = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QCameraViewfinder* QCameraViewfinder_new(QWidget* parent) { + return new MiqtVirtualQCameraViewfinder(parent); } -void QCameraViewfinder_new2(QCameraViewfinder** outptr_QCameraViewfinder, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQCameraViewfinder* ret = new MiqtVirtualQCameraViewfinder(); - *outptr_QCameraViewfinder = ret; - *outptr_QVideoWidget = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QCameraViewfinder* QCameraViewfinder_new2() { + return new MiqtVirtualQCameraViewfinder(); +} + +void QCameraViewfinder_virtbase(QCameraViewfinder* src, QVideoWidget** outptr_QVideoWidget) { + *outptr_QVideoWidget = static_cast(src); } QMetaObject* QCameraViewfinder_MetaObject(const QCameraViewfinder* self) { diff --git a/qt/multimedia/gen_qcameraviewfinder.go b/qt/multimedia/gen_qcameraviewfinder.go index 4d47a825..23cd3979 100644 --- a/qt/multimedia/gen_qcameraviewfinder.go +++ b/qt/multimedia/gen_qcameraviewfinder.go @@ -36,50 +36,34 @@ func (this *QCameraViewfinder) UnsafePointer() unsafe.Pointer { } // newQCameraViewfinder constructs the type using only CGO pointers. -func newQCameraViewfinder(h *C.QCameraViewfinder, h_QVideoWidget *C.QVideoWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice, h_QMediaBindableInterface *C.QMediaBindableInterface) *QCameraViewfinder { +func newQCameraViewfinder(h *C.QCameraViewfinder) *QCameraViewfinder { if h == nil { return nil } + var outptr_QVideoWidget *C.QVideoWidget = nil + C.QCameraViewfinder_virtbase(h, &outptr_QVideoWidget) + return &QCameraViewfinder{h: h, - QVideoWidget: newQVideoWidget(h_QVideoWidget, h_QWidget, h_QObject, h_QPaintDevice, h_QMediaBindableInterface)} + QVideoWidget: newQVideoWidget(outptr_QVideoWidget)} } // UnsafeNewQCameraViewfinder constructs the type using only unsafe pointers. -func UnsafeNewQCameraViewfinder(h unsafe.Pointer, h_QVideoWidget unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QCameraViewfinder { - if h == nil { - return nil - } - - return &QCameraViewfinder{h: (*C.QCameraViewfinder)(h), - QVideoWidget: UnsafeNewQVideoWidget(h_QVideoWidget, h_QWidget, h_QObject, h_QPaintDevice, h_QMediaBindableInterface)} +func UnsafeNewQCameraViewfinder(h unsafe.Pointer) *QCameraViewfinder { + return newQCameraViewfinder((*C.QCameraViewfinder)(h)) } // NewQCameraViewfinder constructs a new QCameraViewfinder object. func NewQCameraViewfinder(parent *qt.QWidget) *QCameraViewfinder { - var outptr_QCameraViewfinder *C.QCameraViewfinder = nil - var outptr_QVideoWidget *C.QVideoWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QCameraViewfinder_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QCameraViewfinder, &outptr_QVideoWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice, &outptr_QMediaBindableInterface) - ret := newQCameraViewfinder(outptr_QCameraViewfinder, outptr_QVideoWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice, outptr_QMediaBindableInterface) + ret := newQCameraViewfinder(C.QCameraViewfinder_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQCameraViewfinder2 constructs a new QCameraViewfinder object. func NewQCameraViewfinder2() *QCameraViewfinder { - var outptr_QCameraViewfinder *C.QCameraViewfinder = nil - var outptr_QVideoWidget *C.QVideoWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QCameraViewfinder_new2(&outptr_QCameraViewfinder, &outptr_QVideoWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice, &outptr_QMediaBindableInterface) - ret := newQCameraViewfinder(outptr_QCameraViewfinder, outptr_QVideoWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice, outptr_QMediaBindableInterface) + ret := newQCameraViewfinder(C.QCameraViewfinder_new2()) ret.isSubclass = true return ret } @@ -113,7 +97,7 @@ func QCameraViewfinder_TrUtf8(s string) string { } func (this *QCameraViewfinder) MediaObject() *QMediaObject { - return newQMediaObject(C.QCameraViewfinder_MediaObject(this.h), nil) + return newQMediaObject(C.QCameraViewfinder_MediaObject(this.h)) } func QCameraViewfinder_Tr2(s string, c string) string { @@ -162,7 +146,7 @@ func QCameraViewfinder_TrUtf83(s string, c string, n int) string { func (this *QCameraViewfinder) callVirtualBase_MediaObject() *QMediaObject { - return newQMediaObject(C.QCameraViewfinder_virtualbase_MediaObject(unsafe.Pointer(this.h)), nil) + return newQMediaObject(C.QCameraViewfinder_virtualbase_MediaObject(unsafe.Pointer(this.h))) } func (this *QCameraViewfinder) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { @@ -205,7 +189,7 @@ func miqt_exec_callback_QCameraViewfinder_SetMediaObject(self *C.QCameraViewfind } // Convert all CABI parameters to Go parameters - slotval1 := newQMediaObject(object, nil) + slotval1 := newQMediaObject(object) virtualReturn := gofunc((&QCameraViewfinder{h: self}).callVirtualBase_SetMediaObject, slotval1) @@ -288,7 +272,7 @@ func miqt_exec_callback_QCameraViewfinder_ShowEvent(self *C.QCameraViewfinder, c } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event)) gofunc((&QCameraViewfinder{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -314,7 +298,7 @@ func miqt_exec_callback_QCameraViewfinder_HideEvent(self *C.QCameraViewfinder, c } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event)) gofunc((&QCameraViewfinder{h: self}).callVirtualBase_HideEvent, slotval1) @@ -340,7 +324,7 @@ func miqt_exec_callback_QCameraViewfinder_ResizeEvent(self *C.QCameraViewfinder, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event)) gofunc((&QCameraViewfinder{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -366,7 +350,7 @@ func miqt_exec_callback_QCameraViewfinder_MoveEvent(self *C.QCameraViewfinder, c } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event)) gofunc((&QCameraViewfinder{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -392,7 +376,7 @@ func miqt_exec_callback_QCameraViewfinder_PaintEvent(self *C.QCameraViewfinder, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event)) gofunc((&QCameraViewfinder{h: self}).callVirtualBase_PaintEvent, slotval1) diff --git a/qt/multimedia/gen_qcameraviewfinder.h b/qt/multimedia/gen_qcameraviewfinder.h index c7cadd85..2dd63ad6 100644 --- a/qt/multimedia/gen_qcameraviewfinder.h +++ b/qt/multimedia/gen_qcameraviewfinder.h @@ -48,8 +48,9 @@ typedef struct QVideoWidget QVideoWidget; typedef struct QWidget QWidget; #endif -void QCameraViewfinder_new(QWidget* parent, QCameraViewfinder** outptr_QCameraViewfinder, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface); -void QCameraViewfinder_new2(QCameraViewfinder** outptr_QCameraViewfinder, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface); +QCameraViewfinder* QCameraViewfinder_new(QWidget* parent); +QCameraViewfinder* QCameraViewfinder_new2(); +void QCameraViewfinder_virtbase(QCameraViewfinder* src, QVideoWidget** outptr_QVideoWidget); QMetaObject* QCameraViewfinder_MetaObject(const QCameraViewfinder* self); void* QCameraViewfinder_Metacast(QCameraViewfinder* self, const char* param1); struct miqt_string QCameraViewfinder_Tr(const char* s); diff --git a/qt/multimedia/gen_qcameraviewfindersettings.cpp b/qt/multimedia/gen_qcameraviewfindersettings.cpp index e0241021..973936c4 100644 --- a/qt/multimedia/gen_qcameraviewfindersettings.cpp +++ b/qt/multimedia/gen_qcameraviewfindersettings.cpp @@ -4,14 +4,12 @@ #include "gen_qcameraviewfindersettings.h" #include "_cgo_export.h" -void QCameraViewfinderSettings_new(QCameraViewfinderSettings** outptr_QCameraViewfinderSettings) { - QCameraViewfinderSettings* ret = new QCameraViewfinderSettings(); - *outptr_QCameraViewfinderSettings = ret; +QCameraViewfinderSettings* QCameraViewfinderSettings_new() { + return new QCameraViewfinderSettings(); } -void QCameraViewfinderSettings_new2(QCameraViewfinderSettings* other, QCameraViewfinderSettings** outptr_QCameraViewfinderSettings) { - QCameraViewfinderSettings* ret = new QCameraViewfinderSettings(*other); - *outptr_QCameraViewfinderSettings = ret; +QCameraViewfinderSettings* QCameraViewfinderSettings_new2(QCameraViewfinderSettings* other) { + return new QCameraViewfinderSettings(*other); } void QCameraViewfinderSettings_OperatorAssign(QCameraViewfinderSettings* self, QCameraViewfinderSettings* other) { diff --git a/qt/multimedia/gen_qcameraviewfindersettings.go b/qt/multimedia/gen_qcameraviewfindersettings.go index 2e674fee..d01f42c0 100644 --- a/qt/multimedia/gen_qcameraviewfindersettings.go +++ b/qt/multimedia/gen_qcameraviewfindersettings.go @@ -38,34 +38,27 @@ func newQCameraViewfinderSettings(h *C.QCameraViewfinderSettings) *QCameraViewfi if h == nil { return nil } + return &QCameraViewfinderSettings{h: h} } // UnsafeNewQCameraViewfinderSettings constructs the type using only unsafe pointers. func UnsafeNewQCameraViewfinderSettings(h unsafe.Pointer) *QCameraViewfinderSettings { - if h == nil { - return nil - } - - return &QCameraViewfinderSettings{h: (*C.QCameraViewfinderSettings)(h)} + return newQCameraViewfinderSettings((*C.QCameraViewfinderSettings)(h)) } // NewQCameraViewfinderSettings constructs a new QCameraViewfinderSettings object. func NewQCameraViewfinderSettings() *QCameraViewfinderSettings { - var outptr_QCameraViewfinderSettings *C.QCameraViewfinderSettings = nil - C.QCameraViewfinderSettings_new(&outptr_QCameraViewfinderSettings) - ret := newQCameraViewfinderSettings(outptr_QCameraViewfinderSettings) + ret := newQCameraViewfinderSettings(C.QCameraViewfinderSettings_new()) ret.isSubclass = true return ret } // NewQCameraViewfinderSettings2 constructs a new QCameraViewfinderSettings object. func NewQCameraViewfinderSettings2(other *QCameraViewfinderSettings) *QCameraViewfinderSettings { - var outptr_QCameraViewfinderSettings *C.QCameraViewfinderSettings = nil - C.QCameraViewfinderSettings_new2(other.cPointer(), &outptr_QCameraViewfinderSettings) - ret := newQCameraViewfinderSettings(outptr_QCameraViewfinderSettings) + ret := newQCameraViewfinderSettings(C.QCameraViewfinderSettings_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/multimedia/gen_qcameraviewfindersettings.h b/qt/multimedia/gen_qcameraviewfindersettings.h index 78868e28..bfa63964 100644 --- a/qt/multimedia/gen_qcameraviewfindersettings.h +++ b/qt/multimedia/gen_qcameraviewfindersettings.h @@ -22,8 +22,8 @@ typedef struct QCameraViewfinderSettings QCameraViewfinderSettings; typedef struct QSize QSize; #endif -void QCameraViewfinderSettings_new(QCameraViewfinderSettings** outptr_QCameraViewfinderSettings); -void QCameraViewfinderSettings_new2(QCameraViewfinderSettings* other, QCameraViewfinderSettings** outptr_QCameraViewfinderSettings); +QCameraViewfinderSettings* QCameraViewfinderSettings_new(); +QCameraViewfinderSettings* QCameraViewfinderSettings_new2(QCameraViewfinderSettings* other); void QCameraViewfinderSettings_OperatorAssign(QCameraViewfinderSettings* self, QCameraViewfinderSettings* other); void QCameraViewfinderSettings_Swap(QCameraViewfinderSettings* self, QCameraViewfinderSettings* other); bool QCameraViewfinderSettings_IsNull(const QCameraViewfinderSettings* self); diff --git a/qt/multimedia/gen_qcameraviewfindersettingscontrol.cpp b/qt/multimedia/gen_qcameraviewfindersettingscontrol.cpp index 06fed1c9..79188ca5 100644 --- a/qt/multimedia/gen_qcameraviewfindersettingscontrol.cpp +++ b/qt/multimedia/gen_qcameraviewfindersettingscontrol.cpp @@ -13,6 +13,10 @@ #include "gen_qcameraviewfindersettingscontrol.h" #include "_cgo_export.h" +void QCameraViewfinderSettingsControl_virtbase(QCameraViewfinderSettingsControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QCameraViewfinderSettingsControl_MetaObject(const QCameraViewfinderSettingsControl* self) { return (QMetaObject*) self->metaObject(); } @@ -107,6 +111,10 @@ void QCameraViewfinderSettingsControl_Delete(QCameraViewfinderSettingsControl* s } } +void QCameraViewfinderSettingsControl2_virtbase(QCameraViewfinderSettingsControl2* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QCameraViewfinderSettingsControl2_MetaObject(const QCameraViewfinderSettingsControl2* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcameraviewfindersettingscontrol.go b/qt/multimedia/gen_qcameraviewfindersettingscontrol.go index 8dce2abc..04d5a3fd 100644 --- a/qt/multimedia/gen_qcameraviewfindersettingscontrol.go +++ b/qt/multimedia/gen_qcameraviewfindersettingscontrol.go @@ -46,22 +46,20 @@ func (this *QCameraViewfinderSettingsControl) UnsafePointer() unsafe.Pointer { } // newQCameraViewfinderSettingsControl constructs the type using only CGO pointers. -func newQCameraViewfinderSettingsControl(h *C.QCameraViewfinderSettingsControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraViewfinderSettingsControl { +func newQCameraViewfinderSettingsControl(h *C.QCameraViewfinderSettingsControl) *QCameraViewfinderSettingsControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QCameraViewfinderSettingsControl_virtbase(h, &outptr_QMediaControl) + return &QCameraViewfinderSettingsControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQCameraViewfinderSettingsControl constructs the type using only unsafe pointers. -func UnsafeNewQCameraViewfinderSettingsControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraViewfinderSettingsControl { - if h == nil { - return nil - } - - return &QCameraViewfinderSettingsControl{h: (*C.QCameraViewfinderSettingsControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQCameraViewfinderSettingsControl(h unsafe.Pointer) *QCameraViewfinderSettingsControl { + return newQCameraViewfinderSettingsControl((*C.QCameraViewfinderSettingsControl)(h)) } func (this *QCameraViewfinderSettingsControl) MetaObject() *qt.QMetaObject { @@ -185,22 +183,20 @@ func (this *QCameraViewfinderSettingsControl2) UnsafePointer() unsafe.Pointer { } // newQCameraViewfinderSettingsControl2 constructs the type using only CGO pointers. -func newQCameraViewfinderSettingsControl2(h *C.QCameraViewfinderSettingsControl2, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraViewfinderSettingsControl2 { +func newQCameraViewfinderSettingsControl2(h *C.QCameraViewfinderSettingsControl2) *QCameraViewfinderSettingsControl2 { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QCameraViewfinderSettingsControl2_virtbase(h, &outptr_QMediaControl) + return &QCameraViewfinderSettingsControl2{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQCameraViewfinderSettingsControl2 constructs the type using only unsafe pointers. -func UnsafeNewQCameraViewfinderSettingsControl2(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraViewfinderSettingsControl2 { - if h == nil { - return nil - } - - return &QCameraViewfinderSettingsControl2{h: (*C.QCameraViewfinderSettingsControl2)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQCameraViewfinderSettingsControl2(h unsafe.Pointer) *QCameraViewfinderSettingsControl2 { + return newQCameraViewfinderSettingsControl2((*C.QCameraViewfinderSettingsControl2)(h)) } func (this *QCameraViewfinderSettingsControl2) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcameraviewfindersettingscontrol.h b/qt/multimedia/gen_qcameraviewfindersettingscontrol.h index 491e21d0..eba97482 100644 --- a/qt/multimedia/gen_qcameraviewfindersettingscontrol.h +++ b/qt/multimedia/gen_qcameraviewfindersettingscontrol.h @@ -32,6 +32,7 @@ typedef struct QObject QObject; typedef struct QVariant QVariant; #endif +void QCameraViewfinderSettingsControl_virtbase(QCameraViewfinderSettingsControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QCameraViewfinderSettingsControl_MetaObject(const QCameraViewfinderSettingsControl* self); void* QCameraViewfinderSettingsControl_Metacast(QCameraViewfinderSettingsControl* self, const char* param1); struct miqt_string QCameraViewfinderSettingsControl_Tr(const char* s); @@ -45,6 +46,7 @@ struct miqt_string QCameraViewfinderSettingsControl_TrUtf82(const char* s, const struct miqt_string QCameraViewfinderSettingsControl_TrUtf83(const char* s, const char* c, int n); void QCameraViewfinderSettingsControl_Delete(QCameraViewfinderSettingsControl* self, bool isSubclass); +void QCameraViewfinderSettingsControl2_virtbase(QCameraViewfinderSettingsControl2* src, QMediaControl** outptr_QMediaControl); QMetaObject* QCameraViewfinderSettingsControl2_MetaObject(const QCameraViewfinderSettingsControl2* self); void* QCameraViewfinderSettingsControl2_Metacast(QCameraViewfinderSettingsControl2* self, const char* param1); struct miqt_string QCameraViewfinderSettingsControl2_Tr(const char* s); diff --git a/qt/multimedia/gen_qcamerazoomcontrol.cpp b/qt/multimedia/gen_qcamerazoomcontrol.cpp index 1f27a155..b62b6d22 100644 --- a/qt/multimedia/gen_qcamerazoomcontrol.cpp +++ b/qt/multimedia/gen_qcamerazoomcontrol.cpp @@ -9,6 +9,10 @@ #include "gen_qcamerazoomcontrol.h" #include "_cgo_export.h" +void QCameraZoomControl_virtbase(QCameraZoomControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QCameraZoomControl_MetaObject(const QCameraZoomControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcamerazoomcontrol.go b/qt/multimedia/gen_qcamerazoomcontrol.go index ac691ae7..513b0375 100644 --- a/qt/multimedia/gen_qcamerazoomcontrol.go +++ b/qt/multimedia/gen_qcamerazoomcontrol.go @@ -36,22 +36,20 @@ func (this *QCameraZoomControl) UnsafePointer() unsafe.Pointer { } // newQCameraZoomControl constructs the type using only CGO pointers. -func newQCameraZoomControl(h *C.QCameraZoomControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCameraZoomControl { +func newQCameraZoomControl(h *C.QCameraZoomControl) *QCameraZoomControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QCameraZoomControl_virtbase(h, &outptr_QMediaControl) + return &QCameraZoomControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQCameraZoomControl constructs the type using only unsafe pointers. -func UnsafeNewQCameraZoomControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCameraZoomControl { - if h == nil { - return nil - } - - return &QCameraZoomControl{h: (*C.QCameraZoomControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQCameraZoomControl(h unsafe.Pointer) *QCameraZoomControl { + return newQCameraZoomControl((*C.QCameraZoomControl)(h)) } func (this *QCameraZoomControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcamerazoomcontrol.h b/qt/multimedia/gen_qcamerazoomcontrol.h index 083384b7..aee6c7bc 100644 --- a/qt/multimedia/gen_qcamerazoomcontrol.h +++ b/qt/multimedia/gen_qcamerazoomcontrol.h @@ -26,6 +26,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QCameraZoomControl_virtbase(QCameraZoomControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QCameraZoomControl_MetaObject(const QCameraZoomControl* self); void* QCameraZoomControl_Metacast(QCameraZoomControl* self, const char* param1); struct miqt_string QCameraZoomControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qcustomaudiorolecontrol.cpp b/qt/multimedia/gen_qcustomaudiorolecontrol.cpp index f02af956..9a40159d 100644 --- a/qt/multimedia/gen_qcustomaudiorolecontrol.cpp +++ b/qt/multimedia/gen_qcustomaudiorolecontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qcustomaudiorolecontrol.h" #include "_cgo_export.h" +void QCustomAudioRoleControl_virtbase(QCustomAudioRoleControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QCustomAudioRoleControl_MetaObject(const QCustomAudioRoleControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qcustomaudiorolecontrol.go b/qt/multimedia/gen_qcustomaudiorolecontrol.go index f14a1c89..23c136c5 100644 --- a/qt/multimedia/gen_qcustomaudiorolecontrol.go +++ b/qt/multimedia/gen_qcustomaudiorolecontrol.go @@ -36,22 +36,20 @@ func (this *QCustomAudioRoleControl) UnsafePointer() unsafe.Pointer { } // newQCustomAudioRoleControl constructs the type using only CGO pointers. -func newQCustomAudioRoleControl(h *C.QCustomAudioRoleControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QCustomAudioRoleControl { +func newQCustomAudioRoleControl(h *C.QCustomAudioRoleControl) *QCustomAudioRoleControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QCustomAudioRoleControl_virtbase(h, &outptr_QMediaControl) + return &QCustomAudioRoleControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQCustomAudioRoleControl constructs the type using only unsafe pointers. -func UnsafeNewQCustomAudioRoleControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QCustomAudioRoleControl { - if h == nil { - return nil - } - - return &QCustomAudioRoleControl{h: (*C.QCustomAudioRoleControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQCustomAudioRoleControl(h unsafe.Pointer) *QCustomAudioRoleControl { + return newQCustomAudioRoleControl((*C.QCustomAudioRoleControl)(h)) } func (this *QCustomAudioRoleControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qcustomaudiorolecontrol.h b/qt/multimedia/gen_qcustomaudiorolecontrol.h index 7025d9d7..383ca05b 100644 --- a/qt/multimedia/gen_qcustomaudiorolecontrol.h +++ b/qt/multimedia/gen_qcustomaudiorolecontrol.h @@ -26,6 +26,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QCustomAudioRoleControl_virtbase(QCustomAudioRoleControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QCustomAudioRoleControl_MetaObject(const QCustomAudioRoleControl* self); void* QCustomAudioRoleControl_Metacast(QCustomAudioRoleControl* self, const char* param1); struct miqt_string QCustomAudioRoleControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qgraphicsvideoitem.cpp b/qt/multimedia/gen_qgraphicsvideoitem.cpp index 0769f7da..418628be 100644 --- a/qt/multimedia/gen_qgraphicsvideoitem.cpp +++ b/qt/multimedia/gen_qgraphicsvideoitem.cpp @@ -199,22 +199,17 @@ public: }; -void QGraphicsVideoItem_new(QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQGraphicsVideoItem* ret = new MiqtVirtualQGraphicsVideoItem(); - *outptr_QGraphicsVideoItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QGraphicsVideoItem* QGraphicsVideoItem_new() { + return new MiqtVirtualQGraphicsVideoItem(); } -void QGraphicsVideoItem_new2(QGraphicsItem* parent, QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQGraphicsVideoItem* ret = new MiqtVirtualQGraphicsVideoItem(parent); - *outptr_QGraphicsVideoItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QGraphicsVideoItem* QGraphicsVideoItem_new2(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsVideoItem(parent); +} + +void QGraphicsVideoItem_virtbase(QGraphicsVideoItem* src, QGraphicsObject** outptr_QGraphicsObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { + *outptr_QGraphicsObject = static_cast(src); + *outptr_QMediaBindableInterface = static_cast(src); } QMetaObject* QGraphicsVideoItem_MetaObject(const QGraphicsVideoItem* self) { diff --git a/qt/multimedia/gen_qgraphicsvideoitem.go b/qt/multimedia/gen_qgraphicsvideoitem.go index 0446deda..c3338a1e 100644 --- a/qt/multimedia/gen_qgraphicsvideoitem.go +++ b/qt/multimedia/gen_qgraphicsvideoitem.go @@ -37,50 +37,36 @@ func (this *QGraphicsVideoItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsVideoItem constructs the type using only CGO pointers. -func newQGraphicsVideoItem(h *C.QGraphicsVideoItem, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem, h_QMediaBindableInterface *C.QMediaBindableInterface) *QGraphicsVideoItem { +func newQGraphicsVideoItem(h *C.QGraphicsVideoItem) *QGraphicsVideoItem { if h == nil { return nil } + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + C.QGraphicsVideoItem_virtbase(h, &outptr_QGraphicsObject, &outptr_QMediaBindableInterface) + return &QGraphicsVideoItem{h: h, - QGraphicsObject: qt.UnsafeNewQGraphicsObject(unsafe.Pointer(h_QGraphicsObject), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QGraphicsItem)), - QMediaBindableInterface: newQMediaBindableInterface(h_QMediaBindableInterface)} + QGraphicsObject: qt.UnsafeNewQGraphicsObject(unsafe.Pointer(outptr_QGraphicsObject)), + QMediaBindableInterface: newQMediaBindableInterface(outptr_QMediaBindableInterface)} } // UnsafeNewQGraphicsVideoItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsVideoItem(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QGraphicsVideoItem { - if h == nil { - return nil - } - - return &QGraphicsVideoItem{h: (*C.QGraphicsVideoItem)(h), - QGraphicsObject: qt.UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem), - QMediaBindableInterface: UnsafeNewQMediaBindableInterface(h_QMediaBindableInterface)} +func UnsafeNewQGraphicsVideoItem(h unsafe.Pointer) *QGraphicsVideoItem { + return newQGraphicsVideoItem((*C.QGraphicsVideoItem)(h)) } // NewQGraphicsVideoItem constructs a new QGraphicsVideoItem object. func NewQGraphicsVideoItem() *QGraphicsVideoItem { - var outptr_QGraphicsVideoItem *C.QGraphicsVideoItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QGraphicsVideoItem_new(&outptr_QGraphicsVideoItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QMediaBindableInterface) - ret := newQGraphicsVideoItem(outptr_QGraphicsVideoItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QMediaBindableInterface) + ret := newQGraphicsVideoItem(C.QGraphicsVideoItem_new()) ret.isSubclass = true return ret } // NewQGraphicsVideoItem2 constructs a new QGraphicsVideoItem object. func NewQGraphicsVideoItem2(parent *qt.QGraphicsItem) *QGraphicsVideoItem { - var outptr_QGraphicsVideoItem *C.QGraphicsVideoItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QGraphicsVideoItem_new2((*C.QGraphicsItem)(parent.UnsafePointer()), &outptr_QGraphicsVideoItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QMediaBindableInterface) - ret := newQGraphicsVideoItem(outptr_QGraphicsVideoItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QMediaBindableInterface) + ret := newQGraphicsVideoItem(C.QGraphicsVideoItem_new2((*C.QGraphicsItem)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -114,11 +100,11 @@ func QGraphicsVideoItem_TrUtf8(s string) string { } func (this *QGraphicsVideoItem) MediaObject() *QMediaObject { - return newQMediaObject(C.QGraphicsVideoItem_MediaObject(this.h), nil) + return newQMediaObject(C.QGraphicsVideoItem_MediaObject(this.h)) } func (this *QGraphicsVideoItem) VideoSurface() *QAbstractVideoSurface { - return newQAbstractVideoSurface(C.QGraphicsVideoItem_VideoSurface(this.h), nil) + return newQAbstractVideoSurface(C.QGraphicsVideoItem_VideoSurface(this.h)) } func (this *QGraphicsVideoItem) AspectRatioMode() qt.AspectRatioMode { @@ -231,7 +217,7 @@ func QGraphicsVideoItem_TrUtf83(s string, c string, n int) string { func (this *QGraphicsVideoItem) callVirtualBase_MediaObject() *QMediaObject { - return newQMediaObject(C.QGraphicsVideoItem_virtualbase_MediaObject(unsafe.Pointer(this.h)), nil) + return newQMediaObject(C.QGraphicsVideoItem_virtualbase_MediaObject(unsafe.Pointer(this.h))) } func (this *QGraphicsVideoItem) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { @@ -303,9 +289,9 @@ func miqt_exec_callback_QGraphicsVideoItem_Paint(self *C.QGraphicsVideoItem, cb // Convert all CABI parameters to Go parameters slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) - slotval2 := qt.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval2 := qt.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option)) - slotval3 := qt.UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + slotval3 := qt.UnsafeNewQWidget(unsafe.Pointer(widget)) gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -331,7 +317,7 @@ func miqt_exec_callback_QGraphicsVideoItem_TimerEvent(self *C.QGraphicsVideoItem } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -389,7 +375,7 @@ func miqt_exec_callback_QGraphicsVideoItem_SetMediaObject(self *C.QGraphicsVideo } // Convert all CABI parameters to Go parameters - slotval1 := newQMediaObject(object, nil) + slotval1 := newQMediaObject(object) virtualReturn := gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_SetMediaObject, slotval1) diff --git a/qt/multimedia/gen_qgraphicsvideoitem.h b/qt/multimedia/gen_qgraphicsvideoitem.h index 0dea1dd3..696739f1 100644 --- a/qt/multimedia/gen_qgraphicsvideoitem.h +++ b/qt/multimedia/gen_qgraphicsvideoitem.h @@ -52,8 +52,9 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QGraphicsVideoItem_new(QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QMediaBindableInterface** outptr_QMediaBindableInterface); -void QGraphicsVideoItem_new2(QGraphicsItem* parent, QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QMediaBindableInterface** outptr_QMediaBindableInterface); +QGraphicsVideoItem* QGraphicsVideoItem_new(); +QGraphicsVideoItem* QGraphicsVideoItem_new2(QGraphicsItem* parent); +void QGraphicsVideoItem_virtbase(QGraphicsVideoItem* src, QGraphicsObject** outptr_QGraphicsObject, QMediaBindableInterface** outptr_QMediaBindableInterface); QMetaObject* QGraphicsVideoItem_MetaObject(const QGraphicsVideoItem* self); void* QGraphicsVideoItem_Metacast(QGraphicsVideoItem* self, const char* param1); struct miqt_string QGraphicsVideoItem_Tr(const char* s); diff --git a/qt/multimedia/gen_qimageencodercontrol.cpp b/qt/multimedia/gen_qimageencodercontrol.cpp index 81d58307..b6219b4c 100644 --- a/qt/multimedia/gen_qimageencodercontrol.cpp +++ b/qt/multimedia/gen_qimageencodercontrol.cpp @@ -12,6 +12,10 @@ #include "gen_qimageencodercontrol.h" #include "_cgo_export.h" +void QImageEncoderControl_virtbase(QImageEncoderControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QImageEncoderControl_MetaObject(const QImageEncoderControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qimageencodercontrol.go b/qt/multimedia/gen_qimageencodercontrol.go index d499e8ef..f1c4f933 100644 --- a/qt/multimedia/gen_qimageencodercontrol.go +++ b/qt/multimedia/gen_qimageencodercontrol.go @@ -35,22 +35,20 @@ func (this *QImageEncoderControl) UnsafePointer() unsafe.Pointer { } // newQImageEncoderControl constructs the type using only CGO pointers. -func newQImageEncoderControl(h *C.QImageEncoderControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QImageEncoderControl { +func newQImageEncoderControl(h *C.QImageEncoderControl) *QImageEncoderControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QImageEncoderControl_virtbase(h, &outptr_QMediaControl) + return &QImageEncoderControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQImageEncoderControl constructs the type using only unsafe pointers. -func UnsafeNewQImageEncoderControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QImageEncoderControl { - if h == nil { - return nil - } - - return &QImageEncoderControl{h: (*C.QImageEncoderControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQImageEncoderControl(h unsafe.Pointer) *QImageEncoderControl { + return newQImageEncoderControl((*C.QImageEncoderControl)(h)) } func (this *QImageEncoderControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qimageencodercontrol.h b/qt/multimedia/gen_qimageencodercontrol.h index 606eac4d..3137a753 100644 --- a/qt/multimedia/gen_qimageencodercontrol.h +++ b/qt/multimedia/gen_qimageencodercontrol.h @@ -30,6 +30,7 @@ typedef struct QObject QObject; typedef struct QSize QSize; #endif +void QImageEncoderControl_virtbase(QImageEncoderControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QImageEncoderControl_MetaObject(const QImageEncoderControl* self); void* QImageEncoderControl_Metacast(QImageEncoderControl* self, const char* param1); struct miqt_string QImageEncoderControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qmediaaudioprobecontrol.cpp b/qt/multimedia/gen_qmediaaudioprobecontrol.cpp index 44baf0b0..2bd65b28 100644 --- a/qt/multimedia/gen_qmediaaudioprobecontrol.cpp +++ b/qt/multimedia/gen_qmediaaudioprobecontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qmediaaudioprobecontrol.h" #include "_cgo_export.h" +void QMediaAudioProbeControl_virtbase(QMediaAudioProbeControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QMediaAudioProbeControl_MetaObject(const QMediaAudioProbeControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qmediaaudioprobecontrol.go b/qt/multimedia/gen_qmediaaudioprobecontrol.go index 83dd55f6..92beadcf 100644 --- a/qt/multimedia/gen_qmediaaudioprobecontrol.go +++ b/qt/multimedia/gen_qmediaaudioprobecontrol.go @@ -36,22 +36,20 @@ func (this *QMediaAudioProbeControl) UnsafePointer() unsafe.Pointer { } // newQMediaAudioProbeControl constructs the type using only CGO pointers. -func newQMediaAudioProbeControl(h *C.QMediaAudioProbeControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaAudioProbeControl { +func newQMediaAudioProbeControl(h *C.QMediaAudioProbeControl) *QMediaAudioProbeControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QMediaAudioProbeControl_virtbase(h, &outptr_QMediaControl) + return &QMediaAudioProbeControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQMediaAudioProbeControl constructs the type using only unsafe pointers. -func UnsafeNewQMediaAudioProbeControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaAudioProbeControl { - if h == nil { - return nil - } - - return &QMediaAudioProbeControl{h: (*C.QMediaAudioProbeControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQMediaAudioProbeControl(h unsafe.Pointer) *QMediaAudioProbeControl { + return newQMediaAudioProbeControl((*C.QMediaAudioProbeControl)(h)) } func (this *QMediaAudioProbeControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qmediaaudioprobecontrol.h b/qt/multimedia/gen_qmediaaudioprobecontrol.h index 28933fba..e40d4c09 100644 --- a/qt/multimedia/gen_qmediaaudioprobecontrol.h +++ b/qt/multimedia/gen_qmediaaudioprobecontrol.h @@ -28,6 +28,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QMediaAudioProbeControl_virtbase(QMediaAudioProbeControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QMediaAudioProbeControl_MetaObject(const QMediaAudioProbeControl* self); void* QMediaAudioProbeControl_Metacast(QMediaAudioProbeControl* self, const char* param1); struct miqt_string QMediaAudioProbeControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qmediaavailabilitycontrol.cpp b/qt/multimedia/gen_qmediaavailabilitycontrol.cpp index ddc48a54..141cd9a1 100644 --- a/qt/multimedia/gen_qmediaavailabilitycontrol.cpp +++ b/qt/multimedia/gen_qmediaavailabilitycontrol.cpp @@ -9,6 +9,10 @@ #include "gen_qmediaavailabilitycontrol.h" #include "_cgo_export.h" +void QMediaAvailabilityControl_virtbase(QMediaAvailabilityControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QMediaAvailabilityControl_MetaObject(const QMediaAvailabilityControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qmediaavailabilitycontrol.go b/qt/multimedia/gen_qmediaavailabilitycontrol.go index 014410c1..4021fde1 100644 --- a/qt/multimedia/gen_qmediaavailabilitycontrol.go +++ b/qt/multimedia/gen_qmediaavailabilitycontrol.go @@ -36,22 +36,20 @@ func (this *QMediaAvailabilityControl) UnsafePointer() unsafe.Pointer { } // newQMediaAvailabilityControl constructs the type using only CGO pointers. -func newQMediaAvailabilityControl(h *C.QMediaAvailabilityControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaAvailabilityControl { +func newQMediaAvailabilityControl(h *C.QMediaAvailabilityControl) *QMediaAvailabilityControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QMediaAvailabilityControl_virtbase(h, &outptr_QMediaControl) + return &QMediaAvailabilityControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQMediaAvailabilityControl constructs the type using only unsafe pointers. -func UnsafeNewQMediaAvailabilityControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaAvailabilityControl { - if h == nil { - return nil - } - - return &QMediaAvailabilityControl{h: (*C.QMediaAvailabilityControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQMediaAvailabilityControl(h unsafe.Pointer) *QMediaAvailabilityControl { + return newQMediaAvailabilityControl((*C.QMediaAvailabilityControl)(h)) } func (this *QMediaAvailabilityControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qmediaavailabilitycontrol.h b/qt/multimedia/gen_qmediaavailabilitycontrol.h index 28149a09..ddab42ed 100644 --- a/qt/multimedia/gen_qmediaavailabilitycontrol.h +++ b/qt/multimedia/gen_qmediaavailabilitycontrol.h @@ -26,6 +26,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QMediaAvailabilityControl_virtbase(QMediaAvailabilityControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QMediaAvailabilityControl_MetaObject(const QMediaAvailabilityControl* self); void* QMediaAvailabilityControl_Metacast(QMediaAvailabilityControl* self, const char* param1); struct miqt_string QMediaAvailabilityControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qmediabindableinterface.go b/qt/multimedia/gen_qmediabindableinterface.go index 3016e929..b835191e 100644 --- a/qt/multimedia/gen_qmediabindableinterface.go +++ b/qt/multimedia/gen_qmediabindableinterface.go @@ -37,20 +37,17 @@ func newQMediaBindableInterface(h *C.QMediaBindableInterface) *QMediaBindableInt if h == nil { return nil } + return &QMediaBindableInterface{h: h} } // UnsafeNewQMediaBindableInterface constructs the type using only unsafe pointers. func UnsafeNewQMediaBindableInterface(h unsafe.Pointer) *QMediaBindableInterface { - if h == nil { - return nil - } - - return &QMediaBindableInterface{h: (*C.QMediaBindableInterface)(h)} + return newQMediaBindableInterface((*C.QMediaBindableInterface)(h)) } func (this *QMediaBindableInterface) MediaObject() *QMediaObject { - return newQMediaObject(C.QMediaBindableInterface_MediaObject(this.h), nil) + return newQMediaObject(C.QMediaBindableInterface_MediaObject(this.h)) } // Delete this object from C++ memory. diff --git a/qt/multimedia/gen_qmediacontainercontrol.cpp b/qt/multimedia/gen_qmediacontainercontrol.cpp index c2c916eb..122a502d 100644 --- a/qt/multimedia/gen_qmediacontainercontrol.cpp +++ b/qt/multimedia/gen_qmediacontainercontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qmediacontainercontrol.h" #include "_cgo_export.h" +void QMediaContainerControl_virtbase(QMediaContainerControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QMediaContainerControl_MetaObject(const QMediaContainerControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qmediacontainercontrol.go b/qt/multimedia/gen_qmediacontainercontrol.go index 170ad9b9..915da1e2 100644 --- a/qt/multimedia/gen_qmediacontainercontrol.go +++ b/qt/multimedia/gen_qmediacontainercontrol.go @@ -35,22 +35,20 @@ func (this *QMediaContainerControl) UnsafePointer() unsafe.Pointer { } // newQMediaContainerControl constructs the type using only CGO pointers. -func newQMediaContainerControl(h *C.QMediaContainerControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaContainerControl { +func newQMediaContainerControl(h *C.QMediaContainerControl) *QMediaContainerControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QMediaContainerControl_virtbase(h, &outptr_QMediaControl) + return &QMediaContainerControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQMediaContainerControl constructs the type using only unsafe pointers. -func UnsafeNewQMediaContainerControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaContainerControl { - if h == nil { - return nil - } - - return &QMediaContainerControl{h: (*C.QMediaContainerControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQMediaContainerControl(h unsafe.Pointer) *QMediaContainerControl { + return newQMediaContainerControl((*C.QMediaContainerControl)(h)) } func (this *QMediaContainerControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qmediacontainercontrol.h b/qt/multimedia/gen_qmediacontainercontrol.h index ce75e4b7..b6b5ba51 100644 --- a/qt/multimedia/gen_qmediacontainercontrol.h +++ b/qt/multimedia/gen_qmediacontainercontrol.h @@ -26,6 +26,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QMediaContainerControl_virtbase(QMediaContainerControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QMediaContainerControl_MetaObject(const QMediaContainerControl* self); void* QMediaContainerControl_Metacast(QMediaContainerControl* self, const char* param1); struct miqt_string QMediaContainerControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qmediacontent.cpp b/qt/multimedia/gen_qmediacontent.cpp index 33b22704..5a7e7c69 100644 --- a/qt/multimedia/gen_qmediacontent.cpp +++ b/qt/multimedia/gen_qmediacontent.cpp @@ -8,55 +8,46 @@ #include "gen_qmediacontent.h" #include "_cgo_export.h" -void QMediaContent_new(QMediaContent** outptr_QMediaContent) { - QMediaContent* ret = new QMediaContent(); - *outptr_QMediaContent = ret; +QMediaContent* QMediaContent_new() { + return new QMediaContent(); } -void QMediaContent_new2(QUrl* contentUrl, QMediaContent** outptr_QMediaContent) { - QMediaContent* ret = new QMediaContent(*contentUrl); - *outptr_QMediaContent = ret; +QMediaContent* QMediaContent_new2(QUrl* contentUrl) { + return new QMediaContent(*contentUrl); } -void QMediaContent_new3(QNetworkRequest* contentRequest, QMediaContent** outptr_QMediaContent) { - QMediaContent* ret = new QMediaContent(*contentRequest); - *outptr_QMediaContent = ret; +QMediaContent* QMediaContent_new3(QNetworkRequest* contentRequest) { + return new QMediaContent(*contentRequest); } -void QMediaContent_new4(QMediaResource* contentResource, QMediaContent** outptr_QMediaContent) { - QMediaContent* ret = new QMediaContent(*contentResource); - *outptr_QMediaContent = ret; +QMediaContent* QMediaContent_new4(QMediaResource* contentResource) { + return new QMediaContent(*contentResource); } -void QMediaContent_new5(struct miqt_array /* of QMediaResource* */ resources, QMediaContent** outptr_QMediaContent) { +QMediaContent* QMediaContent_new5(struct miqt_array /* of QMediaResource* */ resources) { QMediaResourceList resources_QList; resources_QList.reserve(resources.len); QMediaResource** resources_arr = static_cast(resources.data); for(size_t i = 0; i < resources.len; ++i) { resources_QList.push_back(*(resources_arr[i])); } - QMediaContent* ret = new QMediaContent(resources_QList); - *outptr_QMediaContent = ret; + return new QMediaContent(resources_QList); } -void QMediaContent_new6(QMediaContent* other, QMediaContent** outptr_QMediaContent) { - QMediaContent* ret = new QMediaContent(*other); - *outptr_QMediaContent = ret; +QMediaContent* QMediaContent_new6(QMediaContent* other) { + return new QMediaContent(*other); } -void QMediaContent_new7(QMediaPlaylist* playlist, QMediaContent** outptr_QMediaContent) { - QMediaContent* ret = new QMediaContent(playlist); - *outptr_QMediaContent = ret; +QMediaContent* QMediaContent_new7(QMediaPlaylist* playlist) { + return new QMediaContent(playlist); } -void QMediaContent_new8(QMediaPlaylist* playlist, QUrl* contentUrl, QMediaContent** outptr_QMediaContent) { - QMediaContent* ret = new QMediaContent(playlist, *contentUrl); - *outptr_QMediaContent = ret; +QMediaContent* QMediaContent_new8(QMediaPlaylist* playlist, QUrl* contentUrl) { + return new QMediaContent(playlist, *contentUrl); } -void QMediaContent_new9(QMediaPlaylist* playlist, QUrl* contentUrl, bool takeOwnership, QMediaContent** outptr_QMediaContent) { - QMediaContent* ret = new QMediaContent(playlist, *contentUrl, takeOwnership); - *outptr_QMediaContent = ret; +QMediaContent* QMediaContent_new9(QMediaPlaylist* playlist, QUrl* contentUrl, bool takeOwnership) { + return new QMediaContent(playlist, *contentUrl, takeOwnership); } void QMediaContent_OperatorAssign(QMediaContent* self, QMediaContent* other) { diff --git a/qt/multimedia/gen_qmediacontent.go b/qt/multimedia/gen_qmediacontent.go index 2499e884..18848bcc 100644 --- a/qt/multimedia/gen_qmediacontent.go +++ b/qt/multimedia/gen_qmediacontent.go @@ -39,54 +39,43 @@ func newQMediaContent(h *C.QMediaContent) *QMediaContent { if h == nil { return nil } + return &QMediaContent{h: h} } // UnsafeNewQMediaContent constructs the type using only unsafe pointers. func UnsafeNewQMediaContent(h unsafe.Pointer) *QMediaContent { - if h == nil { - return nil - } - - return &QMediaContent{h: (*C.QMediaContent)(h)} + return newQMediaContent((*C.QMediaContent)(h)) } // NewQMediaContent constructs a new QMediaContent object. func NewQMediaContent() *QMediaContent { - var outptr_QMediaContent *C.QMediaContent = nil - C.QMediaContent_new(&outptr_QMediaContent) - ret := newQMediaContent(outptr_QMediaContent) + ret := newQMediaContent(C.QMediaContent_new()) ret.isSubclass = true return ret } // NewQMediaContent2 constructs a new QMediaContent object. func NewQMediaContent2(contentUrl *qt.QUrl) *QMediaContent { - var outptr_QMediaContent *C.QMediaContent = nil - C.QMediaContent_new2((*C.QUrl)(contentUrl.UnsafePointer()), &outptr_QMediaContent) - ret := newQMediaContent(outptr_QMediaContent) + ret := newQMediaContent(C.QMediaContent_new2((*C.QUrl)(contentUrl.UnsafePointer()))) ret.isSubclass = true return ret } // NewQMediaContent3 constructs a new QMediaContent object. func NewQMediaContent3(contentRequest *network.QNetworkRequest) *QMediaContent { - var outptr_QMediaContent *C.QMediaContent = nil - C.QMediaContent_new3((*C.QNetworkRequest)(contentRequest.UnsafePointer()), &outptr_QMediaContent) - ret := newQMediaContent(outptr_QMediaContent) + ret := newQMediaContent(C.QMediaContent_new3((*C.QNetworkRequest)(contentRequest.UnsafePointer()))) ret.isSubclass = true return ret } // NewQMediaContent4 constructs a new QMediaContent object. func NewQMediaContent4(contentResource *QMediaResource) *QMediaContent { - var outptr_QMediaContent *C.QMediaContent = nil - C.QMediaContent_new4(contentResource.cPointer(), &outptr_QMediaContent) - ret := newQMediaContent(outptr_QMediaContent) + ret := newQMediaContent(C.QMediaContent_new4(contentResource.cPointer())) ret.isSubclass = true return ret } @@ -99,50 +88,40 @@ func NewQMediaContent5(resources []QMediaResource) *QMediaContent { resources_CArray[i] = resources[i].cPointer() } resources_ma := C.struct_miqt_array{len: C.size_t(len(resources)), data: unsafe.Pointer(resources_CArray)} - var outptr_QMediaContent *C.QMediaContent = nil - C.QMediaContent_new5(resources_ma, &outptr_QMediaContent) - ret := newQMediaContent(outptr_QMediaContent) + ret := newQMediaContent(C.QMediaContent_new5(resources_ma)) ret.isSubclass = true return ret } // NewQMediaContent6 constructs a new QMediaContent object. func NewQMediaContent6(other *QMediaContent) *QMediaContent { - var outptr_QMediaContent *C.QMediaContent = nil - C.QMediaContent_new6(other.cPointer(), &outptr_QMediaContent) - ret := newQMediaContent(outptr_QMediaContent) + ret := newQMediaContent(C.QMediaContent_new6(other.cPointer())) ret.isSubclass = true return ret } // NewQMediaContent7 constructs a new QMediaContent object. func NewQMediaContent7(playlist *QMediaPlaylist) *QMediaContent { - var outptr_QMediaContent *C.QMediaContent = nil - C.QMediaContent_new7(playlist.cPointer(), &outptr_QMediaContent) - ret := newQMediaContent(outptr_QMediaContent) + ret := newQMediaContent(C.QMediaContent_new7(playlist.cPointer())) ret.isSubclass = true return ret } // NewQMediaContent8 constructs a new QMediaContent object. func NewQMediaContent8(playlist *QMediaPlaylist, contentUrl *qt.QUrl) *QMediaContent { - var outptr_QMediaContent *C.QMediaContent = nil - C.QMediaContent_new8(playlist.cPointer(), (*C.QUrl)(contentUrl.UnsafePointer()), &outptr_QMediaContent) - ret := newQMediaContent(outptr_QMediaContent) + ret := newQMediaContent(C.QMediaContent_new8(playlist.cPointer(), (*C.QUrl)(contentUrl.UnsafePointer()))) ret.isSubclass = true return ret } // NewQMediaContent9 constructs a new QMediaContent object. func NewQMediaContent9(playlist *QMediaPlaylist, contentUrl *qt.QUrl, takeOwnership bool) *QMediaContent { - var outptr_QMediaContent *C.QMediaContent = nil - C.QMediaContent_new9(playlist.cPointer(), (*C.QUrl)(contentUrl.UnsafePointer()), (C.bool)(takeOwnership), &outptr_QMediaContent) - ret := newQMediaContent(outptr_QMediaContent) + ret := newQMediaContent(C.QMediaContent_new9(playlist.cPointer(), (*C.QUrl)(contentUrl.UnsafePointer()), (C.bool)(takeOwnership))) ret.isSubclass = true return ret } @@ -200,7 +179,7 @@ func (this *QMediaContent) Resources() []QMediaResource { } func (this *QMediaContent) Playlist() *QMediaPlaylist { - return newQMediaPlaylist(C.QMediaContent_Playlist(this.h), nil, nil) + return newQMediaPlaylist(C.QMediaContent_Playlist(this.h)) } // Delete this object from C++ memory. diff --git a/qt/multimedia/gen_qmediacontent.h b/qt/multimedia/gen_qmediacontent.h index d8a125e6..8fbd2dc7 100644 --- a/qt/multimedia/gen_qmediacontent.h +++ b/qt/multimedia/gen_qmediacontent.h @@ -28,15 +28,15 @@ typedef struct QNetworkRequest QNetworkRequest; typedef struct QUrl QUrl; #endif -void QMediaContent_new(QMediaContent** outptr_QMediaContent); -void QMediaContent_new2(QUrl* contentUrl, QMediaContent** outptr_QMediaContent); -void QMediaContent_new3(QNetworkRequest* contentRequest, QMediaContent** outptr_QMediaContent); -void QMediaContent_new4(QMediaResource* contentResource, QMediaContent** outptr_QMediaContent); -void QMediaContent_new5(struct miqt_array /* of QMediaResource* */ resources, QMediaContent** outptr_QMediaContent); -void QMediaContent_new6(QMediaContent* other, QMediaContent** outptr_QMediaContent); -void QMediaContent_new7(QMediaPlaylist* playlist, QMediaContent** outptr_QMediaContent); -void QMediaContent_new8(QMediaPlaylist* playlist, QUrl* contentUrl, QMediaContent** outptr_QMediaContent); -void QMediaContent_new9(QMediaPlaylist* playlist, QUrl* contentUrl, bool takeOwnership, QMediaContent** outptr_QMediaContent); +QMediaContent* QMediaContent_new(); +QMediaContent* QMediaContent_new2(QUrl* contentUrl); +QMediaContent* QMediaContent_new3(QNetworkRequest* contentRequest); +QMediaContent* QMediaContent_new4(QMediaResource* contentResource); +QMediaContent* QMediaContent_new5(struct miqt_array /* of QMediaResource* */ resources); +QMediaContent* QMediaContent_new6(QMediaContent* other); +QMediaContent* QMediaContent_new7(QMediaPlaylist* playlist); +QMediaContent* QMediaContent_new8(QMediaPlaylist* playlist, QUrl* contentUrl); +QMediaContent* QMediaContent_new9(QMediaPlaylist* playlist, QUrl* contentUrl, bool takeOwnership); void QMediaContent_OperatorAssign(QMediaContent* self, QMediaContent* other); bool QMediaContent_OperatorEqual(const QMediaContent* self, QMediaContent* other); bool QMediaContent_OperatorNotEqual(const QMediaContent* self, QMediaContent* other); diff --git a/qt/multimedia/gen_qmediacontrol.cpp b/qt/multimedia/gen_qmediacontrol.cpp index 36841055..7d17c321 100644 --- a/qt/multimedia/gen_qmediacontrol.cpp +++ b/qt/multimedia/gen_qmediacontrol.cpp @@ -8,6 +8,10 @@ #include "gen_qmediacontrol.h" #include "_cgo_export.h" +void QMediaControl_virtbase(QMediaControl* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QMediaControl_MetaObject(const QMediaControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qmediacontrol.go b/qt/multimedia/gen_qmediacontrol.go index 069e8ac1..37117af2 100644 --- a/qt/multimedia/gen_qmediacontrol.go +++ b/qt/multimedia/gen_qmediacontrol.go @@ -35,22 +35,20 @@ func (this *QMediaControl) UnsafePointer() unsafe.Pointer { } // newQMediaControl constructs the type using only CGO pointers. -func newQMediaControl(h *C.QMediaControl, h_QObject *C.QObject) *QMediaControl { +func newQMediaControl(h *C.QMediaControl) *QMediaControl { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QMediaControl_virtbase(h, &outptr_QObject) + return &QMediaControl{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQMediaControl constructs the type using only unsafe pointers. -func UnsafeNewQMediaControl(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaControl { - if h == nil { - return nil - } - - return &QMediaControl{h: (*C.QMediaControl)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQMediaControl(h unsafe.Pointer) *QMediaControl { + return newQMediaControl((*C.QMediaControl)(h)) } func (this *QMediaControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qmediacontrol.h b/qt/multimedia/gen_qmediacontrol.h index 8bc9d6c2..8b4ab5ca 100644 --- a/qt/multimedia/gen_qmediacontrol.h +++ b/qt/multimedia/gen_qmediacontrol.h @@ -24,6 +24,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QMediaControl_virtbase(QMediaControl* src, QObject** outptr_QObject); QMetaObject* QMediaControl_MetaObject(const QMediaControl* self); void* QMediaControl_Metacast(QMediaControl* self, const char* param1); struct miqt_string QMediaControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qmediaencodersettings.cpp b/qt/multimedia/gen_qmediaencodersettings.cpp index d15abc2c..e52aedf5 100644 --- a/qt/multimedia/gen_qmediaencodersettings.cpp +++ b/qt/multimedia/gen_qmediaencodersettings.cpp @@ -11,14 +11,12 @@ #include "gen_qmediaencodersettings.h" #include "_cgo_export.h" -void QAudioEncoderSettings_new(QAudioEncoderSettings** outptr_QAudioEncoderSettings) { - QAudioEncoderSettings* ret = new QAudioEncoderSettings(); - *outptr_QAudioEncoderSettings = ret; +QAudioEncoderSettings* QAudioEncoderSettings_new() { + return new QAudioEncoderSettings(); } -void QAudioEncoderSettings_new2(QAudioEncoderSettings* other, QAudioEncoderSettings** outptr_QAudioEncoderSettings) { - QAudioEncoderSettings* ret = new QAudioEncoderSettings(*other); - *outptr_QAudioEncoderSettings = ret; +QAudioEncoderSettings* QAudioEncoderSettings_new2(QAudioEncoderSettings* other) { + return new QAudioEncoderSettings(*other); } void QAudioEncoderSettings_OperatorAssign(QAudioEncoderSettings* self, QAudioEncoderSettings* other) { @@ -149,14 +147,12 @@ void QAudioEncoderSettings_Delete(QAudioEncoderSettings* self, bool isSubclass) } } -void QVideoEncoderSettings_new(QVideoEncoderSettings** outptr_QVideoEncoderSettings) { - QVideoEncoderSettings* ret = new QVideoEncoderSettings(); - *outptr_QVideoEncoderSettings = ret; +QVideoEncoderSettings* QVideoEncoderSettings_new() { + return new QVideoEncoderSettings(); } -void QVideoEncoderSettings_new2(QVideoEncoderSettings* other, QVideoEncoderSettings** outptr_QVideoEncoderSettings) { - QVideoEncoderSettings* ret = new QVideoEncoderSettings(*other); - *outptr_QVideoEncoderSettings = ret; +QVideoEncoderSettings* QVideoEncoderSettings_new2(QVideoEncoderSettings* other) { + return new QVideoEncoderSettings(*other); } void QVideoEncoderSettings_OperatorAssign(QVideoEncoderSettings* self, QVideoEncoderSettings* other) { @@ -292,14 +288,12 @@ void QVideoEncoderSettings_Delete(QVideoEncoderSettings* self, bool isSubclass) } } -void QImageEncoderSettings_new(QImageEncoderSettings** outptr_QImageEncoderSettings) { - QImageEncoderSettings* ret = new QImageEncoderSettings(); - *outptr_QImageEncoderSettings = ret; +QImageEncoderSettings* QImageEncoderSettings_new() { + return new QImageEncoderSettings(); } -void QImageEncoderSettings_new2(QImageEncoderSettings* other, QImageEncoderSettings** outptr_QImageEncoderSettings) { - QImageEncoderSettings* ret = new QImageEncoderSettings(*other); - *outptr_QImageEncoderSettings = ret; +QImageEncoderSettings* QImageEncoderSettings_new2(QImageEncoderSettings* other) { + return new QImageEncoderSettings(*other); } void QImageEncoderSettings_OperatorAssign(QImageEncoderSettings* self, QImageEncoderSettings* other) { diff --git a/qt/multimedia/gen_qmediaencodersettings.go b/qt/multimedia/gen_qmediaencodersettings.go index 105f5668..511dd122 100644 --- a/qt/multimedia/gen_qmediaencodersettings.go +++ b/qt/multimedia/gen_qmediaencodersettings.go @@ -38,34 +38,27 @@ func newQAudioEncoderSettings(h *C.QAudioEncoderSettings) *QAudioEncoderSettings if h == nil { return nil } + return &QAudioEncoderSettings{h: h} } // UnsafeNewQAudioEncoderSettings constructs the type using only unsafe pointers. func UnsafeNewQAudioEncoderSettings(h unsafe.Pointer) *QAudioEncoderSettings { - if h == nil { - return nil - } - - return &QAudioEncoderSettings{h: (*C.QAudioEncoderSettings)(h)} + return newQAudioEncoderSettings((*C.QAudioEncoderSettings)(h)) } // NewQAudioEncoderSettings constructs a new QAudioEncoderSettings object. func NewQAudioEncoderSettings() *QAudioEncoderSettings { - var outptr_QAudioEncoderSettings *C.QAudioEncoderSettings = nil - C.QAudioEncoderSettings_new(&outptr_QAudioEncoderSettings) - ret := newQAudioEncoderSettings(outptr_QAudioEncoderSettings) + ret := newQAudioEncoderSettings(C.QAudioEncoderSettings_new()) ret.isSubclass = true return ret } // NewQAudioEncoderSettings2 constructs a new QAudioEncoderSettings object. func NewQAudioEncoderSettings2(other *QAudioEncoderSettings) *QAudioEncoderSettings { - var outptr_QAudioEncoderSettings *C.QAudioEncoderSettings = nil - C.QAudioEncoderSettings_new2(other.cPointer(), &outptr_QAudioEncoderSettings) - ret := newQAudioEncoderSettings(outptr_QAudioEncoderSettings) + ret := newQAudioEncoderSettings(C.QAudioEncoderSettings_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -239,34 +232,27 @@ func newQVideoEncoderSettings(h *C.QVideoEncoderSettings) *QVideoEncoderSettings if h == nil { return nil } + return &QVideoEncoderSettings{h: h} } // UnsafeNewQVideoEncoderSettings constructs the type using only unsafe pointers. func UnsafeNewQVideoEncoderSettings(h unsafe.Pointer) *QVideoEncoderSettings { - if h == nil { - return nil - } - - return &QVideoEncoderSettings{h: (*C.QVideoEncoderSettings)(h)} + return newQVideoEncoderSettings((*C.QVideoEncoderSettings)(h)) } // NewQVideoEncoderSettings constructs a new QVideoEncoderSettings object. func NewQVideoEncoderSettings() *QVideoEncoderSettings { - var outptr_QVideoEncoderSettings *C.QVideoEncoderSettings = nil - C.QVideoEncoderSettings_new(&outptr_QVideoEncoderSettings) - ret := newQVideoEncoderSettings(outptr_QVideoEncoderSettings) + ret := newQVideoEncoderSettings(C.QVideoEncoderSettings_new()) ret.isSubclass = true return ret } // NewQVideoEncoderSettings2 constructs a new QVideoEncoderSettings object. func NewQVideoEncoderSettings2(other *QVideoEncoderSettings) *QVideoEncoderSettings { - var outptr_QVideoEncoderSettings *C.QVideoEncoderSettings = nil - C.QVideoEncoderSettings_new2(other.cPointer(), &outptr_QVideoEncoderSettings) - ret := newQVideoEncoderSettings(outptr_QVideoEncoderSettings) + ret := newQVideoEncoderSettings(C.QVideoEncoderSettings_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -446,34 +432,27 @@ func newQImageEncoderSettings(h *C.QImageEncoderSettings) *QImageEncoderSettings if h == nil { return nil } + return &QImageEncoderSettings{h: h} } // UnsafeNewQImageEncoderSettings constructs the type using only unsafe pointers. func UnsafeNewQImageEncoderSettings(h unsafe.Pointer) *QImageEncoderSettings { - if h == nil { - return nil - } - - return &QImageEncoderSettings{h: (*C.QImageEncoderSettings)(h)} + return newQImageEncoderSettings((*C.QImageEncoderSettings)(h)) } // NewQImageEncoderSettings constructs a new QImageEncoderSettings object. func NewQImageEncoderSettings() *QImageEncoderSettings { - var outptr_QImageEncoderSettings *C.QImageEncoderSettings = nil - C.QImageEncoderSettings_new(&outptr_QImageEncoderSettings) - ret := newQImageEncoderSettings(outptr_QImageEncoderSettings) + ret := newQImageEncoderSettings(C.QImageEncoderSettings_new()) ret.isSubclass = true return ret } // NewQImageEncoderSettings2 constructs a new QImageEncoderSettings object. func NewQImageEncoderSettings2(other *QImageEncoderSettings) *QImageEncoderSettings { - var outptr_QImageEncoderSettings *C.QImageEncoderSettings = nil - C.QImageEncoderSettings_new2(other.cPointer(), &outptr_QImageEncoderSettings) - ret := newQImageEncoderSettings(outptr_QImageEncoderSettings) + ret := newQImageEncoderSettings(C.QImageEncoderSettings_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/multimedia/gen_qmediaencodersettings.h b/qt/multimedia/gen_qmediaencodersettings.h index 0188e9be..2958fe20 100644 --- a/qt/multimedia/gen_qmediaencodersettings.h +++ b/qt/multimedia/gen_qmediaencodersettings.h @@ -28,8 +28,8 @@ typedef struct QVariant QVariant; typedef struct QVideoEncoderSettings QVideoEncoderSettings; #endif -void QAudioEncoderSettings_new(QAudioEncoderSettings** outptr_QAudioEncoderSettings); -void QAudioEncoderSettings_new2(QAudioEncoderSettings* other, QAudioEncoderSettings** outptr_QAudioEncoderSettings); +QAudioEncoderSettings* QAudioEncoderSettings_new(); +QAudioEncoderSettings* QAudioEncoderSettings_new2(QAudioEncoderSettings* other); void QAudioEncoderSettings_OperatorAssign(QAudioEncoderSettings* self, QAudioEncoderSettings* other); bool QAudioEncoderSettings_OperatorEqual(const QAudioEncoderSettings* self, QAudioEncoderSettings* other); bool QAudioEncoderSettings_OperatorNotEqual(const QAudioEncoderSettings* self, QAudioEncoderSettings* other); @@ -52,8 +52,8 @@ void QAudioEncoderSettings_SetEncodingOption(QAudioEncoderSettings* self, struct void QAudioEncoderSettings_SetEncodingOptions(QAudioEncoderSettings* self, struct miqt_map /* of struct miqt_string to QVariant* */ options); void QAudioEncoderSettings_Delete(QAudioEncoderSettings* self, bool isSubclass); -void QVideoEncoderSettings_new(QVideoEncoderSettings** outptr_QVideoEncoderSettings); -void QVideoEncoderSettings_new2(QVideoEncoderSettings* other, QVideoEncoderSettings** outptr_QVideoEncoderSettings); +QVideoEncoderSettings* QVideoEncoderSettings_new(); +QVideoEncoderSettings* QVideoEncoderSettings_new2(QVideoEncoderSettings* other); void QVideoEncoderSettings_OperatorAssign(QVideoEncoderSettings* self, QVideoEncoderSettings* other); bool QVideoEncoderSettings_OperatorEqual(const QVideoEncoderSettings* self, QVideoEncoderSettings* other); bool QVideoEncoderSettings_OperatorNotEqual(const QVideoEncoderSettings* self, QVideoEncoderSettings* other); @@ -77,8 +77,8 @@ void QVideoEncoderSettings_SetEncodingOption(QVideoEncoderSettings* self, struct void QVideoEncoderSettings_SetEncodingOptions(QVideoEncoderSettings* self, struct miqt_map /* of struct miqt_string to QVariant* */ options); void QVideoEncoderSettings_Delete(QVideoEncoderSettings* self, bool isSubclass); -void QImageEncoderSettings_new(QImageEncoderSettings** outptr_QImageEncoderSettings); -void QImageEncoderSettings_new2(QImageEncoderSettings* other, QImageEncoderSettings** outptr_QImageEncoderSettings); +QImageEncoderSettings* QImageEncoderSettings_new(); +QImageEncoderSettings* QImageEncoderSettings_new2(QImageEncoderSettings* other); void QImageEncoderSettings_OperatorAssign(QImageEncoderSettings* self, QImageEncoderSettings* other); bool QImageEncoderSettings_OperatorEqual(const QImageEncoderSettings* self, QImageEncoderSettings* other); bool QImageEncoderSettings_OperatorNotEqual(const QImageEncoderSettings* self, QImageEncoderSettings* other); diff --git a/qt/multimedia/gen_qmediagaplessplaybackcontrol.cpp b/qt/multimedia/gen_qmediagaplessplaybackcontrol.cpp index 325f2cdb..b943aed6 100644 --- a/qt/multimedia/gen_qmediagaplessplaybackcontrol.cpp +++ b/qt/multimedia/gen_qmediagaplessplaybackcontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qmediagaplessplaybackcontrol.h" #include "_cgo_export.h" +void QMediaGaplessPlaybackControl_virtbase(QMediaGaplessPlaybackControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QMediaGaplessPlaybackControl_MetaObject(const QMediaGaplessPlaybackControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qmediagaplessplaybackcontrol.go b/qt/multimedia/gen_qmediagaplessplaybackcontrol.go index c200d799..2f0773c9 100644 --- a/qt/multimedia/gen_qmediagaplessplaybackcontrol.go +++ b/qt/multimedia/gen_qmediagaplessplaybackcontrol.go @@ -36,22 +36,20 @@ func (this *QMediaGaplessPlaybackControl) UnsafePointer() unsafe.Pointer { } // newQMediaGaplessPlaybackControl constructs the type using only CGO pointers. -func newQMediaGaplessPlaybackControl(h *C.QMediaGaplessPlaybackControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaGaplessPlaybackControl { +func newQMediaGaplessPlaybackControl(h *C.QMediaGaplessPlaybackControl) *QMediaGaplessPlaybackControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QMediaGaplessPlaybackControl_virtbase(h, &outptr_QMediaControl) + return &QMediaGaplessPlaybackControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQMediaGaplessPlaybackControl constructs the type using only unsafe pointers. -func UnsafeNewQMediaGaplessPlaybackControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaGaplessPlaybackControl { - if h == nil { - return nil - } - - return &QMediaGaplessPlaybackControl{h: (*C.QMediaGaplessPlaybackControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQMediaGaplessPlaybackControl(h unsafe.Pointer) *QMediaGaplessPlaybackControl { + return newQMediaGaplessPlaybackControl((*C.QMediaGaplessPlaybackControl)(h)) } func (this *QMediaGaplessPlaybackControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qmediagaplessplaybackcontrol.h b/qt/multimedia/gen_qmediagaplessplaybackcontrol.h index f9f85e93..e051756e 100644 --- a/qt/multimedia/gen_qmediagaplessplaybackcontrol.h +++ b/qt/multimedia/gen_qmediagaplessplaybackcontrol.h @@ -28,6 +28,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QMediaGaplessPlaybackControl_virtbase(QMediaGaplessPlaybackControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QMediaGaplessPlaybackControl_MetaObject(const QMediaGaplessPlaybackControl* self); void* QMediaGaplessPlaybackControl_Metacast(QMediaGaplessPlaybackControl* self, const char* param1); struct miqt_string QMediaGaplessPlaybackControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qmedianetworkaccesscontrol.cpp b/qt/multimedia/gen_qmedianetworkaccesscontrol.cpp index 2bfca777..2629cba4 100644 --- a/qt/multimedia/gen_qmedianetworkaccesscontrol.cpp +++ b/qt/multimedia/gen_qmedianetworkaccesscontrol.cpp @@ -11,6 +11,10 @@ #include "gen_qmedianetworkaccesscontrol.h" #include "_cgo_export.h" +void QMediaNetworkAccessControl_virtbase(QMediaNetworkAccessControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QMediaNetworkAccessControl_MetaObject(const QMediaNetworkAccessControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qmedianetworkaccesscontrol.go b/qt/multimedia/gen_qmedianetworkaccesscontrol.go index 047d83b7..62f07b65 100644 --- a/qt/multimedia/gen_qmedianetworkaccesscontrol.go +++ b/qt/multimedia/gen_qmedianetworkaccesscontrol.go @@ -37,22 +37,20 @@ func (this *QMediaNetworkAccessControl) UnsafePointer() unsafe.Pointer { } // newQMediaNetworkAccessControl constructs the type using only CGO pointers. -func newQMediaNetworkAccessControl(h *C.QMediaNetworkAccessControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaNetworkAccessControl { +func newQMediaNetworkAccessControl(h *C.QMediaNetworkAccessControl) *QMediaNetworkAccessControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QMediaNetworkAccessControl_virtbase(h, &outptr_QMediaControl) + return &QMediaNetworkAccessControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQMediaNetworkAccessControl constructs the type using only unsafe pointers. -func UnsafeNewQMediaNetworkAccessControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaNetworkAccessControl { - if h == nil { - return nil - } - - return &QMediaNetworkAccessControl{h: (*C.QMediaNetworkAccessControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQMediaNetworkAccessControl(h unsafe.Pointer) *QMediaNetworkAccessControl { + return newQMediaNetworkAccessControl((*C.QMediaNetworkAccessControl)(h)) } func (this *QMediaNetworkAccessControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qmedianetworkaccesscontrol.h b/qt/multimedia/gen_qmedianetworkaccesscontrol.h index 55692b5c..09057b05 100644 --- a/qt/multimedia/gen_qmedianetworkaccesscontrol.h +++ b/qt/multimedia/gen_qmedianetworkaccesscontrol.h @@ -28,6 +28,7 @@ typedef struct QNetworkConfiguration QNetworkConfiguration; typedef struct QObject QObject; #endif +void QMediaNetworkAccessControl_virtbase(QMediaNetworkAccessControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QMediaNetworkAccessControl_MetaObject(const QMediaNetworkAccessControl* self); void* QMediaNetworkAccessControl_Metacast(QMediaNetworkAccessControl* self, const char* param1); struct miqt_string QMediaNetworkAccessControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qmediaobject.cpp b/qt/multimedia/gen_qmediaobject.cpp index 41a515a0..15f6d8b8 100644 --- a/qt/multimedia/gen_qmediaobject.cpp +++ b/qt/multimedia/gen_qmediaobject.cpp @@ -11,6 +11,10 @@ #include "gen_qmediaobject.h" #include "_cgo_export.h" +void QMediaObject_virtbase(QMediaObject* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QMediaObject_MetaObject(const QMediaObject* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qmediaobject.go b/qt/multimedia/gen_qmediaobject.go index 3d990db6..51214989 100644 --- a/qt/multimedia/gen_qmediaobject.go +++ b/qt/multimedia/gen_qmediaobject.go @@ -36,22 +36,20 @@ func (this *QMediaObject) UnsafePointer() unsafe.Pointer { } // newQMediaObject constructs the type using only CGO pointers. -func newQMediaObject(h *C.QMediaObject, h_QObject *C.QObject) *QMediaObject { +func newQMediaObject(h *C.QMediaObject) *QMediaObject { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QMediaObject_virtbase(h, &outptr_QObject) + return &QMediaObject{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQMediaObject constructs the type using only unsafe pointers. -func UnsafeNewQMediaObject(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaObject { - if h == nil { - return nil - } - - return &QMediaObject{h: (*C.QMediaObject)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQMediaObject(h unsafe.Pointer) *QMediaObject { + return newQMediaObject((*C.QMediaObject)(h)) } func (this *QMediaObject) MetaObject() *qt.QMetaObject { @@ -91,7 +89,7 @@ func (this *QMediaObject) Availability() QMultimedia__AvailabilityStatus { } func (this *QMediaObject) Service() *QMediaService { - return newQMediaService(C.QMediaObject_Service(this.h), nil) + return newQMediaService(C.QMediaObject_Service(this.h)) } func (this *QMediaObject) NotifyInterval() int { diff --git a/qt/multimedia/gen_qmediaobject.h b/qt/multimedia/gen_qmediaobject.h index fc88dbf6..29a88460 100644 --- a/qt/multimedia/gen_qmediaobject.h +++ b/qt/multimedia/gen_qmediaobject.h @@ -28,6 +28,7 @@ typedef struct QObject QObject; typedef struct QVariant QVariant; #endif +void QMediaObject_virtbase(QMediaObject* src, QObject** outptr_QObject); QMetaObject* QMediaObject_MetaObject(const QMediaObject* self); void* QMediaObject_Metacast(QMediaObject* self, const char* param1); struct miqt_string QMediaObject_Tr(const char* s); diff --git a/qt/multimedia/gen_qmediaplayer.cpp b/qt/multimedia/gen_qmediaplayer.cpp index 27d13d4b..7e4c82ca 100644 --- a/qt/multimedia/gen_qmediaplayer.cpp +++ b/qt/multimedia/gen_qmediaplayer.cpp @@ -143,25 +143,20 @@ public: }; -void QMediaPlayer_new(QMediaPlayer** outptr_QMediaPlayer, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { - MiqtVirtualQMediaPlayer* ret = new MiqtVirtualQMediaPlayer(); - *outptr_QMediaPlayer = ret; - *outptr_QMediaObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QMediaPlayer* QMediaPlayer_new() { + return new MiqtVirtualQMediaPlayer(); } -void QMediaPlayer_new2(QObject* parent, QMediaPlayer** outptr_QMediaPlayer, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { - MiqtVirtualQMediaPlayer* ret = new MiqtVirtualQMediaPlayer(parent); - *outptr_QMediaPlayer = ret; - *outptr_QMediaObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QMediaPlayer* QMediaPlayer_new2(QObject* parent) { + return new MiqtVirtualQMediaPlayer(parent); } -void QMediaPlayer_new3(QObject* parent, int flags, QMediaPlayer** outptr_QMediaPlayer, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { - MiqtVirtualQMediaPlayer* ret = new MiqtVirtualQMediaPlayer(parent, static_cast(flags)); - *outptr_QMediaPlayer = ret; - *outptr_QMediaObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QMediaPlayer* QMediaPlayer_new3(QObject* parent, int flags) { + return new MiqtVirtualQMediaPlayer(parent, static_cast(flags)); +} + +void QMediaPlayer_virtbase(QMediaPlayer* src, QMediaObject** outptr_QMediaObject) { + *outptr_QMediaObject = static_cast(src); } QMetaObject* QMediaPlayer_MetaObject(const QMediaPlayer* self) { diff --git a/qt/multimedia/gen_qmediaplayer.go b/qt/multimedia/gen_qmediaplayer.go index 5b2da24b..d3809513 100644 --- a/qt/multimedia/gen_qmediaplayer.go +++ b/qt/multimedia/gen_qmediaplayer.go @@ -79,56 +79,42 @@ func (this *QMediaPlayer) UnsafePointer() unsafe.Pointer { } // newQMediaPlayer constructs the type using only CGO pointers. -func newQMediaPlayer(h *C.QMediaPlayer, h_QMediaObject *C.QMediaObject, h_QObject *C.QObject) *QMediaPlayer { +func newQMediaPlayer(h *C.QMediaPlayer) *QMediaPlayer { if h == nil { return nil } + var outptr_QMediaObject *C.QMediaObject = nil + C.QMediaPlayer_virtbase(h, &outptr_QMediaObject) + return &QMediaPlayer{h: h, - QMediaObject: newQMediaObject(h_QMediaObject, h_QObject)} + QMediaObject: newQMediaObject(outptr_QMediaObject)} } // UnsafeNewQMediaPlayer constructs the type using only unsafe pointers. -func UnsafeNewQMediaPlayer(h unsafe.Pointer, h_QMediaObject unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaPlayer { - if h == nil { - return nil - } - - return &QMediaPlayer{h: (*C.QMediaPlayer)(h), - QMediaObject: UnsafeNewQMediaObject(h_QMediaObject, h_QObject)} +func UnsafeNewQMediaPlayer(h unsafe.Pointer) *QMediaPlayer { + return newQMediaPlayer((*C.QMediaPlayer)(h)) } // NewQMediaPlayer constructs a new QMediaPlayer object. func NewQMediaPlayer() *QMediaPlayer { - var outptr_QMediaPlayer *C.QMediaPlayer = nil - var outptr_QMediaObject *C.QMediaObject = nil - var outptr_QObject *C.QObject = nil - C.QMediaPlayer_new(&outptr_QMediaPlayer, &outptr_QMediaObject, &outptr_QObject) - ret := newQMediaPlayer(outptr_QMediaPlayer, outptr_QMediaObject, outptr_QObject) + ret := newQMediaPlayer(C.QMediaPlayer_new()) ret.isSubclass = true return ret } // NewQMediaPlayer2 constructs a new QMediaPlayer object. func NewQMediaPlayer2(parent *qt.QObject) *QMediaPlayer { - var outptr_QMediaPlayer *C.QMediaPlayer = nil - var outptr_QMediaObject *C.QMediaObject = nil - var outptr_QObject *C.QObject = nil - C.QMediaPlayer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QMediaPlayer, &outptr_QMediaObject, &outptr_QObject) - ret := newQMediaPlayer(outptr_QMediaPlayer, outptr_QMediaObject, outptr_QObject) + ret := newQMediaPlayer(C.QMediaPlayer_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQMediaPlayer3 constructs a new QMediaPlayer object. func NewQMediaPlayer3(parent *qt.QObject, flags QMediaPlayer__Flag) *QMediaPlayer { - var outptr_QMediaPlayer *C.QMediaPlayer = nil - var outptr_QMediaObject *C.QMediaObject = nil - var outptr_QObject *C.QObject = nil - C.QMediaPlayer_new3((*C.QObject)(parent.UnsafePointer()), (C.int)(flags), &outptr_QMediaPlayer, &outptr_QMediaObject, &outptr_QObject) - ret := newQMediaPlayer(outptr_QMediaPlayer, outptr_QMediaObject, outptr_QObject) + ret := newQMediaPlayer(C.QMediaPlayer_new3((*C.QObject)(parent.UnsafePointer()), (C.int)(flags))) ret.isSubclass = true return ret } @@ -211,11 +197,11 @@ func (this *QMediaPlayer) Media() *QMediaContent { } func (this *QMediaPlayer) MediaStream() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QMediaPlayer_MediaStream(this.h)), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QMediaPlayer_MediaStream(this.h))) } func (this *QMediaPlayer) Playlist() *QMediaPlaylist { - return newQMediaPlaylist(C.QMediaPlayer_Playlist(this.h), nil, nil) + return newQMediaPlaylist(C.QMediaPlayer_Playlist(this.h)) } func (this *QMediaPlayer) CurrentMedia() *QMediaContent { @@ -939,7 +925,7 @@ func miqt_exec_callback_QMediaPlayer_IsAvailable(self *C.QMediaPlayer, cb C.intp func (this *QMediaPlayer) callVirtualBase_Service() *QMediaService { - return newQMediaService(C.QMediaPlayer_virtualbase_Service(unsafe.Pointer(this.h)), nil) + return newQMediaService(C.QMediaPlayer_virtualbase_Service(unsafe.Pointer(this.h))) } func (this *QMediaPlayer) OnService(slot func(super func() *QMediaService) *QMediaService) { diff --git a/qt/multimedia/gen_qmediaplayer.h b/qt/multimedia/gen_qmediaplayer.h index 6ec40513..9d940d2c 100644 --- a/qt/multimedia/gen_qmediaplayer.h +++ b/qt/multimedia/gen_qmediaplayer.h @@ -42,9 +42,10 @@ typedef struct QObject QObject; typedef struct QVideoWidget QVideoWidget; #endif -void QMediaPlayer_new(QMediaPlayer** outptr_QMediaPlayer, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); -void QMediaPlayer_new2(QObject* parent, QMediaPlayer** outptr_QMediaPlayer, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); -void QMediaPlayer_new3(QObject* parent, int flags, QMediaPlayer** outptr_QMediaPlayer, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); +QMediaPlayer* QMediaPlayer_new(); +QMediaPlayer* QMediaPlayer_new2(QObject* parent); +QMediaPlayer* QMediaPlayer_new3(QObject* parent, int flags); +void QMediaPlayer_virtbase(QMediaPlayer* src, QMediaObject** outptr_QMediaObject); QMetaObject* QMediaPlayer_MetaObject(const QMediaPlayer* self); void* QMediaPlayer_Metacast(QMediaPlayer* self, const char* param1); struct miqt_string QMediaPlayer_Tr(const char* s); diff --git a/qt/multimedia/gen_qmediaplayercontrol.cpp b/qt/multimedia/gen_qmediaplayercontrol.cpp index e5222b83..9b4d0ad2 100644 --- a/qt/multimedia/gen_qmediaplayercontrol.cpp +++ b/qt/multimedia/gen_qmediaplayercontrol.cpp @@ -12,6 +12,10 @@ #include "gen_qmediaplayercontrol.h" #include "_cgo_export.h" +void QMediaPlayerControl_virtbase(QMediaPlayerControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QMediaPlayerControl_MetaObject(const QMediaPlayerControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qmediaplayercontrol.go b/qt/multimedia/gen_qmediaplayercontrol.go index 6f3f1847..530cb4db 100644 --- a/qt/multimedia/gen_qmediaplayercontrol.go +++ b/qt/multimedia/gen_qmediaplayercontrol.go @@ -36,22 +36,20 @@ func (this *QMediaPlayerControl) UnsafePointer() unsafe.Pointer { } // newQMediaPlayerControl constructs the type using only CGO pointers. -func newQMediaPlayerControl(h *C.QMediaPlayerControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaPlayerControl { +func newQMediaPlayerControl(h *C.QMediaPlayerControl) *QMediaPlayerControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QMediaPlayerControl_virtbase(h, &outptr_QMediaControl) + return &QMediaPlayerControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQMediaPlayerControl constructs the type using only unsafe pointers. -func UnsafeNewQMediaPlayerControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaPlayerControl { - if h == nil { - return nil - } - - return &QMediaPlayerControl{h: (*C.QMediaPlayerControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQMediaPlayerControl(h unsafe.Pointer) *QMediaPlayerControl { + return newQMediaPlayerControl((*C.QMediaPlayerControl)(h)) } func (this *QMediaPlayerControl) MetaObject() *qt.QMetaObject { @@ -155,7 +153,7 @@ func (this *QMediaPlayerControl) Media() *QMediaContent { } func (this *QMediaPlayerControl) MediaStream() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QMediaPlayerControl_MediaStream(this.h)), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QMediaPlayerControl_MediaStream(this.h))) } func (this *QMediaPlayerControl) SetMedia(media *QMediaContent, stream *qt.QIODevice) { diff --git a/qt/multimedia/gen_qmediaplayercontrol.h b/qt/multimedia/gen_qmediaplayercontrol.h index 8f64c43f..60c2b1ef 100644 --- a/qt/multimedia/gen_qmediaplayercontrol.h +++ b/qt/multimedia/gen_qmediaplayercontrol.h @@ -32,6 +32,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QMediaPlayerControl_virtbase(QMediaPlayerControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QMediaPlayerControl_MetaObject(const QMediaPlayerControl* self); void* QMediaPlayerControl_Metacast(QMediaPlayerControl* self, const char* param1); struct miqt_string QMediaPlayerControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qmediaplaylist.cpp b/qt/multimedia/gen_qmediaplaylist.cpp index ffd1cde0..e01e375e 100644 --- a/qt/multimedia/gen_qmediaplaylist.cpp +++ b/qt/multimedia/gen_qmediaplaylist.cpp @@ -245,18 +245,17 @@ public: }; -void QMediaPlaylist_new(QMediaPlaylist** outptr_QMediaPlaylist, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQMediaPlaylist* ret = new MiqtVirtualQMediaPlaylist(); - *outptr_QMediaPlaylist = ret; - *outptr_QObject = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QMediaPlaylist* QMediaPlaylist_new() { + return new MiqtVirtualQMediaPlaylist(); } -void QMediaPlaylist_new2(QObject* parent, QMediaPlaylist** outptr_QMediaPlaylist, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQMediaPlaylist* ret = new MiqtVirtualQMediaPlaylist(parent); - *outptr_QMediaPlaylist = ret; - *outptr_QObject = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QMediaPlaylist* QMediaPlaylist_new2(QObject* parent) { + return new MiqtVirtualQMediaPlaylist(parent); +} + +void QMediaPlaylist_virtbase(QMediaPlaylist* src, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { + *outptr_QObject = static_cast(src); + *outptr_QMediaBindableInterface = static_cast(src); } QMetaObject* QMediaPlaylist_MetaObject(const QMediaPlaylist* self) { diff --git a/qt/multimedia/gen_qmediaplaylist.go b/qt/multimedia/gen_qmediaplaylist.go index 65e4912c..3000c912 100644 --- a/qt/multimedia/gen_qmediaplaylist.go +++ b/qt/multimedia/gen_qmediaplaylist.go @@ -58,46 +58,36 @@ func (this *QMediaPlaylist) UnsafePointer() unsafe.Pointer { } // newQMediaPlaylist constructs the type using only CGO pointers. -func newQMediaPlaylist(h *C.QMediaPlaylist, h_QObject *C.QObject, h_QMediaBindableInterface *C.QMediaBindableInterface) *QMediaPlaylist { +func newQMediaPlaylist(h *C.QMediaPlaylist) *QMediaPlaylist { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + C.QMediaPlaylist_virtbase(h, &outptr_QObject, &outptr_QMediaBindableInterface) + return &QMediaPlaylist{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject)), - QMediaBindableInterface: newQMediaBindableInterface(h_QMediaBindableInterface)} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject)), + QMediaBindableInterface: newQMediaBindableInterface(outptr_QMediaBindableInterface)} } // UnsafeNewQMediaPlaylist constructs the type using only unsafe pointers. -func UnsafeNewQMediaPlaylist(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QMediaPlaylist { - if h == nil { - return nil - } - - return &QMediaPlaylist{h: (*C.QMediaPlaylist)(h), - QObject: qt.UnsafeNewQObject(h_QObject), - QMediaBindableInterface: UnsafeNewQMediaBindableInterface(h_QMediaBindableInterface)} +func UnsafeNewQMediaPlaylist(h unsafe.Pointer) *QMediaPlaylist { + return newQMediaPlaylist((*C.QMediaPlaylist)(h)) } // NewQMediaPlaylist constructs a new QMediaPlaylist object. func NewQMediaPlaylist() *QMediaPlaylist { - var outptr_QMediaPlaylist *C.QMediaPlaylist = nil - var outptr_QObject *C.QObject = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QMediaPlaylist_new(&outptr_QMediaPlaylist, &outptr_QObject, &outptr_QMediaBindableInterface) - ret := newQMediaPlaylist(outptr_QMediaPlaylist, outptr_QObject, outptr_QMediaBindableInterface) + ret := newQMediaPlaylist(C.QMediaPlaylist_new()) ret.isSubclass = true return ret } // NewQMediaPlaylist2 constructs a new QMediaPlaylist object. func NewQMediaPlaylist2(parent *qt.QObject) *QMediaPlaylist { - var outptr_QMediaPlaylist *C.QMediaPlaylist = nil - var outptr_QObject *C.QObject = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QMediaPlaylist_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QMediaPlaylist, &outptr_QObject, &outptr_QMediaBindableInterface) - ret := newQMediaPlaylist(outptr_QMediaPlaylist, outptr_QObject, outptr_QMediaBindableInterface) + ret := newQMediaPlaylist(C.QMediaPlaylist_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -131,7 +121,7 @@ func QMediaPlaylist_TrUtf8(s string) string { } func (this *QMediaPlaylist) MediaObject() *QMediaObject { - return newQMediaObject(C.QMediaPlaylist_MediaObject(this.h), nil) + return newQMediaObject(C.QMediaPlaylist_MediaObject(this.h)) } func (this *QMediaPlaylist) PlaybackMode() QMediaPlaylist__PlaybackMode { @@ -553,7 +543,7 @@ func (this *QMediaPlaylist) Save22(location *qt.QUrl, format string) bool { func (this *QMediaPlaylist) callVirtualBase_MediaObject() *QMediaObject { - return newQMediaObject(C.QMediaPlaylist_virtualbase_MediaObject(unsafe.Pointer(this.h)), nil) + return newQMediaObject(C.QMediaPlaylist_virtualbase_MediaObject(unsafe.Pointer(this.h))) } func (this *QMediaPlaylist) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { @@ -596,7 +586,7 @@ func miqt_exec_callback_QMediaPlaylist_SetMediaObject(self *C.QMediaPlaylist, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMediaObject(object, nil) + slotval1 := newQMediaObject(object) virtualReturn := gofunc((&QMediaPlaylist{h: self}).callVirtualBase_SetMediaObject, slotval1) @@ -682,7 +672,7 @@ func miqt_exec_callback_QMediaPlaylist_TimerEvent(self *C.QMediaPlaylist, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QMediaPlaylist{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -708,7 +698,7 @@ func miqt_exec_callback_QMediaPlaylist_ChildEvent(self *C.QMediaPlaylist, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QMediaPlaylist{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/multimedia/gen_qmediaplaylist.h b/qt/multimedia/gen_qmediaplaylist.h index 51febd9f..c2710ff4 100644 --- a/qt/multimedia/gen_qmediaplaylist.h +++ b/qt/multimedia/gen_qmediaplaylist.h @@ -44,8 +44,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -void QMediaPlaylist_new(QMediaPlaylist** outptr_QMediaPlaylist, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); -void QMediaPlaylist_new2(QObject* parent, QMediaPlaylist** outptr_QMediaPlaylist, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); +QMediaPlaylist* QMediaPlaylist_new(); +QMediaPlaylist* QMediaPlaylist_new2(QObject* parent); +void QMediaPlaylist_virtbase(QMediaPlaylist* src, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); QMetaObject* QMediaPlaylist_MetaObject(const QMediaPlaylist* self); void* QMediaPlaylist_Metacast(QMediaPlaylist* self, const char* param1); struct miqt_string QMediaPlaylist_Tr(const char* s); diff --git a/qt/multimedia/gen_qmediarecorder.cpp b/qt/multimedia/gen_qmediarecorder.cpp index 2964941f..c3b203e4 100644 --- a/qt/multimedia/gen_qmediarecorder.cpp +++ b/qt/multimedia/gen_qmediarecorder.cpp @@ -246,18 +246,17 @@ public: }; -void QMediaRecorder_new(QMediaObject* mediaObject, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQMediaRecorder* ret = new MiqtVirtualQMediaRecorder(mediaObject); - *outptr_QMediaRecorder = ret; - *outptr_QObject = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QMediaRecorder* QMediaRecorder_new(QMediaObject* mediaObject) { + return new MiqtVirtualQMediaRecorder(mediaObject); } -void QMediaRecorder_new2(QMediaObject* mediaObject, QObject* parent, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQMediaRecorder* ret = new MiqtVirtualQMediaRecorder(mediaObject, parent); - *outptr_QMediaRecorder = ret; - *outptr_QObject = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QMediaRecorder* QMediaRecorder_new2(QMediaObject* mediaObject, QObject* parent) { + return new MiqtVirtualQMediaRecorder(mediaObject, parent); +} + +void QMediaRecorder_virtbase(QMediaRecorder* src, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { + *outptr_QObject = static_cast(src); + *outptr_QMediaBindableInterface = static_cast(src); } QMetaObject* QMediaRecorder_MetaObject(const QMediaRecorder* self) { diff --git a/qt/multimedia/gen_qmediarecorder.go b/qt/multimedia/gen_qmediarecorder.go index 84b69f36..f8cf8fdf 100644 --- a/qt/multimedia/gen_qmediarecorder.go +++ b/qt/multimedia/gen_qmediarecorder.go @@ -67,46 +67,36 @@ func (this *QMediaRecorder) UnsafePointer() unsafe.Pointer { } // newQMediaRecorder constructs the type using only CGO pointers. -func newQMediaRecorder(h *C.QMediaRecorder, h_QObject *C.QObject, h_QMediaBindableInterface *C.QMediaBindableInterface) *QMediaRecorder { +func newQMediaRecorder(h *C.QMediaRecorder) *QMediaRecorder { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + C.QMediaRecorder_virtbase(h, &outptr_QObject, &outptr_QMediaBindableInterface) + return &QMediaRecorder{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject)), - QMediaBindableInterface: newQMediaBindableInterface(h_QMediaBindableInterface)} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject)), + QMediaBindableInterface: newQMediaBindableInterface(outptr_QMediaBindableInterface)} } // UnsafeNewQMediaRecorder constructs the type using only unsafe pointers. -func UnsafeNewQMediaRecorder(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QMediaRecorder { - if h == nil { - return nil - } - - return &QMediaRecorder{h: (*C.QMediaRecorder)(h), - QObject: qt.UnsafeNewQObject(h_QObject), - QMediaBindableInterface: UnsafeNewQMediaBindableInterface(h_QMediaBindableInterface)} +func UnsafeNewQMediaRecorder(h unsafe.Pointer) *QMediaRecorder { + return newQMediaRecorder((*C.QMediaRecorder)(h)) } // NewQMediaRecorder constructs a new QMediaRecorder object. func NewQMediaRecorder(mediaObject *QMediaObject) *QMediaRecorder { - var outptr_QMediaRecorder *C.QMediaRecorder = nil - var outptr_QObject *C.QObject = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QMediaRecorder_new(mediaObject.cPointer(), &outptr_QMediaRecorder, &outptr_QObject, &outptr_QMediaBindableInterface) - ret := newQMediaRecorder(outptr_QMediaRecorder, outptr_QObject, outptr_QMediaBindableInterface) + ret := newQMediaRecorder(C.QMediaRecorder_new(mediaObject.cPointer())) ret.isSubclass = true return ret } // NewQMediaRecorder2 constructs a new QMediaRecorder object. func NewQMediaRecorder2(mediaObject *QMediaObject, parent *qt.QObject) *QMediaRecorder { - var outptr_QMediaRecorder *C.QMediaRecorder = nil - var outptr_QObject *C.QObject = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QMediaRecorder_new2(mediaObject.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QMediaRecorder, &outptr_QObject, &outptr_QMediaBindableInterface) - ret := newQMediaRecorder(outptr_QMediaRecorder, outptr_QObject, outptr_QMediaBindableInterface) + ret := newQMediaRecorder(C.QMediaRecorder_new2(mediaObject.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -140,7 +130,7 @@ func QMediaRecorder_TrUtf8(s string) string { } func (this *QMediaRecorder) MediaObject() *QMediaObject { - return newQMediaObject(C.QMediaRecorder_MediaObject(this.h), nil) + return newQMediaObject(C.QMediaRecorder_MediaObject(this.h)) } func (this *QMediaRecorder) IsAvailable() bool { @@ -787,7 +777,7 @@ func (this *QMediaRecorder) SetEncodingSettings3(audioSettings *QAudioEncoderSet func (this *QMediaRecorder) callVirtualBase_MediaObject() *QMediaObject { - return newQMediaObject(C.QMediaRecorder_virtualbase_MediaObject(unsafe.Pointer(this.h)), nil) + return newQMediaObject(C.QMediaRecorder_virtualbase_MediaObject(unsafe.Pointer(this.h))) } func (this *QMediaRecorder) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { @@ -830,7 +820,7 @@ func miqt_exec_callback_QMediaRecorder_SetMediaObject(self *C.QMediaRecorder, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMediaObject(object, nil) + slotval1 := newQMediaObject(object) virtualReturn := gofunc((&QMediaRecorder{h: self}).callVirtualBase_SetMediaObject, slotval1) @@ -916,7 +906,7 @@ func miqt_exec_callback_QMediaRecorder_TimerEvent(self *C.QMediaRecorder, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QMediaRecorder{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -942,7 +932,7 @@ func miqt_exec_callback_QMediaRecorder_ChildEvent(self *C.QMediaRecorder, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QMediaRecorder{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/multimedia/gen_qmediarecorder.h b/qt/multimedia/gen_qmediarecorder.h index f668aaa1..26b4f8db 100644 --- a/qt/multimedia/gen_qmediarecorder.h +++ b/qt/multimedia/gen_qmediarecorder.h @@ -46,8 +46,9 @@ typedef struct QVariant QVariant; typedef struct QVideoEncoderSettings QVideoEncoderSettings; #endif -void QMediaRecorder_new(QMediaObject* mediaObject, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); -void QMediaRecorder_new2(QMediaObject* mediaObject, QObject* parent, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); +QMediaRecorder* QMediaRecorder_new(QMediaObject* mediaObject); +QMediaRecorder* QMediaRecorder_new2(QMediaObject* mediaObject, QObject* parent); +void QMediaRecorder_virtbase(QMediaRecorder* src, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); QMetaObject* QMediaRecorder_MetaObject(const QMediaRecorder* self); void* QMediaRecorder_Metacast(QMediaRecorder* self, const char* param1); struct miqt_string QMediaRecorder_Tr(const char* s); diff --git a/qt/multimedia/gen_qmediarecordercontrol.cpp b/qt/multimedia/gen_qmediarecordercontrol.cpp index 9bb9e508..8bb290fc 100644 --- a/qt/multimedia/gen_qmediarecordercontrol.cpp +++ b/qt/multimedia/gen_qmediarecordercontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qmediarecordercontrol.h" #include "_cgo_export.h" +void QMediaRecorderControl_virtbase(QMediaRecorderControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QMediaRecorderControl_MetaObject(const QMediaRecorderControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qmediarecordercontrol.go b/qt/multimedia/gen_qmediarecordercontrol.go index e0515b14..55c92240 100644 --- a/qt/multimedia/gen_qmediarecordercontrol.go +++ b/qt/multimedia/gen_qmediarecordercontrol.go @@ -36,22 +36,20 @@ func (this *QMediaRecorderControl) UnsafePointer() unsafe.Pointer { } // newQMediaRecorderControl constructs the type using only CGO pointers. -func newQMediaRecorderControl(h *C.QMediaRecorderControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaRecorderControl { +func newQMediaRecorderControl(h *C.QMediaRecorderControl) *QMediaRecorderControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QMediaRecorderControl_virtbase(h, &outptr_QMediaControl) + return &QMediaRecorderControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQMediaRecorderControl constructs the type using only unsafe pointers. -func UnsafeNewQMediaRecorderControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaRecorderControl { - if h == nil { - return nil - } - - return &QMediaRecorderControl{h: (*C.QMediaRecorderControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQMediaRecorderControl(h unsafe.Pointer) *QMediaRecorderControl { + return newQMediaRecorderControl((*C.QMediaRecorderControl)(h)) } func (this *QMediaRecorderControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qmediarecordercontrol.h b/qt/multimedia/gen_qmediarecordercontrol.h index 59f67a0b..a43a3b99 100644 --- a/qt/multimedia/gen_qmediarecordercontrol.h +++ b/qt/multimedia/gen_qmediarecordercontrol.h @@ -28,6 +28,7 @@ typedef struct QObject QObject; typedef struct QUrl QUrl; #endif +void QMediaRecorderControl_virtbase(QMediaRecorderControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QMediaRecorderControl_MetaObject(const QMediaRecorderControl* self); void* QMediaRecorderControl_Metacast(QMediaRecorderControl* self, const char* param1); struct miqt_string QMediaRecorderControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qmediaresource.cpp b/qt/multimedia/gen_qmediaresource.cpp index dcaca6f6..9a8167e7 100644 --- a/qt/multimedia/gen_qmediaresource.cpp +++ b/qt/multimedia/gen_qmediaresource.cpp @@ -9,36 +9,30 @@ #include "gen_qmediaresource.h" #include "_cgo_export.h" -void QMediaResource_new(QMediaResource** outptr_QMediaResource) { - QMediaResource* ret = new QMediaResource(); - *outptr_QMediaResource = ret; +QMediaResource* QMediaResource_new() { + return new QMediaResource(); } -void QMediaResource_new2(QUrl* url, QMediaResource** outptr_QMediaResource) { - QMediaResource* ret = new QMediaResource(*url); - *outptr_QMediaResource = ret; +QMediaResource* QMediaResource_new2(QUrl* url) { + return new QMediaResource(*url); } -void QMediaResource_new3(QNetworkRequest* request, QMediaResource** outptr_QMediaResource) { - QMediaResource* ret = new QMediaResource(*request); - *outptr_QMediaResource = ret; +QMediaResource* QMediaResource_new3(QNetworkRequest* request) { + return new QMediaResource(*request); } -void QMediaResource_new4(QMediaResource* other, QMediaResource** outptr_QMediaResource) { - QMediaResource* ret = new QMediaResource(*other); - *outptr_QMediaResource = ret; +QMediaResource* QMediaResource_new4(QMediaResource* other) { + return new QMediaResource(*other); } -void QMediaResource_new5(QUrl* url, struct miqt_string mimeType, QMediaResource** outptr_QMediaResource) { +QMediaResource* QMediaResource_new5(QUrl* url, struct miqt_string mimeType) { QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); - QMediaResource* ret = new QMediaResource(*url, mimeType_QString); - *outptr_QMediaResource = ret; + return new QMediaResource(*url, mimeType_QString); } -void QMediaResource_new6(QNetworkRequest* request, struct miqt_string mimeType, QMediaResource** outptr_QMediaResource) { +QMediaResource* QMediaResource_new6(QNetworkRequest* request, struct miqt_string mimeType) { QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); - QMediaResource* ret = new QMediaResource(*request, mimeType_QString); - *outptr_QMediaResource = ret; + return new QMediaResource(*request, mimeType_QString); } void QMediaResource_OperatorAssign(QMediaResource* self, QMediaResource* other) { diff --git a/qt/multimedia/gen_qmediaresource.go b/qt/multimedia/gen_qmediaresource.go index 3d5b5403..1cbbfb47 100644 --- a/qt/multimedia/gen_qmediaresource.go +++ b/qt/multimedia/gen_qmediaresource.go @@ -39,54 +39,43 @@ func newQMediaResource(h *C.QMediaResource) *QMediaResource { if h == nil { return nil } + return &QMediaResource{h: h} } // UnsafeNewQMediaResource constructs the type using only unsafe pointers. func UnsafeNewQMediaResource(h unsafe.Pointer) *QMediaResource { - if h == nil { - return nil - } - - return &QMediaResource{h: (*C.QMediaResource)(h)} + return newQMediaResource((*C.QMediaResource)(h)) } // NewQMediaResource constructs a new QMediaResource object. func NewQMediaResource() *QMediaResource { - var outptr_QMediaResource *C.QMediaResource = nil - C.QMediaResource_new(&outptr_QMediaResource) - ret := newQMediaResource(outptr_QMediaResource) + ret := newQMediaResource(C.QMediaResource_new()) ret.isSubclass = true return ret } // NewQMediaResource2 constructs a new QMediaResource object. func NewQMediaResource2(url *qt.QUrl) *QMediaResource { - var outptr_QMediaResource *C.QMediaResource = nil - C.QMediaResource_new2((*C.QUrl)(url.UnsafePointer()), &outptr_QMediaResource) - ret := newQMediaResource(outptr_QMediaResource) + ret := newQMediaResource(C.QMediaResource_new2((*C.QUrl)(url.UnsafePointer()))) ret.isSubclass = true return ret } // NewQMediaResource3 constructs a new QMediaResource object. func NewQMediaResource3(request *network.QNetworkRequest) *QMediaResource { - var outptr_QMediaResource *C.QMediaResource = nil - C.QMediaResource_new3((*C.QNetworkRequest)(request.UnsafePointer()), &outptr_QMediaResource) - ret := newQMediaResource(outptr_QMediaResource) + ret := newQMediaResource(C.QMediaResource_new3((*C.QNetworkRequest)(request.UnsafePointer()))) ret.isSubclass = true return ret } // NewQMediaResource4 constructs a new QMediaResource object. func NewQMediaResource4(other *QMediaResource) *QMediaResource { - var outptr_QMediaResource *C.QMediaResource = nil - C.QMediaResource_new4(other.cPointer(), &outptr_QMediaResource) - ret := newQMediaResource(outptr_QMediaResource) + ret := newQMediaResource(C.QMediaResource_new4(other.cPointer())) ret.isSubclass = true return ret } @@ -97,10 +86,8 @@ func NewQMediaResource5(url *qt.QUrl, mimeType string) *QMediaResource { mimeType_ms.data = C.CString(mimeType) mimeType_ms.len = C.size_t(len(mimeType)) defer C.free(unsafe.Pointer(mimeType_ms.data)) - var outptr_QMediaResource *C.QMediaResource = nil - C.QMediaResource_new5((*C.QUrl)(url.UnsafePointer()), mimeType_ms, &outptr_QMediaResource) - ret := newQMediaResource(outptr_QMediaResource) + ret := newQMediaResource(C.QMediaResource_new5((*C.QUrl)(url.UnsafePointer()), mimeType_ms)) ret.isSubclass = true return ret } @@ -111,10 +98,8 @@ func NewQMediaResource6(request *network.QNetworkRequest, mimeType string) *QMed mimeType_ms.data = C.CString(mimeType) mimeType_ms.len = C.size_t(len(mimeType)) defer C.free(unsafe.Pointer(mimeType_ms.data)) - var outptr_QMediaResource *C.QMediaResource = nil - C.QMediaResource_new6((*C.QNetworkRequest)(request.UnsafePointer()), mimeType_ms, &outptr_QMediaResource) - ret := newQMediaResource(outptr_QMediaResource) + ret := newQMediaResource(C.QMediaResource_new6((*C.QNetworkRequest)(request.UnsafePointer()), mimeType_ms)) ret.isSubclass = true return ret } diff --git a/qt/multimedia/gen_qmediaresource.h b/qt/multimedia/gen_qmediaresource.h index 48bbcd38..92e95cbf 100644 --- a/qt/multimedia/gen_qmediaresource.h +++ b/qt/multimedia/gen_qmediaresource.h @@ -26,12 +26,12 @@ typedef struct QSize QSize; typedef struct QUrl QUrl; #endif -void QMediaResource_new(QMediaResource** outptr_QMediaResource); -void QMediaResource_new2(QUrl* url, QMediaResource** outptr_QMediaResource); -void QMediaResource_new3(QNetworkRequest* request, QMediaResource** outptr_QMediaResource); -void QMediaResource_new4(QMediaResource* other, QMediaResource** outptr_QMediaResource); -void QMediaResource_new5(QUrl* url, struct miqt_string mimeType, QMediaResource** outptr_QMediaResource); -void QMediaResource_new6(QNetworkRequest* request, struct miqt_string mimeType, QMediaResource** outptr_QMediaResource); +QMediaResource* QMediaResource_new(); +QMediaResource* QMediaResource_new2(QUrl* url); +QMediaResource* QMediaResource_new3(QNetworkRequest* request); +QMediaResource* QMediaResource_new4(QMediaResource* other); +QMediaResource* QMediaResource_new5(QUrl* url, struct miqt_string mimeType); +QMediaResource* QMediaResource_new6(QNetworkRequest* request, struct miqt_string mimeType); void QMediaResource_OperatorAssign(QMediaResource* self, QMediaResource* other); bool QMediaResource_IsNull(const QMediaResource* self); bool QMediaResource_OperatorEqual(const QMediaResource* self, QMediaResource* other); diff --git a/qt/multimedia/gen_qmediaservice.cpp b/qt/multimedia/gen_qmediaservice.cpp index 512c1d31..4255992e 100644 --- a/qt/multimedia/gen_qmediaservice.cpp +++ b/qt/multimedia/gen_qmediaservice.cpp @@ -9,6 +9,10 @@ #include "gen_qmediaservice.h" #include "_cgo_export.h" +void QMediaService_virtbase(QMediaService* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QMediaService_MetaObject(const QMediaService* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qmediaservice.go b/qt/multimedia/gen_qmediaservice.go index f5d2cd3f..1115d124 100644 --- a/qt/multimedia/gen_qmediaservice.go +++ b/qt/multimedia/gen_qmediaservice.go @@ -35,22 +35,20 @@ func (this *QMediaService) UnsafePointer() unsafe.Pointer { } // newQMediaService constructs the type using only CGO pointers. -func newQMediaService(h *C.QMediaService, h_QObject *C.QObject) *QMediaService { +func newQMediaService(h *C.QMediaService) *QMediaService { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QMediaService_virtbase(h, &outptr_QObject) + return &QMediaService{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQMediaService constructs the type using only unsafe pointers. -func UnsafeNewQMediaService(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaService { - if h == nil { - return nil - } - - return &QMediaService{h: (*C.QMediaService)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQMediaService(h unsafe.Pointer) *QMediaService { + return newQMediaService((*C.QMediaService)(h)) } func (this *QMediaService) MetaObject() *qt.QMetaObject { @@ -84,7 +82,7 @@ func QMediaService_TrUtf8(s string) string { func (this *QMediaService) RequestControl(name string) *QMediaControl { name_Cstring := C.CString(name) defer C.free(unsafe.Pointer(name_Cstring)) - return newQMediaControl(C.QMediaService_RequestControl(this.h, name_Cstring), nil) + return newQMediaControl(C.QMediaService_RequestControl(this.h, name_Cstring)) } func (this *QMediaService) ReleaseControl(control *QMediaControl) { diff --git a/qt/multimedia/gen_qmediaservice.h b/qt/multimedia/gen_qmediaservice.h index e9306ae4..5de4a1ee 100644 --- a/qt/multimedia/gen_qmediaservice.h +++ b/qt/multimedia/gen_qmediaservice.h @@ -26,6 +26,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QMediaService_virtbase(QMediaService* src, QObject** outptr_QObject); QMetaObject* QMediaService_MetaObject(const QMediaService* self); void* QMediaService_Metacast(QMediaService* self, const char* param1); struct miqt_string QMediaService_Tr(const char* s); diff --git a/qt/multimedia/gen_qmediaserviceproviderplugin.cpp b/qt/multimedia/gen_qmediaserviceproviderplugin.cpp index 1cdaae5a..ac4946ab 100644 --- a/qt/multimedia/gen_qmediaserviceproviderplugin.cpp +++ b/qt/multimedia/gen_qmediaserviceproviderplugin.cpp @@ -18,12 +18,11 @@ #include "gen_qmediaserviceproviderplugin.h" #include "_cgo_export.h" -void QMediaServiceProviderHint_new(QMediaServiceProviderHint** outptr_QMediaServiceProviderHint) { - QMediaServiceProviderHint* ret = new QMediaServiceProviderHint(); - *outptr_QMediaServiceProviderHint = ret; +QMediaServiceProviderHint* QMediaServiceProviderHint_new() { + return new QMediaServiceProviderHint(); } -void QMediaServiceProviderHint_new2(struct miqt_string mimeType, struct miqt_array /* of struct miqt_string */ codecs, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint) { +QMediaServiceProviderHint* QMediaServiceProviderHint_new2(struct miqt_string mimeType, struct miqt_array /* of struct miqt_string */ codecs) { QString mimeType_QString = QString::fromUtf8(mimeType.data, mimeType.len); QStringList codecs_QList; codecs_QList.reserve(codecs.len); @@ -32,29 +31,24 @@ void QMediaServiceProviderHint_new2(struct miqt_string mimeType, struct miqt_arr QString codecs_arr_i_QString = QString::fromUtf8(codecs_arr[i].data, codecs_arr[i].len); codecs_QList.push_back(codecs_arr_i_QString); } - QMediaServiceProviderHint* ret = new QMediaServiceProviderHint(mimeType_QString, codecs_QList); - *outptr_QMediaServiceProviderHint = ret; + return new QMediaServiceProviderHint(mimeType_QString, codecs_QList); } -void QMediaServiceProviderHint_new3(struct miqt_string device, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint) { +QMediaServiceProviderHint* QMediaServiceProviderHint_new3(struct miqt_string device) { QByteArray device_QByteArray(device.data, device.len); - QMediaServiceProviderHint* ret = new QMediaServiceProviderHint(device_QByteArray); - *outptr_QMediaServiceProviderHint = ret; + return new QMediaServiceProviderHint(device_QByteArray); } -void QMediaServiceProviderHint_new4(int position, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint) { - QMediaServiceProviderHint* ret = new QMediaServiceProviderHint(static_cast(position)); - *outptr_QMediaServiceProviderHint = ret; +QMediaServiceProviderHint* QMediaServiceProviderHint_new4(int position) { + return new QMediaServiceProviderHint(static_cast(position)); } -void QMediaServiceProviderHint_new5(int features, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint) { - QMediaServiceProviderHint* ret = new QMediaServiceProviderHint(static_cast(features)); - *outptr_QMediaServiceProviderHint = ret; +QMediaServiceProviderHint* QMediaServiceProviderHint_new5(int features) { + return new QMediaServiceProviderHint(static_cast(features)); } -void QMediaServiceProviderHint_new6(QMediaServiceProviderHint* other, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint) { - QMediaServiceProviderHint* ret = new QMediaServiceProviderHint(*other); - *outptr_QMediaServiceProviderHint = ret; +QMediaServiceProviderHint* QMediaServiceProviderHint_new6(QMediaServiceProviderHint* other) { + return new QMediaServiceProviderHint(*other); } void QMediaServiceProviderHint_OperatorAssign(QMediaServiceProviderHint* self, QMediaServiceProviderHint* other) { @@ -309,6 +303,11 @@ void QMediaServiceFeaturesInterface_Delete(QMediaServiceFeaturesInterface* self, } } +void QMediaServiceProviderPlugin_virtbase(QMediaServiceProviderPlugin* src, QObject** outptr_QObject, QMediaServiceProviderFactoryInterface** outptr_QMediaServiceProviderFactoryInterface) { + *outptr_QObject = static_cast(src); + *outptr_QMediaServiceProviderFactoryInterface = static_cast(src); +} + QMetaObject* QMediaServiceProviderPlugin_MetaObject(const QMediaServiceProviderPlugin* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qmediaserviceproviderplugin.go b/qt/multimedia/gen_qmediaserviceproviderplugin.go index 4b356b07..03b12996 100644 --- a/qt/multimedia/gen_qmediaserviceproviderplugin.go +++ b/qt/multimedia/gen_qmediaserviceproviderplugin.go @@ -57,24 +57,19 @@ func newQMediaServiceProviderHint(h *C.QMediaServiceProviderHint) *QMediaService if h == nil { return nil } + return &QMediaServiceProviderHint{h: h} } // UnsafeNewQMediaServiceProviderHint constructs the type using only unsafe pointers. func UnsafeNewQMediaServiceProviderHint(h unsafe.Pointer) *QMediaServiceProviderHint { - if h == nil { - return nil - } - - return &QMediaServiceProviderHint{h: (*C.QMediaServiceProviderHint)(h)} + return newQMediaServiceProviderHint((*C.QMediaServiceProviderHint)(h)) } // NewQMediaServiceProviderHint constructs a new QMediaServiceProviderHint object. func NewQMediaServiceProviderHint() *QMediaServiceProviderHint { - var outptr_QMediaServiceProviderHint *C.QMediaServiceProviderHint = nil - C.QMediaServiceProviderHint_new(&outptr_QMediaServiceProviderHint) - ret := newQMediaServiceProviderHint(outptr_QMediaServiceProviderHint) + ret := newQMediaServiceProviderHint(C.QMediaServiceProviderHint_new()) ret.isSubclass = true return ret } @@ -95,10 +90,8 @@ func NewQMediaServiceProviderHint2(mimeType string, codecs []string) *QMediaServ codecs_CArray[i] = codecs_i_ms } codecs_ma := C.struct_miqt_array{len: C.size_t(len(codecs)), data: unsafe.Pointer(codecs_CArray)} - var outptr_QMediaServiceProviderHint *C.QMediaServiceProviderHint = nil - C.QMediaServiceProviderHint_new2(mimeType_ms, codecs_ma, &outptr_QMediaServiceProviderHint) - ret := newQMediaServiceProviderHint(outptr_QMediaServiceProviderHint) + ret := newQMediaServiceProviderHint(C.QMediaServiceProviderHint_new2(mimeType_ms, codecs_ma)) ret.isSubclass = true return ret } @@ -108,40 +101,32 @@ func NewQMediaServiceProviderHint3(device []byte) *QMediaServiceProviderHint { device_alias := C.struct_miqt_string{} device_alias.data = (*C.char)(unsafe.Pointer(&device[0])) device_alias.len = C.size_t(len(device)) - var outptr_QMediaServiceProviderHint *C.QMediaServiceProviderHint = nil - C.QMediaServiceProviderHint_new3(device_alias, &outptr_QMediaServiceProviderHint) - ret := newQMediaServiceProviderHint(outptr_QMediaServiceProviderHint) + ret := newQMediaServiceProviderHint(C.QMediaServiceProviderHint_new3(device_alias)) ret.isSubclass = true return ret } // NewQMediaServiceProviderHint4 constructs a new QMediaServiceProviderHint object. func NewQMediaServiceProviderHint4(position QCamera__Position) *QMediaServiceProviderHint { - var outptr_QMediaServiceProviderHint *C.QMediaServiceProviderHint = nil - C.QMediaServiceProviderHint_new4((C.int)(position), &outptr_QMediaServiceProviderHint) - ret := newQMediaServiceProviderHint(outptr_QMediaServiceProviderHint) + ret := newQMediaServiceProviderHint(C.QMediaServiceProviderHint_new4((C.int)(position))) ret.isSubclass = true return ret } // NewQMediaServiceProviderHint5 constructs a new QMediaServiceProviderHint object. func NewQMediaServiceProviderHint5(features QMediaServiceProviderHint__Feature) *QMediaServiceProviderHint { - var outptr_QMediaServiceProviderHint *C.QMediaServiceProviderHint = nil - C.QMediaServiceProviderHint_new5((C.int)(features), &outptr_QMediaServiceProviderHint) - ret := newQMediaServiceProviderHint(outptr_QMediaServiceProviderHint) + ret := newQMediaServiceProviderHint(C.QMediaServiceProviderHint_new5((C.int)(features))) ret.isSubclass = true return ret } // NewQMediaServiceProviderHint6 constructs a new QMediaServiceProviderHint object. func NewQMediaServiceProviderHint6(other *QMediaServiceProviderHint) *QMediaServiceProviderHint { - var outptr_QMediaServiceProviderHint *C.QMediaServiceProviderHint = nil - C.QMediaServiceProviderHint_new6(other.cPointer(), &outptr_QMediaServiceProviderHint) - ret := newQMediaServiceProviderHint(outptr_QMediaServiceProviderHint) + ret := newQMediaServiceProviderHint(C.QMediaServiceProviderHint_new6(other.cPointer())) ret.isSubclass = true return ret } @@ -239,16 +224,13 @@ func newQMediaServiceProviderFactoryInterface(h *C.QMediaServiceProviderFactoryI if h == nil { return nil } + return &QMediaServiceProviderFactoryInterface{h: h} } // UnsafeNewQMediaServiceProviderFactoryInterface constructs the type using only unsafe pointers. func UnsafeNewQMediaServiceProviderFactoryInterface(h unsafe.Pointer) *QMediaServiceProviderFactoryInterface { - if h == nil { - return nil - } - - return &QMediaServiceProviderFactoryInterface{h: (*C.QMediaServiceProviderFactoryInterface)(h)} + return newQMediaServiceProviderFactoryInterface((*C.QMediaServiceProviderFactoryInterface)(h)) } func (this *QMediaServiceProviderFactoryInterface) Create(key string) *QMediaService { @@ -256,7 +238,7 @@ func (this *QMediaServiceProviderFactoryInterface) Create(key string) *QMediaSer key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - return newQMediaService(C.QMediaServiceProviderFactoryInterface_Create(this.h, key_ms), nil) + return newQMediaService(C.QMediaServiceProviderFactoryInterface_Create(this.h, key_ms)) } func (this *QMediaServiceProviderFactoryInterface) Release(service *QMediaService) { @@ -305,16 +287,13 @@ func newQMediaServiceSupportedFormatsInterface(h *C.QMediaServiceSupportedFormat if h == nil { return nil } + return &QMediaServiceSupportedFormatsInterface{h: h} } // UnsafeNewQMediaServiceSupportedFormatsInterface constructs the type using only unsafe pointers. func UnsafeNewQMediaServiceSupportedFormatsInterface(h unsafe.Pointer) *QMediaServiceSupportedFormatsInterface { - if h == nil { - return nil - } - - return &QMediaServiceSupportedFormatsInterface{h: (*C.QMediaServiceSupportedFormatsInterface)(h)} + return newQMediaServiceSupportedFormatsInterface((*C.QMediaServiceSupportedFormatsInterface)(h)) } func (this *QMediaServiceSupportedFormatsInterface) HasSupport(mimeType string, codecs []string) QMultimedia__SupportEstimate { @@ -390,16 +369,13 @@ func newQMediaServiceSupportedDevicesInterface(h *C.QMediaServiceSupportedDevice if h == nil { return nil } + return &QMediaServiceSupportedDevicesInterface{h: h} } // UnsafeNewQMediaServiceSupportedDevicesInterface constructs the type using only unsafe pointers. func UnsafeNewQMediaServiceSupportedDevicesInterface(h unsafe.Pointer) *QMediaServiceSupportedDevicesInterface { - if h == nil { - return nil - } - - return &QMediaServiceSupportedDevicesInterface{h: (*C.QMediaServiceSupportedDevicesInterface)(h)} + return newQMediaServiceSupportedDevicesInterface((*C.QMediaServiceSupportedDevicesInterface)(h)) } func (this *QMediaServiceSupportedDevicesInterface) Devices(service []byte) [][]byte { @@ -473,16 +449,13 @@ func newQMediaServiceDefaultDeviceInterface(h *C.QMediaServiceDefaultDeviceInter if h == nil { return nil } + return &QMediaServiceDefaultDeviceInterface{h: h} } // UnsafeNewQMediaServiceDefaultDeviceInterface constructs the type using only unsafe pointers. func UnsafeNewQMediaServiceDefaultDeviceInterface(h unsafe.Pointer) *QMediaServiceDefaultDeviceInterface { - if h == nil { - return nil - } - - return &QMediaServiceDefaultDeviceInterface{h: (*C.QMediaServiceDefaultDeviceInterface)(h)} + return newQMediaServiceDefaultDeviceInterface((*C.QMediaServiceDefaultDeviceInterface)(h)) } func (this *QMediaServiceDefaultDeviceInterface) DefaultDevice(service []byte) []byte { @@ -537,16 +510,13 @@ func newQMediaServiceCameraInfoInterface(h *C.QMediaServiceCameraInfoInterface) if h == nil { return nil } + return &QMediaServiceCameraInfoInterface{h: h} } // UnsafeNewQMediaServiceCameraInfoInterface constructs the type using only unsafe pointers. func UnsafeNewQMediaServiceCameraInfoInterface(h unsafe.Pointer) *QMediaServiceCameraInfoInterface { - if h == nil { - return nil - } - - return &QMediaServiceCameraInfoInterface{h: (*C.QMediaServiceCameraInfoInterface)(h)} + return newQMediaServiceCameraInfoInterface((*C.QMediaServiceCameraInfoInterface)(h)) } func (this *QMediaServiceCameraInfoInterface) CameraPosition(device []byte) QCamera__Position { @@ -605,16 +575,13 @@ func newQMediaServiceFeaturesInterface(h *C.QMediaServiceFeaturesInterface) *QMe if h == nil { return nil } + return &QMediaServiceFeaturesInterface{h: h} } // UnsafeNewQMediaServiceFeaturesInterface constructs the type using only unsafe pointers. func UnsafeNewQMediaServiceFeaturesInterface(h unsafe.Pointer) *QMediaServiceFeaturesInterface { - if h == nil { - return nil - } - - return &QMediaServiceFeaturesInterface{h: (*C.QMediaServiceFeaturesInterface)(h)} + return newQMediaServiceFeaturesInterface((*C.QMediaServiceFeaturesInterface)(h)) } func (this *QMediaServiceFeaturesInterface) SupportedFeatures(service []byte) QMediaServiceProviderHint__Feature { @@ -664,24 +631,22 @@ func (this *QMediaServiceProviderPlugin) UnsafePointer() unsafe.Pointer { } // newQMediaServiceProviderPlugin constructs the type using only CGO pointers. -func newQMediaServiceProviderPlugin(h *C.QMediaServiceProviderPlugin, h_QObject *C.QObject, h_QMediaServiceProviderFactoryInterface *C.QMediaServiceProviderFactoryInterface) *QMediaServiceProviderPlugin { +func newQMediaServiceProviderPlugin(h *C.QMediaServiceProviderPlugin) *QMediaServiceProviderPlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QMediaServiceProviderFactoryInterface *C.QMediaServiceProviderFactoryInterface = nil + C.QMediaServiceProviderPlugin_virtbase(h, &outptr_QObject, &outptr_QMediaServiceProviderFactoryInterface) + return &QMediaServiceProviderPlugin{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject)), - QMediaServiceProviderFactoryInterface: newQMediaServiceProviderFactoryInterface(h_QMediaServiceProviderFactoryInterface)} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject)), + QMediaServiceProviderFactoryInterface: newQMediaServiceProviderFactoryInterface(outptr_QMediaServiceProviderFactoryInterface)} } // UnsafeNewQMediaServiceProviderPlugin constructs the type using only unsafe pointers. -func UnsafeNewQMediaServiceProviderPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QMediaServiceProviderFactoryInterface unsafe.Pointer) *QMediaServiceProviderPlugin { - if h == nil { - return nil - } - - return &QMediaServiceProviderPlugin{h: (*C.QMediaServiceProviderPlugin)(h), - QObject: qt.UnsafeNewQObject(h_QObject), - QMediaServiceProviderFactoryInterface: UnsafeNewQMediaServiceProviderFactoryInterface(h_QMediaServiceProviderFactoryInterface)} +func UnsafeNewQMediaServiceProviderPlugin(h unsafe.Pointer) *QMediaServiceProviderPlugin { + return newQMediaServiceProviderPlugin((*C.QMediaServiceProviderPlugin)(h)) } func (this *QMediaServiceProviderPlugin) MetaObject() *qt.QMetaObject { @@ -717,7 +682,7 @@ func (this *QMediaServiceProviderPlugin) Create(key string) *QMediaService { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - return newQMediaService(C.QMediaServiceProviderPlugin_Create(this.h, key_ms), nil) + return newQMediaService(C.QMediaServiceProviderPlugin_Create(this.h, key_ms)) } func (this *QMediaServiceProviderPlugin) Release(service *QMediaService) { diff --git a/qt/multimedia/gen_qmediaserviceproviderplugin.h b/qt/multimedia/gen_qmediaserviceproviderplugin.h index b75f8a55..d48079a7 100644 --- a/qt/multimedia/gen_qmediaserviceproviderplugin.h +++ b/qt/multimedia/gen_qmediaserviceproviderplugin.h @@ -40,12 +40,12 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -void QMediaServiceProviderHint_new(QMediaServiceProviderHint** outptr_QMediaServiceProviderHint); -void QMediaServiceProviderHint_new2(struct miqt_string mimeType, struct miqt_array /* of struct miqt_string */ codecs, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint); -void QMediaServiceProviderHint_new3(struct miqt_string device, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint); -void QMediaServiceProviderHint_new4(int position, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint); -void QMediaServiceProviderHint_new5(int features, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint); -void QMediaServiceProviderHint_new6(QMediaServiceProviderHint* other, QMediaServiceProviderHint** outptr_QMediaServiceProviderHint); +QMediaServiceProviderHint* QMediaServiceProviderHint_new(); +QMediaServiceProviderHint* QMediaServiceProviderHint_new2(struct miqt_string mimeType, struct miqt_array /* of struct miqt_string */ codecs); +QMediaServiceProviderHint* QMediaServiceProviderHint_new3(struct miqt_string device); +QMediaServiceProviderHint* QMediaServiceProviderHint_new4(int position); +QMediaServiceProviderHint* QMediaServiceProviderHint_new5(int features); +QMediaServiceProviderHint* QMediaServiceProviderHint_new6(QMediaServiceProviderHint* other); void QMediaServiceProviderHint_OperatorAssign(QMediaServiceProviderHint* self, QMediaServiceProviderHint* other); bool QMediaServiceProviderHint_OperatorEqual(const QMediaServiceProviderHint* self, QMediaServiceProviderHint* other); bool QMediaServiceProviderHint_OperatorNotEqual(const QMediaServiceProviderHint* self, QMediaServiceProviderHint* other); @@ -86,6 +86,7 @@ int QMediaServiceFeaturesInterface_SupportedFeatures(const QMediaServiceFeatures void QMediaServiceFeaturesInterface_OperatorAssign(QMediaServiceFeaturesInterface* self, QMediaServiceFeaturesInterface* param1); void QMediaServiceFeaturesInterface_Delete(QMediaServiceFeaturesInterface* self, bool isSubclass); +void QMediaServiceProviderPlugin_virtbase(QMediaServiceProviderPlugin* src, QObject** outptr_QObject, QMediaServiceProviderFactoryInterface** outptr_QMediaServiceProviderFactoryInterface); QMetaObject* QMediaServiceProviderPlugin_MetaObject(const QMediaServiceProviderPlugin* self); void* QMediaServiceProviderPlugin_Metacast(QMediaServiceProviderPlugin* self, const char* param1); struct miqt_string QMediaServiceProviderPlugin_Tr(const char* s); diff --git a/qt/multimedia/gen_qmediastreamscontrol.cpp b/qt/multimedia/gen_qmediastreamscontrol.cpp index c1dd5ef1..1bf98a7a 100644 --- a/qt/multimedia/gen_qmediastreamscontrol.cpp +++ b/qt/multimedia/gen_qmediastreamscontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qmediastreamscontrol.h" #include "_cgo_export.h" +void QMediaStreamsControl_virtbase(QMediaStreamsControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QMediaStreamsControl_MetaObject(const QMediaStreamsControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qmediastreamscontrol.go b/qt/multimedia/gen_qmediastreamscontrol.go index 7101e116..16a6e344 100644 --- a/qt/multimedia/gen_qmediastreamscontrol.go +++ b/qt/multimedia/gen_qmediastreamscontrol.go @@ -46,22 +46,20 @@ func (this *QMediaStreamsControl) UnsafePointer() unsafe.Pointer { } // newQMediaStreamsControl constructs the type using only CGO pointers. -func newQMediaStreamsControl(h *C.QMediaStreamsControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaStreamsControl { +func newQMediaStreamsControl(h *C.QMediaStreamsControl) *QMediaStreamsControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QMediaStreamsControl_virtbase(h, &outptr_QMediaControl) + return &QMediaStreamsControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQMediaStreamsControl constructs the type using only unsafe pointers. -func UnsafeNewQMediaStreamsControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaStreamsControl { - if h == nil { - return nil - } - - return &QMediaStreamsControl{h: (*C.QMediaStreamsControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQMediaStreamsControl(h unsafe.Pointer) *QMediaStreamsControl { + return newQMediaStreamsControl((*C.QMediaStreamsControl)(h)) } func (this *QMediaStreamsControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qmediastreamscontrol.h b/qt/multimedia/gen_qmediastreamscontrol.h index b843da37..4487ac4a 100644 --- a/qt/multimedia/gen_qmediastreamscontrol.h +++ b/qt/multimedia/gen_qmediastreamscontrol.h @@ -28,6 +28,7 @@ typedef struct QObject QObject; typedef struct QVariant QVariant; #endif +void QMediaStreamsControl_virtbase(QMediaStreamsControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QMediaStreamsControl_MetaObject(const QMediaStreamsControl* self); void* QMediaStreamsControl_Metacast(QMediaStreamsControl* self, const char* param1); struct miqt_string QMediaStreamsControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qmediatimerange.cpp b/qt/multimedia/gen_qmediatimerange.cpp index e301492e..fff39a33 100644 --- a/qt/multimedia/gen_qmediatimerange.cpp +++ b/qt/multimedia/gen_qmediatimerange.cpp @@ -5,19 +5,16 @@ #include "gen_qmediatimerange.h" #include "_cgo_export.h" -void QMediaTimeInterval_new(QMediaTimeInterval** outptr_QMediaTimeInterval) { - QMediaTimeInterval* ret = new QMediaTimeInterval(); - *outptr_QMediaTimeInterval = ret; +QMediaTimeInterval* QMediaTimeInterval_new() { + return new QMediaTimeInterval(); } -void QMediaTimeInterval_new2(long long start, long long end, QMediaTimeInterval** outptr_QMediaTimeInterval) { - QMediaTimeInterval* ret = new QMediaTimeInterval(static_cast(start), static_cast(end)); - *outptr_QMediaTimeInterval = ret; +QMediaTimeInterval* QMediaTimeInterval_new2(long long start, long long end) { + return new QMediaTimeInterval(static_cast(start), static_cast(end)); } -void QMediaTimeInterval_new3(QMediaTimeInterval* param1, QMediaTimeInterval** outptr_QMediaTimeInterval) { - QMediaTimeInterval* ret = new QMediaTimeInterval(*param1); - *outptr_QMediaTimeInterval = ret; +QMediaTimeInterval* QMediaTimeInterval_new3(QMediaTimeInterval* param1) { + return new QMediaTimeInterval(*param1); } void QMediaTimeInterval_OperatorAssign(QMediaTimeInterval* self, QMediaTimeInterval* param1) { @@ -58,24 +55,20 @@ void QMediaTimeInterval_Delete(QMediaTimeInterval* self, bool isSubclass) { } } -void QMediaTimeRange_new(QMediaTimeRange** outptr_QMediaTimeRange) { - QMediaTimeRange* ret = new QMediaTimeRange(); - *outptr_QMediaTimeRange = ret; +QMediaTimeRange* QMediaTimeRange_new() { + return new QMediaTimeRange(); } -void QMediaTimeRange_new2(long long start, long long end, QMediaTimeRange** outptr_QMediaTimeRange) { - QMediaTimeRange* ret = new QMediaTimeRange(static_cast(start), static_cast(end)); - *outptr_QMediaTimeRange = ret; +QMediaTimeRange* QMediaTimeRange_new2(long long start, long long end) { + return new QMediaTimeRange(static_cast(start), static_cast(end)); } -void QMediaTimeRange_new3(QMediaTimeInterval* param1, QMediaTimeRange** outptr_QMediaTimeRange) { - QMediaTimeRange* ret = new QMediaTimeRange(*param1); - *outptr_QMediaTimeRange = ret; +QMediaTimeRange* QMediaTimeRange_new3(QMediaTimeInterval* param1) { + return new QMediaTimeRange(*param1); } -void QMediaTimeRange_new4(QMediaTimeRange* rangeVal, QMediaTimeRange** outptr_QMediaTimeRange) { - QMediaTimeRange* ret = new QMediaTimeRange(*rangeVal); - *outptr_QMediaTimeRange = ret; +QMediaTimeRange* QMediaTimeRange_new4(QMediaTimeRange* rangeVal) { + return new QMediaTimeRange(*rangeVal); } void QMediaTimeRange_OperatorAssign(QMediaTimeRange* self, QMediaTimeRange* param1) { diff --git a/qt/multimedia/gen_qmediatimerange.go b/qt/multimedia/gen_qmediatimerange.go index 520c13bd..1c3a7fc7 100644 --- a/qt/multimedia/gen_qmediatimerange.go +++ b/qt/multimedia/gen_qmediatimerange.go @@ -37,44 +37,35 @@ func newQMediaTimeInterval(h *C.QMediaTimeInterval) *QMediaTimeInterval { if h == nil { return nil } + return &QMediaTimeInterval{h: h} } // UnsafeNewQMediaTimeInterval constructs the type using only unsafe pointers. func UnsafeNewQMediaTimeInterval(h unsafe.Pointer) *QMediaTimeInterval { - if h == nil { - return nil - } - - return &QMediaTimeInterval{h: (*C.QMediaTimeInterval)(h)} + return newQMediaTimeInterval((*C.QMediaTimeInterval)(h)) } // NewQMediaTimeInterval constructs a new QMediaTimeInterval object. func NewQMediaTimeInterval() *QMediaTimeInterval { - var outptr_QMediaTimeInterval *C.QMediaTimeInterval = nil - C.QMediaTimeInterval_new(&outptr_QMediaTimeInterval) - ret := newQMediaTimeInterval(outptr_QMediaTimeInterval) + ret := newQMediaTimeInterval(C.QMediaTimeInterval_new()) ret.isSubclass = true return ret } // NewQMediaTimeInterval2 constructs a new QMediaTimeInterval object. func NewQMediaTimeInterval2(start int64, end int64) *QMediaTimeInterval { - var outptr_QMediaTimeInterval *C.QMediaTimeInterval = nil - C.QMediaTimeInterval_new2((C.longlong)(start), (C.longlong)(end), &outptr_QMediaTimeInterval) - ret := newQMediaTimeInterval(outptr_QMediaTimeInterval) + ret := newQMediaTimeInterval(C.QMediaTimeInterval_new2((C.longlong)(start), (C.longlong)(end))) ret.isSubclass = true return ret } // NewQMediaTimeInterval3 constructs a new QMediaTimeInterval object. func NewQMediaTimeInterval3(param1 *QMediaTimeInterval) *QMediaTimeInterval { - var outptr_QMediaTimeInterval *C.QMediaTimeInterval = nil - C.QMediaTimeInterval_new3(param1.cPointer(), &outptr_QMediaTimeInterval) - ret := newQMediaTimeInterval(outptr_QMediaTimeInterval) + ret := newQMediaTimeInterval(C.QMediaTimeInterval_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -149,54 +140,43 @@ func newQMediaTimeRange(h *C.QMediaTimeRange) *QMediaTimeRange { if h == nil { return nil } + return &QMediaTimeRange{h: h} } // UnsafeNewQMediaTimeRange constructs the type using only unsafe pointers. func UnsafeNewQMediaTimeRange(h unsafe.Pointer) *QMediaTimeRange { - if h == nil { - return nil - } - - return &QMediaTimeRange{h: (*C.QMediaTimeRange)(h)} + return newQMediaTimeRange((*C.QMediaTimeRange)(h)) } // NewQMediaTimeRange constructs a new QMediaTimeRange object. func NewQMediaTimeRange() *QMediaTimeRange { - var outptr_QMediaTimeRange *C.QMediaTimeRange = nil - C.QMediaTimeRange_new(&outptr_QMediaTimeRange) - ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret := newQMediaTimeRange(C.QMediaTimeRange_new()) ret.isSubclass = true return ret } // NewQMediaTimeRange2 constructs a new QMediaTimeRange object. func NewQMediaTimeRange2(start int64, end int64) *QMediaTimeRange { - var outptr_QMediaTimeRange *C.QMediaTimeRange = nil - C.QMediaTimeRange_new2((C.longlong)(start), (C.longlong)(end), &outptr_QMediaTimeRange) - ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret := newQMediaTimeRange(C.QMediaTimeRange_new2((C.longlong)(start), (C.longlong)(end))) ret.isSubclass = true return ret } // NewQMediaTimeRange3 constructs a new QMediaTimeRange object. func NewQMediaTimeRange3(param1 *QMediaTimeInterval) *QMediaTimeRange { - var outptr_QMediaTimeRange *C.QMediaTimeRange = nil - C.QMediaTimeRange_new3(param1.cPointer(), &outptr_QMediaTimeRange) - ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret := newQMediaTimeRange(C.QMediaTimeRange_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQMediaTimeRange4 constructs a new QMediaTimeRange object. func NewQMediaTimeRange4(rangeVal *QMediaTimeRange) *QMediaTimeRange { - var outptr_QMediaTimeRange *C.QMediaTimeRange = nil - C.QMediaTimeRange_new4(rangeVal.cPointer(), &outptr_QMediaTimeRange) - ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret := newQMediaTimeRange(C.QMediaTimeRange_new4(rangeVal.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/multimedia/gen_qmediatimerange.h b/qt/multimedia/gen_qmediatimerange.h index 6b25e4f4..1336d17e 100644 --- a/qt/multimedia/gen_qmediatimerange.h +++ b/qt/multimedia/gen_qmediatimerange.h @@ -22,9 +22,9 @@ typedef struct QMediaTimeInterval QMediaTimeInterval; typedef struct QMediaTimeRange QMediaTimeRange; #endif -void QMediaTimeInterval_new(QMediaTimeInterval** outptr_QMediaTimeInterval); -void QMediaTimeInterval_new2(long long start, long long end, QMediaTimeInterval** outptr_QMediaTimeInterval); -void QMediaTimeInterval_new3(QMediaTimeInterval* param1, QMediaTimeInterval** outptr_QMediaTimeInterval); +QMediaTimeInterval* QMediaTimeInterval_new(); +QMediaTimeInterval* QMediaTimeInterval_new2(long long start, long long end); +QMediaTimeInterval* QMediaTimeInterval_new3(QMediaTimeInterval* param1); void QMediaTimeInterval_OperatorAssign(QMediaTimeInterval* self, QMediaTimeInterval* param1); long long QMediaTimeInterval_Start(const QMediaTimeInterval* self); long long QMediaTimeInterval_End(const QMediaTimeInterval* self); @@ -34,10 +34,10 @@ QMediaTimeInterval* QMediaTimeInterval_Normalized(const QMediaTimeInterval* self QMediaTimeInterval* QMediaTimeInterval_Translated(const QMediaTimeInterval* self, long long offset); void QMediaTimeInterval_Delete(QMediaTimeInterval* self, bool isSubclass); -void QMediaTimeRange_new(QMediaTimeRange** outptr_QMediaTimeRange); -void QMediaTimeRange_new2(long long start, long long end, QMediaTimeRange** outptr_QMediaTimeRange); -void QMediaTimeRange_new3(QMediaTimeInterval* param1, QMediaTimeRange** outptr_QMediaTimeRange); -void QMediaTimeRange_new4(QMediaTimeRange* rangeVal, QMediaTimeRange** outptr_QMediaTimeRange); +QMediaTimeRange* QMediaTimeRange_new(); +QMediaTimeRange* QMediaTimeRange_new2(long long start, long long end); +QMediaTimeRange* QMediaTimeRange_new3(QMediaTimeInterval* param1); +QMediaTimeRange* QMediaTimeRange_new4(QMediaTimeRange* rangeVal); void QMediaTimeRange_OperatorAssign(QMediaTimeRange* self, QMediaTimeRange* param1); void QMediaTimeRange_OperatorAssignWithQMediaTimeInterval(QMediaTimeRange* self, QMediaTimeInterval* param1); long long QMediaTimeRange_EarliestTime(const QMediaTimeRange* self); diff --git a/qt/multimedia/gen_qmediavideoprobecontrol.cpp b/qt/multimedia/gen_qmediavideoprobecontrol.cpp index 20e72366..0f6d72bc 100644 --- a/qt/multimedia/gen_qmediavideoprobecontrol.cpp +++ b/qt/multimedia/gen_qmediavideoprobecontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qmediavideoprobecontrol.h" #include "_cgo_export.h" +void QMediaVideoProbeControl_virtbase(QMediaVideoProbeControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QMediaVideoProbeControl_MetaObject(const QMediaVideoProbeControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qmediavideoprobecontrol.go b/qt/multimedia/gen_qmediavideoprobecontrol.go index cf8609b5..f4678064 100644 --- a/qt/multimedia/gen_qmediavideoprobecontrol.go +++ b/qt/multimedia/gen_qmediavideoprobecontrol.go @@ -36,22 +36,20 @@ func (this *QMediaVideoProbeControl) UnsafePointer() unsafe.Pointer { } // newQMediaVideoProbeControl constructs the type using only CGO pointers. -func newQMediaVideoProbeControl(h *C.QMediaVideoProbeControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMediaVideoProbeControl { +func newQMediaVideoProbeControl(h *C.QMediaVideoProbeControl) *QMediaVideoProbeControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QMediaVideoProbeControl_virtbase(h, &outptr_QMediaControl) + return &QMediaVideoProbeControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQMediaVideoProbeControl constructs the type using only unsafe pointers. -func UnsafeNewQMediaVideoProbeControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaVideoProbeControl { - if h == nil { - return nil - } - - return &QMediaVideoProbeControl{h: (*C.QMediaVideoProbeControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQMediaVideoProbeControl(h unsafe.Pointer) *QMediaVideoProbeControl { + return newQMediaVideoProbeControl((*C.QMediaVideoProbeControl)(h)) } func (this *QMediaVideoProbeControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qmediavideoprobecontrol.h b/qt/multimedia/gen_qmediavideoprobecontrol.h index 5ed3e54a..99a1f5e6 100644 --- a/qt/multimedia/gen_qmediavideoprobecontrol.h +++ b/qt/multimedia/gen_qmediavideoprobecontrol.h @@ -28,6 +28,7 @@ typedef struct QObject QObject; typedef struct QVideoFrame QVideoFrame; #endif +void QMediaVideoProbeControl_virtbase(QMediaVideoProbeControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QMediaVideoProbeControl_MetaObject(const QMediaVideoProbeControl* self); void* QMediaVideoProbeControl_Metacast(QMediaVideoProbeControl* self, const char* param1); struct miqt_string QMediaVideoProbeControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qmetadatareadercontrol.cpp b/qt/multimedia/gen_qmetadatareadercontrol.cpp index 64637306..20401cb3 100644 --- a/qt/multimedia/gen_qmetadatareadercontrol.cpp +++ b/qt/multimedia/gen_qmetadatareadercontrol.cpp @@ -11,6 +11,10 @@ #include "gen_qmetadatareadercontrol.h" #include "_cgo_export.h" +void QMetaDataReaderControl_virtbase(QMetaDataReaderControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QMetaDataReaderControl_MetaObject(const QMetaDataReaderControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qmetadatareadercontrol.go b/qt/multimedia/gen_qmetadatareadercontrol.go index 0e852402..3f336d5d 100644 --- a/qt/multimedia/gen_qmetadatareadercontrol.go +++ b/qt/multimedia/gen_qmetadatareadercontrol.go @@ -36,22 +36,20 @@ func (this *QMetaDataReaderControl) UnsafePointer() unsafe.Pointer { } // newQMetaDataReaderControl constructs the type using only CGO pointers. -func newQMetaDataReaderControl(h *C.QMetaDataReaderControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMetaDataReaderControl { +func newQMetaDataReaderControl(h *C.QMetaDataReaderControl) *QMetaDataReaderControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QMetaDataReaderControl_virtbase(h, &outptr_QMediaControl) + return &QMetaDataReaderControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQMetaDataReaderControl constructs the type using only unsafe pointers. -func UnsafeNewQMetaDataReaderControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMetaDataReaderControl { - if h == nil { - return nil - } - - return &QMetaDataReaderControl{h: (*C.QMetaDataReaderControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQMetaDataReaderControl(h unsafe.Pointer) *QMetaDataReaderControl { + return newQMetaDataReaderControl((*C.QMetaDataReaderControl)(h)) } func (this *QMetaDataReaderControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qmetadatareadercontrol.h b/qt/multimedia/gen_qmetadatareadercontrol.h index 82946b90..186a6e33 100644 --- a/qt/multimedia/gen_qmetadatareadercontrol.h +++ b/qt/multimedia/gen_qmetadatareadercontrol.h @@ -28,6 +28,7 @@ typedef struct QObject QObject; typedef struct QVariant QVariant; #endif +void QMetaDataReaderControl_virtbase(QMetaDataReaderControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QMetaDataReaderControl_MetaObject(const QMetaDataReaderControl* self); void* QMetaDataReaderControl_Metacast(QMetaDataReaderControl* self, const char* param1); struct miqt_string QMetaDataReaderControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qmetadatawritercontrol.cpp b/qt/multimedia/gen_qmetadatawritercontrol.cpp index 8392f1cc..cc214af6 100644 --- a/qt/multimedia/gen_qmetadatawritercontrol.cpp +++ b/qt/multimedia/gen_qmetadatawritercontrol.cpp @@ -11,6 +11,10 @@ #include "gen_qmetadatawritercontrol.h" #include "_cgo_export.h" +void QMetaDataWriterControl_virtbase(QMetaDataWriterControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QMetaDataWriterControl_MetaObject(const QMetaDataWriterControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qmetadatawritercontrol.go b/qt/multimedia/gen_qmetadatawritercontrol.go index bbb2dd1b..5c1a05d0 100644 --- a/qt/multimedia/gen_qmetadatawritercontrol.go +++ b/qt/multimedia/gen_qmetadatawritercontrol.go @@ -36,22 +36,20 @@ func (this *QMetaDataWriterControl) UnsafePointer() unsafe.Pointer { } // newQMetaDataWriterControl constructs the type using only CGO pointers. -func newQMetaDataWriterControl(h *C.QMetaDataWriterControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QMetaDataWriterControl { +func newQMetaDataWriterControl(h *C.QMetaDataWriterControl) *QMetaDataWriterControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QMetaDataWriterControl_virtbase(h, &outptr_QMediaControl) + return &QMetaDataWriterControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQMetaDataWriterControl constructs the type using only unsafe pointers. -func UnsafeNewQMetaDataWriterControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QMetaDataWriterControl { - if h == nil { - return nil - } - - return &QMetaDataWriterControl{h: (*C.QMetaDataWriterControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQMetaDataWriterControl(h unsafe.Pointer) *QMetaDataWriterControl { + return newQMetaDataWriterControl((*C.QMetaDataWriterControl)(h)) } func (this *QMetaDataWriterControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qmetadatawritercontrol.h b/qt/multimedia/gen_qmetadatawritercontrol.h index 2faf2006..fec0cf56 100644 --- a/qt/multimedia/gen_qmetadatawritercontrol.h +++ b/qt/multimedia/gen_qmetadatawritercontrol.h @@ -28,6 +28,7 @@ typedef struct QObject QObject; typedef struct QVariant QVariant; #endif +void QMetaDataWriterControl_virtbase(QMetaDataWriterControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QMetaDataWriterControl_MetaObject(const QMetaDataWriterControl* self); void* QMetaDataWriterControl_Metacast(QMetaDataWriterControl* self, const char* param1); struct miqt_string QMetaDataWriterControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qradiodata.cpp b/qt/multimedia/gen_qradiodata.cpp index 7e0e5ed5..5b2bca73 100644 --- a/qt/multimedia/gen_qradiodata.cpp +++ b/qt/multimedia/gen_qradiodata.cpp @@ -240,18 +240,17 @@ public: }; -void QRadioData_new(QMediaObject* mediaObject, QRadioData** outptr_QRadioData, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQRadioData* ret = new MiqtVirtualQRadioData(mediaObject); - *outptr_QRadioData = ret; - *outptr_QObject = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QRadioData* QRadioData_new(QMediaObject* mediaObject) { + return new MiqtVirtualQRadioData(mediaObject); } -void QRadioData_new2(QMediaObject* mediaObject, QObject* parent, QRadioData** outptr_QRadioData, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQRadioData* ret = new MiqtVirtualQRadioData(mediaObject, parent); - *outptr_QRadioData = ret; - *outptr_QObject = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QRadioData* QRadioData_new2(QMediaObject* mediaObject, QObject* parent) { + return new MiqtVirtualQRadioData(mediaObject, parent); +} + +void QRadioData_virtbase(QRadioData* src, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface) { + *outptr_QObject = static_cast(src); + *outptr_QMediaBindableInterface = static_cast(src); } QMetaObject* QRadioData_MetaObject(const QRadioData* self) { diff --git a/qt/multimedia/gen_qradiodata.go b/qt/multimedia/gen_qradiodata.go index 40b5c5d1..d4ecfe28 100644 --- a/qt/multimedia/gen_qradiodata.go +++ b/qt/multimedia/gen_qradiodata.go @@ -99,46 +99,36 @@ func (this *QRadioData) UnsafePointer() unsafe.Pointer { } // newQRadioData constructs the type using only CGO pointers. -func newQRadioData(h *C.QRadioData, h_QObject *C.QObject, h_QMediaBindableInterface *C.QMediaBindableInterface) *QRadioData { +func newQRadioData(h *C.QRadioData) *QRadioData { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + C.QRadioData_virtbase(h, &outptr_QObject, &outptr_QMediaBindableInterface) + return &QRadioData{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject)), - QMediaBindableInterface: newQMediaBindableInterface(h_QMediaBindableInterface)} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject)), + QMediaBindableInterface: newQMediaBindableInterface(outptr_QMediaBindableInterface)} } // UnsafeNewQRadioData constructs the type using only unsafe pointers. -func UnsafeNewQRadioData(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QRadioData { - if h == nil { - return nil - } - - return &QRadioData{h: (*C.QRadioData)(h), - QObject: qt.UnsafeNewQObject(h_QObject), - QMediaBindableInterface: UnsafeNewQMediaBindableInterface(h_QMediaBindableInterface)} +func UnsafeNewQRadioData(h unsafe.Pointer) *QRadioData { + return newQRadioData((*C.QRadioData)(h)) } // NewQRadioData constructs a new QRadioData object. func NewQRadioData(mediaObject *QMediaObject) *QRadioData { - var outptr_QRadioData *C.QRadioData = nil - var outptr_QObject *C.QObject = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QRadioData_new(mediaObject.cPointer(), &outptr_QRadioData, &outptr_QObject, &outptr_QMediaBindableInterface) - ret := newQRadioData(outptr_QRadioData, outptr_QObject, outptr_QMediaBindableInterface) + ret := newQRadioData(C.QRadioData_new(mediaObject.cPointer())) ret.isSubclass = true return ret } // NewQRadioData2 constructs a new QRadioData object. func NewQRadioData2(mediaObject *QMediaObject, parent *qt.QObject) *QRadioData { - var outptr_QRadioData *C.QRadioData = nil - var outptr_QObject *C.QObject = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QRadioData_new2(mediaObject.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QRadioData, &outptr_QObject, &outptr_QMediaBindableInterface) - ret := newQRadioData(outptr_QRadioData, outptr_QObject, outptr_QMediaBindableInterface) + ret := newQRadioData(C.QRadioData_new2(mediaObject.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -176,7 +166,7 @@ func (this *QRadioData) Availability() QMultimedia__AvailabilityStatus { } func (this *QRadioData) MediaObject() *QMediaObject { - return newQMediaObject(C.QRadioData_MediaObject(this.h), nil) + return newQMediaObject(C.QRadioData_MediaObject(this.h)) } func (this *QRadioData) StationId() string { @@ -444,7 +434,7 @@ func QRadioData_TrUtf83(s string, c string, n int) string { func (this *QRadioData) callVirtualBase_MediaObject() *QMediaObject { - return newQMediaObject(C.QRadioData_virtualbase_MediaObject(unsafe.Pointer(this.h)), nil) + return newQMediaObject(C.QRadioData_virtualbase_MediaObject(unsafe.Pointer(this.h))) } func (this *QRadioData) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { @@ -487,7 +477,7 @@ func miqt_exec_callback_QRadioData_SetMediaObject(self *C.QRadioData, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQMediaObject(mediaObject, nil) + slotval1 := newQMediaObject(mediaObject) virtualReturn := gofunc((&QRadioData{h: self}).callVirtualBase_SetMediaObject, slotval1) @@ -573,7 +563,7 @@ func miqt_exec_callback_QRadioData_TimerEvent(self *C.QRadioData, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QRadioData{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -599,7 +589,7 @@ func miqt_exec_callback_QRadioData_ChildEvent(self *C.QRadioData, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QRadioData{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/multimedia/gen_qradiodata.h b/qt/multimedia/gen_qradiodata.h index d1549cac..e6489846 100644 --- a/qt/multimedia/gen_qradiodata.h +++ b/qt/multimedia/gen_qradiodata.h @@ -36,8 +36,9 @@ typedef struct QRadioData QRadioData; typedef struct QTimerEvent QTimerEvent; #endif -void QRadioData_new(QMediaObject* mediaObject, QRadioData** outptr_QRadioData, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); -void QRadioData_new2(QMediaObject* mediaObject, QObject* parent, QRadioData** outptr_QRadioData, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); +QRadioData* QRadioData_new(QMediaObject* mediaObject); +QRadioData* QRadioData_new2(QMediaObject* mediaObject, QObject* parent); +void QRadioData_virtbase(QRadioData* src, QObject** outptr_QObject, QMediaBindableInterface** outptr_QMediaBindableInterface); QMetaObject* QRadioData_MetaObject(const QRadioData* self); void* QRadioData_Metacast(QRadioData* self, const char* param1); struct miqt_string QRadioData_Tr(const char* s); diff --git a/qt/multimedia/gen_qradiodatacontrol.cpp b/qt/multimedia/gen_qradiodatacontrol.cpp index 172284e4..a6d66926 100644 --- a/qt/multimedia/gen_qradiodatacontrol.cpp +++ b/qt/multimedia/gen_qradiodatacontrol.cpp @@ -9,6 +9,10 @@ #include "gen_qradiodatacontrol.h" #include "_cgo_export.h" +void QRadioDataControl_virtbase(QRadioDataControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QRadioDataControl_MetaObject(const QRadioDataControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qradiodatacontrol.go b/qt/multimedia/gen_qradiodatacontrol.go index 43de812e..b7f57228 100644 --- a/qt/multimedia/gen_qradiodatacontrol.go +++ b/qt/multimedia/gen_qradiodatacontrol.go @@ -36,22 +36,20 @@ func (this *QRadioDataControl) UnsafePointer() unsafe.Pointer { } // newQRadioDataControl constructs the type using only CGO pointers. -func newQRadioDataControl(h *C.QRadioDataControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QRadioDataControl { +func newQRadioDataControl(h *C.QRadioDataControl) *QRadioDataControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QRadioDataControl_virtbase(h, &outptr_QMediaControl) + return &QRadioDataControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQRadioDataControl constructs the type using only unsafe pointers. -func UnsafeNewQRadioDataControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QRadioDataControl { - if h == nil { - return nil - } - - return &QRadioDataControl{h: (*C.QRadioDataControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQRadioDataControl(h unsafe.Pointer) *QRadioDataControl { + return newQRadioDataControl((*C.QRadioDataControl)(h)) } func (this *QRadioDataControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qradiodatacontrol.h b/qt/multimedia/gen_qradiodatacontrol.h index a8729f9a..76f963f7 100644 --- a/qt/multimedia/gen_qradiodatacontrol.h +++ b/qt/multimedia/gen_qradiodatacontrol.h @@ -26,6 +26,7 @@ typedef struct QObject QObject; typedef struct QRadioDataControl QRadioDataControl; #endif +void QRadioDataControl_virtbase(QRadioDataControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QRadioDataControl_MetaObject(const QRadioDataControl* self); void* QRadioDataControl_Metacast(QRadioDataControl* self, const char* param1); struct miqt_string QRadioDataControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qradiotuner.cpp b/qt/multimedia/gen_qradiotuner.cpp index 9905dea7..89ca6c63 100644 --- a/qt/multimedia/gen_qradiotuner.cpp +++ b/qt/multimedia/gen_qradiotuner.cpp @@ -136,18 +136,16 @@ public: }; -void QRadioTuner_new(QRadioTuner** outptr_QRadioTuner, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { - MiqtVirtualQRadioTuner* ret = new MiqtVirtualQRadioTuner(); - *outptr_QRadioTuner = ret; - *outptr_QMediaObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QRadioTuner* QRadioTuner_new() { + return new MiqtVirtualQRadioTuner(); } -void QRadioTuner_new2(QObject* parent, QRadioTuner** outptr_QRadioTuner, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject) { - MiqtVirtualQRadioTuner* ret = new MiqtVirtualQRadioTuner(parent); - *outptr_QRadioTuner = ret; - *outptr_QMediaObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QRadioTuner* QRadioTuner_new2(QObject* parent) { + return new MiqtVirtualQRadioTuner(parent); +} + +void QRadioTuner_virtbase(QRadioTuner* src, QMediaObject** outptr_QMediaObject) { + *outptr_QMediaObject = static_cast(src); } QMetaObject* QRadioTuner_MetaObject(const QRadioTuner* self) { diff --git a/qt/multimedia/gen_qradiotuner.go b/qt/multimedia/gen_qradiotuner.go index 2f50cf46..35132129 100644 --- a/qt/multimedia/gen_qradiotuner.go +++ b/qt/multimedia/gen_qradiotuner.go @@ -77,44 +77,34 @@ func (this *QRadioTuner) UnsafePointer() unsafe.Pointer { } // newQRadioTuner constructs the type using only CGO pointers. -func newQRadioTuner(h *C.QRadioTuner, h_QMediaObject *C.QMediaObject, h_QObject *C.QObject) *QRadioTuner { +func newQRadioTuner(h *C.QRadioTuner) *QRadioTuner { if h == nil { return nil } + var outptr_QMediaObject *C.QMediaObject = nil + C.QRadioTuner_virtbase(h, &outptr_QMediaObject) + return &QRadioTuner{h: h, - QMediaObject: newQMediaObject(h_QMediaObject, h_QObject)} + QMediaObject: newQMediaObject(outptr_QMediaObject)} } // UnsafeNewQRadioTuner constructs the type using only unsafe pointers. -func UnsafeNewQRadioTuner(h unsafe.Pointer, h_QMediaObject unsafe.Pointer, h_QObject unsafe.Pointer) *QRadioTuner { - if h == nil { - return nil - } - - return &QRadioTuner{h: (*C.QRadioTuner)(h), - QMediaObject: UnsafeNewQMediaObject(h_QMediaObject, h_QObject)} +func UnsafeNewQRadioTuner(h unsafe.Pointer) *QRadioTuner { + return newQRadioTuner((*C.QRadioTuner)(h)) } // NewQRadioTuner constructs a new QRadioTuner object. func NewQRadioTuner() *QRadioTuner { - var outptr_QRadioTuner *C.QRadioTuner = nil - var outptr_QMediaObject *C.QMediaObject = nil - var outptr_QObject *C.QObject = nil - C.QRadioTuner_new(&outptr_QRadioTuner, &outptr_QMediaObject, &outptr_QObject) - ret := newQRadioTuner(outptr_QRadioTuner, outptr_QMediaObject, outptr_QObject) + ret := newQRadioTuner(C.QRadioTuner_new()) ret.isSubclass = true return ret } // NewQRadioTuner2 constructs a new QRadioTuner object. func NewQRadioTuner2(parent *qt.QObject) *QRadioTuner { - var outptr_QRadioTuner *C.QRadioTuner = nil - var outptr_QMediaObject *C.QMediaObject = nil - var outptr_QObject *C.QObject = nil - C.QRadioTuner_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QRadioTuner, &outptr_QMediaObject, &outptr_QObject) - ret := newQRadioTuner(outptr_QRadioTuner, outptr_QMediaObject, outptr_QObject) + ret := newQRadioTuner(C.QRadioTuner_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -232,7 +222,7 @@ func (this *QRadioTuner) ErrorString() string { } func (this *QRadioTuner) RadioData() *QRadioData { - return newQRadioData(C.QRadioTuner_RadioData(this.h), nil, nil) + return newQRadioData(C.QRadioTuner_RadioData(this.h)) } func (this *QRadioTuner) SearchForward() { @@ -604,7 +594,7 @@ func miqt_exec_callback_QRadioTuner_IsAvailable(self *C.QRadioTuner, cb C.intptr func (this *QRadioTuner) callVirtualBase_Service() *QMediaService { - return newQMediaService(C.QRadioTuner_virtualbase_Service(unsafe.Pointer(this.h)), nil) + return newQMediaService(C.QRadioTuner_virtualbase_Service(unsafe.Pointer(this.h))) } func (this *QRadioTuner) OnService(slot func(super func() *QMediaService) *QMediaService) { diff --git a/qt/multimedia/gen_qradiotuner.h b/qt/multimedia/gen_qradiotuner.h index 93e41ea6..36d002ec 100644 --- a/qt/multimedia/gen_qradiotuner.h +++ b/qt/multimedia/gen_qradiotuner.h @@ -30,8 +30,9 @@ typedef struct QRadioData QRadioData; typedef struct QRadioTuner QRadioTuner; #endif -void QRadioTuner_new(QRadioTuner** outptr_QRadioTuner, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); -void QRadioTuner_new2(QObject* parent, QRadioTuner** outptr_QRadioTuner, QMediaObject** outptr_QMediaObject, QObject** outptr_QObject); +QRadioTuner* QRadioTuner_new(); +QRadioTuner* QRadioTuner_new2(QObject* parent); +void QRadioTuner_virtbase(QRadioTuner* src, QMediaObject** outptr_QMediaObject); QMetaObject* QRadioTuner_MetaObject(const QRadioTuner* self); void* QRadioTuner_Metacast(QRadioTuner* self, const char* param1); struct miqt_string QRadioTuner_Tr(const char* s); diff --git a/qt/multimedia/gen_qradiotunercontrol.cpp b/qt/multimedia/gen_qradiotunercontrol.cpp index 4e453658..9ac495d7 100644 --- a/qt/multimedia/gen_qradiotunercontrol.cpp +++ b/qt/multimedia/gen_qradiotunercontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qradiotunercontrol.h" #include "_cgo_export.h" +void QRadioTunerControl_virtbase(QRadioTunerControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QRadioTunerControl_MetaObject(const QRadioTunerControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qradiotunercontrol.go b/qt/multimedia/gen_qradiotunercontrol.go index 650482f8..fcf70a2d 100644 --- a/qt/multimedia/gen_qradiotunercontrol.go +++ b/qt/multimedia/gen_qradiotunercontrol.go @@ -36,22 +36,20 @@ func (this *QRadioTunerControl) UnsafePointer() unsafe.Pointer { } // newQRadioTunerControl constructs the type using only CGO pointers. -func newQRadioTunerControl(h *C.QRadioTunerControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QRadioTunerControl { +func newQRadioTunerControl(h *C.QRadioTunerControl) *QRadioTunerControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QRadioTunerControl_virtbase(h, &outptr_QMediaControl) + return &QRadioTunerControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQRadioTunerControl constructs the type using only unsafe pointers. -func UnsafeNewQRadioTunerControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QRadioTunerControl { - if h == nil { - return nil - } - - return &QRadioTunerControl{h: (*C.QRadioTunerControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQRadioTunerControl(h unsafe.Pointer) *QRadioTunerControl { + return newQRadioTunerControl((*C.QRadioTunerControl)(h)) } func (this *QRadioTunerControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qradiotunercontrol.h b/qt/multimedia/gen_qradiotunercontrol.h index a0d99f69..85c1adcc 100644 --- a/qt/multimedia/gen_qradiotunercontrol.h +++ b/qt/multimedia/gen_qradiotunercontrol.h @@ -26,6 +26,7 @@ typedef struct QObject QObject; typedef struct QRadioTunerControl QRadioTunerControl; #endif +void QRadioTunerControl_virtbase(QRadioTunerControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QRadioTunerControl_MetaObject(const QRadioTunerControl* self); void* QRadioTunerControl_Metacast(QRadioTunerControl* self, const char* param1); struct miqt_string QRadioTunerControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qsound.cpp b/qt/multimedia/gen_qsound.cpp index f234306a..d75dabcb 100644 --- a/qt/multimedia/gen_qsound.cpp +++ b/qt/multimedia/gen_qsound.cpp @@ -193,18 +193,18 @@ public: }; -void QSound_new(struct miqt_string filename, QSound** outptr_QSound, QObject** outptr_QObject) { +QSound* QSound_new(struct miqt_string filename) { QString filename_QString = QString::fromUtf8(filename.data, filename.len); - MiqtVirtualQSound* ret = new MiqtVirtualQSound(filename_QString); - *outptr_QSound = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSound(filename_QString); } -void QSound_new2(struct miqt_string filename, QObject* parent, QSound** outptr_QSound, QObject** outptr_QObject) { +QSound* QSound_new2(struct miqt_string filename, QObject* parent) { QString filename_QString = QString::fromUtf8(filename.data, filename.len); - MiqtVirtualQSound* ret = new MiqtVirtualQSound(filename_QString, parent); - *outptr_QSound = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSound(filename_QString, parent); +} + +void QSound_virtbase(QSound* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSound_MetaObject(const QSound* self) { diff --git a/qt/multimedia/gen_qsound.go b/qt/multimedia/gen_qsound.go index 275d7656..24f15692 100644 --- a/qt/multimedia/gen_qsound.go +++ b/qt/multimedia/gen_qsound.go @@ -42,22 +42,20 @@ func (this *QSound) UnsafePointer() unsafe.Pointer { } // newQSound constructs the type using only CGO pointers. -func newQSound(h *C.QSound, h_QObject *C.QObject) *QSound { +func newQSound(h *C.QSound) *QSound { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSound_virtbase(h, &outptr_QObject) + return &QSound{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQSound constructs the type using only unsafe pointers. -func UnsafeNewQSound(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSound { - if h == nil { - return nil - } - - return &QSound{h: (*C.QSound)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQSound(h unsafe.Pointer) *QSound { + return newQSound((*C.QSound)(h)) } // NewQSound constructs a new QSound object. @@ -66,11 +64,8 @@ func NewQSound(filename string) *QSound { filename_ms.data = C.CString(filename) filename_ms.len = C.size_t(len(filename)) defer C.free(unsafe.Pointer(filename_ms.data)) - var outptr_QSound *C.QSound = nil - var outptr_QObject *C.QObject = nil - C.QSound_new(filename_ms, &outptr_QSound, &outptr_QObject) - ret := newQSound(outptr_QSound, outptr_QObject) + ret := newQSound(C.QSound_new(filename_ms)) ret.isSubclass = true return ret } @@ -81,11 +76,8 @@ func NewQSound2(filename string, parent *qt.QObject) *QSound { filename_ms.data = C.CString(filename) filename_ms.len = C.size_t(len(filename)) defer C.free(unsafe.Pointer(filename_ms.data)) - var outptr_QSound *C.QSound = nil - var outptr_QObject *C.QObject = nil - C.QSound_new2(filename_ms, (*C.QObject)(parent.UnsafePointer()), &outptr_QSound, &outptr_QObject) - ret := newQSound(outptr_QSound, outptr_QObject) + ret := newQSound(C.QSound_new2(filename_ms, (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -279,7 +271,7 @@ func miqt_exec_callback_QSound_TimerEvent(self *C.QSound, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QSound{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -305,7 +297,7 @@ func miqt_exec_callback_QSound_ChildEvent(self *C.QSound, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QSound{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/multimedia/gen_qsound.h b/qt/multimedia/gen_qsound.h index 6b7db5df..bcef05d4 100644 --- a/qt/multimedia/gen_qsound.h +++ b/qt/multimedia/gen_qsound.h @@ -32,8 +32,9 @@ typedef struct QSound QSound; typedef struct QTimerEvent QTimerEvent; #endif -void QSound_new(struct miqt_string filename, QSound** outptr_QSound, QObject** outptr_QObject); -void QSound_new2(struct miqt_string filename, QObject* parent, QSound** outptr_QSound, QObject** outptr_QObject); +QSound* QSound_new(struct miqt_string filename); +QSound* QSound_new2(struct miqt_string filename, QObject* parent); +void QSound_virtbase(QSound* src, QObject** outptr_QObject); QMetaObject* QSound_MetaObject(const QSound* self); void* QSound_Metacast(QSound* self, const char* param1); struct miqt_string QSound_Tr(const char* s); diff --git a/qt/multimedia/gen_qsoundeffect.cpp b/qt/multimedia/gen_qsoundeffect.cpp index 693c8ecf..5d9c2bfb 100644 --- a/qt/multimedia/gen_qsoundeffect.cpp +++ b/qt/multimedia/gen_qsoundeffect.cpp @@ -198,28 +198,24 @@ public: }; -void QSoundEffect_new(QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { - MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(); - *outptr_QSoundEffect = ret; - *outptr_QObject = static_cast(ret); +QSoundEffect* QSoundEffect_new() { + return new MiqtVirtualQSoundEffect(); } -void QSoundEffect_new2(QAudioDeviceInfo* audioDevice, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { - MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(*audioDevice); - *outptr_QSoundEffect = ret; - *outptr_QObject = static_cast(ret); +QSoundEffect* QSoundEffect_new2(QAudioDeviceInfo* audioDevice) { + return new MiqtVirtualQSoundEffect(*audioDevice); } -void QSoundEffect_new3(QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { - MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(parent); - *outptr_QSoundEffect = ret; - *outptr_QObject = static_cast(ret); +QSoundEffect* QSoundEffect_new3(QObject* parent) { + return new MiqtVirtualQSoundEffect(parent); } -void QSoundEffect_new4(QAudioDeviceInfo* audioDevice, QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { - MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(*audioDevice, parent); - *outptr_QSoundEffect = ret; - *outptr_QObject = static_cast(ret); +QSoundEffect* QSoundEffect_new4(QAudioDeviceInfo* audioDevice, QObject* parent) { + return new MiqtVirtualQSoundEffect(*audioDevice, parent); +} + +void QSoundEffect_virtbase(QSoundEffect* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSoundEffect_MetaObject(const QSoundEffect* self) { diff --git a/qt/multimedia/gen_qsoundeffect.go b/qt/multimedia/gen_qsoundeffect.go index 8309a06a..77aae4ce 100644 --- a/qt/multimedia/gen_qsoundeffect.go +++ b/qt/multimedia/gen_qsoundeffect.go @@ -51,64 +51,50 @@ func (this *QSoundEffect) UnsafePointer() unsafe.Pointer { } // newQSoundEffect constructs the type using only CGO pointers. -func newQSoundEffect(h *C.QSoundEffect, h_QObject *C.QObject) *QSoundEffect { +func newQSoundEffect(h *C.QSoundEffect) *QSoundEffect { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSoundEffect_virtbase(h, &outptr_QObject) + return &QSoundEffect{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQSoundEffect constructs the type using only unsafe pointers. -func UnsafeNewQSoundEffect(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSoundEffect { - if h == nil { - return nil - } - - return &QSoundEffect{h: (*C.QSoundEffect)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQSoundEffect(h unsafe.Pointer) *QSoundEffect { + return newQSoundEffect((*C.QSoundEffect)(h)) } // NewQSoundEffect constructs a new QSoundEffect object. func NewQSoundEffect() *QSoundEffect { - var outptr_QSoundEffect *C.QSoundEffect = nil - var outptr_QObject *C.QObject = nil - C.QSoundEffect_new(&outptr_QSoundEffect, &outptr_QObject) - ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret := newQSoundEffect(C.QSoundEffect_new()) ret.isSubclass = true return ret } // NewQSoundEffect2 constructs a new QSoundEffect object. func NewQSoundEffect2(audioDevice *QAudioDeviceInfo) *QSoundEffect { - var outptr_QSoundEffect *C.QSoundEffect = nil - var outptr_QObject *C.QObject = nil - C.QSoundEffect_new2(audioDevice.cPointer(), &outptr_QSoundEffect, &outptr_QObject) - ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret := newQSoundEffect(C.QSoundEffect_new2(audioDevice.cPointer())) ret.isSubclass = true return ret } // NewQSoundEffect3 constructs a new QSoundEffect object. func NewQSoundEffect3(parent *qt.QObject) *QSoundEffect { - var outptr_QSoundEffect *C.QSoundEffect = nil - var outptr_QObject *C.QObject = nil - C.QSoundEffect_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QSoundEffect, &outptr_QObject) - ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret := newQSoundEffect(C.QSoundEffect_new3((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQSoundEffect4 constructs a new QSoundEffect object. func NewQSoundEffect4(audioDevice *QAudioDeviceInfo, parent *qt.QObject) *QSoundEffect { - var outptr_QSoundEffect *C.QSoundEffect = nil - var outptr_QObject *C.QObject = nil - C.QSoundEffect_new4(audioDevice.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QSoundEffect, &outptr_QObject) - ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret := newQSoundEffect(C.QSoundEffect_new4(audioDevice.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -502,7 +488,7 @@ func miqt_exec_callback_QSoundEffect_TimerEvent(self *C.QSoundEffect, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QSoundEffect{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -528,7 +514,7 @@ func miqt_exec_callback_QSoundEffect_ChildEvent(self *C.QSoundEffect, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QSoundEffect{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/multimedia/gen_qsoundeffect.h b/qt/multimedia/gen_qsoundeffect.h index e8fd0688..2ff80951 100644 --- a/qt/multimedia/gen_qsoundeffect.h +++ b/qt/multimedia/gen_qsoundeffect.h @@ -36,10 +36,11 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -void QSoundEffect_new(QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); -void QSoundEffect_new2(QAudioDeviceInfo* audioDevice, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); -void QSoundEffect_new3(QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); -void QSoundEffect_new4(QAudioDeviceInfo* audioDevice, QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); +QSoundEffect* QSoundEffect_new(); +QSoundEffect* QSoundEffect_new2(QAudioDeviceInfo* audioDevice); +QSoundEffect* QSoundEffect_new3(QObject* parent); +QSoundEffect* QSoundEffect_new4(QAudioDeviceInfo* audioDevice, QObject* parent); +void QSoundEffect_virtbase(QSoundEffect* src, QObject** outptr_QObject); QMetaObject* QSoundEffect_MetaObject(const QSoundEffect* self); void* QSoundEffect_Metacast(QSoundEffect* self, const char* param1); struct miqt_string QSoundEffect_Tr(const char* s); diff --git a/qt/multimedia/gen_qvideodeviceselectorcontrol.cpp b/qt/multimedia/gen_qvideodeviceselectorcontrol.cpp index 4318af4f..9b2ea096 100644 --- a/qt/multimedia/gen_qvideodeviceselectorcontrol.cpp +++ b/qt/multimedia/gen_qvideodeviceselectorcontrol.cpp @@ -9,6 +9,10 @@ #include "gen_qvideodeviceselectorcontrol.h" #include "_cgo_export.h" +void QVideoDeviceSelectorControl_virtbase(QVideoDeviceSelectorControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QVideoDeviceSelectorControl_MetaObject(const QVideoDeviceSelectorControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qvideodeviceselectorcontrol.go b/qt/multimedia/gen_qvideodeviceselectorcontrol.go index 9e08dfe5..3c5c17d9 100644 --- a/qt/multimedia/gen_qvideodeviceselectorcontrol.go +++ b/qt/multimedia/gen_qvideodeviceselectorcontrol.go @@ -36,22 +36,20 @@ func (this *QVideoDeviceSelectorControl) UnsafePointer() unsafe.Pointer { } // newQVideoDeviceSelectorControl constructs the type using only CGO pointers. -func newQVideoDeviceSelectorControl(h *C.QVideoDeviceSelectorControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QVideoDeviceSelectorControl { +func newQVideoDeviceSelectorControl(h *C.QVideoDeviceSelectorControl) *QVideoDeviceSelectorControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QVideoDeviceSelectorControl_virtbase(h, &outptr_QMediaControl) + return &QVideoDeviceSelectorControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQVideoDeviceSelectorControl constructs the type using only unsafe pointers. -func UnsafeNewQVideoDeviceSelectorControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QVideoDeviceSelectorControl { - if h == nil { - return nil - } - - return &QVideoDeviceSelectorControl{h: (*C.QVideoDeviceSelectorControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQVideoDeviceSelectorControl(h unsafe.Pointer) *QVideoDeviceSelectorControl { + return newQVideoDeviceSelectorControl((*C.QVideoDeviceSelectorControl)(h)) } func (this *QVideoDeviceSelectorControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qvideodeviceselectorcontrol.h b/qt/multimedia/gen_qvideodeviceselectorcontrol.h index daecfed4..017800b2 100644 --- a/qt/multimedia/gen_qvideodeviceselectorcontrol.h +++ b/qt/multimedia/gen_qvideodeviceselectorcontrol.h @@ -26,6 +26,7 @@ typedef struct QObject QObject; typedef struct QVideoDeviceSelectorControl QVideoDeviceSelectorControl; #endif +void QVideoDeviceSelectorControl_virtbase(QVideoDeviceSelectorControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QVideoDeviceSelectorControl_MetaObject(const QVideoDeviceSelectorControl* self); void* QVideoDeviceSelectorControl_Metacast(QVideoDeviceSelectorControl* self, const char* param1); struct miqt_string QVideoDeviceSelectorControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qvideoencodersettingscontrol.cpp b/qt/multimedia/gen_qvideoencodersettingscontrol.cpp index 623d3328..085b0cc9 100644 --- a/qt/multimedia/gen_qvideoencodersettingscontrol.cpp +++ b/qt/multimedia/gen_qvideoencodersettingscontrol.cpp @@ -12,6 +12,10 @@ #include "gen_qvideoencodersettingscontrol.h" #include "_cgo_export.h" +void QVideoEncoderSettingsControl_virtbase(QVideoEncoderSettingsControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QVideoEncoderSettingsControl_MetaObject(const QVideoEncoderSettingsControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qvideoencodersettingscontrol.go b/qt/multimedia/gen_qvideoencodersettingscontrol.go index ee92d8fe..8fafda8b 100644 --- a/qt/multimedia/gen_qvideoencodersettingscontrol.go +++ b/qt/multimedia/gen_qvideoencodersettingscontrol.go @@ -35,22 +35,20 @@ func (this *QVideoEncoderSettingsControl) UnsafePointer() unsafe.Pointer { } // newQVideoEncoderSettingsControl constructs the type using only CGO pointers. -func newQVideoEncoderSettingsControl(h *C.QVideoEncoderSettingsControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QVideoEncoderSettingsControl { +func newQVideoEncoderSettingsControl(h *C.QVideoEncoderSettingsControl) *QVideoEncoderSettingsControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QVideoEncoderSettingsControl_virtbase(h, &outptr_QMediaControl) + return &QVideoEncoderSettingsControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQVideoEncoderSettingsControl constructs the type using only unsafe pointers. -func UnsafeNewQVideoEncoderSettingsControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QVideoEncoderSettingsControl { - if h == nil { - return nil - } - - return &QVideoEncoderSettingsControl{h: (*C.QVideoEncoderSettingsControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQVideoEncoderSettingsControl(h unsafe.Pointer) *QVideoEncoderSettingsControl { + return newQVideoEncoderSettingsControl((*C.QVideoEncoderSettingsControl)(h)) } func (this *QVideoEncoderSettingsControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qvideoencodersettingscontrol.h b/qt/multimedia/gen_qvideoencodersettingscontrol.h index 3dd1fe1a..6399337f 100644 --- a/qt/multimedia/gen_qvideoencodersettingscontrol.h +++ b/qt/multimedia/gen_qvideoencodersettingscontrol.h @@ -30,6 +30,7 @@ typedef struct QVideoEncoderSettings QVideoEncoderSettings; typedef struct QVideoEncoderSettingsControl QVideoEncoderSettingsControl; #endif +void QVideoEncoderSettingsControl_virtbase(QVideoEncoderSettingsControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QVideoEncoderSettingsControl_MetaObject(const QVideoEncoderSettingsControl* self); void* QVideoEncoderSettingsControl_Metacast(QVideoEncoderSettingsControl* self, const char* param1); struct miqt_string QVideoEncoderSettingsControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qvideoframe.cpp b/qt/multimedia/gen_qvideoframe.cpp index 789d69da..d42af7b0 100644 --- a/qt/multimedia/gen_qvideoframe.cpp +++ b/qt/multimedia/gen_qvideoframe.cpp @@ -10,24 +10,20 @@ #include "gen_qvideoframe.h" #include "_cgo_export.h" -void QVideoFrame_new(QVideoFrame** outptr_QVideoFrame) { - QVideoFrame* ret = new QVideoFrame(); - *outptr_QVideoFrame = ret; +QVideoFrame* QVideoFrame_new() { + return new QVideoFrame(); } -void QVideoFrame_new2(int bytes, QSize* size, int bytesPerLine, int format, QVideoFrame** outptr_QVideoFrame) { - QVideoFrame* ret = new QVideoFrame(static_cast(bytes), *size, static_cast(bytesPerLine), static_cast(format)); - *outptr_QVideoFrame = ret; +QVideoFrame* QVideoFrame_new2(int bytes, QSize* size, int bytesPerLine, int format) { + return new QVideoFrame(static_cast(bytes), *size, static_cast(bytesPerLine), static_cast(format)); } -void QVideoFrame_new3(QImage* image, QVideoFrame** outptr_QVideoFrame) { - QVideoFrame* ret = new QVideoFrame(*image); - *outptr_QVideoFrame = ret; +QVideoFrame* QVideoFrame_new3(QImage* image) { + return new QVideoFrame(*image); } -void QVideoFrame_new4(QVideoFrame* other, QVideoFrame** outptr_QVideoFrame) { - QVideoFrame* ret = new QVideoFrame(*other); - *outptr_QVideoFrame = ret; +QVideoFrame* QVideoFrame_new4(QVideoFrame* other) { + return new QVideoFrame(*other); } void QVideoFrame_OperatorAssign(QVideoFrame* self, QVideoFrame* other) { diff --git a/qt/multimedia/gen_qvideoframe.go b/qt/multimedia/gen_qvideoframe.go index a19344ae..d709ab91 100644 --- a/qt/multimedia/gen_qvideoframe.go +++ b/qt/multimedia/gen_qvideoframe.go @@ -89,54 +89,43 @@ func newQVideoFrame(h *C.QVideoFrame) *QVideoFrame { if h == nil { return nil } + return &QVideoFrame{h: h} } // UnsafeNewQVideoFrame constructs the type using only unsafe pointers. func UnsafeNewQVideoFrame(h unsafe.Pointer) *QVideoFrame { - if h == nil { - return nil - } - - return &QVideoFrame{h: (*C.QVideoFrame)(h)} + return newQVideoFrame((*C.QVideoFrame)(h)) } // NewQVideoFrame constructs a new QVideoFrame object. func NewQVideoFrame() *QVideoFrame { - var outptr_QVideoFrame *C.QVideoFrame = nil - C.QVideoFrame_new(&outptr_QVideoFrame) - ret := newQVideoFrame(outptr_QVideoFrame) + ret := newQVideoFrame(C.QVideoFrame_new()) ret.isSubclass = true return ret } // NewQVideoFrame2 constructs a new QVideoFrame object. func NewQVideoFrame2(bytes int, size *qt.QSize, bytesPerLine int, format QVideoFrame__PixelFormat) *QVideoFrame { - var outptr_QVideoFrame *C.QVideoFrame = nil - C.QVideoFrame_new2((C.int)(bytes), (*C.QSize)(size.UnsafePointer()), (C.int)(bytesPerLine), (C.int)(format), &outptr_QVideoFrame) - ret := newQVideoFrame(outptr_QVideoFrame) + ret := newQVideoFrame(C.QVideoFrame_new2((C.int)(bytes), (*C.QSize)(size.UnsafePointer()), (C.int)(bytesPerLine), (C.int)(format))) ret.isSubclass = true return ret } // NewQVideoFrame3 constructs a new QVideoFrame object. func NewQVideoFrame3(image *qt.QImage) *QVideoFrame { - var outptr_QVideoFrame *C.QVideoFrame = nil - C.QVideoFrame_new3((*C.QImage)(image.UnsafePointer()), &outptr_QVideoFrame) - ret := newQVideoFrame(outptr_QVideoFrame) + ret := newQVideoFrame(C.QVideoFrame_new3((*C.QImage)(image.UnsafePointer()))) ret.isSubclass = true return ret } // NewQVideoFrame4 constructs a new QVideoFrame object. func NewQVideoFrame4(other *QVideoFrame) *QVideoFrame { - var outptr_QVideoFrame *C.QVideoFrame = nil - C.QVideoFrame_new4(other.cPointer(), &outptr_QVideoFrame) - ret := newQVideoFrame(outptr_QVideoFrame) + ret := newQVideoFrame(C.QVideoFrame_new4(other.cPointer())) ret.isSubclass = true return ret } @@ -303,7 +292,7 @@ func (this *QVideoFrame) SetMetaData(key string, value *qt.QVariant) { } func (this *QVideoFrame) Image() *qt.QImage { - _goptr := qt.UnsafeNewQImage(unsafe.Pointer(C.QVideoFrame_Image(this.h)), nil) + _goptr := qt.UnsafeNewQImage(unsafe.Pointer(C.QVideoFrame_Image(this.h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/multimedia/gen_qvideoframe.h b/qt/multimedia/gen_qvideoframe.h index 120d70a6..963925e3 100644 --- a/qt/multimedia/gen_qvideoframe.h +++ b/qt/multimedia/gen_qvideoframe.h @@ -26,10 +26,10 @@ typedef struct QVariant QVariant; typedef struct QVideoFrame QVideoFrame; #endif -void QVideoFrame_new(QVideoFrame** outptr_QVideoFrame); -void QVideoFrame_new2(int bytes, QSize* size, int bytesPerLine, int format, QVideoFrame** outptr_QVideoFrame); -void QVideoFrame_new3(QImage* image, QVideoFrame** outptr_QVideoFrame); -void QVideoFrame_new4(QVideoFrame* other, QVideoFrame** outptr_QVideoFrame); +QVideoFrame* QVideoFrame_new(); +QVideoFrame* QVideoFrame_new2(int bytes, QSize* size, int bytesPerLine, int format); +QVideoFrame* QVideoFrame_new3(QImage* image); +QVideoFrame* QVideoFrame_new4(QVideoFrame* other); void QVideoFrame_OperatorAssign(QVideoFrame* self, QVideoFrame* other); bool QVideoFrame_OperatorEqual(const QVideoFrame* self, QVideoFrame* other); bool QVideoFrame_OperatorNotEqual(const QVideoFrame* self, QVideoFrame* other); diff --git a/qt/multimedia/gen_qvideoprobe.cpp b/qt/multimedia/gen_qvideoprobe.cpp index 40305635..d7c2b571 100644 --- a/qt/multimedia/gen_qvideoprobe.cpp +++ b/qt/multimedia/gen_qvideoprobe.cpp @@ -196,16 +196,16 @@ public: }; -void QVideoProbe_new(QVideoProbe** outptr_QVideoProbe, QObject** outptr_QObject) { - MiqtVirtualQVideoProbe* ret = new MiqtVirtualQVideoProbe(); - *outptr_QVideoProbe = ret; - *outptr_QObject = static_cast(ret); +QVideoProbe* QVideoProbe_new() { + return new MiqtVirtualQVideoProbe(); } -void QVideoProbe_new2(QObject* parent, QVideoProbe** outptr_QVideoProbe, QObject** outptr_QObject) { - MiqtVirtualQVideoProbe* ret = new MiqtVirtualQVideoProbe(parent); - *outptr_QVideoProbe = ret; - *outptr_QObject = static_cast(ret); +QVideoProbe* QVideoProbe_new2(QObject* parent) { + return new MiqtVirtualQVideoProbe(parent); +} + +void QVideoProbe_virtbase(QVideoProbe* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QVideoProbe_MetaObject(const QVideoProbe* self) { diff --git a/qt/multimedia/gen_qvideoprobe.go b/qt/multimedia/gen_qvideoprobe.go index 66ad9b12..1eab6f42 100644 --- a/qt/multimedia/gen_qvideoprobe.go +++ b/qt/multimedia/gen_qvideoprobe.go @@ -36,42 +36,34 @@ func (this *QVideoProbe) UnsafePointer() unsafe.Pointer { } // newQVideoProbe constructs the type using only CGO pointers. -func newQVideoProbe(h *C.QVideoProbe, h_QObject *C.QObject) *QVideoProbe { +func newQVideoProbe(h *C.QVideoProbe) *QVideoProbe { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QVideoProbe_virtbase(h, &outptr_QObject) + return &QVideoProbe{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQVideoProbe constructs the type using only unsafe pointers. -func UnsafeNewQVideoProbe(h unsafe.Pointer, h_QObject unsafe.Pointer) *QVideoProbe { - if h == nil { - return nil - } - - return &QVideoProbe{h: (*C.QVideoProbe)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQVideoProbe(h unsafe.Pointer) *QVideoProbe { + return newQVideoProbe((*C.QVideoProbe)(h)) } // NewQVideoProbe constructs a new QVideoProbe object. func NewQVideoProbe() *QVideoProbe { - var outptr_QVideoProbe *C.QVideoProbe = nil - var outptr_QObject *C.QObject = nil - C.QVideoProbe_new(&outptr_QVideoProbe, &outptr_QObject) - ret := newQVideoProbe(outptr_QVideoProbe, outptr_QObject) + ret := newQVideoProbe(C.QVideoProbe_new()) ret.isSubclass = true return ret } // NewQVideoProbe2 constructs a new QVideoProbe object. func NewQVideoProbe2(parent *qt.QObject) *QVideoProbe { - var outptr_QVideoProbe *C.QVideoProbe = nil - var outptr_QObject *C.QObject = nil - C.QVideoProbe_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QVideoProbe, &outptr_QObject) - ret := newQVideoProbe(outptr_QVideoProbe, outptr_QObject) + ret := newQVideoProbe(C.QVideoProbe_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -275,7 +267,7 @@ func miqt_exec_callback_QVideoProbe_TimerEvent(self *C.QVideoProbe, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QVideoProbe{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -301,7 +293,7 @@ func miqt_exec_callback_QVideoProbe_ChildEvent(self *C.QVideoProbe, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QVideoProbe{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/multimedia/gen_qvideoprobe.h b/qt/multimedia/gen_qvideoprobe.h index 6a5f5d1a..66038224 100644 --- a/qt/multimedia/gen_qvideoprobe.h +++ b/qt/multimedia/gen_qvideoprobe.h @@ -38,8 +38,9 @@ typedef struct QVideoFrame QVideoFrame; typedef struct QVideoProbe QVideoProbe; #endif -void QVideoProbe_new(QVideoProbe** outptr_QVideoProbe, QObject** outptr_QObject); -void QVideoProbe_new2(QObject* parent, QVideoProbe** outptr_QVideoProbe, QObject** outptr_QObject); +QVideoProbe* QVideoProbe_new(); +QVideoProbe* QVideoProbe_new2(QObject* parent); +void QVideoProbe_virtbase(QVideoProbe* src, QObject** outptr_QObject); QMetaObject* QVideoProbe_MetaObject(const QVideoProbe* self); void* QVideoProbe_Metacast(QVideoProbe* self, const char* param1); struct miqt_string QVideoProbe_Tr(const char* s); diff --git a/qt/multimedia/gen_qvideorenderercontrol.cpp b/qt/multimedia/gen_qvideorenderercontrol.cpp index 9066c1fb..ae2a8d05 100644 --- a/qt/multimedia/gen_qvideorenderercontrol.cpp +++ b/qt/multimedia/gen_qvideorenderercontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qvideorenderercontrol.h" #include "_cgo_export.h" +void QVideoRendererControl_virtbase(QVideoRendererControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QVideoRendererControl_MetaObject(const QVideoRendererControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qvideorenderercontrol.go b/qt/multimedia/gen_qvideorenderercontrol.go index d7a8d4e8..1194ad0c 100644 --- a/qt/multimedia/gen_qvideorenderercontrol.go +++ b/qt/multimedia/gen_qvideorenderercontrol.go @@ -35,22 +35,20 @@ func (this *QVideoRendererControl) UnsafePointer() unsafe.Pointer { } // newQVideoRendererControl constructs the type using only CGO pointers. -func newQVideoRendererControl(h *C.QVideoRendererControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QVideoRendererControl { +func newQVideoRendererControl(h *C.QVideoRendererControl) *QVideoRendererControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QVideoRendererControl_virtbase(h, &outptr_QMediaControl) + return &QVideoRendererControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQVideoRendererControl constructs the type using only unsafe pointers. -func UnsafeNewQVideoRendererControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QVideoRendererControl { - if h == nil { - return nil - } - - return &QVideoRendererControl{h: (*C.QVideoRendererControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQVideoRendererControl(h unsafe.Pointer) *QVideoRendererControl { + return newQVideoRendererControl((*C.QVideoRendererControl)(h)) } func (this *QVideoRendererControl) MetaObject() *qt.QMetaObject { @@ -82,7 +80,7 @@ func QVideoRendererControl_TrUtf8(s string) string { } func (this *QVideoRendererControl) Surface() *QAbstractVideoSurface { - return newQAbstractVideoSurface(C.QVideoRendererControl_Surface(this.h), nil) + return newQAbstractVideoSurface(C.QVideoRendererControl_Surface(this.h)) } func (this *QVideoRendererControl) SetSurface(surface *QAbstractVideoSurface) { diff --git a/qt/multimedia/gen_qvideorenderercontrol.h b/qt/multimedia/gen_qvideorenderercontrol.h index 22dc2885..456dedfb 100644 --- a/qt/multimedia/gen_qvideorenderercontrol.h +++ b/qt/multimedia/gen_qvideorenderercontrol.h @@ -28,6 +28,7 @@ typedef struct QObject QObject; typedef struct QVideoRendererControl QVideoRendererControl; #endif +void QVideoRendererControl_virtbase(QVideoRendererControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QVideoRendererControl_MetaObject(const QVideoRendererControl* self); void* QVideoRendererControl_Metacast(QVideoRendererControl* self, const char* param1); struct miqt_string QVideoRendererControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qvideosurfaceformat.cpp b/qt/multimedia/gen_qvideosurfaceformat.cpp index eba9da82..979298c2 100644 --- a/qt/multimedia/gen_qvideosurfaceformat.cpp +++ b/qt/multimedia/gen_qvideosurfaceformat.cpp @@ -8,24 +8,20 @@ #include "gen_qvideosurfaceformat.h" #include "_cgo_export.h" -void QVideoSurfaceFormat_new(QVideoSurfaceFormat** outptr_QVideoSurfaceFormat) { - QVideoSurfaceFormat* ret = new QVideoSurfaceFormat(); - *outptr_QVideoSurfaceFormat = ret; +QVideoSurfaceFormat* QVideoSurfaceFormat_new() { + return new QVideoSurfaceFormat(); } -void QVideoSurfaceFormat_new2(QSize* size, int pixelFormat, QVideoSurfaceFormat** outptr_QVideoSurfaceFormat) { - QVideoSurfaceFormat* ret = new QVideoSurfaceFormat(*size, static_cast(pixelFormat)); - *outptr_QVideoSurfaceFormat = ret; +QVideoSurfaceFormat* QVideoSurfaceFormat_new2(QSize* size, int pixelFormat) { + return new QVideoSurfaceFormat(*size, static_cast(pixelFormat)); } -void QVideoSurfaceFormat_new3(QVideoSurfaceFormat* format, QVideoSurfaceFormat** outptr_QVideoSurfaceFormat) { - QVideoSurfaceFormat* ret = new QVideoSurfaceFormat(*format); - *outptr_QVideoSurfaceFormat = ret; +QVideoSurfaceFormat* QVideoSurfaceFormat_new3(QVideoSurfaceFormat* format) { + return new QVideoSurfaceFormat(*format); } -void QVideoSurfaceFormat_new4(QSize* size, int pixelFormat, int handleType, QVideoSurfaceFormat** outptr_QVideoSurfaceFormat) { - QVideoSurfaceFormat* ret = new QVideoSurfaceFormat(*size, static_cast(pixelFormat), static_cast(handleType)); - *outptr_QVideoSurfaceFormat = ret; +QVideoSurfaceFormat* QVideoSurfaceFormat_new4(QSize* size, int pixelFormat, int handleType) { + return new QVideoSurfaceFormat(*size, static_cast(pixelFormat), static_cast(handleType)); } void QVideoSurfaceFormat_OperatorAssign(QVideoSurfaceFormat* self, QVideoSurfaceFormat* format) { diff --git a/qt/multimedia/gen_qvideosurfaceformat.go b/qt/multimedia/gen_qvideosurfaceformat.go index 14c769df..4755fba8 100644 --- a/qt/multimedia/gen_qvideosurfaceformat.go +++ b/qt/multimedia/gen_qvideosurfaceformat.go @@ -57,54 +57,43 @@ func newQVideoSurfaceFormat(h *C.QVideoSurfaceFormat) *QVideoSurfaceFormat { if h == nil { return nil } + return &QVideoSurfaceFormat{h: h} } // UnsafeNewQVideoSurfaceFormat constructs the type using only unsafe pointers. func UnsafeNewQVideoSurfaceFormat(h unsafe.Pointer) *QVideoSurfaceFormat { - if h == nil { - return nil - } - - return &QVideoSurfaceFormat{h: (*C.QVideoSurfaceFormat)(h)} + return newQVideoSurfaceFormat((*C.QVideoSurfaceFormat)(h)) } // NewQVideoSurfaceFormat constructs a new QVideoSurfaceFormat object. func NewQVideoSurfaceFormat() *QVideoSurfaceFormat { - var outptr_QVideoSurfaceFormat *C.QVideoSurfaceFormat = nil - C.QVideoSurfaceFormat_new(&outptr_QVideoSurfaceFormat) - ret := newQVideoSurfaceFormat(outptr_QVideoSurfaceFormat) + ret := newQVideoSurfaceFormat(C.QVideoSurfaceFormat_new()) ret.isSubclass = true return ret } // NewQVideoSurfaceFormat2 constructs a new QVideoSurfaceFormat object. func NewQVideoSurfaceFormat2(size *qt.QSize, pixelFormat QVideoFrame__PixelFormat) *QVideoSurfaceFormat { - var outptr_QVideoSurfaceFormat *C.QVideoSurfaceFormat = nil - C.QVideoSurfaceFormat_new2((*C.QSize)(size.UnsafePointer()), (C.int)(pixelFormat), &outptr_QVideoSurfaceFormat) - ret := newQVideoSurfaceFormat(outptr_QVideoSurfaceFormat) + ret := newQVideoSurfaceFormat(C.QVideoSurfaceFormat_new2((*C.QSize)(size.UnsafePointer()), (C.int)(pixelFormat))) ret.isSubclass = true return ret } // NewQVideoSurfaceFormat3 constructs a new QVideoSurfaceFormat object. func NewQVideoSurfaceFormat3(format *QVideoSurfaceFormat) *QVideoSurfaceFormat { - var outptr_QVideoSurfaceFormat *C.QVideoSurfaceFormat = nil - C.QVideoSurfaceFormat_new3(format.cPointer(), &outptr_QVideoSurfaceFormat) - ret := newQVideoSurfaceFormat(outptr_QVideoSurfaceFormat) + ret := newQVideoSurfaceFormat(C.QVideoSurfaceFormat_new3(format.cPointer())) ret.isSubclass = true return ret } // NewQVideoSurfaceFormat4 constructs a new QVideoSurfaceFormat object. func NewQVideoSurfaceFormat4(size *qt.QSize, pixelFormat QVideoFrame__PixelFormat, handleType QAbstractVideoBuffer__HandleType) *QVideoSurfaceFormat { - var outptr_QVideoSurfaceFormat *C.QVideoSurfaceFormat = nil - C.QVideoSurfaceFormat_new4((*C.QSize)(size.UnsafePointer()), (C.int)(pixelFormat), (C.int)(handleType), &outptr_QVideoSurfaceFormat) - ret := newQVideoSurfaceFormat(outptr_QVideoSurfaceFormat) + ret := newQVideoSurfaceFormat(C.QVideoSurfaceFormat_new4((*C.QSize)(size.UnsafePointer()), (C.int)(pixelFormat), (C.int)(handleType))) ret.isSubclass = true return ret } diff --git a/qt/multimedia/gen_qvideosurfaceformat.h b/qt/multimedia/gen_qvideosurfaceformat.h index e74424eb..e1b126b3 100644 --- a/qt/multimedia/gen_qvideosurfaceformat.h +++ b/qt/multimedia/gen_qvideosurfaceformat.h @@ -26,10 +26,10 @@ typedef struct QVariant QVariant; typedef struct QVideoSurfaceFormat QVideoSurfaceFormat; #endif -void QVideoSurfaceFormat_new(QVideoSurfaceFormat** outptr_QVideoSurfaceFormat); -void QVideoSurfaceFormat_new2(QSize* size, int pixelFormat, QVideoSurfaceFormat** outptr_QVideoSurfaceFormat); -void QVideoSurfaceFormat_new3(QVideoSurfaceFormat* format, QVideoSurfaceFormat** outptr_QVideoSurfaceFormat); -void QVideoSurfaceFormat_new4(QSize* size, int pixelFormat, int handleType, QVideoSurfaceFormat** outptr_QVideoSurfaceFormat); +QVideoSurfaceFormat* QVideoSurfaceFormat_new(); +QVideoSurfaceFormat* QVideoSurfaceFormat_new2(QSize* size, int pixelFormat); +QVideoSurfaceFormat* QVideoSurfaceFormat_new3(QVideoSurfaceFormat* format); +QVideoSurfaceFormat* QVideoSurfaceFormat_new4(QSize* size, int pixelFormat, int handleType); void QVideoSurfaceFormat_OperatorAssign(QVideoSurfaceFormat* self, QVideoSurfaceFormat* format); bool QVideoSurfaceFormat_OperatorEqual(const QVideoSurfaceFormat* self, QVideoSurfaceFormat* format); bool QVideoSurfaceFormat_OperatorNotEqual(const QVideoSurfaceFormat* self, QVideoSurfaceFormat* format); diff --git a/qt/multimedia/gen_qvideowidget.cpp b/qt/multimedia/gen_qvideowidget.cpp index a757b6eb..8dfa0bb0 100644 --- a/qt/multimedia/gen_qvideowidget.cpp +++ b/qt/multimedia/gen_qvideowidget.cpp @@ -1068,22 +1068,17 @@ public: }; -void QVideoWidget_new(QWidget* parent, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQVideoWidget* ret = new MiqtVirtualQVideoWidget(parent); - *outptr_QVideoWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QVideoWidget* QVideoWidget_new(QWidget* parent) { + return new MiqtVirtualQVideoWidget(parent); } -void QVideoWidget_new2(QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface) { - MiqtVirtualQVideoWidget* ret = new MiqtVirtualQVideoWidget(); - *outptr_QVideoWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); - *outptr_QMediaBindableInterface = static_cast(ret); +QVideoWidget* QVideoWidget_new2() { + return new MiqtVirtualQVideoWidget(); +} + +void QVideoWidget_virtbase(QVideoWidget* src, QWidget** outptr_QWidget, QMediaBindableInterface** outptr_QMediaBindableInterface) { + *outptr_QWidget = static_cast(src); + *outptr_QMediaBindableInterface = static_cast(src); } QMetaObject* QVideoWidget_MetaObject(const QVideoWidget* self) { diff --git a/qt/multimedia/gen_qvideowidget.go b/qt/multimedia/gen_qvideowidget.go index ad88b111..9d3647f8 100644 --- a/qt/multimedia/gen_qvideowidget.go +++ b/qt/multimedia/gen_qvideowidget.go @@ -37,50 +37,36 @@ func (this *QVideoWidget) UnsafePointer() unsafe.Pointer { } // newQVideoWidget constructs the type using only CGO pointers. -func newQVideoWidget(h *C.QVideoWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice, h_QMediaBindableInterface *C.QMediaBindableInterface) *QVideoWidget { +func newQVideoWidget(h *C.QVideoWidget) *QVideoWidget { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil + C.QVideoWidget_virtbase(h, &outptr_QWidget, &outptr_QMediaBindableInterface) + return &QVideoWidget{h: h, - QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice)), - QMediaBindableInterface: newQMediaBindableInterface(h_QMediaBindableInterface)} + QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(outptr_QWidget)), + QMediaBindableInterface: newQMediaBindableInterface(outptr_QMediaBindableInterface)} } // UnsafeNewQVideoWidget constructs the type using only unsafe pointers. -func UnsafeNewQVideoWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer, h_QMediaBindableInterface unsafe.Pointer) *QVideoWidget { - if h == nil { - return nil - } - - return &QVideoWidget{h: (*C.QVideoWidget)(h), - QWidget: qt.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice), - QMediaBindableInterface: UnsafeNewQMediaBindableInterface(h_QMediaBindableInterface)} +func UnsafeNewQVideoWidget(h unsafe.Pointer) *QVideoWidget { + return newQVideoWidget((*C.QVideoWidget)(h)) } // NewQVideoWidget constructs a new QVideoWidget object. func NewQVideoWidget(parent *qt.QWidget) *QVideoWidget { - var outptr_QVideoWidget *C.QVideoWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QVideoWidget_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QVideoWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice, &outptr_QMediaBindableInterface) - ret := newQVideoWidget(outptr_QVideoWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice, outptr_QMediaBindableInterface) + ret := newQVideoWidget(C.QVideoWidget_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQVideoWidget2 constructs a new QVideoWidget object. func NewQVideoWidget2() *QVideoWidget { - var outptr_QVideoWidget *C.QVideoWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - var outptr_QMediaBindableInterface *C.QMediaBindableInterface = nil - C.QVideoWidget_new2(&outptr_QVideoWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice, &outptr_QMediaBindableInterface) - ret := newQVideoWidget(outptr_QVideoWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice, outptr_QMediaBindableInterface) + ret := newQVideoWidget(C.QVideoWidget_new2()) ret.isSubclass = true return ret } @@ -114,11 +100,11 @@ func QVideoWidget_TrUtf8(s string) string { } func (this *QVideoWidget) MediaObject() *QMediaObject { - return newQMediaObject(C.QVideoWidget_MediaObject(this.h), nil) + return newQMediaObject(C.QVideoWidget_MediaObject(this.h)) } func (this *QVideoWidget) VideoSurface() *QAbstractVideoSurface { - return newQAbstractVideoSurface(C.QVideoWidget_VideoSurface(this.h), nil) + return newQAbstractVideoSurface(C.QVideoWidget_VideoSurface(this.h)) } func (this *QVideoWidget) AspectRatioMode() qt.AspectRatioMode { @@ -317,7 +303,7 @@ func QVideoWidget_TrUtf83(s string, c string, n int) string { func (this *QVideoWidget) callVirtualBase_MediaObject() *QMediaObject { - return newQMediaObject(C.QVideoWidget_virtualbase_MediaObject(unsafe.Pointer(this.h)), nil) + return newQMediaObject(C.QVideoWidget_virtualbase_MediaObject(unsafe.Pointer(this.h))) } func (this *QVideoWidget) OnMediaObject(slot func(super func() *QMediaObject) *QMediaObject) { @@ -415,7 +401,7 @@ func miqt_exec_callback_QVideoWidget_ShowEvent(self *C.QVideoWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -441,7 +427,7 @@ func miqt_exec_callback_QVideoWidget_HideEvent(self *C.QVideoWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -467,7 +453,7 @@ func miqt_exec_callback_QVideoWidget_ResizeEvent(self *C.QVideoWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -493,7 +479,7 @@ func miqt_exec_callback_QVideoWidget_MoveEvent(self *C.QVideoWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -519,7 +505,7 @@ func miqt_exec_callback_QVideoWidget_PaintEvent(self *C.QVideoWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -545,7 +531,7 @@ func miqt_exec_callback_QVideoWidget_SetMediaObject(self *C.QVideoWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQMediaObject(object, nil) + slotval1 := newQMediaObject(object) virtualReturn := gofunc((&QVideoWidget{h: self}).callVirtualBase_SetMediaObject, slotval1) @@ -729,7 +715,7 @@ func miqt_exec_callback_QVideoWidget_MousePressEvent(self *C.QVideoWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -755,7 +741,7 @@ func miqt_exec_callback_QVideoWidget_MouseReleaseEvent(self *C.QVideoWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -781,7 +767,7 @@ func miqt_exec_callback_QVideoWidget_MouseDoubleClickEvent(self *C.QVideoWidget, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -807,7 +793,7 @@ func miqt_exec_callback_QVideoWidget_MouseMoveEvent(self *C.QVideoWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -833,7 +819,7 @@ func miqt_exec_callback_QVideoWidget_WheelEvent(self *C.QVideoWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -859,7 +845,7 @@ func miqt_exec_callback_QVideoWidget_KeyPressEvent(self *C.QVideoWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -885,7 +871,7 @@ func miqt_exec_callback_QVideoWidget_KeyReleaseEvent(self *C.QVideoWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -911,7 +897,7 @@ func miqt_exec_callback_QVideoWidget_FocusInEvent(self *C.QVideoWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -937,7 +923,7 @@ func miqt_exec_callback_QVideoWidget_FocusOutEvent(self *C.QVideoWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1015,7 +1001,7 @@ func miqt_exec_callback_QVideoWidget_CloseEvent(self *C.QVideoWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1041,7 +1027,7 @@ func miqt_exec_callback_QVideoWidget_ContextMenuEvent(self *C.QVideoWidget, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1067,7 +1053,7 @@ func miqt_exec_callback_QVideoWidget_TabletEvent(self *C.QVideoWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1093,7 +1079,7 @@ func miqt_exec_callback_QVideoWidget_ActionEvent(self *C.QVideoWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1119,7 +1105,7 @@ func miqt_exec_callback_QVideoWidget_DragEnterEvent(self *C.QVideoWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1145,7 +1131,7 @@ func miqt_exec_callback_QVideoWidget_DragMoveEvent(self *C.QVideoWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1171,7 +1157,7 @@ func miqt_exec_callback_QVideoWidget_DragLeaveEvent(self *C.QVideoWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1197,7 +1183,7 @@ func miqt_exec_callback_QVideoWidget_DropEvent(self *C.QVideoWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1393,7 +1379,7 @@ func miqt_exec_callback_QVideoWidget_InputMethodEvent(self *C.QVideoWidget, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1)) gofunc((&QVideoWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/multimedia/gen_qvideowidget.h b/qt/multimedia/gen_qvideowidget.h index 1c8d9626..6f104baa 100644 --- a/qt/multimedia/gen_qvideowidget.h +++ b/qt/multimedia/gen_qvideowidget.h @@ -82,8 +82,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QVideoWidget_new(QWidget* parent, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface); -void QVideoWidget_new2(QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice, QMediaBindableInterface** outptr_QMediaBindableInterface); +QVideoWidget* QVideoWidget_new(QWidget* parent); +QVideoWidget* QVideoWidget_new2(); +void QVideoWidget_virtbase(QVideoWidget* src, QWidget** outptr_QWidget, QMediaBindableInterface** outptr_QMediaBindableInterface); QMetaObject* QVideoWidget_MetaObject(const QVideoWidget* self); void* QVideoWidget_Metacast(QVideoWidget* self, const char* param1); struct miqt_string QVideoWidget_Tr(const char* s); diff --git a/qt/multimedia/gen_qvideowidgetcontrol.cpp b/qt/multimedia/gen_qvideowidgetcontrol.cpp index 085a88e9..111cd33d 100644 --- a/qt/multimedia/gen_qvideowidgetcontrol.cpp +++ b/qt/multimedia/gen_qvideowidgetcontrol.cpp @@ -10,6 +10,10 @@ #include "gen_qvideowidgetcontrol.h" #include "_cgo_export.h" +void QVideoWidgetControl_virtbase(QVideoWidgetControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QVideoWidgetControl_MetaObject(const QVideoWidgetControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qvideowidgetcontrol.go b/qt/multimedia/gen_qvideowidgetcontrol.go index 923f3993..2e8cddf5 100644 --- a/qt/multimedia/gen_qvideowidgetcontrol.go +++ b/qt/multimedia/gen_qvideowidgetcontrol.go @@ -36,22 +36,20 @@ func (this *QVideoWidgetControl) UnsafePointer() unsafe.Pointer { } // newQVideoWidgetControl constructs the type using only CGO pointers. -func newQVideoWidgetControl(h *C.QVideoWidgetControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QVideoWidgetControl { +func newQVideoWidgetControl(h *C.QVideoWidgetControl) *QVideoWidgetControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QVideoWidgetControl_virtbase(h, &outptr_QMediaControl) + return &QVideoWidgetControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQVideoWidgetControl constructs the type using only unsafe pointers. -func UnsafeNewQVideoWidgetControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QVideoWidgetControl { - if h == nil { - return nil - } - - return &QVideoWidgetControl{h: (*C.QVideoWidgetControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQVideoWidgetControl(h unsafe.Pointer) *QVideoWidgetControl { + return newQVideoWidgetControl((*C.QVideoWidgetControl)(h)) } func (this *QVideoWidgetControl) MetaObject() *qt.QMetaObject { @@ -83,7 +81,7 @@ func QVideoWidgetControl_TrUtf8(s string) string { } func (this *QVideoWidgetControl) VideoWidget() *qt.QWidget { - return qt.UnsafeNewQWidget(unsafe.Pointer(C.QVideoWidgetControl_VideoWidget(this.h)), nil, nil) + return qt.UnsafeNewQWidget(unsafe.Pointer(C.QVideoWidgetControl_VideoWidget(this.h))) } func (this *QVideoWidgetControl) AspectRatioMode() qt.AspectRatioMode { diff --git a/qt/multimedia/gen_qvideowidgetcontrol.h b/qt/multimedia/gen_qvideowidgetcontrol.h index 3995a25c..9f1eae2e 100644 --- a/qt/multimedia/gen_qvideowidgetcontrol.h +++ b/qt/multimedia/gen_qvideowidgetcontrol.h @@ -28,6 +28,7 @@ typedef struct QVideoWidgetControl QVideoWidgetControl; typedef struct QWidget QWidget; #endif +void QVideoWidgetControl_virtbase(QVideoWidgetControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QVideoWidgetControl_MetaObject(const QVideoWidgetControl* self); void* QVideoWidgetControl_Metacast(QVideoWidgetControl* self, const char* param1); struct miqt_string QVideoWidgetControl_Tr(const char* s); diff --git a/qt/multimedia/gen_qvideowindowcontrol.cpp b/qt/multimedia/gen_qvideowindowcontrol.cpp index 65c7e378..2bb3a9ec 100644 --- a/qt/multimedia/gen_qvideowindowcontrol.cpp +++ b/qt/multimedia/gen_qvideowindowcontrol.cpp @@ -11,6 +11,10 @@ #include "gen_qvideowindowcontrol.h" #include "_cgo_export.h" +void QVideoWindowControl_virtbase(QVideoWindowControl* src, QMediaControl** outptr_QMediaControl) { + *outptr_QMediaControl = static_cast(src); +} + QMetaObject* QVideoWindowControl_MetaObject(const QVideoWindowControl* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/multimedia/gen_qvideowindowcontrol.go b/qt/multimedia/gen_qvideowindowcontrol.go index 2d9c3ada..ffcfcc3b 100644 --- a/qt/multimedia/gen_qvideowindowcontrol.go +++ b/qt/multimedia/gen_qvideowindowcontrol.go @@ -36,22 +36,20 @@ func (this *QVideoWindowControl) UnsafePointer() unsafe.Pointer { } // newQVideoWindowControl constructs the type using only CGO pointers. -func newQVideoWindowControl(h *C.QVideoWindowControl, h_QMediaControl *C.QMediaControl, h_QObject *C.QObject) *QVideoWindowControl { +func newQVideoWindowControl(h *C.QVideoWindowControl) *QVideoWindowControl { if h == nil { return nil } + var outptr_QMediaControl *C.QMediaControl = nil + C.QVideoWindowControl_virtbase(h, &outptr_QMediaControl) + return &QVideoWindowControl{h: h, - QMediaControl: newQMediaControl(h_QMediaControl, h_QObject)} + QMediaControl: newQMediaControl(outptr_QMediaControl)} } // UnsafeNewQVideoWindowControl constructs the type using only unsafe pointers. -func UnsafeNewQVideoWindowControl(h unsafe.Pointer, h_QMediaControl unsafe.Pointer, h_QObject unsafe.Pointer) *QVideoWindowControl { - if h == nil { - return nil - } - - return &QVideoWindowControl{h: (*C.QVideoWindowControl)(h), - QMediaControl: UnsafeNewQMediaControl(h_QMediaControl, h_QObject)} +func UnsafeNewQVideoWindowControl(h unsafe.Pointer) *QVideoWindowControl { + return newQVideoWindowControl((*C.QVideoWindowControl)(h)) } func (this *QVideoWindowControl) MetaObject() *qt.QMetaObject { diff --git a/qt/multimedia/gen_qvideowindowcontrol.h b/qt/multimedia/gen_qvideowindowcontrol.h index c61fa99f..79a46b7c 100644 --- a/qt/multimedia/gen_qvideowindowcontrol.h +++ b/qt/multimedia/gen_qvideowindowcontrol.h @@ -30,6 +30,7 @@ typedef struct QSize QSize; typedef struct QVideoWindowControl QVideoWindowControl; #endif +void QVideoWindowControl_virtbase(QVideoWindowControl* src, QMediaControl** outptr_QMediaControl); QMetaObject* QVideoWindowControl_MetaObject(const QVideoWindowControl* self); void* QVideoWindowControl_Metacast(QVideoWindowControl* self, const char* param1); struct miqt_string QVideoWindowControl_Tr(const char* s); diff --git a/qt/network/gen_qabstractnetworkcache.cpp b/qt/network/gen_qabstractnetworkcache.cpp index bc399e51..67bc314c 100644 --- a/qt/network/gen_qabstractnetworkcache.cpp +++ b/qt/network/gen_qabstractnetworkcache.cpp @@ -17,14 +17,12 @@ #include "gen_qabstractnetworkcache.h" #include "_cgo_export.h" -void QNetworkCacheMetaData_new(QNetworkCacheMetaData** outptr_QNetworkCacheMetaData) { - QNetworkCacheMetaData* ret = new QNetworkCacheMetaData(); - *outptr_QNetworkCacheMetaData = ret; +QNetworkCacheMetaData* QNetworkCacheMetaData_new() { + return new QNetworkCacheMetaData(); } -void QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other, QNetworkCacheMetaData** outptr_QNetworkCacheMetaData) { - QNetworkCacheMetaData* ret = new QNetworkCacheMetaData(*other); - *outptr_QNetworkCacheMetaData = ret; +QNetworkCacheMetaData* QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other) { + return new QNetworkCacheMetaData(*other); } void QNetworkCacheMetaData_OperatorAssign(QNetworkCacheMetaData* self, QNetworkCacheMetaData* other) { @@ -167,6 +165,10 @@ void QNetworkCacheMetaData_Delete(QNetworkCacheMetaData* self, bool isSubclass) } } +void QAbstractNetworkCache_virtbase(QAbstractNetworkCache* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QAbstractNetworkCache_MetaObject(const QAbstractNetworkCache* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/network/gen_qabstractnetworkcache.go b/qt/network/gen_qabstractnetworkcache.go index a1405b4d..9c2d95c5 100644 --- a/qt/network/gen_qabstractnetworkcache.go +++ b/qt/network/gen_qabstractnetworkcache.go @@ -38,34 +38,27 @@ func newQNetworkCacheMetaData(h *C.QNetworkCacheMetaData) *QNetworkCacheMetaData if h == nil { return nil } + return &QNetworkCacheMetaData{h: h} } // UnsafeNewQNetworkCacheMetaData constructs the type using only unsafe pointers. func UnsafeNewQNetworkCacheMetaData(h unsafe.Pointer) *QNetworkCacheMetaData { - if h == nil { - return nil - } - - return &QNetworkCacheMetaData{h: (*C.QNetworkCacheMetaData)(h)} + return newQNetworkCacheMetaData((*C.QNetworkCacheMetaData)(h)) } // NewQNetworkCacheMetaData constructs a new QNetworkCacheMetaData object. func NewQNetworkCacheMetaData() *QNetworkCacheMetaData { - var outptr_QNetworkCacheMetaData *C.QNetworkCacheMetaData = nil - C.QNetworkCacheMetaData_new(&outptr_QNetworkCacheMetaData) - ret := newQNetworkCacheMetaData(outptr_QNetworkCacheMetaData) + ret := newQNetworkCacheMetaData(C.QNetworkCacheMetaData_new()) ret.isSubclass = true return ret } // NewQNetworkCacheMetaData2 constructs a new QNetworkCacheMetaData object. func NewQNetworkCacheMetaData2(other *QNetworkCacheMetaData) *QNetworkCacheMetaData { - var outptr_QNetworkCacheMetaData *C.QNetworkCacheMetaData = nil - C.QNetworkCacheMetaData_new2(other.cPointer(), &outptr_QNetworkCacheMetaData) - ret := newQNetworkCacheMetaData(outptr_QNetworkCacheMetaData) + ret := newQNetworkCacheMetaData(C.QNetworkCacheMetaData_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -259,22 +252,20 @@ func (this *QAbstractNetworkCache) UnsafePointer() unsafe.Pointer { } // newQAbstractNetworkCache constructs the type using only CGO pointers. -func newQAbstractNetworkCache(h *C.QAbstractNetworkCache, h_QObject *C.QObject) *QAbstractNetworkCache { +func newQAbstractNetworkCache(h *C.QAbstractNetworkCache) *QAbstractNetworkCache { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractNetworkCache_virtbase(h, &outptr_QObject) + return &QAbstractNetworkCache{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAbstractNetworkCache constructs the type using only unsafe pointers. -func UnsafeNewQAbstractNetworkCache(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractNetworkCache { - if h == nil { - return nil - } - - return &QAbstractNetworkCache{h: (*C.QAbstractNetworkCache)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractNetworkCache(h unsafe.Pointer) *QAbstractNetworkCache { + return newQAbstractNetworkCache((*C.QAbstractNetworkCache)(h)) } func (this *QAbstractNetworkCache) MetaObject() *qt.QMetaObject { @@ -316,7 +307,7 @@ func (this *QAbstractNetworkCache) UpdateMetaData(metaData *QNetworkCacheMetaDat } func (this *QAbstractNetworkCache) Data(url *qt.QUrl) *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Data(this.h, (*C.QUrl)(url.UnsafePointer()))), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Data(this.h, (*C.QUrl)(url.UnsafePointer())))) } func (this *QAbstractNetworkCache) Remove(url *qt.QUrl) bool { @@ -328,7 +319,7 @@ func (this *QAbstractNetworkCache) CacheSize() int64 { } func (this *QAbstractNetworkCache) Prepare(metaData *QNetworkCacheMetaData) *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Prepare(this.h, metaData.cPointer())), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Prepare(this.h, metaData.cPointer()))) } func (this *QAbstractNetworkCache) Insert(device *qt.QIODevice) { diff --git a/qt/network/gen_qabstractnetworkcache.h b/qt/network/gen_qabstractnetworkcache.h index 6643d34c..33947d6d 100644 --- a/qt/network/gen_qabstractnetworkcache.h +++ b/qt/network/gen_qabstractnetworkcache.h @@ -34,8 +34,8 @@ typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -void QNetworkCacheMetaData_new(QNetworkCacheMetaData** outptr_QNetworkCacheMetaData); -void QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other, QNetworkCacheMetaData** outptr_QNetworkCacheMetaData); +QNetworkCacheMetaData* QNetworkCacheMetaData_new(); +QNetworkCacheMetaData* QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other); void QNetworkCacheMetaData_OperatorAssign(QNetworkCacheMetaData* self, QNetworkCacheMetaData* other); void QNetworkCacheMetaData_Swap(QNetworkCacheMetaData* self, QNetworkCacheMetaData* other); bool QNetworkCacheMetaData_OperatorEqual(const QNetworkCacheMetaData* self, QNetworkCacheMetaData* other); @@ -55,6 +55,7 @@ struct miqt_map /* of int to QVariant* */ QNetworkCacheMetaData_Attributes(cons void QNetworkCacheMetaData_SetAttributes(QNetworkCacheMetaData* self, struct miqt_map /* of int to QVariant* */ attributes); void QNetworkCacheMetaData_Delete(QNetworkCacheMetaData* self, bool isSubclass); +void QAbstractNetworkCache_virtbase(QAbstractNetworkCache* src, QObject** outptr_QObject); QMetaObject* QAbstractNetworkCache_MetaObject(const QAbstractNetworkCache* self); void* QAbstractNetworkCache_Metacast(QAbstractNetworkCache* self, const char* param1); struct miqt_string QAbstractNetworkCache_Tr(const char* s); diff --git a/qt/network/gen_qabstractsocket.cpp b/qt/network/gen_qabstractsocket.cpp index b72155ba..06498e41 100644 --- a/qt/network/gen_qabstractsocket.cpp +++ b/qt/network/gen_qabstractsocket.cpp @@ -685,11 +685,12 @@ public: }; -void QAbstractSocket_new(int socketType, QObject* parent, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQAbstractSocket* ret = new MiqtVirtualQAbstractSocket(static_cast(socketType), parent); - *outptr_QAbstractSocket = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAbstractSocket* QAbstractSocket_new(int socketType, QObject* parent) { + return new MiqtVirtualQAbstractSocket(static_cast(socketType), parent); +} + +void QAbstractSocket_virtbase(QAbstractSocket* src, QIODevice** outptr_QIODevice) { + *outptr_QIODevice = static_cast(src); } QMetaObject* QAbstractSocket_MetaObject(const QAbstractSocket* self) { diff --git a/qt/network/gen_qabstractsocket.go b/qt/network/gen_qabstractsocket.go index 59d2d147..ca852ebe 100644 --- a/qt/network/gen_qabstractsocket.go +++ b/qt/network/gen_qabstractsocket.go @@ -124,32 +124,26 @@ func (this *QAbstractSocket) UnsafePointer() unsafe.Pointer { } // newQAbstractSocket constructs the type using only CGO pointers. -func newQAbstractSocket(h *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QAbstractSocket { +func newQAbstractSocket(h *C.QAbstractSocket) *QAbstractSocket { if h == nil { return nil } + var outptr_QIODevice *C.QIODevice = nil + C.QAbstractSocket_virtbase(h, &outptr_QIODevice) + return &QAbstractSocket{h: h, - QIODevice: qt.UnsafeNewQIODevice(unsafe.Pointer(h_QIODevice), unsafe.Pointer(h_QObject))} + QIODevice: qt.UnsafeNewQIODevice(unsafe.Pointer(outptr_QIODevice))} } // UnsafeNewQAbstractSocket constructs the type using only unsafe pointers. -func UnsafeNewQAbstractSocket(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractSocket { - if h == nil { - return nil - } - - return &QAbstractSocket{h: (*C.QAbstractSocket)(h), - QIODevice: qt.UnsafeNewQIODevice(h_QIODevice, h_QObject)} +func UnsafeNewQAbstractSocket(h unsafe.Pointer) *QAbstractSocket { + return newQAbstractSocket((*C.QAbstractSocket)(h)) } // NewQAbstractSocket constructs a new QAbstractSocket object. func NewQAbstractSocket(socketType QAbstractSocket__SocketType, parent *qt.QObject) *QAbstractSocket { - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QAbstractSocket_new((C.int)(socketType), (*C.QObject)(parent.UnsafePointer()), &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject) - ret := newQAbstractSocket(outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject) + ret := newQAbstractSocket(C.QAbstractSocket_new((C.int)(socketType), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qabstractsocket.h b/qt/network/gen_qabstractsocket.h index 6464ad51..46960f64 100644 --- a/qt/network/gen_qabstractsocket.h +++ b/qt/network/gen_qabstractsocket.h @@ -34,7 +34,8 @@ typedef struct QObject QObject; typedef struct QVariant QVariant; #endif -void QAbstractSocket_new(int socketType, QObject* parent, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +QAbstractSocket* QAbstractSocket_new(int socketType, QObject* parent); +void QAbstractSocket_virtbase(QAbstractSocket* src, QIODevice** outptr_QIODevice); QMetaObject* QAbstractSocket_MetaObject(const QAbstractSocket* self); void* QAbstractSocket_Metacast(QAbstractSocket* self, const char* param1); struct miqt_string QAbstractSocket_Tr(const char* s); diff --git a/qt/network/gen_qauthenticator.cpp b/qt/network/gen_qauthenticator.cpp index 268629bc..c6e7c47a 100644 --- a/qt/network/gen_qauthenticator.cpp +++ b/qt/network/gen_qauthenticator.cpp @@ -8,14 +8,12 @@ #include "gen_qauthenticator.h" #include "_cgo_export.h" -void QAuthenticator_new(QAuthenticator** outptr_QAuthenticator) { - QAuthenticator* ret = new QAuthenticator(); - *outptr_QAuthenticator = ret; +QAuthenticator* QAuthenticator_new() { + return new QAuthenticator(); } -void QAuthenticator_new2(QAuthenticator* other, QAuthenticator** outptr_QAuthenticator) { - QAuthenticator* ret = new QAuthenticator(*other); - *outptr_QAuthenticator = ret; +QAuthenticator* QAuthenticator_new2(QAuthenticator* other) { + return new QAuthenticator(*other); } void QAuthenticator_OperatorAssign(QAuthenticator* self, QAuthenticator* other) { diff --git a/qt/network/gen_qauthenticator.go b/qt/network/gen_qauthenticator.go index 45b5d4eb..18398acf 100644 --- a/qt/network/gen_qauthenticator.go +++ b/qt/network/gen_qauthenticator.go @@ -38,34 +38,27 @@ func newQAuthenticator(h *C.QAuthenticator) *QAuthenticator { if h == nil { return nil } + return &QAuthenticator{h: h} } // UnsafeNewQAuthenticator constructs the type using only unsafe pointers. func UnsafeNewQAuthenticator(h unsafe.Pointer) *QAuthenticator { - if h == nil { - return nil - } - - return &QAuthenticator{h: (*C.QAuthenticator)(h)} + return newQAuthenticator((*C.QAuthenticator)(h)) } // NewQAuthenticator constructs a new QAuthenticator object. func NewQAuthenticator() *QAuthenticator { - var outptr_QAuthenticator *C.QAuthenticator = nil - C.QAuthenticator_new(&outptr_QAuthenticator) - ret := newQAuthenticator(outptr_QAuthenticator) + ret := newQAuthenticator(C.QAuthenticator_new()) ret.isSubclass = true return ret } // NewQAuthenticator2 constructs a new QAuthenticator object. func NewQAuthenticator2(other *QAuthenticator) *QAuthenticator { - var outptr_QAuthenticator *C.QAuthenticator = nil - C.QAuthenticator_new2(other.cPointer(), &outptr_QAuthenticator) - ret := newQAuthenticator(outptr_QAuthenticator) + ret := newQAuthenticator(C.QAuthenticator_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qauthenticator.h b/qt/network/gen_qauthenticator.h index 83f96c15..1e609a25 100644 --- a/qt/network/gen_qauthenticator.h +++ b/qt/network/gen_qauthenticator.h @@ -22,8 +22,8 @@ typedef struct QAuthenticator QAuthenticator; typedef struct QVariant QVariant; #endif -void QAuthenticator_new(QAuthenticator** outptr_QAuthenticator); -void QAuthenticator_new2(QAuthenticator* other, QAuthenticator** outptr_QAuthenticator); +QAuthenticator* QAuthenticator_new(); +QAuthenticator* QAuthenticator_new2(QAuthenticator* other); void QAuthenticator_OperatorAssign(QAuthenticator* self, QAuthenticator* other); bool QAuthenticator_OperatorEqual(const QAuthenticator* self, QAuthenticator* other); bool QAuthenticator_OperatorNotEqual(const QAuthenticator* self, QAuthenticator* other); diff --git a/qt/network/gen_qdnslookup.cpp b/qt/network/gen_qdnslookup.cpp index 30b9fb67..f5e52a90 100644 --- a/qt/network/gen_qdnslookup.cpp +++ b/qt/network/gen_qdnslookup.cpp @@ -20,14 +20,12 @@ #include "gen_qdnslookup.h" #include "_cgo_export.h" -void QDnsDomainNameRecord_new(QDnsDomainNameRecord** outptr_QDnsDomainNameRecord) { - QDnsDomainNameRecord* ret = new QDnsDomainNameRecord(); - *outptr_QDnsDomainNameRecord = ret; +QDnsDomainNameRecord* QDnsDomainNameRecord_new() { + return new QDnsDomainNameRecord(); } -void QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other, QDnsDomainNameRecord** outptr_QDnsDomainNameRecord) { - QDnsDomainNameRecord* ret = new QDnsDomainNameRecord(*other); - *outptr_QDnsDomainNameRecord = ret; +QDnsDomainNameRecord* QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other) { + return new QDnsDomainNameRecord(*other); } void QDnsDomainNameRecord_OperatorAssign(QDnsDomainNameRecord* self, QDnsDomainNameRecord* other) { @@ -73,14 +71,12 @@ void QDnsDomainNameRecord_Delete(QDnsDomainNameRecord* self, bool isSubclass) { } } -void QDnsHostAddressRecord_new(QDnsHostAddressRecord** outptr_QDnsHostAddressRecord) { - QDnsHostAddressRecord* ret = new QDnsHostAddressRecord(); - *outptr_QDnsHostAddressRecord = ret; +QDnsHostAddressRecord* QDnsHostAddressRecord_new() { + return new QDnsHostAddressRecord(); } -void QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other, QDnsHostAddressRecord** outptr_QDnsHostAddressRecord) { - QDnsHostAddressRecord* ret = new QDnsHostAddressRecord(*other); - *outptr_QDnsHostAddressRecord = ret; +QDnsHostAddressRecord* QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other) { + return new QDnsHostAddressRecord(*other); } void QDnsHostAddressRecord_OperatorAssign(QDnsHostAddressRecord* self, QDnsHostAddressRecord* other) { @@ -119,14 +115,12 @@ void QDnsHostAddressRecord_Delete(QDnsHostAddressRecord* self, bool isSubclass) } } -void QDnsMailExchangeRecord_new(QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord) { - QDnsMailExchangeRecord* ret = new QDnsMailExchangeRecord(); - *outptr_QDnsMailExchangeRecord = ret; +QDnsMailExchangeRecord* QDnsMailExchangeRecord_new() { + return new QDnsMailExchangeRecord(); } -void QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other, QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord) { - QDnsMailExchangeRecord* ret = new QDnsMailExchangeRecord(*other); - *outptr_QDnsMailExchangeRecord = ret; +QDnsMailExchangeRecord* QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other) { + return new QDnsMailExchangeRecord(*other); } void QDnsMailExchangeRecord_OperatorAssign(QDnsMailExchangeRecord* self, QDnsMailExchangeRecord* other) { @@ -177,14 +171,12 @@ void QDnsMailExchangeRecord_Delete(QDnsMailExchangeRecord* self, bool isSubclass } } -void QDnsServiceRecord_new(QDnsServiceRecord** outptr_QDnsServiceRecord) { - QDnsServiceRecord* ret = new QDnsServiceRecord(); - *outptr_QDnsServiceRecord = ret; +QDnsServiceRecord* QDnsServiceRecord_new() { + return new QDnsServiceRecord(); } -void QDnsServiceRecord_new2(QDnsServiceRecord* other, QDnsServiceRecord** outptr_QDnsServiceRecord) { - QDnsServiceRecord* ret = new QDnsServiceRecord(*other); - *outptr_QDnsServiceRecord = ret; +QDnsServiceRecord* QDnsServiceRecord_new2(QDnsServiceRecord* other) { + return new QDnsServiceRecord(*other); } void QDnsServiceRecord_OperatorAssign(QDnsServiceRecord* self, QDnsServiceRecord* other) { @@ -245,14 +237,12 @@ void QDnsServiceRecord_Delete(QDnsServiceRecord* self, bool isSubclass) { } } -void QDnsTextRecord_new(QDnsTextRecord** outptr_QDnsTextRecord) { - QDnsTextRecord* ret = new QDnsTextRecord(); - *outptr_QDnsTextRecord = ret; +QDnsTextRecord* QDnsTextRecord_new() { + return new QDnsTextRecord(); } -void QDnsTextRecord_new2(QDnsTextRecord* other, QDnsTextRecord** outptr_QDnsTextRecord) { - QDnsTextRecord* ret = new QDnsTextRecord(*other); - *outptr_QDnsTextRecord = ret; +QDnsTextRecord* QDnsTextRecord_new2(QDnsTextRecord* other) { + return new QDnsTextRecord(*other); } void QDnsTextRecord_OperatorAssign(QDnsTextRecord* self, QDnsTextRecord* other) { @@ -490,44 +480,36 @@ public: }; -void QDnsLookup_new(QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { - MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(); - *outptr_QDnsLookup = ret; - *outptr_QObject = static_cast(ret); +QDnsLookup* QDnsLookup_new() { + return new MiqtVirtualQDnsLookup(); } -void QDnsLookup_new2(int typeVal, struct miqt_string name, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { +QDnsLookup* QDnsLookup_new2(int typeVal, struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString); - *outptr_QDnsLookup = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString); } -void QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { +QDnsLookup* QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, *nameserver); - *outptr_QDnsLookup = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, *nameserver); } -void QDnsLookup_new4(QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { - MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(parent); - *outptr_QDnsLookup = ret; - *outptr_QObject = static_cast(ret); +QDnsLookup* QDnsLookup_new4(QObject* parent) { + return new MiqtVirtualQDnsLookup(parent); } -void QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { +QDnsLookup* QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, parent); - *outptr_QDnsLookup = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, parent); } -void QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { +QDnsLookup* QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, *nameserver, parent); - *outptr_QDnsLookup = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, *nameserver, parent); +} + +void QDnsLookup_virtbase(QDnsLookup* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QDnsLookup_MetaObject(const QDnsLookup* self) { diff --git a/qt/network/gen_qdnslookup.go b/qt/network/gen_qdnslookup.go index 51ebb5a1..a6dc788f 100644 --- a/qt/network/gen_qdnslookup.go +++ b/qt/network/gen_qdnslookup.go @@ -66,34 +66,27 @@ func newQDnsDomainNameRecord(h *C.QDnsDomainNameRecord) *QDnsDomainNameRecord { if h == nil { return nil } + return &QDnsDomainNameRecord{h: h} } // UnsafeNewQDnsDomainNameRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsDomainNameRecord(h unsafe.Pointer) *QDnsDomainNameRecord { - if h == nil { - return nil - } - - return &QDnsDomainNameRecord{h: (*C.QDnsDomainNameRecord)(h)} + return newQDnsDomainNameRecord((*C.QDnsDomainNameRecord)(h)) } // NewQDnsDomainNameRecord constructs a new QDnsDomainNameRecord object. func NewQDnsDomainNameRecord() *QDnsDomainNameRecord { - var outptr_QDnsDomainNameRecord *C.QDnsDomainNameRecord = nil - C.QDnsDomainNameRecord_new(&outptr_QDnsDomainNameRecord) - ret := newQDnsDomainNameRecord(outptr_QDnsDomainNameRecord) + ret := newQDnsDomainNameRecord(C.QDnsDomainNameRecord_new()) ret.isSubclass = true return ret } // NewQDnsDomainNameRecord2 constructs a new QDnsDomainNameRecord object. func NewQDnsDomainNameRecord2(other *QDnsDomainNameRecord) *QDnsDomainNameRecord { - var outptr_QDnsDomainNameRecord *C.QDnsDomainNameRecord = nil - C.QDnsDomainNameRecord_new2(other.cPointer(), &outptr_QDnsDomainNameRecord) - ret := newQDnsDomainNameRecord(outptr_QDnsDomainNameRecord) + ret := newQDnsDomainNameRecord(C.QDnsDomainNameRecord_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -162,34 +155,27 @@ func newQDnsHostAddressRecord(h *C.QDnsHostAddressRecord) *QDnsHostAddressRecord if h == nil { return nil } + return &QDnsHostAddressRecord{h: h} } // UnsafeNewQDnsHostAddressRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsHostAddressRecord(h unsafe.Pointer) *QDnsHostAddressRecord { - if h == nil { - return nil - } - - return &QDnsHostAddressRecord{h: (*C.QDnsHostAddressRecord)(h)} + return newQDnsHostAddressRecord((*C.QDnsHostAddressRecord)(h)) } // NewQDnsHostAddressRecord constructs a new QDnsHostAddressRecord object. func NewQDnsHostAddressRecord() *QDnsHostAddressRecord { - var outptr_QDnsHostAddressRecord *C.QDnsHostAddressRecord = nil - C.QDnsHostAddressRecord_new(&outptr_QDnsHostAddressRecord) - ret := newQDnsHostAddressRecord(outptr_QDnsHostAddressRecord) + ret := newQDnsHostAddressRecord(C.QDnsHostAddressRecord_new()) ret.isSubclass = true return ret } // NewQDnsHostAddressRecord2 constructs a new QDnsHostAddressRecord object. func NewQDnsHostAddressRecord2(other *QDnsHostAddressRecord) *QDnsHostAddressRecord { - var outptr_QDnsHostAddressRecord *C.QDnsHostAddressRecord = nil - C.QDnsHostAddressRecord_new2(other.cPointer(), &outptr_QDnsHostAddressRecord) - ret := newQDnsHostAddressRecord(outptr_QDnsHostAddressRecord) + ret := newQDnsHostAddressRecord(C.QDnsHostAddressRecord_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -257,34 +243,27 @@ func newQDnsMailExchangeRecord(h *C.QDnsMailExchangeRecord) *QDnsMailExchangeRec if h == nil { return nil } + return &QDnsMailExchangeRecord{h: h} } // UnsafeNewQDnsMailExchangeRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsMailExchangeRecord(h unsafe.Pointer) *QDnsMailExchangeRecord { - if h == nil { - return nil - } - - return &QDnsMailExchangeRecord{h: (*C.QDnsMailExchangeRecord)(h)} + return newQDnsMailExchangeRecord((*C.QDnsMailExchangeRecord)(h)) } // NewQDnsMailExchangeRecord constructs a new QDnsMailExchangeRecord object. func NewQDnsMailExchangeRecord() *QDnsMailExchangeRecord { - var outptr_QDnsMailExchangeRecord *C.QDnsMailExchangeRecord = nil - C.QDnsMailExchangeRecord_new(&outptr_QDnsMailExchangeRecord) - ret := newQDnsMailExchangeRecord(outptr_QDnsMailExchangeRecord) + ret := newQDnsMailExchangeRecord(C.QDnsMailExchangeRecord_new()) ret.isSubclass = true return ret } // NewQDnsMailExchangeRecord2 constructs a new QDnsMailExchangeRecord object. func NewQDnsMailExchangeRecord2(other *QDnsMailExchangeRecord) *QDnsMailExchangeRecord { - var outptr_QDnsMailExchangeRecord *C.QDnsMailExchangeRecord = nil - C.QDnsMailExchangeRecord_new2(other.cPointer(), &outptr_QDnsMailExchangeRecord) - ret := newQDnsMailExchangeRecord(outptr_QDnsMailExchangeRecord) + ret := newQDnsMailExchangeRecord(C.QDnsMailExchangeRecord_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -357,34 +336,27 @@ func newQDnsServiceRecord(h *C.QDnsServiceRecord) *QDnsServiceRecord { if h == nil { return nil } + return &QDnsServiceRecord{h: h} } // UnsafeNewQDnsServiceRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsServiceRecord(h unsafe.Pointer) *QDnsServiceRecord { - if h == nil { - return nil - } - - return &QDnsServiceRecord{h: (*C.QDnsServiceRecord)(h)} + return newQDnsServiceRecord((*C.QDnsServiceRecord)(h)) } // NewQDnsServiceRecord constructs a new QDnsServiceRecord object. func NewQDnsServiceRecord() *QDnsServiceRecord { - var outptr_QDnsServiceRecord *C.QDnsServiceRecord = nil - C.QDnsServiceRecord_new(&outptr_QDnsServiceRecord) - ret := newQDnsServiceRecord(outptr_QDnsServiceRecord) + ret := newQDnsServiceRecord(C.QDnsServiceRecord_new()) ret.isSubclass = true return ret } // NewQDnsServiceRecord2 constructs a new QDnsServiceRecord object. func NewQDnsServiceRecord2(other *QDnsServiceRecord) *QDnsServiceRecord { - var outptr_QDnsServiceRecord *C.QDnsServiceRecord = nil - C.QDnsServiceRecord_new2(other.cPointer(), &outptr_QDnsServiceRecord) - ret := newQDnsServiceRecord(outptr_QDnsServiceRecord) + ret := newQDnsServiceRecord(C.QDnsServiceRecord_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -465,34 +437,27 @@ func newQDnsTextRecord(h *C.QDnsTextRecord) *QDnsTextRecord { if h == nil { return nil } + return &QDnsTextRecord{h: h} } // UnsafeNewQDnsTextRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsTextRecord(h unsafe.Pointer) *QDnsTextRecord { - if h == nil { - return nil - } - - return &QDnsTextRecord{h: (*C.QDnsTextRecord)(h)} + return newQDnsTextRecord((*C.QDnsTextRecord)(h)) } // NewQDnsTextRecord constructs a new QDnsTextRecord object. func NewQDnsTextRecord() *QDnsTextRecord { - var outptr_QDnsTextRecord *C.QDnsTextRecord = nil - C.QDnsTextRecord_new(&outptr_QDnsTextRecord) - ret := newQDnsTextRecord(outptr_QDnsTextRecord) + ret := newQDnsTextRecord(C.QDnsTextRecord_new()) ret.isSubclass = true return ret } // NewQDnsTextRecord2 constructs a new QDnsTextRecord object. func NewQDnsTextRecord2(other *QDnsTextRecord) *QDnsTextRecord { - var outptr_QDnsTextRecord *C.QDnsTextRecord = nil - C.QDnsTextRecord_new2(other.cPointer(), &outptr_QDnsTextRecord) - ret := newQDnsTextRecord(outptr_QDnsTextRecord) + ret := newQDnsTextRecord(C.QDnsTextRecord_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -564,31 +529,26 @@ func (this *QDnsLookup) UnsafePointer() unsafe.Pointer { } // newQDnsLookup constructs the type using only CGO pointers. -func newQDnsLookup(h *C.QDnsLookup, h_QObject *C.QObject) *QDnsLookup { +func newQDnsLookup(h *C.QDnsLookup) *QDnsLookup { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QDnsLookup_virtbase(h, &outptr_QObject) + return &QDnsLookup{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQDnsLookup constructs the type using only unsafe pointers. -func UnsafeNewQDnsLookup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDnsLookup { - if h == nil { - return nil - } - - return &QDnsLookup{h: (*C.QDnsLookup)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQDnsLookup(h unsafe.Pointer) *QDnsLookup { + return newQDnsLookup((*C.QDnsLookup)(h)) } // NewQDnsLookup constructs a new QDnsLookup object. func NewQDnsLookup() *QDnsLookup { - var outptr_QDnsLookup *C.QDnsLookup = nil - var outptr_QObject *C.QObject = nil - C.QDnsLookup_new(&outptr_QDnsLookup, &outptr_QObject) - ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret := newQDnsLookup(C.QDnsLookup_new()) ret.isSubclass = true return ret } @@ -599,11 +559,8 @@ func NewQDnsLookup2(typeVal QDnsLookup__Type, name string) *QDnsLookup { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QDnsLookup *C.QDnsLookup = nil - var outptr_QObject *C.QObject = nil - C.QDnsLookup_new2((C.int)(typeVal), name_ms, &outptr_QDnsLookup, &outptr_QObject) - ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret := newQDnsLookup(C.QDnsLookup_new2((C.int)(typeVal), name_ms)) ret.isSubclass = true return ret } @@ -614,22 +571,16 @@ func NewQDnsLookup3(typeVal QDnsLookup__Type, name string, nameserver *QHostAddr name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QDnsLookup *C.QDnsLookup = nil - var outptr_QObject *C.QObject = nil - C.QDnsLookup_new3((C.int)(typeVal), name_ms, nameserver.cPointer(), &outptr_QDnsLookup, &outptr_QObject) - ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret := newQDnsLookup(C.QDnsLookup_new3((C.int)(typeVal), name_ms, nameserver.cPointer())) ret.isSubclass = true return ret } // NewQDnsLookup4 constructs a new QDnsLookup object. func NewQDnsLookup4(parent *qt.QObject) *QDnsLookup { - var outptr_QDnsLookup *C.QDnsLookup = nil - var outptr_QObject *C.QObject = nil - C.QDnsLookup_new4((*C.QObject)(parent.UnsafePointer()), &outptr_QDnsLookup, &outptr_QObject) - ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret := newQDnsLookup(C.QDnsLookup_new4((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -640,11 +591,8 @@ func NewQDnsLookup5(typeVal QDnsLookup__Type, name string, parent *qt.QObject) * name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QDnsLookup *C.QDnsLookup = nil - var outptr_QObject *C.QObject = nil - C.QDnsLookup_new5((C.int)(typeVal), name_ms, (*C.QObject)(parent.UnsafePointer()), &outptr_QDnsLookup, &outptr_QObject) - ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret := newQDnsLookup(C.QDnsLookup_new5((C.int)(typeVal), name_ms, (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -655,11 +603,8 @@ func NewQDnsLookup6(typeVal QDnsLookup__Type, name string, nameserver *QHostAddr name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QDnsLookup *C.QDnsLookup = nil - var outptr_QObject *C.QObject = nil - C.QDnsLookup_new6((C.int)(typeVal), name_ms, nameserver.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QDnsLookup, &outptr_QObject) - ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret := newQDnsLookup(C.QDnsLookup_new6((C.int)(typeVal), name_ms, nameserver.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1038,7 +983,7 @@ func miqt_exec_callback_QDnsLookup_TimerEvent(self *C.QDnsLookup, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QDnsLookup{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1064,7 +1009,7 @@ func miqt_exec_callback_QDnsLookup_ChildEvent(self *C.QDnsLookup, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QDnsLookup{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/network/gen_qdnslookup.h b/qt/network/gen_qdnslookup.h index 92d499f9..163d57a5 100644 --- a/qt/network/gen_qdnslookup.h +++ b/qt/network/gen_qdnslookup.h @@ -44,8 +44,8 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QDnsDomainNameRecord_new(QDnsDomainNameRecord** outptr_QDnsDomainNameRecord); -void QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other, QDnsDomainNameRecord** outptr_QDnsDomainNameRecord); +QDnsDomainNameRecord* QDnsDomainNameRecord_new(); +QDnsDomainNameRecord* QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other); void QDnsDomainNameRecord_OperatorAssign(QDnsDomainNameRecord* self, QDnsDomainNameRecord* other); void QDnsDomainNameRecord_Swap(QDnsDomainNameRecord* self, QDnsDomainNameRecord* other); struct miqt_string QDnsDomainNameRecord_Name(const QDnsDomainNameRecord* self); @@ -53,8 +53,8 @@ unsigned int QDnsDomainNameRecord_TimeToLive(const QDnsDomainNameRecord* self); struct miqt_string QDnsDomainNameRecord_Value(const QDnsDomainNameRecord* self); void QDnsDomainNameRecord_Delete(QDnsDomainNameRecord* self, bool isSubclass); -void QDnsHostAddressRecord_new(QDnsHostAddressRecord** outptr_QDnsHostAddressRecord); -void QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other, QDnsHostAddressRecord** outptr_QDnsHostAddressRecord); +QDnsHostAddressRecord* QDnsHostAddressRecord_new(); +QDnsHostAddressRecord* QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other); void QDnsHostAddressRecord_OperatorAssign(QDnsHostAddressRecord* self, QDnsHostAddressRecord* other); void QDnsHostAddressRecord_Swap(QDnsHostAddressRecord* self, QDnsHostAddressRecord* other); struct miqt_string QDnsHostAddressRecord_Name(const QDnsHostAddressRecord* self); @@ -62,8 +62,8 @@ unsigned int QDnsHostAddressRecord_TimeToLive(const QDnsHostAddressRecord* self) QHostAddress* QDnsHostAddressRecord_Value(const QDnsHostAddressRecord* self); void QDnsHostAddressRecord_Delete(QDnsHostAddressRecord* self, bool isSubclass); -void QDnsMailExchangeRecord_new(QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord); -void QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other, QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord); +QDnsMailExchangeRecord* QDnsMailExchangeRecord_new(); +QDnsMailExchangeRecord* QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other); void QDnsMailExchangeRecord_OperatorAssign(QDnsMailExchangeRecord* self, QDnsMailExchangeRecord* other); void QDnsMailExchangeRecord_Swap(QDnsMailExchangeRecord* self, QDnsMailExchangeRecord* other); struct miqt_string QDnsMailExchangeRecord_Exchange(const QDnsMailExchangeRecord* self); @@ -72,8 +72,8 @@ uint16_t QDnsMailExchangeRecord_Preference(const QDnsMailExchangeRecord* self); unsigned int QDnsMailExchangeRecord_TimeToLive(const QDnsMailExchangeRecord* self); void QDnsMailExchangeRecord_Delete(QDnsMailExchangeRecord* self, bool isSubclass); -void QDnsServiceRecord_new(QDnsServiceRecord** outptr_QDnsServiceRecord); -void QDnsServiceRecord_new2(QDnsServiceRecord* other, QDnsServiceRecord** outptr_QDnsServiceRecord); +QDnsServiceRecord* QDnsServiceRecord_new(); +QDnsServiceRecord* QDnsServiceRecord_new2(QDnsServiceRecord* other); void QDnsServiceRecord_OperatorAssign(QDnsServiceRecord* self, QDnsServiceRecord* other); void QDnsServiceRecord_Swap(QDnsServiceRecord* self, QDnsServiceRecord* other); struct miqt_string QDnsServiceRecord_Name(const QDnsServiceRecord* self); @@ -84,8 +84,8 @@ unsigned int QDnsServiceRecord_TimeToLive(const QDnsServiceRecord* self); uint16_t QDnsServiceRecord_Weight(const QDnsServiceRecord* self); void QDnsServiceRecord_Delete(QDnsServiceRecord* self, bool isSubclass); -void QDnsTextRecord_new(QDnsTextRecord** outptr_QDnsTextRecord); -void QDnsTextRecord_new2(QDnsTextRecord* other, QDnsTextRecord** outptr_QDnsTextRecord); +QDnsTextRecord* QDnsTextRecord_new(); +QDnsTextRecord* QDnsTextRecord_new2(QDnsTextRecord* other); void QDnsTextRecord_OperatorAssign(QDnsTextRecord* self, QDnsTextRecord* other); void QDnsTextRecord_Swap(QDnsTextRecord* self, QDnsTextRecord* other); struct miqt_string QDnsTextRecord_Name(const QDnsTextRecord* self); @@ -93,12 +93,13 @@ unsigned int QDnsTextRecord_TimeToLive(const QDnsTextRecord* self); struct miqt_array /* of struct miqt_string */ QDnsTextRecord_Values(const QDnsTextRecord* self); void QDnsTextRecord_Delete(QDnsTextRecord* self, bool isSubclass); -void QDnsLookup_new(QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); -void QDnsLookup_new2(int typeVal, struct miqt_string name, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); -void QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); -void QDnsLookup_new4(QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); -void QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); -void QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); +QDnsLookup* QDnsLookup_new(); +QDnsLookup* QDnsLookup_new2(int typeVal, struct miqt_string name); +QDnsLookup* QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver); +QDnsLookup* QDnsLookup_new4(QObject* parent); +QDnsLookup* QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent); +QDnsLookup* QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent); +void QDnsLookup_virtbase(QDnsLookup* src, QObject** outptr_QObject); QMetaObject* QDnsLookup_MetaObject(const QDnsLookup* self); void* QDnsLookup_Metacast(QDnsLookup* self, const char* param1); struct miqt_string QDnsLookup_Tr(const char* s); diff --git a/qt/network/gen_qdtls.cpp b/qt/network/gen_qdtls.cpp index 438e80da..f1ef6fe5 100644 --- a/qt/network/gen_qdtls.cpp +++ b/qt/network/gen_qdtls.cpp @@ -203,16 +203,16 @@ public: }; -void QDtlsClientVerifier_new(QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject) { - MiqtVirtualQDtlsClientVerifier* ret = new MiqtVirtualQDtlsClientVerifier(); - *outptr_QDtlsClientVerifier = ret; - *outptr_QObject = static_cast(ret); +QDtlsClientVerifier* QDtlsClientVerifier_new() { + return new MiqtVirtualQDtlsClientVerifier(); } -void QDtlsClientVerifier_new2(QObject* parent, QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject) { - MiqtVirtualQDtlsClientVerifier* ret = new MiqtVirtualQDtlsClientVerifier(parent); - *outptr_QDtlsClientVerifier = ret; - *outptr_QObject = static_cast(ret); +QDtlsClientVerifier* QDtlsClientVerifier_new2(QObject* parent) { + return new MiqtVirtualQDtlsClientVerifier(parent); +} + +void QDtlsClientVerifier_virtbase(QDtlsClientVerifier* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QDtlsClientVerifier_MetaObject(const QDtlsClientVerifier* self) { @@ -572,16 +572,16 @@ public: }; -void QDtls_new(int mode, QDtls** outptr_QDtls, QObject** outptr_QObject) { - MiqtVirtualQDtls* ret = new MiqtVirtualQDtls(static_cast(mode)); - *outptr_QDtls = ret; - *outptr_QObject = static_cast(ret); +QDtls* QDtls_new(int mode) { + return new MiqtVirtualQDtls(static_cast(mode)); } -void QDtls_new2(int mode, QObject* parent, QDtls** outptr_QDtls, QObject** outptr_QObject) { - MiqtVirtualQDtls* ret = new MiqtVirtualQDtls(static_cast(mode), parent); - *outptr_QDtls = ret; - *outptr_QObject = static_cast(ret); +QDtls* QDtls_new2(int mode, QObject* parent) { + return new MiqtVirtualQDtls(static_cast(mode), parent); +} + +void QDtls_virtbase(QDtls* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QDtls_MetaObject(const QDtls* self) { @@ -905,20 +905,17 @@ void QDtls_Delete(QDtls* self, bool isSubclass) { } } -void QDtlsClientVerifier__GeneratorParameters_new(QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters) { - QDtlsClientVerifier::GeneratorParameters* ret = new QDtlsClientVerifier::GeneratorParameters(); - *outptr_QDtlsClientVerifier__GeneratorParameters = ret; +QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new() { + return new QDtlsClientVerifier::GeneratorParameters(); } -void QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters) { +QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s) { QByteArray s_QByteArray(s.data, s.len); - QDtlsClientVerifier::GeneratorParameters* ret = new QDtlsClientVerifier::GeneratorParameters(static_cast(a), s_QByteArray); - *outptr_QDtlsClientVerifier__GeneratorParameters = ret; + return new QDtlsClientVerifier::GeneratorParameters(static_cast(a), s_QByteArray); } -void QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters) { - QDtlsClientVerifier::GeneratorParameters* ret = new QDtlsClientVerifier::GeneratorParameters(*param1); - *outptr_QDtlsClientVerifier__GeneratorParameters = ret; +QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1) { + return new QDtlsClientVerifier::GeneratorParameters(*param1); } void QDtlsClientVerifier__GeneratorParameters_OperatorAssign(QDtlsClientVerifier__GeneratorParameters* self, QDtlsClientVerifier__GeneratorParameters* param1) { diff --git a/qt/network/gen_qdtls.go b/qt/network/gen_qdtls.go index 5b4d2b65..265496c3 100644 --- a/qt/network/gen_qdtls.go +++ b/qt/network/gen_qdtls.go @@ -59,42 +59,34 @@ func (this *QDtlsClientVerifier) UnsafePointer() unsafe.Pointer { } // newQDtlsClientVerifier constructs the type using only CGO pointers. -func newQDtlsClientVerifier(h *C.QDtlsClientVerifier, h_QObject *C.QObject) *QDtlsClientVerifier { +func newQDtlsClientVerifier(h *C.QDtlsClientVerifier) *QDtlsClientVerifier { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QDtlsClientVerifier_virtbase(h, &outptr_QObject) + return &QDtlsClientVerifier{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQDtlsClientVerifier constructs the type using only unsafe pointers. -func UnsafeNewQDtlsClientVerifier(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDtlsClientVerifier { - if h == nil { - return nil - } - - return &QDtlsClientVerifier{h: (*C.QDtlsClientVerifier)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQDtlsClientVerifier(h unsafe.Pointer) *QDtlsClientVerifier { + return newQDtlsClientVerifier((*C.QDtlsClientVerifier)(h)) } // NewQDtlsClientVerifier constructs a new QDtlsClientVerifier object. func NewQDtlsClientVerifier() *QDtlsClientVerifier { - var outptr_QDtlsClientVerifier *C.QDtlsClientVerifier = nil - var outptr_QObject *C.QObject = nil - C.QDtlsClientVerifier_new(&outptr_QDtlsClientVerifier, &outptr_QObject) - ret := newQDtlsClientVerifier(outptr_QDtlsClientVerifier, outptr_QObject) + ret := newQDtlsClientVerifier(C.QDtlsClientVerifier_new()) ret.isSubclass = true return ret } // NewQDtlsClientVerifier2 constructs a new QDtlsClientVerifier object. func NewQDtlsClientVerifier2(parent *qt.QObject) *QDtlsClientVerifier { - var outptr_QDtlsClientVerifier *C.QDtlsClientVerifier = nil - var outptr_QObject *C.QObject = nil - C.QDtlsClientVerifier_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QDtlsClientVerifier, &outptr_QObject) - ret := newQDtlsClientVerifier(outptr_QDtlsClientVerifier, outptr_QObject) + ret := newQDtlsClientVerifier(C.QDtlsClientVerifier_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -284,7 +276,7 @@ func miqt_exec_callback_QDtlsClientVerifier_TimerEvent(self *C.QDtlsClientVerifi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -310,7 +302,7 @@ func miqt_exec_callback_QDtlsClientVerifier_ChildEvent(self *C.QDtlsClientVerifi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -429,42 +421,34 @@ func (this *QDtls) UnsafePointer() unsafe.Pointer { } // newQDtls constructs the type using only CGO pointers. -func newQDtls(h *C.QDtls, h_QObject *C.QObject) *QDtls { +func newQDtls(h *C.QDtls) *QDtls { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QDtls_virtbase(h, &outptr_QObject) + return &QDtls{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQDtls constructs the type using only unsafe pointers. -func UnsafeNewQDtls(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDtls { - if h == nil { - return nil - } - - return &QDtls{h: (*C.QDtls)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQDtls(h unsafe.Pointer) *QDtls { + return newQDtls((*C.QDtls)(h)) } // NewQDtls constructs a new QDtls object. func NewQDtls(mode QSslSocket__SslMode) *QDtls { - var outptr_QDtls *C.QDtls = nil - var outptr_QObject *C.QObject = nil - C.QDtls_new((C.int)(mode), &outptr_QDtls, &outptr_QObject) - ret := newQDtls(outptr_QDtls, outptr_QObject) + ret := newQDtls(C.QDtls_new((C.int)(mode))) ret.isSubclass = true return ret } // NewQDtls2 constructs a new QDtls object. func NewQDtls2(mode QSslSocket__SslMode, parent *qt.QObject) *QDtls { - var outptr_QDtls *C.QDtls = nil - var outptr_QObject *C.QObject = nil - C.QDtls_new2((C.int)(mode), (*C.QObject)(parent.UnsafePointer()), &outptr_QDtls, &outptr_QObject) - ret := newQDtls(outptr_QDtls, outptr_QObject) + ret := newQDtls(C.QDtls_new2((C.int)(mode), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -820,7 +804,7 @@ func miqt_exec_callback_QDtls_TimerEvent(self *C.QDtls, cb C.intptr_t, event *C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QDtls{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -846,7 +830,7 @@ func miqt_exec_callback_QDtls_ChildEvent(self *C.QDtls, cb C.intptr_t, event *C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QDtls{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -968,24 +952,19 @@ func newQDtlsClientVerifier__GeneratorParameters(h *C.QDtlsClientVerifier__Gener if h == nil { return nil } + return &QDtlsClientVerifier__GeneratorParameters{h: h} } // UnsafeNewQDtlsClientVerifier__GeneratorParameters constructs the type using only unsafe pointers. func UnsafeNewQDtlsClientVerifier__GeneratorParameters(h unsafe.Pointer) *QDtlsClientVerifier__GeneratorParameters { - if h == nil { - return nil - } - - return &QDtlsClientVerifier__GeneratorParameters{h: (*C.QDtlsClientVerifier__GeneratorParameters)(h)} + return newQDtlsClientVerifier__GeneratorParameters((*C.QDtlsClientVerifier__GeneratorParameters)(h)) } // NewQDtlsClientVerifier__GeneratorParameters constructs a new QDtlsClientVerifier::GeneratorParameters object. func NewQDtlsClientVerifier__GeneratorParameters() *QDtlsClientVerifier__GeneratorParameters { - var outptr_QDtlsClientVerifier__GeneratorParameters *C.QDtlsClientVerifier__GeneratorParameters = nil - C.QDtlsClientVerifier__GeneratorParameters_new(&outptr_QDtlsClientVerifier__GeneratorParameters) - ret := newQDtlsClientVerifier__GeneratorParameters(outptr_QDtlsClientVerifier__GeneratorParameters) + ret := newQDtlsClientVerifier__GeneratorParameters(C.QDtlsClientVerifier__GeneratorParameters_new()) ret.isSubclass = true return ret } @@ -995,20 +974,16 @@ func NewQDtlsClientVerifier__GeneratorParameters2(a qt.QCryptographicHash__Algor s_alias := C.struct_miqt_string{} s_alias.data = (*C.char)(unsafe.Pointer(&s[0])) s_alias.len = C.size_t(len(s)) - var outptr_QDtlsClientVerifier__GeneratorParameters *C.QDtlsClientVerifier__GeneratorParameters = nil - C.QDtlsClientVerifier__GeneratorParameters_new2((C.int)(a), s_alias, &outptr_QDtlsClientVerifier__GeneratorParameters) - ret := newQDtlsClientVerifier__GeneratorParameters(outptr_QDtlsClientVerifier__GeneratorParameters) + ret := newQDtlsClientVerifier__GeneratorParameters(C.QDtlsClientVerifier__GeneratorParameters_new2((C.int)(a), s_alias)) ret.isSubclass = true return ret } // NewQDtlsClientVerifier__GeneratorParameters3 constructs a new QDtlsClientVerifier::GeneratorParameters object. func NewQDtlsClientVerifier__GeneratorParameters3(param1 *QDtlsClientVerifier__GeneratorParameters) *QDtlsClientVerifier__GeneratorParameters { - var outptr_QDtlsClientVerifier__GeneratorParameters *C.QDtlsClientVerifier__GeneratorParameters = nil - C.QDtlsClientVerifier__GeneratorParameters_new3(param1.cPointer(), &outptr_QDtlsClientVerifier__GeneratorParameters) - ret := newQDtlsClientVerifier__GeneratorParameters(outptr_QDtlsClientVerifier__GeneratorParameters) + ret := newQDtlsClientVerifier__GeneratorParameters(C.QDtlsClientVerifier__GeneratorParameters_new3(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qdtls.h b/qt/network/gen_qdtls.h index 82b7204d..a4e78067 100644 --- a/qt/network/gen_qdtls.h +++ b/qt/network/gen_qdtls.h @@ -52,8 +52,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QUdpSocket QUdpSocket; #endif -void QDtlsClientVerifier_new(QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject); -void QDtlsClientVerifier_new2(QObject* parent, QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject); +QDtlsClientVerifier* QDtlsClientVerifier_new(); +QDtlsClientVerifier* QDtlsClientVerifier_new2(QObject* parent); +void QDtlsClientVerifier_virtbase(QDtlsClientVerifier* src, QObject** outptr_QObject); QMetaObject* QDtlsClientVerifier_MetaObject(const QDtlsClientVerifier* self); void* QDtlsClientVerifier_Metacast(QDtlsClientVerifier* self, const char* param1); struct miqt_string QDtlsClientVerifier_Tr(const char* s); @@ -84,8 +85,9 @@ void QDtlsClientVerifier_override_virtual_DisconnectNotify(void* self, intptr_t void QDtlsClientVerifier_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QDtlsClientVerifier_Delete(QDtlsClientVerifier* self, bool isSubclass); -void QDtls_new(int mode, QDtls** outptr_QDtls, QObject** outptr_QObject); -void QDtls_new2(int mode, QObject* parent, QDtls** outptr_QDtls, QObject** outptr_QObject); +QDtls* QDtls_new(int mode); +QDtls* QDtls_new2(int mode, QObject* parent); +void QDtls_virtbase(QDtls* src, QObject** outptr_QObject); QMetaObject* QDtls_MetaObject(const QDtls* self); void* QDtls_Metacast(QDtls* self, const char* param1); struct miqt_string QDtls_Tr(const char* s); @@ -143,9 +145,9 @@ void QDtls_override_virtual_DisconnectNotify(void* self, intptr_t slot); void QDtls_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QDtls_Delete(QDtls* self, bool isSubclass); -void QDtlsClientVerifier__GeneratorParameters_new(QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters); -void QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters); -void QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters); +QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new(); +QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s); +QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1); void QDtlsClientVerifier__GeneratorParameters_OperatorAssign(QDtlsClientVerifier__GeneratorParameters* self, QDtlsClientVerifier__GeneratorParameters* param1); void QDtlsClientVerifier__GeneratorParameters_Delete(QDtlsClientVerifier__GeneratorParameters* self, bool isSubclass); diff --git a/qt/network/gen_qhostaddress.cpp b/qt/network/gen_qhostaddress.cpp index eca54008..ecbe9c47 100644 --- a/qt/network/gen_qhostaddress.cpp +++ b/qt/network/gen_qhostaddress.cpp @@ -21,45 +21,37 @@ void QIPv6Address_Delete(QIPv6Address* self, bool isSubclass) { } } -void QHostAddress_new(QHostAddress** outptr_QHostAddress) { - QHostAddress* ret = new QHostAddress(); - *outptr_QHostAddress = ret; +QHostAddress* QHostAddress_new() { + return new QHostAddress(); } -void QHostAddress_new2(unsigned int ip4Addr, QHostAddress** outptr_QHostAddress) { - QHostAddress* ret = new QHostAddress(static_cast(ip4Addr)); - *outptr_QHostAddress = ret; +QHostAddress* QHostAddress_new2(unsigned int ip4Addr) { + return new QHostAddress(static_cast(ip4Addr)); } -void QHostAddress_new3(unsigned char* ip6Addr, QHostAddress** outptr_QHostAddress) { - QHostAddress* ret = new QHostAddress(static_cast(ip6Addr)); - *outptr_QHostAddress = ret; +QHostAddress* QHostAddress_new3(unsigned char* ip6Addr) { + return new QHostAddress(static_cast(ip6Addr)); } -void QHostAddress_new4(const unsigned char* ip6Addr, QHostAddress** outptr_QHostAddress) { - QHostAddress* ret = new QHostAddress(static_cast(ip6Addr)); - *outptr_QHostAddress = ret; +QHostAddress* QHostAddress_new4(const unsigned char* ip6Addr) { + return new QHostAddress(static_cast(ip6Addr)); } -void QHostAddress_new5(QIPv6Address* ip6Addr, QHostAddress** outptr_QHostAddress) { - QHostAddress* ret = new QHostAddress(*ip6Addr); - *outptr_QHostAddress = ret; +QHostAddress* QHostAddress_new5(QIPv6Address* ip6Addr) { + return new QHostAddress(*ip6Addr); } -void QHostAddress_new6(struct miqt_string address, QHostAddress** outptr_QHostAddress) { +QHostAddress* QHostAddress_new6(struct miqt_string address) { QString address_QString = QString::fromUtf8(address.data, address.len); - QHostAddress* ret = new QHostAddress(address_QString); - *outptr_QHostAddress = ret; + return new QHostAddress(address_QString); } -void QHostAddress_new7(QHostAddress* copyVal, QHostAddress** outptr_QHostAddress) { - QHostAddress* ret = new QHostAddress(*copyVal); - *outptr_QHostAddress = ret; +QHostAddress* QHostAddress_new7(QHostAddress* copyVal) { + return new QHostAddress(*copyVal); } -void QHostAddress_new8(int address, QHostAddress** outptr_QHostAddress) { - QHostAddress* ret = new QHostAddress(static_cast(address)); - *outptr_QHostAddress = ret; +QHostAddress* QHostAddress_new8(int address) { + return new QHostAddress(static_cast(address)); } void QHostAddress_OperatorAssign(QHostAddress* self, QHostAddress* other) { diff --git a/qt/network/gen_qhostaddress.go b/qt/network/gen_qhostaddress.go index 12223de5..abfe8e4b 100644 --- a/qt/network/gen_qhostaddress.go +++ b/qt/network/gen_qhostaddress.go @@ -60,16 +60,13 @@ func newQIPv6Address(h *C.QIPv6Address) *QIPv6Address { if h == nil { return nil } + return &QIPv6Address{h: h} } // UnsafeNewQIPv6Address constructs the type using only unsafe pointers. func UnsafeNewQIPv6Address(h unsafe.Pointer) *QIPv6Address { - if h == nil { - return nil - } - - return &QIPv6Address{h: (*C.QIPv6Address)(h)} + return newQIPv6Address((*C.QIPv6Address)(h)) } func (this *QIPv6Address) OperatorSubscript(index int) byte { @@ -114,64 +111,51 @@ func newQHostAddress(h *C.QHostAddress) *QHostAddress { if h == nil { return nil } + return &QHostAddress{h: h} } // UnsafeNewQHostAddress constructs the type using only unsafe pointers. func UnsafeNewQHostAddress(h unsafe.Pointer) *QHostAddress { - if h == nil { - return nil - } - - return &QHostAddress{h: (*C.QHostAddress)(h)} + return newQHostAddress((*C.QHostAddress)(h)) } // NewQHostAddress constructs a new QHostAddress object. func NewQHostAddress() *QHostAddress { - var outptr_QHostAddress *C.QHostAddress = nil - C.QHostAddress_new(&outptr_QHostAddress) - ret := newQHostAddress(outptr_QHostAddress) + ret := newQHostAddress(C.QHostAddress_new()) ret.isSubclass = true return ret } // NewQHostAddress2 constructs a new QHostAddress object. func NewQHostAddress2(ip4Addr uint) *QHostAddress { - var outptr_QHostAddress *C.QHostAddress = nil - C.QHostAddress_new2((C.uint)(ip4Addr), &outptr_QHostAddress) - ret := newQHostAddress(outptr_QHostAddress) + ret := newQHostAddress(C.QHostAddress_new2((C.uint)(ip4Addr))) ret.isSubclass = true return ret } // NewQHostAddress3 constructs a new QHostAddress object. func NewQHostAddress3(ip6Addr *byte) *QHostAddress { - var outptr_QHostAddress *C.QHostAddress = nil - C.QHostAddress_new3((*C.uchar)(unsafe.Pointer(ip6Addr)), &outptr_QHostAddress) - ret := newQHostAddress(outptr_QHostAddress) + ret := newQHostAddress(C.QHostAddress_new3((*C.uchar)(unsafe.Pointer(ip6Addr)))) ret.isSubclass = true return ret } // NewQHostAddress4 constructs a new QHostAddress object. func NewQHostAddress4(ip6Addr *byte) *QHostAddress { - var outptr_QHostAddress *C.QHostAddress = nil - C.QHostAddress_new4((*C.uchar)(unsafe.Pointer(ip6Addr)), &outptr_QHostAddress) - ret := newQHostAddress(outptr_QHostAddress) + ret := newQHostAddress(C.QHostAddress_new4((*C.uchar)(unsafe.Pointer(ip6Addr)))) ret.isSubclass = true return ret } // NewQHostAddress5 constructs a new QHostAddress object. func NewQHostAddress5(ip6Addr *QIPv6Address) *QHostAddress { - var outptr_QHostAddress *C.QHostAddress = nil - C.QHostAddress_new5(ip6Addr.cPointer(), &outptr_QHostAddress) - ret := newQHostAddress(outptr_QHostAddress) + ret := newQHostAddress(C.QHostAddress_new5(ip6Addr.cPointer())) ret.isSubclass = true return ret } @@ -182,30 +166,24 @@ func NewQHostAddress6(address string) *QHostAddress { address_ms.data = C.CString(address) address_ms.len = C.size_t(len(address)) defer C.free(unsafe.Pointer(address_ms.data)) - var outptr_QHostAddress *C.QHostAddress = nil - C.QHostAddress_new6(address_ms, &outptr_QHostAddress) - ret := newQHostAddress(outptr_QHostAddress) + ret := newQHostAddress(C.QHostAddress_new6(address_ms)) ret.isSubclass = true return ret } // NewQHostAddress7 constructs a new QHostAddress object. func NewQHostAddress7(copyVal *QHostAddress) *QHostAddress { - var outptr_QHostAddress *C.QHostAddress = nil - C.QHostAddress_new7(copyVal.cPointer(), &outptr_QHostAddress) - ret := newQHostAddress(outptr_QHostAddress) + ret := newQHostAddress(C.QHostAddress_new7(copyVal.cPointer())) ret.isSubclass = true return ret } // NewQHostAddress8 constructs a new QHostAddress object. func NewQHostAddress8(address QHostAddress__SpecialAddress) *QHostAddress { - var outptr_QHostAddress *C.QHostAddress = nil - C.QHostAddress_new8((C.int)(address), &outptr_QHostAddress) - ret := newQHostAddress(outptr_QHostAddress) + ret := newQHostAddress(C.QHostAddress_new8((C.int)(address))) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qhostaddress.h b/qt/network/gen_qhostaddress.h index 6bb953e9..f4692cf2 100644 --- a/qt/network/gen_qhostaddress.h +++ b/qt/network/gen_qhostaddress.h @@ -25,14 +25,14 @@ typedef struct QIPv6Address QIPv6Address; unsigned char QIPv6Address_OperatorSubscript(const QIPv6Address* self, int index); void QIPv6Address_Delete(QIPv6Address* self, bool isSubclass); -void QHostAddress_new(QHostAddress** outptr_QHostAddress); -void QHostAddress_new2(unsigned int ip4Addr, QHostAddress** outptr_QHostAddress); -void QHostAddress_new3(unsigned char* ip6Addr, QHostAddress** outptr_QHostAddress); -void QHostAddress_new4(const unsigned char* ip6Addr, QHostAddress** outptr_QHostAddress); -void QHostAddress_new5(QIPv6Address* ip6Addr, QHostAddress** outptr_QHostAddress); -void QHostAddress_new6(struct miqt_string address, QHostAddress** outptr_QHostAddress); -void QHostAddress_new7(QHostAddress* copyVal, QHostAddress** outptr_QHostAddress); -void QHostAddress_new8(int address, QHostAddress** outptr_QHostAddress); +QHostAddress* QHostAddress_new(); +QHostAddress* QHostAddress_new2(unsigned int ip4Addr); +QHostAddress* QHostAddress_new3(unsigned char* ip6Addr); +QHostAddress* QHostAddress_new4(const unsigned char* ip6Addr); +QHostAddress* QHostAddress_new5(QIPv6Address* ip6Addr); +QHostAddress* QHostAddress_new6(struct miqt_string address); +QHostAddress* QHostAddress_new7(QHostAddress* copyVal); +QHostAddress* QHostAddress_new8(int address); void QHostAddress_OperatorAssign(QHostAddress* self, QHostAddress* other); void QHostAddress_OperatorAssignWithAddress(QHostAddress* self, struct miqt_string address); void QHostAddress_OperatorAssign2(QHostAddress* self, int address); diff --git a/qt/network/gen_qhostinfo.cpp b/qt/network/gen_qhostinfo.cpp index b614b348..51ec99bc 100644 --- a/qt/network/gen_qhostinfo.cpp +++ b/qt/network/gen_qhostinfo.cpp @@ -8,19 +8,16 @@ #include "gen_qhostinfo.h" #include "_cgo_export.h" -void QHostInfo_new(QHostInfo** outptr_QHostInfo) { - QHostInfo* ret = new QHostInfo(); - *outptr_QHostInfo = ret; +QHostInfo* QHostInfo_new() { + return new QHostInfo(); } -void QHostInfo_new2(QHostInfo* d, QHostInfo** outptr_QHostInfo) { - QHostInfo* ret = new QHostInfo(*d); - *outptr_QHostInfo = ret; +QHostInfo* QHostInfo_new2(QHostInfo* d) { + return new QHostInfo(*d); } -void QHostInfo_new3(int lookupId, QHostInfo** outptr_QHostInfo) { - QHostInfo* ret = new QHostInfo(static_cast(lookupId)); - *outptr_QHostInfo = ret; +QHostInfo* QHostInfo_new3(int lookupId) { + return new QHostInfo(static_cast(lookupId)); } void QHostInfo_OperatorAssign(QHostInfo* self, QHostInfo* d) { diff --git a/qt/network/gen_qhostinfo.go b/qt/network/gen_qhostinfo.go index 9d45d119..bc2392e1 100644 --- a/qt/network/gen_qhostinfo.go +++ b/qt/network/gen_qhostinfo.go @@ -45,44 +45,35 @@ func newQHostInfo(h *C.QHostInfo) *QHostInfo { if h == nil { return nil } + return &QHostInfo{h: h} } // UnsafeNewQHostInfo constructs the type using only unsafe pointers. func UnsafeNewQHostInfo(h unsafe.Pointer) *QHostInfo { - if h == nil { - return nil - } - - return &QHostInfo{h: (*C.QHostInfo)(h)} + return newQHostInfo((*C.QHostInfo)(h)) } // NewQHostInfo constructs a new QHostInfo object. func NewQHostInfo() *QHostInfo { - var outptr_QHostInfo *C.QHostInfo = nil - C.QHostInfo_new(&outptr_QHostInfo) - ret := newQHostInfo(outptr_QHostInfo) + ret := newQHostInfo(C.QHostInfo_new()) ret.isSubclass = true return ret } // NewQHostInfo2 constructs a new QHostInfo object. func NewQHostInfo2(d *QHostInfo) *QHostInfo { - var outptr_QHostInfo *C.QHostInfo = nil - C.QHostInfo_new2(d.cPointer(), &outptr_QHostInfo) - ret := newQHostInfo(outptr_QHostInfo) + ret := newQHostInfo(C.QHostInfo_new2(d.cPointer())) ret.isSubclass = true return ret } // NewQHostInfo3 constructs a new QHostInfo object. func NewQHostInfo3(lookupId int) *QHostInfo { - var outptr_QHostInfo *C.QHostInfo = nil - C.QHostInfo_new3((C.int)(lookupId), &outptr_QHostInfo) - ret := newQHostInfo(outptr_QHostInfo) + ret := newQHostInfo(C.QHostInfo_new3((C.int)(lookupId))) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qhostinfo.h b/qt/network/gen_qhostinfo.h index ea3c4cf2..25ab3e46 100644 --- a/qt/network/gen_qhostinfo.h +++ b/qt/network/gen_qhostinfo.h @@ -22,9 +22,9 @@ typedef struct QHostAddress QHostAddress; typedef struct QHostInfo QHostInfo; #endif -void QHostInfo_new(QHostInfo** outptr_QHostInfo); -void QHostInfo_new2(QHostInfo* d, QHostInfo** outptr_QHostInfo); -void QHostInfo_new3(int lookupId, QHostInfo** outptr_QHostInfo); +QHostInfo* QHostInfo_new(); +QHostInfo* QHostInfo_new2(QHostInfo* d); +QHostInfo* QHostInfo_new3(int lookupId); void QHostInfo_OperatorAssign(QHostInfo* self, QHostInfo* d); void QHostInfo_Swap(QHostInfo* self, QHostInfo* other); struct miqt_string QHostInfo_HostName(const QHostInfo* self); diff --git a/qt/network/gen_qhstspolicy.cpp b/qt/network/gen_qhstspolicy.cpp index 3e78e096..95a2f7ef 100644 --- a/qt/network/gen_qhstspolicy.cpp +++ b/qt/network/gen_qhstspolicy.cpp @@ -7,26 +7,22 @@ #include "gen_qhstspolicy.h" #include "_cgo_export.h" -void QHstsPolicy_new(QHstsPolicy** outptr_QHstsPolicy) { - QHstsPolicy* ret = new QHstsPolicy(); - *outptr_QHstsPolicy = ret; +QHstsPolicy* QHstsPolicy_new() { + return new QHstsPolicy(); } -void QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host, QHstsPolicy** outptr_QHstsPolicy) { +QHstsPolicy* QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host) { QString host_QString = QString::fromUtf8(host.data, host.len); - QHstsPolicy* ret = new QHstsPolicy(*expiry, static_cast(flags), host_QString); - *outptr_QHstsPolicy = ret; + return new QHstsPolicy(*expiry, static_cast(flags), host_QString); } -void QHstsPolicy_new3(QHstsPolicy* rhs, QHstsPolicy** outptr_QHstsPolicy) { - QHstsPolicy* ret = new QHstsPolicy(*rhs); - *outptr_QHstsPolicy = ret; +QHstsPolicy* QHstsPolicy_new3(QHstsPolicy* rhs) { + return new QHstsPolicy(*rhs); } -void QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode, QHstsPolicy** outptr_QHstsPolicy) { +QHstsPolicy* QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode) { QString host_QString = QString::fromUtf8(host.data, host.len); - QHstsPolicy* ret = new QHstsPolicy(*expiry, static_cast(flags), host_QString, static_cast(mode)); - *outptr_QHstsPolicy = ret; + return new QHstsPolicy(*expiry, static_cast(flags), host_QString, static_cast(mode)); } void QHstsPolicy_OperatorAssign(QHstsPolicy* self, QHstsPolicy* rhs) { diff --git a/qt/network/gen_qhstspolicy.go b/qt/network/gen_qhstspolicy.go index 93cdcfa6..7310e010 100644 --- a/qt/network/gen_qhstspolicy.go +++ b/qt/network/gen_qhstspolicy.go @@ -44,24 +44,19 @@ func newQHstsPolicy(h *C.QHstsPolicy) *QHstsPolicy { if h == nil { return nil } + return &QHstsPolicy{h: h} } // UnsafeNewQHstsPolicy constructs the type using only unsafe pointers. func UnsafeNewQHstsPolicy(h unsafe.Pointer) *QHstsPolicy { - if h == nil { - return nil - } - - return &QHstsPolicy{h: (*C.QHstsPolicy)(h)} + return newQHstsPolicy((*C.QHstsPolicy)(h)) } // NewQHstsPolicy constructs a new QHstsPolicy object. func NewQHstsPolicy() *QHstsPolicy { - var outptr_QHstsPolicy *C.QHstsPolicy = nil - C.QHstsPolicy_new(&outptr_QHstsPolicy) - ret := newQHstsPolicy(outptr_QHstsPolicy) + ret := newQHstsPolicy(C.QHstsPolicy_new()) ret.isSubclass = true return ret } @@ -72,20 +67,16 @@ func NewQHstsPolicy2(expiry *qt.QDateTime, flags QHstsPolicy__PolicyFlag, host s host_ms.data = C.CString(host) host_ms.len = C.size_t(len(host)) defer C.free(unsafe.Pointer(host_ms.data)) - var outptr_QHstsPolicy *C.QHstsPolicy = nil - C.QHstsPolicy_new2((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms, &outptr_QHstsPolicy) - ret := newQHstsPolicy(outptr_QHstsPolicy) + ret := newQHstsPolicy(C.QHstsPolicy_new2((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms)) ret.isSubclass = true return ret } // NewQHstsPolicy3 constructs a new QHstsPolicy object. func NewQHstsPolicy3(rhs *QHstsPolicy) *QHstsPolicy { - var outptr_QHstsPolicy *C.QHstsPolicy = nil - C.QHstsPolicy_new3(rhs.cPointer(), &outptr_QHstsPolicy) - ret := newQHstsPolicy(outptr_QHstsPolicy) + ret := newQHstsPolicy(C.QHstsPolicy_new3(rhs.cPointer())) ret.isSubclass = true return ret } @@ -96,10 +87,8 @@ func NewQHstsPolicy4(expiry *qt.QDateTime, flags QHstsPolicy__PolicyFlag, host s host_ms.data = C.CString(host) host_ms.len = C.size_t(len(host)) defer C.free(unsafe.Pointer(host_ms.data)) - var outptr_QHstsPolicy *C.QHstsPolicy = nil - C.QHstsPolicy_new4((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms, (C.int)(mode), &outptr_QHstsPolicy) - ret := newQHstsPolicy(outptr_QHstsPolicy) + ret := newQHstsPolicy(C.QHstsPolicy_new4((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms, (C.int)(mode))) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qhstspolicy.h b/qt/network/gen_qhstspolicy.h index 3d1d2e0a..ee90ed58 100644 --- a/qt/network/gen_qhstspolicy.h +++ b/qt/network/gen_qhstspolicy.h @@ -22,10 +22,10 @@ typedef struct QDateTime QDateTime; typedef struct QHstsPolicy QHstsPolicy; #endif -void QHstsPolicy_new(QHstsPolicy** outptr_QHstsPolicy); -void QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host, QHstsPolicy** outptr_QHstsPolicy); -void QHstsPolicy_new3(QHstsPolicy* rhs, QHstsPolicy** outptr_QHstsPolicy); -void QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode, QHstsPolicy** outptr_QHstsPolicy); +QHstsPolicy* QHstsPolicy_new(); +QHstsPolicy* QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host); +QHstsPolicy* QHstsPolicy_new3(QHstsPolicy* rhs); +QHstsPolicy* QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode); void QHstsPolicy_OperatorAssign(QHstsPolicy* self, QHstsPolicy* rhs); void QHstsPolicy_Swap(QHstsPolicy* self, QHstsPolicy* other); void QHstsPolicy_SetHost(QHstsPolicy* self, struct miqt_string host); diff --git a/qt/network/gen_qhttp2configuration.cpp b/qt/network/gen_qhttp2configuration.cpp index f5f34f85..bced8792 100644 --- a/qt/network/gen_qhttp2configuration.cpp +++ b/qt/network/gen_qhttp2configuration.cpp @@ -3,14 +3,12 @@ #include "gen_qhttp2configuration.h" #include "_cgo_export.h" -void QHttp2Configuration_new(QHttp2Configuration** outptr_QHttp2Configuration) { - QHttp2Configuration* ret = new QHttp2Configuration(); - *outptr_QHttp2Configuration = ret; +QHttp2Configuration* QHttp2Configuration_new() { + return new QHttp2Configuration(); } -void QHttp2Configuration_new2(QHttp2Configuration* other, QHttp2Configuration** outptr_QHttp2Configuration) { - QHttp2Configuration* ret = new QHttp2Configuration(*other); - *outptr_QHttp2Configuration = ret; +QHttp2Configuration* QHttp2Configuration_new2(QHttp2Configuration* other) { + return new QHttp2Configuration(*other); } void QHttp2Configuration_OperatorAssign(QHttp2Configuration* self, QHttp2Configuration* other) { diff --git a/qt/network/gen_qhttp2configuration.go b/qt/network/gen_qhttp2configuration.go index 6610f15d..7bda510f 100644 --- a/qt/network/gen_qhttp2configuration.go +++ b/qt/network/gen_qhttp2configuration.go @@ -37,34 +37,27 @@ func newQHttp2Configuration(h *C.QHttp2Configuration) *QHttp2Configuration { if h == nil { return nil } + return &QHttp2Configuration{h: h} } // UnsafeNewQHttp2Configuration constructs the type using only unsafe pointers. func UnsafeNewQHttp2Configuration(h unsafe.Pointer) *QHttp2Configuration { - if h == nil { - return nil - } - - return &QHttp2Configuration{h: (*C.QHttp2Configuration)(h)} + return newQHttp2Configuration((*C.QHttp2Configuration)(h)) } // NewQHttp2Configuration constructs a new QHttp2Configuration object. func NewQHttp2Configuration() *QHttp2Configuration { - var outptr_QHttp2Configuration *C.QHttp2Configuration = nil - C.QHttp2Configuration_new(&outptr_QHttp2Configuration) - ret := newQHttp2Configuration(outptr_QHttp2Configuration) + ret := newQHttp2Configuration(C.QHttp2Configuration_new()) ret.isSubclass = true return ret } // NewQHttp2Configuration2 constructs a new QHttp2Configuration object. func NewQHttp2Configuration2(other *QHttp2Configuration) *QHttp2Configuration { - var outptr_QHttp2Configuration *C.QHttp2Configuration = nil - C.QHttp2Configuration_new2(other.cPointer(), &outptr_QHttp2Configuration) - ret := newQHttp2Configuration(outptr_QHttp2Configuration) + ret := newQHttp2Configuration(C.QHttp2Configuration_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qhttp2configuration.h b/qt/network/gen_qhttp2configuration.h index 4060867a..8613e111 100644 --- a/qt/network/gen_qhttp2configuration.h +++ b/qt/network/gen_qhttp2configuration.h @@ -20,8 +20,8 @@ class QHttp2Configuration; typedef struct QHttp2Configuration QHttp2Configuration; #endif -void QHttp2Configuration_new(QHttp2Configuration** outptr_QHttp2Configuration); -void QHttp2Configuration_new2(QHttp2Configuration* other, QHttp2Configuration** outptr_QHttp2Configuration); +QHttp2Configuration* QHttp2Configuration_new(); +QHttp2Configuration* QHttp2Configuration_new2(QHttp2Configuration* other); void QHttp2Configuration_OperatorAssign(QHttp2Configuration* self, QHttp2Configuration* other); void QHttp2Configuration_SetServerPushEnabled(QHttp2Configuration* self, bool enable); bool QHttp2Configuration_ServerPushEnabled(const QHttp2Configuration* self); diff --git a/qt/network/gen_qhttpmultipart.cpp b/qt/network/gen_qhttpmultipart.cpp index 92bb71ed..8fd9831d 100644 --- a/qt/network/gen_qhttpmultipart.cpp +++ b/qt/network/gen_qhttpmultipart.cpp @@ -16,14 +16,12 @@ #include "gen_qhttpmultipart.h" #include "_cgo_export.h" -void QHttpPart_new(QHttpPart** outptr_QHttpPart) { - QHttpPart* ret = new QHttpPart(); - *outptr_QHttpPart = ret; +QHttpPart* QHttpPart_new() { + return new QHttpPart(); } -void QHttpPart_new2(QHttpPart* other, QHttpPart** outptr_QHttpPart) { - QHttpPart* ret = new QHttpPart(*other); - *outptr_QHttpPart = ret; +QHttpPart* QHttpPart_new2(QHttpPart* other) { + return new QHttpPart(*other); } void QHttpPart_OperatorAssign(QHttpPart* self, QHttpPart* other) { @@ -252,28 +250,24 @@ public: }; -void QHttpMultiPart_new(QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { - MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(); - *outptr_QHttpMultiPart = ret; - *outptr_QObject = static_cast(ret); +QHttpMultiPart* QHttpMultiPart_new() { + return new MiqtVirtualQHttpMultiPart(); } -void QHttpMultiPart_new2(int contentType, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { - MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(static_cast(contentType)); - *outptr_QHttpMultiPart = ret; - *outptr_QObject = static_cast(ret); +QHttpMultiPart* QHttpMultiPart_new2(int contentType) { + return new MiqtVirtualQHttpMultiPart(static_cast(contentType)); } -void QHttpMultiPart_new3(QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { - MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(parent); - *outptr_QHttpMultiPart = ret; - *outptr_QObject = static_cast(ret); +QHttpMultiPart* QHttpMultiPart_new3(QObject* parent) { + return new MiqtVirtualQHttpMultiPart(parent); } -void QHttpMultiPart_new4(int contentType, QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { - MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(static_cast(contentType), parent); - *outptr_QHttpMultiPart = ret; - *outptr_QObject = static_cast(ret); +QHttpMultiPart* QHttpMultiPart_new4(int contentType, QObject* parent) { + return new MiqtVirtualQHttpMultiPart(static_cast(contentType), parent); +} + +void QHttpMultiPart_virtbase(QHttpMultiPart* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QHttpMultiPart_MetaObject(const QHttpMultiPart* self) { diff --git a/qt/network/gen_qhttpmultipart.go b/qt/network/gen_qhttpmultipart.go index 9dae07b7..8b8609df 100644 --- a/qt/network/gen_qhttpmultipart.go +++ b/qt/network/gen_qhttpmultipart.go @@ -48,34 +48,27 @@ func newQHttpPart(h *C.QHttpPart) *QHttpPart { if h == nil { return nil } + return &QHttpPart{h: h} } // UnsafeNewQHttpPart constructs the type using only unsafe pointers. func UnsafeNewQHttpPart(h unsafe.Pointer) *QHttpPart { - if h == nil { - return nil - } - - return &QHttpPart{h: (*C.QHttpPart)(h)} + return newQHttpPart((*C.QHttpPart)(h)) } // NewQHttpPart constructs a new QHttpPart object. func NewQHttpPart() *QHttpPart { - var outptr_QHttpPart *C.QHttpPart = nil - C.QHttpPart_new(&outptr_QHttpPart) - ret := newQHttpPart(outptr_QHttpPart) + ret := newQHttpPart(C.QHttpPart_new()) ret.isSubclass = true return ret } // NewQHttpPart2 constructs a new QHttpPart object. func NewQHttpPart2(other *QHttpPart) *QHttpPart { - var outptr_QHttpPart *C.QHttpPart = nil - C.QHttpPart_new2(other.cPointer(), &outptr_QHttpPart) - ret := newQHttpPart(outptr_QHttpPart) + ret := newQHttpPart(C.QHttpPart_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -156,64 +149,50 @@ func (this *QHttpMultiPart) UnsafePointer() unsafe.Pointer { } // newQHttpMultiPart constructs the type using only CGO pointers. -func newQHttpMultiPart(h *C.QHttpMultiPart, h_QObject *C.QObject) *QHttpMultiPart { +func newQHttpMultiPart(h *C.QHttpMultiPart) *QHttpMultiPart { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QHttpMultiPart_virtbase(h, &outptr_QObject) + return &QHttpMultiPart{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQHttpMultiPart constructs the type using only unsafe pointers. -func UnsafeNewQHttpMultiPart(h unsafe.Pointer, h_QObject unsafe.Pointer) *QHttpMultiPart { - if h == nil { - return nil - } - - return &QHttpMultiPart{h: (*C.QHttpMultiPart)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQHttpMultiPart(h unsafe.Pointer) *QHttpMultiPart { + return newQHttpMultiPart((*C.QHttpMultiPart)(h)) } // NewQHttpMultiPart constructs a new QHttpMultiPart object. func NewQHttpMultiPart() *QHttpMultiPart { - var outptr_QHttpMultiPart *C.QHttpMultiPart = nil - var outptr_QObject *C.QObject = nil - C.QHttpMultiPart_new(&outptr_QHttpMultiPart, &outptr_QObject) - ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret := newQHttpMultiPart(C.QHttpMultiPart_new()) ret.isSubclass = true return ret } // NewQHttpMultiPart2 constructs a new QHttpMultiPart object. func NewQHttpMultiPart2(contentType QHttpMultiPart__ContentType) *QHttpMultiPart { - var outptr_QHttpMultiPart *C.QHttpMultiPart = nil - var outptr_QObject *C.QObject = nil - C.QHttpMultiPart_new2((C.int)(contentType), &outptr_QHttpMultiPart, &outptr_QObject) - ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret := newQHttpMultiPart(C.QHttpMultiPart_new2((C.int)(contentType))) ret.isSubclass = true return ret } // NewQHttpMultiPart3 constructs a new QHttpMultiPart object. func NewQHttpMultiPart3(parent *qt.QObject) *QHttpMultiPart { - var outptr_QHttpMultiPart *C.QHttpMultiPart = nil - var outptr_QObject *C.QObject = nil - C.QHttpMultiPart_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QHttpMultiPart, &outptr_QObject) - ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret := newQHttpMultiPart(C.QHttpMultiPart_new3((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQHttpMultiPart4 constructs a new QHttpMultiPart object. func NewQHttpMultiPart4(contentType QHttpMultiPart__ContentType, parent *qt.QObject) *QHttpMultiPart { - var outptr_QHttpMultiPart *C.QHttpMultiPart = nil - var outptr_QObject *C.QObject = nil - C.QHttpMultiPart_new4((C.int)(contentType), (*C.QObject)(parent.UnsafePointer()), &outptr_QHttpMultiPart, &outptr_QObject) - ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret := newQHttpMultiPart(C.QHttpMultiPart_new4((C.int)(contentType), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -390,7 +369,7 @@ func miqt_exec_callback_QHttpMultiPart_TimerEvent(self *C.QHttpMultiPart, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QHttpMultiPart{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -416,7 +395,7 @@ func miqt_exec_callback_QHttpMultiPart_ChildEvent(self *C.QHttpMultiPart, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QHttpMultiPart{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/network/gen_qhttpmultipart.h b/qt/network/gen_qhttpmultipart.h index d7e8c173..ab941354 100644 --- a/qt/network/gen_qhttpmultipart.h +++ b/qt/network/gen_qhttpmultipart.h @@ -38,8 +38,8 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -void QHttpPart_new(QHttpPart** outptr_QHttpPart); -void QHttpPart_new2(QHttpPart* other, QHttpPart** outptr_QHttpPart); +QHttpPart* QHttpPart_new(); +QHttpPart* QHttpPart_new2(QHttpPart* other); void QHttpPart_OperatorAssign(QHttpPart* self, QHttpPart* other); void QHttpPart_Swap(QHttpPart* self, QHttpPart* other); bool QHttpPart_OperatorEqual(const QHttpPart* self, QHttpPart* other); @@ -50,10 +50,11 @@ void QHttpPart_SetBody(QHttpPart* self, struct miqt_string body); void QHttpPart_SetBodyDevice(QHttpPart* self, QIODevice* device); void QHttpPart_Delete(QHttpPart* self, bool isSubclass); -void QHttpMultiPart_new(QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); -void QHttpMultiPart_new2(int contentType, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); -void QHttpMultiPart_new3(QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); -void QHttpMultiPart_new4(int contentType, QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); +QHttpMultiPart* QHttpMultiPart_new(); +QHttpMultiPart* QHttpMultiPart_new2(int contentType); +QHttpMultiPart* QHttpMultiPart_new3(QObject* parent); +QHttpMultiPart* QHttpMultiPart_new4(int contentType, QObject* parent); +void QHttpMultiPart_virtbase(QHttpMultiPart* src, QObject** outptr_QObject); QMetaObject* QHttpMultiPart_MetaObject(const QHttpMultiPart* self); void* QHttpMultiPart_Metacast(QHttpMultiPart* self, const char* param1); struct miqt_string QHttpMultiPart_Tr(const char* s); diff --git a/qt/network/gen_qlocalserver.cpp b/qt/network/gen_qlocalserver.cpp index e999f065..9160efc7 100644 --- a/qt/network/gen_qlocalserver.cpp +++ b/qt/network/gen_qlocalserver.cpp @@ -263,16 +263,16 @@ public: }; -void QLocalServer_new(QLocalServer** outptr_QLocalServer, QObject** outptr_QObject) { - MiqtVirtualQLocalServer* ret = new MiqtVirtualQLocalServer(); - *outptr_QLocalServer = ret; - *outptr_QObject = static_cast(ret); +QLocalServer* QLocalServer_new() { + return new MiqtVirtualQLocalServer(); } -void QLocalServer_new2(QObject* parent, QLocalServer** outptr_QLocalServer, QObject** outptr_QObject) { - MiqtVirtualQLocalServer* ret = new MiqtVirtualQLocalServer(parent); - *outptr_QLocalServer = ret; - *outptr_QObject = static_cast(ret); +QLocalServer* QLocalServer_new2(QObject* parent) { + return new MiqtVirtualQLocalServer(parent); +} + +void QLocalServer_virtbase(QLocalServer* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QLocalServer_MetaObject(const QLocalServer* self) { diff --git a/qt/network/gen_qlocalserver.go b/qt/network/gen_qlocalserver.go index f604e0ea..d8e6e89f 100644 --- a/qt/network/gen_qlocalserver.go +++ b/qt/network/gen_qlocalserver.go @@ -46,42 +46,34 @@ func (this *QLocalServer) UnsafePointer() unsafe.Pointer { } // newQLocalServer constructs the type using only CGO pointers. -func newQLocalServer(h *C.QLocalServer, h_QObject *C.QObject) *QLocalServer { +func newQLocalServer(h *C.QLocalServer) *QLocalServer { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QLocalServer_virtbase(h, &outptr_QObject) + return &QLocalServer{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQLocalServer constructs the type using only unsafe pointers. -func UnsafeNewQLocalServer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QLocalServer { - if h == nil { - return nil - } - - return &QLocalServer{h: (*C.QLocalServer)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQLocalServer(h unsafe.Pointer) *QLocalServer { + return newQLocalServer((*C.QLocalServer)(h)) } // NewQLocalServer constructs a new QLocalServer object. func NewQLocalServer() *QLocalServer { - var outptr_QLocalServer *C.QLocalServer = nil - var outptr_QObject *C.QObject = nil - C.QLocalServer_new(&outptr_QLocalServer, &outptr_QObject) - ret := newQLocalServer(outptr_QLocalServer, outptr_QObject) + ret := newQLocalServer(C.QLocalServer_new()) ret.isSubclass = true return ret } // NewQLocalServer2 constructs a new QLocalServer object. func NewQLocalServer2(parent *qt.QObject) *QLocalServer { - var outptr_QLocalServer *C.QLocalServer = nil - var outptr_QObject *C.QObject = nil - C.QLocalServer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QLocalServer, &outptr_QObject) - ret := newQLocalServer(outptr_QLocalServer, outptr_QObject) + ret := newQLocalServer(C.QLocalServer_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -167,7 +159,7 @@ func (this *QLocalServer) MaxPendingConnections() int { } func (this *QLocalServer) NextPendingConnection() *QLocalSocket { - return newQLocalSocket(C.QLocalServer_NextPendingConnection(this.h), nil, nil) + return newQLocalSocket(C.QLocalServer_NextPendingConnection(this.h)) } func (this *QLocalServer) ServerName() string { @@ -295,7 +287,7 @@ func miqt_exec_callback_QLocalServer_HasPendingConnections(self *C.QLocalServer, func (this *QLocalServer) callVirtualBase_NextPendingConnection() *QLocalSocket { - return newQLocalSocket(C.QLocalServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h)), nil, nil) + return newQLocalSocket(C.QLocalServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h))) } func (this *QLocalServer) OnNextPendingConnection(slot func(super func() *QLocalSocket) *QLocalSocket) { @@ -422,7 +414,7 @@ func miqt_exec_callback_QLocalServer_TimerEvent(self *C.QLocalServer, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QLocalServer{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -448,7 +440,7 @@ func miqt_exec_callback_QLocalServer_ChildEvent(self *C.QLocalServer, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QLocalServer{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/network/gen_qlocalserver.h b/qt/network/gen_qlocalserver.h index a0859c11..16ca4a07 100644 --- a/qt/network/gen_qlocalserver.h +++ b/qt/network/gen_qlocalserver.h @@ -34,8 +34,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QLocalServer_new(QLocalServer** outptr_QLocalServer, QObject** outptr_QObject); -void QLocalServer_new2(QObject* parent, QLocalServer** outptr_QLocalServer, QObject** outptr_QObject); +QLocalServer* QLocalServer_new(); +QLocalServer* QLocalServer_new2(QObject* parent); +void QLocalServer_virtbase(QLocalServer* src, QObject** outptr_QObject); QMetaObject* QLocalServer_MetaObject(const QLocalServer* self); void* QLocalServer_Metacast(QLocalServer* self, const char* param1); struct miqt_string QLocalServer_Tr(const char* s); diff --git a/qt/network/gen_qlocalsocket.cpp b/qt/network/gen_qlocalsocket.cpp index c8330e81..fa7ba001 100644 --- a/qt/network/gen_qlocalsocket.cpp +++ b/qt/network/gen_qlocalsocket.cpp @@ -394,18 +394,16 @@ public: }; -void QLocalSocket_new(QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQLocalSocket* ret = new MiqtVirtualQLocalSocket(); - *outptr_QLocalSocket = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QLocalSocket* QLocalSocket_new() { + return new MiqtVirtualQLocalSocket(); } -void QLocalSocket_new2(QObject* parent, QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQLocalSocket* ret = new MiqtVirtualQLocalSocket(parent); - *outptr_QLocalSocket = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QLocalSocket* QLocalSocket_new2(QObject* parent) { + return new MiqtVirtualQLocalSocket(parent); +} + +void QLocalSocket_virtbase(QLocalSocket* src, QIODevice** outptr_QIODevice) { + *outptr_QIODevice = static_cast(src); } QMetaObject* QLocalSocket_MetaObject(const QLocalSocket* self) { diff --git a/qt/network/gen_qlocalsocket.go b/qt/network/gen_qlocalsocket.go index 64f68eef..d7c2b445 100644 --- a/qt/network/gen_qlocalsocket.go +++ b/qt/network/gen_qlocalsocket.go @@ -61,44 +61,34 @@ func (this *QLocalSocket) UnsafePointer() unsafe.Pointer { } // newQLocalSocket constructs the type using only CGO pointers. -func newQLocalSocket(h *C.QLocalSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QLocalSocket { +func newQLocalSocket(h *C.QLocalSocket) *QLocalSocket { if h == nil { return nil } + var outptr_QIODevice *C.QIODevice = nil + C.QLocalSocket_virtbase(h, &outptr_QIODevice) + return &QLocalSocket{h: h, - QIODevice: qt.UnsafeNewQIODevice(unsafe.Pointer(h_QIODevice), unsafe.Pointer(h_QObject))} + QIODevice: qt.UnsafeNewQIODevice(unsafe.Pointer(outptr_QIODevice))} } // UnsafeNewQLocalSocket constructs the type using only unsafe pointers. -func UnsafeNewQLocalSocket(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QLocalSocket { - if h == nil { - return nil - } - - return &QLocalSocket{h: (*C.QLocalSocket)(h), - QIODevice: qt.UnsafeNewQIODevice(h_QIODevice, h_QObject)} +func UnsafeNewQLocalSocket(h unsafe.Pointer) *QLocalSocket { + return newQLocalSocket((*C.QLocalSocket)(h)) } // NewQLocalSocket constructs a new QLocalSocket object. func NewQLocalSocket() *QLocalSocket { - var outptr_QLocalSocket *C.QLocalSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QLocalSocket_new(&outptr_QLocalSocket, &outptr_QIODevice, &outptr_QObject) - ret := newQLocalSocket(outptr_QLocalSocket, outptr_QIODevice, outptr_QObject) + ret := newQLocalSocket(C.QLocalSocket_new()) ret.isSubclass = true return ret } // NewQLocalSocket2 constructs a new QLocalSocket object. func NewQLocalSocket2(parent *qt.QObject) *QLocalSocket { - var outptr_QLocalSocket *C.QLocalSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QLocalSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QLocalSocket, &outptr_QIODevice, &outptr_QObject) - ret := newQLocalSocket(outptr_QLocalSocket, outptr_QIODevice, outptr_QObject) + ret := newQLocalSocket(C.QLocalSocket_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qlocalsocket.h b/qt/network/gen_qlocalsocket.h index e6e9d854..e385bbd3 100644 --- a/qt/network/gen_qlocalsocket.h +++ b/qt/network/gen_qlocalsocket.h @@ -26,8 +26,9 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -void QLocalSocket_new(QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QLocalSocket_new2(QObject* parent, QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +QLocalSocket* QLocalSocket_new(); +QLocalSocket* QLocalSocket_new2(QObject* parent); +void QLocalSocket_virtbase(QLocalSocket* src, QIODevice** outptr_QIODevice); QMetaObject* QLocalSocket_MetaObject(const QLocalSocket* self); void* QLocalSocket_Metacast(QLocalSocket* self, const char* param1); struct miqt_string QLocalSocket_Tr(const char* s); diff --git a/qt/network/gen_qnetworkaccessmanager.cpp b/qt/network/gen_qnetworkaccessmanager.cpp index 7bb31a3b..5eb43cf3 100644 --- a/qt/network/gen_qnetworkaccessmanager.cpp +++ b/qt/network/gen_qnetworkaccessmanager.cpp @@ -237,16 +237,16 @@ public: }; -void QNetworkAccessManager_new(QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject) { - MiqtVirtualQNetworkAccessManager* ret = new MiqtVirtualQNetworkAccessManager(); - *outptr_QNetworkAccessManager = ret; - *outptr_QObject = static_cast(ret); +QNetworkAccessManager* QNetworkAccessManager_new() { + return new MiqtVirtualQNetworkAccessManager(); } -void QNetworkAccessManager_new2(QObject* parent, QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject) { - MiqtVirtualQNetworkAccessManager* ret = new MiqtVirtualQNetworkAccessManager(parent); - *outptr_QNetworkAccessManager = ret; - *outptr_QObject = static_cast(ret); +QNetworkAccessManager* QNetworkAccessManager_new2(QObject* parent) { + return new MiqtVirtualQNetworkAccessManager(parent); +} + +void QNetworkAccessManager_virtbase(QNetworkAccessManager* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QNetworkAccessManager_MetaObject(const QNetworkAccessManager* self) { diff --git a/qt/network/gen_qnetworkaccessmanager.go b/qt/network/gen_qnetworkaccessmanager.go index b5ccd033..ddf10c15 100644 --- a/qt/network/gen_qnetworkaccessmanager.go +++ b/qt/network/gen_qnetworkaccessmanager.go @@ -56,42 +56,34 @@ func (this *QNetworkAccessManager) UnsafePointer() unsafe.Pointer { } // newQNetworkAccessManager constructs the type using only CGO pointers. -func newQNetworkAccessManager(h *C.QNetworkAccessManager, h_QObject *C.QObject) *QNetworkAccessManager { +func newQNetworkAccessManager(h *C.QNetworkAccessManager) *QNetworkAccessManager { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QNetworkAccessManager_virtbase(h, &outptr_QObject) + return &QNetworkAccessManager{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQNetworkAccessManager constructs the type using only unsafe pointers. -func UnsafeNewQNetworkAccessManager(h unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkAccessManager { - if h == nil { - return nil - } - - return &QNetworkAccessManager{h: (*C.QNetworkAccessManager)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQNetworkAccessManager(h unsafe.Pointer) *QNetworkAccessManager { + return newQNetworkAccessManager((*C.QNetworkAccessManager)(h)) } // NewQNetworkAccessManager constructs a new QNetworkAccessManager object. func NewQNetworkAccessManager() *QNetworkAccessManager { - var outptr_QNetworkAccessManager *C.QNetworkAccessManager = nil - var outptr_QObject *C.QObject = nil - C.QNetworkAccessManager_new(&outptr_QNetworkAccessManager, &outptr_QObject) - ret := newQNetworkAccessManager(outptr_QNetworkAccessManager, outptr_QObject) + ret := newQNetworkAccessManager(C.QNetworkAccessManager_new()) ret.isSubclass = true return ret } // NewQNetworkAccessManager2 constructs a new QNetworkAccessManager object. func NewQNetworkAccessManager2(parent *qt.QObject) *QNetworkAccessManager { - var outptr_QNetworkAccessManager *C.QNetworkAccessManager = nil - var outptr_QObject *C.QObject = nil - C.QNetworkAccessManager_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkAccessManager, &outptr_QObject) - ret := newQNetworkAccessManager(outptr_QNetworkAccessManager, outptr_QObject) + ret := newQNetworkAccessManager(C.QNetworkAccessManager_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -164,7 +156,7 @@ func (this *QNetworkAccessManager) SetProxyFactory(factory *QNetworkProxyFactory } func (this *QNetworkAccessManager) Cache() *QAbstractNetworkCache { - return newQAbstractNetworkCache(C.QNetworkAccessManager_Cache(this.h), nil) + return newQAbstractNetworkCache(C.QNetworkAccessManager_Cache(this.h)) } func (this *QNetworkAccessManager) SetCache(cache *QAbstractNetworkCache) { @@ -172,7 +164,7 @@ func (this *QNetworkAccessManager) SetCache(cache *QAbstractNetworkCache) { } func (this *QNetworkAccessManager) CookieJar() *QNetworkCookieJar { - return newQNetworkCookieJar(C.QNetworkAccessManager_CookieJar(this.h), nil) + return newQNetworkCookieJar(C.QNetworkAccessManager_CookieJar(this.h)) } func (this *QNetworkAccessManager) SetCookieJar(cookieJar *QNetworkCookieJar) { @@ -218,44 +210,44 @@ func (this *QNetworkAccessManager) StrictTransportSecurityHosts() []QHstsPolicy } func (this *QNetworkAccessManager) Head(request *QNetworkRequest) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_Head(this.h, request.cPointer()), nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Head(this.h, request.cPointer())) } func (this *QNetworkAccessManager) Get(request *QNetworkRequest) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_Get(this.h, request.cPointer()), nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Get(this.h, request.cPointer())) } func (this *QNetworkAccessManager) Post(request *QNetworkRequest, data *qt.QIODevice) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_Post(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer())), nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Post(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer()))) } func (this *QNetworkAccessManager) Post2(request *QNetworkRequest, data []byte) *QNetworkReply { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - return newQNetworkReply(C.QNetworkAccessManager_Post2(this.h, request.cPointer(), data_alias), nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Post2(this.h, request.cPointer(), data_alias)) } func (this *QNetworkAccessManager) Put(request *QNetworkRequest, data *qt.QIODevice) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_Put(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer())), nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Put(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer()))) } func (this *QNetworkAccessManager) Put2(request *QNetworkRequest, data []byte) *QNetworkReply { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - return newQNetworkReply(C.QNetworkAccessManager_Put2(this.h, request.cPointer(), data_alias), nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Put2(this.h, request.cPointer(), data_alias)) } func (this *QNetworkAccessManager) DeleteResource(request *QNetworkRequest) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_DeleteResource(this.h, request.cPointer()), nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_DeleteResource(this.h, request.cPointer())) } func (this *QNetworkAccessManager) SendCustomRequest(request *QNetworkRequest, verb []byte) *QNetworkReply { verb_alias := C.struct_miqt_string{} verb_alias.data = (*C.char)(unsafe.Pointer(&verb[0])) verb_alias.len = C.size_t(len(verb)) - return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest(this.h, request.cPointer(), verb_alias), nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest(this.h, request.cPointer(), verb_alias)) } func (this *QNetworkAccessManager) SendCustomRequest2(request *QNetworkRequest, verb []byte, data []byte) *QNetworkReply { @@ -265,22 +257,22 @@ func (this *QNetworkAccessManager) SendCustomRequest2(request *QNetworkRequest, data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest2(this.h, request.cPointer(), verb_alias, data_alias), nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest2(this.h, request.cPointer(), verb_alias, data_alias)) } func (this *QNetworkAccessManager) Post3(request *QNetworkRequest, multiPart *QHttpMultiPart) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_Post3(this.h, request.cPointer(), multiPart.cPointer()), nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Post3(this.h, request.cPointer(), multiPart.cPointer())) } func (this *QNetworkAccessManager) Put3(request *QNetworkRequest, multiPart *QHttpMultiPart) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_Put3(this.h, request.cPointer(), multiPart.cPointer()), nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Put3(this.h, request.cPointer(), multiPart.cPointer())) } func (this *QNetworkAccessManager) SendCustomRequest3(request *QNetworkRequest, verb []byte, multiPart *QHttpMultiPart) *QNetworkReply { verb_alias := C.struct_miqt_string{} verb_alias.data = (*C.char)(unsafe.Pointer(&verb[0])) verb_alias.len = C.size_t(len(verb)) - return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest3(this.h, request.cPointer(), verb_alias, multiPart.cPointer()), nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest3(this.h, request.cPointer(), verb_alias, multiPart.cPointer())) } func (this *QNetworkAccessManager) SetConfiguration(config *QNetworkConfiguration) { @@ -396,7 +388,7 @@ func miqt_exec_callback_QNetworkAccessManager_AuthenticationRequired(cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQNetworkReply(reply, nil, nil) + slotval1 := newQNetworkReply(reply) slotval2 := newQAuthenticator(authenticator) @@ -418,7 +410,7 @@ func miqt_exec_callback_QNetworkAccessManager_Finished(cb C.intptr_t, reply *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := newQNetworkReply(reply, nil, nil) + slotval1 := newQNetworkReply(reply) gofunc(slotval1) } @@ -438,7 +430,7 @@ func miqt_exec_callback_QNetworkAccessManager_Encrypted(cb C.intptr_t, reply *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQNetworkReply(reply, nil, nil) + slotval1 := newQNetworkReply(reply) gofunc(slotval1) } @@ -464,7 +456,7 @@ func miqt_exec_callback_QNetworkAccessManager_SslErrors(cb C.intptr_t, reply *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQNetworkReply(reply, nil, nil) + slotval1 := newQNetworkReply(reply) var errors_ma C.struct_miqt_array = errors errors_ret := make([]QSslError, int(errors_ma.len)) @@ -494,7 +486,7 @@ func miqt_exec_callback_QNetworkAccessManager_PreSharedKeyAuthenticationRequired } // Convert all CABI parameters to Go parameters - slotval1 := newQNetworkReply(reply, nil, nil) + slotval1 := newQNetworkReply(reply) slotval2 := newQSslPreSharedKeyAuthenticator(authenticator) @@ -594,7 +586,7 @@ func (this *QNetworkAccessManager) SendCustomRequest32(request *QNetworkRequest, verb_alias := C.struct_miqt_string{} verb_alias.data = (*C.char)(unsafe.Pointer(&verb[0])) verb_alias.len = C.size_t(len(verb)) - return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest32(this.h, request.cPointer(), verb_alias, (*C.QIODevice)(data.UnsafePointer())), nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest32(this.h, request.cPointer(), verb_alias, (*C.QIODevice)(data.UnsafePointer()))) } func (this *QNetworkAccessManager) ConnectToHostEncrypted22(hostName string, port uint16) { @@ -627,7 +619,7 @@ func (this *QNetworkAccessManager) SetTransferTimeout1(timeout int) { func (this *QNetworkAccessManager) callVirtualBase_CreateRequest(op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt.QIODevice) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_virtualbase_CreateRequest(unsafe.Pointer(this.h), (C.int)(op), request.cPointer(), (*C.QIODevice)(outgoingData.UnsafePointer())), nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_virtualbase_CreateRequest(unsafe.Pointer(this.h), (C.int)(op), request.cPointer(), (*C.QIODevice)(outgoingData.UnsafePointer()))) } func (this *QNetworkAccessManager) OnCreateRequest(slot func(super func(op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt.QIODevice) *QNetworkReply, op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt.QIODevice) *QNetworkReply) { @@ -649,7 +641,7 @@ func miqt_exec_callback_QNetworkAccessManager_CreateRequest(self *C.QNetworkAcce slotval2 := newQNetworkRequest(request) - slotval3 := qt.UnsafeNewQIODevice(unsafe.Pointer(outgoingData), nil) + slotval3 := qt.UnsafeNewQIODevice(unsafe.Pointer(outgoingData)) virtualReturn := gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_CreateRequest, slotval1, slotval2, slotval3) @@ -735,7 +727,7 @@ func miqt_exec_callback_QNetworkAccessManager_TimerEvent(self *C.QNetworkAccessM } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -761,7 +753,7 @@ func miqt_exec_callback_QNetworkAccessManager_ChildEvent(self *C.QNetworkAccessM } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/network/gen_qnetworkaccessmanager.h b/qt/network/gen_qnetworkaccessmanager.h index 7f3dca13..271269f5 100644 --- a/qt/network/gen_qnetworkaccessmanager.h +++ b/qt/network/gen_qnetworkaccessmanager.h @@ -60,8 +60,9 @@ typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; typedef struct QTimerEvent QTimerEvent; #endif -void QNetworkAccessManager_new(QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject); -void QNetworkAccessManager_new2(QObject* parent, QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject); +QNetworkAccessManager* QNetworkAccessManager_new(); +QNetworkAccessManager* QNetworkAccessManager_new2(QObject* parent); +void QNetworkAccessManager_virtbase(QNetworkAccessManager* src, QObject** outptr_QObject); QMetaObject* QNetworkAccessManager_MetaObject(const QNetworkAccessManager* self); void* QNetworkAccessManager_Metacast(QNetworkAccessManager* self, const char* param1); struct miqt_string QNetworkAccessManager_Tr(const char* s); diff --git a/qt/network/gen_qnetworkconfigmanager.cpp b/qt/network/gen_qnetworkconfigmanager.cpp index c4170ebb..f1679118 100644 --- a/qt/network/gen_qnetworkconfigmanager.cpp +++ b/qt/network/gen_qnetworkconfigmanager.cpp @@ -195,16 +195,16 @@ public: }; -void QNetworkConfigurationManager_new(QNetworkConfigurationManager** outptr_QNetworkConfigurationManager, QObject** outptr_QObject) { - MiqtVirtualQNetworkConfigurationManager* ret = new MiqtVirtualQNetworkConfigurationManager(); - *outptr_QNetworkConfigurationManager = ret; - *outptr_QObject = static_cast(ret); +QNetworkConfigurationManager* QNetworkConfigurationManager_new() { + return new MiqtVirtualQNetworkConfigurationManager(); } -void QNetworkConfigurationManager_new2(QObject* parent, QNetworkConfigurationManager** outptr_QNetworkConfigurationManager, QObject** outptr_QObject) { - MiqtVirtualQNetworkConfigurationManager* ret = new MiqtVirtualQNetworkConfigurationManager(parent); - *outptr_QNetworkConfigurationManager = ret; - *outptr_QObject = static_cast(ret); +QNetworkConfigurationManager* QNetworkConfigurationManager_new2(QObject* parent) { + return new MiqtVirtualQNetworkConfigurationManager(parent); +} + +void QNetworkConfigurationManager_virtbase(QNetworkConfigurationManager* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QNetworkConfigurationManager_MetaObject(const QNetworkConfigurationManager* self) { diff --git a/qt/network/gen_qnetworkconfigmanager.go b/qt/network/gen_qnetworkconfigmanager.go index b727eb6f..fc21fba8 100644 --- a/qt/network/gen_qnetworkconfigmanager.go +++ b/qt/network/gen_qnetworkconfigmanager.go @@ -48,42 +48,34 @@ func (this *QNetworkConfigurationManager) UnsafePointer() unsafe.Pointer { } // newQNetworkConfigurationManager constructs the type using only CGO pointers. -func newQNetworkConfigurationManager(h *C.QNetworkConfigurationManager, h_QObject *C.QObject) *QNetworkConfigurationManager { +func newQNetworkConfigurationManager(h *C.QNetworkConfigurationManager) *QNetworkConfigurationManager { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QNetworkConfigurationManager_virtbase(h, &outptr_QObject) + return &QNetworkConfigurationManager{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQNetworkConfigurationManager constructs the type using only unsafe pointers. -func UnsafeNewQNetworkConfigurationManager(h unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkConfigurationManager { - if h == nil { - return nil - } - - return &QNetworkConfigurationManager{h: (*C.QNetworkConfigurationManager)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQNetworkConfigurationManager(h unsafe.Pointer) *QNetworkConfigurationManager { + return newQNetworkConfigurationManager((*C.QNetworkConfigurationManager)(h)) } // NewQNetworkConfigurationManager constructs a new QNetworkConfigurationManager object. func NewQNetworkConfigurationManager() *QNetworkConfigurationManager { - var outptr_QNetworkConfigurationManager *C.QNetworkConfigurationManager = nil - var outptr_QObject *C.QObject = nil - C.QNetworkConfigurationManager_new(&outptr_QNetworkConfigurationManager, &outptr_QObject) - ret := newQNetworkConfigurationManager(outptr_QNetworkConfigurationManager, outptr_QObject) + ret := newQNetworkConfigurationManager(C.QNetworkConfigurationManager_new()) ret.isSubclass = true return ret } // NewQNetworkConfigurationManager2 constructs a new QNetworkConfigurationManager object. func NewQNetworkConfigurationManager2(parent *qt.QObject) *QNetworkConfigurationManager { - var outptr_QNetworkConfigurationManager *C.QNetworkConfigurationManager = nil - var outptr_QObject *C.QObject = nil - C.QNetworkConfigurationManager_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkConfigurationManager, &outptr_QObject) - ret := newQNetworkConfigurationManager(outptr_QNetworkConfigurationManager, outptr_QObject) + ret := newQNetworkConfigurationManager(C.QNetworkConfigurationManager_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -387,7 +379,7 @@ func miqt_exec_callback_QNetworkConfigurationManager_TimerEvent(self *C.QNetwork } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QNetworkConfigurationManager{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -413,7 +405,7 @@ func miqt_exec_callback_QNetworkConfigurationManager_ChildEvent(self *C.QNetwork } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QNetworkConfigurationManager{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/network/gen_qnetworkconfigmanager.h b/qt/network/gen_qnetworkconfigmanager.h index e0fcbceb..2268c434 100644 --- a/qt/network/gen_qnetworkconfigmanager.h +++ b/qt/network/gen_qnetworkconfigmanager.h @@ -34,8 +34,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QNetworkConfigurationManager_new(QNetworkConfigurationManager** outptr_QNetworkConfigurationManager, QObject** outptr_QObject); -void QNetworkConfigurationManager_new2(QObject* parent, QNetworkConfigurationManager** outptr_QNetworkConfigurationManager, QObject** outptr_QObject); +QNetworkConfigurationManager* QNetworkConfigurationManager_new(); +QNetworkConfigurationManager* QNetworkConfigurationManager_new2(QObject* parent); +void QNetworkConfigurationManager_virtbase(QNetworkConfigurationManager* src, QObject** outptr_QObject); QMetaObject* QNetworkConfigurationManager_MetaObject(const QNetworkConfigurationManager* self); void* QNetworkConfigurationManager_Metacast(QNetworkConfigurationManager* self, const char* param1); struct miqt_string QNetworkConfigurationManager_Tr(const char* s); diff --git a/qt/network/gen_qnetworkconfiguration.cpp b/qt/network/gen_qnetworkconfiguration.cpp index 387d548d..1f14602a 100644 --- a/qt/network/gen_qnetworkconfiguration.cpp +++ b/qt/network/gen_qnetworkconfiguration.cpp @@ -7,14 +7,12 @@ #include "gen_qnetworkconfiguration.h" #include "_cgo_export.h" -void QNetworkConfiguration_new(QNetworkConfiguration** outptr_QNetworkConfiguration) { - QNetworkConfiguration* ret = new QNetworkConfiguration(); - *outptr_QNetworkConfiguration = ret; +QNetworkConfiguration* QNetworkConfiguration_new() { + return new QNetworkConfiguration(); } -void QNetworkConfiguration_new2(QNetworkConfiguration* other, QNetworkConfiguration** outptr_QNetworkConfiguration) { - QNetworkConfiguration* ret = new QNetworkConfiguration(*other); - *outptr_QNetworkConfiguration = ret; +QNetworkConfiguration* QNetworkConfiguration_new2(QNetworkConfiguration* other) { + return new QNetworkConfiguration(*other); } void QNetworkConfiguration_OperatorAssign(QNetworkConfiguration* self, QNetworkConfiguration* other) { diff --git a/qt/network/gen_qnetworkconfiguration.go b/qt/network/gen_qnetworkconfiguration.go index 92490709..395c685b 100644 --- a/qt/network/gen_qnetworkconfiguration.go +++ b/qt/network/gen_qnetworkconfiguration.go @@ -82,34 +82,27 @@ func newQNetworkConfiguration(h *C.QNetworkConfiguration) *QNetworkConfiguration if h == nil { return nil } + return &QNetworkConfiguration{h: h} } // UnsafeNewQNetworkConfiguration constructs the type using only unsafe pointers. func UnsafeNewQNetworkConfiguration(h unsafe.Pointer) *QNetworkConfiguration { - if h == nil { - return nil - } - - return &QNetworkConfiguration{h: (*C.QNetworkConfiguration)(h)} + return newQNetworkConfiguration((*C.QNetworkConfiguration)(h)) } // NewQNetworkConfiguration constructs a new QNetworkConfiguration object. func NewQNetworkConfiguration() *QNetworkConfiguration { - var outptr_QNetworkConfiguration *C.QNetworkConfiguration = nil - C.QNetworkConfiguration_new(&outptr_QNetworkConfiguration) - ret := newQNetworkConfiguration(outptr_QNetworkConfiguration) + ret := newQNetworkConfiguration(C.QNetworkConfiguration_new()) ret.isSubclass = true return ret } // NewQNetworkConfiguration2 constructs a new QNetworkConfiguration object. func NewQNetworkConfiguration2(other *QNetworkConfiguration) *QNetworkConfiguration { - var outptr_QNetworkConfiguration *C.QNetworkConfiguration = nil - C.QNetworkConfiguration_new2(other.cPointer(), &outptr_QNetworkConfiguration) - ret := newQNetworkConfiguration(outptr_QNetworkConfiguration) + ret := newQNetworkConfiguration(C.QNetworkConfiguration_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qnetworkconfiguration.h b/qt/network/gen_qnetworkconfiguration.h index dcd4c8ea..3b503f3b 100644 --- a/qt/network/gen_qnetworkconfiguration.h +++ b/qt/network/gen_qnetworkconfiguration.h @@ -20,8 +20,8 @@ class QNetworkConfiguration; typedef struct QNetworkConfiguration QNetworkConfiguration; #endif -void QNetworkConfiguration_new(QNetworkConfiguration** outptr_QNetworkConfiguration); -void QNetworkConfiguration_new2(QNetworkConfiguration* other, QNetworkConfiguration** outptr_QNetworkConfiguration); +QNetworkConfiguration* QNetworkConfiguration_new(); +QNetworkConfiguration* QNetworkConfiguration_new2(QNetworkConfiguration* other); void QNetworkConfiguration_OperatorAssign(QNetworkConfiguration* self, QNetworkConfiguration* other); void QNetworkConfiguration_Swap(QNetworkConfiguration* self, QNetworkConfiguration* other); bool QNetworkConfiguration_OperatorEqual(const QNetworkConfiguration* self, QNetworkConfiguration* other); diff --git a/qt/network/gen_qnetworkcookie.cpp b/qt/network/gen_qnetworkcookie.cpp index d77b525c..bf8172d6 100644 --- a/qt/network/gen_qnetworkcookie.cpp +++ b/qt/network/gen_qnetworkcookie.cpp @@ -10,27 +10,23 @@ #include "gen_qnetworkcookie.h" #include "_cgo_export.h" -void QNetworkCookie_new(QNetworkCookie** outptr_QNetworkCookie) { - QNetworkCookie* ret = new QNetworkCookie(); - *outptr_QNetworkCookie = ret; +QNetworkCookie* QNetworkCookie_new() { + return new QNetworkCookie(); } -void QNetworkCookie_new2(QNetworkCookie* other, QNetworkCookie** outptr_QNetworkCookie) { - QNetworkCookie* ret = new QNetworkCookie(*other); - *outptr_QNetworkCookie = ret; +QNetworkCookie* QNetworkCookie_new2(QNetworkCookie* other) { + return new QNetworkCookie(*other); } -void QNetworkCookie_new3(struct miqt_string name, QNetworkCookie** outptr_QNetworkCookie) { +QNetworkCookie* QNetworkCookie_new3(struct miqt_string name) { QByteArray name_QByteArray(name.data, name.len); - QNetworkCookie* ret = new QNetworkCookie(name_QByteArray); - *outptr_QNetworkCookie = ret; + return new QNetworkCookie(name_QByteArray); } -void QNetworkCookie_new4(struct miqt_string name, struct miqt_string value, QNetworkCookie** outptr_QNetworkCookie) { +QNetworkCookie* QNetworkCookie_new4(struct miqt_string name, struct miqt_string value) { QByteArray name_QByteArray(name.data, name.len); QByteArray value_QByteArray(value.data, value.len); - QNetworkCookie* ret = new QNetworkCookie(name_QByteArray, value_QByteArray); - *outptr_QNetworkCookie = ret; + return new QNetworkCookie(name_QByteArray, value_QByteArray); } void QNetworkCookie_OperatorAssign(QNetworkCookie* self, QNetworkCookie* other) { diff --git a/qt/network/gen_qnetworkcookie.go b/qt/network/gen_qnetworkcookie.go index bf6ba2b9..f55b9b66 100644 --- a/qt/network/gen_qnetworkcookie.go +++ b/qt/network/gen_qnetworkcookie.go @@ -45,34 +45,27 @@ func newQNetworkCookie(h *C.QNetworkCookie) *QNetworkCookie { if h == nil { return nil } + return &QNetworkCookie{h: h} } // UnsafeNewQNetworkCookie constructs the type using only unsafe pointers. func UnsafeNewQNetworkCookie(h unsafe.Pointer) *QNetworkCookie { - if h == nil { - return nil - } - - return &QNetworkCookie{h: (*C.QNetworkCookie)(h)} + return newQNetworkCookie((*C.QNetworkCookie)(h)) } // NewQNetworkCookie constructs a new QNetworkCookie object. func NewQNetworkCookie() *QNetworkCookie { - var outptr_QNetworkCookie *C.QNetworkCookie = nil - C.QNetworkCookie_new(&outptr_QNetworkCookie) - ret := newQNetworkCookie(outptr_QNetworkCookie) + ret := newQNetworkCookie(C.QNetworkCookie_new()) ret.isSubclass = true return ret } // NewQNetworkCookie2 constructs a new QNetworkCookie object. func NewQNetworkCookie2(other *QNetworkCookie) *QNetworkCookie { - var outptr_QNetworkCookie *C.QNetworkCookie = nil - C.QNetworkCookie_new2(other.cPointer(), &outptr_QNetworkCookie) - ret := newQNetworkCookie(outptr_QNetworkCookie) + ret := newQNetworkCookie(C.QNetworkCookie_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -82,10 +75,8 @@ func NewQNetworkCookie3(name []byte) *QNetworkCookie { name_alias := C.struct_miqt_string{} name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) name_alias.len = C.size_t(len(name)) - var outptr_QNetworkCookie *C.QNetworkCookie = nil - C.QNetworkCookie_new3(name_alias, &outptr_QNetworkCookie) - ret := newQNetworkCookie(outptr_QNetworkCookie) + ret := newQNetworkCookie(C.QNetworkCookie_new3(name_alias)) ret.isSubclass = true return ret } @@ -98,10 +89,8 @@ func NewQNetworkCookie4(name []byte, value []byte) *QNetworkCookie { value_alias := C.struct_miqt_string{} value_alias.data = (*C.char)(unsafe.Pointer(&value[0])) value_alias.len = C.size_t(len(value)) - var outptr_QNetworkCookie *C.QNetworkCookie = nil - C.QNetworkCookie_new4(name_alias, value_alias, &outptr_QNetworkCookie) - ret := newQNetworkCookie(outptr_QNetworkCookie) + ret := newQNetworkCookie(C.QNetworkCookie_new4(name_alias, value_alias)) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qnetworkcookie.h b/qt/network/gen_qnetworkcookie.h index 02144696..a3755dde 100644 --- a/qt/network/gen_qnetworkcookie.h +++ b/qt/network/gen_qnetworkcookie.h @@ -24,10 +24,10 @@ typedef struct QNetworkCookie QNetworkCookie; typedef struct QUrl QUrl; #endif -void QNetworkCookie_new(QNetworkCookie** outptr_QNetworkCookie); -void QNetworkCookie_new2(QNetworkCookie* other, QNetworkCookie** outptr_QNetworkCookie); -void QNetworkCookie_new3(struct miqt_string name, QNetworkCookie** outptr_QNetworkCookie); -void QNetworkCookie_new4(struct miqt_string name, struct miqt_string value, QNetworkCookie** outptr_QNetworkCookie); +QNetworkCookie* QNetworkCookie_new(); +QNetworkCookie* QNetworkCookie_new2(QNetworkCookie* other); +QNetworkCookie* QNetworkCookie_new3(struct miqt_string name); +QNetworkCookie* QNetworkCookie_new4(struct miqt_string name, struct miqt_string value); void QNetworkCookie_OperatorAssign(QNetworkCookie* self, QNetworkCookie* other); void QNetworkCookie_Swap(QNetworkCookie* self, QNetworkCookie* other); bool QNetworkCookie_OperatorEqual(const QNetworkCookie* self, QNetworkCookie* other); diff --git a/qt/network/gen_qnetworkcookiejar.cpp b/qt/network/gen_qnetworkcookiejar.cpp index 8e621d9c..fe9b1ade 100644 --- a/qt/network/gen_qnetworkcookiejar.cpp +++ b/qt/network/gen_qnetworkcookiejar.cpp @@ -380,16 +380,16 @@ public: }; -void QNetworkCookieJar_new(QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject) { - MiqtVirtualQNetworkCookieJar* ret = new MiqtVirtualQNetworkCookieJar(); - *outptr_QNetworkCookieJar = ret; - *outptr_QObject = static_cast(ret); +QNetworkCookieJar* QNetworkCookieJar_new() { + return new MiqtVirtualQNetworkCookieJar(); } -void QNetworkCookieJar_new2(QObject* parent, QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject) { - MiqtVirtualQNetworkCookieJar* ret = new MiqtVirtualQNetworkCookieJar(parent); - *outptr_QNetworkCookieJar = ret; - *outptr_QObject = static_cast(ret); +QNetworkCookieJar* QNetworkCookieJar_new2(QObject* parent) { + return new MiqtVirtualQNetworkCookieJar(parent); +} + +void QNetworkCookieJar_virtbase(QNetworkCookieJar* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QNetworkCookieJar_MetaObject(const QNetworkCookieJar* self) { diff --git a/qt/network/gen_qnetworkcookiejar.go b/qt/network/gen_qnetworkcookiejar.go index 8aa44361..e1e6ab7b 100644 --- a/qt/network/gen_qnetworkcookiejar.go +++ b/qt/network/gen_qnetworkcookiejar.go @@ -36,42 +36,34 @@ func (this *QNetworkCookieJar) UnsafePointer() unsafe.Pointer { } // newQNetworkCookieJar constructs the type using only CGO pointers. -func newQNetworkCookieJar(h *C.QNetworkCookieJar, h_QObject *C.QObject) *QNetworkCookieJar { +func newQNetworkCookieJar(h *C.QNetworkCookieJar) *QNetworkCookieJar { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QNetworkCookieJar_virtbase(h, &outptr_QObject) + return &QNetworkCookieJar{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQNetworkCookieJar constructs the type using only unsafe pointers. -func UnsafeNewQNetworkCookieJar(h unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkCookieJar { - if h == nil { - return nil - } - - return &QNetworkCookieJar{h: (*C.QNetworkCookieJar)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQNetworkCookieJar(h unsafe.Pointer) *QNetworkCookieJar { + return newQNetworkCookieJar((*C.QNetworkCookieJar)(h)) } // NewQNetworkCookieJar constructs a new QNetworkCookieJar object. func NewQNetworkCookieJar() *QNetworkCookieJar { - var outptr_QNetworkCookieJar *C.QNetworkCookieJar = nil - var outptr_QObject *C.QObject = nil - C.QNetworkCookieJar_new(&outptr_QNetworkCookieJar, &outptr_QObject) - ret := newQNetworkCookieJar(outptr_QNetworkCookieJar, outptr_QObject) + ret := newQNetworkCookieJar(C.QNetworkCookieJar_new()) ret.isSubclass = true return ret } // NewQNetworkCookieJar2 constructs a new QNetworkCookieJar object. func NewQNetworkCookieJar2(parent *qt.QObject) *QNetworkCookieJar { - var outptr_QNetworkCookieJar *C.QNetworkCookieJar = nil - var outptr_QObject *C.QObject = nil - C.QNetworkCookieJar_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkCookieJar, &outptr_QObject) - ret := newQNetworkCookieJar(outptr_QNetworkCookieJar, outptr_QObject) + ret := newQNetworkCookieJar(C.QNetworkCookieJar_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -460,7 +452,7 @@ func miqt_exec_callback_QNetworkCookieJar_TimerEvent(self *C.QNetworkCookieJar, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -486,7 +478,7 @@ func miqt_exec_callback_QNetworkCookieJar_ChildEvent(self *C.QNetworkCookieJar, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/network/gen_qnetworkcookiejar.h b/qt/network/gen_qnetworkcookiejar.h index fa471b03..823c969c 100644 --- a/qt/network/gen_qnetworkcookiejar.h +++ b/qt/network/gen_qnetworkcookiejar.h @@ -36,8 +36,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -void QNetworkCookieJar_new(QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject); -void QNetworkCookieJar_new2(QObject* parent, QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject); +QNetworkCookieJar* QNetworkCookieJar_new(); +QNetworkCookieJar* QNetworkCookieJar_new2(QObject* parent); +void QNetworkCookieJar_virtbase(QNetworkCookieJar* src, QObject** outptr_QObject); QMetaObject* QNetworkCookieJar_MetaObject(const QNetworkCookieJar* self); void* QNetworkCookieJar_Metacast(QNetworkCookieJar* self, const char* param1); struct miqt_string QNetworkCookieJar_Tr(const char* s); diff --git a/qt/network/gen_qnetworkdatagram.cpp b/qt/network/gen_qnetworkdatagram.cpp index 76678bbc..585f47e6 100644 --- a/qt/network/gen_qnetworkdatagram.cpp +++ b/qt/network/gen_qnetworkdatagram.cpp @@ -5,32 +5,27 @@ #include "gen_qnetworkdatagram.h" #include "_cgo_export.h" -void QNetworkDatagram_new(QNetworkDatagram** outptr_QNetworkDatagram) { - QNetworkDatagram* ret = new QNetworkDatagram(); - *outptr_QNetworkDatagram = ret; +QNetworkDatagram* QNetworkDatagram_new() { + return new QNetworkDatagram(); } -void QNetworkDatagram_new2(struct miqt_string data, QNetworkDatagram** outptr_QNetworkDatagram) { +QNetworkDatagram* QNetworkDatagram_new2(struct miqt_string data) { QByteArray data_QByteArray(data.data, data.len); - QNetworkDatagram* ret = new QNetworkDatagram(data_QByteArray); - *outptr_QNetworkDatagram = ret; + return new QNetworkDatagram(data_QByteArray); } -void QNetworkDatagram_new3(QNetworkDatagram* other, QNetworkDatagram** outptr_QNetworkDatagram) { - QNetworkDatagram* ret = new QNetworkDatagram(*other); - *outptr_QNetworkDatagram = ret; +QNetworkDatagram* QNetworkDatagram_new3(QNetworkDatagram* other) { + return new QNetworkDatagram(*other); } -void QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress, QNetworkDatagram** outptr_QNetworkDatagram) { +QNetworkDatagram* QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress) { QByteArray data_QByteArray(data.data, data.len); - QNetworkDatagram* ret = new QNetworkDatagram(data_QByteArray, *destinationAddress); - *outptr_QNetworkDatagram = ret; + return new QNetworkDatagram(data_QByteArray, *destinationAddress); } -void QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port, QNetworkDatagram** outptr_QNetworkDatagram) { +QNetworkDatagram* QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port) { QByteArray data_QByteArray(data.data, data.len); - QNetworkDatagram* ret = new QNetworkDatagram(data_QByteArray, *destinationAddress, static_cast(port)); - *outptr_QNetworkDatagram = ret; + return new QNetworkDatagram(data_QByteArray, *destinationAddress, static_cast(port)); } void QNetworkDatagram_OperatorAssign(QNetworkDatagram* self, QNetworkDatagram* other) { diff --git a/qt/network/gen_qnetworkdatagram.go b/qt/network/gen_qnetworkdatagram.go index e1b4daaa..05caa0d3 100644 --- a/qt/network/gen_qnetworkdatagram.go +++ b/qt/network/gen_qnetworkdatagram.go @@ -37,24 +37,19 @@ func newQNetworkDatagram(h *C.QNetworkDatagram) *QNetworkDatagram { if h == nil { return nil } + return &QNetworkDatagram{h: h} } // UnsafeNewQNetworkDatagram constructs the type using only unsafe pointers. func UnsafeNewQNetworkDatagram(h unsafe.Pointer) *QNetworkDatagram { - if h == nil { - return nil - } - - return &QNetworkDatagram{h: (*C.QNetworkDatagram)(h)} + return newQNetworkDatagram((*C.QNetworkDatagram)(h)) } // NewQNetworkDatagram constructs a new QNetworkDatagram object. func NewQNetworkDatagram() *QNetworkDatagram { - var outptr_QNetworkDatagram *C.QNetworkDatagram = nil - C.QNetworkDatagram_new(&outptr_QNetworkDatagram) - ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret := newQNetworkDatagram(C.QNetworkDatagram_new()) ret.isSubclass = true return ret } @@ -64,20 +59,16 @@ func NewQNetworkDatagram2(data []byte) *QNetworkDatagram { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QNetworkDatagram *C.QNetworkDatagram = nil - C.QNetworkDatagram_new2(data_alias, &outptr_QNetworkDatagram) - ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret := newQNetworkDatagram(C.QNetworkDatagram_new2(data_alias)) ret.isSubclass = true return ret } // NewQNetworkDatagram3 constructs a new QNetworkDatagram object. func NewQNetworkDatagram3(other *QNetworkDatagram) *QNetworkDatagram { - var outptr_QNetworkDatagram *C.QNetworkDatagram = nil - C.QNetworkDatagram_new3(other.cPointer(), &outptr_QNetworkDatagram) - ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret := newQNetworkDatagram(C.QNetworkDatagram_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -87,10 +78,8 @@ func NewQNetworkDatagram4(data []byte, destinationAddress *QHostAddress) *QNetwo data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QNetworkDatagram *C.QNetworkDatagram = nil - C.QNetworkDatagram_new4(data_alias, destinationAddress.cPointer(), &outptr_QNetworkDatagram) - ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret := newQNetworkDatagram(C.QNetworkDatagram_new4(data_alias, destinationAddress.cPointer())) ret.isSubclass = true return ret } @@ -100,10 +89,8 @@ func NewQNetworkDatagram5(data []byte, destinationAddress *QHostAddress, port ui data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QNetworkDatagram *C.QNetworkDatagram = nil - C.QNetworkDatagram_new5(data_alias, destinationAddress.cPointer(), (C.uint16_t)(port), &outptr_QNetworkDatagram) - ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret := newQNetworkDatagram(C.QNetworkDatagram_new5(data_alias, destinationAddress.cPointer(), (C.uint16_t)(port))) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qnetworkdatagram.h b/qt/network/gen_qnetworkdatagram.h index 50f50977..9ecefa5d 100644 --- a/qt/network/gen_qnetworkdatagram.h +++ b/qt/network/gen_qnetworkdatagram.h @@ -22,11 +22,11 @@ typedef struct QHostAddress QHostAddress; typedef struct QNetworkDatagram QNetworkDatagram; #endif -void QNetworkDatagram_new(QNetworkDatagram** outptr_QNetworkDatagram); -void QNetworkDatagram_new2(struct miqt_string data, QNetworkDatagram** outptr_QNetworkDatagram); -void QNetworkDatagram_new3(QNetworkDatagram* other, QNetworkDatagram** outptr_QNetworkDatagram); -void QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress, QNetworkDatagram** outptr_QNetworkDatagram); -void QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port, QNetworkDatagram** outptr_QNetworkDatagram); +QNetworkDatagram* QNetworkDatagram_new(); +QNetworkDatagram* QNetworkDatagram_new2(struct miqt_string data); +QNetworkDatagram* QNetworkDatagram_new3(QNetworkDatagram* other); +QNetworkDatagram* QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress); +QNetworkDatagram* QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port); void QNetworkDatagram_OperatorAssign(QNetworkDatagram* self, QNetworkDatagram* other); void QNetworkDatagram_Swap(QNetworkDatagram* self, QNetworkDatagram* other); void QNetworkDatagram_Clear(QNetworkDatagram* self); diff --git a/qt/network/gen_qnetworkdiskcache.cpp b/qt/network/gen_qnetworkdiskcache.cpp index 79e1f2f8..668c2d87 100644 --- a/qt/network/gen_qnetworkdiskcache.cpp +++ b/qt/network/gen_qnetworkdiskcache.cpp @@ -241,18 +241,16 @@ public: }; -void QNetworkDiskCache_new(QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject) { - MiqtVirtualQNetworkDiskCache* ret = new MiqtVirtualQNetworkDiskCache(); - *outptr_QNetworkDiskCache = ret; - *outptr_QAbstractNetworkCache = static_cast(ret); - *outptr_QObject = static_cast(ret); +QNetworkDiskCache* QNetworkDiskCache_new() { + return new MiqtVirtualQNetworkDiskCache(); } -void QNetworkDiskCache_new2(QObject* parent, QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject) { - MiqtVirtualQNetworkDiskCache* ret = new MiqtVirtualQNetworkDiskCache(parent); - *outptr_QNetworkDiskCache = ret; - *outptr_QAbstractNetworkCache = static_cast(ret); - *outptr_QObject = static_cast(ret); +QNetworkDiskCache* QNetworkDiskCache_new2(QObject* parent) { + return new MiqtVirtualQNetworkDiskCache(parent); +} + +void QNetworkDiskCache_virtbase(QNetworkDiskCache* src, QAbstractNetworkCache** outptr_QAbstractNetworkCache) { + *outptr_QAbstractNetworkCache = static_cast(src); } QMetaObject* QNetworkDiskCache_MetaObject(const QNetworkDiskCache* self) { diff --git a/qt/network/gen_qnetworkdiskcache.go b/qt/network/gen_qnetworkdiskcache.go index 6e1b6fec..9a29da12 100644 --- a/qt/network/gen_qnetworkdiskcache.go +++ b/qt/network/gen_qnetworkdiskcache.go @@ -36,44 +36,34 @@ func (this *QNetworkDiskCache) UnsafePointer() unsafe.Pointer { } // newQNetworkDiskCache constructs the type using only CGO pointers. -func newQNetworkDiskCache(h *C.QNetworkDiskCache, h_QAbstractNetworkCache *C.QAbstractNetworkCache, h_QObject *C.QObject) *QNetworkDiskCache { +func newQNetworkDiskCache(h *C.QNetworkDiskCache) *QNetworkDiskCache { if h == nil { return nil } + var outptr_QAbstractNetworkCache *C.QAbstractNetworkCache = nil + C.QNetworkDiskCache_virtbase(h, &outptr_QAbstractNetworkCache) + return &QNetworkDiskCache{h: h, - QAbstractNetworkCache: newQAbstractNetworkCache(h_QAbstractNetworkCache, h_QObject)} + QAbstractNetworkCache: newQAbstractNetworkCache(outptr_QAbstractNetworkCache)} } // UnsafeNewQNetworkDiskCache constructs the type using only unsafe pointers. -func UnsafeNewQNetworkDiskCache(h unsafe.Pointer, h_QAbstractNetworkCache unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkDiskCache { - if h == nil { - return nil - } - - return &QNetworkDiskCache{h: (*C.QNetworkDiskCache)(h), - QAbstractNetworkCache: UnsafeNewQAbstractNetworkCache(h_QAbstractNetworkCache, h_QObject)} +func UnsafeNewQNetworkDiskCache(h unsafe.Pointer) *QNetworkDiskCache { + return newQNetworkDiskCache((*C.QNetworkDiskCache)(h)) } // NewQNetworkDiskCache constructs a new QNetworkDiskCache object. func NewQNetworkDiskCache() *QNetworkDiskCache { - var outptr_QNetworkDiskCache *C.QNetworkDiskCache = nil - var outptr_QAbstractNetworkCache *C.QAbstractNetworkCache = nil - var outptr_QObject *C.QObject = nil - C.QNetworkDiskCache_new(&outptr_QNetworkDiskCache, &outptr_QAbstractNetworkCache, &outptr_QObject) - ret := newQNetworkDiskCache(outptr_QNetworkDiskCache, outptr_QAbstractNetworkCache, outptr_QObject) + ret := newQNetworkDiskCache(C.QNetworkDiskCache_new()) ret.isSubclass = true return ret } // NewQNetworkDiskCache2 constructs a new QNetworkDiskCache object. func NewQNetworkDiskCache2(parent *qt.QObject) *QNetworkDiskCache { - var outptr_QNetworkDiskCache *C.QNetworkDiskCache = nil - var outptr_QAbstractNetworkCache *C.QAbstractNetworkCache = nil - var outptr_QObject *C.QObject = nil - C.QNetworkDiskCache_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkDiskCache, &outptr_QAbstractNetworkCache, &outptr_QObject) - ret := newQNetworkDiskCache(outptr_QNetworkDiskCache, outptr_QAbstractNetworkCache, outptr_QObject) + ret := newQNetworkDiskCache(C.QNetworkDiskCache_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -144,7 +134,7 @@ func (this *QNetworkDiskCache) UpdateMetaData(metaData *QNetworkCacheMetaData) { } func (this *QNetworkDiskCache) Data(url *qt.QUrl) *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Data(this.h, (*C.QUrl)(url.UnsafePointer()))), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Data(this.h, (*C.QUrl)(url.UnsafePointer())))) } func (this *QNetworkDiskCache) Remove(url *qt.QUrl) bool { @@ -152,7 +142,7 @@ func (this *QNetworkDiskCache) Remove(url *qt.QUrl) bool { } func (this *QNetworkDiskCache) Prepare(metaData *QNetworkCacheMetaData) *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Prepare(this.h, metaData.cPointer())), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Prepare(this.h, metaData.cPointer()))) } func (this *QNetworkDiskCache) Insert(device *qt.QIODevice) { @@ -300,7 +290,7 @@ func miqt_exec_callback_QNetworkDiskCache_UpdateMetaData(self *C.QNetworkDiskCac func (this *QNetworkDiskCache) callVirtualBase_Data(url *qt.QUrl) *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_virtualbase_Data(unsafe.Pointer(this.h), (*C.QUrl)(url.UnsafePointer()))), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_virtualbase_Data(unsafe.Pointer(this.h), (*C.QUrl)(url.UnsafePointer())))) } func (this *QNetworkDiskCache) OnData(slot func(super func(url *qt.QUrl) *qt.QIODevice, url *qt.QUrl) *qt.QIODevice) { @@ -356,7 +346,7 @@ func miqt_exec_callback_QNetworkDiskCache_Remove(self *C.QNetworkDiskCache, cb C func (this *QNetworkDiskCache) callVirtualBase_Prepare(metaData *QNetworkCacheMetaData) *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_virtualbase_Prepare(unsafe.Pointer(this.h), metaData.cPointer())), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_virtualbase_Prepare(unsafe.Pointer(this.h), metaData.cPointer()))) } func (this *QNetworkDiskCache) OnPrepare(slot func(super func(metaData *QNetworkCacheMetaData) *qt.QIODevice, metaData *QNetworkCacheMetaData) *qt.QIODevice) { @@ -402,7 +392,7 @@ func miqt_exec_callback_QNetworkDiskCache_Insert(self *C.QNetworkDiskCache, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQIODevice(unsafe.Pointer(device), nil) + slotval1 := qt.UnsafeNewQIODevice(unsafe.Pointer(device)) gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_Insert, slotval1) diff --git a/qt/network/gen_qnetworkdiskcache.h b/qt/network/gen_qnetworkdiskcache.h index 52433976..a1d8f143 100644 --- a/qt/network/gen_qnetworkdiskcache.h +++ b/qt/network/gen_qnetworkdiskcache.h @@ -32,8 +32,9 @@ typedef struct QObject QObject; typedef struct QUrl QUrl; #endif -void QNetworkDiskCache_new(QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject); -void QNetworkDiskCache_new2(QObject* parent, QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject); +QNetworkDiskCache* QNetworkDiskCache_new(); +QNetworkDiskCache* QNetworkDiskCache_new2(QObject* parent); +void QNetworkDiskCache_virtbase(QNetworkDiskCache* src, QAbstractNetworkCache** outptr_QAbstractNetworkCache); QMetaObject* QNetworkDiskCache_MetaObject(const QNetworkDiskCache* self); void* QNetworkDiskCache_Metacast(QNetworkDiskCache* self, const char* param1); struct miqt_string QNetworkDiskCache_Tr(const char* s); diff --git a/qt/network/gen_qnetworkinterface.cpp b/qt/network/gen_qnetworkinterface.cpp index cc9e0b8d..bfa7c383 100644 --- a/qt/network/gen_qnetworkinterface.cpp +++ b/qt/network/gen_qnetworkinterface.cpp @@ -10,14 +10,12 @@ #include "gen_qnetworkinterface.h" #include "_cgo_export.h" -void QNetworkAddressEntry_new(QNetworkAddressEntry** outptr_QNetworkAddressEntry) { - QNetworkAddressEntry* ret = new QNetworkAddressEntry(); - *outptr_QNetworkAddressEntry = ret; +QNetworkAddressEntry* QNetworkAddressEntry_new() { + return new QNetworkAddressEntry(); } -void QNetworkAddressEntry_new2(QNetworkAddressEntry* other, QNetworkAddressEntry** outptr_QNetworkAddressEntry) { - QNetworkAddressEntry* ret = new QNetworkAddressEntry(*other); - *outptr_QNetworkAddressEntry = ret; +QNetworkAddressEntry* QNetworkAddressEntry_new2(QNetworkAddressEntry* other) { + return new QNetworkAddressEntry(*other); } void QNetworkAddressEntry_OperatorAssign(QNetworkAddressEntry* self, QNetworkAddressEntry* other) { @@ -113,14 +111,12 @@ void QNetworkAddressEntry_Delete(QNetworkAddressEntry* self, bool isSubclass) { } } -void QNetworkInterface_new(QNetworkInterface** outptr_QNetworkInterface) { - QNetworkInterface* ret = new QNetworkInterface(); - *outptr_QNetworkInterface = ret; +QNetworkInterface* QNetworkInterface_new() { + return new QNetworkInterface(); } -void QNetworkInterface_new2(QNetworkInterface* other, QNetworkInterface** outptr_QNetworkInterface) { - QNetworkInterface* ret = new QNetworkInterface(*other); - *outptr_QNetworkInterface = ret; +QNetworkInterface* QNetworkInterface_new2(QNetworkInterface* other) { + return new QNetworkInterface(*other); } void QNetworkInterface_OperatorAssign(QNetworkInterface* self, QNetworkInterface* other) { diff --git a/qt/network/gen_qnetworkinterface.go b/qt/network/gen_qnetworkinterface.go index cc65fd84..4752b33c 100644 --- a/qt/network/gen_qnetworkinterface.go +++ b/qt/network/gen_qnetworkinterface.go @@ -77,34 +77,27 @@ func newQNetworkAddressEntry(h *C.QNetworkAddressEntry) *QNetworkAddressEntry { if h == nil { return nil } + return &QNetworkAddressEntry{h: h} } // UnsafeNewQNetworkAddressEntry constructs the type using only unsafe pointers. func UnsafeNewQNetworkAddressEntry(h unsafe.Pointer) *QNetworkAddressEntry { - if h == nil { - return nil - } - - return &QNetworkAddressEntry{h: (*C.QNetworkAddressEntry)(h)} + return newQNetworkAddressEntry((*C.QNetworkAddressEntry)(h)) } // NewQNetworkAddressEntry constructs a new QNetworkAddressEntry object. func NewQNetworkAddressEntry() *QNetworkAddressEntry { - var outptr_QNetworkAddressEntry *C.QNetworkAddressEntry = nil - C.QNetworkAddressEntry_new(&outptr_QNetworkAddressEntry) - ret := newQNetworkAddressEntry(outptr_QNetworkAddressEntry) + ret := newQNetworkAddressEntry(C.QNetworkAddressEntry_new()) ret.isSubclass = true return ret } // NewQNetworkAddressEntry2 constructs a new QNetworkAddressEntry object. func NewQNetworkAddressEntry2(other *QNetworkAddressEntry) *QNetworkAddressEntry { - var outptr_QNetworkAddressEntry *C.QNetworkAddressEntry = nil - C.QNetworkAddressEntry_new2(other.cPointer(), &outptr_QNetworkAddressEntry) - ret := newQNetworkAddressEntry(outptr_QNetworkAddressEntry) + ret := newQNetworkAddressEntry(C.QNetworkAddressEntry_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -241,34 +234,27 @@ func newQNetworkInterface(h *C.QNetworkInterface) *QNetworkInterface { if h == nil { return nil } + return &QNetworkInterface{h: h} } // UnsafeNewQNetworkInterface constructs the type using only unsafe pointers. func UnsafeNewQNetworkInterface(h unsafe.Pointer) *QNetworkInterface { - if h == nil { - return nil - } - - return &QNetworkInterface{h: (*C.QNetworkInterface)(h)} + return newQNetworkInterface((*C.QNetworkInterface)(h)) } // NewQNetworkInterface constructs a new QNetworkInterface object. func NewQNetworkInterface() *QNetworkInterface { - var outptr_QNetworkInterface *C.QNetworkInterface = nil - C.QNetworkInterface_new(&outptr_QNetworkInterface) - ret := newQNetworkInterface(outptr_QNetworkInterface) + ret := newQNetworkInterface(C.QNetworkInterface_new()) ret.isSubclass = true return ret } // NewQNetworkInterface2 constructs a new QNetworkInterface object. func NewQNetworkInterface2(other *QNetworkInterface) *QNetworkInterface { - var outptr_QNetworkInterface *C.QNetworkInterface = nil - C.QNetworkInterface_new2(other.cPointer(), &outptr_QNetworkInterface) - ret := newQNetworkInterface(outptr_QNetworkInterface) + ret := newQNetworkInterface(C.QNetworkInterface_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qnetworkinterface.h b/qt/network/gen_qnetworkinterface.h index 63d2c311..77ba6be4 100644 --- a/qt/network/gen_qnetworkinterface.h +++ b/qt/network/gen_qnetworkinterface.h @@ -26,8 +26,8 @@ typedef struct QNetworkAddressEntry QNetworkAddressEntry; typedef struct QNetworkInterface QNetworkInterface; #endif -void QNetworkAddressEntry_new(QNetworkAddressEntry** outptr_QNetworkAddressEntry); -void QNetworkAddressEntry_new2(QNetworkAddressEntry* other, QNetworkAddressEntry** outptr_QNetworkAddressEntry); +QNetworkAddressEntry* QNetworkAddressEntry_new(); +QNetworkAddressEntry* QNetworkAddressEntry_new2(QNetworkAddressEntry* other); void QNetworkAddressEntry_OperatorAssign(QNetworkAddressEntry* self, QNetworkAddressEntry* other); void QNetworkAddressEntry_Swap(QNetworkAddressEntry* self, QNetworkAddressEntry* other); bool QNetworkAddressEntry_OperatorEqual(const QNetworkAddressEntry* self, QNetworkAddressEntry* other); @@ -51,8 +51,8 @@ bool QNetworkAddressEntry_IsPermanent(const QNetworkAddressEntry* self); bool QNetworkAddressEntry_IsTemporary(const QNetworkAddressEntry* self); void QNetworkAddressEntry_Delete(QNetworkAddressEntry* self, bool isSubclass); -void QNetworkInterface_new(QNetworkInterface** outptr_QNetworkInterface); -void QNetworkInterface_new2(QNetworkInterface* other, QNetworkInterface** outptr_QNetworkInterface); +QNetworkInterface* QNetworkInterface_new(); +QNetworkInterface* QNetworkInterface_new2(QNetworkInterface* other); void QNetworkInterface_OperatorAssign(QNetworkInterface* self, QNetworkInterface* other); void QNetworkInterface_Swap(QNetworkInterface* self, QNetworkInterface* other); bool QNetworkInterface_IsValid(const QNetworkInterface* self); diff --git a/qt/network/gen_qnetworkproxy.cpp b/qt/network/gen_qnetworkproxy.cpp index f04640fa..61424e93 100644 --- a/qt/network/gen_qnetworkproxy.cpp +++ b/qt/network/gen_qnetworkproxy.cpp @@ -13,108 +13,90 @@ #include "gen_qnetworkproxy.h" #include "_cgo_export.h" -void QNetworkProxyQuery_new(QNetworkProxyQuery** outptr_QNetworkProxyQuery) { - QNetworkProxyQuery* ret = new QNetworkProxyQuery(); - *outptr_QNetworkProxyQuery = ret; +QNetworkProxyQuery* QNetworkProxyQuery_new() { + return new QNetworkProxyQuery(); } -void QNetworkProxyQuery_new2(QUrl* requestUrl, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { - QNetworkProxyQuery* ret = new QNetworkProxyQuery(*requestUrl); - *outptr_QNetworkProxyQuery = ret; +QNetworkProxyQuery* QNetworkProxyQuery_new2(QUrl* requestUrl) { + return new QNetworkProxyQuery(*requestUrl); } -void QNetworkProxyQuery_new3(struct miqt_string hostname, int port, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { +QNetworkProxyQuery* QNetworkProxyQuery_new3(struct miqt_string hostname, int port) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); - QNetworkProxyQuery* ret = new QNetworkProxyQuery(hostname_QString, static_cast(port)); - *outptr_QNetworkProxyQuery = ret; + return new QNetworkProxyQuery(hostname_QString, static_cast(port)); } -void QNetworkProxyQuery_new4(uint16_t bindPort, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { - QNetworkProxyQuery* ret = new QNetworkProxyQuery(static_cast(bindPort)); - *outptr_QNetworkProxyQuery = ret; +QNetworkProxyQuery* QNetworkProxyQuery_new4(uint16_t bindPort) { + return new QNetworkProxyQuery(static_cast(bindPort)); } -void QNetworkProxyQuery_new5(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { - QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, *requestUrl); - *outptr_QNetworkProxyQuery = ret; +QNetworkProxyQuery* QNetworkProxyQuery_new5(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl) { + return new QNetworkProxyQuery(*networkConfiguration, *requestUrl); } -void QNetworkProxyQuery_new6(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { +QNetworkProxyQuery* QNetworkProxyQuery_new6(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); - QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, hostname_QString, static_cast(port)); - *outptr_QNetworkProxyQuery = ret; + return new QNetworkProxyQuery(*networkConfiguration, hostname_QString, static_cast(port)); } -void QNetworkProxyQuery_new7(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { - QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, static_cast(bindPort)); - *outptr_QNetworkProxyQuery = ret; +QNetworkProxyQuery* QNetworkProxyQuery_new7(QNetworkConfiguration* networkConfiguration, uint16_t bindPort) { + return new QNetworkProxyQuery(*networkConfiguration, static_cast(bindPort)); } -void QNetworkProxyQuery_new8(QNetworkProxyQuery* other, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { - QNetworkProxyQuery* ret = new QNetworkProxyQuery(*other); - *outptr_QNetworkProxyQuery = ret; +QNetworkProxyQuery* QNetworkProxyQuery_new8(QNetworkProxyQuery* other) { + return new QNetworkProxyQuery(*other); } -void QNetworkProxyQuery_new9(QUrl* requestUrl, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { - QNetworkProxyQuery* ret = new QNetworkProxyQuery(*requestUrl, static_cast(queryType)); - *outptr_QNetworkProxyQuery = ret; +QNetworkProxyQuery* QNetworkProxyQuery_new9(QUrl* requestUrl, int queryType) { + return new QNetworkProxyQuery(*requestUrl, static_cast(queryType)); } -void QNetworkProxyQuery_new10(struct miqt_string hostname, int port, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { +QNetworkProxyQuery* QNetworkProxyQuery_new10(struct miqt_string hostname, int port, struct miqt_string protocolTag) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - QNetworkProxyQuery* ret = new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString); - *outptr_QNetworkProxyQuery = ret; + return new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString); } -void QNetworkProxyQuery_new11(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { +QNetworkProxyQuery* QNetworkProxyQuery_new11(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - QNetworkProxyQuery* ret = new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString, static_cast(queryType)); - *outptr_QNetworkProxyQuery = ret; + return new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString, static_cast(queryType)); } -void QNetworkProxyQuery_new12(uint16_t bindPort, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { +QNetworkProxyQuery* QNetworkProxyQuery_new12(uint16_t bindPort, struct miqt_string protocolTag) { QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - QNetworkProxyQuery* ret = new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString); - *outptr_QNetworkProxyQuery = ret; + return new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString); } -void QNetworkProxyQuery_new13(uint16_t bindPort, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { +QNetworkProxyQuery* QNetworkProxyQuery_new13(uint16_t bindPort, struct miqt_string protocolTag, int queryType) { QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - QNetworkProxyQuery* ret = new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString, static_cast(queryType)); - *outptr_QNetworkProxyQuery = ret; + return new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString, static_cast(queryType)); } -void QNetworkProxyQuery_new14(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { - QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, *requestUrl, static_cast(queryType)); - *outptr_QNetworkProxyQuery = ret; +QNetworkProxyQuery* QNetworkProxyQuery_new14(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl, int queryType) { + return new QNetworkProxyQuery(*networkConfiguration, *requestUrl, static_cast(queryType)); } -void QNetworkProxyQuery_new15(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { +QNetworkProxyQuery* QNetworkProxyQuery_new15(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, hostname_QString, static_cast(port), protocolTag_QString); - *outptr_QNetworkProxyQuery = ret; + return new QNetworkProxyQuery(*networkConfiguration, hostname_QString, static_cast(port), protocolTag_QString); } -void QNetworkProxyQuery_new16(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { +QNetworkProxyQuery* QNetworkProxyQuery_new16(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, hostname_QString, static_cast(port), protocolTag_QString, static_cast(queryType)); - *outptr_QNetworkProxyQuery = ret; + return new QNetworkProxyQuery(*networkConfiguration, hostname_QString, static_cast(port), protocolTag_QString, static_cast(queryType)); } -void QNetworkProxyQuery_new17(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { +QNetworkProxyQuery* QNetworkProxyQuery_new17(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag) { QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, static_cast(bindPort), protocolTag_QString); - *outptr_QNetworkProxyQuery = ret; + return new QNetworkProxyQuery(*networkConfiguration, static_cast(bindPort), protocolTag_QString); } -void QNetworkProxyQuery_new18(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { +QNetworkProxyQuery* QNetworkProxyQuery_new18(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag, int queryType) { QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - QNetworkProxyQuery* ret = new QNetworkProxyQuery(*networkConfiguration, static_cast(bindPort), protocolTag_QString, static_cast(queryType)); - *outptr_QNetworkProxyQuery = ret; + return new QNetworkProxyQuery(*networkConfiguration, static_cast(bindPort), protocolTag_QString, static_cast(queryType)); } void QNetworkProxyQuery_OperatorAssign(QNetworkProxyQuery* self, QNetworkProxyQuery* other) { @@ -214,46 +196,39 @@ void QNetworkProxyQuery_Delete(QNetworkProxyQuery* self, bool isSubclass) { } } -void QNetworkProxy_new(QNetworkProxy** outptr_QNetworkProxy) { - QNetworkProxy* ret = new QNetworkProxy(); - *outptr_QNetworkProxy = ret; +QNetworkProxy* QNetworkProxy_new() { + return new QNetworkProxy(); } -void QNetworkProxy_new2(int typeVal, QNetworkProxy** outptr_QNetworkProxy) { - QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal)); - *outptr_QNetworkProxy = ret; +QNetworkProxy* QNetworkProxy_new2(int typeVal) { + return new QNetworkProxy(static_cast(typeVal)); } -void QNetworkProxy_new3(QNetworkProxy* other, QNetworkProxy** outptr_QNetworkProxy) { - QNetworkProxy* ret = new QNetworkProxy(*other); - *outptr_QNetworkProxy = ret; +QNetworkProxy* QNetworkProxy_new3(QNetworkProxy* other) { + return new QNetworkProxy(*other); } -void QNetworkProxy_new4(int typeVal, struct miqt_string hostName, QNetworkProxy** outptr_QNetworkProxy) { +QNetworkProxy* QNetworkProxy_new4(int typeVal, struct miqt_string hostName) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString); - *outptr_QNetworkProxy = ret; + return new QNetworkProxy(static_cast(typeVal), hostName_QString); } -void QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port, QNetworkProxy** outptr_QNetworkProxy) { +QNetworkProxy* QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port)); - *outptr_QNetworkProxy = ret; + return new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port)); } -void QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, QNetworkProxy** outptr_QNetworkProxy) { +QNetworkProxy* QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); QString user_QString = QString::fromUtf8(user.data, user.len); - QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString); - *outptr_QNetworkProxy = ret; + return new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString); } -void QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password, QNetworkProxy** outptr_QNetworkProxy) { +QNetworkProxy* QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); QString user_QString = QString::fromUtf8(user.data, user.len); QString password_QString = QString::fromUtf8(password.data, password.len); - QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString, password_QString); - *outptr_QNetworkProxy = ret; + return new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString, password_QString); } void QNetworkProxy_OperatorAssign(QNetworkProxy* self, QNetworkProxy* other) { @@ -451,9 +426,8 @@ public: }; -void QNetworkProxyFactory_new(QNetworkProxyFactory** outptr_QNetworkProxyFactory) { - MiqtVirtualQNetworkProxyFactory* ret = new MiqtVirtualQNetworkProxyFactory(); - *outptr_QNetworkProxyFactory = ret; +QNetworkProxyFactory* QNetworkProxyFactory_new() { + return new MiqtVirtualQNetworkProxyFactory(); } struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy(QNetworkProxyFactory* self, QNetworkProxyQuery* query) { diff --git a/qt/network/gen_qnetworkproxy.go b/qt/network/gen_qnetworkproxy.go index 8e03ae26..9aa05fff 100644 --- a/qt/network/gen_qnetworkproxy.go +++ b/qt/network/gen_qnetworkproxy.go @@ -73,34 +73,27 @@ func newQNetworkProxyQuery(h *C.QNetworkProxyQuery) *QNetworkProxyQuery { if h == nil { return nil } + return &QNetworkProxyQuery{h: h} } // UnsafeNewQNetworkProxyQuery constructs the type using only unsafe pointers. func UnsafeNewQNetworkProxyQuery(h unsafe.Pointer) *QNetworkProxyQuery { - if h == nil { - return nil - } - - return &QNetworkProxyQuery{h: (*C.QNetworkProxyQuery)(h)} + return newQNetworkProxyQuery((*C.QNetworkProxyQuery)(h)) } // NewQNetworkProxyQuery constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery() *QNetworkProxyQuery { - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new(&outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new()) ret.isSubclass = true return ret } // NewQNetworkProxyQuery2 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery2(requestUrl *qt.QUrl) *QNetworkProxyQuery { - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new2((*C.QUrl)(requestUrl.UnsafePointer()), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new2((*C.QUrl)(requestUrl.UnsafePointer()))) ret.isSubclass = true return ret } @@ -111,30 +104,24 @@ func NewQNetworkProxyQuery3(hostname string, port int) *QNetworkProxyQuery { hostname_ms.data = C.CString(hostname) hostname_ms.len = C.size_t(len(hostname)) defer C.free(unsafe.Pointer(hostname_ms.data)) - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new3(hostname_ms, (C.int)(port), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new3(hostname_ms, (C.int)(port))) ret.isSubclass = true return ret } // NewQNetworkProxyQuery4 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery4(bindPort uint16) *QNetworkProxyQuery { - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new4((C.uint16_t)(bindPort), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new4((C.uint16_t)(bindPort))) ret.isSubclass = true return ret } // NewQNetworkProxyQuery5 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery5(networkConfiguration *QNetworkConfiguration, requestUrl *qt.QUrl) *QNetworkProxyQuery { - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new5(networkConfiguration.cPointer(), (*C.QUrl)(requestUrl.UnsafePointer()), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new5(networkConfiguration.cPointer(), (*C.QUrl)(requestUrl.UnsafePointer()))) ret.isSubclass = true return ret } @@ -145,40 +132,32 @@ func NewQNetworkProxyQuery6(networkConfiguration *QNetworkConfiguration, hostnam hostname_ms.data = C.CString(hostname) hostname_ms.len = C.size_t(len(hostname)) defer C.free(unsafe.Pointer(hostname_ms.data)) - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new6(networkConfiguration.cPointer(), hostname_ms, (C.int)(port), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new6(networkConfiguration.cPointer(), hostname_ms, (C.int)(port))) ret.isSubclass = true return ret } // NewQNetworkProxyQuery7 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery7(networkConfiguration *QNetworkConfiguration, bindPort uint16) *QNetworkProxyQuery { - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new7(networkConfiguration.cPointer(), (C.uint16_t)(bindPort), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new7(networkConfiguration.cPointer(), (C.uint16_t)(bindPort))) ret.isSubclass = true return ret } // NewQNetworkProxyQuery8 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery8(other *QNetworkProxyQuery) *QNetworkProxyQuery { - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new8(other.cPointer(), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new8(other.cPointer())) ret.isSubclass = true return ret } // NewQNetworkProxyQuery9 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery9(requestUrl *qt.QUrl, queryType QNetworkProxyQuery__QueryType) *QNetworkProxyQuery { - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new9((*C.QUrl)(requestUrl.UnsafePointer()), (C.int)(queryType), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new9((*C.QUrl)(requestUrl.UnsafePointer()), (C.int)(queryType))) ret.isSubclass = true return ret } @@ -193,10 +172,8 @@ func NewQNetworkProxyQuery10(hostname string, port int, protocolTag string) *QNe protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new10(hostname_ms, (C.int)(port), protocolTag_ms, &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new10(hostname_ms, (C.int)(port), protocolTag_ms)) ret.isSubclass = true return ret } @@ -211,10 +188,8 @@ func NewQNetworkProxyQuery11(hostname string, port int, protocolTag string, quer protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new11(hostname_ms, (C.int)(port), protocolTag_ms, (C.int)(queryType), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new11(hostname_ms, (C.int)(port), protocolTag_ms, (C.int)(queryType))) ret.isSubclass = true return ret } @@ -225,10 +200,8 @@ func NewQNetworkProxyQuery12(bindPort uint16, protocolTag string) *QNetworkProxy protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new12((C.uint16_t)(bindPort), protocolTag_ms, &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new12((C.uint16_t)(bindPort), protocolTag_ms)) ret.isSubclass = true return ret } @@ -239,20 +212,16 @@ func NewQNetworkProxyQuery13(bindPort uint16, protocolTag string, queryType QNet protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new13((C.uint16_t)(bindPort), protocolTag_ms, (C.int)(queryType), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new13((C.uint16_t)(bindPort), protocolTag_ms, (C.int)(queryType))) ret.isSubclass = true return ret } // NewQNetworkProxyQuery14 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery14(networkConfiguration *QNetworkConfiguration, requestUrl *qt.QUrl, queryType QNetworkProxyQuery__QueryType) *QNetworkProxyQuery { - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new14(networkConfiguration.cPointer(), (*C.QUrl)(requestUrl.UnsafePointer()), (C.int)(queryType), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new14(networkConfiguration.cPointer(), (*C.QUrl)(requestUrl.UnsafePointer()), (C.int)(queryType))) ret.isSubclass = true return ret } @@ -267,10 +236,8 @@ func NewQNetworkProxyQuery15(networkConfiguration *QNetworkConfiguration, hostna protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new15(networkConfiguration.cPointer(), hostname_ms, (C.int)(port), protocolTag_ms, &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new15(networkConfiguration.cPointer(), hostname_ms, (C.int)(port), protocolTag_ms)) ret.isSubclass = true return ret } @@ -285,10 +252,8 @@ func NewQNetworkProxyQuery16(networkConfiguration *QNetworkConfiguration, hostna protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new16(networkConfiguration.cPointer(), hostname_ms, (C.int)(port), protocolTag_ms, (C.int)(queryType), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new16(networkConfiguration.cPointer(), hostname_ms, (C.int)(port), protocolTag_ms, (C.int)(queryType))) ret.isSubclass = true return ret } @@ -299,10 +264,8 @@ func NewQNetworkProxyQuery17(networkConfiguration *QNetworkConfiguration, bindPo protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new17(networkConfiguration.cPointer(), (C.uint16_t)(bindPort), protocolTag_ms, &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new17(networkConfiguration.cPointer(), (C.uint16_t)(bindPort), protocolTag_ms)) ret.isSubclass = true return ret } @@ -313,10 +276,8 @@ func NewQNetworkProxyQuery18(networkConfiguration *QNetworkConfiguration, bindPo protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new18(networkConfiguration.cPointer(), (C.uint16_t)(bindPort), protocolTag_ms, (C.int)(queryType), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new18(networkConfiguration.cPointer(), (C.uint16_t)(bindPort), protocolTag_ms, (C.int)(queryType))) ret.isSubclass = true return ret } @@ -449,44 +410,35 @@ func newQNetworkProxy(h *C.QNetworkProxy) *QNetworkProxy { if h == nil { return nil } + return &QNetworkProxy{h: h} } // UnsafeNewQNetworkProxy constructs the type using only unsafe pointers. func UnsafeNewQNetworkProxy(h unsafe.Pointer) *QNetworkProxy { - if h == nil { - return nil - } - - return &QNetworkProxy{h: (*C.QNetworkProxy)(h)} + return newQNetworkProxy((*C.QNetworkProxy)(h)) } // NewQNetworkProxy constructs a new QNetworkProxy object. func NewQNetworkProxy() *QNetworkProxy { - var outptr_QNetworkProxy *C.QNetworkProxy = nil - C.QNetworkProxy_new(&outptr_QNetworkProxy) - ret := newQNetworkProxy(outptr_QNetworkProxy) + ret := newQNetworkProxy(C.QNetworkProxy_new()) ret.isSubclass = true return ret } // NewQNetworkProxy2 constructs a new QNetworkProxy object. func NewQNetworkProxy2(typeVal QNetworkProxy__ProxyType) *QNetworkProxy { - var outptr_QNetworkProxy *C.QNetworkProxy = nil - C.QNetworkProxy_new2((C.int)(typeVal), &outptr_QNetworkProxy) - ret := newQNetworkProxy(outptr_QNetworkProxy) + ret := newQNetworkProxy(C.QNetworkProxy_new2((C.int)(typeVal))) ret.isSubclass = true return ret } // NewQNetworkProxy3 constructs a new QNetworkProxy object. func NewQNetworkProxy3(other *QNetworkProxy) *QNetworkProxy { - var outptr_QNetworkProxy *C.QNetworkProxy = nil - C.QNetworkProxy_new3(other.cPointer(), &outptr_QNetworkProxy) - ret := newQNetworkProxy(outptr_QNetworkProxy) + ret := newQNetworkProxy(C.QNetworkProxy_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -497,10 +449,8 @@ func NewQNetworkProxy4(typeVal QNetworkProxy__ProxyType, hostName string) *QNetw hostName_ms.data = C.CString(hostName) hostName_ms.len = C.size_t(len(hostName)) defer C.free(unsafe.Pointer(hostName_ms.data)) - var outptr_QNetworkProxy *C.QNetworkProxy = nil - C.QNetworkProxy_new4((C.int)(typeVal), hostName_ms, &outptr_QNetworkProxy) - ret := newQNetworkProxy(outptr_QNetworkProxy) + ret := newQNetworkProxy(C.QNetworkProxy_new4((C.int)(typeVal), hostName_ms)) ret.isSubclass = true return ret } @@ -511,10 +461,8 @@ func NewQNetworkProxy5(typeVal QNetworkProxy__ProxyType, hostName string, port u hostName_ms.data = C.CString(hostName) hostName_ms.len = C.size_t(len(hostName)) defer C.free(unsafe.Pointer(hostName_ms.data)) - var outptr_QNetworkProxy *C.QNetworkProxy = nil - C.QNetworkProxy_new5((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), &outptr_QNetworkProxy) - ret := newQNetworkProxy(outptr_QNetworkProxy) + ret := newQNetworkProxy(C.QNetworkProxy_new5((C.int)(typeVal), hostName_ms, (C.uint16_t)(port))) ret.isSubclass = true return ret } @@ -529,10 +477,8 @@ func NewQNetworkProxy6(typeVal QNetworkProxy__ProxyType, hostName string, port u user_ms.data = C.CString(user) user_ms.len = C.size_t(len(user)) defer C.free(unsafe.Pointer(user_ms.data)) - var outptr_QNetworkProxy *C.QNetworkProxy = nil - C.QNetworkProxy_new6((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms, &outptr_QNetworkProxy) - ret := newQNetworkProxy(outptr_QNetworkProxy) + ret := newQNetworkProxy(C.QNetworkProxy_new6((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms)) ret.isSubclass = true return ret } @@ -551,10 +497,8 @@ func NewQNetworkProxy7(typeVal QNetworkProxy__ProxyType, hostName string, port u password_ms.data = C.CString(password) password_ms.len = C.size_t(len(password)) defer C.free(unsafe.Pointer(password_ms.data)) - var outptr_QNetworkProxy *C.QNetworkProxy = nil - C.QNetworkProxy_new7((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms, password_ms, &outptr_QNetworkProxy) - ret := newQNetworkProxy(outptr_QNetworkProxy) + ret := newQNetworkProxy(C.QNetworkProxy_new7((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms, password_ms)) ret.isSubclass = true return ret } @@ -750,24 +694,19 @@ func newQNetworkProxyFactory(h *C.QNetworkProxyFactory) *QNetworkProxyFactory { if h == nil { return nil } + return &QNetworkProxyFactory{h: h} } // UnsafeNewQNetworkProxyFactory constructs the type using only unsafe pointers. func UnsafeNewQNetworkProxyFactory(h unsafe.Pointer) *QNetworkProxyFactory { - if h == nil { - return nil - } - - return &QNetworkProxyFactory{h: (*C.QNetworkProxyFactory)(h)} + return newQNetworkProxyFactory((*C.QNetworkProxyFactory)(h)) } // NewQNetworkProxyFactory constructs a new QNetworkProxyFactory object. func NewQNetworkProxyFactory() *QNetworkProxyFactory { - var outptr_QNetworkProxyFactory *C.QNetworkProxyFactory = nil - C.QNetworkProxyFactory_new(&outptr_QNetworkProxyFactory) - ret := newQNetworkProxyFactory(outptr_QNetworkProxyFactory) + ret := newQNetworkProxyFactory(C.QNetworkProxyFactory_new()) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qnetworkproxy.h b/qt/network/gen_qnetworkproxy.h index 743aaadb..5a1e671f 100644 --- a/qt/network/gen_qnetworkproxy.h +++ b/qt/network/gen_qnetworkproxy.h @@ -30,24 +30,24 @@ typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -void QNetworkProxyQuery_new(QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new2(QUrl* requestUrl, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new3(struct miqt_string hostname, int port, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new4(uint16_t bindPort, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new5(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new6(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new7(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new8(QNetworkProxyQuery* other, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new9(QUrl* requestUrl, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new10(struct miqt_string hostname, int port, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new11(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new12(uint16_t bindPort, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new13(uint16_t bindPort, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new14(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new15(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new16(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new17(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new18(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +QNetworkProxyQuery* QNetworkProxyQuery_new(); +QNetworkProxyQuery* QNetworkProxyQuery_new2(QUrl* requestUrl); +QNetworkProxyQuery* QNetworkProxyQuery_new3(struct miqt_string hostname, int port); +QNetworkProxyQuery* QNetworkProxyQuery_new4(uint16_t bindPort); +QNetworkProxyQuery* QNetworkProxyQuery_new5(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl); +QNetworkProxyQuery* QNetworkProxyQuery_new6(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port); +QNetworkProxyQuery* QNetworkProxyQuery_new7(QNetworkConfiguration* networkConfiguration, uint16_t bindPort); +QNetworkProxyQuery* QNetworkProxyQuery_new8(QNetworkProxyQuery* other); +QNetworkProxyQuery* QNetworkProxyQuery_new9(QUrl* requestUrl, int queryType); +QNetworkProxyQuery* QNetworkProxyQuery_new10(struct miqt_string hostname, int port, struct miqt_string protocolTag); +QNetworkProxyQuery* QNetworkProxyQuery_new11(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType); +QNetworkProxyQuery* QNetworkProxyQuery_new12(uint16_t bindPort, struct miqt_string protocolTag); +QNetworkProxyQuery* QNetworkProxyQuery_new13(uint16_t bindPort, struct miqt_string protocolTag, int queryType); +QNetworkProxyQuery* QNetworkProxyQuery_new14(QNetworkConfiguration* networkConfiguration, QUrl* requestUrl, int queryType); +QNetworkProxyQuery* QNetworkProxyQuery_new15(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag); +QNetworkProxyQuery* QNetworkProxyQuery_new16(QNetworkConfiguration* networkConfiguration, struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType); +QNetworkProxyQuery* QNetworkProxyQuery_new17(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag); +QNetworkProxyQuery* QNetworkProxyQuery_new18(QNetworkConfiguration* networkConfiguration, uint16_t bindPort, struct miqt_string protocolTag, int queryType); void QNetworkProxyQuery_OperatorAssign(QNetworkProxyQuery* self, QNetworkProxyQuery* other); void QNetworkProxyQuery_Swap(QNetworkProxyQuery* self, QNetworkProxyQuery* other); bool QNetworkProxyQuery_OperatorEqual(const QNetworkProxyQuery* self, QNetworkProxyQuery* other); @@ -68,13 +68,13 @@ QNetworkConfiguration* QNetworkProxyQuery_NetworkConfiguration(const QNetworkPro void QNetworkProxyQuery_SetNetworkConfiguration(QNetworkProxyQuery* self, QNetworkConfiguration* networkConfiguration); void QNetworkProxyQuery_Delete(QNetworkProxyQuery* self, bool isSubclass); -void QNetworkProxy_new(QNetworkProxy** outptr_QNetworkProxy); -void QNetworkProxy_new2(int typeVal, QNetworkProxy** outptr_QNetworkProxy); -void QNetworkProxy_new3(QNetworkProxy* other, QNetworkProxy** outptr_QNetworkProxy); -void QNetworkProxy_new4(int typeVal, struct miqt_string hostName, QNetworkProxy** outptr_QNetworkProxy); -void QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port, QNetworkProxy** outptr_QNetworkProxy); -void QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, QNetworkProxy** outptr_QNetworkProxy); -void QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password, QNetworkProxy** outptr_QNetworkProxy); +QNetworkProxy* QNetworkProxy_new(); +QNetworkProxy* QNetworkProxy_new2(int typeVal); +QNetworkProxy* QNetworkProxy_new3(QNetworkProxy* other); +QNetworkProxy* QNetworkProxy_new4(int typeVal, struct miqt_string hostName); +QNetworkProxy* QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port); +QNetworkProxy* QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user); +QNetworkProxy* QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password); void QNetworkProxy_OperatorAssign(QNetworkProxy* self, QNetworkProxy* other); void QNetworkProxy_Swap(QNetworkProxy* self, QNetworkProxy* other); bool QNetworkProxy_OperatorEqual(const QNetworkProxy* self, QNetworkProxy* other); @@ -103,7 +103,7 @@ struct miqt_string QNetworkProxy_RawHeader(const QNetworkProxy* self, struct miq void QNetworkProxy_SetRawHeader(QNetworkProxy* self, struct miqt_string headerName, struct miqt_string value); void QNetworkProxy_Delete(QNetworkProxy* self, bool isSubclass); -void QNetworkProxyFactory_new(QNetworkProxyFactory** outptr_QNetworkProxyFactory); +QNetworkProxyFactory* QNetworkProxyFactory_new(); struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy(QNetworkProxyFactory* self, QNetworkProxyQuery* query); bool QNetworkProxyFactory_UsesSystemConfiguration(); void QNetworkProxyFactory_SetUseSystemConfiguration(bool enable); diff --git a/qt/network/gen_qnetworkreply.cpp b/qt/network/gen_qnetworkreply.cpp index 1c94133f..c25eecdf 100644 --- a/qt/network/gen_qnetworkreply.cpp +++ b/qt/network/gen_qnetworkreply.cpp @@ -19,6 +19,10 @@ #include "gen_qnetworkreply.h" #include "_cgo_export.h" +void QNetworkReply_virtbase(QNetworkReply* src, QIODevice** outptr_QIODevice) { + *outptr_QIODevice = static_cast(src); +} + QMetaObject* QNetworkReply_MetaObject(const QNetworkReply* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/network/gen_qnetworkreply.go b/qt/network/gen_qnetworkreply.go index eb7afcc5..68bb7769 100644 --- a/qt/network/gen_qnetworkreply.go +++ b/qt/network/gen_qnetworkreply.go @@ -75,22 +75,20 @@ func (this *QNetworkReply) UnsafePointer() unsafe.Pointer { } // newQNetworkReply constructs the type using only CGO pointers. -func newQNetworkReply(h *C.QNetworkReply, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QNetworkReply { +func newQNetworkReply(h *C.QNetworkReply) *QNetworkReply { if h == nil { return nil } + var outptr_QIODevice *C.QIODevice = nil + C.QNetworkReply_virtbase(h, &outptr_QIODevice) + return &QNetworkReply{h: h, - QIODevice: qt.UnsafeNewQIODevice(unsafe.Pointer(h_QIODevice), unsafe.Pointer(h_QObject))} + QIODevice: qt.UnsafeNewQIODevice(unsafe.Pointer(outptr_QIODevice))} } // UnsafeNewQNetworkReply constructs the type using only unsafe pointers. -func UnsafeNewQNetworkReply(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkReply { - if h == nil { - return nil - } - - return &QNetworkReply{h: (*C.QNetworkReply)(h), - QIODevice: qt.UnsafeNewQIODevice(h_QIODevice, h_QObject)} +func UnsafeNewQNetworkReply(h unsafe.Pointer) *QNetworkReply { + return newQNetworkReply((*C.QNetworkReply)(h)) } func (this *QNetworkReply) MetaObject() *qt.QMetaObject { @@ -138,7 +136,7 @@ func (this *QNetworkReply) SetReadBufferSize(size int64) { } func (this *QNetworkReply) Manager() *QNetworkAccessManager { - return newQNetworkAccessManager(C.QNetworkReply_Manager(this.h), nil) + return newQNetworkAccessManager(C.QNetworkReply_Manager(this.h)) } func (this *QNetworkReply) Operation() QNetworkAccessManager__Operation { diff --git a/qt/network/gen_qnetworkreply.h b/qt/network/gen_qnetworkreply.h index 8f26bd9b..1c26ee5d 100644 --- a/qt/network/gen_qnetworkreply.h +++ b/qt/network/gen_qnetworkreply.h @@ -40,6 +40,7 @@ typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif +void QNetworkReply_virtbase(QNetworkReply* src, QIODevice** outptr_QIODevice); QMetaObject* QNetworkReply_MetaObject(const QNetworkReply* self); void* QNetworkReply_Metacast(QNetworkReply* self, const char* param1); struct miqt_string QNetworkReply_Tr(const char* s); diff --git a/qt/network/gen_qnetworkrequest.cpp b/qt/network/gen_qnetworkrequest.cpp index 6e821ab5..c478e89d 100644 --- a/qt/network/gen_qnetworkrequest.cpp +++ b/qt/network/gen_qnetworkrequest.cpp @@ -13,19 +13,16 @@ #include "gen_qnetworkrequest.h" #include "_cgo_export.h" -void QNetworkRequest_new(QNetworkRequest** outptr_QNetworkRequest) { - QNetworkRequest* ret = new QNetworkRequest(); - *outptr_QNetworkRequest = ret; +QNetworkRequest* QNetworkRequest_new() { + return new QNetworkRequest(); } -void QNetworkRequest_new2(QUrl* url, QNetworkRequest** outptr_QNetworkRequest) { - QNetworkRequest* ret = new QNetworkRequest(*url); - *outptr_QNetworkRequest = ret; +QNetworkRequest* QNetworkRequest_new2(QUrl* url) { + return new QNetworkRequest(*url); } -void QNetworkRequest_new3(QNetworkRequest* other, QNetworkRequest** outptr_QNetworkRequest) { - QNetworkRequest* ret = new QNetworkRequest(*other); - *outptr_QNetworkRequest = ret; +QNetworkRequest* QNetworkRequest_new3(QNetworkRequest* other) { + return new QNetworkRequest(*other); } void QNetworkRequest_OperatorAssign(QNetworkRequest* self, QNetworkRequest* other) { diff --git a/qt/network/gen_qnetworkrequest.go b/qt/network/gen_qnetworkrequest.go index 4ff6f4db..90b37825 100644 --- a/qt/network/gen_qnetworkrequest.go +++ b/qt/network/gen_qnetworkrequest.go @@ -133,44 +133,35 @@ func newQNetworkRequest(h *C.QNetworkRequest) *QNetworkRequest { if h == nil { return nil } + return &QNetworkRequest{h: h} } // UnsafeNewQNetworkRequest constructs the type using only unsafe pointers. func UnsafeNewQNetworkRequest(h unsafe.Pointer) *QNetworkRequest { - if h == nil { - return nil - } - - return &QNetworkRequest{h: (*C.QNetworkRequest)(h)} + return newQNetworkRequest((*C.QNetworkRequest)(h)) } // NewQNetworkRequest constructs a new QNetworkRequest object. func NewQNetworkRequest() *QNetworkRequest { - var outptr_QNetworkRequest *C.QNetworkRequest = nil - C.QNetworkRequest_new(&outptr_QNetworkRequest) - ret := newQNetworkRequest(outptr_QNetworkRequest) + ret := newQNetworkRequest(C.QNetworkRequest_new()) ret.isSubclass = true return ret } // NewQNetworkRequest2 constructs a new QNetworkRequest object. func NewQNetworkRequest2(url *qt.QUrl) *QNetworkRequest { - var outptr_QNetworkRequest *C.QNetworkRequest = nil - C.QNetworkRequest_new2((*C.QUrl)(url.UnsafePointer()), &outptr_QNetworkRequest) - ret := newQNetworkRequest(outptr_QNetworkRequest) + ret := newQNetworkRequest(C.QNetworkRequest_new2((*C.QUrl)(url.UnsafePointer()))) ret.isSubclass = true return ret } // NewQNetworkRequest3 constructs a new QNetworkRequest object. func NewQNetworkRequest3(other *QNetworkRequest) *QNetworkRequest { - var outptr_QNetworkRequest *C.QNetworkRequest = nil - C.QNetworkRequest_new3(other.cPointer(), &outptr_QNetworkRequest) - ret := newQNetworkRequest(outptr_QNetworkRequest) + ret := newQNetworkRequest(C.QNetworkRequest_new3(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qnetworkrequest.h b/qt/network/gen_qnetworkrequest.h index 623ba4ad..59f1b8d2 100644 --- a/qt/network/gen_qnetworkrequest.h +++ b/qt/network/gen_qnetworkrequest.h @@ -30,9 +30,9 @@ typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -void QNetworkRequest_new(QNetworkRequest** outptr_QNetworkRequest); -void QNetworkRequest_new2(QUrl* url, QNetworkRequest** outptr_QNetworkRequest); -void QNetworkRequest_new3(QNetworkRequest* other, QNetworkRequest** outptr_QNetworkRequest); +QNetworkRequest* QNetworkRequest_new(); +QNetworkRequest* QNetworkRequest_new2(QUrl* url); +QNetworkRequest* QNetworkRequest_new3(QNetworkRequest* other); void QNetworkRequest_OperatorAssign(QNetworkRequest* self, QNetworkRequest* other); void QNetworkRequest_Swap(QNetworkRequest* self, QNetworkRequest* other); bool QNetworkRequest_OperatorEqual(const QNetworkRequest* self, QNetworkRequest* other); diff --git a/qt/network/gen_qnetworksession.cpp b/qt/network/gen_qnetworksession.cpp index edfb6f62..ad1659c6 100644 --- a/qt/network/gen_qnetworksession.cpp +++ b/qt/network/gen_qnetworksession.cpp @@ -196,16 +196,16 @@ public: }; -void QNetworkSession_new(QNetworkConfiguration* connConfig, QNetworkSession** outptr_QNetworkSession, QObject** outptr_QObject) { - MiqtVirtualQNetworkSession* ret = new MiqtVirtualQNetworkSession(*connConfig); - *outptr_QNetworkSession = ret; - *outptr_QObject = static_cast(ret); +QNetworkSession* QNetworkSession_new(QNetworkConfiguration* connConfig) { + return new MiqtVirtualQNetworkSession(*connConfig); } -void QNetworkSession_new2(QNetworkConfiguration* connConfig, QObject* parent, QNetworkSession** outptr_QNetworkSession, QObject** outptr_QObject) { - MiqtVirtualQNetworkSession* ret = new MiqtVirtualQNetworkSession(*connConfig, parent); - *outptr_QNetworkSession = ret; - *outptr_QObject = static_cast(ret); +QNetworkSession* QNetworkSession_new2(QNetworkConfiguration* connConfig, QObject* parent) { + return new MiqtVirtualQNetworkSession(*connConfig, parent); +} + +void QNetworkSession_virtbase(QNetworkSession* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QNetworkSession_MetaObject(const QNetworkSession* self) { diff --git a/qt/network/gen_qnetworksession.go b/qt/network/gen_qnetworksession.go index b5cf408e..c9bdb516 100644 --- a/qt/network/gen_qnetworksession.go +++ b/qt/network/gen_qnetworksession.go @@ -65,42 +65,34 @@ func (this *QNetworkSession) UnsafePointer() unsafe.Pointer { } // newQNetworkSession constructs the type using only CGO pointers. -func newQNetworkSession(h *C.QNetworkSession, h_QObject *C.QObject) *QNetworkSession { +func newQNetworkSession(h *C.QNetworkSession) *QNetworkSession { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QNetworkSession_virtbase(h, &outptr_QObject) + return &QNetworkSession{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQNetworkSession constructs the type using only unsafe pointers. -func UnsafeNewQNetworkSession(h unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkSession { - if h == nil { - return nil - } - - return &QNetworkSession{h: (*C.QNetworkSession)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQNetworkSession(h unsafe.Pointer) *QNetworkSession { + return newQNetworkSession((*C.QNetworkSession)(h)) } // NewQNetworkSession constructs a new QNetworkSession object. func NewQNetworkSession(connConfig *QNetworkConfiguration) *QNetworkSession { - var outptr_QNetworkSession *C.QNetworkSession = nil - var outptr_QObject *C.QObject = nil - C.QNetworkSession_new(connConfig.cPointer(), &outptr_QNetworkSession, &outptr_QObject) - ret := newQNetworkSession(outptr_QNetworkSession, outptr_QObject) + ret := newQNetworkSession(C.QNetworkSession_new(connConfig.cPointer())) ret.isSubclass = true return ret } // NewQNetworkSession2 constructs a new QNetworkSession object. func NewQNetworkSession2(connConfig *QNetworkConfiguration, parent *qt.QObject) *QNetworkSession { - var outptr_QNetworkSession *C.QNetworkSession = nil - var outptr_QObject *C.QObject = nil - C.QNetworkSession_new2(connConfig.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkSession, &outptr_QObject) - ret := newQNetworkSession(outptr_QNetworkSession, outptr_QObject) + ret := newQNetworkSession(C.QNetworkSession_new2(connConfig.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -541,7 +533,7 @@ func miqt_exec_callback_QNetworkSession_TimerEvent(self *C.QNetworkSession, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QNetworkSession{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -567,7 +559,7 @@ func miqt_exec_callback_QNetworkSession_ChildEvent(self *C.QNetworkSession, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QNetworkSession{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/network/gen_qnetworksession.h b/qt/network/gen_qnetworksession.h index 10f737da..9bafc7fb 100644 --- a/qt/network/gen_qnetworksession.h +++ b/qt/network/gen_qnetworksession.h @@ -38,8 +38,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -void QNetworkSession_new(QNetworkConfiguration* connConfig, QNetworkSession** outptr_QNetworkSession, QObject** outptr_QObject); -void QNetworkSession_new2(QNetworkConfiguration* connConfig, QObject* parent, QNetworkSession** outptr_QNetworkSession, QObject** outptr_QObject); +QNetworkSession* QNetworkSession_new(QNetworkConfiguration* connConfig); +QNetworkSession* QNetworkSession_new2(QNetworkConfiguration* connConfig, QObject* parent); +void QNetworkSession_virtbase(QNetworkSession* src, QObject** outptr_QObject); QMetaObject* QNetworkSession_MetaObject(const QNetworkSession* self); void* QNetworkSession_Metacast(QNetworkSession* self, const char* param1); struct miqt_string QNetworkSession_Tr(const char* s); diff --git a/qt/network/gen_qocspresponse.cpp b/qt/network/gen_qocspresponse.cpp index c6133b28..ae848c5c 100644 --- a/qt/network/gen_qocspresponse.cpp +++ b/qt/network/gen_qocspresponse.cpp @@ -4,14 +4,12 @@ #include "gen_qocspresponse.h" #include "_cgo_export.h" -void QOcspResponse_new(QOcspResponse** outptr_QOcspResponse) { - QOcspResponse* ret = new QOcspResponse(); - *outptr_QOcspResponse = ret; +QOcspResponse* QOcspResponse_new() { + return new QOcspResponse(); } -void QOcspResponse_new2(QOcspResponse* other, QOcspResponse** outptr_QOcspResponse) { - QOcspResponse* ret = new QOcspResponse(*other); - *outptr_QOcspResponse = ret; +QOcspResponse* QOcspResponse_new2(QOcspResponse* other) { + return new QOcspResponse(*other); } void QOcspResponse_OperatorAssign(QOcspResponse* self, QOcspResponse* other) { diff --git a/qt/network/gen_qocspresponse.go b/qt/network/gen_qocspresponse.go index d6d57880..c862e9a4 100644 --- a/qt/network/gen_qocspresponse.go +++ b/qt/network/gen_qocspresponse.go @@ -59,34 +59,27 @@ func newQOcspResponse(h *C.QOcspResponse) *QOcspResponse { if h == nil { return nil } + return &QOcspResponse{h: h} } // UnsafeNewQOcspResponse constructs the type using only unsafe pointers. func UnsafeNewQOcspResponse(h unsafe.Pointer) *QOcspResponse { - if h == nil { - return nil - } - - return &QOcspResponse{h: (*C.QOcspResponse)(h)} + return newQOcspResponse((*C.QOcspResponse)(h)) } // NewQOcspResponse constructs a new QOcspResponse object. func NewQOcspResponse() *QOcspResponse { - var outptr_QOcspResponse *C.QOcspResponse = nil - C.QOcspResponse_new(&outptr_QOcspResponse) - ret := newQOcspResponse(outptr_QOcspResponse) + ret := newQOcspResponse(C.QOcspResponse_new()) ret.isSubclass = true return ret } // NewQOcspResponse2 constructs a new QOcspResponse object. func NewQOcspResponse2(other *QOcspResponse) *QOcspResponse { - var outptr_QOcspResponse *C.QOcspResponse = nil - C.QOcspResponse_new2(other.cPointer(), &outptr_QOcspResponse) - ret := newQOcspResponse(outptr_QOcspResponse) + ret := newQOcspResponse(C.QOcspResponse_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qocspresponse.h b/qt/network/gen_qocspresponse.h index cef90fab..641a4561 100644 --- a/qt/network/gen_qocspresponse.h +++ b/qt/network/gen_qocspresponse.h @@ -22,8 +22,8 @@ typedef struct QOcspResponse QOcspResponse; typedef struct QSslCertificate QSslCertificate; #endif -void QOcspResponse_new(QOcspResponse** outptr_QOcspResponse); -void QOcspResponse_new2(QOcspResponse* other, QOcspResponse** outptr_QOcspResponse); +QOcspResponse* QOcspResponse_new(); +QOcspResponse* QOcspResponse_new2(QOcspResponse* other); void QOcspResponse_OperatorAssign(QOcspResponse* self, QOcspResponse* other); int QOcspResponse_CertificateStatus(const QOcspResponse* self); int QOcspResponse_RevocationReason(const QOcspResponse* self); diff --git a/qt/network/gen_qsslcertificate.cpp b/qt/network/gen_qsslcertificate.cpp index 341dbc26..14295fe5 100644 --- a/qt/network/gen_qsslcertificate.cpp +++ b/qt/network/gen_qsslcertificate.cpp @@ -13,36 +13,30 @@ #include "gen_qsslcertificate.h" #include "_cgo_export.h" -void QSslCertificate_new(QIODevice* device, QSslCertificate** outptr_QSslCertificate) { - QSslCertificate* ret = new QSslCertificate(device); - *outptr_QSslCertificate = ret; +QSslCertificate* QSslCertificate_new(QIODevice* device) { + return new QSslCertificate(device); } -void QSslCertificate_new2(QSslCertificate** outptr_QSslCertificate) { - QSslCertificate* ret = new QSslCertificate(); - *outptr_QSslCertificate = ret; +QSslCertificate* QSslCertificate_new2() { + return new QSslCertificate(); } -void QSslCertificate_new3(QSslCertificate* other, QSslCertificate** outptr_QSslCertificate) { - QSslCertificate* ret = new QSslCertificate(*other); - *outptr_QSslCertificate = ret; +QSslCertificate* QSslCertificate_new3(QSslCertificate* other) { + return new QSslCertificate(*other); } -void QSslCertificate_new4(QIODevice* device, int format, QSslCertificate** outptr_QSslCertificate) { - QSslCertificate* ret = new QSslCertificate(device, static_cast(format)); - *outptr_QSslCertificate = ret; +QSslCertificate* QSslCertificate_new4(QIODevice* device, int format) { + return new QSslCertificate(device, static_cast(format)); } -void QSslCertificate_new5(struct miqt_string data, QSslCertificate** outptr_QSslCertificate) { +QSslCertificate* QSslCertificate_new5(struct miqt_string data) { QByteArray data_QByteArray(data.data, data.len); - QSslCertificate* ret = new QSslCertificate(data_QByteArray); - *outptr_QSslCertificate = ret; + return new QSslCertificate(data_QByteArray); } -void QSslCertificate_new6(struct miqt_string data, int format, QSslCertificate** outptr_QSslCertificate) { +QSslCertificate* QSslCertificate_new6(struct miqt_string data, int format) { QByteArray data_QByteArray(data.data, data.len); - QSslCertificate* ret = new QSslCertificate(data_QByteArray, static_cast(format)); - *outptr_QSslCertificate = ret; + return new QSslCertificate(data_QByteArray, static_cast(format)); } void QSslCertificate_OperatorAssign(QSslCertificate* self, QSslCertificate* other) { diff --git a/qt/network/gen_qsslcertificate.go b/qt/network/gen_qsslcertificate.go index a0d74b4c..2c57533b 100644 --- a/qt/network/gen_qsslcertificate.go +++ b/qt/network/gen_qsslcertificate.go @@ -60,54 +60,43 @@ func newQSslCertificate(h *C.QSslCertificate) *QSslCertificate { if h == nil { return nil } + return &QSslCertificate{h: h} } // UnsafeNewQSslCertificate constructs the type using only unsafe pointers. func UnsafeNewQSslCertificate(h unsafe.Pointer) *QSslCertificate { - if h == nil { - return nil - } - - return &QSslCertificate{h: (*C.QSslCertificate)(h)} + return newQSslCertificate((*C.QSslCertificate)(h)) } // NewQSslCertificate constructs a new QSslCertificate object. func NewQSslCertificate(device *qt.QIODevice) *QSslCertificate { - var outptr_QSslCertificate *C.QSslCertificate = nil - C.QSslCertificate_new((*C.QIODevice)(device.UnsafePointer()), &outptr_QSslCertificate) - ret := newQSslCertificate(outptr_QSslCertificate) + ret := newQSslCertificate(C.QSslCertificate_new((*C.QIODevice)(device.UnsafePointer()))) ret.isSubclass = true return ret } // NewQSslCertificate2 constructs a new QSslCertificate object. func NewQSslCertificate2() *QSslCertificate { - var outptr_QSslCertificate *C.QSslCertificate = nil - C.QSslCertificate_new2(&outptr_QSslCertificate) - ret := newQSslCertificate(outptr_QSslCertificate) + ret := newQSslCertificate(C.QSslCertificate_new2()) ret.isSubclass = true return ret } // NewQSslCertificate3 constructs a new QSslCertificate object. func NewQSslCertificate3(other *QSslCertificate) *QSslCertificate { - var outptr_QSslCertificate *C.QSslCertificate = nil - C.QSslCertificate_new3(other.cPointer(), &outptr_QSslCertificate) - ret := newQSslCertificate(outptr_QSslCertificate) + ret := newQSslCertificate(C.QSslCertificate_new3(other.cPointer())) ret.isSubclass = true return ret } // NewQSslCertificate4 constructs a new QSslCertificate object. func NewQSslCertificate4(device *qt.QIODevice, format QSsl__EncodingFormat) *QSslCertificate { - var outptr_QSslCertificate *C.QSslCertificate = nil - C.QSslCertificate_new4((*C.QIODevice)(device.UnsafePointer()), (C.int)(format), &outptr_QSslCertificate) - ret := newQSslCertificate(outptr_QSslCertificate) + ret := newQSslCertificate(C.QSslCertificate_new4((*C.QIODevice)(device.UnsafePointer()), (C.int)(format))) ret.isSubclass = true return ret } @@ -117,10 +106,8 @@ func NewQSslCertificate5(data []byte) *QSslCertificate { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QSslCertificate *C.QSslCertificate = nil - C.QSslCertificate_new5(data_alias, &outptr_QSslCertificate) - ret := newQSslCertificate(outptr_QSslCertificate) + ret := newQSslCertificate(C.QSslCertificate_new5(data_alias)) ret.isSubclass = true return ret } @@ -130,10 +117,8 @@ func NewQSslCertificate6(data []byte, format QSsl__EncodingFormat) *QSslCertific data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QSslCertificate *C.QSslCertificate = nil - C.QSslCertificate_new6(data_alias, (C.int)(format), &outptr_QSslCertificate) - ret := newQSslCertificate(outptr_QSslCertificate) + ret := newQSslCertificate(C.QSslCertificate_new6(data_alias, (C.int)(format))) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qsslcertificate.h b/qt/network/gen_qsslcertificate.h index 13909c7f..69fcb34a 100644 --- a/qt/network/gen_qsslcertificate.h +++ b/qt/network/gen_qsslcertificate.h @@ -30,12 +30,12 @@ typedef struct QSslError QSslError; typedef struct QSslKey QSslKey; #endif -void QSslCertificate_new(QIODevice* device, QSslCertificate** outptr_QSslCertificate); -void QSslCertificate_new2(QSslCertificate** outptr_QSslCertificate); -void QSslCertificate_new3(QSslCertificate* other, QSslCertificate** outptr_QSslCertificate); -void QSslCertificate_new4(QIODevice* device, int format, QSslCertificate** outptr_QSslCertificate); -void QSslCertificate_new5(struct miqt_string data, QSslCertificate** outptr_QSslCertificate); -void QSslCertificate_new6(struct miqt_string data, int format, QSslCertificate** outptr_QSslCertificate); +QSslCertificate* QSslCertificate_new(QIODevice* device); +QSslCertificate* QSslCertificate_new2(); +QSslCertificate* QSslCertificate_new3(QSslCertificate* other); +QSslCertificate* QSslCertificate_new4(QIODevice* device, int format); +QSslCertificate* QSslCertificate_new5(struct miqt_string data); +QSslCertificate* QSslCertificate_new6(struct miqt_string data, int format); void QSslCertificate_OperatorAssign(QSslCertificate* self, QSslCertificate* other); void QSslCertificate_Swap(QSslCertificate* self, QSslCertificate* other); bool QSslCertificate_OperatorEqual(const QSslCertificate* self, QSslCertificate* other); diff --git a/qt/network/gen_qsslcertificateextension.cpp b/qt/network/gen_qsslcertificateextension.cpp index 7c04db42..19d49764 100644 --- a/qt/network/gen_qsslcertificateextension.cpp +++ b/qt/network/gen_qsslcertificateextension.cpp @@ -7,14 +7,12 @@ #include "gen_qsslcertificateextension.h" #include "_cgo_export.h" -void QSslCertificateExtension_new(QSslCertificateExtension** outptr_QSslCertificateExtension) { - QSslCertificateExtension* ret = new QSslCertificateExtension(); - *outptr_QSslCertificateExtension = ret; +QSslCertificateExtension* QSslCertificateExtension_new() { + return new QSslCertificateExtension(); } -void QSslCertificateExtension_new2(QSslCertificateExtension* other, QSslCertificateExtension** outptr_QSslCertificateExtension) { - QSslCertificateExtension* ret = new QSslCertificateExtension(*other); - *outptr_QSslCertificateExtension = ret; +QSslCertificateExtension* QSslCertificateExtension_new2(QSslCertificateExtension* other) { + return new QSslCertificateExtension(*other); } void QSslCertificateExtension_OperatorAssign(QSslCertificateExtension* self, QSslCertificateExtension* other) { diff --git a/qt/network/gen_qsslcertificateextension.go b/qt/network/gen_qsslcertificateextension.go index 93d51afb..4dc10845 100644 --- a/qt/network/gen_qsslcertificateextension.go +++ b/qt/network/gen_qsslcertificateextension.go @@ -38,34 +38,27 @@ func newQSslCertificateExtension(h *C.QSslCertificateExtension) *QSslCertificate if h == nil { return nil } + return &QSslCertificateExtension{h: h} } // UnsafeNewQSslCertificateExtension constructs the type using only unsafe pointers. func UnsafeNewQSslCertificateExtension(h unsafe.Pointer) *QSslCertificateExtension { - if h == nil { - return nil - } - - return &QSslCertificateExtension{h: (*C.QSslCertificateExtension)(h)} + return newQSslCertificateExtension((*C.QSslCertificateExtension)(h)) } // NewQSslCertificateExtension constructs a new QSslCertificateExtension object. func NewQSslCertificateExtension() *QSslCertificateExtension { - var outptr_QSslCertificateExtension *C.QSslCertificateExtension = nil - C.QSslCertificateExtension_new(&outptr_QSslCertificateExtension) - ret := newQSslCertificateExtension(outptr_QSslCertificateExtension) + ret := newQSslCertificateExtension(C.QSslCertificateExtension_new()) ret.isSubclass = true return ret } // NewQSslCertificateExtension2 constructs a new QSslCertificateExtension object. func NewQSslCertificateExtension2(other *QSslCertificateExtension) *QSslCertificateExtension { - var outptr_QSslCertificateExtension *C.QSslCertificateExtension = nil - C.QSslCertificateExtension_new2(other.cPointer(), &outptr_QSslCertificateExtension) - ret := newQSslCertificateExtension(outptr_QSslCertificateExtension) + ret := newQSslCertificateExtension(C.QSslCertificateExtension_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qsslcertificateextension.h b/qt/network/gen_qsslcertificateextension.h index 721b487f..42ce68ef 100644 --- a/qt/network/gen_qsslcertificateextension.h +++ b/qt/network/gen_qsslcertificateextension.h @@ -22,8 +22,8 @@ typedef struct QSslCertificateExtension QSslCertificateExtension; typedef struct QVariant QVariant; #endif -void QSslCertificateExtension_new(QSslCertificateExtension** outptr_QSslCertificateExtension); -void QSslCertificateExtension_new2(QSslCertificateExtension* other, QSslCertificateExtension** outptr_QSslCertificateExtension); +QSslCertificateExtension* QSslCertificateExtension_new(); +QSslCertificateExtension* QSslCertificateExtension_new2(QSslCertificateExtension* other); void QSslCertificateExtension_OperatorAssign(QSslCertificateExtension* self, QSslCertificateExtension* other); void QSslCertificateExtension_Swap(QSslCertificateExtension* self, QSslCertificateExtension* other); struct miqt_string QSslCertificateExtension_Oid(const QSslCertificateExtension* self); diff --git a/qt/network/gen_qsslcipher.cpp b/qt/network/gen_qsslcipher.cpp index 4bdaab38..bcfa30b4 100644 --- a/qt/network/gen_qsslcipher.cpp +++ b/qt/network/gen_qsslcipher.cpp @@ -6,26 +6,22 @@ #include "gen_qsslcipher.h" #include "_cgo_export.h" -void QSslCipher_new(QSslCipher** outptr_QSslCipher) { - QSslCipher* ret = new QSslCipher(); - *outptr_QSslCipher = ret; +QSslCipher* QSslCipher_new() { + return new QSslCipher(); } -void QSslCipher_new2(struct miqt_string name, QSslCipher** outptr_QSslCipher) { +QSslCipher* QSslCipher_new2(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - QSslCipher* ret = new QSslCipher(name_QString); - *outptr_QSslCipher = ret; + return new QSslCipher(name_QString); } -void QSslCipher_new3(struct miqt_string name, int protocol, QSslCipher** outptr_QSslCipher) { +QSslCipher* QSslCipher_new3(struct miqt_string name, int protocol) { QString name_QString = QString::fromUtf8(name.data, name.len); - QSslCipher* ret = new QSslCipher(name_QString, static_cast(protocol)); - *outptr_QSslCipher = ret; + return new QSslCipher(name_QString, static_cast(protocol)); } -void QSslCipher_new4(QSslCipher* other, QSslCipher** outptr_QSslCipher) { - QSslCipher* ret = new QSslCipher(*other); - *outptr_QSslCipher = ret; +QSslCipher* QSslCipher_new4(QSslCipher* other) { + return new QSslCipher(*other); } void QSslCipher_OperatorAssign(QSslCipher* self, QSslCipher* other) { diff --git a/qt/network/gen_qsslcipher.go b/qt/network/gen_qsslcipher.go index 433b60dc..402a8dfe 100644 --- a/qt/network/gen_qsslcipher.go +++ b/qt/network/gen_qsslcipher.go @@ -37,24 +37,19 @@ func newQSslCipher(h *C.QSslCipher) *QSslCipher { if h == nil { return nil } + return &QSslCipher{h: h} } // UnsafeNewQSslCipher constructs the type using only unsafe pointers. func UnsafeNewQSslCipher(h unsafe.Pointer) *QSslCipher { - if h == nil { - return nil - } - - return &QSslCipher{h: (*C.QSslCipher)(h)} + return newQSslCipher((*C.QSslCipher)(h)) } // NewQSslCipher constructs a new QSslCipher object. func NewQSslCipher() *QSslCipher { - var outptr_QSslCipher *C.QSslCipher = nil - C.QSslCipher_new(&outptr_QSslCipher) - ret := newQSslCipher(outptr_QSslCipher) + ret := newQSslCipher(C.QSslCipher_new()) ret.isSubclass = true return ret } @@ -65,10 +60,8 @@ func NewQSslCipher2(name string) *QSslCipher { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QSslCipher *C.QSslCipher = nil - C.QSslCipher_new2(name_ms, &outptr_QSslCipher) - ret := newQSslCipher(outptr_QSslCipher) + ret := newQSslCipher(C.QSslCipher_new2(name_ms)) ret.isSubclass = true return ret } @@ -79,20 +72,16 @@ func NewQSslCipher3(name string, protocol QSsl__SslProtocol) *QSslCipher { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QSslCipher *C.QSslCipher = nil - C.QSslCipher_new3(name_ms, (C.int)(protocol), &outptr_QSslCipher) - ret := newQSslCipher(outptr_QSslCipher) + ret := newQSslCipher(C.QSslCipher_new3(name_ms, (C.int)(protocol))) ret.isSubclass = true return ret } // NewQSslCipher4 constructs a new QSslCipher object. func NewQSslCipher4(other *QSslCipher) *QSslCipher { - var outptr_QSslCipher *C.QSslCipher = nil - C.QSslCipher_new4(other.cPointer(), &outptr_QSslCipher) - ret := newQSslCipher(outptr_QSslCipher) + ret := newQSslCipher(C.QSslCipher_new4(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qsslcipher.h b/qt/network/gen_qsslcipher.h index c0378c3d..c5cd3200 100644 --- a/qt/network/gen_qsslcipher.h +++ b/qt/network/gen_qsslcipher.h @@ -20,10 +20,10 @@ class QSslCipher; typedef struct QSslCipher QSslCipher; #endif -void QSslCipher_new(QSslCipher** outptr_QSslCipher); -void QSslCipher_new2(struct miqt_string name, QSslCipher** outptr_QSslCipher); -void QSslCipher_new3(struct miqt_string name, int protocol, QSslCipher** outptr_QSslCipher); -void QSslCipher_new4(QSslCipher* other, QSslCipher** outptr_QSslCipher); +QSslCipher* QSslCipher_new(); +QSslCipher* QSslCipher_new2(struct miqt_string name); +QSslCipher* QSslCipher_new3(struct miqt_string name, int protocol); +QSslCipher* QSslCipher_new4(QSslCipher* other); void QSslCipher_OperatorAssign(QSslCipher* self, QSslCipher* other); void QSslCipher_Swap(QSslCipher* self, QSslCipher* other); bool QSslCipher_OperatorEqual(const QSslCipher* self, QSslCipher* other); diff --git a/qt/network/gen_qsslconfiguration.cpp b/qt/network/gen_qsslconfiguration.cpp index 66214a5b..83b4f4e7 100644 --- a/qt/network/gen_qsslconfiguration.cpp +++ b/qt/network/gen_qsslconfiguration.cpp @@ -14,14 +14,12 @@ #include "gen_qsslconfiguration.h" #include "_cgo_export.h" -void QSslConfiguration_new(QSslConfiguration** outptr_QSslConfiguration) { - QSslConfiguration* ret = new QSslConfiguration(); - *outptr_QSslConfiguration = ret; +QSslConfiguration* QSslConfiguration_new() { + return new QSslConfiguration(); } -void QSslConfiguration_new2(QSslConfiguration* other, QSslConfiguration** outptr_QSslConfiguration) { - QSslConfiguration* ret = new QSslConfiguration(*other); - *outptr_QSslConfiguration = ret; +QSslConfiguration* QSslConfiguration_new2(QSslConfiguration* other) { + return new QSslConfiguration(*other); } void QSslConfiguration_OperatorAssign(QSslConfiguration* self, QSslConfiguration* other) { diff --git a/qt/network/gen_qsslconfiguration.go b/qt/network/gen_qsslconfiguration.go index ff031fbf..4e4ebf2b 100644 --- a/qt/network/gen_qsslconfiguration.go +++ b/qt/network/gen_qsslconfiguration.go @@ -46,34 +46,27 @@ func newQSslConfiguration(h *C.QSslConfiguration) *QSslConfiguration { if h == nil { return nil } + return &QSslConfiguration{h: h} } // UnsafeNewQSslConfiguration constructs the type using only unsafe pointers. func UnsafeNewQSslConfiguration(h unsafe.Pointer) *QSslConfiguration { - if h == nil { - return nil - } - - return &QSslConfiguration{h: (*C.QSslConfiguration)(h)} + return newQSslConfiguration((*C.QSslConfiguration)(h)) } // NewQSslConfiguration constructs a new QSslConfiguration object. func NewQSslConfiguration() *QSslConfiguration { - var outptr_QSslConfiguration *C.QSslConfiguration = nil - C.QSslConfiguration_new(&outptr_QSslConfiguration) - ret := newQSslConfiguration(outptr_QSslConfiguration) + ret := newQSslConfiguration(C.QSslConfiguration_new()) ret.isSubclass = true return ret } // NewQSslConfiguration2 constructs a new QSslConfiguration object. func NewQSslConfiguration2(other *QSslConfiguration) *QSslConfiguration { - var outptr_QSslConfiguration *C.QSslConfiguration = nil - C.QSslConfiguration_new2(other.cPointer(), &outptr_QSslConfiguration) - ret := newQSslConfiguration(outptr_QSslConfiguration) + ret := newQSslConfiguration(C.QSslConfiguration_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qsslconfiguration.h b/qt/network/gen_qsslconfiguration.h index 851fd813..59f5d0b9 100644 --- a/qt/network/gen_qsslconfiguration.h +++ b/qt/network/gen_qsslconfiguration.h @@ -32,8 +32,8 @@ typedef struct QSslKey QSslKey; typedef struct QVariant QVariant; #endif -void QSslConfiguration_new(QSslConfiguration** outptr_QSslConfiguration); -void QSslConfiguration_new2(QSslConfiguration* other, QSslConfiguration** outptr_QSslConfiguration); +QSslConfiguration* QSslConfiguration_new(); +QSslConfiguration* QSslConfiguration_new2(QSslConfiguration* other); void QSslConfiguration_OperatorAssign(QSslConfiguration* self, QSslConfiguration* other); void QSslConfiguration_Swap(QSslConfiguration* self, QSslConfiguration* other); bool QSslConfiguration_OperatorEqual(const QSslConfiguration* self, QSslConfiguration* other); diff --git a/qt/network/gen_qssldiffiehellmanparameters.cpp b/qt/network/gen_qssldiffiehellmanparameters.cpp index a6e3761f..fb8bdd87 100644 --- a/qt/network/gen_qssldiffiehellmanparameters.cpp +++ b/qt/network/gen_qssldiffiehellmanparameters.cpp @@ -8,14 +8,12 @@ #include "gen_qssldiffiehellmanparameters.h" #include "_cgo_export.h" -void QSslDiffieHellmanParameters_new(QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters) { - QSslDiffieHellmanParameters* ret = new QSslDiffieHellmanParameters(); - *outptr_QSslDiffieHellmanParameters = ret; +QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new() { + return new QSslDiffieHellmanParameters(); } -void QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other, QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters) { - QSslDiffieHellmanParameters* ret = new QSslDiffieHellmanParameters(*other); - *outptr_QSslDiffieHellmanParameters = ret; +QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other) { + return new QSslDiffieHellmanParameters(*other); } QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_DefaultParameters() { diff --git a/qt/network/gen_qssldiffiehellmanparameters.go b/qt/network/gen_qssldiffiehellmanparameters.go index 56dec9d0..d991b1c3 100644 --- a/qt/network/gen_qssldiffiehellmanparameters.go +++ b/qt/network/gen_qssldiffiehellmanparameters.go @@ -46,34 +46,27 @@ func newQSslDiffieHellmanParameters(h *C.QSslDiffieHellmanParameters) *QSslDiffi if h == nil { return nil } + return &QSslDiffieHellmanParameters{h: h} } // UnsafeNewQSslDiffieHellmanParameters constructs the type using only unsafe pointers. func UnsafeNewQSslDiffieHellmanParameters(h unsafe.Pointer) *QSslDiffieHellmanParameters { - if h == nil { - return nil - } - - return &QSslDiffieHellmanParameters{h: (*C.QSslDiffieHellmanParameters)(h)} + return newQSslDiffieHellmanParameters((*C.QSslDiffieHellmanParameters)(h)) } // NewQSslDiffieHellmanParameters constructs a new QSslDiffieHellmanParameters object. func NewQSslDiffieHellmanParameters() *QSslDiffieHellmanParameters { - var outptr_QSslDiffieHellmanParameters *C.QSslDiffieHellmanParameters = nil - C.QSslDiffieHellmanParameters_new(&outptr_QSslDiffieHellmanParameters) - ret := newQSslDiffieHellmanParameters(outptr_QSslDiffieHellmanParameters) + ret := newQSslDiffieHellmanParameters(C.QSslDiffieHellmanParameters_new()) ret.isSubclass = true return ret } // NewQSslDiffieHellmanParameters2 constructs a new QSslDiffieHellmanParameters object. func NewQSslDiffieHellmanParameters2(other *QSslDiffieHellmanParameters) *QSslDiffieHellmanParameters { - var outptr_QSslDiffieHellmanParameters *C.QSslDiffieHellmanParameters = nil - C.QSslDiffieHellmanParameters_new2(other.cPointer(), &outptr_QSslDiffieHellmanParameters) - ret := newQSslDiffieHellmanParameters(outptr_QSslDiffieHellmanParameters) + ret := newQSslDiffieHellmanParameters(C.QSslDiffieHellmanParameters_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qssldiffiehellmanparameters.h b/qt/network/gen_qssldiffiehellmanparameters.h index aa19093e..b406139e 100644 --- a/qt/network/gen_qssldiffiehellmanparameters.h +++ b/qt/network/gen_qssldiffiehellmanparameters.h @@ -22,8 +22,8 @@ typedef struct QIODevice QIODevice; typedef struct QSslDiffieHellmanParameters QSslDiffieHellmanParameters; #endif -void QSslDiffieHellmanParameters_new(QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters); -void QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other, QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters); +QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new(); +QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other); QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_DefaultParameters(); void QSslDiffieHellmanParameters_OperatorAssign(QSslDiffieHellmanParameters* self, QSslDiffieHellmanParameters* other); void QSslDiffieHellmanParameters_Swap(QSslDiffieHellmanParameters* self, QSslDiffieHellmanParameters* other); diff --git a/qt/network/gen_qsslellipticcurve.cpp b/qt/network/gen_qsslellipticcurve.cpp index ba03eb46..0542b7f9 100644 --- a/qt/network/gen_qsslellipticcurve.cpp +++ b/qt/network/gen_qsslellipticcurve.cpp @@ -6,14 +6,12 @@ #include "gen_qsslellipticcurve.h" #include "_cgo_export.h" -void QSslEllipticCurve_new(QSslEllipticCurve** outptr_QSslEllipticCurve) { - QSslEllipticCurve* ret = new QSslEllipticCurve(); - *outptr_QSslEllipticCurve = ret; +QSslEllipticCurve* QSslEllipticCurve_new() { + return new QSslEllipticCurve(); } -void QSslEllipticCurve_new2(QSslEllipticCurve* param1, QSslEllipticCurve** outptr_QSslEllipticCurve) { - QSslEllipticCurve* ret = new QSslEllipticCurve(*param1); - *outptr_QSslEllipticCurve = ret; +QSslEllipticCurve* QSslEllipticCurve_new2(QSslEllipticCurve* param1) { + return new QSslEllipticCurve(*param1); } QSslEllipticCurve* QSslEllipticCurve_FromShortName(struct miqt_string name) { diff --git a/qt/network/gen_qsslellipticcurve.go b/qt/network/gen_qsslellipticcurve.go index adca219a..3a737154 100644 --- a/qt/network/gen_qsslellipticcurve.go +++ b/qt/network/gen_qsslellipticcurve.go @@ -37,34 +37,27 @@ func newQSslEllipticCurve(h *C.QSslEllipticCurve) *QSslEllipticCurve { if h == nil { return nil } + return &QSslEllipticCurve{h: h} } // UnsafeNewQSslEllipticCurve constructs the type using only unsafe pointers. func UnsafeNewQSslEllipticCurve(h unsafe.Pointer) *QSslEllipticCurve { - if h == nil { - return nil - } - - return &QSslEllipticCurve{h: (*C.QSslEllipticCurve)(h)} + return newQSslEllipticCurve((*C.QSslEllipticCurve)(h)) } // NewQSslEllipticCurve constructs a new QSslEllipticCurve object. func NewQSslEllipticCurve() *QSslEllipticCurve { - var outptr_QSslEllipticCurve *C.QSslEllipticCurve = nil - C.QSslEllipticCurve_new(&outptr_QSslEllipticCurve) - ret := newQSslEllipticCurve(outptr_QSslEllipticCurve) + ret := newQSslEllipticCurve(C.QSslEllipticCurve_new()) ret.isSubclass = true return ret } // NewQSslEllipticCurve2 constructs a new QSslEllipticCurve object. func NewQSslEllipticCurve2(param1 *QSslEllipticCurve) *QSslEllipticCurve { - var outptr_QSslEllipticCurve *C.QSslEllipticCurve = nil - C.QSslEllipticCurve_new2(param1.cPointer(), &outptr_QSslEllipticCurve) - ret := newQSslEllipticCurve(outptr_QSslEllipticCurve) + ret := newQSslEllipticCurve(C.QSslEllipticCurve_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qsslellipticcurve.h b/qt/network/gen_qsslellipticcurve.h index f0e26994..1fe18ffd 100644 --- a/qt/network/gen_qsslellipticcurve.h +++ b/qt/network/gen_qsslellipticcurve.h @@ -20,8 +20,8 @@ class QSslEllipticCurve; typedef struct QSslEllipticCurve QSslEllipticCurve; #endif -void QSslEllipticCurve_new(QSslEllipticCurve** outptr_QSslEllipticCurve); -void QSslEllipticCurve_new2(QSslEllipticCurve* param1, QSslEllipticCurve** outptr_QSslEllipticCurve); +QSslEllipticCurve* QSslEllipticCurve_new(); +QSslEllipticCurve* QSslEllipticCurve_new2(QSslEllipticCurve* param1); QSslEllipticCurve* QSslEllipticCurve_FromShortName(struct miqt_string name); QSslEllipticCurve* QSslEllipticCurve_FromLongName(struct miqt_string name); struct miqt_string QSslEllipticCurve_ShortName(const QSslEllipticCurve* self); diff --git a/qt/network/gen_qsslerror.cpp b/qt/network/gen_qsslerror.cpp index 8ae3a553..13dc29e2 100644 --- a/qt/network/gen_qsslerror.cpp +++ b/qt/network/gen_qsslerror.cpp @@ -7,24 +7,20 @@ #include "gen_qsslerror.h" #include "_cgo_export.h" -void QSslError_new(QSslError** outptr_QSslError) { - QSslError* ret = new QSslError(); - *outptr_QSslError = ret; +QSslError* QSslError_new() { + return new QSslError(); } -void QSslError_new2(int error, QSslError** outptr_QSslError) { - QSslError* ret = new QSslError(static_cast(error)); - *outptr_QSslError = ret; +QSslError* QSslError_new2(int error) { + return new QSslError(static_cast(error)); } -void QSslError_new3(int error, QSslCertificate* certificate, QSslError** outptr_QSslError) { - QSslError* ret = new QSslError(static_cast(error), *certificate); - *outptr_QSslError = ret; +QSslError* QSslError_new3(int error, QSslCertificate* certificate) { + return new QSslError(static_cast(error), *certificate); } -void QSslError_new4(QSslError* other, QSslError** outptr_QSslError) { - QSslError* ret = new QSslError(*other); - *outptr_QSslError = ret; +QSslError* QSslError_new4(QSslError* other) { + return new QSslError(*other); } void QSslError_Swap(QSslError* self, QSslError* other) { diff --git a/qt/network/gen_qsslerror.go b/qt/network/gen_qsslerror.go index 095d9de9..8b51802c 100644 --- a/qt/network/gen_qsslerror.go +++ b/qt/network/gen_qsslerror.go @@ -80,54 +80,43 @@ func newQSslError(h *C.QSslError) *QSslError { if h == nil { return nil } + return &QSslError{h: h} } // UnsafeNewQSslError constructs the type using only unsafe pointers. func UnsafeNewQSslError(h unsafe.Pointer) *QSslError { - if h == nil { - return nil - } - - return &QSslError{h: (*C.QSslError)(h)} + return newQSslError((*C.QSslError)(h)) } // NewQSslError constructs a new QSslError object. func NewQSslError() *QSslError { - var outptr_QSslError *C.QSslError = nil - C.QSslError_new(&outptr_QSslError) - ret := newQSslError(outptr_QSslError) + ret := newQSslError(C.QSslError_new()) ret.isSubclass = true return ret } // NewQSslError2 constructs a new QSslError object. func NewQSslError2(error QSslError__SslError) *QSslError { - var outptr_QSslError *C.QSslError = nil - C.QSslError_new2((C.int)(error), &outptr_QSslError) - ret := newQSslError(outptr_QSslError) + ret := newQSslError(C.QSslError_new2((C.int)(error))) ret.isSubclass = true return ret } // NewQSslError3 constructs a new QSslError object. func NewQSslError3(error QSslError__SslError, certificate *QSslCertificate) *QSslError { - var outptr_QSslError *C.QSslError = nil - C.QSslError_new3((C.int)(error), certificate.cPointer(), &outptr_QSslError) - ret := newQSslError(outptr_QSslError) + ret := newQSslError(C.QSslError_new3((C.int)(error), certificate.cPointer())) ret.isSubclass = true return ret } // NewQSslError4 constructs a new QSslError object. func NewQSslError4(other *QSslError) *QSslError { - var outptr_QSslError *C.QSslError = nil - C.QSslError_new4(other.cPointer(), &outptr_QSslError) - ret := newQSslError(outptr_QSslError) + ret := newQSslError(C.QSslError_new4(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qsslerror.h b/qt/network/gen_qsslerror.h index b14a30e7..7f9b340c 100644 --- a/qt/network/gen_qsslerror.h +++ b/qt/network/gen_qsslerror.h @@ -22,10 +22,10 @@ typedef struct QSslCertificate QSslCertificate; typedef struct QSslError QSslError; #endif -void QSslError_new(QSslError** outptr_QSslError); -void QSslError_new2(int error, QSslError** outptr_QSslError); -void QSslError_new3(int error, QSslCertificate* certificate, QSslError** outptr_QSslError); -void QSslError_new4(QSslError* other, QSslError** outptr_QSslError); +QSslError* QSslError_new(); +QSslError* QSslError_new2(int error); +QSslError* QSslError_new3(int error, QSslCertificate* certificate); +QSslError* QSslError_new4(QSslError* other); void QSslError_Swap(QSslError* self, QSslError* other); void QSslError_OperatorAssign(QSslError* self, QSslError* other); bool QSslError_OperatorEqual(const QSslError* self, QSslError* other); diff --git a/qt/network/gen_qsslkey.cpp b/qt/network/gen_qsslkey.cpp index 69623d4c..7b56eeef 100644 --- a/qt/network/gen_qsslkey.cpp +++ b/qt/network/gen_qsslkey.cpp @@ -5,70 +5,58 @@ #include "gen_qsslkey.h" #include "_cgo_export.h" -void QSslKey_new(QSslKey** outptr_QSslKey) { - QSslKey* ret = new QSslKey(); - *outptr_QSslKey = ret; +QSslKey* QSslKey_new() { + return new QSslKey(); } -void QSslKey_new2(struct miqt_string encoded, int algorithm, QSslKey** outptr_QSslKey) { +QSslKey* QSslKey_new2(struct miqt_string encoded, int algorithm) { QByteArray encoded_QByteArray(encoded.data, encoded.len); - QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm)); - *outptr_QSslKey = ret; + return new QSslKey(encoded_QByteArray, static_cast(algorithm)); } -void QSslKey_new3(QIODevice* device, int algorithm, QSslKey** outptr_QSslKey) { - QSslKey* ret = new QSslKey(device, static_cast(algorithm)); - *outptr_QSslKey = ret; +QSslKey* QSslKey_new3(QIODevice* device, int algorithm) { + return new QSslKey(device, static_cast(algorithm)); } -void QSslKey_new4(void* handle, QSslKey** outptr_QSslKey) { - QSslKey* ret = new QSslKey(handle); - *outptr_QSslKey = ret; +QSslKey* QSslKey_new4(void* handle) { + return new QSslKey(handle); } -void QSslKey_new5(QSslKey* other, QSslKey** outptr_QSslKey) { - QSslKey* ret = new QSslKey(*other); - *outptr_QSslKey = ret; +QSslKey* QSslKey_new5(QSslKey* other) { + return new QSslKey(*other); } -void QSslKey_new6(struct miqt_string encoded, int algorithm, int format, QSslKey** outptr_QSslKey) { +QSslKey* QSslKey_new6(struct miqt_string encoded, int algorithm, int format) { QByteArray encoded_QByteArray(encoded.data, encoded.len); - QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format)); - *outptr_QSslKey = ret; + return new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format)); } -void QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey) { +QSslKey* QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal) { QByteArray encoded_QByteArray(encoded.data, encoded.len); - QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal)); - *outptr_QSslKey = ret; + return new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal)); } -void QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey) { +QSslKey* QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase) { QByteArray encoded_QByteArray(encoded.data, encoded.len); QByteArray passPhrase_QByteArray(passPhrase.data, passPhrase.len); - QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); - *outptr_QSslKey = ret; + return new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); } -void QSslKey_new9(QIODevice* device, int algorithm, int format, QSslKey** outptr_QSslKey) { - QSslKey* ret = new QSslKey(device, static_cast(algorithm), static_cast(format)); - *outptr_QSslKey = ret; +QSslKey* QSslKey_new9(QIODevice* device, int algorithm, int format) { + return new QSslKey(device, static_cast(algorithm), static_cast(format)); } -void QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey) { - QSslKey* ret = new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal)); - *outptr_QSslKey = ret; +QSslKey* QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal) { + return new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal)); } -void QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey) { +QSslKey* QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase) { QByteArray passPhrase_QByteArray(passPhrase.data, passPhrase.len); - QSslKey* ret = new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); - *outptr_QSslKey = ret; + return new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); } -void QSslKey_new12(void* handle, int typeVal, QSslKey** outptr_QSslKey) { - QSslKey* ret = new QSslKey(handle, static_cast(typeVal)); - *outptr_QSslKey = ret; +QSslKey* QSslKey_new12(void* handle, int typeVal) { + return new QSslKey(handle, static_cast(typeVal)); } void QSslKey_OperatorAssign(QSslKey* self, QSslKey* other) { diff --git a/qt/network/gen_qsslkey.go b/qt/network/gen_qsslkey.go index 4890eff6..4b1ff663 100644 --- a/qt/network/gen_qsslkey.go +++ b/qt/network/gen_qsslkey.go @@ -38,24 +38,19 @@ func newQSslKey(h *C.QSslKey) *QSslKey { if h == nil { return nil } + return &QSslKey{h: h} } // UnsafeNewQSslKey constructs the type using only unsafe pointers. func UnsafeNewQSslKey(h unsafe.Pointer) *QSslKey { - if h == nil { - return nil - } - - return &QSslKey{h: (*C.QSslKey)(h)} + return newQSslKey((*C.QSslKey)(h)) } // NewQSslKey constructs a new QSslKey object. func NewQSslKey() *QSslKey { - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new(&outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new()) ret.isSubclass = true return ret } @@ -65,40 +60,32 @@ func NewQSslKey2(encoded []byte, algorithm QSsl__KeyAlgorithm) *QSslKey { encoded_alias := C.struct_miqt_string{} encoded_alias.data = (*C.char)(unsafe.Pointer(&encoded[0])) encoded_alias.len = C.size_t(len(encoded)) - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new2(encoded_alias, (C.int)(algorithm), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new2(encoded_alias, (C.int)(algorithm))) ret.isSubclass = true return ret } // NewQSslKey3 constructs a new QSslKey object. func NewQSslKey3(device *qt.QIODevice, algorithm QSsl__KeyAlgorithm) *QSslKey { - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new3((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new3((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm))) ret.isSubclass = true return ret } // NewQSslKey4 constructs a new QSslKey object. func NewQSslKey4(handle unsafe.Pointer) *QSslKey { - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new4(handle, &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new4(handle)) ret.isSubclass = true return ret } // NewQSslKey5 constructs a new QSslKey object. func NewQSslKey5(other *QSslKey) *QSslKey { - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new5(other.cPointer(), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new5(other.cPointer())) ret.isSubclass = true return ret } @@ -108,10 +95,8 @@ func NewQSslKey6(encoded []byte, algorithm QSsl__KeyAlgorithm, format QSsl__Enco encoded_alias := C.struct_miqt_string{} encoded_alias.data = (*C.char)(unsafe.Pointer(&encoded[0])) encoded_alias.len = C.size_t(len(encoded)) - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new6(encoded_alias, (C.int)(algorithm), (C.int)(format), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new6(encoded_alias, (C.int)(algorithm), (C.int)(format))) ret.isSubclass = true return ret } @@ -121,10 +106,8 @@ func NewQSslKey7(encoded []byte, algorithm QSsl__KeyAlgorithm, format QSsl__Enco encoded_alias := C.struct_miqt_string{} encoded_alias.data = (*C.char)(unsafe.Pointer(&encoded[0])) encoded_alias.len = C.size_t(len(encoded)) - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new7(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new7(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -137,30 +120,24 @@ func NewQSslKey8(encoded []byte, algorithm QSsl__KeyAlgorithm, format QSsl__Enco passPhrase_alias := C.struct_miqt_string{} passPhrase_alias.data = (*C.char)(unsafe.Pointer(&passPhrase[0])) passPhrase_alias.len = C.size_t(len(passPhrase)) - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new8(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias, &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new8(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias)) ret.isSubclass = true return ret } // NewQSslKey9 constructs a new QSslKey object. func NewQSslKey9(device *qt.QIODevice, algorithm QSsl__KeyAlgorithm, format QSsl__EncodingFormat) *QSslKey { - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new9((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new9((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format))) ret.isSubclass = true return ret } // NewQSslKey10 constructs a new QSslKey object. func NewQSslKey10(device *qt.QIODevice, algorithm QSsl__KeyAlgorithm, format QSsl__EncodingFormat, typeVal QSsl__KeyType) *QSslKey { - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new10((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new10((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -170,20 +147,16 @@ func NewQSslKey11(device *qt.QIODevice, algorithm QSsl__KeyAlgorithm, format QSs passPhrase_alias := C.struct_miqt_string{} passPhrase_alias.data = (*C.char)(unsafe.Pointer(&passPhrase[0])) passPhrase_alias.len = C.size_t(len(passPhrase)) - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new11((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias, &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new11((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias)) ret.isSubclass = true return ret } // NewQSslKey12 constructs a new QSslKey object. func NewQSslKey12(handle unsafe.Pointer, typeVal QSsl__KeyType) *QSslKey { - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new12(handle, (C.int)(typeVal), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new12(handle, (C.int)(typeVal))) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qsslkey.h b/qt/network/gen_qsslkey.h index 5050cdb7..5e4f99ff 100644 --- a/qt/network/gen_qsslkey.h +++ b/qt/network/gen_qsslkey.h @@ -22,18 +22,18 @@ typedef struct QIODevice QIODevice; typedef struct QSslKey QSslKey; #endif -void QSslKey_new(QSslKey** outptr_QSslKey); -void QSslKey_new2(struct miqt_string encoded, int algorithm, QSslKey** outptr_QSslKey); -void QSslKey_new3(QIODevice* device, int algorithm, QSslKey** outptr_QSslKey); -void QSslKey_new4(void* handle, QSslKey** outptr_QSslKey); -void QSslKey_new5(QSslKey* other, QSslKey** outptr_QSslKey); -void QSslKey_new6(struct miqt_string encoded, int algorithm, int format, QSslKey** outptr_QSslKey); -void QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey); -void QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey); -void QSslKey_new9(QIODevice* device, int algorithm, int format, QSslKey** outptr_QSslKey); -void QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey); -void QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey); -void QSslKey_new12(void* handle, int typeVal, QSslKey** outptr_QSslKey); +QSslKey* QSslKey_new(); +QSslKey* QSslKey_new2(struct miqt_string encoded, int algorithm); +QSslKey* QSslKey_new3(QIODevice* device, int algorithm); +QSslKey* QSslKey_new4(void* handle); +QSslKey* QSslKey_new5(QSslKey* other); +QSslKey* QSslKey_new6(struct miqt_string encoded, int algorithm, int format); +QSslKey* QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal); +QSslKey* QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase); +QSslKey* QSslKey_new9(QIODevice* device, int algorithm, int format); +QSslKey* QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal); +QSslKey* QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase); +QSslKey* QSslKey_new12(void* handle, int typeVal); void QSslKey_OperatorAssign(QSslKey* self, QSslKey* other); void QSslKey_Swap(QSslKey* self, QSslKey* other); bool QSslKey_IsNull(const QSslKey* self); diff --git a/qt/network/gen_qsslpresharedkeyauthenticator.cpp b/qt/network/gen_qsslpresharedkeyauthenticator.cpp index b54b3773..9bf87597 100644 --- a/qt/network/gen_qsslpresharedkeyauthenticator.cpp +++ b/qt/network/gen_qsslpresharedkeyauthenticator.cpp @@ -4,14 +4,12 @@ #include "gen_qsslpresharedkeyauthenticator.h" #include "_cgo_export.h" -void QSslPreSharedKeyAuthenticator_new(QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator) { - QSslPreSharedKeyAuthenticator* ret = new QSslPreSharedKeyAuthenticator(); - *outptr_QSslPreSharedKeyAuthenticator = ret; +QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new() { + return new QSslPreSharedKeyAuthenticator(); } -void QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator, QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator) { - QSslPreSharedKeyAuthenticator* ret = new QSslPreSharedKeyAuthenticator(*authenticator); - *outptr_QSslPreSharedKeyAuthenticator = ret; +QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator) { + return new QSslPreSharedKeyAuthenticator(*authenticator); } void QSslPreSharedKeyAuthenticator_OperatorAssign(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* authenticator) { diff --git a/qt/network/gen_qsslpresharedkeyauthenticator.go b/qt/network/gen_qsslpresharedkeyauthenticator.go index 1f542514..c1aa8d01 100644 --- a/qt/network/gen_qsslpresharedkeyauthenticator.go +++ b/qt/network/gen_qsslpresharedkeyauthenticator.go @@ -37,34 +37,27 @@ func newQSslPreSharedKeyAuthenticator(h *C.QSslPreSharedKeyAuthenticator) *QSslP if h == nil { return nil } + return &QSslPreSharedKeyAuthenticator{h: h} } // UnsafeNewQSslPreSharedKeyAuthenticator constructs the type using only unsafe pointers. func UnsafeNewQSslPreSharedKeyAuthenticator(h unsafe.Pointer) *QSslPreSharedKeyAuthenticator { - if h == nil { - return nil - } - - return &QSslPreSharedKeyAuthenticator{h: (*C.QSslPreSharedKeyAuthenticator)(h)} + return newQSslPreSharedKeyAuthenticator((*C.QSslPreSharedKeyAuthenticator)(h)) } // NewQSslPreSharedKeyAuthenticator constructs a new QSslPreSharedKeyAuthenticator object. func NewQSslPreSharedKeyAuthenticator() *QSslPreSharedKeyAuthenticator { - var outptr_QSslPreSharedKeyAuthenticator *C.QSslPreSharedKeyAuthenticator = nil - C.QSslPreSharedKeyAuthenticator_new(&outptr_QSslPreSharedKeyAuthenticator) - ret := newQSslPreSharedKeyAuthenticator(outptr_QSslPreSharedKeyAuthenticator) + ret := newQSslPreSharedKeyAuthenticator(C.QSslPreSharedKeyAuthenticator_new()) ret.isSubclass = true return ret } // NewQSslPreSharedKeyAuthenticator2 constructs a new QSslPreSharedKeyAuthenticator object. func NewQSslPreSharedKeyAuthenticator2(authenticator *QSslPreSharedKeyAuthenticator) *QSslPreSharedKeyAuthenticator { - var outptr_QSslPreSharedKeyAuthenticator *C.QSslPreSharedKeyAuthenticator = nil - C.QSslPreSharedKeyAuthenticator_new2(authenticator.cPointer(), &outptr_QSslPreSharedKeyAuthenticator) - ret := newQSslPreSharedKeyAuthenticator(outptr_QSslPreSharedKeyAuthenticator) + ret := newQSslPreSharedKeyAuthenticator(C.QSslPreSharedKeyAuthenticator_new2(authenticator.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qsslpresharedkeyauthenticator.h b/qt/network/gen_qsslpresharedkeyauthenticator.h index 579e36d2..59f804d5 100644 --- a/qt/network/gen_qsslpresharedkeyauthenticator.h +++ b/qt/network/gen_qsslpresharedkeyauthenticator.h @@ -20,8 +20,8 @@ class QSslPreSharedKeyAuthenticator; typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; #endif -void QSslPreSharedKeyAuthenticator_new(QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator); -void QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator, QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator); +QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new(); +QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator); void QSslPreSharedKeyAuthenticator_OperatorAssign(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* authenticator); void QSslPreSharedKeyAuthenticator_Swap(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* other); struct miqt_string QSslPreSharedKeyAuthenticator_IdentityHint(const QSslPreSharedKeyAuthenticator* self); diff --git a/qt/network/gen_qsslsocket.cpp b/qt/network/gen_qsslsocket.cpp index 426ed327..81b5b3f1 100644 --- a/qt/network/gen_qsslsocket.cpp +++ b/qt/network/gen_qsslsocket.cpp @@ -477,22 +477,16 @@ public: }; -void QSslSocket_new(QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQSslSocket* ret = new MiqtVirtualQSslSocket(); - *outptr_QSslSocket = ret; - *outptr_QTcpSocket = static_cast(ret); - *outptr_QAbstractSocket = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSslSocket* QSslSocket_new() { + return new MiqtVirtualQSslSocket(); } -void QSslSocket_new2(QObject* parent, QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQSslSocket* ret = new MiqtVirtualQSslSocket(parent); - *outptr_QSslSocket = ret; - *outptr_QTcpSocket = static_cast(ret); - *outptr_QAbstractSocket = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSslSocket* QSslSocket_new2(QObject* parent) { + return new MiqtVirtualQSslSocket(parent); +} + +void QSslSocket_virtbase(QSslSocket* src, QTcpSocket** outptr_QTcpSocket) { + *outptr_QTcpSocket = static_cast(src); } QMetaObject* QSslSocket_MetaObject(const QSslSocket* self) { diff --git a/qt/network/gen_qsslsocket.go b/qt/network/gen_qsslsocket.go index c624345f..0effb150 100644 --- a/qt/network/gen_qsslsocket.go +++ b/qt/network/gen_qsslsocket.go @@ -53,48 +53,34 @@ func (this *QSslSocket) UnsafePointer() unsafe.Pointer { } // newQSslSocket constructs the type using only CGO pointers. -func newQSslSocket(h *C.QSslSocket, h_QTcpSocket *C.QTcpSocket, h_QAbstractSocket *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QSslSocket { +func newQSslSocket(h *C.QSslSocket) *QSslSocket { if h == nil { return nil } + var outptr_QTcpSocket *C.QTcpSocket = nil + C.QSslSocket_virtbase(h, &outptr_QTcpSocket) + return &QSslSocket{h: h, - QTcpSocket: newQTcpSocket(h_QTcpSocket, h_QAbstractSocket, h_QIODevice, h_QObject)} + QTcpSocket: newQTcpSocket(outptr_QTcpSocket)} } // UnsafeNewQSslSocket constructs the type using only unsafe pointers. -func UnsafeNewQSslSocket(h unsafe.Pointer, h_QTcpSocket unsafe.Pointer, h_QAbstractSocket unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QSslSocket { - if h == nil { - return nil - } - - return &QSslSocket{h: (*C.QSslSocket)(h), - QTcpSocket: UnsafeNewQTcpSocket(h_QTcpSocket, h_QAbstractSocket, h_QIODevice, h_QObject)} +func UnsafeNewQSslSocket(h unsafe.Pointer) *QSslSocket { + return newQSslSocket((*C.QSslSocket)(h)) } // NewQSslSocket constructs a new QSslSocket object. func NewQSslSocket() *QSslSocket { - var outptr_QSslSocket *C.QSslSocket = nil - var outptr_QTcpSocket *C.QTcpSocket = nil - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QSslSocket_new(&outptr_QSslSocket, &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject) - ret := newQSslSocket(outptr_QSslSocket, outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject) + ret := newQSslSocket(C.QSslSocket_new()) ret.isSubclass = true return ret } // NewQSslSocket2 constructs a new QSslSocket object. func NewQSslSocket2(parent *qt.QObject) *QSslSocket { - var outptr_QSslSocket *C.QSslSocket = nil - var outptr_QTcpSocket *C.QTcpSocket = nil - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QSslSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QSslSocket, &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject) - ret := newQSslSocket(outptr_QSslSocket, outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject) + ret := newQSslSocket(C.QSslSocket_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qsslsocket.h b/qt/network/gen_qsslsocket.h index 3124a6ac..e4e9df27 100644 --- a/qt/network/gen_qsslsocket.h +++ b/qt/network/gen_qsslsocket.h @@ -46,8 +46,9 @@ typedef struct QTcpSocket QTcpSocket; typedef struct QVariant QVariant; #endif -void QSslSocket_new(QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QSslSocket_new2(QObject* parent, QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +QSslSocket* QSslSocket_new(); +QSslSocket* QSslSocket_new2(QObject* parent); +void QSslSocket_virtbase(QSslSocket* src, QTcpSocket** outptr_QTcpSocket); QMetaObject* QSslSocket_MetaObject(const QSslSocket* self); void* QSslSocket_Metacast(QSslSocket* self, const char* param1); struct miqt_string QSslSocket_Tr(const char* s); diff --git a/qt/network/gen_qtcpserver.cpp b/qt/network/gen_qtcpserver.cpp index 4c963f32..6a6999ff 100644 --- a/qt/network/gen_qtcpserver.cpp +++ b/qt/network/gen_qtcpserver.cpp @@ -265,16 +265,16 @@ public: }; -void QTcpServer_new(QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { - MiqtVirtualQTcpServer* ret = new MiqtVirtualQTcpServer(); - *outptr_QTcpServer = ret; - *outptr_QObject = static_cast(ret); +QTcpServer* QTcpServer_new() { + return new MiqtVirtualQTcpServer(); } -void QTcpServer_new2(QObject* parent, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { - MiqtVirtualQTcpServer* ret = new MiqtVirtualQTcpServer(parent); - *outptr_QTcpServer = ret; - *outptr_QObject = static_cast(ret); +QTcpServer* QTcpServer_new2(QObject* parent) { + return new MiqtVirtualQTcpServer(parent); +} + +void QTcpServer_virtbase(QTcpServer* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QTcpServer_MetaObject(const QTcpServer* self) { diff --git a/qt/network/gen_qtcpserver.go b/qt/network/gen_qtcpserver.go index 19a25ba2..a255f4d1 100644 --- a/qt/network/gen_qtcpserver.go +++ b/qt/network/gen_qtcpserver.go @@ -36,42 +36,34 @@ func (this *QTcpServer) UnsafePointer() unsafe.Pointer { } // newQTcpServer constructs the type using only CGO pointers. -func newQTcpServer(h *C.QTcpServer, h_QObject *C.QObject) *QTcpServer { +func newQTcpServer(h *C.QTcpServer) *QTcpServer { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QTcpServer_virtbase(h, &outptr_QObject) + return &QTcpServer{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQTcpServer constructs the type using only unsafe pointers. -func UnsafeNewQTcpServer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTcpServer { - if h == nil { - return nil - } - - return &QTcpServer{h: (*C.QTcpServer)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQTcpServer(h unsafe.Pointer) *QTcpServer { + return newQTcpServer((*C.QTcpServer)(h)) } // NewQTcpServer constructs a new QTcpServer object. func NewQTcpServer() *QTcpServer { - var outptr_QTcpServer *C.QTcpServer = nil - var outptr_QObject *C.QObject = nil - C.QTcpServer_new(&outptr_QTcpServer, &outptr_QObject) - ret := newQTcpServer(outptr_QTcpServer, outptr_QObject) + ret := newQTcpServer(C.QTcpServer_new()) ret.isSubclass = true return ret } // NewQTcpServer2 constructs a new QTcpServer object. func NewQTcpServer2(parent *qt.QObject) *QTcpServer { - var outptr_QTcpServer *C.QTcpServer = nil - var outptr_QObject *C.QObject = nil - C.QTcpServer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QTcpServer, &outptr_QObject) - ret := newQTcpServer(outptr_QTcpServer, outptr_QObject) + ret := newQTcpServer(C.QTcpServer_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -151,7 +143,7 @@ func (this *QTcpServer) HasPendingConnections() bool { } func (this *QTcpServer) NextPendingConnection() *QTcpSocket { - return newQTcpSocket(C.QTcpServer_NextPendingConnection(this.h), nil, nil, nil) + return newQTcpSocket(C.QTcpServer_NextPendingConnection(this.h)) } func (this *QTcpServer) ServerError() QAbstractSocket__SocketError { @@ -307,7 +299,7 @@ func miqt_exec_callback_QTcpServer_HasPendingConnections(self *C.QTcpServer, cb func (this *QTcpServer) callVirtualBase_NextPendingConnection() *QTcpSocket { - return newQTcpSocket(C.QTcpServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h)), nil, nil, nil) + return newQTcpSocket(C.QTcpServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h))) } func (this *QTcpServer) OnNextPendingConnection(slot func(super func() *QTcpSocket) *QTcpSocket) { @@ -434,7 +426,7 @@ func miqt_exec_callback_QTcpServer_TimerEvent(self *C.QTcpServer, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QTcpServer{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -460,7 +452,7 @@ func miqt_exec_callback_QTcpServer_ChildEvent(self *C.QTcpServer, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QTcpServer{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/network/gen_qtcpserver.h b/qt/network/gen_qtcpserver.h index 7990b98c..443aa1da 100644 --- a/qt/network/gen_qtcpserver.h +++ b/qt/network/gen_qtcpserver.h @@ -38,8 +38,9 @@ typedef struct QTcpSocket QTcpSocket; typedef struct QTimerEvent QTimerEvent; #endif -void QTcpServer_new(QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); -void QTcpServer_new2(QObject* parent, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); +QTcpServer* QTcpServer_new(); +QTcpServer* QTcpServer_new2(QObject* parent); +void QTcpServer_virtbase(QTcpServer* src, QObject** outptr_QObject); QMetaObject* QTcpServer_MetaObject(const QTcpServer* self); void* QTcpServer_Metacast(QTcpServer* self, const char* param1); struct miqt_string QTcpServer_Tr(const char* s); diff --git a/qt/network/gen_qtcpsocket.cpp b/qt/network/gen_qtcpsocket.cpp index 7022b8d5..7617178f 100644 --- a/qt/network/gen_qtcpsocket.cpp +++ b/qt/network/gen_qtcpsocket.cpp @@ -538,20 +538,16 @@ public: }; -void QTcpSocket_new(QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQTcpSocket* ret = new MiqtVirtualQTcpSocket(); - *outptr_QTcpSocket = ret; - *outptr_QAbstractSocket = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTcpSocket* QTcpSocket_new() { + return new MiqtVirtualQTcpSocket(); } -void QTcpSocket_new2(QObject* parent, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQTcpSocket* ret = new MiqtVirtualQTcpSocket(parent); - *outptr_QTcpSocket = ret; - *outptr_QAbstractSocket = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTcpSocket* QTcpSocket_new2(QObject* parent) { + return new MiqtVirtualQTcpSocket(parent); +} + +void QTcpSocket_virtbase(QTcpSocket* src, QAbstractSocket** outptr_QAbstractSocket) { + *outptr_QAbstractSocket = static_cast(src); } QMetaObject* QTcpSocket_MetaObject(const QTcpSocket* self) { diff --git a/qt/network/gen_qtcpsocket.go b/qt/network/gen_qtcpsocket.go index 793abd61..e7fc8ab2 100644 --- a/qt/network/gen_qtcpsocket.go +++ b/qt/network/gen_qtcpsocket.go @@ -36,46 +36,34 @@ func (this *QTcpSocket) UnsafePointer() unsafe.Pointer { } // newQTcpSocket constructs the type using only CGO pointers. -func newQTcpSocket(h *C.QTcpSocket, h_QAbstractSocket *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QTcpSocket { +func newQTcpSocket(h *C.QTcpSocket) *QTcpSocket { if h == nil { return nil } + var outptr_QAbstractSocket *C.QAbstractSocket = nil + C.QTcpSocket_virtbase(h, &outptr_QAbstractSocket) + return &QTcpSocket{h: h, - QAbstractSocket: newQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject)} + QAbstractSocket: newQAbstractSocket(outptr_QAbstractSocket)} } // UnsafeNewQTcpSocket constructs the type using only unsafe pointers. -func UnsafeNewQTcpSocket(h unsafe.Pointer, h_QAbstractSocket unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QTcpSocket { - if h == nil { - return nil - } - - return &QTcpSocket{h: (*C.QTcpSocket)(h), - QAbstractSocket: UnsafeNewQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject)} +func UnsafeNewQTcpSocket(h unsafe.Pointer) *QTcpSocket { + return newQTcpSocket((*C.QTcpSocket)(h)) } // NewQTcpSocket constructs a new QTcpSocket object. func NewQTcpSocket() *QTcpSocket { - var outptr_QTcpSocket *C.QTcpSocket = nil - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QTcpSocket_new(&outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject) - ret := newQTcpSocket(outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject) + ret := newQTcpSocket(C.QTcpSocket_new()) ret.isSubclass = true return ret } // NewQTcpSocket2 constructs a new QTcpSocket object. func NewQTcpSocket2(parent *qt.QObject) *QTcpSocket { - var outptr_QTcpSocket *C.QTcpSocket = nil - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QTcpSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject) - ret := newQTcpSocket(outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject) + ret := newQTcpSocket(C.QTcpSocket_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qtcpsocket.h b/qt/network/gen_qtcpsocket.h index d900b147..46cd336b 100644 --- a/qt/network/gen_qtcpsocket.h +++ b/qt/network/gen_qtcpsocket.h @@ -30,8 +30,9 @@ typedef struct QTcpSocket QTcpSocket; typedef struct QVariant QVariant; #endif -void QTcpSocket_new(QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QTcpSocket_new2(QObject* parent, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +QTcpSocket* QTcpSocket_new(); +QTcpSocket* QTcpSocket_new2(QObject* parent); +void QTcpSocket_virtbase(QTcpSocket* src, QAbstractSocket** outptr_QAbstractSocket); QMetaObject* QTcpSocket_MetaObject(const QTcpSocket* self); void* QTcpSocket_Metacast(QTcpSocket* self, const char* param1); struct miqt_string QTcpSocket_Tr(const char* s); diff --git a/qt/network/gen_qudpsocket.cpp b/qt/network/gen_qudpsocket.cpp index 4cfcd33e..fabce554 100644 --- a/qt/network/gen_qudpsocket.cpp +++ b/qt/network/gen_qudpsocket.cpp @@ -542,20 +542,16 @@ public: }; -void QUdpSocket_new(QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQUdpSocket* ret = new MiqtVirtualQUdpSocket(); - *outptr_QUdpSocket = ret; - *outptr_QAbstractSocket = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QUdpSocket* QUdpSocket_new() { + return new MiqtVirtualQUdpSocket(); } -void QUdpSocket_new2(QObject* parent, QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject) { - MiqtVirtualQUdpSocket* ret = new MiqtVirtualQUdpSocket(parent); - *outptr_QUdpSocket = ret; - *outptr_QAbstractSocket = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QUdpSocket* QUdpSocket_new2(QObject* parent) { + return new MiqtVirtualQUdpSocket(parent); +} + +void QUdpSocket_virtbase(QUdpSocket* src, QAbstractSocket** outptr_QAbstractSocket) { + *outptr_QAbstractSocket = static_cast(src); } QMetaObject* QUdpSocket_MetaObject(const QUdpSocket* self) { diff --git a/qt/network/gen_qudpsocket.go b/qt/network/gen_qudpsocket.go index 64d9831d..de561692 100644 --- a/qt/network/gen_qudpsocket.go +++ b/qt/network/gen_qudpsocket.go @@ -36,46 +36,34 @@ func (this *QUdpSocket) UnsafePointer() unsafe.Pointer { } // newQUdpSocket constructs the type using only CGO pointers. -func newQUdpSocket(h *C.QUdpSocket, h_QAbstractSocket *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject) *QUdpSocket { +func newQUdpSocket(h *C.QUdpSocket) *QUdpSocket { if h == nil { return nil } + var outptr_QAbstractSocket *C.QAbstractSocket = nil + C.QUdpSocket_virtbase(h, &outptr_QAbstractSocket) + return &QUdpSocket{h: h, - QAbstractSocket: newQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject)} + QAbstractSocket: newQAbstractSocket(outptr_QAbstractSocket)} } // UnsafeNewQUdpSocket constructs the type using only unsafe pointers. -func UnsafeNewQUdpSocket(h unsafe.Pointer, h_QAbstractSocket unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer) *QUdpSocket { - if h == nil { - return nil - } - - return &QUdpSocket{h: (*C.QUdpSocket)(h), - QAbstractSocket: UnsafeNewQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject)} +func UnsafeNewQUdpSocket(h unsafe.Pointer) *QUdpSocket { + return newQUdpSocket((*C.QUdpSocket)(h)) } // NewQUdpSocket constructs a new QUdpSocket object. func NewQUdpSocket() *QUdpSocket { - var outptr_QUdpSocket *C.QUdpSocket = nil - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QUdpSocket_new(&outptr_QUdpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject) - ret := newQUdpSocket(outptr_QUdpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject) + ret := newQUdpSocket(C.QUdpSocket_new()) ret.isSubclass = true return ret } // NewQUdpSocket2 constructs a new QUdpSocket object. func NewQUdpSocket2(parent *qt.QObject) *QUdpSocket { - var outptr_QUdpSocket *C.QUdpSocket = nil - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - C.QUdpSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QUdpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject) - ret := newQUdpSocket(outptr_QUdpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject) + ret := newQUdpSocket(C.QUdpSocket_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt/network/gen_qudpsocket.h b/qt/network/gen_qudpsocket.h index 12315d52..2993a8fa 100644 --- a/qt/network/gen_qudpsocket.h +++ b/qt/network/gen_qudpsocket.h @@ -36,8 +36,9 @@ typedef struct QUdpSocket QUdpSocket; typedef struct QVariant QVariant; #endif -void QUdpSocket_new(QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); -void QUdpSocket_new2(QObject* parent, QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject); +QUdpSocket* QUdpSocket_new(); +QUdpSocket* QUdpSocket_new2(QObject* parent); +void QUdpSocket_virtbase(QUdpSocket* src, QAbstractSocket** outptr_QAbstractSocket); QMetaObject* QUdpSocket_MetaObject(const QUdpSocket* self); void* QUdpSocket_Metacast(QUdpSocket* self, const char* param1); struct miqt_string QUdpSocket_Tr(const char* s); diff --git a/qt/printsupport/gen_qabstractprintdialog.cpp b/qt/printsupport/gen_qabstractprintdialog.cpp index fa17df9f..1c988700 100644 --- a/qt/printsupport/gen_qabstractprintdialog.cpp +++ b/qt/printsupport/gen_qabstractprintdialog.cpp @@ -357,22 +357,16 @@ public: }; -void QAbstractPrintDialog_new(QPrinter* printer, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractPrintDialog* ret = new MiqtVirtualQAbstractPrintDialog(printer); - *outptr_QAbstractPrintDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractPrintDialog* QAbstractPrintDialog_new(QPrinter* printer) { + return new MiqtVirtualQAbstractPrintDialog(printer); } -void QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractPrintDialog* ret = new MiqtVirtualQAbstractPrintDialog(printer, parent); - *outptr_QAbstractPrintDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractPrintDialog* QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent) { + return new MiqtVirtualQAbstractPrintDialog(printer, parent); +} + +void QAbstractPrintDialog_virtbase(QAbstractPrintDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QAbstractPrintDialog_MetaObject(const QAbstractPrintDialog* self) { diff --git a/qt/printsupport/gen_qabstractprintdialog.go b/qt/printsupport/gen_qabstractprintdialog.go index 40f071e4..c713804c 100644 --- a/qt/printsupport/gen_qabstractprintdialog.go +++ b/qt/printsupport/gen_qabstractprintdialog.go @@ -58,48 +58,34 @@ func (this *QAbstractPrintDialog) UnsafePointer() unsafe.Pointer { } // newQAbstractPrintDialog constructs the type using only CGO pointers. -func newQAbstractPrintDialog(h *C.QAbstractPrintDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractPrintDialog { +func newQAbstractPrintDialog(h *C.QAbstractPrintDialog) *QAbstractPrintDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QAbstractPrintDialog_virtbase(h, &outptr_QDialog) + return &QAbstractPrintDialog{h: h, - QDialog: qt.UnsafeNewQDialog(unsafe.Pointer(h_QDialog), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QDialog: qt.UnsafeNewQDialog(unsafe.Pointer(outptr_QDialog))} } // UnsafeNewQAbstractPrintDialog constructs the type using only unsafe pointers. -func UnsafeNewQAbstractPrintDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractPrintDialog { - if h == nil { - return nil - } - - return &QAbstractPrintDialog{h: (*C.QAbstractPrintDialog)(h), - QDialog: qt.UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQAbstractPrintDialog(h unsafe.Pointer) *QAbstractPrintDialog { + return newQAbstractPrintDialog((*C.QAbstractPrintDialog)(h)) } // NewQAbstractPrintDialog constructs a new QAbstractPrintDialog object. func NewQAbstractPrintDialog(printer *QPrinter) *QAbstractPrintDialog { - var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractPrintDialog_new(printer.cPointer(), &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractPrintDialog(outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractPrintDialog(C.QAbstractPrintDialog_new(printer.cPointer())) ret.isSubclass = true return ret } // NewQAbstractPrintDialog2 constructs a new QAbstractPrintDialog object. func NewQAbstractPrintDialog2(printer *QPrinter, parent *qt.QWidget) *QAbstractPrintDialog { - var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractPrintDialog_new2(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractPrintDialog(outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractPrintDialog(C.QAbstractPrintDialog_new2(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -191,7 +177,7 @@ func (this *QAbstractPrintDialog) ToPage() int { } func (this *QAbstractPrintDialog) Printer() *QPrinter { - return newQPrinter(C.QAbstractPrintDialog_Printer(this.h), nil, nil) + return newQPrinter(C.QAbstractPrintDialog_Printer(this.h)) } func QAbstractPrintDialog_Tr2(s string, c string) string { @@ -458,7 +444,7 @@ func miqt_exec_callback_QAbstractPrintDialog_KeyPressEvent(self *C.QAbstractPrin } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1)) gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -484,7 +470,7 @@ func miqt_exec_callback_QAbstractPrintDialog_CloseEvent(self *C.QAbstractPrintDi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(param1)) gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -510,7 +496,7 @@ func miqt_exec_callback_QAbstractPrintDialog_ShowEvent(self *C.QAbstractPrintDia } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(param1)) gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -536,7 +522,7 @@ func miqt_exec_callback_QAbstractPrintDialog_ResizeEvent(self *C.QAbstractPrintD } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(param1)) gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -562,7 +548,7 @@ func miqt_exec_callback_QAbstractPrintDialog_ContextMenuEvent(self *C.QAbstractP } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1)) gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt/printsupport/gen_qabstractprintdialog.h b/qt/printsupport/gen_qabstractprintdialog.h index 7ebdfee0..ce0f8628 100644 --- a/qt/printsupport/gen_qabstractprintdialog.h +++ b/qt/printsupport/gen_qabstractprintdialog.h @@ -46,8 +46,9 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QAbstractPrintDialog_new(QPrinter* printer, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QAbstractPrintDialog* QAbstractPrintDialog_new(QPrinter* printer); +QAbstractPrintDialog* QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent); +void QAbstractPrintDialog_virtbase(QAbstractPrintDialog* src, QDialog** outptr_QDialog); QMetaObject* QAbstractPrintDialog_MetaObject(const QAbstractPrintDialog* self); void* QAbstractPrintDialog_Metacast(QAbstractPrintDialog* self, const char* param1); struct miqt_string QAbstractPrintDialog_Tr(const char* s); diff --git a/qt/printsupport/gen_qpagesetupdialog.cpp b/qt/printsupport/gen_qpagesetupdialog.cpp index 8135347f..18d9b6ee 100644 --- a/qt/printsupport/gen_qpagesetupdialog.cpp +++ b/qt/printsupport/gen_qpagesetupdialog.cpp @@ -358,40 +358,24 @@ public: }; -void QPageSetupDialog_new(QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(parent); - *outptr_QPageSetupDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPageSetupDialog* QPageSetupDialog_new(QWidget* parent) { + return new MiqtVirtualQPageSetupDialog(parent); } -void QPageSetupDialog_new2(QPrinter* printer, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(printer); - *outptr_QPageSetupDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPageSetupDialog* QPageSetupDialog_new2(QPrinter* printer) { + return new MiqtVirtualQPageSetupDialog(printer); } -void QPageSetupDialog_new3(QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(); - *outptr_QPageSetupDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPageSetupDialog* QPageSetupDialog_new3() { + return new MiqtVirtualQPageSetupDialog(); } -void QPageSetupDialog_new4(QPrinter* printer, QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(printer, parent); - *outptr_QPageSetupDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPageSetupDialog* QPageSetupDialog_new4(QPrinter* printer, QWidget* parent) { + return new MiqtVirtualQPageSetupDialog(printer, parent); +} + +void QPageSetupDialog_virtbase(QPageSetupDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QPageSetupDialog_MetaObject(const QPageSetupDialog* self) { diff --git a/qt/printsupport/gen_qpagesetupdialog.go b/qt/printsupport/gen_qpagesetupdialog.go index f0f3c4be..f99253b6 100644 --- a/qt/printsupport/gen_qpagesetupdialog.go +++ b/qt/printsupport/gen_qpagesetupdialog.go @@ -36,76 +36,50 @@ func (this *QPageSetupDialog) UnsafePointer() unsafe.Pointer { } // newQPageSetupDialog constructs the type using only CGO pointers. -func newQPageSetupDialog(h *C.QPageSetupDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPageSetupDialog { +func newQPageSetupDialog(h *C.QPageSetupDialog) *QPageSetupDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QPageSetupDialog_virtbase(h, &outptr_QDialog) + return &QPageSetupDialog{h: h, - QDialog: qt.UnsafeNewQDialog(unsafe.Pointer(h_QDialog), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QDialog: qt.UnsafeNewQDialog(unsafe.Pointer(outptr_QDialog))} } // UnsafeNewQPageSetupDialog constructs the type using only unsafe pointers. -func UnsafeNewQPageSetupDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPageSetupDialog { - if h == nil { - return nil - } - - return &QPageSetupDialog{h: (*C.QPageSetupDialog)(h), - QDialog: qt.UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQPageSetupDialog(h unsafe.Pointer) *QPageSetupDialog { + return newQPageSetupDialog((*C.QPageSetupDialog)(h)) } // NewQPageSetupDialog constructs a new QPageSetupDialog object. func NewQPageSetupDialog(parent *qt.QWidget) *QPageSetupDialog { - var outptr_QPageSetupDialog *C.QPageSetupDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPageSetupDialog_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPageSetupDialog(C.QPageSetupDialog_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQPageSetupDialog2 constructs a new QPageSetupDialog object. func NewQPageSetupDialog2(printer *QPrinter) *QPageSetupDialog { - var outptr_QPageSetupDialog *C.QPageSetupDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPageSetupDialog_new2(printer.cPointer(), &outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPageSetupDialog(C.QPageSetupDialog_new2(printer.cPointer())) ret.isSubclass = true return ret } // NewQPageSetupDialog3 constructs a new QPageSetupDialog object. func NewQPageSetupDialog3() *QPageSetupDialog { - var outptr_QPageSetupDialog *C.QPageSetupDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPageSetupDialog_new3(&outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPageSetupDialog(C.QPageSetupDialog_new3()) ret.isSubclass = true return ret } // NewQPageSetupDialog4 constructs a new QPageSetupDialog object. func NewQPageSetupDialog4(printer *QPrinter, parent *qt.QWidget) *QPageSetupDialog { - var outptr_QPageSetupDialog *C.QPageSetupDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPageSetupDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPageSetupDialog(C.QPageSetupDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -147,7 +121,7 @@ func (this *QPageSetupDialog) Done(result int) { } func (this *QPageSetupDialog) Printer() *QPrinter { - return newQPrinter(C.QPageSetupDialog_Printer(this.h), nil, nil) + return newQPrinter(C.QPageSetupDialog_Printer(this.h)) } func QPageSetupDialog_Tr2(s string, c string) string { @@ -414,7 +388,7 @@ func miqt_exec_callback_QPageSetupDialog_KeyPressEvent(self *C.QPageSetupDialog, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1)) gofunc((&QPageSetupDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -440,7 +414,7 @@ func miqt_exec_callback_QPageSetupDialog_CloseEvent(self *C.QPageSetupDialog, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(param1)) gofunc((&QPageSetupDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -466,7 +440,7 @@ func miqt_exec_callback_QPageSetupDialog_ShowEvent(self *C.QPageSetupDialog, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(param1)) gofunc((&QPageSetupDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -492,7 +466,7 @@ func miqt_exec_callback_QPageSetupDialog_ResizeEvent(self *C.QPageSetupDialog, c } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(param1)) gofunc((&QPageSetupDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -518,7 +492,7 @@ func miqt_exec_callback_QPageSetupDialog_ContextMenuEvent(self *C.QPageSetupDial } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1)) gofunc((&QPageSetupDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt/printsupport/gen_qpagesetupdialog.h b/qt/printsupport/gen_qpagesetupdialog.h index 2e4af89a..1a763500 100644 --- a/qt/printsupport/gen_qpagesetupdialog.h +++ b/qt/printsupport/gen_qpagesetupdialog.h @@ -46,10 +46,11 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QPageSetupDialog_new(QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPageSetupDialog_new2(QPrinter* printer, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPageSetupDialog_new3(QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPageSetupDialog_new4(QPrinter* printer, QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QPageSetupDialog* QPageSetupDialog_new(QWidget* parent); +QPageSetupDialog* QPageSetupDialog_new2(QPrinter* printer); +QPageSetupDialog* QPageSetupDialog_new3(); +QPageSetupDialog* QPageSetupDialog_new4(QPrinter* printer, QWidget* parent); +void QPageSetupDialog_virtbase(QPageSetupDialog* src, QDialog** outptr_QDialog); QMetaObject* QPageSetupDialog_MetaObject(const QPageSetupDialog* self); void* QPageSetupDialog_Metacast(QPageSetupDialog* self, const char* param1); struct miqt_string QPageSetupDialog_Tr(const char* s); diff --git a/qt/printsupport/gen_qprintdialog.cpp b/qt/printsupport/gen_qprintdialog.cpp index 1cd8d67b..2e234162 100644 --- a/qt/printsupport/gen_qprintdialog.cpp +++ b/qt/printsupport/gen_qprintdialog.cpp @@ -118,44 +118,24 @@ public: }; -void QPrintDialog_new(QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(parent); - *outptr_QPrintDialog = ret; - *outptr_QAbstractPrintDialog = static_cast(ret); - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintDialog* QPrintDialog_new(QWidget* parent) { + return new MiqtVirtualQPrintDialog(parent); } -void QPrintDialog_new2(QPrinter* printer, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(printer); - *outptr_QPrintDialog = ret; - *outptr_QAbstractPrintDialog = static_cast(ret); - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintDialog* QPrintDialog_new2(QPrinter* printer) { + return new MiqtVirtualQPrintDialog(printer); } -void QPrintDialog_new3(QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(); - *outptr_QPrintDialog = ret; - *outptr_QAbstractPrintDialog = static_cast(ret); - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintDialog* QPrintDialog_new3() { + return new MiqtVirtualQPrintDialog(); } -void QPrintDialog_new4(QPrinter* printer, QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(printer, parent); - *outptr_QPrintDialog = ret; - *outptr_QAbstractPrintDialog = static_cast(ret); - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintDialog* QPrintDialog_new4(QPrinter* printer, QWidget* parent) { + return new MiqtVirtualQPrintDialog(printer, parent); +} + +void QPrintDialog_virtbase(QPrintDialog* src, QAbstractPrintDialog** outptr_QAbstractPrintDialog) { + *outptr_QAbstractPrintDialog = static_cast(src); } QMetaObject* QPrintDialog_MetaObject(const QPrintDialog* self) { diff --git a/qt/printsupport/gen_qprintdialog.go b/qt/printsupport/gen_qprintdialog.go index 3f4f3ea7..01172691 100644 --- a/qt/printsupport/gen_qprintdialog.go +++ b/qt/printsupport/gen_qprintdialog.go @@ -36,80 +36,50 @@ func (this *QPrintDialog) UnsafePointer() unsafe.Pointer { } // newQPrintDialog constructs the type using only CGO pointers. -func newQPrintDialog(h *C.QPrintDialog, h_QAbstractPrintDialog *C.QAbstractPrintDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPrintDialog { +func newQPrintDialog(h *C.QPrintDialog) *QPrintDialog { if h == nil { return nil } + var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil + C.QPrintDialog_virtbase(h, &outptr_QAbstractPrintDialog) + return &QPrintDialog{h: h, - QAbstractPrintDialog: newQAbstractPrintDialog(h_QAbstractPrintDialog, h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractPrintDialog: newQAbstractPrintDialog(outptr_QAbstractPrintDialog)} } // UnsafeNewQPrintDialog constructs the type using only unsafe pointers. -func UnsafeNewQPrintDialog(h unsafe.Pointer, h_QAbstractPrintDialog unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrintDialog { - if h == nil { - return nil - } - - return &QPrintDialog{h: (*C.QPrintDialog)(h), - QAbstractPrintDialog: UnsafeNewQAbstractPrintDialog(h_QAbstractPrintDialog, h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQPrintDialog(h unsafe.Pointer) *QPrintDialog { + return newQPrintDialog((*C.QPrintDialog)(h)) } // NewQPrintDialog constructs a new QPrintDialog object. func NewQPrintDialog(parent *qt.QWidget) *QPrintDialog { - var outptr_QPrintDialog *C.QPrintDialog = nil - var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintDialog_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintDialog(C.QPrintDialog_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQPrintDialog2 constructs a new QPrintDialog object. func NewQPrintDialog2(printer *QPrinter) *QPrintDialog { - var outptr_QPrintDialog *C.QPrintDialog = nil - var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintDialog_new2(printer.cPointer(), &outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintDialog(C.QPrintDialog_new2(printer.cPointer())) ret.isSubclass = true return ret } // NewQPrintDialog3 constructs a new QPrintDialog object. func NewQPrintDialog3() *QPrintDialog { - var outptr_QPrintDialog *C.QPrintDialog = nil - var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintDialog_new3(&outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintDialog(C.QPrintDialog_new3()) ret.isSubclass = true return ret } // NewQPrintDialog4 constructs a new QPrintDialog object. func NewQPrintDialog4(printer *QPrinter, parent *qt.QWidget) *QPrintDialog { - var outptr_QPrintDialog *C.QPrintDialog = nil - var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintDialog(C.QPrintDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -189,7 +159,7 @@ func miqt_exec_callback_QPrintDialog_Accepted(cb C.intptr_t, printer *C.QPrinter } // Convert all CABI parameters to Go parameters - slotval1 := newQPrinter(printer, nil, nil) + slotval1 := newQPrinter(printer) gofunc(slotval1) } diff --git a/qt/printsupport/gen_qprintdialog.h b/qt/printsupport/gen_qprintdialog.h index 02b93712..6710dcea 100644 --- a/qt/printsupport/gen_qprintdialog.h +++ b/qt/printsupport/gen_qprintdialog.h @@ -34,10 +34,11 @@ typedef struct QPrinter QPrinter; typedef struct QWidget QWidget; #endif -void QPrintDialog_new(QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintDialog_new2(QPrinter* printer, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintDialog_new3(QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintDialog_new4(QPrinter* printer, QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QPrintDialog* QPrintDialog_new(QWidget* parent); +QPrintDialog* QPrintDialog_new2(QPrinter* printer); +QPrintDialog* QPrintDialog_new3(); +QPrintDialog* QPrintDialog_new4(QPrinter* printer, QWidget* parent); +void QPrintDialog_virtbase(QPrintDialog* src, QAbstractPrintDialog** outptr_QAbstractPrintDialog); QMetaObject* QPrintDialog_MetaObject(const QPrintDialog* self); void* QPrintDialog_Metacast(QPrintDialog* self, const char* param1); struct miqt_string QPrintDialog_Tr(const char* s); diff --git a/qt/printsupport/gen_qprintengine.go b/qt/printsupport/gen_qprintengine.go index 8c39f52a..87d05b06 100644 --- a/qt/printsupport/gen_qprintengine.go +++ b/qt/printsupport/gen_qprintengine.go @@ -75,16 +75,13 @@ func newQPrintEngine(h *C.QPrintEngine) *QPrintEngine { if h == nil { return nil } + return &QPrintEngine{h: h} } // UnsafeNewQPrintEngine constructs the type using only unsafe pointers. func UnsafeNewQPrintEngine(h unsafe.Pointer) *QPrintEngine { - if h == nil { - return nil - } - - return &QPrintEngine{h: (*C.QPrintEngine)(h)} + return newQPrintEngine((*C.QPrintEngine)(h)) } func (this *QPrintEngine) SetProperty(key QPrintEngine__PrintEnginePropertyKey, value *qt.QVariant) { diff --git a/qt/printsupport/gen_qprinter.cpp b/qt/printsupport/gen_qprinter.cpp index 4d98ff81..eb354464 100644 --- a/qt/printsupport/gen_qprinter.cpp +++ b/qt/printsupport/gen_qprinter.cpp @@ -195,32 +195,24 @@ public: }; -void QPrinter_new(QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(); - *outptr_QPrinter = ret; - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrinter* QPrinter_new() { + return new MiqtVirtualQPrinter(); } -void QPrinter_new2(QPrinterInfo* printer, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(*printer); - *outptr_QPrinter = ret; - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrinter* QPrinter_new2(QPrinterInfo* printer) { + return new MiqtVirtualQPrinter(*printer); } -void QPrinter_new3(int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(static_cast(mode)); - *outptr_QPrinter = ret; - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrinter* QPrinter_new3(int mode) { + return new MiqtVirtualQPrinter(static_cast(mode)); } -void QPrinter_new4(QPrinterInfo* printer, int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(*printer, static_cast(mode)); - *outptr_QPrinter = ret; - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrinter* QPrinter_new4(QPrinterInfo* printer, int mode) { + return new MiqtVirtualQPrinter(*printer, static_cast(mode)); +} + +void QPrinter_virtbase(QPrinter* src, QPagedPaintDevice** outptr_QPagedPaintDevice) { + *outptr_QPagedPaintDevice = static_cast(src); } int QPrinter_DevType(const QPrinter* self) { diff --git a/qt/printsupport/gen_qprinter.go b/qt/printsupport/gen_qprinter.go index 17ec320e..ebf7ed59 100644 --- a/qt/printsupport/gen_qprinter.go +++ b/qt/printsupport/gen_qprinter.go @@ -133,68 +133,50 @@ func (this *QPrinter) UnsafePointer() unsafe.Pointer { } // newQPrinter constructs the type using only CGO pointers. -func newQPrinter(h *C.QPrinter, h_QPagedPaintDevice *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QPrinter { +func newQPrinter(h *C.QPrinter) *QPrinter { if h == nil { return nil } + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + C.QPrinter_virtbase(h, &outptr_QPagedPaintDevice) + return &QPrinter{h: h, - QPagedPaintDevice: qt.UnsafeNewQPagedPaintDevice(unsafe.Pointer(h_QPagedPaintDevice), unsafe.Pointer(h_QPaintDevice))} + QPagedPaintDevice: qt.UnsafeNewQPagedPaintDevice(unsafe.Pointer(outptr_QPagedPaintDevice))} } // UnsafeNewQPrinter constructs the type using only unsafe pointers. -func UnsafeNewQPrinter(h unsafe.Pointer, h_QPagedPaintDevice unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrinter { - if h == nil { - return nil - } - - return &QPrinter{h: (*C.QPrinter)(h), - QPagedPaintDevice: qt.UnsafeNewQPagedPaintDevice(h_QPagedPaintDevice, h_QPaintDevice)} +func UnsafeNewQPrinter(h unsafe.Pointer) *QPrinter { + return newQPrinter((*C.QPrinter)(h)) } // NewQPrinter constructs a new QPrinter object. func NewQPrinter() *QPrinter { - var outptr_QPrinter *C.QPrinter = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrinter_new(&outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQPrinter(C.QPrinter_new()) ret.isSubclass = true return ret } // NewQPrinter2 constructs a new QPrinter object. func NewQPrinter2(printer *QPrinterInfo) *QPrinter { - var outptr_QPrinter *C.QPrinter = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrinter_new2(printer.cPointer(), &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQPrinter(C.QPrinter_new2(printer.cPointer())) ret.isSubclass = true return ret } // NewQPrinter3 constructs a new QPrinter object. func NewQPrinter3(mode QPrinter__PrinterMode) *QPrinter { - var outptr_QPrinter *C.QPrinter = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrinter_new3((C.int)(mode), &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQPrinter(C.QPrinter_new3((C.int)(mode))) ret.isSubclass = true return ret } // NewQPrinter4 constructs a new QPrinter object. func NewQPrinter4(printer *QPrinterInfo, mode QPrinter__PrinterMode) *QPrinter { - var outptr_QPrinter *C.QPrinter = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrinter_new4(printer.cPointer(), (C.int)(mode), &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQPrinter(C.QPrinter_new4(printer.cPointer(), (C.int)(mode))) ret.isSubclass = true return ret } diff --git a/qt/printsupport/gen_qprinter.h b/qt/printsupport/gen_qprinter.h index bebe1d85..8f3654c1 100644 --- a/qt/printsupport/gen_qprinter.h +++ b/qt/printsupport/gen_qprinter.h @@ -42,10 +42,11 @@ typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; #endif -void QPrinter_new(QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); -void QPrinter_new2(QPrinterInfo* printer, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); -void QPrinter_new3(int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); -void QPrinter_new4(QPrinterInfo* printer, int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +QPrinter* QPrinter_new(); +QPrinter* QPrinter_new2(QPrinterInfo* printer); +QPrinter* QPrinter_new3(int mode); +QPrinter* QPrinter_new4(QPrinterInfo* printer, int mode); +void QPrinter_virtbase(QPrinter* src, QPagedPaintDevice** outptr_QPagedPaintDevice); int QPrinter_DevType(const QPrinter* self); void QPrinter_SetOutputFormat(QPrinter* self, int format); int QPrinter_OutputFormat(const QPrinter* self); diff --git a/qt/printsupport/gen_qprinterinfo.cpp b/qt/printsupport/gen_qprinterinfo.cpp index aabaf086..9aa521c9 100644 --- a/qt/printsupport/gen_qprinterinfo.cpp +++ b/qt/printsupport/gen_qprinterinfo.cpp @@ -11,19 +11,16 @@ #include "gen_qprinterinfo.h" #include "_cgo_export.h" -void QPrinterInfo_new(QPrinterInfo** outptr_QPrinterInfo) { - QPrinterInfo* ret = new QPrinterInfo(); - *outptr_QPrinterInfo = ret; +QPrinterInfo* QPrinterInfo_new() { + return new QPrinterInfo(); } -void QPrinterInfo_new2(QPrinterInfo* other, QPrinterInfo** outptr_QPrinterInfo) { - QPrinterInfo* ret = new QPrinterInfo(*other); - *outptr_QPrinterInfo = ret; +QPrinterInfo* QPrinterInfo_new2(QPrinterInfo* other) { + return new QPrinterInfo(*other); } -void QPrinterInfo_new3(QPrinter* printer, QPrinterInfo** outptr_QPrinterInfo) { - QPrinterInfo* ret = new QPrinterInfo(*printer); - *outptr_QPrinterInfo = ret; +QPrinterInfo* QPrinterInfo_new3(QPrinter* printer) { + return new QPrinterInfo(*printer); } void QPrinterInfo_OperatorAssign(QPrinterInfo* self, QPrinterInfo* other) { diff --git a/qt/printsupport/gen_qprinterinfo.go b/qt/printsupport/gen_qprinterinfo.go index 3b8a7314..2d910c39 100644 --- a/qt/printsupport/gen_qprinterinfo.go +++ b/qt/printsupport/gen_qprinterinfo.go @@ -38,44 +38,35 @@ func newQPrinterInfo(h *C.QPrinterInfo) *QPrinterInfo { if h == nil { return nil } + return &QPrinterInfo{h: h} } // UnsafeNewQPrinterInfo constructs the type using only unsafe pointers. func UnsafeNewQPrinterInfo(h unsafe.Pointer) *QPrinterInfo { - if h == nil { - return nil - } - - return &QPrinterInfo{h: (*C.QPrinterInfo)(h)} + return newQPrinterInfo((*C.QPrinterInfo)(h)) } // NewQPrinterInfo constructs a new QPrinterInfo object. func NewQPrinterInfo() *QPrinterInfo { - var outptr_QPrinterInfo *C.QPrinterInfo = nil - C.QPrinterInfo_new(&outptr_QPrinterInfo) - ret := newQPrinterInfo(outptr_QPrinterInfo) + ret := newQPrinterInfo(C.QPrinterInfo_new()) ret.isSubclass = true return ret } // NewQPrinterInfo2 constructs a new QPrinterInfo object. func NewQPrinterInfo2(other *QPrinterInfo) *QPrinterInfo { - var outptr_QPrinterInfo *C.QPrinterInfo = nil - C.QPrinterInfo_new2(other.cPointer(), &outptr_QPrinterInfo) - ret := newQPrinterInfo(outptr_QPrinterInfo) + ret := newQPrinterInfo(C.QPrinterInfo_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQPrinterInfo3 constructs a new QPrinterInfo object. func NewQPrinterInfo3(printer *QPrinter) *QPrinterInfo { - var outptr_QPrinterInfo *C.QPrinterInfo = nil - C.QPrinterInfo_new3(printer.cPointer(), &outptr_QPrinterInfo) - ret := newQPrinterInfo(outptr_QPrinterInfo) + ret := newQPrinterInfo(C.QPrinterInfo_new3(printer.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/printsupport/gen_qprinterinfo.h b/qt/printsupport/gen_qprinterinfo.h index 1ca183d9..1c101734 100644 --- a/qt/printsupport/gen_qprinterinfo.h +++ b/qt/printsupport/gen_qprinterinfo.h @@ -26,9 +26,9 @@ typedef struct QPrinterInfo QPrinterInfo; typedef struct QSizeF QSizeF; #endif -void QPrinterInfo_new(QPrinterInfo** outptr_QPrinterInfo); -void QPrinterInfo_new2(QPrinterInfo* other, QPrinterInfo** outptr_QPrinterInfo); -void QPrinterInfo_new3(QPrinter* printer, QPrinterInfo** outptr_QPrinterInfo); +QPrinterInfo* QPrinterInfo_new(); +QPrinterInfo* QPrinterInfo_new2(QPrinterInfo* other); +QPrinterInfo* QPrinterInfo_new3(QPrinter* printer); void QPrinterInfo_OperatorAssign(QPrinterInfo* self, QPrinterInfo* other); struct miqt_string QPrinterInfo_PrinterName(const QPrinterInfo* self); struct miqt_string QPrinterInfo_Description(const QPrinterInfo* self); diff --git a/qt/printsupport/gen_qprintpreviewdialog.cpp b/qt/printsupport/gen_qprintpreviewdialog.cpp index 2aaa0296..bcbaaaeb 100644 --- a/qt/printsupport/gen_qprintpreviewdialog.cpp +++ b/qt/printsupport/gen_qprintpreviewdialog.cpp @@ -360,58 +360,32 @@ public: }; -void QPrintPreviewDialog_new(QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(parent); - *outptr_QPrintPreviewDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewDialog* QPrintPreviewDialog_new(QWidget* parent) { + return new MiqtVirtualQPrintPreviewDialog(parent); } -void QPrintPreviewDialog_new2(QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(); - *outptr_QPrintPreviewDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewDialog* QPrintPreviewDialog_new2() { + return new MiqtVirtualQPrintPreviewDialog(); } -void QPrintPreviewDialog_new3(QPrinter* printer, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(printer); - *outptr_QPrintPreviewDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewDialog* QPrintPreviewDialog_new3(QPrinter* printer) { + return new MiqtVirtualQPrintPreviewDialog(printer); } -void QPrintPreviewDialog_new4(QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(parent, static_cast(flags)); - *outptr_QPrintPreviewDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewDialog* QPrintPreviewDialog_new4(QWidget* parent, int flags) { + return new MiqtVirtualQPrintPreviewDialog(parent, static_cast(flags)); } -void QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(printer, parent); - *outptr_QPrintPreviewDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewDialog* QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent) { + return new MiqtVirtualQPrintPreviewDialog(printer, parent); } -void QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(printer, parent, static_cast(flags)); - *outptr_QPrintPreviewDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewDialog* QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags) { + return new MiqtVirtualQPrintPreviewDialog(printer, parent, static_cast(flags)); +} + +void QPrintPreviewDialog_virtbase(QPrintPreviewDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QPrintPreviewDialog_MetaObject(const QPrintPreviewDialog* self) { diff --git a/qt/printsupport/gen_qprintpreviewdialog.go b/qt/printsupport/gen_qprintpreviewdialog.go index eef134d3..923f1e9f 100644 --- a/qt/printsupport/gen_qprintpreviewdialog.go +++ b/qt/printsupport/gen_qprintpreviewdialog.go @@ -36,104 +36,66 @@ func (this *QPrintPreviewDialog) UnsafePointer() unsafe.Pointer { } // newQPrintPreviewDialog constructs the type using only CGO pointers. -func newQPrintPreviewDialog(h *C.QPrintPreviewDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPrintPreviewDialog { +func newQPrintPreviewDialog(h *C.QPrintPreviewDialog) *QPrintPreviewDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QPrintPreviewDialog_virtbase(h, &outptr_QDialog) + return &QPrintPreviewDialog{h: h, - QDialog: qt.UnsafeNewQDialog(unsafe.Pointer(h_QDialog), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QDialog: qt.UnsafeNewQDialog(unsafe.Pointer(outptr_QDialog))} } // UnsafeNewQPrintPreviewDialog constructs the type using only unsafe pointers. -func UnsafeNewQPrintPreviewDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrintPreviewDialog { - if h == nil { - return nil - } - - return &QPrintPreviewDialog{h: (*C.QPrintPreviewDialog)(h), - QDialog: qt.UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQPrintPreviewDialog(h unsafe.Pointer) *QPrintPreviewDialog { + return newQPrintPreviewDialog((*C.QPrintPreviewDialog)(h)) } // NewQPrintPreviewDialog constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog(parent *qt.QWidget) *QPrintPreviewDialog { - var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewDialog_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewDialog(C.QPrintPreviewDialog_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQPrintPreviewDialog2 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog2() *QPrintPreviewDialog { - var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewDialog_new2(&outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewDialog(C.QPrintPreviewDialog_new2()) ret.isSubclass = true return ret } // NewQPrintPreviewDialog3 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog3(printer *QPrinter) *QPrintPreviewDialog { - var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewDialog_new3(printer.cPointer(), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewDialog(C.QPrintPreviewDialog_new3(printer.cPointer())) ret.isSubclass = true return ret } // NewQPrintPreviewDialog4 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog4(parent *qt.QWidget, flags qt.WindowType) *QPrintPreviewDialog { - var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewDialog_new4((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewDialog(C.QPrintPreviewDialog_new4((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags))) ret.isSubclass = true return ret } // NewQPrintPreviewDialog5 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog5(printer *QPrinter, parent *qt.QWidget) *QPrintPreviewDialog { - var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewDialog_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewDialog(C.QPrintPreviewDialog_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQPrintPreviewDialog6 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog6(printer *QPrinter, parent *qt.QWidget, flags qt.WindowType) *QPrintPreviewDialog { - var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewDialog_new6(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewDialog(C.QPrintPreviewDialog_new6(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags))) ret.isSubclass = true return ret } @@ -167,7 +129,7 @@ func QPrintPreviewDialog_TrUtf8(s string) string { } func (this *QPrintPreviewDialog) Printer() *QPrinter { - return newQPrinter(C.QPrintPreviewDialog_Printer(this.h), nil, nil) + return newQPrinter(C.QPrintPreviewDialog_Printer(this.h)) } func (this *QPrintPreviewDialog) SetVisible(visible bool) { @@ -193,7 +155,7 @@ func miqt_exec_callback_QPrintPreviewDialog_PaintRequested(cb C.intptr_t, printe } // Convert all CABI parameters to Go parameters - slotval1 := newQPrinter(printer, nil, nil) + slotval1 := newQPrinter(printer) gofunc(slotval1) } @@ -462,7 +424,7 @@ func miqt_exec_callback_QPrintPreviewDialog_KeyPressEvent(self *C.QPrintPreviewD } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1)) gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -488,7 +450,7 @@ func miqt_exec_callback_QPrintPreviewDialog_CloseEvent(self *C.QPrintPreviewDial } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(param1)) gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -514,7 +476,7 @@ func miqt_exec_callback_QPrintPreviewDialog_ShowEvent(self *C.QPrintPreviewDialo } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(param1)) gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -540,7 +502,7 @@ func miqt_exec_callback_QPrintPreviewDialog_ResizeEvent(self *C.QPrintPreviewDia } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(param1)) gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -566,7 +528,7 @@ func miqt_exec_callback_QPrintPreviewDialog_ContextMenuEvent(self *C.QPrintPrevi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1)) gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt/printsupport/gen_qprintpreviewdialog.h b/qt/printsupport/gen_qprintpreviewdialog.h index 86c97f5f..914430fc 100644 --- a/qt/printsupport/gen_qprintpreviewdialog.h +++ b/qt/printsupport/gen_qprintpreviewdialog.h @@ -46,12 +46,13 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QPrintPreviewDialog_new(QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewDialog_new2(QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewDialog_new3(QPrinter* printer, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewDialog_new4(QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QPrintPreviewDialog* QPrintPreviewDialog_new(QWidget* parent); +QPrintPreviewDialog* QPrintPreviewDialog_new2(); +QPrintPreviewDialog* QPrintPreviewDialog_new3(QPrinter* printer); +QPrintPreviewDialog* QPrintPreviewDialog_new4(QWidget* parent, int flags); +QPrintPreviewDialog* QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent); +QPrintPreviewDialog* QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags); +void QPrintPreviewDialog_virtbase(QPrintPreviewDialog* src, QDialog** outptr_QDialog); QMetaObject* QPrintPreviewDialog_MetaObject(const QPrintPreviewDialog* self); void* QPrintPreviewDialog_Metacast(QPrintPreviewDialog* self, const char* param1); struct miqt_string QPrintPreviewDialog_Tr(const char* s); diff --git a/qt/printsupport/gen_qprintpreviewwidget.cpp b/qt/printsupport/gen_qprintpreviewwidget.cpp index e3f13f1c..4dee8404 100644 --- a/qt/printsupport/gen_qprintpreviewwidget.cpp +++ b/qt/printsupport/gen_qprintpreviewwidget.cpp @@ -1025,52 +1025,32 @@ public: }; -void QPrintPreviewWidget_new(QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(parent); - *outptr_QPrintPreviewWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewWidget* QPrintPreviewWidget_new(QWidget* parent) { + return new MiqtVirtualQPrintPreviewWidget(parent); } -void QPrintPreviewWidget_new2(QPrinter* printer, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(printer); - *outptr_QPrintPreviewWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewWidget* QPrintPreviewWidget_new2(QPrinter* printer) { + return new MiqtVirtualQPrintPreviewWidget(printer); } -void QPrintPreviewWidget_new3(QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(); - *outptr_QPrintPreviewWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewWidget* QPrintPreviewWidget_new3() { + return new MiqtVirtualQPrintPreviewWidget(); } -void QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(printer, parent); - *outptr_QPrintPreviewWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewWidget* QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent) { + return new MiqtVirtualQPrintPreviewWidget(printer, parent); } -void QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(printer, parent, static_cast(flags)); - *outptr_QPrintPreviewWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewWidget* QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags) { + return new MiqtVirtualQPrintPreviewWidget(printer, parent, static_cast(flags)); } -void QPrintPreviewWidget_new6(QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(parent, static_cast(flags)); - *outptr_QPrintPreviewWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewWidget* QPrintPreviewWidget_new6(QWidget* parent, int flags) { + return new MiqtVirtualQPrintPreviewWidget(parent, static_cast(flags)); +} + +void QPrintPreviewWidget_virtbase(QPrintPreviewWidget* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QPrintPreviewWidget_MetaObject(const QPrintPreviewWidget* self) { diff --git a/qt/printsupport/gen_qprintpreviewwidget.go b/qt/printsupport/gen_qprintpreviewwidget.go index fd2d449e..d158390e 100644 --- a/qt/printsupport/gen_qprintpreviewwidget.go +++ b/qt/printsupport/gen_qprintpreviewwidget.go @@ -52,98 +52,66 @@ func (this *QPrintPreviewWidget) UnsafePointer() unsafe.Pointer { } // newQPrintPreviewWidget constructs the type using only CGO pointers. -func newQPrintPreviewWidget(h *C.QPrintPreviewWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPrintPreviewWidget { +func newQPrintPreviewWidget(h *C.QPrintPreviewWidget) *QPrintPreviewWidget { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QPrintPreviewWidget_virtbase(h, &outptr_QWidget) + return &QPrintPreviewWidget{h: h, - QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(outptr_QWidget))} } // UnsafeNewQPrintPreviewWidget constructs the type using only unsafe pointers. -func UnsafeNewQPrintPreviewWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrintPreviewWidget { - if h == nil { - return nil - } - - return &QPrintPreviewWidget{h: (*C.QPrintPreviewWidget)(h), - QWidget: qt.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQPrintPreviewWidget(h unsafe.Pointer) *QPrintPreviewWidget { + return newQPrintPreviewWidget((*C.QPrintPreviewWidget)(h)) } // NewQPrintPreviewWidget constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget(parent *qt.QWidget) *QPrintPreviewWidget { - var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewWidget_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewWidget(C.QPrintPreviewWidget_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQPrintPreviewWidget2 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget2(printer *QPrinter) *QPrintPreviewWidget { - var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewWidget_new2(printer.cPointer(), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewWidget(C.QPrintPreviewWidget_new2(printer.cPointer())) ret.isSubclass = true return ret } // NewQPrintPreviewWidget3 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget3() *QPrintPreviewWidget { - var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewWidget_new3(&outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewWidget(C.QPrintPreviewWidget_new3()) ret.isSubclass = true return ret } // NewQPrintPreviewWidget4 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget4(printer *QPrinter, parent *qt.QWidget) *QPrintPreviewWidget { - var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewWidget_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewWidget(C.QPrintPreviewWidget_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQPrintPreviewWidget5 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget5(printer *QPrinter, parent *qt.QWidget, flags qt.WindowType) *QPrintPreviewWidget { - var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewWidget_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewWidget(C.QPrintPreviewWidget_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags))) ret.isSubclass = true return ret } // NewQPrintPreviewWidget6 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget6(parent *qt.QWidget, flags qt.WindowType) *QPrintPreviewWidget { - var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewWidget_new6((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewWidget(C.QPrintPreviewWidget_new6((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags))) ret.isSubclass = true return ret } @@ -283,7 +251,7 @@ func miqt_exec_callback_QPrintPreviewWidget_PaintRequested(cb C.intptr_t, printe } // Convert all CABI parameters to Go parameters - slotval1 := newQPrinter(printer, nil, nil) + slotval1 := newQPrinter(printer) gofunc(slotval1) } @@ -588,7 +556,7 @@ func miqt_exec_callback_QPrintPreviewWidget_MousePressEvent(self *C.QPrintPrevie } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -614,7 +582,7 @@ func miqt_exec_callback_QPrintPreviewWidget_MouseReleaseEvent(self *C.QPrintPrev } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -640,7 +608,7 @@ func miqt_exec_callback_QPrintPreviewWidget_MouseDoubleClickEvent(self *C.QPrint } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -666,7 +634,7 @@ func miqt_exec_callback_QPrintPreviewWidget_MouseMoveEvent(self *C.QPrintPreview } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -692,7 +660,7 @@ func miqt_exec_callback_QPrintPreviewWidget_WheelEvent(self *C.QPrintPreviewWidg } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -718,7 +686,7 @@ func miqt_exec_callback_QPrintPreviewWidget_KeyPressEvent(self *C.QPrintPreviewW } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -744,7 +712,7 @@ func miqt_exec_callback_QPrintPreviewWidget_KeyReleaseEvent(self *C.QPrintPrevie } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -770,7 +738,7 @@ func miqt_exec_callback_QPrintPreviewWidget_FocusInEvent(self *C.QPrintPreviewWi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -796,7 +764,7 @@ func miqt_exec_callback_QPrintPreviewWidget_FocusOutEvent(self *C.QPrintPreviewW } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -874,7 +842,7 @@ func miqt_exec_callback_QPrintPreviewWidget_PaintEvent(self *C.QPrintPreviewWidg } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -900,7 +868,7 @@ func miqt_exec_callback_QPrintPreviewWidget_MoveEvent(self *C.QPrintPreviewWidge } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -926,7 +894,7 @@ func miqt_exec_callback_QPrintPreviewWidget_ResizeEvent(self *C.QPrintPreviewWid } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -952,7 +920,7 @@ func miqt_exec_callback_QPrintPreviewWidget_CloseEvent(self *C.QPrintPreviewWidg } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -978,7 +946,7 @@ func miqt_exec_callback_QPrintPreviewWidget_ContextMenuEvent(self *C.QPrintPrevi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1004,7 +972,7 @@ func miqt_exec_callback_QPrintPreviewWidget_TabletEvent(self *C.QPrintPreviewWid } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1030,7 +998,7 @@ func miqt_exec_callback_QPrintPreviewWidget_ActionEvent(self *C.QPrintPreviewWid } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1056,7 +1024,7 @@ func miqt_exec_callback_QPrintPreviewWidget_DragEnterEvent(self *C.QPrintPreview } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1082,7 +1050,7 @@ func miqt_exec_callback_QPrintPreviewWidget_DragMoveEvent(self *C.QPrintPreviewW } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1108,7 +1076,7 @@ func miqt_exec_callback_QPrintPreviewWidget_DragLeaveEvent(self *C.QPrintPreview } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1134,7 +1102,7 @@ func miqt_exec_callback_QPrintPreviewWidget_DropEvent(self *C.QPrintPreviewWidge } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1160,7 +1128,7 @@ func miqt_exec_callback_QPrintPreviewWidget_ShowEvent(self *C.QPrintPreviewWidge } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1186,7 +1154,7 @@ func miqt_exec_callback_QPrintPreviewWidget_HideEvent(self *C.QPrintPreviewWidge } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1382,7 +1350,7 @@ func miqt_exec_callback_QPrintPreviewWidget_InputMethodEvent(self *C.QPrintPrevi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/printsupport/gen_qprintpreviewwidget.h b/qt/printsupport/gen_qprintpreviewwidget.h index e6bc47ac..30282043 100644 --- a/qt/printsupport/gen_qprintpreviewwidget.h +++ b/qt/printsupport/gen_qprintpreviewwidget.h @@ -78,12 +78,13 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QPrintPreviewWidget_new(QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewWidget_new2(QPrinter* printer, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewWidget_new3(QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewWidget_new6(QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QPrintPreviewWidget* QPrintPreviewWidget_new(QWidget* parent); +QPrintPreviewWidget* QPrintPreviewWidget_new2(QPrinter* printer); +QPrintPreviewWidget* QPrintPreviewWidget_new3(); +QPrintPreviewWidget* QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent); +QPrintPreviewWidget* QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags); +QPrintPreviewWidget* QPrintPreviewWidget_new6(QWidget* parent, int flags); +void QPrintPreviewWidget_virtbase(QPrintPreviewWidget* src, QWidget** outptr_QWidget); QMetaObject* QPrintPreviewWidget_MetaObject(const QPrintPreviewWidget* self); void* QPrintPreviewWidget_Metacast(QPrintPreviewWidget* self, const char* param1); struct miqt_string QPrintPreviewWidget_Tr(const char* s); diff --git a/qt/script/gen_qscriptable.cpp b/qt/script/gen_qscriptable.cpp index cf6234bc..9af1ec9d 100644 --- a/qt/script/gen_qscriptable.cpp +++ b/qt/script/gen_qscriptable.cpp @@ -6,9 +6,8 @@ #include "gen_qscriptable.h" #include "_cgo_export.h" -void QScriptable_new(QScriptable** outptr_QScriptable) { - QScriptable* ret = new QScriptable(); - *outptr_QScriptable = ret; +QScriptable* QScriptable_new() { + return new QScriptable(); } QScriptEngine* QScriptable_Engine(const QScriptable* self) { diff --git a/qt/script/gen_qscriptable.go b/qt/script/gen_qscriptable.go index 4b3394e8..4236859d 100644 --- a/qt/script/gen_qscriptable.go +++ b/qt/script/gen_qscriptable.go @@ -37,30 +37,25 @@ func newQScriptable(h *C.QScriptable) *QScriptable { if h == nil { return nil } + return &QScriptable{h: h} } // UnsafeNewQScriptable constructs the type using only unsafe pointers. func UnsafeNewQScriptable(h unsafe.Pointer) *QScriptable { - if h == nil { - return nil - } - - return &QScriptable{h: (*C.QScriptable)(h)} + return newQScriptable((*C.QScriptable)(h)) } // NewQScriptable constructs a new QScriptable object. func NewQScriptable() *QScriptable { - var outptr_QScriptable *C.QScriptable = nil - C.QScriptable_new(&outptr_QScriptable) - ret := newQScriptable(outptr_QScriptable) + ret := newQScriptable(C.QScriptable_new()) ret.isSubclass = true return ret } func (this *QScriptable) Engine() *QScriptEngine { - return newQScriptEngine(C.QScriptable_Engine(this.h), nil) + return newQScriptEngine(C.QScriptable_Engine(this.h)) } func (this *QScriptable) Context() *QScriptContext { diff --git a/qt/script/gen_qscriptable.h b/qt/script/gen_qscriptable.h index 929e17f7..9629dd4f 100644 --- a/qt/script/gen_qscriptable.h +++ b/qt/script/gen_qscriptable.h @@ -26,7 +26,7 @@ typedef struct QScriptValue QScriptValue; typedef struct QScriptable QScriptable; #endif -void QScriptable_new(QScriptable** outptr_QScriptable); +QScriptable* QScriptable_new(); QScriptEngine* QScriptable_Engine(const QScriptable* self); QScriptContext* QScriptable_Context(const QScriptable* self); QScriptValue* QScriptable_ThisObject(const QScriptable* self); diff --git a/qt/script/gen_qscriptclass.cpp b/qt/script/gen_qscriptclass.cpp index 73a42fff..8cfc8d05 100644 --- a/qt/script/gen_qscriptclass.cpp +++ b/qt/script/gen_qscriptclass.cpp @@ -276,9 +276,8 @@ public: }; -void QScriptClass_new(QScriptEngine* engine, QScriptClass** outptr_QScriptClass) { - MiqtVirtualQScriptClass* ret = new MiqtVirtualQScriptClass(engine); - *outptr_QScriptClass = ret; +QScriptClass* QScriptClass_new(QScriptEngine* engine) { + return new MiqtVirtualQScriptClass(engine); } QScriptEngine* QScriptClass_Engine(const QScriptClass* self) { diff --git a/qt/script/gen_qscriptclass.go b/qt/script/gen_qscriptclass.go index a15d39b3..25fc312c 100644 --- a/qt/script/gen_qscriptclass.go +++ b/qt/script/gen_qscriptclass.go @@ -53,30 +53,25 @@ func newQScriptClass(h *C.QScriptClass) *QScriptClass { if h == nil { return nil } + return &QScriptClass{h: h} } // UnsafeNewQScriptClass constructs the type using only unsafe pointers. func UnsafeNewQScriptClass(h unsafe.Pointer) *QScriptClass { - if h == nil { - return nil - } - - return &QScriptClass{h: (*C.QScriptClass)(h)} + return newQScriptClass((*C.QScriptClass)(h)) } // NewQScriptClass constructs a new QScriptClass object. func NewQScriptClass(engine *QScriptEngine) *QScriptClass { - var outptr_QScriptClass *C.QScriptClass = nil - C.QScriptClass_new(engine.cPointer(), &outptr_QScriptClass) - ret := newQScriptClass(outptr_QScriptClass) + ret := newQScriptClass(C.QScriptClass_new(engine.cPointer())) ret.isSubclass = true return ret } func (this *QScriptClass) Engine() *QScriptEngine { - return newQScriptEngine(C.QScriptClass_Engine(this.h), nil) + return newQScriptEngine(C.QScriptClass_Engine(this.h)) } func (this *QScriptClass) QueryProperty(object *QScriptValue, name *QScriptString, flags QScriptClass__QueryFlag, id *uint) QScriptClass__QueryFlag { diff --git a/qt/script/gen_qscriptclass.h b/qt/script/gen_qscriptclass.h index ca948115..017aa522 100644 --- a/qt/script/gen_qscriptclass.h +++ b/qt/script/gen_qscriptclass.h @@ -30,7 +30,7 @@ typedef struct QScriptValue QScriptValue; typedef struct QVariant QVariant; #endif -void QScriptClass_new(QScriptEngine* engine, QScriptClass** outptr_QScriptClass); +QScriptClass* QScriptClass_new(QScriptEngine* engine); QScriptEngine* QScriptClass_Engine(const QScriptClass* self); int QScriptClass_QueryProperty(QScriptClass* self, QScriptValue* object, QScriptString* name, int flags, unsigned int* id); QScriptValue* QScriptClass_Property(QScriptClass* self, QScriptValue* object, QScriptString* name, unsigned int id); diff --git a/qt/script/gen_qscriptclasspropertyiterator.go b/qt/script/gen_qscriptclasspropertyiterator.go index 51398298..6d476318 100644 --- a/qt/script/gen_qscriptclasspropertyiterator.go +++ b/qt/script/gen_qscriptclasspropertyiterator.go @@ -37,16 +37,13 @@ func newQScriptClassPropertyIterator(h *C.QScriptClassPropertyIterator) *QScript if h == nil { return nil } + return &QScriptClassPropertyIterator{h: h} } // UnsafeNewQScriptClassPropertyIterator constructs the type using only unsafe pointers. func UnsafeNewQScriptClassPropertyIterator(h unsafe.Pointer) *QScriptClassPropertyIterator { - if h == nil { - return nil - } - - return &QScriptClassPropertyIterator{h: (*C.QScriptClassPropertyIterator)(h)} + return newQScriptClassPropertyIterator((*C.QScriptClassPropertyIterator)(h)) } func (this *QScriptClassPropertyIterator) Object() *QScriptValue { diff --git a/qt/script/gen_qscriptcontext.go b/qt/script/gen_qscriptcontext.go index 466279b6..69e1e015 100644 --- a/qt/script/gen_qscriptcontext.go +++ b/qt/script/gen_qscriptcontext.go @@ -55,16 +55,13 @@ func newQScriptContext(h *C.QScriptContext) *QScriptContext { if h == nil { return nil } + return &QScriptContext{h: h} } // UnsafeNewQScriptContext constructs the type using only unsafe pointers. func UnsafeNewQScriptContext(h unsafe.Pointer) *QScriptContext { - if h == nil { - return nil - } - - return &QScriptContext{h: (*C.QScriptContext)(h)} + return newQScriptContext((*C.QScriptContext)(h)) } func (this *QScriptContext) ParentContext() *QScriptContext { @@ -72,7 +69,7 @@ func (this *QScriptContext) ParentContext() *QScriptContext { } func (this *QScriptContext) Engine() *QScriptEngine { - return newQScriptEngine(C.QScriptContext_Engine(this.h), nil) + return newQScriptEngine(C.QScriptContext_Engine(this.h)) } func (this *QScriptContext) State() QScriptContext__ExecutionState { diff --git a/qt/script/gen_qscriptcontextinfo.cpp b/qt/script/gen_qscriptcontextinfo.cpp index d53095e7..365a4064 100644 --- a/qt/script/gen_qscriptcontextinfo.cpp +++ b/qt/script/gen_qscriptcontextinfo.cpp @@ -8,19 +8,16 @@ #include "gen_qscriptcontextinfo.h" #include "_cgo_export.h" -void QScriptContextInfo_new(QScriptContext* context, QScriptContextInfo** outptr_QScriptContextInfo) { - QScriptContextInfo* ret = new QScriptContextInfo(context); - *outptr_QScriptContextInfo = ret; +QScriptContextInfo* QScriptContextInfo_new(QScriptContext* context) { + return new QScriptContextInfo(context); } -void QScriptContextInfo_new2(QScriptContextInfo* other, QScriptContextInfo** outptr_QScriptContextInfo) { - QScriptContextInfo* ret = new QScriptContextInfo(*other); - *outptr_QScriptContextInfo = ret; +QScriptContextInfo* QScriptContextInfo_new2(QScriptContextInfo* other) { + return new QScriptContextInfo(*other); } -void QScriptContextInfo_new3(QScriptContextInfo** outptr_QScriptContextInfo) { - QScriptContextInfo* ret = new QScriptContextInfo(); - *outptr_QScriptContextInfo = ret; +QScriptContextInfo* QScriptContextInfo_new3() { + return new QScriptContextInfo(); } void QScriptContextInfo_OperatorAssign(QScriptContextInfo* self, QScriptContextInfo* other) { diff --git a/qt/script/gen_qscriptcontextinfo.go b/qt/script/gen_qscriptcontextinfo.go index 28884475..8002ca9f 100644 --- a/qt/script/gen_qscriptcontextinfo.go +++ b/qt/script/gen_qscriptcontextinfo.go @@ -46,44 +46,35 @@ func newQScriptContextInfo(h *C.QScriptContextInfo) *QScriptContextInfo { if h == nil { return nil } + return &QScriptContextInfo{h: h} } // UnsafeNewQScriptContextInfo constructs the type using only unsafe pointers. func UnsafeNewQScriptContextInfo(h unsafe.Pointer) *QScriptContextInfo { - if h == nil { - return nil - } - - return &QScriptContextInfo{h: (*C.QScriptContextInfo)(h)} + return newQScriptContextInfo((*C.QScriptContextInfo)(h)) } // NewQScriptContextInfo constructs a new QScriptContextInfo object. func NewQScriptContextInfo(context *QScriptContext) *QScriptContextInfo { - var outptr_QScriptContextInfo *C.QScriptContextInfo = nil - C.QScriptContextInfo_new(context.cPointer(), &outptr_QScriptContextInfo) - ret := newQScriptContextInfo(outptr_QScriptContextInfo) + ret := newQScriptContextInfo(C.QScriptContextInfo_new(context.cPointer())) ret.isSubclass = true return ret } // NewQScriptContextInfo2 constructs a new QScriptContextInfo object. func NewQScriptContextInfo2(other *QScriptContextInfo) *QScriptContextInfo { - var outptr_QScriptContextInfo *C.QScriptContextInfo = nil - C.QScriptContextInfo_new2(other.cPointer(), &outptr_QScriptContextInfo) - ret := newQScriptContextInfo(outptr_QScriptContextInfo) + ret := newQScriptContextInfo(C.QScriptContextInfo_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQScriptContextInfo3 constructs a new QScriptContextInfo object. func NewQScriptContextInfo3() *QScriptContextInfo { - var outptr_QScriptContextInfo *C.QScriptContextInfo = nil - C.QScriptContextInfo_new3(&outptr_QScriptContextInfo) - ret := newQScriptContextInfo(outptr_QScriptContextInfo) + ret := newQScriptContextInfo(C.QScriptContextInfo_new3()) ret.isSubclass = true return ret } diff --git a/qt/script/gen_qscriptcontextinfo.h b/qt/script/gen_qscriptcontextinfo.h index 6ff7d89e..04053461 100644 --- a/qt/script/gen_qscriptcontextinfo.h +++ b/qt/script/gen_qscriptcontextinfo.h @@ -22,9 +22,9 @@ typedef struct QScriptContext QScriptContext; typedef struct QScriptContextInfo QScriptContextInfo; #endif -void QScriptContextInfo_new(QScriptContext* context, QScriptContextInfo** outptr_QScriptContextInfo); -void QScriptContextInfo_new2(QScriptContextInfo* other, QScriptContextInfo** outptr_QScriptContextInfo); -void QScriptContextInfo_new3(QScriptContextInfo** outptr_QScriptContextInfo); +QScriptContextInfo* QScriptContextInfo_new(QScriptContext* context); +QScriptContextInfo* QScriptContextInfo_new2(QScriptContextInfo* other); +QScriptContextInfo* QScriptContextInfo_new3(); void QScriptContextInfo_OperatorAssign(QScriptContextInfo* self, QScriptContextInfo* other); bool QScriptContextInfo_IsNull(const QScriptContextInfo* self); long long QScriptContextInfo_ScriptId(const QScriptContextInfo* self); diff --git a/qt/script/gen_qscriptengine.cpp b/qt/script/gen_qscriptengine.cpp index 1b7cf4c4..73d70d81 100644 --- a/qt/script/gen_qscriptengine.cpp +++ b/qt/script/gen_qscriptengine.cpp @@ -23,9 +23,8 @@ #include "gen_qscriptengine.h" #include "_cgo_export.h" -void QScriptSyntaxCheckResult_new(QScriptSyntaxCheckResult* other, QScriptSyntaxCheckResult** outptr_QScriptSyntaxCheckResult) { - QScriptSyntaxCheckResult* ret = new QScriptSyntaxCheckResult(*other); - *outptr_QScriptSyntaxCheckResult = ret; +QScriptSyntaxCheckResult* QScriptSyntaxCheckResult_new(QScriptSyntaxCheckResult* other) { + return new QScriptSyntaxCheckResult(*other); } int QScriptSyntaxCheckResult_State(const QScriptSyntaxCheckResult* self) { @@ -245,16 +244,16 @@ public: }; -void QScriptEngine_new(QScriptEngine** outptr_QScriptEngine, QObject** outptr_QObject) { - MiqtVirtualQScriptEngine* ret = new MiqtVirtualQScriptEngine(); - *outptr_QScriptEngine = ret; - *outptr_QObject = static_cast(ret); +QScriptEngine* QScriptEngine_new() { + return new MiqtVirtualQScriptEngine(); } -void QScriptEngine_new2(QObject* parent, QScriptEngine** outptr_QScriptEngine, QObject** outptr_QObject) { - MiqtVirtualQScriptEngine* ret = new MiqtVirtualQScriptEngine(parent); - *outptr_QScriptEngine = ret; - *outptr_QObject = static_cast(ret); +QScriptEngine* QScriptEngine_new2(QObject* parent) { + return new MiqtVirtualQScriptEngine(parent); +} + +void QScriptEngine_virtbase(QScriptEngine* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QScriptEngine_MetaObject(const QScriptEngine* self) { diff --git a/qt/script/gen_qscriptengine.go b/qt/script/gen_qscriptengine.go index a8b42b46..f64d1c5b 100644 --- a/qt/script/gen_qscriptengine.go +++ b/qt/script/gen_qscriptengine.go @@ -69,24 +69,19 @@ func newQScriptSyntaxCheckResult(h *C.QScriptSyntaxCheckResult) *QScriptSyntaxCh if h == nil { return nil } + return &QScriptSyntaxCheckResult{h: h} } // UnsafeNewQScriptSyntaxCheckResult constructs the type using only unsafe pointers. func UnsafeNewQScriptSyntaxCheckResult(h unsafe.Pointer) *QScriptSyntaxCheckResult { - if h == nil { - return nil - } - - return &QScriptSyntaxCheckResult{h: (*C.QScriptSyntaxCheckResult)(h)} + return newQScriptSyntaxCheckResult((*C.QScriptSyntaxCheckResult)(h)) } // NewQScriptSyntaxCheckResult constructs a new QScriptSyntaxCheckResult object. func NewQScriptSyntaxCheckResult(other *QScriptSyntaxCheckResult) *QScriptSyntaxCheckResult { - var outptr_QScriptSyntaxCheckResult *C.QScriptSyntaxCheckResult = nil - C.QScriptSyntaxCheckResult_new(other.cPointer(), &outptr_QScriptSyntaxCheckResult) - ret := newQScriptSyntaxCheckResult(outptr_QScriptSyntaxCheckResult) + ret := newQScriptSyntaxCheckResult(C.QScriptSyntaxCheckResult_new(other.cPointer())) ret.isSubclass = true return ret } @@ -149,42 +144,34 @@ func (this *QScriptEngine) UnsafePointer() unsafe.Pointer { } // newQScriptEngine constructs the type using only CGO pointers. -func newQScriptEngine(h *C.QScriptEngine, h_QObject *C.QObject) *QScriptEngine { +func newQScriptEngine(h *C.QScriptEngine) *QScriptEngine { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QScriptEngine_virtbase(h, &outptr_QObject) + return &QScriptEngine{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQScriptEngine constructs the type using only unsafe pointers. -func UnsafeNewQScriptEngine(h unsafe.Pointer, h_QObject unsafe.Pointer) *QScriptEngine { - if h == nil { - return nil - } - - return &QScriptEngine{h: (*C.QScriptEngine)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQScriptEngine(h unsafe.Pointer) *QScriptEngine { + return newQScriptEngine((*C.QScriptEngine)(h)) } // NewQScriptEngine constructs a new QScriptEngine object. func NewQScriptEngine() *QScriptEngine { - var outptr_QScriptEngine *C.QScriptEngine = nil - var outptr_QObject *C.QObject = nil - C.QScriptEngine_new(&outptr_QScriptEngine, &outptr_QObject) - ret := newQScriptEngine(outptr_QScriptEngine, outptr_QObject) + ret := newQScriptEngine(C.QScriptEngine_new()) ret.isSubclass = true return ret } // NewQScriptEngine2 constructs a new QScriptEngine object. func NewQScriptEngine2(parent *qt.QObject) *QScriptEngine { - var outptr_QScriptEngine *C.QScriptEngine = nil - var outptr_QObject *C.QObject = nil - C.QScriptEngine_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QScriptEngine, &outptr_QObject) - ret := newQScriptEngine(outptr_QScriptEngine, outptr_QObject) + ret := newQScriptEngine(C.QScriptEngine_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -726,7 +713,7 @@ func miqt_exec_callback_QScriptEngine_TimerEvent(self *C.QScriptEngine, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QScriptEngine{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -752,7 +739,7 @@ func miqt_exec_callback_QScriptEngine_ChildEvent(self *C.QScriptEngine, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QScriptEngine{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/script/gen_qscriptengine.h b/qt/script/gen_qscriptengine.h index a7aba9f7..c6c99e6f 100644 --- a/qt/script/gen_qscriptengine.h +++ b/qt/script/gen_qscriptengine.h @@ -52,7 +52,7 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -void QScriptSyntaxCheckResult_new(QScriptSyntaxCheckResult* other, QScriptSyntaxCheckResult** outptr_QScriptSyntaxCheckResult); +QScriptSyntaxCheckResult* QScriptSyntaxCheckResult_new(QScriptSyntaxCheckResult* other); int QScriptSyntaxCheckResult_State(const QScriptSyntaxCheckResult* self); int QScriptSyntaxCheckResult_ErrorLineNumber(const QScriptSyntaxCheckResult* self); int QScriptSyntaxCheckResult_ErrorColumnNumber(const QScriptSyntaxCheckResult* self); @@ -60,8 +60,9 @@ struct miqt_string QScriptSyntaxCheckResult_ErrorMessage(const QScriptSyntaxChec void QScriptSyntaxCheckResult_OperatorAssign(QScriptSyntaxCheckResult* self, QScriptSyntaxCheckResult* other); void QScriptSyntaxCheckResult_Delete(QScriptSyntaxCheckResult* self, bool isSubclass); -void QScriptEngine_new(QScriptEngine** outptr_QScriptEngine, QObject** outptr_QObject); -void QScriptEngine_new2(QObject* parent, QScriptEngine** outptr_QScriptEngine, QObject** outptr_QObject); +QScriptEngine* QScriptEngine_new(); +QScriptEngine* QScriptEngine_new2(QObject* parent); +void QScriptEngine_virtbase(QScriptEngine* src, QObject** outptr_QObject); QMetaObject* QScriptEngine_MetaObject(const QScriptEngine* self); void* QScriptEngine_Metacast(QScriptEngine* self, const char* param1); struct miqt_string QScriptEngine_Tr(const char* s); diff --git a/qt/script/gen_qscriptengineagent.cpp b/qt/script/gen_qscriptengineagent.cpp index d7c9ae64..bc080378 100644 --- a/qt/script/gen_qscriptengineagent.cpp +++ b/qt/script/gen_qscriptengineagent.cpp @@ -321,9 +321,8 @@ public: }; -void QScriptEngineAgent_new(QScriptEngine* engine, QScriptEngineAgent** outptr_QScriptEngineAgent) { - MiqtVirtualQScriptEngineAgent* ret = new MiqtVirtualQScriptEngineAgent(engine); - *outptr_QScriptEngineAgent = ret; +QScriptEngineAgent* QScriptEngineAgent_new(QScriptEngine* engine) { + return new MiqtVirtualQScriptEngineAgent(engine); } void QScriptEngineAgent_ScriptLoad(QScriptEngineAgent* self, long long id, struct miqt_string program, struct miqt_string fileName, int baseLineNumber) { diff --git a/qt/script/gen_qscriptengineagent.go b/qt/script/gen_qscriptengineagent.go index 1734b29d..1165e53a 100644 --- a/qt/script/gen_qscriptengineagent.go +++ b/qt/script/gen_qscriptengineagent.go @@ -45,24 +45,19 @@ func newQScriptEngineAgent(h *C.QScriptEngineAgent) *QScriptEngineAgent { if h == nil { return nil } + return &QScriptEngineAgent{h: h} } // UnsafeNewQScriptEngineAgent constructs the type using only unsafe pointers. func UnsafeNewQScriptEngineAgent(h unsafe.Pointer) *QScriptEngineAgent { - if h == nil { - return nil - } - - return &QScriptEngineAgent{h: (*C.QScriptEngineAgent)(h)} + return newQScriptEngineAgent((*C.QScriptEngineAgent)(h)) } // NewQScriptEngineAgent constructs a new QScriptEngineAgent object. func NewQScriptEngineAgent(engine *QScriptEngine) *QScriptEngineAgent { - var outptr_QScriptEngineAgent *C.QScriptEngineAgent = nil - C.QScriptEngineAgent_new(engine.cPointer(), &outptr_QScriptEngineAgent) - ret := newQScriptEngineAgent(outptr_QScriptEngineAgent) + ret := newQScriptEngineAgent(C.QScriptEngineAgent_new(engine.cPointer())) ret.isSubclass = true return ret } @@ -122,7 +117,7 @@ func (this *QScriptEngineAgent) Extension(extension QScriptEngineAgent__Extensio } func (this *QScriptEngineAgent) Engine() *QScriptEngine { - return newQScriptEngine(C.QScriptEngineAgent_Engine(this.h), nil) + return newQScriptEngine(C.QScriptEngineAgent_Engine(this.h)) } func (this *QScriptEngineAgent) callVirtualBase_ScriptLoad(id int64, program string, fileName string, baseLineNumber int) { diff --git a/qt/script/gen_qscriptengineagent.h b/qt/script/gen_qscriptengineagent.h index 610ddc7a..84e5d02e 100644 --- a/qt/script/gen_qscriptengineagent.h +++ b/qt/script/gen_qscriptengineagent.h @@ -26,7 +26,7 @@ typedef struct QScriptValue QScriptValue; typedef struct QVariant QVariant; #endif -void QScriptEngineAgent_new(QScriptEngine* engine, QScriptEngineAgent** outptr_QScriptEngineAgent); +QScriptEngineAgent* QScriptEngineAgent_new(QScriptEngine* engine); void QScriptEngineAgent_ScriptLoad(QScriptEngineAgent* self, long long id, struct miqt_string program, struct miqt_string fileName, int baseLineNumber); void QScriptEngineAgent_ScriptUnload(QScriptEngineAgent* self, long long id); void QScriptEngineAgent_ContextPush(QScriptEngineAgent* self); diff --git a/qt/script/gen_qscriptextensioninterface.cpp b/qt/script/gen_qscriptextensioninterface.cpp index 3d32d485..1047521a 100644 --- a/qt/script/gen_qscriptextensioninterface.cpp +++ b/qt/script/gen_qscriptextensioninterface.cpp @@ -64,10 +64,12 @@ public: }; -void QScriptExtensionInterface_new(QScriptExtensionInterface* param1, QScriptExtensionInterface** outptr_QScriptExtensionInterface, QFactoryInterface** outptr_QFactoryInterface) { - MiqtVirtualQScriptExtensionInterface* ret = new MiqtVirtualQScriptExtensionInterface(*param1); - *outptr_QScriptExtensionInterface = ret; - *outptr_QFactoryInterface = static_cast(ret); +QScriptExtensionInterface* QScriptExtensionInterface_new(QScriptExtensionInterface* param1) { + return new MiqtVirtualQScriptExtensionInterface(*param1); +} + +void QScriptExtensionInterface_virtbase(QScriptExtensionInterface* src, QFactoryInterface** outptr_QFactoryInterface) { + *outptr_QFactoryInterface = static_cast(src); } void QScriptExtensionInterface_Initialize(QScriptExtensionInterface* self, struct miqt_string key, QScriptEngine* engine) { diff --git a/qt/script/gen_qscriptextensioninterface.go b/qt/script/gen_qscriptextensioninterface.go index dce096fb..9349137c 100644 --- a/qt/script/gen_qscriptextensioninterface.go +++ b/qt/script/gen_qscriptextensioninterface.go @@ -36,31 +36,26 @@ func (this *QScriptExtensionInterface) UnsafePointer() unsafe.Pointer { } // newQScriptExtensionInterface constructs the type using only CGO pointers. -func newQScriptExtensionInterface(h *C.QScriptExtensionInterface, h_QFactoryInterface *C.QFactoryInterface) *QScriptExtensionInterface { +func newQScriptExtensionInterface(h *C.QScriptExtensionInterface) *QScriptExtensionInterface { if h == nil { return nil } + var outptr_QFactoryInterface *C.QFactoryInterface = nil + C.QScriptExtensionInterface_virtbase(h, &outptr_QFactoryInterface) + return &QScriptExtensionInterface{h: h, - QFactoryInterface: qt.UnsafeNewQFactoryInterface(unsafe.Pointer(h_QFactoryInterface))} + QFactoryInterface: qt.UnsafeNewQFactoryInterface(unsafe.Pointer(outptr_QFactoryInterface))} } // UnsafeNewQScriptExtensionInterface constructs the type using only unsafe pointers. -func UnsafeNewQScriptExtensionInterface(h unsafe.Pointer, h_QFactoryInterface unsafe.Pointer) *QScriptExtensionInterface { - if h == nil { - return nil - } - - return &QScriptExtensionInterface{h: (*C.QScriptExtensionInterface)(h), - QFactoryInterface: qt.UnsafeNewQFactoryInterface(h_QFactoryInterface)} +func UnsafeNewQScriptExtensionInterface(h unsafe.Pointer) *QScriptExtensionInterface { + return newQScriptExtensionInterface((*C.QScriptExtensionInterface)(h)) } // NewQScriptExtensionInterface constructs a new QScriptExtensionInterface object. func NewQScriptExtensionInterface(param1 *QScriptExtensionInterface) *QScriptExtensionInterface { - var outptr_QScriptExtensionInterface *C.QScriptExtensionInterface = nil - var outptr_QFactoryInterface *C.QFactoryInterface = nil - C.QScriptExtensionInterface_new(param1.cPointer(), &outptr_QScriptExtensionInterface, &outptr_QFactoryInterface) - ret := newQScriptExtensionInterface(outptr_QScriptExtensionInterface, outptr_QFactoryInterface) + ret := newQScriptExtensionInterface(C.QScriptExtensionInterface_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -95,7 +90,7 @@ func miqt_exec_callback_QScriptExtensionInterface_Initialize(self *C.QScriptExte key_ret := C.GoStringN(key_ms.data, C.int(int64(key_ms.len))) C.free(unsafe.Pointer(key_ms.data)) slotval1 := key_ret - slotval2 := newQScriptEngine(engine, nil) + slotval2 := newQScriptEngine(engine) gofunc(slotval1, slotval2) diff --git a/qt/script/gen_qscriptextensioninterface.h b/qt/script/gen_qscriptextensioninterface.h index f3551076..bb8d9c98 100644 --- a/qt/script/gen_qscriptextensioninterface.h +++ b/qt/script/gen_qscriptextensioninterface.h @@ -24,7 +24,8 @@ typedef struct QScriptEngine QScriptEngine; typedef struct QScriptExtensionInterface QScriptExtensionInterface; #endif -void QScriptExtensionInterface_new(QScriptExtensionInterface* param1, QScriptExtensionInterface** outptr_QScriptExtensionInterface, QFactoryInterface** outptr_QFactoryInterface); +QScriptExtensionInterface* QScriptExtensionInterface_new(QScriptExtensionInterface* param1); +void QScriptExtensionInterface_virtbase(QScriptExtensionInterface* src, QFactoryInterface** outptr_QFactoryInterface); void QScriptExtensionInterface_Initialize(QScriptExtensionInterface* self, struct miqt_string key, QScriptEngine* engine); void QScriptExtensionInterface_OperatorAssign(QScriptExtensionInterface* self, QScriptExtensionInterface* param1); void QScriptExtensionInterface_override_virtual_Initialize(void* self, intptr_t slot); diff --git a/qt/script/gen_qscriptextensionplugin.cpp b/qt/script/gen_qscriptextensionplugin.cpp index cd431fa6..4ef9f5c0 100644 --- a/qt/script/gen_qscriptextensionplugin.cpp +++ b/qt/script/gen_qscriptextensionplugin.cpp @@ -244,20 +244,17 @@ public: }; -void QScriptExtensionPlugin_new(QScriptExtensionPlugin** outptr_QScriptExtensionPlugin, QObject** outptr_QObject, QScriptExtensionInterface** outptr_QScriptExtensionInterface, QFactoryInterface** outptr_QFactoryInterface) { - MiqtVirtualQScriptExtensionPlugin* ret = new MiqtVirtualQScriptExtensionPlugin(); - *outptr_QScriptExtensionPlugin = ret; - *outptr_QObject = static_cast(ret); - *outptr_QScriptExtensionInterface = static_cast(ret); - *outptr_QFactoryInterface = static_cast(ret); +QScriptExtensionPlugin* QScriptExtensionPlugin_new() { + return new MiqtVirtualQScriptExtensionPlugin(); } -void QScriptExtensionPlugin_new2(QObject* parent, QScriptExtensionPlugin** outptr_QScriptExtensionPlugin, QObject** outptr_QObject, QScriptExtensionInterface** outptr_QScriptExtensionInterface, QFactoryInterface** outptr_QFactoryInterface) { - MiqtVirtualQScriptExtensionPlugin* ret = new MiqtVirtualQScriptExtensionPlugin(parent); - *outptr_QScriptExtensionPlugin = ret; - *outptr_QObject = static_cast(ret); - *outptr_QScriptExtensionInterface = static_cast(ret); - *outptr_QFactoryInterface = static_cast(ret); +QScriptExtensionPlugin* QScriptExtensionPlugin_new2(QObject* parent) { + return new MiqtVirtualQScriptExtensionPlugin(parent); +} + +void QScriptExtensionPlugin_virtbase(QScriptExtensionPlugin* src, QObject** outptr_QObject, QScriptExtensionInterface** outptr_QScriptExtensionInterface) { + *outptr_QObject = static_cast(src); + *outptr_QScriptExtensionInterface = static_cast(src); } QMetaObject* QScriptExtensionPlugin_MetaObject(const QScriptExtensionPlugin* self) { diff --git a/qt/script/gen_qscriptextensionplugin.go b/qt/script/gen_qscriptextensionplugin.go index 77f56328..43402fa5 100644 --- a/qt/script/gen_qscriptextensionplugin.go +++ b/qt/script/gen_qscriptextensionplugin.go @@ -37,48 +37,36 @@ func (this *QScriptExtensionPlugin) UnsafePointer() unsafe.Pointer { } // newQScriptExtensionPlugin constructs the type using only CGO pointers. -func newQScriptExtensionPlugin(h *C.QScriptExtensionPlugin, h_QObject *C.QObject, h_QScriptExtensionInterface *C.QScriptExtensionInterface, h_QFactoryInterface *C.QFactoryInterface) *QScriptExtensionPlugin { +func newQScriptExtensionPlugin(h *C.QScriptExtensionPlugin) *QScriptExtensionPlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QScriptExtensionInterface *C.QScriptExtensionInterface = nil + C.QScriptExtensionPlugin_virtbase(h, &outptr_QObject, &outptr_QScriptExtensionInterface) + return &QScriptExtensionPlugin{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject)), - QScriptExtensionInterface: newQScriptExtensionInterface(h_QScriptExtensionInterface, h_QFactoryInterface)} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject)), + QScriptExtensionInterface: newQScriptExtensionInterface(outptr_QScriptExtensionInterface)} } // UnsafeNewQScriptExtensionPlugin constructs the type using only unsafe pointers. -func UnsafeNewQScriptExtensionPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QScriptExtensionInterface unsafe.Pointer, h_QFactoryInterface unsafe.Pointer) *QScriptExtensionPlugin { - if h == nil { - return nil - } - - return &QScriptExtensionPlugin{h: (*C.QScriptExtensionPlugin)(h), - QObject: qt.UnsafeNewQObject(h_QObject), - QScriptExtensionInterface: UnsafeNewQScriptExtensionInterface(h_QScriptExtensionInterface, h_QFactoryInterface)} +func UnsafeNewQScriptExtensionPlugin(h unsafe.Pointer) *QScriptExtensionPlugin { + return newQScriptExtensionPlugin((*C.QScriptExtensionPlugin)(h)) } // NewQScriptExtensionPlugin constructs a new QScriptExtensionPlugin object. func NewQScriptExtensionPlugin() *QScriptExtensionPlugin { - var outptr_QScriptExtensionPlugin *C.QScriptExtensionPlugin = nil - var outptr_QObject *C.QObject = nil - var outptr_QScriptExtensionInterface *C.QScriptExtensionInterface = nil - var outptr_QFactoryInterface *C.QFactoryInterface = nil - C.QScriptExtensionPlugin_new(&outptr_QScriptExtensionPlugin, &outptr_QObject, &outptr_QScriptExtensionInterface, &outptr_QFactoryInterface) - ret := newQScriptExtensionPlugin(outptr_QScriptExtensionPlugin, outptr_QObject, outptr_QScriptExtensionInterface, outptr_QFactoryInterface) + ret := newQScriptExtensionPlugin(C.QScriptExtensionPlugin_new()) ret.isSubclass = true return ret } // NewQScriptExtensionPlugin2 constructs a new QScriptExtensionPlugin object. func NewQScriptExtensionPlugin2(parent *qt.QObject) *QScriptExtensionPlugin { - var outptr_QScriptExtensionPlugin *C.QScriptExtensionPlugin = nil - var outptr_QObject *C.QObject = nil - var outptr_QScriptExtensionInterface *C.QScriptExtensionInterface = nil - var outptr_QFactoryInterface *C.QFactoryInterface = nil - C.QScriptExtensionPlugin_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QScriptExtensionPlugin, &outptr_QObject, &outptr_QScriptExtensionInterface, &outptr_QFactoryInterface) - ret := newQScriptExtensionPlugin(outptr_QScriptExtensionPlugin, outptr_QObject, outptr_QScriptExtensionInterface, outptr_QFactoryInterface) + ret := newQScriptExtensionPlugin(C.QScriptExtensionPlugin_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -233,7 +221,7 @@ func miqt_exec_callback_QScriptExtensionPlugin_Initialize(self *C.QScriptExtensi key_ret := C.GoStringN(key_ms.data, C.int(int64(key_ms.len))) C.free(unsafe.Pointer(key_ms.data)) slotval1 := key_ret - slotval2 := newQScriptEngine(engine, nil) + slotval2 := newQScriptEngine(engine) gofunc(slotval1, slotval2) @@ -317,7 +305,7 @@ func miqt_exec_callback_QScriptExtensionPlugin_TimerEvent(self *C.QScriptExtensi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QScriptExtensionPlugin{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -343,7 +331,7 @@ func miqt_exec_callback_QScriptExtensionPlugin_ChildEvent(self *C.QScriptExtensi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QScriptExtensionPlugin{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/script/gen_qscriptextensionplugin.h b/qt/script/gen_qscriptextensionplugin.h index 500f77b5..3d5a065c 100644 --- a/qt/script/gen_qscriptextensionplugin.h +++ b/qt/script/gen_qscriptextensionplugin.h @@ -40,8 +40,9 @@ typedef struct QScriptValue QScriptValue; typedef struct QTimerEvent QTimerEvent; #endif -void QScriptExtensionPlugin_new(QScriptExtensionPlugin** outptr_QScriptExtensionPlugin, QObject** outptr_QObject, QScriptExtensionInterface** outptr_QScriptExtensionInterface, QFactoryInterface** outptr_QFactoryInterface); -void QScriptExtensionPlugin_new2(QObject* parent, QScriptExtensionPlugin** outptr_QScriptExtensionPlugin, QObject** outptr_QObject, QScriptExtensionInterface** outptr_QScriptExtensionInterface, QFactoryInterface** outptr_QFactoryInterface); +QScriptExtensionPlugin* QScriptExtensionPlugin_new(); +QScriptExtensionPlugin* QScriptExtensionPlugin_new2(QObject* parent); +void QScriptExtensionPlugin_virtbase(QScriptExtensionPlugin* src, QObject** outptr_QObject, QScriptExtensionInterface** outptr_QScriptExtensionInterface); QMetaObject* QScriptExtensionPlugin_MetaObject(const QScriptExtensionPlugin* self); void* QScriptExtensionPlugin_Metacast(QScriptExtensionPlugin* self, const char* param1); struct miqt_string QScriptExtensionPlugin_Tr(const char* s); diff --git a/qt/script/gen_qscriptprogram.cpp b/qt/script/gen_qscriptprogram.cpp index 1d536031..e875991b 100644 --- a/qt/script/gen_qscriptprogram.cpp +++ b/qt/script/gen_qscriptprogram.cpp @@ -6,34 +6,29 @@ #include "gen_qscriptprogram.h" #include "_cgo_export.h" -void QScriptProgram_new(QScriptProgram** outptr_QScriptProgram) { - QScriptProgram* ret = new QScriptProgram(); - *outptr_QScriptProgram = ret; +QScriptProgram* QScriptProgram_new() { + return new QScriptProgram(); } -void QScriptProgram_new2(struct miqt_string sourceCode, QScriptProgram** outptr_QScriptProgram) { +QScriptProgram* QScriptProgram_new2(struct miqt_string sourceCode) { QString sourceCode_QString = QString::fromUtf8(sourceCode.data, sourceCode.len); - QScriptProgram* ret = new QScriptProgram(sourceCode_QString); - *outptr_QScriptProgram = ret; + return new QScriptProgram(sourceCode_QString); } -void QScriptProgram_new3(QScriptProgram* other, QScriptProgram** outptr_QScriptProgram) { - QScriptProgram* ret = new QScriptProgram(*other); - *outptr_QScriptProgram = ret; +QScriptProgram* QScriptProgram_new3(QScriptProgram* other) { + return new QScriptProgram(*other); } -void QScriptProgram_new4(struct miqt_string sourceCode, struct miqt_string fileName, QScriptProgram** outptr_QScriptProgram) { +QScriptProgram* QScriptProgram_new4(struct miqt_string sourceCode, struct miqt_string fileName) { QString sourceCode_QString = QString::fromUtf8(sourceCode.data, sourceCode.len); QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QScriptProgram* ret = new QScriptProgram(sourceCode_QString, fileName_QString); - *outptr_QScriptProgram = ret; + return new QScriptProgram(sourceCode_QString, fileName_QString); } -void QScriptProgram_new5(struct miqt_string sourceCode, struct miqt_string fileName, int firstLineNumber, QScriptProgram** outptr_QScriptProgram) { +QScriptProgram* QScriptProgram_new5(struct miqt_string sourceCode, struct miqt_string fileName, int firstLineNumber) { QString sourceCode_QString = QString::fromUtf8(sourceCode.data, sourceCode.len); QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QScriptProgram* ret = new QScriptProgram(sourceCode_QString, fileName_QString, static_cast(firstLineNumber)); - *outptr_QScriptProgram = ret; + return new QScriptProgram(sourceCode_QString, fileName_QString, static_cast(firstLineNumber)); } void QScriptProgram_OperatorAssign(QScriptProgram* self, QScriptProgram* other) { diff --git a/qt/script/gen_qscriptprogram.go b/qt/script/gen_qscriptprogram.go index f6ea3e57..94cb3a8c 100644 --- a/qt/script/gen_qscriptprogram.go +++ b/qt/script/gen_qscriptprogram.go @@ -37,24 +37,19 @@ func newQScriptProgram(h *C.QScriptProgram) *QScriptProgram { if h == nil { return nil } + return &QScriptProgram{h: h} } // UnsafeNewQScriptProgram constructs the type using only unsafe pointers. func UnsafeNewQScriptProgram(h unsafe.Pointer) *QScriptProgram { - if h == nil { - return nil - } - - return &QScriptProgram{h: (*C.QScriptProgram)(h)} + return newQScriptProgram((*C.QScriptProgram)(h)) } // NewQScriptProgram constructs a new QScriptProgram object. func NewQScriptProgram() *QScriptProgram { - var outptr_QScriptProgram *C.QScriptProgram = nil - C.QScriptProgram_new(&outptr_QScriptProgram) - ret := newQScriptProgram(outptr_QScriptProgram) + ret := newQScriptProgram(C.QScriptProgram_new()) ret.isSubclass = true return ret } @@ -65,20 +60,16 @@ func NewQScriptProgram2(sourceCode string) *QScriptProgram { sourceCode_ms.data = C.CString(sourceCode) sourceCode_ms.len = C.size_t(len(sourceCode)) defer C.free(unsafe.Pointer(sourceCode_ms.data)) - var outptr_QScriptProgram *C.QScriptProgram = nil - C.QScriptProgram_new2(sourceCode_ms, &outptr_QScriptProgram) - ret := newQScriptProgram(outptr_QScriptProgram) + ret := newQScriptProgram(C.QScriptProgram_new2(sourceCode_ms)) ret.isSubclass = true return ret } // NewQScriptProgram3 constructs a new QScriptProgram object. func NewQScriptProgram3(other *QScriptProgram) *QScriptProgram { - var outptr_QScriptProgram *C.QScriptProgram = nil - C.QScriptProgram_new3(other.cPointer(), &outptr_QScriptProgram) - ret := newQScriptProgram(outptr_QScriptProgram) + ret := newQScriptProgram(C.QScriptProgram_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -93,10 +84,8 @@ func NewQScriptProgram4(sourceCode string, fileName string) *QScriptProgram { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QScriptProgram *C.QScriptProgram = nil - C.QScriptProgram_new4(sourceCode_ms, fileName_ms, &outptr_QScriptProgram) - ret := newQScriptProgram(outptr_QScriptProgram) + ret := newQScriptProgram(C.QScriptProgram_new4(sourceCode_ms, fileName_ms)) ret.isSubclass = true return ret } @@ -111,10 +100,8 @@ func NewQScriptProgram5(sourceCode string, fileName string, firstLineNumber int) fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QScriptProgram *C.QScriptProgram = nil - C.QScriptProgram_new5(sourceCode_ms, fileName_ms, (C.int)(firstLineNumber), &outptr_QScriptProgram) - ret := newQScriptProgram(outptr_QScriptProgram) + ret := newQScriptProgram(C.QScriptProgram_new5(sourceCode_ms, fileName_ms, (C.int)(firstLineNumber))) ret.isSubclass = true return ret } diff --git a/qt/script/gen_qscriptprogram.h b/qt/script/gen_qscriptprogram.h index 4055023e..4f44e750 100644 --- a/qt/script/gen_qscriptprogram.h +++ b/qt/script/gen_qscriptprogram.h @@ -20,11 +20,11 @@ class QScriptProgram; typedef struct QScriptProgram QScriptProgram; #endif -void QScriptProgram_new(QScriptProgram** outptr_QScriptProgram); -void QScriptProgram_new2(struct miqt_string sourceCode, QScriptProgram** outptr_QScriptProgram); -void QScriptProgram_new3(QScriptProgram* other, QScriptProgram** outptr_QScriptProgram); -void QScriptProgram_new4(struct miqt_string sourceCode, struct miqt_string fileName, QScriptProgram** outptr_QScriptProgram); -void QScriptProgram_new5(struct miqt_string sourceCode, struct miqt_string fileName, int firstLineNumber, QScriptProgram** outptr_QScriptProgram); +QScriptProgram* QScriptProgram_new(); +QScriptProgram* QScriptProgram_new2(struct miqt_string sourceCode); +QScriptProgram* QScriptProgram_new3(QScriptProgram* other); +QScriptProgram* QScriptProgram_new4(struct miqt_string sourceCode, struct miqt_string fileName); +QScriptProgram* QScriptProgram_new5(struct miqt_string sourceCode, struct miqt_string fileName, int firstLineNumber); void QScriptProgram_OperatorAssign(QScriptProgram* self, QScriptProgram* other); bool QScriptProgram_IsNull(const QScriptProgram* self); struct miqt_string QScriptProgram_SourceCode(const QScriptProgram* self); diff --git a/qt/script/gen_qscriptstring.cpp b/qt/script/gen_qscriptstring.cpp index 2fa7d0dc..9c0dca1e 100644 --- a/qt/script/gen_qscriptstring.cpp +++ b/qt/script/gen_qscriptstring.cpp @@ -6,14 +6,12 @@ #include "gen_qscriptstring.h" #include "_cgo_export.h" -void QScriptString_new(QScriptString** outptr_QScriptString) { - QScriptString* ret = new QScriptString(); - *outptr_QScriptString = ret; +QScriptString* QScriptString_new() { + return new QScriptString(); } -void QScriptString_new2(QScriptString* other, QScriptString** outptr_QScriptString) { - QScriptString* ret = new QScriptString(*other); - *outptr_QScriptString = ret; +QScriptString* QScriptString_new2(QScriptString* other) { + return new QScriptString(*other); } void QScriptString_OperatorAssign(QScriptString* self, QScriptString* other) { diff --git a/qt/script/gen_qscriptstring.go b/qt/script/gen_qscriptstring.go index 1c6c02c3..493332b4 100644 --- a/qt/script/gen_qscriptstring.go +++ b/qt/script/gen_qscriptstring.go @@ -37,34 +37,27 @@ func newQScriptString(h *C.QScriptString) *QScriptString { if h == nil { return nil } + return &QScriptString{h: h} } // UnsafeNewQScriptString constructs the type using only unsafe pointers. func UnsafeNewQScriptString(h unsafe.Pointer) *QScriptString { - if h == nil { - return nil - } - - return &QScriptString{h: (*C.QScriptString)(h)} + return newQScriptString((*C.QScriptString)(h)) } // NewQScriptString constructs a new QScriptString object. func NewQScriptString() *QScriptString { - var outptr_QScriptString *C.QScriptString = nil - C.QScriptString_new(&outptr_QScriptString) - ret := newQScriptString(outptr_QScriptString) + ret := newQScriptString(C.QScriptString_new()) ret.isSubclass = true return ret } // NewQScriptString2 constructs a new QScriptString object. func NewQScriptString2(other *QScriptString) *QScriptString { - var outptr_QScriptString *C.QScriptString = nil - C.QScriptString_new2(other.cPointer(), &outptr_QScriptString) - ret := newQScriptString(outptr_QScriptString) + ret := newQScriptString(C.QScriptString_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/script/gen_qscriptstring.h b/qt/script/gen_qscriptstring.h index e8ed8a77..25a663d2 100644 --- a/qt/script/gen_qscriptstring.h +++ b/qt/script/gen_qscriptstring.h @@ -20,8 +20,8 @@ class QScriptString; typedef struct QScriptString QScriptString; #endif -void QScriptString_new(QScriptString** outptr_QScriptString); -void QScriptString_new2(QScriptString* other, QScriptString** outptr_QScriptString); +QScriptString* QScriptString_new(); +QScriptString* QScriptString_new2(QScriptString* other); void QScriptString_OperatorAssign(QScriptString* self, QScriptString* other); bool QScriptString_IsValid(const QScriptString* self); bool QScriptString_OperatorEqual(const QScriptString* self, QScriptString* other); diff --git a/qt/script/gen_qscriptvalue.cpp b/qt/script/gen_qscriptvalue.cpp index 935cc06c..48cb7343 100644 --- a/qt/script/gen_qscriptvalue.cpp +++ b/qt/script/gen_qscriptvalue.cpp @@ -15,86 +15,70 @@ #include "gen_qscriptvalue.h" #include "_cgo_export.h" -void QScriptValue_new(QScriptValue** outptr_QScriptValue) { - QScriptValue* ret = new QScriptValue(); - *outptr_QScriptValue = ret; +QScriptValue* QScriptValue_new() { + return new QScriptValue(); } -void QScriptValue_new2(QScriptValue* other, QScriptValue** outptr_QScriptValue) { - QScriptValue* ret = new QScriptValue(*other); - *outptr_QScriptValue = ret; +QScriptValue* QScriptValue_new2(QScriptValue* other) { + return new QScriptValue(*other); } -void QScriptValue_new3(QScriptEngine* engine, int val, QScriptValue** outptr_QScriptValue) { - QScriptValue* ret = new QScriptValue(engine, static_cast(val)); - *outptr_QScriptValue = ret; +QScriptValue* QScriptValue_new3(QScriptEngine* engine, int val) { + return new QScriptValue(engine, static_cast(val)); } -void QScriptValue_new4(QScriptEngine* engine, bool val, QScriptValue** outptr_QScriptValue) { - QScriptValue* ret = new QScriptValue(engine, val); - *outptr_QScriptValue = ret; +QScriptValue* QScriptValue_new4(QScriptEngine* engine, bool val) { + return new QScriptValue(engine, val); } -void QScriptValue_new5(QScriptEngine* engine, int val, QScriptValue** outptr_QScriptValue) { - QScriptValue* ret = new QScriptValue(engine, static_cast(val)); - *outptr_QScriptValue = ret; +QScriptValue* QScriptValue_new5(QScriptEngine* engine, int val) { + return new QScriptValue(engine, static_cast(val)); } -void QScriptValue_new6(QScriptEngine* engine, unsigned int val, QScriptValue** outptr_QScriptValue) { - QScriptValue* ret = new QScriptValue(engine, static_cast(val)); - *outptr_QScriptValue = ret; +QScriptValue* QScriptValue_new6(QScriptEngine* engine, unsigned int val) { + return new QScriptValue(engine, static_cast(val)); } -void QScriptValue_new7(QScriptEngine* engine, double val, QScriptValue** outptr_QScriptValue) { - QScriptValue* ret = new QScriptValue(engine, static_cast(val)); - *outptr_QScriptValue = ret; +QScriptValue* QScriptValue_new7(QScriptEngine* engine, double val) { + return new QScriptValue(engine, static_cast(val)); } -void QScriptValue_new8(QScriptEngine* engine, struct miqt_string val, QScriptValue** outptr_QScriptValue) { +QScriptValue* QScriptValue_new8(QScriptEngine* engine, struct miqt_string val) { QString val_QString = QString::fromUtf8(val.data, val.len); - QScriptValue* ret = new QScriptValue(engine, val_QString); - *outptr_QScriptValue = ret; + return new QScriptValue(engine, val_QString); } -void QScriptValue_new9(QScriptEngine* engine, const char* val, QScriptValue** outptr_QScriptValue) { - QScriptValue* ret = new QScriptValue(engine, val); - *outptr_QScriptValue = ret; +QScriptValue* QScriptValue_new9(QScriptEngine* engine, const char* val) { + return new QScriptValue(engine, val); } -void QScriptValue_new10(int value, QScriptValue** outptr_QScriptValue) { - QScriptValue* ret = new QScriptValue(static_cast(value)); - *outptr_QScriptValue = ret; +QScriptValue* QScriptValue_new10(int value) { + return new QScriptValue(static_cast(value)); } -void QScriptValue_new11(bool value, QScriptValue** outptr_QScriptValue) { - QScriptValue* ret = new QScriptValue(value); - *outptr_QScriptValue = ret; +QScriptValue* QScriptValue_new11(bool value) { + return new QScriptValue(value); } -void QScriptValue_new12(int value, QScriptValue** outptr_QScriptValue) { - QScriptValue* ret = new QScriptValue(static_cast(value)); - *outptr_QScriptValue = ret; +QScriptValue* QScriptValue_new12(int value) { + return new QScriptValue(static_cast(value)); } -void QScriptValue_new13(unsigned int value, QScriptValue** outptr_QScriptValue) { - QScriptValue* ret = new QScriptValue(static_cast(value)); - *outptr_QScriptValue = ret; +QScriptValue* QScriptValue_new13(unsigned int value) { + return new QScriptValue(static_cast(value)); } -void QScriptValue_new14(double value, QScriptValue** outptr_QScriptValue) { - QScriptValue* ret = new QScriptValue(static_cast(value)); - *outptr_QScriptValue = ret; +QScriptValue* QScriptValue_new14(double value) { + return new QScriptValue(static_cast(value)); } -void QScriptValue_new15(struct miqt_string value, QScriptValue** outptr_QScriptValue) { +QScriptValue* QScriptValue_new15(struct miqt_string value) { QString value_QString = QString::fromUtf8(value.data, value.len); - QScriptValue* ret = new QScriptValue(value_QString); - *outptr_QScriptValue = ret; + return new QScriptValue(value_QString); } -void QScriptValue_new16(const char* value, QScriptValue** outptr_QScriptValue) { - QScriptValue* ret = new QScriptValue(value); - *outptr_QScriptValue = ret; +QScriptValue* QScriptValue_new16(const char* value) { + return new QScriptValue(value); } void QScriptValue_OperatorAssign(QScriptValue* self, QScriptValue* other) { diff --git a/qt/script/gen_qscriptvalue.go b/qt/script/gen_qscriptvalue.go index 4e7f910e..770e071f 100644 --- a/qt/script/gen_qscriptvalue.go +++ b/qt/script/gen_qscriptvalue.go @@ -67,84 +67,67 @@ func newQScriptValue(h *C.QScriptValue) *QScriptValue { if h == nil { return nil } + return &QScriptValue{h: h} } // UnsafeNewQScriptValue constructs the type using only unsafe pointers. func UnsafeNewQScriptValue(h unsafe.Pointer) *QScriptValue { - if h == nil { - return nil - } - - return &QScriptValue{h: (*C.QScriptValue)(h)} + return newQScriptValue((*C.QScriptValue)(h)) } // NewQScriptValue constructs a new QScriptValue object. func NewQScriptValue() *QScriptValue { - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new(&outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new()) ret.isSubclass = true return ret } // NewQScriptValue2 constructs a new QScriptValue object. func NewQScriptValue2(other *QScriptValue) *QScriptValue { - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new2(other.cPointer(), &outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQScriptValue3 constructs a new QScriptValue object. func NewQScriptValue3(engine *QScriptEngine, val QScriptValue__SpecialValue) *QScriptValue { - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new3(engine.cPointer(), (C.int)(val), &outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new3(engine.cPointer(), (C.int)(val))) ret.isSubclass = true return ret } // NewQScriptValue4 constructs a new QScriptValue object. func NewQScriptValue4(engine *QScriptEngine, val bool) *QScriptValue { - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new4(engine.cPointer(), (C.bool)(val), &outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new4(engine.cPointer(), (C.bool)(val))) ret.isSubclass = true return ret } // NewQScriptValue5 constructs a new QScriptValue object. func NewQScriptValue5(engine *QScriptEngine, val int) *QScriptValue { - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new5(engine.cPointer(), (C.int)(val), &outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new5(engine.cPointer(), (C.int)(val))) ret.isSubclass = true return ret } // NewQScriptValue6 constructs a new QScriptValue object. func NewQScriptValue6(engine *QScriptEngine, val uint) *QScriptValue { - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new6(engine.cPointer(), (C.uint)(val), &outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new6(engine.cPointer(), (C.uint)(val))) ret.isSubclass = true return ret } // NewQScriptValue7 constructs a new QScriptValue object. func NewQScriptValue7(engine *QScriptEngine, val float64) *QScriptValue { - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new7(engine.cPointer(), (C.double)(val), &outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new7(engine.cPointer(), (C.double)(val))) ret.isSubclass = true return ret } @@ -155,10 +138,8 @@ func NewQScriptValue8(engine *QScriptEngine, val string) *QScriptValue { val_ms.data = C.CString(val) val_ms.len = C.size_t(len(val)) defer C.free(unsafe.Pointer(val_ms.data)) - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new8(engine.cPointer(), val_ms, &outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new8(engine.cPointer(), val_ms)) ret.isSubclass = true return ret } @@ -167,60 +148,48 @@ func NewQScriptValue8(engine *QScriptEngine, val string) *QScriptValue { func NewQScriptValue9(engine *QScriptEngine, val string) *QScriptValue { val_Cstring := C.CString(val) defer C.free(unsafe.Pointer(val_Cstring)) - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new9(engine.cPointer(), val_Cstring, &outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new9(engine.cPointer(), val_Cstring)) ret.isSubclass = true return ret } // NewQScriptValue10 constructs a new QScriptValue object. func NewQScriptValue10(value QScriptValue__SpecialValue) *QScriptValue { - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new10((C.int)(value), &outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new10((C.int)(value))) ret.isSubclass = true return ret } // NewQScriptValue11 constructs a new QScriptValue object. func NewQScriptValue11(value bool) *QScriptValue { - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new11((C.bool)(value), &outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new11((C.bool)(value))) ret.isSubclass = true return ret } // NewQScriptValue12 constructs a new QScriptValue object. func NewQScriptValue12(value int) *QScriptValue { - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new12((C.int)(value), &outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new12((C.int)(value))) ret.isSubclass = true return ret } // NewQScriptValue13 constructs a new QScriptValue object. func NewQScriptValue13(value uint) *QScriptValue { - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new13((C.uint)(value), &outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new13((C.uint)(value))) ret.isSubclass = true return ret } // NewQScriptValue14 constructs a new QScriptValue object. func NewQScriptValue14(value float64) *QScriptValue { - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new14((C.double)(value), &outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new14((C.double)(value))) ret.isSubclass = true return ret } @@ -231,10 +200,8 @@ func NewQScriptValue15(value string) *QScriptValue { value_ms.data = C.CString(value) value_ms.len = C.size_t(len(value)) defer C.free(unsafe.Pointer(value_ms.data)) - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new15(value_ms, &outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new15(value_ms)) ret.isSubclass = true return ret } @@ -243,10 +210,8 @@ func NewQScriptValue15(value string) *QScriptValue { func NewQScriptValue16(value string) *QScriptValue { value_Cstring := C.CString(value) defer C.free(unsafe.Pointer(value_Cstring)) - var outptr_QScriptValue *C.QScriptValue = nil - C.QScriptValue_new16(value_Cstring, &outptr_QScriptValue) - ret := newQScriptValue(outptr_QScriptValue) + ret := newQScriptValue(C.QScriptValue_new16(value_Cstring)) ret.isSubclass = true return ret } @@ -256,7 +221,7 @@ func (this *QScriptValue) OperatorAssign(other *QScriptValue) { } func (this *QScriptValue) Engine() *QScriptEngine { - return newQScriptEngine(C.QScriptValue_Engine(this.h), nil) + return newQScriptEngine(C.QScriptValue_Engine(this.h)) } func (this *QScriptValue) IsValid() bool { diff --git a/qt/script/gen_qscriptvalue.h b/qt/script/gen_qscriptvalue.h index 2cb5a905..2b6dfad9 100644 --- a/qt/script/gen_qscriptvalue.h +++ b/qt/script/gen_qscriptvalue.h @@ -36,22 +36,22 @@ typedef struct QScriptValue QScriptValue; typedef struct QVariant QVariant; #endif -void QScriptValue_new(QScriptValue** outptr_QScriptValue); -void QScriptValue_new2(QScriptValue* other, QScriptValue** outptr_QScriptValue); -void QScriptValue_new3(QScriptEngine* engine, int val, QScriptValue** outptr_QScriptValue); -void QScriptValue_new4(QScriptEngine* engine, bool val, QScriptValue** outptr_QScriptValue); -void QScriptValue_new5(QScriptEngine* engine, int val, QScriptValue** outptr_QScriptValue); -void QScriptValue_new6(QScriptEngine* engine, unsigned int val, QScriptValue** outptr_QScriptValue); -void QScriptValue_new7(QScriptEngine* engine, double val, QScriptValue** outptr_QScriptValue); -void QScriptValue_new8(QScriptEngine* engine, struct miqt_string val, QScriptValue** outptr_QScriptValue); -void QScriptValue_new9(QScriptEngine* engine, const char* val, QScriptValue** outptr_QScriptValue); -void QScriptValue_new10(int value, QScriptValue** outptr_QScriptValue); -void QScriptValue_new11(bool value, QScriptValue** outptr_QScriptValue); -void QScriptValue_new12(int value, QScriptValue** outptr_QScriptValue); -void QScriptValue_new13(unsigned int value, QScriptValue** outptr_QScriptValue); -void QScriptValue_new14(double value, QScriptValue** outptr_QScriptValue); -void QScriptValue_new15(struct miqt_string value, QScriptValue** outptr_QScriptValue); -void QScriptValue_new16(const char* value, QScriptValue** outptr_QScriptValue); +QScriptValue* QScriptValue_new(); +QScriptValue* QScriptValue_new2(QScriptValue* other); +QScriptValue* QScriptValue_new3(QScriptEngine* engine, int val); +QScriptValue* QScriptValue_new4(QScriptEngine* engine, bool val); +QScriptValue* QScriptValue_new5(QScriptEngine* engine, int val); +QScriptValue* QScriptValue_new6(QScriptEngine* engine, unsigned int val); +QScriptValue* QScriptValue_new7(QScriptEngine* engine, double val); +QScriptValue* QScriptValue_new8(QScriptEngine* engine, struct miqt_string val); +QScriptValue* QScriptValue_new9(QScriptEngine* engine, const char* val); +QScriptValue* QScriptValue_new10(int value); +QScriptValue* QScriptValue_new11(bool value); +QScriptValue* QScriptValue_new12(int value); +QScriptValue* QScriptValue_new13(unsigned int value); +QScriptValue* QScriptValue_new14(double value); +QScriptValue* QScriptValue_new15(struct miqt_string value); +QScriptValue* QScriptValue_new16(const char* value); void QScriptValue_OperatorAssign(QScriptValue* self, QScriptValue* other); QScriptEngine* QScriptValue_Engine(const QScriptValue* self); bool QScriptValue_IsValid(const QScriptValue* self); diff --git a/qt/script/gen_qscriptvalueiterator.cpp b/qt/script/gen_qscriptvalueiterator.cpp index 123f398c..f13867bf 100644 --- a/qt/script/gen_qscriptvalueiterator.cpp +++ b/qt/script/gen_qscriptvalueiterator.cpp @@ -8,9 +8,8 @@ #include "gen_qscriptvalueiterator.h" #include "_cgo_export.h" -void QScriptValueIterator_new(QScriptValue* value, QScriptValueIterator** outptr_QScriptValueIterator) { - QScriptValueIterator* ret = new QScriptValueIterator(*value); - *outptr_QScriptValueIterator = ret; +QScriptValueIterator* QScriptValueIterator_new(QScriptValue* value) { + return new QScriptValueIterator(*value); } bool QScriptValueIterator_HasNext(const QScriptValueIterator* self) { diff --git a/qt/script/gen_qscriptvalueiterator.go b/qt/script/gen_qscriptvalueiterator.go index 5ae92120..07e82027 100644 --- a/qt/script/gen_qscriptvalueiterator.go +++ b/qt/script/gen_qscriptvalueiterator.go @@ -37,24 +37,19 @@ func newQScriptValueIterator(h *C.QScriptValueIterator) *QScriptValueIterator { if h == nil { return nil } + return &QScriptValueIterator{h: h} } // UnsafeNewQScriptValueIterator constructs the type using only unsafe pointers. func UnsafeNewQScriptValueIterator(h unsafe.Pointer) *QScriptValueIterator { - if h == nil { - return nil - } - - return &QScriptValueIterator{h: (*C.QScriptValueIterator)(h)} + return newQScriptValueIterator((*C.QScriptValueIterator)(h)) } // NewQScriptValueIterator constructs a new QScriptValueIterator object. func NewQScriptValueIterator(value *QScriptValue) *QScriptValueIterator { - var outptr_QScriptValueIterator *C.QScriptValueIterator = nil - C.QScriptValueIterator_new(value.cPointer(), &outptr_QScriptValueIterator) - ret := newQScriptValueIterator(outptr_QScriptValueIterator) + ret := newQScriptValueIterator(C.QScriptValueIterator_new(value.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/script/gen_qscriptvalueiterator.h b/qt/script/gen_qscriptvalueiterator.h index 5dfff1eb..f2677248 100644 --- a/qt/script/gen_qscriptvalueiterator.h +++ b/qt/script/gen_qscriptvalueiterator.h @@ -24,7 +24,7 @@ typedef struct QScriptValue QScriptValue; typedef struct QScriptValueIterator QScriptValueIterator; #endif -void QScriptValueIterator_new(QScriptValue* value, QScriptValueIterator** outptr_QScriptValueIterator); +QScriptValueIterator* QScriptValueIterator_new(QScriptValue* value); bool QScriptValueIterator_HasNext(const QScriptValueIterator* self); void QScriptValueIterator_Next(QScriptValueIterator* self); bool QScriptValueIterator_HasPrevious(const QScriptValueIterator* self); diff --git a/qt/svg/gen_qgraphicssvgitem.cpp b/qt/svg/gen_qgraphicssvgitem.cpp index 8d846a90..7b1fd2b6 100644 --- a/qt/svg/gen_qgraphicssvgitem.cpp +++ b/qt/svg/gen_qgraphicssvgitem.cpp @@ -122,38 +122,26 @@ public: }; -void QGraphicsSvgItem_new(QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(); - *outptr_QGraphicsSvgItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsSvgItem* QGraphicsSvgItem_new() { + return new MiqtVirtualQGraphicsSvgItem(); } -void QGraphicsSvgItem_new2(struct miqt_string fileName, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { +QGraphicsSvgItem* QGraphicsSvgItem_new2(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(fileName_QString); - *outptr_QGraphicsSvgItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); + return new MiqtVirtualQGraphicsSvgItem(fileName_QString); } -void QGraphicsSvgItem_new3(QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(parentItem); - *outptr_QGraphicsSvgItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsSvgItem* QGraphicsSvgItem_new3(QGraphicsItem* parentItem) { + return new MiqtVirtualQGraphicsSvgItem(parentItem); } -void QGraphicsSvgItem_new4(struct miqt_string fileName, QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { +QGraphicsSvgItem* QGraphicsSvgItem_new4(struct miqt_string fileName, QGraphicsItem* parentItem) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(fileName_QString, parentItem); - *outptr_QGraphicsSvgItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); + return new MiqtVirtualQGraphicsSvgItem(fileName_QString, parentItem); +} + +void QGraphicsSvgItem_virtbase(QGraphicsSvgItem* src, QGraphicsObject** outptr_QGraphicsObject) { + *outptr_QGraphicsObject = static_cast(src); } QMetaObject* QGraphicsSvgItem_MetaObject(const QGraphicsSvgItem* self) { diff --git a/qt/svg/gen_qgraphicssvgitem.go b/qt/svg/gen_qgraphicssvgitem.go index 91838df3..603cb158 100644 --- a/qt/svg/gen_qgraphicssvgitem.go +++ b/qt/svg/gen_qgraphicssvgitem.go @@ -42,33 +42,26 @@ func (this *QGraphicsSvgItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsSvgItem constructs the type using only CGO pointers. -func newQGraphicsSvgItem(h *C.QGraphicsSvgItem, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsSvgItem { +func newQGraphicsSvgItem(h *C.QGraphicsSvgItem) *QGraphicsSvgItem { if h == nil { return nil } + var outptr_QGraphicsObject *C.QGraphicsObject = nil + C.QGraphicsSvgItem_virtbase(h, &outptr_QGraphicsObject) + return &QGraphicsSvgItem{h: h, - QGraphicsObject: qt.UnsafeNewQGraphicsObject(unsafe.Pointer(h_QGraphicsObject), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QGraphicsItem))} + QGraphicsObject: qt.UnsafeNewQGraphicsObject(unsafe.Pointer(outptr_QGraphicsObject))} } // UnsafeNewQGraphicsSvgItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSvgItem(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsSvgItem { - if h == nil { - return nil - } - - return &QGraphicsSvgItem{h: (*C.QGraphicsSvgItem)(h), - QGraphicsObject: qt.UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem)} +func UnsafeNewQGraphicsSvgItem(h unsafe.Pointer) *QGraphicsSvgItem { + return newQGraphicsSvgItem((*C.QGraphicsSvgItem)(h)) } // NewQGraphicsSvgItem constructs a new QGraphicsSvgItem object. func NewQGraphicsSvgItem() *QGraphicsSvgItem { - var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSvgItem_new(&outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(C.QGraphicsSvgItem_new()) ret.isSubclass = true return ret } @@ -79,26 +72,16 @@ func NewQGraphicsSvgItem2(fileName string) *QGraphicsSvgItem { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSvgItem_new2(fileName_ms, &outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(C.QGraphicsSvgItem_new2(fileName_ms)) ret.isSubclass = true return ret } // NewQGraphicsSvgItem3 constructs a new QGraphicsSvgItem object. func NewQGraphicsSvgItem3(parentItem *qt.QGraphicsItem) *QGraphicsSvgItem { - var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSvgItem_new3((*C.QGraphicsItem)(parentItem.UnsafePointer()), &outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(C.QGraphicsSvgItem_new3((*C.QGraphicsItem)(parentItem.UnsafePointer()))) ret.isSubclass = true return ret } @@ -109,13 +92,8 @@ func NewQGraphicsSvgItem4(fileName string, parentItem *qt.QGraphicsItem) *QGraph fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSvgItem_new4(fileName_ms, (*C.QGraphicsItem)(parentItem.UnsafePointer()), &outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(C.QGraphicsSvgItem_new4(fileName_ms, (*C.QGraphicsItem)(parentItem.UnsafePointer()))) ret.isSubclass = true return ret } @@ -153,7 +131,7 @@ func (this *QGraphicsSvgItem) SetSharedRenderer(renderer *QSvgRenderer) { } func (this *QGraphicsSvgItem) Renderer() *QSvgRenderer { - return newQSvgRenderer(C.QGraphicsSvgItem_Renderer(this.h), nil) + return newQSvgRenderer(C.QGraphicsSvgItem_Renderer(this.h)) } func (this *QGraphicsSvgItem) SetElementId(id string) { @@ -296,9 +274,9 @@ func miqt_exec_callback_QGraphicsSvgItem_Paint(self *C.QGraphicsSvgItem, cb C.in // Convert all CABI parameters to Go parameters slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) - slotval2 := qt.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval2 := qt.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option)) - slotval3 := qt.UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + slotval3 := qt.UnsafeNewQWidget(unsafe.Pointer(widget)) gofunc((&QGraphicsSvgItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) diff --git a/qt/svg/gen_qgraphicssvgitem.h b/qt/svg/gen_qgraphicssvgitem.h index b500d39a..96ecdc44 100644 --- a/qt/svg/gen_qgraphicssvgitem.h +++ b/qt/svg/gen_qgraphicssvgitem.h @@ -42,10 +42,11 @@ typedef struct QSvgRenderer QSvgRenderer; typedef struct QWidget QWidget; #endif -void QGraphicsSvgItem_new(QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsSvgItem_new2(struct miqt_string fileName, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsSvgItem_new3(QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsSvgItem_new4(struct miqt_string fileName, QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsSvgItem* QGraphicsSvgItem_new(); +QGraphicsSvgItem* QGraphicsSvgItem_new2(struct miqt_string fileName); +QGraphicsSvgItem* QGraphicsSvgItem_new3(QGraphicsItem* parentItem); +QGraphicsSvgItem* QGraphicsSvgItem_new4(struct miqt_string fileName, QGraphicsItem* parentItem); +void QGraphicsSvgItem_virtbase(QGraphicsSvgItem* src, QGraphicsObject** outptr_QGraphicsObject); QMetaObject* QGraphicsSvgItem_MetaObject(const QGraphicsSvgItem* self); void* QGraphicsSvgItem_Metacast(QGraphicsSvgItem* self, const char* param1); struct miqt_string QGraphicsSvgItem_Tr(const char* s); diff --git a/qt/svg/gen_qsvggenerator.cpp b/qt/svg/gen_qsvggenerator.cpp index 24e0877c..583eee3b 100644 --- a/qt/svg/gen_qsvggenerator.cpp +++ b/qt/svg/gen_qsvggenerator.cpp @@ -160,10 +160,12 @@ public: }; -void QSvgGenerator_new(QSvgGenerator** outptr_QSvgGenerator, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSvgGenerator* ret = new MiqtVirtualQSvgGenerator(); - *outptr_QSvgGenerator = ret; - *outptr_QPaintDevice = static_cast(ret); +QSvgGenerator* QSvgGenerator_new() { + return new MiqtVirtualQSvgGenerator(); +} + +void QSvgGenerator_virtbase(QSvgGenerator* src, QPaintDevice** outptr_QPaintDevice) { + *outptr_QPaintDevice = static_cast(src); } struct miqt_string QSvgGenerator_Title(const QSvgGenerator* self) { diff --git a/qt/svg/gen_qsvggenerator.go b/qt/svg/gen_qsvggenerator.go index 3b1e5368..b857a704 100644 --- a/qt/svg/gen_qsvggenerator.go +++ b/qt/svg/gen_qsvggenerator.go @@ -36,31 +36,26 @@ func (this *QSvgGenerator) UnsafePointer() unsafe.Pointer { } // newQSvgGenerator constructs the type using only CGO pointers. -func newQSvgGenerator(h *C.QSvgGenerator, h_QPaintDevice *C.QPaintDevice) *QSvgGenerator { +func newQSvgGenerator(h *C.QSvgGenerator) *QSvgGenerator { if h == nil { return nil } + var outptr_QPaintDevice *C.QPaintDevice = nil + C.QSvgGenerator_virtbase(h, &outptr_QPaintDevice) + return &QSvgGenerator{h: h, - QPaintDevice: qt.UnsafeNewQPaintDevice(unsafe.Pointer(h_QPaintDevice))} + QPaintDevice: qt.UnsafeNewQPaintDevice(unsafe.Pointer(outptr_QPaintDevice))} } // UnsafeNewQSvgGenerator constructs the type using only unsafe pointers. -func UnsafeNewQSvgGenerator(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSvgGenerator { - if h == nil { - return nil - } - - return &QSvgGenerator{h: (*C.QSvgGenerator)(h), - QPaintDevice: qt.UnsafeNewQPaintDevice(h_QPaintDevice)} +func UnsafeNewQSvgGenerator(h unsafe.Pointer) *QSvgGenerator { + return newQSvgGenerator((*C.QSvgGenerator)(h)) } // NewQSvgGenerator constructs a new QSvgGenerator object. func NewQSvgGenerator() *QSvgGenerator { - var outptr_QSvgGenerator *C.QSvgGenerator = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSvgGenerator_new(&outptr_QSvgGenerator, &outptr_QPaintDevice) - ret := newQSvgGenerator(outptr_QSvgGenerator, outptr_QPaintDevice) + ret := newQSvgGenerator(C.QSvgGenerator_new()) ret.isSubclass = true return ret } @@ -141,7 +136,7 @@ func (this *QSvgGenerator) SetFileName(fileName string) { } func (this *QSvgGenerator) OutputDevice() *qt.QIODevice { - return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QSvgGenerator_OutputDevice(this.h)), nil) + return qt.UnsafeNewQIODevice(unsafe.Pointer(C.QSvgGenerator_OutputDevice(this.h))) } func (this *QSvgGenerator) SetOutputDevice(outputDevice *qt.QIODevice) { diff --git a/qt/svg/gen_qsvggenerator.h b/qt/svg/gen_qsvggenerator.h index d5dad804..bf2497c6 100644 --- a/qt/svg/gen_qsvggenerator.h +++ b/qt/svg/gen_qsvggenerator.h @@ -36,7 +36,8 @@ typedef struct QSize QSize; typedef struct QSvgGenerator QSvgGenerator; #endif -void QSvgGenerator_new(QSvgGenerator** outptr_QSvgGenerator, QPaintDevice** outptr_QPaintDevice); +QSvgGenerator* QSvgGenerator_new(); +void QSvgGenerator_virtbase(QSvgGenerator* src, QPaintDevice** outptr_QPaintDevice); struct miqt_string QSvgGenerator_Title(const QSvgGenerator* self); void QSvgGenerator_SetTitle(QSvgGenerator* self, struct miqt_string title); struct miqt_string QSvgGenerator_Description(const QSvgGenerator* self); diff --git a/qt/svg/gen_qsvgrenderer.cpp b/qt/svg/gen_qsvgrenderer.cpp index 8a82680b..c11a7e85 100644 --- a/qt/svg/gen_qsvgrenderer.cpp +++ b/qt/svg/gen_qsvgrenderer.cpp @@ -207,56 +207,44 @@ public: }; -void QSvgRenderer_new(QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); +QSvgRenderer* QSvgRenderer_new() { + return new MiqtVirtualQSvgRenderer(); } -void QSvgRenderer_new2(struct miqt_string filename, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { +QSvgRenderer* QSvgRenderer_new2(struct miqt_string filename) { QString filename_QString = QString::fromUtf8(filename.data, filename.len); - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(filename_QString); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSvgRenderer(filename_QString); } -void QSvgRenderer_new3(struct miqt_string contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { +QSvgRenderer* QSvgRenderer_new3(struct miqt_string contents) { QByteArray contents_QByteArray(contents.data, contents.len); - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents_QByteArray); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSvgRenderer(contents_QByteArray); } -void QSvgRenderer_new4(QXmlStreamReader* contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); +QSvgRenderer* QSvgRenderer_new4(QXmlStreamReader* contents) { + return new MiqtVirtualQSvgRenderer(contents); } -void QSvgRenderer_new5(QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(parent); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); +QSvgRenderer* QSvgRenderer_new5(QObject* parent) { + return new MiqtVirtualQSvgRenderer(parent); } -void QSvgRenderer_new6(struct miqt_string filename, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { +QSvgRenderer* QSvgRenderer_new6(struct miqt_string filename, QObject* parent) { QString filename_QString = QString::fromUtf8(filename.data, filename.len); - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(filename_QString, parent); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSvgRenderer(filename_QString, parent); } -void QSvgRenderer_new7(struct miqt_string contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { +QSvgRenderer* QSvgRenderer_new7(struct miqt_string contents, QObject* parent) { QByteArray contents_QByteArray(contents.data, contents.len); - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents_QByteArray, parent); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSvgRenderer(contents_QByteArray, parent); } -void QSvgRenderer_new8(QXmlStreamReader* contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents, parent); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); +QSvgRenderer* QSvgRenderer_new8(QXmlStreamReader* contents, QObject* parent) { + return new MiqtVirtualQSvgRenderer(contents, parent); +} + +void QSvgRenderer_virtbase(QSvgRenderer* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSvgRenderer_MetaObject(const QSvgRenderer* self) { diff --git a/qt/svg/gen_qsvgrenderer.go b/qt/svg/gen_qsvgrenderer.go index dffeae98..0b058678 100644 --- a/qt/svg/gen_qsvgrenderer.go +++ b/qt/svg/gen_qsvgrenderer.go @@ -36,31 +36,26 @@ func (this *QSvgRenderer) UnsafePointer() unsafe.Pointer { } // newQSvgRenderer constructs the type using only CGO pointers. -func newQSvgRenderer(h *C.QSvgRenderer, h_QObject *C.QObject) *QSvgRenderer { +func newQSvgRenderer(h *C.QSvgRenderer) *QSvgRenderer { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSvgRenderer_virtbase(h, &outptr_QObject) + return &QSvgRenderer{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQSvgRenderer constructs the type using only unsafe pointers. -func UnsafeNewQSvgRenderer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSvgRenderer { - if h == nil { - return nil - } - - return &QSvgRenderer{h: (*C.QSvgRenderer)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQSvgRenderer(h unsafe.Pointer) *QSvgRenderer { + return newQSvgRenderer((*C.QSvgRenderer)(h)) } // NewQSvgRenderer constructs a new QSvgRenderer object. func NewQSvgRenderer() *QSvgRenderer { - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new(&outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new()) ret.isSubclass = true return ret } @@ -71,11 +66,8 @@ func NewQSvgRenderer2(filename string) *QSvgRenderer { filename_ms.data = C.CString(filename) filename_ms.len = C.size_t(len(filename)) defer C.free(unsafe.Pointer(filename_ms.data)) - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new2(filename_ms, &outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new2(filename_ms)) ret.isSubclass = true return ret } @@ -85,33 +77,24 @@ func NewQSvgRenderer3(contents []byte) *QSvgRenderer { contents_alias := C.struct_miqt_string{} contents_alias.data = (*C.char)(unsafe.Pointer(&contents[0])) contents_alias.len = C.size_t(len(contents)) - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new3(contents_alias, &outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new3(contents_alias)) ret.isSubclass = true return ret } // NewQSvgRenderer4 constructs a new QSvgRenderer object. func NewQSvgRenderer4(contents *qt.QXmlStreamReader) *QSvgRenderer { - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new4((*C.QXmlStreamReader)(contents.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new4((*C.QXmlStreamReader)(contents.UnsafePointer()))) ret.isSubclass = true return ret } // NewQSvgRenderer5 constructs a new QSvgRenderer object. func NewQSvgRenderer5(parent *qt.QObject) *QSvgRenderer { - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new5((*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new5((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -122,11 +105,8 @@ func NewQSvgRenderer6(filename string, parent *qt.QObject) *QSvgRenderer { filename_ms.data = C.CString(filename) filename_ms.len = C.size_t(len(filename)) defer C.free(unsafe.Pointer(filename_ms.data)) - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new6(filename_ms, (*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new6(filename_ms, (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -136,22 +116,16 @@ func NewQSvgRenderer7(contents []byte, parent *qt.QObject) *QSvgRenderer { contents_alias := C.struct_miqt_string{} contents_alias.data = (*C.char)(unsafe.Pointer(&contents[0])) contents_alias.len = C.size_t(len(contents)) - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new7(contents_alias, (*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new7(contents_alias, (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQSvgRenderer8 constructs a new QSvgRenderer object. func NewQSvgRenderer8(contents *qt.QXmlStreamReader, parent *qt.QObject) *QSvgRenderer { - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new8((*C.QXmlStreamReader)(contents.UnsafePointer()), (*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new8((*C.QXmlStreamReader)(contents.UnsafePointer()), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -466,7 +440,7 @@ func miqt_exec_callback_QSvgRenderer_TimerEvent(self *C.QSvgRenderer, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QSvgRenderer{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -492,7 +466,7 @@ func miqt_exec_callback_QSvgRenderer_ChildEvent(self *C.QSvgRenderer, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QSvgRenderer{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/svg/gen_qsvgrenderer.h b/qt/svg/gen_qsvgrenderer.h index 67ae8ce6..302175a4 100644 --- a/qt/svg/gen_qsvgrenderer.h +++ b/qt/svg/gen_qsvgrenderer.h @@ -46,14 +46,15 @@ typedef struct QTransform QTransform; typedef struct QXmlStreamReader QXmlStreamReader; #endif -void QSvgRenderer_new(QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); -void QSvgRenderer_new2(struct miqt_string filename, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); -void QSvgRenderer_new3(struct miqt_string contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); -void QSvgRenderer_new4(QXmlStreamReader* contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); -void QSvgRenderer_new5(QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); -void QSvgRenderer_new6(struct miqt_string filename, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); -void QSvgRenderer_new7(struct miqt_string contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); -void QSvgRenderer_new8(QXmlStreamReader* contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +QSvgRenderer* QSvgRenderer_new(); +QSvgRenderer* QSvgRenderer_new2(struct miqt_string filename); +QSvgRenderer* QSvgRenderer_new3(struct miqt_string contents); +QSvgRenderer* QSvgRenderer_new4(QXmlStreamReader* contents); +QSvgRenderer* QSvgRenderer_new5(QObject* parent); +QSvgRenderer* QSvgRenderer_new6(struct miqt_string filename, QObject* parent); +QSvgRenderer* QSvgRenderer_new7(struct miqt_string contents, QObject* parent); +QSvgRenderer* QSvgRenderer_new8(QXmlStreamReader* contents, QObject* parent); +void QSvgRenderer_virtbase(QSvgRenderer* src, QObject** outptr_QObject); QMetaObject* QSvgRenderer_MetaObject(const QSvgRenderer* self); void* QSvgRenderer_Metacast(QSvgRenderer* self, const char* param1); struct miqt_string QSvgRenderer_Tr(const char* s); diff --git a/qt/svg/gen_qsvgwidget.cpp b/qt/svg/gen_qsvgwidget.cpp index 4804b7df..4e3fbc45 100644 --- a/qt/svg/gen_qsvgwidget.cpp +++ b/qt/svg/gen_qsvgwidget.cpp @@ -1023,38 +1023,26 @@ public: }; -void QSvgWidget_new(QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(parent); - *outptr_QSvgWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSvgWidget* QSvgWidget_new(QWidget* parent) { + return new MiqtVirtualQSvgWidget(parent); } -void QSvgWidget_new2(QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(); - *outptr_QSvgWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSvgWidget* QSvgWidget_new2() { + return new MiqtVirtualQSvgWidget(); } -void QSvgWidget_new3(struct miqt_string file, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QSvgWidget* QSvgWidget_new3(struct miqt_string file) { QString file_QString = QString::fromUtf8(file.data, file.len); - MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(file_QString); - *outptr_QSvgWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQSvgWidget(file_QString); } -void QSvgWidget_new4(struct miqt_string file, QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QSvgWidget* QSvgWidget_new4(struct miqt_string file, QWidget* parent) { QString file_QString = QString::fromUtf8(file.data, file.len); - MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(file_QString, parent); - *outptr_QSvgWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQSvgWidget(file_QString, parent); +} + +void QSvgWidget_virtbase(QSvgWidget* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QSvgWidget_MetaObject(const QSvgWidget* self) { diff --git a/qt/svg/gen_qsvgwidget.go b/qt/svg/gen_qsvgwidget.go index 59638632..c2e9dc02 100644 --- a/qt/svg/gen_qsvgwidget.go +++ b/qt/svg/gen_qsvgwidget.go @@ -36,46 +36,34 @@ func (this *QSvgWidget) UnsafePointer() unsafe.Pointer { } // newQSvgWidget constructs the type using only CGO pointers. -func newQSvgWidget(h *C.QSvgWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSvgWidget { +func newQSvgWidget(h *C.QSvgWidget) *QSvgWidget { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QSvgWidget_virtbase(h, &outptr_QWidget) + return &QSvgWidget{h: h, - QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(outptr_QWidget))} } // UnsafeNewQSvgWidget constructs the type using only unsafe pointers. -func UnsafeNewQSvgWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSvgWidget { - if h == nil { - return nil - } - - return &QSvgWidget{h: (*C.QSvgWidget)(h), - QWidget: qt.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQSvgWidget(h unsafe.Pointer) *QSvgWidget { + return newQSvgWidget((*C.QSvgWidget)(h)) } // NewQSvgWidget constructs a new QSvgWidget object. func NewQSvgWidget(parent *qt.QWidget) *QSvgWidget { - var outptr_QSvgWidget *C.QSvgWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSvgWidget_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSvgWidget(C.QSvgWidget_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQSvgWidget2 constructs a new QSvgWidget object. func NewQSvgWidget2() *QSvgWidget { - var outptr_QSvgWidget *C.QSvgWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSvgWidget_new2(&outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSvgWidget(C.QSvgWidget_new2()) ret.isSubclass = true return ret } @@ -86,13 +74,8 @@ func NewQSvgWidget3(file string) *QSvgWidget { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - var outptr_QSvgWidget *C.QSvgWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSvgWidget_new3(file_ms, &outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSvgWidget(C.QSvgWidget_new3(file_ms)) ret.isSubclass = true return ret } @@ -103,13 +86,8 @@ func NewQSvgWidget4(file string, parent *qt.QWidget) *QSvgWidget { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - var outptr_QSvgWidget *C.QSvgWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSvgWidget_new4(file_ms, (*C.QWidget)(parent.UnsafePointer()), &outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSvgWidget(C.QSvgWidget_new4(file_ms, (*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -143,7 +121,7 @@ func QSvgWidget_TrUtf8(s string) string { } func (this *QSvgWidget) Renderer() *QSvgRenderer { - return newQSvgRenderer(C.QSvgWidget_Renderer(this.h), nil) + return newQSvgRenderer(C.QSvgWidget_Renderer(this.h)) } func (this *QSvgWidget) SizeHint() *qt.QSize { @@ -258,7 +236,7 @@ func miqt_exec_callback_QSvgWidget_PaintEvent(self *C.QSvgWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -468,7 +446,7 @@ func miqt_exec_callback_QSvgWidget_MousePressEvent(self *C.QSvgWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -494,7 +472,7 @@ func miqt_exec_callback_QSvgWidget_MouseReleaseEvent(self *C.QSvgWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -520,7 +498,7 @@ func miqt_exec_callback_QSvgWidget_MouseDoubleClickEvent(self *C.QSvgWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -546,7 +524,7 @@ func miqt_exec_callback_QSvgWidget_MouseMoveEvent(self *C.QSvgWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -572,7 +550,7 @@ func miqt_exec_callback_QSvgWidget_WheelEvent(self *C.QSvgWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -598,7 +576,7 @@ func miqt_exec_callback_QSvgWidget_KeyPressEvent(self *C.QSvgWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -624,7 +602,7 @@ func miqt_exec_callback_QSvgWidget_KeyReleaseEvent(self *C.QSvgWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -650,7 +628,7 @@ func miqt_exec_callback_QSvgWidget_FocusInEvent(self *C.QSvgWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -676,7 +654,7 @@ func miqt_exec_callback_QSvgWidget_FocusOutEvent(self *C.QSvgWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -754,7 +732,7 @@ func miqt_exec_callback_QSvgWidget_MoveEvent(self *C.QSvgWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -780,7 +758,7 @@ func miqt_exec_callback_QSvgWidget_ResizeEvent(self *C.QSvgWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -806,7 +784,7 @@ func miqt_exec_callback_QSvgWidget_CloseEvent(self *C.QSvgWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -832,7 +810,7 @@ func miqt_exec_callback_QSvgWidget_ContextMenuEvent(self *C.QSvgWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -858,7 +836,7 @@ func miqt_exec_callback_QSvgWidget_TabletEvent(self *C.QSvgWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -884,7 +862,7 @@ func miqt_exec_callback_QSvgWidget_ActionEvent(self *C.QSvgWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -910,7 +888,7 @@ func miqt_exec_callback_QSvgWidget_DragEnterEvent(self *C.QSvgWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -936,7 +914,7 @@ func miqt_exec_callback_QSvgWidget_DragMoveEvent(self *C.QSvgWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -962,7 +940,7 @@ func miqt_exec_callback_QSvgWidget_DragLeaveEvent(self *C.QSvgWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -988,7 +966,7 @@ func miqt_exec_callback_QSvgWidget_DropEvent(self *C.QSvgWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1014,7 +992,7 @@ func miqt_exec_callback_QSvgWidget_ShowEvent(self *C.QSvgWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1040,7 +1018,7 @@ func miqt_exec_callback_QSvgWidget_HideEvent(self *C.QSvgWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1236,7 +1214,7 @@ func miqt_exec_callback_QSvgWidget_InputMethodEvent(self *C.QSvgWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1)) gofunc((&QSvgWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/svg/gen_qsvgwidget.h b/qt/svg/gen_qsvgwidget.h index 56039b75..9ea599c4 100644 --- a/qt/svg/gen_qsvgwidget.h +++ b/qt/svg/gen_qsvgwidget.h @@ -78,10 +78,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QSvgWidget_new(QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSvgWidget_new2(QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSvgWidget_new3(struct miqt_string file, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSvgWidget_new4(struct miqt_string file, QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QSvgWidget* QSvgWidget_new(QWidget* parent); +QSvgWidget* QSvgWidget_new2(); +QSvgWidget* QSvgWidget_new3(struct miqt_string file); +QSvgWidget* QSvgWidget_new4(struct miqt_string file, QWidget* parent); +void QSvgWidget_virtbase(QSvgWidget* src, QWidget** outptr_QWidget); QMetaObject* QSvgWidget_MetaObject(const QSvgWidget* self); void* QSvgWidget_Metacast(QSvgWidget* self, const char* param1); struct miqt_string QSvgWidget_Tr(const char* s); diff --git a/qt/webchannel/gen_qqmlwebchannel.cpp b/qt/webchannel/gen_qqmlwebchannel.cpp index 90ef72fc..278a3eb9 100644 --- a/qt/webchannel/gen_qqmlwebchannel.cpp +++ b/qt/webchannel/gen_qqmlwebchannel.cpp @@ -11,18 +11,16 @@ #include "gen_qqmlwebchannel.h" #include "_cgo_export.h" -void QQmlWebChannel_new(QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { - QQmlWebChannel* ret = new QQmlWebChannel(); - *outptr_QQmlWebChannel = ret; - *outptr_QWebChannel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QQmlWebChannel* QQmlWebChannel_new() { + return new QQmlWebChannel(); } -void QQmlWebChannel_new2(QObject* parent, QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { - QQmlWebChannel* ret = new QQmlWebChannel(parent); - *outptr_QQmlWebChannel = ret; - *outptr_QWebChannel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QQmlWebChannel* QQmlWebChannel_new2(QObject* parent) { + return new QQmlWebChannel(parent); +} + +void QQmlWebChannel_virtbase(QQmlWebChannel* src, QWebChannel** outptr_QWebChannel) { + *outptr_QWebChannel = static_cast(src); } QMetaObject* QQmlWebChannel_MetaObject(const QQmlWebChannel* self) { diff --git a/qt/webchannel/gen_qqmlwebchannel.go b/qt/webchannel/gen_qqmlwebchannel.go index 7a7ad40e..c91f20ae 100644 --- a/qt/webchannel/gen_qqmlwebchannel.go +++ b/qt/webchannel/gen_qqmlwebchannel.go @@ -35,44 +35,34 @@ func (this *QQmlWebChannel) UnsafePointer() unsafe.Pointer { } // newQQmlWebChannel constructs the type using only CGO pointers. -func newQQmlWebChannel(h *C.QQmlWebChannel, h_QWebChannel *C.QWebChannel, h_QObject *C.QObject) *QQmlWebChannel { +func newQQmlWebChannel(h *C.QQmlWebChannel) *QQmlWebChannel { if h == nil { return nil } + var outptr_QWebChannel *C.QWebChannel = nil + C.QQmlWebChannel_virtbase(h, &outptr_QWebChannel) + return &QQmlWebChannel{h: h, - QWebChannel: newQWebChannel(h_QWebChannel, h_QObject)} + QWebChannel: newQWebChannel(outptr_QWebChannel)} } // UnsafeNewQQmlWebChannel constructs the type using only unsafe pointers. -func UnsafeNewQQmlWebChannel(h unsafe.Pointer, h_QWebChannel unsafe.Pointer, h_QObject unsafe.Pointer) *QQmlWebChannel { - if h == nil { - return nil - } - - return &QQmlWebChannel{h: (*C.QQmlWebChannel)(h), - QWebChannel: UnsafeNewQWebChannel(h_QWebChannel, h_QObject)} +func UnsafeNewQQmlWebChannel(h unsafe.Pointer) *QQmlWebChannel { + return newQQmlWebChannel((*C.QQmlWebChannel)(h)) } // NewQQmlWebChannel constructs a new QQmlWebChannel object. func NewQQmlWebChannel() *QQmlWebChannel { - var outptr_QQmlWebChannel *C.QQmlWebChannel = nil - var outptr_QWebChannel *C.QWebChannel = nil - var outptr_QObject *C.QObject = nil - C.QQmlWebChannel_new(&outptr_QQmlWebChannel, &outptr_QWebChannel, &outptr_QObject) - ret := newQQmlWebChannel(outptr_QQmlWebChannel, outptr_QWebChannel, outptr_QObject) + ret := newQQmlWebChannel(C.QQmlWebChannel_new()) ret.isSubclass = true return ret } // NewQQmlWebChannel2 constructs a new QQmlWebChannel object. func NewQQmlWebChannel2(parent *qt.QObject) *QQmlWebChannel { - var outptr_QQmlWebChannel *C.QQmlWebChannel = nil - var outptr_QWebChannel *C.QWebChannel = nil - var outptr_QObject *C.QObject = nil - C.QQmlWebChannel_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QQmlWebChannel, &outptr_QWebChannel, &outptr_QObject) - ret := newQQmlWebChannel(outptr_QQmlWebChannel, outptr_QWebChannel, outptr_QObject) + ret := newQQmlWebChannel(C.QQmlWebChannel_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt/webchannel/gen_qqmlwebchannel.h b/qt/webchannel/gen_qqmlwebchannel.h index 2d870448..4c3a9353 100644 --- a/qt/webchannel/gen_qqmlwebchannel.h +++ b/qt/webchannel/gen_qqmlwebchannel.h @@ -28,8 +28,9 @@ typedef struct QVariant QVariant; typedef struct QWebChannel QWebChannel; #endif -void QQmlWebChannel_new(QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); -void QQmlWebChannel_new2(QObject* parent, QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); +QQmlWebChannel* QQmlWebChannel_new(); +QQmlWebChannel* QQmlWebChannel_new2(QObject* parent); +void QQmlWebChannel_virtbase(QQmlWebChannel* src, QWebChannel** outptr_QWebChannel); QMetaObject* QQmlWebChannel_MetaObject(const QQmlWebChannel* self); void* QQmlWebChannel_Metacast(QQmlWebChannel* self, const char* param1); struct miqt_string QQmlWebChannel_Tr(const char* s); diff --git a/qt/webchannel/gen_qwebchannel.cpp b/qt/webchannel/gen_qwebchannel.cpp index 24593a69..71c0e51e 100644 --- a/qt/webchannel/gen_qwebchannel.cpp +++ b/qt/webchannel/gen_qwebchannel.cpp @@ -195,16 +195,16 @@ public: }; -void QWebChannel_new(QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { - MiqtVirtualQWebChannel* ret = new MiqtVirtualQWebChannel(); - *outptr_QWebChannel = ret; - *outptr_QObject = static_cast(ret); +QWebChannel* QWebChannel_new() { + return new MiqtVirtualQWebChannel(); } -void QWebChannel_new2(QObject* parent, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { - MiqtVirtualQWebChannel* ret = new MiqtVirtualQWebChannel(parent); - *outptr_QWebChannel = ret; - *outptr_QObject = static_cast(ret); +QWebChannel* QWebChannel_new2(QObject* parent) { + return new MiqtVirtualQWebChannel(parent); +} + +void QWebChannel_virtbase(QWebChannel* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QWebChannel_MetaObject(const QWebChannel* self) { diff --git a/qt/webchannel/gen_qwebchannel.go b/qt/webchannel/gen_qwebchannel.go index 7ace6818..55a4ff6f 100644 --- a/qt/webchannel/gen_qwebchannel.go +++ b/qt/webchannel/gen_qwebchannel.go @@ -36,42 +36,34 @@ func (this *QWebChannel) UnsafePointer() unsafe.Pointer { } // newQWebChannel constructs the type using only CGO pointers. -func newQWebChannel(h *C.QWebChannel, h_QObject *C.QObject) *QWebChannel { +func newQWebChannel(h *C.QWebChannel) *QWebChannel { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebChannel_virtbase(h, &outptr_QObject) + return &QWebChannel{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebChannel constructs the type using only unsafe pointers. -func UnsafeNewQWebChannel(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebChannel { - if h == nil { - return nil - } - - return &QWebChannel{h: (*C.QWebChannel)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebChannel(h unsafe.Pointer) *QWebChannel { + return newQWebChannel((*C.QWebChannel)(h)) } // NewQWebChannel constructs a new QWebChannel object. func NewQWebChannel() *QWebChannel { - var outptr_QWebChannel *C.QWebChannel = nil - var outptr_QObject *C.QObject = nil - C.QWebChannel_new(&outptr_QWebChannel, &outptr_QObject) - ret := newQWebChannel(outptr_QWebChannel, outptr_QObject) + ret := newQWebChannel(C.QWebChannel_new()) ret.isSubclass = true return ret } // NewQWebChannel2 constructs a new QWebChannel object. func NewQWebChannel2(parent *qt.QObject) *QWebChannel { - var outptr_QWebChannel *C.QWebChannel = nil - var outptr_QObject *C.QObject = nil - C.QWebChannel_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebChannel, &outptr_QObject) - ret := newQWebChannel(outptr_QWebChannel, outptr_QObject) + ret := newQWebChannel(C.QWebChannel_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -314,7 +306,7 @@ func miqt_exec_callback_QWebChannel_TimerEvent(self *C.QWebChannel, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QWebChannel{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -340,7 +332,7 @@ func miqt_exec_callback_QWebChannel_ChildEvent(self *C.QWebChannel, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QWebChannel{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/webchannel/gen_qwebchannel.h b/qt/webchannel/gen_qwebchannel.h index 73d012d8..ebf11bde 100644 --- a/qt/webchannel/gen_qwebchannel.h +++ b/qt/webchannel/gen_qwebchannel.h @@ -34,8 +34,9 @@ typedef struct QWebChannel QWebChannel; typedef struct QWebChannelAbstractTransport QWebChannelAbstractTransport; #endif -void QWebChannel_new(QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); -void QWebChannel_new2(QObject* parent, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); +QWebChannel* QWebChannel_new(); +QWebChannel* QWebChannel_new2(QObject* parent); +void QWebChannel_virtbase(QWebChannel* src, QObject** outptr_QObject); QMetaObject* QWebChannel_MetaObject(const QWebChannel* self); void* QWebChannel_Metacast(QWebChannel* self, const char* param1); struct miqt_string QWebChannel_Tr(const char* s); diff --git a/qt/webchannel/gen_qwebchannelabstracttransport.cpp b/qt/webchannel/gen_qwebchannelabstracttransport.cpp index 0172ceb4..f3b1879e 100644 --- a/qt/webchannel/gen_qwebchannelabstracttransport.cpp +++ b/qt/webchannel/gen_qwebchannelabstracttransport.cpp @@ -212,16 +212,16 @@ public: }; -void QWebChannelAbstractTransport_new(QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject) { - MiqtVirtualQWebChannelAbstractTransport* ret = new MiqtVirtualQWebChannelAbstractTransport(); - *outptr_QWebChannelAbstractTransport = ret; - *outptr_QObject = static_cast(ret); +QWebChannelAbstractTransport* QWebChannelAbstractTransport_new() { + return new MiqtVirtualQWebChannelAbstractTransport(); } -void QWebChannelAbstractTransport_new2(QObject* parent, QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject) { - MiqtVirtualQWebChannelAbstractTransport* ret = new MiqtVirtualQWebChannelAbstractTransport(parent); - *outptr_QWebChannelAbstractTransport = ret; - *outptr_QObject = static_cast(ret); +QWebChannelAbstractTransport* QWebChannelAbstractTransport_new2(QObject* parent) { + return new MiqtVirtualQWebChannelAbstractTransport(parent); +} + +void QWebChannelAbstractTransport_virtbase(QWebChannelAbstractTransport* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QWebChannelAbstractTransport_MetaObject(const QWebChannelAbstractTransport* self) { diff --git a/qt/webchannel/gen_qwebchannelabstracttransport.go b/qt/webchannel/gen_qwebchannelabstracttransport.go index 9714aa46..60f35cea 100644 --- a/qt/webchannel/gen_qwebchannelabstracttransport.go +++ b/qt/webchannel/gen_qwebchannelabstracttransport.go @@ -36,42 +36,34 @@ func (this *QWebChannelAbstractTransport) UnsafePointer() unsafe.Pointer { } // newQWebChannelAbstractTransport constructs the type using only CGO pointers. -func newQWebChannelAbstractTransport(h *C.QWebChannelAbstractTransport, h_QObject *C.QObject) *QWebChannelAbstractTransport { +func newQWebChannelAbstractTransport(h *C.QWebChannelAbstractTransport) *QWebChannelAbstractTransport { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebChannelAbstractTransport_virtbase(h, &outptr_QObject) + return &QWebChannelAbstractTransport{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebChannelAbstractTransport constructs the type using only unsafe pointers. -func UnsafeNewQWebChannelAbstractTransport(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebChannelAbstractTransport { - if h == nil { - return nil - } - - return &QWebChannelAbstractTransport{h: (*C.QWebChannelAbstractTransport)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebChannelAbstractTransport(h unsafe.Pointer) *QWebChannelAbstractTransport { + return newQWebChannelAbstractTransport((*C.QWebChannelAbstractTransport)(h)) } // NewQWebChannelAbstractTransport constructs a new QWebChannelAbstractTransport object. func NewQWebChannelAbstractTransport() *QWebChannelAbstractTransport { - var outptr_QWebChannelAbstractTransport *C.QWebChannelAbstractTransport = nil - var outptr_QObject *C.QObject = nil - C.QWebChannelAbstractTransport_new(&outptr_QWebChannelAbstractTransport, &outptr_QObject) - ret := newQWebChannelAbstractTransport(outptr_QWebChannelAbstractTransport, outptr_QObject) + ret := newQWebChannelAbstractTransport(C.QWebChannelAbstractTransport_new()) ret.isSubclass = true return ret } // NewQWebChannelAbstractTransport2 constructs a new QWebChannelAbstractTransport object. func NewQWebChannelAbstractTransport2(parent *qt.QObject) *QWebChannelAbstractTransport { - var outptr_QWebChannelAbstractTransport *C.QWebChannelAbstractTransport = nil - var outptr_QObject *C.QObject = nil - C.QWebChannelAbstractTransport_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebChannelAbstractTransport, &outptr_QObject) - ret := newQWebChannelAbstractTransport(outptr_QWebChannelAbstractTransport, outptr_QObject) + ret := newQWebChannelAbstractTransport(C.QWebChannelAbstractTransport_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -125,7 +117,7 @@ func miqt_exec_callback_QWebChannelAbstractTransport_MessageReceived(cb C.intptr // Convert all CABI parameters to Go parameters slotval1 := qt.UnsafeNewQJsonObject(unsafe.Pointer(message)) - slotval2 := newQWebChannelAbstractTransport(transport, nil) + slotval2 := newQWebChannelAbstractTransport(transport) gofunc(slotval1, slotval2) } @@ -272,7 +264,7 @@ func miqt_exec_callback_QWebChannelAbstractTransport_TimerEvent(self *C.QWebChan } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -298,7 +290,7 @@ func miqt_exec_callback_QWebChannelAbstractTransport_ChildEvent(self *C.QWebChan } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/webchannel/gen_qwebchannelabstracttransport.h b/qt/webchannel/gen_qwebchannelabstracttransport.h index 7b05d74f..88156618 100644 --- a/qt/webchannel/gen_qwebchannelabstracttransport.h +++ b/qt/webchannel/gen_qwebchannelabstracttransport.h @@ -34,8 +34,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWebChannelAbstractTransport QWebChannelAbstractTransport; #endif -void QWebChannelAbstractTransport_new(QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject); -void QWebChannelAbstractTransport_new2(QObject* parent, QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject); +QWebChannelAbstractTransport* QWebChannelAbstractTransport_new(); +QWebChannelAbstractTransport* QWebChannelAbstractTransport_new2(QObject* parent); +void QWebChannelAbstractTransport_virtbase(QWebChannelAbstractTransport* src, QObject** outptr_QObject); QMetaObject* QWebChannelAbstractTransport_MetaObject(const QWebChannelAbstractTransport* self); void* QWebChannelAbstractTransport_Metacast(QWebChannelAbstractTransport* self, const char* param1); struct miqt_string QWebChannelAbstractTransport_Tr(const char* s); diff --git a/qt/webengine/gen_qwebenginecertificateerror.cpp b/qt/webengine/gen_qwebenginecertificateerror.cpp index 6b165fa0..e57c9c6f 100644 --- a/qt/webengine/gen_qwebenginecertificateerror.cpp +++ b/qt/webengine/gen_qwebenginecertificateerror.cpp @@ -9,15 +9,13 @@ #include "gen_qwebenginecertificateerror.h" #include "_cgo_export.h" -void QWebEngineCertificateError_new(int error, QUrl* url, bool overridable, struct miqt_string errorDescription, QWebEngineCertificateError** outptr_QWebEngineCertificateError) { +QWebEngineCertificateError* QWebEngineCertificateError_new(int error, QUrl* url, bool overridable, struct miqt_string errorDescription) { QString errorDescription_QString = QString::fromUtf8(errorDescription.data, errorDescription.len); - QWebEngineCertificateError* ret = new QWebEngineCertificateError(static_cast(error), *url, overridable, errorDescription_QString); - *outptr_QWebEngineCertificateError = ret; + return new QWebEngineCertificateError(static_cast(error), *url, overridable, errorDescription_QString); } -void QWebEngineCertificateError_new2(QWebEngineCertificateError* other, QWebEngineCertificateError** outptr_QWebEngineCertificateError) { - QWebEngineCertificateError* ret = new QWebEngineCertificateError(*other); - *outptr_QWebEngineCertificateError = ret; +QWebEngineCertificateError* QWebEngineCertificateError_new2(QWebEngineCertificateError* other) { + return new QWebEngineCertificateError(*other); } int QWebEngineCertificateError_Error(const QWebEngineCertificateError* self) { diff --git a/qt/webengine/gen_qwebenginecertificateerror.go b/qt/webengine/gen_qwebenginecertificateerror.go index 872f9d8a..0fdf6dae 100644 --- a/qt/webengine/gen_qwebenginecertificateerror.go +++ b/qt/webengine/gen_qwebenginecertificateerror.go @@ -60,16 +60,13 @@ func newQWebEngineCertificateError(h *C.QWebEngineCertificateError) *QWebEngineC if h == nil { return nil } + return &QWebEngineCertificateError{h: h} } // UnsafeNewQWebEngineCertificateError constructs the type using only unsafe pointers. func UnsafeNewQWebEngineCertificateError(h unsafe.Pointer) *QWebEngineCertificateError { - if h == nil { - return nil - } - - return &QWebEngineCertificateError{h: (*C.QWebEngineCertificateError)(h)} + return newQWebEngineCertificateError((*C.QWebEngineCertificateError)(h)) } // NewQWebEngineCertificateError constructs a new QWebEngineCertificateError object. @@ -78,20 +75,16 @@ func NewQWebEngineCertificateError(error int, url qt.QUrl, overridable bool, err errorDescription_ms.data = C.CString(errorDescription) errorDescription_ms.len = C.size_t(len(errorDescription)) defer C.free(unsafe.Pointer(errorDescription_ms.data)) - var outptr_QWebEngineCertificateError *C.QWebEngineCertificateError = nil - C.QWebEngineCertificateError_new((C.int)(error), (*C.QUrl)(url.UnsafePointer()), (C.bool)(overridable), errorDescription_ms, &outptr_QWebEngineCertificateError) - ret := newQWebEngineCertificateError(outptr_QWebEngineCertificateError) + ret := newQWebEngineCertificateError(C.QWebEngineCertificateError_new((C.int)(error), (*C.QUrl)(url.UnsafePointer()), (C.bool)(overridable), errorDescription_ms)) ret.isSubclass = true return ret } // NewQWebEngineCertificateError2 constructs a new QWebEngineCertificateError object. func NewQWebEngineCertificateError2(other *QWebEngineCertificateError) *QWebEngineCertificateError { - var outptr_QWebEngineCertificateError *C.QWebEngineCertificateError = nil - C.QWebEngineCertificateError_new2(other.cPointer(), &outptr_QWebEngineCertificateError) - ret := newQWebEngineCertificateError(outptr_QWebEngineCertificateError) + ret := newQWebEngineCertificateError(C.QWebEngineCertificateError_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webengine/gen_qwebenginecertificateerror.h b/qt/webengine/gen_qwebenginecertificateerror.h index b4bccf9c..c64c82ed 100644 --- a/qt/webengine/gen_qwebenginecertificateerror.h +++ b/qt/webengine/gen_qwebenginecertificateerror.h @@ -24,8 +24,8 @@ typedef struct QUrl QUrl; typedef struct QWebEngineCertificateError QWebEngineCertificateError; #endif -void QWebEngineCertificateError_new(int error, QUrl* url, bool overridable, struct miqt_string errorDescription, QWebEngineCertificateError** outptr_QWebEngineCertificateError); -void QWebEngineCertificateError_new2(QWebEngineCertificateError* other, QWebEngineCertificateError** outptr_QWebEngineCertificateError); +QWebEngineCertificateError* QWebEngineCertificateError_new(int error, QUrl* url, bool overridable, struct miqt_string errorDescription); +QWebEngineCertificateError* QWebEngineCertificateError_new2(QWebEngineCertificateError* other); int QWebEngineCertificateError_Error(const QWebEngineCertificateError* self); QUrl* QWebEngineCertificateError_Url(const QWebEngineCertificateError* self); bool QWebEngineCertificateError_IsOverridable(const QWebEngineCertificateError* self); diff --git a/qt/webengine/gen_qwebengineclientcertificateselection.cpp b/qt/webengine/gen_qwebengineclientcertificateselection.cpp index 3652b828..d6365bed 100644 --- a/qt/webengine/gen_qwebengineclientcertificateselection.cpp +++ b/qt/webengine/gen_qwebengineclientcertificateselection.cpp @@ -6,9 +6,8 @@ #include "gen_qwebengineclientcertificateselection.h" #include "_cgo_export.h" -void QWebEngineClientCertificateSelection_new(QWebEngineClientCertificateSelection* param1, QWebEngineClientCertificateSelection** outptr_QWebEngineClientCertificateSelection) { - QWebEngineClientCertificateSelection* ret = new QWebEngineClientCertificateSelection(*param1); - *outptr_QWebEngineClientCertificateSelection = ret; +QWebEngineClientCertificateSelection* QWebEngineClientCertificateSelection_new(QWebEngineClientCertificateSelection* param1) { + return new QWebEngineClientCertificateSelection(*param1); } void QWebEngineClientCertificateSelection_OperatorAssign(QWebEngineClientCertificateSelection* self, QWebEngineClientCertificateSelection* param1) { diff --git a/qt/webengine/gen_qwebengineclientcertificateselection.go b/qt/webengine/gen_qwebengineclientcertificateselection.go index 53ad02e7..2608da25 100644 --- a/qt/webengine/gen_qwebengineclientcertificateselection.go +++ b/qt/webengine/gen_qwebengineclientcertificateselection.go @@ -39,24 +39,19 @@ func newQWebEngineClientCertificateSelection(h *C.QWebEngineClientCertificateSel if h == nil { return nil } + return &QWebEngineClientCertificateSelection{h: h} } // UnsafeNewQWebEngineClientCertificateSelection constructs the type using only unsafe pointers. func UnsafeNewQWebEngineClientCertificateSelection(h unsafe.Pointer) *QWebEngineClientCertificateSelection { - if h == nil { - return nil - } - - return &QWebEngineClientCertificateSelection{h: (*C.QWebEngineClientCertificateSelection)(h)} + return newQWebEngineClientCertificateSelection((*C.QWebEngineClientCertificateSelection)(h)) } // NewQWebEngineClientCertificateSelection constructs a new QWebEngineClientCertificateSelection object. func NewQWebEngineClientCertificateSelection(param1 *QWebEngineClientCertificateSelection) *QWebEngineClientCertificateSelection { - var outptr_QWebEngineClientCertificateSelection *C.QWebEngineClientCertificateSelection = nil - C.QWebEngineClientCertificateSelection_new(param1.cPointer(), &outptr_QWebEngineClientCertificateSelection) - ret := newQWebEngineClientCertificateSelection(outptr_QWebEngineClientCertificateSelection) + ret := newQWebEngineClientCertificateSelection(C.QWebEngineClientCertificateSelection_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webengine/gen_qwebengineclientcertificateselection.h b/qt/webengine/gen_qwebengineclientcertificateselection.h index e3199f0d..f66094d8 100644 --- a/qt/webengine/gen_qwebengineclientcertificateselection.h +++ b/qt/webengine/gen_qwebengineclientcertificateselection.h @@ -24,7 +24,7 @@ typedef struct QUrl QUrl; typedef struct QWebEngineClientCertificateSelection QWebEngineClientCertificateSelection; #endif -void QWebEngineClientCertificateSelection_new(QWebEngineClientCertificateSelection* param1, QWebEngineClientCertificateSelection** outptr_QWebEngineClientCertificateSelection); +QWebEngineClientCertificateSelection* QWebEngineClientCertificateSelection_new(QWebEngineClientCertificateSelection* param1); void QWebEngineClientCertificateSelection_OperatorAssign(QWebEngineClientCertificateSelection* self, QWebEngineClientCertificateSelection* param1); QUrl* QWebEngineClientCertificateSelection_Host(const QWebEngineClientCertificateSelection* self); void QWebEngineClientCertificateSelection_Select(QWebEngineClientCertificateSelection* self, QSslCertificate* certificate); diff --git a/qt/webengine/gen_qwebengineclientcertificatestore.go b/qt/webengine/gen_qwebengineclientcertificatestore.go index 0e4eb962..5ed54a92 100644 --- a/qt/webengine/gen_qwebengineclientcertificatestore.go +++ b/qt/webengine/gen_qwebengineclientcertificatestore.go @@ -37,16 +37,13 @@ func newQWebEngineClientCertificateStore(h *C.QWebEngineClientCertificateStore) if h == nil { return nil } + return &QWebEngineClientCertificateStore{h: h} } // UnsafeNewQWebEngineClientCertificateStore constructs the type using only unsafe pointers. func UnsafeNewQWebEngineClientCertificateStore(h unsafe.Pointer) *QWebEngineClientCertificateStore { - if h == nil { - return nil - } - - return &QWebEngineClientCertificateStore{h: (*C.QWebEngineClientCertificateStore)(h)} + return newQWebEngineClientCertificateStore((*C.QWebEngineClientCertificateStore)(h)) } func (this *QWebEngineClientCertificateStore) Add(certificate *network.QSslCertificate, privateKey *network.QSslKey) { diff --git a/qt/webengine/gen_qwebenginecontextmenudata.cpp b/qt/webengine/gen_qwebenginecontextmenudata.cpp index e286d5f4..acccb1b8 100644 --- a/qt/webengine/gen_qwebenginecontextmenudata.cpp +++ b/qt/webengine/gen_qwebenginecontextmenudata.cpp @@ -9,14 +9,12 @@ #include "gen_qwebenginecontextmenudata.h" #include "_cgo_export.h" -void QWebEngineContextMenuData_new(QWebEngineContextMenuData** outptr_QWebEngineContextMenuData) { - QWebEngineContextMenuData* ret = new QWebEngineContextMenuData(); - *outptr_QWebEngineContextMenuData = ret; +QWebEngineContextMenuData* QWebEngineContextMenuData_new() { + return new QWebEngineContextMenuData(); } -void QWebEngineContextMenuData_new2(QWebEngineContextMenuData* other, QWebEngineContextMenuData** outptr_QWebEngineContextMenuData) { - QWebEngineContextMenuData* ret = new QWebEngineContextMenuData(*other); - *outptr_QWebEngineContextMenuData = ret; +QWebEngineContextMenuData* QWebEngineContextMenuData_new2(QWebEngineContextMenuData* other) { + return new QWebEngineContextMenuData(*other); } void QWebEngineContextMenuData_OperatorAssign(QWebEngineContextMenuData* self, QWebEngineContextMenuData* other) { diff --git a/qt/webengine/gen_qwebenginecontextmenudata.go b/qt/webengine/gen_qwebenginecontextmenudata.go index fa709907..24735b5f 100644 --- a/qt/webengine/gen_qwebenginecontextmenudata.go +++ b/qt/webengine/gen_qwebenginecontextmenudata.go @@ -79,34 +79,27 @@ func newQWebEngineContextMenuData(h *C.QWebEngineContextMenuData) *QWebEngineCon if h == nil { return nil } + return &QWebEngineContextMenuData{h: h} } // UnsafeNewQWebEngineContextMenuData constructs the type using only unsafe pointers. func UnsafeNewQWebEngineContextMenuData(h unsafe.Pointer) *QWebEngineContextMenuData { - if h == nil { - return nil - } - - return &QWebEngineContextMenuData{h: (*C.QWebEngineContextMenuData)(h)} + return newQWebEngineContextMenuData((*C.QWebEngineContextMenuData)(h)) } // NewQWebEngineContextMenuData constructs a new QWebEngineContextMenuData object. func NewQWebEngineContextMenuData() *QWebEngineContextMenuData { - var outptr_QWebEngineContextMenuData *C.QWebEngineContextMenuData = nil - C.QWebEngineContextMenuData_new(&outptr_QWebEngineContextMenuData) - ret := newQWebEngineContextMenuData(outptr_QWebEngineContextMenuData) + ret := newQWebEngineContextMenuData(C.QWebEngineContextMenuData_new()) ret.isSubclass = true return ret } // NewQWebEngineContextMenuData2 constructs a new QWebEngineContextMenuData object. func NewQWebEngineContextMenuData2(other *QWebEngineContextMenuData) *QWebEngineContextMenuData { - var outptr_QWebEngineContextMenuData *C.QWebEngineContextMenuData = nil - C.QWebEngineContextMenuData_new2(other.cPointer(), &outptr_QWebEngineContextMenuData) - ret := newQWebEngineContextMenuData(outptr_QWebEngineContextMenuData) + ret := newQWebEngineContextMenuData(C.QWebEngineContextMenuData_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webengine/gen_qwebenginecontextmenudata.h b/qt/webengine/gen_qwebenginecontextmenudata.h index 9130bda6..48d12e8e 100644 --- a/qt/webengine/gen_qwebenginecontextmenudata.h +++ b/qt/webengine/gen_qwebenginecontextmenudata.h @@ -24,8 +24,8 @@ typedef struct QUrl QUrl; typedef struct QWebEngineContextMenuData QWebEngineContextMenuData; #endif -void QWebEngineContextMenuData_new(QWebEngineContextMenuData** outptr_QWebEngineContextMenuData); -void QWebEngineContextMenuData_new2(QWebEngineContextMenuData* other, QWebEngineContextMenuData** outptr_QWebEngineContextMenuData); +QWebEngineContextMenuData* QWebEngineContextMenuData_new(); +QWebEngineContextMenuData* QWebEngineContextMenuData_new2(QWebEngineContextMenuData* other); void QWebEngineContextMenuData_OperatorAssign(QWebEngineContextMenuData* self, QWebEngineContextMenuData* other); bool QWebEngineContextMenuData_IsValid(const QWebEngineContextMenuData* self); QPoint* QWebEngineContextMenuData_Position(const QWebEngineContextMenuData* self); diff --git a/qt/webengine/gen_qwebenginecookiestore.cpp b/qt/webengine/gen_qwebenginecookiestore.cpp index df95e5d5..fb685dd9 100644 --- a/qt/webengine/gen_qwebenginecookiestore.cpp +++ b/qt/webengine/gen_qwebenginecookiestore.cpp @@ -11,6 +11,10 @@ #include "gen_qwebenginecookiestore.h" #include "_cgo_export.h" +void QWebEngineCookieStore_virtbase(QWebEngineCookieStore* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebEngineCookieStore_MetaObject(const QWebEngineCookieStore* self) { return (QMetaObject*) self->metaObject(); } @@ -147,9 +151,8 @@ void QWebEngineCookieStore_Delete(QWebEngineCookieStore* self, bool isSubclass) } } -void QWebEngineCookieStore__FilterRequest_new(QWebEngineCookieStore__FilterRequest* param1, QWebEngineCookieStore__FilterRequest** outptr_QWebEngineCookieStore__FilterRequest) { - QWebEngineCookieStore::FilterRequest* ret = new QWebEngineCookieStore::FilterRequest(*param1); - *outptr_QWebEngineCookieStore__FilterRequest = ret; +QWebEngineCookieStore__FilterRequest* QWebEngineCookieStore__FilterRequest_new(QWebEngineCookieStore__FilterRequest* param1) { + return new QWebEngineCookieStore::FilterRequest(*param1); } void QWebEngineCookieStore__FilterRequest_OperatorAssign(QWebEngineCookieStore__FilterRequest* self, QWebEngineCookieStore__FilterRequest* param1) { diff --git a/qt/webengine/gen_qwebenginecookiestore.go b/qt/webengine/gen_qwebenginecookiestore.go index c7a3af96..4a51d8f5 100644 --- a/qt/webengine/gen_qwebenginecookiestore.go +++ b/qt/webengine/gen_qwebenginecookiestore.go @@ -37,22 +37,20 @@ func (this *QWebEngineCookieStore) UnsafePointer() unsafe.Pointer { } // newQWebEngineCookieStore constructs the type using only CGO pointers. -func newQWebEngineCookieStore(h *C.QWebEngineCookieStore, h_QObject *C.QObject) *QWebEngineCookieStore { +func newQWebEngineCookieStore(h *C.QWebEngineCookieStore) *QWebEngineCookieStore { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineCookieStore_virtbase(h, &outptr_QObject) + return &QWebEngineCookieStore{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineCookieStore constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineCookieStore(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineCookieStore { - if h == nil { - return nil - } - - return &QWebEngineCookieStore{h: (*C.QWebEngineCookieStore)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineCookieStore(h unsafe.Pointer) *QWebEngineCookieStore { + return newQWebEngineCookieStore((*C.QWebEngineCookieStore)(h)) } func (this *QWebEngineCookieStore) MetaObject() *qt.QMetaObject { @@ -233,24 +231,19 @@ func newQWebEngineCookieStore__FilterRequest(h *C.QWebEngineCookieStore__FilterR if h == nil { return nil } + return &QWebEngineCookieStore__FilterRequest{h: h} } // UnsafeNewQWebEngineCookieStore__FilterRequest constructs the type using only unsafe pointers. func UnsafeNewQWebEngineCookieStore__FilterRequest(h unsafe.Pointer) *QWebEngineCookieStore__FilterRequest { - if h == nil { - return nil - } - - return &QWebEngineCookieStore__FilterRequest{h: (*C.QWebEngineCookieStore__FilterRequest)(h)} + return newQWebEngineCookieStore__FilterRequest((*C.QWebEngineCookieStore__FilterRequest)(h)) } // NewQWebEngineCookieStore__FilterRequest constructs a new QWebEngineCookieStore::FilterRequest object. func NewQWebEngineCookieStore__FilterRequest(param1 *QWebEngineCookieStore__FilterRequest) *QWebEngineCookieStore__FilterRequest { - var outptr_QWebEngineCookieStore__FilterRequest *C.QWebEngineCookieStore__FilterRequest = nil - C.QWebEngineCookieStore__FilterRequest_new(param1.cPointer(), &outptr_QWebEngineCookieStore__FilterRequest) - ret := newQWebEngineCookieStore__FilterRequest(outptr_QWebEngineCookieStore__FilterRequest) + ret := newQWebEngineCookieStore__FilterRequest(C.QWebEngineCookieStore__FilterRequest_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webengine/gen_qwebenginecookiestore.h b/qt/webengine/gen_qwebenginecookiestore.h index f61b9935..abd98418 100644 --- a/qt/webengine/gen_qwebenginecookiestore.h +++ b/qt/webengine/gen_qwebenginecookiestore.h @@ -34,6 +34,7 @@ typedef struct QWebEngineCookieStore QWebEngineCookieStore; typedef struct QWebEngineCookieStore__FilterRequest QWebEngineCookieStore__FilterRequest; #endif +void QWebEngineCookieStore_virtbase(QWebEngineCookieStore* src, QObject** outptr_QObject); QMetaObject* QWebEngineCookieStore_MetaObject(const QWebEngineCookieStore* self); void* QWebEngineCookieStore_Metacast(QWebEngineCookieStore* self, const char* param1); struct miqt_string QWebEngineCookieStore_Tr(const char* s); @@ -55,7 +56,7 @@ void QWebEngineCookieStore_SetCookie2(QWebEngineCookieStore* self, QNetworkCooki void QWebEngineCookieStore_DeleteCookie2(QWebEngineCookieStore* self, QNetworkCookie* cookie, QUrl* origin); void QWebEngineCookieStore_Delete(QWebEngineCookieStore* self, bool isSubclass); -void QWebEngineCookieStore__FilterRequest_new(QWebEngineCookieStore__FilterRequest* param1, QWebEngineCookieStore__FilterRequest** outptr_QWebEngineCookieStore__FilterRequest); +QWebEngineCookieStore__FilterRequest* QWebEngineCookieStore__FilterRequest_new(QWebEngineCookieStore__FilterRequest* param1); void QWebEngineCookieStore__FilterRequest_OperatorAssign(QWebEngineCookieStore__FilterRequest* self, QWebEngineCookieStore__FilterRequest* param1); void QWebEngineCookieStore__FilterRequest_Delete(QWebEngineCookieStore__FilterRequest* self, bool isSubclass); diff --git a/qt/webengine/gen_qwebenginedownloaditem.cpp b/qt/webengine/gen_qwebenginedownloaditem.cpp index a4bbaa11..07794352 100644 --- a/qt/webengine/gen_qwebenginedownloaditem.cpp +++ b/qt/webengine/gen_qwebenginedownloaditem.cpp @@ -10,6 +10,10 @@ #include "gen_qwebenginedownloaditem.h" #include "_cgo_export.h" +void QWebEngineDownloadItem_virtbase(QWebEngineDownloadItem* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebEngineDownloadItem_MetaObject(const QWebEngineDownloadItem* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/webengine/gen_qwebenginedownloaditem.go b/qt/webengine/gen_qwebenginedownloaditem.go index d16886a6..e14725d7 100644 --- a/qt/webengine/gen_qwebenginedownloaditem.go +++ b/qt/webengine/gen_qwebenginedownloaditem.go @@ -93,22 +93,20 @@ func (this *QWebEngineDownloadItem) UnsafePointer() unsafe.Pointer { } // newQWebEngineDownloadItem constructs the type using only CGO pointers. -func newQWebEngineDownloadItem(h *C.QWebEngineDownloadItem, h_QObject *C.QObject) *QWebEngineDownloadItem { +func newQWebEngineDownloadItem(h *C.QWebEngineDownloadItem) *QWebEngineDownloadItem { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineDownloadItem_virtbase(h, &outptr_QObject) + return &QWebEngineDownloadItem{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineDownloadItem constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineDownloadItem(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineDownloadItem { - if h == nil { - return nil - } - - return &QWebEngineDownloadItem{h: (*C.QWebEngineDownloadItem)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineDownloadItem(h unsafe.Pointer) *QWebEngineDownloadItem { + return newQWebEngineDownloadItem((*C.QWebEngineDownloadItem)(h)) } func (this *QWebEngineDownloadItem) MetaObject() *qt.QMetaObject { @@ -256,7 +254,7 @@ func (this *QWebEngineDownloadItem) SetDownloadFileName(fileName string) { } func (this *QWebEngineDownloadItem) Page() *QWebEnginePage { - return newQWebEnginePage(C.QWebEngineDownloadItem_Page(this.h), nil) + return newQWebEnginePage(C.QWebEngineDownloadItem_Page(this.h)) } func (this *QWebEngineDownloadItem) Accept() { diff --git a/qt/webengine/gen_qwebenginedownloaditem.h b/qt/webengine/gen_qwebenginedownloaditem.h index eb5494e6..b95b1713 100644 --- a/qt/webengine/gen_qwebenginedownloaditem.h +++ b/qt/webengine/gen_qwebenginedownloaditem.h @@ -28,6 +28,7 @@ typedef struct QWebEngineDownloadItem QWebEngineDownloadItem; typedef struct QWebEnginePage QWebEnginePage; #endif +void QWebEngineDownloadItem_virtbase(QWebEngineDownloadItem* src, QObject** outptr_QObject); QMetaObject* QWebEngineDownloadItem_MetaObject(const QWebEngineDownloadItem* self); void* QWebEngineDownloadItem_Metacast(QWebEngineDownloadItem* self, const char* param1); struct miqt_string QWebEngineDownloadItem_Tr(const char* s); diff --git a/qt/webengine/gen_qwebenginefindtextresult.cpp b/qt/webengine/gen_qwebenginefindtextresult.cpp index 855ab8f3..a05aae6a 100644 --- a/qt/webengine/gen_qwebenginefindtextresult.cpp +++ b/qt/webengine/gen_qwebenginefindtextresult.cpp @@ -3,14 +3,12 @@ #include "gen_qwebenginefindtextresult.h" #include "_cgo_export.h" -void QWebEngineFindTextResult_new(QWebEngineFindTextResult** outptr_QWebEngineFindTextResult) { - QWebEngineFindTextResult* ret = new QWebEngineFindTextResult(); - *outptr_QWebEngineFindTextResult = ret; +QWebEngineFindTextResult* QWebEngineFindTextResult_new() { + return new QWebEngineFindTextResult(); } -void QWebEngineFindTextResult_new2(QWebEngineFindTextResult* other, QWebEngineFindTextResult** outptr_QWebEngineFindTextResult) { - QWebEngineFindTextResult* ret = new QWebEngineFindTextResult(*other); - *outptr_QWebEngineFindTextResult = ret; +QWebEngineFindTextResult* QWebEngineFindTextResult_new2(QWebEngineFindTextResult* other) { + return new QWebEngineFindTextResult(*other); } int QWebEngineFindTextResult_NumberOfMatches(const QWebEngineFindTextResult* self) { diff --git a/qt/webengine/gen_qwebenginefindtextresult.go b/qt/webengine/gen_qwebenginefindtextresult.go index bff61d4a..df11a80d 100644 --- a/qt/webengine/gen_qwebenginefindtextresult.go +++ b/qt/webengine/gen_qwebenginefindtextresult.go @@ -37,34 +37,27 @@ func newQWebEngineFindTextResult(h *C.QWebEngineFindTextResult) *QWebEngineFindT if h == nil { return nil } + return &QWebEngineFindTextResult{h: h} } // UnsafeNewQWebEngineFindTextResult constructs the type using only unsafe pointers. func UnsafeNewQWebEngineFindTextResult(h unsafe.Pointer) *QWebEngineFindTextResult { - if h == nil { - return nil - } - - return &QWebEngineFindTextResult{h: (*C.QWebEngineFindTextResult)(h)} + return newQWebEngineFindTextResult((*C.QWebEngineFindTextResult)(h)) } // NewQWebEngineFindTextResult constructs a new QWebEngineFindTextResult object. func NewQWebEngineFindTextResult() *QWebEngineFindTextResult { - var outptr_QWebEngineFindTextResult *C.QWebEngineFindTextResult = nil - C.QWebEngineFindTextResult_new(&outptr_QWebEngineFindTextResult) - ret := newQWebEngineFindTextResult(outptr_QWebEngineFindTextResult) + ret := newQWebEngineFindTextResult(C.QWebEngineFindTextResult_new()) ret.isSubclass = true return ret } // NewQWebEngineFindTextResult2 constructs a new QWebEngineFindTextResult object. func NewQWebEngineFindTextResult2(other *QWebEngineFindTextResult) *QWebEngineFindTextResult { - var outptr_QWebEngineFindTextResult *C.QWebEngineFindTextResult = nil - C.QWebEngineFindTextResult_new2(other.cPointer(), &outptr_QWebEngineFindTextResult) - ret := newQWebEngineFindTextResult(outptr_QWebEngineFindTextResult) + ret := newQWebEngineFindTextResult(C.QWebEngineFindTextResult_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webengine/gen_qwebenginefindtextresult.h b/qt/webengine/gen_qwebenginefindtextresult.h index e2343961..68a27f1a 100644 --- a/qt/webengine/gen_qwebenginefindtextresult.h +++ b/qt/webengine/gen_qwebenginefindtextresult.h @@ -20,8 +20,8 @@ class QWebEngineFindTextResult; typedef struct QWebEngineFindTextResult QWebEngineFindTextResult; #endif -void QWebEngineFindTextResult_new(QWebEngineFindTextResult** outptr_QWebEngineFindTextResult); -void QWebEngineFindTextResult_new2(QWebEngineFindTextResult* other, QWebEngineFindTextResult** outptr_QWebEngineFindTextResult); +QWebEngineFindTextResult* QWebEngineFindTextResult_new(); +QWebEngineFindTextResult* QWebEngineFindTextResult_new2(QWebEngineFindTextResult* other); int QWebEngineFindTextResult_NumberOfMatches(const QWebEngineFindTextResult* self); int QWebEngineFindTextResult_ActiveMatch(const QWebEngineFindTextResult* self); void QWebEngineFindTextResult_OperatorAssign(QWebEngineFindTextResult* self, QWebEngineFindTextResult* other); diff --git a/qt/webengine/gen_qwebenginefullscreenrequest.cpp b/qt/webengine/gen_qwebenginefullscreenrequest.cpp index 05e39d4e..322a501a 100644 --- a/qt/webengine/gen_qwebenginefullscreenrequest.cpp +++ b/qt/webengine/gen_qwebenginefullscreenrequest.cpp @@ -4,9 +4,8 @@ #include "gen_qwebenginefullscreenrequest.h" #include "_cgo_export.h" -void QWebEngineFullScreenRequest_new(QWebEngineFullScreenRequest* param1, QWebEngineFullScreenRequest** outptr_QWebEngineFullScreenRequest) { - QWebEngineFullScreenRequest* ret = new QWebEngineFullScreenRequest(*param1); - *outptr_QWebEngineFullScreenRequest = ret; +QWebEngineFullScreenRequest* QWebEngineFullScreenRequest_new(QWebEngineFullScreenRequest* param1) { + return new QWebEngineFullScreenRequest(*param1); } void QWebEngineFullScreenRequest_Reject(QWebEngineFullScreenRequest* self) { diff --git a/qt/webengine/gen_qwebenginefullscreenrequest.go b/qt/webengine/gen_qwebenginefullscreenrequest.go index d42ad018..56d34eaa 100644 --- a/qt/webengine/gen_qwebenginefullscreenrequest.go +++ b/qt/webengine/gen_qwebenginefullscreenrequest.go @@ -38,24 +38,19 @@ func newQWebEngineFullScreenRequest(h *C.QWebEngineFullScreenRequest) *QWebEngin if h == nil { return nil } + return &QWebEngineFullScreenRequest{h: h} } // UnsafeNewQWebEngineFullScreenRequest constructs the type using only unsafe pointers. func UnsafeNewQWebEngineFullScreenRequest(h unsafe.Pointer) *QWebEngineFullScreenRequest { - if h == nil { - return nil - } - - return &QWebEngineFullScreenRequest{h: (*C.QWebEngineFullScreenRequest)(h)} + return newQWebEngineFullScreenRequest((*C.QWebEngineFullScreenRequest)(h)) } // NewQWebEngineFullScreenRequest constructs a new QWebEngineFullScreenRequest object. func NewQWebEngineFullScreenRequest(param1 *QWebEngineFullScreenRequest) *QWebEngineFullScreenRequest { - var outptr_QWebEngineFullScreenRequest *C.QWebEngineFullScreenRequest = nil - C.QWebEngineFullScreenRequest_new(param1.cPointer(), &outptr_QWebEngineFullScreenRequest) - ret := newQWebEngineFullScreenRequest(outptr_QWebEngineFullScreenRequest) + ret := newQWebEngineFullScreenRequest(C.QWebEngineFullScreenRequest_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webengine/gen_qwebenginefullscreenrequest.h b/qt/webengine/gen_qwebenginefullscreenrequest.h index 2253dca5..274dbd20 100644 --- a/qt/webengine/gen_qwebenginefullscreenrequest.h +++ b/qt/webengine/gen_qwebenginefullscreenrequest.h @@ -22,7 +22,7 @@ typedef struct QUrl QUrl; typedef struct QWebEngineFullScreenRequest QWebEngineFullScreenRequest; #endif -void QWebEngineFullScreenRequest_new(QWebEngineFullScreenRequest* param1, QWebEngineFullScreenRequest** outptr_QWebEngineFullScreenRequest); +QWebEngineFullScreenRequest* QWebEngineFullScreenRequest_new(QWebEngineFullScreenRequest* param1); void QWebEngineFullScreenRequest_Reject(QWebEngineFullScreenRequest* self); void QWebEngineFullScreenRequest_Accept(QWebEngineFullScreenRequest* self); bool QWebEngineFullScreenRequest_ToggleOn(const QWebEngineFullScreenRequest* self); diff --git a/qt/webengine/gen_qwebenginehistory.cpp b/qt/webengine/gen_qwebenginehistory.cpp index 6c47d6af..652fb873 100644 --- a/qt/webengine/gen_qwebenginehistory.cpp +++ b/qt/webengine/gen_qwebenginehistory.cpp @@ -10,9 +10,8 @@ #include "gen_qwebenginehistory.h" #include "_cgo_export.h" -void QWebEngineHistoryItem_new(QWebEngineHistoryItem* other, QWebEngineHistoryItem** outptr_QWebEngineHistoryItem) { - QWebEngineHistoryItem* ret = new QWebEngineHistoryItem(*other); - *outptr_QWebEngineHistoryItem = ret; +QWebEngineHistoryItem* QWebEngineHistoryItem_new(QWebEngineHistoryItem* other) { + return new QWebEngineHistoryItem(*other); } void QWebEngineHistoryItem_OperatorAssign(QWebEngineHistoryItem* self, QWebEngineHistoryItem* other) { diff --git a/qt/webengine/gen_qwebenginehistory.go b/qt/webengine/gen_qwebenginehistory.go index 67d1469e..79483084 100644 --- a/qt/webengine/gen_qwebenginehistory.go +++ b/qt/webengine/gen_qwebenginehistory.go @@ -38,24 +38,19 @@ func newQWebEngineHistoryItem(h *C.QWebEngineHistoryItem) *QWebEngineHistoryItem if h == nil { return nil } + return &QWebEngineHistoryItem{h: h} } // UnsafeNewQWebEngineHistoryItem constructs the type using only unsafe pointers. func UnsafeNewQWebEngineHistoryItem(h unsafe.Pointer) *QWebEngineHistoryItem { - if h == nil { - return nil - } - - return &QWebEngineHistoryItem{h: (*C.QWebEngineHistoryItem)(h)} + return newQWebEngineHistoryItem((*C.QWebEngineHistoryItem)(h)) } // NewQWebEngineHistoryItem constructs a new QWebEngineHistoryItem object. func NewQWebEngineHistoryItem(other *QWebEngineHistoryItem) *QWebEngineHistoryItem { - var outptr_QWebEngineHistoryItem *C.QWebEngineHistoryItem = nil - C.QWebEngineHistoryItem_new(other.cPointer(), &outptr_QWebEngineHistoryItem) - ret := newQWebEngineHistoryItem(outptr_QWebEngineHistoryItem) + ret := newQWebEngineHistoryItem(C.QWebEngineHistoryItem_new(other.cPointer())) ret.isSubclass = true return ret } @@ -141,16 +136,13 @@ func newQWebEngineHistory(h *C.QWebEngineHistory) *QWebEngineHistory { if h == nil { return nil } + return &QWebEngineHistory{h: h} } // UnsafeNewQWebEngineHistory constructs the type using only unsafe pointers. func UnsafeNewQWebEngineHistory(h unsafe.Pointer) *QWebEngineHistory { - if h == nil { - return nil - } - - return &QWebEngineHistory{h: (*C.QWebEngineHistory)(h)} + return newQWebEngineHistory((*C.QWebEngineHistory)(h)) } func (this *QWebEngineHistory) Clear() { diff --git a/qt/webengine/gen_qwebenginehistory.h b/qt/webengine/gen_qwebenginehistory.h index d01ebd29..b8d46b43 100644 --- a/qt/webengine/gen_qwebenginehistory.h +++ b/qt/webengine/gen_qwebenginehistory.h @@ -26,7 +26,7 @@ typedef struct QWebEngineHistory QWebEngineHistory; typedef struct QWebEngineHistoryItem QWebEngineHistoryItem; #endif -void QWebEngineHistoryItem_new(QWebEngineHistoryItem* other, QWebEngineHistoryItem** outptr_QWebEngineHistoryItem); +QWebEngineHistoryItem* QWebEngineHistoryItem_new(QWebEngineHistoryItem* other); void QWebEngineHistoryItem_OperatorAssign(QWebEngineHistoryItem* self, QWebEngineHistoryItem* other); QUrl* QWebEngineHistoryItem_OriginalUrl(const QWebEngineHistoryItem* self); QUrl* QWebEngineHistoryItem_Url(const QWebEngineHistoryItem* self); diff --git a/qt/webengine/gen_qwebenginehttprequest.cpp b/qt/webengine/gen_qwebenginehttprequest.cpp index 742a7809..89bea1c3 100644 --- a/qt/webengine/gen_qwebenginehttprequest.cpp +++ b/qt/webengine/gen_qwebenginehttprequest.cpp @@ -10,24 +10,20 @@ #include "gen_qwebenginehttprequest.h" #include "_cgo_export.h" -void QWebEngineHttpRequest_new(QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { - QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(); - *outptr_QWebEngineHttpRequest = ret; +QWebEngineHttpRequest* QWebEngineHttpRequest_new() { + return new QWebEngineHttpRequest(); } -void QWebEngineHttpRequest_new2(QWebEngineHttpRequest* other, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { - QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(*other); - *outptr_QWebEngineHttpRequest = ret; +QWebEngineHttpRequest* QWebEngineHttpRequest_new2(QWebEngineHttpRequest* other) { + return new QWebEngineHttpRequest(*other); } -void QWebEngineHttpRequest_new3(QUrl* url, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { - QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(*url); - *outptr_QWebEngineHttpRequest = ret; +QWebEngineHttpRequest* QWebEngineHttpRequest_new3(QUrl* url) { + return new QWebEngineHttpRequest(*url); } -void QWebEngineHttpRequest_new4(QUrl* url, int* method, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { - QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(*url, (const QWebEngineHttpRequest::Method&)(*method)); - *outptr_QWebEngineHttpRequest = ret; +QWebEngineHttpRequest* QWebEngineHttpRequest_new4(QUrl* url, int* method) { + return new QWebEngineHttpRequest(*url, (const QWebEngineHttpRequest::Method&)(*method)); } void QWebEngineHttpRequest_OperatorAssign(QWebEngineHttpRequest* self, QWebEngineHttpRequest* other) { diff --git a/qt/webengine/gen_qwebenginehttprequest.go b/qt/webengine/gen_qwebenginehttprequest.go index c271bd14..104a22b4 100644 --- a/qt/webengine/gen_qwebenginehttprequest.go +++ b/qt/webengine/gen_qwebenginehttprequest.go @@ -45,54 +45,43 @@ func newQWebEngineHttpRequest(h *C.QWebEngineHttpRequest) *QWebEngineHttpRequest if h == nil { return nil } + return &QWebEngineHttpRequest{h: h} } // UnsafeNewQWebEngineHttpRequest constructs the type using only unsafe pointers. func UnsafeNewQWebEngineHttpRequest(h unsafe.Pointer) *QWebEngineHttpRequest { - if h == nil { - return nil - } - - return &QWebEngineHttpRequest{h: (*C.QWebEngineHttpRequest)(h)} + return newQWebEngineHttpRequest((*C.QWebEngineHttpRequest)(h)) } // NewQWebEngineHttpRequest constructs a new QWebEngineHttpRequest object. func NewQWebEngineHttpRequest() *QWebEngineHttpRequest { - var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil - C.QWebEngineHttpRequest_new(&outptr_QWebEngineHttpRequest) - ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(C.QWebEngineHttpRequest_new()) ret.isSubclass = true return ret } // NewQWebEngineHttpRequest2 constructs a new QWebEngineHttpRequest object. func NewQWebEngineHttpRequest2(other *QWebEngineHttpRequest) *QWebEngineHttpRequest { - var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil - C.QWebEngineHttpRequest_new2(other.cPointer(), &outptr_QWebEngineHttpRequest) - ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(C.QWebEngineHttpRequest_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQWebEngineHttpRequest3 constructs a new QWebEngineHttpRequest object. func NewQWebEngineHttpRequest3(url *qt.QUrl) *QWebEngineHttpRequest { - var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil - C.QWebEngineHttpRequest_new3((*C.QUrl)(url.UnsafePointer()), &outptr_QWebEngineHttpRequest) - ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(C.QWebEngineHttpRequest_new3((*C.QUrl)(url.UnsafePointer()))) ret.isSubclass = true return ret } // NewQWebEngineHttpRequest4 constructs a new QWebEngineHttpRequest object. func NewQWebEngineHttpRequest4(url *qt.QUrl, method *QWebEngineHttpRequest__Method) *QWebEngineHttpRequest { - var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil - C.QWebEngineHttpRequest_new4((*C.QUrl)(url.UnsafePointer()), (*C.int)(unsafe.Pointer(method)), &outptr_QWebEngineHttpRequest) - ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(C.QWebEngineHttpRequest_new4((*C.QUrl)(url.UnsafePointer()), (*C.int)(unsafe.Pointer(method)))) ret.isSubclass = true return ret } diff --git a/qt/webengine/gen_qwebenginehttprequest.h b/qt/webengine/gen_qwebenginehttprequest.h index 90ae9068..0861919b 100644 --- a/qt/webengine/gen_qwebenginehttprequest.h +++ b/qt/webengine/gen_qwebenginehttprequest.h @@ -22,10 +22,10 @@ typedef struct QUrl QUrl; typedef struct QWebEngineHttpRequest QWebEngineHttpRequest; #endif -void QWebEngineHttpRequest_new(QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); -void QWebEngineHttpRequest_new2(QWebEngineHttpRequest* other, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); -void QWebEngineHttpRequest_new3(QUrl* url, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); -void QWebEngineHttpRequest_new4(QUrl* url, int* method, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); +QWebEngineHttpRequest* QWebEngineHttpRequest_new(); +QWebEngineHttpRequest* QWebEngineHttpRequest_new2(QWebEngineHttpRequest* other); +QWebEngineHttpRequest* QWebEngineHttpRequest_new3(QUrl* url); +QWebEngineHttpRequest* QWebEngineHttpRequest_new4(QUrl* url, int* method); void QWebEngineHttpRequest_OperatorAssign(QWebEngineHttpRequest* self, QWebEngineHttpRequest* other); QWebEngineHttpRequest* QWebEngineHttpRequest_PostRequest(QUrl* url, struct miqt_map /* of struct miqt_string to struct miqt_string */ postData); void QWebEngineHttpRequest_Swap(QWebEngineHttpRequest* self, QWebEngineHttpRequest* other); diff --git a/qt/webengine/gen_qwebenginenotification.cpp b/qt/webengine/gen_qwebenginenotification.cpp index 640eceec..bec19de4 100644 --- a/qt/webengine/gen_qwebenginenotification.cpp +++ b/qt/webengine/gen_qwebenginenotification.cpp @@ -10,6 +10,10 @@ #include "gen_qwebenginenotification.h" #include "_cgo_export.h" +void QWebEngineNotification_virtbase(QWebEngineNotification* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebEngineNotification_MetaObject(const QWebEngineNotification* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/webengine/gen_qwebenginenotification.go b/qt/webengine/gen_qwebenginenotification.go index 646d8a10..44fa7f69 100644 --- a/qt/webengine/gen_qwebenginenotification.go +++ b/qt/webengine/gen_qwebenginenotification.go @@ -36,22 +36,20 @@ func (this *QWebEngineNotification) UnsafePointer() unsafe.Pointer { } // newQWebEngineNotification constructs the type using only CGO pointers. -func newQWebEngineNotification(h *C.QWebEngineNotification, h_QObject *C.QObject) *QWebEngineNotification { +func newQWebEngineNotification(h *C.QWebEngineNotification) *QWebEngineNotification { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineNotification_virtbase(h, &outptr_QObject) + return &QWebEngineNotification{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineNotification constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineNotification(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineNotification { - if h == nil { - return nil - } - - return &QWebEngineNotification{h: (*C.QWebEngineNotification)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineNotification(h unsafe.Pointer) *QWebEngineNotification { + return newQWebEngineNotification((*C.QWebEngineNotification)(h)) } func (this *QWebEngineNotification) MetaObject() *qt.QMetaObject { @@ -93,7 +91,7 @@ func (this *QWebEngineNotification) Origin() *qt.QUrl { } func (this *QWebEngineNotification) Icon() *qt.QImage { - _goptr := qt.UnsafeNewQImage(unsafe.Pointer(C.QWebEngineNotification_Icon(this.h)), nil) + _goptr := qt.UnsafeNewQImage(unsafe.Pointer(C.QWebEngineNotification_Icon(this.h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/webengine/gen_qwebenginenotification.h b/qt/webengine/gen_qwebenginenotification.h index f674c0fb..a43e089d 100644 --- a/qt/webengine/gen_qwebenginenotification.h +++ b/qt/webengine/gen_qwebenginenotification.h @@ -28,6 +28,7 @@ typedef struct QUrl QUrl; typedef struct QWebEngineNotification QWebEngineNotification; #endif +void QWebEngineNotification_virtbase(QWebEngineNotification* src, QObject** outptr_QObject); QMetaObject* QWebEngineNotification_MetaObject(const QWebEngineNotification* self); void* QWebEngineNotification_Metacast(QWebEngineNotification* self, const char* param1); struct miqt_string QWebEngineNotification_Tr(const char* s); diff --git a/qt/webengine/gen_qwebenginepage.cpp b/qt/webengine/gen_qwebenginepage.cpp index 291f65ae..5f57c134 100644 --- a/qt/webengine/gen_qwebenginepage.cpp +++ b/qt/webengine/gen_qwebenginepage.cpp @@ -533,28 +533,24 @@ public: }; -void QWebEnginePage_new(QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { - MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(); - *outptr_QWebEnginePage = ret; - *outptr_QObject = static_cast(ret); +QWebEnginePage* QWebEnginePage_new() { + return new MiqtVirtualQWebEnginePage(); } -void QWebEnginePage_new2(QWebEngineProfile* profile, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { - MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(profile); - *outptr_QWebEnginePage = ret; - *outptr_QObject = static_cast(ret); +QWebEnginePage* QWebEnginePage_new2(QWebEngineProfile* profile) { + return new MiqtVirtualQWebEnginePage(profile); } -void QWebEnginePage_new3(QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { - MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(parent); - *outptr_QWebEnginePage = ret; - *outptr_QObject = static_cast(ret); +QWebEnginePage* QWebEnginePage_new3(QObject* parent) { + return new MiqtVirtualQWebEnginePage(parent); } -void QWebEnginePage_new4(QWebEngineProfile* profile, QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { - MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(profile, parent); - *outptr_QWebEnginePage = ret; - *outptr_QObject = static_cast(ret); +QWebEnginePage* QWebEnginePage_new4(QWebEngineProfile* profile, QObject* parent) { + return new MiqtVirtualQWebEnginePage(profile, parent); +} + +void QWebEnginePage_virtbase(QWebEnginePage* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QWebEnginePage_MetaObject(const QWebEnginePage* self) { diff --git a/qt/webengine/gen_qwebenginepage.go b/qt/webengine/gen_qwebenginepage.go index 6f2d515c..54650c06 100644 --- a/qt/webengine/gen_qwebenginepage.go +++ b/qt/webengine/gen_qwebenginepage.go @@ -171,64 +171,50 @@ func (this *QWebEnginePage) UnsafePointer() unsafe.Pointer { } // newQWebEnginePage constructs the type using only CGO pointers. -func newQWebEnginePage(h *C.QWebEnginePage, h_QObject *C.QObject) *QWebEnginePage { +func newQWebEnginePage(h *C.QWebEnginePage) *QWebEnginePage { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEnginePage_virtbase(h, &outptr_QObject) + return &QWebEnginePage{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEnginePage constructs the type using only unsafe pointers. -func UnsafeNewQWebEnginePage(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEnginePage { - if h == nil { - return nil - } - - return &QWebEnginePage{h: (*C.QWebEnginePage)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEnginePage(h unsafe.Pointer) *QWebEnginePage { + return newQWebEnginePage((*C.QWebEnginePage)(h)) } // NewQWebEnginePage constructs a new QWebEnginePage object. func NewQWebEnginePage() *QWebEnginePage { - var outptr_QWebEnginePage *C.QWebEnginePage = nil - var outptr_QObject *C.QObject = nil - C.QWebEnginePage_new(&outptr_QWebEnginePage, &outptr_QObject) - ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret := newQWebEnginePage(C.QWebEnginePage_new()) ret.isSubclass = true return ret } // NewQWebEnginePage2 constructs a new QWebEnginePage object. func NewQWebEnginePage2(profile *QWebEngineProfile) *QWebEnginePage { - var outptr_QWebEnginePage *C.QWebEnginePage = nil - var outptr_QObject *C.QObject = nil - C.QWebEnginePage_new2(profile.cPointer(), &outptr_QWebEnginePage, &outptr_QObject) - ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret := newQWebEnginePage(C.QWebEnginePage_new2(profile.cPointer())) ret.isSubclass = true return ret } // NewQWebEnginePage3 constructs a new QWebEnginePage object. func NewQWebEnginePage3(parent *qt.QObject) *QWebEnginePage { - var outptr_QWebEnginePage *C.QWebEnginePage = nil - var outptr_QObject *C.QObject = nil - C.QWebEnginePage_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QWebEnginePage, &outptr_QObject) - ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret := newQWebEnginePage(C.QWebEnginePage_new3((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQWebEnginePage4 constructs a new QWebEnginePage object. func NewQWebEnginePage4(profile *QWebEngineProfile, parent *qt.QObject) *QWebEnginePage { - var outptr_QWebEnginePage *C.QWebEnginePage = nil - var outptr_QObject *C.QObject = nil - C.QWebEnginePage_new4(profile.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QWebEnginePage, &outptr_QObject) - ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret := newQWebEnginePage(C.QWebEnginePage_new4(profile.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -270,7 +256,7 @@ func (this *QWebEnginePage) SetView(view *qt.QWidget) { } func (this *QWebEnginePage) View() *qt.QWidget { - return qt.UnsafeNewQWidget(unsafe.Pointer(C.QWebEnginePage_View(this.h)), nil, nil) + return qt.UnsafeNewQWidget(unsafe.Pointer(C.QWebEnginePage_View(this.h))) } func (this *QWebEnginePage) HasSelection() bool { @@ -285,11 +271,11 @@ func (this *QWebEnginePage) SelectedText() string { } func (this *QWebEnginePage) Profile() *QWebEngineProfile { - return newQWebEngineProfile(C.QWebEnginePage_Profile(this.h), nil) + return newQWebEngineProfile(C.QWebEnginePage_Profile(this.h)) } func (this *QWebEnginePage) Action(action QWebEnginePage__WebAction) *qt.QAction { - return qt.UnsafeNewQAction(unsafe.Pointer(C.QWebEnginePage_Action(this.h, (C.int)(action))), nil) + return qt.UnsafeNewQAction(unsafe.Pointer(C.QWebEnginePage_Action(this.h, (C.int)(action)))) } func (this *QWebEnginePage) TriggerAction(action QWebEnginePage__WebAction, checked bool) { @@ -317,7 +303,7 @@ func (this *QWebEnginePage) FindText(subString string) { } func (this *QWebEnginePage) CreateStandardContextMenu() *qt.QMenu { - return qt.UnsafeNewQMenu(unsafe.Pointer(C.QWebEnginePage_CreateStandardContextMenu(this.h)), nil, nil, nil) + return qt.UnsafeNewQMenu(unsafe.Pointer(C.QWebEnginePage_CreateStandardContextMenu(this.h))) } func (this *QWebEnginePage) SetFeaturePermission(securityOrigin *qt.QUrl, feature QWebEnginePage__Feature, policy QWebEnginePage__PermissionPolicy) { @@ -431,7 +417,7 @@ func (this *QWebEnginePage) Settings() *QWebEngineSettings { } func (this *QWebEnginePage) WebChannel() *webchannel.QWebChannel { - return webchannel.UnsafeNewQWebChannel(unsafe.Pointer(C.QWebEnginePage_WebChannel(this.h)), nil) + return webchannel.UnsafeNewQWebChannel(unsafe.Pointer(C.QWebEnginePage_WebChannel(this.h))) } func (this *QWebEnginePage) SetWebChannel(webChannel *webchannel.QWebChannel) { @@ -489,7 +475,7 @@ func (this *QWebEnginePage) SetInspectedPage(page *QWebEnginePage) { } func (this *QWebEnginePage) InspectedPage() *QWebEnginePage { - return newQWebEnginePage(C.QWebEnginePage_InspectedPage(this.h), nil) + return newQWebEnginePage(C.QWebEnginePage_InspectedPage(this.h)) } func (this *QWebEnginePage) SetDevToolsPage(page *QWebEnginePage) { @@ -497,7 +483,7 @@ func (this *QWebEnginePage) SetDevToolsPage(page *QWebEnginePage) { } func (this *QWebEnginePage) DevToolsPage() *QWebEnginePage { - return newQWebEnginePage(C.QWebEnginePage_DevToolsPage(this.h), nil) + return newQWebEnginePage(C.QWebEnginePage_DevToolsPage(this.h)) } func (this *QWebEnginePage) SetUrlRequestInterceptor(interceptor *QWebEngineUrlRequestInterceptor) { @@ -1349,7 +1335,7 @@ func miqt_exec_callback_QWebEnginePage_Event(self *C.QWebEnginePage, cb C.intptr func (this *QWebEnginePage) callVirtualBase_CreateWindow(typeVal QWebEnginePage__WebWindowType) *QWebEnginePage { - return newQWebEnginePage(C.QWebEnginePage_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal)), nil) + return newQWebEnginePage(C.QWebEnginePage_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal))) } func (this *QWebEnginePage) OnCreateWindow(slot func(super func(typeVal QWebEnginePage__WebWindowType) *QWebEnginePage, typeVal QWebEnginePage__WebWindowType) *QWebEnginePage) { @@ -1691,7 +1677,7 @@ func miqt_exec_callback_QWebEnginePage_TimerEvent(self *C.QWebEnginePage, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QWebEnginePage{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1717,7 +1703,7 @@ func miqt_exec_callback_QWebEnginePage_ChildEvent(self *C.QWebEnginePage, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QWebEnginePage{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/webengine/gen_qwebenginepage.h b/qt/webengine/gen_qwebenginepage.h index 32fbaa9d..94faf8f5 100644 --- a/qt/webengine/gen_qwebenginepage.h +++ b/qt/webengine/gen_qwebenginepage.h @@ -82,10 +82,11 @@ typedef struct QWebEngineUrlRequestInterceptor QWebEngineUrlRequestInterceptor; typedef struct QWidget QWidget; #endif -void QWebEnginePage_new(QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); -void QWebEnginePage_new2(QWebEngineProfile* profile, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); -void QWebEnginePage_new3(QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); -void QWebEnginePage_new4(QWebEngineProfile* profile, QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); +QWebEnginePage* QWebEnginePage_new(); +QWebEnginePage* QWebEnginePage_new2(QWebEngineProfile* profile); +QWebEnginePage* QWebEnginePage_new3(QObject* parent); +QWebEnginePage* QWebEnginePage_new4(QWebEngineProfile* profile, QObject* parent); +void QWebEnginePage_virtbase(QWebEnginePage* src, QObject** outptr_QObject); QMetaObject* QWebEnginePage_MetaObject(const QWebEnginePage* self); void* QWebEnginePage_Metacast(QWebEnginePage* self, const char* param1); struct miqt_string QWebEnginePage_Tr(const char* s); diff --git a/qt/webengine/gen_qwebengineprofile.cpp b/qt/webengine/gen_qwebengineprofile.cpp index 3f4a138e..92962aa9 100644 --- a/qt/webengine/gen_qwebengineprofile.cpp +++ b/qt/webengine/gen_qwebengineprofile.cpp @@ -205,30 +205,26 @@ public: }; -void QWebEngineProfile_new(QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { - MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(); - *outptr_QWebEngineProfile = ret; - *outptr_QObject = static_cast(ret); +QWebEngineProfile* QWebEngineProfile_new() { + return new MiqtVirtualQWebEngineProfile(); } -void QWebEngineProfile_new2(struct miqt_string name, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { +QWebEngineProfile* QWebEngineProfile_new2(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(name_QString); - *outptr_QWebEngineProfile = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQWebEngineProfile(name_QString); } -void QWebEngineProfile_new3(QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { - MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(parent); - *outptr_QWebEngineProfile = ret; - *outptr_QObject = static_cast(ret); +QWebEngineProfile* QWebEngineProfile_new3(QObject* parent) { + return new MiqtVirtualQWebEngineProfile(parent); } -void QWebEngineProfile_new4(struct miqt_string name, QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { +QWebEngineProfile* QWebEngineProfile_new4(struct miqt_string name, QObject* parent) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(name_QString, parent); - *outptr_QWebEngineProfile = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQWebEngineProfile(name_QString, parent); +} + +void QWebEngineProfile_virtbase(QWebEngineProfile* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QWebEngineProfile_MetaObject(const QWebEngineProfile* self) { diff --git a/qt/webengine/gen_qwebengineprofile.go b/qt/webengine/gen_qwebengineprofile.go index 69becca0..bac660f5 100644 --- a/qt/webengine/gen_qwebengineprofile.go +++ b/qt/webengine/gen_qwebengineprofile.go @@ -52,31 +52,26 @@ func (this *QWebEngineProfile) UnsafePointer() unsafe.Pointer { } // newQWebEngineProfile constructs the type using only CGO pointers. -func newQWebEngineProfile(h *C.QWebEngineProfile, h_QObject *C.QObject) *QWebEngineProfile { +func newQWebEngineProfile(h *C.QWebEngineProfile) *QWebEngineProfile { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineProfile_virtbase(h, &outptr_QObject) + return &QWebEngineProfile{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineProfile constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineProfile(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineProfile { - if h == nil { - return nil - } - - return &QWebEngineProfile{h: (*C.QWebEngineProfile)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineProfile(h unsafe.Pointer) *QWebEngineProfile { + return newQWebEngineProfile((*C.QWebEngineProfile)(h)) } // NewQWebEngineProfile constructs a new QWebEngineProfile object. func NewQWebEngineProfile() *QWebEngineProfile { - var outptr_QWebEngineProfile *C.QWebEngineProfile = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineProfile_new(&outptr_QWebEngineProfile, &outptr_QObject) - ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret := newQWebEngineProfile(C.QWebEngineProfile_new()) ret.isSubclass = true return ret } @@ -87,22 +82,16 @@ func NewQWebEngineProfile2(name string) *QWebEngineProfile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QWebEngineProfile *C.QWebEngineProfile = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineProfile_new2(name_ms, &outptr_QWebEngineProfile, &outptr_QObject) - ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret := newQWebEngineProfile(C.QWebEngineProfile_new2(name_ms)) ret.isSubclass = true return ret } // NewQWebEngineProfile3 constructs a new QWebEngineProfile object. func NewQWebEngineProfile3(parent *qt.QObject) *QWebEngineProfile { - var outptr_QWebEngineProfile *C.QWebEngineProfile = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineProfile_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QWebEngineProfile, &outptr_QObject) - ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret := newQWebEngineProfile(C.QWebEngineProfile_new3((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -113,11 +102,8 @@ func NewQWebEngineProfile4(name string, parent *qt.QObject) *QWebEngineProfile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QWebEngineProfile *C.QWebEngineProfile = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineProfile_new4(name_ms, (*C.QObject)(parent.UnsafePointer()), &outptr_QWebEngineProfile, &outptr_QObject) - ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret := newQWebEngineProfile(C.QWebEngineProfile_new4(name_ms, (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -246,7 +232,7 @@ func (this *QWebEngineProfile) SetHttpCacheMaximumSize(maxSize int) { } func (this *QWebEngineProfile) CookieStore() *QWebEngineCookieStore { - return newQWebEngineCookieStore(C.QWebEngineProfile_CookieStore(this.h), nil) + return newQWebEngineCookieStore(C.QWebEngineProfile_CookieStore(this.h)) } func (this *QWebEngineProfile) SetRequestInterceptor(interceptor *QWebEngineUrlRequestInterceptor) { @@ -287,7 +273,7 @@ func (this *QWebEngineProfile) UrlSchemeHandler(param1 []byte) *QWebEngineUrlSch param1_alias := C.struct_miqt_string{} param1_alias.data = (*C.char)(unsafe.Pointer(¶m1[0])) param1_alias.len = C.size_t(len(param1)) - return newQWebEngineUrlSchemeHandler(C.QWebEngineProfile_UrlSchemeHandler(this.h, param1_alias), nil) + return newQWebEngineUrlSchemeHandler(C.QWebEngineProfile_UrlSchemeHandler(this.h, param1_alias)) } func (this *QWebEngineProfile) InstallUrlSchemeHandler(scheme []byte, param2 *QWebEngineUrlSchemeHandler) { @@ -379,7 +365,7 @@ func (this *QWebEngineProfile) ClientCertificateStore() *QWebEngineClientCertifi } func QWebEngineProfile_DefaultProfile() *QWebEngineProfile { - return newQWebEngineProfile(C.QWebEngineProfile_DefaultProfile(), nil) + return newQWebEngineProfile(C.QWebEngineProfile_DefaultProfile()) } func (this *QWebEngineProfile) DownloadRequested(download *QWebEngineDownloadItem) { @@ -397,7 +383,7 @@ func miqt_exec_callback_QWebEngineProfile_DownloadRequested(cb C.intptr_t, downl } // Convert all CABI parameters to Go parameters - slotval1 := newQWebEngineDownloadItem(download, nil) + slotval1 := newQWebEngineDownloadItem(download) gofunc(slotval1) } @@ -528,7 +514,7 @@ func miqt_exec_callback_QWebEngineProfile_TimerEvent(self *C.QWebEngineProfile, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QWebEngineProfile{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -554,7 +540,7 @@ func miqt_exec_callback_QWebEngineProfile_ChildEvent(self *C.QWebEngineProfile, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QWebEngineProfile{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/webengine/gen_qwebengineprofile.h b/qt/webengine/gen_qwebengineprofile.h index 08a37c8a..dfc859da 100644 --- a/qt/webengine/gen_qwebengineprofile.h +++ b/qt/webengine/gen_qwebengineprofile.h @@ -48,10 +48,11 @@ typedef struct QWebEngineUrlRequestInterceptor QWebEngineUrlRequestInterceptor; typedef struct QWebEngineUrlSchemeHandler QWebEngineUrlSchemeHandler; #endif -void QWebEngineProfile_new(QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); -void QWebEngineProfile_new2(struct miqt_string name, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); -void QWebEngineProfile_new3(QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); -void QWebEngineProfile_new4(struct miqt_string name, QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); +QWebEngineProfile* QWebEngineProfile_new(); +QWebEngineProfile* QWebEngineProfile_new2(struct miqt_string name); +QWebEngineProfile* QWebEngineProfile_new3(QObject* parent); +QWebEngineProfile* QWebEngineProfile_new4(struct miqt_string name, QObject* parent); +void QWebEngineProfile_virtbase(QWebEngineProfile* src, QObject** outptr_QObject); QMetaObject* QWebEngineProfile_MetaObject(const QWebEngineProfile* self); void* QWebEngineProfile_Metacast(QWebEngineProfile* self, const char* param1); struct miqt_string QWebEngineProfile_Tr(const char* s); diff --git a/qt/webengine/gen_qwebenginequotarequest.cpp b/qt/webengine/gen_qwebenginequotarequest.cpp index 6f249c33..2e9e0e52 100644 --- a/qt/webengine/gen_qwebenginequotarequest.cpp +++ b/qt/webengine/gen_qwebenginequotarequest.cpp @@ -4,14 +4,12 @@ #include "gen_qwebenginequotarequest.h" #include "_cgo_export.h" -void QWebEngineQuotaRequest_new(QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest) { - QWebEngineQuotaRequest* ret = new QWebEngineQuotaRequest(); - *outptr_QWebEngineQuotaRequest = ret; +QWebEngineQuotaRequest* QWebEngineQuotaRequest_new() { + return new QWebEngineQuotaRequest(); } -void QWebEngineQuotaRequest_new2(QWebEngineQuotaRequest* param1, QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest) { - QWebEngineQuotaRequest* ret = new QWebEngineQuotaRequest(*param1); - *outptr_QWebEngineQuotaRequest = ret; +QWebEngineQuotaRequest* QWebEngineQuotaRequest_new2(QWebEngineQuotaRequest* param1) { + return new QWebEngineQuotaRequest(*param1); } void QWebEngineQuotaRequest_Accept(QWebEngineQuotaRequest* self) { diff --git a/qt/webengine/gen_qwebenginequotarequest.go b/qt/webengine/gen_qwebenginequotarequest.go index 73bde7a1..b2714f8c 100644 --- a/qt/webengine/gen_qwebenginequotarequest.go +++ b/qt/webengine/gen_qwebenginequotarequest.go @@ -38,34 +38,27 @@ func newQWebEngineQuotaRequest(h *C.QWebEngineQuotaRequest) *QWebEngineQuotaRequ if h == nil { return nil } + return &QWebEngineQuotaRequest{h: h} } // UnsafeNewQWebEngineQuotaRequest constructs the type using only unsafe pointers. func UnsafeNewQWebEngineQuotaRequest(h unsafe.Pointer) *QWebEngineQuotaRequest { - if h == nil { - return nil - } - - return &QWebEngineQuotaRequest{h: (*C.QWebEngineQuotaRequest)(h)} + return newQWebEngineQuotaRequest((*C.QWebEngineQuotaRequest)(h)) } // NewQWebEngineQuotaRequest constructs a new QWebEngineQuotaRequest object. func NewQWebEngineQuotaRequest() *QWebEngineQuotaRequest { - var outptr_QWebEngineQuotaRequest *C.QWebEngineQuotaRequest = nil - C.QWebEngineQuotaRequest_new(&outptr_QWebEngineQuotaRequest) - ret := newQWebEngineQuotaRequest(outptr_QWebEngineQuotaRequest) + ret := newQWebEngineQuotaRequest(C.QWebEngineQuotaRequest_new()) ret.isSubclass = true return ret } // NewQWebEngineQuotaRequest2 constructs a new QWebEngineQuotaRequest object. func NewQWebEngineQuotaRequest2(param1 *QWebEngineQuotaRequest) *QWebEngineQuotaRequest { - var outptr_QWebEngineQuotaRequest *C.QWebEngineQuotaRequest = nil - C.QWebEngineQuotaRequest_new2(param1.cPointer(), &outptr_QWebEngineQuotaRequest) - ret := newQWebEngineQuotaRequest(outptr_QWebEngineQuotaRequest) + ret := newQWebEngineQuotaRequest(C.QWebEngineQuotaRequest_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webengine/gen_qwebenginequotarequest.h b/qt/webengine/gen_qwebenginequotarequest.h index d08eac56..1653032c 100644 --- a/qt/webengine/gen_qwebenginequotarequest.h +++ b/qt/webengine/gen_qwebenginequotarequest.h @@ -22,8 +22,8 @@ typedef struct QUrl QUrl; typedef struct QWebEngineQuotaRequest QWebEngineQuotaRequest; #endif -void QWebEngineQuotaRequest_new(QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest); -void QWebEngineQuotaRequest_new2(QWebEngineQuotaRequest* param1, QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest); +QWebEngineQuotaRequest* QWebEngineQuotaRequest_new(); +QWebEngineQuotaRequest* QWebEngineQuotaRequest_new2(QWebEngineQuotaRequest* param1); void QWebEngineQuotaRequest_Accept(QWebEngineQuotaRequest* self); void QWebEngineQuotaRequest_Reject(QWebEngineQuotaRequest* self); QUrl* QWebEngineQuotaRequest_Origin(const QWebEngineQuotaRequest* self); diff --git a/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.cpp b/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.cpp index b4fe6cd3..02df65a2 100644 --- a/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.cpp +++ b/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.cpp @@ -7,14 +7,12 @@ #include "gen_qwebengineregisterprotocolhandlerrequest.h" #include "_cgo_export.h" -void QWebEngineRegisterProtocolHandlerRequest_new(QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest) { - QWebEngineRegisterProtocolHandlerRequest* ret = new QWebEngineRegisterProtocolHandlerRequest(); - *outptr_QWebEngineRegisterProtocolHandlerRequest = ret; +QWebEngineRegisterProtocolHandlerRequest* QWebEngineRegisterProtocolHandlerRequest_new() { + return new QWebEngineRegisterProtocolHandlerRequest(); } -void QWebEngineRegisterProtocolHandlerRequest_new2(QWebEngineRegisterProtocolHandlerRequest* param1, QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest) { - QWebEngineRegisterProtocolHandlerRequest* ret = new QWebEngineRegisterProtocolHandlerRequest(*param1); - *outptr_QWebEngineRegisterProtocolHandlerRequest = ret; +QWebEngineRegisterProtocolHandlerRequest* QWebEngineRegisterProtocolHandlerRequest_new2(QWebEngineRegisterProtocolHandlerRequest* param1) { + return new QWebEngineRegisterProtocolHandlerRequest(*param1); } void QWebEngineRegisterProtocolHandlerRequest_Accept(QWebEngineRegisterProtocolHandlerRequest* self) { diff --git a/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.go b/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.go index eefdd82e..e571de66 100644 --- a/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.go +++ b/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.go @@ -38,34 +38,27 @@ func newQWebEngineRegisterProtocolHandlerRequest(h *C.QWebEngineRegisterProtocol if h == nil { return nil } + return &QWebEngineRegisterProtocolHandlerRequest{h: h} } // UnsafeNewQWebEngineRegisterProtocolHandlerRequest constructs the type using only unsafe pointers. func UnsafeNewQWebEngineRegisterProtocolHandlerRequest(h unsafe.Pointer) *QWebEngineRegisterProtocolHandlerRequest { - if h == nil { - return nil - } - - return &QWebEngineRegisterProtocolHandlerRequest{h: (*C.QWebEngineRegisterProtocolHandlerRequest)(h)} + return newQWebEngineRegisterProtocolHandlerRequest((*C.QWebEngineRegisterProtocolHandlerRequest)(h)) } // NewQWebEngineRegisterProtocolHandlerRequest constructs a new QWebEngineRegisterProtocolHandlerRequest object. func NewQWebEngineRegisterProtocolHandlerRequest() *QWebEngineRegisterProtocolHandlerRequest { - var outptr_QWebEngineRegisterProtocolHandlerRequest *C.QWebEngineRegisterProtocolHandlerRequest = nil - C.QWebEngineRegisterProtocolHandlerRequest_new(&outptr_QWebEngineRegisterProtocolHandlerRequest) - ret := newQWebEngineRegisterProtocolHandlerRequest(outptr_QWebEngineRegisterProtocolHandlerRequest) + ret := newQWebEngineRegisterProtocolHandlerRequest(C.QWebEngineRegisterProtocolHandlerRequest_new()) ret.isSubclass = true return ret } // NewQWebEngineRegisterProtocolHandlerRequest2 constructs a new QWebEngineRegisterProtocolHandlerRequest object. func NewQWebEngineRegisterProtocolHandlerRequest2(param1 *QWebEngineRegisterProtocolHandlerRequest) *QWebEngineRegisterProtocolHandlerRequest { - var outptr_QWebEngineRegisterProtocolHandlerRequest *C.QWebEngineRegisterProtocolHandlerRequest = nil - C.QWebEngineRegisterProtocolHandlerRequest_new2(param1.cPointer(), &outptr_QWebEngineRegisterProtocolHandlerRequest) - ret := newQWebEngineRegisterProtocolHandlerRequest(outptr_QWebEngineRegisterProtocolHandlerRequest) + ret := newQWebEngineRegisterProtocolHandlerRequest(C.QWebEngineRegisterProtocolHandlerRequest_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.h b/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.h index 939cedbd..f67604af 100644 --- a/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.h +++ b/qt/webengine/gen_qwebengineregisterprotocolhandlerrequest.h @@ -22,8 +22,8 @@ typedef struct QUrl QUrl; typedef struct QWebEngineRegisterProtocolHandlerRequest QWebEngineRegisterProtocolHandlerRequest; #endif -void QWebEngineRegisterProtocolHandlerRequest_new(QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest); -void QWebEngineRegisterProtocolHandlerRequest_new2(QWebEngineRegisterProtocolHandlerRequest* param1, QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest); +QWebEngineRegisterProtocolHandlerRequest* QWebEngineRegisterProtocolHandlerRequest_new(); +QWebEngineRegisterProtocolHandlerRequest* QWebEngineRegisterProtocolHandlerRequest_new2(QWebEngineRegisterProtocolHandlerRequest* param1); void QWebEngineRegisterProtocolHandlerRequest_Accept(QWebEngineRegisterProtocolHandlerRequest* self); void QWebEngineRegisterProtocolHandlerRequest_Reject(QWebEngineRegisterProtocolHandlerRequest* self); QUrl* QWebEngineRegisterProtocolHandlerRequest_Origin(const QWebEngineRegisterProtocolHandlerRequest* self); diff --git a/qt/webengine/gen_qwebenginescript.cpp b/qt/webengine/gen_qwebenginescript.cpp index 1a1dd70f..d3962f91 100644 --- a/qt/webengine/gen_qwebenginescript.cpp +++ b/qt/webengine/gen_qwebenginescript.cpp @@ -6,14 +6,12 @@ #include "gen_qwebenginescript.h" #include "_cgo_export.h" -void QWebEngineScript_new(QWebEngineScript** outptr_QWebEngineScript) { - QWebEngineScript* ret = new QWebEngineScript(); - *outptr_QWebEngineScript = ret; +QWebEngineScript* QWebEngineScript_new() { + return new QWebEngineScript(); } -void QWebEngineScript_new2(QWebEngineScript* other, QWebEngineScript** outptr_QWebEngineScript) { - QWebEngineScript* ret = new QWebEngineScript(*other); - *outptr_QWebEngineScript = ret; +QWebEngineScript* QWebEngineScript_new2(QWebEngineScript* other) { + return new QWebEngineScript(*other); } void QWebEngineScript_OperatorAssign(QWebEngineScript* self, QWebEngineScript* other) { diff --git a/qt/webengine/gen_qwebenginescript.go b/qt/webengine/gen_qwebenginescript.go index e4d17f04..3b98e54f 100644 --- a/qt/webengine/gen_qwebenginescript.go +++ b/qt/webengine/gen_qwebenginescript.go @@ -53,34 +53,27 @@ func newQWebEngineScript(h *C.QWebEngineScript) *QWebEngineScript { if h == nil { return nil } + return &QWebEngineScript{h: h} } // UnsafeNewQWebEngineScript constructs the type using only unsafe pointers. func UnsafeNewQWebEngineScript(h unsafe.Pointer) *QWebEngineScript { - if h == nil { - return nil - } - - return &QWebEngineScript{h: (*C.QWebEngineScript)(h)} + return newQWebEngineScript((*C.QWebEngineScript)(h)) } // NewQWebEngineScript constructs a new QWebEngineScript object. func NewQWebEngineScript() *QWebEngineScript { - var outptr_QWebEngineScript *C.QWebEngineScript = nil - C.QWebEngineScript_new(&outptr_QWebEngineScript) - ret := newQWebEngineScript(outptr_QWebEngineScript) + ret := newQWebEngineScript(C.QWebEngineScript_new()) ret.isSubclass = true return ret } // NewQWebEngineScript2 constructs a new QWebEngineScript object. func NewQWebEngineScript2(other *QWebEngineScript) *QWebEngineScript { - var outptr_QWebEngineScript *C.QWebEngineScript = nil - C.QWebEngineScript_new2(other.cPointer(), &outptr_QWebEngineScript) - ret := newQWebEngineScript(outptr_QWebEngineScript) + ret := newQWebEngineScript(C.QWebEngineScript_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webengine/gen_qwebenginescript.h b/qt/webengine/gen_qwebenginescript.h index bc7392b8..357d89e1 100644 --- a/qt/webengine/gen_qwebenginescript.h +++ b/qt/webengine/gen_qwebenginescript.h @@ -20,8 +20,8 @@ class QWebEngineScript; typedef struct QWebEngineScript QWebEngineScript; #endif -void QWebEngineScript_new(QWebEngineScript** outptr_QWebEngineScript); -void QWebEngineScript_new2(QWebEngineScript* other, QWebEngineScript** outptr_QWebEngineScript); +QWebEngineScript* QWebEngineScript_new(); +QWebEngineScript* QWebEngineScript_new2(QWebEngineScript* other); void QWebEngineScript_OperatorAssign(QWebEngineScript* self, QWebEngineScript* other); bool QWebEngineScript_IsNull(const QWebEngineScript* self); struct miqt_string QWebEngineScript_Name(const QWebEngineScript* self); diff --git a/qt/webengine/gen_qwebenginescriptcollection.go b/qt/webengine/gen_qwebenginescriptcollection.go index 3adb3085..3aba8da2 100644 --- a/qt/webengine/gen_qwebenginescriptcollection.go +++ b/qt/webengine/gen_qwebenginescriptcollection.go @@ -37,16 +37,13 @@ func newQWebEngineScriptCollection(h *C.QWebEngineScriptCollection) *QWebEngineS if h == nil { return nil } + return &QWebEngineScriptCollection{h: h} } // UnsafeNewQWebEngineScriptCollection constructs the type using only unsafe pointers. func UnsafeNewQWebEngineScriptCollection(h unsafe.Pointer) *QWebEngineScriptCollection { - if h == nil { - return nil - } - - return &QWebEngineScriptCollection{h: (*C.QWebEngineScriptCollection)(h)} + return newQWebEngineScriptCollection((*C.QWebEngineScriptCollection)(h)) } func (this *QWebEngineScriptCollection) IsEmpty() bool { diff --git a/qt/webengine/gen_qwebenginesettings.go b/qt/webengine/gen_qwebenginesettings.go index 1a79013a..ed4ebf17 100644 --- a/qt/webengine/gen_qwebenginesettings.go +++ b/qt/webengine/gen_qwebenginesettings.go @@ -101,16 +101,13 @@ func newQWebEngineSettings(h *C.QWebEngineSettings) *QWebEngineSettings { if h == nil { return nil } + return &QWebEngineSettings{h: h} } // UnsafeNewQWebEngineSettings constructs the type using only unsafe pointers. func UnsafeNewQWebEngineSettings(h unsafe.Pointer) *QWebEngineSettings { - if h == nil { - return nil - } - - return &QWebEngineSettings{h: (*C.QWebEngineSettings)(h)} + return newQWebEngineSettings((*C.QWebEngineSettings)(h)) } func QWebEngineSettings_GlobalSettings() *QWebEngineSettings { diff --git a/qt/webengine/gen_qwebengineurlrequestinfo.go b/qt/webengine/gen_qwebengineurlrequestinfo.go index 3baf731f..2040846d 100644 --- a/qt/webengine/gen_qwebengineurlrequestinfo.go +++ b/qt/webengine/gen_qwebengineurlrequestinfo.go @@ -76,16 +76,13 @@ func newQWebEngineUrlRequestInfo(h *C.QWebEngineUrlRequestInfo) *QWebEngineUrlRe if h == nil { return nil } + return &QWebEngineUrlRequestInfo{h: h} } // UnsafeNewQWebEngineUrlRequestInfo constructs the type using only unsafe pointers. func UnsafeNewQWebEngineUrlRequestInfo(h unsafe.Pointer) *QWebEngineUrlRequestInfo { - if h == nil { - return nil - } - - return &QWebEngineUrlRequestInfo{h: (*C.QWebEngineUrlRequestInfo)(h)} + return newQWebEngineUrlRequestInfo((*C.QWebEngineUrlRequestInfo)(h)) } func (this *QWebEngineUrlRequestInfo) ResourceType() QWebEngineUrlRequestInfo__ResourceType { diff --git a/qt/webengine/gen_qwebengineurlrequestinterceptor.cpp b/qt/webengine/gen_qwebengineurlrequestinterceptor.cpp index 4bc03d73..b5d6b722 100644 --- a/qt/webengine/gen_qwebengineurlrequestinterceptor.cpp +++ b/qt/webengine/gen_qwebengineurlrequestinterceptor.cpp @@ -212,16 +212,16 @@ public: }; -void QWebEngineUrlRequestInterceptor_new(QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject) { - MiqtVirtualQWebEngineUrlRequestInterceptor* ret = new MiqtVirtualQWebEngineUrlRequestInterceptor(); - *outptr_QWebEngineUrlRequestInterceptor = ret; - *outptr_QObject = static_cast(ret); +QWebEngineUrlRequestInterceptor* QWebEngineUrlRequestInterceptor_new() { + return new MiqtVirtualQWebEngineUrlRequestInterceptor(); } -void QWebEngineUrlRequestInterceptor_new2(QObject* p, QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject) { - MiqtVirtualQWebEngineUrlRequestInterceptor* ret = new MiqtVirtualQWebEngineUrlRequestInterceptor(p); - *outptr_QWebEngineUrlRequestInterceptor = ret; - *outptr_QObject = static_cast(ret); +QWebEngineUrlRequestInterceptor* QWebEngineUrlRequestInterceptor_new2(QObject* p) { + return new MiqtVirtualQWebEngineUrlRequestInterceptor(p); +} + +void QWebEngineUrlRequestInterceptor_virtbase(QWebEngineUrlRequestInterceptor* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QWebEngineUrlRequestInterceptor_MetaObject(const QWebEngineUrlRequestInterceptor* self) { diff --git a/qt/webengine/gen_qwebengineurlrequestinterceptor.go b/qt/webengine/gen_qwebengineurlrequestinterceptor.go index 05c42b37..71689dc4 100644 --- a/qt/webengine/gen_qwebengineurlrequestinterceptor.go +++ b/qt/webengine/gen_qwebengineurlrequestinterceptor.go @@ -36,42 +36,34 @@ func (this *QWebEngineUrlRequestInterceptor) UnsafePointer() unsafe.Pointer { } // newQWebEngineUrlRequestInterceptor constructs the type using only CGO pointers. -func newQWebEngineUrlRequestInterceptor(h *C.QWebEngineUrlRequestInterceptor, h_QObject *C.QObject) *QWebEngineUrlRequestInterceptor { +func newQWebEngineUrlRequestInterceptor(h *C.QWebEngineUrlRequestInterceptor) *QWebEngineUrlRequestInterceptor { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineUrlRequestInterceptor_virtbase(h, &outptr_QObject) + return &QWebEngineUrlRequestInterceptor{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineUrlRequestInterceptor constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineUrlRequestInterceptor(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineUrlRequestInterceptor { - if h == nil { - return nil - } - - return &QWebEngineUrlRequestInterceptor{h: (*C.QWebEngineUrlRequestInterceptor)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineUrlRequestInterceptor(h unsafe.Pointer) *QWebEngineUrlRequestInterceptor { + return newQWebEngineUrlRequestInterceptor((*C.QWebEngineUrlRequestInterceptor)(h)) } // NewQWebEngineUrlRequestInterceptor constructs a new QWebEngineUrlRequestInterceptor object. func NewQWebEngineUrlRequestInterceptor() *QWebEngineUrlRequestInterceptor { - var outptr_QWebEngineUrlRequestInterceptor *C.QWebEngineUrlRequestInterceptor = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineUrlRequestInterceptor_new(&outptr_QWebEngineUrlRequestInterceptor, &outptr_QObject) - ret := newQWebEngineUrlRequestInterceptor(outptr_QWebEngineUrlRequestInterceptor, outptr_QObject) + ret := newQWebEngineUrlRequestInterceptor(C.QWebEngineUrlRequestInterceptor_new()) ret.isSubclass = true return ret } // NewQWebEngineUrlRequestInterceptor2 constructs a new QWebEngineUrlRequestInterceptor object. func NewQWebEngineUrlRequestInterceptor2(p *qt.QObject) *QWebEngineUrlRequestInterceptor { - var outptr_QWebEngineUrlRequestInterceptor *C.QWebEngineUrlRequestInterceptor = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineUrlRequestInterceptor_new2((*C.QObject)(p.UnsafePointer()), &outptr_QWebEngineUrlRequestInterceptor, &outptr_QObject) - ret := newQWebEngineUrlRequestInterceptor(outptr_QWebEngineUrlRequestInterceptor, outptr_QObject) + ret := newQWebEngineUrlRequestInterceptor(C.QWebEngineUrlRequestInterceptor_new2((*C.QObject)(p.UnsafePointer()))) ret.isSubclass = true return ret } @@ -250,7 +242,7 @@ func miqt_exec_callback_QWebEngineUrlRequestInterceptor_TimerEvent(self *C.QWebE } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -276,7 +268,7 @@ func miqt_exec_callback_QWebEngineUrlRequestInterceptor_ChildEvent(self *C.QWebE } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/webengine/gen_qwebengineurlrequestinterceptor.h b/qt/webengine/gen_qwebengineurlrequestinterceptor.h index fa45911a..62257d7b 100644 --- a/qt/webengine/gen_qwebengineurlrequestinterceptor.h +++ b/qt/webengine/gen_qwebengineurlrequestinterceptor.h @@ -34,8 +34,9 @@ typedef struct QWebEngineUrlRequestInfo QWebEngineUrlRequestInfo; typedef struct QWebEngineUrlRequestInterceptor QWebEngineUrlRequestInterceptor; #endif -void QWebEngineUrlRequestInterceptor_new(QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject); -void QWebEngineUrlRequestInterceptor_new2(QObject* p, QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject); +QWebEngineUrlRequestInterceptor* QWebEngineUrlRequestInterceptor_new(); +QWebEngineUrlRequestInterceptor* QWebEngineUrlRequestInterceptor_new2(QObject* p); +void QWebEngineUrlRequestInterceptor_virtbase(QWebEngineUrlRequestInterceptor* src, QObject** outptr_QObject); QMetaObject* QWebEngineUrlRequestInterceptor_MetaObject(const QWebEngineUrlRequestInterceptor* self); void* QWebEngineUrlRequestInterceptor_Metacast(QWebEngineUrlRequestInterceptor* self, const char* param1); struct miqt_string QWebEngineUrlRequestInterceptor_Tr(const char* s); diff --git a/qt/webengine/gen_qwebengineurlrequestjob.cpp b/qt/webengine/gen_qwebengineurlrequestjob.cpp index e0bce682..c21ba2fe 100644 --- a/qt/webengine/gen_qwebengineurlrequestjob.cpp +++ b/qt/webengine/gen_qwebengineurlrequestjob.cpp @@ -11,6 +11,10 @@ #include "gen_qwebengineurlrequestjob.h" #include "_cgo_export.h" +void QWebEngineUrlRequestJob_virtbase(QWebEngineUrlRequestJob* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebEngineUrlRequestJob_MetaObject(const QWebEngineUrlRequestJob* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/webengine/gen_qwebengineurlrequestjob.go b/qt/webengine/gen_qwebengineurlrequestjob.go index 70c329c5..c573be2f 100644 --- a/qt/webengine/gen_qwebengineurlrequestjob.go +++ b/qt/webengine/gen_qwebengineurlrequestjob.go @@ -46,22 +46,20 @@ func (this *QWebEngineUrlRequestJob) UnsafePointer() unsafe.Pointer { } // newQWebEngineUrlRequestJob constructs the type using only CGO pointers. -func newQWebEngineUrlRequestJob(h *C.QWebEngineUrlRequestJob, h_QObject *C.QObject) *QWebEngineUrlRequestJob { +func newQWebEngineUrlRequestJob(h *C.QWebEngineUrlRequestJob) *QWebEngineUrlRequestJob { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineUrlRequestJob_virtbase(h, &outptr_QObject) + return &QWebEngineUrlRequestJob{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineUrlRequestJob constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineUrlRequestJob(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineUrlRequestJob { - if h == nil { - return nil - } - - return &QWebEngineUrlRequestJob{h: (*C.QWebEngineUrlRequestJob)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineUrlRequestJob(h unsafe.Pointer) *QWebEngineUrlRequestJob { + return newQWebEngineUrlRequestJob((*C.QWebEngineUrlRequestJob)(h)) } func (this *QWebEngineUrlRequestJob) MetaObject() *qt.QMetaObject { diff --git a/qt/webengine/gen_qwebengineurlrequestjob.h b/qt/webengine/gen_qwebengineurlrequestjob.h index 8109f9f6..1a4bb53b 100644 --- a/qt/webengine/gen_qwebengineurlrequestjob.h +++ b/qt/webengine/gen_qwebengineurlrequestjob.h @@ -28,6 +28,7 @@ typedef struct QUrl QUrl; typedef struct QWebEngineUrlRequestJob QWebEngineUrlRequestJob; #endif +void QWebEngineUrlRequestJob_virtbase(QWebEngineUrlRequestJob* src, QObject** outptr_QObject); QMetaObject* QWebEngineUrlRequestJob_MetaObject(const QWebEngineUrlRequestJob* self); void* QWebEngineUrlRequestJob_Metacast(QWebEngineUrlRequestJob* self, const char* param1); struct miqt_string QWebEngineUrlRequestJob_Tr(const char* s); diff --git a/qt/webengine/gen_qwebengineurlscheme.cpp b/qt/webengine/gen_qwebengineurlscheme.cpp index 1d5852d8..77ffefe2 100644 --- a/qt/webengine/gen_qwebengineurlscheme.cpp +++ b/qt/webengine/gen_qwebengineurlscheme.cpp @@ -4,20 +4,17 @@ #include "gen_qwebengineurlscheme.h" #include "_cgo_export.h" -void QWebEngineUrlScheme_new(QWebEngineUrlScheme** outptr_QWebEngineUrlScheme) { - QWebEngineUrlScheme* ret = new QWebEngineUrlScheme(); - *outptr_QWebEngineUrlScheme = ret; +QWebEngineUrlScheme* QWebEngineUrlScheme_new() { + return new QWebEngineUrlScheme(); } -void QWebEngineUrlScheme_new2(struct miqt_string name, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme) { +QWebEngineUrlScheme* QWebEngineUrlScheme_new2(struct miqt_string name) { QByteArray name_QByteArray(name.data, name.len); - QWebEngineUrlScheme* ret = new QWebEngineUrlScheme(name_QByteArray); - *outptr_QWebEngineUrlScheme = ret; + return new QWebEngineUrlScheme(name_QByteArray); } -void QWebEngineUrlScheme_new3(QWebEngineUrlScheme* that, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme) { - QWebEngineUrlScheme* ret = new QWebEngineUrlScheme(*that); - *outptr_QWebEngineUrlScheme = ret; +QWebEngineUrlScheme* QWebEngineUrlScheme_new3(QWebEngineUrlScheme* that) { + return new QWebEngineUrlScheme(*that); } void QWebEngineUrlScheme_OperatorAssign(QWebEngineUrlScheme* self, QWebEngineUrlScheme* that) { diff --git a/qt/webengine/gen_qwebengineurlscheme.go b/qt/webengine/gen_qwebengineurlscheme.go index 9634a586..dd3330c6 100644 --- a/qt/webengine/gen_qwebengineurlscheme.go +++ b/qt/webengine/gen_qwebengineurlscheme.go @@ -65,24 +65,19 @@ func newQWebEngineUrlScheme(h *C.QWebEngineUrlScheme) *QWebEngineUrlScheme { if h == nil { return nil } + return &QWebEngineUrlScheme{h: h} } // UnsafeNewQWebEngineUrlScheme constructs the type using only unsafe pointers. func UnsafeNewQWebEngineUrlScheme(h unsafe.Pointer) *QWebEngineUrlScheme { - if h == nil { - return nil - } - - return &QWebEngineUrlScheme{h: (*C.QWebEngineUrlScheme)(h)} + return newQWebEngineUrlScheme((*C.QWebEngineUrlScheme)(h)) } // NewQWebEngineUrlScheme constructs a new QWebEngineUrlScheme object. func NewQWebEngineUrlScheme() *QWebEngineUrlScheme { - var outptr_QWebEngineUrlScheme *C.QWebEngineUrlScheme = nil - C.QWebEngineUrlScheme_new(&outptr_QWebEngineUrlScheme) - ret := newQWebEngineUrlScheme(outptr_QWebEngineUrlScheme) + ret := newQWebEngineUrlScheme(C.QWebEngineUrlScheme_new()) ret.isSubclass = true return ret } @@ -92,20 +87,16 @@ func NewQWebEngineUrlScheme2(name []byte) *QWebEngineUrlScheme { name_alias := C.struct_miqt_string{} name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) name_alias.len = C.size_t(len(name)) - var outptr_QWebEngineUrlScheme *C.QWebEngineUrlScheme = nil - C.QWebEngineUrlScheme_new2(name_alias, &outptr_QWebEngineUrlScheme) - ret := newQWebEngineUrlScheme(outptr_QWebEngineUrlScheme) + ret := newQWebEngineUrlScheme(C.QWebEngineUrlScheme_new2(name_alias)) ret.isSubclass = true return ret } // NewQWebEngineUrlScheme3 constructs a new QWebEngineUrlScheme object. func NewQWebEngineUrlScheme3(that *QWebEngineUrlScheme) *QWebEngineUrlScheme { - var outptr_QWebEngineUrlScheme *C.QWebEngineUrlScheme = nil - C.QWebEngineUrlScheme_new3(that.cPointer(), &outptr_QWebEngineUrlScheme) - ret := newQWebEngineUrlScheme(outptr_QWebEngineUrlScheme) + ret := newQWebEngineUrlScheme(C.QWebEngineUrlScheme_new3(that.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webengine/gen_qwebengineurlscheme.h b/qt/webengine/gen_qwebengineurlscheme.h index f391b199..c40b7727 100644 --- a/qt/webengine/gen_qwebengineurlscheme.h +++ b/qt/webengine/gen_qwebengineurlscheme.h @@ -20,9 +20,9 @@ class QWebEngineUrlScheme; typedef struct QWebEngineUrlScheme QWebEngineUrlScheme; #endif -void QWebEngineUrlScheme_new(QWebEngineUrlScheme** outptr_QWebEngineUrlScheme); -void QWebEngineUrlScheme_new2(struct miqt_string name, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme); -void QWebEngineUrlScheme_new3(QWebEngineUrlScheme* that, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme); +QWebEngineUrlScheme* QWebEngineUrlScheme_new(); +QWebEngineUrlScheme* QWebEngineUrlScheme_new2(struct miqt_string name); +QWebEngineUrlScheme* QWebEngineUrlScheme_new3(QWebEngineUrlScheme* that); void QWebEngineUrlScheme_OperatorAssign(QWebEngineUrlScheme* self, QWebEngineUrlScheme* that); bool QWebEngineUrlScheme_OperatorEqual(const QWebEngineUrlScheme* self, QWebEngineUrlScheme* that); bool QWebEngineUrlScheme_OperatorNotEqual(const QWebEngineUrlScheme* self, QWebEngineUrlScheme* that); diff --git a/qt/webengine/gen_qwebengineurlschemehandler.cpp b/qt/webengine/gen_qwebengineurlschemehandler.cpp index 7182bfda..034eed85 100644 --- a/qt/webengine/gen_qwebengineurlschemehandler.cpp +++ b/qt/webengine/gen_qwebengineurlschemehandler.cpp @@ -210,16 +210,16 @@ public: }; -void QWebEngineUrlSchemeHandler_new(QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject) { - MiqtVirtualQWebEngineUrlSchemeHandler* ret = new MiqtVirtualQWebEngineUrlSchemeHandler(); - *outptr_QWebEngineUrlSchemeHandler = ret; - *outptr_QObject = static_cast(ret); +QWebEngineUrlSchemeHandler* QWebEngineUrlSchemeHandler_new() { + return new MiqtVirtualQWebEngineUrlSchemeHandler(); } -void QWebEngineUrlSchemeHandler_new2(QObject* parent, QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject) { - MiqtVirtualQWebEngineUrlSchemeHandler* ret = new MiqtVirtualQWebEngineUrlSchemeHandler(parent); - *outptr_QWebEngineUrlSchemeHandler = ret; - *outptr_QObject = static_cast(ret); +QWebEngineUrlSchemeHandler* QWebEngineUrlSchemeHandler_new2(QObject* parent) { + return new MiqtVirtualQWebEngineUrlSchemeHandler(parent); +} + +void QWebEngineUrlSchemeHandler_virtbase(QWebEngineUrlSchemeHandler* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QWebEngineUrlSchemeHandler_MetaObject(const QWebEngineUrlSchemeHandler* self) { diff --git a/qt/webengine/gen_qwebengineurlschemehandler.go b/qt/webengine/gen_qwebengineurlschemehandler.go index 3e668cce..7d0a7191 100644 --- a/qt/webengine/gen_qwebengineurlschemehandler.go +++ b/qt/webengine/gen_qwebengineurlschemehandler.go @@ -36,42 +36,34 @@ func (this *QWebEngineUrlSchemeHandler) UnsafePointer() unsafe.Pointer { } // newQWebEngineUrlSchemeHandler constructs the type using only CGO pointers. -func newQWebEngineUrlSchemeHandler(h *C.QWebEngineUrlSchemeHandler, h_QObject *C.QObject) *QWebEngineUrlSchemeHandler { +func newQWebEngineUrlSchemeHandler(h *C.QWebEngineUrlSchemeHandler) *QWebEngineUrlSchemeHandler { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineUrlSchemeHandler_virtbase(h, &outptr_QObject) + return &QWebEngineUrlSchemeHandler{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineUrlSchemeHandler constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineUrlSchemeHandler(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineUrlSchemeHandler { - if h == nil { - return nil - } - - return &QWebEngineUrlSchemeHandler{h: (*C.QWebEngineUrlSchemeHandler)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineUrlSchemeHandler(h unsafe.Pointer) *QWebEngineUrlSchemeHandler { + return newQWebEngineUrlSchemeHandler((*C.QWebEngineUrlSchemeHandler)(h)) } // NewQWebEngineUrlSchemeHandler constructs a new QWebEngineUrlSchemeHandler object. func NewQWebEngineUrlSchemeHandler() *QWebEngineUrlSchemeHandler { - var outptr_QWebEngineUrlSchemeHandler *C.QWebEngineUrlSchemeHandler = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineUrlSchemeHandler_new(&outptr_QWebEngineUrlSchemeHandler, &outptr_QObject) - ret := newQWebEngineUrlSchemeHandler(outptr_QWebEngineUrlSchemeHandler, outptr_QObject) + ret := newQWebEngineUrlSchemeHandler(C.QWebEngineUrlSchemeHandler_new()) ret.isSubclass = true return ret } // NewQWebEngineUrlSchemeHandler2 constructs a new QWebEngineUrlSchemeHandler object. func NewQWebEngineUrlSchemeHandler2(parent *qt.QObject) *QWebEngineUrlSchemeHandler { - var outptr_QWebEngineUrlSchemeHandler *C.QWebEngineUrlSchemeHandler = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineUrlSchemeHandler_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebEngineUrlSchemeHandler, &outptr_QObject) - ret := newQWebEngineUrlSchemeHandler(outptr_QWebEngineUrlSchemeHandler, outptr_QObject) + ret := newQWebEngineUrlSchemeHandler(C.QWebEngineUrlSchemeHandler_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -166,7 +158,7 @@ func miqt_exec_callback_QWebEngineUrlSchemeHandler_RequestStarted(self *C.QWebEn } // Convert all CABI parameters to Go parameters - slotval1 := newQWebEngineUrlRequestJob(param1, nil) + slotval1 := newQWebEngineUrlRequestJob(param1) gofunc(slotval1) @@ -250,7 +242,7 @@ func miqt_exec_callback_QWebEngineUrlSchemeHandler_TimerEvent(self *C.QWebEngine } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -276,7 +268,7 @@ func miqt_exec_callback_QWebEngineUrlSchemeHandler_ChildEvent(self *C.QWebEngine } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/webengine/gen_qwebengineurlschemehandler.h b/qt/webengine/gen_qwebengineurlschemehandler.h index 1a815bf9..4fcae1e0 100644 --- a/qt/webengine/gen_qwebengineurlschemehandler.h +++ b/qt/webengine/gen_qwebengineurlschemehandler.h @@ -34,8 +34,9 @@ typedef struct QWebEngineUrlRequestJob QWebEngineUrlRequestJob; typedef struct QWebEngineUrlSchemeHandler QWebEngineUrlSchemeHandler; #endif -void QWebEngineUrlSchemeHandler_new(QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject); -void QWebEngineUrlSchemeHandler_new2(QObject* parent, QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject); +QWebEngineUrlSchemeHandler* QWebEngineUrlSchemeHandler_new(); +QWebEngineUrlSchemeHandler* QWebEngineUrlSchemeHandler_new2(QObject* parent); +void QWebEngineUrlSchemeHandler_virtbase(QWebEngineUrlSchemeHandler* src, QObject** outptr_QObject); QMetaObject* QWebEngineUrlSchemeHandler_MetaObject(const QWebEngineUrlSchemeHandler* self); void* QWebEngineUrlSchemeHandler_Metacast(QWebEngineUrlSchemeHandler* self, const char* param1); struct miqt_string QWebEngineUrlSchemeHandler_Tr(const char* s); diff --git a/qt/webengine/gen_qwebengineview.cpp b/qt/webengine/gen_qwebengineview.cpp index 93d73445..2d239d35 100644 --- a/qt/webengine/gen_qwebengineview.cpp +++ b/qt/webengine/gen_qwebengineview.cpp @@ -1051,20 +1051,16 @@ public: }; -void QWebEngineView_new(QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(parent); - *outptr_QWebEngineView = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWebEngineView* QWebEngineView_new(QWidget* parent) { + return new MiqtVirtualQWebEngineView(parent); } -void QWebEngineView_new2(QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(); - *outptr_QWebEngineView = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWebEngineView* QWebEngineView_new2() { + return new MiqtVirtualQWebEngineView(); +} + +void QWebEngineView_virtbase(QWebEngineView* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QWebEngineView_MetaObject(const QWebEngineView* self) { diff --git a/qt/webengine/gen_qwebengineview.go b/qt/webengine/gen_qwebengineview.go index 422a1e68..ae5e5fa4 100644 --- a/qt/webengine/gen_qwebengineview.go +++ b/qt/webengine/gen_qwebengineview.go @@ -36,46 +36,34 @@ func (this *QWebEngineView) UnsafePointer() unsafe.Pointer { } // newQWebEngineView constructs the type using only CGO pointers. -func newQWebEngineView(h *C.QWebEngineView, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWebEngineView { +func newQWebEngineView(h *C.QWebEngineView) *QWebEngineView { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QWebEngineView_virtbase(h, &outptr_QWidget) + return &QWebEngineView{h: h, - QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(outptr_QWidget))} } // UnsafeNewQWebEngineView constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineView(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWebEngineView { - if h == nil { - return nil - } - - return &QWebEngineView{h: (*C.QWebEngineView)(h), - QWidget: qt.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQWebEngineView(h unsafe.Pointer) *QWebEngineView { + return newQWebEngineView((*C.QWebEngineView)(h)) } // NewQWebEngineView constructs a new QWebEngineView object. func NewQWebEngineView(parent *qt.QWidget) *QWebEngineView { - var outptr_QWebEngineView *C.QWebEngineView = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWebEngineView_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWebEngineView(C.QWebEngineView_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQWebEngineView2 constructs a new QWebEngineView object. func NewQWebEngineView2() *QWebEngineView { - var outptr_QWebEngineView *C.QWebEngineView = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWebEngineView_new2(&outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWebEngineView(C.QWebEngineView_new2()) ret.isSubclass = true return ret } @@ -109,7 +97,7 @@ func QWebEngineView_TrUtf8(s string) string { } func (this *QWebEngineView) Page() *QWebEnginePage { - return newQWebEnginePage(C.QWebEngineView_Page(this.h), nil) + return newQWebEnginePage(C.QWebEngineView_Page(this.h)) } func (this *QWebEngineView) SetPage(page *QWebEnginePage) { @@ -184,7 +172,7 @@ func (this *QWebEngineView) SelectedText() string { } func (this *QWebEngineView) PageAction(action QWebEnginePage__WebAction) *qt.QAction { - return qt.UnsafeNewQAction(unsafe.Pointer(C.QWebEngineView_PageAction(this.h, (C.int)(action))), nil) + return qt.UnsafeNewQAction(unsafe.Pointer(C.QWebEngineView_PageAction(this.h, (C.int)(action)))) } func (this *QWebEngineView) TriggerPageAction(action QWebEnginePage__WebAction) { @@ -531,7 +519,7 @@ func miqt_exec_callback_QWebEngineView_SizeHint(self *C.QWebEngineView, cb C.int func (this *QWebEngineView) callVirtualBase_CreateWindow(typeVal QWebEnginePage__WebWindowType) *QWebEngineView { - return newQWebEngineView(C.QWebEngineView_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal)), nil, nil, nil) + return newQWebEngineView(C.QWebEngineView_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal))) } func (this *QWebEngineView) OnCreateWindow(slot func(super func(typeVal QWebEnginePage__WebWindowType) *QWebEngineView, typeVal QWebEnginePage__WebWindowType) *QWebEngineView) { @@ -577,7 +565,7 @@ func miqt_exec_callback_QWebEngineView_ContextMenuEvent(self *C.QWebEngineView, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1)) gofunc((&QWebEngineView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -631,7 +619,7 @@ func miqt_exec_callback_QWebEngineView_ShowEvent(self *C.QWebEngineView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(param1)) gofunc((&QWebEngineView{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -657,7 +645,7 @@ func miqt_exec_callback_QWebEngineView_HideEvent(self *C.QWebEngineView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(param1)) gofunc((&QWebEngineView{h: self}).callVirtualBase_HideEvent, slotval1) @@ -683,7 +671,7 @@ func miqt_exec_callback_QWebEngineView_CloseEvent(self *C.QWebEngineView, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(param1)) gofunc((&QWebEngineView{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -709,7 +697,7 @@ func miqt_exec_callback_QWebEngineView_DragEnterEvent(self *C.QWebEngineView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(e)) gofunc((&QWebEngineView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -735,7 +723,7 @@ func miqt_exec_callback_QWebEngineView_DragLeaveEvent(self *C.QWebEngineView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e)) gofunc((&QWebEngineView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -761,7 +749,7 @@ func miqt_exec_callback_QWebEngineView_DragMoveEvent(self *C.QWebEngineView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(e)) gofunc((&QWebEngineView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -787,7 +775,7 @@ func miqt_exec_callback_QWebEngineView_DropEvent(self *C.QWebEngineView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(e)) gofunc((&QWebEngineView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -969,7 +957,7 @@ func miqt_exec_callback_QWebEngineView_MousePressEvent(self *C.QWebEngineView, c } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -995,7 +983,7 @@ func miqt_exec_callback_QWebEngineView_MouseReleaseEvent(self *C.QWebEngineView, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1021,7 +1009,7 @@ func miqt_exec_callback_QWebEngineView_MouseDoubleClickEvent(self *C.QWebEngineV } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1047,7 +1035,7 @@ func miqt_exec_callback_QWebEngineView_MouseMoveEvent(self *C.QWebEngineView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1073,7 +1061,7 @@ func miqt_exec_callback_QWebEngineView_WheelEvent(self *C.QWebEngineView, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1099,7 +1087,7 @@ func miqt_exec_callback_QWebEngineView_KeyPressEvent(self *C.QWebEngineView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1125,7 +1113,7 @@ func miqt_exec_callback_QWebEngineView_KeyReleaseEvent(self *C.QWebEngineView, c } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1151,7 +1139,7 @@ func miqt_exec_callback_QWebEngineView_FocusInEvent(self *C.QWebEngineView, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1177,7 +1165,7 @@ func miqt_exec_callback_QWebEngineView_FocusOutEvent(self *C.QWebEngineView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1255,7 +1243,7 @@ func miqt_exec_callback_QWebEngineView_PaintEvent(self *C.QWebEngineView, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1281,7 +1269,7 @@ func miqt_exec_callback_QWebEngineView_MoveEvent(self *C.QWebEngineView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1307,7 +1295,7 @@ func miqt_exec_callback_QWebEngineView_ResizeEvent(self *C.QWebEngineView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1333,7 +1321,7 @@ func miqt_exec_callback_QWebEngineView_TabletEvent(self *C.QWebEngineView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1359,7 +1347,7 @@ func miqt_exec_callback_QWebEngineView_ActionEvent(self *C.QWebEngineView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1555,7 +1543,7 @@ func miqt_exec_callback_QWebEngineView_InputMethodEvent(self *C.QWebEngineView, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1)) gofunc((&QWebEngineView{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/webengine/gen_qwebengineview.h b/qt/webengine/gen_qwebengineview.h index 082e785e..58c6ab14 100644 --- a/qt/webengine/gen_qwebengineview.h +++ b/qt/webengine/gen_qwebengineview.h @@ -90,8 +90,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QWebEngineView_new(QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWebEngineView_new2(QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QWebEngineView* QWebEngineView_new(QWidget* parent); +QWebEngineView* QWebEngineView_new2(); +void QWebEngineView_virtbase(QWebEngineView* src, QWidget** outptr_QWidget); QMetaObject* QWebEngineView_MetaObject(const QWebEngineView* self); void* QWebEngineView_Metacast(QWebEngineView* self, const char* param1); struct miqt_string QWebEngineView_Tr(const char* s); diff --git a/qt/webkit/gen_qgraphicswebview.cpp b/qt/webkit/gen_qgraphicswebview.cpp index 963937ad..312f660d 100644 --- a/qt/webkit/gen_qgraphicswebview.cpp +++ b/qt/webkit/gen_qgraphicswebview.cpp @@ -1176,24 +1176,16 @@ public: }; -void QGraphicsWebView_new(QGraphicsWebView** outptr_QGraphicsWebView, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsWebView* ret = new MiqtVirtualQGraphicsWebView(); - *outptr_QGraphicsWebView = ret; - *outptr_QGraphicsWidget = static_cast(ret); - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsWebView* QGraphicsWebView_new() { + return new MiqtVirtualQGraphicsWebView(); } -void QGraphicsWebView_new2(QGraphicsItem* parent, QGraphicsWebView** outptr_QGraphicsWebView, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsWebView* ret = new MiqtVirtualQGraphicsWebView(parent); - *outptr_QGraphicsWebView = ret; - *outptr_QGraphicsWidget = static_cast(ret); - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsWebView* QGraphicsWebView_new2(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsWebView(parent); +} + +void QGraphicsWebView_virtbase(QGraphicsWebView* src, QGraphicsWidget** outptr_QGraphicsWidget) { + *outptr_QGraphicsWidget = static_cast(src); } QMetaObject* QGraphicsWebView_MetaObject(const QGraphicsWebView* self) { diff --git a/qt/webkit/gen_qgraphicswebview.go b/qt/webkit/gen_qgraphicswebview.go index 8a01e7f1..bd83b304 100644 --- a/qt/webkit/gen_qgraphicswebview.go +++ b/qt/webkit/gen_qgraphicswebview.go @@ -37,50 +37,34 @@ func (this *QGraphicsWebView) UnsafePointer() unsafe.Pointer { } // newQGraphicsWebView constructs the type using only CGO pointers. -func newQGraphicsWebView(h *C.QGraphicsWebView, h_QGraphicsWidget *C.QGraphicsWidget, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsWebView { +func newQGraphicsWebView(h *C.QGraphicsWebView) *QGraphicsWebView { if h == nil { return nil } + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + C.QGraphicsWebView_virtbase(h, &outptr_QGraphicsWidget) + return &QGraphicsWebView{h: h, - QGraphicsWidget: qt.UnsafeNewQGraphicsWidget(unsafe.Pointer(h_QGraphicsWidget), unsafe.Pointer(h_QGraphicsObject), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QGraphicsItem), unsafe.Pointer(h_QGraphicsLayoutItem))} + QGraphicsWidget: qt.UnsafeNewQGraphicsWidget(unsafe.Pointer(outptr_QGraphicsWidget))} } // UnsafeNewQGraphicsWebView constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsWebView(h unsafe.Pointer, h_QGraphicsWidget unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsWebView { - if h == nil { - return nil - } - - return &QGraphicsWebView{h: (*C.QGraphicsWebView)(h), - QGraphicsWidget: qt.UnsafeNewQGraphicsWidget(h_QGraphicsWidget, h_QGraphicsObject, h_QObject, h_QGraphicsItem, h_QGraphicsLayoutItem)} +func UnsafeNewQGraphicsWebView(h unsafe.Pointer) *QGraphicsWebView { + return newQGraphicsWebView((*C.QGraphicsWebView)(h)) } // NewQGraphicsWebView constructs a new QGraphicsWebView object. func NewQGraphicsWebView() *QGraphicsWebView { - var outptr_QGraphicsWebView *C.QGraphicsWebView = nil - var outptr_QGraphicsWidget *C.QGraphicsWidget = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsWebView_new(&outptr_QGraphicsWebView, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsWebView(outptr_QGraphicsWebView, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret := newQGraphicsWebView(C.QGraphicsWebView_new()) ret.isSubclass = true return ret } // NewQGraphicsWebView2 constructs a new QGraphicsWebView object. func NewQGraphicsWebView2(parent *qt.QGraphicsItem) *QGraphicsWebView { - var outptr_QGraphicsWebView *C.QGraphicsWebView = nil - var outptr_QGraphicsWidget *C.QGraphicsWidget = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsWebView_new2((*C.QGraphicsItem)(parent.UnsafePointer()), &outptr_QGraphicsWebView, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsWebView(outptr_QGraphicsWebView, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret := newQGraphicsWebView(C.QGraphicsWebView_new2((*C.QGraphicsItem)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -114,7 +98,7 @@ func QGraphicsWebView_TrUtf8(s string) string { } func (this *QGraphicsWebView) Page() *QWebPage { - return newQWebPage(C.QGraphicsWebView_Page(this.h), nil) + return newQWebPage(C.QGraphicsWebView_Page(this.h)) } func (this *QGraphicsWebView) SetPage(page *QWebPage) { @@ -188,7 +172,7 @@ func (this *QGraphicsWebView) Settings() *QWebSettings { } func (this *QGraphicsWebView) PageAction(action QWebPage__WebAction) *qt.QAction { - return qt.UnsafeNewQAction(unsafe.Pointer(C.QGraphicsWebView_PageAction(this.h, (C.int)(action))), nil) + return qt.UnsafeNewQAction(unsafe.Pointer(C.QGraphicsWebView_PageAction(this.h, (C.int)(action)))) } func (this *QGraphicsWebView) TriggerPageAction(action QWebPage__WebAction) { @@ -621,9 +605,9 @@ func miqt_exec_callback_QGraphicsWebView_Paint(self *C.QGraphicsWebView, cb C.in // Convert all CABI parameters to Go parameters slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(param1)) - slotval2 := qt.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(options), nil) + slotval2 := qt.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(options)) - slotval3 := qt.UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + slotval3 := qt.UnsafeNewQWidget(unsafe.Pointer(widget)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -771,7 +755,7 @@ func miqt_exec_callback_QGraphicsWebView_MousePressEvent(self *C.QGraphicsWebVie } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -797,7 +781,7 @@ func miqt_exec_callback_QGraphicsWebView_MouseDoubleClickEvent(self *C.QGraphics } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -823,7 +807,7 @@ func miqt_exec_callback_QGraphicsWebView_MouseReleaseEvent(self *C.QGraphicsWebV } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -849,7 +833,7 @@ func miqt_exec_callback_QGraphicsWebView_MouseMoveEvent(self *C.QGraphicsWebView } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQGraphicsSceneMouseEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -875,7 +859,7 @@ func miqt_exec_callback_QGraphicsWebView_HoverMoveEvent(self *C.QGraphicsWebView } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -901,7 +885,7 @@ func miqt_exec_callback_QGraphicsWebView_HoverLeaveEvent(self *C.QGraphicsWebVie } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQGraphicsSceneHoverEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -927,7 +911,7 @@ func miqt_exec_callback_QGraphicsWebView_WheelEvent(self *C.QGraphicsWebView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQGraphicsSceneWheelEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQGraphicsSceneWheelEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -953,7 +937,7 @@ func miqt_exec_callback_QGraphicsWebView_KeyPressEvent(self *C.QGraphicsWebView, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -979,7 +963,7 @@ func miqt_exec_callback_QGraphicsWebView_KeyReleaseEvent(self *C.QGraphicsWebVie } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1005,7 +989,7 @@ func miqt_exec_callback_QGraphicsWebView_ContextMenuEvent(self *C.QGraphicsWebVi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQGraphicsSceneContextMenuEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQGraphicsSceneContextMenuEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1031,7 +1015,7 @@ func miqt_exec_callback_QGraphicsWebView_DragEnterEvent(self *C.QGraphicsWebView } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1057,7 +1041,7 @@ func miqt_exec_callback_QGraphicsWebView_DragLeaveEvent(self *C.QGraphicsWebView } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1083,7 +1067,7 @@ func miqt_exec_callback_QGraphicsWebView_DragMoveEvent(self *C.QGraphicsWebView, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1109,7 +1093,7 @@ func miqt_exec_callback_QGraphicsWebView_DropEvent(self *C.QGraphicsWebView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQGraphicsSceneDragDropEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1135,7 +1119,7 @@ func miqt_exec_callback_QGraphicsWebView_FocusInEvent(self *C.QGraphicsWebView, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1161,7 +1145,7 @@ func miqt_exec_callback_QGraphicsWebView_FocusOutEvent(self *C.QGraphicsWebView, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1187,7 +1171,7 @@ func miqt_exec_callback_QGraphicsWebView_InputMethodEvent(self *C.QGraphicsWebVi } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -1328,9 +1312,9 @@ func miqt_exec_callback_QGraphicsWebView_PaintWindowFrame(self *C.QGraphicsWebVi // Convert all CABI parameters to Go parameters slotval1 := qt.UnsafeNewQPainter(unsafe.Pointer(painter)) - slotval2 := qt.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval2 := qt.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option)) - slotval3 := qt.UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + slotval3 := qt.UnsafeNewQWidget(unsafe.Pointer(widget)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_PaintWindowFrame, slotval1, slotval2, slotval3) @@ -1556,7 +1540,7 @@ func miqt_exec_callback_QGraphicsWebView_CloseEvent(self *C.QGraphicsWebView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1582,7 +1566,7 @@ func miqt_exec_callback_QGraphicsWebView_HideEvent(self *C.QGraphicsWebView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1608,7 +1592,7 @@ func miqt_exec_callback_QGraphicsWebView_MoveEvent(self *C.QGraphicsWebView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQGraphicsSceneMoveEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQGraphicsSceneMoveEvent(unsafe.Pointer(event)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1657,7 +1641,7 @@ func miqt_exec_callback_QGraphicsWebView_ResizeEvent(self *C.QGraphicsWebView, c } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQGraphicsSceneResizeEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQGraphicsSceneResizeEvent(unsafe.Pointer(event)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1683,7 +1667,7 @@ func miqt_exec_callback_QGraphicsWebView_ShowEvent(self *C.QGraphicsWebView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event)) gofunc((&QGraphicsWebView{h: self}).callVirtualBase_ShowEvent, slotval1) diff --git a/qt/webkit/gen_qgraphicswebview.h b/qt/webkit/gen_qgraphicswebview.h index 4857f94d..d12ecbe1 100644 --- a/qt/webkit/gen_qgraphicswebview.h +++ b/qt/webkit/gen_qgraphicswebview.h @@ -92,8 +92,9 @@ typedef struct QWebSettings QWebSettings; typedef struct QWidget QWidget; #endif -void QGraphicsWebView_new(QGraphicsWebView** outptr_QGraphicsWebView, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsWebView_new2(QGraphicsItem* parent, QGraphicsWebView** outptr_QGraphicsWebView, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QGraphicsWebView* QGraphicsWebView_new(); +QGraphicsWebView* QGraphicsWebView_new2(QGraphicsItem* parent); +void QGraphicsWebView_virtbase(QGraphicsWebView* src, QGraphicsWidget** outptr_QGraphicsWidget); QMetaObject* QGraphicsWebView_MetaObject(const QGraphicsWebView* self); void* QGraphicsWebView_Metacast(QGraphicsWebView* self, const char* param1); struct miqt_string QGraphicsWebView_Tr(const char* s); diff --git a/qt/webkit/gen_qwebdatabase.cpp b/qt/webkit/gen_qwebdatabase.cpp index eb0e70c0..5ca1ccdd 100644 --- a/qt/webkit/gen_qwebdatabase.cpp +++ b/qt/webkit/gen_qwebdatabase.cpp @@ -7,9 +7,8 @@ #include "gen_qwebdatabase.h" #include "_cgo_export.h" -void QWebDatabase_new(QWebDatabase* other, QWebDatabase** outptr_QWebDatabase) { - QWebDatabase* ret = new QWebDatabase(*other); - *outptr_QWebDatabase = ret; +QWebDatabase* QWebDatabase_new(QWebDatabase* other) { + return new QWebDatabase(*other); } void QWebDatabase_OperatorAssign(QWebDatabase* self, QWebDatabase* other) { diff --git a/qt/webkit/gen_qwebdatabase.go b/qt/webkit/gen_qwebdatabase.go index 74a388ca..08e381f8 100644 --- a/qt/webkit/gen_qwebdatabase.go +++ b/qt/webkit/gen_qwebdatabase.go @@ -37,24 +37,19 @@ func newQWebDatabase(h *C.QWebDatabase) *QWebDatabase { if h == nil { return nil } + return &QWebDatabase{h: h} } // UnsafeNewQWebDatabase constructs the type using only unsafe pointers. func UnsafeNewQWebDatabase(h unsafe.Pointer) *QWebDatabase { - if h == nil { - return nil - } - - return &QWebDatabase{h: (*C.QWebDatabase)(h)} + return newQWebDatabase((*C.QWebDatabase)(h)) } // NewQWebDatabase constructs a new QWebDatabase object. func NewQWebDatabase(other *QWebDatabase) *QWebDatabase { - var outptr_QWebDatabase *C.QWebDatabase = nil - C.QWebDatabase_new(other.cPointer(), &outptr_QWebDatabase) - ret := newQWebDatabase(outptr_QWebDatabase) + ret := newQWebDatabase(C.QWebDatabase_new(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webkit/gen_qwebdatabase.h b/qt/webkit/gen_qwebdatabase.h index 905ef168..d4048f6d 100644 --- a/qt/webkit/gen_qwebdatabase.h +++ b/qt/webkit/gen_qwebdatabase.h @@ -22,7 +22,7 @@ typedef struct QWebDatabase QWebDatabase; typedef struct QWebSecurityOrigin QWebSecurityOrigin; #endif -void QWebDatabase_new(QWebDatabase* other, QWebDatabase** outptr_QWebDatabase); +QWebDatabase* QWebDatabase_new(QWebDatabase* other); void QWebDatabase_OperatorAssign(QWebDatabase* self, QWebDatabase* other); struct miqt_string QWebDatabase_Name(const QWebDatabase* self); struct miqt_string QWebDatabase_DisplayName(const QWebDatabase* self); diff --git a/qt/webkit/gen_qwebelement.cpp b/qt/webkit/gen_qwebelement.cpp index 51b29142..7818eb51 100644 --- a/qt/webkit/gen_qwebelement.cpp +++ b/qt/webkit/gen_qwebelement.cpp @@ -14,14 +14,12 @@ #include "gen_qwebelement.h" #include "_cgo_export.h" -void QWebElement_new(QWebElement** outptr_QWebElement) { - QWebElement* ret = new QWebElement(); - *outptr_QWebElement = ret; +QWebElement* QWebElement_new() { + return new QWebElement(); } -void QWebElement_new2(QWebElement* param1, QWebElement** outptr_QWebElement) { - QWebElement* ret = new QWebElement(*param1); - *outptr_QWebElement = ret; +QWebElement* QWebElement_new2(QWebElement* param1) { + return new QWebElement(*param1); } void QWebElement_OperatorAssign(QWebElement* self, QWebElement* param1) { @@ -474,20 +472,17 @@ void QWebElement_Delete(QWebElement* self, bool isSubclass) { } } -void QWebElementCollection_new(QWebElementCollection** outptr_QWebElementCollection) { - QWebElementCollection* ret = new QWebElementCollection(); - *outptr_QWebElementCollection = ret; +QWebElementCollection* QWebElementCollection_new() { + return new QWebElementCollection(); } -void QWebElementCollection_new2(QWebElement* contextElement, struct miqt_string query, QWebElementCollection** outptr_QWebElementCollection) { +QWebElementCollection* QWebElementCollection_new2(QWebElement* contextElement, struct miqt_string query) { QString query_QString = QString::fromUtf8(query.data, query.len); - QWebElementCollection* ret = new QWebElementCollection(*contextElement, query_QString); - *outptr_QWebElementCollection = ret; + return new QWebElementCollection(*contextElement, query_QString); } -void QWebElementCollection_new3(QWebElementCollection* param1, QWebElementCollection** outptr_QWebElementCollection) { - QWebElementCollection* ret = new QWebElementCollection(*param1); - *outptr_QWebElementCollection = ret; +QWebElementCollection* QWebElementCollection_new3(QWebElementCollection* param1) { + return new QWebElementCollection(*param1); } void QWebElementCollection_OperatorAssign(QWebElementCollection* self, QWebElementCollection* param1) { @@ -573,14 +568,12 @@ void QWebElementCollection_Delete(QWebElementCollection* self, bool isSubclass) } } -void QWebElementCollection__const_iterator_new(QWebElementCollection* collection_, int index, QWebElementCollection__const_iterator** outptr_QWebElementCollection__const_iterator) { - QWebElementCollection::const_iterator* ret = new QWebElementCollection::const_iterator(collection_, static_cast(index)); - *outptr_QWebElementCollection__const_iterator = ret; +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_new(QWebElementCollection* collection_, int index) { + return new QWebElementCollection::const_iterator(collection_, static_cast(index)); } -void QWebElementCollection__const_iterator_new2(QWebElementCollection__const_iterator* o, QWebElementCollection__const_iterator** outptr_QWebElementCollection__const_iterator) { - QWebElementCollection::const_iterator* ret = new QWebElementCollection::const_iterator(*o); - *outptr_QWebElementCollection__const_iterator = ret; +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_new2(QWebElementCollection__const_iterator* o) { + return new QWebElementCollection::const_iterator(*o); } QWebElement* QWebElementCollection__const_iterator_OperatorMultiply(const QWebElementCollection__const_iterator* self) { @@ -663,14 +656,12 @@ void QWebElementCollection__const_iterator_Delete(QWebElementCollection__const_i } } -void QWebElementCollection__iterator_new(QWebElementCollection* collection_, int index, QWebElementCollection__iterator** outptr_QWebElementCollection__iterator) { - QWebElementCollection::iterator* ret = new QWebElementCollection::iterator(collection_, static_cast(index)); - *outptr_QWebElementCollection__iterator = ret; +QWebElementCollection__iterator* QWebElementCollection__iterator_new(QWebElementCollection* collection_, int index) { + return new QWebElementCollection::iterator(collection_, static_cast(index)); } -void QWebElementCollection__iterator_new2(QWebElementCollection__iterator* o, QWebElementCollection__iterator** outptr_QWebElementCollection__iterator) { - QWebElementCollection::iterator* ret = new QWebElementCollection::iterator(*o); - *outptr_QWebElementCollection__iterator = ret; +QWebElementCollection__iterator* QWebElementCollection__iterator_new2(QWebElementCollection__iterator* o) { + return new QWebElementCollection::iterator(*o); } QWebElement* QWebElementCollection__iterator_OperatorMultiply(const QWebElementCollection__iterator* self) { diff --git a/qt/webkit/gen_qwebelement.go b/qt/webkit/gen_qwebelement.go index 7240ac3a..8d7667d9 100644 --- a/qt/webkit/gen_qwebelement.go +++ b/qt/webkit/gen_qwebelement.go @@ -46,34 +46,27 @@ func newQWebElement(h *C.QWebElement) *QWebElement { if h == nil { return nil } + return &QWebElement{h: h} } // UnsafeNewQWebElement constructs the type using only unsafe pointers. func UnsafeNewQWebElement(h unsafe.Pointer) *QWebElement { - if h == nil { - return nil - } - - return &QWebElement{h: (*C.QWebElement)(h)} + return newQWebElement((*C.QWebElement)(h)) } // NewQWebElement constructs a new QWebElement object. func NewQWebElement() *QWebElement { - var outptr_QWebElement *C.QWebElement = nil - C.QWebElement_new(&outptr_QWebElement) - ret := newQWebElement(outptr_QWebElement) + ret := newQWebElement(C.QWebElement_new()) ret.isSubclass = true return ret } // NewQWebElement2 constructs a new QWebElement object. func NewQWebElement2(param1 *QWebElement) *QWebElement { - var outptr_QWebElement *C.QWebElement = nil - C.QWebElement_new2(param1.cPointer(), &outptr_QWebElement) - ret := newQWebElement(outptr_QWebElement) + ret := newQWebElement(C.QWebElement_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -394,7 +387,7 @@ func (this *QWebElement) Document() *QWebElement { } func (this *QWebElement) WebFrame() *QWebFrame { - return newQWebFrame(C.QWebElement_WebFrame(this.h), nil) + return newQWebFrame(C.QWebElement_WebFrame(this.h)) } func (this *QWebElement) AppendInside(markup string) { @@ -629,24 +622,19 @@ func newQWebElementCollection(h *C.QWebElementCollection) *QWebElementCollection if h == nil { return nil } + return &QWebElementCollection{h: h} } // UnsafeNewQWebElementCollection constructs the type using only unsafe pointers. func UnsafeNewQWebElementCollection(h unsafe.Pointer) *QWebElementCollection { - if h == nil { - return nil - } - - return &QWebElementCollection{h: (*C.QWebElementCollection)(h)} + return newQWebElementCollection((*C.QWebElementCollection)(h)) } // NewQWebElementCollection constructs a new QWebElementCollection object. func NewQWebElementCollection() *QWebElementCollection { - var outptr_QWebElementCollection *C.QWebElementCollection = nil - C.QWebElementCollection_new(&outptr_QWebElementCollection) - ret := newQWebElementCollection(outptr_QWebElementCollection) + ret := newQWebElementCollection(C.QWebElementCollection_new()) ret.isSubclass = true return ret } @@ -657,20 +645,16 @@ func NewQWebElementCollection2(contextElement *QWebElement, query string) *QWebE query_ms.data = C.CString(query) query_ms.len = C.size_t(len(query)) defer C.free(unsafe.Pointer(query_ms.data)) - var outptr_QWebElementCollection *C.QWebElementCollection = nil - C.QWebElementCollection_new2(contextElement.cPointer(), query_ms, &outptr_QWebElementCollection) - ret := newQWebElementCollection(outptr_QWebElementCollection) + ret := newQWebElementCollection(C.QWebElementCollection_new2(contextElement.cPointer(), query_ms)) ret.isSubclass = true return ret } // NewQWebElementCollection3 constructs a new QWebElementCollection object. func NewQWebElementCollection3(param1 *QWebElementCollection) *QWebElementCollection { - var outptr_QWebElementCollection *C.QWebElementCollection = nil - C.QWebElementCollection_new3(param1.cPointer(), &outptr_QWebElementCollection) - ret := newQWebElementCollection(outptr_QWebElementCollection) + ret := newQWebElementCollection(C.QWebElementCollection_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -807,34 +791,27 @@ func newQWebElementCollection__const_iterator(h *C.QWebElementCollection__const_ if h == nil { return nil } + return &QWebElementCollection__const_iterator{h: h} } // UnsafeNewQWebElementCollection__const_iterator constructs the type using only unsafe pointers. func UnsafeNewQWebElementCollection__const_iterator(h unsafe.Pointer) *QWebElementCollection__const_iterator { - if h == nil { - return nil - } - - return &QWebElementCollection__const_iterator{h: (*C.QWebElementCollection__const_iterator)(h)} + return newQWebElementCollection__const_iterator((*C.QWebElementCollection__const_iterator)(h)) } // NewQWebElementCollection__const_iterator constructs a new QWebElementCollection::const_iterator object. func NewQWebElementCollection__const_iterator(collection_ *QWebElementCollection, index int) *QWebElementCollection__const_iterator { - var outptr_QWebElementCollection__const_iterator *C.QWebElementCollection__const_iterator = nil - C.QWebElementCollection__const_iterator_new(collection_.cPointer(), (C.int)(index), &outptr_QWebElementCollection__const_iterator) - ret := newQWebElementCollection__const_iterator(outptr_QWebElementCollection__const_iterator) + ret := newQWebElementCollection__const_iterator(C.QWebElementCollection__const_iterator_new(collection_.cPointer(), (C.int)(index))) ret.isSubclass = true return ret } // NewQWebElementCollection__const_iterator2 constructs a new QWebElementCollection::const_iterator object. func NewQWebElementCollection__const_iterator2(o *QWebElementCollection__const_iterator) *QWebElementCollection__const_iterator { - var outptr_QWebElementCollection__const_iterator *C.QWebElementCollection__const_iterator = nil - C.QWebElementCollection__const_iterator_new2(o.cPointer(), &outptr_QWebElementCollection__const_iterator) - ret := newQWebElementCollection__const_iterator(outptr_QWebElementCollection__const_iterator) + ret := newQWebElementCollection__const_iterator(C.QWebElementCollection__const_iterator_new2(o.cPointer())) ret.isSubclass = true return ret } @@ -951,34 +928,27 @@ func newQWebElementCollection__iterator(h *C.QWebElementCollection__iterator) *Q if h == nil { return nil } + return &QWebElementCollection__iterator{h: h} } // UnsafeNewQWebElementCollection__iterator constructs the type using only unsafe pointers. func UnsafeNewQWebElementCollection__iterator(h unsafe.Pointer) *QWebElementCollection__iterator { - if h == nil { - return nil - } - - return &QWebElementCollection__iterator{h: (*C.QWebElementCollection__iterator)(h)} + return newQWebElementCollection__iterator((*C.QWebElementCollection__iterator)(h)) } // NewQWebElementCollection__iterator constructs a new QWebElementCollection::iterator object. func NewQWebElementCollection__iterator(collection_ *QWebElementCollection, index int) *QWebElementCollection__iterator { - var outptr_QWebElementCollection__iterator *C.QWebElementCollection__iterator = nil - C.QWebElementCollection__iterator_new(collection_.cPointer(), (C.int)(index), &outptr_QWebElementCollection__iterator) - ret := newQWebElementCollection__iterator(outptr_QWebElementCollection__iterator) + ret := newQWebElementCollection__iterator(C.QWebElementCollection__iterator_new(collection_.cPointer(), (C.int)(index))) ret.isSubclass = true return ret } // NewQWebElementCollection__iterator2 constructs a new QWebElementCollection::iterator object. func NewQWebElementCollection__iterator2(o *QWebElementCollection__iterator) *QWebElementCollection__iterator { - var outptr_QWebElementCollection__iterator *C.QWebElementCollection__iterator = nil - C.QWebElementCollection__iterator_new2(o.cPointer(), &outptr_QWebElementCollection__iterator) - ret := newQWebElementCollection__iterator(outptr_QWebElementCollection__iterator) + ret := newQWebElementCollection__iterator(C.QWebElementCollection__iterator_new2(o.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webkit/gen_qwebelement.h b/qt/webkit/gen_qwebelement.h index 656ec7ca..94460bb1 100644 --- a/qt/webkit/gen_qwebelement.h +++ b/qt/webkit/gen_qwebelement.h @@ -42,8 +42,8 @@ typedef struct QWebElementCollection__iterator QWebElementCollection__iterator; typedef struct QWebFrame QWebFrame; #endif -void QWebElement_new(QWebElement** outptr_QWebElement); -void QWebElement_new2(QWebElement* param1, QWebElement** outptr_QWebElement); +QWebElement* QWebElement_new(); +QWebElement* QWebElement_new2(QWebElement* param1); void QWebElement_OperatorAssign(QWebElement* self, QWebElement* param1); bool QWebElement_OperatorEqual(const QWebElement* self, QWebElement* o); bool QWebElement_OperatorNotEqual(const QWebElement* self, QWebElement* o); @@ -113,9 +113,9 @@ struct miqt_string QWebElement_AttributeNS3(const QWebElement* self, struct miqt struct miqt_array /* of struct miqt_string */ QWebElement_AttributeNames1(const QWebElement* self, struct miqt_string namespaceUri); void QWebElement_Delete(QWebElement* self, bool isSubclass); -void QWebElementCollection_new(QWebElementCollection** outptr_QWebElementCollection); -void QWebElementCollection_new2(QWebElement* contextElement, struct miqt_string query, QWebElementCollection** outptr_QWebElementCollection); -void QWebElementCollection_new3(QWebElementCollection* param1, QWebElementCollection** outptr_QWebElementCollection); +QWebElementCollection* QWebElementCollection_new(); +QWebElementCollection* QWebElementCollection_new2(QWebElement* contextElement, struct miqt_string query); +QWebElementCollection* QWebElementCollection_new3(QWebElementCollection* param1); void QWebElementCollection_OperatorAssign(QWebElementCollection* self, QWebElementCollection* param1); QWebElementCollection* QWebElementCollection_OperatorPlus(const QWebElementCollection* self, QWebElementCollection* other); QWebElementCollection* QWebElementCollection_OperatorPlusAssign(QWebElementCollection* self, QWebElementCollection* other); @@ -134,8 +134,8 @@ QWebElementCollection__iterator* QWebElementCollection_Begin2(QWebElementCollect QWebElementCollection__iterator* QWebElementCollection_End2(QWebElementCollection* self); void QWebElementCollection_Delete(QWebElementCollection* self, bool isSubclass); -void QWebElementCollection__const_iterator_new(QWebElementCollection* collection_, int index, QWebElementCollection__const_iterator** outptr_QWebElementCollection__const_iterator); -void QWebElementCollection__const_iterator_new2(QWebElementCollection__const_iterator* o, QWebElementCollection__const_iterator** outptr_QWebElementCollection__const_iterator); +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_new(QWebElementCollection* collection_, int index); +QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_new2(QWebElementCollection__const_iterator* o); QWebElement* QWebElementCollection__const_iterator_OperatorMultiply(const QWebElementCollection__const_iterator* self); bool QWebElementCollection__const_iterator_OperatorEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o); bool QWebElementCollection__const_iterator_OperatorNotEqual(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* o); @@ -154,8 +154,8 @@ QWebElementCollection__const_iterator* QWebElementCollection__const_iterator_Ope int QWebElementCollection__const_iterator_OperatorMinusWithQWebElementCollectionconstIterator(const QWebElementCollection__const_iterator* self, QWebElementCollection__const_iterator* j); void QWebElementCollection__const_iterator_Delete(QWebElementCollection__const_iterator* self, bool isSubclass); -void QWebElementCollection__iterator_new(QWebElementCollection* collection_, int index, QWebElementCollection__iterator** outptr_QWebElementCollection__iterator); -void QWebElementCollection__iterator_new2(QWebElementCollection__iterator* o, QWebElementCollection__iterator** outptr_QWebElementCollection__iterator); +QWebElementCollection__iterator* QWebElementCollection__iterator_new(QWebElementCollection* collection_, int index); +QWebElementCollection__iterator* QWebElementCollection__iterator_new2(QWebElementCollection__iterator* o); QWebElement* QWebElementCollection__iterator_OperatorMultiply(const QWebElementCollection__iterator* self); bool QWebElementCollection__iterator_OperatorEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o); bool QWebElementCollection__iterator_OperatorNotEqual(const QWebElementCollection__iterator* self, QWebElementCollection__iterator* o); diff --git a/qt/webkit/gen_qwebframe.cpp b/qt/webkit/gen_qwebframe.cpp index 3686c3a7..0a70288f 100644 --- a/qt/webkit/gen_qwebframe.cpp +++ b/qt/webkit/gen_qwebframe.cpp @@ -27,14 +27,12 @@ #include "gen_qwebframe.h" #include "_cgo_export.h" -void QWebHitTestResult_new(QWebHitTestResult** outptr_QWebHitTestResult) { - QWebHitTestResult* ret = new QWebHitTestResult(); - *outptr_QWebHitTestResult = ret; +QWebHitTestResult* QWebHitTestResult_new() { + return new QWebHitTestResult(); } -void QWebHitTestResult_new2(QWebHitTestResult* other, QWebHitTestResult** outptr_QWebHitTestResult) { - QWebHitTestResult* ret = new QWebHitTestResult(*other); - *outptr_QWebHitTestResult = ret; +QWebHitTestResult* QWebHitTestResult_new2(QWebHitTestResult* other) { + return new QWebHitTestResult(*other); } void QWebHitTestResult_OperatorAssign(QWebHitTestResult* self, QWebHitTestResult* other) { @@ -153,6 +151,10 @@ void QWebHitTestResult_Delete(QWebHitTestResult* self, bool isSubclass) { } } +void QWebFrame_virtbase(QWebFrame* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebFrame_MetaObject(const QWebFrame* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt/webkit/gen_qwebframe.go b/qt/webkit/gen_qwebframe.go index 5b7c9900..b5a85baf 100644 --- a/qt/webkit/gen_qwebframe.go +++ b/qt/webkit/gen_qwebframe.go @@ -58,34 +58,27 @@ func newQWebHitTestResult(h *C.QWebHitTestResult) *QWebHitTestResult { if h == nil { return nil } + return &QWebHitTestResult{h: h} } // UnsafeNewQWebHitTestResult constructs the type using only unsafe pointers. func UnsafeNewQWebHitTestResult(h unsafe.Pointer) *QWebHitTestResult { - if h == nil { - return nil - } - - return &QWebHitTestResult{h: (*C.QWebHitTestResult)(h)} + return newQWebHitTestResult((*C.QWebHitTestResult)(h)) } // NewQWebHitTestResult constructs a new QWebHitTestResult object. func NewQWebHitTestResult() *QWebHitTestResult { - var outptr_QWebHitTestResult *C.QWebHitTestResult = nil - C.QWebHitTestResult_new(&outptr_QWebHitTestResult) - ret := newQWebHitTestResult(outptr_QWebHitTestResult) + ret := newQWebHitTestResult(C.QWebHitTestResult_new()) ret.isSubclass = true return ret } // NewQWebHitTestResult2 constructs a new QWebHitTestResult object. func NewQWebHitTestResult2(other *QWebHitTestResult) *QWebHitTestResult { - var outptr_QWebHitTestResult *C.QWebHitTestResult = nil - C.QWebHitTestResult_new2(other.cPointer(), &outptr_QWebHitTestResult) - ret := newQWebHitTestResult(outptr_QWebHitTestResult) + ret := newQWebHitTestResult(C.QWebHitTestResult_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -150,7 +143,7 @@ func (this *QWebHitTestResult) LinkTitleString() string { } func (this *QWebHitTestResult) LinkTargetFrame() *QWebFrame { - return newQWebFrame(C.QWebHitTestResult_LinkTargetFrame(this.h), nil) + return newQWebFrame(C.QWebHitTestResult_LinkTargetFrame(this.h)) } func (this *QWebHitTestResult) LinkElement() *QWebElement { @@ -173,7 +166,7 @@ func (this *QWebHitTestResult) ImageUrl() *qt.QUrl { } func (this *QWebHitTestResult) Pixmap() *qt.QPixmap { - _goptr := qt.UnsafeNewQPixmap(unsafe.Pointer(C.QWebHitTestResult_Pixmap(this.h)), nil) + _goptr := qt.UnsafeNewQPixmap(unsafe.Pointer(C.QWebHitTestResult_Pixmap(this.h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -199,7 +192,7 @@ func (this *QWebHitTestResult) Element() *QWebElement { } func (this *QWebHitTestResult) Frame() *QWebFrame { - return newQWebFrame(C.QWebHitTestResult_Frame(this.h), nil) + return newQWebFrame(C.QWebHitTestResult_Frame(this.h)) } // Delete this object from C++ memory. @@ -237,22 +230,20 @@ func (this *QWebFrame) UnsafePointer() unsafe.Pointer { } // newQWebFrame constructs the type using only CGO pointers. -func newQWebFrame(h *C.QWebFrame, h_QObject *C.QObject) *QWebFrame { +func newQWebFrame(h *C.QWebFrame) *QWebFrame { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebFrame_virtbase(h, &outptr_QObject) + return &QWebFrame{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebFrame constructs the type using only unsafe pointers. -func UnsafeNewQWebFrame(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebFrame { - if h == nil { - return nil - } - - return &QWebFrame{h: (*C.QWebFrame)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebFrame(h unsafe.Pointer) *QWebFrame { + return newQWebFrame((*C.QWebFrame)(h)) } func (this *QWebFrame) MetaObject() *qt.QMetaObject { @@ -284,7 +275,7 @@ func QWebFrame_TrUtf8(s string) string { } func (this *QWebFrame) Page() *QWebPage { - return newQWebPage(C.QWebFrame_Page(this.h), nil) + return newQWebPage(C.QWebFrame_Page(this.h)) } func (this *QWebFrame) Load(url *qt.QUrl) { @@ -375,7 +366,7 @@ func (this *QWebFrame) FrameName() string { } func (this *QWebFrame) ParentFrame() *QWebFrame { - return newQWebFrame(C.QWebFrame_ParentFrame(this.h), nil) + return newQWebFrame(C.QWebFrame_ParentFrame(this.h)) } func (this *QWebFrame) ChildFrames() []*QWebFrame { @@ -383,7 +374,7 @@ func (this *QWebFrame) ChildFrames() []*QWebFrame { _ret := make([]*QWebFrame, int(_ma.len)) _outCast := (*[0xffff]*C.QWebFrame)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQWebFrame(_outCast[i], nil) + _ret[i] = newQWebFrame(_outCast[i]) } return _ret } diff --git a/qt/webkit/gen_qwebframe.h b/qt/webkit/gen_qwebframe.h index 45330185..bdd3f79a 100644 --- a/qt/webkit/gen_qwebframe.h +++ b/qt/webkit/gen_qwebframe.h @@ -58,8 +58,8 @@ typedef struct QWebPage QWebPage; typedef struct QWebSecurityOrigin QWebSecurityOrigin; #endif -void QWebHitTestResult_new(QWebHitTestResult** outptr_QWebHitTestResult); -void QWebHitTestResult_new2(QWebHitTestResult* other, QWebHitTestResult** outptr_QWebHitTestResult); +QWebHitTestResult* QWebHitTestResult_new(); +QWebHitTestResult* QWebHitTestResult_new2(QWebHitTestResult* other); void QWebHitTestResult_OperatorAssign(QWebHitTestResult* self, QWebHitTestResult* other); bool QWebHitTestResult_IsNull(const QWebHitTestResult* self); QPoint* QWebHitTestResult_Pos(const QWebHitTestResult* self); @@ -82,6 +82,7 @@ QWebElement* QWebHitTestResult_Element(const QWebHitTestResult* self); QWebFrame* QWebHitTestResult_Frame(const QWebHitTestResult* self); void QWebHitTestResult_Delete(QWebHitTestResult* self, bool isSubclass); +void QWebFrame_virtbase(QWebFrame* src, QObject** outptr_QObject); QMetaObject* QWebFrame_MetaObject(const QWebFrame* self); void* QWebFrame_Metacast(QWebFrame* self, const char* param1); struct miqt_string QWebFrame_Tr(const char* s); diff --git a/qt/webkit/gen_qwebfullscreenrequest.cpp b/qt/webkit/gen_qwebfullscreenrequest.cpp index cb9e379a..f1f7ee4e 100644 --- a/qt/webkit/gen_qwebfullscreenrequest.cpp +++ b/qt/webkit/gen_qwebfullscreenrequest.cpp @@ -5,14 +5,12 @@ #include "gen_qwebfullscreenrequest.h" #include "_cgo_export.h" -void QWebFullScreenRequest_new(QWebFullScreenRequest** outptr_QWebFullScreenRequest) { - QWebFullScreenRequest* ret = new QWebFullScreenRequest(); - *outptr_QWebFullScreenRequest = ret; +QWebFullScreenRequest* QWebFullScreenRequest_new() { + return new QWebFullScreenRequest(); } -void QWebFullScreenRequest_new2(QWebFullScreenRequest* param1, QWebFullScreenRequest** outptr_QWebFullScreenRequest) { - QWebFullScreenRequest* ret = new QWebFullScreenRequest(*param1); - *outptr_QWebFullScreenRequest = ret; +QWebFullScreenRequest* QWebFullScreenRequest_new2(QWebFullScreenRequest* param1) { + return new QWebFullScreenRequest(*param1); } void QWebFullScreenRequest_Accept(QWebFullScreenRequest* self) { diff --git a/qt/webkit/gen_qwebfullscreenrequest.go b/qt/webkit/gen_qwebfullscreenrequest.go index a10901ef..4922b573 100644 --- a/qt/webkit/gen_qwebfullscreenrequest.go +++ b/qt/webkit/gen_qwebfullscreenrequest.go @@ -38,34 +38,27 @@ func newQWebFullScreenRequest(h *C.QWebFullScreenRequest) *QWebFullScreenRequest if h == nil { return nil } + return &QWebFullScreenRequest{h: h} } // UnsafeNewQWebFullScreenRequest constructs the type using only unsafe pointers. func UnsafeNewQWebFullScreenRequest(h unsafe.Pointer) *QWebFullScreenRequest { - if h == nil { - return nil - } - - return &QWebFullScreenRequest{h: (*C.QWebFullScreenRequest)(h)} + return newQWebFullScreenRequest((*C.QWebFullScreenRequest)(h)) } // NewQWebFullScreenRequest constructs a new QWebFullScreenRequest object. func NewQWebFullScreenRequest() *QWebFullScreenRequest { - var outptr_QWebFullScreenRequest *C.QWebFullScreenRequest = nil - C.QWebFullScreenRequest_new(&outptr_QWebFullScreenRequest) - ret := newQWebFullScreenRequest(outptr_QWebFullScreenRequest) + ret := newQWebFullScreenRequest(C.QWebFullScreenRequest_new()) ret.isSubclass = true return ret } // NewQWebFullScreenRequest2 constructs a new QWebFullScreenRequest object. func NewQWebFullScreenRequest2(param1 *QWebFullScreenRequest) *QWebFullScreenRequest { - var outptr_QWebFullScreenRequest *C.QWebFullScreenRequest = nil - C.QWebFullScreenRequest_new2(param1.cPointer(), &outptr_QWebFullScreenRequest) - ret := newQWebFullScreenRequest(outptr_QWebFullScreenRequest) + ret := newQWebFullScreenRequest(C.QWebFullScreenRequest_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webkit/gen_qwebfullscreenrequest.h b/qt/webkit/gen_qwebfullscreenrequest.h index 2de632d1..c0aece9d 100644 --- a/qt/webkit/gen_qwebfullscreenrequest.h +++ b/qt/webkit/gen_qwebfullscreenrequest.h @@ -24,8 +24,8 @@ typedef struct QWebElement QWebElement; typedef struct QWebFullScreenRequest QWebFullScreenRequest; #endif -void QWebFullScreenRequest_new(QWebFullScreenRequest** outptr_QWebFullScreenRequest); -void QWebFullScreenRequest_new2(QWebFullScreenRequest* param1, QWebFullScreenRequest** outptr_QWebFullScreenRequest); +QWebFullScreenRequest* QWebFullScreenRequest_new(); +QWebFullScreenRequest* QWebFullScreenRequest_new2(QWebFullScreenRequest* param1); void QWebFullScreenRequest_Accept(QWebFullScreenRequest* self); void QWebFullScreenRequest_Reject(QWebFullScreenRequest* self); bool QWebFullScreenRequest_ToggleOn(const QWebFullScreenRequest* self); diff --git a/qt/webkit/gen_qwebhistory.cpp b/qt/webkit/gen_qwebhistory.cpp index bf03b567..787f2eaf 100644 --- a/qt/webkit/gen_qwebhistory.cpp +++ b/qt/webkit/gen_qwebhistory.cpp @@ -13,9 +13,8 @@ #include "gen_qwebhistory.h" #include "_cgo_export.h" -void QWebHistoryItem_new(QWebHistoryItem* other, QWebHistoryItem** outptr_QWebHistoryItem) { - QWebHistoryItem* ret = new QWebHistoryItem(*other); - *outptr_QWebHistoryItem = ret; +QWebHistoryItem* QWebHistoryItem_new(QWebHistoryItem* other) { + return new QWebHistoryItem(*other); } void QWebHistoryItem_OperatorAssign(QWebHistoryItem* self, QWebHistoryItem* other) { diff --git a/qt/webkit/gen_qwebhistory.go b/qt/webkit/gen_qwebhistory.go index 3d1c3d4e..cb7c90aa 100644 --- a/qt/webkit/gen_qwebhistory.go +++ b/qt/webkit/gen_qwebhistory.go @@ -38,24 +38,19 @@ func newQWebHistoryItem(h *C.QWebHistoryItem) *QWebHistoryItem { if h == nil { return nil } + return &QWebHistoryItem{h: h} } // UnsafeNewQWebHistoryItem constructs the type using only unsafe pointers. func UnsafeNewQWebHistoryItem(h unsafe.Pointer) *QWebHistoryItem { - if h == nil { - return nil - } - - return &QWebHistoryItem{h: (*C.QWebHistoryItem)(h)} + return newQWebHistoryItem((*C.QWebHistoryItem)(h)) } // NewQWebHistoryItem constructs a new QWebHistoryItem object. func NewQWebHistoryItem(other *QWebHistoryItem) *QWebHistoryItem { - var outptr_QWebHistoryItem *C.QWebHistoryItem = nil - C.QWebHistoryItem_new(other.cPointer(), &outptr_QWebHistoryItem) - ret := newQWebHistoryItem(outptr_QWebHistoryItem) + ret := newQWebHistoryItem(C.QWebHistoryItem_new(other.cPointer())) ret.isSubclass = true return ret } @@ -189,16 +184,13 @@ func newQWebHistory(h *C.QWebHistory) *QWebHistory { if h == nil { return nil } + return &QWebHistory{h: h} } // UnsafeNewQWebHistory constructs the type using only unsafe pointers. func UnsafeNewQWebHistory(h unsafe.Pointer) *QWebHistory { - if h == nil { - return nil - } - - return &QWebHistory{h: (*C.QWebHistory)(h)} + return newQWebHistory((*C.QWebHistory)(h)) } func (this *QWebHistory) Clear() { diff --git a/qt/webkit/gen_qwebhistory.h b/qt/webkit/gen_qwebhistory.h index 5d94d0dd..e20c628a 100644 --- a/qt/webkit/gen_qwebhistory.h +++ b/qt/webkit/gen_qwebhistory.h @@ -30,7 +30,7 @@ typedef struct QWebHistory QWebHistory; typedef struct QWebHistoryItem QWebHistoryItem; #endif -void QWebHistoryItem_new(QWebHistoryItem* other, QWebHistoryItem** outptr_QWebHistoryItem); +QWebHistoryItem* QWebHistoryItem_new(QWebHistoryItem* other); void QWebHistoryItem_OperatorAssign(QWebHistoryItem* self, QWebHistoryItem* other); QUrl* QWebHistoryItem_OriginalUrl(const QWebHistoryItem* self); QUrl* QWebHistoryItem_Url(const QWebHistoryItem* self); diff --git a/qt/webkit/gen_qwebhistoryinterface.cpp b/qt/webkit/gen_qwebhistoryinterface.cpp index 09aaa017..7bea6a01 100644 --- a/qt/webkit/gen_qwebhistoryinterface.cpp +++ b/qt/webkit/gen_qwebhistoryinterface.cpp @@ -239,16 +239,16 @@ public: }; -void QWebHistoryInterface_new(QWebHistoryInterface** outptr_QWebHistoryInterface, QObject** outptr_QObject) { - MiqtVirtualQWebHistoryInterface* ret = new MiqtVirtualQWebHistoryInterface(); - *outptr_QWebHistoryInterface = ret; - *outptr_QObject = static_cast(ret); +QWebHistoryInterface* QWebHistoryInterface_new() { + return new MiqtVirtualQWebHistoryInterface(); } -void QWebHistoryInterface_new2(QObject* parent, QWebHistoryInterface** outptr_QWebHistoryInterface, QObject** outptr_QObject) { - MiqtVirtualQWebHistoryInterface* ret = new MiqtVirtualQWebHistoryInterface(parent); - *outptr_QWebHistoryInterface = ret; - *outptr_QObject = static_cast(ret); +QWebHistoryInterface* QWebHistoryInterface_new2(QObject* parent) { + return new MiqtVirtualQWebHistoryInterface(parent); +} + +void QWebHistoryInterface_virtbase(QWebHistoryInterface* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QWebHistoryInterface_MetaObject(const QWebHistoryInterface* self) { diff --git a/qt/webkit/gen_qwebhistoryinterface.go b/qt/webkit/gen_qwebhistoryinterface.go index a1f524b4..1a6aafe4 100644 --- a/qt/webkit/gen_qwebhistoryinterface.go +++ b/qt/webkit/gen_qwebhistoryinterface.go @@ -36,42 +36,34 @@ func (this *QWebHistoryInterface) UnsafePointer() unsafe.Pointer { } // newQWebHistoryInterface constructs the type using only CGO pointers. -func newQWebHistoryInterface(h *C.QWebHistoryInterface, h_QObject *C.QObject) *QWebHistoryInterface { +func newQWebHistoryInterface(h *C.QWebHistoryInterface) *QWebHistoryInterface { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebHistoryInterface_virtbase(h, &outptr_QObject) + return &QWebHistoryInterface{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebHistoryInterface constructs the type using only unsafe pointers. -func UnsafeNewQWebHistoryInterface(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebHistoryInterface { - if h == nil { - return nil - } - - return &QWebHistoryInterface{h: (*C.QWebHistoryInterface)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebHistoryInterface(h unsafe.Pointer) *QWebHistoryInterface { + return newQWebHistoryInterface((*C.QWebHistoryInterface)(h)) } // NewQWebHistoryInterface constructs a new QWebHistoryInterface object. func NewQWebHistoryInterface() *QWebHistoryInterface { - var outptr_QWebHistoryInterface *C.QWebHistoryInterface = nil - var outptr_QObject *C.QObject = nil - C.QWebHistoryInterface_new(&outptr_QWebHistoryInterface, &outptr_QObject) - ret := newQWebHistoryInterface(outptr_QWebHistoryInterface, outptr_QObject) + ret := newQWebHistoryInterface(C.QWebHistoryInterface_new()) ret.isSubclass = true return ret } // NewQWebHistoryInterface2 constructs a new QWebHistoryInterface object. func NewQWebHistoryInterface2(parent *qt.QObject) *QWebHistoryInterface { - var outptr_QWebHistoryInterface *C.QWebHistoryInterface = nil - var outptr_QObject *C.QObject = nil - C.QWebHistoryInterface_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebHistoryInterface, &outptr_QObject) - ret := newQWebHistoryInterface(outptr_QWebHistoryInterface, outptr_QObject) + ret := newQWebHistoryInterface(C.QWebHistoryInterface_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -109,7 +101,7 @@ func QWebHistoryInterface_SetDefaultInterface(defaultInterface *QWebHistoryInter } func QWebHistoryInterface_DefaultInterface() *QWebHistoryInterface { - return newQWebHistoryInterface(C.QWebHistoryInterface_DefaultInterface(), nil) + return newQWebHistoryInterface(C.QWebHistoryInterface_DefaultInterface()) } func (this *QWebHistoryInterface) HistoryContains(url string) bool { @@ -298,7 +290,7 @@ func miqt_exec_callback_QWebHistoryInterface_TimerEvent(self *C.QWebHistoryInter } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QWebHistoryInterface{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -324,7 +316,7 @@ func miqt_exec_callback_QWebHistoryInterface_ChildEvent(self *C.QWebHistoryInter } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QWebHistoryInterface{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt/webkit/gen_qwebhistoryinterface.h b/qt/webkit/gen_qwebhistoryinterface.h index aa23209a..0e36f0eb 100644 --- a/qt/webkit/gen_qwebhistoryinterface.h +++ b/qt/webkit/gen_qwebhistoryinterface.h @@ -32,8 +32,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWebHistoryInterface QWebHistoryInterface; #endif -void QWebHistoryInterface_new(QWebHistoryInterface** outptr_QWebHistoryInterface, QObject** outptr_QObject); -void QWebHistoryInterface_new2(QObject* parent, QWebHistoryInterface** outptr_QWebHistoryInterface, QObject** outptr_QObject); +QWebHistoryInterface* QWebHistoryInterface_new(); +QWebHistoryInterface* QWebHistoryInterface_new2(QObject* parent); +void QWebHistoryInterface_virtbase(QWebHistoryInterface* src, QObject** outptr_QObject); QMetaObject* QWebHistoryInterface_MetaObject(const QWebHistoryInterface* self); void* QWebHistoryInterface_Metacast(QWebHistoryInterface* self, const char* param1); struct miqt_string QWebHistoryInterface_Tr(const char* s); diff --git a/qt/webkit/gen_qwebinspector.cpp b/qt/webkit/gen_qwebinspector.cpp index f87f5945..c1a3f568 100644 --- a/qt/webkit/gen_qwebinspector.cpp +++ b/qt/webkit/gen_qwebinspector.cpp @@ -1021,20 +1021,16 @@ public: }; -void QWebInspector_new(QWidget* parent, QWebInspector** outptr_QWebInspector, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWebInspector* ret = new MiqtVirtualQWebInspector(parent); - *outptr_QWebInspector = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWebInspector* QWebInspector_new(QWidget* parent) { + return new MiqtVirtualQWebInspector(parent); } -void QWebInspector_new2(QWebInspector** outptr_QWebInspector, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWebInspector* ret = new MiqtVirtualQWebInspector(); - *outptr_QWebInspector = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWebInspector* QWebInspector_new2() { + return new MiqtVirtualQWebInspector(); +} + +void QWebInspector_virtbase(QWebInspector* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QWebInspector_MetaObject(const QWebInspector* self) { diff --git a/qt/webkit/gen_qwebinspector.go b/qt/webkit/gen_qwebinspector.go index 4ccd1d0f..d0d1ffef 100644 --- a/qt/webkit/gen_qwebinspector.go +++ b/qt/webkit/gen_qwebinspector.go @@ -36,46 +36,34 @@ func (this *QWebInspector) UnsafePointer() unsafe.Pointer { } // newQWebInspector constructs the type using only CGO pointers. -func newQWebInspector(h *C.QWebInspector, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWebInspector { +func newQWebInspector(h *C.QWebInspector) *QWebInspector { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QWebInspector_virtbase(h, &outptr_QWidget) + return &QWebInspector{h: h, - QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(outptr_QWidget))} } // UnsafeNewQWebInspector constructs the type using only unsafe pointers. -func UnsafeNewQWebInspector(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWebInspector { - if h == nil { - return nil - } - - return &QWebInspector{h: (*C.QWebInspector)(h), - QWidget: qt.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQWebInspector(h unsafe.Pointer) *QWebInspector { + return newQWebInspector((*C.QWebInspector)(h)) } // NewQWebInspector constructs a new QWebInspector object. func NewQWebInspector(parent *qt.QWidget) *QWebInspector { - var outptr_QWebInspector *C.QWebInspector = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWebInspector_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QWebInspector, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWebInspector(outptr_QWebInspector, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWebInspector(C.QWebInspector_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQWebInspector2 constructs a new QWebInspector object. func NewQWebInspector2() *QWebInspector { - var outptr_QWebInspector *C.QWebInspector = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWebInspector_new2(&outptr_QWebInspector, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWebInspector(outptr_QWebInspector, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWebInspector(C.QWebInspector_new2()) ret.isSubclass = true return ret } @@ -113,7 +101,7 @@ func (this *QWebInspector) SetPage(page *QWebPage) { } func (this *QWebInspector) Page() *QWebPage { - return newQWebPage(C.QWebInspector_Page(this.h), nil) + return newQWebPage(C.QWebInspector_Page(this.h)) } func (this *QWebInspector) SizeHint() *qt.QSize { @@ -245,7 +233,7 @@ func miqt_exec_callback_QWebInspector_ResizeEvent(self *C.QWebInspector, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -271,7 +259,7 @@ func miqt_exec_callback_QWebInspector_ShowEvent(self *C.QWebInspector, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -297,7 +285,7 @@ func miqt_exec_callback_QWebInspector_HideEvent(self *C.QWebInspector, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_HideEvent, slotval1) @@ -323,7 +311,7 @@ func miqt_exec_callback_QWebInspector_CloseEvent(self *C.QWebInspector, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -505,7 +493,7 @@ func miqt_exec_callback_QWebInspector_MousePressEvent(self *C.QWebInspector, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -531,7 +519,7 @@ func miqt_exec_callback_QWebInspector_MouseReleaseEvent(self *C.QWebInspector, c } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -557,7 +545,7 @@ func miqt_exec_callback_QWebInspector_MouseDoubleClickEvent(self *C.QWebInspecto } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -583,7 +571,7 @@ func miqt_exec_callback_QWebInspector_MouseMoveEvent(self *C.QWebInspector, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -609,7 +597,7 @@ func miqt_exec_callback_QWebInspector_WheelEvent(self *C.QWebInspector, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -635,7 +623,7 @@ func miqt_exec_callback_QWebInspector_KeyPressEvent(self *C.QWebInspector, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -661,7 +649,7 @@ func miqt_exec_callback_QWebInspector_KeyReleaseEvent(self *C.QWebInspector, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -687,7 +675,7 @@ func miqt_exec_callback_QWebInspector_FocusInEvent(self *C.QWebInspector, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -713,7 +701,7 @@ func miqt_exec_callback_QWebInspector_FocusOutEvent(self *C.QWebInspector, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -791,7 +779,7 @@ func miqt_exec_callback_QWebInspector_PaintEvent(self *C.QWebInspector, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -817,7 +805,7 @@ func miqt_exec_callback_QWebInspector_MoveEvent(self *C.QWebInspector, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -843,7 +831,7 @@ func miqt_exec_callback_QWebInspector_ContextMenuEvent(self *C.QWebInspector, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -869,7 +857,7 @@ func miqt_exec_callback_QWebInspector_TabletEvent(self *C.QWebInspector, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -895,7 +883,7 @@ func miqt_exec_callback_QWebInspector_ActionEvent(self *C.QWebInspector, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -921,7 +909,7 @@ func miqt_exec_callback_QWebInspector_DragEnterEvent(self *C.QWebInspector, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -947,7 +935,7 @@ func miqt_exec_callback_QWebInspector_DragMoveEvent(self *C.QWebInspector, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -973,7 +961,7 @@ func miqt_exec_callback_QWebInspector_DragLeaveEvent(self *C.QWebInspector, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -999,7 +987,7 @@ func miqt_exec_callback_QWebInspector_DropEvent(self *C.QWebInspector, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(event)) gofunc((&QWebInspector{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1195,7 +1183,7 @@ func miqt_exec_callback_QWebInspector_InputMethodEvent(self *C.QWebInspector, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1)) gofunc((&QWebInspector{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt/webkit/gen_qwebinspector.h b/qt/webkit/gen_qwebinspector.h index a4a13c0e..54d27ec2 100644 --- a/qt/webkit/gen_qwebinspector.h +++ b/qt/webkit/gen_qwebinspector.h @@ -78,8 +78,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QWebInspector_new(QWidget* parent, QWebInspector** outptr_QWebInspector, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWebInspector_new2(QWebInspector** outptr_QWebInspector, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QWebInspector* QWebInspector_new(QWidget* parent); +QWebInspector* QWebInspector_new2(); +void QWebInspector_virtbase(QWebInspector* src, QWidget** outptr_QWidget); QMetaObject* QWebInspector_MetaObject(const QWebInspector* self); void* QWebInspector_Metacast(QWebInspector* self, const char* param1); struct miqt_string QWebInspector_Tr(const char* s); diff --git a/qt/webkit/gen_qwebkitplatformplugin.cpp b/qt/webkit/gen_qwebkitplatformplugin.cpp index 9a5105f9..1c507d7d 100644 --- a/qt/webkit/gen_qwebkitplatformplugin.cpp +++ b/qt/webkit/gen_qwebkitplatformplugin.cpp @@ -92,6 +92,10 @@ void QWebSelectData_Delete(QWebSelectData* self, bool isSubclass) { } } +void QWebSelectMethod_virtbase(QWebSelectMethod* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebSelectMethod_MetaObject(const QWebSelectMethod* self) { return (QMetaObject*) self->metaObject(); } @@ -255,6 +259,10 @@ void QWebNotificationData_Delete(QWebNotificationData* self, bool isSubclass) { } } +void QWebNotificationPresenter_virtbase(QWebNotificationPresenter* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebNotificationPresenter_MetaObject(const QWebNotificationPresenter* self) { return (QMetaObject*) self->metaObject(); } @@ -361,6 +369,10 @@ void QWebNotificationPresenter_Delete(QWebNotificationPresenter* self, bool isSu } } +void QWebHapticFeedbackPlayer_virtbase(QWebHapticFeedbackPlayer* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebHapticFeedbackPlayer_MetaObject(const QWebHapticFeedbackPlayer* self) { return (QMetaObject*) self->metaObject(); } @@ -448,6 +460,10 @@ void QWebHapticFeedbackPlayer_Delete(QWebHapticFeedbackPlayer* self, bool isSubc } } +void QWebTouchModifier_virtbase(QWebTouchModifier* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebTouchModifier_MetaObject(const QWebTouchModifier* self) { return (QMetaObject*) self->metaObject(); } @@ -534,6 +550,10 @@ void QWebTouchModifier_Delete(QWebTouchModifier* self, bool isSubclass) { } } +void QWebSpellChecker_virtbase(QWebSpellChecker* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebSpellChecker_MetaObject(const QWebSpellChecker* self) { return (QMetaObject*) self->metaObject(); } @@ -703,9 +723,8 @@ void QWebKitPlatformPlugin_Delete(QWebKitPlatformPlugin* self, bool isSubclass) } } -void QWebSpellChecker__GrammarDetail_new(QWebSpellChecker__GrammarDetail* param1, QWebSpellChecker__GrammarDetail** outptr_QWebSpellChecker__GrammarDetail) { - QWebSpellChecker::GrammarDetail* ret = new QWebSpellChecker::GrammarDetail(*param1); - *outptr_QWebSpellChecker__GrammarDetail = ret; +QWebSpellChecker__GrammarDetail* QWebSpellChecker__GrammarDetail_new(QWebSpellChecker__GrammarDetail* param1) { + return new QWebSpellChecker::GrammarDetail(*param1); } void QWebSpellChecker__GrammarDetail_OperatorAssign(QWebSpellChecker__GrammarDetail* self, QWebSpellChecker__GrammarDetail* param1) { diff --git a/qt/webkit/gen_qwebkitplatformplugin.go b/qt/webkit/gen_qwebkitplatformplugin.go index a53994da..510e84ad 100644 --- a/qt/webkit/gen_qwebkitplatformplugin.go +++ b/qt/webkit/gen_qwebkitplatformplugin.go @@ -83,16 +83,13 @@ func newQWebSelectData(h *C.QWebSelectData) *QWebSelectData { if h == nil { return nil } + return &QWebSelectData{h: h} } // UnsafeNewQWebSelectData constructs the type using only unsafe pointers. func UnsafeNewQWebSelectData(h unsafe.Pointer) *QWebSelectData { - if h == nil { - return nil - } - - return &QWebSelectData{h: (*C.QWebSelectData)(h)} + return newQWebSelectData((*C.QWebSelectData)(h)) } func (this *QWebSelectData) ItemType(param1 int) QWebSelectData__ItemType { @@ -192,22 +189,20 @@ func (this *QWebSelectMethod) UnsafePointer() unsafe.Pointer { } // newQWebSelectMethod constructs the type using only CGO pointers. -func newQWebSelectMethod(h *C.QWebSelectMethod, h_QObject *C.QObject) *QWebSelectMethod { +func newQWebSelectMethod(h *C.QWebSelectMethod) *QWebSelectMethod { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebSelectMethod_virtbase(h, &outptr_QObject) + return &QWebSelectMethod{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebSelectMethod constructs the type using only unsafe pointers. -func UnsafeNewQWebSelectMethod(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebSelectMethod { - if h == nil { - return nil - } - - return &QWebSelectMethod{h: (*C.QWebSelectMethod)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebSelectMethod(h unsafe.Pointer) *QWebSelectMethod { + return newQWebSelectMethod((*C.QWebSelectMethod)(h)) } func (this *QWebSelectMethod) MetaObject() *qt.QMetaObject { @@ -377,16 +372,13 @@ func newQWebNotificationData(h *C.QWebNotificationData) *QWebNotificationData { if h == nil { return nil } + return &QWebNotificationData{h: h} } // UnsafeNewQWebNotificationData constructs the type using only unsafe pointers. func UnsafeNewQWebNotificationData(h unsafe.Pointer) *QWebNotificationData { - if h == nil { - return nil - } - - return &QWebNotificationData{h: (*C.QWebNotificationData)(h)} + return newQWebNotificationData((*C.QWebNotificationData)(h)) } func (this *QWebNotificationData) Title() string { @@ -454,22 +446,20 @@ func (this *QWebNotificationPresenter) UnsafePointer() unsafe.Pointer { } // newQWebNotificationPresenter constructs the type using only CGO pointers. -func newQWebNotificationPresenter(h *C.QWebNotificationPresenter, h_QObject *C.QObject) *QWebNotificationPresenter { +func newQWebNotificationPresenter(h *C.QWebNotificationPresenter) *QWebNotificationPresenter { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebNotificationPresenter_virtbase(h, &outptr_QObject) + return &QWebNotificationPresenter{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebNotificationPresenter constructs the type using only unsafe pointers. -func UnsafeNewQWebNotificationPresenter(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebNotificationPresenter { - if h == nil { - return nil - } - - return &QWebNotificationPresenter{h: (*C.QWebNotificationPresenter)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebNotificationPresenter(h unsafe.Pointer) *QWebNotificationPresenter { + return newQWebNotificationPresenter((*C.QWebNotificationPresenter)(h)) } func (this *QWebNotificationPresenter) MetaObject() *qt.QMetaObject { @@ -617,22 +607,20 @@ func (this *QWebHapticFeedbackPlayer) UnsafePointer() unsafe.Pointer { } // newQWebHapticFeedbackPlayer constructs the type using only CGO pointers. -func newQWebHapticFeedbackPlayer(h *C.QWebHapticFeedbackPlayer, h_QObject *C.QObject) *QWebHapticFeedbackPlayer { +func newQWebHapticFeedbackPlayer(h *C.QWebHapticFeedbackPlayer) *QWebHapticFeedbackPlayer { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebHapticFeedbackPlayer_virtbase(h, &outptr_QObject) + return &QWebHapticFeedbackPlayer{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebHapticFeedbackPlayer constructs the type using only unsafe pointers. -func UnsafeNewQWebHapticFeedbackPlayer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebHapticFeedbackPlayer { - if h == nil { - return nil - } - - return &QWebHapticFeedbackPlayer{h: (*C.QWebHapticFeedbackPlayer)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebHapticFeedbackPlayer(h unsafe.Pointer) *QWebHapticFeedbackPlayer { + return newQWebHapticFeedbackPlayer((*C.QWebHapticFeedbackPlayer)(h)) } func (this *QWebHapticFeedbackPlayer) MetaObject() *qt.QMetaObject { @@ -750,22 +738,20 @@ func (this *QWebTouchModifier) UnsafePointer() unsafe.Pointer { } // newQWebTouchModifier constructs the type using only CGO pointers. -func newQWebTouchModifier(h *C.QWebTouchModifier, h_QObject *C.QObject) *QWebTouchModifier { +func newQWebTouchModifier(h *C.QWebTouchModifier) *QWebTouchModifier { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebTouchModifier_virtbase(h, &outptr_QObject) + return &QWebTouchModifier{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebTouchModifier constructs the type using only unsafe pointers. -func UnsafeNewQWebTouchModifier(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebTouchModifier { - if h == nil { - return nil - } - - return &QWebTouchModifier{h: (*C.QWebTouchModifier)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebTouchModifier(h unsafe.Pointer) *QWebTouchModifier { + return newQWebTouchModifier((*C.QWebTouchModifier)(h)) } func (this *QWebTouchModifier) MetaObject() *qt.QMetaObject { @@ -879,22 +865,20 @@ func (this *QWebSpellChecker) UnsafePointer() unsafe.Pointer { } // newQWebSpellChecker constructs the type using only CGO pointers. -func newQWebSpellChecker(h *C.QWebSpellChecker, h_QObject *C.QObject) *QWebSpellChecker { +func newQWebSpellChecker(h *C.QWebSpellChecker) *QWebSpellChecker { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebSpellChecker_virtbase(h, &outptr_QObject) + return &QWebSpellChecker{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebSpellChecker constructs the type using only unsafe pointers. -func UnsafeNewQWebSpellChecker(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebSpellChecker { - if h == nil { - return nil - } - - return &QWebSpellChecker{h: (*C.QWebSpellChecker)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebSpellChecker(h unsafe.Pointer) *QWebSpellChecker { + return newQWebSpellChecker((*C.QWebSpellChecker)(h)) } func (this *QWebSpellChecker) MetaObject() *qt.QMetaObject { @@ -1094,16 +1078,13 @@ func newQWebKitPlatformPlugin(h *C.QWebKitPlatformPlugin) *QWebKitPlatformPlugin if h == nil { return nil } + return &QWebKitPlatformPlugin{h: h} } // UnsafeNewQWebKitPlatformPlugin constructs the type using only unsafe pointers. func UnsafeNewQWebKitPlatformPlugin(h unsafe.Pointer) *QWebKitPlatformPlugin { - if h == nil { - return nil - } - - return &QWebKitPlatformPlugin{h: (*C.QWebKitPlatformPlugin)(h)} + return newQWebKitPlatformPlugin((*C.QWebKitPlatformPlugin)(h)) } func (this *QWebKitPlatformPlugin) SupportsExtension(param1 QWebKitPlatformPlugin__Extension) bool { @@ -1156,24 +1137,19 @@ func newQWebSpellChecker__GrammarDetail(h *C.QWebSpellChecker__GrammarDetail) *Q if h == nil { return nil } + return &QWebSpellChecker__GrammarDetail{h: h} } // UnsafeNewQWebSpellChecker__GrammarDetail constructs the type using only unsafe pointers. func UnsafeNewQWebSpellChecker__GrammarDetail(h unsafe.Pointer) *QWebSpellChecker__GrammarDetail { - if h == nil { - return nil - } - - return &QWebSpellChecker__GrammarDetail{h: (*C.QWebSpellChecker__GrammarDetail)(h)} + return newQWebSpellChecker__GrammarDetail((*C.QWebSpellChecker__GrammarDetail)(h)) } // NewQWebSpellChecker__GrammarDetail constructs a new QWebSpellChecker::GrammarDetail object. func NewQWebSpellChecker__GrammarDetail(param1 *QWebSpellChecker__GrammarDetail) *QWebSpellChecker__GrammarDetail { - var outptr_QWebSpellChecker__GrammarDetail *C.QWebSpellChecker__GrammarDetail = nil - C.QWebSpellChecker__GrammarDetail_new(param1.cPointer(), &outptr_QWebSpellChecker__GrammarDetail) - ret := newQWebSpellChecker__GrammarDetail(outptr_QWebSpellChecker__GrammarDetail) + ret := newQWebSpellChecker__GrammarDetail(C.QWebSpellChecker__GrammarDetail_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webkit/gen_qwebkitplatformplugin.h b/qt/webkit/gen_qwebkitplatformplugin.h index 389e71a8..f3778ea9 100644 --- a/qt/webkit/gen_qwebkitplatformplugin.h +++ b/qt/webkit/gen_qwebkitplatformplugin.h @@ -66,6 +66,7 @@ QColor* QWebSelectData_ItemForegroundColor(const QWebSelectData* self, int index void QWebSelectData_OperatorAssign(QWebSelectData* self, QWebSelectData* param1); void QWebSelectData_Delete(QWebSelectData* self, bool isSubclass); +void QWebSelectMethod_virtbase(QWebSelectMethod* src, QObject** outptr_QObject); QMetaObject* QWebSelectMethod_MetaObject(const QWebSelectMethod* self); void* QWebSelectMethod_Metacast(QWebSelectMethod* self, const char* param1); struct miqt_string QWebSelectMethod_Tr(const char* s); @@ -91,6 +92,7 @@ QUrl* QWebNotificationData_OpenerPageUrl(const QWebNotificationData* self); void QWebNotificationData_OperatorAssign(QWebNotificationData* self, QWebNotificationData* param1); void QWebNotificationData_Delete(QWebNotificationData* self, bool isSubclass); +void QWebNotificationPresenter_virtbase(QWebNotificationPresenter* src, QObject** outptr_QObject); QMetaObject* QWebNotificationPresenter_MetaObject(const QWebNotificationPresenter* self); void* QWebNotificationPresenter_Metacast(QWebNotificationPresenter* self, const char* param1); struct miqt_string QWebNotificationPresenter_Tr(const char* s); @@ -106,6 +108,7 @@ struct miqt_string QWebNotificationPresenter_TrUtf82(const char* s, const char* struct miqt_string QWebNotificationPresenter_TrUtf83(const char* s, const char* c, int n); void QWebNotificationPresenter_Delete(QWebNotificationPresenter* self, bool isSubclass); +void QWebHapticFeedbackPlayer_virtbase(QWebHapticFeedbackPlayer* src, QObject** outptr_QObject); QMetaObject* QWebHapticFeedbackPlayer_MetaObject(const QWebHapticFeedbackPlayer* self); void* QWebHapticFeedbackPlayer_Metacast(QWebHapticFeedbackPlayer* self, const char* param1); struct miqt_string QWebHapticFeedbackPlayer_Tr(const char* s); @@ -117,6 +120,7 @@ struct miqt_string QWebHapticFeedbackPlayer_TrUtf82(const char* s, const char* c struct miqt_string QWebHapticFeedbackPlayer_TrUtf83(const char* s, const char* c, int n); void QWebHapticFeedbackPlayer_Delete(QWebHapticFeedbackPlayer* self, bool isSubclass); +void QWebTouchModifier_virtbase(QWebTouchModifier* src, QObject** outptr_QObject); QMetaObject* QWebTouchModifier_MetaObject(const QWebTouchModifier* self); void* QWebTouchModifier_Metacast(QWebTouchModifier* self, const char* param1); struct miqt_string QWebTouchModifier_Tr(const char* s); @@ -128,6 +132,7 @@ struct miqt_string QWebTouchModifier_TrUtf82(const char* s, const char* c); struct miqt_string QWebTouchModifier_TrUtf83(const char* s, const char* c, int n); void QWebTouchModifier_Delete(QWebTouchModifier* self, bool isSubclass); +void QWebSpellChecker_virtbase(QWebSpellChecker* src, QObject** outptr_QObject); QMetaObject* QWebSpellChecker_MetaObject(const QWebSpellChecker* self); void* QWebSpellChecker_Metacast(QWebSpellChecker* self, const char* param1); struct miqt_string QWebSpellChecker_Tr(const char* s); @@ -153,7 +158,7 @@ QObject* QWebKitPlatformPlugin_CreateExtension(const QWebKitPlatformPlugin* self void QWebKitPlatformPlugin_OperatorAssign(QWebKitPlatformPlugin* self, QWebKitPlatformPlugin* param1); void QWebKitPlatformPlugin_Delete(QWebKitPlatformPlugin* self, bool isSubclass); -void QWebSpellChecker__GrammarDetail_new(QWebSpellChecker__GrammarDetail* param1, QWebSpellChecker__GrammarDetail** outptr_QWebSpellChecker__GrammarDetail); +QWebSpellChecker__GrammarDetail* QWebSpellChecker__GrammarDetail_new(QWebSpellChecker__GrammarDetail* param1); void QWebSpellChecker__GrammarDetail_OperatorAssign(QWebSpellChecker__GrammarDetail* self, QWebSpellChecker__GrammarDetail* param1); void QWebSpellChecker__GrammarDetail_Delete(QWebSpellChecker__GrammarDetail* self, bool isSubclass); diff --git a/qt/webkit/gen_qwebpage.cpp b/qt/webkit/gen_qwebpage.cpp index 377e4146..2e5ef6a6 100644 --- a/qt/webkit/gen_qwebpage.cpp +++ b/qt/webkit/gen_qwebpage.cpp @@ -636,16 +636,16 @@ public: }; -void QWebPage_new(QWebPage** outptr_QWebPage, QObject** outptr_QObject) { - MiqtVirtualQWebPage* ret = new MiqtVirtualQWebPage(); - *outptr_QWebPage = ret; - *outptr_QObject = static_cast(ret); +QWebPage* QWebPage_new() { + return new MiqtVirtualQWebPage(); } -void QWebPage_new2(QObject* parent, QWebPage** outptr_QWebPage, QObject** outptr_QObject) { - MiqtVirtualQWebPage* ret = new MiqtVirtualQWebPage(parent); - *outptr_QWebPage = ret; - *outptr_QObject = static_cast(ret); +QWebPage* QWebPage_new2(QObject* parent) { + return new MiqtVirtualQWebPage(parent); +} + +void QWebPage_virtbase(QWebPage* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QWebPage_MetaObject(const QWebPage* self) { @@ -1563,14 +1563,12 @@ void QWebPage_Delete(QWebPage* self, bool isSubclass) { } } -void QWebPage__ViewportAttributes_new(QWebPage__ViewportAttributes** outptr_QWebPage__ViewportAttributes) { - QWebPage::ViewportAttributes* ret = new QWebPage::ViewportAttributes(); - *outptr_QWebPage__ViewportAttributes = ret; +QWebPage__ViewportAttributes* QWebPage__ViewportAttributes_new() { + return new QWebPage::ViewportAttributes(); } -void QWebPage__ViewportAttributes_new2(QWebPage__ViewportAttributes* other, QWebPage__ViewportAttributes** outptr_QWebPage__ViewportAttributes) { - QWebPage::ViewportAttributes* ret = new QWebPage::ViewportAttributes(*other); - *outptr_QWebPage__ViewportAttributes = ret; +QWebPage__ViewportAttributes* QWebPage__ViewportAttributes_new2(QWebPage__ViewportAttributes* other) { + return new QWebPage::ViewportAttributes(*other); } void QWebPage__ViewportAttributes_OperatorAssign(QWebPage__ViewportAttributes* self, QWebPage__ViewportAttributes* other) { @@ -1617,9 +1615,8 @@ void QWebPage__ViewportAttributes_Delete(QWebPage__ViewportAttributes* self, boo } } -void QWebPage__ExtensionOption_new(QWebPage__ExtensionOption* param1, QWebPage__ExtensionOption** outptr_QWebPage__ExtensionOption) { - QWebPage::ExtensionOption* ret = new QWebPage::ExtensionOption(*param1); - *outptr_QWebPage__ExtensionOption = ret; +QWebPage__ExtensionOption* QWebPage__ExtensionOption_new(QWebPage__ExtensionOption* param1) { + return new QWebPage::ExtensionOption(*param1); } void QWebPage__ExtensionOption_Delete(QWebPage__ExtensionOption* self, bool isSubclass) { @@ -1630,14 +1627,12 @@ void QWebPage__ExtensionOption_Delete(QWebPage__ExtensionOption* self, bool isSu } } -void QWebPage__ExtensionReturn_new(QWebPage__ExtensionReturn* param1, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn) { - QWebPage::ExtensionReturn* ret = new QWebPage::ExtensionReturn(*param1); - *outptr_QWebPage__ExtensionReturn = ret; +QWebPage__ExtensionReturn* QWebPage__ExtensionReturn_new(QWebPage__ExtensionReturn* param1) { + return new QWebPage::ExtensionReturn(*param1); } -void QWebPage__ExtensionReturn_new2(QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn) { - QWebPage::ExtensionReturn* ret = new QWebPage::ExtensionReturn(); - *outptr_QWebPage__ExtensionReturn = ret; +QWebPage__ExtensionReturn* QWebPage__ExtensionReturn_new2() { + return new QWebPage::ExtensionReturn(); } void QWebPage__ExtensionReturn_Delete(QWebPage__ExtensionReturn* self, bool isSubclass) { @@ -1648,6 +1643,10 @@ void QWebPage__ExtensionReturn_Delete(QWebPage__ExtensionReturn* self, bool isSu } } +void QWebPage__ChooseMultipleFilesExtensionOption_virtbase(QWebPage__ChooseMultipleFilesExtensionOption* src, QWebPage::ExtensionOption** outptr_QWebPage__ExtensionOption) { + *outptr_QWebPage__ExtensionOption = static_cast(src); +} + void QWebPage__ChooseMultipleFilesExtensionOption_Delete(QWebPage__ChooseMultipleFilesExtensionOption* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); @@ -1656,6 +1655,10 @@ void QWebPage__ChooseMultipleFilesExtensionOption_Delete(QWebPage__ChooseMultipl } } +void QWebPage__ChooseMultipleFilesExtensionReturn_virtbase(QWebPage__ChooseMultipleFilesExtensionReturn* src, QWebPage::ExtensionReturn** outptr_QWebPage__ExtensionReturn) { + *outptr_QWebPage__ExtensionReturn = static_cast(src); +} + void QWebPage__ChooseMultipleFilesExtensionReturn_Delete(QWebPage__ChooseMultipleFilesExtensionReturn* self, bool isSubclass) { if (isSubclass) { delete dynamic_cast( self ); @@ -1664,10 +1667,12 @@ void QWebPage__ChooseMultipleFilesExtensionReturn_Delete(QWebPage__ChooseMultipl } } -void QWebPage__ErrorPageExtensionOption_new(QWebPage__ErrorPageExtensionOption* param1, QWebPage__ErrorPageExtensionOption** outptr_QWebPage__ErrorPageExtensionOption, QWebPage__ExtensionOption** outptr_QWebPage__ExtensionOption) { - QWebPage::ErrorPageExtensionOption* ret = new QWebPage::ErrorPageExtensionOption(*param1); - *outptr_QWebPage__ErrorPageExtensionOption = ret; - *outptr_QWebPage__ExtensionOption = static_cast(ret); +QWebPage__ErrorPageExtensionOption* QWebPage__ErrorPageExtensionOption_new(QWebPage__ErrorPageExtensionOption* param1) { + return new QWebPage::ErrorPageExtensionOption(*param1); +} + +void QWebPage__ErrorPageExtensionOption_virtbase(QWebPage__ErrorPageExtensionOption* src, QWebPage::ExtensionOption** outptr_QWebPage__ExtensionOption) { + *outptr_QWebPage__ExtensionOption = static_cast(src); } void QWebPage__ErrorPageExtensionOption_OperatorAssign(QWebPage__ErrorPageExtensionOption* self, QWebPage__ErrorPageExtensionOption* param1) { @@ -1682,16 +1687,16 @@ void QWebPage__ErrorPageExtensionOption_Delete(QWebPage__ErrorPageExtensionOptio } } -void QWebPage__ErrorPageExtensionReturn_new(QWebPage__ErrorPageExtensionReturn** outptr_QWebPage__ErrorPageExtensionReturn, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn) { - QWebPage::ErrorPageExtensionReturn* ret = new QWebPage::ErrorPageExtensionReturn(); - *outptr_QWebPage__ErrorPageExtensionReturn = ret; - *outptr_QWebPage__ExtensionReturn = static_cast(ret); +QWebPage__ErrorPageExtensionReturn* QWebPage__ErrorPageExtensionReturn_new() { + return new QWebPage::ErrorPageExtensionReturn(); } -void QWebPage__ErrorPageExtensionReturn_new2(QWebPage__ErrorPageExtensionReturn* param1, QWebPage__ErrorPageExtensionReturn** outptr_QWebPage__ErrorPageExtensionReturn, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn) { - QWebPage::ErrorPageExtensionReturn* ret = new QWebPage::ErrorPageExtensionReturn(*param1); - *outptr_QWebPage__ErrorPageExtensionReturn = ret; - *outptr_QWebPage__ExtensionReturn = static_cast(ret); +QWebPage__ErrorPageExtensionReturn* QWebPage__ErrorPageExtensionReturn_new2(QWebPage__ErrorPageExtensionReturn* param1) { + return new QWebPage::ErrorPageExtensionReturn(*param1); +} + +void QWebPage__ErrorPageExtensionReturn_virtbase(QWebPage__ErrorPageExtensionReturn* src, QWebPage::ExtensionReturn** outptr_QWebPage__ExtensionReturn) { + *outptr_QWebPage__ExtensionReturn = static_cast(src); } void QWebPage__ErrorPageExtensionReturn_OperatorAssign(QWebPage__ErrorPageExtensionReturn* self, QWebPage__ErrorPageExtensionReturn* param1) { diff --git a/qt/webkit/gen_qwebpage.go b/qt/webkit/gen_qwebpage.go index 532db726..94b445d4 100644 --- a/qt/webkit/gen_qwebpage.go +++ b/qt/webkit/gen_qwebpage.go @@ -228,42 +228,34 @@ func (this *QWebPage) UnsafePointer() unsafe.Pointer { } // newQWebPage constructs the type using only CGO pointers. -func newQWebPage(h *C.QWebPage, h_QObject *C.QObject) *QWebPage { +func newQWebPage(h *C.QWebPage) *QWebPage { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebPage_virtbase(h, &outptr_QObject) + return &QWebPage{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebPage constructs the type using only unsafe pointers. -func UnsafeNewQWebPage(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebPage { - if h == nil { - return nil - } - - return &QWebPage{h: (*C.QWebPage)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebPage(h unsafe.Pointer) *QWebPage { + return newQWebPage((*C.QWebPage)(h)) } // NewQWebPage constructs a new QWebPage object. func NewQWebPage() *QWebPage { - var outptr_QWebPage *C.QWebPage = nil - var outptr_QObject *C.QObject = nil - C.QWebPage_new(&outptr_QWebPage, &outptr_QObject) - ret := newQWebPage(outptr_QWebPage, outptr_QObject) + ret := newQWebPage(C.QWebPage_new()) ret.isSubclass = true return ret } // NewQWebPage2 constructs a new QWebPage object. func NewQWebPage2(parent *qt.QObject) *QWebPage { - var outptr_QWebPage *C.QWebPage = nil - var outptr_QObject *C.QObject = nil - C.QWebPage_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebPage, &outptr_QObject) - ret := newQWebPage(outptr_QWebPage, outptr_QObject) + ret := newQWebPage(C.QWebPage_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -297,15 +289,15 @@ func QWebPage_TrUtf8(s string) string { } func (this *QWebPage) MainFrame() *QWebFrame { - return newQWebFrame(C.QWebPage_MainFrame(this.h), nil) + return newQWebFrame(C.QWebPage_MainFrame(this.h)) } func (this *QWebPage) CurrentFrame() *QWebFrame { - return newQWebFrame(C.QWebPage_CurrentFrame(this.h), nil) + return newQWebFrame(C.QWebPage_CurrentFrame(this.h)) } func (this *QWebPage) FrameAt(pos *qt.QPoint) *QWebFrame { - return newQWebFrame(C.QWebPage_FrameAt(this.h, (*C.QPoint)(pos.UnsafePointer())), nil) + return newQWebFrame(C.QWebPage_FrameAt(this.h, (*C.QPoint)(pos.UnsafePointer()))) } func (this *QWebPage) History() *QWebHistory { @@ -321,7 +313,7 @@ func (this *QWebPage) SetView(view *qt.QWidget) { } func (this *QWebPage) View() *qt.QWidget { - return qt.UnsafeNewQWidget(unsafe.Pointer(C.QWebPage_View(this.h)), nil, nil) + return qt.UnsafeNewQWidget(unsafe.Pointer(C.QWebPage_View(this.h))) } func (this *QWebPage) IsModified() bool { @@ -329,7 +321,7 @@ func (this *QWebPage) IsModified() bool { } func (this *QWebPage) UndoStack() *qt.QUndoStack { - return qt.UnsafeNewQUndoStack(unsafe.Pointer(C.QWebPage_UndoStack(this.h)), nil) + return qt.UnsafeNewQUndoStack(unsafe.Pointer(C.QWebPage_UndoStack(this.h))) } func (this *QWebPage) SetNetworkAccessManager(manager *network.QNetworkAccessManager) { @@ -337,7 +329,7 @@ func (this *QWebPage) SetNetworkAccessManager(manager *network.QNetworkAccessMan } func (this *QWebPage) NetworkAccessManager() *network.QNetworkAccessManager { - return network.UnsafeNewQNetworkAccessManager(unsafe.Pointer(C.QWebPage_NetworkAccessManager(this.h)), nil) + return network.UnsafeNewQNetworkAccessManager(unsafe.Pointer(C.QWebPage_NetworkAccessManager(this.h))) } func (this *QWebPage) SetPluginFactory(factory *QWebPluginFactory) { @@ -345,7 +337,7 @@ func (this *QWebPage) SetPluginFactory(factory *QWebPluginFactory) { } func (this *QWebPage) PluginFactory() *QWebPluginFactory { - return newQWebPluginFactory(C.QWebPage_PluginFactory(this.h), nil) + return newQWebPluginFactory(C.QWebPage_PluginFactory(this.h)) } func (this *QWebPage) TotalBytes() uint64 { @@ -387,11 +379,11 @@ func (this *QWebPage) SelectedHtml() string { } func (this *QWebPage) Action(action QWebPage__WebAction) *qt.QAction { - return qt.UnsafeNewQAction(unsafe.Pointer(C.QWebPage_Action(this.h, (C.int)(action))), nil) + return qt.UnsafeNewQAction(unsafe.Pointer(C.QWebPage_Action(this.h, (C.int)(action)))) } func (this *QWebPage) CustomAction(action int) *qt.QAction { - return qt.UnsafeNewQAction(unsafe.Pointer(C.QWebPage_CustomAction(this.h, (C.int)(action))), nil) + return qt.UnsafeNewQAction(unsafe.Pointer(C.QWebPage_CustomAction(this.h, (C.int)(action)))) } func (this *QWebPage) TriggerAction(action QWebPage__WebAction, checked bool) { @@ -505,7 +497,7 @@ func (this *QWebPage) UpdatePositionDependentActions(pos *qt.QPoint) { } func (this *QWebPage) CreateStandardContextMenu() *qt.QMenu { - return qt.UnsafeNewQMenu(unsafe.Pointer(C.QWebPage_CreateStandardContextMenu(this.h)), nil, nil, nil) + return qt.UnsafeNewQMenu(unsafe.Pointer(C.QWebPage_CreateStandardContextMenu(this.h))) } func (this *QWebPage) SetFeaturePermission(frame *QWebFrame, feature QWebPage__Feature, policy QWebPage__PermissionPolicy) { @@ -704,7 +696,7 @@ func miqt_exec_callback_QWebPage_FrameCreated(cb C.intptr_t, frame *C.QWebFrame) } // Convert all CABI parameters to Go parameters - slotval1 := newQWebFrame(frame, nil) + slotval1 := newQWebFrame(frame) gofunc(slotval1) } @@ -805,7 +797,7 @@ func miqt_exec_callback_QWebPage_PrintRequested(cb C.intptr_t, frame *C.QWebFram } // Convert all CABI parameters to Go parameters - slotval1 := newQWebFrame(frame, nil) + slotval1 := newQWebFrame(frame) gofunc(slotval1) } @@ -905,7 +897,7 @@ func miqt_exec_callback_QWebPage_UnsupportedContent(cb C.intptr_t, reply *C.QNet } // Convert all CABI parameters to Go parameters - slotval1 := network.UnsafeNewQNetworkReply(unsafe.Pointer(reply), nil, nil) + slotval1 := network.UnsafeNewQNetworkReply(unsafe.Pointer(reply)) gofunc(slotval1) } @@ -1003,7 +995,7 @@ func miqt_exec_callback_QWebPage_DatabaseQuotaExceeded(cb C.intptr_t, frame *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := newQWebFrame(frame, nil) + slotval1 := newQWebFrame(frame) var databaseName_ms C.struct_miqt_string = databaseName databaseName_ret := C.GoStringN(databaseName_ms.data, C.int(int64(databaseName_ms.len))) @@ -1052,7 +1044,7 @@ func miqt_exec_callback_QWebPage_SaveFrameStateRequested(cb C.intptr_t, frame *C } // Convert all CABI parameters to Go parameters - slotval1 := newQWebFrame(frame, nil) + slotval1 := newQWebFrame(frame) slotval2 := newQWebHistoryItem(item) @@ -1074,7 +1066,7 @@ func miqt_exec_callback_QWebPage_RestoreFrameStateRequested(cb C.intptr_t, frame } // Convert all CABI parameters to Go parameters - slotval1 := newQWebFrame(frame, nil) + slotval1 := newQWebFrame(frame) gofunc(slotval1) } @@ -1111,7 +1103,7 @@ func miqt_exec_callback_QWebPage_FeaturePermissionRequested(cb C.intptr_t, frame } // Convert all CABI parameters to Go parameters - slotval1 := newQWebFrame(frame, nil) + slotval1 := newQWebFrame(frame) slotval2 := (QWebPage__Feature)(feature) @@ -1133,7 +1125,7 @@ func miqt_exec_callback_QWebPage_FeaturePermissionRequestCanceled(cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWebFrame(frame, nil) + slotval1 := newQWebFrame(frame) slotval2 := (QWebPage__Feature)(feature) @@ -1418,7 +1410,7 @@ func miqt_exec_callback_QWebPage_ShouldInterruptJavaScript(self *C.QWebPage, cb func (this *QWebPage) callVirtualBase_CreateWindow(typeVal QWebPage__WebWindowType) *QWebPage { - return newQWebPage(C.QWebPage_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal)), nil) + return newQWebPage(C.QWebPage_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal))) } func (this *QWebPage) OnCreateWindow(slot func(super func(typeVal QWebPage__WebWindowType) *QWebPage, typeVal QWebPage__WebWindowType) *QWebPage) { @@ -1542,7 +1534,7 @@ func miqt_exec_callback_QWebPage_AcceptNavigationRequest(self *C.QWebPage, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQWebFrame(frame, nil) + slotval1 := newQWebFrame(frame) slotval2 := network.UnsafeNewQNetworkRequest(unsafe.Pointer(request)) @@ -1580,7 +1572,7 @@ func miqt_exec_callback_QWebPage_ChooseFile(self *C.QWebPage, cb C.intptr_t, ori } // Convert all CABI parameters to Go parameters - slotval1 := newQWebFrame(originatingFrame, nil) + slotval1 := newQWebFrame(originatingFrame) var oldFile_ms C.struct_miqt_string = oldFile oldFile_ret := C.GoStringN(oldFile_ms.data, C.int(int64(oldFile_ms.len))) @@ -1621,7 +1613,7 @@ func miqt_exec_callback_QWebPage_JavaScriptAlert(self *C.QWebPage, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQWebFrame(originatingFrame, nil) + slotval1 := newQWebFrame(originatingFrame) var msg_ms C.struct_miqt_string = msg msg_ret := C.GoStringN(msg_ms.data, C.int(int64(msg_ms.len))) @@ -1656,7 +1648,7 @@ func miqt_exec_callback_QWebPage_JavaScriptConfirm(self *C.QWebPage, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQWebFrame(originatingFrame, nil) + slotval1 := newQWebFrame(originatingFrame) var msg_ms C.struct_miqt_string = msg msg_ret := C.GoStringN(msg_ms.data, C.int(int64(msg_ms.len))) @@ -1796,7 +1788,7 @@ func miqt_exec_callback_QWebPage_TimerEvent(self *C.QWebPage, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QWebPage{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1822,7 +1814,7 @@ func miqt_exec_callback_QWebPage_ChildEvent(self *C.QWebPage, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QWebPage{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -1944,34 +1936,27 @@ func newQWebPage__ViewportAttributes(h *C.QWebPage__ViewportAttributes) *QWebPag if h == nil { return nil } + return &QWebPage__ViewportAttributes{h: h} } // UnsafeNewQWebPage__ViewportAttributes constructs the type using only unsafe pointers. func UnsafeNewQWebPage__ViewportAttributes(h unsafe.Pointer) *QWebPage__ViewportAttributes { - if h == nil { - return nil - } - - return &QWebPage__ViewportAttributes{h: (*C.QWebPage__ViewportAttributes)(h)} + return newQWebPage__ViewportAttributes((*C.QWebPage__ViewportAttributes)(h)) } // NewQWebPage__ViewportAttributes constructs a new QWebPage::ViewportAttributes object. func NewQWebPage__ViewportAttributes() *QWebPage__ViewportAttributes { - var outptr_QWebPage__ViewportAttributes *C.QWebPage__ViewportAttributes = nil - C.QWebPage__ViewportAttributes_new(&outptr_QWebPage__ViewportAttributes) - ret := newQWebPage__ViewportAttributes(outptr_QWebPage__ViewportAttributes) + ret := newQWebPage__ViewportAttributes(C.QWebPage__ViewportAttributes_new()) ret.isSubclass = true return ret } // NewQWebPage__ViewportAttributes2 constructs a new QWebPage::ViewportAttributes object. func NewQWebPage__ViewportAttributes2(other *QWebPage__ViewportAttributes) *QWebPage__ViewportAttributes { - var outptr_QWebPage__ViewportAttributes *C.QWebPage__ViewportAttributes = nil - C.QWebPage__ViewportAttributes_new2(other.cPointer(), &outptr_QWebPage__ViewportAttributes) - ret := newQWebPage__ViewportAttributes(outptr_QWebPage__ViewportAttributes) + ret := newQWebPage__ViewportAttributes(C.QWebPage__ViewportAttributes_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -2048,24 +2033,19 @@ func newQWebPage__ExtensionOption(h *C.QWebPage__ExtensionOption) *QWebPage__Ext if h == nil { return nil } + return &QWebPage__ExtensionOption{h: h} } // UnsafeNewQWebPage__ExtensionOption constructs the type using only unsafe pointers. func UnsafeNewQWebPage__ExtensionOption(h unsafe.Pointer) *QWebPage__ExtensionOption { - if h == nil { - return nil - } - - return &QWebPage__ExtensionOption{h: (*C.QWebPage__ExtensionOption)(h)} + return newQWebPage__ExtensionOption((*C.QWebPage__ExtensionOption)(h)) } // NewQWebPage__ExtensionOption constructs a new QWebPage::ExtensionOption object. func NewQWebPage__ExtensionOption(param1 *QWebPage__ExtensionOption) *QWebPage__ExtensionOption { - var outptr_QWebPage__ExtensionOption *C.QWebPage__ExtensionOption = nil - C.QWebPage__ExtensionOption_new(param1.cPointer(), &outptr_QWebPage__ExtensionOption) - ret := newQWebPage__ExtensionOption(outptr_QWebPage__ExtensionOption) + ret := newQWebPage__ExtensionOption(C.QWebPage__ExtensionOption_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -2108,34 +2088,27 @@ func newQWebPage__ExtensionReturn(h *C.QWebPage__ExtensionReturn) *QWebPage__Ext if h == nil { return nil } + return &QWebPage__ExtensionReturn{h: h} } // UnsafeNewQWebPage__ExtensionReturn constructs the type using only unsafe pointers. func UnsafeNewQWebPage__ExtensionReturn(h unsafe.Pointer) *QWebPage__ExtensionReturn { - if h == nil { - return nil - } - - return &QWebPage__ExtensionReturn{h: (*C.QWebPage__ExtensionReturn)(h)} + return newQWebPage__ExtensionReturn((*C.QWebPage__ExtensionReturn)(h)) } // NewQWebPage__ExtensionReturn constructs a new QWebPage::ExtensionReturn object. func NewQWebPage__ExtensionReturn(param1 *QWebPage__ExtensionReturn) *QWebPage__ExtensionReturn { - var outptr_QWebPage__ExtensionReturn *C.QWebPage__ExtensionReturn = nil - C.QWebPage__ExtensionReturn_new(param1.cPointer(), &outptr_QWebPage__ExtensionReturn) - ret := newQWebPage__ExtensionReturn(outptr_QWebPage__ExtensionReturn) + ret := newQWebPage__ExtensionReturn(C.QWebPage__ExtensionReturn_new(param1.cPointer())) ret.isSubclass = true return ret } // NewQWebPage__ExtensionReturn2 constructs a new QWebPage::ExtensionReturn object. func NewQWebPage__ExtensionReturn2() *QWebPage__ExtensionReturn { - var outptr_QWebPage__ExtensionReturn *C.QWebPage__ExtensionReturn = nil - C.QWebPage__ExtensionReturn_new2(&outptr_QWebPage__ExtensionReturn) - ret := newQWebPage__ExtensionReturn(outptr_QWebPage__ExtensionReturn) + ret := newQWebPage__ExtensionReturn(C.QWebPage__ExtensionReturn_new2()) ret.isSubclass = true return ret } @@ -2175,22 +2148,20 @@ func (this *QWebPage__ChooseMultipleFilesExtensionOption) UnsafePointer() unsafe } // newQWebPage__ChooseMultipleFilesExtensionOption constructs the type using only CGO pointers. -func newQWebPage__ChooseMultipleFilesExtensionOption(h *C.QWebPage__ChooseMultipleFilesExtensionOption, h_QWebPage__ExtensionOption *C.QWebPage__ExtensionOption) *QWebPage__ChooseMultipleFilesExtensionOption { +func newQWebPage__ChooseMultipleFilesExtensionOption(h *C.QWebPage__ChooseMultipleFilesExtensionOption) *QWebPage__ChooseMultipleFilesExtensionOption { if h == nil { return nil } + var outptr_QWebPage__ExtensionOption *C.QWebPage__ExtensionOption = nil + C.QWebPage__ChooseMultipleFilesExtensionOption_virtbase(h, &outptr_QWebPage__ExtensionOption) + return &QWebPage__ChooseMultipleFilesExtensionOption{h: h, - QWebPage__ExtensionOption: newQWebPage__ExtensionOption(h_QWebPage__ExtensionOption)} + QWebPage__ExtensionOption: newQWebPage__ExtensionOption(outptr_QWebPage__ExtensionOption)} } // UnsafeNewQWebPage__ChooseMultipleFilesExtensionOption constructs the type using only unsafe pointers. -func UnsafeNewQWebPage__ChooseMultipleFilesExtensionOption(h unsafe.Pointer, h_QWebPage__ExtensionOption unsafe.Pointer) *QWebPage__ChooseMultipleFilesExtensionOption { - if h == nil { - return nil - } - - return &QWebPage__ChooseMultipleFilesExtensionOption{h: (*C.QWebPage__ChooseMultipleFilesExtensionOption)(h), - QWebPage__ExtensionOption: UnsafeNewQWebPage__ExtensionOption(h_QWebPage__ExtensionOption)} +func UnsafeNewQWebPage__ChooseMultipleFilesExtensionOption(h unsafe.Pointer) *QWebPage__ChooseMultipleFilesExtensionOption { + return newQWebPage__ChooseMultipleFilesExtensionOption((*C.QWebPage__ChooseMultipleFilesExtensionOption)(h)) } // Delete this object from C++ memory. @@ -2228,22 +2199,20 @@ func (this *QWebPage__ChooseMultipleFilesExtensionReturn) UnsafePointer() unsafe } // newQWebPage__ChooseMultipleFilesExtensionReturn constructs the type using only CGO pointers. -func newQWebPage__ChooseMultipleFilesExtensionReturn(h *C.QWebPage__ChooseMultipleFilesExtensionReturn, h_QWebPage__ExtensionReturn *C.QWebPage__ExtensionReturn) *QWebPage__ChooseMultipleFilesExtensionReturn { +func newQWebPage__ChooseMultipleFilesExtensionReturn(h *C.QWebPage__ChooseMultipleFilesExtensionReturn) *QWebPage__ChooseMultipleFilesExtensionReturn { if h == nil { return nil } + var outptr_QWebPage__ExtensionReturn *C.QWebPage__ExtensionReturn = nil + C.QWebPage__ChooseMultipleFilesExtensionReturn_virtbase(h, &outptr_QWebPage__ExtensionReturn) + return &QWebPage__ChooseMultipleFilesExtensionReturn{h: h, - QWebPage__ExtensionReturn: newQWebPage__ExtensionReturn(h_QWebPage__ExtensionReturn)} + QWebPage__ExtensionReturn: newQWebPage__ExtensionReturn(outptr_QWebPage__ExtensionReturn)} } // UnsafeNewQWebPage__ChooseMultipleFilesExtensionReturn constructs the type using only unsafe pointers. -func UnsafeNewQWebPage__ChooseMultipleFilesExtensionReturn(h unsafe.Pointer, h_QWebPage__ExtensionReturn unsafe.Pointer) *QWebPage__ChooseMultipleFilesExtensionReturn { - if h == nil { - return nil - } - - return &QWebPage__ChooseMultipleFilesExtensionReturn{h: (*C.QWebPage__ChooseMultipleFilesExtensionReturn)(h), - QWebPage__ExtensionReturn: UnsafeNewQWebPage__ExtensionReturn(h_QWebPage__ExtensionReturn)} +func UnsafeNewQWebPage__ChooseMultipleFilesExtensionReturn(h unsafe.Pointer) *QWebPage__ChooseMultipleFilesExtensionReturn { + return newQWebPage__ChooseMultipleFilesExtensionReturn((*C.QWebPage__ChooseMultipleFilesExtensionReturn)(h)) } // Delete this object from C++ memory. @@ -2281,31 +2250,26 @@ func (this *QWebPage__ErrorPageExtensionOption) UnsafePointer() unsafe.Pointer { } // newQWebPage__ErrorPageExtensionOption constructs the type using only CGO pointers. -func newQWebPage__ErrorPageExtensionOption(h *C.QWebPage__ErrorPageExtensionOption, h_QWebPage__ExtensionOption *C.QWebPage__ExtensionOption) *QWebPage__ErrorPageExtensionOption { +func newQWebPage__ErrorPageExtensionOption(h *C.QWebPage__ErrorPageExtensionOption) *QWebPage__ErrorPageExtensionOption { if h == nil { return nil } + var outptr_QWebPage__ExtensionOption *C.QWebPage__ExtensionOption = nil + C.QWebPage__ErrorPageExtensionOption_virtbase(h, &outptr_QWebPage__ExtensionOption) + return &QWebPage__ErrorPageExtensionOption{h: h, - QWebPage__ExtensionOption: newQWebPage__ExtensionOption(h_QWebPage__ExtensionOption)} + QWebPage__ExtensionOption: newQWebPage__ExtensionOption(outptr_QWebPage__ExtensionOption)} } // UnsafeNewQWebPage__ErrorPageExtensionOption constructs the type using only unsafe pointers. -func UnsafeNewQWebPage__ErrorPageExtensionOption(h unsafe.Pointer, h_QWebPage__ExtensionOption unsafe.Pointer) *QWebPage__ErrorPageExtensionOption { - if h == nil { - return nil - } - - return &QWebPage__ErrorPageExtensionOption{h: (*C.QWebPage__ErrorPageExtensionOption)(h), - QWebPage__ExtensionOption: UnsafeNewQWebPage__ExtensionOption(h_QWebPage__ExtensionOption)} +func UnsafeNewQWebPage__ErrorPageExtensionOption(h unsafe.Pointer) *QWebPage__ErrorPageExtensionOption { + return newQWebPage__ErrorPageExtensionOption((*C.QWebPage__ErrorPageExtensionOption)(h)) } // NewQWebPage__ErrorPageExtensionOption constructs a new QWebPage::ErrorPageExtensionOption object. func NewQWebPage__ErrorPageExtensionOption(param1 *QWebPage__ErrorPageExtensionOption) *QWebPage__ErrorPageExtensionOption { - var outptr_QWebPage__ErrorPageExtensionOption *C.QWebPage__ErrorPageExtensionOption = nil - var outptr_QWebPage__ExtensionOption *C.QWebPage__ExtensionOption = nil - C.QWebPage__ErrorPageExtensionOption_new(param1.cPointer(), &outptr_QWebPage__ErrorPageExtensionOption, &outptr_QWebPage__ExtensionOption) - ret := newQWebPage__ErrorPageExtensionOption(outptr_QWebPage__ErrorPageExtensionOption, outptr_QWebPage__ExtensionOption) + ret := newQWebPage__ErrorPageExtensionOption(C.QWebPage__ErrorPageExtensionOption_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -2349,42 +2313,34 @@ func (this *QWebPage__ErrorPageExtensionReturn) UnsafePointer() unsafe.Pointer { } // newQWebPage__ErrorPageExtensionReturn constructs the type using only CGO pointers. -func newQWebPage__ErrorPageExtensionReturn(h *C.QWebPage__ErrorPageExtensionReturn, h_QWebPage__ExtensionReturn *C.QWebPage__ExtensionReturn) *QWebPage__ErrorPageExtensionReturn { +func newQWebPage__ErrorPageExtensionReturn(h *C.QWebPage__ErrorPageExtensionReturn) *QWebPage__ErrorPageExtensionReturn { if h == nil { return nil } + var outptr_QWebPage__ExtensionReturn *C.QWebPage__ExtensionReturn = nil + C.QWebPage__ErrorPageExtensionReturn_virtbase(h, &outptr_QWebPage__ExtensionReturn) + return &QWebPage__ErrorPageExtensionReturn{h: h, - QWebPage__ExtensionReturn: newQWebPage__ExtensionReturn(h_QWebPage__ExtensionReturn)} + QWebPage__ExtensionReturn: newQWebPage__ExtensionReturn(outptr_QWebPage__ExtensionReturn)} } // UnsafeNewQWebPage__ErrorPageExtensionReturn constructs the type using only unsafe pointers. -func UnsafeNewQWebPage__ErrorPageExtensionReturn(h unsafe.Pointer, h_QWebPage__ExtensionReturn unsafe.Pointer) *QWebPage__ErrorPageExtensionReturn { - if h == nil { - return nil - } - - return &QWebPage__ErrorPageExtensionReturn{h: (*C.QWebPage__ErrorPageExtensionReturn)(h), - QWebPage__ExtensionReturn: UnsafeNewQWebPage__ExtensionReturn(h_QWebPage__ExtensionReturn)} +func UnsafeNewQWebPage__ErrorPageExtensionReturn(h unsafe.Pointer) *QWebPage__ErrorPageExtensionReturn { + return newQWebPage__ErrorPageExtensionReturn((*C.QWebPage__ErrorPageExtensionReturn)(h)) } // NewQWebPage__ErrorPageExtensionReturn constructs a new QWebPage::ErrorPageExtensionReturn object. func NewQWebPage__ErrorPageExtensionReturn() *QWebPage__ErrorPageExtensionReturn { - var outptr_QWebPage__ErrorPageExtensionReturn *C.QWebPage__ErrorPageExtensionReturn = nil - var outptr_QWebPage__ExtensionReturn *C.QWebPage__ExtensionReturn = nil - C.QWebPage__ErrorPageExtensionReturn_new(&outptr_QWebPage__ErrorPageExtensionReturn, &outptr_QWebPage__ExtensionReturn) - ret := newQWebPage__ErrorPageExtensionReturn(outptr_QWebPage__ErrorPageExtensionReturn, outptr_QWebPage__ExtensionReturn) + ret := newQWebPage__ErrorPageExtensionReturn(C.QWebPage__ErrorPageExtensionReturn_new()) ret.isSubclass = true return ret } // NewQWebPage__ErrorPageExtensionReturn2 constructs a new QWebPage::ErrorPageExtensionReturn object. func NewQWebPage__ErrorPageExtensionReturn2(param1 *QWebPage__ErrorPageExtensionReturn) *QWebPage__ErrorPageExtensionReturn { - var outptr_QWebPage__ErrorPageExtensionReturn *C.QWebPage__ErrorPageExtensionReturn = nil - var outptr_QWebPage__ExtensionReturn *C.QWebPage__ExtensionReturn = nil - C.QWebPage__ErrorPageExtensionReturn_new2(param1.cPointer(), &outptr_QWebPage__ErrorPageExtensionReturn, &outptr_QWebPage__ExtensionReturn) - ret := newQWebPage__ErrorPageExtensionReturn(outptr_QWebPage__ErrorPageExtensionReturn, outptr_QWebPage__ExtensionReturn) + ret := newQWebPage__ErrorPageExtensionReturn(C.QWebPage__ErrorPageExtensionReturn_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webkit/gen_qwebpage.h b/qt/webkit/gen_qwebpage.h index 4cccb218..55c41c6f 100644 --- a/qt/webkit/gen_qwebpage.h +++ b/qt/webkit/gen_qwebpage.h @@ -120,8 +120,9 @@ typedef struct QWebSettings QWebSettings; typedef struct QWidget QWidget; #endif -void QWebPage_new(QWebPage** outptr_QWebPage, QObject** outptr_QObject); -void QWebPage_new2(QObject* parent, QWebPage** outptr_QWebPage, QObject** outptr_QObject); +QWebPage* QWebPage_new(); +QWebPage* QWebPage_new2(QObject* parent); +void QWebPage_virtbase(QWebPage* src, QObject** outptr_QObject); QMetaObject* QWebPage_MetaObject(const QWebPage* self); void* QWebPage_Metacast(QWebPage* self, const char* param1); struct miqt_string QWebPage_Tr(const char* s); @@ -295,8 +296,8 @@ void QWebPage_override_virtual_DisconnectNotify(void* self, intptr_t slot); void QWebPage_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QWebPage_Delete(QWebPage* self, bool isSubclass); -void QWebPage__ViewportAttributes_new(QWebPage__ViewportAttributes** outptr_QWebPage__ViewportAttributes); -void QWebPage__ViewportAttributes_new2(QWebPage__ViewportAttributes* other, QWebPage__ViewportAttributes** outptr_QWebPage__ViewportAttributes); +QWebPage__ViewportAttributes* QWebPage__ViewportAttributes_new(); +QWebPage__ViewportAttributes* QWebPage__ViewportAttributes_new2(QWebPage__ViewportAttributes* other); void QWebPage__ViewportAttributes_OperatorAssign(QWebPage__ViewportAttributes* self, QWebPage__ViewportAttributes* other); double QWebPage__ViewportAttributes_InitialScaleFactor(const QWebPage__ViewportAttributes* self); double QWebPage__ViewportAttributes_MinimumScaleFactor(const QWebPage__ViewportAttributes* self); @@ -307,23 +308,27 @@ bool QWebPage__ViewportAttributes_IsValid(const QWebPage__ViewportAttributes* se QSizeF* QWebPage__ViewportAttributes_Size(const QWebPage__ViewportAttributes* self); void QWebPage__ViewportAttributes_Delete(QWebPage__ViewportAttributes* self, bool isSubclass); -void QWebPage__ExtensionOption_new(QWebPage__ExtensionOption* param1, QWebPage__ExtensionOption** outptr_QWebPage__ExtensionOption); +QWebPage__ExtensionOption* QWebPage__ExtensionOption_new(QWebPage__ExtensionOption* param1); void QWebPage__ExtensionOption_Delete(QWebPage__ExtensionOption* self, bool isSubclass); -void QWebPage__ExtensionReturn_new(QWebPage__ExtensionReturn* param1, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn); -void QWebPage__ExtensionReturn_new2(QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn); +QWebPage__ExtensionReturn* QWebPage__ExtensionReturn_new(QWebPage__ExtensionReturn* param1); +QWebPage__ExtensionReturn* QWebPage__ExtensionReturn_new2(); void QWebPage__ExtensionReturn_Delete(QWebPage__ExtensionReturn* self, bool isSubclass); +void QWebPage__ChooseMultipleFilesExtensionOption_virtbase(QWebPage__ChooseMultipleFilesExtensionOption* src, QWebPage__ExtensionOption** outptr_QWebPage__ExtensionOption); void QWebPage__ChooseMultipleFilesExtensionOption_Delete(QWebPage__ChooseMultipleFilesExtensionOption* self, bool isSubclass); +void QWebPage__ChooseMultipleFilesExtensionReturn_virtbase(QWebPage__ChooseMultipleFilesExtensionReturn* src, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn); void QWebPage__ChooseMultipleFilesExtensionReturn_Delete(QWebPage__ChooseMultipleFilesExtensionReturn* self, bool isSubclass); -void QWebPage__ErrorPageExtensionOption_new(QWebPage__ErrorPageExtensionOption* param1, QWebPage__ErrorPageExtensionOption** outptr_QWebPage__ErrorPageExtensionOption, QWebPage__ExtensionOption** outptr_QWebPage__ExtensionOption); +QWebPage__ErrorPageExtensionOption* QWebPage__ErrorPageExtensionOption_new(QWebPage__ErrorPageExtensionOption* param1); +void QWebPage__ErrorPageExtensionOption_virtbase(QWebPage__ErrorPageExtensionOption* src, QWebPage__ExtensionOption** outptr_QWebPage__ExtensionOption); void QWebPage__ErrorPageExtensionOption_OperatorAssign(QWebPage__ErrorPageExtensionOption* self, QWebPage__ErrorPageExtensionOption* param1); void QWebPage__ErrorPageExtensionOption_Delete(QWebPage__ErrorPageExtensionOption* self, bool isSubclass); -void QWebPage__ErrorPageExtensionReturn_new(QWebPage__ErrorPageExtensionReturn** outptr_QWebPage__ErrorPageExtensionReturn, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn); -void QWebPage__ErrorPageExtensionReturn_new2(QWebPage__ErrorPageExtensionReturn* param1, QWebPage__ErrorPageExtensionReturn** outptr_QWebPage__ErrorPageExtensionReturn, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn); +QWebPage__ErrorPageExtensionReturn* QWebPage__ErrorPageExtensionReturn_new(); +QWebPage__ErrorPageExtensionReturn* QWebPage__ErrorPageExtensionReturn_new2(QWebPage__ErrorPageExtensionReturn* param1); +void QWebPage__ErrorPageExtensionReturn_virtbase(QWebPage__ErrorPageExtensionReturn* src, QWebPage__ExtensionReturn** outptr_QWebPage__ExtensionReturn); void QWebPage__ErrorPageExtensionReturn_OperatorAssign(QWebPage__ErrorPageExtensionReturn* self, QWebPage__ErrorPageExtensionReturn* param1); void QWebPage__ErrorPageExtensionReturn_Delete(QWebPage__ErrorPageExtensionReturn* self, bool isSubclass); diff --git a/qt/webkit/gen_qwebpluginfactory.cpp b/qt/webkit/gen_qwebpluginfactory.cpp index 42cf7d8e..346a08d1 100644 --- a/qt/webkit/gen_qwebpluginfactory.cpp +++ b/qt/webkit/gen_qwebpluginfactory.cpp @@ -353,16 +353,16 @@ public: }; -void QWebPluginFactory_new(QWebPluginFactory** outptr_QWebPluginFactory, QObject** outptr_QObject) { - MiqtVirtualQWebPluginFactory* ret = new MiqtVirtualQWebPluginFactory(); - *outptr_QWebPluginFactory = ret; - *outptr_QObject = static_cast(ret); +QWebPluginFactory* QWebPluginFactory_new() { + return new MiqtVirtualQWebPluginFactory(); } -void QWebPluginFactory_new2(QObject* parent, QWebPluginFactory** outptr_QWebPluginFactory, QObject** outptr_QObject) { - MiqtVirtualQWebPluginFactory* ret = new MiqtVirtualQWebPluginFactory(parent); - *outptr_QWebPluginFactory = ret; - *outptr_QObject = static_cast(ret); +QWebPluginFactory* QWebPluginFactory_new2(QObject* parent) { + return new MiqtVirtualQWebPluginFactory(parent); +} + +void QWebPluginFactory_virtbase(QWebPluginFactory* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QWebPluginFactory_MetaObject(const QWebPluginFactory* self) { @@ -579,9 +579,8 @@ void QWebPluginFactory_Delete(QWebPluginFactory* self, bool isSubclass) { } } -void QWebPluginFactory__MimeType_new(QWebPluginFactory__MimeType* param1, QWebPluginFactory__MimeType** outptr_QWebPluginFactory__MimeType) { - QWebPluginFactory::MimeType* ret = new QWebPluginFactory::MimeType(*param1); - *outptr_QWebPluginFactory__MimeType = ret; +QWebPluginFactory__MimeType* QWebPluginFactory__MimeType_new(QWebPluginFactory__MimeType* param1) { + return new QWebPluginFactory::MimeType(*param1); } bool QWebPluginFactory__MimeType_OperatorEqual(const QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* other) { @@ -604,9 +603,8 @@ void QWebPluginFactory__MimeType_Delete(QWebPluginFactory__MimeType* self, bool } } -void QWebPluginFactory__Plugin_new(QWebPluginFactory__Plugin* param1, QWebPluginFactory__Plugin** outptr_QWebPluginFactory__Plugin) { - QWebPluginFactory::Plugin* ret = new QWebPluginFactory::Plugin(*param1); - *outptr_QWebPluginFactory__Plugin = ret; +QWebPluginFactory__Plugin* QWebPluginFactory__Plugin_new(QWebPluginFactory__Plugin* param1) { + return new QWebPluginFactory::Plugin(*param1); } void QWebPluginFactory__Plugin_OperatorAssign(QWebPluginFactory__Plugin* self, QWebPluginFactory__Plugin* param1) { diff --git a/qt/webkit/gen_qwebpluginfactory.go b/qt/webkit/gen_qwebpluginfactory.go index a8c9f00f..90e69b98 100644 --- a/qt/webkit/gen_qwebpluginfactory.go +++ b/qt/webkit/gen_qwebpluginfactory.go @@ -36,42 +36,34 @@ func (this *QWebPluginFactory) UnsafePointer() unsafe.Pointer { } // newQWebPluginFactory constructs the type using only CGO pointers. -func newQWebPluginFactory(h *C.QWebPluginFactory, h_QObject *C.QObject) *QWebPluginFactory { +func newQWebPluginFactory(h *C.QWebPluginFactory) *QWebPluginFactory { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebPluginFactory_virtbase(h, &outptr_QObject) + return &QWebPluginFactory{h: h, - QObject: qt.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebPluginFactory constructs the type using only unsafe pointers. -func UnsafeNewQWebPluginFactory(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebPluginFactory { - if h == nil { - return nil - } - - return &QWebPluginFactory{h: (*C.QWebPluginFactory)(h), - QObject: qt.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebPluginFactory(h unsafe.Pointer) *QWebPluginFactory { + return newQWebPluginFactory((*C.QWebPluginFactory)(h)) } // NewQWebPluginFactory constructs a new QWebPluginFactory object. func NewQWebPluginFactory() *QWebPluginFactory { - var outptr_QWebPluginFactory *C.QWebPluginFactory = nil - var outptr_QObject *C.QObject = nil - C.QWebPluginFactory_new(&outptr_QWebPluginFactory, &outptr_QObject) - ret := newQWebPluginFactory(outptr_QWebPluginFactory, outptr_QObject) + ret := newQWebPluginFactory(C.QWebPluginFactory_new()) ret.isSubclass = true return ret } // NewQWebPluginFactory2 constructs a new QWebPluginFactory object. func NewQWebPluginFactory2(parent *qt.QObject) *QWebPluginFactory { - var outptr_QWebPluginFactory *C.QWebPluginFactory = nil - var outptr_QObject *C.QObject = nil - C.QWebPluginFactory_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebPluginFactory, &outptr_QObject) - ret := newQWebPluginFactory(outptr_QWebPluginFactory, outptr_QObject) + ret := newQWebPluginFactory(C.QWebPluginFactory_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -434,7 +426,7 @@ func miqt_exec_callback_QWebPluginFactory_TimerEvent(self *C.QWebPluginFactory, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QWebPluginFactory{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -460,7 +452,7 @@ func miqt_exec_callback_QWebPluginFactory_ChildEvent(self *C.QWebPluginFactory, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QWebPluginFactory{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -582,24 +574,19 @@ func newQWebPluginFactory__MimeType(h *C.QWebPluginFactory__MimeType) *QWebPlugi if h == nil { return nil } + return &QWebPluginFactory__MimeType{h: h} } // UnsafeNewQWebPluginFactory__MimeType constructs the type using only unsafe pointers. func UnsafeNewQWebPluginFactory__MimeType(h unsafe.Pointer) *QWebPluginFactory__MimeType { - if h == nil { - return nil - } - - return &QWebPluginFactory__MimeType{h: (*C.QWebPluginFactory__MimeType)(h)} + return newQWebPluginFactory__MimeType((*C.QWebPluginFactory__MimeType)(h)) } // NewQWebPluginFactory__MimeType constructs a new QWebPluginFactory::MimeType object. func NewQWebPluginFactory__MimeType(param1 *QWebPluginFactory__MimeType) *QWebPluginFactory__MimeType { - var outptr_QWebPluginFactory__MimeType *C.QWebPluginFactory__MimeType = nil - C.QWebPluginFactory__MimeType_new(param1.cPointer(), &outptr_QWebPluginFactory__MimeType) - ret := newQWebPluginFactory__MimeType(outptr_QWebPluginFactory__MimeType) + ret := newQWebPluginFactory__MimeType(C.QWebPluginFactory__MimeType_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -654,24 +641,19 @@ func newQWebPluginFactory__Plugin(h *C.QWebPluginFactory__Plugin) *QWebPluginFac if h == nil { return nil } + return &QWebPluginFactory__Plugin{h: h} } // UnsafeNewQWebPluginFactory__Plugin constructs the type using only unsafe pointers. func UnsafeNewQWebPluginFactory__Plugin(h unsafe.Pointer) *QWebPluginFactory__Plugin { - if h == nil { - return nil - } - - return &QWebPluginFactory__Plugin{h: (*C.QWebPluginFactory__Plugin)(h)} + return newQWebPluginFactory__Plugin((*C.QWebPluginFactory__Plugin)(h)) } // NewQWebPluginFactory__Plugin constructs a new QWebPluginFactory::Plugin object. func NewQWebPluginFactory__Plugin(param1 *QWebPluginFactory__Plugin) *QWebPluginFactory__Plugin { - var outptr_QWebPluginFactory__Plugin *C.QWebPluginFactory__Plugin = nil - C.QWebPluginFactory__Plugin_new(param1.cPointer(), &outptr_QWebPluginFactory__Plugin) - ret := newQWebPluginFactory__Plugin(outptr_QWebPluginFactory__Plugin) + ret := newQWebPluginFactory__Plugin(C.QWebPluginFactory__Plugin_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -718,16 +700,13 @@ func newQWebPluginFactory__ExtensionOption(h *C.QWebPluginFactory__ExtensionOpti if h == nil { return nil } + return &QWebPluginFactory__ExtensionOption{h: h} } // UnsafeNewQWebPluginFactory__ExtensionOption constructs the type using only unsafe pointers. func UnsafeNewQWebPluginFactory__ExtensionOption(h unsafe.Pointer) *QWebPluginFactory__ExtensionOption { - if h == nil { - return nil - } - - return &QWebPluginFactory__ExtensionOption{h: (*C.QWebPluginFactory__ExtensionOption)(h)} + return newQWebPluginFactory__ExtensionOption((*C.QWebPluginFactory__ExtensionOption)(h)) } // Delete this object from C++ memory. @@ -768,16 +747,13 @@ func newQWebPluginFactory__ExtensionReturn(h *C.QWebPluginFactory__ExtensionRetu if h == nil { return nil } + return &QWebPluginFactory__ExtensionReturn{h: h} } // UnsafeNewQWebPluginFactory__ExtensionReturn constructs the type using only unsafe pointers. func UnsafeNewQWebPluginFactory__ExtensionReturn(h unsafe.Pointer) *QWebPluginFactory__ExtensionReturn { - if h == nil { - return nil - } - - return &QWebPluginFactory__ExtensionReturn{h: (*C.QWebPluginFactory__ExtensionReturn)(h)} + return newQWebPluginFactory__ExtensionReturn((*C.QWebPluginFactory__ExtensionReturn)(h)) } // Delete this object from C++ memory. diff --git a/qt/webkit/gen_qwebpluginfactory.h b/qt/webkit/gen_qwebpluginfactory.h index d1abc450..8fdbfb9f 100644 --- a/qt/webkit/gen_qwebpluginfactory.h +++ b/qt/webkit/gen_qwebpluginfactory.h @@ -58,8 +58,9 @@ typedef struct QWebPluginFactory__MimeType QWebPluginFactory__MimeType; typedef struct QWebPluginFactory__Plugin QWebPluginFactory__Plugin; #endif -void QWebPluginFactory_new(QWebPluginFactory** outptr_QWebPluginFactory, QObject** outptr_QObject); -void QWebPluginFactory_new2(QObject* parent, QWebPluginFactory** outptr_QWebPluginFactory, QObject** outptr_QObject); +QWebPluginFactory* QWebPluginFactory_new(); +QWebPluginFactory* QWebPluginFactory_new2(QObject* parent); +void QWebPluginFactory_virtbase(QWebPluginFactory* src, QObject** outptr_QObject); QMetaObject* QWebPluginFactory_MetaObject(const QWebPluginFactory* self); void* QWebPluginFactory_Metacast(QWebPluginFactory* self, const char* param1); struct miqt_string QWebPluginFactory_Tr(const char* s); @@ -99,13 +100,13 @@ void QWebPluginFactory_override_virtual_DisconnectNotify(void* self, intptr_t sl void QWebPluginFactory_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QWebPluginFactory_Delete(QWebPluginFactory* self, bool isSubclass); -void QWebPluginFactory__MimeType_new(QWebPluginFactory__MimeType* param1, QWebPluginFactory__MimeType** outptr_QWebPluginFactory__MimeType); +QWebPluginFactory__MimeType* QWebPluginFactory__MimeType_new(QWebPluginFactory__MimeType* param1); bool QWebPluginFactory__MimeType_OperatorEqual(const QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* other); bool QWebPluginFactory__MimeType_OperatorNotEqual(const QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* other); void QWebPluginFactory__MimeType_OperatorAssign(QWebPluginFactory__MimeType* self, QWebPluginFactory__MimeType* param1); void QWebPluginFactory__MimeType_Delete(QWebPluginFactory__MimeType* self, bool isSubclass); -void QWebPluginFactory__Plugin_new(QWebPluginFactory__Plugin* param1, QWebPluginFactory__Plugin** outptr_QWebPluginFactory__Plugin); +QWebPluginFactory__Plugin* QWebPluginFactory__Plugin_new(QWebPluginFactory__Plugin* param1); void QWebPluginFactory__Plugin_OperatorAssign(QWebPluginFactory__Plugin* self, QWebPluginFactory__Plugin* param1); void QWebPluginFactory__Plugin_Delete(QWebPluginFactory__Plugin* self, bool isSubclass); diff --git a/qt/webkit/gen_qwebsecurityorigin.cpp b/qt/webkit/gen_qwebsecurityorigin.cpp index 18e91fde..9ba3ea59 100644 --- a/qt/webkit/gen_qwebsecurityorigin.cpp +++ b/qt/webkit/gen_qwebsecurityorigin.cpp @@ -9,14 +9,12 @@ #include "gen_qwebsecurityorigin.h" #include "_cgo_export.h" -void QWebSecurityOrigin_new(QUrl* url, QWebSecurityOrigin** outptr_QWebSecurityOrigin) { - QWebSecurityOrigin* ret = new QWebSecurityOrigin(*url); - *outptr_QWebSecurityOrigin = ret; +QWebSecurityOrigin* QWebSecurityOrigin_new(QUrl* url) { + return new QWebSecurityOrigin(*url); } -void QWebSecurityOrigin_new2(QWebSecurityOrigin* other, QWebSecurityOrigin** outptr_QWebSecurityOrigin) { - QWebSecurityOrigin* ret = new QWebSecurityOrigin(*other); - *outptr_QWebSecurityOrigin = ret; +QWebSecurityOrigin* QWebSecurityOrigin_new2(QWebSecurityOrigin* other) { + return new QWebSecurityOrigin(*other); } struct miqt_array /* of QWebSecurityOrigin* */ QWebSecurityOrigin_AllOrigins() { diff --git a/qt/webkit/gen_qwebsecurityorigin.go b/qt/webkit/gen_qwebsecurityorigin.go index 603b9c16..eaa32cfc 100644 --- a/qt/webkit/gen_qwebsecurityorigin.go +++ b/qt/webkit/gen_qwebsecurityorigin.go @@ -45,34 +45,27 @@ func newQWebSecurityOrigin(h *C.QWebSecurityOrigin) *QWebSecurityOrigin { if h == nil { return nil } + return &QWebSecurityOrigin{h: h} } // UnsafeNewQWebSecurityOrigin constructs the type using only unsafe pointers. func UnsafeNewQWebSecurityOrigin(h unsafe.Pointer) *QWebSecurityOrigin { - if h == nil { - return nil - } - - return &QWebSecurityOrigin{h: (*C.QWebSecurityOrigin)(h)} + return newQWebSecurityOrigin((*C.QWebSecurityOrigin)(h)) } // NewQWebSecurityOrigin constructs a new QWebSecurityOrigin object. func NewQWebSecurityOrigin(url *qt.QUrl) *QWebSecurityOrigin { - var outptr_QWebSecurityOrigin *C.QWebSecurityOrigin = nil - C.QWebSecurityOrigin_new((*C.QUrl)(url.UnsafePointer()), &outptr_QWebSecurityOrigin) - ret := newQWebSecurityOrigin(outptr_QWebSecurityOrigin) + ret := newQWebSecurityOrigin(C.QWebSecurityOrigin_new((*C.QUrl)(url.UnsafePointer()))) ret.isSubclass = true return ret } // NewQWebSecurityOrigin2 constructs a new QWebSecurityOrigin object. func NewQWebSecurityOrigin2(other *QWebSecurityOrigin) *QWebSecurityOrigin { - var outptr_QWebSecurityOrigin *C.QWebSecurityOrigin = nil - C.QWebSecurityOrigin_new2(other.cPointer(), &outptr_QWebSecurityOrigin) - ret := newQWebSecurityOrigin(outptr_QWebSecurityOrigin) + ret := newQWebSecurityOrigin(C.QWebSecurityOrigin_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt/webkit/gen_qwebsecurityorigin.h b/qt/webkit/gen_qwebsecurityorigin.h index 1a605efe..6321a88e 100644 --- a/qt/webkit/gen_qwebsecurityorigin.h +++ b/qt/webkit/gen_qwebsecurityorigin.h @@ -24,8 +24,8 @@ typedef struct QWebDatabase QWebDatabase; typedef struct QWebSecurityOrigin QWebSecurityOrigin; #endif -void QWebSecurityOrigin_new(QUrl* url, QWebSecurityOrigin** outptr_QWebSecurityOrigin); -void QWebSecurityOrigin_new2(QWebSecurityOrigin* other, QWebSecurityOrigin** outptr_QWebSecurityOrigin); +QWebSecurityOrigin* QWebSecurityOrigin_new(QUrl* url); +QWebSecurityOrigin* QWebSecurityOrigin_new2(QWebSecurityOrigin* other); struct miqt_array /* of QWebSecurityOrigin* */ QWebSecurityOrigin_AllOrigins(); void QWebSecurityOrigin_AddLocalScheme(struct miqt_string scheme); void QWebSecurityOrigin_RemoveLocalScheme(struct miqt_string scheme); diff --git a/qt/webkit/gen_qwebsettings.go b/qt/webkit/gen_qwebsettings.go index b3299e76..79de1dfc 100644 --- a/qt/webkit/gen_qwebsettings.go +++ b/qt/webkit/gen_qwebsettings.go @@ -124,16 +124,13 @@ func newQWebSettings(h *C.QWebSettings) *QWebSettings { if h == nil { return nil } + return &QWebSettings{h: h} } // UnsafeNewQWebSettings constructs the type using only unsafe pointers. func UnsafeNewQWebSettings(h unsafe.Pointer) *QWebSettings { - if h == nil { - return nil - } - - return &QWebSettings{h: (*C.QWebSettings)(h)} + return newQWebSettings((*C.QWebSettings)(h)) } func QWebSettings_GlobalSettings() *QWebSettings { @@ -265,7 +262,7 @@ func QWebSettings_SetWebGraphic(typeVal QWebSettings__WebGraphic, graphic *qt.QP } func QWebSettings_WebGraphic(typeVal QWebSettings__WebGraphic) *qt.QPixmap { - _goptr := qt.UnsafeNewQPixmap(unsafe.Pointer(C.QWebSettings_WebGraphic((C.int)(typeVal))), nil) + _goptr := qt.UnsafeNewQPixmap(unsafe.Pointer(C.QWebSettings_WebGraphic((C.int)(typeVal)))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt/webkit/gen_qwebview.cpp b/qt/webkit/gen_qwebview.cpp index 5bef30e1..4a5ec3a7 100644 --- a/qt/webkit/gen_qwebview.cpp +++ b/qt/webkit/gen_qwebview.cpp @@ -1052,20 +1052,16 @@ public: }; -void QWebView_new(QWidget* parent, QWebView** outptr_QWebView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWebView* ret = new MiqtVirtualQWebView(parent); - *outptr_QWebView = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWebView* QWebView_new(QWidget* parent) { + return new MiqtVirtualQWebView(parent); } -void QWebView_new2(QWebView** outptr_QWebView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWebView* ret = new MiqtVirtualQWebView(); - *outptr_QWebView = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWebView* QWebView_new2() { + return new MiqtVirtualQWebView(); +} + +void QWebView_virtbase(QWebView* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QWebView_MetaObject(const QWebView* self) { diff --git a/qt/webkit/gen_qwebview.go b/qt/webkit/gen_qwebview.go index 366cb086..03d215c6 100644 --- a/qt/webkit/gen_qwebview.go +++ b/qt/webkit/gen_qwebview.go @@ -38,46 +38,34 @@ func (this *QWebView) UnsafePointer() unsafe.Pointer { } // newQWebView constructs the type using only CGO pointers. -func newQWebView(h *C.QWebView, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWebView { +func newQWebView(h *C.QWebView) *QWebView { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QWebView_virtbase(h, &outptr_QWidget) + return &QWebView{h: h, - QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QWidget: qt.UnsafeNewQWidget(unsafe.Pointer(outptr_QWidget))} } // UnsafeNewQWebView constructs the type using only unsafe pointers. -func UnsafeNewQWebView(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWebView { - if h == nil { - return nil - } - - return &QWebView{h: (*C.QWebView)(h), - QWidget: qt.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQWebView(h unsafe.Pointer) *QWebView { + return newQWebView((*C.QWebView)(h)) } // NewQWebView constructs a new QWebView object. func NewQWebView(parent *qt.QWidget) *QWebView { - var outptr_QWebView *C.QWebView = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWebView_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QWebView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWebView(outptr_QWebView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWebView(C.QWebView_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQWebView2 constructs a new QWebView object. func NewQWebView2() *QWebView { - var outptr_QWebView *C.QWebView = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWebView_new2(&outptr_QWebView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWebView(outptr_QWebView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWebView(C.QWebView_new2()) ret.isSubclass = true return ret } @@ -111,7 +99,7 @@ func QWebView_TrUtf8(s string) string { } func (this *QWebView) Page() *QWebPage { - return newQWebPage(C.QWebView_Page(this.h), nil) + return newQWebPage(C.QWebView_Page(this.h)) } func (this *QWebView) SetPage(page *QWebPage) { @@ -191,7 +179,7 @@ func (this *QWebView) SelectedHtml() string { } func (this *QWebView) PageAction(action QWebPage__WebAction) *qt.QAction { - return qt.UnsafeNewQAction(unsafe.Pointer(C.QWebView_PageAction(this.h, (C.int)(action))), nil) + return qt.UnsafeNewQAction(unsafe.Pointer(C.QWebView_PageAction(this.h, (C.int)(action)))) } func (this *QWebView) TriggerPageAction(action QWebPage__WebAction) { @@ -665,7 +653,7 @@ func miqt_exec_callback_QWebView_ResizeEvent(self *C.QWebView, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQResizeEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -691,7 +679,7 @@ func miqt_exec_callback_QWebView_PaintEvent(self *C.QWebView, cb C.intptr_t, par } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQPaintEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -699,7 +687,7 @@ func miqt_exec_callback_QWebView_PaintEvent(self *C.QWebView, cb C.intptr_t, par func (this *QWebView) callVirtualBase_CreateWindow(typeVal QWebPage__WebWindowType) *QWebView { - return newQWebView(C.QWebView_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal)), nil, nil, nil) + return newQWebView(C.QWebView_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal))) } func (this *QWebView) OnCreateWindow(slot func(super func(typeVal QWebPage__WebWindowType) *QWebView, typeVal QWebPage__WebWindowType) *QWebView) { @@ -771,7 +759,7 @@ func miqt_exec_callback_QWebView_MouseMoveEvent(self *C.QWebView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -797,7 +785,7 @@ func miqt_exec_callback_QWebView_MousePressEvent(self *C.QWebView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -823,7 +811,7 @@ func miqt_exec_callback_QWebView_MouseDoubleClickEvent(self *C.QWebView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -849,7 +837,7 @@ func miqt_exec_callback_QWebView_MouseReleaseEvent(self *C.QWebView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQMouseEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -875,7 +863,7 @@ func miqt_exec_callback_QWebView_ContextMenuEvent(self *C.QWebView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -901,7 +889,7 @@ func miqt_exec_callback_QWebView_WheelEvent(self *C.QWebView, cb C.intptr_t, par } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQWheelEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -927,7 +915,7 @@ func miqt_exec_callback_QWebView_KeyPressEvent(self *C.QWebView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -953,7 +941,7 @@ func miqt_exec_callback_QWebView_KeyReleaseEvent(self *C.QWebView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQKeyEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -979,7 +967,7 @@ func miqt_exec_callback_QWebView_DragEnterEvent(self *C.QWebView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(param1), nil, nil, nil) + slotval1 := qt.UnsafeNewQDragEnterEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1005,7 +993,7 @@ func miqt_exec_callback_QWebView_DragLeaveEvent(self *C.QWebView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQDragLeaveEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1031,7 +1019,7 @@ func miqt_exec_callback_QWebView_DragMoveEvent(self *C.QWebView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt.UnsafeNewQDragMoveEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1057,7 +1045,7 @@ func miqt_exec_callback_QWebView_DropEvent(self *C.QWebView, cb C.intptr_t, para } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQDropEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1083,7 +1071,7 @@ func miqt_exec_callback_QWebView_FocusInEvent(self *C.QWebView, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1109,7 +1097,7 @@ func miqt_exec_callback_QWebView_FocusOutEvent(self *C.QWebView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQFocusEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1135,7 +1123,7 @@ func miqt_exec_callback_QWebView_InputMethodEvent(self *C.QWebView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + slotval1 := qt.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1)) gofunc((&QWebView{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -1397,7 +1385,7 @@ func miqt_exec_callback_QWebView_MoveEvent(self *C.QWebView, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQMoveEvent(unsafe.Pointer(event)) gofunc((&QWebView{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1423,7 +1411,7 @@ func miqt_exec_callback_QWebView_CloseEvent(self *C.QWebView, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQCloseEvent(unsafe.Pointer(event)) gofunc((&QWebView{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1449,7 +1437,7 @@ func miqt_exec_callback_QWebView_TabletEvent(self *C.QWebView, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt.UnsafeNewQTabletEvent(unsafe.Pointer(event)) gofunc((&QWebView{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1475,7 +1463,7 @@ func miqt_exec_callback_QWebView_ActionEvent(self *C.QWebView, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQActionEvent(unsafe.Pointer(event)) gofunc((&QWebView{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1501,7 +1489,7 @@ func miqt_exec_callback_QWebView_ShowEvent(self *C.QWebView, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQShowEvent(unsafe.Pointer(event)) gofunc((&QWebView{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1527,7 +1515,7 @@ func miqt_exec_callback_QWebView_HideEvent(self *C.QWebView, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + slotval1 := qt.UnsafeNewQHideEvent(unsafe.Pointer(event)) gofunc((&QWebView{h: self}).callVirtualBase_HideEvent, slotval1) diff --git a/qt/webkit/gen_qwebview.h b/qt/webkit/gen_qwebview.h index 7ed7a082..cc3316e3 100644 --- a/qt/webkit/gen_qwebview.h +++ b/qt/webkit/gen_qwebview.h @@ -92,8 +92,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QWebView_new(QWidget* parent, QWebView** outptr_QWebView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWebView_new2(QWebView** outptr_QWebView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QWebView* QWebView_new(QWidget* parent); +QWebView* QWebView_new2(); +void QWebView_virtbase(QWebView* src, QWidget** outptr_QWidget); QMetaObject* QWebView_MetaObject(const QWebView* self); void* QWebView_Metacast(QWebView* self, const char* param1); struct miqt_string QWebView_Tr(const char* s); diff --git a/qt6/cbor/gen_qcborarray.cpp b/qt6/cbor/gen_qcborarray.cpp index 25f2b6ad..f2c20c11 100644 --- a/qt6/cbor/gen_qcborarray.cpp +++ b/qt6/cbor/gen_qcborarray.cpp @@ -13,14 +13,12 @@ #include "gen_qcborarray.h" #include "_cgo_export.h" -void QCborArray_new(QCborArray** outptr_QCborArray) { - QCborArray* ret = new QCborArray(); - *outptr_QCborArray = ret; +QCborArray* QCborArray_new() { + return new QCborArray(); } -void QCborArray_new2(QCborArray* other, QCborArray** outptr_QCborArray) { - QCborArray* ret = new QCborArray(*other); - *outptr_QCborArray = ret; +QCborArray* QCborArray_new2(QCborArray* other) { + return new QCborArray(*other); } void QCborArray_OperatorAssign(QCborArray* self, QCborArray* other) { @@ -251,14 +249,12 @@ void QCborArray_Delete(QCborArray* self, bool isSubclass) { } } -void QCborArray__Iterator_new(QCborArray__Iterator** outptr_QCborArray__Iterator) { - QCborArray::Iterator* ret = new QCborArray::Iterator(); - *outptr_QCborArray__Iterator = ret; +QCborArray__Iterator* QCborArray__Iterator_new() { + return new QCborArray::Iterator(); } -void QCborArray__Iterator_new2(QCborArray__Iterator* param1, QCborArray__Iterator** outptr_QCborArray__Iterator) { - QCborArray::Iterator* ret = new QCborArray::Iterator(*param1); - *outptr_QCborArray__Iterator = ret; +QCborArray__Iterator* QCborArray__Iterator_new2(QCborArray__Iterator* param1) { + return new QCborArray::Iterator(*param1); } void QCborArray__Iterator_OperatorAssign(QCborArray__Iterator* self, QCborArray__Iterator* other) { @@ -382,14 +378,12 @@ void QCborArray__Iterator_Delete(QCborArray__Iterator* self, bool isSubclass) { } } -void QCborArray__ConstIterator_new(QCborArray__ConstIterator** outptr_QCborArray__ConstIterator) { - QCborArray::ConstIterator* ret = new QCborArray::ConstIterator(); - *outptr_QCborArray__ConstIterator = ret; +QCborArray__ConstIterator* QCborArray__ConstIterator_new() { + return new QCborArray::ConstIterator(); } -void QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1, QCborArray__ConstIterator** outptr_QCborArray__ConstIterator) { - QCborArray::ConstIterator* ret = new QCborArray::ConstIterator(*param1); - *outptr_QCborArray__ConstIterator = ret; +QCborArray__ConstIterator* QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1) { + return new QCborArray::ConstIterator(*param1); } void QCborArray__ConstIterator_OperatorAssign(QCborArray__ConstIterator* self, QCborArray__ConstIterator* other) { diff --git a/qt6/cbor/gen_qcborarray.go b/qt6/cbor/gen_qcborarray.go index 748e7700..a754a678 100644 --- a/qt6/cbor/gen_qcborarray.go +++ b/qt6/cbor/gen_qcborarray.go @@ -38,34 +38,27 @@ func newQCborArray(h *C.QCborArray) *QCborArray { if h == nil { return nil } + return &QCborArray{h: h} } // UnsafeNewQCborArray constructs the type using only unsafe pointers. func UnsafeNewQCborArray(h unsafe.Pointer) *QCborArray { - if h == nil { - return nil - } - - return &QCborArray{h: (*C.QCborArray)(h)} + return newQCborArray((*C.QCborArray)(h)) } // NewQCborArray constructs a new QCborArray object. func NewQCborArray() *QCborArray { - var outptr_QCborArray *C.QCborArray = nil - C.QCborArray_new(&outptr_QCborArray) - ret := newQCborArray(outptr_QCborArray) + ret := newQCborArray(C.QCborArray_new()) ret.isSubclass = true return ret } // NewQCborArray2 constructs a new QCborArray object. func NewQCborArray2(other *QCborArray) *QCborArray { - var outptr_QCborArray *C.QCborArray = nil - C.QCborArray_new2(other.cPointer(), &outptr_QCborArray) - ret := newQCborArray(outptr_QCborArray) + ret := newQCborArray(C.QCborArray_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -121,19 +114,19 @@ func (this *QCborArray) OperatorSubscript(i int64) *QCborValue { } func (this *QCborArray) First2() *QCborValueRef { - _goptr := newQCborValueRef(C.QCborArray_First2(this.h), nil) + _goptr := newQCborValueRef(C.QCborArray_First2(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCborArray) Last2() *QCborValueRef { - _goptr := newQCborValueRef(C.QCborArray_Last2(this.h), nil) + _goptr := newQCborValueRef(C.QCborArray_Last2(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCborArray) OperatorSubscriptWithQsizetype(i int64) *QCborValueRef { - _goptr := newQCborValueRef(C.QCborArray_OperatorSubscriptWithQsizetype(this.h, (C.ptrdiff_t)(i)), nil) + _goptr := newQCborValueRef(C.QCborArray_OperatorSubscriptWithQsizetype(this.h, (C.ptrdiff_t)(i))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -384,34 +377,27 @@ func newQCborArray__Iterator(h *C.QCborArray__Iterator) *QCborArray__Iterator { if h == nil { return nil } + return &QCborArray__Iterator{h: h} } // UnsafeNewQCborArray__Iterator constructs the type using only unsafe pointers. func UnsafeNewQCborArray__Iterator(h unsafe.Pointer) *QCborArray__Iterator { - if h == nil { - return nil - } - - return &QCborArray__Iterator{h: (*C.QCborArray__Iterator)(h)} + return newQCborArray__Iterator((*C.QCborArray__Iterator)(h)) } // NewQCborArray__Iterator constructs a new QCborArray::Iterator object. func NewQCborArray__Iterator() *QCborArray__Iterator { - var outptr_QCborArray__Iterator *C.QCborArray__Iterator = nil - C.QCborArray__Iterator_new(&outptr_QCborArray__Iterator) - ret := newQCborArray__Iterator(outptr_QCborArray__Iterator) + ret := newQCborArray__Iterator(C.QCborArray__Iterator_new()) ret.isSubclass = true return ret } // NewQCborArray__Iterator2 constructs a new QCborArray::Iterator object. func NewQCborArray__Iterator2(param1 *QCborArray__Iterator) *QCborArray__Iterator { - var outptr_QCborArray__Iterator *C.QCborArray__Iterator = nil - C.QCborArray__Iterator_new2(param1.cPointer(), &outptr_QCborArray__Iterator) - ret := newQCborArray__Iterator(outptr_QCborArray__Iterator) + ret := newQCborArray__Iterator(C.QCborArray__Iterator_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -421,13 +407,13 @@ func (this *QCborArray__Iterator) OperatorAssign(other *QCborArray__Iterator) { } func (this *QCborArray__Iterator) OperatorMultiply() *QCborValueRef { - _goptr := newQCborValueRef(C.QCborArray__Iterator_OperatorMultiply(this.h), nil) + _goptr := newQCborValueRef(C.QCborArray__Iterator_OperatorMultiply(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCborArray__Iterator) OperatorMinusGreater() *QCborValueRef { - return newQCborValueRef(C.QCborArray__Iterator_OperatorMinusGreater(this.h), nil) + return newQCborValueRef(C.QCborArray__Iterator_OperatorMinusGreater(this.h)) } func (this *QCborArray__Iterator) OperatorMinusGreater2() *QCborValueConstRef { @@ -435,7 +421,7 @@ func (this *QCborArray__Iterator) OperatorMinusGreater2() *QCborValueConstRef { } func (this *QCborArray__Iterator) OperatorSubscript(j int64) *QCborValueRef { - _goptr := newQCborValueRef(C.QCborArray__Iterator_OperatorSubscript(this.h, (C.ptrdiff_t)(j)), nil) + _goptr := newQCborValueRef(C.QCborArray__Iterator_OperatorSubscript(this.h, (C.ptrdiff_t)(j))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -570,34 +556,27 @@ func newQCborArray__ConstIterator(h *C.QCborArray__ConstIterator) *QCborArray__C if h == nil { return nil } + return &QCborArray__ConstIterator{h: h} } // UnsafeNewQCborArray__ConstIterator constructs the type using only unsafe pointers. func UnsafeNewQCborArray__ConstIterator(h unsafe.Pointer) *QCborArray__ConstIterator { - if h == nil { - return nil - } - - return &QCborArray__ConstIterator{h: (*C.QCborArray__ConstIterator)(h)} + return newQCborArray__ConstIterator((*C.QCborArray__ConstIterator)(h)) } // NewQCborArray__ConstIterator constructs a new QCborArray::ConstIterator object. func NewQCborArray__ConstIterator() *QCborArray__ConstIterator { - var outptr_QCborArray__ConstIterator *C.QCborArray__ConstIterator = nil - C.QCborArray__ConstIterator_new(&outptr_QCborArray__ConstIterator) - ret := newQCborArray__ConstIterator(outptr_QCborArray__ConstIterator) + ret := newQCborArray__ConstIterator(C.QCborArray__ConstIterator_new()) ret.isSubclass = true return ret } // NewQCborArray__ConstIterator2 constructs a new QCborArray::ConstIterator object. func NewQCborArray__ConstIterator2(param1 *QCborArray__ConstIterator) *QCborArray__ConstIterator { - var outptr_QCborArray__ConstIterator *C.QCborArray__ConstIterator = nil - C.QCborArray__ConstIterator_new2(param1.cPointer(), &outptr_QCborArray__ConstIterator) - ret := newQCborArray__ConstIterator(outptr_QCborArray__ConstIterator) + ret := newQCborArray__ConstIterator(C.QCborArray__ConstIterator_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/cbor/gen_qcborarray.h b/qt6/cbor/gen_qcborarray.h index 827f4b1f..2ab8e052 100644 --- a/qt6/cbor/gen_qcborarray.h +++ b/qt6/cbor/gen_qcborarray.h @@ -40,8 +40,8 @@ typedef struct QCborValueRef QCborValueRef; typedef struct QJsonArray QJsonArray; #endif -void QCborArray_new(QCborArray** outptr_QCborArray); -void QCborArray_new2(QCborArray* other, QCborArray** outptr_QCborArray); +QCborArray* QCborArray_new(); +QCborArray* QCborArray_new2(QCborArray* other); void QCborArray_OperatorAssign(QCborArray* self, QCborArray* other); void QCborArray_Swap(QCborArray* self, QCborArray* other); QCborValue* QCborArray_ToCborValue(const QCborArray* self); @@ -96,8 +96,8 @@ QCborArray* QCborArray_FromJsonArray(QJsonArray* array); QJsonArray* QCborArray_ToJsonArray(const QCborArray* self); void QCborArray_Delete(QCborArray* self, bool isSubclass); -void QCborArray__Iterator_new(QCborArray__Iterator** outptr_QCborArray__Iterator); -void QCborArray__Iterator_new2(QCborArray__Iterator* param1, QCborArray__Iterator** outptr_QCborArray__Iterator); +QCborArray__Iterator* QCborArray__Iterator_new(); +QCborArray__Iterator* QCborArray__Iterator_new2(QCborArray__Iterator* param1); void QCborArray__Iterator_OperatorAssign(QCborArray__Iterator* self, QCborArray__Iterator* other); QCborValueRef* QCborArray__Iterator_OperatorMultiply(const QCborArray__Iterator* self); QCborValueRef* QCborArray__Iterator_OperatorMinusGreater(QCborArray__Iterator* self); @@ -126,8 +126,8 @@ QCborArray__Iterator* QCborArray__Iterator_OperatorMinus(const QCborArray__Itera ptrdiff_t QCborArray__Iterator_OperatorMinusWithQCborArrayIterator(const QCborArray__Iterator* self, QCborArray__Iterator* j); void QCborArray__Iterator_Delete(QCborArray__Iterator* self, bool isSubclass); -void QCborArray__ConstIterator_new(QCborArray__ConstIterator** outptr_QCborArray__ConstIterator); -void QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1, QCborArray__ConstIterator** outptr_QCborArray__ConstIterator); +QCborArray__ConstIterator* QCborArray__ConstIterator_new(); +QCborArray__ConstIterator* QCborArray__ConstIterator_new2(QCborArray__ConstIterator* param1); void QCborArray__ConstIterator_OperatorAssign(QCborArray__ConstIterator* self, QCborArray__ConstIterator* other); QCborValueConstRef* QCborArray__ConstIterator_OperatorMultiply(const QCborArray__ConstIterator* self); QCborValueConstRef* QCborArray__ConstIterator_OperatorMinusGreater(const QCborArray__ConstIterator* self); diff --git a/qt6/cbor/gen_qcborcommon.go b/qt6/cbor/gen_qcborcommon.go index 0d415e35..175078ab 100644 --- a/qt6/cbor/gen_qcborcommon.go +++ b/qt6/cbor/gen_qcborcommon.go @@ -98,16 +98,13 @@ func newQCborError(h *C.QCborError) *QCborError { if h == nil { return nil } + return &QCborError{h: h} } // UnsafeNewQCborError constructs the type using only unsafe pointers. func UnsafeNewQCborError(h unsafe.Pointer) *QCborError { - if h == nil { - return nil - } - - return &QCborError{h: (*C.QCborError)(h)} + return newQCborError((*C.QCborError)(h)) } func (this *QCborError) ToString() string { diff --git a/qt6/cbor/gen_qcbormap.cpp b/qt6/cbor/gen_qcbormap.cpp index e29025b8..edac1e67 100644 --- a/qt6/cbor/gen_qcbormap.cpp +++ b/qt6/cbor/gen_qcbormap.cpp @@ -16,14 +16,12 @@ #include "gen_qcbormap.h" #include "_cgo_export.h" -void QCborMap_new(QCborMap** outptr_QCborMap) { - QCborMap* ret = new QCborMap(); - *outptr_QCborMap = ret; +QCborMap* QCborMap_new() { + return new QCborMap(); } -void QCborMap_new2(QCborMap* other, QCborMap** outptr_QCborMap) { - QCborMap* ret = new QCborMap(*other); - *outptr_QCborMap = ret; +QCborMap* QCborMap_new2(QCborMap* other) { + return new QCborMap(*other); } void QCborMap_OperatorAssign(QCborMap* self, QCborMap* other) { @@ -360,14 +358,12 @@ void QCborMap_Delete(QCborMap* self, bool isSubclass) { } } -void QCborMap__Iterator_new(QCborMap__Iterator** outptr_QCborMap__Iterator) { - QCborMap::Iterator* ret = new QCborMap::Iterator(); - *outptr_QCborMap__Iterator = ret; +QCborMap__Iterator* QCborMap__Iterator_new() { + return new QCborMap::Iterator(); } -void QCborMap__Iterator_new2(QCborMap__Iterator* param1, QCborMap__Iterator** outptr_QCborMap__Iterator) { - QCborMap::Iterator* ret = new QCborMap::Iterator(*param1); - *outptr_QCborMap__Iterator = ret; +QCborMap__Iterator* QCborMap__Iterator_new2(QCborMap__Iterator* param1) { + return new QCborMap::Iterator(*param1); } void QCborMap__Iterator_OperatorAssign(QCborMap__Iterator* self, QCborMap__Iterator* other) { @@ -519,14 +515,12 @@ void QCborMap__Iterator_Delete(QCborMap__Iterator* self, bool isSubclass) { } } -void QCborMap__ConstIterator_new(QCborMap__ConstIterator** outptr_QCborMap__ConstIterator) { - QCborMap::ConstIterator* ret = new QCborMap::ConstIterator(); - *outptr_QCborMap__ConstIterator = ret; +QCborMap__ConstIterator* QCborMap__ConstIterator_new() { + return new QCborMap::ConstIterator(); } -void QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1, QCborMap__ConstIterator** outptr_QCborMap__ConstIterator) { - QCborMap::ConstIterator* ret = new QCborMap::ConstIterator(*param1); - *outptr_QCborMap__ConstIterator = ret; +QCborMap__ConstIterator* QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1) { + return new QCborMap::ConstIterator(*param1); } void QCborMap__ConstIterator_OperatorAssign(QCborMap__ConstIterator* self, QCborMap__ConstIterator* other) { diff --git a/qt6/cbor/gen_qcbormap.go b/qt6/cbor/gen_qcbormap.go index ac888705..cdb77988 100644 --- a/qt6/cbor/gen_qcbormap.go +++ b/qt6/cbor/gen_qcbormap.go @@ -38,34 +38,27 @@ func newQCborMap(h *C.QCborMap) *QCborMap { if h == nil { return nil } + return &QCborMap{h: h} } // UnsafeNewQCborMap constructs the type using only unsafe pointers. func UnsafeNewQCborMap(h unsafe.Pointer) *QCborMap { - if h == nil { - return nil - } - - return &QCborMap{h: (*C.QCborMap)(h)} + return newQCborMap((*C.QCborMap)(h)) } // NewQCborMap constructs a new QCborMap object. func NewQCborMap() *QCborMap { - var outptr_QCborMap *C.QCborMap = nil - C.QCborMap_new(&outptr_QCborMap) - ret := newQCborMap(outptr_QCborMap) + ret := newQCborMap(C.QCborMap_new()) ret.isSubclass = true return ret } // NewQCborMap2 constructs a new QCborMap object. func NewQCborMap2(other *QCborMap) *QCborMap { - var outptr_QCborMap *C.QCborMap = nil - C.QCborMap_new2(other.cPointer(), &outptr_QCborMap) - ret := newQCborMap(outptr_QCborMap) + ret := newQCborMap(C.QCborMap_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -153,7 +146,7 @@ func (this *QCborMap) OperatorSubscript3(key *QCborValue) *QCborValue { } func (this *QCborMap) OperatorSubscript4(key int64) *QCborValueRef { - _goptr := newQCborValueRef(C.QCborMap_OperatorSubscript4(this.h, (C.longlong)(key)), nil) + _goptr := newQCborValueRef(C.QCborMap_OperatorSubscript4(this.h, (C.longlong)(key))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -163,13 +156,13 @@ func (this *QCborMap) OperatorSubscript6(key string) *QCborValueRef { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - _goptr := newQCborValueRef(C.QCborMap_OperatorSubscript6(this.h, key_ms), nil) + _goptr := newQCborValueRef(C.QCborMap_OperatorSubscript6(this.h, key_ms)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCborMap) OperatorSubscript7(key *QCborValue) *QCborValueRef { - _goptr := newQCborValueRef(C.QCborMap_OperatorSubscript7(this.h, key.cPointer()), nil) + _goptr := newQCborValueRef(C.QCborMap_OperatorSubscript7(this.h, key.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -566,34 +559,27 @@ func newQCborMap__Iterator(h *C.QCborMap__Iterator) *QCborMap__Iterator { if h == nil { return nil } + return &QCborMap__Iterator{h: h} } // UnsafeNewQCborMap__Iterator constructs the type using only unsafe pointers. func UnsafeNewQCborMap__Iterator(h unsafe.Pointer) *QCborMap__Iterator { - if h == nil { - return nil - } - - return &QCborMap__Iterator{h: (*C.QCborMap__Iterator)(h)} + return newQCborMap__Iterator((*C.QCborMap__Iterator)(h)) } // NewQCborMap__Iterator constructs a new QCborMap::Iterator object. func NewQCborMap__Iterator() *QCborMap__Iterator { - var outptr_QCborMap__Iterator *C.QCborMap__Iterator = nil - C.QCborMap__Iterator_new(&outptr_QCborMap__Iterator) - ret := newQCborMap__Iterator(outptr_QCborMap__Iterator) + ret := newQCborMap__Iterator(C.QCborMap__Iterator_new()) ret.isSubclass = true return ret } // NewQCborMap__Iterator2 constructs a new QCborMap::Iterator object. func NewQCborMap__Iterator2(param1 *QCborMap__Iterator) *QCborMap__Iterator { - var outptr_QCborMap__Iterator *C.QCborMap__Iterator = nil - C.QCborMap__Iterator_new2(param1.cPointer(), &outptr_QCborMap__Iterator) - ret := newQCborMap__Iterator(outptr_QCborMap__Iterator) + ret := newQCborMap__Iterator(C.QCborMap__Iterator_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -613,7 +599,7 @@ func (this *QCborMap__Iterator) OperatorMultiply() struct { _first_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer _entry_First := *_first_goptr - _second_goptr := newQCborValueRef(_Second_CArray[0], nil) + _second_goptr := newQCborValueRef(_Second_CArray[0]) _second_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer _entry_Second := *_second_goptr @@ -634,7 +620,7 @@ func (this *QCborMap__Iterator) OperatorSubscript(j int64) struct { _first_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer _entry_First := *_first_goptr - _second_goptr := newQCborValueRef(_Second_CArray[0], nil) + _second_goptr := newQCborValueRef(_Second_CArray[0]) _second_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer _entry_Second := *_second_goptr @@ -645,7 +631,7 @@ func (this *QCborMap__Iterator) OperatorSubscript(j int64) struct { } func (this *QCborMap__Iterator) OperatorMinusGreater() *QCborValueRef { - return newQCborValueRef(C.QCborMap__Iterator_OperatorMinusGreater(this.h), nil) + return newQCborValueRef(C.QCborMap__Iterator_OperatorMinusGreater(this.h)) } func (this *QCborMap__Iterator) OperatorMinusGreater2() *QCborValueConstRef { @@ -659,7 +645,7 @@ func (this *QCborMap__Iterator) Key() *QCborValue { } func (this *QCborMap__Iterator) Value() *QCborValueRef { - _goptr := newQCborValueRef(C.QCborMap__Iterator_Value(this.h), nil) + _goptr := newQCborValueRef(C.QCborMap__Iterator_Value(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -794,34 +780,27 @@ func newQCborMap__ConstIterator(h *C.QCborMap__ConstIterator) *QCborMap__ConstIt if h == nil { return nil } + return &QCborMap__ConstIterator{h: h} } // UnsafeNewQCborMap__ConstIterator constructs the type using only unsafe pointers. func UnsafeNewQCborMap__ConstIterator(h unsafe.Pointer) *QCborMap__ConstIterator { - if h == nil { - return nil - } - - return &QCborMap__ConstIterator{h: (*C.QCborMap__ConstIterator)(h)} + return newQCborMap__ConstIterator((*C.QCborMap__ConstIterator)(h)) } // NewQCborMap__ConstIterator constructs a new QCborMap::ConstIterator object. func NewQCborMap__ConstIterator() *QCborMap__ConstIterator { - var outptr_QCborMap__ConstIterator *C.QCborMap__ConstIterator = nil - C.QCborMap__ConstIterator_new(&outptr_QCborMap__ConstIterator) - ret := newQCborMap__ConstIterator(outptr_QCborMap__ConstIterator) + ret := newQCborMap__ConstIterator(C.QCborMap__ConstIterator_new()) ret.isSubclass = true return ret } // NewQCborMap__ConstIterator2 constructs a new QCborMap::ConstIterator object. func NewQCborMap__ConstIterator2(param1 *QCborMap__ConstIterator) *QCborMap__ConstIterator { - var outptr_QCborMap__ConstIterator *C.QCborMap__ConstIterator = nil - C.QCborMap__ConstIterator_new2(param1.cPointer(), &outptr_QCborMap__ConstIterator) - ret := newQCborMap__ConstIterator(outptr_QCborMap__ConstIterator) + ret := newQCborMap__ConstIterator(C.QCborMap__ConstIterator_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/cbor/gen_qcbormap.h b/qt6/cbor/gen_qcbormap.h index c6a81582..eaa137e7 100644 --- a/qt6/cbor/gen_qcbormap.h +++ b/qt6/cbor/gen_qcbormap.h @@ -42,8 +42,8 @@ typedef struct QJsonObject QJsonObject; typedef struct QVariant QVariant; #endif -void QCborMap_new(QCborMap** outptr_QCborMap); -void QCborMap_new2(QCborMap* other, QCborMap** outptr_QCborMap); +QCborMap* QCborMap_new(); +QCborMap* QCborMap_new2(QCborMap* other); void QCborMap_OperatorAssign(QCborMap* self, QCborMap* other); void QCborMap_Swap(QCborMap* self, QCborMap* other); QCborValue* QCborMap_ToCborValue(const QCborMap* self); @@ -107,8 +107,8 @@ struct miqt_map /* of struct miqt_string to QVariant* */ QCborMap_ToVariantHash QJsonObject* QCborMap_ToJsonObject(const QCborMap* self); void QCborMap_Delete(QCborMap* self, bool isSubclass); -void QCborMap__Iterator_new(QCborMap__Iterator** outptr_QCborMap__Iterator); -void QCborMap__Iterator_new2(QCborMap__Iterator* param1, QCborMap__Iterator** outptr_QCborMap__Iterator); +QCborMap__Iterator* QCborMap__Iterator_new(); +QCborMap__Iterator* QCborMap__Iterator_new2(QCborMap__Iterator* param1); void QCborMap__Iterator_OperatorAssign(QCborMap__Iterator* self, QCborMap__Iterator* other); struct miqt_map /* tuple of QCborValueConstRef* and QCborValueRef* */ QCborMap__Iterator_OperatorMultiply(const QCborMap__Iterator* self); struct miqt_map /* tuple of QCborValueConstRef* and QCborValueRef* */ QCborMap__Iterator_OperatorSubscript(const QCborMap__Iterator* self, ptrdiff_t j); @@ -139,8 +139,8 @@ QCborMap__Iterator* QCborMap__Iterator_OperatorMinus(const QCborMap__Iterator* s ptrdiff_t QCborMap__Iterator_OperatorMinusWithQCborMapIterator(const QCborMap__Iterator* self, QCborMap__Iterator* j); void QCborMap__Iterator_Delete(QCborMap__Iterator* self, bool isSubclass); -void QCborMap__ConstIterator_new(QCborMap__ConstIterator** outptr_QCborMap__ConstIterator); -void QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1, QCborMap__ConstIterator** outptr_QCborMap__ConstIterator); +QCborMap__ConstIterator* QCborMap__ConstIterator_new(); +QCborMap__ConstIterator* QCborMap__ConstIterator_new2(QCborMap__ConstIterator* param1); void QCborMap__ConstIterator_OperatorAssign(QCborMap__ConstIterator* self, QCborMap__ConstIterator* other); struct miqt_map /* tuple of QCborValueConstRef* and QCborValueConstRef* */ QCborMap__ConstIterator_OperatorMultiply(const QCborMap__ConstIterator* self); struct miqt_map /* tuple of QCborValueConstRef* and QCborValueConstRef* */ QCborMap__ConstIterator_OperatorSubscript(const QCborMap__ConstIterator* self, ptrdiff_t j); diff --git a/qt6/cbor/gen_qcborstreamreader.cpp b/qt6/cbor/gen_qcborstreamreader.cpp index d60e7de0..9c8c23d4 100644 --- a/qt6/cbor/gen_qcborstreamreader.cpp +++ b/qt6/cbor/gen_qcborstreamreader.cpp @@ -6,30 +6,25 @@ #include "gen_qcborstreamreader.h" #include "_cgo_export.h" -void QCborStreamReader_new(QCborStreamReader** outptr_QCborStreamReader) { - QCborStreamReader* ret = new QCborStreamReader(); - *outptr_QCborStreamReader = ret; +QCborStreamReader* QCborStreamReader_new() { + return new QCborStreamReader(); } -void QCborStreamReader_new2(const char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader) { - QCborStreamReader* ret = new QCborStreamReader(data, (qsizetype)(lenVal)); - *outptr_QCborStreamReader = ret; +QCborStreamReader* QCborStreamReader_new2(const char* data, ptrdiff_t lenVal) { + return new QCborStreamReader(data, (qsizetype)(lenVal)); } -void QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader) { - QCborStreamReader* ret = new QCborStreamReader(static_cast(data), (qsizetype)(lenVal)); - *outptr_QCborStreamReader = ret; +QCborStreamReader* QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal) { + return new QCborStreamReader(static_cast(data), (qsizetype)(lenVal)); } -void QCborStreamReader_new4(struct miqt_string data, QCborStreamReader** outptr_QCborStreamReader) { +QCborStreamReader* QCborStreamReader_new4(struct miqt_string data) { QByteArray data_QByteArray(data.data, data.len); - QCborStreamReader* ret = new QCborStreamReader(data_QByteArray); - *outptr_QCborStreamReader = ret; + return new QCborStreamReader(data_QByteArray); } -void QCborStreamReader_new5(QIODevice* device, QCborStreamReader** outptr_QCborStreamReader) { - QCborStreamReader* ret = new QCborStreamReader(device); - *outptr_QCborStreamReader = ret; +QCborStreamReader* QCborStreamReader_new5(QIODevice* device) { + return new QCborStreamReader(device); } void QCborStreamReader_SetDevice(QCborStreamReader* self, QIODevice* device) { diff --git a/qt6/cbor/gen_qcborstreamreader.go b/qt6/cbor/gen_qcborstreamreader.go index 324742ef..c0db6acc 100644 --- a/qt6/cbor/gen_qcborstreamreader.go +++ b/qt6/cbor/gen_qcborstreamreader.go @@ -66,24 +66,19 @@ func newQCborStreamReader(h *C.QCborStreamReader) *QCborStreamReader { if h == nil { return nil } + return &QCborStreamReader{h: h} } // UnsafeNewQCborStreamReader constructs the type using only unsafe pointers. func UnsafeNewQCborStreamReader(h unsafe.Pointer) *QCborStreamReader { - if h == nil { - return nil - } - - return &QCborStreamReader{h: (*C.QCborStreamReader)(h)} + return newQCborStreamReader((*C.QCborStreamReader)(h)) } // NewQCborStreamReader constructs a new QCborStreamReader object. func NewQCborStreamReader() *QCborStreamReader { - var outptr_QCborStreamReader *C.QCborStreamReader = nil - C.QCborStreamReader_new(&outptr_QCborStreamReader) - ret := newQCborStreamReader(outptr_QCborStreamReader) + ret := newQCborStreamReader(C.QCborStreamReader_new()) ret.isSubclass = true return ret } @@ -92,20 +87,16 @@ func NewQCborStreamReader() *QCborStreamReader { func NewQCborStreamReader2(data string, lenVal int64) *QCborStreamReader { data_Cstring := C.CString(data) defer C.free(unsafe.Pointer(data_Cstring)) - var outptr_QCborStreamReader *C.QCborStreamReader = nil - C.QCborStreamReader_new2(data_Cstring, (C.ptrdiff_t)(lenVal), &outptr_QCborStreamReader) - ret := newQCborStreamReader(outptr_QCborStreamReader) + ret := newQCborStreamReader(C.QCborStreamReader_new2(data_Cstring, (C.ptrdiff_t)(lenVal))) ret.isSubclass = true return ret } // NewQCborStreamReader3 constructs a new QCborStreamReader object. func NewQCborStreamReader3(data *byte, lenVal int64) *QCborStreamReader { - var outptr_QCborStreamReader *C.QCborStreamReader = nil - C.QCborStreamReader_new3((*C.uchar)(unsafe.Pointer(data)), (C.ptrdiff_t)(lenVal), &outptr_QCborStreamReader) - ret := newQCborStreamReader(outptr_QCborStreamReader) + ret := newQCborStreamReader(C.QCborStreamReader_new3((*C.uchar)(unsafe.Pointer(data)), (C.ptrdiff_t)(lenVal))) ret.isSubclass = true return ret } @@ -115,20 +106,16 @@ func NewQCborStreamReader4(data []byte) *QCborStreamReader { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QCborStreamReader *C.QCborStreamReader = nil - C.QCborStreamReader_new4(data_alias, &outptr_QCborStreamReader) - ret := newQCborStreamReader(outptr_QCborStreamReader) + ret := newQCborStreamReader(C.QCborStreamReader_new4(data_alias)) ret.isSubclass = true return ret } // NewQCborStreamReader5 constructs a new QCborStreamReader object. func NewQCborStreamReader5(device *qt6.QIODevice) *QCborStreamReader { - var outptr_QCborStreamReader *C.QCborStreamReader = nil - C.QCborStreamReader_new5((*C.QIODevice)(device.UnsafePointer()), &outptr_QCborStreamReader) - ret := newQCborStreamReader(outptr_QCborStreamReader) + ret := newQCborStreamReader(C.QCborStreamReader_new5((*C.QIODevice)(device.UnsafePointer()))) ret.isSubclass = true return ret } @@ -138,7 +125,7 @@ func (this *QCborStreamReader) SetDevice(device *qt6.QIODevice) { } func (this *QCborStreamReader) Device() *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamReader_Device(this.h)), nil, nil) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamReader_Device(this.h))) } func (this *QCborStreamReader) AddData(data []byte) { diff --git a/qt6/cbor/gen_qcborstreamreader.h b/qt6/cbor/gen_qcborstreamreader.h index 277db532..e6d8f6e4 100644 --- a/qt6/cbor/gen_qcborstreamreader.h +++ b/qt6/cbor/gen_qcborstreamreader.h @@ -24,11 +24,11 @@ typedef struct QCborStreamReader QCborStreamReader; typedef struct QIODevice QIODevice; #endif -void QCborStreamReader_new(QCborStreamReader** outptr_QCborStreamReader); -void QCborStreamReader_new2(const char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader); -void QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal, QCborStreamReader** outptr_QCborStreamReader); -void QCborStreamReader_new4(struct miqt_string data, QCborStreamReader** outptr_QCborStreamReader); -void QCborStreamReader_new5(QIODevice* device, QCborStreamReader** outptr_QCborStreamReader); +QCborStreamReader* QCborStreamReader_new(); +QCborStreamReader* QCborStreamReader_new2(const char* data, ptrdiff_t lenVal); +QCborStreamReader* QCborStreamReader_new3(const unsigned char* data, ptrdiff_t lenVal); +QCborStreamReader* QCborStreamReader_new4(struct miqt_string data); +QCborStreamReader* QCborStreamReader_new5(QIODevice* device); void QCborStreamReader_SetDevice(QCborStreamReader* self, QIODevice* device); QIODevice* QCborStreamReader_Device(const QCborStreamReader* self); void QCborStreamReader_AddData(QCborStreamReader* self, struct miqt_string data); diff --git a/qt6/cbor/gen_qcborstreamwriter.cpp b/qt6/cbor/gen_qcborstreamwriter.cpp index a629cd9c..38e450b6 100644 --- a/qt6/cbor/gen_qcborstreamwriter.cpp +++ b/qt6/cbor/gen_qcborstreamwriter.cpp @@ -5,9 +5,8 @@ #include "gen_qcborstreamwriter.h" #include "_cgo_export.h" -void QCborStreamWriter_new(QIODevice* device, QCborStreamWriter** outptr_QCborStreamWriter) { - QCborStreamWriter* ret = new QCborStreamWriter(device); - *outptr_QCborStreamWriter = ret; +QCborStreamWriter* QCborStreamWriter_new(QIODevice* device) { + return new QCborStreamWriter(device); } void QCborStreamWriter_SetDevice(QCborStreamWriter* self, QIODevice* device) { diff --git a/qt6/cbor/gen_qcborstreamwriter.go b/qt6/cbor/gen_qcborstreamwriter.go index 2ff6a16f..cd78b651 100644 --- a/qt6/cbor/gen_qcborstreamwriter.go +++ b/qt6/cbor/gen_qcborstreamwriter.go @@ -38,24 +38,19 @@ func newQCborStreamWriter(h *C.QCborStreamWriter) *QCborStreamWriter { if h == nil { return nil } + return &QCborStreamWriter{h: h} } // UnsafeNewQCborStreamWriter constructs the type using only unsafe pointers. func UnsafeNewQCborStreamWriter(h unsafe.Pointer) *QCborStreamWriter { - if h == nil { - return nil - } - - return &QCborStreamWriter{h: (*C.QCborStreamWriter)(h)} + return newQCborStreamWriter((*C.QCborStreamWriter)(h)) } // NewQCborStreamWriter constructs a new QCborStreamWriter object. func NewQCborStreamWriter(device *qt6.QIODevice) *QCborStreamWriter { - var outptr_QCborStreamWriter *C.QCborStreamWriter = nil - C.QCborStreamWriter_new((*C.QIODevice)(device.UnsafePointer()), &outptr_QCborStreamWriter) - ret := newQCborStreamWriter(outptr_QCborStreamWriter) + ret := newQCborStreamWriter(C.QCborStreamWriter_new((*C.QIODevice)(device.UnsafePointer()))) ret.isSubclass = true return ret } @@ -65,7 +60,7 @@ func (this *QCborStreamWriter) SetDevice(device *qt6.QIODevice) { } func (this *QCborStreamWriter) Device() *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamWriter_Device(this.h)), nil, nil) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QCborStreamWriter_Device(this.h))) } func (this *QCborStreamWriter) Append(u uint64) { diff --git a/qt6/cbor/gen_qcborstreamwriter.h b/qt6/cbor/gen_qcborstreamwriter.h index ec90830e..19382bd4 100644 --- a/qt6/cbor/gen_qcborstreamwriter.h +++ b/qt6/cbor/gen_qcborstreamwriter.h @@ -22,7 +22,7 @@ typedef struct QCborStreamWriter QCborStreamWriter; typedef struct QIODevice QIODevice; #endif -void QCborStreamWriter_new(QIODevice* device, QCborStreamWriter** outptr_QCborStreamWriter); +QCborStreamWriter* QCborStreamWriter_new(QIODevice* device); void QCborStreamWriter_SetDevice(QCborStreamWriter* self, QIODevice* device); QIODevice* QCborStreamWriter_Device(const QCborStreamWriter* self); void QCborStreamWriter_Append(QCborStreamWriter* self, unsigned long long u); diff --git a/qt6/cbor/gen_qcborvalue.cpp b/qt6/cbor/gen_qcborvalue.cpp index 62319697..46d49486 100644 --- a/qt6/cbor/gen_qcborvalue.cpp +++ b/qt6/cbor/gen_qcborvalue.cpp @@ -39,116 +39,94 @@ void QCborParserError_Delete(QCborParserError* self, bool isSubclass) { } } -void QCborValue_new(QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new() { + return new QCborValue(); } -void QCborValue_new2(int t_, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(t_)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new2(int t_) { + return new QCborValue(static_cast(t_)); } -void QCborValue_new3(bool b_, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(b_); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new3(bool b_) { + return new QCborValue(b_); } -void QCborValue_new4(int i, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(i)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new4(int i) { + return new QCborValue(static_cast(i)); } -void QCborValue_new5(unsigned int u, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(u)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new5(unsigned int u) { + return new QCborValue(static_cast(u)); } -void QCborValue_new6(long long i, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(i)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new6(long long i) { + return new QCborValue(static_cast(i)); } -void QCborValue_new7(double v, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(v)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new7(double v) { + return new QCborValue(static_cast(v)); } -void QCborValue_new8(uint8_t st, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(st)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new8(uint8_t st) { + return new QCborValue(static_cast(st)); } -void QCborValue_new9(struct miqt_string ba, QCborValue** outptr_QCborValue) { +QCborValue* QCborValue_new9(struct miqt_string ba) { QByteArray ba_QByteArray(ba.data, ba.len); - QCborValue* ret = new QCborValue(ba_QByteArray); - *outptr_QCborValue = ret; + return new QCborValue(ba_QByteArray); } -void QCborValue_new10(struct miqt_string s, QCborValue** outptr_QCborValue) { +QCborValue* QCborValue_new10(struct miqt_string s) { QString s_QString = QString::fromUtf8(s.data, s.len); - QCborValue* ret = new QCborValue(s_QString); - *outptr_QCborValue = ret; + return new QCborValue(s_QString); } -void QCborValue_new11(const char* s, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(s); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new11(const char* s) { + return new QCborValue(s); } -void QCborValue_new12(QCborArray* a, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(*a); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new12(QCborArray* a) { + return new QCborValue(*a); } -void QCborValue_new13(QCborMap* m, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(*m); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new13(QCborMap* m) { + return new QCborValue(*m); } -void QCborValue_new14(uint64_t tag, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(tag)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new14(uint64_t tag) { + return new QCborValue(static_cast(tag)); } -void QCborValue_new15(int t_, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(t_)); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new15(int t_) { + return new QCborValue(static_cast(t_)); } -void QCborValue_new16(QDateTime* dt, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(*dt); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new16(QDateTime* dt) { + return new QCborValue(*dt); } -void QCborValue_new17(QUrl* url, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(*url); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new17(QUrl* url) { + return new QCborValue(*url); } -void QCborValue_new18(QRegularExpression* rx, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(*rx); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new18(QRegularExpression* rx) { + return new QCborValue(*rx); } -void QCborValue_new19(QUuid* uuid, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(*uuid); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new19(QUuid* uuid) { + return new QCborValue(*uuid); } -void QCborValue_new20(QCborValue* other, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(*other); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new20(QCborValue* other) { + return new QCborValue(*other); } -void QCborValue_new21(uint64_t tag, QCborValue* taggedValue, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(tag), *taggedValue); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new21(uint64_t tag, QCborValue* taggedValue) { + return new QCborValue(static_cast(tag), *taggedValue); } -void QCborValue_new22(int t_, QCborValue* tv, QCborValue** outptr_QCborValue) { - QCborValue* ret = new QCborValue(static_cast(t_), *tv); - *outptr_QCborValue = ret; +QCborValue* QCborValue_new22(int t_, QCborValue* tv) { + return new QCborValue(static_cast(t_), *tv); } void QCborValue_OperatorAssign(QCborValue* self, QCborValue* other) { @@ -524,9 +502,8 @@ void QCborValue_Delete(QCborValue* self, bool isSubclass) { } } -void QCborValueConstRef_new(QCborValueConstRef* param1, QCborValueConstRef** outptr_QCborValueConstRef) { - QCborValueConstRef* ret = new QCborValueConstRef(*param1); - *outptr_QCborValueConstRef = ret; +QCborValueConstRef* QCborValueConstRef_new(QCborValueConstRef* param1) { + return new QCborValueConstRef(*param1); } int QCborValueConstRef_Type(const QCborValueConstRef* self) { @@ -847,10 +824,12 @@ void QCborValueConstRef_Delete(QCborValueConstRef* self, bool isSubclass) { } } -void QCborValueRef_new(QCborValueRef* param1, QCborValueRef** outptr_QCborValueRef, QCborValueConstRef** outptr_QCborValueConstRef) { - QCborValueRef* ret = new QCborValueRef(*param1); - *outptr_QCborValueRef = ret; - *outptr_QCborValueConstRef = static_cast(ret); +QCborValueRef* QCborValueRef_new(QCborValueRef* param1) { + return new QCborValueRef(*param1); +} + +void QCborValueRef_virtbase(QCborValueRef* src, QCborValueConstRef** outptr_QCborValueConstRef) { + *outptr_QCborValueConstRef = static_cast(src); } void QCborValueRef_OperatorAssign(QCborValueRef* self, QCborValue* other) { diff --git a/qt6/cbor/gen_qcborvalue.go b/qt6/cbor/gen_qcborvalue.go index 35384235..2df04e0b 100644 --- a/qt6/cbor/gen_qcborvalue.go +++ b/qt6/cbor/gen_qcborvalue.go @@ -78,16 +78,13 @@ func newQCborParserError(h *C.QCborParserError) *QCborParserError { if h == nil { return nil } + return &QCborParserError{h: h} } // UnsafeNewQCborParserError constructs the type using only unsafe pointers. func UnsafeNewQCborParserError(h unsafe.Pointer) *QCborParserError { - if h == nil { - return nil - } - - return &QCborParserError{h: (*C.QCborParserError)(h)} + return newQCborParserError((*C.QCborParserError)(h)) } func (this *QCborParserError) ErrorString() string { @@ -135,94 +132,75 @@ func newQCborValue(h *C.QCborValue) *QCborValue { if h == nil { return nil } + return &QCborValue{h: h} } // UnsafeNewQCborValue constructs the type using only unsafe pointers. func UnsafeNewQCborValue(h unsafe.Pointer) *QCborValue { - if h == nil { - return nil - } - - return &QCborValue{h: (*C.QCborValue)(h)} + return newQCborValue((*C.QCborValue)(h)) } // NewQCborValue constructs a new QCborValue object. func NewQCborValue() *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new(&outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new()) ret.isSubclass = true return ret } // NewQCborValue2 constructs a new QCborValue object. func NewQCborValue2(t_ QCborValue__Type) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new2((C.int)(t_), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new2((C.int)(t_))) ret.isSubclass = true return ret } // NewQCborValue3 constructs a new QCborValue object. func NewQCborValue3(b_ bool) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new3((C.bool)(b_), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new3((C.bool)(b_))) ret.isSubclass = true return ret } // NewQCborValue4 constructs a new QCborValue object. func NewQCborValue4(i int) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new4((C.int)(i), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new4((C.int)(i))) ret.isSubclass = true return ret } // NewQCborValue5 constructs a new QCborValue object. func NewQCborValue5(u uint) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new5((C.uint)(u), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new5((C.uint)(u))) ret.isSubclass = true return ret } // NewQCborValue6 constructs a new QCborValue object. func NewQCborValue6(i int64) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new6((C.longlong)(i), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new6((C.longlong)(i))) ret.isSubclass = true return ret } // NewQCborValue7 constructs a new QCborValue object. func NewQCborValue7(v float64) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new7((C.double)(v), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new7((C.double)(v))) ret.isSubclass = true return ret } // NewQCborValue8 constructs a new QCborValue object. func NewQCborValue8(st QCborSimpleType) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new8((C.uint8_t)(st), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new8((C.uint8_t)(st))) ret.isSubclass = true return ret } @@ -232,10 +210,8 @@ func NewQCborValue9(ba []byte) *QCborValue { ba_alias := C.struct_miqt_string{} ba_alias.data = (*C.char)(unsafe.Pointer(&ba[0])) ba_alias.len = C.size_t(len(ba)) - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new9(ba_alias, &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new9(ba_alias)) ret.isSubclass = true return ret } @@ -246,10 +222,8 @@ func NewQCborValue10(s string) *QCborValue { s_ms.data = C.CString(s) s_ms.len = C.size_t(len(s)) defer C.free(unsafe.Pointer(s_ms.data)) - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new10(s_ms, &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new10(s_ms)) ret.isSubclass = true return ret } @@ -258,120 +232,96 @@ func NewQCborValue10(s string) *QCborValue { func NewQCborValue11(s string) *QCborValue { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new11(s_Cstring, &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new11(s_Cstring)) ret.isSubclass = true return ret } // NewQCborValue12 constructs a new QCborValue object. func NewQCborValue12(a *QCborArray) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new12(a.cPointer(), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new12(a.cPointer())) ret.isSubclass = true return ret } // NewQCborValue13 constructs a new QCborValue object. func NewQCborValue13(m *QCborMap) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new13(m.cPointer(), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new13(m.cPointer())) ret.isSubclass = true return ret } // NewQCborValue14 constructs a new QCborValue object. func NewQCborValue14(tag QCborTag) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new14((C.uint64_t)(tag), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new14((C.uint64_t)(tag))) ret.isSubclass = true return ret } // NewQCborValue15 constructs a new QCborValue object. func NewQCborValue15(t_ QCborKnownTags) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new15((C.int)(t_), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new15((C.int)(t_))) ret.isSubclass = true return ret } // NewQCborValue16 constructs a new QCborValue object. func NewQCborValue16(dt *qt6.QDateTime) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new16((*C.QDateTime)(dt.UnsafePointer()), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new16((*C.QDateTime)(dt.UnsafePointer()))) ret.isSubclass = true return ret } // NewQCborValue17 constructs a new QCborValue object. func NewQCborValue17(url *qt6.QUrl) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new17((*C.QUrl)(url.UnsafePointer()), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new17((*C.QUrl)(url.UnsafePointer()))) ret.isSubclass = true return ret } // NewQCborValue18 constructs a new QCborValue object. func NewQCborValue18(rx *qt6.QRegularExpression) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new18((*C.QRegularExpression)(rx.UnsafePointer()), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new18((*C.QRegularExpression)(rx.UnsafePointer()))) ret.isSubclass = true return ret } // NewQCborValue19 constructs a new QCborValue object. func NewQCborValue19(uuid *qt6.QUuid) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new19((*C.QUuid)(uuid.UnsafePointer()), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new19((*C.QUuid)(uuid.UnsafePointer()))) ret.isSubclass = true return ret } // NewQCborValue20 constructs a new QCborValue object. func NewQCborValue20(other *QCborValue) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new20(other.cPointer(), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new20(other.cPointer())) ret.isSubclass = true return ret } // NewQCborValue21 constructs a new QCborValue object. func NewQCborValue21(tag QCborTag, taggedValue *QCborValue) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new21((C.uint64_t)(tag), taggedValue.cPointer(), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new21((C.uint64_t)(tag), taggedValue.cPointer())) ret.isSubclass = true return ret } // NewQCborValue22 constructs a new QCborValue object. func NewQCborValue22(t_ QCborKnownTags, tv *QCborValue) *QCborValue { - var outptr_QCborValue *C.QCborValue = nil - C.QCborValue_new22((C.int)(t_), tv.cPointer(), &outptr_QCborValue) - ret := newQCborValue(outptr_QCborValue) + ret := newQCborValue(C.QCborValue_new22((C.int)(t_), tv.cPointer())) ret.isSubclass = true return ret } @@ -573,7 +523,7 @@ func (this *QCborValue) OperatorSubscript2(key int64) *QCborValue { } func (this *QCborValue) OperatorSubscript3(key int64) *QCborValueRef { - _goptr := newQCborValueRef(C.QCborValue_OperatorSubscript3(this.h, (C.longlong)(key)), nil) + _goptr := newQCborValueRef(C.QCborValue_OperatorSubscript3(this.h, (C.longlong)(key))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -583,7 +533,7 @@ func (this *QCborValue) OperatorSubscript5(key string) *QCborValueRef { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - _goptr := newQCborValueRef(C.QCborValue_OperatorSubscript5(this.h, key_ms), nil) + _goptr := newQCborValueRef(C.QCborValue_OperatorSubscript5(this.h, key_ms)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -825,24 +775,19 @@ func newQCborValueConstRef(h *C.QCborValueConstRef) *QCborValueConstRef { if h == nil { return nil } + return &QCborValueConstRef{h: h} } // UnsafeNewQCborValueConstRef constructs the type using only unsafe pointers. func UnsafeNewQCborValueConstRef(h unsafe.Pointer) *QCborValueConstRef { - if h == nil { - return nil - } - - return &QCborValueConstRef{h: (*C.QCborValueConstRef)(h)} + return newQCborValueConstRef((*C.QCborValueConstRef)(h)) } // NewQCborValueConstRef constructs a new QCborValueConstRef object. func NewQCborValueConstRef(param1 *QCborValueConstRef) *QCborValueConstRef { - var outptr_QCborValueConstRef *C.QCborValueConstRef = nil - C.QCborValueConstRef_new(param1.cPointer(), &outptr_QCborValueConstRef) - ret := newQCborValueConstRef(outptr_QCborValueConstRef) + ret := newQCborValueConstRef(C.QCborValueConstRef_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -1205,31 +1150,26 @@ func (this *QCborValueRef) UnsafePointer() unsafe.Pointer { } // newQCborValueRef constructs the type using only CGO pointers. -func newQCborValueRef(h *C.QCborValueRef, h_QCborValueConstRef *C.QCborValueConstRef) *QCborValueRef { +func newQCborValueRef(h *C.QCborValueRef) *QCborValueRef { if h == nil { return nil } + var outptr_QCborValueConstRef *C.QCborValueConstRef = nil + C.QCborValueRef_virtbase(h, &outptr_QCborValueConstRef) + return &QCborValueRef{h: h, - QCborValueConstRef: newQCborValueConstRef(h_QCborValueConstRef)} + QCborValueConstRef: newQCborValueConstRef(outptr_QCborValueConstRef)} } // UnsafeNewQCborValueRef constructs the type using only unsafe pointers. -func UnsafeNewQCborValueRef(h unsafe.Pointer, h_QCborValueConstRef unsafe.Pointer) *QCborValueRef { - if h == nil { - return nil - } - - return &QCborValueRef{h: (*C.QCborValueRef)(h), - QCborValueConstRef: UnsafeNewQCborValueConstRef(h_QCborValueConstRef)} +func UnsafeNewQCborValueRef(h unsafe.Pointer) *QCborValueRef { + return newQCborValueRef((*C.QCborValueRef)(h)) } // NewQCborValueRef constructs a new QCborValueRef object. func NewQCborValueRef(param1 *QCborValueRef) *QCborValueRef { - var outptr_QCborValueRef *C.QCborValueRef = nil - var outptr_QCborValueConstRef *C.QCborValueConstRef = nil - C.QCborValueRef_new(param1.cPointer(), &outptr_QCborValueRef, &outptr_QCborValueConstRef) - ret := newQCborValueRef(outptr_QCborValueRef, outptr_QCborValueConstRef) + ret := newQCborValueRef(C.QCborValueRef_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -1243,7 +1183,7 @@ func (this *QCborValueRef) OperatorAssignWithOther(other *QCborValueRef) { } func (this *QCborValueRef) OperatorSubscript(key int64) *QCborValueRef { - _goptr := newQCborValueRef(C.QCborValueRef_OperatorSubscript(this.h, (C.longlong)(key)), nil) + _goptr := newQCborValueRef(C.QCborValueRef_OperatorSubscript(this.h, (C.longlong)(key))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -1253,7 +1193,7 @@ func (this *QCborValueRef) OperatorSubscript2(key string) *QCborValueRef { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - _goptr := newQCborValueRef(C.QCborValueRef_OperatorSubscript2(this.h, key_ms), nil) + _goptr := newQCborValueRef(C.QCborValueRef_OperatorSubscript2(this.h, key_ms)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/cbor/gen_qcborvalue.h b/qt6/cbor/gen_qcborvalue.h index 3495f65d..a7e745ec 100644 --- a/qt6/cbor/gen_qcborvalue.h +++ b/qt6/cbor/gen_qcborvalue.h @@ -49,28 +49,28 @@ typedef struct QVariant QVariant; struct miqt_string QCborParserError_ErrorString(const QCborParserError* self); void QCborParserError_Delete(QCborParserError* self, bool isSubclass); -void QCborValue_new(QCborValue** outptr_QCborValue); -void QCborValue_new2(int t_, QCborValue** outptr_QCborValue); -void QCborValue_new3(bool b_, QCborValue** outptr_QCborValue); -void QCborValue_new4(int i, QCborValue** outptr_QCborValue); -void QCborValue_new5(unsigned int u, QCborValue** outptr_QCborValue); -void QCborValue_new6(long long i, QCborValue** outptr_QCborValue); -void QCborValue_new7(double v, QCborValue** outptr_QCborValue); -void QCborValue_new8(uint8_t st, QCborValue** outptr_QCborValue); -void QCborValue_new9(struct miqt_string ba, QCborValue** outptr_QCborValue); -void QCborValue_new10(struct miqt_string s, QCborValue** outptr_QCborValue); -void QCborValue_new11(const char* s, QCborValue** outptr_QCborValue); -void QCborValue_new12(QCborArray* a, QCborValue** outptr_QCborValue); -void QCborValue_new13(QCborMap* m, QCborValue** outptr_QCborValue); -void QCborValue_new14(uint64_t tag, QCborValue** outptr_QCborValue); -void QCborValue_new15(int t_, QCborValue** outptr_QCborValue); -void QCborValue_new16(QDateTime* dt, QCborValue** outptr_QCborValue); -void QCborValue_new17(QUrl* url, QCborValue** outptr_QCborValue); -void QCborValue_new18(QRegularExpression* rx, QCborValue** outptr_QCborValue); -void QCborValue_new19(QUuid* uuid, QCborValue** outptr_QCborValue); -void QCborValue_new20(QCborValue* other, QCborValue** outptr_QCborValue); -void QCborValue_new21(uint64_t tag, QCborValue* taggedValue, QCborValue** outptr_QCborValue); -void QCborValue_new22(int t_, QCborValue* tv, QCborValue** outptr_QCborValue); +QCborValue* QCborValue_new(); +QCborValue* QCborValue_new2(int t_); +QCborValue* QCborValue_new3(bool b_); +QCborValue* QCborValue_new4(int i); +QCborValue* QCborValue_new5(unsigned int u); +QCborValue* QCborValue_new6(long long i); +QCborValue* QCborValue_new7(double v); +QCborValue* QCborValue_new8(uint8_t st); +QCborValue* QCborValue_new9(struct miqt_string ba); +QCborValue* QCborValue_new10(struct miqt_string s); +QCborValue* QCborValue_new11(const char* s); +QCborValue* QCborValue_new12(QCborArray* a); +QCborValue* QCborValue_new13(QCborMap* m); +QCborValue* QCborValue_new14(uint64_t tag); +QCborValue* QCborValue_new15(int t_); +QCborValue* QCborValue_new16(QDateTime* dt); +QCborValue* QCborValue_new17(QUrl* url); +QCborValue* QCborValue_new18(QRegularExpression* rx); +QCborValue* QCborValue_new19(QUuid* uuid); +QCborValue* QCborValue_new20(QCborValue* other); +QCborValue* QCborValue_new21(uint64_t tag, QCborValue* taggedValue); +QCborValue* QCborValue_new22(int t_, QCborValue* tv); void QCborValue_OperatorAssign(QCborValue* self, QCborValue* other); void QCborValue_Swap(QCborValue* self, QCborValue* other); int QCborValue_Type(const QCborValue* self); @@ -149,7 +149,7 @@ void QCborValue_ToCbor2(const QCborValue* self, QCborStreamWriter* writer, int o struct miqt_string QCborValue_ToDiagnosticNotation1(const QCborValue* self, int opts); void QCborValue_Delete(QCborValue* self, bool isSubclass); -void QCborValueConstRef_new(QCborValueConstRef* param1, QCborValueConstRef** outptr_QCborValueConstRef); +QCborValueConstRef* QCborValueConstRef_new(QCborValueConstRef* param1); int QCborValueConstRef_Type(const QCborValueConstRef* self); bool QCborValueConstRef_IsInteger(const QCborValueConstRef* self); bool QCborValueConstRef_IsByteArray(const QCborValueConstRef* self); @@ -215,7 +215,8 @@ void QCborValueConstRef_ToCbor2(const QCborValueConstRef* self, QCborStreamWrite struct miqt_string QCborValueConstRef_ToDiagnosticNotation1(const QCborValueConstRef* self, int opt); void QCborValueConstRef_Delete(QCborValueConstRef* self, bool isSubclass); -void QCborValueRef_new(QCborValueRef* param1, QCborValueRef** outptr_QCborValueRef, QCborValueConstRef** outptr_QCborValueConstRef); +QCborValueRef* QCborValueRef_new(QCborValueRef* param1); +void QCborValueRef_virtbase(QCborValueRef* src, QCborValueConstRef** outptr_QCborValueConstRef); void QCborValueRef_OperatorAssign(QCborValueRef* self, QCborValue* other); void QCborValueRef_OperatorAssignWithOther(QCborValueRef* self, QCborValueRef* other); QCborValueRef* QCborValueRef_OperatorSubscript(QCborValueRef* self, long long key); diff --git a/qt6/gen_qabstractanimation.cpp b/qt6/gen_qabstractanimation.cpp index c763b091..0f7147c8 100644 --- a/qt6/gen_qabstractanimation.cpp +++ b/qt6/gen_qabstractanimation.cpp @@ -278,16 +278,16 @@ public: }; -void QAbstractAnimation_new(QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQAbstractAnimation* ret = new MiqtVirtualQAbstractAnimation(); - *outptr_QAbstractAnimation = ret; - *outptr_QObject = static_cast(ret); +QAbstractAnimation* QAbstractAnimation_new() { + return new MiqtVirtualQAbstractAnimation(); } -void QAbstractAnimation_new2(QObject* parent, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQAbstractAnimation* ret = new MiqtVirtualQAbstractAnimation(parent); - *outptr_QAbstractAnimation = ret; - *outptr_QObject = static_cast(ret); +QAbstractAnimation* QAbstractAnimation_new2(QObject* parent) { + return new MiqtVirtualQAbstractAnimation(parent); +} + +void QAbstractAnimation_virtbase(QAbstractAnimation* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAbstractAnimation_MetaObject(const QAbstractAnimation* self) { @@ -813,16 +813,16 @@ public: }; -void QAnimationDriver_new(QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject) { - MiqtVirtualQAnimationDriver* ret = new MiqtVirtualQAnimationDriver(); - *outptr_QAnimationDriver = ret; - *outptr_QObject = static_cast(ret); +QAnimationDriver* QAnimationDriver_new() { + return new MiqtVirtualQAnimationDriver(); } -void QAnimationDriver_new2(QObject* parent, QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject) { - MiqtVirtualQAnimationDriver* ret = new MiqtVirtualQAnimationDriver(parent); - *outptr_QAnimationDriver = ret; - *outptr_QObject = static_cast(ret); +QAnimationDriver* QAnimationDriver_new2(QObject* parent) { + return new MiqtVirtualQAnimationDriver(parent); +} + +void QAnimationDriver_virtbase(QAnimationDriver* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAnimationDriver_MetaObject(const QAnimationDriver* self) { diff --git a/qt6/gen_qabstractanimation.go b/qt6/gen_qabstractanimation.go index 33b258d9..c593875b 100644 --- a/qt6/gen_qabstractanimation.go +++ b/qt6/gen_qabstractanimation.go @@ -57,42 +57,34 @@ func (this *QAbstractAnimation) UnsafePointer() unsafe.Pointer { } // newQAbstractAnimation constructs the type using only CGO pointers. -func newQAbstractAnimation(h *C.QAbstractAnimation, h_QObject *C.QObject) *QAbstractAnimation { +func newQAbstractAnimation(h *C.QAbstractAnimation) *QAbstractAnimation { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractAnimation_virtbase(h, &outptr_QObject) + return &QAbstractAnimation{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAbstractAnimation constructs the type using only unsafe pointers. -func UnsafeNewQAbstractAnimation(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractAnimation { - if h == nil { - return nil - } - - return &QAbstractAnimation{h: (*C.QAbstractAnimation)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractAnimation(h unsafe.Pointer) *QAbstractAnimation { + return newQAbstractAnimation((*C.QAbstractAnimation)(h)) } // NewQAbstractAnimation constructs a new QAbstractAnimation object. func NewQAbstractAnimation() *QAbstractAnimation { - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QAbstractAnimation_new(&outptr_QAbstractAnimation, &outptr_QObject) - ret := newQAbstractAnimation(outptr_QAbstractAnimation, outptr_QObject) + ret := newQAbstractAnimation(C.QAbstractAnimation_new()) ret.isSubclass = true return ret } // NewQAbstractAnimation2 constructs a new QAbstractAnimation object. func NewQAbstractAnimation2(parent *QObject) *QAbstractAnimation { - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QAbstractAnimation_new2(parent.cPointer(), &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQAbstractAnimation(outptr_QAbstractAnimation, outptr_QObject) + ret := newQAbstractAnimation(C.QAbstractAnimation_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -121,7 +113,7 @@ func (this *QAbstractAnimation) State() QAbstractAnimation__State { } func (this *QAbstractAnimation) Group() *QAnimationGroup { - return newQAnimationGroup(C.QAbstractAnimation_Group(this.h), nil, nil) + return newQAnimationGroup(C.QAbstractAnimation_Group(this.h)) } func (this *QAbstractAnimation) Direction() QAbstractAnimation__Direction { @@ -460,7 +452,7 @@ func miqt_exec_callback_QAbstractAnimation_TimerEvent(self *C.QAbstractAnimation } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAbstractAnimation{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -486,7 +478,7 @@ func miqt_exec_callback_QAbstractAnimation_ChildEvent(self *C.QAbstractAnimation } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAbstractAnimation{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -605,42 +597,34 @@ func (this *QAnimationDriver) UnsafePointer() unsafe.Pointer { } // newQAnimationDriver constructs the type using only CGO pointers. -func newQAnimationDriver(h *C.QAnimationDriver, h_QObject *C.QObject) *QAnimationDriver { +func newQAnimationDriver(h *C.QAnimationDriver) *QAnimationDriver { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAnimationDriver_virtbase(h, &outptr_QObject) + return &QAnimationDriver{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAnimationDriver constructs the type using only unsafe pointers. -func UnsafeNewQAnimationDriver(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAnimationDriver { - if h == nil { - return nil - } - - return &QAnimationDriver{h: (*C.QAnimationDriver)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAnimationDriver(h unsafe.Pointer) *QAnimationDriver { + return newQAnimationDriver((*C.QAnimationDriver)(h)) } // NewQAnimationDriver constructs a new QAnimationDriver object. func NewQAnimationDriver() *QAnimationDriver { - var outptr_QAnimationDriver *C.QAnimationDriver = nil - var outptr_QObject *C.QObject = nil - C.QAnimationDriver_new(&outptr_QAnimationDriver, &outptr_QObject) - ret := newQAnimationDriver(outptr_QAnimationDriver, outptr_QObject) + ret := newQAnimationDriver(C.QAnimationDriver_new()) ret.isSubclass = true return ret } // NewQAnimationDriver2 constructs a new QAnimationDriver object. func NewQAnimationDriver2(parent *QObject) *QAnimationDriver { - var outptr_QAnimationDriver *C.QAnimationDriver = nil - var outptr_QObject *C.QObject = nil - C.QAnimationDriver_new2(parent.cPointer(), &outptr_QAnimationDriver, &outptr_QObject) - ret := newQAnimationDriver(outptr_QAnimationDriver, outptr_QObject) + ret := newQAnimationDriver(C.QAnimationDriver_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -912,7 +896,7 @@ func miqt_exec_callback_QAnimationDriver_TimerEvent(self *C.QAnimationDriver, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAnimationDriver{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -938,7 +922,7 @@ func miqt_exec_callback_QAnimationDriver_ChildEvent(self *C.QAnimationDriver, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAnimationDriver{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qabstractanimation.h b/qt6/gen_qabstractanimation.h index 569e30b5..631d4208 100644 --- a/qt6/gen_qabstractanimation.h +++ b/qt6/gen_qabstractanimation.h @@ -36,8 +36,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QAbstractAnimation_new(QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QAbstractAnimation_new2(QObject* parent, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +QAbstractAnimation* QAbstractAnimation_new(); +QAbstractAnimation* QAbstractAnimation_new2(QObject* parent); +void QAbstractAnimation_virtbase(QAbstractAnimation* src, QObject** outptr_QObject); QMetaObject* QAbstractAnimation_MetaObject(const QAbstractAnimation* self); void* QAbstractAnimation_Metacast(QAbstractAnimation* self, const char* param1); struct miqt_string QAbstractAnimation_Tr(const char* s); @@ -97,8 +98,9 @@ void QAbstractAnimation_override_virtual_DisconnectNotify(void* self, intptr_t s void QAbstractAnimation_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractAnimation_Delete(QAbstractAnimation* self, bool isSubclass); -void QAnimationDriver_new(QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject); -void QAnimationDriver_new2(QObject* parent, QAnimationDriver** outptr_QAnimationDriver, QObject** outptr_QObject); +QAnimationDriver* QAnimationDriver_new(); +QAnimationDriver* QAnimationDriver_new2(QObject* parent); +void QAnimationDriver_virtbase(QAnimationDriver* src, QObject** outptr_QObject); QMetaObject* QAnimationDriver_MetaObject(const QAnimationDriver* self); void* QAnimationDriver_Metacast(QAnimationDriver* self, const char* param1); struct miqt_string QAnimationDriver_Tr(const char* s); diff --git a/qt6/gen_qabstractbutton.cpp b/qt6/gen_qabstractbutton.cpp index 439168f2..3f656dd3 100644 --- a/qt6/gen_qabstractbutton.cpp +++ b/qt6/gen_qabstractbutton.cpp @@ -1113,20 +1113,16 @@ public: }; -void QAbstractButton_new(QWidget* parent, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractButton* ret = new MiqtVirtualQAbstractButton(parent); - *outptr_QAbstractButton = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractButton* QAbstractButton_new(QWidget* parent) { + return new MiqtVirtualQAbstractButton(parent); } -void QAbstractButton_new2(QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractButton* ret = new MiqtVirtualQAbstractButton(); - *outptr_QAbstractButton = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractButton* QAbstractButton_new2() { + return new MiqtVirtualQAbstractButton(); +} + +void QAbstractButton_virtbase(QAbstractButton* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QAbstractButton_MetaObject(const QAbstractButton* self) { diff --git a/qt6/gen_qabstractbutton.go b/qt6/gen_qabstractbutton.go index 8e2fde6e..6449ccd1 100644 --- a/qt6/gen_qabstractbutton.go +++ b/qt6/gen_qabstractbutton.go @@ -35,46 +35,34 @@ func (this *QAbstractButton) UnsafePointer() unsafe.Pointer { } // newQAbstractButton constructs the type using only CGO pointers. -func newQAbstractButton(h *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractButton { +func newQAbstractButton(h *C.QAbstractButton) *QAbstractButton { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QAbstractButton_virtbase(h, &outptr_QWidget) + return &QAbstractButton{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQAbstractButton constructs the type using only unsafe pointers. -func UnsafeNewQAbstractButton(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractButton { - if h == nil { - return nil - } - - return &QAbstractButton{h: (*C.QAbstractButton)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQAbstractButton(h unsafe.Pointer) *QAbstractButton { + return newQAbstractButton((*C.QAbstractButton)(h)) } // NewQAbstractButton constructs a new QAbstractButton object. func NewQAbstractButton(parent *QWidget) *QAbstractButton { - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractButton_new(parent.cPointer(), &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractButton(outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractButton(C.QAbstractButton_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQAbstractButton2 constructs a new QAbstractButton object. func NewQAbstractButton2() *QAbstractButton { - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractButton_new2(&outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractButton(outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractButton(C.QAbstractButton_new2()) ret.isSubclass = true return ret } @@ -192,7 +180,7 @@ func (this *QAbstractButton) AutoExclusive() bool { } func (this *QAbstractButton) Group() *QButtonGroup { - return newQButtonGroup(C.QAbstractButton_Group(this.h), nil) + return newQButtonGroup(C.QAbstractButton_Group(this.h)) } func (this *QAbstractButton) SetIconSize(size *QSize) { @@ -343,7 +331,7 @@ func miqt_exec_callback_QAbstractButton_PaintEvent(self *C.QAbstractButton, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc(slotval1) @@ -471,7 +459,7 @@ func miqt_exec_callback_QAbstractButton_KeyPressEvent(self *C.QAbstractButton, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -497,7 +485,7 @@ func miqt_exec_callback_QAbstractButton_KeyReleaseEvent(self *C.QAbstractButton, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -523,7 +511,7 @@ func miqt_exec_callback_QAbstractButton_MousePressEvent(self *C.QAbstractButton, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -549,7 +537,7 @@ func miqt_exec_callback_QAbstractButton_MouseReleaseEvent(self *C.QAbstractButto } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -575,7 +563,7 @@ func miqt_exec_callback_QAbstractButton_MouseMoveEvent(self *C.QAbstractButton, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -601,7 +589,7 @@ func miqt_exec_callback_QAbstractButton_FocusInEvent(self *C.QAbstractButton, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -627,7 +615,7 @@ func miqt_exec_callback_QAbstractButton_FocusOutEvent(self *C.QAbstractButton, c } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -679,7 +667,7 @@ func miqt_exec_callback_QAbstractButton_TimerEvent(self *C.QAbstractButton, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QAbstractButton{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -888,7 +876,7 @@ func miqt_exec_callback_QAbstractButton_MouseDoubleClickEvent(self *C.QAbstractB } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -914,7 +902,7 @@ func miqt_exec_callback_QAbstractButton_WheelEvent(self *C.QAbstractButton, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -940,7 +928,7 @@ func miqt_exec_callback_QAbstractButton_EnterEvent(self *C.QAbstractButton, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -992,7 +980,7 @@ func miqt_exec_callback_QAbstractButton_MoveEvent(self *C.QAbstractButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1018,7 +1006,7 @@ func miqt_exec_callback_QAbstractButton_ResizeEvent(self *C.QAbstractButton, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1044,7 +1032,7 @@ func miqt_exec_callback_QAbstractButton_CloseEvent(self *C.QAbstractButton, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1070,7 +1058,7 @@ func miqt_exec_callback_QAbstractButton_ContextMenuEvent(self *C.QAbstractButton } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1096,7 +1084,7 @@ func miqt_exec_callback_QAbstractButton_TabletEvent(self *C.QAbstractButton, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1122,7 +1110,7 @@ func miqt_exec_callback_QAbstractButton_ActionEvent(self *C.QAbstractButton, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1148,7 +1136,7 @@ func miqt_exec_callback_QAbstractButton_DragEnterEvent(self *C.QAbstractButton, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1174,7 +1162,7 @@ func miqt_exec_callback_QAbstractButton_DragMoveEvent(self *C.QAbstractButton, c } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1200,7 +1188,7 @@ func miqt_exec_callback_QAbstractButton_DragLeaveEvent(self *C.QAbstractButton, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1226,7 +1214,7 @@ func miqt_exec_callback_QAbstractButton_DropEvent(self *C.QAbstractButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1252,7 +1240,7 @@ func miqt_exec_callback_QAbstractButton_ShowEvent(self *C.QAbstractButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1278,7 +1266,7 @@ func miqt_exec_callback_QAbstractButton_HideEvent(self *C.QAbstractButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QAbstractButton{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1448,7 +1436,7 @@ func miqt_exec_callback_QAbstractButton_InputMethodEvent(self *C.QAbstractButton } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QAbstractButton{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qabstractbutton.h b/qt6/gen_qabstractbutton.h index f2b83cf4..22b583bd 100644 --- a/qt6/gen_qabstractbutton.h +++ b/qt6/gen_qabstractbutton.h @@ -86,8 +86,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QAbstractButton_new(QWidget* parent, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QAbstractButton_new2(QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QAbstractButton* QAbstractButton_new(QWidget* parent); +QAbstractButton* QAbstractButton_new2(); +void QAbstractButton_virtbase(QAbstractButton* src, QWidget** outptr_QWidget); QMetaObject* QAbstractButton_MetaObject(const QAbstractButton* self); void* QAbstractButton_Metacast(QAbstractButton* self, const char* param1); struct miqt_string QAbstractButton_Tr(const char* s); diff --git a/qt6/gen_qabstracteventdispatcher.cpp b/qt6/gen_qabstracteventdispatcher.cpp index 86e8893c..78f53995 100644 --- a/qt6/gen_qabstracteventdispatcher.cpp +++ b/qt6/gen_qabstracteventdispatcher.cpp @@ -14,6 +14,10 @@ #include "gen_qabstracteventdispatcher.h" #include "_cgo_export.h" +void QAbstractEventDispatcher_virtbase(QAbstractEventDispatcher* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QAbstractEventDispatcher_MetaObject(const QAbstractEventDispatcher* self) { return (QMetaObject*) self->metaObject(); } @@ -165,9 +169,8 @@ void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubc } } -void QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t, QAbstractEventDispatcher__TimerInfo** outptr_QAbstractEventDispatcher__TimerInfo) { - QAbstractEventDispatcher::TimerInfo* ret = new QAbstractEventDispatcher::TimerInfo(static_cast(id), static_cast(i), static_cast(t)); - *outptr_QAbstractEventDispatcher__TimerInfo = ret; +QAbstractEventDispatcher__TimerInfo* QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t) { + return new QAbstractEventDispatcher::TimerInfo(static_cast(id), static_cast(i), static_cast(t)); } void QAbstractEventDispatcher__TimerInfo_Delete(QAbstractEventDispatcher__TimerInfo* self, bool isSubclass) { diff --git a/qt6/gen_qabstracteventdispatcher.go b/qt6/gen_qabstracteventdispatcher.go index 7517b773..6c9f7ae8 100644 --- a/qt6/gen_qabstracteventdispatcher.go +++ b/qt6/gen_qabstracteventdispatcher.go @@ -35,22 +35,20 @@ func (this *QAbstractEventDispatcher) UnsafePointer() unsafe.Pointer { } // newQAbstractEventDispatcher constructs the type using only CGO pointers. -func newQAbstractEventDispatcher(h *C.QAbstractEventDispatcher, h_QObject *C.QObject) *QAbstractEventDispatcher { +func newQAbstractEventDispatcher(h *C.QAbstractEventDispatcher) *QAbstractEventDispatcher { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractEventDispatcher_virtbase(h, &outptr_QObject) + return &QAbstractEventDispatcher{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAbstractEventDispatcher constructs the type using only unsafe pointers. -func UnsafeNewQAbstractEventDispatcher(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractEventDispatcher { - if h == nil { - return nil - } - - return &QAbstractEventDispatcher{h: (*C.QAbstractEventDispatcher)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractEventDispatcher(h unsafe.Pointer) *QAbstractEventDispatcher { + return newQAbstractEventDispatcher((*C.QAbstractEventDispatcher)(h)) } func (this *QAbstractEventDispatcher) MetaObject() *QMetaObject { @@ -73,7 +71,7 @@ func QAbstractEventDispatcher_Tr(s string) string { } func QAbstractEventDispatcher_Instance() *QAbstractEventDispatcher { - return newQAbstractEventDispatcher(C.QAbstractEventDispatcher_Instance(), nil) + return newQAbstractEventDispatcher(C.QAbstractEventDispatcher_Instance()) } func (this *QAbstractEventDispatcher) ProcessEvents(flags QEventLoop__ProcessEventsFlag) bool { @@ -208,7 +206,7 @@ func QAbstractEventDispatcher_Tr3(s string, c string, n int) string { } func QAbstractEventDispatcher_Instance1(thread *QThread) *QAbstractEventDispatcher { - return newQAbstractEventDispatcher(C.QAbstractEventDispatcher_Instance1(thread.cPointer()), nil) + return newQAbstractEventDispatcher(C.QAbstractEventDispatcher_Instance1(thread.cPointer())) } // Delete this object from C++ memory. @@ -249,24 +247,19 @@ func newQAbstractEventDispatcher__TimerInfo(h *C.QAbstractEventDispatcher__Timer if h == nil { return nil } + return &QAbstractEventDispatcher__TimerInfo{h: h} } // UnsafeNewQAbstractEventDispatcher__TimerInfo constructs the type using only unsafe pointers. func UnsafeNewQAbstractEventDispatcher__TimerInfo(h unsafe.Pointer) *QAbstractEventDispatcher__TimerInfo { - if h == nil { - return nil - } - - return &QAbstractEventDispatcher__TimerInfo{h: (*C.QAbstractEventDispatcher__TimerInfo)(h)} + return newQAbstractEventDispatcher__TimerInfo((*C.QAbstractEventDispatcher__TimerInfo)(h)) } // NewQAbstractEventDispatcher__TimerInfo constructs a new QAbstractEventDispatcher::TimerInfo object. func NewQAbstractEventDispatcher__TimerInfo(id int, i int, t TimerType) *QAbstractEventDispatcher__TimerInfo { - var outptr_QAbstractEventDispatcher__TimerInfo *C.QAbstractEventDispatcher__TimerInfo = nil - C.QAbstractEventDispatcher__TimerInfo_new((C.int)(id), (C.int)(i), (C.int)(t), &outptr_QAbstractEventDispatcher__TimerInfo) - ret := newQAbstractEventDispatcher__TimerInfo(outptr_QAbstractEventDispatcher__TimerInfo) + ret := newQAbstractEventDispatcher__TimerInfo(C.QAbstractEventDispatcher__TimerInfo_new((C.int)(id), (C.int)(i), (C.int)(t))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qabstracteventdispatcher.h b/qt6/gen_qabstracteventdispatcher.h index df3e0697..a47d0897 100644 --- a/qt6/gen_qabstracteventdispatcher.h +++ b/qt6/gen_qabstracteventdispatcher.h @@ -36,6 +36,7 @@ typedef struct QSocketNotifier QSocketNotifier; typedef struct QThread QThread; #endif +void QAbstractEventDispatcher_virtbase(QAbstractEventDispatcher* src, QObject** outptr_QObject); QMetaObject* QAbstractEventDispatcher_MetaObject(const QAbstractEventDispatcher* self); void* QAbstractEventDispatcher_Metacast(QAbstractEventDispatcher* self, const char* param1); struct miqt_string QAbstractEventDispatcher_Tr(const char* s); @@ -65,7 +66,7 @@ struct miqt_string QAbstractEventDispatcher_Tr3(const char* s, const char* c, in QAbstractEventDispatcher* QAbstractEventDispatcher_Instance1(QThread* thread); void QAbstractEventDispatcher_Delete(QAbstractEventDispatcher* self, bool isSubclass); -void QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t, QAbstractEventDispatcher__TimerInfo** outptr_QAbstractEventDispatcher__TimerInfo); +QAbstractEventDispatcher__TimerInfo* QAbstractEventDispatcher__TimerInfo_new(int id, int i, int t); void QAbstractEventDispatcher__TimerInfo_Delete(QAbstractEventDispatcher__TimerInfo* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qabstractfileiconprovider.cpp b/qt6/gen_qabstractfileiconprovider.cpp index 49dcfcc0..00d4dee5 100644 --- a/qt6/gen_qabstractfileiconprovider.cpp +++ b/qt6/gen_qabstractfileiconprovider.cpp @@ -147,9 +147,8 @@ public: }; -void QAbstractFileIconProvider_new(QAbstractFileIconProvider** outptr_QAbstractFileIconProvider) { - MiqtVirtualQAbstractFileIconProvider* ret = new MiqtVirtualQAbstractFileIconProvider(); - *outptr_QAbstractFileIconProvider = ret; +QAbstractFileIconProvider* QAbstractFileIconProvider_new() { + return new MiqtVirtualQAbstractFileIconProvider(); } QIcon* QAbstractFileIconProvider_Icon(const QAbstractFileIconProvider* self, int param1) { diff --git a/qt6/gen_qabstractfileiconprovider.go b/qt6/gen_qabstractfileiconprovider.go index 7b6a4802..bcd7cd85 100644 --- a/qt6/gen_qabstractfileiconprovider.go +++ b/qt6/gen_qabstractfileiconprovider.go @@ -56,24 +56,19 @@ func newQAbstractFileIconProvider(h *C.QAbstractFileIconProvider) *QAbstractFile if h == nil { return nil } + return &QAbstractFileIconProvider{h: h} } // UnsafeNewQAbstractFileIconProvider constructs the type using only unsafe pointers. func UnsafeNewQAbstractFileIconProvider(h unsafe.Pointer) *QAbstractFileIconProvider { - if h == nil { - return nil - } - - return &QAbstractFileIconProvider{h: (*C.QAbstractFileIconProvider)(h)} + return newQAbstractFileIconProvider((*C.QAbstractFileIconProvider)(h)) } // NewQAbstractFileIconProvider constructs a new QAbstractFileIconProvider object. func NewQAbstractFileIconProvider() *QAbstractFileIconProvider { - var outptr_QAbstractFileIconProvider *C.QAbstractFileIconProvider = nil - C.QAbstractFileIconProvider_new(&outptr_QAbstractFileIconProvider) - ret := newQAbstractFileIconProvider(outptr_QAbstractFileIconProvider) + ret := newQAbstractFileIconProvider(C.QAbstractFileIconProvider_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qabstractfileiconprovider.h b/qt6/gen_qabstractfileiconprovider.h index 29e37821..d2491839 100644 --- a/qt6/gen_qabstractfileiconprovider.h +++ b/qt6/gen_qabstractfileiconprovider.h @@ -24,7 +24,7 @@ typedef struct QFileInfo QFileInfo; typedef struct QIcon QIcon; #endif -void QAbstractFileIconProvider_new(QAbstractFileIconProvider** outptr_QAbstractFileIconProvider); +QAbstractFileIconProvider* QAbstractFileIconProvider_new(); QIcon* QAbstractFileIconProvider_Icon(const QAbstractFileIconProvider* self, int param1); QIcon* QAbstractFileIconProvider_IconWithQFileInfo(const QAbstractFileIconProvider* self, QFileInfo* param1); struct miqt_string QAbstractFileIconProvider_Type(const QAbstractFileIconProvider* self, QFileInfo* param1); diff --git a/qt6/gen_qabstractitemdelegate.cpp b/qt6/gen_qabstractitemdelegate.cpp index dc37f2c5..33da43b6 100644 --- a/qt6/gen_qabstractitemdelegate.cpp +++ b/qt6/gen_qabstractitemdelegate.cpp @@ -483,16 +483,16 @@ public: }; -void QAbstractItemDelegate_new(QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { - MiqtVirtualQAbstractItemDelegate* ret = new MiqtVirtualQAbstractItemDelegate(); - *outptr_QAbstractItemDelegate = ret; - *outptr_QObject = static_cast(ret); +QAbstractItemDelegate* QAbstractItemDelegate_new() { + return new MiqtVirtualQAbstractItemDelegate(); } -void QAbstractItemDelegate_new2(QObject* parent, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { - MiqtVirtualQAbstractItemDelegate* ret = new MiqtVirtualQAbstractItemDelegate(parent); - *outptr_QAbstractItemDelegate = ret; - *outptr_QObject = static_cast(ret); +QAbstractItemDelegate* QAbstractItemDelegate_new2(QObject* parent) { + return new MiqtVirtualQAbstractItemDelegate(parent); +} + +void QAbstractItemDelegate_virtbase(QAbstractItemDelegate* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAbstractItemDelegate_MetaObject(const QAbstractItemDelegate* self) { diff --git a/qt6/gen_qabstractitemdelegate.go b/qt6/gen_qabstractitemdelegate.go index 12dfcd0f..92683daa 100644 --- a/qt6/gen_qabstractitemdelegate.go +++ b/qt6/gen_qabstractitemdelegate.go @@ -45,42 +45,34 @@ func (this *QAbstractItemDelegate) UnsafePointer() unsafe.Pointer { } // newQAbstractItemDelegate constructs the type using only CGO pointers. -func newQAbstractItemDelegate(h *C.QAbstractItemDelegate, h_QObject *C.QObject) *QAbstractItemDelegate { +func newQAbstractItemDelegate(h *C.QAbstractItemDelegate) *QAbstractItemDelegate { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractItemDelegate_virtbase(h, &outptr_QObject) + return &QAbstractItemDelegate{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAbstractItemDelegate constructs the type using only unsafe pointers. -func UnsafeNewQAbstractItemDelegate(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractItemDelegate { - if h == nil { - return nil - } - - return &QAbstractItemDelegate{h: (*C.QAbstractItemDelegate)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractItemDelegate(h unsafe.Pointer) *QAbstractItemDelegate { + return newQAbstractItemDelegate((*C.QAbstractItemDelegate)(h)) } // NewQAbstractItemDelegate constructs a new QAbstractItemDelegate object. func NewQAbstractItemDelegate() *QAbstractItemDelegate { - var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil - var outptr_QObject *C.QObject = nil - C.QAbstractItemDelegate_new(&outptr_QAbstractItemDelegate, &outptr_QObject) - ret := newQAbstractItemDelegate(outptr_QAbstractItemDelegate, outptr_QObject) + ret := newQAbstractItemDelegate(C.QAbstractItemDelegate_new()) ret.isSubclass = true return ret } // NewQAbstractItemDelegate2 constructs a new QAbstractItemDelegate object. func NewQAbstractItemDelegate2(parent *QObject) *QAbstractItemDelegate { - var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil - var outptr_QObject *C.QObject = nil - C.QAbstractItemDelegate_new2(parent.cPointer(), &outptr_QAbstractItemDelegate, &outptr_QObject) - ret := newQAbstractItemDelegate(outptr_QAbstractItemDelegate, outptr_QObject) + ret := newQAbstractItemDelegate(C.QAbstractItemDelegate_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -115,7 +107,7 @@ func (this *QAbstractItemDelegate) SizeHint(option *QStyleOptionViewItem, index } func (this *QAbstractItemDelegate) CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return newQWidget(C.QAbstractItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer()), nil, nil) + return newQWidget(C.QAbstractItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer())) } func (this *QAbstractItemDelegate) DestroyEditor(editor *QWidget, index *QModelIndex) { @@ -167,7 +159,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CommitData(cb C.intptr_t, editor * } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc(slotval1) } @@ -187,7 +179,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CloseEditor(cb C.intptr_t, editor } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc(slotval1) } @@ -249,7 +241,7 @@ func miqt_exec_callback_QAbstractItemDelegate_CloseEditor2(cb C.intptr_t, editor } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) @@ -273,7 +265,7 @@ func miqt_exec_callback_QAbstractItemDelegate_Paint(self *C.QAbstractItemDelegat // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -295,7 +287,7 @@ func miqt_exec_callback_QAbstractItemDelegate_SizeHint(self *C.QAbstractItemDele } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) slotval2 := newQModelIndex(index) @@ -307,7 +299,7 @@ func miqt_exec_callback_QAbstractItemDelegate_SizeHint(self *C.QAbstractItemDele func (this *QAbstractItemDelegate) callVirtualBase_CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return newQWidget(C.QAbstractItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer()), nil, nil) + return newQWidget(C.QAbstractItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer())) } func (this *QAbstractItemDelegate) OnCreateEditor(slot func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) { @@ -325,9 +317,9 @@ func miqt_exec_callback_QAbstractItemDelegate_CreateEditor(self *C.QAbstractItem } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(parent, nil, nil) + slotval1 := newQWidget(parent) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -357,7 +349,7 @@ func miqt_exec_callback_QAbstractItemDelegate_DestroyEditor(self *C.QAbstractIte } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := newQModelIndex(index) @@ -385,7 +377,7 @@ func miqt_exec_callback_QAbstractItemDelegate_SetEditorData(self *C.QAbstractIte } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := newQModelIndex(index) @@ -413,9 +405,9 @@ func miqt_exec_callback_QAbstractItemDelegate_SetModelData(self *C.QAbstractItem } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) - slotval2 := newQAbstractItemModel(model, nil) + slotval2 := newQAbstractItemModel(model) slotval3 := newQModelIndex(index) @@ -443,9 +435,9 @@ func miqt_exec_callback_QAbstractItemDelegate_UpdateEditorGeometry(self *C.QAbst } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -475,9 +467,9 @@ func miqt_exec_callback_QAbstractItemDelegate_EditorEvent(self *C.QAbstractItemD // Convert all CABI parameters to Go parameters slotval1 := newQEvent(event) - slotval2 := newQAbstractItemModel(model, nil) + slotval2 := newQAbstractItemModel(model) - slotval3 := newQStyleOptionViewItem(option, nil) + slotval3 := newQStyleOptionViewItem(option) slotval4 := newQModelIndex(index) @@ -507,11 +499,11 @@ func miqt_exec_callback_QAbstractItemDelegate_HelpEvent(self *C.QAbstractItemDel } // Convert all CABI parameters to Go parameters - slotval1 := newQHelpEvent(event, nil) + slotval1 := newQHelpEvent(event) - slotval2 := newQAbstractItemView(view, nil, nil, nil, nil, nil) + slotval2 := newQAbstractItemView(view) - slotval3 := newQStyleOptionViewItem(option, nil) + slotval3 := newQStyleOptionViewItem(option) slotval4 := newQModelIndex(index) @@ -636,7 +628,7 @@ func miqt_exec_callback_QAbstractItemDelegate_TimerEvent(self *C.QAbstractItemDe } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAbstractItemDelegate{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -662,7 +654,7 @@ func miqt_exec_callback_QAbstractItemDelegate_ChildEvent(self *C.QAbstractItemDe } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAbstractItemDelegate{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qabstractitemdelegate.h b/qt6/gen_qabstractitemdelegate.h index a8b86169..1fef3945 100644 --- a/qt6/gen_qabstractitemdelegate.h +++ b/qt6/gen_qabstractitemdelegate.h @@ -48,8 +48,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QAbstractItemDelegate_new(QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); -void QAbstractItemDelegate_new2(QObject* parent, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); +QAbstractItemDelegate* QAbstractItemDelegate_new(); +QAbstractItemDelegate* QAbstractItemDelegate_new2(QObject* parent); +void QAbstractItemDelegate_virtbase(QAbstractItemDelegate* src, QObject** outptr_QObject); QMetaObject* QAbstractItemDelegate_MetaObject(const QAbstractItemDelegate* self); void* QAbstractItemDelegate_Metacast(QAbstractItemDelegate* self, const char* param1); struct miqt_string QAbstractItemDelegate_Tr(const char* s); diff --git a/qt6/gen_qabstractitemmodel.cpp b/qt6/gen_qabstractitemmodel.cpp index e9c5a718..0cb13e09 100644 --- a/qt6/gen_qabstractitemmodel.cpp +++ b/qt6/gen_qabstractitemmodel.cpp @@ -24,14 +24,12 @@ #include "gen_qabstractitemmodel.h" #include "_cgo_export.h" -void QModelRoleData_new(int role, QModelRoleData** outptr_QModelRoleData) { - QModelRoleData* ret = new QModelRoleData(static_cast(role)); - *outptr_QModelRoleData = ret; +QModelRoleData* QModelRoleData_new(int role) { + return new QModelRoleData(static_cast(role)); } -void QModelRoleData_new2(QModelRoleData* param1, QModelRoleData** outptr_QModelRoleData) { - QModelRoleData* ret = new QModelRoleData(*param1); - *outptr_QModelRoleData = ret; +QModelRoleData* QModelRoleData_new2(QModelRoleData* param1) { + return new QModelRoleData(*param1); } int QModelRoleData_Role(const QModelRoleData* self) { @@ -66,24 +64,20 @@ void QModelRoleData_Delete(QModelRoleData* self, bool isSubclass) { } } -void QModelRoleDataSpan_new(QModelRoleDataSpan** outptr_QModelRoleDataSpan) { - QModelRoleDataSpan* ret = new QModelRoleDataSpan(); - *outptr_QModelRoleDataSpan = ret; +QModelRoleDataSpan* QModelRoleDataSpan_new() { + return new QModelRoleDataSpan(); } -void QModelRoleDataSpan_new2(QModelRoleData* modelRoleData, QModelRoleDataSpan** outptr_QModelRoleDataSpan) { - QModelRoleDataSpan* ret = new QModelRoleDataSpan(*modelRoleData); - *outptr_QModelRoleDataSpan = ret; +QModelRoleDataSpan* QModelRoleDataSpan_new2(QModelRoleData* modelRoleData) { + return new QModelRoleDataSpan(*modelRoleData); } -void QModelRoleDataSpan_new3(QModelRoleData* modelRoleData, ptrdiff_t lenVal, QModelRoleDataSpan** outptr_QModelRoleDataSpan) { - QModelRoleDataSpan* ret = new QModelRoleDataSpan(modelRoleData, (qsizetype)(lenVal)); - *outptr_QModelRoleDataSpan = ret; +QModelRoleDataSpan* QModelRoleDataSpan_new3(QModelRoleData* modelRoleData, ptrdiff_t lenVal) { + return new QModelRoleDataSpan(modelRoleData, (qsizetype)(lenVal)); } -void QModelRoleDataSpan_new4(QModelRoleDataSpan* param1, QModelRoleDataSpan** outptr_QModelRoleDataSpan) { - QModelRoleDataSpan* ret = new QModelRoleDataSpan(*param1); - *outptr_QModelRoleDataSpan = ret; +QModelRoleDataSpan* QModelRoleDataSpan_new4(QModelRoleDataSpan* param1) { + return new QModelRoleDataSpan(*param1); } ptrdiff_t QModelRoleDataSpan_Size(const QModelRoleDataSpan* self) { @@ -126,14 +120,12 @@ void QModelRoleDataSpan_Delete(QModelRoleDataSpan* self, bool isSubclass) { } } -void QModelIndex_new(QModelIndex** outptr_QModelIndex) { - QModelIndex* ret = new QModelIndex(); - *outptr_QModelIndex = ret; +QModelIndex* QModelIndex_new() { + return new QModelIndex(); } -void QModelIndex_new2(QModelIndex* param1, QModelIndex** outptr_QModelIndex) { - QModelIndex* ret = new QModelIndex(*param1); - *outptr_QModelIndex = ret; +QModelIndex* QModelIndex_new2(QModelIndex* param1) { + return new QModelIndex(*param1); } int QModelIndex_Row(const QModelIndex* self) { @@ -218,19 +210,16 @@ void QModelIndex_Delete(QModelIndex* self, bool isSubclass) { } } -void QPersistentModelIndex_new(QPersistentModelIndex** outptr_QPersistentModelIndex) { - QPersistentModelIndex* ret = new QPersistentModelIndex(); - *outptr_QPersistentModelIndex = ret; +QPersistentModelIndex* QPersistentModelIndex_new() { + return new QPersistentModelIndex(); } -void QPersistentModelIndex_new2(QModelIndex* index, QPersistentModelIndex** outptr_QPersistentModelIndex) { - QPersistentModelIndex* ret = new QPersistentModelIndex(*index); - *outptr_QPersistentModelIndex = ret; +QPersistentModelIndex* QPersistentModelIndex_new2(QModelIndex* index) { + return new QPersistentModelIndex(*index); } -void QPersistentModelIndex_new3(QPersistentModelIndex* other, QPersistentModelIndex** outptr_QPersistentModelIndex) { - QPersistentModelIndex* ret = new QPersistentModelIndex(*other); - *outptr_QPersistentModelIndex = ret; +QPersistentModelIndex* QPersistentModelIndex_new3(QPersistentModelIndex* other) { + return new QPersistentModelIndex(*other); } bool QPersistentModelIndex_OperatorLesser(const QPersistentModelIndex* self, QPersistentModelIndex* other) { @@ -1556,16 +1545,16 @@ public: }; -void QAbstractItemModel_new(QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractItemModel* ret = new MiqtVirtualQAbstractItemModel(); - *outptr_QAbstractItemModel = ret; - *outptr_QObject = static_cast(ret); +QAbstractItemModel* QAbstractItemModel_new() { + return new MiqtVirtualQAbstractItemModel(); } -void QAbstractItemModel_new2(QObject* parent, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractItemModel* ret = new MiqtVirtualQAbstractItemModel(parent); - *outptr_QAbstractItemModel = ret; - *outptr_QObject = static_cast(ret); +QAbstractItemModel* QAbstractItemModel_new2(QObject* parent) { + return new MiqtVirtualQAbstractItemModel(parent); +} + +void QAbstractItemModel_virtbase(QAbstractItemModel* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAbstractItemModel_MetaObject(const QAbstractItemModel* self) { @@ -3434,18 +3423,16 @@ public: }; -void QAbstractTableModel_new(QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractTableModel* ret = new MiqtVirtualQAbstractTableModel(); - *outptr_QAbstractTableModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAbstractTableModel* QAbstractTableModel_new() { + return new MiqtVirtualQAbstractTableModel(); } -void QAbstractTableModel_new2(QObject* parent, QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractTableModel* ret = new MiqtVirtualQAbstractTableModel(parent); - *outptr_QAbstractTableModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAbstractTableModel* QAbstractTableModel_new2(QObject* parent) { + return new MiqtVirtualQAbstractTableModel(parent); +} + +void QAbstractTableModel_virtbase(QAbstractTableModel* src, QAbstractItemModel** outptr_QAbstractItemModel) { + *outptr_QAbstractItemModel = static_cast(src); } QMetaObject* QAbstractTableModel_MetaObject(const QAbstractTableModel* self) { @@ -4786,18 +4773,16 @@ public: }; -void QAbstractListModel_new(QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractListModel* ret = new MiqtVirtualQAbstractListModel(); - *outptr_QAbstractListModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAbstractListModel* QAbstractListModel_new() { + return new MiqtVirtualQAbstractListModel(); } -void QAbstractListModel_new2(QObject* parent, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractListModel* ret = new MiqtVirtualQAbstractListModel(parent); - *outptr_QAbstractListModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAbstractListModel* QAbstractListModel_new2(QObject* parent) { + return new MiqtVirtualQAbstractListModel(parent); +} + +void QAbstractListModel_virtbase(QAbstractListModel* src, QAbstractItemModel** outptr_QAbstractItemModel) { + *outptr_QAbstractItemModel = static_cast(src); } QMetaObject* QAbstractListModel_MetaObject(const QAbstractListModel* self) { diff --git a/qt6/gen_qabstractitemmodel.go b/qt6/gen_qabstractitemmodel.go index 581256f0..8e189a74 100644 --- a/qt6/gen_qabstractitemmodel.go +++ b/qt6/gen_qabstractitemmodel.go @@ -55,34 +55,27 @@ func newQModelRoleData(h *C.QModelRoleData) *QModelRoleData { if h == nil { return nil } + return &QModelRoleData{h: h} } // UnsafeNewQModelRoleData constructs the type using only unsafe pointers. func UnsafeNewQModelRoleData(h unsafe.Pointer) *QModelRoleData { - if h == nil { - return nil - } - - return &QModelRoleData{h: (*C.QModelRoleData)(h)} + return newQModelRoleData((*C.QModelRoleData)(h)) } // NewQModelRoleData constructs a new QModelRoleData object. func NewQModelRoleData(role int) *QModelRoleData { - var outptr_QModelRoleData *C.QModelRoleData = nil - C.QModelRoleData_new((C.int)(role), &outptr_QModelRoleData) - ret := newQModelRoleData(outptr_QModelRoleData) + ret := newQModelRoleData(C.QModelRoleData_new((C.int)(role))) ret.isSubclass = true return ret } // NewQModelRoleData2 constructs a new QModelRoleData object. func NewQModelRoleData2(param1 *QModelRoleData) *QModelRoleData { - var outptr_QModelRoleData *C.QModelRoleData = nil - C.QModelRoleData_new2(param1.cPointer(), &outptr_QModelRoleData) - ret := newQModelRoleData(outptr_QModelRoleData) + ret := newQModelRoleData(C.QModelRoleData_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -145,54 +138,43 @@ func newQModelRoleDataSpan(h *C.QModelRoleDataSpan) *QModelRoleDataSpan { if h == nil { return nil } + return &QModelRoleDataSpan{h: h} } // UnsafeNewQModelRoleDataSpan constructs the type using only unsafe pointers. func UnsafeNewQModelRoleDataSpan(h unsafe.Pointer) *QModelRoleDataSpan { - if h == nil { - return nil - } - - return &QModelRoleDataSpan{h: (*C.QModelRoleDataSpan)(h)} + return newQModelRoleDataSpan((*C.QModelRoleDataSpan)(h)) } // NewQModelRoleDataSpan constructs a new QModelRoleDataSpan object. func NewQModelRoleDataSpan() *QModelRoleDataSpan { - var outptr_QModelRoleDataSpan *C.QModelRoleDataSpan = nil - C.QModelRoleDataSpan_new(&outptr_QModelRoleDataSpan) - ret := newQModelRoleDataSpan(outptr_QModelRoleDataSpan) + ret := newQModelRoleDataSpan(C.QModelRoleDataSpan_new()) ret.isSubclass = true return ret } // NewQModelRoleDataSpan2 constructs a new QModelRoleDataSpan object. func NewQModelRoleDataSpan2(modelRoleData *QModelRoleData) *QModelRoleDataSpan { - var outptr_QModelRoleDataSpan *C.QModelRoleDataSpan = nil - C.QModelRoleDataSpan_new2(modelRoleData.cPointer(), &outptr_QModelRoleDataSpan) - ret := newQModelRoleDataSpan(outptr_QModelRoleDataSpan) + ret := newQModelRoleDataSpan(C.QModelRoleDataSpan_new2(modelRoleData.cPointer())) ret.isSubclass = true return ret } // NewQModelRoleDataSpan3 constructs a new QModelRoleDataSpan object. func NewQModelRoleDataSpan3(modelRoleData *QModelRoleData, lenVal int64) *QModelRoleDataSpan { - var outptr_QModelRoleDataSpan *C.QModelRoleDataSpan = nil - C.QModelRoleDataSpan_new3(modelRoleData.cPointer(), (C.ptrdiff_t)(lenVal), &outptr_QModelRoleDataSpan) - ret := newQModelRoleDataSpan(outptr_QModelRoleDataSpan) + ret := newQModelRoleDataSpan(C.QModelRoleDataSpan_new3(modelRoleData.cPointer(), (C.ptrdiff_t)(lenVal))) ret.isSubclass = true return ret } // NewQModelRoleDataSpan4 constructs a new QModelRoleDataSpan object. func NewQModelRoleDataSpan4(param1 *QModelRoleDataSpan) *QModelRoleDataSpan { - var outptr_QModelRoleDataSpan *C.QModelRoleDataSpan = nil - C.QModelRoleDataSpan_new4(param1.cPointer(), &outptr_QModelRoleDataSpan) - ret := newQModelRoleDataSpan(outptr_QModelRoleDataSpan) + ret := newQModelRoleDataSpan(C.QModelRoleDataSpan_new4(param1.cPointer())) ret.isSubclass = true return ret } @@ -263,34 +245,27 @@ func newQModelIndex(h *C.QModelIndex) *QModelIndex { if h == nil { return nil } + return &QModelIndex{h: h} } // UnsafeNewQModelIndex constructs the type using only unsafe pointers. func UnsafeNewQModelIndex(h unsafe.Pointer) *QModelIndex { - if h == nil { - return nil - } - - return &QModelIndex{h: (*C.QModelIndex)(h)} + return newQModelIndex((*C.QModelIndex)(h)) } // NewQModelIndex constructs a new QModelIndex object. func NewQModelIndex() *QModelIndex { - var outptr_QModelIndex *C.QModelIndex = nil - C.QModelIndex_new(&outptr_QModelIndex) - ret := newQModelIndex(outptr_QModelIndex) + ret := newQModelIndex(C.QModelIndex_new()) ret.isSubclass = true return ret } // NewQModelIndex2 constructs a new QModelIndex object. func NewQModelIndex2(param1 *QModelIndex) *QModelIndex { - var outptr_QModelIndex *C.QModelIndex = nil - C.QModelIndex_new2(param1.cPointer(), &outptr_QModelIndex) - ret := newQModelIndex(outptr_QModelIndex) + ret := newQModelIndex(C.QModelIndex_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -354,7 +329,7 @@ func (this *QModelIndex) Flags() ItemFlag { } func (this *QModelIndex) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QModelIndex_Model(this.h), nil) + return newQAbstractItemModel(C.QModelIndex_Model(this.h)) } func (this *QModelIndex) IsValid() bool { @@ -417,44 +392,35 @@ func newQPersistentModelIndex(h *C.QPersistentModelIndex) *QPersistentModelIndex if h == nil { return nil } + return &QPersistentModelIndex{h: h} } // UnsafeNewQPersistentModelIndex constructs the type using only unsafe pointers. func UnsafeNewQPersistentModelIndex(h unsafe.Pointer) *QPersistentModelIndex { - if h == nil { - return nil - } - - return &QPersistentModelIndex{h: (*C.QPersistentModelIndex)(h)} + return newQPersistentModelIndex((*C.QPersistentModelIndex)(h)) } // NewQPersistentModelIndex constructs a new QPersistentModelIndex object. func NewQPersistentModelIndex() *QPersistentModelIndex { - var outptr_QPersistentModelIndex *C.QPersistentModelIndex = nil - C.QPersistentModelIndex_new(&outptr_QPersistentModelIndex) - ret := newQPersistentModelIndex(outptr_QPersistentModelIndex) + ret := newQPersistentModelIndex(C.QPersistentModelIndex_new()) ret.isSubclass = true return ret } // NewQPersistentModelIndex2 constructs a new QPersistentModelIndex object. func NewQPersistentModelIndex2(index *QModelIndex) *QPersistentModelIndex { - var outptr_QPersistentModelIndex *C.QPersistentModelIndex = nil - C.QPersistentModelIndex_new2(index.cPointer(), &outptr_QPersistentModelIndex) - ret := newQPersistentModelIndex(outptr_QPersistentModelIndex) + ret := newQPersistentModelIndex(C.QPersistentModelIndex_new2(index.cPointer())) ret.isSubclass = true return ret } // NewQPersistentModelIndex3 constructs a new QPersistentModelIndex object. func NewQPersistentModelIndex3(other *QPersistentModelIndex) *QPersistentModelIndex { - var outptr_QPersistentModelIndex *C.QPersistentModelIndex = nil - C.QPersistentModelIndex_new3(other.cPointer(), &outptr_QPersistentModelIndex) - ret := newQPersistentModelIndex(outptr_QPersistentModelIndex) + ret := newQPersistentModelIndex(C.QPersistentModelIndex_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -538,7 +504,7 @@ func (this *QPersistentModelIndex) Flags() ItemFlag { } func (this *QPersistentModelIndex) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QPersistentModelIndex_Model(this.h), nil) + return newQAbstractItemModel(C.QPersistentModelIndex_Model(this.h)) } func (this *QPersistentModelIndex) IsValid() bool { @@ -586,42 +552,34 @@ func (this *QAbstractItemModel) UnsafePointer() unsafe.Pointer { } // newQAbstractItemModel constructs the type using only CGO pointers. -func newQAbstractItemModel(h *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractItemModel { +func newQAbstractItemModel(h *C.QAbstractItemModel) *QAbstractItemModel { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractItemModel_virtbase(h, &outptr_QObject) + return &QAbstractItemModel{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAbstractItemModel constructs the type using only unsafe pointers. -func UnsafeNewQAbstractItemModel(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractItemModel { - if h == nil { - return nil - } - - return &QAbstractItemModel{h: (*C.QAbstractItemModel)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractItemModel(h unsafe.Pointer) *QAbstractItemModel { + return newQAbstractItemModel((*C.QAbstractItemModel)(h)) } // NewQAbstractItemModel constructs a new QAbstractItemModel object. func NewQAbstractItemModel() *QAbstractItemModel { - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractItemModel_new(&outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractItemModel(outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractItemModel(C.QAbstractItemModel_new()) ret.isSubclass = true return ret } // NewQAbstractItemModel2 constructs a new QAbstractItemModel object. func NewQAbstractItemModel2(parent *QObject) *QAbstractItemModel { - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractItemModel_new2(parent.cPointer(), &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractItemModel(outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractItemModel(C.QAbstractItemModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -759,7 +717,7 @@ func (this *QAbstractItemModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QAbstractItemModel_MimeData(this.h, indexes_ma), nil) + return newQMimeData(C.QAbstractItemModel_MimeData(this.h, indexes_ma)) } func (this *QAbstractItemModel) CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -1674,7 +1632,7 @@ func (this *QAbstractItemModel) callVirtualBase_MimeData(indexes []QModelIndex) } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QAbstractItemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QAbstractItemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QAbstractItemModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -1728,7 +1686,7 @@ func miqt_exec_callback_QAbstractItemModel_CanDropMimeData(self *C.QAbstractItem } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -1764,7 +1722,7 @@ func miqt_exec_callback_QAbstractItemModel_DropMimeData(self *C.QAbstractItemMod } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -2485,7 +2443,7 @@ func miqt_exec_callback_QAbstractItemModel_TimerEvent(self *C.QAbstractItemModel } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAbstractItemModel{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -2511,7 +2469,7 @@ func miqt_exec_callback_QAbstractItemModel_ChildEvent(self *C.QAbstractItemModel } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAbstractItemModel{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -2630,44 +2588,34 @@ func (this *QAbstractTableModel) UnsafePointer() unsafe.Pointer { } // newQAbstractTableModel constructs the type using only CGO pointers. -func newQAbstractTableModel(h *C.QAbstractTableModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractTableModel { +func newQAbstractTableModel(h *C.QAbstractTableModel) *QAbstractTableModel { if h == nil { return nil } + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + C.QAbstractTableModel_virtbase(h, &outptr_QAbstractItemModel) + return &QAbstractTableModel{h: h, - QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} + QAbstractItemModel: newQAbstractItemModel(outptr_QAbstractItemModel)} } // UnsafeNewQAbstractTableModel constructs the type using only unsafe pointers. -func UnsafeNewQAbstractTableModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractTableModel { - if h == nil { - return nil - } - - return &QAbstractTableModel{h: (*C.QAbstractTableModel)(h), - QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} +func UnsafeNewQAbstractTableModel(h unsafe.Pointer) *QAbstractTableModel { + return newQAbstractTableModel((*C.QAbstractTableModel)(h)) } // NewQAbstractTableModel constructs a new QAbstractTableModel object. func NewQAbstractTableModel() *QAbstractTableModel { - var outptr_QAbstractTableModel *C.QAbstractTableModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractTableModel_new(&outptr_QAbstractTableModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractTableModel(outptr_QAbstractTableModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractTableModel(C.QAbstractTableModel_new()) ret.isSubclass = true return ret } // NewQAbstractTableModel2 constructs a new QAbstractTableModel object. func NewQAbstractTableModel2(parent *QObject) *QAbstractTableModel { - var outptr_QAbstractTableModel *C.QAbstractTableModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractTableModel_new2(parent.cPointer(), &outptr_QAbstractTableModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractTableModel(outptr_QAbstractTableModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractTableModel(C.QAbstractTableModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -2821,7 +2769,7 @@ func miqt_exec_callback_QAbstractTableModel_DropMimeData(self *C.QAbstractTableM } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -3227,7 +3175,7 @@ func (this *QAbstractTableModel) callVirtualBase_MimeData(indexes []QModelIndex) } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QAbstractTableModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QAbstractTableModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QAbstractTableModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -3281,7 +3229,7 @@ func miqt_exec_callback_QAbstractTableModel_CanDropMimeData(self *C.QAbstractTab } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -3931,44 +3879,34 @@ func (this *QAbstractListModel) UnsafePointer() unsafe.Pointer { } // newQAbstractListModel constructs the type using only CGO pointers. -func newQAbstractListModel(h *C.QAbstractListModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractListModel { +func newQAbstractListModel(h *C.QAbstractListModel) *QAbstractListModel { if h == nil { return nil } + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + C.QAbstractListModel_virtbase(h, &outptr_QAbstractItemModel) + return &QAbstractListModel{h: h, - QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} + QAbstractItemModel: newQAbstractItemModel(outptr_QAbstractItemModel)} } // UnsafeNewQAbstractListModel constructs the type using only unsafe pointers. -func UnsafeNewQAbstractListModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractListModel { - if h == nil { - return nil - } - - return &QAbstractListModel{h: (*C.QAbstractListModel)(h), - QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} +func UnsafeNewQAbstractListModel(h unsafe.Pointer) *QAbstractListModel { + return newQAbstractListModel((*C.QAbstractListModel)(h)) } // NewQAbstractListModel constructs a new QAbstractListModel object. func NewQAbstractListModel() *QAbstractListModel { - var outptr_QAbstractListModel *C.QAbstractListModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractListModel_new(&outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractListModel(outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractListModel(C.QAbstractListModel_new()) ret.isSubclass = true return ret } // NewQAbstractListModel2 constructs a new QAbstractListModel object. func NewQAbstractListModel2(parent *QObject) *QAbstractListModel { - var outptr_QAbstractListModel *C.QAbstractListModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractListModel_new2(parent.cPointer(), &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractListModel(outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractListModel(C.QAbstractListModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -4122,7 +4060,7 @@ func miqt_exec_callback_QAbstractListModel_DropMimeData(self *C.QAbstractListMod } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -4506,7 +4444,7 @@ func (this *QAbstractListModel) callVirtualBase_MimeData(indexes []QModelIndex) } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QAbstractListModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QAbstractListModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QAbstractListModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -4560,7 +4498,7 @@ func miqt_exec_callback_QAbstractListModel_CanDropMimeData(self *C.QAbstractList } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt6/gen_qabstractitemmodel.h b/qt6/gen_qabstractitemmodel.h index eabec1c8..84fcd722 100644 --- a/qt6/gen_qabstractitemmodel.h +++ b/qt6/gen_qabstractitemmodel.h @@ -50,8 +50,8 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -void QModelRoleData_new(int role, QModelRoleData** outptr_QModelRoleData); -void QModelRoleData_new2(QModelRoleData* param1, QModelRoleData** outptr_QModelRoleData); +QModelRoleData* QModelRoleData_new(int role); +QModelRoleData* QModelRoleData_new2(QModelRoleData* param1); int QModelRoleData_Role(const QModelRoleData* self); QVariant* QModelRoleData_Data(QModelRoleData* self); QVariant* QModelRoleData_Data2(const QModelRoleData* self); @@ -59,10 +59,10 @@ void QModelRoleData_ClearData(QModelRoleData* self); void QModelRoleData_OperatorAssign(QModelRoleData* self, QModelRoleData* param1); void QModelRoleData_Delete(QModelRoleData* self, bool isSubclass); -void QModelRoleDataSpan_new(QModelRoleDataSpan** outptr_QModelRoleDataSpan); -void QModelRoleDataSpan_new2(QModelRoleData* modelRoleData, QModelRoleDataSpan** outptr_QModelRoleDataSpan); -void QModelRoleDataSpan_new3(QModelRoleData* modelRoleData, ptrdiff_t lenVal, QModelRoleDataSpan** outptr_QModelRoleDataSpan); -void QModelRoleDataSpan_new4(QModelRoleDataSpan* param1, QModelRoleDataSpan** outptr_QModelRoleDataSpan); +QModelRoleDataSpan* QModelRoleDataSpan_new(); +QModelRoleDataSpan* QModelRoleDataSpan_new2(QModelRoleData* modelRoleData); +QModelRoleDataSpan* QModelRoleDataSpan_new3(QModelRoleData* modelRoleData, ptrdiff_t lenVal); +QModelRoleDataSpan* QModelRoleDataSpan_new4(QModelRoleDataSpan* param1); ptrdiff_t QModelRoleDataSpan_Size(const QModelRoleDataSpan* self); ptrdiff_t QModelRoleDataSpan_Length(const QModelRoleDataSpan* self); QModelRoleData* QModelRoleDataSpan_Data(const QModelRoleDataSpan* self); @@ -72,8 +72,8 @@ QModelRoleData* QModelRoleDataSpan_OperatorSubscript(const QModelRoleDataSpan* s QVariant* QModelRoleDataSpan_DataForRole(const QModelRoleDataSpan* self, int role); void QModelRoleDataSpan_Delete(QModelRoleDataSpan* self, bool isSubclass); -void QModelIndex_new(QModelIndex** outptr_QModelIndex); -void QModelIndex_new2(QModelIndex* param1, QModelIndex** outptr_QModelIndex); +QModelIndex* QModelIndex_new(); +QModelIndex* QModelIndex_new2(QModelIndex* param1); int QModelIndex_Row(const QModelIndex* self); int QModelIndex_Column(const QModelIndex* self); uintptr_t QModelIndex_InternalId(const QModelIndex* self); @@ -94,9 +94,9 @@ bool QModelIndex_OperatorLesser(const QModelIndex* self, QModelIndex* other); QVariant* QModelIndex_Data1(const QModelIndex* self, int role); void QModelIndex_Delete(QModelIndex* self, bool isSubclass); -void QPersistentModelIndex_new(QPersistentModelIndex** outptr_QPersistentModelIndex); -void QPersistentModelIndex_new2(QModelIndex* index, QPersistentModelIndex** outptr_QPersistentModelIndex); -void QPersistentModelIndex_new3(QPersistentModelIndex* other, QPersistentModelIndex** outptr_QPersistentModelIndex); +QPersistentModelIndex* QPersistentModelIndex_new(); +QPersistentModelIndex* QPersistentModelIndex_new2(QModelIndex* index); +QPersistentModelIndex* QPersistentModelIndex_new3(QPersistentModelIndex* other); bool QPersistentModelIndex_OperatorLesser(const QPersistentModelIndex* self, QPersistentModelIndex* other); bool QPersistentModelIndex_OperatorEqual(const QPersistentModelIndex* self, QPersistentModelIndex* other); bool QPersistentModelIndex_OperatorNotEqual(const QPersistentModelIndex* self, QPersistentModelIndex* other); @@ -120,8 +120,9 @@ bool QPersistentModelIndex_IsValid(const QPersistentModelIndex* self); QVariant* QPersistentModelIndex_Data1(const QPersistentModelIndex* self, int role); void QPersistentModelIndex_Delete(QPersistentModelIndex* self, bool isSubclass); -void QAbstractItemModel_new(QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QAbstractItemModel_new2(QObject* parent, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QAbstractItemModel* QAbstractItemModel_new(); +QAbstractItemModel* QAbstractItemModel_new2(QObject* parent); +void QAbstractItemModel_virtbase(QAbstractItemModel* src, QObject** outptr_QObject); QMetaObject* QAbstractItemModel_MetaObject(const QAbstractItemModel* self); void* QAbstractItemModel_Metacast(QAbstractItemModel* self, const char* param1); struct miqt_string QAbstractItemModel_Tr(const char* s); @@ -286,8 +287,9 @@ void QAbstractItemModel_override_virtual_DisconnectNotify(void* self, intptr_t s void QAbstractItemModel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QAbstractItemModel_Delete(QAbstractItemModel* self, bool isSubclass); -void QAbstractTableModel_new(QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QAbstractTableModel_new2(QObject* parent, QAbstractTableModel** outptr_QAbstractTableModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QAbstractTableModel* QAbstractTableModel_new(); +QAbstractTableModel* QAbstractTableModel_new2(QObject* parent); +void QAbstractTableModel_virtbase(QAbstractTableModel* src, QAbstractItemModel** outptr_QAbstractItemModel); QMetaObject* QAbstractTableModel_MetaObject(const QAbstractTableModel* self); void* QAbstractTableModel_Metacast(QAbstractTableModel* self, const char* param1); struct miqt_string QAbstractTableModel_Tr(const char* s); @@ -369,8 +371,9 @@ void QAbstractTableModel_override_virtual_ResetInternalData(void* self, intptr_t void QAbstractTableModel_virtualbase_ResetInternalData(void* self); void QAbstractTableModel_Delete(QAbstractTableModel* self, bool isSubclass); -void QAbstractListModel_new(QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QAbstractListModel_new2(QObject* parent, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QAbstractListModel* QAbstractListModel_new(); +QAbstractListModel* QAbstractListModel_new2(QObject* parent); +void QAbstractListModel_virtbase(QAbstractListModel* src, QAbstractItemModel** outptr_QAbstractItemModel); QMetaObject* QAbstractListModel_MetaObject(const QAbstractListModel* self); void* QAbstractListModel_Metacast(QAbstractListModel* self, const char* param1); struct miqt_string QAbstractListModel_Tr(const char* s); diff --git a/qt6/gen_qabstractitemview.cpp b/qt6/gen_qabstractitemview.cpp index 92315f4e..2fdf45ac 100644 --- a/qt6/gen_qabstractitemview.cpp +++ b/qt6/gen_qabstractitemview.cpp @@ -1634,24 +1634,16 @@ public: }; -void QAbstractItemView_new(QWidget* parent, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractItemView* ret = new MiqtVirtualQAbstractItemView(parent); - *outptr_QAbstractItemView = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractItemView* QAbstractItemView_new(QWidget* parent) { + return new MiqtVirtualQAbstractItemView(parent); } -void QAbstractItemView_new2(QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractItemView* ret = new MiqtVirtualQAbstractItemView(); - *outptr_QAbstractItemView = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractItemView* QAbstractItemView_new2() { + return new MiqtVirtualQAbstractItemView(); +} + +void QAbstractItemView_virtbase(QAbstractItemView* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); } QMetaObject* QAbstractItemView_MetaObject(const QAbstractItemView* self) { diff --git a/qt6/gen_qabstractitemview.go b/qt6/gen_qabstractitemview.go index 8ca5b18b..cbaef7be 100644 --- a/qt6/gen_qabstractitemview.go +++ b/qt6/gen_qabstractitemview.go @@ -127,50 +127,34 @@ func (this *QAbstractItemView) UnsafePointer() unsafe.Pointer { } // newQAbstractItemView constructs the type using only CGO pointers. -func newQAbstractItemView(h *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractItemView { +func newQAbstractItemView(h *C.QAbstractItemView) *QAbstractItemView { if h == nil { return nil } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QAbstractItemView_virtbase(h, &outptr_QAbstractScrollArea) + return &QAbstractItemView{h: h, - QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractScrollArea: newQAbstractScrollArea(outptr_QAbstractScrollArea)} } // UnsafeNewQAbstractItemView constructs the type using only unsafe pointers. -func UnsafeNewQAbstractItemView(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractItemView { - if h == nil { - return nil - } - - return &QAbstractItemView{h: (*C.QAbstractItemView)(h), - QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQAbstractItemView(h unsafe.Pointer) *QAbstractItemView { + return newQAbstractItemView((*C.QAbstractItemView)(h)) } // NewQAbstractItemView constructs a new QAbstractItemView object. func NewQAbstractItemView(parent *QWidget) *QAbstractItemView { - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractItemView_new(parent.cPointer(), &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractItemView(outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractItemView(C.QAbstractItemView_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQAbstractItemView2 constructs a new QAbstractItemView object. func NewQAbstractItemView2() *QAbstractItemView { - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractItemView_new2(&outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractItemView(outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractItemView(C.QAbstractItemView_new2()) ret.isSubclass = true return ret } @@ -199,7 +183,7 @@ func (this *QAbstractItemView) SetModel(model *QAbstractItemModel) { } func (this *QAbstractItemView) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QAbstractItemView_Model(this.h), nil) + return newQAbstractItemModel(C.QAbstractItemView_Model(this.h)) } func (this *QAbstractItemView) SetSelectionModel(selectionModel *QItemSelectionModel) { @@ -207,7 +191,7 @@ func (this *QAbstractItemView) SetSelectionModel(selectionModel *QItemSelectionM } func (this *QAbstractItemView) SelectionModel() *QItemSelectionModel { - return newQItemSelectionModel(C.QAbstractItemView_SelectionModel(this.h), nil) + return newQItemSelectionModel(C.QAbstractItemView_SelectionModel(this.h)) } func (this *QAbstractItemView) SetItemDelegate(delegate *QAbstractItemDelegate) { @@ -215,7 +199,7 @@ func (this *QAbstractItemView) SetItemDelegate(delegate *QAbstractItemDelegate) } func (this *QAbstractItemView) ItemDelegate() *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegate(this.h), nil) + return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegate(this.h)) } func (this *QAbstractItemView) SetSelectionMode(mode QAbstractItemView__SelectionMode) { @@ -423,7 +407,7 @@ func (this *QAbstractItemView) SetIndexWidget(index *QModelIndex, widget *QWidge } func (this *QAbstractItemView) IndexWidget(index *QModelIndex) *QWidget { - return newQWidget(C.QAbstractItemView_IndexWidget(this.h, index.cPointer()), nil, nil) + return newQWidget(C.QAbstractItemView_IndexWidget(this.h, index.cPointer())) } func (this *QAbstractItemView) SetItemDelegateForRow(row int, delegate *QAbstractItemDelegate) { @@ -431,7 +415,7 @@ func (this *QAbstractItemView) SetItemDelegateForRow(row int, delegate *QAbstrac } func (this *QAbstractItemView) ItemDelegateForRow(row int) *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegateForRow(this.h, (C.int)(row)), nil) + return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegateForRow(this.h, (C.int)(row))) } func (this *QAbstractItemView) SetItemDelegateForColumn(column int, delegate *QAbstractItemDelegate) { @@ -439,15 +423,15 @@ func (this *QAbstractItemView) SetItemDelegateForColumn(column int, delegate *QA } func (this *QAbstractItemView) ItemDelegateForColumn(column int) *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegateForColumn(this.h, (C.int)(column)), nil) + return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegateForColumn(this.h, (C.int)(column))) } func (this *QAbstractItemView) ItemDelegateWithIndex(index *QModelIndex) *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegateWithIndex(this.h, index.cPointer()), nil) + return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegateWithIndex(this.h, index.cPointer())) } func (this *QAbstractItemView) ItemDelegateForIndex(index *QModelIndex) *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegateForIndex(this.h, index.cPointer()), nil) + return newQAbstractItemDelegate(C.QAbstractItemView_ItemDelegateForIndex(this.h, index.cPointer())) } func (this *QAbstractItemView) InputMethodQuery(query InputMethodQuery) *QVariant { @@ -675,7 +659,7 @@ func miqt_exec_callback_QAbstractItemView_SetModel(self *C.QAbstractItemView, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc((&QAbstractItemView{h: self}).callVirtualBase_SetModel, slotval1) @@ -701,7 +685,7 @@ func miqt_exec_callback_QAbstractItemView_SetSelectionModel(self *C.QAbstractIte } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QAbstractItemView{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -864,7 +848,7 @@ func miqt_exec_callback_QAbstractItemView_SizeHintForColumn(self *C.QAbstractIte func (this *QAbstractItemView) callVirtualBase_ItemDelegateForIndex(index *QModelIndex) *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QAbstractItemView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer()), nil) + return newQAbstractItemDelegate(C.QAbstractItemView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer())) } func (this *QAbstractItemView) OnItemDelegateForIndex(slot func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) { @@ -1366,7 +1350,7 @@ func miqt_exec_callback_QAbstractItemView_CloseEditor(self *C.QAbstractItemView, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) @@ -1394,7 +1378,7 @@ func miqt_exec_callback_QAbstractItemView_CommitData(self *C.QAbstractItemView, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc((&QAbstractItemView{h: self}).callVirtualBase_CommitData, slotval1) @@ -1701,7 +1685,7 @@ func miqt_exec_callback_QAbstractItemView_InitViewItemOption(self *C.QAbstractIt } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) gofunc((&QAbstractItemView{h: self}).callVirtualBase_InitViewItemOption, slotval1) @@ -1811,7 +1795,7 @@ func miqt_exec_callback_QAbstractItemView_MousePressEvent(self *C.QAbstractItemV } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1837,7 +1821,7 @@ func miqt_exec_callback_QAbstractItemView_MouseMoveEvent(self *C.QAbstractItemVi } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1863,7 +1847,7 @@ func miqt_exec_callback_QAbstractItemView_MouseReleaseEvent(self *C.QAbstractIte } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1889,7 +1873,7 @@ func miqt_exec_callback_QAbstractItemView_MouseDoubleClickEvent(self *C.QAbstrac } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1915,7 +1899,7 @@ func miqt_exec_callback_QAbstractItemView_DragEnterEvent(self *C.QAbstractItemVi } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1941,7 +1925,7 @@ func miqt_exec_callback_QAbstractItemView_DragMoveEvent(self *C.QAbstractItemVie } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1967,7 +1951,7 @@ func miqt_exec_callback_QAbstractItemView_DragLeaveEvent(self *C.QAbstractItemVi } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1993,7 +1977,7 @@ func miqt_exec_callback_QAbstractItemView_DropEvent(self *C.QAbstractItemView, c } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -2019,7 +2003,7 @@ func miqt_exec_callback_QAbstractItemView_FocusInEvent(self *C.QAbstractItemView } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -2045,7 +2029,7 @@ func miqt_exec_callback_QAbstractItemView_FocusOutEvent(self *C.QAbstractItemVie } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -2071,7 +2055,7 @@ func miqt_exec_callback_QAbstractItemView_KeyPressEvent(self *C.QAbstractItemVie } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -2097,7 +2081,7 @@ func miqt_exec_callback_QAbstractItemView_ResizeEvent(self *C.QAbstractItemView, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -2123,7 +2107,7 @@ func miqt_exec_callback_QAbstractItemView_TimerEvent(self *C.QAbstractItemView, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -2149,7 +2133,7 @@ func miqt_exec_callback_QAbstractItemView_InputMethodEvent(self *C.QAbstractItem } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QAbstractItemView{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -2286,7 +2270,7 @@ func miqt_exec_callback_QAbstractItemView_SetupViewport(self *C.QAbstractItemVie } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(viewport, nil, nil) + slotval1 := newQWidget(viewport) gofunc((&QAbstractItemView{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -2312,7 +2296,7 @@ func miqt_exec_callback_QAbstractItemView_PaintEvent(self *C.QAbstractItemView, } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QAbstractItemView{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -2338,7 +2322,7 @@ func miqt_exec_callback_QAbstractItemView_WheelEvent(self *C.QAbstractItemView, } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(param1, nil, nil, nil, nil) + slotval1 := newQWheelEvent(param1) gofunc((&QAbstractItemView{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -2364,7 +2348,7 @@ func miqt_exec_callback_QAbstractItemView_ContextMenuEvent(self *C.QAbstractItem } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QAbstractItemView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt6/gen_qabstractitemview.h b/qt6/gen_qabstractitemview.h index 860844df..807642f9 100644 --- a/qt6/gen_qabstractitemview.h +++ b/qt6/gen_qabstractitemview.h @@ -82,8 +82,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QAbstractItemView_new(QWidget* parent, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QAbstractItemView_new2(QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QAbstractItemView* QAbstractItemView_new(QWidget* parent); +QAbstractItemView* QAbstractItemView_new2(); +void QAbstractItemView_virtbase(QAbstractItemView* src, QAbstractScrollArea** outptr_QAbstractScrollArea); QMetaObject* QAbstractItemView_MetaObject(const QAbstractItemView* self); void* QAbstractItemView_Metacast(QAbstractItemView* self, const char* param1); struct miqt_string QAbstractItemView_Tr(const char* s); diff --git a/qt6/gen_qabstractnativeeventfilter.cpp b/qt6/gen_qabstractnativeeventfilter.cpp index caaf4679..cb0b1a76 100644 --- a/qt6/gen_qabstractnativeeventfilter.cpp +++ b/qt6/gen_qabstractnativeeventfilter.cpp @@ -37,9 +37,8 @@ public: }; -void QAbstractNativeEventFilter_new(QAbstractNativeEventFilter** outptr_QAbstractNativeEventFilter) { - MiqtVirtualQAbstractNativeEventFilter* ret = new MiqtVirtualQAbstractNativeEventFilter(); - *outptr_QAbstractNativeEventFilter = ret; +QAbstractNativeEventFilter* QAbstractNativeEventFilter_new() { + return new MiqtVirtualQAbstractNativeEventFilter(); } bool QAbstractNativeEventFilter_NativeEventFilter(QAbstractNativeEventFilter* self, struct miqt_string eventType, void* message, intptr_t* result) { diff --git a/qt6/gen_qabstractnativeeventfilter.go b/qt6/gen_qabstractnativeeventfilter.go index 346edac7..3d99e978 100644 --- a/qt6/gen_qabstractnativeeventfilter.go +++ b/qt6/gen_qabstractnativeeventfilter.go @@ -38,24 +38,19 @@ func newQAbstractNativeEventFilter(h *C.QAbstractNativeEventFilter) *QAbstractNa if h == nil { return nil } + return &QAbstractNativeEventFilter{h: h} } // UnsafeNewQAbstractNativeEventFilter constructs the type using only unsafe pointers. func UnsafeNewQAbstractNativeEventFilter(h unsafe.Pointer) *QAbstractNativeEventFilter { - if h == nil { - return nil - } - - return &QAbstractNativeEventFilter{h: (*C.QAbstractNativeEventFilter)(h)} + return newQAbstractNativeEventFilter((*C.QAbstractNativeEventFilter)(h)) } // NewQAbstractNativeEventFilter constructs a new QAbstractNativeEventFilter object. func NewQAbstractNativeEventFilter() *QAbstractNativeEventFilter { - var outptr_QAbstractNativeEventFilter *C.QAbstractNativeEventFilter = nil - C.QAbstractNativeEventFilter_new(&outptr_QAbstractNativeEventFilter) - ret := newQAbstractNativeEventFilter(outptr_QAbstractNativeEventFilter) + ret := newQAbstractNativeEventFilter(C.QAbstractNativeEventFilter_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qabstractnativeeventfilter.h b/qt6/gen_qabstractnativeeventfilter.h index f218d207..5dc23d76 100644 --- a/qt6/gen_qabstractnativeeventfilter.h +++ b/qt6/gen_qabstractnativeeventfilter.h @@ -20,7 +20,7 @@ class QAbstractNativeEventFilter; typedef struct QAbstractNativeEventFilter QAbstractNativeEventFilter; #endif -void QAbstractNativeEventFilter_new(QAbstractNativeEventFilter** outptr_QAbstractNativeEventFilter); +QAbstractNativeEventFilter* QAbstractNativeEventFilter_new(); bool QAbstractNativeEventFilter_NativeEventFilter(QAbstractNativeEventFilter* self, struct miqt_string eventType, void* message, intptr_t* result); void QAbstractNativeEventFilter_override_virtual_NativeEventFilter(void* self, intptr_t slot); bool QAbstractNativeEventFilter_virtualbase_NativeEventFilter(void* self, struct miqt_string eventType, void* message, intptr_t* result); diff --git a/qt6/gen_qabstractproxymodel.cpp b/qt6/gen_qabstractproxymodel.cpp index 50ee9fa5..ed8bfd9c 100644 --- a/qt6/gen_qabstractproxymodel.cpp +++ b/qt6/gen_qabstractproxymodel.cpp @@ -1193,18 +1193,16 @@ public: }; -void QAbstractProxyModel_new(QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractProxyModel* ret = new MiqtVirtualQAbstractProxyModel(); - *outptr_QAbstractProxyModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAbstractProxyModel* QAbstractProxyModel_new() { + return new MiqtVirtualQAbstractProxyModel(); } -void QAbstractProxyModel_new2(QObject* parent, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQAbstractProxyModel* ret = new MiqtVirtualQAbstractProxyModel(parent); - *outptr_QAbstractProxyModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAbstractProxyModel* QAbstractProxyModel_new2(QObject* parent) { + return new MiqtVirtualQAbstractProxyModel(parent); +} + +void QAbstractProxyModel_virtbase(QAbstractProxyModel* src, QAbstractItemModel** outptr_QAbstractItemModel) { + *outptr_QAbstractItemModel = static_cast(src); } QMetaObject* QAbstractProxyModel_MetaObject(const QAbstractProxyModel* self) { diff --git a/qt6/gen_qabstractproxymodel.go b/qt6/gen_qabstractproxymodel.go index 2406019c..79d9fe26 100644 --- a/qt6/gen_qabstractproxymodel.go +++ b/qt6/gen_qabstractproxymodel.go @@ -35,44 +35,34 @@ func (this *QAbstractProxyModel) UnsafePointer() unsafe.Pointer { } // newQAbstractProxyModel constructs the type using only CGO pointers. -func newQAbstractProxyModel(h *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QAbstractProxyModel { +func newQAbstractProxyModel(h *C.QAbstractProxyModel) *QAbstractProxyModel { if h == nil { return nil } + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + C.QAbstractProxyModel_virtbase(h, &outptr_QAbstractItemModel) + return &QAbstractProxyModel{h: h, - QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} + QAbstractItemModel: newQAbstractItemModel(outptr_QAbstractItemModel)} } // UnsafeNewQAbstractProxyModel constructs the type using only unsafe pointers. -func UnsafeNewQAbstractProxyModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractProxyModel { - if h == nil { - return nil - } - - return &QAbstractProxyModel{h: (*C.QAbstractProxyModel)(h), - QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} +func UnsafeNewQAbstractProxyModel(h unsafe.Pointer) *QAbstractProxyModel { + return newQAbstractProxyModel((*C.QAbstractProxyModel)(h)) } // NewQAbstractProxyModel constructs a new QAbstractProxyModel object. func NewQAbstractProxyModel() *QAbstractProxyModel { - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractProxyModel_new(&outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractProxyModel(outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractProxyModel(C.QAbstractProxyModel_new()) ret.isSubclass = true return ret } // NewQAbstractProxyModel2 constructs a new QAbstractProxyModel object. func NewQAbstractProxyModel2(parent *QObject) *QAbstractProxyModel { - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QAbstractProxyModel_new2(parent.cPointer(), &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQAbstractProxyModel(outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQAbstractProxyModel(C.QAbstractProxyModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -101,7 +91,7 @@ func (this *QAbstractProxyModel) SetSourceModel(sourceModel *QAbstractItemModel) } func (this *QAbstractProxyModel) SourceModel() *QAbstractItemModel { - return newQAbstractItemModel(C.QAbstractProxyModel_SourceModel(this.h), nil) + return newQAbstractItemModel(C.QAbstractProxyModel_SourceModel(this.h)) } func (this *QAbstractProxyModel) MapToSource(proxyIndex *QModelIndex) *QModelIndex { @@ -241,7 +231,7 @@ func (this *QAbstractProxyModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QAbstractProxyModel_MimeData(this.h, indexes_ma), nil) + return newQMimeData(C.QAbstractProxyModel_MimeData(this.h, indexes_ma)) } func (this *QAbstractProxyModel) CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -332,7 +322,7 @@ func miqt_exec_callback_QAbstractProxyModel_SetSourceModel(self *C.QAbstractProx } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(sourceModel, nil) + slotval1 := newQAbstractItemModel(sourceModel) gofunc((&QAbstractProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) @@ -1004,7 +994,7 @@ func (this *QAbstractProxyModel) callVirtualBase_MimeData(indexes []QModelIndex) } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QAbstractProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QAbstractProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QAbstractProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -1058,7 +1048,7 @@ func miqt_exec_callback_QAbstractProxyModel_CanDropMimeData(self *C.QAbstractPro } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -1094,7 +1084,7 @@ func miqt_exec_callback_QAbstractProxyModel_DropMimeData(self *C.QAbstractProxyM } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt6/gen_qabstractproxymodel.h b/qt6/gen_qabstractproxymodel.h index f03d58f0..a3b480bd 100644 --- a/qt6/gen_qabstractproxymodel.h +++ b/qt6/gen_qabstractproxymodel.h @@ -38,8 +38,9 @@ typedef struct QSize QSize; typedef struct QVariant QVariant; #endif -void QAbstractProxyModel_new(QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QAbstractProxyModel_new2(QObject* parent, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QAbstractProxyModel* QAbstractProxyModel_new(); +QAbstractProxyModel* QAbstractProxyModel_new2(QObject* parent); +void QAbstractProxyModel_virtbase(QAbstractProxyModel* src, QAbstractItemModel** outptr_QAbstractItemModel); QMetaObject* QAbstractProxyModel_MetaObject(const QAbstractProxyModel* self); void* QAbstractProxyModel_Metacast(QAbstractProxyModel* self, const char* param1); struct miqt_string QAbstractProxyModel_Tr(const char* s); diff --git a/qt6/gen_qabstractscrollarea.cpp b/qt6/gen_qabstractscrollarea.cpp index 9b28e688..ef1d9559 100644 --- a/qt6/gen_qabstractscrollarea.cpp +++ b/qt6/gen_qabstractscrollarea.cpp @@ -581,22 +581,16 @@ public: }; -void QAbstractScrollArea_new(QWidget* parent, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractScrollArea* ret = new MiqtVirtualQAbstractScrollArea(parent); - *outptr_QAbstractScrollArea = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractScrollArea* QAbstractScrollArea_new(QWidget* parent) { + return new MiqtVirtualQAbstractScrollArea(parent); } -void QAbstractScrollArea_new2(QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractScrollArea* ret = new MiqtVirtualQAbstractScrollArea(); - *outptr_QAbstractScrollArea = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractScrollArea* QAbstractScrollArea_new2() { + return new MiqtVirtualQAbstractScrollArea(); +} + +void QAbstractScrollArea_virtbase(QAbstractScrollArea* src, QFrame** outptr_QFrame) { + *outptr_QFrame = static_cast(src); } QMetaObject* QAbstractScrollArea_MetaObject(const QAbstractScrollArea* self) { diff --git a/qt6/gen_qabstractscrollarea.go b/qt6/gen_qabstractscrollarea.go index 772c8bc2..3fdf6d71 100644 --- a/qt6/gen_qabstractscrollarea.go +++ b/qt6/gen_qabstractscrollarea.go @@ -43,48 +43,34 @@ func (this *QAbstractScrollArea) UnsafePointer() unsafe.Pointer { } // newQAbstractScrollArea constructs the type using only CGO pointers. -func newQAbstractScrollArea(h *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractScrollArea { +func newQAbstractScrollArea(h *C.QAbstractScrollArea) *QAbstractScrollArea { if h == nil { return nil } + var outptr_QFrame *C.QFrame = nil + C.QAbstractScrollArea_virtbase(h, &outptr_QFrame) + return &QAbstractScrollArea{h: h, - QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QFrame: newQFrame(outptr_QFrame)} } // UnsafeNewQAbstractScrollArea constructs the type using only unsafe pointers. -func UnsafeNewQAbstractScrollArea(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractScrollArea { - if h == nil { - return nil - } - - return &QAbstractScrollArea{h: (*C.QAbstractScrollArea)(h), - QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQAbstractScrollArea(h unsafe.Pointer) *QAbstractScrollArea { + return newQAbstractScrollArea((*C.QAbstractScrollArea)(h)) } // NewQAbstractScrollArea constructs a new QAbstractScrollArea object. func NewQAbstractScrollArea(parent *QWidget) *QAbstractScrollArea { - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractScrollArea_new(parent.cPointer(), &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractScrollArea(outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractScrollArea(C.QAbstractScrollArea_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQAbstractScrollArea2 constructs a new QAbstractScrollArea object. func NewQAbstractScrollArea2() *QAbstractScrollArea { - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractScrollArea_new2(&outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractScrollArea(outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractScrollArea(C.QAbstractScrollArea_new2()) ret.isSubclass = true return ret } @@ -117,7 +103,7 @@ func (this *QAbstractScrollArea) SetVerticalScrollBarPolicy(verticalScrollBarPol } func (this *QAbstractScrollArea) VerticalScrollBar() *QScrollBar { - return newQScrollBar(C.QAbstractScrollArea_VerticalScrollBar(this.h), nil, nil, nil, nil) + return newQScrollBar(C.QAbstractScrollArea_VerticalScrollBar(this.h)) } func (this *QAbstractScrollArea) SetVerticalScrollBar(scrollbar *QScrollBar) { @@ -133,7 +119,7 @@ func (this *QAbstractScrollArea) SetHorizontalScrollBarPolicy(horizontalScrollBa } func (this *QAbstractScrollArea) HorizontalScrollBar() *QScrollBar { - return newQScrollBar(C.QAbstractScrollArea_HorizontalScrollBar(this.h), nil, nil, nil, nil) + return newQScrollBar(C.QAbstractScrollArea_HorizontalScrollBar(this.h)) } func (this *QAbstractScrollArea) SetHorizontalScrollBar(scrollbar *QScrollBar) { @@ -141,7 +127,7 @@ func (this *QAbstractScrollArea) SetHorizontalScrollBar(scrollbar *QScrollBar) { } func (this *QAbstractScrollArea) CornerWidget() *QWidget { - return newQWidget(C.QAbstractScrollArea_CornerWidget(this.h), nil, nil) + return newQWidget(C.QAbstractScrollArea_CornerWidget(this.h)) } func (this *QAbstractScrollArea) SetCornerWidget(widget *QWidget) { @@ -157,13 +143,13 @@ func (this *QAbstractScrollArea) ScrollBarWidgets(alignment AlignmentFlag) []*QW _ret := make([]*QWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQWidget(_outCast[i], nil, nil) + _ret[i] = newQWidget(_outCast[i]) } return _ret } func (this *QAbstractScrollArea) Viewport() *QWidget { - return newQWidget(C.QAbstractScrollArea_Viewport(this.h), nil, nil) + return newQWidget(C.QAbstractScrollArea_Viewport(this.h)) } func (this *QAbstractScrollArea) SetViewport(widget *QWidget) { @@ -296,7 +282,7 @@ func miqt_exec_callback_QAbstractScrollArea_SetupViewport(self *C.QAbstractScrol } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(viewport, nil, nil) + slotval1 := newQWidget(viewport) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -408,7 +394,7 @@ func miqt_exec_callback_QAbstractScrollArea_ResizeEvent(self *C.QAbstractScrollA } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -434,7 +420,7 @@ func miqt_exec_callback_QAbstractScrollArea_PaintEvent(self *C.QAbstractScrollAr } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -460,7 +446,7 @@ func miqt_exec_callback_QAbstractScrollArea_MousePressEvent(self *C.QAbstractScr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -486,7 +472,7 @@ func miqt_exec_callback_QAbstractScrollArea_MouseReleaseEvent(self *C.QAbstractS } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -512,7 +498,7 @@ func miqt_exec_callback_QAbstractScrollArea_MouseDoubleClickEvent(self *C.QAbstr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -538,7 +524,7 @@ func miqt_exec_callback_QAbstractScrollArea_MouseMoveEvent(self *C.QAbstractScro } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -564,7 +550,7 @@ func miqt_exec_callback_QAbstractScrollArea_WheelEvent(self *C.QAbstractScrollAr } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(param1, nil, nil, nil, nil) + slotval1 := newQWheelEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -590,7 +576,7 @@ func miqt_exec_callback_QAbstractScrollArea_ContextMenuEvent(self *C.QAbstractSc } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -616,7 +602,7 @@ func miqt_exec_callback_QAbstractScrollArea_DragEnterEvent(self *C.QAbstractScro } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(param1, nil, nil, nil) + slotval1 := newQDragEnterEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -642,7 +628,7 @@ func miqt_exec_callback_QAbstractScrollArea_DragMoveEvent(self *C.QAbstractScrol } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(param1, nil, nil) + slotval1 := newQDragMoveEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -668,7 +654,7 @@ func miqt_exec_callback_QAbstractScrollArea_DragLeaveEvent(self *C.QAbstractScro } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(param1, nil) + slotval1 := newQDragLeaveEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -694,7 +680,7 @@ func miqt_exec_callback_QAbstractScrollArea_DropEvent(self *C.QAbstractScrollAre } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(param1, nil) + slotval1 := newQDropEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_DropEvent, slotval1) @@ -720,7 +706,7 @@ func miqt_exec_callback_QAbstractScrollArea_KeyPressEvent(self *C.QAbstractScrol } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -827,7 +813,7 @@ func miqt_exec_callback_QAbstractScrollArea_InitStyleOption(self *C.QAbstractScr } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionFrame(option, nil) + slotval1 := newQStyleOptionFrame(option) gofunc((&QAbstractScrollArea{h: self}).callVirtualBase_InitStyleOption, slotval1) diff --git a/qt6/gen_qabstractscrollarea.h b/qt6/gen_qabstractscrollarea.h index 20a329be..134e6a5c 100644 --- a/qt6/gen_qabstractscrollarea.h +++ b/qt6/gen_qabstractscrollarea.h @@ -58,8 +58,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QAbstractScrollArea_new(QWidget* parent, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QAbstractScrollArea_new2(QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QAbstractScrollArea* QAbstractScrollArea_new(QWidget* parent); +QAbstractScrollArea* QAbstractScrollArea_new2(); +void QAbstractScrollArea_virtbase(QAbstractScrollArea* src, QFrame** outptr_QFrame); QMetaObject* QAbstractScrollArea_MetaObject(const QAbstractScrollArea* self); void* QAbstractScrollArea_Metacast(QAbstractScrollArea* self, const char* param1); struct miqt_string QAbstractScrollArea_Tr(const char* s); diff --git a/qt6/gen_qabstractslider.cpp b/qt6/gen_qabstractslider.cpp index f43517e3..31025afd 100644 --- a/qt6/gen_qabstractslider.cpp +++ b/qt6/gen_qabstractslider.cpp @@ -1072,20 +1072,16 @@ public: }; -void QAbstractSlider_new(QWidget* parent, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractSlider* ret = new MiqtVirtualQAbstractSlider(parent); - *outptr_QAbstractSlider = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractSlider* QAbstractSlider_new(QWidget* parent) { + return new MiqtVirtualQAbstractSlider(parent); } -void QAbstractSlider_new2(QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractSlider* ret = new MiqtVirtualQAbstractSlider(); - *outptr_QAbstractSlider = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractSlider* QAbstractSlider_new2() { + return new MiqtVirtualQAbstractSlider(); +} + +void QAbstractSlider_virtbase(QAbstractSlider* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QAbstractSlider_MetaObject(const QAbstractSlider* self) { diff --git a/qt6/gen_qabstractslider.go b/qt6/gen_qabstractslider.go index e2cbe23c..85a2becf 100644 --- a/qt6/gen_qabstractslider.go +++ b/qt6/gen_qabstractslider.go @@ -57,46 +57,34 @@ func (this *QAbstractSlider) UnsafePointer() unsafe.Pointer { } // newQAbstractSlider constructs the type using only CGO pointers. -func newQAbstractSlider(h *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractSlider { +func newQAbstractSlider(h *C.QAbstractSlider) *QAbstractSlider { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QAbstractSlider_virtbase(h, &outptr_QWidget) + return &QAbstractSlider{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQAbstractSlider constructs the type using only unsafe pointers. -func UnsafeNewQAbstractSlider(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractSlider { - if h == nil { - return nil - } - - return &QAbstractSlider{h: (*C.QAbstractSlider)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQAbstractSlider(h unsafe.Pointer) *QAbstractSlider { + return newQAbstractSlider((*C.QAbstractSlider)(h)) } // NewQAbstractSlider constructs a new QAbstractSlider object. func NewQAbstractSlider(parent *QWidget) *QAbstractSlider { - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractSlider_new(parent.cPointer(), &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractSlider(outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractSlider(C.QAbstractSlider_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQAbstractSlider2 constructs a new QAbstractSlider object. func NewQAbstractSlider2() *QAbstractSlider { - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractSlider_new2(&outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractSlider(outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractSlider(C.QAbstractSlider_new2()) ret.isSubclass = true return ret } @@ -428,7 +416,7 @@ func miqt_exec_callback_QAbstractSlider_KeyPressEvent(self *C.QAbstractSlider, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(ev, nil, nil) + slotval1 := newQKeyEvent(ev) gofunc((&QAbstractSlider{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -454,7 +442,7 @@ func miqt_exec_callback_QAbstractSlider_TimerEvent(self *C.QAbstractSlider, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QAbstractSlider{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -480,7 +468,7 @@ func miqt_exec_callback_QAbstractSlider_WheelEvent(self *C.QAbstractSlider, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QAbstractSlider{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -715,7 +703,7 @@ func miqt_exec_callback_QAbstractSlider_MousePressEvent(self *C.QAbstractSlider, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -741,7 +729,7 @@ func miqt_exec_callback_QAbstractSlider_MouseReleaseEvent(self *C.QAbstractSlide } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -767,7 +755,7 @@ func miqt_exec_callback_QAbstractSlider_MouseDoubleClickEvent(self *C.QAbstractS } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -793,7 +781,7 @@ func miqt_exec_callback_QAbstractSlider_MouseMoveEvent(self *C.QAbstractSlider, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -819,7 +807,7 @@ func miqt_exec_callback_QAbstractSlider_KeyReleaseEvent(self *C.QAbstractSlider, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -845,7 +833,7 @@ func miqt_exec_callback_QAbstractSlider_FocusInEvent(self *C.QAbstractSlider, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -871,7 +859,7 @@ func miqt_exec_callback_QAbstractSlider_FocusOutEvent(self *C.QAbstractSlider, c } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -897,7 +885,7 @@ func miqt_exec_callback_QAbstractSlider_EnterEvent(self *C.QAbstractSlider, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -949,7 +937,7 @@ func miqt_exec_callback_QAbstractSlider_PaintEvent(self *C.QAbstractSlider, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -975,7 +963,7 @@ func miqt_exec_callback_QAbstractSlider_MoveEvent(self *C.QAbstractSlider, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1001,7 +989,7 @@ func miqt_exec_callback_QAbstractSlider_ResizeEvent(self *C.QAbstractSlider, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1027,7 +1015,7 @@ func miqt_exec_callback_QAbstractSlider_CloseEvent(self *C.QAbstractSlider, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1053,7 +1041,7 @@ func miqt_exec_callback_QAbstractSlider_ContextMenuEvent(self *C.QAbstractSlider } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1079,7 +1067,7 @@ func miqt_exec_callback_QAbstractSlider_TabletEvent(self *C.QAbstractSlider, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1105,7 +1093,7 @@ func miqt_exec_callback_QAbstractSlider_ActionEvent(self *C.QAbstractSlider, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1131,7 +1119,7 @@ func miqt_exec_callback_QAbstractSlider_DragEnterEvent(self *C.QAbstractSlider, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1157,7 +1145,7 @@ func miqt_exec_callback_QAbstractSlider_DragMoveEvent(self *C.QAbstractSlider, c } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1183,7 +1171,7 @@ func miqt_exec_callback_QAbstractSlider_DragLeaveEvent(self *C.QAbstractSlider, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1209,7 +1197,7 @@ func miqt_exec_callback_QAbstractSlider_DropEvent(self *C.QAbstractSlider, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1235,7 +1223,7 @@ func miqt_exec_callback_QAbstractSlider_ShowEvent(self *C.QAbstractSlider, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1261,7 +1249,7 @@ func miqt_exec_callback_QAbstractSlider_HideEvent(self *C.QAbstractSlider, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QAbstractSlider{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1431,7 +1419,7 @@ func miqt_exec_callback_QAbstractSlider_InputMethodEvent(self *C.QAbstractSlider } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QAbstractSlider{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qabstractslider.h b/qt6/gen_qabstractslider.h index 29ad7639..08cb4162 100644 --- a/qt6/gen_qabstractslider.h +++ b/qt6/gen_qabstractslider.h @@ -80,8 +80,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QAbstractSlider_new(QWidget* parent, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QAbstractSlider_new2(QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QAbstractSlider* QAbstractSlider_new(QWidget* parent); +QAbstractSlider* QAbstractSlider_new2(); +void QAbstractSlider_virtbase(QAbstractSlider* src, QWidget** outptr_QWidget); QMetaObject* QAbstractSlider_MetaObject(const QAbstractSlider* self); void* QAbstractSlider_Metacast(QAbstractSlider* self, const char* param1); struct miqt_string QAbstractSlider_Tr(const char* s); diff --git a/qt6/gen_qabstractspinbox.cpp b/qt6/gen_qabstractspinbox.cpp index 2b21e4b6..9922ca2e 100644 --- a/qt6/gen_qabstractspinbox.cpp +++ b/qt6/gen_qabstractspinbox.cpp @@ -1207,20 +1207,16 @@ public: }; -void QAbstractSpinBox_new(QWidget* parent, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractSpinBox* ret = new MiqtVirtualQAbstractSpinBox(parent); - *outptr_QAbstractSpinBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractSpinBox* QAbstractSpinBox_new(QWidget* parent) { + return new MiqtVirtualQAbstractSpinBox(parent); } -void QAbstractSpinBox_new2(QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractSpinBox* ret = new MiqtVirtualQAbstractSpinBox(); - *outptr_QAbstractSpinBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractSpinBox* QAbstractSpinBox_new2() { + return new MiqtVirtualQAbstractSpinBox(); +} + +void QAbstractSpinBox_virtbase(QAbstractSpinBox* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QAbstractSpinBox_MetaObject(const QAbstractSpinBox* self) { diff --git a/qt6/gen_qabstractspinbox.go b/qt6/gen_qabstractspinbox.go index 071405b1..686e19b0 100644 --- a/qt6/gen_qabstractspinbox.go +++ b/qt6/gen_qabstractspinbox.go @@ -65,46 +65,34 @@ func (this *QAbstractSpinBox) UnsafePointer() unsafe.Pointer { } // newQAbstractSpinBox constructs the type using only CGO pointers. -func newQAbstractSpinBox(h *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractSpinBox { +func newQAbstractSpinBox(h *C.QAbstractSpinBox) *QAbstractSpinBox { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QAbstractSpinBox_virtbase(h, &outptr_QWidget) + return &QAbstractSpinBox{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQAbstractSpinBox constructs the type using only unsafe pointers. -func UnsafeNewQAbstractSpinBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractSpinBox { - if h == nil { - return nil - } - - return &QAbstractSpinBox{h: (*C.QAbstractSpinBox)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQAbstractSpinBox(h unsafe.Pointer) *QAbstractSpinBox { + return newQAbstractSpinBox((*C.QAbstractSpinBox)(h)) } // NewQAbstractSpinBox constructs a new QAbstractSpinBox object. func NewQAbstractSpinBox(parent *QWidget) *QAbstractSpinBox { - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractSpinBox_new(parent.cPointer(), &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractSpinBox(outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractSpinBox(C.QAbstractSpinBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQAbstractSpinBox2 constructs a new QAbstractSpinBox object. func NewQAbstractSpinBox2() *QAbstractSpinBox { - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractSpinBox_new2(&outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractSpinBox(outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractSpinBox(C.QAbstractSpinBox_new2()) ret.isSubclass = true return ret } @@ -577,7 +565,7 @@ func miqt_exec_callback_QAbstractSpinBox_ResizeEvent(self *C.QAbstractSpinBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -603,7 +591,7 @@ func miqt_exec_callback_QAbstractSpinBox_KeyPressEvent(self *C.QAbstractSpinBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -629,7 +617,7 @@ func miqt_exec_callback_QAbstractSpinBox_KeyReleaseEvent(self *C.QAbstractSpinBo } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -655,7 +643,7 @@ func miqt_exec_callback_QAbstractSpinBox_WheelEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -681,7 +669,7 @@ func miqt_exec_callback_QAbstractSpinBox_FocusInEvent(self *C.QAbstractSpinBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -707,7 +695,7 @@ func miqt_exec_callback_QAbstractSpinBox_FocusOutEvent(self *C.QAbstractSpinBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -733,7 +721,7 @@ func miqt_exec_callback_QAbstractSpinBox_ContextMenuEvent(self *C.QAbstractSpinB } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -785,7 +773,7 @@ func miqt_exec_callback_QAbstractSpinBox_CloseEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -811,7 +799,7 @@ func miqt_exec_callback_QAbstractSpinBox_HideEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_HideEvent, slotval1) @@ -837,7 +825,7 @@ func miqt_exec_callback_QAbstractSpinBox_MousePressEvent(self *C.QAbstractSpinBo } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -863,7 +851,7 @@ func miqt_exec_callback_QAbstractSpinBox_MouseReleaseEvent(self *C.QAbstractSpin } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -889,7 +877,7 @@ func miqt_exec_callback_QAbstractSpinBox_MouseMoveEvent(self *C.QAbstractSpinBox } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -915,7 +903,7 @@ func miqt_exec_callback_QAbstractSpinBox_TimerEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -941,7 +929,7 @@ func miqt_exec_callback_QAbstractSpinBox_PaintEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -967,7 +955,7 @@ func miqt_exec_callback_QAbstractSpinBox_ShowEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -993,7 +981,7 @@ func miqt_exec_callback_QAbstractSpinBox_InitStyleOption(self *C.QAbstractSpinBo } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionSpinBox(option, nil, nil) + slotval1 := newQStyleOptionSpinBox(option) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -1173,7 +1161,7 @@ func miqt_exec_callback_QAbstractSpinBox_MouseDoubleClickEvent(self *C.QAbstract } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1199,7 +1187,7 @@ func miqt_exec_callback_QAbstractSpinBox_EnterEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -1251,7 +1239,7 @@ func miqt_exec_callback_QAbstractSpinBox_MoveEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1277,7 +1265,7 @@ func miqt_exec_callback_QAbstractSpinBox_TabletEvent(self *C.QAbstractSpinBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1303,7 +1291,7 @@ func miqt_exec_callback_QAbstractSpinBox_ActionEvent(self *C.QAbstractSpinBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1329,7 +1317,7 @@ func miqt_exec_callback_QAbstractSpinBox_DragEnterEvent(self *C.QAbstractSpinBox } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1355,7 +1343,7 @@ func miqt_exec_callback_QAbstractSpinBox_DragMoveEvent(self *C.QAbstractSpinBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1381,7 +1369,7 @@ func miqt_exec_callback_QAbstractSpinBox_DragLeaveEvent(self *C.QAbstractSpinBox } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1407,7 +1395,7 @@ func miqt_exec_callback_QAbstractSpinBox_DropEvent(self *C.QAbstractSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1577,7 +1565,7 @@ func miqt_exec_callback_QAbstractSpinBox_InputMethodEvent(self *C.QAbstractSpinB } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QAbstractSpinBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qabstractspinbox.h b/qt6/gen_qabstractspinbox.h index 3eb3dc8c..ec074d45 100644 --- a/qt6/gen_qabstractspinbox.h +++ b/qt6/gen_qabstractspinbox.h @@ -82,8 +82,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QAbstractSpinBox_new(QWidget* parent, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QAbstractSpinBox_new2(QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QAbstractSpinBox* QAbstractSpinBox_new(QWidget* parent); +QAbstractSpinBox* QAbstractSpinBox_new2(); +void QAbstractSpinBox_virtbase(QAbstractSpinBox* src, QWidget** outptr_QWidget); QMetaObject* QAbstractSpinBox_MetaObject(const QAbstractSpinBox* self); void* QAbstractSpinBox_Metacast(QAbstractSpinBox* self, const char* param1); struct miqt_string QAbstractSpinBox_Tr(const char* s); diff --git a/qt6/gen_qabstracttextdocumentlayout.cpp b/qt6/gen_qabstracttextdocumentlayout.cpp index 41eef399..10409b86 100644 --- a/qt6/gen_qabstracttextdocumentlayout.cpp +++ b/qt6/gen_qabstracttextdocumentlayout.cpp @@ -414,10 +414,12 @@ public: }; -void QAbstractTextDocumentLayout_new(QTextDocument* doc, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject) { - MiqtVirtualQAbstractTextDocumentLayout* ret = new MiqtVirtualQAbstractTextDocumentLayout(doc); - *outptr_QAbstractTextDocumentLayout = ret; - *outptr_QObject = static_cast(ret); +QAbstractTextDocumentLayout* QAbstractTextDocumentLayout_new(QTextDocument* doc) { + return new MiqtVirtualQAbstractTextDocumentLayout(doc); +} + +void QAbstractTextDocumentLayout_virtbase(QAbstractTextDocumentLayout* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAbstractTextDocumentLayout_MetaObject(const QAbstractTextDocumentLayout* self) { @@ -739,9 +741,8 @@ void QTextObjectInterface_Delete(QTextObjectInterface* self, bool isSubclass) { } } -void QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1, QAbstractTextDocumentLayout__Selection** outptr_QAbstractTextDocumentLayout__Selection) { - QAbstractTextDocumentLayout::Selection* ret = new QAbstractTextDocumentLayout::Selection(*param1); - *outptr_QAbstractTextDocumentLayout__Selection = ret; +QAbstractTextDocumentLayout__Selection* QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1) { + return new QAbstractTextDocumentLayout::Selection(*param1); } void QAbstractTextDocumentLayout__Selection_OperatorAssign(QAbstractTextDocumentLayout__Selection* self, QAbstractTextDocumentLayout__Selection* param1) { @@ -756,14 +757,12 @@ void QAbstractTextDocumentLayout__Selection_Delete(QAbstractTextDocumentLayout__ } } -void QAbstractTextDocumentLayout__PaintContext_new(QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext) { - QAbstractTextDocumentLayout::PaintContext* ret = new QAbstractTextDocumentLayout::PaintContext(); - *outptr_QAbstractTextDocumentLayout__PaintContext = ret; +QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new() { + return new QAbstractTextDocumentLayout::PaintContext(); } -void QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1, QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext) { - QAbstractTextDocumentLayout::PaintContext* ret = new QAbstractTextDocumentLayout::PaintContext(*param1); - *outptr_QAbstractTextDocumentLayout__PaintContext = ret; +QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1) { + return new QAbstractTextDocumentLayout::PaintContext(*param1); } void QAbstractTextDocumentLayout__PaintContext_OperatorAssign(QAbstractTextDocumentLayout__PaintContext* self, QAbstractTextDocumentLayout__PaintContext* param1) { diff --git a/qt6/gen_qabstracttextdocumentlayout.go b/qt6/gen_qabstracttextdocumentlayout.go index 30d9d69e..58ea3a40 100644 --- a/qt6/gen_qabstracttextdocumentlayout.go +++ b/qt6/gen_qabstracttextdocumentlayout.go @@ -35,31 +35,26 @@ func (this *QAbstractTextDocumentLayout) UnsafePointer() unsafe.Pointer { } // newQAbstractTextDocumentLayout constructs the type using only CGO pointers. -func newQAbstractTextDocumentLayout(h *C.QAbstractTextDocumentLayout, h_QObject *C.QObject) *QAbstractTextDocumentLayout { +func newQAbstractTextDocumentLayout(h *C.QAbstractTextDocumentLayout) *QAbstractTextDocumentLayout { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractTextDocumentLayout_virtbase(h, &outptr_QObject) + return &QAbstractTextDocumentLayout{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAbstractTextDocumentLayout constructs the type using only unsafe pointers. -func UnsafeNewQAbstractTextDocumentLayout(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractTextDocumentLayout { - if h == nil { - return nil - } - - return &QAbstractTextDocumentLayout{h: (*C.QAbstractTextDocumentLayout)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractTextDocumentLayout(h unsafe.Pointer) *QAbstractTextDocumentLayout { + return newQAbstractTextDocumentLayout((*C.QAbstractTextDocumentLayout)(h)) } // NewQAbstractTextDocumentLayout constructs a new QAbstractTextDocumentLayout object. func NewQAbstractTextDocumentLayout(doc *QTextDocument) *QAbstractTextDocumentLayout { - var outptr_QAbstractTextDocumentLayout *C.QAbstractTextDocumentLayout = nil - var outptr_QObject *C.QObject = nil - C.QAbstractTextDocumentLayout_new(doc.cPointer(), &outptr_QAbstractTextDocumentLayout, &outptr_QObject) - ret := newQAbstractTextDocumentLayout(outptr_QAbstractTextDocumentLayout, outptr_QObject) + ret := newQAbstractTextDocumentLayout(C.QAbstractTextDocumentLayout_new(doc.cPointer())) ret.isSubclass = true return ret } @@ -148,7 +143,7 @@ func (this *QAbstractTextDocumentLayout) PaintDevice() *QPaintDevice { } func (this *QAbstractTextDocumentLayout) Document() *QTextDocument { - return newQTextDocument(C.QAbstractTextDocumentLayout_Document(this.h), nil) + return newQTextDocument(C.QAbstractTextDocumentLayout_Document(this.h)) } func (this *QAbstractTextDocumentLayout) RegisterHandler(objectType int, component *QObject) { @@ -385,7 +380,7 @@ func miqt_exec_callback_QAbstractTextDocumentLayout_FrameBoundingRect(self *C.QA } // Convert all CABI parameters to Go parameters - slotval1 := newQTextFrame(frame, nil, nil) + slotval1 := newQTextFrame(frame) virtualReturn := gofunc(slotval1) @@ -617,7 +612,7 @@ func miqt_exec_callback_QAbstractTextDocumentLayout_TimerEvent(self *C.QAbstract } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -643,7 +638,7 @@ func miqt_exec_callback_QAbstractTextDocumentLayout_ChildEvent(self *C.QAbstract } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAbstractTextDocumentLayout{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -765,16 +760,13 @@ func newQTextObjectInterface(h *C.QTextObjectInterface) *QTextObjectInterface { if h == nil { return nil } + return &QTextObjectInterface{h: h} } // UnsafeNewQTextObjectInterface constructs the type using only unsafe pointers. func UnsafeNewQTextObjectInterface(h unsafe.Pointer) *QTextObjectInterface { - if h == nil { - return nil - } - - return &QTextObjectInterface{h: (*C.QTextObjectInterface)(h)} + return newQTextObjectInterface((*C.QTextObjectInterface)(h)) } func (this *QTextObjectInterface) IntrinsicSize(doc *QTextDocument, posInDocument int, format *QTextFormat) *QSizeF { @@ -829,24 +821,19 @@ func newQAbstractTextDocumentLayout__Selection(h *C.QAbstractTextDocumentLayout_ if h == nil { return nil } + return &QAbstractTextDocumentLayout__Selection{h: h} } // UnsafeNewQAbstractTextDocumentLayout__Selection constructs the type using only unsafe pointers. func UnsafeNewQAbstractTextDocumentLayout__Selection(h unsafe.Pointer) *QAbstractTextDocumentLayout__Selection { - if h == nil { - return nil - } - - return &QAbstractTextDocumentLayout__Selection{h: (*C.QAbstractTextDocumentLayout__Selection)(h)} + return newQAbstractTextDocumentLayout__Selection((*C.QAbstractTextDocumentLayout__Selection)(h)) } // NewQAbstractTextDocumentLayout__Selection constructs a new QAbstractTextDocumentLayout::Selection object. func NewQAbstractTextDocumentLayout__Selection(param1 *QAbstractTextDocumentLayout__Selection) *QAbstractTextDocumentLayout__Selection { - var outptr_QAbstractTextDocumentLayout__Selection *C.QAbstractTextDocumentLayout__Selection = nil - C.QAbstractTextDocumentLayout__Selection_new(param1.cPointer(), &outptr_QAbstractTextDocumentLayout__Selection) - ret := newQAbstractTextDocumentLayout__Selection(outptr_QAbstractTextDocumentLayout__Selection) + ret := newQAbstractTextDocumentLayout__Selection(C.QAbstractTextDocumentLayout__Selection_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -893,34 +880,27 @@ func newQAbstractTextDocumentLayout__PaintContext(h *C.QAbstractTextDocumentLayo if h == nil { return nil } + return &QAbstractTextDocumentLayout__PaintContext{h: h} } // UnsafeNewQAbstractTextDocumentLayout__PaintContext constructs the type using only unsafe pointers. func UnsafeNewQAbstractTextDocumentLayout__PaintContext(h unsafe.Pointer) *QAbstractTextDocumentLayout__PaintContext { - if h == nil { - return nil - } - - return &QAbstractTextDocumentLayout__PaintContext{h: (*C.QAbstractTextDocumentLayout__PaintContext)(h)} + return newQAbstractTextDocumentLayout__PaintContext((*C.QAbstractTextDocumentLayout__PaintContext)(h)) } // NewQAbstractTextDocumentLayout__PaintContext constructs a new QAbstractTextDocumentLayout::PaintContext object. func NewQAbstractTextDocumentLayout__PaintContext() *QAbstractTextDocumentLayout__PaintContext { - var outptr_QAbstractTextDocumentLayout__PaintContext *C.QAbstractTextDocumentLayout__PaintContext = nil - C.QAbstractTextDocumentLayout__PaintContext_new(&outptr_QAbstractTextDocumentLayout__PaintContext) - ret := newQAbstractTextDocumentLayout__PaintContext(outptr_QAbstractTextDocumentLayout__PaintContext) + ret := newQAbstractTextDocumentLayout__PaintContext(C.QAbstractTextDocumentLayout__PaintContext_new()) ret.isSubclass = true return ret } // NewQAbstractTextDocumentLayout__PaintContext2 constructs a new QAbstractTextDocumentLayout::PaintContext object. func NewQAbstractTextDocumentLayout__PaintContext2(param1 *QAbstractTextDocumentLayout__PaintContext) *QAbstractTextDocumentLayout__PaintContext { - var outptr_QAbstractTextDocumentLayout__PaintContext *C.QAbstractTextDocumentLayout__PaintContext = nil - C.QAbstractTextDocumentLayout__PaintContext_new2(param1.cPointer(), &outptr_QAbstractTextDocumentLayout__PaintContext) - ret := newQAbstractTextDocumentLayout__PaintContext(outptr_QAbstractTextDocumentLayout__PaintContext) + ret := newQAbstractTextDocumentLayout__PaintContext(C.QAbstractTextDocumentLayout__PaintContext_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qabstracttextdocumentlayout.h b/qt6/gen_qabstracttextdocumentlayout.h index fdde2c18..5846e9ca 100644 --- a/qt6/gen_qabstracttextdocumentlayout.h +++ b/qt6/gen_qabstracttextdocumentlayout.h @@ -66,7 +66,8 @@ typedef struct QTextObjectInterface QTextObjectInterface; typedef struct QTimerEvent QTimerEvent; #endif -void QAbstractTextDocumentLayout_new(QTextDocument* doc, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject); +QAbstractTextDocumentLayout* QAbstractTextDocumentLayout_new(QTextDocument* doc); +void QAbstractTextDocumentLayout_virtbase(QAbstractTextDocumentLayout* src, QObject** outptr_QObject); QMetaObject* QAbstractTextDocumentLayout_MetaObject(const QAbstractTextDocumentLayout* self); void* QAbstractTextDocumentLayout_Metacast(QAbstractTextDocumentLayout* self, const char* param1); struct miqt_string QAbstractTextDocumentLayout_Tr(const char* s); @@ -144,12 +145,12 @@ void QTextObjectInterface_DrawObject(QTextObjectInterface* self, QPainter* paint void QTextObjectInterface_OperatorAssign(QTextObjectInterface* self, QTextObjectInterface* param1); void QTextObjectInterface_Delete(QTextObjectInterface* self, bool isSubclass); -void QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1, QAbstractTextDocumentLayout__Selection** outptr_QAbstractTextDocumentLayout__Selection); +QAbstractTextDocumentLayout__Selection* QAbstractTextDocumentLayout__Selection_new(QAbstractTextDocumentLayout__Selection* param1); void QAbstractTextDocumentLayout__Selection_OperatorAssign(QAbstractTextDocumentLayout__Selection* self, QAbstractTextDocumentLayout__Selection* param1); void QAbstractTextDocumentLayout__Selection_Delete(QAbstractTextDocumentLayout__Selection* self, bool isSubclass); -void QAbstractTextDocumentLayout__PaintContext_new(QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext); -void QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1, QAbstractTextDocumentLayout__PaintContext** outptr_QAbstractTextDocumentLayout__PaintContext); +QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new(); +QAbstractTextDocumentLayout__PaintContext* QAbstractTextDocumentLayout__PaintContext_new2(QAbstractTextDocumentLayout__PaintContext* param1); void QAbstractTextDocumentLayout__PaintContext_OperatorAssign(QAbstractTextDocumentLayout__PaintContext* self, QAbstractTextDocumentLayout__PaintContext* param1); void QAbstractTextDocumentLayout__PaintContext_Delete(QAbstractTextDocumentLayout__PaintContext* self, bool isSubclass); diff --git a/qt6/gen_qaccessible.cpp b/qt6/gen_qaccessible.cpp index c889e586..a13e0705 100644 --- a/qt6/gen_qaccessible.cpp +++ b/qt6/gen_qaccessible.cpp @@ -886,14 +886,12 @@ public: }; -void QAccessibleEvent_new(QObject* obj, int typ, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleEvent* ret = new MiqtVirtualQAccessibleEvent(obj, static_cast(typ)); - *outptr_QAccessibleEvent = ret; +QAccessibleEvent* QAccessibleEvent_new(QObject* obj, int typ) { + return new MiqtVirtualQAccessibleEvent(obj, static_cast(typ)); } -void QAccessibleEvent_new2(QAccessibleInterface* iface, int typ, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleEvent* ret = new MiqtVirtualQAccessibleEvent(iface, static_cast(typ)); - *outptr_QAccessibleEvent = ret; +QAccessibleEvent* QAccessibleEvent_new2(QAccessibleInterface* iface, int typ) { + return new MiqtVirtualQAccessibleEvent(iface, static_cast(typ)); } int QAccessibleEvent_Type(const QAccessibleEvent* self) { @@ -970,16 +968,16 @@ public: }; -void QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleStateChangeEvent* ret = new MiqtVirtualQAccessibleStateChangeEvent(obj, *state); - *outptr_QAccessibleStateChangeEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state) { + return new MiqtVirtualQAccessibleStateChangeEvent(obj, *state); } -void QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleStateChangeEvent* ret = new MiqtVirtualQAccessibleStateChangeEvent(iface, *state); - *outptr_QAccessibleStateChangeEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state) { + return new MiqtVirtualQAccessibleStateChangeEvent(iface, *state); +} + +void QAccessibleStateChangeEvent_virtbase(QAccessibleStateChangeEvent* src, QAccessibleEvent** outptr_QAccessibleEvent) { + *outptr_QAccessibleEvent = static_cast(src); } QAccessible__State* QAccessibleStateChangeEvent_ChangedStates(const QAccessibleStateChangeEvent* self) { @@ -1034,16 +1032,16 @@ public: }; -void QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleTextCursorEvent* ret = new MiqtVirtualQAccessibleTextCursorEvent(obj, static_cast(cursorPos)); - *outptr_QAccessibleTextCursorEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos) { + return new MiqtVirtualQAccessibleTextCursorEvent(obj, static_cast(cursorPos)); } -void QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleTextCursorEvent* ret = new MiqtVirtualQAccessibleTextCursorEvent(iface, static_cast(cursorPos)); - *outptr_QAccessibleTextCursorEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos) { + return new MiqtVirtualQAccessibleTextCursorEvent(iface, static_cast(cursorPos)); +} + +void QAccessibleTextCursorEvent_virtbase(QAccessibleTextCursorEvent* src, QAccessibleEvent** outptr_QAccessibleEvent) { + *outptr_QAccessibleEvent = static_cast(src); } void QAccessibleTextCursorEvent_SetCursorPosition(QAccessibleTextCursorEvent* self, int position) { @@ -1070,18 +1068,16 @@ void QAccessibleTextCursorEvent_Delete(QAccessibleTextCursorEvent* self, bool is } } -void QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - QAccessibleTextSelectionEvent* ret = new QAccessibleTextSelectionEvent(obj, static_cast(start), static_cast(end)); - *outptr_QAccessibleTextSelectionEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end) { + return new QAccessibleTextSelectionEvent(obj, static_cast(start), static_cast(end)); } -void QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - QAccessibleTextSelectionEvent* ret = new QAccessibleTextSelectionEvent(iface, static_cast(start), static_cast(end)); - *outptr_QAccessibleTextSelectionEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end) { + return new QAccessibleTextSelectionEvent(iface, static_cast(start), static_cast(end)); +} + +void QAccessibleTextSelectionEvent_virtbase(QAccessibleTextSelectionEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent) { + *outptr_QAccessibleTextCursorEvent = static_cast(src); } void QAccessibleTextSelectionEvent_SetSelection(QAccessibleTextSelectionEvent* self, int start, int end) { @@ -1104,20 +1100,18 @@ void QAccessibleTextSelectionEvent_Delete(QAccessibleTextSelectionEvent* self, b } } -void QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { +QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - QAccessibleTextInsertEvent* ret = new QAccessibleTextInsertEvent(obj, static_cast(position), text_QString); - *outptr_QAccessibleTextInsertEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); + return new QAccessibleTextInsertEvent(obj, static_cast(position), text_QString); } -void QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { +QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - QAccessibleTextInsertEvent* ret = new QAccessibleTextInsertEvent(iface, static_cast(position), text_QString); - *outptr_QAccessibleTextInsertEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); + return new QAccessibleTextInsertEvent(iface, static_cast(position), text_QString); +} + +void QAccessibleTextInsertEvent_virtbase(QAccessibleTextInsertEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent) { + *outptr_QAccessibleTextCursorEvent = static_cast(src); } struct miqt_string QAccessibleTextInsertEvent_TextInserted(const QAccessibleTextInsertEvent* self) { @@ -1143,20 +1137,18 @@ void QAccessibleTextInsertEvent_Delete(QAccessibleTextInsertEvent* self, bool is } } -void QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { +QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - QAccessibleTextRemoveEvent* ret = new QAccessibleTextRemoveEvent(obj, static_cast(position), text_QString); - *outptr_QAccessibleTextRemoveEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); + return new QAccessibleTextRemoveEvent(obj, static_cast(position), text_QString); } -void QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { +QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - QAccessibleTextRemoveEvent* ret = new QAccessibleTextRemoveEvent(iface, static_cast(position), text_QString); - *outptr_QAccessibleTextRemoveEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); + return new QAccessibleTextRemoveEvent(iface, static_cast(position), text_QString); +} + +void QAccessibleTextRemoveEvent_virtbase(QAccessibleTextRemoveEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent) { + *outptr_QAccessibleTextCursorEvent = static_cast(src); } struct miqt_string QAccessibleTextRemoveEvent_TextRemoved(const QAccessibleTextRemoveEvent* self) { @@ -1182,22 +1174,20 @@ void QAccessibleTextRemoveEvent_Delete(QAccessibleTextRemoveEvent* self, bool is } } -void QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { +QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text) { QString oldText_QString = QString::fromUtf8(oldText.data, oldText.len); QString text_QString = QString::fromUtf8(text.data, text.len); - QAccessibleTextUpdateEvent* ret = new QAccessibleTextUpdateEvent(obj, static_cast(position), oldText_QString, text_QString); - *outptr_QAccessibleTextUpdateEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); + return new QAccessibleTextUpdateEvent(obj, static_cast(position), oldText_QString, text_QString); } -void QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent) { +QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text) { QString oldText_QString = QString::fromUtf8(oldText.data, oldText.len); QString text_QString = QString::fromUtf8(text.data, text.len); - QAccessibleTextUpdateEvent* ret = new QAccessibleTextUpdateEvent(iface, static_cast(position), oldText_QString, text_QString); - *outptr_QAccessibleTextUpdateEvent = ret; - *outptr_QAccessibleTextCursorEvent = static_cast(ret); - *outptr_QAccessibleEvent = static_cast(ret); + return new QAccessibleTextUpdateEvent(iface, static_cast(position), oldText_QString, text_QString); +} + +void QAccessibleTextUpdateEvent_virtbase(QAccessibleTextUpdateEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent) { + *outptr_QAccessibleTextCursorEvent = static_cast(src); } struct miqt_string QAccessibleTextUpdateEvent_TextRemoved(const QAccessibleTextUpdateEvent* self) { @@ -1266,16 +1256,16 @@ public: }; -void QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleValueChangeEvent* ret = new MiqtVirtualQAccessibleValueChangeEvent(obj, *val); - *outptr_QAccessibleValueChangeEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val) { + return new MiqtVirtualQAccessibleValueChangeEvent(obj, *val); } -void QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleValueChangeEvent* ret = new MiqtVirtualQAccessibleValueChangeEvent(iface, *val); - *outptr_QAccessibleValueChangeEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val) { + return new MiqtVirtualQAccessibleValueChangeEvent(iface, *val); +} + +void QAccessibleValueChangeEvent_virtbase(QAccessibleValueChangeEvent* src, QAccessibleEvent** outptr_QAccessibleEvent) { + *outptr_QAccessibleEvent = static_cast(src); } void QAccessibleValueChangeEvent_SetValue(QAccessibleValueChangeEvent* self, QVariant* val) { @@ -1334,16 +1324,16 @@ public: }; -void QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleTableModelChangeEvent* ret = new MiqtVirtualQAccessibleTableModelChangeEvent(obj, static_cast(changeType)); - *outptr_QAccessibleTableModelChangeEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType) { + return new MiqtVirtualQAccessibleTableModelChangeEvent(obj, static_cast(changeType)); } -void QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent) { - MiqtVirtualQAccessibleTableModelChangeEvent* ret = new MiqtVirtualQAccessibleTableModelChangeEvent(iface, static_cast(changeType)); - *outptr_QAccessibleTableModelChangeEvent = ret; - *outptr_QAccessibleEvent = static_cast(ret); +QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType) { + return new MiqtVirtualQAccessibleTableModelChangeEvent(iface, static_cast(changeType)); +} + +void QAccessibleTableModelChangeEvent_virtbase(QAccessibleTableModelChangeEvent* src, QAccessibleEvent** outptr_QAccessibleEvent) { + *outptr_QAccessibleEvent = static_cast(src); } void QAccessibleTableModelChangeEvent_SetModelChangeType(QAccessibleTableModelChangeEvent* self, int changeType) { diff --git a/qt6/gen_qaccessible.go b/qt6/gen_qaccessible.go index 3d9b702f..04caee3e 100644 --- a/qt6/gen_qaccessible.go +++ b/qt6/gen_qaccessible.go @@ -49,16 +49,13 @@ func newQAccessibleInterface(h *C.QAccessibleInterface) *QAccessibleInterface { if h == nil { return nil } + return &QAccessibleInterface{h: h} } // UnsafeNewQAccessibleInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleInterface(h unsafe.Pointer) *QAccessibleInterface { - if h == nil { - return nil - } - - return &QAccessibleInterface{h: (*C.QAccessibleInterface)(h)} + return newQAccessibleInterface((*C.QAccessibleInterface)(h)) } func (this *QAccessibleInterface) IsValid() bool { @@ -70,7 +67,7 @@ func (this *QAccessibleInterface) Object() *QObject { } func (this *QAccessibleInterface) Window() *QWindow { - return newQWindow(C.QAccessibleInterface_Window(this.h), nil, nil) + return newQWindow(C.QAccessibleInterface_Window(this.h)) } func (this *QAccessibleInterface) Relations(match QAccessible__RelationFlag) []struct { @@ -230,16 +227,13 @@ func newQAccessibleTextInterface(h *C.QAccessibleTextInterface) *QAccessibleText if h == nil { return nil } + return &QAccessibleTextInterface{h: h} } // UnsafeNewQAccessibleTextInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleTextInterface(h unsafe.Pointer) *QAccessibleTextInterface { - if h == nil { - return nil - } - - return &QAccessibleTextInterface{h: (*C.QAccessibleTextInterface)(h)} + return newQAccessibleTextInterface((*C.QAccessibleTextInterface)(h)) } func (this *QAccessibleTextInterface) Selection(selectionIndex int, startOffset *int, endOffset *int) { @@ -365,16 +359,13 @@ func newQAccessibleEditableTextInterface(h *C.QAccessibleEditableTextInterface) if h == nil { return nil } + return &QAccessibleEditableTextInterface{h: h} } // UnsafeNewQAccessibleEditableTextInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleEditableTextInterface(h unsafe.Pointer) *QAccessibleEditableTextInterface { - if h == nil { - return nil - } - - return &QAccessibleEditableTextInterface{h: (*C.QAccessibleEditableTextInterface)(h)} + return newQAccessibleEditableTextInterface((*C.QAccessibleEditableTextInterface)(h)) } func (this *QAccessibleEditableTextInterface) DeleteText(startOffset int, endOffset int) { @@ -439,16 +430,13 @@ func newQAccessibleValueInterface(h *C.QAccessibleValueInterface) *QAccessibleVa if h == nil { return nil } + return &QAccessibleValueInterface{h: h} } // UnsafeNewQAccessibleValueInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleValueInterface(h unsafe.Pointer) *QAccessibleValueInterface { - if h == nil { - return nil - } - - return &QAccessibleValueInterface{h: (*C.QAccessibleValueInterface)(h)} + return newQAccessibleValueInterface((*C.QAccessibleValueInterface)(h)) } func (this *QAccessibleValueInterface) CurrentValue() *QVariant { @@ -521,16 +509,13 @@ func newQAccessibleTableCellInterface(h *C.QAccessibleTableCellInterface) *QAcce if h == nil { return nil } + return &QAccessibleTableCellInterface{h: h} } // UnsafeNewQAccessibleTableCellInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleTableCellInterface(h unsafe.Pointer) *QAccessibleTableCellInterface { - if h == nil { - return nil - } - - return &QAccessibleTableCellInterface{h: (*C.QAccessibleTableCellInterface)(h)} + return newQAccessibleTableCellInterface((*C.QAccessibleTableCellInterface)(h)) } func (this *QAccessibleTableCellInterface) IsSelected() bool { @@ -619,16 +604,13 @@ func newQAccessibleTableInterface(h *C.QAccessibleTableInterface) *QAccessibleTa if h == nil { return nil } + return &QAccessibleTableInterface{h: h} } // UnsafeNewQAccessibleTableInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleTableInterface(h unsafe.Pointer) *QAccessibleTableInterface { - if h == nil { - return nil - } - - return &QAccessibleTableInterface{h: (*C.QAccessibleTableInterface)(h)} + return newQAccessibleTableInterface((*C.QAccessibleTableInterface)(h)) } func (this *QAccessibleTableInterface) Caption() *QAccessibleInterface { @@ -773,16 +755,13 @@ func newQAccessibleActionInterface(h *C.QAccessibleActionInterface) *QAccessible if h == nil { return nil } + return &QAccessibleActionInterface{h: h} } // UnsafeNewQAccessibleActionInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleActionInterface(h unsafe.Pointer) *QAccessibleActionInterface { - if h == nil { - return nil - } - - return &QAccessibleActionInterface{h: (*C.QAccessibleActionInterface)(h)} + return newQAccessibleActionInterface((*C.QAccessibleActionInterface)(h)) } func QAccessibleActionInterface_Tr(sourceText string) string { @@ -1002,16 +981,13 @@ func newQAccessibleImageInterface(h *C.QAccessibleImageInterface) *QAccessibleIm if h == nil { return nil } + return &QAccessibleImageInterface{h: h} } // UnsafeNewQAccessibleImageInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleImageInterface(h unsafe.Pointer) *QAccessibleImageInterface { - if h == nil { - return nil - } - - return &QAccessibleImageInterface{h: (*C.QAccessibleImageInterface)(h)} + return newQAccessibleImageInterface((*C.QAccessibleImageInterface)(h)) } func (this *QAccessibleImageInterface) ImageDescription() string { @@ -1075,16 +1051,13 @@ func newQAccessibleHyperlinkInterface(h *C.QAccessibleHyperlinkInterface) *QAcce if h == nil { return nil } + return &QAccessibleHyperlinkInterface{h: h} } // UnsafeNewQAccessibleHyperlinkInterface constructs the type using only unsafe pointers. func UnsafeNewQAccessibleHyperlinkInterface(h unsafe.Pointer) *QAccessibleHyperlinkInterface { - if h == nil { - return nil - } - - return &QAccessibleHyperlinkInterface{h: (*C.QAccessibleHyperlinkInterface)(h)} + return newQAccessibleHyperlinkInterface((*C.QAccessibleHyperlinkInterface)(h)) } func (this *QAccessibleHyperlinkInterface) Anchor() string { @@ -1155,34 +1128,27 @@ func newQAccessibleEvent(h *C.QAccessibleEvent) *QAccessibleEvent { if h == nil { return nil } + return &QAccessibleEvent{h: h} } // UnsafeNewQAccessibleEvent constructs the type using only unsafe pointers. func UnsafeNewQAccessibleEvent(h unsafe.Pointer) *QAccessibleEvent { - if h == nil { - return nil - } - - return &QAccessibleEvent{h: (*C.QAccessibleEvent)(h)} + return newQAccessibleEvent((*C.QAccessibleEvent)(h)) } // NewQAccessibleEvent constructs a new QAccessibleEvent object. func NewQAccessibleEvent(obj *QObject, typ QAccessible__Event) *QAccessibleEvent { - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleEvent_new(obj.cPointer(), (C.int)(typ), &outptr_QAccessibleEvent) - ret := newQAccessibleEvent(outptr_QAccessibleEvent) + ret := newQAccessibleEvent(C.QAccessibleEvent_new(obj.cPointer(), (C.int)(typ))) ret.isSubclass = true return ret } // NewQAccessibleEvent2 constructs a new QAccessibleEvent object. func NewQAccessibleEvent2(iface *QAccessibleInterface, typ QAccessible__Event) *QAccessibleEvent { - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleEvent_new2(iface.cPointer(), (C.int)(typ), &outptr_QAccessibleEvent) - ret := newQAccessibleEvent(outptr_QAccessibleEvent) + ret := newQAccessibleEvent(C.QAccessibleEvent_new2(iface.cPointer(), (C.int)(typ))) ret.isSubclass = true return ret } @@ -1271,42 +1237,34 @@ func (this *QAccessibleStateChangeEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleStateChangeEvent constructs the type using only CGO pointers. -func newQAccessibleStateChangeEvent(h *C.QAccessibleStateChangeEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleStateChangeEvent { +func newQAccessibleStateChangeEvent(h *C.QAccessibleStateChangeEvent) *QAccessibleStateChangeEvent { if h == nil { return nil } + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + C.QAccessibleStateChangeEvent_virtbase(h, &outptr_QAccessibleEvent) + return &QAccessibleStateChangeEvent{h: h, - QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} + QAccessibleEvent: newQAccessibleEvent(outptr_QAccessibleEvent)} } // UnsafeNewQAccessibleStateChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleStateChangeEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleStateChangeEvent { - if h == nil { - return nil - } - - return &QAccessibleStateChangeEvent{h: (*C.QAccessibleStateChangeEvent)(h), - QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} +func UnsafeNewQAccessibleStateChangeEvent(h unsafe.Pointer) *QAccessibleStateChangeEvent { + return newQAccessibleStateChangeEvent((*C.QAccessibleStateChangeEvent)(h)) } // NewQAccessibleStateChangeEvent constructs a new QAccessibleStateChangeEvent object. func NewQAccessibleStateChangeEvent(obj *QObject, state QAccessible__State) *QAccessibleStateChangeEvent { - var outptr_QAccessibleStateChangeEvent *C.QAccessibleStateChangeEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleStateChangeEvent_new(obj.cPointer(), state.cPointer(), &outptr_QAccessibleStateChangeEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleStateChangeEvent(outptr_QAccessibleStateChangeEvent, outptr_QAccessibleEvent) + ret := newQAccessibleStateChangeEvent(C.QAccessibleStateChangeEvent_new(obj.cPointer(), state.cPointer())) ret.isSubclass = true return ret } // NewQAccessibleStateChangeEvent2 constructs a new QAccessibleStateChangeEvent object. func NewQAccessibleStateChangeEvent2(iface *QAccessibleInterface, state QAccessible__State) *QAccessibleStateChangeEvent { - var outptr_QAccessibleStateChangeEvent *C.QAccessibleStateChangeEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleStateChangeEvent_new2(iface.cPointer(), state.cPointer(), &outptr_QAccessibleStateChangeEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleStateChangeEvent(outptr_QAccessibleStateChangeEvent, outptr_QAccessibleEvent) + ret := newQAccessibleStateChangeEvent(C.QAccessibleStateChangeEvent_new2(iface.cPointer(), state.cPointer())) ret.isSubclass = true return ret } @@ -1377,42 +1335,34 @@ func (this *QAccessibleTextCursorEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleTextCursorEvent constructs the type using only CGO pointers. -func newQAccessibleTextCursorEvent(h *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextCursorEvent { +func newQAccessibleTextCursorEvent(h *C.QAccessibleTextCursorEvent) *QAccessibleTextCursorEvent { if h == nil { return nil } + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + C.QAccessibleTextCursorEvent_virtbase(h, &outptr_QAccessibleEvent) + return &QAccessibleTextCursorEvent{h: h, - QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} + QAccessibleEvent: newQAccessibleEvent(outptr_QAccessibleEvent)} } // UnsafeNewQAccessibleTextCursorEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleTextCursorEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextCursorEvent { - if h == nil { - return nil - } - - return &QAccessibleTextCursorEvent{h: (*C.QAccessibleTextCursorEvent)(h), - QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} +func UnsafeNewQAccessibleTextCursorEvent(h unsafe.Pointer) *QAccessibleTextCursorEvent { + return newQAccessibleTextCursorEvent((*C.QAccessibleTextCursorEvent)(h)) } // NewQAccessibleTextCursorEvent constructs a new QAccessibleTextCursorEvent object. func NewQAccessibleTextCursorEvent(obj *QObject, cursorPos int) *QAccessibleTextCursorEvent { - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextCursorEvent_new(obj.cPointer(), (C.int)(cursorPos), &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextCursorEvent(C.QAccessibleTextCursorEvent_new(obj.cPointer(), (C.int)(cursorPos))) ret.isSubclass = true return ret } // NewQAccessibleTextCursorEvent2 constructs a new QAccessibleTextCursorEvent object. func NewQAccessibleTextCursorEvent2(iface *QAccessibleInterface, cursorPos int) *QAccessibleTextCursorEvent { - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextCursorEvent_new2(iface.cPointer(), (C.int)(cursorPos), &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextCursorEvent(C.QAccessibleTextCursorEvent_new2(iface.cPointer(), (C.int)(cursorPos))) ret.isSubclass = true return ret } @@ -1485,44 +1435,34 @@ func (this *QAccessibleTextSelectionEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleTextSelectionEvent constructs the type using only CGO pointers. -func newQAccessibleTextSelectionEvent(h *C.QAccessibleTextSelectionEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextSelectionEvent { +func newQAccessibleTextSelectionEvent(h *C.QAccessibleTextSelectionEvent) *QAccessibleTextSelectionEvent { if h == nil { return nil } + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + C.QAccessibleTextSelectionEvent_virtbase(h, &outptr_QAccessibleTextCursorEvent) + return &QAccessibleTextSelectionEvent{h: h, - QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent)} } // UnsafeNewQAccessibleTextSelectionEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleTextSelectionEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextSelectionEvent { - if h == nil { - return nil - } - - return &QAccessibleTextSelectionEvent{h: (*C.QAccessibleTextSelectionEvent)(h), - QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} +func UnsafeNewQAccessibleTextSelectionEvent(h unsafe.Pointer) *QAccessibleTextSelectionEvent { + return newQAccessibleTextSelectionEvent((*C.QAccessibleTextSelectionEvent)(h)) } // NewQAccessibleTextSelectionEvent constructs a new QAccessibleTextSelectionEvent object. func NewQAccessibleTextSelectionEvent(obj *QObject, start int, end int) *QAccessibleTextSelectionEvent { - var outptr_QAccessibleTextSelectionEvent *C.QAccessibleTextSelectionEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextSelectionEvent_new(obj.cPointer(), (C.int)(start), (C.int)(end), &outptr_QAccessibleTextSelectionEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextSelectionEvent(outptr_QAccessibleTextSelectionEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextSelectionEvent(C.QAccessibleTextSelectionEvent_new(obj.cPointer(), (C.int)(start), (C.int)(end))) ret.isSubclass = true return ret } // NewQAccessibleTextSelectionEvent2 constructs a new QAccessibleTextSelectionEvent object. func NewQAccessibleTextSelectionEvent2(iface *QAccessibleInterface, start int, end int) *QAccessibleTextSelectionEvent { - var outptr_QAccessibleTextSelectionEvent *C.QAccessibleTextSelectionEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextSelectionEvent_new2(iface.cPointer(), (C.int)(start), (C.int)(end), &outptr_QAccessibleTextSelectionEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextSelectionEvent(outptr_QAccessibleTextSelectionEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextSelectionEvent(C.QAccessibleTextSelectionEvent_new2(iface.cPointer(), (C.int)(start), (C.int)(end))) ret.isSubclass = true return ret } @@ -1574,22 +1514,20 @@ func (this *QAccessibleTextInsertEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleTextInsertEvent constructs the type using only CGO pointers. -func newQAccessibleTextInsertEvent(h *C.QAccessibleTextInsertEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextInsertEvent { +func newQAccessibleTextInsertEvent(h *C.QAccessibleTextInsertEvent) *QAccessibleTextInsertEvent { if h == nil { return nil } + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + C.QAccessibleTextInsertEvent_virtbase(h, &outptr_QAccessibleTextCursorEvent) + return &QAccessibleTextInsertEvent{h: h, - QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent)} } // UnsafeNewQAccessibleTextInsertEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleTextInsertEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextInsertEvent { - if h == nil { - return nil - } - - return &QAccessibleTextInsertEvent{h: (*C.QAccessibleTextInsertEvent)(h), - QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} +func UnsafeNewQAccessibleTextInsertEvent(h unsafe.Pointer) *QAccessibleTextInsertEvent { + return newQAccessibleTextInsertEvent((*C.QAccessibleTextInsertEvent)(h)) } // NewQAccessibleTextInsertEvent constructs a new QAccessibleTextInsertEvent object. @@ -1598,12 +1536,8 @@ func NewQAccessibleTextInsertEvent(obj *QObject, position int, text string) *QAc text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAccessibleTextInsertEvent *C.QAccessibleTextInsertEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextInsertEvent_new(obj.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextInsertEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextInsertEvent(outptr_QAccessibleTextInsertEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextInsertEvent(C.QAccessibleTextInsertEvent_new(obj.cPointer(), (C.int)(position), text_ms)) ret.isSubclass = true return ret } @@ -1614,12 +1548,8 @@ func NewQAccessibleTextInsertEvent2(iface *QAccessibleInterface, position int, t text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAccessibleTextInsertEvent *C.QAccessibleTextInsertEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextInsertEvent_new2(iface.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextInsertEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextInsertEvent(outptr_QAccessibleTextInsertEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextInsertEvent(C.QAccessibleTextInsertEvent_new2(iface.cPointer(), (C.int)(position), text_ms)) ret.isSubclass = true return ret } @@ -1670,22 +1600,20 @@ func (this *QAccessibleTextRemoveEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleTextRemoveEvent constructs the type using only CGO pointers. -func newQAccessibleTextRemoveEvent(h *C.QAccessibleTextRemoveEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextRemoveEvent { +func newQAccessibleTextRemoveEvent(h *C.QAccessibleTextRemoveEvent) *QAccessibleTextRemoveEvent { if h == nil { return nil } + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + C.QAccessibleTextRemoveEvent_virtbase(h, &outptr_QAccessibleTextCursorEvent) + return &QAccessibleTextRemoveEvent{h: h, - QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent)} } // UnsafeNewQAccessibleTextRemoveEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleTextRemoveEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextRemoveEvent { - if h == nil { - return nil - } - - return &QAccessibleTextRemoveEvent{h: (*C.QAccessibleTextRemoveEvent)(h), - QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} +func UnsafeNewQAccessibleTextRemoveEvent(h unsafe.Pointer) *QAccessibleTextRemoveEvent { + return newQAccessibleTextRemoveEvent((*C.QAccessibleTextRemoveEvent)(h)) } // NewQAccessibleTextRemoveEvent constructs a new QAccessibleTextRemoveEvent object. @@ -1694,12 +1622,8 @@ func NewQAccessibleTextRemoveEvent(obj *QObject, position int, text string) *QAc text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAccessibleTextRemoveEvent *C.QAccessibleTextRemoveEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextRemoveEvent_new(obj.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextRemoveEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextRemoveEvent(outptr_QAccessibleTextRemoveEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextRemoveEvent(C.QAccessibleTextRemoveEvent_new(obj.cPointer(), (C.int)(position), text_ms)) ret.isSubclass = true return ret } @@ -1710,12 +1634,8 @@ func NewQAccessibleTextRemoveEvent2(iface *QAccessibleInterface, position int, t text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAccessibleTextRemoveEvent *C.QAccessibleTextRemoveEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextRemoveEvent_new2(iface.cPointer(), (C.int)(position), text_ms, &outptr_QAccessibleTextRemoveEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextRemoveEvent(outptr_QAccessibleTextRemoveEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextRemoveEvent(C.QAccessibleTextRemoveEvent_new2(iface.cPointer(), (C.int)(position), text_ms)) ret.isSubclass = true return ret } @@ -1766,22 +1686,20 @@ func (this *QAccessibleTextUpdateEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleTextUpdateEvent constructs the type using only CGO pointers. -func newQAccessibleTextUpdateEvent(h *C.QAccessibleTextUpdateEvent, h_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTextUpdateEvent { +func newQAccessibleTextUpdateEvent(h *C.QAccessibleTextUpdateEvent) *QAccessibleTextUpdateEvent { if h == nil { return nil } + var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil + C.QAccessibleTextUpdateEvent_virtbase(h, &outptr_QAccessibleTextCursorEvent) + return &QAccessibleTextUpdateEvent{h: h, - QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} + QAccessibleTextCursorEvent: newQAccessibleTextCursorEvent(outptr_QAccessibleTextCursorEvent)} } // UnsafeNewQAccessibleTextUpdateEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleTextUpdateEvent(h unsafe.Pointer, h_QAccessibleTextCursorEvent unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTextUpdateEvent { - if h == nil { - return nil - } - - return &QAccessibleTextUpdateEvent{h: (*C.QAccessibleTextUpdateEvent)(h), - QAccessibleTextCursorEvent: UnsafeNewQAccessibleTextCursorEvent(h_QAccessibleTextCursorEvent, h_QAccessibleEvent)} +func UnsafeNewQAccessibleTextUpdateEvent(h unsafe.Pointer) *QAccessibleTextUpdateEvent { + return newQAccessibleTextUpdateEvent((*C.QAccessibleTextUpdateEvent)(h)) } // NewQAccessibleTextUpdateEvent constructs a new QAccessibleTextUpdateEvent object. @@ -1794,12 +1712,8 @@ func NewQAccessibleTextUpdateEvent(obj *QObject, position int, oldText string, t text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAccessibleTextUpdateEvent *C.QAccessibleTextUpdateEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextUpdateEvent_new(obj.cPointer(), (C.int)(position), oldText_ms, text_ms, &outptr_QAccessibleTextUpdateEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextUpdateEvent(outptr_QAccessibleTextUpdateEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextUpdateEvent(C.QAccessibleTextUpdateEvent_new(obj.cPointer(), (C.int)(position), oldText_ms, text_ms)) ret.isSubclass = true return ret } @@ -1814,12 +1728,8 @@ func NewQAccessibleTextUpdateEvent2(iface *QAccessibleInterface, position int, o text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAccessibleTextUpdateEvent *C.QAccessibleTextUpdateEvent = nil - var outptr_QAccessibleTextCursorEvent *C.QAccessibleTextCursorEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTextUpdateEvent_new2(iface.cPointer(), (C.int)(position), oldText_ms, text_ms, &outptr_QAccessibleTextUpdateEvent, &outptr_QAccessibleTextCursorEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTextUpdateEvent(outptr_QAccessibleTextUpdateEvent, outptr_QAccessibleTextCursorEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTextUpdateEvent(C.QAccessibleTextUpdateEvent_new2(iface.cPointer(), (C.int)(position), oldText_ms, text_ms)) ret.isSubclass = true return ret } @@ -1877,42 +1787,34 @@ func (this *QAccessibleValueChangeEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleValueChangeEvent constructs the type using only CGO pointers. -func newQAccessibleValueChangeEvent(h *C.QAccessibleValueChangeEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleValueChangeEvent { +func newQAccessibleValueChangeEvent(h *C.QAccessibleValueChangeEvent) *QAccessibleValueChangeEvent { if h == nil { return nil } + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + C.QAccessibleValueChangeEvent_virtbase(h, &outptr_QAccessibleEvent) + return &QAccessibleValueChangeEvent{h: h, - QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} + QAccessibleEvent: newQAccessibleEvent(outptr_QAccessibleEvent)} } // UnsafeNewQAccessibleValueChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleValueChangeEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleValueChangeEvent { - if h == nil { - return nil - } - - return &QAccessibleValueChangeEvent{h: (*C.QAccessibleValueChangeEvent)(h), - QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} +func UnsafeNewQAccessibleValueChangeEvent(h unsafe.Pointer) *QAccessibleValueChangeEvent { + return newQAccessibleValueChangeEvent((*C.QAccessibleValueChangeEvent)(h)) } // NewQAccessibleValueChangeEvent constructs a new QAccessibleValueChangeEvent object. func NewQAccessibleValueChangeEvent(obj *QObject, val *QVariant) *QAccessibleValueChangeEvent { - var outptr_QAccessibleValueChangeEvent *C.QAccessibleValueChangeEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleValueChangeEvent_new(obj.cPointer(), val.cPointer(), &outptr_QAccessibleValueChangeEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleValueChangeEvent(outptr_QAccessibleValueChangeEvent, outptr_QAccessibleEvent) + ret := newQAccessibleValueChangeEvent(C.QAccessibleValueChangeEvent_new(obj.cPointer(), val.cPointer())) ret.isSubclass = true return ret } // NewQAccessibleValueChangeEvent2 constructs a new QAccessibleValueChangeEvent object. func NewQAccessibleValueChangeEvent2(iface *QAccessibleInterface, val *QVariant) *QAccessibleValueChangeEvent { - var outptr_QAccessibleValueChangeEvent *C.QAccessibleValueChangeEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleValueChangeEvent_new2(iface.cPointer(), val.cPointer(), &outptr_QAccessibleValueChangeEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleValueChangeEvent(outptr_QAccessibleValueChangeEvent, outptr_QAccessibleEvent) + ret := newQAccessibleValueChangeEvent(C.QAccessibleValueChangeEvent_new2(iface.cPointer(), val.cPointer())) ret.isSubclass = true return ret } @@ -1987,42 +1889,34 @@ func (this *QAccessibleTableModelChangeEvent) UnsafePointer() unsafe.Pointer { } // newQAccessibleTableModelChangeEvent constructs the type using only CGO pointers. -func newQAccessibleTableModelChangeEvent(h *C.QAccessibleTableModelChangeEvent, h_QAccessibleEvent *C.QAccessibleEvent) *QAccessibleTableModelChangeEvent { +func newQAccessibleTableModelChangeEvent(h *C.QAccessibleTableModelChangeEvent) *QAccessibleTableModelChangeEvent { if h == nil { return nil } + var outptr_QAccessibleEvent *C.QAccessibleEvent = nil + C.QAccessibleTableModelChangeEvent_virtbase(h, &outptr_QAccessibleEvent) + return &QAccessibleTableModelChangeEvent{h: h, - QAccessibleEvent: newQAccessibleEvent(h_QAccessibleEvent)} + QAccessibleEvent: newQAccessibleEvent(outptr_QAccessibleEvent)} } // UnsafeNewQAccessibleTableModelChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleTableModelChangeEvent(h unsafe.Pointer, h_QAccessibleEvent unsafe.Pointer) *QAccessibleTableModelChangeEvent { - if h == nil { - return nil - } - - return &QAccessibleTableModelChangeEvent{h: (*C.QAccessibleTableModelChangeEvent)(h), - QAccessibleEvent: UnsafeNewQAccessibleEvent(h_QAccessibleEvent)} +func UnsafeNewQAccessibleTableModelChangeEvent(h unsafe.Pointer) *QAccessibleTableModelChangeEvent { + return newQAccessibleTableModelChangeEvent((*C.QAccessibleTableModelChangeEvent)(h)) } // NewQAccessibleTableModelChangeEvent constructs a new QAccessibleTableModelChangeEvent object. func NewQAccessibleTableModelChangeEvent(obj *QObject, changeType QAccessibleTableModelChangeEvent__ModelChangeType) *QAccessibleTableModelChangeEvent { - var outptr_QAccessibleTableModelChangeEvent *C.QAccessibleTableModelChangeEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTableModelChangeEvent_new(obj.cPointer(), (C.int)(changeType), &outptr_QAccessibleTableModelChangeEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTableModelChangeEvent(outptr_QAccessibleTableModelChangeEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTableModelChangeEvent(C.QAccessibleTableModelChangeEvent_new(obj.cPointer(), (C.int)(changeType))) ret.isSubclass = true return ret } // NewQAccessibleTableModelChangeEvent2 constructs a new QAccessibleTableModelChangeEvent object. func NewQAccessibleTableModelChangeEvent2(iface *QAccessibleInterface, changeType QAccessibleTableModelChangeEvent__ModelChangeType) *QAccessibleTableModelChangeEvent { - var outptr_QAccessibleTableModelChangeEvent *C.QAccessibleTableModelChangeEvent = nil - var outptr_QAccessibleEvent *C.QAccessibleEvent = nil - C.QAccessibleTableModelChangeEvent_new2(iface.cPointer(), (C.int)(changeType), &outptr_QAccessibleTableModelChangeEvent, &outptr_QAccessibleEvent) - ret := newQAccessibleTableModelChangeEvent(outptr_QAccessibleTableModelChangeEvent, outptr_QAccessibleEvent) + ret := newQAccessibleTableModelChangeEvent(C.QAccessibleTableModelChangeEvent_new2(iface.cPointer(), (C.int)(changeType))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qaccessible.h b/qt6/gen_qaccessible.h index c90738d9..9cc31559 100644 --- a/qt6/gen_qaccessible.h +++ b/qt6/gen_qaccessible.h @@ -205,8 +205,8 @@ bool QAccessibleHyperlinkInterface_IsValid(const QAccessibleHyperlinkInterface* void QAccessibleHyperlinkInterface_OperatorAssign(QAccessibleHyperlinkInterface* self, QAccessibleHyperlinkInterface* param1); void QAccessibleHyperlinkInterface_Delete(QAccessibleHyperlinkInterface* self, bool isSubclass); -void QAccessibleEvent_new(QObject* obj, int typ, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleEvent_new2(QAccessibleInterface* iface, int typ, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleEvent* QAccessibleEvent_new(QObject* obj, int typ); +QAccessibleEvent* QAccessibleEvent_new2(QAccessibleInterface* iface, int typ); int QAccessibleEvent_Type(const QAccessibleEvent* self); QObject* QAccessibleEvent_Object(const QAccessibleEvent* self); unsigned int QAccessibleEvent_UniqueId(const QAccessibleEvent* self); @@ -217,57 +217,65 @@ void QAccessibleEvent_override_virtual_AccessibleInterface(void* self, intptr_t QAccessibleInterface* QAccessibleEvent_virtualbase_AccessibleInterface(const void* self); void QAccessibleEvent_Delete(QAccessibleEvent* self, bool isSubclass); -void QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state, QAccessibleStateChangeEvent** outptr_QAccessibleStateChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new(QObject* obj, QAccessible__State* state); +QAccessibleStateChangeEvent* QAccessibleStateChangeEvent_new2(QAccessibleInterface* iface, QAccessible__State* state); +void QAccessibleStateChangeEvent_virtbase(QAccessibleStateChangeEvent* src, QAccessibleEvent** outptr_QAccessibleEvent); QAccessible__State* QAccessibleStateChangeEvent_ChangedStates(const QAccessibleStateChangeEvent* self); void QAccessibleStateChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); QAccessibleInterface* QAccessibleStateChangeEvent_virtualbase_AccessibleInterface(const void* self); void QAccessibleStateChangeEvent_Delete(QAccessibleStateChangeEvent* self, bool isSubclass); -void QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new(QObject* obj, int cursorPos); +QAccessibleTextCursorEvent* QAccessibleTextCursorEvent_new2(QAccessibleInterface* iface, int cursorPos); +void QAccessibleTextCursorEvent_virtbase(QAccessibleTextCursorEvent* src, QAccessibleEvent** outptr_QAccessibleEvent); void QAccessibleTextCursorEvent_SetCursorPosition(QAccessibleTextCursorEvent* self, int position); int QAccessibleTextCursorEvent_CursorPosition(const QAccessibleTextCursorEvent* self); void QAccessibleTextCursorEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); QAccessibleInterface* QAccessibleTextCursorEvent_virtualbase_AccessibleInterface(const void* self); void QAccessibleTextCursorEvent_Delete(QAccessibleTextCursorEvent* self, bool isSubclass); -void QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end, QAccessibleTextSelectionEvent** outptr_QAccessibleTextSelectionEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new(QObject* obj, int start, int end); +QAccessibleTextSelectionEvent* QAccessibleTextSelectionEvent_new2(QAccessibleInterface* iface, int start, int end); +void QAccessibleTextSelectionEvent_virtbase(QAccessibleTextSelectionEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent); void QAccessibleTextSelectionEvent_SetSelection(QAccessibleTextSelectionEvent* self, int start, int end); int QAccessibleTextSelectionEvent_SelectionStart(const QAccessibleTextSelectionEvent* self); int QAccessibleTextSelectionEvent_SelectionEnd(const QAccessibleTextSelectionEvent* self); void QAccessibleTextSelectionEvent_Delete(QAccessibleTextSelectionEvent* self, bool isSubclass); -void QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextInsertEvent** outptr_QAccessibleTextInsertEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new(QObject* obj, int position, struct miqt_string text); +QAccessibleTextInsertEvent* QAccessibleTextInsertEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text); +void QAccessibleTextInsertEvent_virtbase(QAccessibleTextInsertEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent); struct miqt_string QAccessibleTextInsertEvent_TextInserted(const QAccessibleTextInsertEvent* self); int QAccessibleTextInsertEvent_ChangePosition(const QAccessibleTextInsertEvent* self); void QAccessibleTextInsertEvent_Delete(QAccessibleTextInsertEvent* self, bool isSubclass); -void QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text, QAccessibleTextRemoveEvent** outptr_QAccessibleTextRemoveEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new(QObject* obj, int position, struct miqt_string text); +QAccessibleTextRemoveEvent* QAccessibleTextRemoveEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string text); +void QAccessibleTextRemoveEvent_virtbase(QAccessibleTextRemoveEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent); struct miqt_string QAccessibleTextRemoveEvent_TextRemoved(const QAccessibleTextRemoveEvent* self); int QAccessibleTextRemoveEvent_ChangePosition(const QAccessibleTextRemoveEvent* self); void QAccessibleTextRemoveEvent_Delete(QAccessibleTextRemoveEvent* self, bool isSubclass); -void QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text, QAccessibleTextUpdateEvent** outptr_QAccessibleTextUpdateEvent, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new(QObject* obj, int position, struct miqt_string oldText, struct miqt_string text); +QAccessibleTextUpdateEvent* QAccessibleTextUpdateEvent_new2(QAccessibleInterface* iface, int position, struct miqt_string oldText, struct miqt_string text); +void QAccessibleTextUpdateEvent_virtbase(QAccessibleTextUpdateEvent* src, QAccessibleTextCursorEvent** outptr_QAccessibleTextCursorEvent); struct miqt_string QAccessibleTextUpdateEvent_TextRemoved(const QAccessibleTextUpdateEvent* self); struct miqt_string QAccessibleTextUpdateEvent_TextInserted(const QAccessibleTextUpdateEvent* self); int QAccessibleTextUpdateEvent_ChangePosition(const QAccessibleTextUpdateEvent* self); void QAccessibleTextUpdateEvent_Delete(QAccessibleTextUpdateEvent* self, bool isSubclass); -void QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val, QAccessibleValueChangeEvent** outptr_QAccessibleValueChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new(QObject* obj, QVariant* val); +QAccessibleValueChangeEvent* QAccessibleValueChangeEvent_new2(QAccessibleInterface* iface, QVariant* val); +void QAccessibleValueChangeEvent_virtbase(QAccessibleValueChangeEvent* src, QAccessibleEvent** outptr_QAccessibleEvent); void QAccessibleValueChangeEvent_SetValue(QAccessibleValueChangeEvent* self, QVariant* val); QVariant* QAccessibleValueChangeEvent_Value(const QAccessibleValueChangeEvent* self); void QAccessibleValueChangeEvent_override_virtual_AccessibleInterface(void* self, intptr_t slot); QAccessibleInterface* QAccessibleValueChangeEvent_virtualbase_AccessibleInterface(const void* self); void QAccessibleValueChangeEvent_Delete(QAccessibleValueChangeEvent* self, bool isSubclass); -void QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); -void QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType, QAccessibleTableModelChangeEvent** outptr_QAccessibleTableModelChangeEvent, QAccessibleEvent** outptr_QAccessibleEvent); +QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new(QObject* obj, int changeType); +QAccessibleTableModelChangeEvent* QAccessibleTableModelChangeEvent_new2(QAccessibleInterface* iface, int changeType); +void QAccessibleTableModelChangeEvent_virtbase(QAccessibleTableModelChangeEvent* src, QAccessibleEvent** outptr_QAccessibleEvent); void QAccessibleTableModelChangeEvent_SetModelChangeType(QAccessibleTableModelChangeEvent* self, int changeType); int QAccessibleTableModelChangeEvent_ModelChangeType(const QAccessibleTableModelChangeEvent* self); void QAccessibleTableModelChangeEvent_SetFirstRow(QAccessibleTableModelChangeEvent* self, int row); diff --git a/qt6/gen_qaccessible_base.cpp b/qt6/gen_qaccessible_base.cpp index c0c54f5f..91e8f42f 100644 --- a/qt6/gen_qaccessible_base.cpp +++ b/qt6/gen_qaccessible_base.cpp @@ -82,9 +82,8 @@ void QAccessible_Delete(QAccessible* self, bool isSubclass) { } } -void QAccessible__State_new(QAccessible__State** outptr_QAccessible__State) { - QAccessible::State* ret = new QAccessible::State(); - *outptr_QAccessible__State = ret; +QAccessible__State* QAccessible__State_new() { + return new QAccessible::State(); } void QAccessible__State_Delete(QAccessible__State* self, bool isSubclass) { diff --git a/qt6/gen_qaccessible_base.go b/qt6/gen_qaccessible_base.go index ec1ea5a6..3af55afc 100644 --- a/qt6/gen_qaccessible_base.go +++ b/qt6/gen_qaccessible_base.go @@ -239,16 +239,13 @@ func newQAccessible(h *C.QAccessible) *QAccessible { if h == nil { return nil } + return &QAccessible{h: h} } // UnsafeNewQAccessible constructs the type using only unsafe pointers. func UnsafeNewQAccessible(h unsafe.Pointer) *QAccessible { - if h == nil { - return nil - } - - return &QAccessible{h: (*C.QAccessible)(h)} + return newQAccessible((*C.QAccessible)(h)) } func QAccessible_InstallActivationObserver(param1 *QAccessible__ActivationObserver) { @@ -354,24 +351,19 @@ func newQAccessible__State(h *C.QAccessible__State) *QAccessible__State { if h == nil { return nil } + return &QAccessible__State{h: h} } // UnsafeNewQAccessible__State constructs the type using only unsafe pointers. func UnsafeNewQAccessible__State(h unsafe.Pointer) *QAccessible__State { - if h == nil { - return nil - } - - return &QAccessible__State{h: (*C.QAccessible__State)(h)} + return newQAccessible__State((*C.QAccessible__State)(h)) } // NewQAccessible__State constructs a new QAccessible::State object. func NewQAccessible__State() *QAccessible__State { - var outptr_QAccessible__State *C.QAccessible__State = nil - C.QAccessible__State_new(&outptr_QAccessible__State) - ret := newQAccessible__State(outptr_QAccessible__State) + ret := newQAccessible__State(C.QAccessible__State_new()) ret.isSubclass = true return ret } @@ -414,16 +406,13 @@ func newQAccessible__ActivationObserver(h *C.QAccessible__ActivationObserver) *Q if h == nil { return nil } + return &QAccessible__ActivationObserver{h: h} } // UnsafeNewQAccessible__ActivationObserver constructs the type using only unsafe pointers. func UnsafeNewQAccessible__ActivationObserver(h unsafe.Pointer) *QAccessible__ActivationObserver { - if h == nil { - return nil - } - - return &QAccessible__ActivationObserver{h: (*C.QAccessible__ActivationObserver)(h)} + return newQAccessible__ActivationObserver((*C.QAccessible__ActivationObserver)(h)) } func (this *QAccessible__ActivationObserver) AccessibilityActiveChanged(active bool) { diff --git a/qt6/gen_qaccessible_base.h b/qt6/gen_qaccessible_base.h index fd179265..71a55e6e 100644 --- a/qt6/gen_qaccessible_base.h +++ b/qt6/gen_qaccessible_base.h @@ -55,7 +55,7 @@ void QAccessible_Cleanup(); struct miqt_map /* tuple of int and int */ QAccessible_QAccessibleTextBoundaryHelper(QTextCursor* cursor, int boundaryType); void QAccessible_Delete(QAccessible* self, bool isSubclass); -void QAccessible__State_new(QAccessible__State** outptr_QAccessible__State); +QAccessible__State* QAccessible__State_new(); void QAccessible__State_Delete(QAccessible__State* self, bool isSubclass); void QAccessible__ActivationObserver_AccessibilityActiveChanged(QAccessible__ActivationObserver* self, bool active); diff --git a/qt6/gen_qaccessiblebridge.cpp b/qt6/gen_qaccessiblebridge.cpp index 36670002..05165283 100644 --- a/qt6/gen_qaccessiblebridge.cpp +++ b/qt6/gen_qaccessiblebridge.cpp @@ -239,16 +239,16 @@ public: }; -void QAccessibleBridgePlugin_new(QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject) { - MiqtVirtualQAccessibleBridgePlugin* ret = new MiqtVirtualQAccessibleBridgePlugin(); - *outptr_QAccessibleBridgePlugin = ret; - *outptr_QObject = static_cast(ret); +QAccessibleBridgePlugin* QAccessibleBridgePlugin_new() { + return new MiqtVirtualQAccessibleBridgePlugin(); } -void QAccessibleBridgePlugin_new2(QObject* parent, QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject) { - MiqtVirtualQAccessibleBridgePlugin* ret = new MiqtVirtualQAccessibleBridgePlugin(parent); - *outptr_QAccessibleBridgePlugin = ret; - *outptr_QObject = static_cast(ret); +QAccessibleBridgePlugin* QAccessibleBridgePlugin_new2(QObject* parent) { + return new MiqtVirtualQAccessibleBridgePlugin(parent); +} + +void QAccessibleBridgePlugin_virtbase(QAccessibleBridgePlugin* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAccessibleBridgePlugin_MetaObject(const QAccessibleBridgePlugin* self) { diff --git a/qt6/gen_qaccessiblebridge.go b/qt6/gen_qaccessiblebridge.go index 4aa24a30..d1d50e76 100644 --- a/qt6/gen_qaccessiblebridge.go +++ b/qt6/gen_qaccessiblebridge.go @@ -38,16 +38,13 @@ func newQAccessibleBridge(h *C.QAccessibleBridge) *QAccessibleBridge { if h == nil { return nil } + return &QAccessibleBridge{h: h} } // UnsafeNewQAccessibleBridge constructs the type using only unsafe pointers. func UnsafeNewQAccessibleBridge(h unsafe.Pointer) *QAccessibleBridge { - if h == nil { - return nil - } - - return &QAccessibleBridge{h: (*C.QAccessibleBridge)(h)} + return newQAccessibleBridge((*C.QAccessibleBridge)(h)) } func (this *QAccessibleBridge) SetRootObject(rootObject *QAccessibleInterface) { @@ -97,42 +94,34 @@ func (this *QAccessibleBridgePlugin) UnsafePointer() unsafe.Pointer { } // newQAccessibleBridgePlugin constructs the type using only CGO pointers. -func newQAccessibleBridgePlugin(h *C.QAccessibleBridgePlugin, h_QObject *C.QObject) *QAccessibleBridgePlugin { +func newQAccessibleBridgePlugin(h *C.QAccessibleBridgePlugin) *QAccessibleBridgePlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAccessibleBridgePlugin_virtbase(h, &outptr_QObject) + return &QAccessibleBridgePlugin{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAccessibleBridgePlugin constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleBridgePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAccessibleBridgePlugin { - if h == nil { - return nil - } - - return &QAccessibleBridgePlugin{h: (*C.QAccessibleBridgePlugin)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAccessibleBridgePlugin(h unsafe.Pointer) *QAccessibleBridgePlugin { + return newQAccessibleBridgePlugin((*C.QAccessibleBridgePlugin)(h)) } // NewQAccessibleBridgePlugin constructs a new QAccessibleBridgePlugin object. func NewQAccessibleBridgePlugin() *QAccessibleBridgePlugin { - var outptr_QAccessibleBridgePlugin *C.QAccessibleBridgePlugin = nil - var outptr_QObject *C.QObject = nil - C.QAccessibleBridgePlugin_new(&outptr_QAccessibleBridgePlugin, &outptr_QObject) - ret := newQAccessibleBridgePlugin(outptr_QAccessibleBridgePlugin, outptr_QObject) + ret := newQAccessibleBridgePlugin(C.QAccessibleBridgePlugin_new()) ret.isSubclass = true return ret } // NewQAccessibleBridgePlugin2 constructs a new QAccessibleBridgePlugin object. func NewQAccessibleBridgePlugin2(parent *QObject) *QAccessibleBridgePlugin { - var outptr_QAccessibleBridgePlugin *C.QAccessibleBridgePlugin = nil - var outptr_QObject *C.QObject = nil - C.QAccessibleBridgePlugin_new2(parent.cPointer(), &outptr_QAccessibleBridgePlugin, &outptr_QObject) - ret := newQAccessibleBridgePlugin(outptr_QAccessibleBridgePlugin, outptr_QObject) + ret := newQAccessibleBridgePlugin(C.QAccessibleBridgePlugin_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -289,7 +278,7 @@ func miqt_exec_callback_QAccessibleBridgePlugin_TimerEvent(self *C.QAccessibleBr } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAccessibleBridgePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -315,7 +304,7 @@ func miqt_exec_callback_QAccessibleBridgePlugin_ChildEvent(self *C.QAccessibleBr } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAccessibleBridgePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qaccessiblebridge.h b/qt6/gen_qaccessiblebridge.h index 53deffcb..85819159 100644 --- a/qt6/gen_qaccessiblebridge.h +++ b/qt6/gen_qaccessiblebridge.h @@ -43,8 +43,9 @@ void QAccessibleBridge_NotifyAccessibilityUpdate(QAccessibleBridge* self, QAcces void QAccessibleBridge_OperatorAssign(QAccessibleBridge* self, QAccessibleBridge* param1); void QAccessibleBridge_Delete(QAccessibleBridge* self, bool isSubclass); -void QAccessibleBridgePlugin_new(QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject); -void QAccessibleBridgePlugin_new2(QObject* parent, QAccessibleBridgePlugin** outptr_QAccessibleBridgePlugin, QObject** outptr_QObject); +QAccessibleBridgePlugin* QAccessibleBridgePlugin_new(); +QAccessibleBridgePlugin* QAccessibleBridgePlugin_new2(QObject* parent); +void QAccessibleBridgePlugin_virtbase(QAccessibleBridgePlugin* src, QObject** outptr_QObject); QMetaObject* QAccessibleBridgePlugin_MetaObject(const QAccessibleBridgePlugin* self); void* QAccessibleBridgePlugin_Metacast(QAccessibleBridgePlugin* self, const char* param1); struct miqt_string QAccessibleBridgePlugin_Tr(const char* s); diff --git a/qt6/gen_qaccessibleobject.cpp b/qt6/gen_qaccessibleobject.cpp index 5a54f869..626bf5c6 100644 --- a/qt6/gen_qaccessibleobject.cpp +++ b/qt6/gen_qaccessibleobject.cpp @@ -12,6 +12,10 @@ #include "gen_qaccessibleobject.h" #include "_cgo_export.h" +void QAccessibleObject_virtbase(QAccessibleObject* src, QAccessibleInterface** outptr_QAccessibleInterface) { + *outptr_QAccessibleInterface = static_cast(src); +} + bool QAccessibleObject_IsValid(const QAccessibleObject* self) { return self->isValid(); } @@ -33,11 +37,12 @@ QAccessibleInterface* QAccessibleObject_ChildAt(const QAccessibleObject* self, i return self->childAt(static_cast(x), static_cast(y)); } -void QAccessibleApplication_new(QAccessibleApplication** outptr_QAccessibleApplication, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface) { - QAccessibleApplication* ret = new QAccessibleApplication(); - *outptr_QAccessibleApplication = ret; - *outptr_QAccessibleObject = static_cast(ret); - *outptr_QAccessibleInterface = static_cast(ret); +QAccessibleApplication* QAccessibleApplication_new() { + return new QAccessibleApplication(); +} + +void QAccessibleApplication_virtbase(QAccessibleApplication* src, QAccessibleObject** outptr_QAccessibleObject) { + *outptr_QAccessibleObject = static_cast(src); } QWindow* QAccessibleApplication_Window(const QAccessibleApplication* self) { diff --git a/qt6/gen_qaccessibleobject.go b/qt6/gen_qaccessibleobject.go index e5d4092a..3af3f7f6 100644 --- a/qt6/gen_qaccessibleobject.go +++ b/qt6/gen_qaccessibleobject.go @@ -34,22 +34,20 @@ func (this *QAccessibleObject) UnsafePointer() unsafe.Pointer { } // newQAccessibleObject constructs the type using only CGO pointers. -func newQAccessibleObject(h *C.QAccessibleObject, h_QAccessibleInterface *C.QAccessibleInterface) *QAccessibleObject { +func newQAccessibleObject(h *C.QAccessibleObject) *QAccessibleObject { if h == nil { return nil } + var outptr_QAccessibleInterface *C.QAccessibleInterface = nil + C.QAccessibleObject_virtbase(h, &outptr_QAccessibleInterface) + return &QAccessibleObject{h: h, - QAccessibleInterface: newQAccessibleInterface(h_QAccessibleInterface)} + QAccessibleInterface: newQAccessibleInterface(outptr_QAccessibleInterface)} } // UnsafeNewQAccessibleObject constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleObject(h unsafe.Pointer, h_QAccessibleInterface unsafe.Pointer) *QAccessibleObject { - if h == nil { - return nil - } - - return &QAccessibleObject{h: (*C.QAccessibleObject)(h), - QAccessibleInterface: UnsafeNewQAccessibleInterface(h_QAccessibleInterface)} +func UnsafeNewQAccessibleObject(h unsafe.Pointer) *QAccessibleObject { + return newQAccessibleObject((*C.QAccessibleObject)(h)) } func (this *QAccessibleObject) IsValid() bool { @@ -99,38 +97,32 @@ func (this *QAccessibleApplication) UnsafePointer() unsafe.Pointer { } // newQAccessibleApplication constructs the type using only CGO pointers. -func newQAccessibleApplication(h *C.QAccessibleApplication, h_QAccessibleObject *C.QAccessibleObject, h_QAccessibleInterface *C.QAccessibleInterface) *QAccessibleApplication { +func newQAccessibleApplication(h *C.QAccessibleApplication) *QAccessibleApplication { if h == nil { return nil } + var outptr_QAccessibleObject *C.QAccessibleObject = nil + C.QAccessibleApplication_virtbase(h, &outptr_QAccessibleObject) + return &QAccessibleApplication{h: h, - QAccessibleObject: newQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface)} + QAccessibleObject: newQAccessibleObject(outptr_QAccessibleObject)} } // UnsafeNewQAccessibleApplication constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleApplication(h unsafe.Pointer, h_QAccessibleObject unsafe.Pointer, h_QAccessibleInterface unsafe.Pointer) *QAccessibleApplication { - if h == nil { - return nil - } - - return &QAccessibleApplication{h: (*C.QAccessibleApplication)(h), - QAccessibleObject: UnsafeNewQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface)} +func UnsafeNewQAccessibleApplication(h unsafe.Pointer) *QAccessibleApplication { + return newQAccessibleApplication((*C.QAccessibleApplication)(h)) } // NewQAccessibleApplication constructs a new QAccessibleApplication object. func NewQAccessibleApplication() *QAccessibleApplication { - var outptr_QAccessibleApplication *C.QAccessibleApplication = nil - var outptr_QAccessibleObject *C.QAccessibleObject = nil - var outptr_QAccessibleInterface *C.QAccessibleInterface = nil - C.QAccessibleApplication_new(&outptr_QAccessibleApplication, &outptr_QAccessibleObject, &outptr_QAccessibleInterface) - ret := newQAccessibleApplication(outptr_QAccessibleApplication, outptr_QAccessibleObject, outptr_QAccessibleInterface) + ret := newQAccessibleApplication(C.QAccessibleApplication_new()) ret.isSubclass = true return ret } func (this *QAccessibleApplication) Window() *QWindow { - return newQWindow(C.QAccessibleApplication_Window(this.h), nil, nil) + return newQWindow(C.QAccessibleApplication_Window(this.h)) } func (this *QAccessibleApplication) ChildCount() int { diff --git a/qt6/gen_qaccessibleobject.h b/qt6/gen_qaccessibleobject.h index 3a0d3c2d..4ab6b258 100644 --- a/qt6/gen_qaccessibleobject.h +++ b/qt6/gen_qaccessibleobject.h @@ -36,13 +36,15 @@ typedef struct QRect QRect; typedef struct QWindow QWindow; #endif +void QAccessibleObject_virtbase(QAccessibleObject* src, QAccessibleInterface** outptr_QAccessibleInterface); bool QAccessibleObject_IsValid(const QAccessibleObject* self); QObject* QAccessibleObject_Object(const QAccessibleObject* self); QRect* QAccessibleObject_Rect(const QAccessibleObject* self); void QAccessibleObject_SetText(QAccessibleObject* self, int t, struct miqt_string text); QAccessibleInterface* QAccessibleObject_ChildAt(const QAccessibleObject* self, int x, int y); -void QAccessibleApplication_new(QAccessibleApplication** outptr_QAccessibleApplication, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface); +QAccessibleApplication* QAccessibleApplication_new(); +void QAccessibleApplication_virtbase(QAccessibleApplication* src, QAccessibleObject** outptr_QAccessibleObject); QWindow* QAccessibleApplication_Window(const QAccessibleApplication* self); int QAccessibleApplication_ChildCount(const QAccessibleApplication* self); int QAccessibleApplication_IndexOfChild(const QAccessibleApplication* self, QAccessibleInterface* param1); diff --git a/qt6/gen_qaccessibleplugin.cpp b/qt6/gen_qaccessibleplugin.cpp index eff9735c..fd03391f 100644 --- a/qt6/gen_qaccessibleplugin.cpp +++ b/qt6/gen_qaccessibleplugin.cpp @@ -218,16 +218,16 @@ public: }; -void QAccessiblePlugin_new(QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject) { - MiqtVirtualQAccessiblePlugin* ret = new MiqtVirtualQAccessiblePlugin(); - *outptr_QAccessiblePlugin = ret; - *outptr_QObject = static_cast(ret); +QAccessiblePlugin* QAccessiblePlugin_new() { + return new MiqtVirtualQAccessiblePlugin(); } -void QAccessiblePlugin_new2(QObject* parent, QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject) { - MiqtVirtualQAccessiblePlugin* ret = new MiqtVirtualQAccessiblePlugin(parent); - *outptr_QAccessiblePlugin = ret; - *outptr_QObject = static_cast(ret); +QAccessiblePlugin* QAccessiblePlugin_new2(QObject* parent) { + return new MiqtVirtualQAccessiblePlugin(parent); +} + +void QAccessiblePlugin_virtbase(QAccessiblePlugin* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAccessiblePlugin_MetaObject(const QAccessiblePlugin* self) { diff --git a/qt6/gen_qaccessibleplugin.go b/qt6/gen_qaccessibleplugin.go index abb8a229..a4ad83d9 100644 --- a/qt6/gen_qaccessibleplugin.go +++ b/qt6/gen_qaccessibleplugin.go @@ -35,42 +35,34 @@ func (this *QAccessiblePlugin) UnsafePointer() unsafe.Pointer { } // newQAccessiblePlugin constructs the type using only CGO pointers. -func newQAccessiblePlugin(h *C.QAccessiblePlugin, h_QObject *C.QObject) *QAccessiblePlugin { +func newQAccessiblePlugin(h *C.QAccessiblePlugin) *QAccessiblePlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAccessiblePlugin_virtbase(h, &outptr_QObject) + return &QAccessiblePlugin{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAccessiblePlugin constructs the type using only unsafe pointers. -func UnsafeNewQAccessiblePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAccessiblePlugin { - if h == nil { - return nil - } - - return &QAccessiblePlugin{h: (*C.QAccessiblePlugin)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAccessiblePlugin(h unsafe.Pointer) *QAccessiblePlugin { + return newQAccessiblePlugin((*C.QAccessiblePlugin)(h)) } // NewQAccessiblePlugin constructs a new QAccessiblePlugin object. func NewQAccessiblePlugin() *QAccessiblePlugin { - var outptr_QAccessiblePlugin *C.QAccessiblePlugin = nil - var outptr_QObject *C.QObject = nil - C.QAccessiblePlugin_new(&outptr_QAccessiblePlugin, &outptr_QObject) - ret := newQAccessiblePlugin(outptr_QAccessiblePlugin, outptr_QObject) + ret := newQAccessiblePlugin(C.QAccessiblePlugin_new()) ret.isSubclass = true return ret } // NewQAccessiblePlugin2 constructs a new QAccessiblePlugin object. func NewQAccessiblePlugin2(parent *QObject) *QAccessiblePlugin { - var outptr_QAccessiblePlugin *C.QAccessiblePlugin = nil - var outptr_QObject *C.QObject = nil - C.QAccessiblePlugin_new2(parent.cPointer(), &outptr_QAccessiblePlugin, &outptr_QObject) - ret := newQAccessiblePlugin(outptr_QAccessiblePlugin, outptr_QObject) + ret := newQAccessiblePlugin(C.QAccessiblePlugin_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -228,7 +220,7 @@ func miqt_exec_callback_QAccessiblePlugin_TimerEvent(self *C.QAccessiblePlugin, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAccessiblePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -254,7 +246,7 @@ func miqt_exec_callback_QAccessiblePlugin_ChildEvent(self *C.QAccessiblePlugin, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAccessiblePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qaccessibleplugin.h b/qt6/gen_qaccessibleplugin.h index 3f382fa2..ad9c0e3a 100644 --- a/qt6/gen_qaccessibleplugin.h +++ b/qt6/gen_qaccessibleplugin.h @@ -34,8 +34,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QAccessiblePlugin_new(QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject); -void QAccessiblePlugin_new2(QObject* parent, QAccessiblePlugin** outptr_QAccessiblePlugin, QObject** outptr_QObject); +QAccessiblePlugin* QAccessiblePlugin_new(); +QAccessiblePlugin* QAccessiblePlugin_new2(QObject* parent); +void QAccessiblePlugin_virtbase(QAccessiblePlugin* src, QObject** outptr_QObject); QMetaObject* QAccessiblePlugin_MetaObject(const QAccessiblePlugin* self); void* QAccessiblePlugin_Metacast(QAccessiblePlugin* self, const char* param1); struct miqt_string QAccessiblePlugin_Tr(const char* s); diff --git a/qt6/gen_qaccessiblewidget.cpp b/qt6/gen_qaccessiblewidget.cpp index 843ccaed..660a0e1a 100644 --- a/qt6/gen_qaccessiblewidget.cpp +++ b/qt6/gen_qaccessiblewidget.cpp @@ -16,29 +16,22 @@ #include "gen_qaccessiblewidget.h" #include "_cgo_export.h" -void QAccessibleWidget_new(QWidget* o, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface) { - QAccessibleWidget* ret = new QAccessibleWidget(o); - *outptr_QAccessibleWidget = ret; - *outptr_QAccessibleObject = static_cast(ret); - *outptr_QAccessibleInterface = static_cast(ret); - *outptr_QAccessibleActionInterface = static_cast(ret); +QAccessibleWidget* QAccessibleWidget_new(QWidget* o) { + return new QAccessibleWidget(o); } -void QAccessibleWidget_new2(QWidget* o, int r, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface) { - QAccessibleWidget* ret = new QAccessibleWidget(o, static_cast(r)); - *outptr_QAccessibleWidget = ret; - *outptr_QAccessibleObject = static_cast(ret); - *outptr_QAccessibleInterface = static_cast(ret); - *outptr_QAccessibleActionInterface = static_cast(ret); +QAccessibleWidget* QAccessibleWidget_new2(QWidget* o, int r) { + return new QAccessibleWidget(o, static_cast(r)); } -void QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface) { +QAccessibleWidget* QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - QAccessibleWidget* ret = new QAccessibleWidget(o, static_cast(r), name_QString); - *outptr_QAccessibleWidget = ret; - *outptr_QAccessibleObject = static_cast(ret); - *outptr_QAccessibleInterface = static_cast(ret); - *outptr_QAccessibleActionInterface = static_cast(ret); + return new QAccessibleWidget(o, static_cast(r), name_QString); +} + +void QAccessibleWidget_virtbase(QAccessibleWidget* src, QAccessibleObject** outptr_QAccessibleObject, QAccessibleActionInterface** outptr_QAccessibleActionInterface) { + *outptr_QAccessibleObject = static_cast(src); + *outptr_QAccessibleActionInterface = static_cast(src); } bool QAccessibleWidget_IsValid(const QAccessibleWidget* self) { diff --git a/qt6/gen_qaccessiblewidget.go b/qt6/gen_qaccessiblewidget.go index dd028e0e..58308bd8 100644 --- a/qt6/gen_qaccessiblewidget.go +++ b/qt6/gen_qaccessiblewidget.go @@ -34,48 +34,36 @@ func (this *QAccessibleWidget) UnsafePointer() unsafe.Pointer { } // newQAccessibleWidget constructs the type using only CGO pointers. -func newQAccessibleWidget(h *C.QAccessibleWidget, h_QAccessibleObject *C.QAccessibleObject, h_QAccessibleInterface *C.QAccessibleInterface, h_QAccessibleActionInterface *C.QAccessibleActionInterface) *QAccessibleWidget { +func newQAccessibleWidget(h *C.QAccessibleWidget) *QAccessibleWidget { if h == nil { return nil } + var outptr_QAccessibleObject *C.QAccessibleObject = nil + var outptr_QAccessibleActionInterface *C.QAccessibleActionInterface = nil + C.QAccessibleWidget_virtbase(h, &outptr_QAccessibleObject, &outptr_QAccessibleActionInterface) + return &QAccessibleWidget{h: h, - QAccessibleObject: newQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface), - QAccessibleActionInterface: newQAccessibleActionInterface(h_QAccessibleActionInterface)} + QAccessibleObject: newQAccessibleObject(outptr_QAccessibleObject), + QAccessibleActionInterface: newQAccessibleActionInterface(outptr_QAccessibleActionInterface)} } // UnsafeNewQAccessibleWidget constructs the type using only unsafe pointers. -func UnsafeNewQAccessibleWidget(h unsafe.Pointer, h_QAccessibleObject unsafe.Pointer, h_QAccessibleInterface unsafe.Pointer, h_QAccessibleActionInterface unsafe.Pointer) *QAccessibleWidget { - if h == nil { - return nil - } - - return &QAccessibleWidget{h: (*C.QAccessibleWidget)(h), - QAccessibleObject: UnsafeNewQAccessibleObject(h_QAccessibleObject, h_QAccessibleInterface), - QAccessibleActionInterface: UnsafeNewQAccessibleActionInterface(h_QAccessibleActionInterface)} +func UnsafeNewQAccessibleWidget(h unsafe.Pointer) *QAccessibleWidget { + return newQAccessibleWidget((*C.QAccessibleWidget)(h)) } // NewQAccessibleWidget constructs a new QAccessibleWidget object. func NewQAccessibleWidget(o *QWidget) *QAccessibleWidget { - var outptr_QAccessibleWidget *C.QAccessibleWidget = nil - var outptr_QAccessibleObject *C.QAccessibleObject = nil - var outptr_QAccessibleInterface *C.QAccessibleInterface = nil - var outptr_QAccessibleActionInterface *C.QAccessibleActionInterface = nil - C.QAccessibleWidget_new(o.cPointer(), &outptr_QAccessibleWidget, &outptr_QAccessibleObject, &outptr_QAccessibleInterface, &outptr_QAccessibleActionInterface) - ret := newQAccessibleWidget(outptr_QAccessibleWidget, outptr_QAccessibleObject, outptr_QAccessibleInterface, outptr_QAccessibleActionInterface) + ret := newQAccessibleWidget(C.QAccessibleWidget_new(o.cPointer())) ret.isSubclass = true return ret } // NewQAccessibleWidget2 constructs a new QAccessibleWidget object. func NewQAccessibleWidget2(o *QWidget, r QAccessible__Role) *QAccessibleWidget { - var outptr_QAccessibleWidget *C.QAccessibleWidget = nil - var outptr_QAccessibleObject *C.QAccessibleObject = nil - var outptr_QAccessibleInterface *C.QAccessibleInterface = nil - var outptr_QAccessibleActionInterface *C.QAccessibleActionInterface = nil - C.QAccessibleWidget_new2(o.cPointer(), (C.int)(r), &outptr_QAccessibleWidget, &outptr_QAccessibleObject, &outptr_QAccessibleInterface, &outptr_QAccessibleActionInterface) - ret := newQAccessibleWidget(outptr_QAccessibleWidget, outptr_QAccessibleObject, outptr_QAccessibleInterface, outptr_QAccessibleActionInterface) + ret := newQAccessibleWidget(C.QAccessibleWidget_new2(o.cPointer(), (C.int)(r))) ret.isSubclass = true return ret } @@ -86,13 +74,8 @@ func NewQAccessibleWidget3(o *QWidget, r QAccessible__Role, name string) *QAcces name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QAccessibleWidget *C.QAccessibleWidget = nil - var outptr_QAccessibleObject *C.QAccessibleObject = nil - var outptr_QAccessibleInterface *C.QAccessibleInterface = nil - var outptr_QAccessibleActionInterface *C.QAccessibleActionInterface = nil - C.QAccessibleWidget_new3(o.cPointer(), (C.int)(r), name_ms, &outptr_QAccessibleWidget, &outptr_QAccessibleObject, &outptr_QAccessibleInterface, &outptr_QAccessibleActionInterface) - ret := newQAccessibleWidget(outptr_QAccessibleWidget, outptr_QAccessibleObject, outptr_QAccessibleInterface, outptr_QAccessibleActionInterface) + ret := newQAccessibleWidget(C.QAccessibleWidget_new3(o.cPointer(), (C.int)(r), name_ms)) ret.isSubclass = true return ret } @@ -102,7 +85,7 @@ func (this *QAccessibleWidget) IsValid() bool { } func (this *QAccessibleWidget) Window() *QWindow { - return newQWindow(C.QAccessibleWidget_Window(this.h), nil, nil) + return newQWindow(C.QAccessibleWidget_Window(this.h)) } func (this *QAccessibleWidget) ChildCount() int { diff --git a/qt6/gen_qaccessiblewidget.h b/qt6/gen_qaccessiblewidget.h index dc112a25..9ab58748 100644 --- a/qt6/gen_qaccessiblewidget.h +++ b/qt6/gen_qaccessiblewidget.h @@ -40,9 +40,10 @@ typedef struct QWidget QWidget; typedef struct QWindow QWindow; #endif -void QAccessibleWidget_new(QWidget* o, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface); -void QAccessibleWidget_new2(QWidget* o, int r, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface); -void QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name, QAccessibleWidget** outptr_QAccessibleWidget, QAccessibleObject** outptr_QAccessibleObject, QAccessibleInterface** outptr_QAccessibleInterface, QAccessibleActionInterface** outptr_QAccessibleActionInterface); +QAccessibleWidget* QAccessibleWidget_new(QWidget* o); +QAccessibleWidget* QAccessibleWidget_new2(QWidget* o, int r); +QAccessibleWidget* QAccessibleWidget_new3(QWidget* o, int r, struct miqt_string name); +void QAccessibleWidget_virtbase(QAccessibleWidget* src, QAccessibleObject** outptr_QAccessibleObject, QAccessibleActionInterface** outptr_QAccessibleActionInterface); bool QAccessibleWidget_IsValid(const QAccessibleWidget* self); QWindow* QAccessibleWidget_Window(const QAccessibleWidget* self); int QAccessibleWidget_ChildCount(const QAccessibleWidget* self); diff --git a/qt6/gen_qaction.cpp b/qt6/gen_qaction.cpp index 42b4bdf9..0f2995ea 100644 --- a/qt6/gen_qaction.cpp +++ b/qt6/gen_qaction.cpp @@ -203,44 +203,36 @@ public: }; -void QAction_new(QAction** outptr_QAction, QObject** outptr_QObject) { - MiqtVirtualQAction* ret = new MiqtVirtualQAction(); - *outptr_QAction = ret; - *outptr_QObject = static_cast(ret); +QAction* QAction_new() { + return new MiqtVirtualQAction(); } -void QAction_new2(struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject) { +QAction* QAction_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQAction* ret = new MiqtVirtualQAction(text_QString); - *outptr_QAction = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQAction(text_QString); } -void QAction_new3(QIcon* icon, struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject) { +QAction* QAction_new3(QIcon* icon, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQAction* ret = new MiqtVirtualQAction(*icon, text_QString); - *outptr_QAction = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQAction(*icon, text_QString); } -void QAction_new4(QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject) { - MiqtVirtualQAction* ret = new MiqtVirtualQAction(parent); - *outptr_QAction = ret; - *outptr_QObject = static_cast(ret); +QAction* QAction_new4(QObject* parent) { + return new MiqtVirtualQAction(parent); } -void QAction_new5(struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject) { +QAction* QAction_new5(struct miqt_string text, QObject* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQAction* ret = new MiqtVirtualQAction(text_QString, parent); - *outptr_QAction = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQAction(text_QString, parent); } -void QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject) { +QAction* QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQAction* ret = new MiqtVirtualQAction(*icon, text_QString, parent); - *outptr_QAction = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQAction(*icon, text_QString, parent); +} + +void QAction_virtbase(QAction* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAction_MetaObject(const QAction* self) { diff --git a/qt6/gen_qaction.go b/qt6/gen_qaction.go index 78fc6249..750d424d 100644 --- a/qt6/gen_qaction.go +++ b/qt6/gen_qaction.go @@ -62,31 +62,26 @@ func (this *QAction) UnsafePointer() unsafe.Pointer { } // newQAction constructs the type using only CGO pointers. -func newQAction(h *C.QAction, h_QObject *C.QObject) *QAction { +func newQAction(h *C.QAction) *QAction { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAction_virtbase(h, &outptr_QObject) + return &QAction{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQAction constructs the type using only unsafe pointers. -func UnsafeNewQAction(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAction { - if h == nil { - return nil - } - - return &QAction{h: (*C.QAction)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQAction(h unsafe.Pointer) *QAction { + return newQAction((*C.QAction)(h)) } // NewQAction constructs a new QAction object. func NewQAction() *QAction { - var outptr_QAction *C.QAction = nil - var outptr_QObject *C.QObject = nil - C.QAction_new(&outptr_QAction, &outptr_QObject) - ret := newQAction(outptr_QAction, outptr_QObject) + ret := newQAction(C.QAction_new()) ret.isSubclass = true return ret } @@ -97,11 +92,8 @@ func NewQAction2(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAction *C.QAction = nil - var outptr_QObject *C.QObject = nil - C.QAction_new2(text_ms, &outptr_QAction, &outptr_QObject) - ret := newQAction(outptr_QAction, outptr_QObject) + ret := newQAction(C.QAction_new2(text_ms)) ret.isSubclass = true return ret } @@ -112,22 +104,16 @@ func NewQAction3(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAction *C.QAction = nil - var outptr_QObject *C.QObject = nil - C.QAction_new3(icon.cPointer(), text_ms, &outptr_QAction, &outptr_QObject) - ret := newQAction(outptr_QAction, outptr_QObject) + ret := newQAction(C.QAction_new3(icon.cPointer(), text_ms)) ret.isSubclass = true return ret } // NewQAction4 constructs a new QAction object. func NewQAction4(parent *QObject) *QAction { - var outptr_QAction *C.QAction = nil - var outptr_QObject *C.QObject = nil - C.QAction_new4(parent.cPointer(), &outptr_QAction, &outptr_QObject) - ret := newQAction(outptr_QAction, outptr_QObject) + ret := newQAction(C.QAction_new4(parent.cPointer())) ret.isSubclass = true return ret } @@ -138,11 +124,8 @@ func NewQAction5(text string, parent *QObject) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAction *C.QAction = nil - var outptr_QObject *C.QObject = nil - C.QAction_new5(text_ms, parent.cPointer(), &outptr_QAction, &outptr_QObject) - ret := newQAction(outptr_QAction, outptr_QObject) + ret := newQAction(C.QAction_new5(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -153,11 +136,8 @@ func NewQAction6(icon *QIcon, text string, parent *QObject) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QAction *C.QAction = nil - var outptr_QObject *C.QObject = nil - C.QAction_new6(icon.cPointer(), text_ms, parent.cPointer(), &outptr_QAction, &outptr_QObject) - ret := newQAction(outptr_QAction, outptr_QObject) + ret := newQAction(C.QAction_new6(icon.cPointer(), text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -196,7 +176,7 @@ func (this *QAction) SetActionGroup(group *QActionGroup) { } func (this *QAction) ActionGroup() *QActionGroup { - return newQActionGroup(C.QAction_ActionGroup(this.h), nil) + return newQActionGroup(C.QAction_ActionGroup(this.h)) } func (this *QAction) SetIcon(icon *QIcon) { @@ -708,7 +688,7 @@ func miqt_exec_callback_QAction_TimerEvent(self *C.QAction, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QAction{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -734,7 +714,7 @@ func miqt_exec_callback_QAction_ChildEvent(self *C.QAction, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QAction{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qaction.h b/qt6/gen_qaction.h index 19bec3d2..842fd951 100644 --- a/qt6/gen_qaction.h +++ b/qt6/gen_qaction.h @@ -42,12 +42,13 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -void QAction_new(QAction** outptr_QAction, QObject** outptr_QObject); -void QAction_new2(struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject); -void QAction_new3(QIcon* icon, struct miqt_string text, QAction** outptr_QAction, QObject** outptr_QObject); -void QAction_new4(QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject); -void QAction_new5(struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject); -void QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent, QAction** outptr_QAction, QObject** outptr_QObject); +QAction* QAction_new(); +QAction* QAction_new2(struct miqt_string text); +QAction* QAction_new3(QIcon* icon, struct miqt_string text); +QAction* QAction_new4(QObject* parent); +QAction* QAction_new5(struct miqt_string text, QObject* parent); +QAction* QAction_new6(QIcon* icon, struct miqt_string text, QObject* parent); +void QAction_virtbase(QAction* src, QObject** outptr_QObject); QMetaObject* QAction_MetaObject(const QAction* self); void* QAction_Metacast(QAction* self, const char* param1); struct miqt_string QAction_Tr(const char* s); diff --git a/qt6/gen_qactiongroup.cpp b/qt6/gen_qactiongroup.cpp index 8428e76d..c5b89469 100644 --- a/qt6/gen_qactiongroup.cpp +++ b/qt6/gen_qactiongroup.cpp @@ -195,10 +195,12 @@ public: }; -void QActionGroup_new(QObject* parent, QActionGroup** outptr_QActionGroup, QObject** outptr_QObject) { - MiqtVirtualQActionGroup* ret = new MiqtVirtualQActionGroup(parent); - *outptr_QActionGroup = ret; - *outptr_QObject = static_cast(ret); +QActionGroup* QActionGroup_new(QObject* parent) { + return new MiqtVirtualQActionGroup(parent); +} + +void QActionGroup_virtbase(QActionGroup* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QActionGroup_MetaObject(const QActionGroup* self) { diff --git a/qt6/gen_qactiongroup.go b/qt6/gen_qactiongroup.go index d080fc8c..d73dbcb8 100644 --- a/qt6/gen_qactiongroup.go +++ b/qt6/gen_qactiongroup.go @@ -43,31 +43,26 @@ func (this *QActionGroup) UnsafePointer() unsafe.Pointer { } // newQActionGroup constructs the type using only CGO pointers. -func newQActionGroup(h *C.QActionGroup, h_QObject *C.QObject) *QActionGroup { +func newQActionGroup(h *C.QActionGroup) *QActionGroup { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QActionGroup_virtbase(h, &outptr_QObject) + return &QActionGroup{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQActionGroup constructs the type using only unsafe pointers. -func UnsafeNewQActionGroup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QActionGroup { - if h == nil { - return nil - } - - return &QActionGroup{h: (*C.QActionGroup)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQActionGroup(h unsafe.Pointer) *QActionGroup { + return newQActionGroup((*C.QActionGroup)(h)) } // NewQActionGroup constructs a new QActionGroup object. func NewQActionGroup(parent *QObject) *QActionGroup { - var outptr_QActionGroup *C.QActionGroup = nil - var outptr_QObject *C.QObject = nil - C.QActionGroup_new(parent.cPointer(), &outptr_QActionGroup, &outptr_QObject) - ret := newQActionGroup(outptr_QActionGroup, outptr_QObject) + ret := newQActionGroup(C.QActionGroup_new(parent.cPointer())) ret.isSubclass = true return ret } @@ -92,7 +87,7 @@ func QActionGroup_Tr(s string) string { } func (this *QActionGroup) AddAction(a *QAction) *QAction { - return newQAction(C.QActionGroup_AddAction(this.h, a.cPointer()), nil) + return newQAction(C.QActionGroup_AddAction(this.h, a.cPointer())) } func (this *QActionGroup) AddActionWithText(text string) *QAction { @@ -100,7 +95,7 @@ func (this *QActionGroup) AddActionWithText(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QActionGroup_AddActionWithText(this.h, text_ms), nil) + return newQAction(C.QActionGroup_AddActionWithText(this.h, text_ms)) } func (this *QActionGroup) AddAction2(icon *QIcon, text string) *QAction { @@ -108,7 +103,7 @@ func (this *QActionGroup) AddAction2(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QActionGroup_AddAction2(this.h, icon.cPointer(), text_ms), nil) + return newQAction(C.QActionGroup_AddAction2(this.h, icon.cPointer(), text_ms)) } func (this *QActionGroup) RemoveAction(a *QAction) { @@ -120,13 +115,13 @@ func (this *QActionGroup) Actions() []*QAction { _ret := make([]*QAction, int(_ma.len)) _outCast := (*[0xffff]*C.QAction)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAction(_outCast[i], nil) + _ret[i] = newQAction(_outCast[i]) } return _ret } func (this *QActionGroup) CheckedAction() *QAction { - return newQAction(C.QActionGroup_CheckedAction(this.h), nil) + return newQAction(C.QActionGroup_CheckedAction(this.h)) } func (this *QActionGroup) IsExclusive() bool { @@ -180,7 +175,7 @@ func miqt_exec_callback_QActionGroup_Triggered(cb C.intptr_t, param1 *C.QAction) } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(param1, nil) + slotval1 := newQAction(param1) gofunc(slotval1) } @@ -200,7 +195,7 @@ func miqt_exec_callback_QActionGroup_Hovered(cb C.intptr_t, param1 *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(param1, nil) + slotval1 := newQAction(param1) gofunc(slotval1) } @@ -305,7 +300,7 @@ func miqt_exec_callback_QActionGroup_TimerEvent(self *C.QActionGroup, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QActionGroup{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -331,7 +326,7 @@ func miqt_exec_callback_QActionGroup_ChildEvent(self *C.QActionGroup, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QActionGroup{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qactiongroup.h b/qt6/gen_qactiongroup.h index c205f8ee..3f2f6534 100644 --- a/qt6/gen_qactiongroup.h +++ b/qt6/gen_qactiongroup.h @@ -36,7 +36,8 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QActionGroup_new(QObject* parent, QActionGroup** outptr_QActionGroup, QObject** outptr_QObject); +QActionGroup* QActionGroup_new(QObject* parent); +void QActionGroup_virtbase(QActionGroup* src, QObject** outptr_QObject); QMetaObject* QActionGroup_MetaObject(const QActionGroup* self); void* QActionGroup_Metacast(QActionGroup* self, const char* param1); struct miqt_string QActionGroup_Tr(const char* s); diff --git a/qt6/gen_qanimationgroup.cpp b/qt6/gen_qanimationgroup.cpp index e7b1515c..a8298dbc 100644 --- a/qt6/gen_qanimationgroup.cpp +++ b/qt6/gen_qanimationgroup.cpp @@ -126,18 +126,16 @@ public: }; -void QAnimationGroup_new(QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQAnimationGroup* ret = new MiqtVirtualQAnimationGroup(); - *outptr_QAnimationGroup = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAnimationGroup* QAnimationGroup_new() { + return new MiqtVirtualQAnimationGroup(); } -void QAnimationGroup_new2(QObject* parent, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQAnimationGroup* ret = new MiqtVirtualQAnimationGroup(parent); - *outptr_QAnimationGroup = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QAnimationGroup* QAnimationGroup_new2(QObject* parent) { + return new MiqtVirtualQAnimationGroup(parent); +} + +void QAnimationGroup_virtbase(QAnimationGroup* src, QAbstractAnimation** outptr_QAbstractAnimation) { + *outptr_QAbstractAnimation = static_cast(src); } QMetaObject* QAnimationGroup_MetaObject(const QAnimationGroup* self) { diff --git a/qt6/gen_qanimationgroup.go b/qt6/gen_qanimationgroup.go index ea6f4e94..712f4eb6 100644 --- a/qt6/gen_qanimationgroup.go +++ b/qt6/gen_qanimationgroup.go @@ -35,44 +35,34 @@ func (this *QAnimationGroup) UnsafePointer() unsafe.Pointer { } // newQAnimationGroup constructs the type using only CGO pointers. -func newQAnimationGroup(h *C.QAnimationGroup, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QAnimationGroup { +func newQAnimationGroup(h *C.QAnimationGroup) *QAnimationGroup { if h == nil { return nil } + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + C.QAnimationGroup_virtbase(h, &outptr_QAbstractAnimation) + return &QAnimationGroup{h: h, - QAbstractAnimation: newQAbstractAnimation(h_QAbstractAnimation, h_QObject)} + QAbstractAnimation: newQAbstractAnimation(outptr_QAbstractAnimation)} } // UnsafeNewQAnimationGroup constructs the type using only unsafe pointers. -func UnsafeNewQAnimationGroup(h unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QAnimationGroup { - if h == nil { - return nil - } - - return &QAnimationGroup{h: (*C.QAnimationGroup)(h), - QAbstractAnimation: UnsafeNewQAbstractAnimation(h_QAbstractAnimation, h_QObject)} +func UnsafeNewQAnimationGroup(h unsafe.Pointer) *QAnimationGroup { + return newQAnimationGroup((*C.QAnimationGroup)(h)) } // NewQAnimationGroup constructs a new QAnimationGroup object. func NewQAnimationGroup() *QAnimationGroup { - var outptr_QAnimationGroup *C.QAnimationGroup = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QAnimationGroup_new(&outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQAnimationGroup(outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret := newQAnimationGroup(C.QAnimationGroup_new()) ret.isSubclass = true return ret } // NewQAnimationGroup2 constructs a new QAnimationGroup object. func NewQAnimationGroup2(parent *QObject) *QAnimationGroup { - var outptr_QAnimationGroup *C.QAnimationGroup = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QAnimationGroup_new2(parent.cPointer(), &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQAnimationGroup(outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret := newQAnimationGroup(C.QAnimationGroup_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -97,7 +87,7 @@ func QAnimationGroup_Tr(s string) string { } func (this *QAnimationGroup) AnimationAt(index int) *QAbstractAnimation { - return newQAbstractAnimation(C.QAnimationGroup_AnimationAt(this.h, (C.int)(index)), nil) + return newQAbstractAnimation(C.QAnimationGroup_AnimationAt(this.h, (C.int)(index))) } func (this *QAnimationGroup) AnimationCount() int { @@ -121,7 +111,7 @@ func (this *QAnimationGroup) RemoveAnimation(animation *QAbstractAnimation) { } func (this *QAnimationGroup) TakeAnimation(index int) *QAbstractAnimation { - return newQAbstractAnimation(C.QAnimationGroup_TakeAnimation(this.h, (C.int)(index)), nil) + return newQAbstractAnimation(C.QAnimationGroup_TakeAnimation(this.h, (C.int)(index))) } func (this *QAnimationGroup) Clear() { diff --git a/qt6/gen_qanimationgroup.h b/qt6/gen_qanimationgroup.h index 37ddef07..3ec6c43b 100644 --- a/qt6/gen_qanimationgroup.h +++ b/qt6/gen_qanimationgroup.h @@ -28,8 +28,9 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -void QAnimationGroup_new(QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QAnimationGroup_new2(QObject* parent, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +QAnimationGroup* QAnimationGroup_new(); +QAnimationGroup* QAnimationGroup_new2(QObject* parent); +void QAnimationGroup_virtbase(QAnimationGroup* src, QAbstractAnimation** outptr_QAbstractAnimation); QMetaObject* QAnimationGroup_MetaObject(const QAnimationGroup* self); void* QAnimationGroup_Metacast(QAnimationGroup* self, const char* param1); struct miqt_string QAnimationGroup_Tr(const char* s); diff --git a/qt6/gen_qanystringview.cpp b/qt6/gen_qanystringview.cpp index 26227ecf..33e5a21f 100644 --- a/qt6/gen_qanystringview.cpp +++ b/qt6/gen_qanystringview.cpp @@ -8,31 +8,26 @@ #include "gen_qanystringview.h" #include "_cgo_export.h" -void QAnyStringView_new(QAnyStringView** outptr_QAnyStringView) { - QAnyStringView* ret = new QAnyStringView(); - *outptr_QAnyStringView = ret; +QAnyStringView* QAnyStringView_new() { + return new QAnyStringView(); } -void QAnyStringView_new2(struct miqt_string str, QAnyStringView** outptr_QAnyStringView) { +QAnyStringView* QAnyStringView_new2(struct miqt_string str) { QByteArray str_QByteArray(str.data, str.len); - QAnyStringView* ret = new QAnyStringView(str_QByteArray); - *outptr_QAnyStringView = ret; + return new QAnyStringView(str_QByteArray); } -void QAnyStringView_new3(struct miqt_string str, QAnyStringView** outptr_QAnyStringView) { +QAnyStringView* QAnyStringView_new3(struct miqt_string str) { QString str_QString = QString::fromUtf8(str.data, str.len); - QAnyStringView* ret = new QAnyStringView(str_QString); - *outptr_QAnyStringView = ret; + return new QAnyStringView(str_QString); } -void QAnyStringView_new4(QChar* c, QAnyStringView** outptr_QAnyStringView) { - QAnyStringView* ret = new QAnyStringView(*c); - *outptr_QAnyStringView = ret; +QAnyStringView* QAnyStringView_new4(QChar* c) { + return new QAnyStringView(*c); } -void QAnyStringView_new5(QAnyStringView* param1, QAnyStringView** outptr_QAnyStringView) { - QAnyStringView* ret = new QAnyStringView(*param1); - *outptr_QAnyStringView = ret; +QAnyStringView* QAnyStringView_new5(QAnyStringView* param1) { + return new QAnyStringView(*param1); } struct miqt_string QAnyStringView_ToString(const QAnyStringView* self) { diff --git a/qt6/gen_qanystringview.go b/qt6/gen_qanystringview.go index 2c9099a4..9501c873 100644 --- a/qt6/gen_qanystringview.go +++ b/qt6/gen_qanystringview.go @@ -37,24 +37,19 @@ func newQAnyStringView(h *C.QAnyStringView) *QAnyStringView { if h == nil { return nil } + return &QAnyStringView{h: h} } // UnsafeNewQAnyStringView constructs the type using only unsafe pointers. func UnsafeNewQAnyStringView(h unsafe.Pointer) *QAnyStringView { - if h == nil { - return nil - } - - return &QAnyStringView{h: (*C.QAnyStringView)(h)} + return newQAnyStringView((*C.QAnyStringView)(h)) } // NewQAnyStringView constructs a new QAnyStringView object. func NewQAnyStringView() *QAnyStringView { - var outptr_QAnyStringView *C.QAnyStringView = nil - C.QAnyStringView_new(&outptr_QAnyStringView) - ret := newQAnyStringView(outptr_QAnyStringView) + ret := newQAnyStringView(C.QAnyStringView_new()) ret.isSubclass = true return ret } @@ -64,10 +59,8 @@ func NewQAnyStringView2(str []byte) *QAnyStringView { str_alias := C.struct_miqt_string{} str_alias.data = (*C.char)(unsafe.Pointer(&str[0])) str_alias.len = C.size_t(len(str)) - var outptr_QAnyStringView *C.QAnyStringView = nil - C.QAnyStringView_new2(str_alias, &outptr_QAnyStringView) - ret := newQAnyStringView(outptr_QAnyStringView) + ret := newQAnyStringView(C.QAnyStringView_new2(str_alias)) ret.isSubclass = true return ret } @@ -78,30 +71,24 @@ func NewQAnyStringView3(str string) *QAnyStringView { str_ms.data = C.CString(str) str_ms.len = C.size_t(len(str)) defer C.free(unsafe.Pointer(str_ms.data)) - var outptr_QAnyStringView *C.QAnyStringView = nil - C.QAnyStringView_new3(str_ms, &outptr_QAnyStringView) - ret := newQAnyStringView(outptr_QAnyStringView) + ret := newQAnyStringView(C.QAnyStringView_new3(str_ms)) ret.isSubclass = true return ret } // NewQAnyStringView4 constructs a new QAnyStringView object. func NewQAnyStringView4(c *QChar) *QAnyStringView { - var outptr_QAnyStringView *C.QAnyStringView = nil - C.QAnyStringView_new4(c.cPointer(), &outptr_QAnyStringView) - ret := newQAnyStringView(outptr_QAnyStringView) + ret := newQAnyStringView(C.QAnyStringView_new4(c.cPointer())) ret.isSubclass = true return ret } // NewQAnyStringView5 constructs a new QAnyStringView object. func NewQAnyStringView5(param1 *QAnyStringView) *QAnyStringView { - var outptr_QAnyStringView *C.QAnyStringView = nil - C.QAnyStringView_new5(param1.cPointer(), &outptr_QAnyStringView) - ret := newQAnyStringView(outptr_QAnyStringView) + ret := newQAnyStringView(C.QAnyStringView_new5(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qanystringview.h b/qt6/gen_qanystringview.h index 9c45948d..25b18629 100644 --- a/qt6/gen_qanystringview.h +++ b/qt6/gen_qanystringview.h @@ -22,11 +22,11 @@ typedef struct QAnyStringView QAnyStringView; typedef struct QChar QChar; #endif -void QAnyStringView_new(QAnyStringView** outptr_QAnyStringView); -void QAnyStringView_new2(struct miqt_string str, QAnyStringView** outptr_QAnyStringView); -void QAnyStringView_new3(struct miqt_string str, QAnyStringView** outptr_QAnyStringView); -void QAnyStringView_new4(QChar* c, QAnyStringView** outptr_QAnyStringView); -void QAnyStringView_new5(QAnyStringView* param1, QAnyStringView** outptr_QAnyStringView); +QAnyStringView* QAnyStringView_new(); +QAnyStringView* QAnyStringView_new2(struct miqt_string str); +QAnyStringView* QAnyStringView_new3(struct miqt_string str); +QAnyStringView* QAnyStringView_new4(QChar* c); +QAnyStringView* QAnyStringView_new5(QAnyStringView* param1); struct miqt_string QAnyStringView_ToString(const QAnyStringView* self); ptrdiff_t QAnyStringView_Size(const QAnyStringView* self); const void* QAnyStringView_Data(const QAnyStringView* self); diff --git a/qt6/gen_qapplication.cpp b/qt6/gen_qapplication.cpp index 409e2be4..87e90d68 100644 --- a/qt6/gen_qapplication.cpp +++ b/qt6/gen_qapplication.cpp @@ -75,20 +75,16 @@ public: }; -void QApplication_new(int* argc, char** argv, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { - MiqtVirtualQApplication* ret = new MiqtVirtualQApplication(static_cast(*argc), argv); - *outptr_QApplication = ret; - *outptr_QGuiApplication = static_cast(ret); - *outptr_QCoreApplication = static_cast(ret); - *outptr_QObject = static_cast(ret); +QApplication* QApplication_new(int* argc, char** argv) { + return new MiqtVirtualQApplication(static_cast(*argc), argv); } -void QApplication_new2(int* argc, char** argv, int param3, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { - MiqtVirtualQApplication* ret = new MiqtVirtualQApplication(static_cast(*argc), argv, static_cast(param3)); - *outptr_QApplication = ret; - *outptr_QGuiApplication = static_cast(ret); - *outptr_QCoreApplication = static_cast(ret); - *outptr_QObject = static_cast(ret); +QApplication* QApplication_new2(int* argc, char** argv, int param3) { + return new MiqtVirtualQApplication(static_cast(*argc), argv, static_cast(param3)); +} + +void QApplication_virtbase(QApplication* src, QGuiApplication** outptr_QGuiApplication) { + *outptr_QGuiApplication = static_cast(src); } QMetaObject* QApplication_MetaObject(const QApplication* self) { diff --git a/qt6/gen_qapplication.go b/qt6/gen_qapplication.go index 68468ab0..62b0b1c1 100644 --- a/qt6/gen_qapplication.go +++ b/qt6/gen_qapplication.go @@ -35,22 +35,20 @@ func (this *QApplication) UnsafePointer() unsafe.Pointer { } // newQApplication constructs the type using only CGO pointers. -func newQApplication(h *C.QApplication, h_QGuiApplication *C.QGuiApplication, h_QCoreApplication *C.QCoreApplication, h_QObject *C.QObject) *QApplication { +func newQApplication(h *C.QApplication) *QApplication { if h == nil { return nil } + var outptr_QGuiApplication *C.QGuiApplication = nil + C.QApplication_virtbase(h, &outptr_QGuiApplication) + return &QApplication{h: h, - QGuiApplication: newQGuiApplication(h_QGuiApplication, h_QCoreApplication, h_QObject)} + QGuiApplication: newQGuiApplication(outptr_QGuiApplication)} } // UnsafeNewQApplication constructs the type using only unsafe pointers. -func UnsafeNewQApplication(h unsafe.Pointer, h_QGuiApplication unsafe.Pointer, h_QCoreApplication unsafe.Pointer, h_QObject unsafe.Pointer) *QApplication { - if h == nil { - return nil - } - - return &QApplication{h: (*C.QApplication)(h), - QGuiApplication: UnsafeNewQGuiApplication(h_QGuiApplication, h_QCoreApplication, h_QObject)} +func UnsafeNewQApplication(h unsafe.Pointer) *QApplication { + return newQApplication((*C.QApplication)(h)) } // NewQApplication constructs a new QApplication object. @@ -65,13 +63,7 @@ func NewQApplication(args []string) *QApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - var outptr_QApplication *C.QApplication = nil - var outptr_QGuiApplication *C.QGuiApplication = nil - var outptr_QCoreApplication *C.QCoreApplication = nil - var outptr_QObject *C.QObject = nil - - C.QApplication_new(argc, &argv[0], &outptr_QApplication, &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) - ret := newQApplication(outptr_QApplication, outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret := newQApplication(C.QApplication_new(argc, &argv[0])) ret.isSubclass = true return ret } @@ -88,13 +80,7 @@ func NewQApplication2(args []string, param3 int) *QApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - var outptr_QApplication *C.QApplication = nil - var outptr_QGuiApplication *C.QGuiApplication = nil - var outptr_QCoreApplication *C.QCoreApplication = nil - var outptr_QObject *C.QObject = nil - - C.QApplication_new2(argc, &argv[0], (C.int)(param3), &outptr_QApplication, &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) - ret := newQApplication(outptr_QApplication, outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret := newQApplication(C.QApplication_new2(argc, &argv[0], (C.int)(param3))) ret.isSubclass = true return ret } @@ -119,7 +105,7 @@ func QApplication_Tr(s string) string { } func QApplication_Style() *QStyle { - return newQStyle(C.QApplication_Style(), nil) + return newQStyle(C.QApplication_Style()) } func QApplication_SetStyle(style *QStyle) { @@ -131,7 +117,7 @@ func QApplication_SetStyleWithStyle(style string) *QStyle { style_ms.data = C.CString(style) style_ms.len = C.size_t(len(style)) defer C.free(unsafe.Pointer(style_ms.data)) - return newQStyle(C.QApplication_SetStyleWithStyle(style_ms), nil) + return newQStyle(C.QApplication_SetStyleWithStyle(style_ms)) } func QApplication_Palette(param1 *QWidget) *QPalette { @@ -187,7 +173,7 @@ func QApplication_AllWidgets() []*QWidget { _ret := make([]*QWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQWidget(_outCast[i], nil, nil) + _ret[i] = newQWidget(_outCast[i]) } return _ret } @@ -197,25 +183,25 @@ func QApplication_TopLevelWidgets() []*QWidget { _ret := make([]*QWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQWidget(_outCast[i], nil, nil) + _ret[i] = newQWidget(_outCast[i]) } return _ret } func QApplication_ActivePopupWidget() *QWidget { - return newQWidget(C.QApplication_ActivePopupWidget(), nil, nil) + return newQWidget(C.QApplication_ActivePopupWidget()) } func QApplication_ActiveModalWidget() *QWidget { - return newQWidget(C.QApplication_ActiveModalWidget(), nil, nil) + return newQWidget(C.QApplication_ActiveModalWidget()) } func QApplication_FocusWidget() *QWidget { - return newQWidget(C.QApplication_FocusWidget(), nil, nil) + return newQWidget(C.QApplication_FocusWidget()) } func QApplication_ActiveWindow() *QWidget { - return newQWidget(C.QApplication_ActiveWindow(), nil, nil) + return newQWidget(C.QApplication_ActiveWindow()) } func QApplication_SetActiveWindow(act *QWidget) { @@ -223,19 +209,19 @@ func QApplication_SetActiveWindow(act *QWidget) { } func QApplication_WidgetAt(p *QPoint) *QWidget { - return newQWidget(C.QApplication_WidgetAt(p.cPointer()), nil, nil) + return newQWidget(C.QApplication_WidgetAt(p.cPointer())) } func QApplication_WidgetAt2(x int, y int) *QWidget { - return newQWidget(C.QApplication_WidgetAt2((C.int)(x), (C.int)(y)), nil, nil) + return newQWidget(C.QApplication_WidgetAt2((C.int)(x), (C.int)(y))) } func QApplication_TopLevelAt(p *QPoint) *QWidget { - return newQWidget(C.QApplication_TopLevelAt(p.cPointer()), nil, nil) + return newQWidget(C.QApplication_TopLevelAt(p.cPointer())) } func QApplication_TopLevelAt2(x int, y int) *QWidget { - return newQWidget(C.QApplication_TopLevelAt2((C.int)(x), (C.int)(y)), nil, nil) + return newQWidget(C.QApplication_TopLevelAt2((C.int)(x), (C.int)(y))) } func QApplication_Beep() { @@ -325,9 +311,9 @@ func miqt_exec_callback_QApplication_FocusChanged(cb C.intptr_t, old *C.QWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(old, nil, nil) + slotval1 := newQWidget(old) - slotval2 := newQWidget(now, nil, nil) + slotval2 := newQWidget(now) gofunc(slotval1, slotval2) } diff --git a/qt6/gen_qapplication.h b/qt6/gen_qapplication.h index c5620dad..bec68a7b 100644 --- a/qt6/gen_qapplication.h +++ b/qt6/gen_qapplication.h @@ -42,8 +42,9 @@ typedef struct QStyle QStyle; typedef struct QWidget QWidget; #endif -void QApplication_new(int* argc, char** argv, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); -void QApplication_new2(int* argc, char** argv, int param3, QApplication** outptr_QApplication, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); +QApplication* QApplication_new(int* argc, char** argv); +QApplication* QApplication_new2(int* argc, char** argv, int param3); +void QApplication_virtbase(QApplication* src, QGuiApplication** outptr_QGuiApplication); QMetaObject* QApplication_MetaObject(const QApplication* self); void* QApplication_Metacast(QApplication* self, const char* param1); struct miqt_string QApplication_Tr(const char* s); diff --git a/qt6/gen_qarraydata.go b/qt6/gen_qarraydata.go index e926e697..c603cce5 100644 --- a/qt6/gen_qarraydata.go +++ b/qt6/gen_qarraydata.go @@ -67,16 +67,13 @@ func newQArrayData(h *C.QArrayData) *QArrayData { if h == nil { return nil } + return &QArrayData{h: h} } // UnsafeNewQArrayData constructs the type using only unsafe pointers. func UnsafeNewQArrayData(h unsafe.Pointer) *QArrayData { - if h == nil { - return nil - } - - return &QArrayData{h: (*C.QArrayData)(h)} + return newQArrayData((*C.QArrayData)(h)) } func (this *QArrayData) AllocatedCapacity() int64 { diff --git a/qt6/gen_qbackingstore.cpp b/qt6/gen_qbackingstore.cpp index 6383eba6..1809c154 100644 --- a/qt6/gen_qbackingstore.cpp +++ b/qt6/gen_qbackingstore.cpp @@ -8,9 +8,8 @@ #include "gen_qbackingstore.h" #include "_cgo_export.h" -void QBackingStore_new(QWindow* window, QBackingStore** outptr_QBackingStore) { - QBackingStore* ret = new QBackingStore(window); - *outptr_QBackingStore = ret; +QBackingStore* QBackingStore_new(QWindow* window) { + return new QBackingStore(window); } QWindow* QBackingStore_Window(const QBackingStore* self) { diff --git a/qt6/gen_qbackingstore.go b/qt6/gen_qbackingstore.go index f369435d..5ed0198a 100644 --- a/qt6/gen_qbackingstore.go +++ b/qt6/gen_qbackingstore.go @@ -37,30 +37,25 @@ func newQBackingStore(h *C.QBackingStore) *QBackingStore { if h == nil { return nil } + return &QBackingStore{h: h} } // UnsafeNewQBackingStore constructs the type using only unsafe pointers. func UnsafeNewQBackingStore(h unsafe.Pointer) *QBackingStore { - if h == nil { - return nil - } - - return &QBackingStore{h: (*C.QBackingStore)(h)} + return newQBackingStore((*C.QBackingStore)(h)) } // NewQBackingStore constructs a new QBackingStore object. func NewQBackingStore(window *QWindow) *QBackingStore { - var outptr_QBackingStore *C.QBackingStore = nil - C.QBackingStore_new(window.cPointer(), &outptr_QBackingStore) - ret := newQBackingStore(outptr_QBackingStore) + ret := newQBackingStore(C.QBackingStore_new(window.cPointer())) ret.isSubclass = true return ret } func (this *QBackingStore) Window() *QWindow { - return newQWindow(C.QBackingStore_Window(this.h), nil, nil) + return newQWindow(C.QBackingStore_Window(this.h)) } func (this *QBackingStore) PaintDevice() *QPaintDevice { diff --git a/qt6/gen_qbackingstore.h b/qt6/gen_qbackingstore.h index 5dfe99b0..d5c97910 100644 --- a/qt6/gen_qbackingstore.h +++ b/qt6/gen_qbackingstore.h @@ -30,7 +30,7 @@ typedef struct QSize QSize; typedef struct QWindow QWindow; #endif -void QBackingStore_new(QWindow* window, QBackingStore** outptr_QBackingStore); +QBackingStore* QBackingStore_new(QWindow* window); QWindow* QBackingStore_Window(const QBackingStore* self); QPaintDevice* QBackingStore_PaintDevice(QBackingStore* self); void QBackingStore_Flush(QBackingStore* self, QRegion* region); diff --git a/qt6/gen_qbasictimer.cpp b/qt6/gen_qbasictimer.cpp index 052a7b21..70b9866e 100644 --- a/qt6/gen_qbasictimer.cpp +++ b/qt6/gen_qbasictimer.cpp @@ -4,9 +4,8 @@ #include "gen_qbasictimer.h" #include "_cgo_export.h" -void QBasicTimer_new(QBasicTimer** outptr_QBasicTimer) { - QBasicTimer* ret = new QBasicTimer(); - *outptr_QBasicTimer = ret; +QBasicTimer* QBasicTimer_new() { + return new QBasicTimer(); } void QBasicTimer_Swap(QBasicTimer* self, QBasicTimer* other) { diff --git a/qt6/gen_qbasictimer.go b/qt6/gen_qbasictimer.go index 307f9def..43f87d44 100644 --- a/qt6/gen_qbasictimer.go +++ b/qt6/gen_qbasictimer.go @@ -37,24 +37,19 @@ func newQBasicTimer(h *C.QBasicTimer) *QBasicTimer { if h == nil { return nil } + return &QBasicTimer{h: h} } // UnsafeNewQBasicTimer constructs the type using only unsafe pointers. func UnsafeNewQBasicTimer(h unsafe.Pointer) *QBasicTimer { - if h == nil { - return nil - } - - return &QBasicTimer{h: (*C.QBasicTimer)(h)} + return newQBasicTimer((*C.QBasicTimer)(h)) } // NewQBasicTimer constructs a new QBasicTimer object. func NewQBasicTimer() *QBasicTimer { - var outptr_QBasicTimer *C.QBasicTimer = nil - C.QBasicTimer_new(&outptr_QBasicTimer) - ret := newQBasicTimer(outptr_QBasicTimer) + ret := newQBasicTimer(C.QBasicTimer_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qbasictimer.h b/qt6/gen_qbasictimer.h index 31819d27..79082fbd 100644 --- a/qt6/gen_qbasictimer.h +++ b/qt6/gen_qbasictimer.h @@ -22,7 +22,7 @@ typedef struct QBasicTimer QBasicTimer; typedef struct QObject QObject; #endif -void QBasicTimer_new(QBasicTimer** outptr_QBasicTimer); +QBasicTimer* QBasicTimer_new(); void QBasicTimer_Swap(QBasicTimer* self, QBasicTimer* other); bool QBasicTimer_IsActive(const QBasicTimer* self); int QBasicTimer_TimerId(const QBasicTimer* self); diff --git a/qt6/gen_qbindingstorage.cpp b/qt6/gen_qbindingstorage.cpp index 7c417195..6d71b571 100644 --- a/qt6/gen_qbindingstorage.cpp +++ b/qt6/gen_qbindingstorage.cpp @@ -13,9 +13,8 @@ void QBindingStatus_Delete(QBindingStatus* self, bool isSubclass) { } } -void QBindingStorage_new(QBindingStorage** outptr_QBindingStorage) { - QBindingStorage* ret = new QBindingStorage(); - *outptr_QBindingStorage = ret; +QBindingStorage* QBindingStorage_new() { + return new QBindingStorage(); } bool QBindingStorage_IsEmpty(QBindingStorage* self) { diff --git a/qt6/gen_qbindingstorage.go b/qt6/gen_qbindingstorage.go index 9d814e8a..5b4e3f2a 100644 --- a/qt6/gen_qbindingstorage.go +++ b/qt6/gen_qbindingstorage.go @@ -37,16 +37,13 @@ func newQBindingStatus(h *C.QBindingStatus) *QBindingStatus { if h == nil { return nil } + return &QBindingStatus{h: h} } // UnsafeNewQBindingStatus constructs the type using only unsafe pointers. func UnsafeNewQBindingStatus(h unsafe.Pointer) *QBindingStatus { - if h == nil { - return nil - } - - return &QBindingStatus{h: (*C.QBindingStatus)(h)} + return newQBindingStatus((*C.QBindingStatus)(h)) } // Delete this object from C++ memory. @@ -87,24 +84,19 @@ func newQBindingStorage(h *C.QBindingStorage) *QBindingStorage { if h == nil { return nil } + return &QBindingStorage{h: h} } // UnsafeNewQBindingStorage constructs the type using only unsafe pointers. func UnsafeNewQBindingStorage(h unsafe.Pointer) *QBindingStorage { - if h == nil { - return nil - } - - return &QBindingStorage{h: (*C.QBindingStorage)(h)} + return newQBindingStorage((*C.QBindingStorage)(h)) } // NewQBindingStorage constructs a new QBindingStorage object. func NewQBindingStorage() *QBindingStorage { - var outptr_QBindingStorage *C.QBindingStorage = nil - C.QBindingStorage_new(&outptr_QBindingStorage) - ret := newQBindingStorage(outptr_QBindingStorage) + ret := newQBindingStorage(C.QBindingStorage_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qbindingstorage.h b/qt6/gen_qbindingstorage.h index b3639349..aa2d068a 100644 --- a/qt6/gen_qbindingstorage.h +++ b/qt6/gen_qbindingstorage.h @@ -26,7 +26,7 @@ typedef struct QUntypedPropertyData QUntypedPropertyData; void QBindingStatus_Delete(QBindingStatus* self, bool isSubclass); -void QBindingStorage_new(QBindingStorage** outptr_QBindingStorage); +QBindingStorage* QBindingStorage_new(); bool QBindingStorage_IsEmpty(QBindingStorage* self); bool QBindingStorage_IsValid(const QBindingStorage* self); void QBindingStorage_RegisterDependency(const QBindingStorage* self, QUntypedPropertyData* data); diff --git a/qt6/gen_qbitarray.cpp b/qt6/gen_qbitarray.cpp index 10e5340f..0b82046a 100644 --- a/qt6/gen_qbitarray.cpp +++ b/qt6/gen_qbitarray.cpp @@ -4,24 +4,20 @@ #include "gen_qbitarray.h" #include "_cgo_export.h" -void QBitArray_new(QBitArray** outptr_QBitArray) { - QBitArray* ret = new QBitArray(); - *outptr_QBitArray = ret; +QBitArray* QBitArray_new() { + return new QBitArray(); } -void QBitArray_new2(ptrdiff_t size, QBitArray** outptr_QBitArray) { - QBitArray* ret = new QBitArray((qsizetype)(size)); - *outptr_QBitArray = ret; +QBitArray* QBitArray_new2(ptrdiff_t size) { + return new QBitArray((qsizetype)(size)); } -void QBitArray_new3(QBitArray* other, QBitArray** outptr_QBitArray) { - QBitArray* ret = new QBitArray(*other); - *outptr_QBitArray = ret; +QBitArray* QBitArray_new3(QBitArray* other) { + return new QBitArray(*other); } -void QBitArray_new4(ptrdiff_t size, bool val, QBitArray** outptr_QBitArray) { - QBitArray* ret = new QBitArray((qsizetype)(size), val); - *outptr_QBitArray = ret; +QBitArray* QBitArray_new4(ptrdiff_t size, bool val) { + return new QBitArray((qsizetype)(size), val); } void QBitArray_OperatorAssign(QBitArray* self, QBitArray* other) { @@ -165,9 +161,8 @@ void QBitArray_Delete(QBitArray* self, bool isSubclass) { } } -void QBitRef_new(QBitRef* param1, QBitRef** outptr_QBitRef) { - QBitRef* ret = new QBitRef(*param1); - *outptr_QBitRef = ret; +QBitRef* QBitRef_new(QBitRef* param1) { + return new QBitRef(*param1); } bool QBitRef_OperatorNot(const QBitRef* self) { diff --git a/qt6/gen_qbitarray.go b/qt6/gen_qbitarray.go index aeb353b1..2140119e 100644 --- a/qt6/gen_qbitarray.go +++ b/qt6/gen_qbitarray.go @@ -37,54 +37,43 @@ func newQBitArray(h *C.QBitArray) *QBitArray { if h == nil { return nil } + return &QBitArray{h: h} } // UnsafeNewQBitArray constructs the type using only unsafe pointers. func UnsafeNewQBitArray(h unsafe.Pointer) *QBitArray { - if h == nil { - return nil - } - - return &QBitArray{h: (*C.QBitArray)(h)} + return newQBitArray((*C.QBitArray)(h)) } // NewQBitArray constructs a new QBitArray object. func NewQBitArray() *QBitArray { - var outptr_QBitArray *C.QBitArray = nil - C.QBitArray_new(&outptr_QBitArray) - ret := newQBitArray(outptr_QBitArray) + ret := newQBitArray(C.QBitArray_new()) ret.isSubclass = true return ret } // NewQBitArray2 constructs a new QBitArray object. func NewQBitArray2(size int64) *QBitArray { - var outptr_QBitArray *C.QBitArray = nil - C.QBitArray_new2((C.ptrdiff_t)(size), &outptr_QBitArray) - ret := newQBitArray(outptr_QBitArray) + ret := newQBitArray(C.QBitArray_new2((C.ptrdiff_t)(size))) ret.isSubclass = true return ret } // NewQBitArray3 constructs a new QBitArray object. func NewQBitArray3(other *QBitArray) *QBitArray { - var outptr_QBitArray *C.QBitArray = nil - C.QBitArray_new3(other.cPointer(), &outptr_QBitArray) - ret := newQBitArray(outptr_QBitArray) + ret := newQBitArray(C.QBitArray_new3(other.cPointer())) ret.isSubclass = true return ret } // NewQBitArray4 constructs a new QBitArray object. func NewQBitArray4(size int64, val bool) *QBitArray { - var outptr_QBitArray *C.QBitArray = nil - C.QBitArray_new4((C.ptrdiff_t)(size), (C.bool)(val), &outptr_QBitArray) - ret := newQBitArray(outptr_QBitArray) + ret := newQBitArray(C.QBitArray_new4((C.ptrdiff_t)(size), (C.bool)(val))) ret.isSubclass = true return ret } @@ -262,24 +251,19 @@ func newQBitRef(h *C.QBitRef) *QBitRef { if h == nil { return nil } + return &QBitRef{h: h} } // UnsafeNewQBitRef constructs the type using only unsafe pointers. func UnsafeNewQBitRef(h unsafe.Pointer) *QBitRef { - if h == nil { - return nil - } - - return &QBitRef{h: (*C.QBitRef)(h)} + return newQBitRef((*C.QBitRef)(h)) } // NewQBitRef constructs a new QBitRef object. func NewQBitRef(param1 *QBitRef) *QBitRef { - var outptr_QBitRef *C.QBitRef = nil - C.QBitRef_new(param1.cPointer(), &outptr_QBitRef) - ret := newQBitRef(outptr_QBitRef) + ret := newQBitRef(C.QBitRef_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qbitarray.h b/qt6/gen_qbitarray.h index 412ab3b6..559e7551 100644 --- a/qt6/gen_qbitarray.h +++ b/qt6/gen_qbitarray.h @@ -22,10 +22,10 @@ typedef struct QBitArray QBitArray; typedef struct QBitRef QBitRef; #endif -void QBitArray_new(QBitArray** outptr_QBitArray); -void QBitArray_new2(ptrdiff_t size, QBitArray** outptr_QBitArray); -void QBitArray_new3(QBitArray* other, QBitArray** outptr_QBitArray); -void QBitArray_new4(ptrdiff_t size, bool val, QBitArray** outptr_QBitArray); +QBitArray* QBitArray_new(); +QBitArray* QBitArray_new2(ptrdiff_t size); +QBitArray* QBitArray_new3(QBitArray* other); +QBitArray* QBitArray_new4(ptrdiff_t size, bool val); void QBitArray_OperatorAssign(QBitArray* self, QBitArray* other); void QBitArray_Swap(QBitArray* self, QBitArray* other); ptrdiff_t QBitArray_Size(const QBitArray* self); @@ -60,7 +60,7 @@ bool QBitArray_Fill22(QBitArray* self, bool val, ptrdiff_t size); unsigned int QBitArray_ToUInt322(const QBitArray* self, int endianness, bool* ok); void QBitArray_Delete(QBitArray* self, bool isSubclass); -void QBitRef_new(QBitRef* param1, QBitRef** outptr_QBitRef); +QBitRef* QBitRef_new(QBitRef* param1); bool QBitRef_OperatorNot(const QBitRef* self); void QBitRef_OperatorAssign(QBitRef* self, QBitRef* val); void QBitRef_OperatorAssignWithVal(QBitRef* self, bool val); diff --git a/qt6/gen_qbitmap.cpp b/qt6/gen_qbitmap.cpp index 01394e8e..db897765 100644 --- a/qt6/gen_qbitmap.cpp +++ b/qt6/gen_qbitmap.cpp @@ -95,55 +95,38 @@ public: }; -void QBitmap_new(QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(); - *outptr_QBitmap = ret; - *outptr_QPixmap = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QBitmap* QBitmap_new() { + return new MiqtVirtualQBitmap(); } -void QBitmap_new2(QPixmap* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(*param1); - *outptr_QBitmap = ret; - *outptr_QPixmap = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QBitmap* QBitmap_new2(QPixmap* param1) { + return new MiqtVirtualQBitmap(*param1); } -void QBitmap_new3(int w, int h, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(static_cast(w), static_cast(h)); - *outptr_QBitmap = ret; - *outptr_QPixmap = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QBitmap* QBitmap_new3(int w, int h) { + return new MiqtVirtualQBitmap(static_cast(w), static_cast(h)); } -void QBitmap_new4(QSize* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(*param1); - *outptr_QBitmap = ret; - *outptr_QPixmap = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QBitmap* QBitmap_new4(QSize* param1) { + return new MiqtVirtualQBitmap(*param1); } -void QBitmap_new5(struct miqt_string fileName, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { +QBitmap* QBitmap_new5(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(fileName_QString); - *outptr_QBitmap = ret; - *outptr_QPixmap = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQBitmap(fileName_QString); } -void QBitmap_new6(QBitmap* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(*param1); - *outptr_QBitmap = ret; - *outptr_QPixmap = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QBitmap* QBitmap_new6(QBitmap* param1) { + return new MiqtVirtualQBitmap(*param1); } -void QBitmap_new7(struct miqt_string fileName, const char* format, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { +QBitmap* QBitmap_new7(struct miqt_string fileName, const char* format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQBitmap* ret = new MiqtVirtualQBitmap(fileName_QString, format); - *outptr_QBitmap = ret; - *outptr_QPixmap = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQBitmap(fileName_QString, format); +} + +void QBitmap_virtbase(QBitmap* src, QPixmap** outptr_QPixmap) { + *outptr_QPixmap = static_cast(src); } void QBitmap_OperatorAssign(QBitmap* self, QPixmap* param1) { diff --git a/qt6/gen_qbitmap.go b/qt6/gen_qbitmap.go index a08e6eb0..7aad24b5 100644 --- a/qt6/gen_qbitmap.go +++ b/qt6/gen_qbitmap.go @@ -35,68 +35,50 @@ func (this *QBitmap) UnsafePointer() unsafe.Pointer { } // newQBitmap constructs the type using only CGO pointers. -func newQBitmap(h *C.QBitmap, h_QPixmap *C.QPixmap, h_QPaintDevice *C.QPaintDevice) *QBitmap { +func newQBitmap(h *C.QBitmap) *QBitmap { if h == nil { return nil } + var outptr_QPixmap *C.QPixmap = nil + C.QBitmap_virtbase(h, &outptr_QPixmap) + return &QBitmap{h: h, - QPixmap: newQPixmap(h_QPixmap, h_QPaintDevice)} + QPixmap: newQPixmap(outptr_QPixmap)} } // UnsafeNewQBitmap constructs the type using only unsafe pointers. -func UnsafeNewQBitmap(h unsafe.Pointer, h_QPixmap unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QBitmap { - if h == nil { - return nil - } - - return &QBitmap{h: (*C.QBitmap)(h), - QPixmap: UnsafeNewQPixmap(h_QPixmap, h_QPaintDevice)} +func UnsafeNewQBitmap(h unsafe.Pointer) *QBitmap { + return newQBitmap((*C.QBitmap)(h)) } // NewQBitmap constructs a new QBitmap object. func NewQBitmap() *QBitmap { - var outptr_QBitmap *C.QBitmap = nil - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QBitmap_new(&outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret := newQBitmap(C.QBitmap_new()) ret.isSubclass = true return ret } // NewQBitmap2 constructs a new QBitmap object. func NewQBitmap2(param1 *QPixmap) *QBitmap { - var outptr_QBitmap *C.QBitmap = nil - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QBitmap_new2(param1.cPointer(), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret := newQBitmap(C.QBitmap_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQBitmap3 constructs a new QBitmap object. func NewQBitmap3(w int, h int) *QBitmap { - var outptr_QBitmap *C.QBitmap = nil - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QBitmap_new3((C.int)(w), (C.int)(h), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret := newQBitmap(C.QBitmap_new3((C.int)(w), (C.int)(h))) ret.isSubclass = true return ret } // NewQBitmap4 constructs a new QBitmap object. func NewQBitmap4(param1 *QSize) *QBitmap { - var outptr_QBitmap *C.QBitmap = nil - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QBitmap_new4(param1.cPointer(), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret := newQBitmap(C.QBitmap_new4(param1.cPointer())) ret.isSubclass = true return ret } @@ -107,24 +89,16 @@ func NewQBitmap5(fileName string) *QBitmap { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QBitmap *C.QBitmap = nil - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QBitmap_new5(fileName_ms, &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret := newQBitmap(C.QBitmap_new5(fileName_ms)) ret.isSubclass = true return ret } // NewQBitmap6 constructs a new QBitmap object. func NewQBitmap6(param1 *QBitmap) *QBitmap { - var outptr_QBitmap *C.QBitmap = nil - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QBitmap_new6(param1.cPointer(), &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret := newQBitmap(C.QBitmap_new6(param1.cPointer())) ret.isSubclass = true return ret } @@ -137,12 +111,8 @@ func NewQBitmap7(fileName string, format string) *QBitmap { defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - var outptr_QBitmap *C.QBitmap = nil - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QBitmap_new7(fileName_ms, format_Cstring, &outptr_QBitmap, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQBitmap(outptr_QBitmap, outptr_QPixmap, outptr_QPaintDevice) + ret := newQBitmap(C.QBitmap_new7(fileName_ms, format_Cstring)) ret.isSubclass = true return ret } @@ -160,25 +130,25 @@ func (this *QBitmap) Clear() { } func QBitmap_FromImage(image *QImage) *QBitmap { - _goptr := newQBitmap(C.QBitmap_FromImage(image.cPointer()), nil, nil) + _goptr := newQBitmap(C.QBitmap_FromImage(image.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QBitmap_FromData(size *QSize, bits *byte) *QBitmap { - _goptr := newQBitmap(C.QBitmap_FromData(size.cPointer(), (*C.uchar)(unsafe.Pointer(bits))), nil, nil) + _goptr := newQBitmap(C.QBitmap_FromData(size.cPointer(), (*C.uchar)(unsafe.Pointer(bits)))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QBitmap_FromPixmap(pixmap *QPixmap) *QBitmap { - _goptr := newQBitmap(C.QBitmap_FromPixmap(pixmap.cPointer()), nil, nil) + _goptr := newQBitmap(C.QBitmap_FromPixmap(pixmap.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QBitmap) Transformed(matrix *QTransform) *QBitmap { - _goptr := newQBitmap(C.QBitmap_Transformed(this.h, matrix.cPointer()), nil, nil) + _goptr := newQBitmap(C.QBitmap_Transformed(this.h, matrix.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -188,13 +158,13 @@ func (this *QBitmap) OperatorAssignWithQBitmap(param1 *QBitmap) { } func QBitmap_FromImage2(image *QImage, flags ImageConversionFlag) *QBitmap { - _goptr := newQBitmap(C.QBitmap_FromImage2(image.cPointer(), (C.int)(flags)), nil, nil) + _goptr := newQBitmap(C.QBitmap_FromImage2(image.cPointer(), (C.int)(flags))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QBitmap_FromData3(size *QSize, bits *byte, monoFormat QImage__Format) *QBitmap { - _goptr := newQBitmap(C.QBitmap_FromData3(size.cPointer(), (*C.uchar)(unsafe.Pointer(bits)), (C.int)(monoFormat)), nil, nil) + _goptr := newQBitmap(C.QBitmap_FromData3(size.cPointer(), (*C.uchar)(unsafe.Pointer(bits)), (C.int)(monoFormat))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/gen_qbitmap.h b/qt6/gen_qbitmap.h index 6387f792..75db7a44 100644 --- a/qt6/gen_qbitmap.h +++ b/qt6/gen_qbitmap.h @@ -32,13 +32,14 @@ typedef struct QSize QSize; typedef struct QTransform QTransform; #endif -void QBitmap_new(QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QBitmap_new2(QPixmap* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QBitmap_new3(int w, int h, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QBitmap_new4(QSize* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QBitmap_new5(struct miqt_string fileName, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QBitmap_new6(QBitmap* param1, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QBitmap_new7(struct miqt_string fileName, const char* format, QBitmap** outptr_QBitmap, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +QBitmap* QBitmap_new(); +QBitmap* QBitmap_new2(QPixmap* param1); +QBitmap* QBitmap_new3(int w, int h); +QBitmap* QBitmap_new4(QSize* param1); +QBitmap* QBitmap_new5(struct miqt_string fileName); +QBitmap* QBitmap_new6(QBitmap* param1); +QBitmap* QBitmap_new7(struct miqt_string fileName, const char* format); +void QBitmap_virtbase(QBitmap* src, QPixmap** outptr_QPixmap); void QBitmap_OperatorAssign(QBitmap* self, QPixmap* param1); void QBitmap_Swap(QBitmap* self, QBitmap* other); void QBitmap_Clear(QBitmap* self); diff --git a/qt6/gen_qboxlayout.cpp b/qt6/gen_qboxlayout.cpp index 18c1ef56..1a662419 100644 --- a/qt6/gen_qboxlayout.cpp +++ b/qt6/gen_qboxlayout.cpp @@ -533,20 +533,16 @@ public: }; -void QBoxLayout_new(int param1, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQBoxLayout* ret = new MiqtVirtualQBoxLayout(static_cast(param1)); - *outptr_QBoxLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QBoxLayout* QBoxLayout_new(int param1) { + return new MiqtVirtualQBoxLayout(static_cast(param1)); } -void QBoxLayout_new2(int param1, QWidget* parent, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQBoxLayout* ret = new MiqtVirtualQBoxLayout(static_cast(param1), parent); - *outptr_QBoxLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QBoxLayout* QBoxLayout_new2(int param1, QWidget* parent) { + return new MiqtVirtualQBoxLayout(static_cast(param1), parent); +} + +void QBoxLayout_virtbase(QBoxLayout* src, QLayout** outptr_QLayout) { + *outptr_QLayout = static_cast(src); } QMetaObject* QBoxLayout_MetaObject(const QBoxLayout* self) { @@ -1294,22 +1290,16 @@ public: }; -void QHBoxLayout_new(QWidget* parent, QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQHBoxLayout* ret = new MiqtVirtualQHBoxLayout(parent); - *outptr_QHBoxLayout = ret; - *outptr_QBoxLayout = static_cast(ret); - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QHBoxLayout* QHBoxLayout_new(QWidget* parent) { + return new MiqtVirtualQHBoxLayout(parent); } -void QHBoxLayout_new2(QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQHBoxLayout* ret = new MiqtVirtualQHBoxLayout(); - *outptr_QHBoxLayout = ret; - *outptr_QBoxLayout = static_cast(ret); - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QHBoxLayout* QHBoxLayout_new2() { + return new MiqtVirtualQHBoxLayout(); +} + +void QHBoxLayout_virtbase(QHBoxLayout* src, QBoxLayout** outptr_QBoxLayout) { + *outptr_QBoxLayout = static_cast(src); } QMetaObject* QHBoxLayout_MetaObject(const QHBoxLayout* self) { @@ -1835,22 +1825,16 @@ public: }; -void QVBoxLayout_new(QWidget* parent, QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQVBoxLayout* ret = new MiqtVirtualQVBoxLayout(parent); - *outptr_QVBoxLayout = ret; - *outptr_QBoxLayout = static_cast(ret); - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QVBoxLayout* QVBoxLayout_new(QWidget* parent) { + return new MiqtVirtualQVBoxLayout(parent); } -void QVBoxLayout_new2(QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQVBoxLayout* ret = new MiqtVirtualQVBoxLayout(); - *outptr_QVBoxLayout = ret; - *outptr_QBoxLayout = static_cast(ret); - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QVBoxLayout* QVBoxLayout_new2() { + return new MiqtVirtualQVBoxLayout(); +} + +void QVBoxLayout_virtbase(QVBoxLayout* src, QBoxLayout** outptr_QBoxLayout) { + *outptr_QBoxLayout = static_cast(src); } QMetaObject* QVBoxLayout_MetaObject(const QVBoxLayout* self) { diff --git a/qt6/gen_qboxlayout.go b/qt6/gen_qboxlayout.go index 0c2b639c..3365675b 100644 --- a/qt6/gen_qboxlayout.go +++ b/qt6/gen_qboxlayout.go @@ -46,46 +46,34 @@ func (this *QBoxLayout) UnsafePointer() unsafe.Pointer { } // newQBoxLayout constructs the type using only CGO pointers. -func newQBoxLayout(h *C.QBoxLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QBoxLayout { +func newQBoxLayout(h *C.QBoxLayout) *QBoxLayout { if h == nil { return nil } + var outptr_QLayout *C.QLayout = nil + C.QBoxLayout_virtbase(h, &outptr_QLayout) + return &QBoxLayout{h: h, - QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} + QLayout: newQLayout(outptr_QLayout)} } // UnsafeNewQBoxLayout constructs the type using only unsafe pointers. -func UnsafeNewQBoxLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QBoxLayout { - if h == nil { - return nil - } - - return &QBoxLayout{h: (*C.QBoxLayout)(h), - QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} +func UnsafeNewQBoxLayout(h unsafe.Pointer) *QBoxLayout { + return newQBoxLayout((*C.QBoxLayout)(h)) } // NewQBoxLayout constructs a new QBoxLayout object. func NewQBoxLayout(param1 QBoxLayout__Direction) *QBoxLayout { - var outptr_QBoxLayout *C.QBoxLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QBoxLayout_new((C.int)(param1), &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQBoxLayout(outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQBoxLayout(C.QBoxLayout_new((C.int)(param1))) ret.isSubclass = true return ret } // NewQBoxLayout2 constructs a new QBoxLayout object. func NewQBoxLayout2(param1 QBoxLayout__Direction, parent *QWidget) *QBoxLayout { - var outptr_QBoxLayout *C.QBoxLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QBoxLayout_new2((C.int)(param1), parent.cPointer(), &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQBoxLayout(outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQBoxLayout(C.QBoxLayout_new2((C.int)(param1), parent.cPointer())) ret.isSubclass = true return ret } @@ -742,7 +730,7 @@ func miqt_exec_callback_QBoxLayout_IndexOf(self *C.QBoxLayout, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(param1, nil, nil) + slotval1 := newQWidget(param1) virtualReturn := gofunc((&QBoxLayout{h: self}).callVirtualBase_IndexOf, slotval1) @@ -820,9 +808,9 @@ func miqt_exec_callback_QBoxLayout_ReplaceWidget(self *C.QBoxLayout, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(from, nil, nil) + slotval1 := newQWidget(from) - slotval2 := newQWidget(to, nil, nil) + slotval2 := newQWidget(to) slotval3 := (FindChildOption)(options) @@ -834,7 +822,7 @@ func miqt_exec_callback_QBoxLayout_ReplaceWidget(self *C.QBoxLayout, cb C.intptr func (this *QBoxLayout) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QBoxLayout_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QBoxLayout_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QBoxLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -877,7 +865,7 @@ func miqt_exec_callback_QBoxLayout_ChildEvent(self *C.QBoxLayout, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(e, nil) + slotval1 := newQChildEvent(e) gofunc((&QBoxLayout{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -918,48 +906,34 @@ func (this *QHBoxLayout) UnsafePointer() unsafe.Pointer { } // newQHBoxLayout constructs the type using only CGO pointers. -func newQHBoxLayout(h *C.QHBoxLayout, h_QBoxLayout *C.QBoxLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QHBoxLayout { +func newQHBoxLayout(h *C.QHBoxLayout) *QHBoxLayout { if h == nil { return nil } + var outptr_QBoxLayout *C.QBoxLayout = nil + C.QHBoxLayout_virtbase(h, &outptr_QBoxLayout) + return &QHBoxLayout{h: h, - QBoxLayout: newQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} + QBoxLayout: newQBoxLayout(outptr_QBoxLayout)} } // UnsafeNewQHBoxLayout constructs the type using only unsafe pointers. -func UnsafeNewQHBoxLayout(h unsafe.Pointer, h_QBoxLayout unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QHBoxLayout { - if h == nil { - return nil - } - - return &QHBoxLayout{h: (*C.QHBoxLayout)(h), - QBoxLayout: UnsafeNewQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} +func UnsafeNewQHBoxLayout(h unsafe.Pointer) *QHBoxLayout { + return newQHBoxLayout((*C.QHBoxLayout)(h)) } // NewQHBoxLayout constructs a new QHBoxLayout object. func NewQHBoxLayout(parent *QWidget) *QHBoxLayout { - var outptr_QHBoxLayout *C.QHBoxLayout = nil - var outptr_QBoxLayout *C.QBoxLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QHBoxLayout_new(parent.cPointer(), &outptr_QHBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQHBoxLayout(outptr_QHBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQHBoxLayout(C.QHBoxLayout_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQHBoxLayout2 constructs a new QHBoxLayout object. func NewQHBoxLayout2() *QHBoxLayout { - var outptr_QHBoxLayout *C.QHBoxLayout = nil - var outptr_QBoxLayout *C.QBoxLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QHBoxLayout_new2(&outptr_QHBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQHBoxLayout(outptr_QHBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQHBoxLayout(C.QHBoxLayout_new2()) ret.isSubclass = true return ret } @@ -1434,48 +1408,34 @@ func (this *QVBoxLayout) UnsafePointer() unsafe.Pointer { } // newQVBoxLayout constructs the type using only CGO pointers. -func newQVBoxLayout(h *C.QVBoxLayout, h_QBoxLayout *C.QBoxLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QVBoxLayout { +func newQVBoxLayout(h *C.QVBoxLayout) *QVBoxLayout { if h == nil { return nil } + var outptr_QBoxLayout *C.QBoxLayout = nil + C.QVBoxLayout_virtbase(h, &outptr_QBoxLayout) + return &QVBoxLayout{h: h, - QBoxLayout: newQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} + QBoxLayout: newQBoxLayout(outptr_QBoxLayout)} } // UnsafeNewQVBoxLayout constructs the type using only unsafe pointers. -func UnsafeNewQVBoxLayout(h unsafe.Pointer, h_QBoxLayout unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QVBoxLayout { - if h == nil { - return nil - } - - return &QVBoxLayout{h: (*C.QVBoxLayout)(h), - QBoxLayout: UnsafeNewQBoxLayout(h_QBoxLayout, h_QLayout, h_QObject, h_QLayoutItem)} +func UnsafeNewQVBoxLayout(h unsafe.Pointer) *QVBoxLayout { + return newQVBoxLayout((*C.QVBoxLayout)(h)) } // NewQVBoxLayout constructs a new QVBoxLayout object. func NewQVBoxLayout(parent *QWidget) *QVBoxLayout { - var outptr_QVBoxLayout *C.QVBoxLayout = nil - var outptr_QBoxLayout *C.QBoxLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QVBoxLayout_new(parent.cPointer(), &outptr_QVBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQVBoxLayout(outptr_QVBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQVBoxLayout(C.QVBoxLayout_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQVBoxLayout2 constructs a new QVBoxLayout object. func NewQVBoxLayout2() *QVBoxLayout { - var outptr_QVBoxLayout *C.QVBoxLayout = nil - var outptr_QBoxLayout *C.QBoxLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QVBoxLayout_new2(&outptr_QVBoxLayout, &outptr_QBoxLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQVBoxLayout(outptr_QVBoxLayout, outptr_QBoxLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQVBoxLayout(C.QVBoxLayout_new2()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qboxlayout.h b/qt6/gen_qboxlayout.h index 03263ee5..9f2f60af 100644 --- a/qt6/gen_qboxlayout.h +++ b/qt6/gen_qboxlayout.h @@ -42,8 +42,9 @@ typedef struct QVBoxLayout QVBoxLayout; typedef struct QWidget QWidget; #endif -void QBoxLayout_new(int param1, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QBoxLayout_new2(int param1, QWidget* parent, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +QBoxLayout* QBoxLayout_new(int param1); +QBoxLayout* QBoxLayout_new2(int param1, QWidget* parent); +void QBoxLayout_virtbase(QBoxLayout* src, QLayout** outptr_QLayout); QMetaObject* QBoxLayout_MetaObject(const QBoxLayout* self); void* QBoxLayout_Metacast(QBoxLayout* self, const char* param1); struct miqt_string QBoxLayout_Tr(const char* s); @@ -136,8 +137,9 @@ void QBoxLayout_override_virtual_ChildEvent(void* self, intptr_t slot); void QBoxLayout_virtualbase_ChildEvent(void* self, QChildEvent* e); void QBoxLayout_Delete(QBoxLayout* self, bool isSubclass); -void QHBoxLayout_new(QWidget* parent, QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QHBoxLayout_new2(QHBoxLayout** outptr_QHBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +QHBoxLayout* QHBoxLayout_new(QWidget* parent); +QHBoxLayout* QHBoxLayout_new2(); +void QHBoxLayout_virtbase(QHBoxLayout* src, QBoxLayout** outptr_QBoxLayout); QMetaObject* QHBoxLayout_MetaObject(const QHBoxLayout* self); void* QHBoxLayout_Metacast(QHBoxLayout* self, const char* param1); struct miqt_string QHBoxLayout_Tr(const char* s); @@ -175,8 +177,9 @@ void QHBoxLayout_override_virtual_SetGeometry(void* self, intptr_t slot); void QHBoxLayout_virtualbase_SetGeometry(void* self, QRect* geometry); void QHBoxLayout_Delete(QHBoxLayout* self, bool isSubclass); -void QVBoxLayout_new(QWidget* parent, QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QVBoxLayout_new2(QVBoxLayout** outptr_QVBoxLayout, QBoxLayout** outptr_QBoxLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +QVBoxLayout* QVBoxLayout_new(QWidget* parent); +QVBoxLayout* QVBoxLayout_new2(); +void QVBoxLayout_virtbase(QVBoxLayout* src, QBoxLayout** outptr_QBoxLayout); QMetaObject* QVBoxLayout_MetaObject(const QVBoxLayout* self); void* QVBoxLayout_Metacast(QVBoxLayout* self, const char* param1); struct miqt_string QVBoxLayout_Tr(const char* s); diff --git a/qt6/gen_qbrush.cpp b/qt6/gen_qbrush.cpp index 1d33406f..38ac0968 100644 --- a/qt6/gen_qbrush.cpp +++ b/qt6/gen_qbrush.cpp @@ -16,64 +16,52 @@ #include "gen_qbrush.h" #include "_cgo_export.h" -void QBrush_new(QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(); - *outptr_QBrush = ret; +QBrush* QBrush_new() { + return new QBrush(); } -void QBrush_new2(int bs, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(static_cast(bs)); - *outptr_QBrush = ret; +QBrush* QBrush_new2(int bs) { + return new QBrush(static_cast(bs)); } -void QBrush_new3(QColor* color, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(*color); - *outptr_QBrush = ret; +QBrush* QBrush_new3(QColor* color) { + return new QBrush(*color); } -void QBrush_new4(int color, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(static_cast(color)); - *outptr_QBrush = ret; +QBrush* QBrush_new4(int color) { + return new QBrush(static_cast(color)); } -void QBrush_new5(QColor* color, QPixmap* pixmap, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(*color, *pixmap); - *outptr_QBrush = ret; +QBrush* QBrush_new5(QColor* color, QPixmap* pixmap) { + return new QBrush(*color, *pixmap); } -void QBrush_new6(int color, QPixmap* pixmap, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(static_cast(color), *pixmap); - *outptr_QBrush = ret; +QBrush* QBrush_new6(int color, QPixmap* pixmap) { + return new QBrush(static_cast(color), *pixmap); } -void QBrush_new7(QPixmap* pixmap, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(*pixmap); - *outptr_QBrush = ret; +QBrush* QBrush_new7(QPixmap* pixmap) { + return new QBrush(*pixmap); } -void QBrush_new8(QImage* image, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(*image); - *outptr_QBrush = ret; +QBrush* QBrush_new8(QImage* image) { + return new QBrush(*image); } -void QBrush_new9(QBrush* brush, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(*brush); - *outptr_QBrush = ret; +QBrush* QBrush_new9(QBrush* brush) { + return new QBrush(*brush); } -void QBrush_new10(QGradient* gradient, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(*gradient); - *outptr_QBrush = ret; +QBrush* QBrush_new10(QGradient* gradient) { + return new QBrush(*gradient); } -void QBrush_new11(QColor* color, int bs, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(*color, static_cast(bs)); - *outptr_QBrush = ret; +QBrush* QBrush_new11(QColor* color, int bs) { + return new QBrush(*color, static_cast(bs)); } -void QBrush_new12(int color, int bs, QBrush** outptr_QBrush) { - QBrush* ret = new QBrush(static_cast(color), static_cast(bs)); - *outptr_QBrush = ret; +QBrush* QBrush_new12(int color, int bs) { + return new QBrush(static_cast(color), static_cast(bs)); } void QBrush_OperatorAssign(QBrush* self, QBrush* brush) { @@ -159,9 +147,8 @@ void QBrush_Delete(QBrush* self, bool isSubclass) { } } -void QBrushData_new(QBrushData* param1, QBrushData** outptr_QBrushData) { - QBrushData* ret = new QBrushData(*param1); - *outptr_QBrushData = ret; +QBrushData* QBrushData_new(QBrushData* param1) { + return new QBrushData(*param1); } void QBrushData_OperatorAssign(QBrushData* self, QBrushData* param1) { @@ -176,19 +163,16 @@ void QBrushData_Delete(QBrushData* self, bool isSubclass) { } } -void QGradient_new(QGradient** outptr_QGradient) { - QGradient* ret = new QGradient(); - *outptr_QGradient = ret; +QGradient* QGradient_new() { + return new QGradient(); } -void QGradient_new2(int param1, QGradient** outptr_QGradient) { - QGradient* ret = new QGradient(static_cast(param1)); - *outptr_QGradient = ret; +QGradient* QGradient_new2(int param1) { + return new QGradient(static_cast(param1)); } -void QGradient_new3(QGradient* param1, QGradient** outptr_QGradient) { - QGradient* ret = new QGradient(*param1); - *outptr_QGradient = ret; +QGradient* QGradient_new3(QGradient* param1) { + return new QGradient(*param1); } int QGradient_Type(const QGradient* self) { @@ -281,28 +265,24 @@ void QGradient_Delete(QGradient* self, bool isSubclass) { } } -void QLinearGradient_new(QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { - QLinearGradient* ret = new QLinearGradient(); - *outptr_QLinearGradient = ret; - *outptr_QGradient = static_cast(ret); +QLinearGradient* QLinearGradient_new() { + return new QLinearGradient(); } -void QLinearGradient_new2(QPointF* start, QPointF* finalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { - QLinearGradient* ret = new QLinearGradient(*start, *finalStop); - *outptr_QLinearGradient = ret; - *outptr_QGradient = static_cast(ret); +QLinearGradient* QLinearGradient_new2(QPointF* start, QPointF* finalStop) { + return new QLinearGradient(*start, *finalStop); } -void QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { - QLinearGradient* ret = new QLinearGradient(static_cast(xStart), static_cast(yStart), static_cast(xFinalStop), static_cast(yFinalStop)); - *outptr_QLinearGradient = ret; - *outptr_QGradient = static_cast(ret); +QLinearGradient* QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop) { + return new QLinearGradient(static_cast(xStart), static_cast(yStart), static_cast(xFinalStop), static_cast(yFinalStop)); } -void QLinearGradient_new4(QLinearGradient* param1, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient) { - QLinearGradient* ret = new QLinearGradient(*param1); - *outptr_QLinearGradient = ret; - *outptr_QGradient = static_cast(ret); +QLinearGradient* QLinearGradient_new4(QLinearGradient* param1) { + return new QLinearGradient(*param1); +} + +void QLinearGradient_virtbase(QLinearGradient* src, QGradient** outptr_QGradient) { + *outptr_QGradient = static_cast(src); } QPointF* QLinearGradient_Start(const QLinearGradient* self) { @@ -337,52 +317,40 @@ void QLinearGradient_Delete(QLinearGradient* self, bool isSubclass) { } } -void QRadialGradient_new(QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new() { + return new QRadialGradient(); } -void QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(*center, static_cast(radius), *focalPoint); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint) { + return new QRadialGradient(*center, static_cast(radius), *focalPoint); } -void QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius), static_cast(fx), static_cast(fy)); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy) { + return new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius), static_cast(fx), static_cast(fy)); } -void QRadialGradient_new4(QPointF* center, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(*center, static_cast(radius)); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new4(QPointF* center, double radius) { + return new QRadialGradient(*center, static_cast(radius)); } -void QRadialGradient_new5(double cx, double cy, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius)); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new5(double cx, double cy, double radius) { + return new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(radius)); } -void QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(*center, static_cast(centerRadius), *focalPoint, static_cast(focalRadius)); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius) { + return new QRadialGradient(*center, static_cast(centerRadius), *focalPoint, static_cast(focalRadius)); } -void QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(centerRadius), static_cast(fx), static_cast(fy), static_cast(focalRadius)); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius) { + return new QRadialGradient(static_cast(cx), static_cast(cy), static_cast(centerRadius), static_cast(fx), static_cast(fy), static_cast(focalRadius)); } -void QRadialGradient_new8(QRadialGradient* param1, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient) { - QRadialGradient* ret = new QRadialGradient(*param1); - *outptr_QRadialGradient = ret; - *outptr_QGradient = static_cast(ret); +QRadialGradient* QRadialGradient_new8(QRadialGradient* param1) { + return new QRadialGradient(*param1); +} + +void QRadialGradient_virtbase(QRadialGradient* src, QGradient** outptr_QGradient) { + *outptr_QGradient = static_cast(src); } QPointF* QRadialGradient_Center(const QRadialGradient* self) { @@ -444,28 +412,24 @@ void QRadialGradient_Delete(QRadialGradient* self, bool isSubclass) { } } -void QConicalGradient_new(QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { - QConicalGradient* ret = new QConicalGradient(); - *outptr_QConicalGradient = ret; - *outptr_QGradient = static_cast(ret); +QConicalGradient* QConicalGradient_new() { + return new QConicalGradient(); } -void QConicalGradient_new2(QPointF* center, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { - QConicalGradient* ret = new QConicalGradient(*center, static_cast(startAngle)); - *outptr_QConicalGradient = ret; - *outptr_QGradient = static_cast(ret); +QConicalGradient* QConicalGradient_new2(QPointF* center, double startAngle) { + return new QConicalGradient(*center, static_cast(startAngle)); } -void QConicalGradient_new3(double cx, double cy, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { - QConicalGradient* ret = new QConicalGradient(static_cast(cx), static_cast(cy), static_cast(startAngle)); - *outptr_QConicalGradient = ret; - *outptr_QGradient = static_cast(ret); +QConicalGradient* QConicalGradient_new3(double cx, double cy, double startAngle) { + return new QConicalGradient(static_cast(cx), static_cast(cy), static_cast(startAngle)); } -void QConicalGradient_new4(QConicalGradient* param1, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient) { - QConicalGradient* ret = new QConicalGradient(*param1); - *outptr_QConicalGradient = ret; - *outptr_QGradient = static_cast(ret); +QConicalGradient* QConicalGradient_new4(QConicalGradient* param1) { + return new QConicalGradient(*param1); +} + +void QConicalGradient_virtbase(QConicalGradient* src, QGradient** outptr_QGradient) { + *outptr_QGradient = static_cast(src); } QPointF* QConicalGradient_Center(const QConicalGradient* self) { @@ -497,9 +461,8 @@ void QConicalGradient_Delete(QConicalGradient* self, bool isSubclass) { } } -void QGradient__QGradientData_new(QGradient__QGradientData* param1, QGradient__QGradientData** outptr_QGradient__QGradientData) { - QGradient::QGradientData* ret = new QGradient::QGradientData(*param1); - *outptr_QGradient__QGradientData = ret; +QGradient__QGradientData* QGradient__QGradientData_new(QGradient__QGradientData* param1) { + return new QGradient::QGradientData(*param1); } void QGradient__QGradientData_Delete(QGradient__QGradientData* self, bool isSubclass) { diff --git a/qt6/gen_qbrush.go b/qt6/gen_qbrush.go index b5abe18a..960bb0a6 100644 --- a/qt6/gen_qbrush.go +++ b/qt6/gen_qbrush.go @@ -244,134 +244,107 @@ func newQBrush(h *C.QBrush) *QBrush { if h == nil { return nil } + return &QBrush{h: h} } // UnsafeNewQBrush constructs the type using only unsafe pointers. func UnsafeNewQBrush(h unsafe.Pointer) *QBrush { - if h == nil { - return nil - } - - return &QBrush{h: (*C.QBrush)(h)} + return newQBrush((*C.QBrush)(h)) } // NewQBrush constructs a new QBrush object. func NewQBrush() *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new(&outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new()) ret.isSubclass = true return ret } // NewQBrush2 constructs a new QBrush object. func NewQBrush2(bs BrushStyle) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new2((C.int)(bs), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new2((C.int)(bs))) ret.isSubclass = true return ret } // NewQBrush3 constructs a new QBrush object. func NewQBrush3(color *QColor) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new3(color.cPointer(), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new3(color.cPointer())) ret.isSubclass = true return ret } // NewQBrush4 constructs a new QBrush object. func NewQBrush4(color GlobalColor) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new4((C.int)(color), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new4((C.int)(color))) ret.isSubclass = true return ret } // NewQBrush5 constructs a new QBrush object. func NewQBrush5(color *QColor, pixmap *QPixmap) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new5(color.cPointer(), pixmap.cPointer(), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new5(color.cPointer(), pixmap.cPointer())) ret.isSubclass = true return ret } // NewQBrush6 constructs a new QBrush object. func NewQBrush6(color GlobalColor, pixmap *QPixmap) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new6((C.int)(color), pixmap.cPointer(), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new6((C.int)(color), pixmap.cPointer())) ret.isSubclass = true return ret } // NewQBrush7 constructs a new QBrush object. func NewQBrush7(pixmap *QPixmap) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new7(pixmap.cPointer(), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new7(pixmap.cPointer())) ret.isSubclass = true return ret } // NewQBrush8 constructs a new QBrush object. func NewQBrush8(image *QImage) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new8(image.cPointer(), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new8(image.cPointer())) ret.isSubclass = true return ret } // NewQBrush9 constructs a new QBrush object. func NewQBrush9(brush *QBrush) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new9(brush.cPointer(), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new9(brush.cPointer())) ret.isSubclass = true return ret } // NewQBrush10 constructs a new QBrush object. func NewQBrush10(gradient *QGradient) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new10(gradient.cPointer(), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new10(gradient.cPointer())) ret.isSubclass = true return ret } // NewQBrush11 constructs a new QBrush object. func NewQBrush11(color *QColor, bs BrushStyle) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new11(color.cPointer(), (C.int)(bs), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new11(color.cPointer(), (C.int)(bs))) ret.isSubclass = true return ret } // NewQBrush12 constructs a new QBrush object. func NewQBrush12(color GlobalColor, bs BrushStyle) *QBrush { - var outptr_QBrush *C.QBrush = nil - C.QBrush_new12((C.int)(color), (C.int)(bs), &outptr_QBrush) - ret := newQBrush(outptr_QBrush) + ret := newQBrush(C.QBrush_new12((C.int)(color), (C.int)(bs))) ret.isSubclass = true return ret } @@ -403,7 +376,7 @@ func (this *QBrush) SetTransform(transform *QTransform) { } func (this *QBrush) Texture() *QPixmap { - _goptr := newQPixmap(C.QBrush_Texture(this.h), nil) + _goptr := newQPixmap(C.QBrush_Texture(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -413,7 +386,7 @@ func (this *QBrush) SetTexture(pixmap *QPixmap) { } func (this *QBrush) TextureImage() *QImage { - _goptr := newQImage(C.QBrush_TextureImage(this.h), nil) + _goptr := newQImage(C.QBrush_TextureImage(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -492,24 +465,19 @@ func newQBrushData(h *C.QBrushData) *QBrushData { if h == nil { return nil } + return &QBrushData{h: h} } // UnsafeNewQBrushData constructs the type using only unsafe pointers. func UnsafeNewQBrushData(h unsafe.Pointer) *QBrushData { - if h == nil { - return nil - } - - return &QBrushData{h: (*C.QBrushData)(h)} + return newQBrushData((*C.QBrushData)(h)) } // NewQBrushData constructs a new QBrushData object. func NewQBrushData(param1 *QBrushData) *QBrushData { - var outptr_QBrushData *C.QBrushData = nil - C.QBrushData_new(param1.cPointer(), &outptr_QBrushData) - ret := newQBrushData(outptr_QBrushData) + ret := newQBrushData(C.QBrushData_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -556,44 +524,35 @@ func newQGradient(h *C.QGradient) *QGradient { if h == nil { return nil } + return &QGradient{h: h} } // UnsafeNewQGradient constructs the type using only unsafe pointers. func UnsafeNewQGradient(h unsafe.Pointer) *QGradient { - if h == nil { - return nil - } - - return &QGradient{h: (*C.QGradient)(h)} + return newQGradient((*C.QGradient)(h)) } // NewQGradient constructs a new QGradient object. func NewQGradient() *QGradient { - var outptr_QGradient *C.QGradient = nil - C.QGradient_new(&outptr_QGradient) - ret := newQGradient(outptr_QGradient) + ret := newQGradient(C.QGradient_new()) ret.isSubclass = true return ret } // NewQGradient2 constructs a new QGradient object. func NewQGradient2(param1 QGradient__Preset) *QGradient { - var outptr_QGradient *C.QGradient = nil - C.QGradient_new2((C.int)(param1), &outptr_QGradient) - ret := newQGradient(outptr_QGradient) + ret := newQGradient(C.QGradient_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQGradient3 constructs a new QGradient object. func NewQGradient3(param1 *QGradient) *QGradient { - var outptr_QGradient *C.QGradient = nil - C.QGradient_new3(param1.cPointer(), &outptr_QGradient) - ret := newQGradient(outptr_QGradient) + ret := newQGradient(C.QGradient_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -725,64 +684,50 @@ func (this *QLinearGradient) UnsafePointer() unsafe.Pointer { } // newQLinearGradient constructs the type using only CGO pointers. -func newQLinearGradient(h *C.QLinearGradient, h_QGradient *C.QGradient) *QLinearGradient { +func newQLinearGradient(h *C.QLinearGradient) *QLinearGradient { if h == nil { return nil } + var outptr_QGradient *C.QGradient = nil + C.QLinearGradient_virtbase(h, &outptr_QGradient) + return &QLinearGradient{h: h, - QGradient: newQGradient(h_QGradient)} + QGradient: newQGradient(outptr_QGradient)} } // UnsafeNewQLinearGradient constructs the type using only unsafe pointers. -func UnsafeNewQLinearGradient(h unsafe.Pointer, h_QGradient unsafe.Pointer) *QLinearGradient { - if h == nil { - return nil - } - - return &QLinearGradient{h: (*C.QLinearGradient)(h), - QGradient: UnsafeNewQGradient(h_QGradient)} +func UnsafeNewQLinearGradient(h unsafe.Pointer) *QLinearGradient { + return newQLinearGradient((*C.QLinearGradient)(h)) } // NewQLinearGradient constructs a new QLinearGradient object. func NewQLinearGradient() *QLinearGradient { - var outptr_QLinearGradient *C.QLinearGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QLinearGradient_new(&outptr_QLinearGradient, &outptr_QGradient) - ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret := newQLinearGradient(C.QLinearGradient_new()) ret.isSubclass = true return ret } // NewQLinearGradient2 constructs a new QLinearGradient object. func NewQLinearGradient2(start *QPointF, finalStop *QPointF) *QLinearGradient { - var outptr_QLinearGradient *C.QLinearGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QLinearGradient_new2(start.cPointer(), finalStop.cPointer(), &outptr_QLinearGradient, &outptr_QGradient) - ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret := newQLinearGradient(C.QLinearGradient_new2(start.cPointer(), finalStop.cPointer())) ret.isSubclass = true return ret } // NewQLinearGradient3 constructs a new QLinearGradient object. func NewQLinearGradient3(xStart float64, yStart float64, xFinalStop float64, yFinalStop float64) *QLinearGradient { - var outptr_QLinearGradient *C.QLinearGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QLinearGradient_new3((C.double)(xStart), (C.double)(yStart), (C.double)(xFinalStop), (C.double)(yFinalStop), &outptr_QLinearGradient, &outptr_QGradient) - ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret := newQLinearGradient(C.QLinearGradient_new3((C.double)(xStart), (C.double)(yStart), (C.double)(xFinalStop), (C.double)(yFinalStop))) ret.isSubclass = true return ret } // NewQLinearGradient4 constructs a new QLinearGradient object. func NewQLinearGradient4(param1 *QLinearGradient) *QLinearGradient { - var outptr_QLinearGradient *C.QLinearGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QLinearGradient_new4(param1.cPointer(), &outptr_QLinearGradient, &outptr_QGradient) - ret := newQLinearGradient(outptr_QLinearGradient, outptr_QGradient) + ret := newQLinearGradient(C.QLinearGradient_new4(param1.cPointer())) ret.isSubclass = true return ret } @@ -850,108 +795,82 @@ func (this *QRadialGradient) UnsafePointer() unsafe.Pointer { } // newQRadialGradient constructs the type using only CGO pointers. -func newQRadialGradient(h *C.QRadialGradient, h_QGradient *C.QGradient) *QRadialGradient { +func newQRadialGradient(h *C.QRadialGradient) *QRadialGradient { if h == nil { return nil } + var outptr_QGradient *C.QGradient = nil + C.QRadialGradient_virtbase(h, &outptr_QGradient) + return &QRadialGradient{h: h, - QGradient: newQGradient(h_QGradient)} + QGradient: newQGradient(outptr_QGradient)} } // UnsafeNewQRadialGradient constructs the type using only unsafe pointers. -func UnsafeNewQRadialGradient(h unsafe.Pointer, h_QGradient unsafe.Pointer) *QRadialGradient { - if h == nil { - return nil - } - - return &QRadialGradient{h: (*C.QRadialGradient)(h), - QGradient: UnsafeNewQGradient(h_QGradient)} +func UnsafeNewQRadialGradient(h unsafe.Pointer) *QRadialGradient { + return newQRadialGradient((*C.QRadialGradient)(h)) } // NewQRadialGradient constructs a new QRadialGradient object. func NewQRadialGradient() *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new(&outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new()) ret.isSubclass = true return ret } // NewQRadialGradient2 constructs a new QRadialGradient object. func NewQRadialGradient2(center *QPointF, radius float64, focalPoint *QPointF) *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new2(center.cPointer(), (C.double)(radius), focalPoint.cPointer(), &outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new2(center.cPointer(), (C.double)(radius), focalPoint.cPointer())) ret.isSubclass = true return ret } // NewQRadialGradient3 constructs a new QRadialGradient object. func NewQRadialGradient3(cx float64, cy float64, radius float64, fx float64, fy float64) *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(radius), (C.double)(fx), (C.double)(fy), &outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(radius), (C.double)(fx), (C.double)(fy))) ret.isSubclass = true return ret } // NewQRadialGradient4 constructs a new QRadialGradient object. func NewQRadialGradient4(center *QPointF, radius float64) *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new4(center.cPointer(), (C.double)(radius), &outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new4(center.cPointer(), (C.double)(radius))) ret.isSubclass = true return ret } // NewQRadialGradient5 constructs a new QRadialGradient object. func NewQRadialGradient5(cx float64, cy float64, radius float64) *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new5((C.double)(cx), (C.double)(cy), (C.double)(radius), &outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new5((C.double)(cx), (C.double)(cy), (C.double)(radius))) ret.isSubclass = true return ret } // NewQRadialGradient6 constructs a new QRadialGradient object. func NewQRadialGradient6(center *QPointF, centerRadius float64, focalPoint *QPointF, focalRadius float64) *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new6(center.cPointer(), (C.double)(centerRadius), focalPoint.cPointer(), (C.double)(focalRadius), &outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new6(center.cPointer(), (C.double)(centerRadius), focalPoint.cPointer(), (C.double)(focalRadius))) ret.isSubclass = true return ret } // NewQRadialGradient7 constructs a new QRadialGradient object. func NewQRadialGradient7(cx float64, cy float64, centerRadius float64, fx float64, fy float64, focalRadius float64) *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new7((C.double)(cx), (C.double)(cy), (C.double)(centerRadius), (C.double)(fx), (C.double)(fy), (C.double)(focalRadius), &outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new7((C.double)(cx), (C.double)(cy), (C.double)(centerRadius), (C.double)(fx), (C.double)(fy), (C.double)(focalRadius))) ret.isSubclass = true return ret } // NewQRadialGradient8 constructs a new QRadialGradient object. func NewQRadialGradient8(param1 *QRadialGradient) *QRadialGradient { - var outptr_QRadialGradient *C.QRadialGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QRadialGradient_new8(param1.cPointer(), &outptr_QRadialGradient, &outptr_QGradient) - ret := newQRadialGradient(outptr_QRadialGradient, outptr_QGradient) + ret := newQRadialGradient(C.QRadialGradient_new8(param1.cPointer())) ret.isSubclass = true return ret } @@ -1043,64 +962,50 @@ func (this *QConicalGradient) UnsafePointer() unsafe.Pointer { } // newQConicalGradient constructs the type using only CGO pointers. -func newQConicalGradient(h *C.QConicalGradient, h_QGradient *C.QGradient) *QConicalGradient { +func newQConicalGradient(h *C.QConicalGradient) *QConicalGradient { if h == nil { return nil } + var outptr_QGradient *C.QGradient = nil + C.QConicalGradient_virtbase(h, &outptr_QGradient) + return &QConicalGradient{h: h, - QGradient: newQGradient(h_QGradient)} + QGradient: newQGradient(outptr_QGradient)} } // UnsafeNewQConicalGradient constructs the type using only unsafe pointers. -func UnsafeNewQConicalGradient(h unsafe.Pointer, h_QGradient unsafe.Pointer) *QConicalGradient { - if h == nil { - return nil - } - - return &QConicalGradient{h: (*C.QConicalGradient)(h), - QGradient: UnsafeNewQGradient(h_QGradient)} +func UnsafeNewQConicalGradient(h unsafe.Pointer) *QConicalGradient { + return newQConicalGradient((*C.QConicalGradient)(h)) } // NewQConicalGradient constructs a new QConicalGradient object. func NewQConicalGradient() *QConicalGradient { - var outptr_QConicalGradient *C.QConicalGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QConicalGradient_new(&outptr_QConicalGradient, &outptr_QGradient) - ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret := newQConicalGradient(C.QConicalGradient_new()) ret.isSubclass = true return ret } // NewQConicalGradient2 constructs a new QConicalGradient object. func NewQConicalGradient2(center *QPointF, startAngle float64) *QConicalGradient { - var outptr_QConicalGradient *C.QConicalGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QConicalGradient_new2(center.cPointer(), (C.double)(startAngle), &outptr_QConicalGradient, &outptr_QGradient) - ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret := newQConicalGradient(C.QConicalGradient_new2(center.cPointer(), (C.double)(startAngle))) ret.isSubclass = true return ret } // NewQConicalGradient3 constructs a new QConicalGradient object. func NewQConicalGradient3(cx float64, cy float64, startAngle float64) *QConicalGradient { - var outptr_QConicalGradient *C.QConicalGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QConicalGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(startAngle), &outptr_QConicalGradient, &outptr_QGradient) - ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret := newQConicalGradient(C.QConicalGradient_new3((C.double)(cx), (C.double)(cy), (C.double)(startAngle))) ret.isSubclass = true return ret } // NewQConicalGradient4 constructs a new QConicalGradient object. func NewQConicalGradient4(param1 *QConicalGradient) *QConicalGradient { - var outptr_QConicalGradient *C.QConicalGradient = nil - var outptr_QGradient *C.QGradient = nil - C.QConicalGradient_new4(param1.cPointer(), &outptr_QConicalGradient, &outptr_QGradient) - ret := newQConicalGradient(outptr_QConicalGradient, outptr_QGradient) + ret := newQConicalGradient(C.QConicalGradient_new4(param1.cPointer())) ret.isSubclass = true return ret } @@ -1165,24 +1070,19 @@ func newQGradient__QGradientData(h *C.QGradient__QGradientData) *QGradient__QGra if h == nil { return nil } + return &QGradient__QGradientData{h: h} } // UnsafeNewQGradient__QGradientData constructs the type using only unsafe pointers. func UnsafeNewQGradient__QGradientData(h unsafe.Pointer) *QGradient__QGradientData { - if h == nil { - return nil - } - - return &QGradient__QGradientData{h: (*C.QGradient__QGradientData)(h)} + return newQGradient__QGradientData((*C.QGradient__QGradientData)(h)) } // NewQGradient__QGradientData constructs a new QGradient::QGradientData object. func NewQGradient__QGradientData(param1 *QGradient__QGradientData) *QGradient__QGradientData { - var outptr_QGradient__QGradientData *C.QGradient__QGradientData = nil - C.QGradient__QGradientData_new(param1.cPointer(), &outptr_QGradient__QGradientData) - ret := newQGradient__QGradientData(outptr_QGradient__QGradientData) + ret := newQGradient__QGradientData(C.QGradient__QGradientData_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qbrush.h b/qt6/gen_qbrush.h index aa426676..e682881c 100644 --- a/qt6/gen_qbrush.h +++ b/qt6/gen_qbrush.h @@ -46,18 +46,18 @@ typedef struct QRadialGradient QRadialGradient; typedef struct QTransform QTransform; #endif -void QBrush_new(QBrush** outptr_QBrush); -void QBrush_new2(int bs, QBrush** outptr_QBrush); -void QBrush_new3(QColor* color, QBrush** outptr_QBrush); -void QBrush_new4(int color, QBrush** outptr_QBrush); -void QBrush_new5(QColor* color, QPixmap* pixmap, QBrush** outptr_QBrush); -void QBrush_new6(int color, QPixmap* pixmap, QBrush** outptr_QBrush); -void QBrush_new7(QPixmap* pixmap, QBrush** outptr_QBrush); -void QBrush_new8(QImage* image, QBrush** outptr_QBrush); -void QBrush_new9(QBrush* brush, QBrush** outptr_QBrush); -void QBrush_new10(QGradient* gradient, QBrush** outptr_QBrush); -void QBrush_new11(QColor* color, int bs, QBrush** outptr_QBrush); -void QBrush_new12(int color, int bs, QBrush** outptr_QBrush); +QBrush* QBrush_new(); +QBrush* QBrush_new2(int bs); +QBrush* QBrush_new3(QColor* color); +QBrush* QBrush_new4(int color); +QBrush* QBrush_new5(QColor* color, QPixmap* pixmap); +QBrush* QBrush_new6(int color, QPixmap* pixmap); +QBrush* QBrush_new7(QPixmap* pixmap); +QBrush* QBrush_new8(QImage* image); +QBrush* QBrush_new9(QBrush* brush); +QBrush* QBrush_new10(QGradient* gradient); +QBrush* QBrush_new11(QColor* color, int bs); +QBrush* QBrush_new12(int color, int bs); void QBrush_OperatorAssign(QBrush* self, QBrush* brush); void QBrush_Swap(QBrush* self, QBrush* other); int QBrush_Style(const QBrush* self); @@ -78,13 +78,13 @@ bool QBrush_OperatorNotEqual(const QBrush* self, QBrush* b); bool QBrush_IsDetached(const QBrush* self); void QBrush_Delete(QBrush* self, bool isSubclass); -void QBrushData_new(QBrushData* param1, QBrushData** outptr_QBrushData); +QBrushData* QBrushData_new(QBrushData* param1); void QBrushData_OperatorAssign(QBrushData* self, QBrushData* param1); void QBrushData_Delete(QBrushData* self, bool isSubclass); -void QGradient_new(QGradient** outptr_QGradient); -void QGradient_new2(int param1, QGradient** outptr_QGradient); -void QGradient_new3(QGradient* param1, QGradient** outptr_QGradient); +QGradient* QGradient_new(); +QGradient* QGradient_new2(int param1); +QGradient* QGradient_new3(QGradient* param1); int QGradient_Type(const QGradient* self); void QGradient_SetSpread(QGradient* self, int spread); int QGradient_Spread(const QGradient* self); @@ -99,10 +99,11 @@ bool QGradient_OperatorEqual(const QGradient* self, QGradient* gradient); bool QGradient_OperatorNotEqual(const QGradient* self, QGradient* other); void QGradient_Delete(QGradient* self, bool isSubclass); -void QLinearGradient_new(QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); -void QLinearGradient_new2(QPointF* start, QPointF* finalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); -void QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); -void QLinearGradient_new4(QLinearGradient* param1, QLinearGradient** outptr_QLinearGradient, QGradient** outptr_QGradient); +QLinearGradient* QLinearGradient_new(); +QLinearGradient* QLinearGradient_new2(QPointF* start, QPointF* finalStop); +QLinearGradient* QLinearGradient_new3(double xStart, double yStart, double xFinalStop, double yFinalStop); +QLinearGradient* QLinearGradient_new4(QLinearGradient* param1); +void QLinearGradient_virtbase(QLinearGradient* src, QGradient** outptr_QGradient); QPointF* QLinearGradient_Start(const QLinearGradient* self); void QLinearGradient_SetStart(QLinearGradient* self, QPointF* start); void QLinearGradient_SetStart2(QLinearGradient* self, double x, double y); @@ -111,14 +112,15 @@ void QLinearGradient_SetFinalStop(QLinearGradient* self, QPointF* stop); void QLinearGradient_SetFinalStop2(QLinearGradient* self, double x, double y); void QLinearGradient_Delete(QLinearGradient* self, bool isSubclass); -void QRadialGradient_new(QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); -void QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); -void QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); -void QRadialGradient_new4(QPointF* center, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); -void QRadialGradient_new5(double cx, double cy, double radius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); -void QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); -void QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); -void QRadialGradient_new8(QRadialGradient* param1, QRadialGradient** outptr_QRadialGradient, QGradient** outptr_QGradient); +QRadialGradient* QRadialGradient_new(); +QRadialGradient* QRadialGradient_new2(QPointF* center, double radius, QPointF* focalPoint); +QRadialGradient* QRadialGradient_new3(double cx, double cy, double radius, double fx, double fy); +QRadialGradient* QRadialGradient_new4(QPointF* center, double radius); +QRadialGradient* QRadialGradient_new5(double cx, double cy, double radius); +QRadialGradient* QRadialGradient_new6(QPointF* center, double centerRadius, QPointF* focalPoint, double focalRadius); +QRadialGradient* QRadialGradient_new7(double cx, double cy, double centerRadius, double fx, double fy, double focalRadius); +QRadialGradient* QRadialGradient_new8(QRadialGradient* param1); +void QRadialGradient_virtbase(QRadialGradient* src, QGradient** outptr_QGradient); QPointF* QRadialGradient_Center(const QRadialGradient* self); void QRadialGradient_SetCenter(QRadialGradient* self, QPointF* center); void QRadialGradient_SetCenter2(QRadialGradient* self, double x, double y); @@ -133,10 +135,11 @@ double QRadialGradient_FocalRadius(const QRadialGradient* self); void QRadialGradient_SetFocalRadius(QRadialGradient* self, double radius); void QRadialGradient_Delete(QRadialGradient* self, bool isSubclass); -void QConicalGradient_new(QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); -void QConicalGradient_new2(QPointF* center, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); -void QConicalGradient_new3(double cx, double cy, double startAngle, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); -void QConicalGradient_new4(QConicalGradient* param1, QConicalGradient** outptr_QConicalGradient, QGradient** outptr_QGradient); +QConicalGradient* QConicalGradient_new(); +QConicalGradient* QConicalGradient_new2(QPointF* center, double startAngle); +QConicalGradient* QConicalGradient_new3(double cx, double cy, double startAngle); +QConicalGradient* QConicalGradient_new4(QConicalGradient* param1); +void QConicalGradient_virtbase(QConicalGradient* src, QGradient** outptr_QGradient); QPointF* QConicalGradient_Center(const QConicalGradient* self); void QConicalGradient_SetCenter(QConicalGradient* self, QPointF* center); void QConicalGradient_SetCenter2(QConicalGradient* self, double x, double y); @@ -144,7 +147,7 @@ double QConicalGradient_Angle(const QConicalGradient* self); void QConicalGradient_SetAngle(QConicalGradient* self, double angle); void QConicalGradient_Delete(QConicalGradient* self, bool isSubclass); -void QGradient__QGradientData_new(QGradient__QGradientData* param1, QGradient__QGradientData** outptr_QGradient__QGradientData); +QGradient__QGradientData* QGradient__QGradientData_new(QGradient__QGradientData* param1); void QGradient__QGradientData_Delete(QGradient__QGradientData* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qbuffer.cpp b/qt6/gen_qbuffer.cpp index 529c2586..3194d046 100644 --- a/qt6/gen_qbuffer.cpp +++ b/qt6/gen_qbuffer.cpp @@ -474,20 +474,16 @@ public: }; -void QBuffer_new(QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQBuffer* ret = new MiqtVirtualQBuffer(); - *outptr_QBuffer = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QBuffer* QBuffer_new() { + return new MiqtVirtualQBuffer(); } -void QBuffer_new2(QObject* parent, QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQBuffer* ret = new MiqtVirtualQBuffer(parent); - *outptr_QBuffer = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QBuffer* QBuffer_new2(QObject* parent) { + return new MiqtVirtualQBuffer(parent); +} + +void QBuffer_virtbase(QBuffer* src, QIODevice** outptr_QIODevice) { + *outptr_QIODevice = static_cast(src); } QMetaObject* QBuffer_MetaObject(const QBuffer* self) { diff --git a/qt6/gen_qbuffer.go b/qt6/gen_qbuffer.go index 06187c07..9952364a 100644 --- a/qt6/gen_qbuffer.go +++ b/qt6/gen_qbuffer.go @@ -35,46 +35,34 @@ func (this *QBuffer) UnsafePointer() unsafe.Pointer { } // newQBuffer constructs the type using only CGO pointers. -func newQBuffer(h *C.QBuffer, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QBuffer { +func newQBuffer(h *C.QBuffer) *QBuffer { if h == nil { return nil } + var outptr_QIODevice *C.QIODevice = nil + C.QBuffer_virtbase(h, &outptr_QIODevice) + return &QBuffer{h: h, - QIODevice: newQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} + QIODevice: newQIODevice(outptr_QIODevice)} } // UnsafeNewQBuffer constructs the type using only unsafe pointers. -func UnsafeNewQBuffer(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QBuffer { - if h == nil { - return nil - } - - return &QBuffer{h: (*C.QBuffer)(h), - QIODevice: UnsafeNewQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} +func UnsafeNewQBuffer(h unsafe.Pointer) *QBuffer { + return newQBuffer((*C.QBuffer)(h)) } // NewQBuffer constructs a new QBuffer object. func NewQBuffer() *QBuffer { - var outptr_QBuffer *C.QBuffer = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QBuffer_new(&outptr_QBuffer, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQBuffer(outptr_QBuffer, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQBuffer(C.QBuffer_new()) ret.isSubclass = true return ret } // NewQBuffer2 constructs a new QBuffer object. func NewQBuffer2(parent *QObject) *QBuffer { - var outptr_QBuffer *C.QBuffer = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QBuffer_new2(parent.cPointer(), &outptr_QBuffer, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQBuffer(outptr_QBuffer, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQBuffer(C.QBuffer_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qbuffer.h b/qt6/gen_qbuffer.h index 9481f09e..c7e11044 100644 --- a/qt6/gen_qbuffer.h +++ b/qt6/gen_qbuffer.h @@ -30,8 +30,9 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -void QBuffer_new(QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QBuffer_new2(QObject* parent, QBuffer** outptr_QBuffer, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +QBuffer* QBuffer_new(); +QBuffer* QBuffer_new2(QObject* parent); +void QBuffer_virtbase(QBuffer* src, QIODevice** outptr_QIODevice); QMetaObject* QBuffer_MetaObject(const QBuffer* self); void* QBuffer_Metacast(QBuffer* self, const char* param1); struct miqt_string QBuffer_Tr(const char* s); diff --git a/qt6/gen_qbuttongroup.cpp b/qt6/gen_qbuttongroup.cpp index 58137e94..8dfd3e51 100644 --- a/qt6/gen_qbuttongroup.cpp +++ b/qt6/gen_qbuttongroup.cpp @@ -195,16 +195,16 @@ public: }; -void QButtonGroup_new(QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject) { - MiqtVirtualQButtonGroup* ret = new MiqtVirtualQButtonGroup(); - *outptr_QButtonGroup = ret; - *outptr_QObject = static_cast(ret); +QButtonGroup* QButtonGroup_new() { + return new MiqtVirtualQButtonGroup(); } -void QButtonGroup_new2(QObject* parent, QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject) { - MiqtVirtualQButtonGroup* ret = new MiqtVirtualQButtonGroup(parent); - *outptr_QButtonGroup = ret; - *outptr_QObject = static_cast(ret); +QButtonGroup* QButtonGroup_new2(QObject* parent) { + return new MiqtVirtualQButtonGroup(parent); +} + +void QButtonGroup_virtbase(QButtonGroup* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QButtonGroup_MetaObject(const QButtonGroup* self) { diff --git a/qt6/gen_qbuttongroup.go b/qt6/gen_qbuttongroup.go index fc9cda87..dd43b08d 100644 --- a/qt6/gen_qbuttongroup.go +++ b/qt6/gen_qbuttongroup.go @@ -35,42 +35,34 @@ func (this *QButtonGroup) UnsafePointer() unsafe.Pointer { } // newQButtonGroup constructs the type using only CGO pointers. -func newQButtonGroup(h *C.QButtonGroup, h_QObject *C.QObject) *QButtonGroup { +func newQButtonGroup(h *C.QButtonGroup) *QButtonGroup { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QButtonGroup_virtbase(h, &outptr_QObject) + return &QButtonGroup{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQButtonGroup constructs the type using only unsafe pointers. -func UnsafeNewQButtonGroup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QButtonGroup { - if h == nil { - return nil - } - - return &QButtonGroup{h: (*C.QButtonGroup)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQButtonGroup(h unsafe.Pointer) *QButtonGroup { + return newQButtonGroup((*C.QButtonGroup)(h)) } // NewQButtonGroup constructs a new QButtonGroup object. func NewQButtonGroup() *QButtonGroup { - var outptr_QButtonGroup *C.QButtonGroup = nil - var outptr_QObject *C.QObject = nil - C.QButtonGroup_new(&outptr_QButtonGroup, &outptr_QObject) - ret := newQButtonGroup(outptr_QButtonGroup, outptr_QObject) + ret := newQButtonGroup(C.QButtonGroup_new()) ret.isSubclass = true return ret } // NewQButtonGroup2 constructs a new QButtonGroup object. func NewQButtonGroup2(parent *QObject) *QButtonGroup { - var outptr_QButtonGroup *C.QButtonGroup = nil - var outptr_QObject *C.QObject = nil - C.QButtonGroup_new2(parent.cPointer(), &outptr_QButtonGroup, &outptr_QObject) - ret := newQButtonGroup(outptr_QButtonGroup, outptr_QObject) + ret := newQButtonGroup(C.QButtonGroup_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -115,17 +107,17 @@ func (this *QButtonGroup) Buttons() []*QAbstractButton { _ret := make([]*QAbstractButton, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractButton)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAbstractButton(_outCast[i], nil, nil, nil) + _ret[i] = newQAbstractButton(_outCast[i]) } return _ret } func (this *QButtonGroup) CheckedButton() *QAbstractButton { - return newQAbstractButton(C.QButtonGroup_CheckedButton(this.h), nil, nil, nil) + return newQAbstractButton(C.QButtonGroup_CheckedButton(this.h)) } func (this *QButtonGroup) Button(id int) *QAbstractButton { - return newQAbstractButton(C.QButtonGroup_Button(this.h, (C.int)(id)), nil, nil, nil) + return newQAbstractButton(C.QButtonGroup_Button(this.h, (C.int)(id))) } func (this *QButtonGroup) SetId(button *QAbstractButton, id int) { @@ -155,7 +147,7 @@ func miqt_exec_callback_QButtonGroup_ButtonClicked(cb C.intptr_t, param1 *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractButton(param1, nil, nil, nil) + slotval1 := newQAbstractButton(param1) gofunc(slotval1) } @@ -175,7 +167,7 @@ func miqt_exec_callback_QButtonGroup_ButtonPressed(cb C.intptr_t, param1 *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractButton(param1, nil, nil, nil) + slotval1 := newQAbstractButton(param1) gofunc(slotval1) } @@ -195,7 +187,7 @@ func miqt_exec_callback_QButtonGroup_ButtonReleased(cb C.intptr_t, param1 *C.QAb } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractButton(param1, nil, nil, nil) + slotval1 := newQAbstractButton(param1) gofunc(slotval1) } @@ -215,7 +207,7 @@ func miqt_exec_callback_QButtonGroup_ButtonToggled(cb C.intptr_t, param1 *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractButton(param1, nil, nil, nil) + slotval1 := newQAbstractButton(param1) slotval2 := (bool)(param2) @@ -408,7 +400,7 @@ func miqt_exec_callback_QButtonGroup_TimerEvent(self *C.QButtonGroup, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QButtonGroup{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -434,7 +426,7 @@ func miqt_exec_callback_QButtonGroup_ChildEvent(self *C.QButtonGroup, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QButtonGroup{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qbuttongroup.h b/qt6/gen_qbuttongroup.h index 36bf656a..04c28b63 100644 --- a/qt6/gen_qbuttongroup.h +++ b/qt6/gen_qbuttongroup.h @@ -34,8 +34,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QButtonGroup_new(QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject); -void QButtonGroup_new2(QObject* parent, QButtonGroup** outptr_QButtonGroup, QObject** outptr_QObject); +QButtonGroup* QButtonGroup_new(); +QButtonGroup* QButtonGroup_new2(QObject* parent); +void QButtonGroup_virtbase(QButtonGroup* src, QObject** outptr_QObject); QMetaObject* QButtonGroup_MetaObject(const QButtonGroup* self); void* QButtonGroup_Metacast(QButtonGroup* self, const char* param1); struct miqt_string QButtonGroup_Tr(const char* s); diff --git a/qt6/gen_qbytearraymatcher.cpp b/qt6/gen_qbytearraymatcher.cpp index 72c131cf..e0803543 100644 --- a/qt6/gen_qbytearraymatcher.cpp +++ b/qt6/gen_qbytearraymatcher.cpp @@ -6,35 +6,29 @@ #include "gen_qbytearraymatcher.h" #include "_cgo_export.h" -void QByteArrayMatcher_new(QByteArrayMatcher** outptr_QByteArrayMatcher) { - QByteArrayMatcher* ret = new QByteArrayMatcher(); - *outptr_QByteArrayMatcher = ret; +QByteArrayMatcher* QByteArrayMatcher_new() { + return new QByteArrayMatcher(); } -void QByteArrayMatcher_new2(struct miqt_string pattern, QByteArrayMatcher** outptr_QByteArrayMatcher) { +QByteArrayMatcher* QByteArrayMatcher_new2(struct miqt_string pattern) { QByteArray pattern_QByteArray(pattern.data, pattern.len); - QByteArrayMatcher* ret = new QByteArrayMatcher(pattern_QByteArray); - *outptr_QByteArrayMatcher = ret; + return new QByteArrayMatcher(pattern_QByteArray); } -void QByteArrayMatcher_new3(QByteArrayView* pattern, QByteArrayMatcher** outptr_QByteArrayMatcher) { - QByteArrayMatcher* ret = new QByteArrayMatcher(*pattern); - *outptr_QByteArrayMatcher = ret; +QByteArrayMatcher* QByteArrayMatcher_new3(QByteArrayView* pattern) { + return new QByteArrayMatcher(*pattern); } -void QByteArrayMatcher_new4(const char* pattern, QByteArrayMatcher** outptr_QByteArrayMatcher) { - QByteArrayMatcher* ret = new QByteArrayMatcher(pattern); - *outptr_QByteArrayMatcher = ret; +QByteArrayMatcher* QByteArrayMatcher_new4(const char* pattern) { + return new QByteArrayMatcher(pattern); } -void QByteArrayMatcher_new5(QByteArrayMatcher* other, QByteArrayMatcher** outptr_QByteArrayMatcher) { - QByteArrayMatcher* ret = new QByteArrayMatcher(*other); - *outptr_QByteArrayMatcher = ret; +QByteArrayMatcher* QByteArrayMatcher_new5(QByteArrayMatcher* other) { + return new QByteArrayMatcher(*other); } -void QByteArrayMatcher_new6(const char* pattern, ptrdiff_t length, QByteArrayMatcher** outptr_QByteArrayMatcher) { - QByteArrayMatcher* ret = new QByteArrayMatcher(pattern, (qsizetype)(length)); - *outptr_QByteArrayMatcher = ret; +QByteArrayMatcher* QByteArrayMatcher_new6(const char* pattern, ptrdiff_t length) { + return new QByteArrayMatcher(pattern, (qsizetype)(length)); } void QByteArrayMatcher_OperatorAssign(QByteArrayMatcher* self, QByteArrayMatcher* other) { diff --git a/qt6/gen_qbytearraymatcher.go b/qt6/gen_qbytearraymatcher.go index b66e6489..ec0b4c88 100644 --- a/qt6/gen_qbytearraymatcher.go +++ b/qt6/gen_qbytearraymatcher.go @@ -37,24 +37,19 @@ func newQByteArrayMatcher(h *C.QByteArrayMatcher) *QByteArrayMatcher { if h == nil { return nil } + return &QByteArrayMatcher{h: h} } // UnsafeNewQByteArrayMatcher constructs the type using only unsafe pointers. func UnsafeNewQByteArrayMatcher(h unsafe.Pointer) *QByteArrayMatcher { - if h == nil { - return nil - } - - return &QByteArrayMatcher{h: (*C.QByteArrayMatcher)(h)} + return newQByteArrayMatcher((*C.QByteArrayMatcher)(h)) } // NewQByteArrayMatcher constructs a new QByteArrayMatcher object. func NewQByteArrayMatcher() *QByteArrayMatcher { - var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil - C.QByteArrayMatcher_new(&outptr_QByteArrayMatcher) - ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(C.QByteArrayMatcher_new()) ret.isSubclass = true return ret } @@ -64,20 +59,16 @@ func NewQByteArrayMatcher2(pattern []byte) *QByteArrayMatcher { pattern_alias := C.struct_miqt_string{} pattern_alias.data = (*C.char)(unsafe.Pointer(&pattern[0])) pattern_alias.len = C.size_t(len(pattern)) - var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil - C.QByteArrayMatcher_new2(pattern_alias, &outptr_QByteArrayMatcher) - ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(C.QByteArrayMatcher_new2(pattern_alias)) ret.isSubclass = true return ret } // NewQByteArrayMatcher3 constructs a new QByteArrayMatcher object. func NewQByteArrayMatcher3(pattern QByteArrayView) *QByteArrayMatcher { - var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil - C.QByteArrayMatcher_new3(pattern.cPointer(), &outptr_QByteArrayMatcher) - ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(C.QByteArrayMatcher_new3(pattern.cPointer())) ret.isSubclass = true return ret } @@ -86,20 +77,16 @@ func NewQByteArrayMatcher3(pattern QByteArrayView) *QByteArrayMatcher { func NewQByteArrayMatcher4(pattern string) *QByteArrayMatcher { pattern_Cstring := C.CString(pattern) defer C.free(unsafe.Pointer(pattern_Cstring)) - var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil - C.QByteArrayMatcher_new4(pattern_Cstring, &outptr_QByteArrayMatcher) - ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(C.QByteArrayMatcher_new4(pattern_Cstring)) ret.isSubclass = true return ret } // NewQByteArrayMatcher5 constructs a new QByteArrayMatcher object. func NewQByteArrayMatcher5(other *QByteArrayMatcher) *QByteArrayMatcher { - var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil - C.QByteArrayMatcher_new5(other.cPointer(), &outptr_QByteArrayMatcher) - ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(C.QByteArrayMatcher_new5(other.cPointer())) ret.isSubclass = true return ret } @@ -108,10 +95,8 @@ func NewQByteArrayMatcher5(other *QByteArrayMatcher) *QByteArrayMatcher { func NewQByteArrayMatcher6(pattern string, length int64) *QByteArrayMatcher { pattern_Cstring := C.CString(pattern) defer C.free(unsafe.Pointer(pattern_Cstring)) - var outptr_QByteArrayMatcher *C.QByteArrayMatcher = nil - C.QByteArrayMatcher_new6(pattern_Cstring, (C.ptrdiff_t)(length), &outptr_QByteArrayMatcher) - ret := newQByteArrayMatcher(outptr_QByteArrayMatcher) + ret := newQByteArrayMatcher(C.QByteArrayMatcher_new6(pattern_Cstring, (C.ptrdiff_t)(length))) ret.isSubclass = true return ret } @@ -192,14 +177,11 @@ func newQStaticByteArrayMatcherBase(h *C.QStaticByteArrayMatcherBase) *QStaticBy if h == nil { return nil } + return &QStaticByteArrayMatcherBase{h: h} } // UnsafeNewQStaticByteArrayMatcherBase constructs the type using only unsafe pointers. func UnsafeNewQStaticByteArrayMatcherBase(h unsafe.Pointer) *QStaticByteArrayMatcherBase { - if h == nil { - return nil - } - - return &QStaticByteArrayMatcherBase{h: (*C.QStaticByteArrayMatcherBase)(h)} + return newQStaticByteArrayMatcherBase((*C.QStaticByteArrayMatcherBase)(h)) } diff --git a/qt6/gen_qbytearraymatcher.h b/qt6/gen_qbytearraymatcher.h index ebe6273f..de6fd546 100644 --- a/qt6/gen_qbytearraymatcher.h +++ b/qt6/gen_qbytearraymatcher.h @@ -24,12 +24,12 @@ typedef struct QByteArrayView QByteArrayView; typedef struct QStaticByteArrayMatcherBase QStaticByteArrayMatcherBase; #endif -void QByteArrayMatcher_new(QByteArrayMatcher** outptr_QByteArrayMatcher); -void QByteArrayMatcher_new2(struct miqt_string pattern, QByteArrayMatcher** outptr_QByteArrayMatcher); -void QByteArrayMatcher_new3(QByteArrayView* pattern, QByteArrayMatcher** outptr_QByteArrayMatcher); -void QByteArrayMatcher_new4(const char* pattern, QByteArrayMatcher** outptr_QByteArrayMatcher); -void QByteArrayMatcher_new5(QByteArrayMatcher* other, QByteArrayMatcher** outptr_QByteArrayMatcher); -void QByteArrayMatcher_new6(const char* pattern, ptrdiff_t length, QByteArrayMatcher** outptr_QByteArrayMatcher); +QByteArrayMatcher* QByteArrayMatcher_new(); +QByteArrayMatcher* QByteArrayMatcher_new2(struct miqt_string pattern); +QByteArrayMatcher* QByteArrayMatcher_new3(QByteArrayView* pattern); +QByteArrayMatcher* QByteArrayMatcher_new4(const char* pattern); +QByteArrayMatcher* QByteArrayMatcher_new5(QByteArrayMatcher* other); +QByteArrayMatcher* QByteArrayMatcher_new6(const char* pattern, ptrdiff_t length); void QByteArrayMatcher_OperatorAssign(QByteArrayMatcher* self, QByteArrayMatcher* other); void QByteArrayMatcher_SetPattern(QByteArrayMatcher* self, struct miqt_string pattern); ptrdiff_t QByteArrayMatcher_IndexIn(const QByteArrayMatcher* self, const char* str, ptrdiff_t lenVal); diff --git a/qt6/gen_qbytearrayview.cpp b/qt6/gen_qbytearrayview.cpp index e9991a30..f29680f8 100644 --- a/qt6/gen_qbytearrayview.cpp +++ b/qt6/gen_qbytearrayview.cpp @@ -4,14 +4,12 @@ #include "gen_qbytearrayview.h" #include "_cgo_export.h" -void QByteArrayView_new(QByteArrayView** outptr_QByteArrayView) { - QByteArrayView* ret = new QByteArrayView(); - *outptr_QByteArrayView = ret; +QByteArrayView* QByteArrayView_new() { + return new QByteArrayView(); } -void QByteArrayView_new2(QByteArrayView* param1, QByteArrayView** outptr_QByteArrayView) { - QByteArrayView* ret = new QByteArrayView(*param1); - *outptr_QByteArrayView = ret; +QByteArrayView* QByteArrayView_new2(QByteArrayView* param1) { + return new QByteArrayView(*param1); } struct miqt_string QByteArrayView_ToByteArray(const QByteArrayView* self) { diff --git a/qt6/gen_qbytearrayview.go b/qt6/gen_qbytearrayview.go index 662ea308..4ba31225 100644 --- a/qt6/gen_qbytearrayview.go +++ b/qt6/gen_qbytearrayview.go @@ -37,34 +37,27 @@ func newQByteArrayView(h *C.QByteArrayView) *QByteArrayView { if h == nil { return nil } + return &QByteArrayView{h: h} } // UnsafeNewQByteArrayView constructs the type using only unsafe pointers. func UnsafeNewQByteArrayView(h unsafe.Pointer) *QByteArrayView { - if h == nil { - return nil - } - - return &QByteArrayView{h: (*C.QByteArrayView)(h)} + return newQByteArrayView((*C.QByteArrayView)(h)) } // NewQByteArrayView constructs a new QByteArrayView object. func NewQByteArrayView() *QByteArrayView { - var outptr_QByteArrayView *C.QByteArrayView = nil - C.QByteArrayView_new(&outptr_QByteArrayView) - ret := newQByteArrayView(outptr_QByteArrayView) + ret := newQByteArrayView(C.QByteArrayView_new()) ret.isSubclass = true return ret } // NewQByteArrayView2 constructs a new QByteArrayView object. func NewQByteArrayView2(param1 *QByteArrayView) *QByteArrayView { - var outptr_QByteArrayView *C.QByteArrayView = nil - C.QByteArrayView_new2(param1.cPointer(), &outptr_QByteArrayView) - ret := newQByteArrayView(outptr_QByteArrayView) + ret := newQByteArrayView(C.QByteArrayView_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qbytearrayview.h b/qt6/gen_qbytearrayview.h index 5f71906f..0cb48033 100644 --- a/qt6/gen_qbytearrayview.h +++ b/qt6/gen_qbytearrayview.h @@ -20,8 +20,8 @@ class QByteArrayView; typedef struct QByteArrayView QByteArrayView; #endif -void QByteArrayView_new(QByteArrayView** outptr_QByteArrayView); -void QByteArrayView_new2(QByteArrayView* param1, QByteArrayView** outptr_QByteArrayView); +QByteArrayView* QByteArrayView_new(); +QByteArrayView* QByteArrayView_new2(QByteArrayView* param1); struct miqt_string QByteArrayView_ToByteArray(const QByteArrayView* self); ptrdiff_t QByteArrayView_Size(const QByteArrayView* self); const char* QByteArrayView_Data(const QByteArrayView* self); diff --git a/qt6/gen_qcalendar.cpp b/qt6/gen_qcalendar.cpp index c01f4ec6..ad3392aa 100644 --- a/qt6/gen_qcalendar.cpp +++ b/qt6/gen_qcalendar.cpp @@ -12,24 +12,20 @@ #include "gen_qcalendar.h" #include "_cgo_export.h" -void QCalendar_new(QCalendar** outptr_QCalendar) { - QCalendar* ret = new QCalendar(); - *outptr_QCalendar = ret; +QCalendar* QCalendar_new() { + return new QCalendar(); } -void QCalendar_new2(int system, QCalendar** outptr_QCalendar) { - QCalendar* ret = new QCalendar(static_cast(system)); - *outptr_QCalendar = ret; +QCalendar* QCalendar_new2(int system) { + return new QCalendar(static_cast(system)); } -void QCalendar_new3(QAnyStringView* name, QCalendar** outptr_QCalendar) { - QCalendar* ret = new QCalendar(*name); - *outptr_QCalendar = ret; +QCalendar* QCalendar_new3(QAnyStringView* name) { + return new QCalendar(*name); } -void QCalendar_new4(QCalendar__SystemId* id, QCalendar** outptr_QCalendar) { - QCalendar* ret = new QCalendar(*id); - *outptr_QCalendar = ret; +QCalendar* QCalendar_new4(QCalendar__SystemId* id) { + return new QCalendar(*id); } bool QCalendar_IsValid(const QCalendar* self) { @@ -261,24 +257,20 @@ void QCalendar_Delete(QCalendar* self, bool isSubclass) { } } -void QCalendar__YearMonthDay_new(QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { - QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(); - *outptr_QCalendar__YearMonthDay = ret; +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new() { + return new QCalendar::YearMonthDay(); } -void QCalendar__YearMonthDay_new2(int y, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { - QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(static_cast(y)); - *outptr_QCalendar__YearMonthDay = ret; +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new2(int y) { + return new QCalendar::YearMonthDay(static_cast(y)); } -void QCalendar__YearMonthDay_new3(int y, int m, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { - QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(static_cast(y), static_cast(m)); - *outptr_QCalendar__YearMonthDay = ret; +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new3(int y, int m) { + return new QCalendar::YearMonthDay(static_cast(y), static_cast(m)); } -void QCalendar__YearMonthDay_new4(int y, int m, int d, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay) { - QCalendar::YearMonthDay* ret = new QCalendar::YearMonthDay(static_cast(y), static_cast(m), static_cast(d)); - *outptr_QCalendar__YearMonthDay = ret; +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new4(int y, int m, int d) { + return new QCalendar::YearMonthDay(static_cast(y), static_cast(m), static_cast(d)); } bool QCalendar__YearMonthDay_IsValid(const QCalendar__YearMonthDay* self) { @@ -293,9 +285,8 @@ void QCalendar__YearMonthDay_Delete(QCalendar__YearMonthDay* self, bool isSubcla } } -void QCalendar__SystemId_new(QCalendar__SystemId** outptr_QCalendar__SystemId) { - QCalendar::SystemId* ret = new QCalendar::SystemId(); - *outptr_QCalendar__SystemId = ret; +QCalendar__SystemId* QCalendar__SystemId_new() { + return new QCalendar::SystemId(); } size_t QCalendar__SystemId_Index(const QCalendar__SystemId* self) { diff --git a/qt6/gen_qcalendar.go b/qt6/gen_qcalendar.go index 8213f923..f7697e98 100644 --- a/qt6/gen_qcalendar.go +++ b/qt6/gen_qcalendar.go @@ -55,54 +55,43 @@ func newQCalendar(h *C.QCalendar) *QCalendar { if h == nil { return nil } + return &QCalendar{h: h} } // UnsafeNewQCalendar constructs the type using only unsafe pointers. func UnsafeNewQCalendar(h unsafe.Pointer) *QCalendar { - if h == nil { - return nil - } - - return &QCalendar{h: (*C.QCalendar)(h)} + return newQCalendar((*C.QCalendar)(h)) } // NewQCalendar constructs a new QCalendar object. func NewQCalendar() *QCalendar { - var outptr_QCalendar *C.QCalendar = nil - C.QCalendar_new(&outptr_QCalendar) - ret := newQCalendar(outptr_QCalendar) + ret := newQCalendar(C.QCalendar_new()) ret.isSubclass = true return ret } // NewQCalendar2 constructs a new QCalendar object. func NewQCalendar2(system QCalendar__System) *QCalendar { - var outptr_QCalendar *C.QCalendar = nil - C.QCalendar_new2((C.int)(system), &outptr_QCalendar) - ret := newQCalendar(outptr_QCalendar) + ret := newQCalendar(C.QCalendar_new2((C.int)(system))) ret.isSubclass = true return ret } // NewQCalendar3 constructs a new QCalendar object. func NewQCalendar3(name QAnyStringView) *QCalendar { - var outptr_QCalendar *C.QCalendar = nil - C.QCalendar_new3(name.cPointer(), &outptr_QCalendar) - ret := newQCalendar(outptr_QCalendar) + ret := newQCalendar(C.QCalendar_new3(name.cPointer())) ret.isSubclass = true return ret } // NewQCalendar4 constructs a new QCalendar object. func NewQCalendar4(id QCalendar__SystemId) *QCalendar { - var outptr_QCalendar *C.QCalendar = nil - C.QCalendar_new4(id.cPointer(), &outptr_QCalendar) - ret := newQCalendar(outptr_QCalendar) + ret := newQCalendar(C.QCalendar_new4(id.cPointer())) ret.isSubclass = true return ret } @@ -321,54 +310,43 @@ func newQCalendar__YearMonthDay(h *C.QCalendar__YearMonthDay) *QCalendar__YearMo if h == nil { return nil } + return &QCalendar__YearMonthDay{h: h} } // UnsafeNewQCalendar__YearMonthDay constructs the type using only unsafe pointers. func UnsafeNewQCalendar__YearMonthDay(h unsafe.Pointer) *QCalendar__YearMonthDay { - if h == nil { - return nil - } - - return &QCalendar__YearMonthDay{h: (*C.QCalendar__YearMonthDay)(h)} + return newQCalendar__YearMonthDay((*C.QCalendar__YearMonthDay)(h)) } // NewQCalendar__YearMonthDay constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay() *QCalendar__YearMonthDay { - var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil - C.QCalendar__YearMonthDay_new(&outptr_QCalendar__YearMonthDay) - ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(C.QCalendar__YearMonthDay_new()) ret.isSubclass = true return ret } // NewQCalendar__YearMonthDay2 constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay2(y int) *QCalendar__YearMonthDay { - var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil - C.QCalendar__YearMonthDay_new2((C.int)(y), &outptr_QCalendar__YearMonthDay) - ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(C.QCalendar__YearMonthDay_new2((C.int)(y))) ret.isSubclass = true return ret } // NewQCalendar__YearMonthDay3 constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay3(y int, m int) *QCalendar__YearMonthDay { - var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil - C.QCalendar__YearMonthDay_new3((C.int)(y), (C.int)(m), &outptr_QCalendar__YearMonthDay) - ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(C.QCalendar__YearMonthDay_new3((C.int)(y), (C.int)(m))) ret.isSubclass = true return ret } // NewQCalendar__YearMonthDay4 constructs a new QCalendar::YearMonthDay object. func NewQCalendar__YearMonthDay4(y int, m int, d int) *QCalendar__YearMonthDay { - var outptr_QCalendar__YearMonthDay *C.QCalendar__YearMonthDay = nil - C.QCalendar__YearMonthDay_new4((C.int)(y), (C.int)(m), (C.int)(d), &outptr_QCalendar__YearMonthDay) - ret := newQCalendar__YearMonthDay(outptr_QCalendar__YearMonthDay) + ret := newQCalendar__YearMonthDay(C.QCalendar__YearMonthDay_new4((C.int)(y), (C.int)(m), (C.int)(d))) ret.isSubclass = true return ret } @@ -415,24 +393,19 @@ func newQCalendar__SystemId(h *C.QCalendar__SystemId) *QCalendar__SystemId { if h == nil { return nil } + return &QCalendar__SystemId{h: h} } // UnsafeNewQCalendar__SystemId constructs the type using only unsafe pointers. func UnsafeNewQCalendar__SystemId(h unsafe.Pointer) *QCalendar__SystemId { - if h == nil { - return nil - } - - return &QCalendar__SystemId{h: (*C.QCalendar__SystemId)(h)} + return newQCalendar__SystemId((*C.QCalendar__SystemId)(h)) } // NewQCalendar__SystemId constructs a new QCalendar::SystemId object. func NewQCalendar__SystemId() *QCalendar__SystemId { - var outptr_QCalendar__SystemId *C.QCalendar__SystemId = nil - C.QCalendar__SystemId_new(&outptr_QCalendar__SystemId) - ret := newQCalendar__SystemId(outptr_QCalendar__SystemId) + ret := newQCalendar__SystemId(C.QCalendar__SystemId_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qcalendar.h b/qt6/gen_qcalendar.h index 8a4760d6..bf39a883 100644 --- a/qt6/gen_qcalendar.h +++ b/qt6/gen_qcalendar.h @@ -38,10 +38,10 @@ typedef struct QDate QDate; typedef struct QLocale QLocale; #endif -void QCalendar_new(QCalendar** outptr_QCalendar); -void QCalendar_new2(int system, QCalendar** outptr_QCalendar); -void QCalendar_new3(QAnyStringView* name, QCalendar** outptr_QCalendar); -void QCalendar_new4(QCalendar__SystemId* id, QCalendar** outptr_QCalendar); +QCalendar* QCalendar_new(); +QCalendar* QCalendar_new2(int system); +QCalendar* QCalendar_new3(QAnyStringView* name); +QCalendar* QCalendar_new4(QCalendar__SystemId* id); bool QCalendar_IsValid(const QCalendar* self); int QCalendar_DaysInMonth(const QCalendar* self, int month); int QCalendar_DaysInYear(const QCalendar* self, int year); @@ -76,14 +76,14 @@ struct miqt_string QCalendar_WeekDayName3(const QCalendar* self, QLocale* locale struct miqt_string QCalendar_StandaloneWeekDayName3(const QCalendar* self, QLocale* locale, int day, int format); void QCalendar_Delete(QCalendar* self, bool isSubclass); -void QCalendar__YearMonthDay_new(QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); -void QCalendar__YearMonthDay_new2(int y, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); -void QCalendar__YearMonthDay_new3(int y, int m, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); -void QCalendar__YearMonthDay_new4(int y, int m, int d, QCalendar__YearMonthDay** outptr_QCalendar__YearMonthDay); +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new(); +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new2(int y); +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new3(int y, int m); +QCalendar__YearMonthDay* QCalendar__YearMonthDay_new4(int y, int m, int d); bool QCalendar__YearMonthDay_IsValid(const QCalendar__YearMonthDay* self); void QCalendar__YearMonthDay_Delete(QCalendar__YearMonthDay* self, bool isSubclass); -void QCalendar__SystemId_new(QCalendar__SystemId** outptr_QCalendar__SystemId); +QCalendar__SystemId* QCalendar__SystemId_new(); size_t QCalendar__SystemId_Index(const QCalendar__SystemId* self); bool QCalendar__SystemId_IsValid(const QCalendar__SystemId* self); void QCalendar__SystemId_Delete(QCalendar__SystemId* self, bool isSubclass); diff --git a/qt6/gen_qcalendarwidget.cpp b/qt6/gen_qcalendarwidget.cpp index 3dd486be..2fd1c02b 100644 --- a/qt6/gen_qcalendarwidget.cpp +++ b/qt6/gen_qcalendarwidget.cpp @@ -1079,20 +1079,16 @@ public: }; -void QCalendarWidget_new(QWidget* parent, QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQCalendarWidget* ret = new MiqtVirtualQCalendarWidget(parent); - *outptr_QCalendarWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QCalendarWidget* QCalendarWidget_new(QWidget* parent) { + return new MiqtVirtualQCalendarWidget(parent); } -void QCalendarWidget_new2(QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQCalendarWidget* ret = new MiqtVirtualQCalendarWidget(); - *outptr_QCalendarWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QCalendarWidget* QCalendarWidget_new2() { + return new MiqtVirtualQCalendarWidget(); +} + +void QCalendarWidget_virtbase(QCalendarWidget* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QCalendarWidget_MetaObject(const QCalendarWidget* self) { diff --git a/qt6/gen_qcalendarwidget.go b/qt6/gen_qcalendarwidget.go index 363c2de8..f0e51897 100644 --- a/qt6/gen_qcalendarwidget.go +++ b/qt6/gen_qcalendarwidget.go @@ -58,46 +58,34 @@ func (this *QCalendarWidget) UnsafePointer() unsafe.Pointer { } // newQCalendarWidget constructs the type using only CGO pointers. -func newQCalendarWidget(h *C.QCalendarWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QCalendarWidget { +func newQCalendarWidget(h *C.QCalendarWidget) *QCalendarWidget { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QCalendarWidget_virtbase(h, &outptr_QWidget) + return &QCalendarWidget{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQCalendarWidget constructs the type using only unsafe pointers. -func UnsafeNewQCalendarWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QCalendarWidget { - if h == nil { - return nil - } - - return &QCalendarWidget{h: (*C.QCalendarWidget)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQCalendarWidget(h unsafe.Pointer) *QCalendarWidget { + return newQCalendarWidget((*C.QCalendarWidget)(h)) } // NewQCalendarWidget constructs a new QCalendarWidget object. func NewQCalendarWidget(parent *QWidget) *QCalendarWidget { - var outptr_QCalendarWidget *C.QCalendarWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCalendarWidget_new(parent.cPointer(), &outptr_QCalendarWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCalendarWidget(outptr_QCalendarWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCalendarWidget(C.QCalendarWidget_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQCalendarWidget2 constructs a new QCalendarWidget object. func NewQCalendarWidget2() *QCalendarWidget { - var outptr_QCalendarWidget *C.QCalendarWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCalendarWidget_new2(&outptr_QCalendarWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCalendarWidget(outptr_QCalendarWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCalendarWidget(C.QCalendarWidget_new2()) ret.isSubclass = true return ret } @@ -218,7 +206,7 @@ func (this *QCalendarWidget) SetVerticalHeaderFormat(format QCalendarWidget__Ver } func (this *QCalendarWidget) HeaderTextFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QCalendarWidget_HeaderTextFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QCalendarWidget_HeaderTextFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -228,7 +216,7 @@ func (this *QCalendarWidget) SetHeaderTextFormat(format *QTextCharFormat) { } func (this *QCalendarWidget) WeekdayTextFormat(dayOfWeek DayOfWeek) *QTextCharFormat { - _goptr := newQTextCharFormat(C.QCalendarWidget_WeekdayTextFormat(this.h, (C.int)(dayOfWeek)), nil) + _goptr := newQTextCharFormat(C.QCalendarWidget_WeekdayTextFormat(this.h, (C.int)(dayOfWeek))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -247,7 +235,7 @@ func (this *QCalendarWidget) DateTextFormat() map[QDate]QTextCharFormat { _mapkey_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer _entry_Key := *_mapkey_goptr - _mapval_goptr := newQTextCharFormat(_Values[i], nil) + _mapval_goptr := newQTextCharFormat(_Values[i]) _mapval_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer _entry_Value := *_mapval_goptr @@ -257,7 +245,7 @@ func (this *QCalendarWidget) DateTextFormat() map[QDate]QTextCharFormat { } func (this *QCalendarWidget) DateTextFormatWithDate(date QDate) *QTextCharFormat { - _goptr := newQTextCharFormat(C.QCalendarWidget_DateTextFormatWithDate(this.h, date.cPointer()), nil) + _goptr := newQTextCharFormat(C.QCalendarWidget_DateTextFormatWithDate(this.h, date.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -563,7 +551,7 @@ func miqt_exec_callback_QCalendarWidget_MousePressEvent(self *C.QCalendarWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -589,7 +577,7 @@ func miqt_exec_callback_QCalendarWidget_ResizeEvent(self *C.QCalendarWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -615,7 +603,7 @@ func miqt_exec_callback_QCalendarWidget_KeyPressEvent(self *C.QCalendarWidget, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -802,7 +790,7 @@ func miqt_exec_callback_QCalendarWidget_MouseReleaseEvent(self *C.QCalendarWidge } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -828,7 +816,7 @@ func miqt_exec_callback_QCalendarWidget_MouseDoubleClickEvent(self *C.QCalendarW } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -854,7 +842,7 @@ func miqt_exec_callback_QCalendarWidget_MouseMoveEvent(self *C.QCalendarWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -880,7 +868,7 @@ func miqt_exec_callback_QCalendarWidget_WheelEvent(self *C.QCalendarWidget, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -906,7 +894,7 @@ func miqt_exec_callback_QCalendarWidget_KeyReleaseEvent(self *C.QCalendarWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -932,7 +920,7 @@ func miqt_exec_callback_QCalendarWidget_FocusInEvent(self *C.QCalendarWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -958,7 +946,7 @@ func miqt_exec_callback_QCalendarWidget_FocusOutEvent(self *C.QCalendarWidget, c } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -984,7 +972,7 @@ func miqt_exec_callback_QCalendarWidget_EnterEvent(self *C.QCalendarWidget, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -1036,7 +1024,7 @@ func miqt_exec_callback_QCalendarWidget_PaintEvent(self *C.QCalendarWidget, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1062,7 +1050,7 @@ func miqt_exec_callback_QCalendarWidget_MoveEvent(self *C.QCalendarWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1088,7 +1076,7 @@ func miqt_exec_callback_QCalendarWidget_CloseEvent(self *C.QCalendarWidget, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1114,7 +1102,7 @@ func miqt_exec_callback_QCalendarWidget_ContextMenuEvent(self *C.QCalendarWidget } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1140,7 +1128,7 @@ func miqt_exec_callback_QCalendarWidget_TabletEvent(self *C.QCalendarWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1166,7 +1154,7 @@ func miqt_exec_callback_QCalendarWidget_ActionEvent(self *C.QCalendarWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1192,7 +1180,7 @@ func miqt_exec_callback_QCalendarWidget_DragEnterEvent(self *C.QCalendarWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1218,7 +1206,7 @@ func miqt_exec_callback_QCalendarWidget_DragMoveEvent(self *C.QCalendarWidget, c } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1244,7 +1232,7 @@ func miqt_exec_callback_QCalendarWidget_DragLeaveEvent(self *C.QCalendarWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1270,7 +1258,7 @@ func miqt_exec_callback_QCalendarWidget_DropEvent(self *C.QCalendarWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1296,7 +1284,7 @@ func miqt_exec_callback_QCalendarWidget_ShowEvent(self *C.QCalendarWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1322,7 +1310,7 @@ func miqt_exec_callback_QCalendarWidget_HideEvent(self *C.QCalendarWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QCalendarWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1518,7 +1506,7 @@ func miqt_exec_callback_QCalendarWidget_InputMethodEvent(self *C.QCalendarWidget } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QCalendarWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qcalendarwidget.h b/qt6/gen_qcalendarwidget.h index f3328f22..284add3b 100644 --- a/qt6/gen_qcalendarwidget.h +++ b/qt6/gen_qcalendarwidget.h @@ -86,8 +86,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QCalendarWidget_new(QWidget* parent, QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCalendarWidget_new2(QCalendarWidget** outptr_QCalendarWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QCalendarWidget* QCalendarWidget_new(QWidget* parent); +QCalendarWidget* QCalendarWidget_new2(); +void QCalendarWidget_virtbase(QCalendarWidget* src, QWidget** outptr_QWidget); QMetaObject* QCalendarWidget_MetaObject(const QCalendarWidget* self); void* QCalendarWidget_Metacast(QCalendarWidget* self, const char* param1); struct miqt_string QCalendarWidget_Tr(const char* s); diff --git a/qt6/gen_qchar.cpp b/qt6/gen_qchar.cpp index 07899e77..e03175bd 100644 --- a/qt6/gen_qchar.cpp +++ b/qt6/gen_qchar.cpp @@ -7,14 +7,12 @@ #include "gen_qchar.h" #include "_cgo_export.h" -void QLatin1Char_new(char c, QLatin1Char** outptr_QLatin1Char) { - QLatin1Char* ret = new QLatin1Char(static_cast(c)); - *outptr_QLatin1Char = ret; +QLatin1Char* QLatin1Char_new(char c) { + return new QLatin1Char(static_cast(c)); } -void QLatin1Char_new2(QLatin1Char* param1, QLatin1Char** outptr_QLatin1Char) { - QLatin1Char* ret = new QLatin1Char(*param1); - *outptr_QLatin1Char = ret; +QLatin1Char* QLatin1Char_new2(QLatin1Char* param1) { + return new QLatin1Char(*param1); } char QLatin1Char_ToLatin1(const QLatin1Char* self) { @@ -29,59 +27,48 @@ void QLatin1Char_Delete(QLatin1Char* self, bool isSubclass) { } } -void QChar_new(QChar** outptr_QChar) { - QChar* ret = new QChar(); - *outptr_QChar = ret; +QChar* QChar_new() { + return new QChar(); } -void QChar_new2(uint16_t rc, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(rc)); - *outptr_QChar = ret; +QChar* QChar_new2(uint16_t rc) { + return new QChar(static_cast(rc)); } -void QChar_new3(unsigned char c, unsigned char r, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(c), static_cast(r)); - *outptr_QChar = ret; +QChar* QChar_new3(unsigned char c, unsigned char r) { + return new QChar(static_cast(c), static_cast(r)); } -void QChar_new4(int16_t rc, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(rc)); - *outptr_QChar = ret; +QChar* QChar_new4(int16_t rc) { + return new QChar(static_cast(rc)); } -void QChar_new5(unsigned int rc, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(rc)); - *outptr_QChar = ret; +QChar* QChar_new5(unsigned int rc) { + return new QChar(static_cast(rc)); } -void QChar_new6(int rc, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(rc)); - *outptr_QChar = ret; +QChar* QChar_new6(int rc) { + return new QChar(static_cast(rc)); } -void QChar_new7(int s, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(s)); - *outptr_QChar = ret; +QChar* QChar_new7(int s) { + return new QChar(static_cast(s)); } -void QChar_new8(QLatin1Char* ch, QChar** outptr_QChar) { - QChar* ret = new QChar(*ch); - *outptr_QChar = ret; +QChar* QChar_new8(QLatin1Char* ch) { + return new QChar(*ch); } -void QChar_new9(char c, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(c)); - *outptr_QChar = ret; +QChar* QChar_new9(char c) { + return new QChar(static_cast(c)); } -void QChar_new10(unsigned char c, QChar** outptr_QChar) { - QChar* ret = new QChar(static_cast(c)); - *outptr_QChar = ret; +QChar* QChar_new10(unsigned char c) { + return new QChar(static_cast(c)); } -void QChar_new11(QChar* param1, QChar** outptr_QChar) { - QChar* ret = new QChar(*param1); - *outptr_QChar = ret; +QChar* QChar_new11(QChar* param1) { + return new QChar(*param1); } int QChar_Category(const QChar* self) { diff --git a/qt6/gen_qchar.go b/qt6/gen_qchar.go index d6e63425..d6e876a2 100644 --- a/qt6/gen_qchar.go +++ b/qt6/gen_qchar.go @@ -377,34 +377,27 @@ func newQLatin1Char(h *C.QLatin1Char) *QLatin1Char { if h == nil { return nil } + return &QLatin1Char{h: h} } // UnsafeNewQLatin1Char constructs the type using only unsafe pointers. func UnsafeNewQLatin1Char(h unsafe.Pointer) *QLatin1Char { - if h == nil { - return nil - } - - return &QLatin1Char{h: (*C.QLatin1Char)(h)} + return newQLatin1Char((*C.QLatin1Char)(h)) } // NewQLatin1Char constructs a new QLatin1Char object. func NewQLatin1Char(c int8) *QLatin1Char { - var outptr_QLatin1Char *C.QLatin1Char = nil - C.QLatin1Char_new((C.char)(c), &outptr_QLatin1Char) - ret := newQLatin1Char(outptr_QLatin1Char) + ret := newQLatin1Char(C.QLatin1Char_new((C.char)(c))) ret.isSubclass = true return ret } // NewQLatin1Char2 constructs a new QLatin1Char object. func NewQLatin1Char2(param1 *QLatin1Char) *QLatin1Char { - var outptr_QLatin1Char *C.QLatin1Char = nil - C.QLatin1Char_new2(param1.cPointer(), &outptr_QLatin1Char) - ret := newQLatin1Char(outptr_QLatin1Char) + ret := newQLatin1Char(C.QLatin1Char_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -451,124 +444,99 @@ func newQChar(h *C.QChar) *QChar { if h == nil { return nil } + return &QChar{h: h} } // UnsafeNewQChar constructs the type using only unsafe pointers. func UnsafeNewQChar(h unsafe.Pointer) *QChar { - if h == nil { - return nil - } - - return &QChar{h: (*C.QChar)(h)} + return newQChar((*C.QChar)(h)) } // NewQChar constructs a new QChar object. func NewQChar() *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new(&outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new()) ret.isSubclass = true return ret } // NewQChar2 constructs a new QChar object. func NewQChar2(rc uint16) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new2((C.uint16_t)(rc), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new2((C.uint16_t)(rc))) ret.isSubclass = true return ret } // NewQChar3 constructs a new QChar object. func NewQChar3(c byte, r byte) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new3((C.uchar)(c), (C.uchar)(r), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new3((C.uchar)(c), (C.uchar)(r))) ret.isSubclass = true return ret } // NewQChar4 constructs a new QChar object. func NewQChar4(rc int16) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new4((C.int16_t)(rc), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new4((C.int16_t)(rc))) ret.isSubclass = true return ret } // NewQChar5 constructs a new QChar object. func NewQChar5(rc uint) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new5((C.uint)(rc), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new5((C.uint)(rc))) ret.isSubclass = true return ret } // NewQChar6 constructs a new QChar object. func NewQChar6(rc int) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new6((C.int)(rc), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new6((C.int)(rc))) ret.isSubclass = true return ret } // NewQChar7 constructs a new QChar object. func NewQChar7(s QChar__SpecialCharacter) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new7((C.int)(s), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new7((C.int)(s))) ret.isSubclass = true return ret } // NewQChar8 constructs a new QChar object. func NewQChar8(ch QLatin1Char) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new8(ch.cPointer(), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new8(ch.cPointer())) ret.isSubclass = true return ret } // NewQChar9 constructs a new QChar object. func NewQChar9(c int8) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new9((C.char)(c), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new9((C.char)(c))) ret.isSubclass = true return ret } // NewQChar10 constructs a new QChar object. func NewQChar10(c byte) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new10((C.uchar)(c), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new10((C.uchar)(c))) ret.isSubclass = true return ret } // NewQChar11 constructs a new QChar object. func NewQChar11(param1 *QChar) *QChar { - var outptr_QChar *C.QChar = nil - C.QChar_new11(param1.cPointer(), &outptr_QChar) - ret := newQChar(outptr_QChar) + ret := newQChar(C.QChar_new11(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qchar.h b/qt6/gen_qchar.h index 98927a2a..dc050c7b 100644 --- a/qt6/gen_qchar.h +++ b/qt6/gen_qchar.h @@ -22,22 +22,22 @@ typedef struct QChar QChar; typedef struct QLatin1Char QLatin1Char; #endif -void QLatin1Char_new(char c, QLatin1Char** outptr_QLatin1Char); -void QLatin1Char_new2(QLatin1Char* param1, QLatin1Char** outptr_QLatin1Char); +QLatin1Char* QLatin1Char_new(char c); +QLatin1Char* QLatin1Char_new2(QLatin1Char* param1); char QLatin1Char_ToLatin1(const QLatin1Char* self); void QLatin1Char_Delete(QLatin1Char* self, bool isSubclass); -void QChar_new(QChar** outptr_QChar); -void QChar_new2(uint16_t rc, QChar** outptr_QChar); -void QChar_new3(unsigned char c, unsigned char r, QChar** outptr_QChar); -void QChar_new4(int16_t rc, QChar** outptr_QChar); -void QChar_new5(unsigned int rc, QChar** outptr_QChar); -void QChar_new6(int rc, QChar** outptr_QChar); -void QChar_new7(int s, QChar** outptr_QChar); -void QChar_new8(QLatin1Char* ch, QChar** outptr_QChar); -void QChar_new9(char c, QChar** outptr_QChar); -void QChar_new10(unsigned char c, QChar** outptr_QChar); -void QChar_new11(QChar* param1, QChar** outptr_QChar); +QChar* QChar_new(); +QChar* QChar_new2(uint16_t rc); +QChar* QChar_new3(unsigned char c, unsigned char r); +QChar* QChar_new4(int16_t rc); +QChar* QChar_new5(unsigned int rc); +QChar* QChar_new6(int rc); +QChar* QChar_new7(int s); +QChar* QChar_new8(QLatin1Char* ch); +QChar* QChar_new9(char c); +QChar* QChar_new10(unsigned char c); +QChar* QChar_new11(QChar* param1); int QChar_Category(const QChar* self); int QChar_Direction(const QChar* self); int QChar_JoiningType(const QChar* self); diff --git a/qt6/gen_qcheckbox.cpp b/qt6/gen_qcheckbox.cpp index 23798654..11798c13 100644 --- a/qt6/gen_qcheckbox.cpp +++ b/qt6/gen_qcheckbox.cpp @@ -434,42 +434,26 @@ public: }; -void QCheckBox_new(QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(parent); - *outptr_QCheckBox = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QCheckBox* QCheckBox_new(QWidget* parent) { + return new MiqtVirtualQCheckBox(parent); } -void QCheckBox_new2(QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(); - *outptr_QCheckBox = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QCheckBox* QCheckBox_new2() { + return new MiqtVirtualQCheckBox(); } -void QCheckBox_new3(struct miqt_string text, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QCheckBox* QCheckBox_new3(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(text_QString); - *outptr_QCheckBox = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQCheckBox(text_QString); } -void QCheckBox_new4(struct miqt_string text, QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QCheckBox* QCheckBox_new4(struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQCheckBox* ret = new MiqtVirtualQCheckBox(text_QString, parent); - *outptr_QCheckBox = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQCheckBox(text_QString, parent); +} + +void QCheckBox_virtbase(QCheckBox* src, QAbstractButton** outptr_QAbstractButton) { + *outptr_QAbstractButton = static_cast(src); } QMetaObject* QCheckBox_MetaObject(const QCheckBox* self) { diff --git a/qt6/gen_qcheckbox.go b/qt6/gen_qcheckbox.go index c2cb61d4..7bb53322 100644 --- a/qt6/gen_qcheckbox.go +++ b/qt6/gen_qcheckbox.go @@ -35,48 +35,34 @@ func (this *QCheckBox) UnsafePointer() unsafe.Pointer { } // newQCheckBox constructs the type using only CGO pointers. -func newQCheckBox(h *C.QCheckBox, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QCheckBox { +func newQCheckBox(h *C.QCheckBox) *QCheckBox { if h == nil { return nil } + var outptr_QAbstractButton *C.QAbstractButton = nil + C.QCheckBox_virtbase(h, &outptr_QAbstractButton) + return &QCheckBox{h: h, - QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractButton: newQAbstractButton(outptr_QAbstractButton)} } // UnsafeNewQCheckBox constructs the type using only unsafe pointers. -func UnsafeNewQCheckBox(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QCheckBox { - if h == nil { - return nil - } - - return &QCheckBox{h: (*C.QCheckBox)(h), - QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQCheckBox(h unsafe.Pointer) *QCheckBox { + return newQCheckBox((*C.QCheckBox)(h)) } // NewQCheckBox constructs a new QCheckBox object. func NewQCheckBox(parent *QWidget) *QCheckBox { - var outptr_QCheckBox *C.QCheckBox = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCheckBox_new(parent.cPointer(), &outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCheckBox(C.QCheckBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQCheckBox2 constructs a new QCheckBox object. func NewQCheckBox2() *QCheckBox { - var outptr_QCheckBox *C.QCheckBox = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCheckBox_new2(&outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCheckBox(C.QCheckBox_new2()) ret.isSubclass = true return ret } @@ -87,14 +73,8 @@ func NewQCheckBox3(text string) *QCheckBox { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QCheckBox *C.QCheckBox = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCheckBox_new3(text_ms, &outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCheckBox(C.QCheckBox_new3(text_ms)) ret.isSubclass = true return ret } @@ -105,14 +85,8 @@ func NewQCheckBox4(text string, parent *QWidget) *QCheckBox { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QCheckBox *C.QCheckBox = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCheckBox_new4(text_ms, parent.cPointer(), &outptr_QCheckBox, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCheckBox(outptr_QCheckBox, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCheckBox(C.QCheckBox_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -386,7 +360,7 @@ func miqt_exec_callback_QCheckBox_PaintEvent(self *C.QCheckBox, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QCheckBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -412,7 +386,7 @@ func miqt_exec_callback_QCheckBox_MouseMoveEvent(self *C.QCheckBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QCheckBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -438,7 +412,7 @@ func miqt_exec_callback_QCheckBox_InitStyleOption(self *C.QCheckBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionButton(option, nil) + slotval1 := newQStyleOptionButton(option) gofunc((&QCheckBox{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -464,7 +438,7 @@ func miqt_exec_callback_QCheckBox_KeyPressEvent(self *C.QCheckBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QCheckBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -490,7 +464,7 @@ func miqt_exec_callback_QCheckBox_KeyReleaseEvent(self *C.QCheckBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QCheckBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -516,7 +490,7 @@ func miqt_exec_callback_QCheckBox_MousePressEvent(self *C.QCheckBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QCheckBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -542,7 +516,7 @@ func miqt_exec_callback_QCheckBox_MouseReleaseEvent(self *C.QCheckBox, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QCheckBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -568,7 +542,7 @@ func miqt_exec_callback_QCheckBox_FocusInEvent(self *C.QCheckBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QCheckBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -594,7 +568,7 @@ func miqt_exec_callback_QCheckBox_FocusOutEvent(self *C.QCheckBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QCheckBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -646,7 +620,7 @@ func miqt_exec_callback_QCheckBox_TimerEvent(self *C.QCheckBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QCheckBox{h: self}).callVirtualBase_TimerEvent, slotval1) diff --git a/qt6/gen_qcheckbox.h b/qt6/gen_qcheckbox.h index 248891f8..17fd5caa 100644 --- a/qt6/gen_qcheckbox.h +++ b/qt6/gen_qcheckbox.h @@ -48,10 +48,11 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QCheckBox_new(QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCheckBox_new2(QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCheckBox_new3(struct miqt_string text, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCheckBox_new4(struct miqt_string text, QWidget* parent, QCheckBox** outptr_QCheckBox, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QCheckBox* QCheckBox_new(QWidget* parent); +QCheckBox* QCheckBox_new2(); +QCheckBox* QCheckBox_new3(struct miqt_string text); +QCheckBox* QCheckBox_new4(struct miqt_string text, QWidget* parent); +void QCheckBox_virtbase(QCheckBox* src, QAbstractButton** outptr_QAbstractButton); QMetaObject* QCheckBox_MetaObject(const QCheckBox* self); void* QCheckBox_Metacast(QCheckBox* self, const char* param1); struct miqt_string QCheckBox_Tr(const char* s); diff --git a/qt6/gen_qclipboard.cpp b/qt6/gen_qclipboard.cpp index c14fe1ea..266ac4c4 100644 --- a/qt6/gen_qclipboard.cpp +++ b/qt6/gen_qclipboard.cpp @@ -11,6 +11,10 @@ #include "gen_qclipboard.h" #include "_cgo_export.h" +void QClipboard_virtbase(QClipboard* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QClipboard_MetaObject(const QClipboard* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/gen_qclipboard.go b/qt6/gen_qclipboard.go index d7c98c5b..f7fb815e 100644 --- a/qt6/gen_qclipboard.go +++ b/qt6/gen_qclipboard.go @@ -43,22 +43,20 @@ func (this *QClipboard) UnsafePointer() unsafe.Pointer { } // newQClipboard constructs the type using only CGO pointers. -func newQClipboard(h *C.QClipboard, h_QObject *C.QObject) *QClipboard { +func newQClipboard(h *C.QClipboard) *QClipboard { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QClipboard_virtbase(h, &outptr_QObject) + return &QClipboard{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQClipboard constructs the type using only unsafe pointers. -func UnsafeNewQClipboard(h unsafe.Pointer, h_QObject unsafe.Pointer) *QClipboard { - if h == nil { - return nil - } - - return &QClipboard{h: (*C.QClipboard)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQClipboard(h unsafe.Pointer) *QClipboard { + return newQClipboard((*C.QClipboard)(h)) } func (this *QClipboard) MetaObject() *QMetaObject { @@ -131,7 +129,7 @@ func (this *QClipboard) SetText(param1 string) { } func (this *QClipboard) MimeData() *QMimeData { - return newQMimeData(C.QClipboard_MimeData(this.h), nil) + return newQMimeData(C.QClipboard_MimeData(this.h)) } func (this *QClipboard) SetMimeData(data *QMimeData) { @@ -139,13 +137,13 @@ func (this *QClipboard) SetMimeData(data *QMimeData) { } func (this *QClipboard) Image() *QImage { - _goptr := newQImage(C.QClipboard_Image(this.h), nil) + _goptr := newQImage(C.QClipboard_Image(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QClipboard) Pixmap() *QPixmap { - _goptr := newQPixmap(C.QClipboard_Pixmap(this.h), nil) + _goptr := newQPixmap(C.QClipboard_Pixmap(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -282,7 +280,7 @@ func (this *QClipboard) SetText2(param1 string, mode QClipboard__Mode) { } func (this *QClipboard) MimeData1(mode QClipboard__Mode) *QMimeData { - return newQMimeData(C.QClipboard_MimeData1(this.h, (C.int)(mode)), nil) + return newQMimeData(C.QClipboard_MimeData1(this.h, (C.int)(mode))) } func (this *QClipboard) SetMimeData2(data *QMimeData, mode QClipboard__Mode) { @@ -290,13 +288,13 @@ func (this *QClipboard) SetMimeData2(data *QMimeData, mode QClipboard__Mode) { } func (this *QClipboard) Image1(mode QClipboard__Mode) *QImage { - _goptr := newQImage(C.QClipboard_Image1(this.h, (C.int)(mode)), nil) + _goptr := newQImage(C.QClipboard_Image1(this.h, (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QClipboard) Pixmap1(mode QClipboard__Mode) *QPixmap { - _goptr := newQPixmap(C.QClipboard_Pixmap1(this.h, (C.int)(mode)), nil) + _goptr := newQPixmap(C.QClipboard_Pixmap1(this.h, (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/gen_qclipboard.h b/qt6/gen_qclipboard.h index 48894915..03412dac 100644 --- a/qt6/gen_qclipboard.h +++ b/qt6/gen_qclipboard.h @@ -30,6 +30,7 @@ typedef struct QObject QObject; typedef struct QPixmap QPixmap; #endif +void QClipboard_virtbase(QClipboard* src, QObject** outptr_QObject); QMetaObject* QClipboard_MetaObject(const QClipboard* self); void* QClipboard_Metacast(QClipboard* self, const char* param1); struct miqt_string QClipboard_Tr(const char* s); diff --git a/qt6/gen_qcollator.cpp b/qt6/gen_qcollator.cpp index b99b6e38..bfd66cfe 100644 --- a/qt6/gen_qcollator.cpp +++ b/qt6/gen_qcollator.cpp @@ -9,9 +9,8 @@ #include "gen_qcollator.h" #include "_cgo_export.h" -void QCollatorSortKey_new(QCollatorSortKey* other, QCollatorSortKey** outptr_QCollatorSortKey) { - QCollatorSortKey* ret = new QCollatorSortKey(*other); - *outptr_QCollatorSortKey = ret; +QCollatorSortKey* QCollatorSortKey_new(QCollatorSortKey* other) { + return new QCollatorSortKey(*other); } void QCollatorSortKey_OperatorAssign(QCollatorSortKey* self, QCollatorSortKey* other) { @@ -34,19 +33,16 @@ void QCollatorSortKey_Delete(QCollatorSortKey* self, bool isSubclass) { } } -void QCollator_new(QCollator** outptr_QCollator) { - QCollator* ret = new QCollator(); - *outptr_QCollator = ret; +QCollator* QCollator_new() { + return new QCollator(); } -void QCollator_new2(QLocale* locale, QCollator** outptr_QCollator) { - QCollator* ret = new QCollator(*locale); - *outptr_QCollator = ret; +QCollator* QCollator_new2(QLocale* locale) { + return new QCollator(*locale); } -void QCollator_new3(QCollator* param1, QCollator** outptr_QCollator) { - QCollator* ret = new QCollator(*param1); - *outptr_QCollator = ret; +QCollator* QCollator_new3(QCollator* param1) { + return new QCollator(*param1); } void QCollator_OperatorAssign(QCollator* self, QCollator* param1) { diff --git a/qt6/gen_qcollator.go b/qt6/gen_qcollator.go index 96683430..0b6fb31d 100644 --- a/qt6/gen_qcollator.go +++ b/qt6/gen_qcollator.go @@ -37,24 +37,19 @@ func newQCollatorSortKey(h *C.QCollatorSortKey) *QCollatorSortKey { if h == nil { return nil } + return &QCollatorSortKey{h: h} } // UnsafeNewQCollatorSortKey constructs the type using only unsafe pointers. func UnsafeNewQCollatorSortKey(h unsafe.Pointer) *QCollatorSortKey { - if h == nil { - return nil - } - - return &QCollatorSortKey{h: (*C.QCollatorSortKey)(h)} + return newQCollatorSortKey((*C.QCollatorSortKey)(h)) } // NewQCollatorSortKey constructs a new QCollatorSortKey object. func NewQCollatorSortKey(other *QCollatorSortKey) *QCollatorSortKey { - var outptr_QCollatorSortKey *C.QCollatorSortKey = nil - C.QCollatorSortKey_new(other.cPointer(), &outptr_QCollatorSortKey) - ret := newQCollatorSortKey(outptr_QCollatorSortKey) + ret := newQCollatorSortKey(C.QCollatorSortKey_new(other.cPointer())) ret.isSubclass = true return ret } @@ -109,44 +104,35 @@ func newQCollator(h *C.QCollator) *QCollator { if h == nil { return nil } + return &QCollator{h: h} } // UnsafeNewQCollator constructs the type using only unsafe pointers. func UnsafeNewQCollator(h unsafe.Pointer) *QCollator { - if h == nil { - return nil - } - - return &QCollator{h: (*C.QCollator)(h)} + return newQCollator((*C.QCollator)(h)) } // NewQCollator constructs a new QCollator object. func NewQCollator() *QCollator { - var outptr_QCollator *C.QCollator = nil - C.QCollator_new(&outptr_QCollator) - ret := newQCollator(outptr_QCollator) + ret := newQCollator(C.QCollator_new()) ret.isSubclass = true return ret } // NewQCollator2 constructs a new QCollator object. func NewQCollator2(locale *QLocale) *QCollator { - var outptr_QCollator *C.QCollator = nil - C.QCollator_new2(locale.cPointer(), &outptr_QCollator) - ret := newQCollator(outptr_QCollator) + ret := newQCollator(C.QCollator_new2(locale.cPointer())) ret.isSubclass = true return ret } // NewQCollator3 constructs a new QCollator object. func NewQCollator3(param1 *QCollator) *QCollator { - var outptr_QCollator *C.QCollator = nil - C.QCollator_new3(param1.cPointer(), &outptr_QCollator) - ret := newQCollator(outptr_QCollator) + ret := newQCollator(C.QCollator_new3(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qcollator.h b/qt6/gen_qcollator.h index 8f6d8bfb..e6cca84d 100644 --- a/qt6/gen_qcollator.h +++ b/qt6/gen_qcollator.h @@ -26,15 +26,15 @@ typedef struct QCollatorSortKey QCollatorSortKey; typedef struct QLocale QLocale; #endif -void QCollatorSortKey_new(QCollatorSortKey* other, QCollatorSortKey** outptr_QCollatorSortKey); +QCollatorSortKey* QCollatorSortKey_new(QCollatorSortKey* other); void QCollatorSortKey_OperatorAssign(QCollatorSortKey* self, QCollatorSortKey* other); void QCollatorSortKey_Swap(QCollatorSortKey* self, QCollatorSortKey* other); int QCollatorSortKey_Compare(const QCollatorSortKey* self, QCollatorSortKey* key); void QCollatorSortKey_Delete(QCollatorSortKey* self, bool isSubclass); -void QCollator_new(QCollator** outptr_QCollator); -void QCollator_new2(QLocale* locale, QCollator** outptr_QCollator); -void QCollator_new3(QCollator* param1, QCollator** outptr_QCollator); +QCollator* QCollator_new(); +QCollator* QCollator_new2(QLocale* locale); +QCollator* QCollator_new3(QCollator* param1); void QCollator_OperatorAssign(QCollator* self, QCollator* param1); void QCollator_Swap(QCollator* self, QCollator* other); void QCollator_SetLocale(QCollator* self, QLocale* locale); diff --git a/qt6/gen_qcolor.cpp b/qt6/gen_qcolor.cpp index d5905cfa..30d7f5b7 100644 --- a/qt6/gen_qcolor.cpp +++ b/qt6/gen_qcolor.cpp @@ -9,65 +9,53 @@ #include "gen_qcolor.h" #include "_cgo_export.h" -void QColor_new(QColor** outptr_QColor) { - QColor* ret = new QColor(); - *outptr_QColor = ret; +QColor* QColor_new() { + return new QColor(); } -void QColor_new2(int color, QColor** outptr_QColor) { - QColor* ret = new QColor(static_cast(color)); - *outptr_QColor = ret; +QColor* QColor_new2(int color) { + return new QColor(static_cast(color)); } -void QColor_new3(int r, int g, int b, QColor** outptr_QColor) { - QColor* ret = new QColor(static_cast(r), static_cast(g), static_cast(b)); - *outptr_QColor = ret; +QColor* QColor_new3(int r, int g, int b) { + return new QColor(static_cast(r), static_cast(g), static_cast(b)); } -void QColor_new4(unsigned int rgb, QColor** outptr_QColor) { - QColor* ret = new QColor(static_cast(rgb)); - *outptr_QColor = ret; +QColor* QColor_new4(unsigned int rgb) { + return new QColor(static_cast(rgb)); } -void QColor_new5(QRgba64* rgba64, QColor** outptr_QColor) { - QColor* ret = new QColor(*rgba64); - *outptr_QColor = ret; +QColor* QColor_new5(QRgba64* rgba64) { + return new QColor(*rgba64); } -void QColor_new6(struct miqt_string name, QColor** outptr_QColor) { +QColor* QColor_new6(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - QColor* ret = new QColor(name_QString); - *outptr_QColor = ret; + return new QColor(name_QString); } -void QColor_new7(const char* aname, QColor** outptr_QColor) { - QColor* ret = new QColor(aname); - *outptr_QColor = ret; +QColor* QColor_new7(const char* aname) { + return new QColor(aname); } -void QColor_new8(int spec, QColor** outptr_QColor) { - QColor* ret = new QColor(static_cast(spec)); - *outptr_QColor = ret; +QColor* QColor_new8(int spec) { + return new QColor(static_cast(spec)); } -void QColor_new9(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, QColor** outptr_QColor) { - QColor* ret = new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4)); - *outptr_QColor = ret; +QColor* QColor_new9(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4) { + return new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4)); } -void QColor_new10(QColor* param1, QColor** outptr_QColor) { - QColor* ret = new QColor(*param1); - *outptr_QColor = ret; +QColor* QColor_new10(QColor* param1) { + return new QColor(*param1); } -void QColor_new11(int r, int g, int b, int a, QColor** outptr_QColor) { - QColor* ret = new QColor(static_cast(r), static_cast(g), static_cast(b), static_cast(a)); - *outptr_QColor = ret; +QColor* QColor_new11(int r, int g, int b, int a) { + return new QColor(static_cast(r), static_cast(g), static_cast(b), static_cast(a)); } -void QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5, QColor** outptr_QColor) { - QColor* ret = new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4), static_cast(a5)); - *outptr_QColor = ret; +QColor* QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5) { + return new QColor(static_cast(spec), static_cast(a1), static_cast(a2), static_cast(a3), static_cast(a4), static_cast(a5)); } QColor* QColor_FromString(QAnyStringView* name) { diff --git a/qt6/gen_qcolor.go b/qt6/gen_qcolor.go index aa435c9a..a1539634 100644 --- a/qt6/gen_qcolor.go +++ b/qt6/gen_qcolor.go @@ -55,64 +55,51 @@ func newQColor(h *C.QColor) *QColor { if h == nil { return nil } + return &QColor{h: h} } // UnsafeNewQColor constructs the type using only unsafe pointers. func UnsafeNewQColor(h unsafe.Pointer) *QColor { - if h == nil { - return nil - } - - return &QColor{h: (*C.QColor)(h)} + return newQColor((*C.QColor)(h)) } // NewQColor constructs a new QColor object. func NewQColor() *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new(&outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new()) ret.isSubclass = true return ret } // NewQColor2 constructs a new QColor object. func NewQColor2(color GlobalColor) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new2((C.int)(color), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new2((C.int)(color))) ret.isSubclass = true return ret } // NewQColor3 constructs a new QColor object. func NewQColor3(r int, g int, b int) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new3((C.int)(r), (C.int)(g), (C.int)(b), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new3((C.int)(r), (C.int)(g), (C.int)(b))) ret.isSubclass = true return ret } // NewQColor4 constructs a new QColor object. func NewQColor4(rgb uint) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new4((C.uint)(rgb), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new4((C.uint)(rgb))) ret.isSubclass = true return ret } // NewQColor5 constructs a new QColor object. func NewQColor5(rgba64 QRgba64) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new5(rgba64.cPointer(), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new5(rgba64.cPointer())) ret.isSubclass = true return ret } @@ -123,10 +110,8 @@ func NewQColor6(name string) *QColor { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QColor *C.QColor = nil - C.QColor_new6(name_ms, &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new6(name_ms)) ret.isSubclass = true return ret } @@ -135,60 +120,48 @@ func NewQColor6(name string) *QColor { func NewQColor7(aname string) *QColor { aname_Cstring := C.CString(aname) defer C.free(unsafe.Pointer(aname_Cstring)) - var outptr_QColor *C.QColor = nil - C.QColor_new7(aname_Cstring, &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new7(aname_Cstring)) ret.isSubclass = true return ret } // NewQColor8 constructs a new QColor object. func NewQColor8(spec QColor__Spec) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new8((C.int)(spec), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new8((C.int)(spec))) ret.isSubclass = true return ret } // NewQColor9 constructs a new QColor object. func NewQColor9(spec QColor__Spec, a1 uint16, a2 uint16, a3 uint16, a4 uint16) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new9((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new9((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4))) ret.isSubclass = true return ret } // NewQColor10 constructs a new QColor object. func NewQColor10(param1 *QColor) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new10(param1.cPointer(), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new10(param1.cPointer())) ret.isSubclass = true return ret } // NewQColor11 constructs a new QColor object. func NewQColor11(r int, g int, b int, a int) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new11((C.int)(r), (C.int)(g), (C.int)(b), (C.int)(a), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new11((C.int)(r), (C.int)(g), (C.int)(b), (C.int)(a))) ret.isSubclass = true return ret } // NewQColor12 constructs a new QColor object. func NewQColor12(spec QColor__Spec, a1 uint16, a2 uint16, a3 uint16, a4 uint16, a5 uint16) *QColor { - var outptr_QColor *C.QColor = nil - C.QColor_new12((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4), (C.uint16_t)(a5), &outptr_QColor) - ret := newQColor(outptr_QColor) + ret := newQColor(C.QColor_new12((C.int)(spec), (C.uint16_t)(a1), (C.uint16_t)(a2), (C.uint16_t)(a3), (C.uint16_t)(a4), (C.uint16_t)(a5))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qcolor.h b/qt6/gen_qcolor.h index dfbd817a..a2410d59 100644 --- a/qt6/gen_qcolor.h +++ b/qt6/gen_qcolor.h @@ -24,18 +24,18 @@ typedef struct QColor QColor; typedef struct QRgba64 QRgba64; #endif -void QColor_new(QColor** outptr_QColor); -void QColor_new2(int color, QColor** outptr_QColor); -void QColor_new3(int r, int g, int b, QColor** outptr_QColor); -void QColor_new4(unsigned int rgb, QColor** outptr_QColor); -void QColor_new5(QRgba64* rgba64, QColor** outptr_QColor); -void QColor_new6(struct miqt_string name, QColor** outptr_QColor); -void QColor_new7(const char* aname, QColor** outptr_QColor); -void QColor_new8(int spec, QColor** outptr_QColor); -void QColor_new9(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, QColor** outptr_QColor); -void QColor_new10(QColor* param1, QColor** outptr_QColor); -void QColor_new11(int r, int g, int b, int a, QColor** outptr_QColor); -void QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5, QColor** outptr_QColor); +QColor* QColor_new(); +QColor* QColor_new2(int color); +QColor* QColor_new3(int r, int g, int b); +QColor* QColor_new4(unsigned int rgb); +QColor* QColor_new5(QRgba64* rgba64); +QColor* QColor_new6(struct miqt_string name); +QColor* QColor_new7(const char* aname); +QColor* QColor_new8(int spec); +QColor* QColor_new9(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4); +QColor* QColor_new10(QColor* param1); +QColor* QColor_new11(int r, int g, int b, int a); +QColor* QColor_new12(int spec, uint16_t a1, uint16_t a2, uint16_t a3, uint16_t a4, uint16_t a5); QColor* QColor_FromString(QAnyStringView* name); void QColor_OperatorAssign(QColor* self, int color); bool QColor_IsValid(const QColor* self); diff --git a/qt6/gen_qcolordialog.cpp b/qt6/gen_qcolordialog.cpp index 6b5059a6..a57e0997 100644 --- a/qt6/gen_qcolordialog.cpp +++ b/qt6/gen_qcolordialog.cpp @@ -382,40 +382,24 @@ public: }; -void QColorDialog_new(QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(parent); - *outptr_QColorDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QColorDialog* QColorDialog_new(QWidget* parent) { + return new MiqtVirtualQColorDialog(parent); } -void QColorDialog_new2(QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(); - *outptr_QColorDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QColorDialog* QColorDialog_new2() { + return new MiqtVirtualQColorDialog(); } -void QColorDialog_new3(QColor* initial, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(*initial); - *outptr_QColorDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QColorDialog* QColorDialog_new3(QColor* initial) { + return new MiqtVirtualQColorDialog(*initial); } -void QColorDialog_new4(QColor* initial, QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQColorDialog* ret = new MiqtVirtualQColorDialog(*initial, parent); - *outptr_QColorDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QColorDialog* QColorDialog_new4(QColor* initial, QWidget* parent) { + return new MiqtVirtualQColorDialog(*initial, parent); +} + +void QColorDialog_virtbase(QColorDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QColorDialog_MetaObject(const QColorDialog* self) { diff --git a/qt6/gen_qcolordialog.go b/qt6/gen_qcolordialog.go index 27d2ef44..bdabdf16 100644 --- a/qt6/gen_qcolordialog.go +++ b/qt6/gen_qcolordialog.go @@ -43,76 +43,50 @@ func (this *QColorDialog) UnsafePointer() unsafe.Pointer { } // newQColorDialog constructs the type using only CGO pointers. -func newQColorDialog(h *C.QColorDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QColorDialog { +func newQColorDialog(h *C.QColorDialog) *QColorDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QColorDialog_virtbase(h, &outptr_QDialog) + return &QColorDialog{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQColorDialog constructs the type using only unsafe pointers. -func UnsafeNewQColorDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QColorDialog { - if h == nil { - return nil - } - - return &QColorDialog{h: (*C.QColorDialog)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQColorDialog(h unsafe.Pointer) *QColorDialog { + return newQColorDialog((*C.QColorDialog)(h)) } // NewQColorDialog constructs a new QColorDialog object. func NewQColorDialog(parent *QWidget) *QColorDialog { - var outptr_QColorDialog *C.QColorDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QColorDialog_new(parent.cPointer(), &outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQColorDialog(C.QColorDialog_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQColorDialog2 constructs a new QColorDialog object. func NewQColorDialog2() *QColorDialog { - var outptr_QColorDialog *C.QColorDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QColorDialog_new2(&outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQColorDialog(C.QColorDialog_new2()) ret.isSubclass = true return ret } // NewQColorDialog3 constructs a new QColorDialog object. func NewQColorDialog3(initial *QColor) *QColorDialog { - var outptr_QColorDialog *C.QColorDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QColorDialog_new3(initial.cPointer(), &outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQColorDialog(C.QColorDialog_new3(initial.cPointer())) ret.isSubclass = true return ret } // NewQColorDialog4 constructs a new QColorDialog object. func NewQColorDialog4(initial *QColor, parent *QWidget) *QColorDialog { - var outptr_QColorDialog *C.QColorDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QColorDialog_new4(initial.cPointer(), parent.cPointer(), &outptr_QColorDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQColorDialog(outptr_QColorDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQColorDialog(C.QColorDialog_new4(initial.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -546,7 +520,7 @@ func miqt_exec_callback_QColorDialog_KeyPressEvent(self *C.QColorDialog, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QColorDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -572,7 +546,7 @@ func miqt_exec_callback_QColorDialog_CloseEvent(self *C.QColorDialog, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(param1, nil) + slotval1 := newQCloseEvent(param1) gofunc((&QColorDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -598,7 +572,7 @@ func miqt_exec_callback_QColorDialog_ShowEvent(self *C.QColorDialog, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QColorDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -624,7 +598,7 @@ func miqt_exec_callback_QColorDialog_ResizeEvent(self *C.QColorDialog, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QColorDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -650,7 +624,7 @@ func miqt_exec_callback_QColorDialog_ContextMenuEvent(self *C.QColorDialog, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QColorDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt6/gen_qcolordialog.h b/qt6/gen_qcolordialog.h index d37f249c..db748cbd 100644 --- a/qt6/gen_qcolordialog.h +++ b/qt6/gen_qcolordialog.h @@ -46,10 +46,11 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QColorDialog_new(QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QColorDialog_new2(QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QColorDialog_new3(QColor* initial, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QColorDialog_new4(QColor* initial, QWidget* parent, QColorDialog** outptr_QColorDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QColorDialog* QColorDialog_new(QWidget* parent); +QColorDialog* QColorDialog_new2(); +QColorDialog* QColorDialog_new3(QColor* initial); +QColorDialog* QColorDialog_new4(QColor* initial, QWidget* parent); +void QColorDialog_virtbase(QColorDialog* src, QDialog** outptr_QDialog); QMetaObject* QColorDialog_MetaObject(const QColorDialog* self); void* QColorDialog_Metacast(QColorDialog* self, const char* param1); struct miqt_string QColorDialog_Tr(const char* s); diff --git a/qt6/gen_qcolormap.cpp b/qt6/gen_qcolormap.cpp index 73e31589..87c45aeb 100644 --- a/qt6/gen_qcolormap.cpp +++ b/qt6/gen_qcolormap.cpp @@ -5,9 +5,8 @@ #include "gen_qcolormap.h" #include "_cgo_export.h" -void QColormap_new(QColormap* colormap, QColormap** outptr_QColormap) { - QColormap* ret = new QColormap(*colormap); - *outptr_QColormap = ret; +QColormap* QColormap_new(QColormap* colormap) { + return new QColormap(*colormap); } void QColormap_Initialize() { diff --git a/qt6/gen_qcolormap.go b/qt6/gen_qcolormap.go index 79413b65..e3cd18a0 100644 --- a/qt6/gen_qcolormap.go +++ b/qt6/gen_qcolormap.go @@ -45,24 +45,19 @@ func newQColormap(h *C.QColormap) *QColormap { if h == nil { return nil } + return &QColormap{h: h} } // UnsafeNewQColormap constructs the type using only unsafe pointers. func UnsafeNewQColormap(h unsafe.Pointer) *QColormap { - if h == nil { - return nil - } - - return &QColormap{h: (*C.QColormap)(h)} + return newQColormap((*C.QColormap)(h)) } // NewQColormap constructs a new QColormap object. func NewQColormap(colormap *QColormap) *QColormap { - var outptr_QColormap *C.QColormap = nil - C.QColormap_new(colormap.cPointer(), &outptr_QColormap) - ret := newQColormap(outptr_QColormap) + ret := newQColormap(C.QColormap_new(colormap.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qcolormap.h b/qt6/gen_qcolormap.h index da4c4cd2..3fec7da2 100644 --- a/qt6/gen_qcolormap.h +++ b/qt6/gen_qcolormap.h @@ -22,7 +22,7 @@ typedef struct QColor QColor; typedef struct QColormap QColormap; #endif -void QColormap_new(QColormap* colormap, QColormap** outptr_QColormap); +QColormap* QColormap_new(QColormap* colormap); void QColormap_Initialize(); void QColormap_Cleanup(); QColormap* QColormap_Instance(); diff --git a/qt6/gen_qcolorspace.cpp b/qt6/gen_qcolorspace.cpp index 91dd4f12..38e32d21 100644 --- a/qt6/gen_qcolorspace.cpp +++ b/qt6/gen_qcolorspace.cpp @@ -10,54 +10,47 @@ #include "gen_qcolorspace.h" #include "_cgo_export.h" -void QColorSpace_new(QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new() { + return new QColorSpace(); } -void QColorSpace_new2(int namedColorSpace, QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(static_cast(namedColorSpace)); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new2(int namedColorSpace) { + return new QColorSpace(static_cast(namedColorSpace)); } -void QColorSpace_new3(int primaries, int transferFunction, QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(static_cast(primaries), static_cast(transferFunction)); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new3(int primaries, int transferFunction) { + return new QColorSpace(static_cast(primaries), static_cast(transferFunction)); } -void QColorSpace_new4(int primaries, float gamma, QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(static_cast(primaries), static_cast(gamma)); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new4(int primaries, float gamma) { + return new QColorSpace(static_cast(primaries), static_cast(gamma)); } -void QColorSpace_new5(int primaries, struct miqt_array /* of uint16_t */ transferFunctionTable, QColorSpace** outptr_QColorSpace) { +QColorSpace* QColorSpace_new5(int primaries, struct miqt_array /* of uint16_t */ transferFunctionTable) { QList transferFunctionTable_QList; transferFunctionTable_QList.reserve(transferFunctionTable.len); uint16_t* transferFunctionTable_arr = static_cast(transferFunctionTable.data); for(size_t i = 0; i < transferFunctionTable.len; ++i) { transferFunctionTable_QList.push_back(static_cast(transferFunctionTable_arr[i])); } - QColorSpace* ret = new QColorSpace(static_cast(primaries), transferFunctionTable_QList); - *outptr_QColorSpace = ret; + return new QColorSpace(static_cast(primaries), transferFunctionTable_QList); } -void QColorSpace_new6(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction)); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new6(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction) { + return new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction)); } -void QColorSpace_new7(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ transferFunctionTable, QColorSpace** outptr_QColorSpace) { +QColorSpace* QColorSpace_new7(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ transferFunctionTable) { QList transferFunctionTable_QList; transferFunctionTable_QList.reserve(transferFunctionTable.len); uint16_t* transferFunctionTable_arr = static_cast(transferFunctionTable.data); for(size_t i = 0; i < transferFunctionTable.len; ++i) { transferFunctionTable_QList.push_back(static_cast(transferFunctionTable_arr[i])); } - QColorSpace* ret = new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, transferFunctionTable_QList); - *outptr_QColorSpace = ret; + return new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, transferFunctionTable_QList); } -void QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ redTransferFunctionTable, struct miqt_array /* of uint16_t */ greenTransferFunctionTable, struct miqt_array /* of uint16_t */ blueTransferFunctionTable, QColorSpace** outptr_QColorSpace) { +QColorSpace* QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ redTransferFunctionTable, struct miqt_array /* of uint16_t */ greenTransferFunctionTable, struct miqt_array /* of uint16_t */ blueTransferFunctionTable) { QList redTransferFunctionTable_QList; redTransferFunctionTable_QList.reserve(redTransferFunctionTable.len); uint16_t* redTransferFunctionTable_arr = static_cast(redTransferFunctionTable.data); @@ -76,23 +69,19 @@ void QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoin for(size_t i = 0; i < blueTransferFunctionTable.len; ++i) { blueTransferFunctionTable_QList.push_back(static_cast(blueTransferFunctionTable_arr[i])); } - QColorSpace* ret = new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, redTransferFunctionTable_QList, greenTransferFunctionTable_QList, blueTransferFunctionTable_QList); - *outptr_QColorSpace = ret; + return new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, redTransferFunctionTable_QList, greenTransferFunctionTable_QList, blueTransferFunctionTable_QList); } -void QColorSpace_new9(QColorSpace* colorSpace, QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(*colorSpace); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new9(QColorSpace* colorSpace) { + return new QColorSpace(*colorSpace); } -void QColorSpace_new10(int primaries, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(static_cast(primaries), static_cast(transferFunction), static_cast(gamma)); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new10(int primaries, int transferFunction, float gamma) { + return new QColorSpace(static_cast(primaries), static_cast(transferFunction), static_cast(gamma)); } -void QColorSpace_new11(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace) { - QColorSpace* ret = new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction), static_cast(gamma)); - *outptr_QColorSpace = ret; +QColorSpace* QColorSpace_new11(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma) { + return new QColorSpace(*whitePoint, *redPoint, *greenPoint, *bluePoint, static_cast(transferFunction), static_cast(gamma)); } void QColorSpace_OperatorAssign(QColorSpace* self, QColorSpace* colorSpace) { diff --git a/qt6/gen_qcolorspace.go b/qt6/gen_qcolorspace.go index f2d3845c..3d0167a2 100644 --- a/qt6/gen_qcolorspace.go +++ b/qt6/gen_qcolorspace.go @@ -67,54 +67,43 @@ func newQColorSpace(h *C.QColorSpace) *QColorSpace { if h == nil { return nil } + return &QColorSpace{h: h} } // UnsafeNewQColorSpace constructs the type using only unsafe pointers. func UnsafeNewQColorSpace(h unsafe.Pointer) *QColorSpace { - if h == nil { - return nil - } - - return &QColorSpace{h: (*C.QColorSpace)(h)} + return newQColorSpace((*C.QColorSpace)(h)) } // NewQColorSpace constructs a new QColorSpace object. func NewQColorSpace() *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new(&outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new()) ret.isSubclass = true return ret } // NewQColorSpace2 constructs a new QColorSpace object. func NewQColorSpace2(namedColorSpace QColorSpace__NamedColorSpace) *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new2((C.int)(namedColorSpace), &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new2((C.int)(namedColorSpace))) ret.isSubclass = true return ret } // NewQColorSpace3 constructs a new QColorSpace object. func NewQColorSpace3(primaries QColorSpace__Primaries, transferFunction QColorSpace__TransferFunction) *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new3((C.int)(primaries), (C.int)(transferFunction), &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new3((C.int)(primaries), (C.int)(transferFunction))) ret.isSubclass = true return ret } // NewQColorSpace4 constructs a new QColorSpace object. func NewQColorSpace4(primaries QColorSpace__Primaries, gamma float32) *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new4((C.int)(primaries), (C.float)(gamma), &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new4((C.int)(primaries), (C.float)(gamma))) ret.isSubclass = true return ret } @@ -127,20 +116,16 @@ func NewQColorSpace5(primaries QColorSpace__Primaries, transferFunctionTable []u transferFunctionTable_CArray[i] = (C.uint16_t)(transferFunctionTable[i]) } transferFunctionTable_ma := C.struct_miqt_array{len: C.size_t(len(transferFunctionTable)), data: unsafe.Pointer(transferFunctionTable_CArray)} - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new5((C.int)(primaries), transferFunctionTable_ma, &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new5((C.int)(primaries), transferFunctionTable_ma)) ret.isSubclass = true return ret } // NewQColorSpace6 constructs a new QColorSpace object. func NewQColorSpace6(whitePoint *QPointF, redPoint *QPointF, greenPoint *QPointF, bluePoint *QPointF, transferFunction QColorSpace__TransferFunction) *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new6(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction), &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new6(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction))) ret.isSubclass = true return ret } @@ -153,10 +138,8 @@ func NewQColorSpace7(whitePoint *QPointF, redPoint *QPointF, greenPoint *QPointF transferFunctionTable_CArray[i] = (C.uint16_t)(transferFunctionTable[i]) } transferFunctionTable_ma := C.struct_miqt_array{len: C.size_t(len(transferFunctionTable)), data: unsafe.Pointer(transferFunctionTable_CArray)} - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new7(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), transferFunctionTable_ma, &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new7(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), transferFunctionTable_ma)) ret.isSubclass = true return ret } @@ -181,40 +164,32 @@ func NewQColorSpace8(whitePoint *QPointF, redPoint *QPointF, greenPoint *QPointF blueTransferFunctionTable_CArray[i] = (C.uint16_t)(blueTransferFunctionTable[i]) } blueTransferFunctionTable_ma := C.struct_miqt_array{len: C.size_t(len(blueTransferFunctionTable)), data: unsafe.Pointer(blueTransferFunctionTable_CArray)} - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new8(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), redTransferFunctionTable_ma, greenTransferFunctionTable_ma, blueTransferFunctionTable_ma, &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new8(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), redTransferFunctionTable_ma, greenTransferFunctionTable_ma, blueTransferFunctionTable_ma)) ret.isSubclass = true return ret } // NewQColorSpace9 constructs a new QColorSpace object. func NewQColorSpace9(colorSpace *QColorSpace) *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new9(colorSpace.cPointer(), &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new9(colorSpace.cPointer())) ret.isSubclass = true return ret } // NewQColorSpace10 constructs a new QColorSpace object. func NewQColorSpace10(primaries QColorSpace__Primaries, transferFunction QColorSpace__TransferFunction, gamma float32) *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new10((C.int)(primaries), (C.int)(transferFunction), (C.float)(gamma), &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new10((C.int)(primaries), (C.int)(transferFunction), (C.float)(gamma))) ret.isSubclass = true return ret } // NewQColorSpace11 constructs a new QColorSpace object. func NewQColorSpace11(whitePoint *QPointF, redPoint *QPointF, greenPoint *QPointF, bluePoint *QPointF, transferFunction QColorSpace__TransferFunction, gamma float32) *QColorSpace { - var outptr_QColorSpace *C.QColorSpace = nil - C.QColorSpace_new11(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction), (C.float)(gamma), &outptr_QColorSpace) - ret := newQColorSpace(outptr_QColorSpace) + ret := newQColorSpace(C.QColorSpace_new11(whitePoint.cPointer(), redPoint.cPointer(), greenPoint.cPointer(), bluePoint.cPointer(), (C.int)(transferFunction), (C.float)(gamma))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qcolorspace.h b/qt6/gen_qcolorspace.h index f20f1b0f..254f03ed 100644 --- a/qt6/gen_qcolorspace.h +++ b/qt6/gen_qcolorspace.h @@ -24,17 +24,17 @@ typedef struct QColorTransform QColorTransform; typedef struct QPointF QPointF; #endif -void QColorSpace_new(QColorSpace** outptr_QColorSpace); -void QColorSpace_new2(int namedColorSpace, QColorSpace** outptr_QColorSpace); -void QColorSpace_new3(int primaries, int transferFunction, QColorSpace** outptr_QColorSpace); -void QColorSpace_new4(int primaries, float gamma, QColorSpace** outptr_QColorSpace); -void QColorSpace_new5(int primaries, struct miqt_array /* of uint16_t */ transferFunctionTable, QColorSpace** outptr_QColorSpace); -void QColorSpace_new6(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, QColorSpace** outptr_QColorSpace); -void QColorSpace_new7(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ transferFunctionTable, QColorSpace** outptr_QColorSpace); -void QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ redTransferFunctionTable, struct miqt_array /* of uint16_t */ greenTransferFunctionTable, struct miqt_array /* of uint16_t */ blueTransferFunctionTable, QColorSpace** outptr_QColorSpace); -void QColorSpace_new9(QColorSpace* colorSpace, QColorSpace** outptr_QColorSpace); -void QColorSpace_new10(int primaries, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace); -void QColorSpace_new11(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma, QColorSpace** outptr_QColorSpace); +QColorSpace* QColorSpace_new(); +QColorSpace* QColorSpace_new2(int namedColorSpace); +QColorSpace* QColorSpace_new3(int primaries, int transferFunction); +QColorSpace* QColorSpace_new4(int primaries, float gamma); +QColorSpace* QColorSpace_new5(int primaries, struct miqt_array /* of uint16_t */ transferFunctionTable); +QColorSpace* QColorSpace_new6(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction); +QColorSpace* QColorSpace_new7(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ transferFunctionTable); +QColorSpace* QColorSpace_new8(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, struct miqt_array /* of uint16_t */ redTransferFunctionTable, struct miqt_array /* of uint16_t */ greenTransferFunctionTable, struct miqt_array /* of uint16_t */ blueTransferFunctionTable); +QColorSpace* QColorSpace_new9(QColorSpace* colorSpace); +QColorSpace* QColorSpace_new10(int primaries, int transferFunction, float gamma); +QColorSpace* QColorSpace_new11(QPointF* whitePoint, QPointF* redPoint, QPointF* greenPoint, QPointF* bluePoint, int transferFunction, float gamma); void QColorSpace_OperatorAssign(QColorSpace* self, QColorSpace* colorSpace); void QColorSpace_Swap(QColorSpace* self, QColorSpace* colorSpace); int QColorSpace_Primaries(const QColorSpace* self); diff --git a/qt6/gen_qcolortransform.cpp b/qt6/gen_qcolortransform.cpp index 7da6bf96..ef3a5f88 100644 --- a/qt6/gen_qcolortransform.cpp +++ b/qt6/gen_qcolortransform.cpp @@ -5,14 +5,12 @@ #include "gen_qcolortransform.h" #include "_cgo_export.h" -void QColorTransform_new(QColorTransform** outptr_QColorTransform) { - QColorTransform* ret = new QColorTransform(); - *outptr_QColorTransform = ret; +QColorTransform* QColorTransform_new() { + return new QColorTransform(); } -void QColorTransform_new2(QColorTransform* colorTransform, QColorTransform** outptr_QColorTransform) { - QColorTransform* ret = new QColorTransform(*colorTransform); - *outptr_QColorTransform = ret; +QColorTransform* QColorTransform_new2(QColorTransform* colorTransform) { + return new QColorTransform(*colorTransform); } void QColorTransform_OperatorAssign(QColorTransform* self, QColorTransform* other) { diff --git a/qt6/gen_qcolortransform.go b/qt6/gen_qcolortransform.go index dc8456c2..c70be1eb 100644 --- a/qt6/gen_qcolortransform.go +++ b/qt6/gen_qcolortransform.go @@ -37,34 +37,27 @@ func newQColorTransform(h *C.QColorTransform) *QColorTransform { if h == nil { return nil } + return &QColorTransform{h: h} } // UnsafeNewQColorTransform constructs the type using only unsafe pointers. func UnsafeNewQColorTransform(h unsafe.Pointer) *QColorTransform { - if h == nil { - return nil - } - - return &QColorTransform{h: (*C.QColorTransform)(h)} + return newQColorTransform((*C.QColorTransform)(h)) } // NewQColorTransform constructs a new QColorTransform object. func NewQColorTransform() *QColorTransform { - var outptr_QColorTransform *C.QColorTransform = nil - C.QColorTransform_new(&outptr_QColorTransform) - ret := newQColorTransform(outptr_QColorTransform) + ret := newQColorTransform(C.QColorTransform_new()) ret.isSubclass = true return ret } // NewQColorTransform2 constructs a new QColorTransform object. func NewQColorTransform2(colorTransform *QColorTransform) *QColorTransform { - var outptr_QColorTransform *C.QColorTransform = nil - C.QColorTransform_new2(colorTransform.cPointer(), &outptr_QColorTransform) - ret := newQColorTransform(outptr_QColorTransform) + ret := newQColorTransform(C.QColorTransform_new2(colorTransform.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qcolortransform.h b/qt6/gen_qcolortransform.h index d0c92658..f6c17799 100644 --- a/qt6/gen_qcolortransform.h +++ b/qt6/gen_qcolortransform.h @@ -24,8 +24,8 @@ typedef struct QColorTransform QColorTransform; typedef struct QRgba64 QRgba64; #endif -void QColorTransform_new(QColorTransform** outptr_QColorTransform); -void QColorTransform_new2(QColorTransform* colorTransform, QColorTransform** outptr_QColorTransform); +QColorTransform* QColorTransform_new(); +QColorTransform* QColorTransform_new2(QColorTransform* colorTransform); void QColorTransform_OperatorAssign(QColorTransform* self, QColorTransform* other); void QColorTransform_Swap(QColorTransform* self, QColorTransform* other); bool QColorTransform_IsIdentity(const QColorTransform* self); diff --git a/qt6/gen_qcolumnview.cpp b/qt6/gen_qcolumnview.cpp index 9d90f960..2c29e81e 100644 --- a/qt6/gen_qcolumnview.cpp +++ b/qt6/gen_qcolumnview.cpp @@ -1604,26 +1604,16 @@ public: }; -void QColumnView_new(QWidget* parent, QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQColumnView* ret = new MiqtVirtualQColumnView(parent); - *outptr_QColumnView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QColumnView* QColumnView_new(QWidget* parent) { + return new MiqtVirtualQColumnView(parent); } -void QColumnView_new2(QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQColumnView* ret = new MiqtVirtualQColumnView(); - *outptr_QColumnView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QColumnView* QColumnView_new2() { + return new MiqtVirtualQColumnView(); +} + +void QColumnView_virtbase(QColumnView* src, QAbstractItemView** outptr_QAbstractItemView) { + *outptr_QAbstractItemView = static_cast(src); } QMetaObject* QColumnView_MetaObject(const QColumnView* self) { diff --git a/qt6/gen_qcolumnview.go b/qt6/gen_qcolumnview.go index 838b6328..f47e1f14 100644 --- a/qt6/gen_qcolumnview.go +++ b/qt6/gen_qcolumnview.go @@ -35,52 +35,34 @@ func (this *QColumnView) UnsafePointer() unsafe.Pointer { } // newQColumnView constructs the type using only CGO pointers. -func newQColumnView(h *C.QColumnView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QColumnView { +func newQColumnView(h *C.QColumnView) *QColumnView { if h == nil { return nil } + var outptr_QAbstractItemView *C.QAbstractItemView = nil + C.QColumnView_virtbase(h, &outptr_QAbstractItemView) + return &QColumnView{h: h, - QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractItemView: newQAbstractItemView(outptr_QAbstractItemView)} } // UnsafeNewQColumnView constructs the type using only unsafe pointers. -func UnsafeNewQColumnView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QColumnView { - if h == nil { - return nil - } - - return &QColumnView{h: (*C.QColumnView)(h), - QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQColumnView(h unsafe.Pointer) *QColumnView { + return newQColumnView((*C.QColumnView)(h)) } // NewQColumnView constructs a new QColumnView object. func NewQColumnView(parent *QWidget) *QColumnView { - var outptr_QColumnView *C.QColumnView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QColumnView_new(parent.cPointer(), &outptr_QColumnView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQColumnView(outptr_QColumnView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQColumnView(C.QColumnView_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQColumnView2 constructs a new QColumnView object. func NewQColumnView2() *QColumnView { - var outptr_QColumnView *C.QColumnView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QColumnView_new2(&outptr_QColumnView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQColumnView(outptr_QColumnView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQColumnView(C.QColumnView_new2()) ret.isSubclass = true return ret } @@ -171,7 +153,7 @@ func (this *QColumnView) ResizeGripsVisible() bool { } func (this *QColumnView) PreviewWidget() *QWidget { - return newQWidget(C.QColumnView_PreviewWidget(this.h), nil, nil) + return newQWidget(C.QColumnView_PreviewWidget(this.h)) } func (this *QColumnView) SetPreviewWidget(widget *QWidget) { @@ -355,7 +337,7 @@ func miqt_exec_callback_QColumnView_SetModel(self *C.QColumnView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc((&QColumnView{h: self}).callVirtualBase_SetModel, slotval1) @@ -381,7 +363,7 @@ func miqt_exec_callback_QColumnView_SetSelectionModel(self *C.QColumnView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QColumnView{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -516,7 +498,7 @@ func miqt_exec_callback_QColumnView_ResizeEvent(self *C.QColumnView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -718,7 +700,7 @@ func miqt_exec_callback_QColumnView_ScrollContentsBy(self *C.QColumnView, cb C.i func (this *QColumnView) callVirtualBase_CreateColumn(rootIndex *QModelIndex) *QAbstractItemView { - return newQAbstractItemView(C.QColumnView_virtualbase_CreateColumn(unsafe.Pointer(this.h), rootIndex.cPointer()), nil, nil, nil, nil, nil) + return newQAbstractItemView(C.QColumnView_virtualbase_CreateColumn(unsafe.Pointer(this.h), rootIndex.cPointer())) } func (this *QColumnView) OnCreateColumn(slot func(super func(rootIndex *QModelIndex) *QAbstractItemView, rootIndex *QModelIndex) *QAbstractItemView) { @@ -835,7 +817,7 @@ func miqt_exec_callback_QColumnView_SizeHintForColumn(self *C.QColumnView, cb C. func (this *QColumnView) callVirtualBase_ItemDelegateForIndex(index *QModelIndex) *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QColumnView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer()), nil) + return newQAbstractItemDelegate(C.QColumnView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer())) } func (this *QColumnView) OnItemDelegateForIndex(slot func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) { @@ -1230,7 +1212,7 @@ func miqt_exec_callback_QColumnView_CloseEditor(self *C.QColumnView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) @@ -1258,7 +1240,7 @@ func miqt_exec_callback_QColumnView_CommitData(self *C.QColumnView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc((&QColumnView{h: self}).callVirtualBase_CommitData, slotval1) @@ -1437,7 +1419,7 @@ func miqt_exec_callback_QColumnView_InitViewItemOption(self *C.QColumnView, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) gofunc((&QColumnView{h: self}).callVirtualBase_InitViewItemOption, slotval1) @@ -1547,7 +1529,7 @@ func miqt_exec_callback_QColumnView_MousePressEvent(self *C.QColumnView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1573,7 +1555,7 @@ func miqt_exec_callback_QColumnView_MouseMoveEvent(self *C.QColumnView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1599,7 +1581,7 @@ func miqt_exec_callback_QColumnView_MouseReleaseEvent(self *C.QColumnView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1625,7 +1607,7 @@ func miqt_exec_callback_QColumnView_MouseDoubleClickEvent(self *C.QColumnView, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1651,7 +1633,7 @@ func miqt_exec_callback_QColumnView_DragEnterEvent(self *C.QColumnView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1677,7 +1659,7 @@ func miqt_exec_callback_QColumnView_DragMoveEvent(self *C.QColumnView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1703,7 +1685,7 @@ func miqt_exec_callback_QColumnView_DragLeaveEvent(self *C.QColumnView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1729,7 +1711,7 @@ func miqt_exec_callback_QColumnView_DropEvent(self *C.QColumnView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1755,7 +1737,7 @@ func miqt_exec_callback_QColumnView_FocusInEvent(self *C.QColumnView, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1781,7 +1763,7 @@ func miqt_exec_callback_QColumnView_FocusOutEvent(self *C.QColumnView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1807,7 +1789,7 @@ func miqt_exec_callback_QColumnView_KeyPressEvent(self *C.QColumnView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1833,7 +1815,7 @@ func miqt_exec_callback_QColumnView_TimerEvent(self *C.QColumnView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1859,7 +1841,7 @@ func miqt_exec_callback_QColumnView_InputMethodEvent(self *C.QColumnView, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QColumnView{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qcolumnview.h b/qt6/gen_qcolumnview.h index 7e218a5d..92d2e763 100644 --- a/qt6/gen_qcolumnview.h +++ b/qt6/gen_qcolumnview.h @@ -78,8 +78,9 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QColumnView_new(QWidget* parent, QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QColumnView_new2(QColumnView** outptr_QColumnView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QColumnView* QColumnView_new(QWidget* parent); +QColumnView* QColumnView_new2(); +void QColumnView_virtbase(QColumnView* src, QAbstractItemView** outptr_QAbstractItemView); QMetaObject* QColumnView_MetaObject(const QColumnView* self); void* QColumnView_Metacast(QColumnView* self, const char* param1); struct miqt_string QColumnView_Tr(const char* s); diff --git a/qt6/gen_qcombobox.cpp b/qt6/gen_qcombobox.cpp index bb917bcb..24c098b8 100644 --- a/qt6/gen_qcombobox.cpp +++ b/qt6/gen_qcombobox.cpp @@ -1126,20 +1126,16 @@ public: }; -void QComboBox_new(QWidget* parent, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQComboBox* ret = new MiqtVirtualQComboBox(parent); - *outptr_QComboBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QComboBox* QComboBox_new(QWidget* parent) { + return new MiqtVirtualQComboBox(parent); } -void QComboBox_new2(QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQComboBox* ret = new MiqtVirtualQComboBox(); - *outptr_QComboBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QComboBox* QComboBox_new2() { + return new MiqtVirtualQComboBox(); +} + +void QComboBox_virtbase(QComboBox* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QComboBox_MetaObject(const QComboBox* self) { diff --git a/qt6/gen_qcombobox.go b/qt6/gen_qcombobox.go index e6a5f24e..2fa1ef4a 100644 --- a/qt6/gen_qcombobox.go +++ b/qt6/gen_qcombobox.go @@ -55,46 +55,34 @@ func (this *QComboBox) UnsafePointer() unsafe.Pointer { } // newQComboBox constructs the type using only CGO pointers. -func newQComboBox(h *C.QComboBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QComboBox { +func newQComboBox(h *C.QComboBox) *QComboBox { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QComboBox_virtbase(h, &outptr_QWidget) + return &QComboBox{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQComboBox constructs the type using only unsafe pointers. -func UnsafeNewQComboBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QComboBox { - if h == nil { - return nil - } - - return &QComboBox{h: (*C.QComboBox)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQComboBox(h unsafe.Pointer) *QComboBox { + return newQComboBox((*C.QComboBox)(h)) } // NewQComboBox constructs a new QComboBox object. func NewQComboBox(parent *QWidget) *QComboBox { - var outptr_QComboBox *C.QComboBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QComboBox_new(parent.cPointer(), &outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQComboBox(outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQComboBox(C.QComboBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQComboBox2 constructs a new QComboBox object. func NewQComboBox2() *QComboBox { - var outptr_QComboBox *C.QComboBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QComboBox_new2(&outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQComboBox(outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQComboBox(C.QComboBox_new2()) ret.isSubclass = true return ret } @@ -228,7 +216,7 @@ func (this *QComboBox) SetLineEdit(edit *QLineEdit) { } func (this *QComboBox) LineEdit() *QLineEdit { - return newQLineEdit(C.QComboBox_LineEdit(this.h), nil, nil, nil) + return newQLineEdit(C.QComboBox_LineEdit(this.h)) } func (this *QComboBox) SetValidator(v *QValidator) { @@ -236,7 +224,7 @@ func (this *QComboBox) SetValidator(v *QValidator) { } func (this *QComboBox) Validator() *QValidator { - return newQValidator(C.QComboBox_Validator(this.h), nil) + return newQValidator(C.QComboBox_Validator(this.h)) } func (this *QComboBox) SetCompleter(c *QCompleter) { @@ -244,11 +232,11 @@ func (this *QComboBox) SetCompleter(c *QCompleter) { } func (this *QComboBox) Completer() *QCompleter { - return newQCompleter(C.QComboBox_Completer(this.h), nil) + return newQCompleter(C.QComboBox_Completer(this.h)) } func (this *QComboBox) ItemDelegate() *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QComboBox_ItemDelegate(this.h), nil) + return newQAbstractItemDelegate(C.QComboBox_ItemDelegate(this.h)) } func (this *QComboBox) SetItemDelegate(delegate *QAbstractItemDelegate) { @@ -256,7 +244,7 @@ func (this *QComboBox) SetItemDelegate(delegate *QAbstractItemDelegate) { } func (this *QComboBox) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QComboBox_Model(this.h), nil) + return newQAbstractItemModel(C.QComboBox_Model(this.h)) } func (this *QComboBox) SetModel(model *QAbstractItemModel) { @@ -402,7 +390,7 @@ func (this *QComboBox) SetItemData(index int, value *QVariant) { } func (this *QComboBox) View() *QAbstractItemView { - return newQAbstractItemView(C.QComboBox_View(this.h), nil, nil, nil, nil, nil) + return newQAbstractItemView(C.QComboBox_View(this.h)) } func (this *QComboBox) SetView(itemView *QAbstractItemView) { @@ -747,7 +735,7 @@ func miqt_exec_callback_QComboBox_SetModel(self *C.QComboBox, cb C.intptr_t, mod } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc((&QComboBox{h: self}).callVirtualBase_SetModel, slotval1) @@ -931,7 +919,7 @@ func miqt_exec_callback_QComboBox_FocusInEvent(self *C.QComboBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -957,7 +945,7 @@ func miqt_exec_callback_QComboBox_FocusOutEvent(self *C.QComboBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1009,7 +997,7 @@ func miqt_exec_callback_QComboBox_ResizeEvent(self *C.QComboBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1035,7 +1023,7 @@ func miqt_exec_callback_QComboBox_PaintEvent(self *C.QComboBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1061,7 +1049,7 @@ func miqt_exec_callback_QComboBox_ShowEvent(self *C.QComboBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(e, nil) + slotval1 := newQShowEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1087,7 +1075,7 @@ func miqt_exec_callback_QComboBox_HideEvent(self *C.QComboBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(e, nil) + slotval1 := newQHideEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1113,7 +1101,7 @@ func miqt_exec_callback_QComboBox_MousePressEvent(self *C.QComboBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1139,7 +1127,7 @@ func miqt_exec_callback_QComboBox_MouseReleaseEvent(self *C.QComboBox, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1165,7 +1153,7 @@ func miqt_exec_callback_QComboBox_KeyPressEvent(self *C.QComboBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1191,7 +1179,7 @@ func miqt_exec_callback_QComboBox_KeyReleaseEvent(self *C.QComboBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1217,7 +1205,7 @@ func miqt_exec_callback_QComboBox_WheelEvent(self *C.QComboBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1243,7 +1231,7 @@ func miqt_exec_callback_QComboBox_ContextMenuEvent(self *C.QComboBox, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(e, nil, nil) + slotval1 := newQContextMenuEvent(e) gofunc((&QComboBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1269,7 +1257,7 @@ func miqt_exec_callback_QComboBox_InputMethodEvent(self *C.QComboBox, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QComboBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -1295,7 +1283,7 @@ func miqt_exec_callback_QComboBox_InitStyleOption(self *C.QComboBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionComboBox(option, nil, nil) + slotval1 := newQStyleOptionComboBox(option) gofunc((&QComboBox{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -1450,7 +1438,7 @@ func miqt_exec_callback_QComboBox_MouseDoubleClickEvent(self *C.QComboBox, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1476,7 +1464,7 @@ func miqt_exec_callback_QComboBox_MouseMoveEvent(self *C.QComboBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1502,7 +1490,7 @@ func miqt_exec_callback_QComboBox_EnterEvent(self *C.QComboBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -1554,7 +1542,7 @@ func miqt_exec_callback_QComboBox_MoveEvent(self *C.QComboBox, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1580,7 +1568,7 @@ func miqt_exec_callback_QComboBox_CloseEvent(self *C.QComboBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1606,7 +1594,7 @@ func miqt_exec_callback_QComboBox_TabletEvent(self *C.QComboBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1632,7 +1620,7 @@ func miqt_exec_callback_QComboBox_ActionEvent(self *C.QComboBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1658,7 +1646,7 @@ func miqt_exec_callback_QComboBox_DragEnterEvent(self *C.QComboBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1684,7 +1672,7 @@ func miqt_exec_callback_QComboBox_DragMoveEvent(self *C.QComboBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1710,7 +1698,7 @@ func miqt_exec_callback_QComboBox_DragLeaveEvent(self *C.QComboBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1736,7 +1724,7 @@ func miqt_exec_callback_QComboBox_DropEvent(self *C.QComboBox, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QComboBox{h: self}).callVirtualBase_DropEvent, slotval1) diff --git a/qt6/gen_qcombobox.h b/qt6/gen_qcombobox.h index 86b52c36..16e9dfd2 100644 --- a/qt6/gen_qcombobox.h +++ b/qt6/gen_qcombobox.h @@ -96,8 +96,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QComboBox_new(QWidget* parent, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QComboBox_new2(QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QComboBox* QComboBox_new(QWidget* parent); +QComboBox* QComboBox_new2(); +void QComboBox_virtbase(QComboBox* src, QWidget** outptr_QWidget); QMetaObject* QComboBox_MetaObject(const QComboBox* self); void* QComboBox_Metacast(QComboBox* self, const char* param1); struct miqt_string QComboBox_Tr(const char* s); diff --git a/qt6/gen_qcommandlineoption.cpp b/qt6/gen_qcommandlineoption.cpp index e5dbf8ce..548a615e 100644 --- a/qt6/gen_qcommandlineoption.cpp +++ b/qt6/gen_qcommandlineoption.cpp @@ -7,13 +7,12 @@ #include "gen_qcommandlineoption.h" #include "_cgo_export.h" -void QCommandLineOption_new(struct miqt_string name, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - QCommandLineOption* ret = new QCommandLineOption(name_QString); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(name_QString); } -void QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -21,18 +20,16 @@ void QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ name QString names_arr_i_QString = QString::fromUtf8(names_arr[i].data, names_arr[i].len); names_QList.push_back(names_arr_i_QString); } - QCommandLineOption* ret = new QCommandLineOption(names_QList); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(names_QList); } -void QCommandLineOption_new3(struct miqt_string name, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new3(struct miqt_string name, struct miqt_string description) { QString name_QString = QString::fromUtf8(name.data, name.len); QString description_QString = QString::fromUtf8(description.data, description.len); - QCommandLineOption* ret = new QCommandLineOption(name_QString, description_QString); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(name_QString, description_QString); } -void QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -41,33 +38,29 @@ void QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ name names_QList.push_back(names_arr_i_QString); } QString description_QString = QString::fromUtf8(description.data, description.len); - QCommandLineOption* ret = new QCommandLineOption(names_QList, description_QString); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(names_QList, description_QString); } -void QCommandLineOption_new5(QCommandLineOption* other, QCommandLineOption** outptr_QCommandLineOption) { - QCommandLineOption* ret = new QCommandLineOption(*other); - *outptr_QCommandLineOption = ret; +QCommandLineOption* QCommandLineOption_new5(QCommandLineOption* other) { + return new QCommandLineOption(*other); } -void QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName) { QString name_QString = QString::fromUtf8(name.data, name.len); QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); - QCommandLineOption* ret = new QCommandLineOption(name_QString, description_QString, valueName_QString); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(name_QString, description_QString, valueName_QString); } -void QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue) { QString name_QString = QString::fromUtf8(name.data, name.len); QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); QString defaultValue_QString = QString::fromUtf8(defaultValue.data, defaultValue.len); - QCommandLineOption* ret = new QCommandLineOption(name_QString, description_QString, valueName_QString, defaultValue_QString); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(name_QString, description_QString, valueName_QString, defaultValue_QString); } -void QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -77,11 +70,10 @@ void QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ name } QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); - QCommandLineOption* ret = new QCommandLineOption(names_QList, description_QString, valueName_QString); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(names_QList, description_QString, valueName_QString); } -void QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption) { +QCommandLineOption* QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue) { QStringList names_QList; names_QList.reserve(names.len); struct miqt_string* names_arr = static_cast(names.data); @@ -92,8 +84,7 @@ void QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ name QString description_QString = QString::fromUtf8(description.data, description.len); QString valueName_QString = QString::fromUtf8(valueName.data, valueName.len); QString defaultValue_QString = QString::fromUtf8(defaultValue.data, defaultValue.len); - QCommandLineOption* ret = new QCommandLineOption(names_QList, description_QString, valueName_QString, defaultValue_QString); - *outptr_QCommandLineOption = ret; + return new QCommandLineOption(names_QList, description_QString, valueName_QString, defaultValue_QString); } void QCommandLineOption_OperatorAssign(QCommandLineOption* self, QCommandLineOption* other) { diff --git a/qt6/gen_qcommandlineoption.go b/qt6/gen_qcommandlineoption.go index 1a9c307a..7f1eb84f 100644 --- a/qt6/gen_qcommandlineoption.go +++ b/qt6/gen_qcommandlineoption.go @@ -44,16 +44,13 @@ func newQCommandLineOption(h *C.QCommandLineOption) *QCommandLineOption { if h == nil { return nil } + return &QCommandLineOption{h: h} } // UnsafeNewQCommandLineOption constructs the type using only unsafe pointers. func UnsafeNewQCommandLineOption(h unsafe.Pointer) *QCommandLineOption { - if h == nil { - return nil - } - - return &QCommandLineOption{h: (*C.QCommandLineOption)(h)} + return newQCommandLineOption((*C.QCommandLineOption)(h)) } // NewQCommandLineOption constructs a new QCommandLineOption object. @@ -62,10 +59,8 @@ func NewQCommandLineOption(name string) *QCommandLineOption { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new(name_ms, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new(name_ms)) ret.isSubclass = true return ret } @@ -82,10 +77,8 @@ func NewQCommandLineOption2(names []string) *QCommandLineOption { names_CArray[i] = names_i_ms } names_ma := C.struct_miqt_array{len: C.size_t(len(names)), data: unsafe.Pointer(names_CArray)} - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new2(names_ma, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new2(names_ma)) ret.isSubclass = true return ret } @@ -100,10 +93,8 @@ func NewQCommandLineOption3(name string, description string) *QCommandLineOption description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new3(name_ms, description_ms, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new3(name_ms, description_ms)) ret.isSubclass = true return ret } @@ -124,20 +115,16 @@ func NewQCommandLineOption4(names []string, description string) *QCommandLineOpt description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new4(names_ma, description_ms, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new4(names_ma, description_ms)) ret.isSubclass = true return ret } // NewQCommandLineOption5 constructs a new QCommandLineOption object. func NewQCommandLineOption5(other *QCommandLineOption) *QCommandLineOption { - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new5(other.cPointer(), &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new5(other.cPointer())) ret.isSubclass = true return ret } @@ -156,10 +143,8 @@ func NewQCommandLineOption6(name string, description string, valueName string) * valueName_ms.data = C.CString(valueName) valueName_ms.len = C.size_t(len(valueName)) defer C.free(unsafe.Pointer(valueName_ms.data)) - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new6(name_ms, description_ms, valueName_ms, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new6(name_ms, description_ms, valueName_ms)) ret.isSubclass = true return ret } @@ -182,10 +167,8 @@ func NewQCommandLineOption7(name string, description string, valueName string, d defaultValue_ms.data = C.CString(defaultValue) defaultValue_ms.len = C.size_t(len(defaultValue)) defer C.free(unsafe.Pointer(defaultValue_ms.data)) - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new7(name_ms, description_ms, valueName_ms, defaultValue_ms, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new7(name_ms, description_ms, valueName_ms, defaultValue_ms)) ret.isSubclass = true return ret } @@ -210,10 +193,8 @@ func NewQCommandLineOption8(names []string, description string, valueName string valueName_ms.data = C.CString(valueName) valueName_ms.len = C.size_t(len(valueName)) defer C.free(unsafe.Pointer(valueName_ms.data)) - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new8(names_ma, description_ms, valueName_ms, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new8(names_ma, description_ms, valueName_ms)) ret.isSubclass = true return ret } @@ -242,10 +223,8 @@ func NewQCommandLineOption9(names []string, description string, valueName string defaultValue_ms.data = C.CString(defaultValue) defaultValue_ms.len = C.size_t(len(defaultValue)) defer C.free(unsafe.Pointer(defaultValue_ms.data)) - var outptr_QCommandLineOption *C.QCommandLineOption = nil - C.QCommandLineOption_new9(names_ma, description_ms, valueName_ms, defaultValue_ms, &outptr_QCommandLineOption) - ret := newQCommandLineOption(outptr_QCommandLineOption) + ret := newQCommandLineOption(C.QCommandLineOption_new9(names_ma, description_ms, valueName_ms, defaultValue_ms)) ret.isSubclass = true return ret } diff --git a/qt6/gen_qcommandlineoption.h b/qt6/gen_qcommandlineoption.h index b3a122d7..34efd684 100644 --- a/qt6/gen_qcommandlineoption.h +++ b/qt6/gen_qcommandlineoption.h @@ -20,15 +20,15 @@ class QCommandLineOption; typedef struct QCommandLineOption QCommandLineOption; #endif -void QCommandLineOption_new(struct miqt_string name, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new3(struct miqt_string name, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new5(QCommandLineOption* other, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, QCommandLineOption** outptr_QCommandLineOption); -void QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue, QCommandLineOption** outptr_QCommandLineOption); +QCommandLineOption* QCommandLineOption_new(struct miqt_string name); +QCommandLineOption* QCommandLineOption_new2(struct miqt_array /* of struct miqt_string */ names); +QCommandLineOption* QCommandLineOption_new3(struct miqt_string name, struct miqt_string description); +QCommandLineOption* QCommandLineOption_new4(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description); +QCommandLineOption* QCommandLineOption_new5(QCommandLineOption* other); +QCommandLineOption* QCommandLineOption_new6(struct miqt_string name, struct miqt_string description, struct miqt_string valueName); +QCommandLineOption* QCommandLineOption_new7(struct miqt_string name, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue); +QCommandLineOption* QCommandLineOption_new8(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName); +QCommandLineOption* QCommandLineOption_new9(struct miqt_array /* of struct miqt_string */ names, struct miqt_string description, struct miqt_string valueName, struct miqt_string defaultValue); void QCommandLineOption_OperatorAssign(QCommandLineOption* self, QCommandLineOption* other); void QCommandLineOption_Swap(QCommandLineOption* self, QCommandLineOption* other); struct miqt_array /* of struct miqt_string */ QCommandLineOption_Names(const QCommandLineOption* self); diff --git a/qt6/gen_qcommandlineparser.cpp b/qt6/gen_qcommandlineparser.cpp index 4ce7a4c2..904d08d9 100644 --- a/qt6/gen_qcommandlineparser.cpp +++ b/qt6/gen_qcommandlineparser.cpp @@ -9,9 +9,8 @@ #include "gen_qcommandlineparser.h" #include "_cgo_export.h" -void QCommandLineParser_new(QCommandLineParser** outptr_QCommandLineParser) { - QCommandLineParser* ret = new QCommandLineParser(); - *outptr_QCommandLineParser = ret; +QCommandLineParser* QCommandLineParser_new() { + return new QCommandLineParser(); } struct miqt_string QCommandLineParser_Tr(const char* sourceText) { diff --git a/qt6/gen_qcommandlineparser.go b/qt6/gen_qcommandlineparser.go index 03838ffd..3555c363 100644 --- a/qt6/gen_qcommandlineparser.go +++ b/qt6/gen_qcommandlineparser.go @@ -51,24 +51,19 @@ func newQCommandLineParser(h *C.QCommandLineParser) *QCommandLineParser { if h == nil { return nil } + return &QCommandLineParser{h: h} } // UnsafeNewQCommandLineParser constructs the type using only unsafe pointers. func UnsafeNewQCommandLineParser(h unsafe.Pointer) *QCommandLineParser { - if h == nil { - return nil - } - - return &QCommandLineParser{h: (*C.QCommandLineParser)(h)} + return newQCommandLineParser((*C.QCommandLineParser)(h)) } // NewQCommandLineParser constructs a new QCommandLineParser object. func NewQCommandLineParser() *QCommandLineParser { - var outptr_QCommandLineParser *C.QCommandLineParser = nil - C.QCommandLineParser_new(&outptr_QCommandLineParser) - ret := newQCommandLineParser(outptr_QCommandLineParser) + ret := newQCommandLineParser(C.QCommandLineParser_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qcommandlineparser.h b/qt6/gen_qcommandlineparser.h index f576cfe4..f2c66ec3 100644 --- a/qt6/gen_qcommandlineparser.h +++ b/qt6/gen_qcommandlineparser.h @@ -24,7 +24,7 @@ typedef struct QCommandLineParser QCommandLineParser; typedef struct QCoreApplication QCoreApplication; #endif -void QCommandLineParser_new(QCommandLineParser** outptr_QCommandLineParser); +QCommandLineParser* QCommandLineParser_new(); struct miqt_string QCommandLineParser_Tr(const char* sourceText); void QCommandLineParser_SetSingleDashWordOptionMode(QCommandLineParser* self, int parsingMode); void QCommandLineParser_SetOptionsAfterPositionalArgumentsMode(QCommandLineParser* self, int mode); diff --git a/qt6/gen_qcommandlinkbutton.cpp b/qt6/gen_qcommandlinkbutton.cpp index 529c280c..73c9f769 100644 --- a/qt6/gen_qcommandlinkbutton.cpp +++ b/qt6/gen_qcommandlinkbutton.cpp @@ -293,70 +293,38 @@ public: }; -void QCommandLinkButton_new(QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(parent); - *outptr_QCommandLinkButton = ret; - *outptr_QPushButton = static_cast(ret); - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QCommandLinkButton* QCommandLinkButton_new(QWidget* parent) { + return new MiqtVirtualQCommandLinkButton(parent); } -void QCommandLinkButton_new2(QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(); - *outptr_QCommandLinkButton = ret; - *outptr_QPushButton = static_cast(ret); - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QCommandLinkButton* QCommandLinkButton_new2() { + return new MiqtVirtualQCommandLinkButton(); } -void QCommandLinkButton_new3(struct miqt_string text, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QCommandLinkButton* QCommandLinkButton_new3(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString); - *outptr_QCommandLinkButton = ret; - *outptr_QPushButton = static_cast(ret); - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQCommandLinkButton(text_QString); } -void QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QCommandLinkButton* QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description) { QString text_QString = QString::fromUtf8(text.data, text.len); QString description_QString = QString::fromUtf8(description.data, description.len); - MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString, description_QString); - *outptr_QCommandLinkButton = ret; - *outptr_QPushButton = static_cast(ret); - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQCommandLinkButton(text_QString, description_QString); } -void QCommandLinkButton_new5(struct miqt_string text, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QCommandLinkButton* QCommandLinkButton_new5(struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString, parent); - *outptr_QCommandLinkButton = ret; - *outptr_QPushButton = static_cast(ret); - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQCommandLinkButton(text_QString, parent); } -void QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QCommandLinkButton* QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); QString description_QString = QString::fromUtf8(description.data, description.len); - MiqtVirtualQCommandLinkButton* ret = new MiqtVirtualQCommandLinkButton(text_QString, description_QString, parent); - *outptr_QCommandLinkButton = ret; - *outptr_QPushButton = static_cast(ret); - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQCommandLinkButton(text_QString, description_QString, parent); +} + +void QCommandLinkButton_virtbase(QCommandLinkButton* src, QPushButton** outptr_QPushButton) { + *outptr_QPushButton = static_cast(src); } QMetaObject* QCommandLinkButton_MetaObject(const QCommandLinkButton* self) { diff --git a/qt6/gen_qcommandlinkbutton.go b/qt6/gen_qcommandlinkbutton.go index 5a78d5bf..d03553e3 100644 --- a/qt6/gen_qcommandlinkbutton.go +++ b/qt6/gen_qcommandlinkbutton.go @@ -35,50 +35,34 @@ func (this *QCommandLinkButton) UnsafePointer() unsafe.Pointer { } // newQCommandLinkButton constructs the type using only CGO pointers. -func newQCommandLinkButton(h *C.QCommandLinkButton, h_QPushButton *C.QPushButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QCommandLinkButton { +func newQCommandLinkButton(h *C.QCommandLinkButton) *QCommandLinkButton { if h == nil { return nil } + var outptr_QPushButton *C.QPushButton = nil + C.QCommandLinkButton_virtbase(h, &outptr_QPushButton) + return &QCommandLinkButton{h: h, - QPushButton: newQPushButton(h_QPushButton, h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} + QPushButton: newQPushButton(outptr_QPushButton)} } // UnsafeNewQCommandLinkButton constructs the type using only unsafe pointers. -func UnsafeNewQCommandLinkButton(h unsafe.Pointer, h_QPushButton unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QCommandLinkButton { - if h == nil { - return nil - } - - return &QCommandLinkButton{h: (*C.QCommandLinkButton)(h), - QPushButton: UnsafeNewQPushButton(h_QPushButton, h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQCommandLinkButton(h unsafe.Pointer) *QCommandLinkButton { + return newQCommandLinkButton((*C.QCommandLinkButton)(h)) } // NewQCommandLinkButton constructs a new QCommandLinkButton object. func NewQCommandLinkButton(parent *QWidget) *QCommandLinkButton { - var outptr_QCommandLinkButton *C.QCommandLinkButton = nil - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCommandLinkButton_new(parent.cPointer(), &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCommandLinkButton(C.QCommandLinkButton_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQCommandLinkButton2 constructs a new QCommandLinkButton object. func NewQCommandLinkButton2() *QCommandLinkButton { - var outptr_QCommandLinkButton *C.QCommandLinkButton = nil - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCommandLinkButton_new2(&outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCommandLinkButton(C.QCommandLinkButton_new2()) ret.isSubclass = true return ret } @@ -89,15 +73,8 @@ func NewQCommandLinkButton3(text string) *QCommandLinkButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QCommandLinkButton *C.QCommandLinkButton = nil - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCommandLinkButton_new3(text_ms, &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCommandLinkButton(C.QCommandLinkButton_new3(text_ms)) ret.isSubclass = true return ret } @@ -112,15 +89,8 @@ func NewQCommandLinkButton4(text string, description string) *QCommandLinkButton description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - var outptr_QCommandLinkButton *C.QCommandLinkButton = nil - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCommandLinkButton_new4(text_ms, description_ms, &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCommandLinkButton(C.QCommandLinkButton_new4(text_ms, description_ms)) ret.isSubclass = true return ret } @@ -131,15 +101,8 @@ func NewQCommandLinkButton5(text string, parent *QWidget) *QCommandLinkButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QCommandLinkButton *C.QCommandLinkButton = nil - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCommandLinkButton_new5(text_ms, parent.cPointer(), &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCommandLinkButton(C.QCommandLinkButton_new5(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -154,15 +117,8 @@ func NewQCommandLinkButton6(text string, description string, parent *QWidget) *Q description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - var outptr_QCommandLinkButton *C.QCommandLinkButton = nil - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QCommandLinkButton_new6(text_ms, description_ms, parent.cPointer(), &outptr_QCommandLinkButton, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQCommandLinkButton(outptr_QCommandLinkButton, outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQCommandLinkButton(C.QCommandLinkButton_new6(text_ms, description_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -345,7 +301,7 @@ func miqt_exec_callback_QCommandLinkButton_InitStyleOption(self *C.QCommandLinkB } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionButton(option, nil) + slotval1 := newQStyleOptionButton(option) gofunc((&QCommandLinkButton{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -399,7 +355,7 @@ func miqt_exec_callback_QCommandLinkButton_PaintEvent(self *C.QCommandLinkButton } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QCommandLinkButton{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -425,7 +381,7 @@ func miqt_exec_callback_QCommandLinkButton_KeyPressEvent(self *C.QCommandLinkBut } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QCommandLinkButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -451,7 +407,7 @@ func miqt_exec_callback_QCommandLinkButton_FocusInEvent(self *C.QCommandLinkButt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QCommandLinkButton{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -477,7 +433,7 @@ func miqt_exec_callback_QCommandLinkButton_FocusOutEvent(self *C.QCommandLinkBut } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QCommandLinkButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -503,7 +459,7 @@ func miqt_exec_callback_QCommandLinkButton_MouseMoveEvent(self *C.QCommandLinkBu } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QCommandLinkButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) diff --git a/qt6/gen_qcommandlinkbutton.h b/qt6/gen_qcommandlinkbutton.h index b12da3fb..499c0da6 100644 --- a/qt6/gen_qcommandlinkbutton.h +++ b/qt6/gen_qcommandlinkbutton.h @@ -48,12 +48,13 @@ typedef struct QStyleOptionButton QStyleOptionButton; typedef struct QWidget QWidget; #endif -void QCommandLinkButton_new(QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCommandLinkButton_new2(QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCommandLinkButton_new3(struct miqt_string text, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCommandLinkButton_new5(struct miqt_string text, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent, QCommandLinkButton** outptr_QCommandLinkButton, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QCommandLinkButton* QCommandLinkButton_new(QWidget* parent); +QCommandLinkButton* QCommandLinkButton_new2(); +QCommandLinkButton* QCommandLinkButton_new3(struct miqt_string text); +QCommandLinkButton* QCommandLinkButton_new4(struct miqt_string text, struct miqt_string description); +QCommandLinkButton* QCommandLinkButton_new5(struct miqt_string text, QWidget* parent); +QCommandLinkButton* QCommandLinkButton_new6(struct miqt_string text, struct miqt_string description, QWidget* parent); +void QCommandLinkButton_virtbase(QCommandLinkButton* src, QPushButton** outptr_QPushButton); QMetaObject* QCommandLinkButton_MetaObject(const QCommandLinkButton* self); void* QCommandLinkButton_Metacast(QCommandLinkButton* self, const char* param1); struct miqt_string QCommandLinkButton_Tr(const char* s); diff --git a/qt6/gen_qcommonstyle.cpp b/qt6/gen_qcommonstyle.cpp index ad6fb464..4c91862b 100644 --- a/qt6/gen_qcommonstyle.cpp +++ b/qt6/gen_qcommonstyle.cpp @@ -677,11 +677,12 @@ public: }; -void QCommonStyle_new(QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { - MiqtVirtualQCommonStyle* ret = new MiqtVirtualQCommonStyle(); - *outptr_QCommonStyle = ret; - *outptr_QStyle = static_cast(ret); - *outptr_QObject = static_cast(ret); +QCommonStyle* QCommonStyle_new() { + return new MiqtVirtualQCommonStyle(); +} + +void QCommonStyle_virtbase(QCommonStyle* src, QStyle** outptr_QStyle) { + *outptr_QStyle = static_cast(src); } QMetaObject* QCommonStyle_MetaObject(const QCommonStyle* self) { diff --git a/qt6/gen_qcommonstyle.go b/qt6/gen_qcommonstyle.go index 6ced1ba5..df43acf8 100644 --- a/qt6/gen_qcommonstyle.go +++ b/qt6/gen_qcommonstyle.go @@ -35,32 +35,26 @@ func (this *QCommonStyle) UnsafePointer() unsafe.Pointer { } // newQCommonStyle constructs the type using only CGO pointers. -func newQCommonStyle(h *C.QCommonStyle, h_QStyle *C.QStyle, h_QObject *C.QObject) *QCommonStyle { +func newQCommonStyle(h *C.QCommonStyle) *QCommonStyle { if h == nil { return nil } + var outptr_QStyle *C.QStyle = nil + C.QCommonStyle_virtbase(h, &outptr_QStyle) + return &QCommonStyle{h: h, - QStyle: newQStyle(h_QStyle, h_QObject)} + QStyle: newQStyle(outptr_QStyle)} } // UnsafeNewQCommonStyle constructs the type using only unsafe pointers. -func UnsafeNewQCommonStyle(h unsafe.Pointer, h_QStyle unsafe.Pointer, h_QObject unsafe.Pointer) *QCommonStyle { - if h == nil { - return nil - } - - return &QCommonStyle{h: (*C.QCommonStyle)(h), - QStyle: UnsafeNewQStyle(h_QStyle, h_QObject)} +func UnsafeNewQCommonStyle(h unsafe.Pointer) *QCommonStyle { + return newQCommonStyle((*C.QCommonStyle)(h)) } // NewQCommonStyle constructs a new QCommonStyle object. func NewQCommonStyle() *QCommonStyle { - var outptr_QCommonStyle *C.QCommonStyle = nil - var outptr_QStyle *C.QStyle = nil - var outptr_QObject *C.QObject = nil - C.QCommonStyle_new(&outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) - ret := newQCommonStyle(outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret := newQCommonStyle(C.QCommonStyle_new()) ret.isSubclass = true return ret } @@ -133,13 +127,13 @@ func (this *QCommonStyle) StandardIcon(standardIcon QStyle__StandardPixmap, opt } func (this *QCommonStyle) StandardPixmap(sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _goptr := newQPixmap(C.QCommonStyle_StandardPixmap(this.h, (C.int)(sp), opt.cPointer(), widget.cPointer()), nil) + _goptr := newQPixmap(C.QCommonStyle_StandardPixmap(this.h, (C.int)(sp), opt.cPointer(), widget.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCommonStyle) GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { - _goptr := newQPixmap(C.QCommonStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()), nil) + _goptr := newQPixmap(C.QCommonStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -216,7 +210,7 @@ func miqt_exec_callback_QCommonStyle_DrawPrimitive(self *C.QCommonStyle, cb C.in slotval3 := newQPainter(p) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawPrimitive, slotval1, slotval2, slotval3, slotval4) @@ -248,7 +242,7 @@ func miqt_exec_callback_QCommonStyle_DrawControl(self *C.QCommonStyle, cb C.intp slotval3 := newQPainter(p) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawControl, slotval1, slotval2, slotval3, slotval4) @@ -280,7 +274,7 @@ func miqt_exec_callback_QCommonStyle_SubElementRect(self *C.QCommonStyle, cb C.i slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_SubElementRect, slotval1, slotval2, slotval3) @@ -310,11 +304,11 @@ func miqt_exec_callback_QCommonStyle_DrawComplexControl(self *C.QCommonStyle, cb // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(cc) - slotval2 := newQStyleOptionComplex(opt, nil) + slotval2 := newQStyleOptionComplex(opt) slotval3 := newQPainter(p) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawComplexControl, slotval1, slotval2, slotval3, slotval4) @@ -342,11 +336,11 @@ func miqt_exec_callback_QCommonStyle_HitTestComplexControl(self *C.QCommonStyle, // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(cc) - slotval2 := newQStyleOptionComplex(opt, nil) + slotval2 := newQStyleOptionComplex(opt) slotval3 := newQPoint(pt) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_HitTestComplexControl, slotval1, slotval2, slotval3, slotval4) @@ -378,11 +372,11 @@ func miqt_exec_callback_QCommonStyle_SubControlRect(self *C.QCommonStyle, cb C.i // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(cc) - slotval2 := newQStyleOptionComplex(opt, nil) + slotval2 := newQStyleOptionComplex(opt) slotval3 := (QStyle__SubControl)(sc) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_SubControlRect, slotval1, slotval2, slotval3, slotval4) @@ -418,7 +412,7 @@ func miqt_exec_callback_QCommonStyle_SizeFromContents(self *C.QCommonStyle, cb C slotval3 := newQSize(contentsSize) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_SizeFromContents, slotval1, slotval2, slotval3, slotval4) @@ -450,7 +444,7 @@ func miqt_exec_callback_QCommonStyle_PixelMetric(self *C.QCommonStyle, cb C.intp slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_PixelMetric, slotval1, slotval2, slotval3) @@ -482,7 +476,7 @@ func miqt_exec_callback_QCommonStyle_StyleHint(self *C.QCommonStyle, cb C.intptr slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(w, nil, nil) + slotval3 := newQWidget(w) slotval4 := newQStyleHintReturn(shret) @@ -518,7 +512,7 @@ func miqt_exec_callback_QCommonStyle_StandardIcon(self *C.QCommonStyle, cb C.int slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_StandardIcon, slotval1, slotval2, slotval3) @@ -528,7 +522,7 @@ func miqt_exec_callback_QCommonStyle_StandardIcon(self *C.QCommonStyle, cb C.int func (this *QCommonStyle) callVirtualBase_StandardPixmap(sp QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _goptr := newQPixmap(C.QCommonStyle_virtualbase_StandardPixmap(unsafe.Pointer(this.h), (C.int)(sp), opt.cPointer(), widget.cPointer()), nil) + _goptr := newQPixmap(C.QCommonStyle_virtualbase_StandardPixmap(unsafe.Pointer(this.h), (C.int)(sp), opt.cPointer(), widget.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -552,7 +546,7 @@ func miqt_exec_callback_QCommonStyle_StandardPixmap(self *C.QCommonStyle, cb C.i slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_StandardPixmap, slotval1, slotval2, slotval3) @@ -562,7 +556,7 @@ func miqt_exec_callback_QCommonStyle_StandardPixmap(self *C.QCommonStyle, cb C.i func (this *QCommonStyle) callVirtualBase_GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { - _goptr := newQPixmap(C.QCommonStyle_virtualbase_GeneratedIconPixmap(unsafe.Pointer(this.h), (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()), nil) + _goptr := newQPixmap(C.QCommonStyle_virtualbase_GeneratedIconPixmap(unsafe.Pointer(this.h), (C.int)(iconMode), pixmap.cPointer(), opt.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -584,7 +578,7 @@ func miqt_exec_callback_QCommonStyle_GeneratedIconPixmap(self *C.QCommonStyle, c // Convert all CABI parameters to Go parameters slotval1 := (QIcon__Mode)(iconMode) - slotval2 := newQPixmap(pixmap, nil) + slotval2 := newQPixmap(pixmap) slotval3 := newQStyleOption(opt) @@ -622,7 +616,7 @@ func miqt_exec_callback_QCommonStyle_LayoutSpacing(self *C.QCommonStyle, cb C.in slotval4 := newQStyleOption(option) - slotval5 := newQWidget(widget, nil, nil) + slotval5 := newQWidget(widget) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_LayoutSpacing, slotval1, slotval2, slotval3, slotval4, slotval5) @@ -676,7 +670,7 @@ func miqt_exec_callback_QCommonStyle_PolishWithApp(self *C.QCommonStyle, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQApplication(app, nil, nil, nil) + slotval1 := newQApplication(app) gofunc((&QCommonStyle{h: self}).callVirtualBase_PolishWithApp, slotval1) @@ -702,7 +696,7 @@ func miqt_exec_callback_QCommonStyle_PolishWithWidget(self *C.QCommonStyle, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QCommonStyle{h: self}).callVirtualBase_PolishWithWidget, slotval1) @@ -728,7 +722,7 @@ func miqt_exec_callback_QCommonStyle_Unpolish(self *C.QCommonStyle, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QCommonStyle{h: self}).callVirtualBase_Unpolish, slotval1) @@ -754,7 +748,7 @@ func miqt_exec_callback_QCommonStyle_UnpolishWithApplication(self *C.QCommonStyl } // Convert all CABI parameters to Go parameters - slotval1 := newQApplication(application, nil, nil, nil) + slotval1 := newQApplication(application) gofunc((&QCommonStyle{h: self}).callVirtualBase_UnpolishWithApplication, slotval1) @@ -831,7 +825,7 @@ func miqt_exec_callback_QCommonStyle_ItemPixmapRect(self *C.QCommonStyle, cb C.i slotval2 := (int)(flags) - slotval3 := newQPixmap(pixmap, nil) + slotval3 := newQPixmap(pixmap) virtualReturn := gofunc((&QCommonStyle{h: self}).callVirtualBase_ItemPixmapRect, slotval1, slotval2, slotval3) @@ -909,7 +903,7 @@ func miqt_exec_callback_QCommonStyle_DrawItemPixmap(self *C.QCommonStyle, cb C.i slotval3 := (int)(alignment) - slotval4 := newQPixmap(pixmap, nil) + slotval4 := newQPixmap(pixmap) gofunc((&QCommonStyle{h: self}).callVirtualBase_DrawItemPixmap, slotval1, slotval2, slotval3, slotval4) diff --git a/qt6/gen_qcommonstyle.h b/qt6/gen_qcommonstyle.h index 9e1a472d..dd73d282 100644 --- a/qt6/gen_qcommonstyle.h +++ b/qt6/gen_qcommonstyle.h @@ -52,7 +52,8 @@ typedef struct QStyleOptionComplex QStyleOptionComplex; typedef struct QWidget QWidget; #endif -void QCommonStyle_new(QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); +QCommonStyle* QCommonStyle_new(); +void QCommonStyle_virtbase(QCommonStyle* src, QStyle** outptr_QStyle); QMetaObject* QCommonStyle_MetaObject(const QCommonStyle* self); void* QCommonStyle_Metacast(QCommonStyle* self, const char* param1); struct miqt_string QCommonStyle_Tr(const char* s); diff --git a/qt6/gen_qcompare.cpp b/qt6/gen_qcompare.cpp index c3b34575..8a27712a 100644 --- a/qt6/gen_qcompare.cpp +++ b/qt6/gen_qcompare.cpp @@ -3,9 +3,8 @@ #include "gen_qcompare.h" #include "_cgo_export.h" -void QPartialOrdering_new(QPartialOrdering* param1, QPartialOrdering** outptr_QPartialOrdering) { - QPartialOrdering* ret = new QPartialOrdering(*param1); - *outptr_QPartialOrdering = ret; +QPartialOrdering* QPartialOrdering_new(QPartialOrdering* param1) { + return new QPartialOrdering(*param1); } void QPartialOrdering_Delete(QPartialOrdering* self, bool isSubclass) { diff --git a/qt6/gen_qcompare.go b/qt6/gen_qcompare.go index 5348d938..12bfccc3 100644 --- a/qt6/gen_qcompare.go +++ b/qt6/gen_qcompare.go @@ -52,24 +52,19 @@ func newQPartialOrdering(h *C.QPartialOrdering) *QPartialOrdering { if h == nil { return nil } + return &QPartialOrdering{h: h} } // UnsafeNewQPartialOrdering constructs the type using only unsafe pointers. func UnsafeNewQPartialOrdering(h unsafe.Pointer) *QPartialOrdering { - if h == nil { - return nil - } - - return &QPartialOrdering{h: (*C.QPartialOrdering)(h)} + return newQPartialOrdering((*C.QPartialOrdering)(h)) } // NewQPartialOrdering constructs a new QPartialOrdering object. func NewQPartialOrdering(param1 *QPartialOrdering) *QPartialOrdering { - var outptr_QPartialOrdering *C.QPartialOrdering = nil - C.QPartialOrdering_new(param1.cPointer(), &outptr_QPartialOrdering) - ret := newQPartialOrdering(outptr_QPartialOrdering) + ret := newQPartialOrdering(C.QPartialOrdering_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qcompare.h b/qt6/gen_qcompare.h index c88564ee..d1d2a74f 100644 --- a/qt6/gen_qcompare.h +++ b/qt6/gen_qcompare.h @@ -20,7 +20,7 @@ class QPartialOrdering; typedef struct QPartialOrdering QPartialOrdering; #endif -void QPartialOrdering_new(QPartialOrdering* param1, QPartialOrdering** outptr_QPartialOrdering); +QPartialOrdering* QPartialOrdering_new(QPartialOrdering* param1); void QPartialOrdering_Delete(QPartialOrdering* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qcompleter.cpp b/qt6/gen_qcompleter.cpp index 2c722dba..bd50fa09 100644 --- a/qt6/gen_qcompleter.cpp +++ b/qt6/gen_qcompleter.cpp @@ -290,19 +290,15 @@ public: }; -void QCompleter_new(QCompleter** outptr_QCompleter, QObject** outptr_QObject) { - MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(); - *outptr_QCompleter = ret; - *outptr_QObject = static_cast(ret); +QCompleter* QCompleter_new() { + return new MiqtVirtualQCompleter(); } -void QCompleter_new2(QAbstractItemModel* model, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { - MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(model); - *outptr_QCompleter = ret; - *outptr_QObject = static_cast(ret); +QCompleter* QCompleter_new2(QAbstractItemModel* model) { + return new MiqtVirtualQCompleter(model); } -void QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { +QCompleter* QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions) { QStringList completions_QList; completions_QList.reserve(completions.len); struct miqt_string* completions_arr = static_cast(completions.data); @@ -310,24 +306,18 @@ void QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions, QString completions_arr_i_QString = QString::fromUtf8(completions_arr[i].data, completions_arr[i].len); completions_QList.push_back(completions_arr_i_QString); } - MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(completions_QList); - *outptr_QCompleter = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQCompleter(completions_QList); } -void QCompleter_new4(QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { - MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(parent); - *outptr_QCompleter = ret; - *outptr_QObject = static_cast(ret); +QCompleter* QCompleter_new4(QObject* parent) { + return new MiqtVirtualQCompleter(parent); } -void QCompleter_new5(QAbstractItemModel* model, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { - MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(model, parent); - *outptr_QCompleter = ret; - *outptr_QObject = static_cast(ret); +QCompleter* QCompleter_new5(QAbstractItemModel* model, QObject* parent) { + return new MiqtVirtualQCompleter(model, parent); } -void QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject) { +QCompleter* QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent) { QStringList completions_QList; completions_QList.reserve(completions.len); struct miqt_string* completions_arr = static_cast(completions.data); @@ -335,9 +325,11 @@ void QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QString completions_arr_i_QString = QString::fromUtf8(completions_arr[i].data, completions_arr[i].len); completions_QList.push_back(completions_arr_i_QString); } - MiqtVirtualQCompleter* ret = new MiqtVirtualQCompleter(completions_QList, parent); - *outptr_QCompleter = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQCompleter(completions_QList, parent); +} + +void QCompleter_virtbase(QCompleter* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QCompleter_MetaObject(const QCompleter* self) { diff --git a/qt6/gen_qcompleter.go b/qt6/gen_qcompleter.go index fd7ff56d..ddcd4075 100644 --- a/qt6/gen_qcompleter.go +++ b/qt6/gen_qcompleter.go @@ -51,42 +51,34 @@ func (this *QCompleter) UnsafePointer() unsafe.Pointer { } // newQCompleter constructs the type using only CGO pointers. -func newQCompleter(h *C.QCompleter, h_QObject *C.QObject) *QCompleter { +func newQCompleter(h *C.QCompleter) *QCompleter { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QCompleter_virtbase(h, &outptr_QObject) + return &QCompleter{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQCompleter constructs the type using only unsafe pointers. -func UnsafeNewQCompleter(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCompleter { - if h == nil { - return nil - } - - return &QCompleter{h: (*C.QCompleter)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQCompleter(h unsafe.Pointer) *QCompleter { + return newQCompleter((*C.QCompleter)(h)) } // NewQCompleter constructs a new QCompleter object. func NewQCompleter() *QCompleter { - var outptr_QCompleter *C.QCompleter = nil - var outptr_QObject *C.QObject = nil - C.QCompleter_new(&outptr_QCompleter, &outptr_QObject) - ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret := newQCompleter(C.QCompleter_new()) ret.isSubclass = true return ret } // NewQCompleter2 constructs a new QCompleter object. func NewQCompleter2(model *QAbstractItemModel) *QCompleter { - var outptr_QCompleter *C.QCompleter = nil - var outptr_QObject *C.QObject = nil - C.QCompleter_new2(model.cPointer(), &outptr_QCompleter, &outptr_QObject) - ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret := newQCompleter(C.QCompleter_new2(model.cPointer())) ret.isSubclass = true return ret } @@ -103,33 +95,24 @@ func NewQCompleter3(completions []string) *QCompleter { completions_CArray[i] = completions_i_ms } completions_ma := C.struct_miqt_array{len: C.size_t(len(completions)), data: unsafe.Pointer(completions_CArray)} - var outptr_QCompleter *C.QCompleter = nil - var outptr_QObject *C.QObject = nil - C.QCompleter_new3(completions_ma, &outptr_QCompleter, &outptr_QObject) - ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret := newQCompleter(C.QCompleter_new3(completions_ma)) ret.isSubclass = true return ret } // NewQCompleter4 constructs a new QCompleter object. func NewQCompleter4(parent *QObject) *QCompleter { - var outptr_QCompleter *C.QCompleter = nil - var outptr_QObject *C.QObject = nil - C.QCompleter_new4(parent.cPointer(), &outptr_QCompleter, &outptr_QObject) - ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret := newQCompleter(C.QCompleter_new4(parent.cPointer())) ret.isSubclass = true return ret } // NewQCompleter5 constructs a new QCompleter object. func NewQCompleter5(model *QAbstractItemModel, parent *QObject) *QCompleter { - var outptr_QCompleter *C.QCompleter = nil - var outptr_QObject *C.QObject = nil - C.QCompleter_new5(model.cPointer(), parent.cPointer(), &outptr_QCompleter, &outptr_QObject) - ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret := newQCompleter(C.QCompleter_new5(model.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -146,11 +129,8 @@ func NewQCompleter6(completions []string, parent *QObject) *QCompleter { completions_CArray[i] = completions_i_ms } completions_ma := C.struct_miqt_array{len: C.size_t(len(completions)), data: unsafe.Pointer(completions_CArray)} - var outptr_QCompleter *C.QCompleter = nil - var outptr_QObject *C.QObject = nil - C.QCompleter_new6(completions_ma, parent.cPointer(), &outptr_QCompleter, &outptr_QObject) - ret := newQCompleter(outptr_QCompleter, outptr_QObject) + ret := newQCompleter(C.QCompleter_new6(completions_ma, parent.cPointer())) ret.isSubclass = true return ret } @@ -179,7 +159,7 @@ func (this *QCompleter) SetWidget(widget *QWidget) { } func (this *QCompleter) Widget() *QWidget { - return newQWidget(C.QCompleter_Widget(this.h), nil, nil) + return newQWidget(C.QCompleter_Widget(this.h)) } func (this *QCompleter) SetModel(c *QAbstractItemModel) { @@ -187,7 +167,7 @@ func (this *QCompleter) SetModel(c *QAbstractItemModel) { } func (this *QCompleter) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QCompleter_Model(this.h), nil) + return newQAbstractItemModel(C.QCompleter_Model(this.h)) } func (this *QCompleter) SetCompletionMode(mode QCompleter__CompletionMode) { @@ -207,7 +187,7 @@ func (this *QCompleter) FilterMode() MatchFlag { } func (this *QCompleter) Popup() *QAbstractItemView { - return newQAbstractItemView(C.QCompleter_Popup(this.h), nil, nil, nil, nil, nil) + return newQAbstractItemView(C.QCompleter_Popup(this.h)) } func (this *QCompleter) SetPopup(popup *QAbstractItemView) { @@ -284,7 +264,7 @@ func (this *QCompleter) CurrentCompletion() string { } func (this *QCompleter) CompletionModel() *QAbstractItemModel { - return newQAbstractItemModel(C.QCompleter_CompletionModel(this.h), nil) + return newQAbstractItemModel(C.QCompleter_CompletionModel(this.h)) } func (this *QCompleter) CompletionPrefix() string { @@ -620,7 +600,7 @@ func miqt_exec_callback_QCompleter_TimerEvent(self *C.QCompleter, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QCompleter{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -646,7 +626,7 @@ func miqt_exec_callback_QCompleter_ChildEvent(self *C.QCompleter, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QCompleter{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qcompleter.h b/qt6/gen_qcompleter.h index 9c35db8d..9dc50d96 100644 --- a/qt6/gen_qcompleter.h +++ b/qt6/gen_qcompleter.h @@ -42,12 +42,13 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QCompleter_new(QCompleter** outptr_QCompleter, QObject** outptr_QObject); -void QCompleter_new2(QAbstractItemModel* model, QCompleter** outptr_QCompleter, QObject** outptr_QObject); -void QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions, QCompleter** outptr_QCompleter, QObject** outptr_QObject); -void QCompleter_new4(QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject); -void QCompleter_new5(QAbstractItemModel* model, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject); -void QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent, QCompleter** outptr_QCompleter, QObject** outptr_QObject); +QCompleter* QCompleter_new(); +QCompleter* QCompleter_new2(QAbstractItemModel* model); +QCompleter* QCompleter_new3(struct miqt_array /* of struct miqt_string */ completions); +QCompleter* QCompleter_new4(QObject* parent); +QCompleter* QCompleter_new5(QAbstractItemModel* model, QObject* parent); +QCompleter* QCompleter_new6(struct miqt_array /* of struct miqt_string */ completions, QObject* parent); +void QCompleter_virtbase(QCompleter* src, QObject** outptr_QObject); QMetaObject* QCompleter_MetaObject(const QCompleter* self); void* QCompleter_Metacast(QCompleter* self, const char* param1); struct miqt_string QCompleter_Tr(const char* s); diff --git a/qt6/gen_qconcatenatetablesproxymodel.cpp b/qt6/gen_qconcatenatetablesproxymodel.cpp index 4f3cc6ba..9865dfab 100644 --- a/qt6/gen_qconcatenatetablesproxymodel.cpp +++ b/qt6/gen_qconcatenatetablesproxymodel.cpp @@ -1110,18 +1110,16 @@ public: }; -void QConcatenateTablesProxyModel_new(QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQConcatenateTablesProxyModel* ret = new MiqtVirtualQConcatenateTablesProxyModel(); - *outptr_QConcatenateTablesProxyModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new() { + return new MiqtVirtualQConcatenateTablesProxyModel(); } -void QConcatenateTablesProxyModel_new2(QObject* parent, QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQConcatenateTablesProxyModel* ret = new MiqtVirtualQConcatenateTablesProxyModel(parent); - *outptr_QConcatenateTablesProxyModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new2(QObject* parent) { + return new MiqtVirtualQConcatenateTablesProxyModel(parent); +} + +void QConcatenateTablesProxyModel_virtbase(QConcatenateTablesProxyModel* src, QAbstractItemModel** outptr_QAbstractItemModel) { + *outptr_QAbstractItemModel = static_cast(src); } QMetaObject* QConcatenateTablesProxyModel_MetaObject(const QConcatenateTablesProxyModel* self) { diff --git a/qt6/gen_qconcatenatetablesproxymodel.go b/qt6/gen_qconcatenatetablesproxymodel.go index dc7a86b5..a7d76b44 100644 --- a/qt6/gen_qconcatenatetablesproxymodel.go +++ b/qt6/gen_qconcatenatetablesproxymodel.go @@ -35,44 +35,34 @@ func (this *QConcatenateTablesProxyModel) UnsafePointer() unsafe.Pointer { } // newQConcatenateTablesProxyModel constructs the type using only CGO pointers. -func newQConcatenateTablesProxyModel(h *C.QConcatenateTablesProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QConcatenateTablesProxyModel { +func newQConcatenateTablesProxyModel(h *C.QConcatenateTablesProxyModel) *QConcatenateTablesProxyModel { if h == nil { return nil } + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + C.QConcatenateTablesProxyModel_virtbase(h, &outptr_QAbstractItemModel) + return &QConcatenateTablesProxyModel{h: h, - QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} + QAbstractItemModel: newQAbstractItemModel(outptr_QAbstractItemModel)} } // UnsafeNewQConcatenateTablesProxyModel constructs the type using only unsafe pointers. -func UnsafeNewQConcatenateTablesProxyModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QConcatenateTablesProxyModel { - if h == nil { - return nil - } - - return &QConcatenateTablesProxyModel{h: (*C.QConcatenateTablesProxyModel)(h), - QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} +func UnsafeNewQConcatenateTablesProxyModel(h unsafe.Pointer) *QConcatenateTablesProxyModel { + return newQConcatenateTablesProxyModel((*C.QConcatenateTablesProxyModel)(h)) } // NewQConcatenateTablesProxyModel constructs a new QConcatenateTablesProxyModel object. func NewQConcatenateTablesProxyModel() *QConcatenateTablesProxyModel { - var outptr_QConcatenateTablesProxyModel *C.QConcatenateTablesProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QConcatenateTablesProxyModel_new(&outptr_QConcatenateTablesProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQConcatenateTablesProxyModel(outptr_QConcatenateTablesProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQConcatenateTablesProxyModel(C.QConcatenateTablesProxyModel_new()) ret.isSubclass = true return ret } // NewQConcatenateTablesProxyModel2 constructs a new QConcatenateTablesProxyModel object. func NewQConcatenateTablesProxyModel2(parent *QObject) *QConcatenateTablesProxyModel { - var outptr_QConcatenateTablesProxyModel *C.QConcatenateTablesProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QConcatenateTablesProxyModel_new2(parent.cPointer(), &outptr_QConcatenateTablesProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQConcatenateTablesProxyModel(outptr_QConcatenateTablesProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQConcatenateTablesProxyModel(C.QConcatenateTablesProxyModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -101,7 +91,7 @@ func (this *QConcatenateTablesProxyModel) SourceModels() []*QAbstractItemModel { _ret := make([]*QAbstractItemModel, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractItemModel)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAbstractItemModel(_outCast[i], nil) + _ret[i] = newQAbstractItemModel(_outCast[i]) } return _ret } @@ -222,7 +212,7 @@ func (this *QConcatenateTablesProxyModel) MimeData(indexes []QModelIndex) *QMime indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QConcatenateTablesProxyModel_MimeData(this.h, indexes_ma), nil) + return newQMimeData(C.QConcatenateTablesProxyModel_MimeData(this.h, indexes_ma)) } func (this *QConcatenateTablesProxyModel) CanDropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -673,7 +663,7 @@ func (this *QConcatenateTablesProxyModel) callVirtualBase_MimeData(indexes []QMo } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QConcatenateTablesProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QConcatenateTablesProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QConcatenateTablesProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -727,7 +717,7 @@ func miqt_exec_callback_QConcatenateTablesProxyModel_CanDropMimeData(self *C.QCo } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -763,7 +753,7 @@ func miqt_exec_callback_QConcatenateTablesProxyModel_DropMimeData(self *C.QConca } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt6/gen_qconcatenatetablesproxymodel.h b/qt6/gen_qconcatenatetablesproxymodel.h index d676a0a2..4728a8da 100644 --- a/qt6/gen_qconcatenatetablesproxymodel.h +++ b/qt6/gen_qconcatenatetablesproxymodel.h @@ -36,8 +36,9 @@ typedef struct QSize QSize; typedef struct QVariant QVariant; #endif -void QConcatenateTablesProxyModel_new(QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QConcatenateTablesProxyModel_new2(QObject* parent, QConcatenateTablesProxyModel** outptr_QConcatenateTablesProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new(); +QConcatenateTablesProxyModel* QConcatenateTablesProxyModel_new2(QObject* parent); +void QConcatenateTablesProxyModel_virtbase(QConcatenateTablesProxyModel* src, QAbstractItemModel** outptr_QAbstractItemModel); QMetaObject* QConcatenateTablesProxyModel_MetaObject(const QConcatenateTablesProxyModel* self); void* QConcatenateTablesProxyModel_Metacast(QConcatenateTablesProxyModel* self, const char* param1); struct miqt_string QConcatenateTablesProxyModel_Tr(const char* s); diff --git a/qt6/gen_qcontiguouscache.go b/qt6/gen_qcontiguouscache.go index 4dfa5de3..5f52634e 100644 --- a/qt6/gen_qcontiguouscache.go +++ b/qt6/gen_qcontiguouscache.go @@ -37,16 +37,13 @@ func newQContiguousCacheData(h *C.QContiguousCacheData) *QContiguousCacheData { if h == nil { return nil } + return &QContiguousCacheData{h: h} } // UnsafeNewQContiguousCacheData constructs the type using only unsafe pointers. func UnsafeNewQContiguousCacheData(h unsafe.Pointer) *QContiguousCacheData { - if h == nil { - return nil - } - - return &QContiguousCacheData{h: (*C.QContiguousCacheData)(h)} + return newQContiguousCacheData((*C.QContiguousCacheData)(h)) } func QContiguousCacheData_AllocateData(size int64, alignment int64) *QContiguousCacheData { diff --git a/qt6/gen_qcoreapplication.cpp b/qt6/gen_qcoreapplication.cpp index 2416d03c..c0f38af0 100644 --- a/qt6/gen_qcoreapplication.cpp +++ b/qt6/gen_qcoreapplication.cpp @@ -221,16 +221,16 @@ public: }; -void QCoreApplication_new(int* argc, char** argv, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { - MiqtVirtualQCoreApplication* ret = new MiqtVirtualQCoreApplication(static_cast(*argc), argv); - *outptr_QCoreApplication = ret; - *outptr_QObject = static_cast(ret); +QCoreApplication* QCoreApplication_new(int* argc, char** argv) { + return new MiqtVirtualQCoreApplication(static_cast(*argc), argv); } -void QCoreApplication_new2(int* argc, char** argv, int param3, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { - MiqtVirtualQCoreApplication* ret = new MiqtVirtualQCoreApplication(static_cast(*argc), argv, static_cast(param3)); - *outptr_QCoreApplication = ret; - *outptr_QObject = static_cast(ret); +QCoreApplication* QCoreApplication_new2(int* argc, char** argv, int param3) { + return new MiqtVirtualQCoreApplication(static_cast(*argc), argv, static_cast(param3)); +} + +void QCoreApplication_virtbase(QCoreApplication* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QCoreApplication_MetaObject(const QCoreApplication* self) { diff --git a/qt6/gen_qcoreapplication.go b/qt6/gen_qcoreapplication.go index 0dc491c2..c16c747d 100644 --- a/qt6/gen_qcoreapplication.go +++ b/qt6/gen_qcoreapplication.go @@ -41,22 +41,20 @@ func (this *QCoreApplication) UnsafePointer() unsafe.Pointer { } // newQCoreApplication constructs the type using only CGO pointers. -func newQCoreApplication(h *C.QCoreApplication, h_QObject *C.QObject) *QCoreApplication { +func newQCoreApplication(h *C.QCoreApplication) *QCoreApplication { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QCoreApplication_virtbase(h, &outptr_QObject) + return &QCoreApplication{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQCoreApplication constructs the type using only unsafe pointers. -func UnsafeNewQCoreApplication(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCoreApplication { - if h == nil { - return nil - } - - return &QCoreApplication{h: (*C.QCoreApplication)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQCoreApplication(h unsafe.Pointer) *QCoreApplication { + return newQCoreApplication((*C.QCoreApplication)(h)) } // NewQCoreApplication constructs a new QCoreApplication object. @@ -71,11 +69,7 @@ func NewQCoreApplication(args []string) *QCoreApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - var outptr_QCoreApplication *C.QCoreApplication = nil - var outptr_QObject *C.QObject = nil - - C.QCoreApplication_new(argc, &argv[0], &outptr_QCoreApplication, &outptr_QObject) - ret := newQCoreApplication(outptr_QCoreApplication, outptr_QObject) + ret := newQCoreApplication(C.QCoreApplication_new(argc, &argv[0])) ret.isSubclass = true return ret } @@ -92,11 +86,7 @@ func NewQCoreApplication2(args []string, param3 int) *QCoreApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - var outptr_QCoreApplication *C.QCoreApplication = nil - var outptr_QObject *C.QObject = nil - - C.QCoreApplication_new2(argc, &argv[0], (C.int)(param3), &outptr_QCoreApplication, &outptr_QObject) - ret := newQCoreApplication(outptr_QCoreApplication, outptr_QObject) + ret := newQCoreApplication(C.QCoreApplication_new2(argc, &argv[0], (C.int)(param3))) ret.isSubclass = true return ret } @@ -210,7 +200,7 @@ func QCoreApplication_IsSetuidAllowed() bool { } func QCoreApplication_Instance() *QCoreApplication { - return newQCoreApplication(C.QCoreApplication_Instance(), nil) + return newQCoreApplication(C.QCoreApplication_Instance()) } func QCoreApplication_Exec() int { @@ -242,7 +232,7 @@ func QCoreApplication_RemovePostedEvents(receiver *QObject) { } func QCoreApplication_EventDispatcher() *QAbstractEventDispatcher { - return newQAbstractEventDispatcher(C.QCoreApplication_EventDispatcher(), nil) + return newQAbstractEventDispatcher(C.QCoreApplication_EventDispatcher()) } func QCoreApplication_SetEventDispatcher(eventDispatcher *QAbstractEventDispatcher) { @@ -649,7 +639,7 @@ func miqt_exec_callback_QCoreApplication_TimerEvent(self *C.QCoreApplication, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QCoreApplication{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -675,7 +665,7 @@ func miqt_exec_callback_QCoreApplication_ChildEvent(self *C.QCoreApplication, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QCoreApplication{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qcoreapplication.h b/qt6/gen_qcoreapplication.h index 8480ec48..6cbf2d0e 100644 --- a/qt6/gen_qcoreapplication.h +++ b/qt6/gen_qcoreapplication.h @@ -38,8 +38,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QTranslator QTranslator; #endif -void QCoreApplication_new(int* argc, char** argv, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); -void QCoreApplication_new2(int* argc, char** argv, int param3, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); +QCoreApplication* QCoreApplication_new(int* argc, char** argv); +QCoreApplication* QCoreApplication_new2(int* argc, char** argv, int param3); +void QCoreApplication_virtbase(QCoreApplication* src, QObject** outptr_QObject); QMetaObject* QCoreApplication_MetaObject(const QCoreApplication* self); void* QCoreApplication_Metacast(QCoreApplication* self, const char* param1); struct miqt_string QCoreApplication_Tr(const char* s); diff --git a/qt6/gen_qcoreevent.cpp b/qt6/gen_qcoreevent.cpp index b21663a5..5eb01ed3 100644 --- a/qt6/gen_qcoreevent.cpp +++ b/qt6/gen_qcoreevent.cpp @@ -63,9 +63,8 @@ public: }; -void QEvent_new(int typeVal, QEvent** outptr_QEvent) { - MiqtVirtualQEvent* ret = new MiqtVirtualQEvent(static_cast(typeVal)); - *outptr_QEvent = ret; +QEvent* QEvent_new(int typeVal) { + return new MiqtVirtualQEvent(static_cast(typeVal)); } int QEvent_Type(const QEvent* self) { @@ -196,10 +195,12 @@ public: }; -void QTimerEvent_new(int timerId, QTimerEvent** outptr_QTimerEvent, QEvent** outptr_QEvent) { - MiqtVirtualQTimerEvent* ret = new MiqtVirtualQTimerEvent(static_cast(timerId)); - *outptr_QTimerEvent = ret; - *outptr_QEvent = static_cast(ret); +QTimerEvent* QTimerEvent_new(int timerId) { + return new MiqtVirtualQTimerEvent(static_cast(timerId)); +} + +void QTimerEvent_virtbase(QTimerEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QTimerEvent* QTimerEvent_Clone(const QTimerEvent* self) { @@ -289,10 +290,12 @@ public: }; -void QChildEvent_new(int typeVal, QObject* child, QChildEvent** outptr_QChildEvent, QEvent** outptr_QEvent) { - MiqtVirtualQChildEvent* ret = new MiqtVirtualQChildEvent(static_cast(typeVal), child); - *outptr_QChildEvent = ret; - *outptr_QEvent = static_cast(ret); +QChildEvent* QChildEvent_new(int typeVal, QObject* child) { + return new MiqtVirtualQChildEvent(static_cast(typeVal), child); +} + +void QChildEvent_virtbase(QChildEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QChildEvent* QChildEvent_Clone(const QChildEvent* self) { @@ -394,11 +397,13 @@ public: }; -void QDynamicPropertyChangeEvent_new(struct miqt_string name, QDynamicPropertyChangeEvent** outptr_QDynamicPropertyChangeEvent, QEvent** outptr_QEvent) { +QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_new(struct miqt_string name) { QByteArray name_QByteArray(name.data, name.len); - MiqtVirtualQDynamicPropertyChangeEvent* ret = new MiqtVirtualQDynamicPropertyChangeEvent(name_QByteArray); - *outptr_QDynamicPropertyChangeEvent = ret; - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQDynamicPropertyChangeEvent(name_QByteArray); +} + +void QDynamicPropertyChangeEvent_virtbase(QDynamicPropertyChangeEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_Clone(const QDynamicPropertyChangeEvent* self) { diff --git a/qt6/gen_qcoreevent.go b/qt6/gen_qcoreevent.go index c137e9a6..f0371e29 100644 --- a/qt6/gen_qcoreevent.go +++ b/qt6/gen_qcoreevent.go @@ -216,24 +216,19 @@ func newQEvent(h *C.QEvent) *QEvent { if h == nil { return nil } + return &QEvent{h: h} } // UnsafeNewQEvent constructs the type using only unsafe pointers. func UnsafeNewQEvent(h unsafe.Pointer) *QEvent { - if h == nil { - return nil - } - - return &QEvent{h: (*C.QEvent)(h)} + return newQEvent((*C.QEvent)(h)) } // NewQEvent constructs a new QEvent object. func NewQEvent(typeVal QEvent__Type) *QEvent { - var outptr_QEvent *C.QEvent = nil - C.QEvent_new((C.int)(typeVal), &outptr_QEvent) - ret := newQEvent(outptr_QEvent) + ret := newQEvent(C.QEvent_new((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -372,37 +367,32 @@ func (this *QTimerEvent) UnsafePointer() unsafe.Pointer { } // newQTimerEvent constructs the type using only CGO pointers. -func newQTimerEvent(h *C.QTimerEvent, h_QEvent *C.QEvent) *QTimerEvent { +func newQTimerEvent(h *C.QTimerEvent) *QTimerEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QTimerEvent_virtbase(h, &outptr_QEvent) + return &QTimerEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQTimerEvent constructs the type using only unsafe pointers. -func UnsafeNewQTimerEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QTimerEvent { - if h == nil { - return nil - } - - return &QTimerEvent{h: (*C.QTimerEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQTimerEvent(h unsafe.Pointer) *QTimerEvent { + return newQTimerEvent((*C.QTimerEvent)(h)) } // NewQTimerEvent constructs a new QTimerEvent object. func NewQTimerEvent(timerId int) *QTimerEvent { - var outptr_QTimerEvent *C.QTimerEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTimerEvent_new((C.int)(timerId), &outptr_QTimerEvent, &outptr_QEvent) - ret := newQTimerEvent(outptr_QTimerEvent, outptr_QEvent) + ret := newQTimerEvent(C.QTimerEvent_new((C.int)(timerId))) ret.isSubclass = true return ret } func (this *QTimerEvent) Clone() *QTimerEvent { - return newQTimerEvent(C.QTimerEvent_Clone(this.h), nil) + return newQTimerEvent(C.QTimerEvent_Clone(this.h)) } func (this *QTimerEvent) TimerId() int { @@ -411,7 +401,7 @@ func (this *QTimerEvent) TimerId() int { func (this *QTimerEvent) callVirtualBase_Clone() *QTimerEvent { - return newQTimerEvent(C.QTimerEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQTimerEvent(C.QTimerEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QTimerEvent) OnClone(slot func(super func() *QTimerEvent) *QTimerEvent) { @@ -495,37 +485,32 @@ func (this *QChildEvent) UnsafePointer() unsafe.Pointer { } // newQChildEvent constructs the type using only CGO pointers. -func newQChildEvent(h *C.QChildEvent, h_QEvent *C.QEvent) *QChildEvent { +func newQChildEvent(h *C.QChildEvent) *QChildEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QChildEvent_virtbase(h, &outptr_QEvent) + return &QChildEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQChildEvent constructs the type using only unsafe pointers. -func UnsafeNewQChildEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QChildEvent { - if h == nil { - return nil - } - - return &QChildEvent{h: (*C.QChildEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQChildEvent(h unsafe.Pointer) *QChildEvent { + return newQChildEvent((*C.QChildEvent)(h)) } // NewQChildEvent constructs a new QChildEvent object. func NewQChildEvent(typeVal QEvent__Type, child *QObject) *QChildEvent { - var outptr_QChildEvent *C.QChildEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QChildEvent_new((C.int)(typeVal), child.cPointer(), &outptr_QChildEvent, &outptr_QEvent) - ret := newQChildEvent(outptr_QChildEvent, outptr_QEvent) + ret := newQChildEvent(C.QChildEvent_new((C.int)(typeVal), child.cPointer())) ret.isSubclass = true return ret } func (this *QChildEvent) Clone() *QChildEvent { - return newQChildEvent(C.QChildEvent_Clone(this.h), nil) + return newQChildEvent(C.QChildEvent_Clone(this.h)) } func (this *QChildEvent) Child() *QObject { @@ -546,7 +531,7 @@ func (this *QChildEvent) Removed() bool { func (this *QChildEvent) callVirtualBase_Clone() *QChildEvent { - return newQChildEvent(C.QChildEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQChildEvent(C.QChildEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QChildEvent) OnClone(slot func(super func() *QChildEvent) *QChildEvent) { @@ -630,22 +615,20 @@ func (this *QDynamicPropertyChangeEvent) UnsafePointer() unsafe.Pointer { } // newQDynamicPropertyChangeEvent constructs the type using only CGO pointers. -func newQDynamicPropertyChangeEvent(h *C.QDynamicPropertyChangeEvent, h_QEvent *C.QEvent) *QDynamicPropertyChangeEvent { +func newQDynamicPropertyChangeEvent(h *C.QDynamicPropertyChangeEvent) *QDynamicPropertyChangeEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QDynamicPropertyChangeEvent_virtbase(h, &outptr_QEvent) + return &QDynamicPropertyChangeEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQDynamicPropertyChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQDynamicPropertyChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QDynamicPropertyChangeEvent { - if h == nil { - return nil - } - - return &QDynamicPropertyChangeEvent{h: (*C.QDynamicPropertyChangeEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQDynamicPropertyChangeEvent(h unsafe.Pointer) *QDynamicPropertyChangeEvent { + return newQDynamicPropertyChangeEvent((*C.QDynamicPropertyChangeEvent)(h)) } // NewQDynamicPropertyChangeEvent constructs a new QDynamicPropertyChangeEvent object. @@ -653,17 +636,14 @@ func NewQDynamicPropertyChangeEvent(name []byte) *QDynamicPropertyChangeEvent { name_alias := C.struct_miqt_string{} name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) name_alias.len = C.size_t(len(name)) - var outptr_QDynamicPropertyChangeEvent *C.QDynamicPropertyChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDynamicPropertyChangeEvent_new(name_alias, &outptr_QDynamicPropertyChangeEvent, &outptr_QEvent) - ret := newQDynamicPropertyChangeEvent(outptr_QDynamicPropertyChangeEvent, outptr_QEvent) + ret := newQDynamicPropertyChangeEvent(C.QDynamicPropertyChangeEvent_new(name_alias)) ret.isSubclass = true return ret } func (this *QDynamicPropertyChangeEvent) Clone() *QDynamicPropertyChangeEvent { - return newQDynamicPropertyChangeEvent(C.QDynamicPropertyChangeEvent_Clone(this.h), nil) + return newQDynamicPropertyChangeEvent(C.QDynamicPropertyChangeEvent_Clone(this.h)) } func (this *QDynamicPropertyChangeEvent) PropertyName() []byte { @@ -675,7 +655,7 @@ func (this *QDynamicPropertyChangeEvent) PropertyName() []byte { func (this *QDynamicPropertyChangeEvent) callVirtualBase_Clone() *QDynamicPropertyChangeEvent { - return newQDynamicPropertyChangeEvent(C.QDynamicPropertyChangeEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQDynamicPropertyChangeEvent(C.QDynamicPropertyChangeEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QDynamicPropertyChangeEvent) OnClone(slot func(super func() *QDynamicPropertyChangeEvent) *QDynamicPropertyChangeEvent) { diff --git a/qt6/gen_qcoreevent.h b/qt6/gen_qcoreevent.h index 3d912040..aac37e65 100644 --- a/qt6/gen_qcoreevent.h +++ b/qt6/gen_qcoreevent.h @@ -28,7 +28,7 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QEvent_new(int typeVal, QEvent** outptr_QEvent); +QEvent* QEvent_new(int typeVal); int QEvent_Type(const QEvent* self); bool QEvent_Spontaneous(const QEvent* self); void QEvent_SetAccepted(QEvent* self, bool accepted); @@ -47,7 +47,8 @@ void QEvent_override_virtual_Clone(void* self, intptr_t slot); QEvent* QEvent_virtualbase_Clone(const void* self); void QEvent_Delete(QEvent* self, bool isSubclass); -void QTimerEvent_new(int timerId, QTimerEvent** outptr_QTimerEvent, QEvent** outptr_QEvent); +QTimerEvent* QTimerEvent_new(int timerId); +void QTimerEvent_virtbase(QTimerEvent* src, QEvent** outptr_QEvent); QTimerEvent* QTimerEvent_Clone(const QTimerEvent* self); int QTimerEvent_TimerId(const QTimerEvent* self); void QTimerEvent_override_virtual_Clone(void* self, intptr_t slot); @@ -56,7 +57,8 @@ void QTimerEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QTimerEvent_virtualbase_SetAccepted(void* self, bool accepted); void QTimerEvent_Delete(QTimerEvent* self, bool isSubclass); -void QChildEvent_new(int typeVal, QObject* child, QChildEvent** outptr_QChildEvent, QEvent** outptr_QEvent); +QChildEvent* QChildEvent_new(int typeVal, QObject* child); +void QChildEvent_virtbase(QChildEvent* src, QEvent** outptr_QEvent); QChildEvent* QChildEvent_Clone(const QChildEvent* self); QObject* QChildEvent_Child(const QChildEvent* self); bool QChildEvent_Added(const QChildEvent* self); @@ -68,7 +70,8 @@ void QChildEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QChildEvent_virtualbase_SetAccepted(void* self, bool accepted); void QChildEvent_Delete(QChildEvent* self, bool isSubclass); -void QDynamicPropertyChangeEvent_new(struct miqt_string name, QDynamicPropertyChangeEvent** outptr_QDynamicPropertyChangeEvent, QEvent** outptr_QEvent); +QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_new(struct miqt_string name); +void QDynamicPropertyChangeEvent_virtbase(QDynamicPropertyChangeEvent* src, QEvent** outptr_QEvent); QDynamicPropertyChangeEvent* QDynamicPropertyChangeEvent_Clone(const QDynamicPropertyChangeEvent* self); struct miqt_string QDynamicPropertyChangeEvent_PropertyName(const QDynamicPropertyChangeEvent* self); void QDynamicPropertyChangeEvent_override_virtual_Clone(void* self, intptr_t slot); diff --git a/qt6/gen_qcryptographichash.cpp b/qt6/gen_qcryptographichash.cpp index b0b75af5..ba9396bd 100644 --- a/qt6/gen_qcryptographichash.cpp +++ b/qt6/gen_qcryptographichash.cpp @@ -6,9 +6,8 @@ #include "gen_qcryptographichash.h" #include "_cgo_export.h" -void QCryptographicHash_new(int method, QCryptographicHash** outptr_QCryptographicHash) { - QCryptographicHash* ret = new QCryptographicHash(static_cast(method)); - *outptr_QCryptographicHash = ret; +QCryptographicHash* QCryptographicHash_new(int method) { + return new QCryptographicHash(static_cast(method)); } void QCryptographicHash_Reset(QCryptographicHash* self) { diff --git a/qt6/gen_qcryptographichash.go b/qt6/gen_qcryptographichash.go index 836c65b6..e0b5a4f9 100644 --- a/qt6/gen_qcryptographichash.go +++ b/qt6/gen_qcryptographichash.go @@ -69,24 +69,19 @@ func newQCryptographicHash(h *C.QCryptographicHash) *QCryptographicHash { if h == nil { return nil } + return &QCryptographicHash{h: h} } // UnsafeNewQCryptographicHash constructs the type using only unsafe pointers. func UnsafeNewQCryptographicHash(h unsafe.Pointer) *QCryptographicHash { - if h == nil { - return nil - } - - return &QCryptographicHash{h: (*C.QCryptographicHash)(h)} + return newQCryptographicHash((*C.QCryptographicHash)(h)) } // NewQCryptographicHash constructs a new QCryptographicHash object. func NewQCryptographicHash(method QCryptographicHash__Algorithm) *QCryptographicHash { - var outptr_QCryptographicHash *C.QCryptographicHash = nil - C.QCryptographicHash_new((C.int)(method), &outptr_QCryptographicHash) - ret := newQCryptographicHash(outptr_QCryptographicHash) + ret := newQCryptographicHash(C.QCryptographicHash_new((C.int)(method))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qcryptographichash.h b/qt6/gen_qcryptographichash.h index 7466df55..333d4fdd 100644 --- a/qt6/gen_qcryptographichash.h +++ b/qt6/gen_qcryptographichash.h @@ -24,7 +24,7 @@ typedef struct QCryptographicHash QCryptographicHash; typedef struct QIODevice QIODevice; #endif -void QCryptographicHash_new(int method, QCryptographicHash** outptr_QCryptographicHash); +QCryptographicHash* QCryptographicHash_new(int method); void QCryptographicHash_Reset(QCryptographicHash* self); void QCryptographicHash_AddData(QCryptographicHash* self, const char* data, ptrdiff_t length); void QCryptographicHash_AddDataWithData(QCryptographicHash* self, QByteArrayView* data); diff --git a/qt6/gen_qcursor.cpp b/qt6/gen_qcursor.cpp index 0179d47d..941e12f4 100644 --- a/qt6/gen_qcursor.cpp +++ b/qt6/gen_qcursor.cpp @@ -7,49 +7,40 @@ #include "gen_qcursor.h" #include "_cgo_export.h" -void QCursor_new(QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(); - *outptr_QCursor = ret; +QCursor* QCursor_new() { + return new QCursor(); } -void QCursor_new2(int shape, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(static_cast(shape)); - *outptr_QCursor = ret; +QCursor* QCursor_new2(int shape) { + return new QCursor(static_cast(shape)); } -void QCursor_new3(QBitmap* bitmap, QBitmap* mask, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(*bitmap, *mask); - *outptr_QCursor = ret; +QCursor* QCursor_new3(QBitmap* bitmap, QBitmap* mask) { + return new QCursor(*bitmap, *mask); } -void QCursor_new4(QPixmap* pixmap, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(*pixmap); - *outptr_QCursor = ret; +QCursor* QCursor_new4(QPixmap* pixmap) { + return new QCursor(*pixmap); } -void QCursor_new5(QCursor* cursor, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(*cursor); - *outptr_QCursor = ret; +QCursor* QCursor_new5(QCursor* cursor) { + return new QCursor(*cursor); } -void QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(*bitmap, *mask, static_cast(hotX)); - *outptr_QCursor = ret; +QCursor* QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX) { + return new QCursor(*bitmap, *mask, static_cast(hotX)); } -void QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(*bitmap, *mask, static_cast(hotX), static_cast(hotY)); - *outptr_QCursor = ret; +QCursor* QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY) { + return new QCursor(*bitmap, *mask, static_cast(hotX), static_cast(hotY)); } -void QCursor_new8(QPixmap* pixmap, int hotX, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(*pixmap, static_cast(hotX)); - *outptr_QCursor = ret; +QCursor* QCursor_new8(QPixmap* pixmap, int hotX) { + return new QCursor(*pixmap, static_cast(hotX)); } -void QCursor_new9(QPixmap* pixmap, int hotX, int hotY, QCursor** outptr_QCursor) { - QCursor* ret = new QCursor(*pixmap, static_cast(hotX), static_cast(hotY)); - *outptr_QCursor = ret; +QCursor* QCursor_new9(QPixmap* pixmap, int hotX, int hotY) { + return new QCursor(*pixmap, static_cast(hotX), static_cast(hotY)); } void QCursor_OperatorAssign(QCursor* self, QCursor* cursor) { diff --git a/qt6/gen_qcursor.go b/qt6/gen_qcursor.go index de1fa349..fcee6e71 100644 --- a/qt6/gen_qcursor.go +++ b/qt6/gen_qcursor.go @@ -37,104 +37,83 @@ func newQCursor(h *C.QCursor) *QCursor { if h == nil { return nil } + return &QCursor{h: h} } // UnsafeNewQCursor constructs the type using only unsafe pointers. func UnsafeNewQCursor(h unsafe.Pointer) *QCursor { - if h == nil { - return nil - } - - return &QCursor{h: (*C.QCursor)(h)} + return newQCursor((*C.QCursor)(h)) } // NewQCursor constructs a new QCursor object. func NewQCursor() *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new(&outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new()) ret.isSubclass = true return ret } // NewQCursor2 constructs a new QCursor object. func NewQCursor2(shape CursorShape) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new2((C.int)(shape), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new2((C.int)(shape))) ret.isSubclass = true return ret } // NewQCursor3 constructs a new QCursor object. func NewQCursor3(bitmap *QBitmap, mask *QBitmap) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new3(bitmap.cPointer(), mask.cPointer(), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new3(bitmap.cPointer(), mask.cPointer())) ret.isSubclass = true return ret } // NewQCursor4 constructs a new QCursor object. func NewQCursor4(pixmap *QPixmap) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new4(pixmap.cPointer(), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new4(pixmap.cPointer())) ret.isSubclass = true return ret } // NewQCursor5 constructs a new QCursor object. func NewQCursor5(cursor *QCursor) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new5(cursor.cPointer(), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new5(cursor.cPointer())) ret.isSubclass = true return ret } // NewQCursor6 constructs a new QCursor object. func NewQCursor6(bitmap *QBitmap, mask *QBitmap, hotX int) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new6(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new6(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX))) ret.isSubclass = true return ret } // NewQCursor7 constructs a new QCursor object. func NewQCursor7(bitmap *QBitmap, mask *QBitmap, hotX int, hotY int) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new7(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX), (C.int)(hotY), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new7(bitmap.cPointer(), mask.cPointer(), (C.int)(hotX), (C.int)(hotY))) ret.isSubclass = true return ret } // NewQCursor8 constructs a new QCursor object. func NewQCursor8(pixmap *QPixmap, hotX int) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new8(pixmap.cPointer(), (C.int)(hotX), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new8(pixmap.cPointer(), (C.int)(hotX))) ret.isSubclass = true return ret } // NewQCursor9 constructs a new QCursor object. func NewQCursor9(pixmap *QPixmap, hotX int, hotY int) *QCursor { - var outptr_QCursor *C.QCursor = nil - C.QCursor_new9(pixmap.cPointer(), (C.int)(hotX), (C.int)(hotY), &outptr_QCursor) - ret := newQCursor(outptr_QCursor) + ret := newQCursor(C.QCursor_new9(pixmap.cPointer(), (C.int)(hotX), (C.int)(hotY))) ret.isSubclass = true return ret } @@ -156,31 +135,31 @@ func (this *QCursor) SetShape(newShape CursorShape) { } func (this *QCursor) Bitmap(param1 ReturnByValueConstant) *QBitmap { - _goptr := newQBitmap(C.QCursor_Bitmap(this.h, (C.int)(param1)), nil, nil) + _goptr := newQBitmap(C.QCursor_Bitmap(this.h, (C.int)(param1))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCursor) Mask(param1 ReturnByValueConstant) *QBitmap { - _goptr := newQBitmap(C.QCursor_Mask(this.h, (C.int)(param1)), nil, nil) + _goptr := newQBitmap(C.QCursor_Mask(this.h, (C.int)(param1))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCursor) Bitmap2() *QBitmap { - _goptr := newQBitmap(C.QCursor_Bitmap2(this.h), nil, nil) + _goptr := newQBitmap(C.QCursor_Bitmap2(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCursor) Mask2() *QBitmap { - _goptr := newQBitmap(C.QCursor_Mask2(this.h), nil, nil) + _goptr := newQBitmap(C.QCursor_Mask2(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCursor) Pixmap() *QPixmap { - _goptr := newQPixmap(C.QCursor_Pixmap(this.h), nil) + _goptr := newQPixmap(C.QCursor_Pixmap(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/gen_qcursor.h b/qt6/gen_qcursor.h index 6a20b723..73041a3d 100644 --- a/qt6/gen_qcursor.h +++ b/qt6/gen_qcursor.h @@ -28,15 +28,15 @@ typedef struct QPoint QPoint; typedef struct QScreen QScreen; #endif -void QCursor_new(QCursor** outptr_QCursor); -void QCursor_new2(int shape, QCursor** outptr_QCursor); -void QCursor_new3(QBitmap* bitmap, QBitmap* mask, QCursor** outptr_QCursor); -void QCursor_new4(QPixmap* pixmap, QCursor** outptr_QCursor); -void QCursor_new5(QCursor* cursor, QCursor** outptr_QCursor); -void QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX, QCursor** outptr_QCursor); -void QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY, QCursor** outptr_QCursor); -void QCursor_new8(QPixmap* pixmap, int hotX, QCursor** outptr_QCursor); -void QCursor_new9(QPixmap* pixmap, int hotX, int hotY, QCursor** outptr_QCursor); +QCursor* QCursor_new(); +QCursor* QCursor_new2(int shape); +QCursor* QCursor_new3(QBitmap* bitmap, QBitmap* mask); +QCursor* QCursor_new4(QPixmap* pixmap); +QCursor* QCursor_new5(QCursor* cursor); +QCursor* QCursor_new6(QBitmap* bitmap, QBitmap* mask, int hotX); +QCursor* QCursor_new7(QBitmap* bitmap, QBitmap* mask, int hotX, int hotY); +QCursor* QCursor_new8(QPixmap* pixmap, int hotX); +QCursor* QCursor_new9(QPixmap* pixmap, int hotX, int hotY); void QCursor_OperatorAssign(QCursor* self, QCursor* cursor); void QCursor_Swap(QCursor* self, QCursor* other); int QCursor_Shape(const QCursor* self); diff --git a/qt6/gen_qdatastream.cpp b/qt6/gen_qdatastream.cpp index bbf9d782..28b386f0 100644 --- a/qt6/gen_qdatastream.cpp +++ b/qt6/gen_qdatastream.cpp @@ -6,23 +6,21 @@ #include "gen_qdatastream.h" #include "_cgo_export.h" -void QDataStream_new(QDataStream** outptr_QDataStream, QIODeviceBase** outptr_QIODeviceBase) { - QDataStream* ret = new QDataStream(); - *outptr_QDataStream = ret; - *outptr_QIODeviceBase = static_cast(ret); +QDataStream* QDataStream_new() { + return new QDataStream(); } -void QDataStream_new2(QIODevice* param1, QDataStream** outptr_QDataStream, QIODeviceBase** outptr_QIODeviceBase) { - QDataStream* ret = new QDataStream(param1); - *outptr_QDataStream = ret; - *outptr_QIODeviceBase = static_cast(ret); +QDataStream* QDataStream_new2(QIODevice* param1) { + return new QDataStream(param1); } -void QDataStream_new3(struct miqt_string param1, QDataStream** outptr_QDataStream, QIODeviceBase** outptr_QIODeviceBase) { +QDataStream* QDataStream_new3(struct miqt_string param1) { QByteArray param1_QByteArray(param1.data, param1.len); - QDataStream* ret = new QDataStream(param1_QByteArray); - *outptr_QDataStream = ret; - *outptr_QIODeviceBase = static_cast(ret); + return new QDataStream(param1_QByteArray); +} + +void QDataStream_virtbase(QDataStream* src, QIODeviceBase** outptr_QIODeviceBase) { + *outptr_QIODeviceBase = static_cast(src); } QIODevice* QDataStream_Device(const QDataStream* self) { diff --git a/qt6/gen_qdatastream.go b/qt6/gen_qdatastream.go index b51b5628..3b4d1e55 100644 --- a/qt6/gen_qdatastream.go +++ b/qt6/gen_qdatastream.go @@ -100,42 +100,34 @@ func (this *QDataStream) UnsafePointer() unsafe.Pointer { } // newQDataStream constructs the type using only CGO pointers. -func newQDataStream(h *C.QDataStream, h_QIODeviceBase *C.QIODeviceBase) *QDataStream { +func newQDataStream(h *C.QDataStream) *QDataStream { if h == nil { return nil } + var outptr_QIODeviceBase *C.QIODeviceBase = nil + C.QDataStream_virtbase(h, &outptr_QIODeviceBase) + return &QDataStream{h: h, - QIODeviceBase: newQIODeviceBase(h_QIODeviceBase)} + QIODeviceBase: newQIODeviceBase(outptr_QIODeviceBase)} } // UnsafeNewQDataStream constructs the type using only unsafe pointers. -func UnsafeNewQDataStream(h unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QDataStream { - if h == nil { - return nil - } - - return &QDataStream{h: (*C.QDataStream)(h), - QIODeviceBase: UnsafeNewQIODeviceBase(h_QIODeviceBase)} +func UnsafeNewQDataStream(h unsafe.Pointer) *QDataStream { + return newQDataStream((*C.QDataStream)(h)) } // NewQDataStream constructs a new QDataStream object. func NewQDataStream() *QDataStream { - var outptr_QDataStream *C.QDataStream = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QDataStream_new(&outptr_QDataStream, &outptr_QIODeviceBase) - ret := newQDataStream(outptr_QDataStream, outptr_QIODeviceBase) + ret := newQDataStream(C.QDataStream_new()) ret.isSubclass = true return ret } // NewQDataStream2 constructs a new QDataStream object. func NewQDataStream2(param1 *QIODevice) *QDataStream { - var outptr_QDataStream *C.QDataStream = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QDataStream_new2(param1.cPointer(), &outptr_QDataStream, &outptr_QIODeviceBase) - ret := newQDataStream(outptr_QDataStream, outptr_QIODeviceBase) + ret := newQDataStream(C.QDataStream_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -145,17 +137,14 @@ func NewQDataStream3(param1 []byte) *QDataStream { param1_alias := C.struct_miqt_string{} param1_alias.data = (*C.char)(unsafe.Pointer(¶m1[0])) param1_alias.len = C.size_t(len(param1)) - var outptr_QDataStream *C.QDataStream = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QDataStream_new3(param1_alias, &outptr_QDataStream, &outptr_QIODeviceBase) - ret := newQDataStream(outptr_QDataStream, outptr_QIODeviceBase) + ret := newQDataStream(C.QDataStream_new3(param1_alias)) ret.isSubclass = true return ret } func (this *QDataStream) Device() *QIODevice { - return newQIODevice(C.QDataStream_Device(this.h), nil, nil) + return newQIODevice(C.QDataStream_Device(this.h)) } func (this *QDataStream) SetDevice(device *QIODevice) { @@ -313,7 +302,7 @@ func (this *QDataStream) OperatorShiftLeftWithStr(str string) { func (this *QDataStream) ReadBytes(param1 string, lenVal *uint) *QDataStream { param1_Cstring := C.CString(param1) defer C.free(unsafe.Pointer(param1_Cstring)) - return newQDataStream(C.QDataStream_ReadBytes(this.h, param1_Cstring, (*C.uint)(unsafe.Pointer(lenVal))), nil) + return newQDataStream(C.QDataStream_ReadBytes(this.h, param1_Cstring, (*C.uint)(unsafe.Pointer(lenVal)))) } func (this *QDataStream) ReadRawData(param1 string, lenVal int) int { diff --git a/qt6/gen_qdatastream.h b/qt6/gen_qdatastream.h index a962b732..e612bdf3 100644 --- a/qt6/gen_qdatastream.h +++ b/qt6/gen_qdatastream.h @@ -24,9 +24,10 @@ typedef struct QIODevice QIODevice; typedef struct QIODeviceBase QIODeviceBase; #endif -void QDataStream_new(QDataStream** outptr_QDataStream, QIODeviceBase** outptr_QIODeviceBase); -void QDataStream_new2(QIODevice* param1, QDataStream** outptr_QDataStream, QIODeviceBase** outptr_QIODeviceBase); -void QDataStream_new3(struct miqt_string param1, QDataStream** outptr_QDataStream, QIODeviceBase** outptr_QIODeviceBase); +QDataStream* QDataStream_new(); +QDataStream* QDataStream_new2(QIODevice* param1); +QDataStream* QDataStream_new3(struct miqt_string param1); +void QDataStream_virtbase(QDataStream* src, QIODeviceBase** outptr_QIODeviceBase); QIODevice* QDataStream_Device(const QDataStream* self); void QDataStream_SetDevice(QDataStream* self, QIODevice* device); bool QDataStream_AtEnd(const QDataStream* self); diff --git a/qt6/gen_qdatawidgetmapper.cpp b/qt6/gen_qdatawidgetmapper.cpp index 45af3929..2c5bb514 100644 --- a/qt6/gen_qdatawidgetmapper.cpp +++ b/qt6/gen_qdatawidgetmapper.cpp @@ -222,16 +222,16 @@ public: }; -void QDataWidgetMapper_new(QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject) { - MiqtVirtualQDataWidgetMapper* ret = new MiqtVirtualQDataWidgetMapper(); - *outptr_QDataWidgetMapper = ret; - *outptr_QObject = static_cast(ret); +QDataWidgetMapper* QDataWidgetMapper_new() { + return new MiqtVirtualQDataWidgetMapper(); } -void QDataWidgetMapper_new2(QObject* parent, QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject) { - MiqtVirtualQDataWidgetMapper* ret = new MiqtVirtualQDataWidgetMapper(parent); - *outptr_QDataWidgetMapper = ret; - *outptr_QObject = static_cast(ret); +QDataWidgetMapper* QDataWidgetMapper_new2(QObject* parent) { + return new MiqtVirtualQDataWidgetMapper(parent); +} + +void QDataWidgetMapper_virtbase(QDataWidgetMapper* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QDataWidgetMapper_MetaObject(const QDataWidgetMapper* self) { diff --git a/qt6/gen_qdatawidgetmapper.go b/qt6/gen_qdatawidgetmapper.go index 3f4e550e..09cc23ca 100644 --- a/qt6/gen_qdatawidgetmapper.go +++ b/qt6/gen_qdatawidgetmapper.go @@ -42,42 +42,34 @@ func (this *QDataWidgetMapper) UnsafePointer() unsafe.Pointer { } // newQDataWidgetMapper constructs the type using only CGO pointers. -func newQDataWidgetMapper(h *C.QDataWidgetMapper, h_QObject *C.QObject) *QDataWidgetMapper { +func newQDataWidgetMapper(h *C.QDataWidgetMapper) *QDataWidgetMapper { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QDataWidgetMapper_virtbase(h, &outptr_QObject) + return &QDataWidgetMapper{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQDataWidgetMapper constructs the type using only unsafe pointers. -func UnsafeNewQDataWidgetMapper(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDataWidgetMapper { - if h == nil { - return nil - } - - return &QDataWidgetMapper{h: (*C.QDataWidgetMapper)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQDataWidgetMapper(h unsafe.Pointer) *QDataWidgetMapper { + return newQDataWidgetMapper((*C.QDataWidgetMapper)(h)) } // NewQDataWidgetMapper constructs a new QDataWidgetMapper object. func NewQDataWidgetMapper() *QDataWidgetMapper { - var outptr_QDataWidgetMapper *C.QDataWidgetMapper = nil - var outptr_QObject *C.QObject = nil - C.QDataWidgetMapper_new(&outptr_QDataWidgetMapper, &outptr_QObject) - ret := newQDataWidgetMapper(outptr_QDataWidgetMapper, outptr_QObject) + ret := newQDataWidgetMapper(C.QDataWidgetMapper_new()) ret.isSubclass = true return ret } // NewQDataWidgetMapper2 constructs a new QDataWidgetMapper object. func NewQDataWidgetMapper2(parent *QObject) *QDataWidgetMapper { - var outptr_QDataWidgetMapper *C.QDataWidgetMapper = nil - var outptr_QObject *C.QObject = nil - C.QDataWidgetMapper_new2(parent.cPointer(), &outptr_QDataWidgetMapper, &outptr_QObject) - ret := newQDataWidgetMapper(outptr_QDataWidgetMapper, outptr_QObject) + ret := newQDataWidgetMapper(C.QDataWidgetMapper_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -106,7 +98,7 @@ func (this *QDataWidgetMapper) SetModel(model *QAbstractItemModel) { } func (this *QDataWidgetMapper) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QDataWidgetMapper_Model(this.h), nil) + return newQAbstractItemModel(C.QDataWidgetMapper_Model(this.h)) } func (this *QDataWidgetMapper) SetItemDelegate(delegate *QAbstractItemDelegate) { @@ -114,7 +106,7 @@ func (this *QDataWidgetMapper) SetItemDelegate(delegate *QAbstractItemDelegate) } func (this *QDataWidgetMapper) ItemDelegate() *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QDataWidgetMapper_ItemDelegate(this.h), nil) + return newQAbstractItemDelegate(C.QDataWidgetMapper_ItemDelegate(this.h)) } func (this *QDataWidgetMapper) SetRootIndex(index *QModelIndex) { @@ -170,7 +162,7 @@ func (this *QDataWidgetMapper) MappedPropertyName(widget *QWidget) []byte { } func (this *QDataWidgetMapper) MappedWidgetAt(section int) *QWidget { - return newQWidget(C.QDataWidgetMapper_MappedWidgetAt(this.h, (C.int)(section)), nil, nil) + return newQWidget(C.QDataWidgetMapper_MappedWidgetAt(this.h, (C.int)(section))) } func (this *QDataWidgetMapper) ClearMapping() { @@ -359,7 +351,7 @@ func miqt_exec_callback_QDataWidgetMapper_TimerEvent(self *C.QDataWidgetMapper, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -385,7 +377,7 @@ func miqt_exec_callback_QDataWidgetMapper_ChildEvent(self *C.QDataWidgetMapper, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QDataWidgetMapper{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qdatawidgetmapper.h b/qt6/gen_qdatawidgetmapper.h index cd560cc9..6d8ef35f 100644 --- a/qt6/gen_qdatawidgetmapper.h +++ b/qt6/gen_qdatawidgetmapper.h @@ -40,8 +40,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QDataWidgetMapper_new(QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject); -void QDataWidgetMapper_new2(QObject* parent, QDataWidgetMapper** outptr_QDataWidgetMapper, QObject** outptr_QObject); +QDataWidgetMapper* QDataWidgetMapper_new(); +QDataWidgetMapper* QDataWidgetMapper_new2(QObject* parent); +void QDataWidgetMapper_virtbase(QDataWidgetMapper* src, QObject** outptr_QObject); QMetaObject* QDataWidgetMapper_MetaObject(const QDataWidgetMapper* self); void* QDataWidgetMapper_Metacast(QDataWidgetMapper* self, const char* param1); struct miqt_string QDataWidgetMapper_Tr(const char* s); diff --git a/qt6/gen_qdatetime.cpp b/qt6/gen_qdatetime.cpp index 8848d983..fb2258c5 100644 --- a/qt6/gen_qdatetime.cpp +++ b/qt6/gen_qdatetime.cpp @@ -10,24 +10,20 @@ #include "gen_qdatetime.h" #include "_cgo_export.h" -void QDate_new(QDate** outptr_QDate) { - QDate* ret = new QDate(); - *outptr_QDate = ret; +QDate* QDate_new() { + return new QDate(); } -void QDate_new2(int y, int m, int d, QDate** outptr_QDate) { - QDate* ret = new QDate(static_cast(y), static_cast(m), static_cast(d)); - *outptr_QDate = ret; +QDate* QDate_new2(int y, int m, int d) { + return new QDate(static_cast(y), static_cast(m), static_cast(d)); } -void QDate_new3(int y, int m, int d, QCalendar* cal, QDate** outptr_QDate) { - QDate* ret = new QDate(static_cast(y), static_cast(m), static_cast(d), *cal); - *outptr_QDate = ret; +QDate* QDate_new3(int y, int m, int d, QCalendar* cal) { + return new QDate(static_cast(y), static_cast(m), static_cast(d), *cal); } -void QDate_new4(QDate* param1, QDate** outptr_QDate) { - QDate* ret = new QDate(*param1); - *outptr_QDate = ret; +QDate* QDate_new4(QDate* param1) { + return new QDate(*param1); } bool QDate_IsNull(const QDate* self) { @@ -268,29 +264,24 @@ void QDate_Delete(QDate* self, bool isSubclass) { } } -void QTime_new(QTime** outptr_QTime) { - QTime* ret = new QTime(); - *outptr_QTime = ret; +QTime* QTime_new() { + return new QTime(); } -void QTime_new2(int h, int m, QTime** outptr_QTime) { - QTime* ret = new QTime(static_cast(h), static_cast(m)); - *outptr_QTime = ret; +QTime* QTime_new2(int h, int m) { + return new QTime(static_cast(h), static_cast(m)); } -void QTime_new3(QTime* param1, QTime** outptr_QTime) { - QTime* ret = new QTime(*param1); - *outptr_QTime = ret; +QTime* QTime_new3(QTime* param1) { + return new QTime(*param1); } -void QTime_new4(int h, int m, int s, QTime** outptr_QTime) { - QTime* ret = new QTime(static_cast(h), static_cast(m), static_cast(s)); - *outptr_QTime = ret; +QTime* QTime_new4(int h, int m, int s) { + return new QTime(static_cast(h), static_cast(m), static_cast(s)); } -void QTime_new5(int h, int m, int s, int ms, QTime** outptr_QTime) { - QTime* ret = new QTime(static_cast(h), static_cast(m), static_cast(s), static_cast(ms)); - *outptr_QTime = ret; +QTime* QTime_new5(int h, int m, int s, int ms) { + return new QTime(static_cast(h), static_cast(m), static_cast(s), static_cast(ms)); } bool QTime_IsNull(const QTime* self) { @@ -419,34 +410,28 @@ void QTime_Delete(QTime* self, bool isSubclass) { } } -void QDateTime_new(QDateTime** outptr_QDateTime) { - QDateTime* ret = new QDateTime(); - *outptr_QDateTime = ret; +QDateTime* QDateTime_new() { + return new QDateTime(); } -void QDateTime_new2(QDate* date, QTime* time, QDateTime** outptr_QDateTime) { - QDateTime* ret = new QDateTime(*date, *time); - *outptr_QDateTime = ret; +QDateTime* QDateTime_new2(QDate* date, QTime* time) { + return new QDateTime(*date, *time); } -void QDateTime_new3(QDate* date, QTime* time, QTimeZone* timeZone, QDateTime** outptr_QDateTime) { - QDateTime* ret = new QDateTime(*date, *time, *timeZone); - *outptr_QDateTime = ret; +QDateTime* QDateTime_new3(QDate* date, QTime* time, QTimeZone* timeZone) { + return new QDateTime(*date, *time, *timeZone); } -void QDateTime_new4(QDateTime* other, QDateTime** outptr_QDateTime) { - QDateTime* ret = new QDateTime(*other); - *outptr_QDateTime = ret; +QDateTime* QDateTime_new4(QDateTime* other) { + return new QDateTime(*other); } -void QDateTime_new5(QDate* date, QTime* time, int spec, QDateTime** outptr_QDateTime) { - QDateTime* ret = new QDateTime(*date, *time, static_cast(spec)); - *outptr_QDateTime = ret; +QDateTime* QDateTime_new5(QDate* date, QTime* time, int spec) { + return new QDateTime(*date, *time, static_cast(spec)); } -void QDateTime_new6(QDate* date, QTime* time, int spec, int offsetSeconds, QDateTime** outptr_QDateTime) { - QDateTime* ret = new QDateTime(*date, *time, static_cast(spec), static_cast(offsetSeconds)); - *outptr_QDateTime = ret; +QDateTime* QDateTime_new6(QDate* date, QTime* time, int spec, int offsetSeconds) { + return new QDateTime(*date, *time, static_cast(spec), static_cast(offsetSeconds)); } void QDateTime_OperatorAssign(QDateTime* self, QDateTime* other) { diff --git a/qt6/gen_qdatetime.go b/qt6/gen_qdatetime.go index 08136b77..275cc089 100644 --- a/qt6/gen_qdatetime.go +++ b/qt6/gen_qdatetime.go @@ -44,54 +44,43 @@ func newQDate(h *C.QDate) *QDate { if h == nil { return nil } + return &QDate{h: h} } // UnsafeNewQDate constructs the type using only unsafe pointers. func UnsafeNewQDate(h unsafe.Pointer) *QDate { - if h == nil { - return nil - } - - return &QDate{h: (*C.QDate)(h)} + return newQDate((*C.QDate)(h)) } // NewQDate constructs a new QDate object. func NewQDate() *QDate { - var outptr_QDate *C.QDate = nil - C.QDate_new(&outptr_QDate) - ret := newQDate(outptr_QDate) + ret := newQDate(C.QDate_new()) ret.isSubclass = true return ret } // NewQDate2 constructs a new QDate object. func NewQDate2(y int, m int, d int) *QDate { - var outptr_QDate *C.QDate = nil - C.QDate_new2((C.int)(y), (C.int)(m), (C.int)(d), &outptr_QDate) - ret := newQDate(outptr_QDate) + ret := newQDate(C.QDate_new2((C.int)(y), (C.int)(m), (C.int)(d))) ret.isSubclass = true return ret } // NewQDate3 constructs a new QDate object. func NewQDate3(y int, m int, d int, cal QCalendar) *QDate { - var outptr_QDate *C.QDate = nil - C.QDate_new3((C.int)(y), (C.int)(m), (C.int)(d), cal.cPointer(), &outptr_QDate) - ret := newQDate(outptr_QDate) + ret := newQDate(C.QDate_new3((C.int)(y), (C.int)(m), (C.int)(d), cal.cPointer())) ret.isSubclass = true return ret } // NewQDate4 constructs a new QDate object. func NewQDate4(param1 *QDate) *QDate { - var outptr_QDate *C.QDate = nil - C.QDate_new4(param1.cPointer(), &outptr_QDate) - ret := newQDate(outptr_QDate) + ret := newQDate(C.QDate_new4(param1.cPointer())) ret.isSubclass = true return ret } @@ -408,64 +397,51 @@ func newQTime(h *C.QTime) *QTime { if h == nil { return nil } + return &QTime{h: h} } // UnsafeNewQTime constructs the type using only unsafe pointers. func UnsafeNewQTime(h unsafe.Pointer) *QTime { - if h == nil { - return nil - } - - return &QTime{h: (*C.QTime)(h)} + return newQTime((*C.QTime)(h)) } // NewQTime constructs a new QTime object. func NewQTime() *QTime { - var outptr_QTime *C.QTime = nil - C.QTime_new(&outptr_QTime) - ret := newQTime(outptr_QTime) + ret := newQTime(C.QTime_new()) ret.isSubclass = true return ret } // NewQTime2 constructs a new QTime object. func NewQTime2(h int, m int) *QTime { - var outptr_QTime *C.QTime = nil - C.QTime_new2((C.int)(h), (C.int)(m), &outptr_QTime) - ret := newQTime(outptr_QTime) + ret := newQTime(C.QTime_new2((C.int)(h), (C.int)(m))) ret.isSubclass = true return ret } // NewQTime3 constructs a new QTime object. func NewQTime3(param1 *QTime) *QTime { - var outptr_QTime *C.QTime = nil - C.QTime_new3(param1.cPointer(), &outptr_QTime) - ret := newQTime(outptr_QTime) + ret := newQTime(C.QTime_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQTime4 constructs a new QTime object. func NewQTime4(h int, m int, s int) *QTime { - var outptr_QTime *C.QTime = nil - C.QTime_new4((C.int)(h), (C.int)(m), (C.int)(s), &outptr_QTime) - ret := newQTime(outptr_QTime) + ret := newQTime(C.QTime_new4((C.int)(h), (C.int)(m), (C.int)(s))) ret.isSubclass = true return ret } // NewQTime5 constructs a new QTime object. func NewQTime5(h int, m int, s int, ms int) *QTime { - var outptr_QTime *C.QTime = nil - C.QTime_new5((C.int)(h), (C.int)(m), (C.int)(s), (C.int)(ms), &outptr_QTime) - ret := newQTime(outptr_QTime) + ret := newQTime(C.QTime_new5((C.int)(h), (C.int)(m), (C.int)(s), (C.int)(ms))) ret.isSubclass = true return ret } @@ -643,74 +619,59 @@ func newQDateTime(h *C.QDateTime) *QDateTime { if h == nil { return nil } + return &QDateTime{h: h} } // UnsafeNewQDateTime constructs the type using only unsafe pointers. func UnsafeNewQDateTime(h unsafe.Pointer) *QDateTime { - if h == nil { - return nil - } - - return &QDateTime{h: (*C.QDateTime)(h)} + return newQDateTime((*C.QDateTime)(h)) } // NewQDateTime constructs a new QDateTime object. func NewQDateTime() *QDateTime { - var outptr_QDateTime *C.QDateTime = nil - C.QDateTime_new(&outptr_QDateTime) - ret := newQDateTime(outptr_QDateTime) + ret := newQDateTime(C.QDateTime_new()) ret.isSubclass = true return ret } // NewQDateTime2 constructs a new QDateTime object. func NewQDateTime2(date QDate, time QTime) *QDateTime { - var outptr_QDateTime *C.QDateTime = nil - C.QDateTime_new2(date.cPointer(), time.cPointer(), &outptr_QDateTime) - ret := newQDateTime(outptr_QDateTime) + ret := newQDateTime(C.QDateTime_new2(date.cPointer(), time.cPointer())) ret.isSubclass = true return ret } // NewQDateTime3 constructs a new QDateTime object. func NewQDateTime3(date QDate, time QTime, timeZone *QTimeZone) *QDateTime { - var outptr_QDateTime *C.QDateTime = nil - C.QDateTime_new3(date.cPointer(), time.cPointer(), timeZone.cPointer(), &outptr_QDateTime) - ret := newQDateTime(outptr_QDateTime) + ret := newQDateTime(C.QDateTime_new3(date.cPointer(), time.cPointer(), timeZone.cPointer())) ret.isSubclass = true return ret } // NewQDateTime4 constructs a new QDateTime object. func NewQDateTime4(other *QDateTime) *QDateTime { - var outptr_QDateTime *C.QDateTime = nil - C.QDateTime_new4(other.cPointer(), &outptr_QDateTime) - ret := newQDateTime(outptr_QDateTime) + ret := newQDateTime(C.QDateTime_new4(other.cPointer())) ret.isSubclass = true return ret } // NewQDateTime5 constructs a new QDateTime object. func NewQDateTime5(date QDate, time QTime, spec TimeSpec) *QDateTime { - var outptr_QDateTime *C.QDateTime = nil - C.QDateTime_new5(date.cPointer(), time.cPointer(), (C.int)(spec), &outptr_QDateTime) - ret := newQDateTime(outptr_QDateTime) + ret := newQDateTime(C.QDateTime_new5(date.cPointer(), time.cPointer(), (C.int)(spec))) ret.isSubclass = true return ret } // NewQDateTime6 constructs a new QDateTime object. func NewQDateTime6(date QDate, time QTime, spec TimeSpec, offsetSeconds int) *QDateTime { - var outptr_QDateTime *C.QDateTime = nil - C.QDateTime_new6(date.cPointer(), time.cPointer(), (C.int)(spec), (C.int)(offsetSeconds), &outptr_QDateTime) - ret := newQDateTime(outptr_QDateTime) + ret := newQDateTime(C.QDateTime_new6(date.cPointer(), time.cPointer(), (C.int)(spec), (C.int)(offsetSeconds))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qdatetime.h b/qt6/gen_qdatetime.h index d6a2742c..d4f426d9 100644 --- a/qt6/gen_qdatetime.h +++ b/qt6/gen_qdatetime.h @@ -28,10 +28,10 @@ typedef struct QTime QTime; typedef struct QTimeZone QTimeZone; #endif -void QDate_new(QDate** outptr_QDate); -void QDate_new2(int y, int m, int d, QDate** outptr_QDate); -void QDate_new3(int y, int m, int d, QCalendar* cal, QDate** outptr_QDate); -void QDate_new4(QDate* param1, QDate** outptr_QDate); +QDate* QDate_new(); +QDate* QDate_new2(int y, int m, int d); +QDate* QDate_new3(int y, int m, int d, QCalendar* cal); +QDate* QDate_new4(QDate* param1); bool QDate_IsNull(const QDate* self); bool QDate_IsValid(const QDate* self); int QDate_Year(const QDate* self); @@ -82,11 +82,11 @@ QDate* QDate_FromString23(struct miqt_string stringVal, int format); QDate* QDate_FromString34(struct miqt_string stringVal, struct miqt_string format, QCalendar* cal); void QDate_Delete(QDate* self, bool isSubclass); -void QTime_new(QTime** outptr_QTime); -void QTime_new2(int h, int m, QTime** outptr_QTime); -void QTime_new3(QTime* param1, QTime** outptr_QTime); -void QTime_new4(int h, int m, int s, QTime** outptr_QTime); -void QTime_new5(int h, int m, int s, int ms, QTime** outptr_QTime); +QTime* QTime_new(); +QTime* QTime_new2(int h, int m); +QTime* QTime_new3(QTime* param1); +QTime* QTime_new4(int h, int m, int s); +QTime* QTime_new5(int h, int m, int s, int ms); bool QTime_IsNull(const QTime* self); bool QTime_IsValid(const QTime* self); int QTime_Hour(const QTime* self); @@ -112,12 +112,12 @@ QTime* QTime_FromString23(struct miqt_string stringVal, int format); bool QTime_IsValid4(int h, int m, int s, int ms); void QTime_Delete(QTime* self, bool isSubclass); -void QDateTime_new(QDateTime** outptr_QDateTime); -void QDateTime_new2(QDate* date, QTime* time, QDateTime** outptr_QDateTime); -void QDateTime_new3(QDate* date, QTime* time, QTimeZone* timeZone, QDateTime** outptr_QDateTime); -void QDateTime_new4(QDateTime* other, QDateTime** outptr_QDateTime); -void QDateTime_new5(QDate* date, QTime* time, int spec, QDateTime** outptr_QDateTime); -void QDateTime_new6(QDate* date, QTime* time, int spec, int offsetSeconds, QDateTime** outptr_QDateTime); +QDateTime* QDateTime_new(); +QDateTime* QDateTime_new2(QDate* date, QTime* time); +QDateTime* QDateTime_new3(QDate* date, QTime* time, QTimeZone* timeZone); +QDateTime* QDateTime_new4(QDateTime* other); +QDateTime* QDateTime_new5(QDate* date, QTime* time, int spec); +QDateTime* QDateTime_new6(QDate* date, QTime* time, int spec, int offsetSeconds); void QDateTime_OperatorAssign(QDateTime* self, QDateTime* other); void QDateTime_Swap(QDateTime* self, QDateTime* other); bool QDateTime_IsNull(const QDateTime* self); diff --git a/qt6/gen_qdatetimeedit.cpp b/qt6/gen_qdatetimeedit.cpp index 7fbe68f8..b02c439e 100644 --- a/qt6/gen_qdatetimeedit.cpp +++ b/qt6/gen_qdatetimeedit.cpp @@ -770,76 +770,40 @@ public: }; -void QDateTimeEdit_new(QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(parent); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new(QWidget* parent) { + return new MiqtVirtualQDateTimeEdit(parent); } -void QDateTimeEdit_new2(QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new2() { + return new MiqtVirtualQDateTimeEdit(); } -void QDateTimeEdit_new3(QDateTime* dt, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*dt); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new3(QDateTime* dt) { + return new MiqtVirtualQDateTimeEdit(*dt); } -void QDateTimeEdit_new4(QDate* d, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*d); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new4(QDate* d) { + return new MiqtVirtualQDateTimeEdit(*d); } -void QDateTimeEdit_new5(QTime* t, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*t); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new5(QTime* t) { + return new MiqtVirtualQDateTimeEdit(*t); } -void QDateTimeEdit_new6(QDateTime* dt, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*dt, parent); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new6(QDateTime* dt, QWidget* parent) { + return new MiqtVirtualQDateTimeEdit(*dt, parent); } -void QDateTimeEdit_new7(QDate* d, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*d, parent); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new7(QDate* d, QWidget* parent) { + return new MiqtVirtualQDateTimeEdit(*d, parent); } -void QDateTimeEdit_new8(QTime* t, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateTimeEdit* ret = new MiqtVirtualQDateTimeEdit(*t, parent); - *outptr_QDateTimeEdit = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateTimeEdit* QDateTimeEdit_new8(QTime* t, QWidget* parent) { + return new MiqtVirtualQDateTimeEdit(*t, parent); +} + +void QDateTimeEdit_virtbase(QDateTimeEdit* src, QAbstractSpinBox** outptr_QAbstractSpinBox) { + *outptr_QAbstractSpinBox = static_cast(src); } QMetaObject* QDateTimeEdit_MetaObject(const QDateTimeEdit* self) { @@ -1800,44 +1764,24 @@ public: }; -void QTimeEdit_new(QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(parent); - *outptr_QTimeEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTimeEdit* QTimeEdit_new(QWidget* parent) { + return new MiqtVirtualQTimeEdit(parent); } -void QTimeEdit_new2(QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(); - *outptr_QTimeEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTimeEdit* QTimeEdit_new2() { + return new MiqtVirtualQTimeEdit(); } -void QTimeEdit_new3(QTime* time, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(*time); - *outptr_QTimeEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTimeEdit* QTimeEdit_new3(QTime* time) { + return new MiqtVirtualQTimeEdit(*time); } -void QTimeEdit_new4(QTime* time, QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTimeEdit* ret = new MiqtVirtualQTimeEdit(*time, parent); - *outptr_QTimeEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTimeEdit* QTimeEdit_new4(QTime* time, QWidget* parent) { + return new MiqtVirtualQTimeEdit(*time, parent); +} + +void QTimeEdit_virtbase(QTimeEdit* src, QDateTimeEdit** outptr_QDateTimeEdit) { + *outptr_QDateTimeEdit = static_cast(src); } QMetaObject* QTimeEdit_MetaObject(const QTimeEdit* self) { @@ -2451,44 +2395,24 @@ public: }; -void QDateEdit_new(QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(parent); - *outptr_QDateEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateEdit* QDateEdit_new(QWidget* parent) { + return new MiqtVirtualQDateEdit(parent); } -void QDateEdit_new2(QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(); - *outptr_QDateEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateEdit* QDateEdit_new2() { + return new MiqtVirtualQDateEdit(); } -void QDateEdit_new3(QDate* date, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(*date); - *outptr_QDateEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateEdit* QDateEdit_new3(QDate* date) { + return new MiqtVirtualQDateEdit(*date); } -void QDateEdit_new4(QDate* date, QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDateEdit* ret = new MiqtVirtualQDateEdit(*date, parent); - *outptr_QDateEdit = ret; - *outptr_QDateTimeEdit = static_cast(ret); - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDateEdit* QDateEdit_new4(QDate* date, QWidget* parent) { + return new MiqtVirtualQDateEdit(*date, parent); +} + +void QDateEdit_virtbase(QDateEdit* src, QDateTimeEdit** outptr_QDateTimeEdit) { + *outptr_QDateTimeEdit = static_cast(src); } QMetaObject* QDateEdit_MetaObject(const QDateEdit* self) { diff --git a/qt6/gen_qdatetimeedit.go b/qt6/gen_qdatetimeedit.go index f8284cab..4667c80f 100644 --- a/qt6/gen_qdatetimeedit.go +++ b/qt6/gen_qdatetimeedit.go @@ -51,132 +51,82 @@ func (this *QDateTimeEdit) UnsafePointer() unsafe.Pointer { } // newQDateTimeEdit constructs the type using only CGO pointers. -func newQDateTimeEdit(h *C.QDateTimeEdit, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDateTimeEdit { +func newQDateTimeEdit(h *C.QDateTimeEdit) *QDateTimeEdit { if h == nil { return nil } + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + C.QDateTimeEdit_virtbase(h, &outptr_QAbstractSpinBox) + return &QDateTimeEdit{h: h, - QAbstractSpinBox: newQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractSpinBox: newQAbstractSpinBox(outptr_QAbstractSpinBox)} } // UnsafeNewQDateTimeEdit constructs the type using only unsafe pointers. -func UnsafeNewQDateTimeEdit(h unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDateTimeEdit { - if h == nil { - return nil - } - - return &QDateTimeEdit{h: (*C.QDateTimeEdit)(h), - QAbstractSpinBox: UnsafeNewQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQDateTimeEdit(h unsafe.Pointer) *QDateTimeEdit { + return newQDateTimeEdit((*C.QDateTimeEdit)(h)) } // NewQDateTimeEdit constructs a new QDateTimeEdit object. func NewQDateTimeEdit(parent *QWidget) *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new(parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQDateTimeEdit2 constructs a new QDateTimeEdit object. func NewQDateTimeEdit2() *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new2(&outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new2()) ret.isSubclass = true return ret } // NewQDateTimeEdit3 constructs a new QDateTimeEdit object. func NewQDateTimeEdit3(dt *QDateTime) *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new3(dt.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new3(dt.cPointer())) ret.isSubclass = true return ret } // NewQDateTimeEdit4 constructs a new QDateTimeEdit object. func NewQDateTimeEdit4(d QDate) *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new4(d.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new4(d.cPointer())) ret.isSubclass = true return ret } // NewQDateTimeEdit5 constructs a new QDateTimeEdit object. func NewQDateTimeEdit5(t QTime) *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new5(t.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new5(t.cPointer())) ret.isSubclass = true return ret } // NewQDateTimeEdit6 constructs a new QDateTimeEdit object. func NewQDateTimeEdit6(dt *QDateTime, parent *QWidget) *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new6(dt.cPointer(), parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new6(dt.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQDateTimeEdit7 constructs a new QDateTimeEdit object. func NewQDateTimeEdit7(d QDate, parent *QWidget) *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new7(d.cPointer(), parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new7(d.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQDateTimeEdit8 constructs a new QDateTimeEdit object. func NewQDateTimeEdit8(t QTime, parent *QWidget) *QDateTimeEdit { - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateTimeEdit_new8(t.cPointer(), parent.cPointer(), &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateTimeEdit(outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateTimeEdit(C.QDateTimeEdit_new8(t.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -349,7 +299,7 @@ func (this *QDateTimeEdit) SetCurrentSectionIndex(index int) { } func (this *QDateTimeEdit) CalendarWidget() *QCalendarWidget { - return newQCalendarWidget(C.QDateTimeEdit_CalendarWidget(this.h), nil, nil, nil) + return newQCalendarWidget(C.QDateTimeEdit_CalendarWidget(this.h)) } func (this *QDateTimeEdit) SetCalendarWidget(calendarWidget *QCalendarWidget) { @@ -642,7 +592,7 @@ func miqt_exec_callback_QDateTimeEdit_KeyPressEvent(self *C.QDateTimeEdit, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -668,7 +618,7 @@ func miqt_exec_callback_QDateTimeEdit_WheelEvent(self *C.QDateTimeEdit, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -694,7 +644,7 @@ func miqt_exec_callback_QDateTimeEdit_FocusInEvent(self *C.QDateTimeEdit, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -913,7 +863,7 @@ func miqt_exec_callback_QDateTimeEdit_MousePressEvent(self *C.QDateTimeEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -939,7 +889,7 @@ func miqt_exec_callback_QDateTimeEdit_PaintEvent(self *C.QDateTimeEdit, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -965,7 +915,7 @@ func miqt_exec_callback_QDateTimeEdit_InitStyleOption(self *C.QDateTimeEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionSpinBox(option, nil, nil) + slotval1 := newQStyleOptionSpinBox(option) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -1048,7 +998,7 @@ func miqt_exec_callback_QDateTimeEdit_ResizeEvent(self *C.QDateTimeEdit, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1074,7 +1024,7 @@ func miqt_exec_callback_QDateTimeEdit_KeyReleaseEvent(self *C.QDateTimeEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1100,7 +1050,7 @@ func miqt_exec_callback_QDateTimeEdit_FocusOutEvent(self *C.QDateTimeEdit, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1126,7 +1076,7 @@ func miqt_exec_callback_QDateTimeEdit_ContextMenuEvent(self *C.QDateTimeEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1178,7 +1128,7 @@ func miqt_exec_callback_QDateTimeEdit_CloseEvent(self *C.QDateTimeEdit, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1204,7 +1154,7 @@ func miqt_exec_callback_QDateTimeEdit_HideEvent(self *C.QDateTimeEdit, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1230,7 +1180,7 @@ func miqt_exec_callback_QDateTimeEdit_MouseReleaseEvent(self *C.QDateTimeEdit, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1256,7 +1206,7 @@ func miqt_exec_callback_QDateTimeEdit_MouseMoveEvent(self *C.QDateTimeEdit, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1282,7 +1232,7 @@ func miqt_exec_callback_QDateTimeEdit_TimerEvent(self *C.QDateTimeEdit, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1308,7 +1258,7 @@ func miqt_exec_callback_QDateTimeEdit_ShowEvent(self *C.QDateTimeEdit, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QDateTimeEdit{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1349,80 +1299,50 @@ func (this *QTimeEdit) UnsafePointer() unsafe.Pointer { } // newQTimeEdit constructs the type using only CGO pointers. -func newQTimeEdit(h *C.QTimeEdit, h_QDateTimeEdit *C.QDateTimeEdit, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTimeEdit { +func newQTimeEdit(h *C.QTimeEdit) *QTimeEdit { if h == nil { return nil } + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + C.QTimeEdit_virtbase(h, &outptr_QDateTimeEdit) + return &QTimeEdit{h: h, - QDateTimeEdit: newQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} + QDateTimeEdit: newQDateTimeEdit(outptr_QDateTimeEdit)} } // UnsafeNewQTimeEdit constructs the type using only unsafe pointers. -func UnsafeNewQTimeEdit(h unsafe.Pointer, h_QDateTimeEdit unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTimeEdit { - if h == nil { - return nil - } - - return &QTimeEdit{h: (*C.QTimeEdit)(h), - QDateTimeEdit: UnsafeNewQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTimeEdit(h unsafe.Pointer) *QTimeEdit { + return newQTimeEdit((*C.QTimeEdit)(h)) } // NewQTimeEdit constructs a new QTimeEdit object. func NewQTimeEdit(parent *QWidget) *QTimeEdit { - var outptr_QTimeEdit *C.QTimeEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTimeEdit_new(parent.cPointer(), &outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTimeEdit(C.QTimeEdit_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTimeEdit2 constructs a new QTimeEdit object. func NewQTimeEdit2() *QTimeEdit { - var outptr_QTimeEdit *C.QTimeEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTimeEdit_new2(&outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTimeEdit(C.QTimeEdit_new2()) ret.isSubclass = true return ret } // NewQTimeEdit3 constructs a new QTimeEdit object. func NewQTimeEdit3(time QTime) *QTimeEdit { - var outptr_QTimeEdit *C.QTimeEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTimeEdit_new3(time.cPointer(), &outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTimeEdit(C.QTimeEdit_new3(time.cPointer())) ret.isSubclass = true return ret } // NewQTimeEdit4 constructs a new QTimeEdit object. func NewQTimeEdit4(time QTime, parent *QWidget) *QTimeEdit { - var outptr_QTimeEdit *C.QTimeEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTimeEdit_new4(time.cPointer(), parent.cPointer(), &outptr_QTimeEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTimeEdit(outptr_QTimeEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTimeEdit(C.QTimeEdit_new4(time.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -1614,7 +1534,7 @@ func miqt_exec_callback_QTimeEdit_KeyPressEvent(self *C.QTimeEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QTimeEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1640,7 +1560,7 @@ func miqt_exec_callback_QTimeEdit_WheelEvent(self *C.QTimeEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QTimeEdit{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1666,7 +1586,7 @@ func miqt_exec_callback_QTimeEdit_FocusInEvent(self *C.QTimeEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTimeEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1885,7 +1805,7 @@ func miqt_exec_callback_QTimeEdit_MousePressEvent(self *C.QTimeEdit, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTimeEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1911,7 +1831,7 @@ func miqt_exec_callback_QTimeEdit_PaintEvent(self *C.QTimeEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QTimeEdit{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1937,7 +1857,7 @@ func miqt_exec_callback_QTimeEdit_InitStyleOption(self *C.QTimeEdit, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionSpinBox(option, nil, nil) + slotval1 := newQStyleOptionSpinBox(option) gofunc((&QTimeEdit{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -1978,80 +1898,50 @@ func (this *QDateEdit) UnsafePointer() unsafe.Pointer { } // newQDateEdit constructs the type using only CGO pointers. -func newQDateEdit(h *C.QDateEdit, h_QDateTimeEdit *C.QDateTimeEdit, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDateEdit { +func newQDateEdit(h *C.QDateEdit) *QDateEdit { if h == nil { return nil } + var outptr_QDateTimeEdit *C.QDateTimeEdit = nil + C.QDateEdit_virtbase(h, &outptr_QDateTimeEdit) + return &QDateEdit{h: h, - QDateTimeEdit: newQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} + QDateTimeEdit: newQDateTimeEdit(outptr_QDateTimeEdit)} } // UnsafeNewQDateEdit constructs the type using only unsafe pointers. -func UnsafeNewQDateEdit(h unsafe.Pointer, h_QDateTimeEdit unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDateEdit { - if h == nil { - return nil - } - - return &QDateEdit{h: (*C.QDateEdit)(h), - QDateTimeEdit: UnsafeNewQDateTimeEdit(h_QDateTimeEdit, h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQDateEdit(h unsafe.Pointer) *QDateEdit { + return newQDateEdit((*C.QDateEdit)(h)) } // NewQDateEdit constructs a new QDateEdit object. func NewQDateEdit(parent *QWidget) *QDateEdit { - var outptr_QDateEdit *C.QDateEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateEdit_new(parent.cPointer(), &outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateEdit(C.QDateEdit_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQDateEdit2 constructs a new QDateEdit object. func NewQDateEdit2() *QDateEdit { - var outptr_QDateEdit *C.QDateEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateEdit_new2(&outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateEdit(C.QDateEdit_new2()) ret.isSubclass = true return ret } // NewQDateEdit3 constructs a new QDateEdit object. func NewQDateEdit3(date QDate) *QDateEdit { - var outptr_QDateEdit *C.QDateEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateEdit_new3(date.cPointer(), &outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateEdit(C.QDateEdit_new3(date.cPointer())) ret.isSubclass = true return ret } // NewQDateEdit4 constructs a new QDateEdit object. func NewQDateEdit4(date QDate, parent *QWidget) *QDateEdit { - var outptr_QDateEdit *C.QDateEdit = nil - var outptr_QDateTimeEdit *C.QDateTimeEdit = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDateEdit_new4(date.cPointer(), parent.cPointer(), &outptr_QDateEdit, &outptr_QDateTimeEdit, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDateEdit(outptr_QDateEdit, outptr_QDateTimeEdit, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDateEdit(C.QDateEdit_new4(date.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -2243,7 +2133,7 @@ func miqt_exec_callback_QDateEdit_KeyPressEvent(self *C.QDateEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDateEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -2269,7 +2159,7 @@ func miqt_exec_callback_QDateEdit_WheelEvent(self *C.QDateEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QDateEdit{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -2295,7 +2185,7 @@ func miqt_exec_callback_QDateEdit_FocusInEvent(self *C.QDateEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDateEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -2514,7 +2404,7 @@ func miqt_exec_callback_QDateEdit_MousePressEvent(self *C.QDateEdit, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDateEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -2540,7 +2430,7 @@ func miqt_exec_callback_QDateEdit_PaintEvent(self *C.QDateEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QDateEdit{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -2566,7 +2456,7 @@ func miqt_exec_callback_QDateEdit_InitStyleOption(self *C.QDateEdit, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionSpinBox(option, nil, nil) + slotval1 := newQStyleOptionSpinBox(option) gofunc((&QDateEdit{h: self}).callVirtualBase_InitStyleOption, slotval1) diff --git a/qt6/gen_qdatetimeedit.h b/qt6/gen_qdatetimeedit.h index daa685d2..e2d62ed3 100644 --- a/qt6/gen_qdatetimeedit.h +++ b/qt6/gen_qdatetimeedit.h @@ -74,14 +74,15 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QDateTimeEdit_new(QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateTimeEdit_new2(QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateTimeEdit_new3(QDateTime* dt, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateTimeEdit_new4(QDate* d, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateTimeEdit_new5(QTime* t, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateTimeEdit_new6(QDateTime* dt, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateTimeEdit_new7(QDate* d, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateTimeEdit_new8(QTime* t, QWidget* parent, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QDateTimeEdit* QDateTimeEdit_new(QWidget* parent); +QDateTimeEdit* QDateTimeEdit_new2(); +QDateTimeEdit* QDateTimeEdit_new3(QDateTime* dt); +QDateTimeEdit* QDateTimeEdit_new4(QDate* d); +QDateTimeEdit* QDateTimeEdit_new5(QTime* t); +QDateTimeEdit* QDateTimeEdit_new6(QDateTime* dt, QWidget* parent); +QDateTimeEdit* QDateTimeEdit_new7(QDate* d, QWidget* parent); +QDateTimeEdit* QDateTimeEdit_new8(QTime* t, QWidget* parent); +void QDateTimeEdit_virtbase(QDateTimeEdit* src, QAbstractSpinBox** outptr_QAbstractSpinBox); QMetaObject* QDateTimeEdit_MetaObject(const QDateTimeEdit* self); void* QDateTimeEdit_Metacast(QDateTimeEdit* self, const char* param1); struct miqt_string QDateTimeEdit_Tr(const char* s); @@ -215,10 +216,11 @@ void QDateTimeEdit_override_virtual_ShowEvent(void* self, intptr_t slot); void QDateTimeEdit_virtualbase_ShowEvent(void* self, QShowEvent* event); void QDateTimeEdit_Delete(QDateTimeEdit* self, bool isSubclass); -void QTimeEdit_new(QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTimeEdit_new2(QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTimeEdit_new3(QTime* time, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTimeEdit_new4(QTime* time, QWidget* parent, QTimeEdit** outptr_QTimeEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTimeEdit* QTimeEdit_new(QWidget* parent); +QTimeEdit* QTimeEdit_new2(); +QTimeEdit* QTimeEdit_new3(QTime* time); +QTimeEdit* QTimeEdit_new4(QTime* time, QWidget* parent); +void QTimeEdit_virtbase(QTimeEdit* src, QDateTimeEdit** outptr_QDateTimeEdit); QMetaObject* QTimeEdit_MetaObject(const QTimeEdit* self); void* QTimeEdit_Metacast(QTimeEdit* self, const char* param1); struct miqt_string QTimeEdit_Tr(const char* s); @@ -260,10 +262,11 @@ void QTimeEdit_override_virtual_InitStyleOption(void* self, intptr_t slot); void QTimeEdit_virtualbase_InitStyleOption(const void* self, QStyleOptionSpinBox* option); void QTimeEdit_Delete(QTimeEdit* self, bool isSubclass); -void QDateEdit_new(QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateEdit_new2(QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateEdit_new3(QDate* date, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDateEdit_new4(QDate* date, QWidget* parent, QDateEdit** outptr_QDateEdit, QDateTimeEdit** outptr_QDateTimeEdit, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QDateEdit* QDateEdit_new(QWidget* parent); +QDateEdit* QDateEdit_new2(); +QDateEdit* QDateEdit_new3(QDate* date); +QDateEdit* QDateEdit_new4(QDate* date, QWidget* parent); +void QDateEdit_virtbase(QDateEdit* src, QDateTimeEdit** outptr_QDateTimeEdit); QMetaObject* QDateEdit_MetaObject(const QDateEdit* self); void* QDateEdit_Metacast(QDateEdit* self, const char* param1); struct miqt_string QDateEdit_Tr(const char* s); diff --git a/qt6/gen_qdeadlinetimer.cpp b/qt6/gen_qdeadlinetimer.cpp index ada9e2fe..e87a6730 100644 --- a/qt6/gen_qdeadlinetimer.cpp +++ b/qt6/gen_qdeadlinetimer.cpp @@ -3,39 +3,32 @@ #include "gen_qdeadlinetimer.h" #include "_cgo_export.h" -void QDeadlineTimer_new(QDeadlineTimer** outptr_QDeadlineTimer) { - QDeadlineTimer* ret = new QDeadlineTimer(); - *outptr_QDeadlineTimer = ret; +QDeadlineTimer* QDeadlineTimer_new() { + return new QDeadlineTimer(); } -void QDeadlineTimer_new2(int param1, QDeadlineTimer** outptr_QDeadlineTimer) { - QDeadlineTimer* ret = new QDeadlineTimer(static_cast(param1)); - *outptr_QDeadlineTimer = ret; +QDeadlineTimer* QDeadlineTimer_new2(int param1) { + return new QDeadlineTimer(static_cast(param1)); } -void QDeadlineTimer_new3(long long msecs, QDeadlineTimer** outptr_QDeadlineTimer) { - QDeadlineTimer* ret = new QDeadlineTimer(static_cast(msecs)); - *outptr_QDeadlineTimer = ret; +QDeadlineTimer* QDeadlineTimer_new3(long long msecs) { + return new QDeadlineTimer(static_cast(msecs)); } -void QDeadlineTimer_new4(QDeadlineTimer* param1, QDeadlineTimer** outptr_QDeadlineTimer) { - QDeadlineTimer* ret = new QDeadlineTimer(*param1); - *outptr_QDeadlineTimer = ret; +QDeadlineTimer* QDeadlineTimer_new4(QDeadlineTimer* param1) { + return new QDeadlineTimer(*param1); } -void QDeadlineTimer_new5(int type_, QDeadlineTimer** outptr_QDeadlineTimer) { - QDeadlineTimer* ret = new QDeadlineTimer(static_cast(type_)); - *outptr_QDeadlineTimer = ret; +QDeadlineTimer* QDeadlineTimer_new5(int type_) { + return new QDeadlineTimer(static_cast(type_)); } -void QDeadlineTimer_new6(int param1, int type_, QDeadlineTimer** outptr_QDeadlineTimer) { - QDeadlineTimer* ret = new QDeadlineTimer(static_cast(param1), static_cast(type_)); - *outptr_QDeadlineTimer = ret; +QDeadlineTimer* QDeadlineTimer_new6(int param1, int type_) { + return new QDeadlineTimer(static_cast(param1), static_cast(type_)); } -void QDeadlineTimer_new7(long long msecs, int typeVal, QDeadlineTimer** outptr_QDeadlineTimer) { - QDeadlineTimer* ret = new QDeadlineTimer(static_cast(msecs), static_cast(typeVal)); - *outptr_QDeadlineTimer = ret; +QDeadlineTimer* QDeadlineTimer_new7(long long msecs, int typeVal) { + return new QDeadlineTimer(static_cast(msecs), static_cast(typeVal)); } void QDeadlineTimer_Swap(QDeadlineTimer* self, QDeadlineTimer* other) { diff --git a/qt6/gen_qdeadlinetimer.go b/qt6/gen_qdeadlinetimer.go index 04c2293c..a65e604d 100644 --- a/qt6/gen_qdeadlinetimer.go +++ b/qt6/gen_qdeadlinetimer.go @@ -43,84 +43,67 @@ func newQDeadlineTimer(h *C.QDeadlineTimer) *QDeadlineTimer { if h == nil { return nil } + return &QDeadlineTimer{h: h} } // UnsafeNewQDeadlineTimer constructs the type using only unsafe pointers. func UnsafeNewQDeadlineTimer(h unsafe.Pointer) *QDeadlineTimer { - if h == nil { - return nil - } - - return &QDeadlineTimer{h: (*C.QDeadlineTimer)(h)} + return newQDeadlineTimer((*C.QDeadlineTimer)(h)) } // NewQDeadlineTimer constructs a new QDeadlineTimer object. func NewQDeadlineTimer() *QDeadlineTimer { - var outptr_QDeadlineTimer *C.QDeadlineTimer = nil - C.QDeadlineTimer_new(&outptr_QDeadlineTimer) - ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret := newQDeadlineTimer(C.QDeadlineTimer_new()) ret.isSubclass = true return ret } // NewQDeadlineTimer2 constructs a new QDeadlineTimer object. func NewQDeadlineTimer2(param1 QDeadlineTimer__ForeverConstant) *QDeadlineTimer { - var outptr_QDeadlineTimer *C.QDeadlineTimer = nil - C.QDeadlineTimer_new2((C.int)(param1), &outptr_QDeadlineTimer) - ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret := newQDeadlineTimer(C.QDeadlineTimer_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQDeadlineTimer3 constructs a new QDeadlineTimer object. func NewQDeadlineTimer3(msecs int64) *QDeadlineTimer { - var outptr_QDeadlineTimer *C.QDeadlineTimer = nil - C.QDeadlineTimer_new3((C.longlong)(msecs), &outptr_QDeadlineTimer) - ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret := newQDeadlineTimer(C.QDeadlineTimer_new3((C.longlong)(msecs))) ret.isSubclass = true return ret } // NewQDeadlineTimer4 constructs a new QDeadlineTimer object. func NewQDeadlineTimer4(param1 *QDeadlineTimer) *QDeadlineTimer { - var outptr_QDeadlineTimer *C.QDeadlineTimer = nil - C.QDeadlineTimer_new4(param1.cPointer(), &outptr_QDeadlineTimer) - ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret := newQDeadlineTimer(C.QDeadlineTimer_new4(param1.cPointer())) ret.isSubclass = true return ret } // NewQDeadlineTimer5 constructs a new QDeadlineTimer object. func NewQDeadlineTimer5(type_ TimerType) *QDeadlineTimer { - var outptr_QDeadlineTimer *C.QDeadlineTimer = nil - C.QDeadlineTimer_new5((C.int)(type_), &outptr_QDeadlineTimer) - ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret := newQDeadlineTimer(C.QDeadlineTimer_new5((C.int)(type_))) ret.isSubclass = true return ret } // NewQDeadlineTimer6 constructs a new QDeadlineTimer object. func NewQDeadlineTimer6(param1 QDeadlineTimer__ForeverConstant, type_ TimerType) *QDeadlineTimer { - var outptr_QDeadlineTimer *C.QDeadlineTimer = nil - C.QDeadlineTimer_new6((C.int)(param1), (C.int)(type_), &outptr_QDeadlineTimer) - ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret := newQDeadlineTimer(C.QDeadlineTimer_new6((C.int)(param1), (C.int)(type_))) ret.isSubclass = true return ret } // NewQDeadlineTimer7 constructs a new QDeadlineTimer object. func NewQDeadlineTimer7(msecs int64, typeVal TimerType) *QDeadlineTimer { - var outptr_QDeadlineTimer *C.QDeadlineTimer = nil - C.QDeadlineTimer_new7((C.longlong)(msecs), (C.int)(typeVal), &outptr_QDeadlineTimer) - ret := newQDeadlineTimer(outptr_QDeadlineTimer) + ret := newQDeadlineTimer(C.QDeadlineTimer_new7((C.longlong)(msecs), (C.int)(typeVal))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qdeadlinetimer.h b/qt6/gen_qdeadlinetimer.h index d8e28ab3..8178c4fc 100644 --- a/qt6/gen_qdeadlinetimer.h +++ b/qt6/gen_qdeadlinetimer.h @@ -20,13 +20,13 @@ class QDeadlineTimer; typedef struct QDeadlineTimer QDeadlineTimer; #endif -void QDeadlineTimer_new(QDeadlineTimer** outptr_QDeadlineTimer); -void QDeadlineTimer_new2(int param1, QDeadlineTimer** outptr_QDeadlineTimer); -void QDeadlineTimer_new3(long long msecs, QDeadlineTimer** outptr_QDeadlineTimer); -void QDeadlineTimer_new4(QDeadlineTimer* param1, QDeadlineTimer** outptr_QDeadlineTimer); -void QDeadlineTimer_new5(int type_, QDeadlineTimer** outptr_QDeadlineTimer); -void QDeadlineTimer_new6(int param1, int type_, QDeadlineTimer** outptr_QDeadlineTimer); -void QDeadlineTimer_new7(long long msecs, int typeVal, QDeadlineTimer** outptr_QDeadlineTimer); +QDeadlineTimer* QDeadlineTimer_new(); +QDeadlineTimer* QDeadlineTimer_new2(int param1); +QDeadlineTimer* QDeadlineTimer_new3(long long msecs); +QDeadlineTimer* QDeadlineTimer_new4(QDeadlineTimer* param1); +QDeadlineTimer* QDeadlineTimer_new5(int type_); +QDeadlineTimer* QDeadlineTimer_new6(int param1, int type_); +QDeadlineTimer* QDeadlineTimer_new7(long long msecs, int typeVal); void QDeadlineTimer_Swap(QDeadlineTimer* self, QDeadlineTimer* other); bool QDeadlineTimer_IsForever(const QDeadlineTimer* self); bool QDeadlineTimer_HasExpired(const QDeadlineTimer* self); diff --git a/qt6/gen_qdebug.cpp b/qt6/gen_qdebug.cpp index 6d8ac25d..4f3f697c 100644 --- a/qt6/gen_qdebug.cpp +++ b/qt6/gen_qdebug.cpp @@ -13,16 +13,16 @@ #include "gen_qdebug.h" #include "_cgo_export.h" -void QDebug_new(QIODevice* device, QDebug** outptr_QDebug, QIODeviceBase** outptr_QIODeviceBase) { - QDebug* ret = new QDebug(device); - *outptr_QDebug = ret; - *outptr_QIODeviceBase = static_cast(ret); +QDebug* QDebug_new(QIODevice* device) { + return new QDebug(device); } -void QDebug_new2(QDebug* o, QDebug** outptr_QDebug, QIODeviceBase** outptr_QIODeviceBase) { - QDebug* ret = new QDebug(*o); - *outptr_QDebug = ret; - *outptr_QIODeviceBase = static_cast(ret); +QDebug* QDebug_new2(QDebug* o) { + return new QDebug(*o); +} + +void QDebug_virtbase(QDebug* src, QIODeviceBase** outptr_QIODeviceBase) { + *outptr_QIODeviceBase = static_cast(src); } void QDebug_OperatorAssign(QDebug* self, QDebug* other) { @@ -221,9 +221,8 @@ void QDebug_Delete(QDebug* self, bool isSubclass) { } } -void QDebugStateSaver_new(QDebug* dbg, QDebugStateSaver** outptr_QDebugStateSaver) { - QDebugStateSaver* ret = new QDebugStateSaver(*dbg); - *outptr_QDebugStateSaver = ret; +QDebugStateSaver* QDebugStateSaver_new(QDebug* dbg) { + return new QDebugStateSaver(*dbg); } void QDebugStateSaver_Delete(QDebugStateSaver* self, bool isSubclass) { diff --git a/qt6/gen_qdebug.go b/qt6/gen_qdebug.go index d30ee771..8f08cdd4 100644 --- a/qt6/gen_qdebug.go +++ b/qt6/gen_qdebug.go @@ -42,42 +42,34 @@ func (this *QDebug) UnsafePointer() unsafe.Pointer { } // newQDebug constructs the type using only CGO pointers. -func newQDebug(h *C.QDebug, h_QIODeviceBase *C.QIODeviceBase) *QDebug { +func newQDebug(h *C.QDebug) *QDebug { if h == nil { return nil } + var outptr_QIODeviceBase *C.QIODeviceBase = nil + C.QDebug_virtbase(h, &outptr_QIODeviceBase) + return &QDebug{h: h, - QIODeviceBase: newQIODeviceBase(h_QIODeviceBase)} + QIODeviceBase: newQIODeviceBase(outptr_QIODeviceBase)} } // UnsafeNewQDebug constructs the type using only unsafe pointers. -func UnsafeNewQDebug(h unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QDebug { - if h == nil { - return nil - } - - return &QDebug{h: (*C.QDebug)(h), - QIODeviceBase: UnsafeNewQIODeviceBase(h_QIODeviceBase)} +func UnsafeNewQDebug(h unsafe.Pointer) *QDebug { + return newQDebug((*C.QDebug)(h)) } // NewQDebug constructs a new QDebug object. func NewQDebug(device *QIODevice) *QDebug { - var outptr_QDebug *C.QDebug = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QDebug_new(device.cPointer(), &outptr_QDebug, &outptr_QIODeviceBase) - ret := newQDebug(outptr_QDebug, outptr_QIODeviceBase) + ret := newQDebug(C.QDebug_new(device.cPointer())) ret.isSubclass = true return ret } // NewQDebug2 constructs a new QDebug object. func NewQDebug2(o *QDebug) *QDebug { - var outptr_QDebug *C.QDebug = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QDebug_new2(o.cPointer(), &outptr_QDebug, &outptr_QIODeviceBase) - ret := newQDebug(outptr_QDebug, outptr_QIODeviceBase) + ret := newQDebug(C.QDebug_new2(o.cPointer())) ret.isSubclass = true return ret } @@ -91,23 +83,23 @@ func (this *QDebug) Swap(other *QDebug) { } func (this *QDebug) ResetFormat() *QDebug { - return newQDebug(C.QDebug_ResetFormat(this.h), nil) + return newQDebug(C.QDebug_ResetFormat(this.h)) } func (this *QDebug) Space() *QDebug { - return newQDebug(C.QDebug_Space(this.h), nil) + return newQDebug(C.QDebug_Space(this.h)) } func (this *QDebug) Nospace() *QDebug { - return newQDebug(C.QDebug_Nospace(this.h), nil) + return newQDebug(C.QDebug_Nospace(this.h)) } func (this *QDebug) MaybeSpace() *QDebug { - return newQDebug(C.QDebug_MaybeSpace(this.h), nil) + return newQDebug(C.QDebug_MaybeSpace(this.h)) } func (this *QDebug) Verbosity(verbosityLevel int) *QDebug { - return newQDebug(C.QDebug_Verbosity(this.h, (C.int)(verbosityLevel)), nil) + return newQDebug(C.QDebug_Verbosity(this.h, (C.int)(verbosityLevel))) } func (this *QDebug) Verbosity2() int { @@ -127,73 +119,73 @@ func (this *QDebug) SetAutoInsertSpaces(b bool) { } func (this *QDebug) Quote() *QDebug { - return newQDebug(C.QDebug_Quote(this.h), nil) + return newQDebug(C.QDebug_Quote(this.h)) } func (this *QDebug) Noquote() *QDebug { - return newQDebug(C.QDebug_Noquote(this.h), nil) + return newQDebug(C.QDebug_Noquote(this.h)) } func (this *QDebug) MaybeQuote() *QDebug { - return newQDebug(C.QDebug_MaybeQuote(this.h), nil) + return newQDebug(C.QDebug_MaybeQuote(this.h)) } func (this *QDebug) OperatorShiftLeft(t QChar) *QDebug { - return newQDebug(C.QDebug_OperatorShiftLeft(this.h, t.cPointer()), nil) + return newQDebug(C.QDebug_OperatorShiftLeft(this.h, t.cPointer())) } func (this *QDebug) OperatorShiftLeftWithBool(t bool) *QDebug { - return newQDebug(C.QDebug_OperatorShiftLeftWithBool(this.h, (C.bool)(t)), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithBool(this.h, (C.bool)(t))) } func (this *QDebug) OperatorShiftLeftWithChar(t int8) *QDebug { - return newQDebug(C.QDebug_OperatorShiftLeftWithChar(this.h, (C.char)(t)), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithChar(this.h, (C.char)(t))) } func (this *QDebug) OperatorShiftLeftWithShort(t int16) *QDebug { - return newQDebug(C.QDebug_OperatorShiftLeftWithShort(this.h, (C.int16_t)(t)), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithShort(this.h, (C.int16_t)(t))) } func (this *QDebug) OperatorShiftLeftWithUnsignedshort(t uint16) *QDebug { - return newQDebug(C.QDebug_OperatorShiftLeftWithUnsignedshort(this.h, (C.uint16_t)(t)), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithUnsignedshort(this.h, (C.uint16_t)(t))) } func (this *QDebug) OperatorShiftLeftWithInt(t int) *QDebug { - return newQDebug(C.QDebug_OperatorShiftLeftWithInt(this.h, (C.int)(t)), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithInt(this.h, (C.int)(t))) } func (this *QDebug) OperatorShiftLeftWithUnsignedint(t uint) *QDebug { - return newQDebug(C.QDebug_OperatorShiftLeftWithUnsignedint(this.h, (C.uint)(t)), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithUnsignedint(this.h, (C.uint)(t))) } func (this *QDebug) OperatorShiftLeftWithLong(t int64) *QDebug { - return newQDebug(C.QDebug_OperatorShiftLeftWithLong(this.h, (C.long)(t)), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithLong(this.h, (C.long)(t))) } func (this *QDebug) OperatorShiftLeftWithUnsignedlong(t uint64) *QDebug { - return newQDebug(C.QDebug_OperatorShiftLeftWithUnsignedlong(this.h, (C.ulong)(t)), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithUnsignedlong(this.h, (C.ulong)(t))) } func (this *QDebug) OperatorShiftLeftWithQint64(t int64) *QDebug { - return newQDebug(C.QDebug_OperatorShiftLeftWithQint64(this.h, (C.longlong)(t)), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithQint64(this.h, (C.longlong)(t))) } func (this *QDebug) OperatorShiftLeftWithQuint64(t uint64) *QDebug { - return newQDebug(C.QDebug_OperatorShiftLeftWithQuint64(this.h, (C.ulonglong)(t)), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithQuint64(this.h, (C.ulonglong)(t))) } func (this *QDebug) OperatorShiftLeftWithFloat(t float32) *QDebug { - return newQDebug(C.QDebug_OperatorShiftLeftWithFloat(this.h, (C.float)(t)), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithFloat(this.h, (C.float)(t))) } func (this *QDebug) OperatorShiftLeftWithDouble(t float64) *QDebug { - return newQDebug(C.QDebug_OperatorShiftLeftWithDouble(this.h, (C.double)(t)), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithDouble(this.h, (C.double)(t))) } func (this *QDebug) OperatorShiftLeft2(t string) *QDebug { t_Cstring := C.CString(t) defer C.free(unsafe.Pointer(t_Cstring)) - return newQDebug(C.QDebug_OperatorShiftLeft2(this.h, t_Cstring), nil) + return newQDebug(C.QDebug_OperatorShiftLeft2(this.h, t_Cstring)) } func (this *QDebug) OperatorShiftLeftWithQString(t string) *QDebug { @@ -201,26 +193,26 @@ func (this *QDebug) OperatorShiftLeftWithQString(t string) *QDebug { t_ms.data = C.CString(t) t_ms.len = C.size_t(len(t)) defer C.free(unsafe.Pointer(t_ms.data)) - return newQDebug(C.QDebug_OperatorShiftLeftWithQString(this.h, t_ms), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithQString(this.h, t_ms)) } func (this *QDebug) OperatorShiftLeftWithQByteArray(t []byte) *QDebug { t_alias := C.struct_miqt_string{} t_alias.data = (*C.char)(unsafe.Pointer(&t[0])) t_alias.len = C.size_t(len(t)) - return newQDebug(C.QDebug_OperatorShiftLeftWithQByteArray(this.h, t_alias), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithQByteArray(this.h, t_alias)) } func (this *QDebug) OperatorShiftLeftWithQByteArrayView(t QByteArrayView) *QDebug { - return newQDebug(C.QDebug_OperatorShiftLeftWithQByteArrayView(this.h, t.cPointer()), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithQByteArrayView(this.h, t.cPointer())) } func (this *QDebug) OperatorShiftLeftWithVoid(t unsafe.Pointer) *QDebug { - return newQDebug(C.QDebug_OperatorShiftLeftWithVoid(this.h, t), nil) + return newQDebug(C.QDebug_OperatorShiftLeftWithVoid(this.h, t)) } func (this *QDebug) MaybeQuote1(c int8) *QDebug { - return newQDebug(C.QDebug_MaybeQuote1(this.h, (C.char)(c)), nil) + return newQDebug(C.QDebug_MaybeQuote1(this.h, (C.char)(c))) } // Delete this object from C++ memory. @@ -261,24 +253,19 @@ func newQDebugStateSaver(h *C.QDebugStateSaver) *QDebugStateSaver { if h == nil { return nil } + return &QDebugStateSaver{h: h} } // UnsafeNewQDebugStateSaver constructs the type using only unsafe pointers. func UnsafeNewQDebugStateSaver(h unsafe.Pointer) *QDebugStateSaver { - if h == nil { - return nil - } - - return &QDebugStateSaver{h: (*C.QDebugStateSaver)(h)} + return newQDebugStateSaver((*C.QDebugStateSaver)(h)) } // NewQDebugStateSaver constructs a new QDebugStateSaver object. func NewQDebugStateSaver(dbg *QDebug) *QDebugStateSaver { - var outptr_QDebugStateSaver *C.QDebugStateSaver = nil - C.QDebugStateSaver_new(dbg.cPointer(), &outptr_QDebugStateSaver) - ret := newQDebugStateSaver(outptr_QDebugStateSaver) + ret := newQDebugStateSaver(C.QDebugStateSaver_new(dbg.cPointer())) ret.isSubclass = true return ret } @@ -321,16 +308,13 @@ func newQNoDebug(h *C.QNoDebug) *QNoDebug { if h == nil { return nil } + return &QNoDebug{h: h} } // UnsafeNewQNoDebug constructs the type using only unsafe pointers. func UnsafeNewQNoDebug(h unsafe.Pointer) *QNoDebug { - if h == nil { - return nil - } - - return &QNoDebug{h: (*C.QNoDebug)(h)} + return newQNoDebug((*C.QNoDebug)(h)) } func (this *QNoDebug) Space() *QNoDebug { diff --git a/qt6/gen_qdebug.h b/qt6/gen_qdebug.h index b27b21de..2947ab57 100644 --- a/qt6/gen_qdebug.h +++ b/qt6/gen_qdebug.h @@ -32,8 +32,9 @@ typedef struct QIODeviceBase QIODeviceBase; typedef struct QNoDebug QNoDebug; #endif -void QDebug_new(QIODevice* device, QDebug** outptr_QDebug, QIODeviceBase** outptr_QIODeviceBase); -void QDebug_new2(QDebug* o, QDebug** outptr_QDebug, QIODeviceBase** outptr_QIODeviceBase); +QDebug* QDebug_new(QIODevice* device); +QDebug* QDebug_new2(QDebug* o); +void QDebug_virtbase(QDebug* src, QIODeviceBase** outptr_QIODeviceBase); void QDebug_OperatorAssign(QDebug* self, QDebug* other); void QDebug_Swap(QDebug* self, QDebug* other); QDebug* QDebug_ResetFormat(QDebug* self); @@ -69,7 +70,7 @@ QDebug* QDebug_OperatorShiftLeftWithVoid(QDebug* self, const void* t); QDebug* QDebug_MaybeQuote1(QDebug* self, char c); void QDebug_Delete(QDebug* self, bool isSubclass); -void QDebugStateSaver_new(QDebug* dbg, QDebugStateSaver** outptr_QDebugStateSaver); +QDebugStateSaver* QDebugStateSaver_new(QDebug* dbg); void QDebugStateSaver_Delete(QDebugStateSaver* self, bool isSubclass); QNoDebug* QNoDebug_Space(QNoDebug* self); diff --git a/qt6/gen_qdesktopservices.go b/qt6/gen_qdesktopservices.go index 7d42a467..df8276c6 100644 --- a/qt6/gen_qdesktopservices.go +++ b/qt6/gen_qdesktopservices.go @@ -37,16 +37,13 @@ func newQDesktopServices(h *C.QDesktopServices) *QDesktopServices { if h == nil { return nil } + return &QDesktopServices{h: h} } // UnsafeNewQDesktopServices constructs the type using only unsafe pointers. func UnsafeNewQDesktopServices(h unsafe.Pointer) *QDesktopServices { - if h == nil { - return nil - } - - return &QDesktopServices{h: (*C.QDesktopServices)(h)} + return newQDesktopServices((*C.QDesktopServices)(h)) } func QDesktopServices_OpenUrl(url *QUrl) bool { diff --git a/qt6/gen_qdial.cpp b/qt6/gen_qdial.cpp index ffafee95..91646966 100644 --- a/qt6/gen_qdial.cpp +++ b/qt6/gen_qdial.cpp @@ -362,22 +362,16 @@ public: }; -void QDial_new(QWidget* parent, QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDial* ret = new MiqtVirtualQDial(parent); - *outptr_QDial = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDial* QDial_new(QWidget* parent) { + return new MiqtVirtualQDial(parent); } -void QDial_new2(QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDial* ret = new MiqtVirtualQDial(); - *outptr_QDial = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDial* QDial_new2() { + return new MiqtVirtualQDial(); +} + +void QDial_virtbase(QDial* src, QAbstractSlider** outptr_QAbstractSlider) { + *outptr_QAbstractSlider = static_cast(src); } QMetaObject* QDial_MetaObject(const QDial* self) { diff --git a/qt6/gen_qdial.go b/qt6/gen_qdial.go index 48cba4d4..e5d723f5 100644 --- a/qt6/gen_qdial.go +++ b/qt6/gen_qdial.go @@ -35,48 +35,34 @@ func (this *QDial) UnsafePointer() unsafe.Pointer { } // newQDial constructs the type using only CGO pointers. -func newQDial(h *C.QDial, h_QAbstractSlider *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDial { +func newQDial(h *C.QDial) *QDial { if h == nil { return nil } + var outptr_QAbstractSlider *C.QAbstractSlider = nil + C.QDial_virtbase(h, &outptr_QAbstractSlider) + return &QDial{h: h, - QAbstractSlider: newQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractSlider: newQAbstractSlider(outptr_QAbstractSlider)} } // UnsafeNewQDial constructs the type using only unsafe pointers. -func UnsafeNewQDial(h unsafe.Pointer, h_QAbstractSlider unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDial { - if h == nil { - return nil - } - - return &QDial{h: (*C.QDial)(h), - QAbstractSlider: UnsafeNewQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQDial(h unsafe.Pointer) *QDial { + return newQDial((*C.QDial)(h)) } // NewQDial constructs a new QDial object. func NewQDial(parent *QWidget) *QDial { - var outptr_QDial *C.QDial = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDial_new(parent.cPointer(), &outptr_QDial, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDial(outptr_QDial, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDial(C.QDial_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQDial2 constructs a new QDial object. func NewQDial2() *QDial { - var outptr_QDial *C.QDial = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDial_new2(&outptr_QDial, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDial(outptr_QDial, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDial(C.QDial_new2()) ret.isSubclass = true return ret } @@ -264,7 +250,7 @@ func miqt_exec_callback_QDial_ResizeEvent(self *C.QDial, cb C.intptr_t, re *C.QR } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(re, nil) + slotval1 := newQResizeEvent(re) gofunc((&QDial{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -290,7 +276,7 @@ func miqt_exec_callback_QDial_PaintEvent(self *C.QDial, cb C.intptr_t, pe *C.QPa } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(pe, nil) + slotval1 := newQPaintEvent(pe) gofunc((&QDial{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -316,7 +302,7 @@ func miqt_exec_callback_QDial_MousePressEvent(self *C.QDial, cb C.intptr_t, me * } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(me, nil, nil, nil, nil) + slotval1 := newQMouseEvent(me) gofunc((&QDial{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -342,7 +328,7 @@ func miqt_exec_callback_QDial_MouseReleaseEvent(self *C.QDial, cb C.intptr_t, me } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(me, nil, nil, nil, nil) + slotval1 := newQMouseEvent(me) gofunc((&QDial{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -368,7 +354,7 @@ func miqt_exec_callback_QDial_MouseMoveEvent(self *C.QDial, cb C.intptr_t, me *C } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(me, nil, nil, nil, nil) + slotval1 := newQMouseEvent(me) gofunc((&QDial{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -420,7 +406,7 @@ func miqt_exec_callback_QDial_InitStyleOption(self *C.QDial, cb C.intptr_t, opti } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionSlider(option, nil, nil) + slotval1 := newQStyleOptionSlider(option) gofunc((&QDial{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -446,7 +432,7 @@ func miqt_exec_callback_QDial_KeyPressEvent(self *C.QDial, cb C.intptr_t, ev *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(ev, nil, nil) + slotval1 := newQKeyEvent(ev) gofunc((&QDial{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -472,7 +458,7 @@ func miqt_exec_callback_QDial_TimerEvent(self *C.QDial, cb C.intptr_t, param1 *C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QDial{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -498,7 +484,7 @@ func miqt_exec_callback_QDial_WheelEvent(self *C.QDial, cb C.intptr_t, e *C.QWhe } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QDial{h: self}).callVirtualBase_WheelEvent, slotval1) diff --git a/qt6/gen_qdial.h b/qt6/gen_qdial.h index 0d912171..a2fc98c2 100644 --- a/qt6/gen_qdial.h +++ b/qt6/gen_qdial.h @@ -48,8 +48,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QDial_new(QWidget* parent, QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDial_new2(QDial** outptr_QDial, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QDial* QDial_new(QWidget* parent); +QDial* QDial_new2(); +void QDial_virtbase(QDial* src, QAbstractSlider** outptr_QAbstractSlider); QMetaObject* QDial_MetaObject(const QDial* self); void* QDial_Metacast(QDial* self, const char* param1); struct miqt_string QDial_Tr(const char* s); diff --git a/qt6/gen_qdialog.cpp b/qt6/gen_qdialog.cpp index 82bc789a..47a5de57 100644 --- a/qt6/gen_qdialog.cpp +++ b/qt6/gen_qdialog.cpp @@ -1162,28 +1162,20 @@ public: }; -void QDialog_new(QWidget* parent, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialog* ret = new MiqtVirtualQDialog(parent); - *outptr_QDialog = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialog* QDialog_new(QWidget* parent) { + return new MiqtVirtualQDialog(parent); } -void QDialog_new2(QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialog* ret = new MiqtVirtualQDialog(); - *outptr_QDialog = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialog* QDialog_new2() { + return new MiqtVirtualQDialog(); } -void QDialog_new3(QWidget* parent, int f, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialog* ret = new MiqtVirtualQDialog(parent, static_cast(f)); - *outptr_QDialog = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialog* QDialog_new3(QWidget* parent, int f) { + return new MiqtVirtualQDialog(parent, static_cast(f)); +} + +void QDialog_virtbase(QDialog* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QDialog_MetaObject(const QDialog* self) { diff --git a/qt6/gen_qdialog.go b/qt6/gen_qdialog.go index eb4b8271..cda343e8 100644 --- a/qt6/gen_qdialog.go +++ b/qt6/gen_qdialog.go @@ -42,59 +42,42 @@ func (this *QDialog) UnsafePointer() unsafe.Pointer { } // newQDialog constructs the type using only CGO pointers. -func newQDialog(h *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDialog { +func newQDialog(h *C.QDialog) *QDialog { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QDialog_virtbase(h, &outptr_QWidget) + return &QDialog{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQDialog constructs the type using only unsafe pointers. -func UnsafeNewQDialog(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDialog { - if h == nil { - return nil - } - - return &QDialog{h: (*C.QDialog)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQDialog(h unsafe.Pointer) *QDialog { + return newQDialog((*C.QDialog)(h)) } // NewQDialog constructs a new QDialog object. func NewQDialog(parent *QWidget) *QDialog { - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialog_new(parent.cPointer(), &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialog(outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialog(C.QDialog_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQDialog2 constructs a new QDialog object. func NewQDialog2() *QDialog { - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialog_new2(&outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialog(outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialog(C.QDialog_new2()) ret.isSubclass = true return ret } // NewQDialog3 constructs a new QDialog object. func NewQDialog3(parent *QWidget, f WindowType) *QDialog { - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialog_new3(parent.cPointer(), (C.int)(f), &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialog(outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialog(C.QDialog_new3(parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -470,7 +453,7 @@ func miqt_exec_callback_QDialog_KeyPressEvent(self *C.QDialog, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -496,7 +479,7 @@ func miqt_exec_callback_QDialog_CloseEvent(self *C.QDialog, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(param1, nil) + slotval1 := newQCloseEvent(param1) gofunc((&QDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -522,7 +505,7 @@ func miqt_exec_callback_QDialog_ShowEvent(self *C.QDialog, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -548,7 +531,7 @@ func miqt_exec_callback_QDialog_ResizeEvent(self *C.QDialog, cb C.intptr_t, para } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -574,7 +557,7 @@ func miqt_exec_callback_QDialog_ContextMenuEvent(self *C.QDialog, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -761,7 +744,7 @@ func miqt_exec_callback_QDialog_MousePressEvent(self *C.QDialog, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -787,7 +770,7 @@ func miqt_exec_callback_QDialog_MouseReleaseEvent(self *C.QDialog, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -813,7 +796,7 @@ func miqt_exec_callback_QDialog_MouseDoubleClickEvent(self *C.QDialog, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -839,7 +822,7 @@ func miqt_exec_callback_QDialog_MouseMoveEvent(self *C.QDialog, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -865,7 +848,7 @@ func miqt_exec_callback_QDialog_WheelEvent(self *C.QDialog, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -891,7 +874,7 @@ func miqt_exec_callback_QDialog_KeyReleaseEvent(self *C.QDialog, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -917,7 +900,7 @@ func miqt_exec_callback_QDialog_FocusInEvent(self *C.QDialog, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -943,7 +926,7 @@ func miqt_exec_callback_QDialog_FocusOutEvent(self *C.QDialog, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -969,7 +952,7 @@ func miqt_exec_callback_QDialog_EnterEvent(self *C.QDialog, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -1021,7 +1004,7 @@ func miqt_exec_callback_QDialog_PaintEvent(self *C.QDialog, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1047,7 +1030,7 @@ func miqt_exec_callback_QDialog_MoveEvent(self *C.QDialog, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1073,7 +1056,7 @@ func miqt_exec_callback_QDialog_TabletEvent(self *C.QDialog, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1099,7 +1082,7 @@ func miqt_exec_callback_QDialog_ActionEvent(self *C.QDialog, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1125,7 +1108,7 @@ func miqt_exec_callback_QDialog_DragEnterEvent(self *C.QDialog, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1151,7 +1134,7 @@ func miqt_exec_callback_QDialog_DragMoveEvent(self *C.QDialog, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1177,7 +1160,7 @@ func miqt_exec_callback_QDialog_DragLeaveEvent(self *C.QDialog, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1203,7 +1186,7 @@ func miqt_exec_callback_QDialog_DropEvent(self *C.QDialog, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1229,7 +1212,7 @@ func miqt_exec_callback_QDialog_HideEvent(self *C.QDialog, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QDialog{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1425,7 +1408,7 @@ func miqt_exec_callback_QDialog_InputMethodEvent(self *C.QDialog, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QDialog{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qdialog.h b/qt6/gen_qdialog.h index dadd9909..4446b57a 100644 --- a/qt6/gen_qdialog.h +++ b/qt6/gen_qdialog.h @@ -78,9 +78,10 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QDialog_new(QWidget* parent, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialog_new2(QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialog_new3(QWidget* parent, int f, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QDialog* QDialog_new(QWidget* parent); +QDialog* QDialog_new2(); +QDialog* QDialog_new3(QWidget* parent, int f); +void QDialog_virtbase(QDialog* src, QWidget** outptr_QWidget); QMetaObject* QDialog_MetaObject(const QDialog* self); void* QDialog_Metacast(QDialog* self, const char* param1); struct miqt_string QDialog_Tr(const char* s); diff --git a/qt6/gen_qdialogbuttonbox.cpp b/qt6/gen_qdialogbuttonbox.cpp index 74a44c41..ef941b8f 100644 --- a/qt6/gen_qdialogbuttonbox.cpp +++ b/qt6/gen_qdialogbuttonbox.cpp @@ -1031,68 +1031,40 @@ public: }; -void QDialogButtonBox_new(QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(parent); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new(QWidget* parent) { + return new MiqtVirtualQDialogButtonBox(parent); } -void QDialogButtonBox_new2(QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new2() { + return new MiqtVirtualQDialogButtonBox(); } -void QDialogButtonBox_new3(int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(orientation)); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new3(int orientation) { + return new MiqtVirtualQDialogButtonBox(static_cast(orientation)); } -void QDialogButtonBox_new4(int buttons, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons)); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new4(int buttons) { + return new MiqtVirtualQDialogButtonBox(static_cast(buttons)); } -void QDialogButtonBox_new5(int buttons, int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons), static_cast(orientation)); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new5(int buttons, int orientation) { + return new MiqtVirtualQDialogButtonBox(static_cast(buttons), static_cast(orientation)); } -void QDialogButtonBox_new6(int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(orientation), parent); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new6(int orientation, QWidget* parent) { + return new MiqtVirtualQDialogButtonBox(static_cast(orientation), parent); } -void QDialogButtonBox_new7(int buttons, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons), parent); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new7(int buttons, QWidget* parent) { + return new MiqtVirtualQDialogButtonBox(static_cast(buttons), parent); } -void QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDialogButtonBox* ret = new MiqtVirtualQDialogButtonBox(static_cast(buttons), static_cast(orientation), parent); - *outptr_QDialogButtonBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDialogButtonBox* QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent) { + return new MiqtVirtualQDialogButtonBox(static_cast(buttons), static_cast(orientation), parent); +} + +void QDialogButtonBox_virtbase(QDialogButtonBox* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QDialogButtonBox_MetaObject(const QDialogButtonBox* self) { diff --git a/qt6/gen_qdialogbuttonbox.go b/qt6/gen_qdialogbuttonbox.go index bd3c6871..a24758f9 100644 --- a/qt6/gen_qdialogbuttonbox.go +++ b/qt6/gen_qdialogbuttonbox.go @@ -87,124 +87,82 @@ func (this *QDialogButtonBox) UnsafePointer() unsafe.Pointer { } // newQDialogButtonBox constructs the type using only CGO pointers. -func newQDialogButtonBox(h *C.QDialogButtonBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDialogButtonBox { +func newQDialogButtonBox(h *C.QDialogButtonBox) *QDialogButtonBox { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QDialogButtonBox_virtbase(h, &outptr_QWidget) + return &QDialogButtonBox{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQDialogButtonBox constructs the type using only unsafe pointers. -func UnsafeNewQDialogButtonBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDialogButtonBox { - if h == nil { - return nil - } - - return &QDialogButtonBox{h: (*C.QDialogButtonBox)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQDialogButtonBox(h unsafe.Pointer) *QDialogButtonBox { + return newQDialogButtonBox((*C.QDialogButtonBox)(h)) } // NewQDialogButtonBox constructs a new QDialogButtonBox object. func NewQDialogButtonBox(parent *QWidget) *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new(parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQDialogButtonBox2 constructs a new QDialogButtonBox object. func NewQDialogButtonBox2() *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new2(&outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new2()) ret.isSubclass = true return ret } // NewQDialogButtonBox3 constructs a new QDialogButtonBox object. func NewQDialogButtonBox3(orientation Orientation) *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new3((C.int)(orientation), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new3((C.int)(orientation))) ret.isSubclass = true return ret } // NewQDialogButtonBox4 constructs a new QDialogButtonBox object. func NewQDialogButtonBox4(buttons QDialogButtonBox__StandardButton) *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new4((C.int)(buttons), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new4((C.int)(buttons))) ret.isSubclass = true return ret } // NewQDialogButtonBox5 constructs a new QDialogButtonBox object. func NewQDialogButtonBox5(buttons QDialogButtonBox__StandardButton, orientation Orientation) *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new5((C.int)(buttons), (C.int)(orientation), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new5((C.int)(buttons), (C.int)(orientation))) ret.isSubclass = true return ret } // NewQDialogButtonBox6 constructs a new QDialogButtonBox object. func NewQDialogButtonBox6(orientation Orientation, parent *QWidget) *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new6((C.int)(orientation), parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new6((C.int)(orientation), parent.cPointer())) ret.isSubclass = true return ret } // NewQDialogButtonBox7 constructs a new QDialogButtonBox object. func NewQDialogButtonBox7(buttons QDialogButtonBox__StandardButton, parent *QWidget) *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new7((C.int)(buttons), parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new7((C.int)(buttons), parent.cPointer())) ret.isSubclass = true return ret } // NewQDialogButtonBox8 constructs a new QDialogButtonBox object. func NewQDialogButtonBox8(buttons QDialogButtonBox__StandardButton, orientation Orientation, parent *QWidget) *QDialogButtonBox { - var outptr_QDialogButtonBox *C.QDialogButtonBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDialogButtonBox_new8((C.int)(buttons), (C.int)(orientation), parent.cPointer(), &outptr_QDialogButtonBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDialogButtonBox(outptr_QDialogButtonBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDialogButtonBox(C.QDialogButtonBox_new8((C.int)(buttons), (C.int)(orientation), parent.cPointer())) ret.isSubclass = true return ret } @@ -245,11 +203,11 @@ func (this *QDialogButtonBox) AddButton2(text string, role QDialogButtonBox__But text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQPushButton(C.QDialogButtonBox_AddButton2(this.h, text_ms, (C.int)(role)), nil, nil, nil, nil) + return newQPushButton(C.QDialogButtonBox_AddButton2(this.h, text_ms, (C.int)(role))) } func (this *QDialogButtonBox) AddButtonWithButton(button QDialogButtonBox__StandardButton) *QPushButton { - return newQPushButton(C.QDialogButtonBox_AddButtonWithButton(this.h, (C.int)(button)), nil, nil, nil, nil) + return newQPushButton(C.QDialogButtonBox_AddButtonWithButton(this.h, (C.int)(button))) } func (this *QDialogButtonBox) RemoveButton(button *QAbstractButton) { @@ -265,7 +223,7 @@ func (this *QDialogButtonBox) Buttons() []*QAbstractButton { _ret := make([]*QAbstractButton, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractButton)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAbstractButton(_outCast[i], nil, nil, nil) + _ret[i] = newQAbstractButton(_outCast[i]) } return _ret } @@ -287,7 +245,7 @@ func (this *QDialogButtonBox) StandardButton(button *QAbstractButton) QDialogBut } func (this *QDialogButtonBox) Button(which QDialogButtonBox__StandardButton) *QPushButton { - return newQPushButton(C.QDialogButtonBox_Button(this.h, (C.int)(which)), nil, nil, nil, nil) + return newQPushButton(C.QDialogButtonBox_Button(this.h, (C.int)(which))) } func (this *QDialogButtonBox) SetCenterButtons(center bool) { @@ -313,7 +271,7 @@ func miqt_exec_callback_QDialogButtonBox_Clicked(cb C.intptr_t, button *C.QAbstr } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractButton(button, nil, nil, nil) + slotval1 := newQAbstractButton(button) gofunc(slotval1) } @@ -648,7 +606,7 @@ func miqt_exec_callback_QDialogButtonBox_MousePressEvent(self *C.QDialogButtonBo } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -674,7 +632,7 @@ func miqt_exec_callback_QDialogButtonBox_MouseReleaseEvent(self *C.QDialogButton } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -700,7 +658,7 @@ func miqt_exec_callback_QDialogButtonBox_MouseDoubleClickEvent(self *C.QDialogBu } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -726,7 +684,7 @@ func miqt_exec_callback_QDialogButtonBox_MouseMoveEvent(self *C.QDialogButtonBox } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -752,7 +710,7 @@ func miqt_exec_callback_QDialogButtonBox_WheelEvent(self *C.QDialogButtonBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -778,7 +736,7 @@ func miqt_exec_callback_QDialogButtonBox_KeyPressEvent(self *C.QDialogButtonBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -804,7 +762,7 @@ func miqt_exec_callback_QDialogButtonBox_KeyReleaseEvent(self *C.QDialogButtonBo } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -830,7 +788,7 @@ func miqt_exec_callback_QDialogButtonBox_FocusInEvent(self *C.QDialogButtonBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -856,7 +814,7 @@ func miqt_exec_callback_QDialogButtonBox_FocusOutEvent(self *C.QDialogButtonBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -882,7 +840,7 @@ func miqt_exec_callback_QDialogButtonBox_EnterEvent(self *C.QDialogButtonBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -934,7 +892,7 @@ func miqt_exec_callback_QDialogButtonBox_PaintEvent(self *C.QDialogButtonBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -960,7 +918,7 @@ func miqt_exec_callback_QDialogButtonBox_MoveEvent(self *C.QDialogButtonBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -986,7 +944,7 @@ func miqt_exec_callback_QDialogButtonBox_ResizeEvent(self *C.QDialogButtonBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1012,7 +970,7 @@ func miqt_exec_callback_QDialogButtonBox_CloseEvent(self *C.QDialogButtonBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1038,7 +996,7 @@ func miqt_exec_callback_QDialogButtonBox_ContextMenuEvent(self *C.QDialogButtonB } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1064,7 +1022,7 @@ func miqt_exec_callback_QDialogButtonBox_TabletEvent(self *C.QDialogButtonBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1090,7 +1048,7 @@ func miqt_exec_callback_QDialogButtonBox_ActionEvent(self *C.QDialogButtonBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1116,7 +1074,7 @@ func miqt_exec_callback_QDialogButtonBox_DragEnterEvent(self *C.QDialogButtonBox } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1142,7 +1100,7 @@ func miqt_exec_callback_QDialogButtonBox_DragMoveEvent(self *C.QDialogButtonBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1168,7 +1126,7 @@ func miqt_exec_callback_QDialogButtonBox_DragLeaveEvent(self *C.QDialogButtonBox } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1194,7 +1152,7 @@ func miqt_exec_callback_QDialogButtonBox_DropEvent(self *C.QDialogButtonBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1220,7 +1178,7 @@ func miqt_exec_callback_QDialogButtonBox_ShowEvent(self *C.QDialogButtonBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1246,7 +1204,7 @@ func miqt_exec_callback_QDialogButtonBox_HideEvent(self *C.QDialogButtonBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1416,7 +1374,7 @@ func miqt_exec_callback_QDialogButtonBox_InputMethodEvent(self *C.QDialogButtonB } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QDialogButtonBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qdialogbuttonbox.h b/qt6/gen_qdialogbuttonbox.h index d4fc2a8f..18e9ed0a 100644 --- a/qt6/gen_qdialogbuttonbox.h +++ b/qt6/gen_qdialogbuttonbox.h @@ -82,14 +82,15 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QDialogButtonBox_new(QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialogButtonBox_new2(QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialogButtonBox_new3(int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialogButtonBox_new4(int buttons, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialogButtonBox_new5(int buttons, int orientation, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialogButtonBox_new6(int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialogButtonBox_new7(int buttons, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent, QDialogButtonBox** outptr_QDialogButtonBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QDialogButtonBox* QDialogButtonBox_new(QWidget* parent); +QDialogButtonBox* QDialogButtonBox_new2(); +QDialogButtonBox* QDialogButtonBox_new3(int orientation); +QDialogButtonBox* QDialogButtonBox_new4(int buttons); +QDialogButtonBox* QDialogButtonBox_new5(int buttons, int orientation); +QDialogButtonBox* QDialogButtonBox_new6(int orientation, QWidget* parent); +QDialogButtonBox* QDialogButtonBox_new7(int buttons, QWidget* parent); +QDialogButtonBox* QDialogButtonBox_new8(int buttons, int orientation, QWidget* parent); +void QDialogButtonBox_virtbase(QDialogButtonBox* src, QWidget** outptr_QWidget); QMetaObject* QDialogButtonBox_MetaObject(const QDialogButtonBox* self); void* QDialogButtonBox_Metacast(QDialogButtonBox* self, const char* param1); struct miqt_string QDialogButtonBox_Tr(const char* s); diff --git a/qt6/gen_qdir.cpp b/qt6/gen_qdir.cpp index 9b590a36..ce87c5d5 100644 --- a/qt6/gen_qdir.cpp +++ b/qt6/gen_qdir.cpp @@ -9,41 +9,35 @@ #include "gen_qdir.h" #include "_cgo_export.h" -void QDir_new(QDir* param1, QDir** outptr_QDir) { - QDir* ret = new QDir(*param1); - *outptr_QDir = ret; +QDir* QDir_new(QDir* param1) { + return new QDir(*param1); } -void QDir_new2(QDir** outptr_QDir) { - QDir* ret = new QDir(); - *outptr_QDir = ret; +QDir* QDir_new2() { + return new QDir(); } -void QDir_new3(struct miqt_string path, struct miqt_string nameFilter, QDir** outptr_QDir) { +QDir* QDir_new3(struct miqt_string path, struct miqt_string nameFilter) { QString path_QString = QString::fromUtf8(path.data, path.len); QString nameFilter_QString = QString::fromUtf8(nameFilter.data, nameFilter.len); - QDir* ret = new QDir(path_QString, nameFilter_QString); - *outptr_QDir = ret; + return new QDir(path_QString, nameFilter_QString); } -void QDir_new4(struct miqt_string path, QDir** outptr_QDir) { +QDir* QDir_new4(struct miqt_string path) { QString path_QString = QString::fromUtf8(path.data, path.len); - QDir* ret = new QDir(path_QString); - *outptr_QDir = ret; + return new QDir(path_QString); } -void QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort, QDir** outptr_QDir) { +QDir* QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort) { QString path_QString = QString::fromUtf8(path.data, path.len); QString nameFilter_QString = QString::fromUtf8(nameFilter.data, nameFilter.len); - QDir* ret = new QDir(path_QString, nameFilter_QString, static_cast(sort)); - *outptr_QDir = ret; + return new QDir(path_QString, nameFilter_QString, static_cast(sort)); } -void QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter, QDir** outptr_QDir) { +QDir* QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter) { QString path_QString = QString::fromUtf8(path.data, path.len); QString nameFilter_QString = QString::fromUtf8(nameFilter.data, nameFilter.len); - QDir* ret = new QDir(path_QString, nameFilter_QString, static_cast(sort), static_cast(filter)); - *outptr_QDir = ret; + return new QDir(path_QString, nameFilter_QString, static_cast(sort), static_cast(filter)); } void QDir_OperatorAssign(QDir* self, QDir* param1) { diff --git a/qt6/gen_qdir.go b/qt6/gen_qdir.go index e6242ccf..9f7fe522 100644 --- a/qt6/gen_qdir.go +++ b/qt6/gen_qdir.go @@ -79,34 +79,27 @@ func newQDir(h *C.QDir) *QDir { if h == nil { return nil } + return &QDir{h: h} } // UnsafeNewQDir constructs the type using only unsafe pointers. func UnsafeNewQDir(h unsafe.Pointer) *QDir { - if h == nil { - return nil - } - - return &QDir{h: (*C.QDir)(h)} + return newQDir((*C.QDir)(h)) } // NewQDir constructs a new QDir object. func NewQDir(param1 *QDir) *QDir { - var outptr_QDir *C.QDir = nil - C.QDir_new(param1.cPointer(), &outptr_QDir) - ret := newQDir(outptr_QDir) + ret := newQDir(C.QDir_new(param1.cPointer())) ret.isSubclass = true return ret } // NewQDir2 constructs a new QDir object. func NewQDir2() *QDir { - var outptr_QDir *C.QDir = nil - C.QDir_new2(&outptr_QDir) - ret := newQDir(outptr_QDir) + ret := newQDir(C.QDir_new2()) ret.isSubclass = true return ret } @@ -121,10 +114,8 @@ func NewQDir3(path string, nameFilter string) *QDir { nameFilter_ms.data = C.CString(nameFilter) nameFilter_ms.len = C.size_t(len(nameFilter)) defer C.free(unsafe.Pointer(nameFilter_ms.data)) - var outptr_QDir *C.QDir = nil - C.QDir_new3(path_ms, nameFilter_ms, &outptr_QDir) - ret := newQDir(outptr_QDir) + ret := newQDir(C.QDir_new3(path_ms, nameFilter_ms)) ret.isSubclass = true return ret } @@ -135,10 +126,8 @@ func NewQDir4(path string) *QDir { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - var outptr_QDir *C.QDir = nil - C.QDir_new4(path_ms, &outptr_QDir) - ret := newQDir(outptr_QDir) + ret := newQDir(C.QDir_new4(path_ms)) ret.isSubclass = true return ret } @@ -153,10 +142,8 @@ func NewQDir5(path string, nameFilter string, sort QDir__SortFlag) *QDir { nameFilter_ms.data = C.CString(nameFilter) nameFilter_ms.len = C.size_t(len(nameFilter)) defer C.free(unsafe.Pointer(nameFilter_ms.data)) - var outptr_QDir *C.QDir = nil - C.QDir_new5(path_ms, nameFilter_ms, (C.int)(sort), &outptr_QDir) - ret := newQDir(outptr_QDir) + ret := newQDir(C.QDir_new5(path_ms, nameFilter_ms, (C.int)(sort))) ret.isSubclass = true return ret } @@ -171,10 +158,8 @@ func NewQDir6(path string, nameFilter string, sort QDir__SortFlag, filter QDir__ nameFilter_ms.data = C.CString(nameFilter) nameFilter_ms.len = C.size_t(len(nameFilter)) defer C.free(unsafe.Pointer(nameFilter_ms.data)) - var outptr_QDir *C.QDir = nil - C.QDir_new6(path_ms, nameFilter_ms, (C.int)(sort), (C.int)(filter), &outptr_QDir) - ret := newQDir(outptr_QDir) + ret := newQDir(C.QDir_new6(path_ms, nameFilter_ms, (C.int)(sort), (C.int)(filter))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qdir.h b/qt6/gen_qdir.h index e90196ec..3f4b988d 100644 --- a/qt6/gen_qdir.h +++ b/qt6/gen_qdir.h @@ -24,12 +24,12 @@ typedef struct QDir QDir; typedef struct QFileInfo QFileInfo; #endif -void QDir_new(QDir* param1, QDir** outptr_QDir); -void QDir_new2(QDir** outptr_QDir); -void QDir_new3(struct miqt_string path, struct miqt_string nameFilter, QDir** outptr_QDir); -void QDir_new4(struct miqt_string path, QDir** outptr_QDir); -void QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort, QDir** outptr_QDir); -void QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter, QDir** outptr_QDir); +QDir* QDir_new(QDir* param1); +QDir* QDir_new2(); +QDir* QDir_new3(struct miqt_string path, struct miqt_string nameFilter); +QDir* QDir_new4(struct miqt_string path); +QDir* QDir_new5(struct miqt_string path, struct miqt_string nameFilter, int sort); +QDir* QDir_new6(struct miqt_string path, struct miqt_string nameFilter, int sort, int filter); void QDir_OperatorAssign(QDir* self, QDir* param1); void QDir_Swap(QDir* self, QDir* other); void QDir_SetPath(QDir* self, struct miqt_string path); diff --git a/qt6/gen_qdiriterator.cpp b/qt6/gen_qdiriterator.cpp index c6e04b8f..60ce54a0 100644 --- a/qt6/gen_qdiriterator.cpp +++ b/qt6/gen_qdiriterator.cpp @@ -9,24 +9,21 @@ #include "gen_qdiriterator.h" #include "_cgo_export.h" -void QDirIterator_new(QDir* dir, QDirIterator** outptr_QDirIterator) { - QDirIterator* ret = new QDirIterator(*dir); - *outptr_QDirIterator = ret; +QDirIterator* QDirIterator_new(QDir* dir) { + return new QDirIterator(*dir); } -void QDirIterator_new2(struct miqt_string path, QDirIterator** outptr_QDirIterator) { +QDirIterator* QDirIterator_new2(struct miqt_string path) { QString path_QString = QString::fromUtf8(path.data, path.len); - QDirIterator* ret = new QDirIterator(path_QString); - *outptr_QDirIterator = ret; + return new QDirIterator(path_QString); } -void QDirIterator_new3(struct miqt_string path, int filter, QDirIterator** outptr_QDirIterator) { +QDirIterator* QDirIterator_new3(struct miqt_string path, int filter) { QString path_QString = QString::fromUtf8(path.data, path.len); - QDirIterator* ret = new QDirIterator(path_QString, static_cast(filter)); - *outptr_QDirIterator = ret; + return new QDirIterator(path_QString, static_cast(filter)); } -void QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, QDirIterator** outptr_QDirIterator) { +QDirIterator* QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters) { QString path_QString = QString::fromUtf8(path.data, path.len); QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); @@ -35,28 +32,24 @@ void QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct m QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - QDirIterator* ret = new QDirIterator(path_QString, nameFilters_QList); - *outptr_QDirIterator = ret; + return new QDirIterator(path_QString, nameFilters_QList); } -void QDirIterator_new5(QDir* dir, int flags, QDirIterator** outptr_QDirIterator) { - QDirIterator* ret = new QDirIterator(*dir, static_cast(flags)); - *outptr_QDirIterator = ret; +QDirIterator* QDirIterator_new5(QDir* dir, int flags) { + return new QDirIterator(*dir, static_cast(flags)); } -void QDirIterator_new6(struct miqt_string path, int flags, QDirIterator** outptr_QDirIterator) { +QDirIterator* QDirIterator_new6(struct miqt_string path, int flags) { QString path_QString = QString::fromUtf8(path.data, path.len); - QDirIterator* ret = new QDirIterator(path_QString, static_cast(flags)); - *outptr_QDirIterator = ret; + return new QDirIterator(path_QString, static_cast(flags)); } -void QDirIterator_new7(struct miqt_string path, int filter, int flags, QDirIterator** outptr_QDirIterator) { +QDirIterator* QDirIterator_new7(struct miqt_string path, int filter, int flags) { QString path_QString = QString::fromUtf8(path.data, path.len); - QDirIterator* ret = new QDirIterator(path_QString, static_cast(filter), static_cast(flags)); - *outptr_QDirIterator = ret; + return new QDirIterator(path_QString, static_cast(filter), static_cast(flags)); } -void QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, QDirIterator** outptr_QDirIterator) { +QDirIterator* QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters) { QString path_QString = QString::fromUtf8(path.data, path.len); QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); @@ -65,11 +58,10 @@ void QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct m QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - QDirIterator* ret = new QDirIterator(path_QString, nameFilters_QList, static_cast(filters)); - *outptr_QDirIterator = ret; + return new QDirIterator(path_QString, nameFilters_QList, static_cast(filters)); } -void QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags, QDirIterator** outptr_QDirIterator) { +QDirIterator* QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags) { QString path_QString = QString::fromUtf8(path.data, path.len); QStringList nameFilters_QList; nameFilters_QList.reserve(nameFilters.len); @@ -78,8 +70,7 @@ void QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct m QString nameFilters_arr_i_QString = QString::fromUtf8(nameFilters_arr[i].data, nameFilters_arr[i].len); nameFilters_QList.push_back(nameFilters_arr_i_QString); } - QDirIterator* ret = new QDirIterator(path_QString, nameFilters_QList, static_cast(filters), static_cast(flags)); - *outptr_QDirIterator = ret; + return new QDirIterator(path_QString, nameFilters_QList, static_cast(filters), static_cast(flags)); } struct miqt_string QDirIterator_Next(QDirIterator* self) { diff --git a/qt6/gen_qdiriterator.go b/qt6/gen_qdiriterator.go index 528ecd2c..5c667d9d 100644 --- a/qt6/gen_qdiriterator.go +++ b/qt6/gen_qdiriterator.go @@ -45,24 +45,19 @@ func newQDirIterator(h *C.QDirIterator) *QDirIterator { if h == nil { return nil } + return &QDirIterator{h: h} } // UnsafeNewQDirIterator constructs the type using only unsafe pointers. func UnsafeNewQDirIterator(h unsafe.Pointer) *QDirIterator { - if h == nil { - return nil - } - - return &QDirIterator{h: (*C.QDirIterator)(h)} + return newQDirIterator((*C.QDirIterator)(h)) } // NewQDirIterator constructs a new QDirIterator object. func NewQDirIterator(dir *QDir) *QDirIterator { - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new(dir.cPointer(), &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new(dir.cPointer())) ret.isSubclass = true return ret } @@ -73,10 +68,8 @@ func NewQDirIterator2(path string) *QDirIterator { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new2(path_ms, &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new2(path_ms)) ret.isSubclass = true return ret } @@ -87,10 +80,8 @@ func NewQDirIterator3(path string, filter QDir__Filter) *QDirIterator { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new3(path_ms, (C.int)(filter), &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new3(path_ms, (C.int)(filter))) ret.isSubclass = true return ret } @@ -111,20 +102,16 @@ func NewQDirIterator4(path string, nameFilters []string) *QDirIterator { nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new4(path_ms, nameFilters_ma, &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new4(path_ms, nameFilters_ma)) ret.isSubclass = true return ret } // NewQDirIterator5 constructs a new QDirIterator object. func NewQDirIterator5(dir *QDir, flags QDirIterator__IteratorFlag) *QDirIterator { - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new5(dir.cPointer(), (C.int)(flags), &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new5(dir.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -135,10 +122,8 @@ func NewQDirIterator6(path string, flags QDirIterator__IteratorFlag) *QDirIterat path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new6(path_ms, (C.int)(flags), &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new6(path_ms, (C.int)(flags))) ret.isSubclass = true return ret } @@ -149,10 +134,8 @@ func NewQDirIterator7(path string, filter QDir__Filter, flags QDirIterator__Iter path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new7(path_ms, (C.int)(filter), (C.int)(flags), &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new7(path_ms, (C.int)(filter), (C.int)(flags))) ret.isSubclass = true return ret } @@ -173,10 +156,8 @@ func NewQDirIterator8(path string, nameFilters []string, filters QDir__Filter) * nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new8(path_ms, nameFilters_ma, (C.int)(filters), &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new8(path_ms, nameFilters_ma, (C.int)(filters))) ret.isSubclass = true return ret } @@ -197,10 +178,8 @@ func NewQDirIterator9(path string, nameFilters []string, filters QDir__Filter, f nameFilters_CArray[i] = nameFilters_i_ms } nameFilters_ma := C.struct_miqt_array{len: C.size_t(len(nameFilters)), data: unsafe.Pointer(nameFilters_CArray)} - var outptr_QDirIterator *C.QDirIterator = nil - C.QDirIterator_new9(path_ms, nameFilters_ma, (C.int)(filters), (C.int)(flags), &outptr_QDirIterator) - ret := newQDirIterator(outptr_QDirIterator) + ret := newQDirIterator(C.QDirIterator_new9(path_ms, nameFilters_ma, (C.int)(filters), (C.int)(flags))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qdiriterator.h b/qt6/gen_qdiriterator.h index 7f62d847..46399d2d 100644 --- a/qt6/gen_qdiriterator.h +++ b/qt6/gen_qdiriterator.h @@ -24,15 +24,15 @@ typedef struct QDirIterator QDirIterator; typedef struct QFileInfo QFileInfo; #endif -void QDirIterator_new(QDir* dir, QDirIterator** outptr_QDirIterator); -void QDirIterator_new2(struct miqt_string path, QDirIterator** outptr_QDirIterator); -void QDirIterator_new3(struct miqt_string path, int filter, QDirIterator** outptr_QDirIterator); -void QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, QDirIterator** outptr_QDirIterator); -void QDirIterator_new5(QDir* dir, int flags, QDirIterator** outptr_QDirIterator); -void QDirIterator_new6(struct miqt_string path, int flags, QDirIterator** outptr_QDirIterator); -void QDirIterator_new7(struct miqt_string path, int filter, int flags, QDirIterator** outptr_QDirIterator); -void QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, QDirIterator** outptr_QDirIterator); -void QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags, QDirIterator** outptr_QDirIterator); +QDirIterator* QDirIterator_new(QDir* dir); +QDirIterator* QDirIterator_new2(struct miqt_string path); +QDirIterator* QDirIterator_new3(struct miqt_string path, int filter); +QDirIterator* QDirIterator_new4(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters); +QDirIterator* QDirIterator_new5(QDir* dir, int flags); +QDirIterator* QDirIterator_new6(struct miqt_string path, int flags); +QDirIterator* QDirIterator_new7(struct miqt_string path, int filter, int flags); +QDirIterator* QDirIterator_new8(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters); +QDirIterator* QDirIterator_new9(struct miqt_string path, struct miqt_array /* of struct miqt_string */ nameFilters, int filters, int flags); struct miqt_string QDirIterator_Next(QDirIterator* self); QFileInfo* QDirIterator_NextFileInfo(QDirIterator* self); bool QDirIterator_HasNext(const QDirIterator* self); diff --git a/qt6/gen_qdockwidget.cpp b/qt6/gen_qdockwidget.cpp index 91686154..8c277c37 100644 --- a/qt6/gen_qdockwidget.cpp +++ b/qt6/gen_qdockwidget.cpp @@ -1052,55 +1052,35 @@ public: }; -void QDockWidget_new(QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(parent); - *outptr_QDockWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDockWidget* QDockWidget_new(QWidget* parent) { + return new MiqtVirtualQDockWidget(parent); } -void QDockWidget_new2(struct miqt_string title, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QDockWidget* QDockWidget_new2(struct miqt_string title) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(title_QString); - *outptr_QDockWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQDockWidget(title_QString); } -void QDockWidget_new3(QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(); - *outptr_QDockWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDockWidget* QDockWidget_new3() { + return new MiqtVirtualQDockWidget(); } -void QDockWidget_new4(struct miqt_string title, QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QDockWidget* QDockWidget_new4(struct miqt_string title, QWidget* parent) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(title_QString, parent); - *outptr_QDockWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQDockWidget(title_QString, parent); } -void QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QDockWidget* QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(title_QString, parent, static_cast(flags)); - *outptr_QDockWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQDockWidget(title_QString, parent, static_cast(flags)); } -void QDockWidget_new6(QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDockWidget* ret = new MiqtVirtualQDockWidget(parent, static_cast(flags)); - *outptr_QDockWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDockWidget* QDockWidget_new6(QWidget* parent, int flags) { + return new MiqtVirtualQDockWidget(parent, static_cast(flags)); +} + +void QDockWidget_virtbase(QDockWidget* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QDockWidget_MetaObject(const QDockWidget* self) { diff --git a/qt6/gen_qdockwidget.go b/qt6/gen_qdockwidget.go index 99ab1f41..9384555b 100644 --- a/qt6/gen_qdockwidget.go +++ b/qt6/gen_qdockwidget.go @@ -47,33 +47,26 @@ func (this *QDockWidget) UnsafePointer() unsafe.Pointer { } // newQDockWidget constructs the type using only CGO pointers. -func newQDockWidget(h *C.QDockWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDockWidget { +func newQDockWidget(h *C.QDockWidget) *QDockWidget { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QDockWidget_virtbase(h, &outptr_QWidget) + return &QDockWidget{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQDockWidget constructs the type using only unsafe pointers. -func UnsafeNewQDockWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDockWidget { - if h == nil { - return nil - } - - return &QDockWidget{h: (*C.QDockWidget)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQDockWidget(h unsafe.Pointer) *QDockWidget { + return newQDockWidget((*C.QDockWidget)(h)) } // NewQDockWidget constructs a new QDockWidget object. func NewQDockWidget(parent *QWidget) *QDockWidget { - var outptr_QDockWidget *C.QDockWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDockWidget_new(parent.cPointer(), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDockWidget(C.QDockWidget_new(parent.cPointer())) ret.isSubclass = true return ret } @@ -84,26 +77,16 @@ func NewQDockWidget2(title string) *QDockWidget { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QDockWidget *C.QDockWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDockWidget_new2(title_ms, &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDockWidget(C.QDockWidget_new2(title_ms)) ret.isSubclass = true return ret } // NewQDockWidget3 constructs a new QDockWidget object. func NewQDockWidget3() *QDockWidget { - var outptr_QDockWidget *C.QDockWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDockWidget_new3(&outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDockWidget(C.QDockWidget_new3()) ret.isSubclass = true return ret } @@ -114,13 +97,8 @@ func NewQDockWidget4(title string, parent *QWidget) *QDockWidget { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QDockWidget *C.QDockWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDockWidget_new4(title_ms, parent.cPointer(), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDockWidget(C.QDockWidget_new4(title_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -131,26 +109,16 @@ func NewQDockWidget5(title string, parent *QWidget, flags WindowType) *QDockWidg title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QDockWidget *C.QDockWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDockWidget_new5(title_ms, parent.cPointer(), (C.int)(flags), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDockWidget(C.QDockWidget_new5(title_ms, parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } // NewQDockWidget6 constructs a new QDockWidget object. func NewQDockWidget6(parent *QWidget, flags WindowType) *QDockWidget { - var outptr_QDockWidget *C.QDockWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDockWidget_new6(parent.cPointer(), (C.int)(flags), &outptr_QDockWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDockWidget(outptr_QDockWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDockWidget(C.QDockWidget_new6(parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -175,7 +143,7 @@ func QDockWidget_Tr(s string) string { } func (this *QDockWidget) Widget() *QWidget { - return newQWidget(C.QDockWidget_Widget(this.h), nil, nil) + return newQWidget(C.QDockWidget_Widget(this.h)) } func (this *QDockWidget) SetWidget(widget *QWidget) { @@ -211,7 +179,7 @@ func (this *QDockWidget) SetTitleBarWidget(widget *QWidget) { } func (this *QDockWidget) TitleBarWidget() *QWidget { - return newQWidget(C.QDockWidget_TitleBarWidget(this.h), nil, nil) + return newQWidget(C.QDockWidget_TitleBarWidget(this.h)) } func (this *QDockWidget) IsAreaAllowed(area DockWidgetArea) bool { @@ -219,7 +187,7 @@ func (this *QDockWidget) IsAreaAllowed(area DockWidgetArea) bool { } func (this *QDockWidget) ToggleViewAction() *QAction { - return newQAction(C.QDockWidget_ToggleViewAction(this.h), nil) + return newQAction(C.QDockWidget_ToggleViewAction(this.h)) } func (this *QDockWidget) FeaturesChanged(features QDockWidget__DockWidgetFeature) { @@ -390,7 +358,7 @@ func miqt_exec_callback_QDockWidget_CloseEvent(self *C.QDockWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -416,7 +384,7 @@ func miqt_exec_callback_QDockWidget_PaintEvent(self *C.QDockWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -470,7 +438,7 @@ func miqt_exec_callback_QDockWidget_InitStyleOption(self *C.QDockWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionDockWidget(option, nil) + slotval1 := newQStyleOptionDockWidget(option) gofunc((&QDockWidget{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -679,7 +647,7 @@ func miqt_exec_callback_QDockWidget_MousePressEvent(self *C.QDockWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -705,7 +673,7 @@ func miqt_exec_callback_QDockWidget_MouseReleaseEvent(self *C.QDockWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -731,7 +699,7 @@ func miqt_exec_callback_QDockWidget_MouseDoubleClickEvent(self *C.QDockWidget, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -757,7 +725,7 @@ func miqt_exec_callback_QDockWidget_MouseMoveEvent(self *C.QDockWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -783,7 +751,7 @@ func miqt_exec_callback_QDockWidget_WheelEvent(self *C.QDockWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -809,7 +777,7 @@ func miqt_exec_callback_QDockWidget_KeyPressEvent(self *C.QDockWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -835,7 +803,7 @@ func miqt_exec_callback_QDockWidget_KeyReleaseEvent(self *C.QDockWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -861,7 +829,7 @@ func miqt_exec_callback_QDockWidget_FocusInEvent(self *C.QDockWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -887,7 +855,7 @@ func miqt_exec_callback_QDockWidget_FocusOutEvent(self *C.QDockWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -913,7 +881,7 @@ func miqt_exec_callback_QDockWidget_EnterEvent(self *C.QDockWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -965,7 +933,7 @@ func miqt_exec_callback_QDockWidget_MoveEvent(self *C.QDockWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -991,7 +959,7 @@ func miqt_exec_callback_QDockWidget_ResizeEvent(self *C.QDockWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1017,7 +985,7 @@ func miqt_exec_callback_QDockWidget_ContextMenuEvent(self *C.QDockWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1043,7 +1011,7 @@ func miqt_exec_callback_QDockWidget_TabletEvent(self *C.QDockWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1069,7 +1037,7 @@ func miqt_exec_callback_QDockWidget_ActionEvent(self *C.QDockWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1095,7 +1063,7 @@ func miqt_exec_callback_QDockWidget_DragEnterEvent(self *C.QDockWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1121,7 +1089,7 @@ func miqt_exec_callback_QDockWidget_DragMoveEvent(self *C.QDockWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1147,7 +1115,7 @@ func miqt_exec_callback_QDockWidget_DragLeaveEvent(self *C.QDockWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1173,7 +1141,7 @@ func miqt_exec_callback_QDockWidget_DropEvent(self *C.QDockWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1199,7 +1167,7 @@ func miqt_exec_callback_QDockWidget_ShowEvent(self *C.QDockWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1225,7 +1193,7 @@ func miqt_exec_callback_QDockWidget_HideEvent(self *C.QDockWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QDockWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1395,7 +1363,7 @@ func miqt_exec_callback_QDockWidget_InputMethodEvent(self *C.QDockWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QDockWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qdockwidget.h b/qt6/gen_qdockwidget.h index 25badcb1..15b19057 100644 --- a/qt6/gen_qdockwidget.h +++ b/qt6/gen_qdockwidget.h @@ -82,12 +82,13 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QDockWidget_new(QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDockWidget_new2(struct miqt_string title, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDockWidget_new3(QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDockWidget_new4(struct miqt_string title, QWidget* parent, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDockWidget_new6(QWidget* parent, int flags, QDockWidget** outptr_QDockWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QDockWidget* QDockWidget_new(QWidget* parent); +QDockWidget* QDockWidget_new2(struct miqt_string title); +QDockWidget* QDockWidget_new3(); +QDockWidget* QDockWidget_new4(struct miqt_string title, QWidget* parent); +QDockWidget* QDockWidget_new5(struct miqt_string title, QWidget* parent, int flags); +QDockWidget* QDockWidget_new6(QWidget* parent, int flags); +void QDockWidget_virtbase(QDockWidget* src, QWidget** outptr_QWidget); QMetaObject* QDockWidget_MetaObject(const QDockWidget* self); void* QDockWidget_Metacast(QDockWidget* self, const char* param1); struct miqt_string QDockWidget_Tr(const char* s); diff --git a/qt6/gen_qdrag.cpp b/qt6/gen_qdrag.cpp index e79bd2ee..e7219a09 100644 --- a/qt6/gen_qdrag.cpp +++ b/qt6/gen_qdrag.cpp @@ -195,10 +195,12 @@ public: }; -void QDrag_new(QObject* dragSource, QDrag** outptr_QDrag, QObject** outptr_QObject) { - MiqtVirtualQDrag* ret = new MiqtVirtualQDrag(dragSource); - *outptr_QDrag = ret; - *outptr_QObject = static_cast(ret); +QDrag* QDrag_new(QObject* dragSource) { + return new MiqtVirtualQDrag(dragSource); +} + +void QDrag_virtbase(QDrag* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QDrag_MetaObject(const QDrag* self) { diff --git a/qt6/gen_qdrag.go b/qt6/gen_qdrag.go index a7a7704d..62508c2e 100644 --- a/qt6/gen_qdrag.go +++ b/qt6/gen_qdrag.go @@ -35,31 +35,26 @@ func (this *QDrag) UnsafePointer() unsafe.Pointer { } // newQDrag constructs the type using only CGO pointers. -func newQDrag(h *C.QDrag, h_QObject *C.QObject) *QDrag { +func newQDrag(h *C.QDrag) *QDrag { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QDrag_virtbase(h, &outptr_QObject) + return &QDrag{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQDrag constructs the type using only unsafe pointers. -func UnsafeNewQDrag(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDrag { - if h == nil { - return nil - } - - return &QDrag{h: (*C.QDrag)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQDrag(h unsafe.Pointer) *QDrag { + return newQDrag((*C.QDrag)(h)) } // NewQDrag constructs a new QDrag object. func NewQDrag(dragSource *QObject) *QDrag { - var outptr_QDrag *C.QDrag = nil - var outptr_QObject *C.QObject = nil - C.QDrag_new(dragSource.cPointer(), &outptr_QDrag, &outptr_QObject) - ret := newQDrag(outptr_QDrag, outptr_QObject) + ret := newQDrag(C.QDrag_new(dragSource.cPointer())) ret.isSubclass = true return ret } @@ -88,7 +83,7 @@ func (this *QDrag) SetMimeData(data *QMimeData) { } func (this *QDrag) MimeData() *QMimeData { - return newQMimeData(C.QDrag_MimeData(this.h), nil) + return newQMimeData(C.QDrag_MimeData(this.h)) } func (this *QDrag) SetPixmap(pixmap *QPixmap) { @@ -96,7 +91,7 @@ func (this *QDrag) SetPixmap(pixmap *QPixmap) { } func (this *QDrag) Pixmap() *QPixmap { - _goptr := newQPixmap(C.QDrag_Pixmap(this.h), nil) + _goptr := newQPixmap(C.QDrag_Pixmap(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -132,7 +127,7 @@ func (this *QDrag) SetDragCursor(cursor *QPixmap, action DropAction) { } func (this *QDrag) DragCursor(action DropAction) *QPixmap { - _goptr := newQPixmap(C.QDrag_DragCursor(this.h, (C.int)(action)), nil) + _goptr := newQPixmap(C.QDrag_DragCursor(this.h, (C.int)(action))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -293,7 +288,7 @@ func miqt_exec_callback_QDrag_TimerEvent(self *C.QDrag, cb C.intptr_t, event *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QDrag{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -319,7 +314,7 @@ func miqt_exec_callback_QDrag_ChildEvent(self *C.QDrag, cb C.intptr_t, event *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QDrag{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qdrag.h b/qt6/gen_qdrag.h index b65ba851..0e775cac 100644 --- a/qt6/gen_qdrag.h +++ b/qt6/gen_qdrag.h @@ -38,7 +38,8 @@ typedef struct QPoint QPoint; typedef struct QTimerEvent QTimerEvent; #endif -void QDrag_new(QObject* dragSource, QDrag** outptr_QDrag, QObject** outptr_QObject); +QDrag* QDrag_new(QObject* dragSource); +void QDrag_virtbase(QDrag* src, QObject** outptr_QObject); QMetaObject* QDrag_MetaObject(const QDrag* self); void* QDrag_Metacast(QDrag* self, const char* param1); struct miqt_string QDrag_Tr(const char* s); diff --git a/qt6/gen_qdrawutil.cpp b/qt6/gen_qdrawutil.cpp index c07d5fb8..ea9074ea 100644 --- a/qt6/gen_qdrawutil.cpp +++ b/qt6/gen_qdrawutil.cpp @@ -3,24 +3,20 @@ #include "gen_qdrawutil.h" #include "_cgo_export.h" -void QTileRules_new(int horizontalRule, int verticalRule, QTileRules** outptr_QTileRules) { - QTileRules* ret = new QTileRules(static_cast(horizontalRule), static_cast(verticalRule)); - *outptr_QTileRules = ret; +QTileRules* QTileRules_new(int horizontalRule, int verticalRule) { + return new QTileRules(static_cast(horizontalRule), static_cast(verticalRule)); } -void QTileRules_new2(QTileRules** outptr_QTileRules) { - QTileRules* ret = new QTileRules(); - *outptr_QTileRules = ret; +QTileRules* QTileRules_new2() { + return new QTileRules(); } -void QTileRules_new3(QTileRules* param1, QTileRules** outptr_QTileRules) { - QTileRules* ret = new QTileRules(*param1); - *outptr_QTileRules = ret; +QTileRules* QTileRules_new3(QTileRules* param1) { + return new QTileRules(*param1); } -void QTileRules_new4(int rule, QTileRules** outptr_QTileRules) { - QTileRules* ret = new QTileRules(static_cast(rule)); - *outptr_QTileRules = ret; +QTileRules* QTileRules_new4(int rule) { + return new QTileRules(static_cast(rule)); } void QTileRules_Delete(QTileRules* self, bool isSubclass) { diff --git a/qt6/gen_qdrawutil.go b/qt6/gen_qdrawutil.go index d58f54d6..db0e1e3f 100644 --- a/qt6/gen_qdrawutil.go +++ b/qt6/gen_qdrawutil.go @@ -55,54 +55,43 @@ func newQTileRules(h *C.QTileRules) *QTileRules { if h == nil { return nil } + return &QTileRules{h: h} } // UnsafeNewQTileRules constructs the type using only unsafe pointers. func UnsafeNewQTileRules(h unsafe.Pointer) *QTileRules { - if h == nil { - return nil - } - - return &QTileRules{h: (*C.QTileRules)(h)} + return newQTileRules((*C.QTileRules)(h)) } // NewQTileRules constructs a new QTileRules object. func NewQTileRules(horizontalRule TileRule, verticalRule TileRule) *QTileRules { - var outptr_QTileRules *C.QTileRules = nil - C.QTileRules_new((C.int)(horizontalRule), (C.int)(verticalRule), &outptr_QTileRules) - ret := newQTileRules(outptr_QTileRules) + ret := newQTileRules(C.QTileRules_new((C.int)(horizontalRule), (C.int)(verticalRule))) ret.isSubclass = true return ret } // NewQTileRules2 constructs a new QTileRules object. func NewQTileRules2() *QTileRules { - var outptr_QTileRules *C.QTileRules = nil - C.QTileRules_new2(&outptr_QTileRules) - ret := newQTileRules(outptr_QTileRules) + ret := newQTileRules(C.QTileRules_new2()) ret.isSubclass = true return ret } // NewQTileRules3 constructs a new QTileRules object. func NewQTileRules3(param1 *QTileRules) *QTileRules { - var outptr_QTileRules *C.QTileRules = nil - C.QTileRules_new3(param1.cPointer(), &outptr_QTileRules) - ret := newQTileRules(outptr_QTileRules) + ret := newQTileRules(C.QTileRules_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQTileRules4 constructs a new QTileRules object. func NewQTileRules4(rule TileRule) *QTileRules { - var outptr_QTileRules *C.QTileRules = nil - C.QTileRules_new4((C.int)(rule), &outptr_QTileRules) - ret := newQTileRules(outptr_QTileRules) + ret := newQTileRules(C.QTileRules_new4((C.int)(rule))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qdrawutil.h b/qt6/gen_qdrawutil.h index 1cda62ed..0ff49da5 100644 --- a/qt6/gen_qdrawutil.h +++ b/qt6/gen_qdrawutil.h @@ -20,10 +20,10 @@ class QTileRules; typedef struct QTileRules QTileRules; #endif -void QTileRules_new(int horizontalRule, int verticalRule, QTileRules** outptr_QTileRules); -void QTileRules_new2(QTileRules** outptr_QTileRules); -void QTileRules_new3(QTileRules* param1, QTileRules** outptr_QTileRules); -void QTileRules_new4(int rule, QTileRules** outptr_QTileRules); +QTileRules* QTileRules_new(int horizontalRule, int verticalRule); +QTileRules* QTileRules_new2(); +QTileRules* QTileRules_new3(QTileRules* param1); +QTileRules* QTileRules_new4(int rule); void QTileRules_Delete(QTileRules* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qeasingcurve.cpp b/qt6/gen_qeasingcurve.cpp index 6ed0f963..a8417671 100644 --- a/qt6/gen_qeasingcurve.cpp +++ b/qt6/gen_qeasingcurve.cpp @@ -5,19 +5,16 @@ #include "gen_qeasingcurve.h" #include "_cgo_export.h" -void QEasingCurve_new(QEasingCurve** outptr_QEasingCurve) { - QEasingCurve* ret = new QEasingCurve(); - *outptr_QEasingCurve = ret; +QEasingCurve* QEasingCurve_new() { + return new QEasingCurve(); } -void QEasingCurve_new2(QEasingCurve* other, QEasingCurve** outptr_QEasingCurve) { - QEasingCurve* ret = new QEasingCurve(*other); - *outptr_QEasingCurve = ret; +QEasingCurve* QEasingCurve_new2(QEasingCurve* other) { + return new QEasingCurve(*other); } -void QEasingCurve_new3(int typeVal, QEasingCurve** outptr_QEasingCurve) { - QEasingCurve* ret = new QEasingCurve(static_cast(typeVal)); - *outptr_QEasingCurve = ret; +QEasingCurve* QEasingCurve_new3(int typeVal) { + return new QEasingCurve(static_cast(typeVal)); } void QEasingCurve_OperatorAssign(QEasingCurve* self, QEasingCurve* other) { diff --git a/qt6/gen_qeasingcurve.go b/qt6/gen_qeasingcurve.go index 7e7106a1..2c770706 100644 --- a/qt6/gen_qeasingcurve.go +++ b/qt6/gen_qeasingcurve.go @@ -91,44 +91,35 @@ func newQEasingCurve(h *C.QEasingCurve) *QEasingCurve { if h == nil { return nil } + return &QEasingCurve{h: h} } // UnsafeNewQEasingCurve constructs the type using only unsafe pointers. func UnsafeNewQEasingCurve(h unsafe.Pointer) *QEasingCurve { - if h == nil { - return nil - } - - return &QEasingCurve{h: (*C.QEasingCurve)(h)} + return newQEasingCurve((*C.QEasingCurve)(h)) } // NewQEasingCurve constructs a new QEasingCurve object. func NewQEasingCurve() *QEasingCurve { - var outptr_QEasingCurve *C.QEasingCurve = nil - C.QEasingCurve_new(&outptr_QEasingCurve) - ret := newQEasingCurve(outptr_QEasingCurve) + ret := newQEasingCurve(C.QEasingCurve_new()) ret.isSubclass = true return ret } // NewQEasingCurve2 constructs a new QEasingCurve object. func NewQEasingCurve2(other *QEasingCurve) *QEasingCurve { - var outptr_QEasingCurve *C.QEasingCurve = nil - C.QEasingCurve_new2(other.cPointer(), &outptr_QEasingCurve) - ret := newQEasingCurve(outptr_QEasingCurve) + ret := newQEasingCurve(C.QEasingCurve_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQEasingCurve3 constructs a new QEasingCurve object. func NewQEasingCurve3(typeVal QEasingCurve__Type) *QEasingCurve { - var outptr_QEasingCurve *C.QEasingCurve = nil - C.QEasingCurve_new3((C.int)(typeVal), &outptr_QEasingCurve) - ret := newQEasingCurve(outptr_QEasingCurve) + ret := newQEasingCurve(C.QEasingCurve_new3((C.int)(typeVal))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qeasingcurve.h b/qt6/gen_qeasingcurve.h index 2d2494d9..bea9efa6 100644 --- a/qt6/gen_qeasingcurve.h +++ b/qt6/gen_qeasingcurve.h @@ -22,9 +22,9 @@ typedef struct QEasingCurve QEasingCurve; typedef struct QPointF QPointF; #endif -void QEasingCurve_new(QEasingCurve** outptr_QEasingCurve); -void QEasingCurve_new2(QEasingCurve* other, QEasingCurve** outptr_QEasingCurve); -void QEasingCurve_new3(int typeVal, QEasingCurve** outptr_QEasingCurve); +QEasingCurve* QEasingCurve_new(); +QEasingCurve* QEasingCurve_new2(QEasingCurve* other); +QEasingCurve* QEasingCurve_new3(int typeVal); void QEasingCurve_OperatorAssign(QEasingCurve* self, QEasingCurve* other); void QEasingCurve_Swap(QEasingCurve* self, QEasingCurve* other); bool QEasingCurve_OperatorEqual(const QEasingCurve* self, QEasingCurve* other); diff --git a/qt6/gen_qelapsedtimer.cpp b/qt6/gen_qelapsedtimer.cpp index c4d3f68f..f8d5cb24 100644 --- a/qt6/gen_qelapsedtimer.cpp +++ b/qt6/gen_qelapsedtimer.cpp @@ -3,9 +3,8 @@ #include "gen_qelapsedtimer.h" #include "_cgo_export.h" -void QElapsedTimer_new(QElapsedTimer** outptr_QElapsedTimer) { - QElapsedTimer* ret = new QElapsedTimer(); - *outptr_QElapsedTimer = ret; +QElapsedTimer* QElapsedTimer_new() { + return new QElapsedTimer(); } int QElapsedTimer_ClockType() { diff --git a/qt6/gen_qelapsedtimer.go b/qt6/gen_qelapsedtimer.go index e8a7fa39..31ac480f 100644 --- a/qt6/gen_qelapsedtimer.go +++ b/qt6/gen_qelapsedtimer.go @@ -46,24 +46,19 @@ func newQElapsedTimer(h *C.QElapsedTimer) *QElapsedTimer { if h == nil { return nil } + return &QElapsedTimer{h: h} } // UnsafeNewQElapsedTimer constructs the type using only unsafe pointers. func UnsafeNewQElapsedTimer(h unsafe.Pointer) *QElapsedTimer { - if h == nil { - return nil - } - - return &QElapsedTimer{h: (*C.QElapsedTimer)(h)} + return newQElapsedTimer((*C.QElapsedTimer)(h)) } // NewQElapsedTimer constructs a new QElapsedTimer object. func NewQElapsedTimer() *QElapsedTimer { - var outptr_QElapsedTimer *C.QElapsedTimer = nil - C.QElapsedTimer_new(&outptr_QElapsedTimer) - ret := newQElapsedTimer(outptr_QElapsedTimer) + ret := newQElapsedTimer(C.QElapsedTimer_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qelapsedtimer.h b/qt6/gen_qelapsedtimer.h index 1db3981f..8577b212 100644 --- a/qt6/gen_qelapsedtimer.h +++ b/qt6/gen_qelapsedtimer.h @@ -20,7 +20,7 @@ class QElapsedTimer; typedef struct QElapsedTimer QElapsedTimer; #endif -void QElapsedTimer_new(QElapsedTimer** outptr_QElapsedTimer); +QElapsedTimer* QElapsedTimer_new(); int QElapsedTimer_ClockType(); bool QElapsedTimer_IsMonotonic(); void QElapsedTimer_Start(QElapsedTimer* self); diff --git a/qt6/gen_qerrormessage.cpp b/qt6/gen_qerrormessage.cpp index c5ffd6d4..39f898f6 100644 --- a/qt6/gen_qerrormessage.cpp +++ b/qt6/gen_qerrormessage.cpp @@ -379,22 +379,16 @@ public: }; -void QErrorMessage_new(QWidget* parent, QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQErrorMessage* ret = new MiqtVirtualQErrorMessage(parent); - *outptr_QErrorMessage = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QErrorMessage* QErrorMessage_new(QWidget* parent) { + return new MiqtVirtualQErrorMessage(parent); } -void QErrorMessage_new2(QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQErrorMessage* ret = new MiqtVirtualQErrorMessage(); - *outptr_QErrorMessage = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QErrorMessage* QErrorMessage_new2() { + return new MiqtVirtualQErrorMessage(); +} + +void QErrorMessage_virtbase(QErrorMessage* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QErrorMessage_MetaObject(const QErrorMessage* self) { diff --git a/qt6/gen_qerrormessage.go b/qt6/gen_qerrormessage.go index 828938de..0c74fbbb 100644 --- a/qt6/gen_qerrormessage.go +++ b/qt6/gen_qerrormessage.go @@ -35,48 +35,34 @@ func (this *QErrorMessage) UnsafePointer() unsafe.Pointer { } // newQErrorMessage constructs the type using only CGO pointers. -func newQErrorMessage(h *C.QErrorMessage, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QErrorMessage { +func newQErrorMessage(h *C.QErrorMessage) *QErrorMessage { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QErrorMessage_virtbase(h, &outptr_QDialog) + return &QErrorMessage{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQErrorMessage constructs the type using only unsafe pointers. -func UnsafeNewQErrorMessage(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QErrorMessage { - if h == nil { - return nil - } - - return &QErrorMessage{h: (*C.QErrorMessage)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQErrorMessage(h unsafe.Pointer) *QErrorMessage { + return newQErrorMessage((*C.QErrorMessage)(h)) } // NewQErrorMessage constructs a new QErrorMessage object. func NewQErrorMessage(parent *QWidget) *QErrorMessage { - var outptr_QErrorMessage *C.QErrorMessage = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QErrorMessage_new(parent.cPointer(), &outptr_QErrorMessage, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQErrorMessage(outptr_QErrorMessage, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQErrorMessage(C.QErrorMessage_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQErrorMessage2 constructs a new QErrorMessage object. func NewQErrorMessage2() *QErrorMessage { - var outptr_QErrorMessage *C.QErrorMessage = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QErrorMessage_new2(&outptr_QErrorMessage, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQErrorMessage(outptr_QErrorMessage, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQErrorMessage(C.QErrorMessage_new2()) ret.isSubclass = true return ret } @@ -101,7 +87,7 @@ func QErrorMessage_Tr(s string) string { } func QErrorMessage_QtHandler() *QErrorMessage { - return newQErrorMessage(C.QErrorMessage_QtHandler(), nil, nil, nil, nil) + return newQErrorMessage(C.QErrorMessage_QtHandler()) } func (this *QErrorMessage) ShowMessage(message string) { @@ -392,7 +378,7 @@ func miqt_exec_callback_QErrorMessage_KeyPressEvent(self *C.QErrorMessage, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QErrorMessage{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -418,7 +404,7 @@ func miqt_exec_callback_QErrorMessage_CloseEvent(self *C.QErrorMessage, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(param1, nil) + slotval1 := newQCloseEvent(param1) gofunc((&QErrorMessage{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -444,7 +430,7 @@ func miqt_exec_callback_QErrorMessage_ShowEvent(self *C.QErrorMessage, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QErrorMessage{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -470,7 +456,7 @@ func miqt_exec_callback_QErrorMessage_ResizeEvent(self *C.QErrorMessage, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QErrorMessage{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -496,7 +482,7 @@ func miqt_exec_callback_QErrorMessage_ContextMenuEvent(self *C.QErrorMessage, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QErrorMessage{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt6/gen_qerrormessage.h b/qt6/gen_qerrormessage.h index 0adb9b26..93c48f71 100644 --- a/qt6/gen_qerrormessage.h +++ b/qt6/gen_qerrormessage.h @@ -44,8 +44,9 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QErrorMessage_new(QWidget* parent, QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QErrorMessage_new2(QErrorMessage** outptr_QErrorMessage, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QErrorMessage* QErrorMessage_new(QWidget* parent); +QErrorMessage* QErrorMessage_new2(); +void QErrorMessage_virtbase(QErrorMessage* src, QDialog** outptr_QDialog); QMetaObject* QErrorMessage_MetaObject(const QErrorMessage* self); void* QErrorMessage_Metacast(QErrorMessage* self, const char* param1); struct miqt_string QErrorMessage_Tr(const char* s); diff --git a/qt6/gen_qevent.cpp b/qt6/gen_qevent.cpp index 3d973aa4..afee7905 100644 --- a/qt6/gen_qevent.cpp +++ b/qt6/gen_qevent.cpp @@ -147,16 +147,16 @@ public: }; -void QInputEvent_new(int typeVal, QInputDevice* m_dev, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQInputEvent* ret = new MiqtVirtualQInputEvent(static_cast(typeVal), m_dev); - *outptr_QInputEvent = ret; - *outptr_QEvent = static_cast(ret); +QInputEvent* QInputEvent_new(int typeVal, QInputDevice* m_dev) { + return new MiqtVirtualQInputEvent(static_cast(typeVal), m_dev); } -void QInputEvent_new2(int typeVal, QInputDevice* m_dev, int modifiers, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQInputEvent* ret = new MiqtVirtualQInputEvent(static_cast(typeVal), m_dev, static_cast(modifiers)); - *outptr_QInputEvent = ret; - *outptr_QEvent = static_cast(ret); +QInputEvent* QInputEvent_new2(int typeVal, QInputDevice* m_dev, int modifiers) { + return new MiqtVirtualQInputEvent(static_cast(typeVal), m_dev, static_cast(modifiers)); +} + +void QInputEvent_virtbase(QInputEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QInputEvent* QInputEvent_Clone(const QInputEvent* self) { @@ -370,31 +370,26 @@ public: }; -void QPointerEvent_new(int typeVal, QPointingDevice* dev, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQPointerEvent* ret = new MiqtVirtualQPointerEvent(static_cast(typeVal), dev); - *outptr_QPointerEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QPointerEvent* QPointerEvent_new(int typeVal, QPointingDevice* dev) { + return new MiqtVirtualQPointerEvent(static_cast(typeVal), dev); } -void QPointerEvent_new2(int typeVal, QPointingDevice* dev, int modifiers, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQPointerEvent* ret = new MiqtVirtualQPointerEvent(static_cast(typeVal), dev, static_cast(modifiers)); - *outptr_QPointerEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QPointerEvent* QPointerEvent_new2(int typeVal, QPointingDevice* dev, int modifiers) { + return new MiqtVirtualQPointerEvent(static_cast(typeVal), dev, static_cast(modifiers)); } -void QPointerEvent_new3(int typeVal, QPointingDevice* dev, int modifiers, struct miqt_array /* of QEventPoint* */ points, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QPointerEvent* QPointerEvent_new3(int typeVal, QPointingDevice* dev, int modifiers, struct miqt_array /* of QEventPoint* */ points) { QList points_QList; points_QList.reserve(points.len); QEventPoint** points_arr = static_cast(points.data); for(size_t i = 0; i < points.len; ++i) { points_QList.push_back(*(points_arr[i])); } - MiqtVirtualQPointerEvent* ret = new MiqtVirtualQPointerEvent(static_cast(typeVal), dev, static_cast(modifiers), points_QList); - *outptr_QPointerEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQPointerEvent(static_cast(typeVal), dev, static_cast(modifiers), points_QList); +} + +void QPointerEvent_virtbase(QPointerEvent* src, QInputEvent** outptr_QInputEvent) { + *outptr_QInputEvent = static_cast(src); } QPointerEvent* QPointerEvent_Clone(const QPointerEvent* self) { @@ -542,6 +537,10 @@ void QPointerEvent_Delete(QPointerEvent* self, bool isSubclass) { } } +void QSinglePointEvent_virtbase(QSinglePointEvent* src, QPointerEvent** outptr_QPointerEvent) { + *outptr_QPointerEvent = static_cast(src); +} + QSinglePointEvent* QSinglePointEvent_Clone(const QSinglePointEvent* self) { return self->clone(); } @@ -694,22 +693,16 @@ public: }; -void QEnterEvent_new(QPointF* localPos, QPointF* scenePos, QPointF* globalPos, QEnterEvent** outptr_QEnterEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQEnterEvent* ret = new MiqtVirtualQEnterEvent(*localPos, *scenePos, *globalPos); - *outptr_QEnterEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QEnterEvent* QEnterEvent_new(QPointF* localPos, QPointF* scenePos, QPointF* globalPos) { + return new MiqtVirtualQEnterEvent(*localPos, *scenePos, *globalPos); } -void QEnterEvent_new2(QPointF* localPos, QPointF* scenePos, QPointF* globalPos, QPointingDevice* device, QEnterEvent** outptr_QEnterEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQEnterEvent* ret = new MiqtVirtualQEnterEvent(*localPos, *scenePos, *globalPos, device); - *outptr_QEnterEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QEnterEvent* QEnterEvent_new2(QPointF* localPos, QPointF* scenePos, QPointF* globalPos, QPointingDevice* device) { + return new MiqtVirtualQEnterEvent(*localPos, *scenePos, *globalPos, device); +} + +void QEnterEvent_virtbase(QEnterEvent* src, QSinglePointEvent** outptr_QSinglePointEvent) { + *outptr_QSinglePointEvent = static_cast(src); } QEnterEvent* QEnterEvent_Clone(const QEnterEvent* self) { @@ -896,76 +889,40 @@ public: }; -void QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); - *outptr_QMouseEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QMouseEvent* QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers) { + return new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); } -void QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); - *outptr_QMouseEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QMouseEvent* QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers) { + return new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); } -void QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); - *outptr_QMouseEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QMouseEvent* QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers) { + return new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers)); } -void QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), static_cast(source)); - *outptr_QMouseEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QMouseEvent* QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source) { + return new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), static_cast(source)); } -void QMouseEvent_new5(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, static_cast(button), static_cast(buttons), static_cast(modifiers), device); - *outptr_QMouseEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QMouseEvent* QMouseEvent_new5(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QPointingDevice* device) { + return new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, static_cast(button), static_cast(buttons), static_cast(modifiers), device); } -void QMouseEvent_new6(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), device); - *outptr_QMouseEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QMouseEvent* QMouseEvent_new6(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device) { + return new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), device); } -void QMouseEvent_new7(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), device); - *outptr_QMouseEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QMouseEvent* QMouseEvent_new7(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device) { + return new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), device); } -void QMouseEvent_new8(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQMouseEvent* ret = new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), static_cast(source), device); - *outptr_QMouseEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QMouseEvent* QMouseEvent_new8(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source, QPointingDevice* device) { + return new MiqtVirtualQMouseEvent(static_cast(typeVal), *localPos, *scenePos, *globalPos, static_cast(button), static_cast(buttons), static_cast(modifiers), static_cast(source), device); +} + +void QMouseEvent_virtbase(QMouseEvent* src, QSinglePointEvent** outptr_QSinglePointEvent) { + *outptr_QSinglePointEvent = static_cast(src); } QMouseEvent* QMouseEvent_Clone(const QMouseEvent* self) { @@ -1160,58 +1117,32 @@ public: }; -void QHoverEvent_new(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQHoverEvent* ret = new MiqtVirtualQHoverEvent(static_cast(typeVal), *scenePos, *globalPos, *oldPos); - *outptr_QHoverEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QHoverEvent* QHoverEvent_new(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos) { + return new MiqtVirtualQHoverEvent(static_cast(typeVal), *scenePos, *globalPos, *oldPos); } -void QHoverEvent_new2(int typeVal, QPointF* pos, QPointF* oldPos, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQHoverEvent* ret = new MiqtVirtualQHoverEvent(static_cast(typeVal), *pos, *oldPos); - *outptr_QHoverEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QHoverEvent* QHoverEvent_new2(int typeVal, QPointF* pos, QPointF* oldPos) { + return new MiqtVirtualQHoverEvent(static_cast(typeVal), *pos, *oldPos); } -void QHoverEvent_new3(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQHoverEvent* ret = new MiqtVirtualQHoverEvent(static_cast(typeVal), *scenePos, *globalPos, *oldPos, static_cast(modifiers)); - *outptr_QHoverEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QHoverEvent* QHoverEvent_new3(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers) { + return new MiqtVirtualQHoverEvent(static_cast(typeVal), *scenePos, *globalPos, *oldPos, static_cast(modifiers)); } -void QHoverEvent_new4(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers, QPointingDevice* device, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQHoverEvent* ret = new MiqtVirtualQHoverEvent(static_cast(typeVal), *scenePos, *globalPos, *oldPos, static_cast(modifiers), device); - *outptr_QHoverEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QHoverEvent* QHoverEvent_new4(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers, QPointingDevice* device) { + return new MiqtVirtualQHoverEvent(static_cast(typeVal), *scenePos, *globalPos, *oldPos, static_cast(modifiers), device); } -void QHoverEvent_new5(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQHoverEvent* ret = new MiqtVirtualQHoverEvent(static_cast(typeVal), *pos, *oldPos, static_cast(modifiers)); - *outptr_QHoverEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QHoverEvent* QHoverEvent_new5(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers) { + return new MiqtVirtualQHoverEvent(static_cast(typeVal), *pos, *oldPos, static_cast(modifiers)); } -void QHoverEvent_new6(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QPointingDevice* device, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQHoverEvent* ret = new MiqtVirtualQHoverEvent(static_cast(typeVal), *pos, *oldPos, static_cast(modifiers), device); - *outptr_QHoverEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QHoverEvent* QHoverEvent_new6(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QPointingDevice* device) { + return new MiqtVirtualQHoverEvent(static_cast(typeVal), *pos, *oldPos, static_cast(modifiers), device); +} + +void QHoverEvent_virtbase(QHoverEvent* src, QSinglePointEvent** outptr_QSinglePointEvent) { + *outptr_QSinglePointEvent = static_cast(src); } QHoverEvent* QHoverEvent_Clone(const QHoverEvent* self) { @@ -1377,31 +1308,20 @@ public: }; -void QWheelEvent_new(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, QWheelEvent** outptr_QWheelEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQWheelEvent* ret = new MiqtVirtualQWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted); - *outptr_QWheelEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QWheelEvent* QWheelEvent_new(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted) { + return new MiqtVirtualQWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted); } -void QWheelEvent_new2(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QWheelEvent** outptr_QWheelEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQWheelEvent* ret = new MiqtVirtualQWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted, static_cast(source)); - *outptr_QWheelEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QWheelEvent* QWheelEvent_new2(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source) { + return new MiqtVirtualQWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted, static_cast(source)); } -void QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QPointingDevice* device, QWheelEvent** outptr_QWheelEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQWheelEvent* ret = new MiqtVirtualQWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted, static_cast(source), device); - *outptr_QWheelEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QWheelEvent* QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QPointingDevice* device) { + return new MiqtVirtualQWheelEvent(*pos, *globalPos, *pixelDelta, *angleDelta, static_cast(buttons), static_cast(modifiers), static_cast(phase), inverted, static_cast(source), device); +} + +void QWheelEvent_virtbase(QWheelEvent* src, QSinglePointEvent** outptr_QSinglePointEvent) { + *outptr_QSinglePointEvent = static_cast(src); } QWheelEvent* QWheelEvent_Clone(const QWheelEvent* self) { @@ -1587,13 +1507,12 @@ public: }; -void QTabletEvent_new(int t, QPointingDevice* device, QPointF* pos, QPointF* globalPos, double pressure, float xTilt, float yTilt, float tangentialPressure, double rotation, float z, int keyState, int button, int buttons, QTabletEvent** outptr_QTabletEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQTabletEvent* ret = new MiqtVirtualQTabletEvent(static_cast(t), device, *pos, *globalPos, static_cast(pressure), static_cast(xTilt), static_cast(yTilt), static_cast(tangentialPressure), static_cast(rotation), static_cast(z), static_cast(keyState), static_cast(button), static_cast(buttons)); - *outptr_QTabletEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QTabletEvent* QTabletEvent_new(int t, QPointingDevice* device, QPointF* pos, QPointF* globalPos, double pressure, float xTilt, float yTilt, float tangentialPressure, double rotation, float z, int keyState, int button, int buttons) { + return new MiqtVirtualQTabletEvent(static_cast(t), device, *pos, *globalPos, static_cast(pressure), static_cast(xTilt), static_cast(yTilt), static_cast(tangentialPressure), static_cast(rotation), static_cast(z), static_cast(keyState), static_cast(button), static_cast(buttons)); +} + +void QTabletEvent_virtbase(QTabletEvent* src, QSinglePointEvent** outptr_QSinglePointEvent) { + *outptr_QSinglePointEvent = static_cast(src); } QTabletEvent* QTabletEvent_Clone(const QTabletEvent* self) { @@ -1816,31 +1735,20 @@ public: }; -void QNativeGestureEvent_new(int typeVal, QPointingDevice* dev, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, unsigned long long sequenceId, unsigned long long intArgument, QNativeGestureEvent** outptr_QNativeGestureEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQNativeGestureEvent* ret = new MiqtVirtualQNativeGestureEvent(static_cast(typeVal), dev, *localPos, *scenePos, *globalPos, static_cast(value), static_cast(sequenceId), static_cast(intArgument)); - *outptr_QNativeGestureEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QNativeGestureEvent* QNativeGestureEvent_new(int typeVal, QPointingDevice* dev, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, unsigned long long sequenceId, unsigned long long intArgument) { + return new MiqtVirtualQNativeGestureEvent(static_cast(typeVal), dev, *localPos, *scenePos, *globalPos, static_cast(value), static_cast(sequenceId), static_cast(intArgument)); } -void QNativeGestureEvent_new2(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta, QNativeGestureEvent** outptr_QNativeGestureEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQNativeGestureEvent* ret = new MiqtVirtualQNativeGestureEvent(static_cast(typeVal), dev, static_cast(fingerCount), *localPos, *scenePos, *globalPos, static_cast(value), *delta); - *outptr_QNativeGestureEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QNativeGestureEvent* QNativeGestureEvent_new2(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta) { + return new MiqtVirtualQNativeGestureEvent(static_cast(typeVal), dev, static_cast(fingerCount), *localPos, *scenePos, *globalPos, static_cast(value), *delta); } -void QNativeGestureEvent_new3(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta, unsigned long long sequenceId, QNativeGestureEvent** outptr_QNativeGestureEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQNativeGestureEvent* ret = new MiqtVirtualQNativeGestureEvent(static_cast(typeVal), dev, static_cast(fingerCount), *localPos, *scenePos, *globalPos, static_cast(value), *delta, static_cast(sequenceId)); - *outptr_QNativeGestureEvent = ret; - *outptr_QSinglePointEvent = static_cast(ret); - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QNativeGestureEvent* QNativeGestureEvent_new3(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta, unsigned long long sequenceId) { + return new MiqtVirtualQNativeGestureEvent(static_cast(typeVal), dev, static_cast(fingerCount), *localPos, *scenePos, *globalPos, static_cast(value), *delta, static_cast(sequenceId)); +} + +void QNativeGestureEvent_virtbase(QNativeGestureEvent* src, QSinglePointEvent** outptr_QSinglePointEvent) { + *outptr_QSinglePointEvent = static_cast(src); } QNativeGestureEvent* QNativeGestureEvent_Clone(const QNativeGestureEvent* self) { @@ -1989,74 +1897,51 @@ public: }; -void QKeyEvent_new(int typeVal, int key, int modifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers)); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QKeyEvent* QKeyEvent_new(int typeVal, int key, int modifiers) { + return new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers)); } -void QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers)); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QKeyEvent* QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers) { + return new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers)); } -void QKeyEvent_new3(int typeVal, int key, int modifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QKeyEvent* QKeyEvent_new3(int typeVal, int key, int modifiers, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString); } -void QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QKeyEvent* QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep); } -void QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QKeyEvent* QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep, static_cast(count)); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), text_QString, autorep, static_cast(count)); } -void QKeyEvent_new6(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QKeyEvent* QKeyEvent_new6(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString); } -void QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QKeyEvent* QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep); } -void QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QKeyEvent* QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep, static_cast(count)); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep, static_cast(count)); } -void QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QInputDevice* device, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QKeyEvent* QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QInputDevice* device) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQKeyEvent* ret = new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep, static_cast(count), device); - *outptr_QKeyEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQKeyEvent(static_cast(typeVal), static_cast(key), static_cast(modifiers), static_cast(nativeScanCode), static_cast(nativeVirtualKey), static_cast(nativeModifiers), text_QString, autorep, static_cast(count), device); +} + +void QKeyEvent_virtbase(QKeyEvent* src, QInputEvent** outptr_QInputEvent) { + *outptr_QInputEvent = static_cast(src); } QKeyEvent* QKeyEvent_Clone(const QKeyEvent* self) { @@ -2194,16 +2079,16 @@ public: }; -void QFocusEvent_new(int typeVal, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent) { - MiqtVirtualQFocusEvent* ret = new MiqtVirtualQFocusEvent(static_cast(typeVal)); - *outptr_QFocusEvent = ret; - *outptr_QEvent = static_cast(ret); +QFocusEvent* QFocusEvent_new(int typeVal) { + return new MiqtVirtualQFocusEvent(static_cast(typeVal)); } -void QFocusEvent_new2(int typeVal, int reason, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent) { - MiqtVirtualQFocusEvent* ret = new MiqtVirtualQFocusEvent(static_cast(typeVal), static_cast(reason)); - *outptr_QFocusEvent = ret; - *outptr_QEvent = static_cast(ret); +QFocusEvent* QFocusEvent_new2(int typeVal, int reason) { + return new MiqtVirtualQFocusEvent(static_cast(typeVal), static_cast(reason)); +} + +void QFocusEvent_virtbase(QFocusEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QFocusEvent* QFocusEvent_Clone(const QFocusEvent* self) { @@ -2303,16 +2188,16 @@ public: }; -void QPaintEvent_new(QRegion* paintRegion, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent) { - MiqtVirtualQPaintEvent* ret = new MiqtVirtualQPaintEvent(*paintRegion); - *outptr_QPaintEvent = ret; - *outptr_QEvent = static_cast(ret); +QPaintEvent* QPaintEvent_new(QRegion* paintRegion) { + return new MiqtVirtualQPaintEvent(*paintRegion); } -void QPaintEvent_new2(QRect* paintRect, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent) { - MiqtVirtualQPaintEvent* ret = new MiqtVirtualQPaintEvent(*paintRect); - *outptr_QPaintEvent = ret; - *outptr_QEvent = static_cast(ret); +QPaintEvent* QPaintEvent_new2(QRect* paintRect) { + return new MiqtVirtualQPaintEvent(*paintRect); +} + +void QPaintEvent_virtbase(QPaintEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QPaintEvent* QPaintEvent_Clone(const QPaintEvent* self) { @@ -2410,10 +2295,12 @@ public: }; -void QMoveEvent_new(QPoint* pos, QPoint* oldPos, QMoveEvent** outptr_QMoveEvent, QEvent** outptr_QEvent) { - MiqtVirtualQMoveEvent* ret = new MiqtVirtualQMoveEvent(*pos, *oldPos); - *outptr_QMoveEvent = ret; - *outptr_QEvent = static_cast(ret); +QMoveEvent* QMoveEvent_new(QPoint* pos, QPoint* oldPos) { + return new MiqtVirtualQMoveEvent(*pos, *oldPos); +} + +void QMoveEvent_virtbase(QMoveEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QMoveEvent* QMoveEvent_Clone(const QMoveEvent* self) { @@ -2511,10 +2398,12 @@ public: }; -void QExposeEvent_new(QRegion* m_region, QExposeEvent** outptr_QExposeEvent, QEvent** outptr_QEvent) { - MiqtVirtualQExposeEvent* ret = new MiqtVirtualQExposeEvent(*m_region); - *outptr_QExposeEvent = ret; - *outptr_QEvent = static_cast(ret); +QExposeEvent* QExposeEvent_new(QRegion* m_region) { + return new MiqtVirtualQExposeEvent(*m_region); +} + +void QExposeEvent_virtbase(QExposeEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QExposeEvent* QExposeEvent_Clone(const QExposeEvent* self) { @@ -2606,10 +2495,12 @@ public: }; -void QPlatformSurfaceEvent_new(int surfaceEventType, QPlatformSurfaceEvent** outptr_QPlatformSurfaceEvent, QEvent** outptr_QEvent) { - MiqtVirtualQPlatformSurfaceEvent* ret = new MiqtVirtualQPlatformSurfaceEvent(static_cast(surfaceEventType)); - *outptr_QPlatformSurfaceEvent = ret; - *outptr_QEvent = static_cast(ret); +QPlatformSurfaceEvent* QPlatformSurfaceEvent_new(int surfaceEventType) { + return new MiqtVirtualQPlatformSurfaceEvent(static_cast(surfaceEventType)); +} + +void QPlatformSurfaceEvent_virtbase(QPlatformSurfaceEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QPlatformSurfaceEvent* QPlatformSurfaceEvent_Clone(const QPlatformSurfaceEvent* self) { @@ -2700,10 +2591,12 @@ public: }; -void QResizeEvent_new(QSize* size, QSize* oldSize, QResizeEvent** outptr_QResizeEvent, QEvent** outptr_QEvent) { - MiqtVirtualQResizeEvent* ret = new MiqtVirtualQResizeEvent(*size, *oldSize); - *outptr_QResizeEvent = ret; - *outptr_QEvent = static_cast(ret); +QResizeEvent* QResizeEvent_new(QSize* size, QSize* oldSize) { + return new MiqtVirtualQResizeEvent(*size, *oldSize); +} + +void QResizeEvent_virtbase(QResizeEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QResizeEvent* QResizeEvent_Clone(const QResizeEvent* self) { @@ -2801,10 +2694,12 @@ public: }; -void QCloseEvent_new(QCloseEvent** outptr_QCloseEvent, QEvent** outptr_QEvent) { - MiqtVirtualQCloseEvent* ret = new MiqtVirtualQCloseEvent(); - *outptr_QCloseEvent = ret; - *outptr_QEvent = static_cast(ret); +QCloseEvent* QCloseEvent_new() { + return new MiqtVirtualQCloseEvent(); +} + +void QCloseEvent_virtbase(QCloseEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QCloseEvent* QCloseEvent_Clone(const QCloseEvent* self) { @@ -2890,10 +2785,12 @@ public: }; -void QIconDragEvent_new(QIconDragEvent** outptr_QIconDragEvent, QEvent** outptr_QEvent) { - MiqtVirtualQIconDragEvent* ret = new MiqtVirtualQIconDragEvent(); - *outptr_QIconDragEvent = ret; - *outptr_QEvent = static_cast(ret); +QIconDragEvent* QIconDragEvent_new() { + return new MiqtVirtualQIconDragEvent(); +} + +void QIconDragEvent_virtbase(QIconDragEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QIconDragEvent* QIconDragEvent_Clone(const QIconDragEvent* self) { @@ -2979,10 +2876,12 @@ public: }; -void QShowEvent_new(QShowEvent** outptr_QShowEvent, QEvent** outptr_QEvent) { - MiqtVirtualQShowEvent* ret = new MiqtVirtualQShowEvent(); - *outptr_QShowEvent = ret; - *outptr_QEvent = static_cast(ret); +QShowEvent* QShowEvent_new() { + return new MiqtVirtualQShowEvent(); +} + +void QShowEvent_virtbase(QShowEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QShowEvent* QShowEvent_Clone(const QShowEvent* self) { @@ -3068,10 +2967,12 @@ public: }; -void QHideEvent_new(QHideEvent** outptr_QHideEvent, QEvent** outptr_QEvent) { - MiqtVirtualQHideEvent* ret = new MiqtVirtualQHideEvent(); - *outptr_QHideEvent = ret; - *outptr_QEvent = static_cast(ret); +QHideEvent* QHideEvent_new() { + return new MiqtVirtualQHideEvent(); +} + +void QHideEvent_virtbase(QHideEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QHideEvent* QHideEvent_Clone(const QHideEvent* self) { @@ -3160,25 +3061,20 @@ public: }; -void QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQContextMenuEvent* ret = new MiqtVirtualQContextMenuEvent(static_cast(reason), *pos, *globalPos); - *outptr_QContextMenuEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QContextMenuEvent* QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos) { + return new MiqtVirtualQContextMenuEvent(static_cast(reason), *pos, *globalPos); } -void QContextMenuEvent_new2(int reason, QPoint* pos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQContextMenuEvent* ret = new MiqtVirtualQContextMenuEvent(static_cast(reason), *pos); - *outptr_QContextMenuEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QContextMenuEvent* QContextMenuEvent_new2(int reason, QPoint* pos) { + return new MiqtVirtualQContextMenuEvent(static_cast(reason), *pos); } -void QContextMenuEvent_new3(int reason, QPoint* pos, QPoint* globalPos, int modifiers, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQContextMenuEvent* ret = new MiqtVirtualQContextMenuEvent(static_cast(reason), *pos, *globalPos, static_cast(modifiers)); - *outptr_QContextMenuEvent = ret; - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QContextMenuEvent* QContextMenuEvent_new3(int reason, QPoint* pos, QPoint* globalPos, int modifiers) { + return new MiqtVirtualQContextMenuEvent(static_cast(reason), *pos, *globalPos, static_cast(modifiers)); +} + +void QContextMenuEvent_virtbase(QContextMenuEvent* src, QInputEvent** outptr_QInputEvent) { + *outptr_QInputEvent = static_cast(src); } QContextMenuEvent* QContextMenuEvent_Clone(const QContextMenuEvent* self) { @@ -3298,13 +3194,11 @@ public: }; -void QInputMethodEvent_new(QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent) { - MiqtVirtualQInputMethodEvent* ret = new MiqtVirtualQInputMethodEvent(); - *outptr_QInputMethodEvent = ret; - *outptr_QEvent = static_cast(ret); +QInputMethodEvent* QInputMethodEvent_new() { + return new MiqtVirtualQInputMethodEvent(); } -void QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes, QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent) { +QInputMethodEvent* QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes) { QString preeditText_QString = QString::fromUtf8(preeditText.data, preeditText.len); QList attributes_QList; attributes_QList.reserve(attributes.len); @@ -3312,9 +3206,11 @@ void QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* for(size_t i = 0; i < attributes.len; ++i) { attributes_QList.push_back(*(attributes_arr[i])); } - MiqtVirtualQInputMethodEvent* ret = new MiqtVirtualQInputMethodEvent(preeditText_QString, attributes_QList); - *outptr_QInputMethodEvent = ret; - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQInputMethodEvent(preeditText_QString, attributes_QList); +} + +void QInputMethodEvent_virtbase(QInputMethodEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QInputMethodEvent* QInputMethodEvent_Clone(const QInputMethodEvent* self) { @@ -3458,10 +3354,12 @@ public: }; -void QInputMethodQueryEvent_new(int queries, QInputMethodQueryEvent** outptr_QInputMethodQueryEvent, QEvent** outptr_QEvent) { - MiqtVirtualQInputMethodQueryEvent* ret = new MiqtVirtualQInputMethodQueryEvent(static_cast(queries)); - *outptr_QInputMethodQueryEvent = ret; - *outptr_QEvent = static_cast(ret); +QInputMethodQueryEvent* QInputMethodQueryEvent_new(int queries) { + return new MiqtVirtualQInputMethodQueryEvent(static_cast(queries)); +} + +void QInputMethodQueryEvent_virtbase(QInputMethodQueryEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QInputMethodQueryEvent* QInputMethodQueryEvent_Clone(const QInputMethodQueryEvent* self) { @@ -3561,16 +3459,16 @@ public: }; -void QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { - MiqtVirtualQDropEvent* ret = new MiqtVirtualQDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); - *outptr_QDropEvent = ret; - *outptr_QEvent = static_cast(ret); +QDropEvent* QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers) { + return new MiqtVirtualQDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); } -void QDropEvent_new2(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { - MiqtVirtualQDropEvent* ret = new MiqtVirtualQDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); - *outptr_QDropEvent = ret; - *outptr_QEvent = static_cast(ret); +QDropEvent* QDropEvent_new2(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal) { + return new MiqtVirtualQDropEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); +} + +void QDropEvent_virtbase(QDropEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QDropEvent* QDropEvent_Clone(const QDropEvent* self) { @@ -3696,18 +3594,16 @@ public: }; -void QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { - MiqtVirtualQDragMoveEvent* ret = new MiqtVirtualQDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); - *outptr_QDragMoveEvent = ret; - *outptr_QDropEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QDragMoveEvent* QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers) { + return new MiqtVirtualQDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); } -void QDragMoveEvent_new2(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { - MiqtVirtualQDragMoveEvent* ret = new MiqtVirtualQDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); - *outptr_QDragMoveEvent = ret; - *outptr_QDropEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QDragMoveEvent* QDragMoveEvent_new2(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal) { + return new MiqtVirtualQDragMoveEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers), static_cast(typeVal)); +} + +void QDragMoveEvent_virtbase(QDragMoveEvent* src, QDropEvent** outptr_QDropEvent) { + *outptr_QDropEvent = static_cast(src); } QDragMoveEvent* QDragMoveEvent_Clone(const QDragMoveEvent* self) { @@ -3781,12 +3677,12 @@ public: }; -void QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragEnterEvent** outptr_QDragEnterEvent, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent) { - MiqtVirtualQDragEnterEvent* ret = new MiqtVirtualQDragEnterEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); - *outptr_QDragEnterEvent = ret; - *outptr_QDragMoveEvent = static_cast(ret); - *outptr_QDropEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QDragEnterEvent* QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers) { + return new MiqtVirtualQDragEnterEvent(*pos, static_cast(actions), data, static_cast(buttons), static_cast(modifiers)); +} + +void QDragEnterEvent_virtbase(QDragEnterEvent* src, QDragMoveEvent** outptr_QDragMoveEvent) { + *outptr_QDragMoveEvent = static_cast(src); } QDragEnterEvent* QDragEnterEvent_Clone(const QDragEnterEvent* self) { @@ -3864,10 +3760,12 @@ public: }; -void QDragLeaveEvent_new(QDragLeaveEvent** outptr_QDragLeaveEvent, QEvent** outptr_QEvent) { - MiqtVirtualQDragLeaveEvent* ret = new MiqtVirtualQDragLeaveEvent(); - *outptr_QDragLeaveEvent = ret; - *outptr_QEvent = static_cast(ret); +QDragLeaveEvent* QDragLeaveEvent_new() { + return new MiqtVirtualQDragLeaveEvent(); +} + +void QDragLeaveEvent_virtbase(QDragLeaveEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QDragLeaveEvent* QDragLeaveEvent_Clone(const QDragLeaveEvent* self) { @@ -3953,10 +3851,12 @@ public: }; -void QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos, QHelpEvent** outptr_QHelpEvent, QEvent** outptr_QEvent) { - MiqtVirtualQHelpEvent* ret = new MiqtVirtualQHelpEvent(static_cast(typeVal), *pos, *globalPos); - *outptr_QHelpEvent = ret; - *outptr_QEvent = static_cast(ret); +QHelpEvent* QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos) { + return new MiqtVirtualQHelpEvent(static_cast(typeVal), *pos, *globalPos); +} + +void QHelpEvent_virtbase(QHelpEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QHelpEvent* QHelpEvent_Clone(const QHelpEvent* self) { @@ -4070,11 +3970,13 @@ public: }; -void QStatusTipEvent_new(struct miqt_string tip, QStatusTipEvent** outptr_QStatusTipEvent, QEvent** outptr_QEvent) { +QStatusTipEvent* QStatusTipEvent_new(struct miqt_string tip) { QString tip_QString = QString::fromUtf8(tip.data, tip.len); - MiqtVirtualQStatusTipEvent* ret = new MiqtVirtualQStatusTipEvent(tip_QString); - *outptr_QStatusTipEvent = ret; - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQStatusTipEvent(tip_QString); +} + +void QStatusTipEvent_virtbase(QStatusTipEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QStatusTipEvent* QStatusTipEvent_Clone(const QStatusTipEvent* self) { @@ -4171,11 +4073,13 @@ public: }; -void QWhatsThisClickedEvent_new(struct miqt_string href, QWhatsThisClickedEvent** outptr_QWhatsThisClickedEvent, QEvent** outptr_QEvent) { +QWhatsThisClickedEvent* QWhatsThisClickedEvent_new(struct miqt_string href) { QString href_QString = QString::fromUtf8(href.data, href.len); - MiqtVirtualQWhatsThisClickedEvent* ret = new MiqtVirtualQWhatsThisClickedEvent(href_QString); - *outptr_QWhatsThisClickedEvent = ret; - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQWhatsThisClickedEvent(href_QString); +} + +void QWhatsThisClickedEvent_virtbase(QWhatsThisClickedEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QWhatsThisClickedEvent* QWhatsThisClickedEvent_Clone(const QWhatsThisClickedEvent* self) { @@ -4273,16 +4177,16 @@ public: }; -void QActionEvent_new(int typeVal, QAction* action, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent) { - MiqtVirtualQActionEvent* ret = new MiqtVirtualQActionEvent(static_cast(typeVal), action); - *outptr_QActionEvent = ret; - *outptr_QEvent = static_cast(ret); +QActionEvent* QActionEvent_new(int typeVal, QAction* action) { + return new MiqtVirtualQActionEvent(static_cast(typeVal), action); } -void QActionEvent_new2(int typeVal, QAction* action, QAction* before, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent) { - MiqtVirtualQActionEvent* ret = new MiqtVirtualQActionEvent(static_cast(typeVal), action, before); - *outptr_QActionEvent = ret; - *outptr_QEvent = static_cast(ret); +QActionEvent* QActionEvent_new2(int typeVal, QAction* action, QAction* before) { + return new MiqtVirtualQActionEvent(static_cast(typeVal), action, before); +} + +void QActionEvent_virtbase(QActionEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QActionEvent* QActionEvent_Clone(const QActionEvent* self) { @@ -4377,17 +4281,17 @@ public: }; -void QFileOpenEvent_new(struct miqt_string file, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent) { +QFileOpenEvent* QFileOpenEvent_new(struct miqt_string file) { QString file_QString = QString::fromUtf8(file.data, file.len); - MiqtVirtualQFileOpenEvent* ret = new MiqtVirtualQFileOpenEvent(file_QString); - *outptr_QFileOpenEvent = ret; - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQFileOpenEvent(file_QString); } -void QFileOpenEvent_new2(QUrl* url, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent) { - MiqtVirtualQFileOpenEvent* ret = new MiqtVirtualQFileOpenEvent(*url); - *outptr_QFileOpenEvent = ret; - *outptr_QEvent = static_cast(ret); +QFileOpenEvent* QFileOpenEvent_new2(QUrl* url) { + return new MiqtVirtualQFileOpenEvent(*url); +} + +void QFileOpenEvent_virtbase(QFileOpenEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QFileOpenEvent* QFileOpenEvent_Clone(const QFileOpenEvent* self) { @@ -4492,10 +4396,12 @@ public: }; -void QToolBarChangeEvent_new(bool t, QToolBarChangeEvent** outptr_QToolBarChangeEvent, QEvent** outptr_QEvent) { - MiqtVirtualQToolBarChangeEvent* ret = new MiqtVirtualQToolBarChangeEvent(t); - *outptr_QToolBarChangeEvent = ret; - *outptr_QEvent = static_cast(ret); +QToolBarChangeEvent* QToolBarChangeEvent_new(bool t) { + return new MiqtVirtualQToolBarChangeEvent(t); +} + +void QToolBarChangeEvent_virtbase(QToolBarChangeEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QToolBarChangeEvent* QToolBarChangeEvent_Clone(const QToolBarChangeEvent* self) { @@ -4586,16 +4492,16 @@ public: }; -void QShortcutEvent_new(QKeySequence* key, int id, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent) { - MiqtVirtualQShortcutEvent* ret = new MiqtVirtualQShortcutEvent(*key, static_cast(id)); - *outptr_QShortcutEvent = ret; - *outptr_QEvent = static_cast(ret); +QShortcutEvent* QShortcutEvent_new(QKeySequence* key, int id) { + return new MiqtVirtualQShortcutEvent(*key, static_cast(id)); } -void QShortcutEvent_new2(QKeySequence* key, int id, bool ambiguous, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent) { - MiqtVirtualQShortcutEvent* ret = new MiqtVirtualQShortcutEvent(*key, static_cast(id), ambiguous); - *outptr_QShortcutEvent = ret; - *outptr_QEvent = static_cast(ret); +QShortcutEvent* QShortcutEvent_new2(QKeySequence* key, int id, bool ambiguous) { + return new MiqtVirtualQShortcutEvent(*key, static_cast(id), ambiguous); +} + +void QShortcutEvent_virtbase(QShortcutEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QShortcutEvent* QShortcutEvent_Clone(const QShortcutEvent* self) { @@ -4696,16 +4602,16 @@ public: }; -void QWindowStateChangeEvent_new(int oldState, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent) { - MiqtVirtualQWindowStateChangeEvent* ret = new MiqtVirtualQWindowStateChangeEvent(static_cast(oldState)); - *outptr_QWindowStateChangeEvent = ret; - *outptr_QEvent = static_cast(ret); +QWindowStateChangeEvent* QWindowStateChangeEvent_new(int oldState) { + return new MiqtVirtualQWindowStateChangeEvent(static_cast(oldState)); } -void QWindowStateChangeEvent_new2(int oldState, bool isOverride, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent) { - MiqtVirtualQWindowStateChangeEvent* ret = new MiqtVirtualQWindowStateChangeEvent(static_cast(oldState), isOverride); - *outptr_QWindowStateChangeEvent = ret; - *outptr_QEvent = static_cast(ret); +QWindowStateChangeEvent* QWindowStateChangeEvent_new2(int oldState, bool isOverride) { + return new MiqtVirtualQWindowStateChangeEvent(static_cast(oldState), isOverride); +} + +void QWindowStateChangeEvent_virtbase(QWindowStateChangeEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QWindowStateChangeEvent* QWindowStateChangeEvent_Clone(const QWindowStateChangeEvent* self) { @@ -4896,64 +4802,44 @@ public: }; -void QTouchEvent_new(int eventType, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQTouchEvent* ret = new MiqtVirtualQTouchEvent(static_cast(eventType)); - *outptr_QTouchEvent = ret; - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QTouchEvent* QTouchEvent_new(int eventType) { + return new MiqtVirtualQTouchEvent(static_cast(eventType)); } -void QTouchEvent_new2(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQTouchEvent* ret = new MiqtVirtualQTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates)); - *outptr_QTouchEvent = ret; - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QTouchEvent* QTouchEvent_new2(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates) { + return new MiqtVirtualQTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates)); } -void QTouchEvent_new3(int eventType, QPointingDevice* device, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQTouchEvent* ret = new MiqtVirtualQTouchEvent(static_cast(eventType), device); - *outptr_QTouchEvent = ret; - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QTouchEvent* QTouchEvent_new3(int eventType, QPointingDevice* device) { + return new MiqtVirtualQTouchEvent(static_cast(eventType), device); } -void QTouchEvent_new4(int eventType, QPointingDevice* device, int modifiers, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { - MiqtVirtualQTouchEvent* ret = new MiqtVirtualQTouchEvent(static_cast(eventType), device, static_cast(modifiers)); - *outptr_QTouchEvent = ret; - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QTouchEvent* QTouchEvent_new4(int eventType, QPointingDevice* device, int modifiers) { + return new MiqtVirtualQTouchEvent(static_cast(eventType), device, static_cast(modifiers)); } -void QTouchEvent_new5(int eventType, QPointingDevice* device, int modifiers, struct miqt_array /* of QEventPoint* */ touchPoints, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QTouchEvent* QTouchEvent_new5(int eventType, QPointingDevice* device, int modifiers, struct miqt_array /* of QEventPoint* */ touchPoints) { QList touchPoints_QList; touchPoints_QList.reserve(touchPoints.len); QEventPoint** touchPoints_arr = static_cast(touchPoints.data); for(size_t i = 0; i < touchPoints.len; ++i) { touchPoints_QList.push_back(*(touchPoints_arr[i])); } - MiqtVirtualQTouchEvent* ret = new MiqtVirtualQTouchEvent(static_cast(eventType), device, static_cast(modifiers), touchPoints_QList); - *outptr_QTouchEvent = ret; - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQTouchEvent(static_cast(eventType), device, static_cast(modifiers), touchPoints_QList); } -void QTouchEvent_new6(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates, struct miqt_array /* of QEventPoint* */ touchPoints, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent) { +QTouchEvent* QTouchEvent_new6(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates, struct miqt_array /* of QEventPoint* */ touchPoints) { QList touchPoints_QList; touchPoints_QList.reserve(touchPoints.len); QEventPoint** touchPoints_arr = static_cast(touchPoints.data); for(size_t i = 0; i < touchPoints.len; ++i) { touchPoints_QList.push_back(*(touchPoints_arr[i])); } - MiqtVirtualQTouchEvent* ret = new MiqtVirtualQTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates), touchPoints_QList); - *outptr_QTouchEvent = ret; - *outptr_QPointerEvent = static_cast(ret); - *outptr_QInputEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQTouchEvent(static_cast(eventType), device, static_cast(modifiers), static_cast(touchPointStates), touchPoints_QList); +} + +void QTouchEvent_virtbase(QTouchEvent* src, QPointerEvent** outptr_QPointerEvent) { + *outptr_QPointerEvent = static_cast(src); } QTouchEvent* QTouchEvent_Clone(const QTouchEvent* self) { @@ -5105,10 +4991,12 @@ public: }; -void QScrollPrepareEvent_new(QPointF* startPos, QScrollPrepareEvent** outptr_QScrollPrepareEvent, QEvent** outptr_QEvent) { - MiqtVirtualQScrollPrepareEvent* ret = new MiqtVirtualQScrollPrepareEvent(*startPos); - *outptr_QScrollPrepareEvent = ret; - *outptr_QEvent = static_cast(ret); +QScrollPrepareEvent* QScrollPrepareEvent_new(QPointF* startPos) { + return new MiqtVirtualQScrollPrepareEvent(*startPos); +} + +void QScrollPrepareEvent_virtbase(QScrollPrepareEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QScrollPrepareEvent* QScrollPrepareEvent_Clone(const QScrollPrepareEvent* self) { @@ -5222,10 +5110,12 @@ public: }; -void QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState, QScrollEvent** outptr_QScrollEvent, QEvent** outptr_QEvent) { - MiqtVirtualQScrollEvent* ret = new MiqtVirtualQScrollEvent(*contentPos, *overshoot, static_cast(scrollState)); - *outptr_QScrollEvent = ret; - *outptr_QEvent = static_cast(ret); +QScrollEvent* QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState) { + return new MiqtVirtualQScrollEvent(*contentPos, *overshoot, static_cast(scrollState)); +} + +void QScrollEvent_virtbase(QScrollEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QScrollEvent* QScrollEvent_Clone(const QScrollEvent* self) { @@ -5324,10 +5214,12 @@ public: }; -void QScreenOrientationChangeEvent_new(QScreen* screen, int orientation, QScreenOrientationChangeEvent** outptr_QScreenOrientationChangeEvent, QEvent** outptr_QEvent) { - MiqtVirtualQScreenOrientationChangeEvent* ret = new MiqtVirtualQScreenOrientationChangeEvent(screen, static_cast(orientation)); - *outptr_QScreenOrientationChangeEvent = ret; - *outptr_QEvent = static_cast(ret); +QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_new(QScreen* screen, int orientation) { + return new MiqtVirtualQScreenOrientationChangeEvent(screen, static_cast(orientation)); +} + +void QScreenOrientationChangeEvent_virtbase(QScreenOrientationChangeEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_Clone(const QScreenOrientationChangeEvent* self) { @@ -5422,10 +5314,12 @@ public: }; -void QApplicationStateChangeEvent_new(int state, QApplicationStateChangeEvent** outptr_QApplicationStateChangeEvent, QEvent** outptr_QEvent) { - MiqtVirtualQApplicationStateChangeEvent* ret = new MiqtVirtualQApplicationStateChangeEvent(static_cast(state)); - *outptr_QApplicationStateChangeEvent = ret; - *outptr_QEvent = static_cast(ret); +QApplicationStateChangeEvent* QApplicationStateChangeEvent_new(int state) { + return new MiqtVirtualQApplicationStateChangeEvent(static_cast(state)); +} + +void QApplicationStateChangeEvent_virtbase(QApplicationStateChangeEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QApplicationStateChangeEvent* QApplicationStateChangeEvent_Clone(const QApplicationStateChangeEvent* self) { @@ -5461,19 +5355,16 @@ void QApplicationStateChangeEvent_Delete(QApplicationStateChangeEvent* self, boo } } -void QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute) { - QInputMethodEvent::Attribute* ret = new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l), *val); - *outptr_QInputMethodEvent__Attribute = ret; +QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val) { + return new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l), *val); } -void QInputMethodEvent__Attribute_new2(int typ, int s, int l, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute) { - QInputMethodEvent::Attribute* ret = new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l)); - *outptr_QInputMethodEvent__Attribute = ret; +QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new2(int typ, int s, int l) { + return new QInputMethodEvent::Attribute(static_cast(typ), static_cast(s), static_cast(l)); } -void QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute) { - QInputMethodEvent::Attribute* ret = new QInputMethodEvent::Attribute(*param1); - *outptr_QInputMethodEvent__Attribute = ret; +QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1) { + return new QInputMethodEvent::Attribute(*param1); } void QInputMethodEvent__Attribute_OperatorAssign(QInputMethodEvent__Attribute* self, QInputMethodEvent__Attribute* param1) { diff --git a/qt6/gen_qevent.go b/qt6/gen_qevent.go index 70eef361..186a07ea 100644 --- a/qt6/gen_qevent.go +++ b/qt6/gen_qevent.go @@ -74,52 +74,44 @@ func (this *QInputEvent) UnsafePointer() unsafe.Pointer { } // newQInputEvent constructs the type using only CGO pointers. -func newQInputEvent(h *C.QInputEvent, h_QEvent *C.QEvent) *QInputEvent { +func newQInputEvent(h *C.QInputEvent) *QInputEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QInputEvent_virtbase(h, &outptr_QEvent) + return &QInputEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQInputEvent constructs the type using only unsafe pointers. -func UnsafeNewQInputEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QInputEvent { - if h == nil { - return nil - } - - return &QInputEvent{h: (*C.QInputEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQInputEvent(h unsafe.Pointer) *QInputEvent { + return newQInputEvent((*C.QInputEvent)(h)) } // NewQInputEvent constructs a new QInputEvent object. func NewQInputEvent(typeVal QEvent__Type, m_dev *QInputDevice) *QInputEvent { - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QInputEvent_new((C.int)(typeVal), m_dev.cPointer(), &outptr_QInputEvent, &outptr_QEvent) - ret := newQInputEvent(outptr_QInputEvent, outptr_QEvent) + ret := newQInputEvent(C.QInputEvent_new((C.int)(typeVal), m_dev.cPointer())) ret.isSubclass = true return ret } // NewQInputEvent2 constructs a new QInputEvent object. func NewQInputEvent2(typeVal QEvent__Type, m_dev *QInputDevice, modifiers KeyboardModifier) *QInputEvent { - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QInputEvent_new2((C.int)(typeVal), m_dev.cPointer(), (C.int)(modifiers), &outptr_QInputEvent, &outptr_QEvent) - ret := newQInputEvent(outptr_QInputEvent, outptr_QEvent) + ret := newQInputEvent(C.QInputEvent_new2((C.int)(typeVal), m_dev.cPointer(), (C.int)(modifiers))) ret.isSubclass = true return ret } func (this *QInputEvent) Clone() *QInputEvent { - return newQInputEvent(C.QInputEvent_Clone(this.h), nil) + return newQInputEvent(C.QInputEvent_Clone(this.h)) } func (this *QInputEvent) Device() *QInputDevice { - return newQInputDevice(C.QInputEvent_Device(this.h), nil) + return newQInputDevice(C.QInputEvent_Device(this.h)) } func (this *QInputEvent) DeviceType() QInputDevice__DeviceType { @@ -144,7 +136,7 @@ func (this *QInputEvent) SetTimestamp(timestamp uint64) { func (this *QInputEvent) callVirtualBase_Clone() *QInputEvent { - return newQInputEvent(C.QInputEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQInputEvent(C.QInputEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QInputEvent) OnClone(slot func(super func() *QInputEvent) *QInputEvent) { @@ -254,44 +246,34 @@ func (this *QPointerEvent) UnsafePointer() unsafe.Pointer { } // newQPointerEvent constructs the type using only CGO pointers. -func newQPointerEvent(h *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QPointerEvent { +func newQPointerEvent(h *C.QPointerEvent) *QPointerEvent { if h == nil { return nil } + var outptr_QInputEvent *C.QInputEvent = nil + C.QPointerEvent_virtbase(h, &outptr_QInputEvent) + return &QPointerEvent{h: h, - QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} + QInputEvent: newQInputEvent(outptr_QInputEvent)} } // UnsafeNewQPointerEvent constructs the type using only unsafe pointers. -func UnsafeNewQPointerEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QPointerEvent { - if h == nil { - return nil - } - - return &QPointerEvent{h: (*C.QPointerEvent)(h), - QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} +func UnsafeNewQPointerEvent(h unsafe.Pointer) *QPointerEvent { + return newQPointerEvent((*C.QPointerEvent)(h)) } // NewQPointerEvent constructs a new QPointerEvent object. func NewQPointerEvent(typeVal QEvent__Type, dev *QPointingDevice) *QPointerEvent { - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QPointerEvent_new((C.int)(typeVal), dev.cPointer(), &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQPointerEvent(outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQPointerEvent(C.QPointerEvent_new((C.int)(typeVal), dev.cPointer())) ret.isSubclass = true return ret } // NewQPointerEvent2 constructs a new QPointerEvent object. func NewQPointerEvent2(typeVal QEvent__Type, dev *QPointingDevice, modifiers KeyboardModifier) *QPointerEvent { - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QPointerEvent_new2((C.int)(typeVal), dev.cPointer(), (C.int)(modifiers), &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQPointerEvent(outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQPointerEvent(C.QPointerEvent_new2((C.int)(typeVal), dev.cPointer(), (C.int)(modifiers))) ret.isSubclass = true return ret } @@ -304,22 +286,18 @@ func NewQPointerEvent3(typeVal QEvent__Type, dev *QPointingDevice, modifiers Key points_CArray[i] = points[i].cPointer() } points_ma := C.struct_miqt_array{len: C.size_t(len(points)), data: unsafe.Pointer(points_CArray)} - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QPointerEvent_new3((C.int)(typeVal), dev.cPointer(), (C.int)(modifiers), points_ma, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQPointerEvent(outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQPointerEvent(C.QPointerEvent_new3((C.int)(typeVal), dev.cPointer(), (C.int)(modifiers), points_ma)) ret.isSubclass = true return ret } func (this *QPointerEvent) Clone() *QPointerEvent { - return newQPointerEvent(C.QPointerEvent_Clone(this.h), nil, nil) + return newQPointerEvent(C.QPointerEvent_Clone(this.h)) } func (this *QPointerEvent) PointingDevice() *QPointingDevice { - return newQPointingDevice(C.QPointerEvent_PointingDevice(this.h), nil, nil) + return newQPointingDevice(C.QPointerEvent_PointingDevice(this.h)) } func (this *QPointerEvent) PointerType() QPointingDevice__PointerType { @@ -400,7 +378,7 @@ func (this *QPointerEvent) RemovePassiveGrabber(point *QEventPoint, grabber *QOb func (this *QPointerEvent) callVirtualBase_Clone() *QPointerEvent { - return newQPointerEvent(C.QPointerEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil, nil) + return newQPointerEvent(C.QPointerEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QPointerEvent) OnClone(slot func(super func() *QPointerEvent) *QPointerEvent) { @@ -585,26 +563,24 @@ func (this *QSinglePointEvent) UnsafePointer() unsafe.Pointer { } // newQSinglePointEvent constructs the type using only CGO pointers. -func newQSinglePointEvent(h *C.QSinglePointEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QSinglePointEvent { +func newQSinglePointEvent(h *C.QSinglePointEvent) *QSinglePointEvent { if h == nil { return nil } + var outptr_QPointerEvent *C.QPointerEvent = nil + C.QSinglePointEvent_virtbase(h, &outptr_QPointerEvent) + return &QSinglePointEvent{h: h, - QPointerEvent: newQPointerEvent(h_QPointerEvent, h_QInputEvent, h_QEvent)} + QPointerEvent: newQPointerEvent(outptr_QPointerEvent)} } // UnsafeNewQSinglePointEvent constructs the type using only unsafe pointers. -func UnsafeNewQSinglePointEvent(h unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QSinglePointEvent { - if h == nil { - return nil - } - - return &QSinglePointEvent{h: (*C.QSinglePointEvent)(h), - QPointerEvent: UnsafeNewQPointerEvent(h_QPointerEvent, h_QInputEvent, h_QEvent)} +func UnsafeNewQSinglePointEvent(h unsafe.Pointer) *QSinglePointEvent { + return newQSinglePointEvent((*C.QSinglePointEvent)(h)) } func (this *QSinglePointEvent) Clone() *QSinglePointEvent { - return newQSinglePointEvent(C.QSinglePointEvent_Clone(this.h), nil, nil, nil) + return newQSinglePointEvent(C.QSinglePointEvent_Clone(this.h)) } func (this *QSinglePointEvent) Button() MouseButton { @@ -688,54 +664,40 @@ func (this *QEnterEvent) UnsafePointer() unsafe.Pointer { } // newQEnterEvent constructs the type using only CGO pointers. -func newQEnterEvent(h *C.QEnterEvent, h_QSinglePointEvent *C.QSinglePointEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QEnterEvent { +func newQEnterEvent(h *C.QEnterEvent) *QEnterEvent { if h == nil { return nil } + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + C.QEnterEvent_virtbase(h, &outptr_QSinglePointEvent) + return &QEnterEvent{h: h, - QSinglePointEvent: newQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} + QSinglePointEvent: newQSinglePointEvent(outptr_QSinglePointEvent)} } // UnsafeNewQEnterEvent constructs the type using only unsafe pointers. -func UnsafeNewQEnterEvent(h unsafe.Pointer, h_QSinglePointEvent unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QEnterEvent { - if h == nil { - return nil - } - - return &QEnterEvent{h: (*C.QEnterEvent)(h), - QSinglePointEvent: UnsafeNewQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} +func UnsafeNewQEnterEvent(h unsafe.Pointer) *QEnterEvent { + return newQEnterEvent((*C.QEnterEvent)(h)) } // NewQEnterEvent constructs a new QEnterEvent object. func NewQEnterEvent(localPos *QPointF, scenePos *QPointF, globalPos *QPointF) *QEnterEvent { - var outptr_QEnterEvent *C.QEnterEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QEnterEvent_new(localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), &outptr_QEnterEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQEnterEvent(outptr_QEnterEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQEnterEvent(C.QEnterEvent_new(localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer())) ret.isSubclass = true return ret } // NewQEnterEvent2 constructs a new QEnterEvent object. func NewQEnterEvent2(localPos *QPointF, scenePos *QPointF, globalPos *QPointF, device *QPointingDevice) *QEnterEvent { - var outptr_QEnterEvent *C.QEnterEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QEnterEvent_new2(localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), device.cPointer(), &outptr_QEnterEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQEnterEvent(outptr_QEnterEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQEnterEvent(C.QEnterEvent_new2(localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), device.cPointer())) ret.isSubclass = true return ret } func (this *QEnterEvent) Clone() *QEnterEvent { - return newQEnterEvent(C.QEnterEvent_Clone(this.h), nil, nil, nil, nil) + return newQEnterEvent(C.QEnterEvent_Clone(this.h)) } func (this *QEnterEvent) Pos() *QPoint { @@ -786,7 +748,7 @@ func (this *QEnterEvent) ScreenPos() *QPointF { func (this *QEnterEvent) callVirtualBase_Clone() *QEnterEvent { - return newQEnterEvent(C.QEnterEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil, nil, nil, nil) + return newQEnterEvent(C.QEnterEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QEnterEvent) OnClone(slot func(super func() *QEnterEvent) *QEnterEvent) { @@ -919,138 +881,88 @@ func (this *QMouseEvent) UnsafePointer() unsafe.Pointer { } // newQMouseEvent constructs the type using only CGO pointers. -func newQMouseEvent(h *C.QMouseEvent, h_QSinglePointEvent *C.QSinglePointEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QMouseEvent { +func newQMouseEvent(h *C.QMouseEvent) *QMouseEvent { if h == nil { return nil } + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + C.QMouseEvent_virtbase(h, &outptr_QSinglePointEvent) + return &QMouseEvent{h: h, - QSinglePointEvent: newQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} + QSinglePointEvent: newQSinglePointEvent(outptr_QSinglePointEvent)} } // UnsafeNewQMouseEvent constructs the type using only unsafe pointers. -func UnsafeNewQMouseEvent(h unsafe.Pointer, h_QSinglePointEvent unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QMouseEvent { - if h == nil { - return nil - } - - return &QMouseEvent{h: (*C.QMouseEvent)(h), - QSinglePointEvent: UnsafeNewQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} +func UnsafeNewQMouseEvent(h unsafe.Pointer) *QMouseEvent { + return newQMouseEvent((*C.QMouseEvent)(h)) } // NewQMouseEvent constructs a new QMouseEvent object. func NewQMouseEvent(typeVal QEvent__Type, localPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier) *QMouseEvent { - var outptr_QMouseEvent *C.QMouseEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMouseEvent_new((C.int)(typeVal), localPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQMouseEvent(C.QMouseEvent_new((C.int)(typeVal), localPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQMouseEvent2 constructs a new QMouseEvent object. func NewQMouseEvent2(typeVal QEvent__Type, localPos *QPointF, globalPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier) *QMouseEvent { - var outptr_QMouseEvent *C.QMouseEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMouseEvent_new2((C.int)(typeVal), localPos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQMouseEvent(C.QMouseEvent_new2((C.int)(typeVal), localPos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQMouseEvent3 constructs a new QMouseEvent object. func NewQMouseEvent3(typeVal QEvent__Type, localPos *QPointF, scenePos *QPointF, globalPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier) *QMouseEvent { - var outptr_QMouseEvent *C.QMouseEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMouseEvent_new3((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQMouseEvent(C.QMouseEvent_new3((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQMouseEvent4 constructs a new QMouseEvent object. func NewQMouseEvent4(typeVal QEvent__Type, localPos *QPointF, scenePos *QPointF, globalPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier, source MouseEventSource) *QMouseEvent { - var outptr_QMouseEvent *C.QMouseEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMouseEvent_new4((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), (C.int)(source), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQMouseEvent(C.QMouseEvent_new4((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), (C.int)(source))) ret.isSubclass = true return ret } // NewQMouseEvent5 constructs a new QMouseEvent object. func NewQMouseEvent5(typeVal QEvent__Type, localPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier, device *QPointingDevice) *QMouseEvent { - var outptr_QMouseEvent *C.QMouseEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMouseEvent_new5((C.int)(typeVal), localPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), device.cPointer(), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQMouseEvent(C.QMouseEvent_new5((C.int)(typeVal), localPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), device.cPointer())) ret.isSubclass = true return ret } // NewQMouseEvent6 constructs a new QMouseEvent object. func NewQMouseEvent6(typeVal QEvent__Type, localPos *QPointF, globalPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier, device *QPointingDevice) *QMouseEvent { - var outptr_QMouseEvent *C.QMouseEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMouseEvent_new6((C.int)(typeVal), localPos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), device.cPointer(), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQMouseEvent(C.QMouseEvent_new6((C.int)(typeVal), localPos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), device.cPointer())) ret.isSubclass = true return ret } // NewQMouseEvent7 constructs a new QMouseEvent object. func NewQMouseEvent7(typeVal QEvent__Type, localPos *QPointF, scenePos *QPointF, globalPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier, device *QPointingDevice) *QMouseEvent { - var outptr_QMouseEvent *C.QMouseEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMouseEvent_new7((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), device.cPointer(), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQMouseEvent(C.QMouseEvent_new7((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), device.cPointer())) ret.isSubclass = true return ret } // NewQMouseEvent8 constructs a new QMouseEvent object. func NewQMouseEvent8(typeVal QEvent__Type, localPos *QPointF, scenePos *QPointF, globalPos *QPointF, button MouseButton, buttons MouseButton, modifiers KeyboardModifier, source MouseEventSource, device *QPointingDevice) *QMouseEvent { - var outptr_QMouseEvent *C.QMouseEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMouseEvent_new8((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), (C.int)(source), device.cPointer(), &outptr_QMouseEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQMouseEvent(outptr_QMouseEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQMouseEvent(C.QMouseEvent_new8((C.int)(typeVal), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.int)(button), (C.int)(buttons), (C.int)(modifiers), (C.int)(source), device.cPointer())) ret.isSubclass = true return ret } func (this *QMouseEvent) Clone() *QMouseEvent { - return newQMouseEvent(C.QMouseEvent_Clone(this.h), nil, nil, nil, nil) + return newQMouseEvent(C.QMouseEvent_Clone(this.h)) } func (this *QMouseEvent) Pos() *QPoint { @@ -1109,7 +1021,7 @@ func (this *QMouseEvent) Flags() MouseEventFlag { func (this *QMouseEvent) callVirtualBase_Clone() *QMouseEvent { - return newQMouseEvent(C.QMouseEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil, nil, nil, nil) + return newQMouseEvent(C.QMouseEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QMouseEvent) OnClone(slot func(super func() *QMouseEvent) *QMouseEvent) { @@ -1242,110 +1154,72 @@ func (this *QHoverEvent) UnsafePointer() unsafe.Pointer { } // newQHoverEvent constructs the type using only CGO pointers. -func newQHoverEvent(h *C.QHoverEvent, h_QSinglePointEvent *C.QSinglePointEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QHoverEvent { +func newQHoverEvent(h *C.QHoverEvent) *QHoverEvent { if h == nil { return nil } + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + C.QHoverEvent_virtbase(h, &outptr_QSinglePointEvent) + return &QHoverEvent{h: h, - QSinglePointEvent: newQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} + QSinglePointEvent: newQSinglePointEvent(outptr_QSinglePointEvent)} } // UnsafeNewQHoverEvent constructs the type using only unsafe pointers. -func UnsafeNewQHoverEvent(h unsafe.Pointer, h_QSinglePointEvent unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QHoverEvent { - if h == nil { - return nil - } - - return &QHoverEvent{h: (*C.QHoverEvent)(h), - QSinglePointEvent: UnsafeNewQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} +func UnsafeNewQHoverEvent(h unsafe.Pointer) *QHoverEvent { + return newQHoverEvent((*C.QHoverEvent)(h)) } // NewQHoverEvent constructs a new QHoverEvent object. func NewQHoverEvent(typeVal QEvent__Type, scenePos *QPointF, globalPos *QPointF, oldPos *QPointF) *QHoverEvent { - var outptr_QHoverEvent *C.QHoverEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QHoverEvent_new((C.int)(typeVal), scenePos.cPointer(), globalPos.cPointer(), oldPos.cPointer(), &outptr_QHoverEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQHoverEvent(outptr_QHoverEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQHoverEvent(C.QHoverEvent_new((C.int)(typeVal), scenePos.cPointer(), globalPos.cPointer(), oldPos.cPointer())) ret.isSubclass = true return ret } // NewQHoverEvent2 constructs a new QHoverEvent object. func NewQHoverEvent2(typeVal QEvent__Type, pos *QPointF, oldPos *QPointF) *QHoverEvent { - var outptr_QHoverEvent *C.QHoverEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QHoverEvent_new2((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), &outptr_QHoverEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQHoverEvent(outptr_QHoverEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQHoverEvent(C.QHoverEvent_new2((C.int)(typeVal), pos.cPointer(), oldPos.cPointer())) ret.isSubclass = true return ret } // NewQHoverEvent3 constructs a new QHoverEvent object. func NewQHoverEvent3(typeVal QEvent__Type, scenePos *QPointF, globalPos *QPointF, oldPos *QPointF, modifiers KeyboardModifier) *QHoverEvent { - var outptr_QHoverEvent *C.QHoverEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QHoverEvent_new3((C.int)(typeVal), scenePos.cPointer(), globalPos.cPointer(), oldPos.cPointer(), (C.int)(modifiers), &outptr_QHoverEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQHoverEvent(outptr_QHoverEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQHoverEvent(C.QHoverEvent_new3((C.int)(typeVal), scenePos.cPointer(), globalPos.cPointer(), oldPos.cPointer(), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQHoverEvent4 constructs a new QHoverEvent object. func NewQHoverEvent4(typeVal QEvent__Type, scenePos *QPointF, globalPos *QPointF, oldPos *QPointF, modifiers KeyboardModifier, device *QPointingDevice) *QHoverEvent { - var outptr_QHoverEvent *C.QHoverEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QHoverEvent_new4((C.int)(typeVal), scenePos.cPointer(), globalPos.cPointer(), oldPos.cPointer(), (C.int)(modifiers), device.cPointer(), &outptr_QHoverEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQHoverEvent(outptr_QHoverEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQHoverEvent(C.QHoverEvent_new4((C.int)(typeVal), scenePos.cPointer(), globalPos.cPointer(), oldPos.cPointer(), (C.int)(modifiers), device.cPointer())) ret.isSubclass = true return ret } // NewQHoverEvent5 constructs a new QHoverEvent object. func NewQHoverEvent5(typeVal QEvent__Type, pos *QPointF, oldPos *QPointF, modifiers KeyboardModifier) *QHoverEvent { - var outptr_QHoverEvent *C.QHoverEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QHoverEvent_new5((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), (C.int)(modifiers), &outptr_QHoverEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQHoverEvent(outptr_QHoverEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQHoverEvent(C.QHoverEvent_new5((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQHoverEvent6 constructs a new QHoverEvent object. func NewQHoverEvent6(typeVal QEvent__Type, pos *QPointF, oldPos *QPointF, modifiers KeyboardModifier, device *QPointingDevice) *QHoverEvent { - var outptr_QHoverEvent *C.QHoverEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QHoverEvent_new6((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), (C.int)(modifiers), device.cPointer(), &outptr_QHoverEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQHoverEvent(outptr_QHoverEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQHoverEvent(C.QHoverEvent_new6((C.int)(typeVal), pos.cPointer(), oldPos.cPointer(), (C.int)(modifiers), device.cPointer())) ret.isSubclass = true return ret } func (this *QHoverEvent) Clone() *QHoverEvent { - return newQHoverEvent(C.QHoverEvent_Clone(this.h), nil, nil, nil, nil) + return newQHoverEvent(C.QHoverEvent_Clone(this.h)) } func (this *QHoverEvent) Pos() *QPoint { @@ -1378,7 +1252,7 @@ func (this *QHoverEvent) OldPosF() *QPointF { func (this *QHoverEvent) callVirtualBase_Clone() *QHoverEvent { - return newQHoverEvent(C.QHoverEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil, nil, nil, nil) + return newQHoverEvent(C.QHoverEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QHoverEvent) OnClone(slot func(super func() *QHoverEvent) *QHoverEvent) { @@ -1511,68 +1385,48 @@ func (this *QWheelEvent) UnsafePointer() unsafe.Pointer { } // newQWheelEvent constructs the type using only CGO pointers. -func newQWheelEvent(h *C.QWheelEvent, h_QSinglePointEvent *C.QSinglePointEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QWheelEvent { +func newQWheelEvent(h *C.QWheelEvent) *QWheelEvent { if h == nil { return nil } + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + C.QWheelEvent_virtbase(h, &outptr_QSinglePointEvent) + return &QWheelEvent{h: h, - QSinglePointEvent: newQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} + QSinglePointEvent: newQSinglePointEvent(outptr_QSinglePointEvent)} } // UnsafeNewQWheelEvent constructs the type using only unsafe pointers. -func UnsafeNewQWheelEvent(h unsafe.Pointer, h_QSinglePointEvent unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QWheelEvent { - if h == nil { - return nil - } - - return &QWheelEvent{h: (*C.QWheelEvent)(h), - QSinglePointEvent: UnsafeNewQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} +func UnsafeNewQWheelEvent(h unsafe.Pointer) *QWheelEvent { + return newQWheelEvent((*C.QWheelEvent)(h)) } // NewQWheelEvent constructs a new QWheelEvent object. func NewQWheelEvent(pos *QPointF, globalPos *QPointF, pixelDelta QPoint, angleDelta QPoint, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase, inverted bool) *QWheelEvent { - var outptr_QWheelEvent *C.QWheelEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWheelEvent_new(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), &outptr_QWheelEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQWheelEvent(outptr_QWheelEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQWheelEvent(C.QWheelEvent_new(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted))) ret.isSubclass = true return ret } // NewQWheelEvent2 constructs a new QWheelEvent object. func NewQWheelEvent2(pos *QPointF, globalPos *QPointF, pixelDelta QPoint, angleDelta QPoint, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase, inverted bool, source MouseEventSource) *QWheelEvent { - var outptr_QWheelEvent *C.QWheelEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWheelEvent_new2(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), (C.int)(source), &outptr_QWheelEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQWheelEvent(outptr_QWheelEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQWheelEvent(C.QWheelEvent_new2(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), (C.int)(source))) ret.isSubclass = true return ret } // NewQWheelEvent3 constructs a new QWheelEvent object. func NewQWheelEvent3(pos *QPointF, globalPos *QPointF, pixelDelta QPoint, angleDelta QPoint, buttons MouseButton, modifiers KeyboardModifier, phase ScrollPhase, inverted bool, source MouseEventSource, device *QPointingDevice) *QWheelEvent { - var outptr_QWheelEvent *C.QWheelEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWheelEvent_new3(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), (C.int)(source), device.cPointer(), &outptr_QWheelEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQWheelEvent(outptr_QWheelEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQWheelEvent(C.QWheelEvent_new3(pos.cPointer(), globalPos.cPointer(), pixelDelta.cPointer(), angleDelta.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(phase), (C.bool)(inverted), (C.int)(source), device.cPointer())) ret.isSubclass = true return ret } func (this *QWheelEvent) Clone() *QWheelEvent { - return newQWheelEvent(C.QWheelEvent_Clone(this.h), nil, nil, nil, nil) + return newQWheelEvent(C.QWheelEvent_Clone(this.h)) } func (this *QWheelEvent) PixelDelta() *QPoint { @@ -1621,7 +1475,7 @@ func (this *QWheelEvent) Source() MouseEventSource { func (this *QWheelEvent) callVirtualBase_Clone() *QWheelEvent { - return newQWheelEvent(C.QWheelEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil, nil, nil, nil) + return newQWheelEvent(C.QWheelEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QWheelEvent) OnClone(slot func(super func() *QWheelEvent) *QWheelEvent) { @@ -1754,40 +1608,32 @@ func (this *QTabletEvent) UnsafePointer() unsafe.Pointer { } // newQTabletEvent constructs the type using only CGO pointers. -func newQTabletEvent(h *C.QTabletEvent, h_QSinglePointEvent *C.QSinglePointEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QTabletEvent { +func newQTabletEvent(h *C.QTabletEvent) *QTabletEvent { if h == nil { return nil } + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + C.QTabletEvent_virtbase(h, &outptr_QSinglePointEvent) + return &QTabletEvent{h: h, - QSinglePointEvent: newQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} + QSinglePointEvent: newQSinglePointEvent(outptr_QSinglePointEvent)} } // UnsafeNewQTabletEvent constructs the type using only unsafe pointers. -func UnsafeNewQTabletEvent(h unsafe.Pointer, h_QSinglePointEvent unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QTabletEvent { - if h == nil { - return nil - } - - return &QTabletEvent{h: (*C.QTabletEvent)(h), - QSinglePointEvent: UnsafeNewQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} +func UnsafeNewQTabletEvent(h unsafe.Pointer) *QTabletEvent { + return newQTabletEvent((*C.QTabletEvent)(h)) } // NewQTabletEvent constructs a new QTabletEvent object. func NewQTabletEvent(t QEvent__Type, device *QPointingDevice, pos *QPointF, globalPos *QPointF, pressure float64, xTilt float32, yTilt float32, tangentialPressure float32, rotation float64, z float32, keyState KeyboardModifier, button MouseButton, buttons MouseButton) *QTabletEvent { - var outptr_QTabletEvent *C.QTabletEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTabletEvent_new((C.int)(t), device.cPointer(), pos.cPointer(), globalPos.cPointer(), (C.double)(pressure), (C.float)(xTilt), (C.float)(yTilt), (C.float)(tangentialPressure), (C.double)(rotation), (C.float)(z), (C.int)(keyState), (C.int)(button), (C.int)(buttons), &outptr_QTabletEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTabletEvent(outptr_QTabletEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTabletEvent(C.QTabletEvent_new((C.int)(t), device.cPointer(), pos.cPointer(), globalPos.cPointer(), (C.double)(pressure), (C.float)(xTilt), (C.float)(yTilt), (C.float)(tangentialPressure), (C.double)(rotation), (C.float)(z), (C.int)(keyState), (C.int)(button), (C.int)(buttons))) ret.isSubclass = true return ret } func (this *QTabletEvent) Clone() *QTabletEvent { - return newQTabletEvent(C.QTabletEvent_Clone(this.h), nil, nil, nil, nil) + return newQTabletEvent(C.QTabletEvent_Clone(this.h)) } func (this *QTabletEvent) Pos() *QPoint { @@ -1868,7 +1714,7 @@ func (this *QTabletEvent) YTilt() float64 { func (this *QTabletEvent) callVirtualBase_Clone() *QTabletEvent { - return newQTabletEvent(C.QTabletEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil, nil, nil, nil) + return newQTabletEvent(C.QTabletEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QTabletEvent) OnClone(slot func(super func() *QTabletEvent) *QTabletEvent) { @@ -2001,68 +1847,48 @@ func (this *QNativeGestureEvent) UnsafePointer() unsafe.Pointer { } // newQNativeGestureEvent constructs the type using only CGO pointers. -func newQNativeGestureEvent(h *C.QNativeGestureEvent, h_QSinglePointEvent *C.QSinglePointEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QNativeGestureEvent { +func newQNativeGestureEvent(h *C.QNativeGestureEvent) *QNativeGestureEvent { if h == nil { return nil } + var outptr_QSinglePointEvent *C.QSinglePointEvent = nil + C.QNativeGestureEvent_virtbase(h, &outptr_QSinglePointEvent) + return &QNativeGestureEvent{h: h, - QSinglePointEvent: newQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} + QSinglePointEvent: newQSinglePointEvent(outptr_QSinglePointEvent)} } // UnsafeNewQNativeGestureEvent constructs the type using only unsafe pointers. -func UnsafeNewQNativeGestureEvent(h unsafe.Pointer, h_QSinglePointEvent unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QNativeGestureEvent { - if h == nil { - return nil - } - - return &QNativeGestureEvent{h: (*C.QNativeGestureEvent)(h), - QSinglePointEvent: UnsafeNewQSinglePointEvent(h_QSinglePointEvent, h_QPointerEvent, h_QInputEvent, h_QEvent)} +func UnsafeNewQNativeGestureEvent(h unsafe.Pointer) *QNativeGestureEvent { + return newQNativeGestureEvent((*C.QNativeGestureEvent)(h)) } // NewQNativeGestureEvent constructs a new QNativeGestureEvent object. func NewQNativeGestureEvent(typeVal NativeGestureType, dev *QPointingDevice, localPos *QPointF, scenePos *QPointF, globalPos *QPointF, value float64, sequenceId uint64, intArgument uint64) *QNativeGestureEvent { - var outptr_QNativeGestureEvent *C.QNativeGestureEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QNativeGestureEvent_new((C.int)(typeVal), dev.cPointer(), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.double)(value), (C.ulonglong)(sequenceId), (C.ulonglong)(intArgument), &outptr_QNativeGestureEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQNativeGestureEvent(outptr_QNativeGestureEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQNativeGestureEvent(C.QNativeGestureEvent_new((C.int)(typeVal), dev.cPointer(), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.double)(value), (C.ulonglong)(sequenceId), (C.ulonglong)(intArgument))) ret.isSubclass = true return ret } // NewQNativeGestureEvent2 constructs a new QNativeGestureEvent object. func NewQNativeGestureEvent2(typeVal NativeGestureType, dev *QPointingDevice, fingerCount int, localPos *QPointF, scenePos *QPointF, globalPos *QPointF, value float64, delta *QPointF) *QNativeGestureEvent { - var outptr_QNativeGestureEvent *C.QNativeGestureEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QNativeGestureEvent_new2((C.int)(typeVal), dev.cPointer(), (C.int)(fingerCount), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.double)(value), delta.cPointer(), &outptr_QNativeGestureEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQNativeGestureEvent(outptr_QNativeGestureEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQNativeGestureEvent(C.QNativeGestureEvent_new2((C.int)(typeVal), dev.cPointer(), (C.int)(fingerCount), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.double)(value), delta.cPointer())) ret.isSubclass = true return ret } // NewQNativeGestureEvent3 constructs a new QNativeGestureEvent object. func NewQNativeGestureEvent3(typeVal NativeGestureType, dev *QPointingDevice, fingerCount int, localPos *QPointF, scenePos *QPointF, globalPos *QPointF, value float64, delta *QPointF, sequenceId uint64) *QNativeGestureEvent { - var outptr_QNativeGestureEvent *C.QNativeGestureEvent = nil - var outptr_QSinglePointEvent *C.QSinglePointEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QNativeGestureEvent_new3((C.int)(typeVal), dev.cPointer(), (C.int)(fingerCount), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.double)(value), delta.cPointer(), (C.ulonglong)(sequenceId), &outptr_QNativeGestureEvent, &outptr_QSinglePointEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQNativeGestureEvent(outptr_QNativeGestureEvent, outptr_QSinglePointEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQNativeGestureEvent(C.QNativeGestureEvent_new3((C.int)(typeVal), dev.cPointer(), (C.int)(fingerCount), localPos.cPointer(), scenePos.cPointer(), globalPos.cPointer(), (C.double)(value), delta.cPointer(), (C.ulonglong)(sequenceId))) ret.isSubclass = true return ret } func (this *QNativeGestureEvent) Clone() *QNativeGestureEvent { - return newQNativeGestureEvent(C.QNativeGestureEvent_Clone(this.h), nil, nil, nil, nil) + return newQNativeGestureEvent(C.QNativeGestureEvent_Clone(this.h)) } func (this *QNativeGestureEvent) GestureType() NativeGestureType { @@ -2115,7 +1941,7 @@ func (this *QNativeGestureEvent) ScreenPos() *QPointF { func (this *QNativeGestureEvent) callVirtualBase_Clone() *QNativeGestureEvent { - return newQNativeGestureEvent(C.QNativeGestureEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil, nil, nil, nil) + return newQNativeGestureEvent(C.QNativeGestureEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QNativeGestureEvent) OnClone(slot func(super func() *QNativeGestureEvent) *QNativeGestureEvent) { @@ -2248,44 +2074,34 @@ func (this *QKeyEvent) UnsafePointer() unsafe.Pointer { } // newQKeyEvent constructs the type using only CGO pointers. -func newQKeyEvent(h *C.QKeyEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QKeyEvent { +func newQKeyEvent(h *C.QKeyEvent) *QKeyEvent { if h == nil { return nil } + var outptr_QInputEvent *C.QInputEvent = nil + C.QKeyEvent_virtbase(h, &outptr_QInputEvent) + return &QKeyEvent{h: h, - QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} + QInputEvent: newQInputEvent(outptr_QInputEvent)} } // UnsafeNewQKeyEvent constructs the type using only unsafe pointers. -func UnsafeNewQKeyEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QKeyEvent { - if h == nil { - return nil - } - - return &QKeyEvent{h: (*C.QKeyEvent)(h), - QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} +func UnsafeNewQKeyEvent(h unsafe.Pointer) *QKeyEvent { + return newQKeyEvent((*C.QKeyEvent)(h)) } // NewQKeyEvent constructs a new QKeyEvent object. func NewQKeyEvent(typeVal QEvent__Type, key int, modifiers KeyboardModifier) *QKeyEvent { - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new((C.int)(typeVal), (C.int)(key), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQKeyEvent2 constructs a new QKeyEvent object. func NewQKeyEvent2(typeVal QEvent__Type, key int, modifiers KeyboardModifier, nativeScanCode uint, nativeVirtualKey uint, nativeModifiers uint) *QKeyEvent { - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new2((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new2((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers))) ret.isSubclass = true return ret } @@ -2296,12 +2112,8 @@ func NewQKeyEvent3(typeVal QEvent__Type, key int, modifiers KeyboardModifier, te text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new3((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new3((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms)) ret.isSubclass = true return ret } @@ -2312,12 +2124,8 @@ func NewQKeyEvent4(typeVal QEvent__Type, key int, modifiers KeyboardModifier, te text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new4((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new4((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep))) ret.isSubclass = true return ret } @@ -2328,12 +2136,8 @@ func NewQKeyEvent5(typeVal QEvent__Type, key int, modifiers KeyboardModifier, te text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new5((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new5((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count))) ret.isSubclass = true return ret } @@ -2344,12 +2148,8 @@ func NewQKeyEvent6(typeVal QEvent__Type, key int, modifiers KeyboardModifier, na text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new6((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new6((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms)) ret.isSubclass = true return ret } @@ -2360,12 +2160,8 @@ func NewQKeyEvent7(typeVal QEvent__Type, key int, modifiers KeyboardModifier, na text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new7((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new7((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep))) ret.isSubclass = true return ret } @@ -2376,12 +2172,8 @@ func NewQKeyEvent8(typeVal QEvent__Type, key int, modifiers KeyboardModifier, na text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new8((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new8((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count))) ret.isSubclass = true return ret } @@ -2392,18 +2184,14 @@ func NewQKeyEvent9(typeVal QEvent__Type, key int, modifiers KeyboardModifier, na text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QKeyEvent *C.QKeyEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QKeyEvent_new9((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count), device.cPointer(), &outptr_QKeyEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQKeyEvent(outptr_QKeyEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQKeyEvent(C.QKeyEvent_new9((C.int)(typeVal), (C.int)(key), (C.int)(modifiers), (C.uint)(nativeScanCode), (C.uint)(nativeVirtualKey), (C.uint)(nativeModifiers), text_ms, (C.bool)(autorep), (C.uint16_t)(count), device.cPointer())) ret.isSubclass = true return ret } func (this *QKeyEvent) Clone() *QKeyEvent { - return newQKeyEvent(C.QKeyEvent_Clone(this.h), nil, nil) + return newQKeyEvent(C.QKeyEvent_Clone(this.h)) } func (this *QKeyEvent) Key() int { @@ -2453,7 +2241,7 @@ func (this *QKeyEvent) NativeModifiers() uint { func (this *QKeyEvent) callVirtualBase_Clone() *QKeyEvent { - return newQKeyEvent(C.QKeyEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil, nil) + return newQKeyEvent(C.QKeyEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QKeyEvent) OnClone(slot func(super func() *QKeyEvent) *QKeyEvent) { @@ -2537,48 +2325,40 @@ func (this *QFocusEvent) UnsafePointer() unsafe.Pointer { } // newQFocusEvent constructs the type using only CGO pointers. -func newQFocusEvent(h *C.QFocusEvent, h_QEvent *C.QEvent) *QFocusEvent { +func newQFocusEvent(h *C.QFocusEvent) *QFocusEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QFocusEvent_virtbase(h, &outptr_QEvent) + return &QFocusEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQFocusEvent constructs the type using only unsafe pointers. -func UnsafeNewQFocusEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QFocusEvent { - if h == nil { - return nil - } - - return &QFocusEvent{h: (*C.QFocusEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQFocusEvent(h unsafe.Pointer) *QFocusEvent { + return newQFocusEvent((*C.QFocusEvent)(h)) } // NewQFocusEvent constructs a new QFocusEvent object. func NewQFocusEvent(typeVal QEvent__Type) *QFocusEvent { - var outptr_QFocusEvent *C.QFocusEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QFocusEvent_new((C.int)(typeVal), &outptr_QFocusEvent, &outptr_QEvent) - ret := newQFocusEvent(outptr_QFocusEvent, outptr_QEvent) + ret := newQFocusEvent(C.QFocusEvent_new((C.int)(typeVal))) ret.isSubclass = true return ret } // NewQFocusEvent2 constructs a new QFocusEvent object. func NewQFocusEvent2(typeVal QEvent__Type, reason FocusReason) *QFocusEvent { - var outptr_QFocusEvent *C.QFocusEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QFocusEvent_new2((C.int)(typeVal), (C.int)(reason), &outptr_QFocusEvent, &outptr_QEvent) - ret := newQFocusEvent(outptr_QFocusEvent, outptr_QEvent) + ret := newQFocusEvent(C.QFocusEvent_new2((C.int)(typeVal), (C.int)(reason))) ret.isSubclass = true return ret } func (this *QFocusEvent) Clone() *QFocusEvent { - return newQFocusEvent(C.QFocusEvent_Clone(this.h), nil) + return newQFocusEvent(C.QFocusEvent_Clone(this.h)) } func (this *QFocusEvent) GotFocus() bool { @@ -2595,7 +2375,7 @@ func (this *QFocusEvent) Reason() FocusReason { func (this *QFocusEvent) callVirtualBase_Clone() *QFocusEvent { - return newQFocusEvent(C.QFocusEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQFocusEvent(C.QFocusEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QFocusEvent) OnClone(slot func(super func() *QFocusEvent) *QFocusEvent) { @@ -2679,48 +2459,40 @@ func (this *QPaintEvent) UnsafePointer() unsafe.Pointer { } // newQPaintEvent constructs the type using only CGO pointers. -func newQPaintEvent(h *C.QPaintEvent, h_QEvent *C.QEvent) *QPaintEvent { +func newQPaintEvent(h *C.QPaintEvent) *QPaintEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QPaintEvent_virtbase(h, &outptr_QEvent) + return &QPaintEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQPaintEvent constructs the type using only unsafe pointers. -func UnsafeNewQPaintEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QPaintEvent { - if h == nil { - return nil - } - - return &QPaintEvent{h: (*C.QPaintEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQPaintEvent(h unsafe.Pointer) *QPaintEvent { + return newQPaintEvent((*C.QPaintEvent)(h)) } // NewQPaintEvent constructs a new QPaintEvent object. func NewQPaintEvent(paintRegion *QRegion) *QPaintEvent { - var outptr_QPaintEvent *C.QPaintEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QPaintEvent_new(paintRegion.cPointer(), &outptr_QPaintEvent, &outptr_QEvent) - ret := newQPaintEvent(outptr_QPaintEvent, outptr_QEvent) + ret := newQPaintEvent(C.QPaintEvent_new(paintRegion.cPointer())) ret.isSubclass = true return ret } // NewQPaintEvent2 constructs a new QPaintEvent object. func NewQPaintEvent2(paintRect *QRect) *QPaintEvent { - var outptr_QPaintEvent *C.QPaintEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QPaintEvent_new2(paintRect.cPointer(), &outptr_QPaintEvent, &outptr_QEvent) - ret := newQPaintEvent(outptr_QPaintEvent, outptr_QEvent) + ret := newQPaintEvent(C.QPaintEvent_new2(paintRect.cPointer())) ret.isSubclass = true return ret } func (this *QPaintEvent) Clone() *QPaintEvent { - return newQPaintEvent(C.QPaintEvent_Clone(this.h), nil) + return newQPaintEvent(C.QPaintEvent_Clone(this.h)) } func (this *QPaintEvent) Rect() *QRect { @@ -2733,7 +2505,7 @@ func (this *QPaintEvent) Region() *QRegion { func (this *QPaintEvent) callVirtualBase_Clone() *QPaintEvent { - return newQPaintEvent(C.QPaintEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQPaintEvent(C.QPaintEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QPaintEvent) OnClone(slot func(super func() *QPaintEvent) *QPaintEvent) { @@ -2817,37 +2589,32 @@ func (this *QMoveEvent) UnsafePointer() unsafe.Pointer { } // newQMoveEvent constructs the type using only CGO pointers. -func newQMoveEvent(h *C.QMoveEvent, h_QEvent *C.QEvent) *QMoveEvent { +func newQMoveEvent(h *C.QMoveEvent) *QMoveEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QMoveEvent_virtbase(h, &outptr_QEvent) + return &QMoveEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQMoveEvent constructs the type using only unsafe pointers. -func UnsafeNewQMoveEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QMoveEvent { - if h == nil { - return nil - } - - return &QMoveEvent{h: (*C.QMoveEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQMoveEvent(h unsafe.Pointer) *QMoveEvent { + return newQMoveEvent((*C.QMoveEvent)(h)) } // NewQMoveEvent constructs a new QMoveEvent object. func NewQMoveEvent(pos *QPoint, oldPos *QPoint) *QMoveEvent { - var outptr_QMoveEvent *C.QMoveEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QMoveEvent_new(pos.cPointer(), oldPos.cPointer(), &outptr_QMoveEvent, &outptr_QEvent) - ret := newQMoveEvent(outptr_QMoveEvent, outptr_QEvent) + ret := newQMoveEvent(C.QMoveEvent_new(pos.cPointer(), oldPos.cPointer())) ret.isSubclass = true return ret } func (this *QMoveEvent) Clone() *QMoveEvent { - return newQMoveEvent(C.QMoveEvent_Clone(this.h), nil) + return newQMoveEvent(C.QMoveEvent_Clone(this.h)) } func (this *QMoveEvent) Pos() *QPoint { @@ -2860,7 +2627,7 @@ func (this *QMoveEvent) OldPos() *QPoint { func (this *QMoveEvent) callVirtualBase_Clone() *QMoveEvent { - return newQMoveEvent(C.QMoveEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQMoveEvent(C.QMoveEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QMoveEvent) OnClone(slot func(super func() *QMoveEvent) *QMoveEvent) { @@ -2944,37 +2711,32 @@ func (this *QExposeEvent) UnsafePointer() unsafe.Pointer { } // newQExposeEvent constructs the type using only CGO pointers. -func newQExposeEvent(h *C.QExposeEvent, h_QEvent *C.QEvent) *QExposeEvent { +func newQExposeEvent(h *C.QExposeEvent) *QExposeEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QExposeEvent_virtbase(h, &outptr_QEvent) + return &QExposeEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQExposeEvent constructs the type using only unsafe pointers. -func UnsafeNewQExposeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QExposeEvent { - if h == nil { - return nil - } - - return &QExposeEvent{h: (*C.QExposeEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQExposeEvent(h unsafe.Pointer) *QExposeEvent { + return newQExposeEvent((*C.QExposeEvent)(h)) } // NewQExposeEvent constructs a new QExposeEvent object. func NewQExposeEvent(m_region *QRegion) *QExposeEvent { - var outptr_QExposeEvent *C.QExposeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QExposeEvent_new(m_region.cPointer(), &outptr_QExposeEvent, &outptr_QEvent) - ret := newQExposeEvent(outptr_QExposeEvent, outptr_QEvent) + ret := newQExposeEvent(C.QExposeEvent_new(m_region.cPointer())) ret.isSubclass = true return ret } func (this *QExposeEvent) Clone() *QExposeEvent { - return newQExposeEvent(C.QExposeEvent_Clone(this.h), nil) + return newQExposeEvent(C.QExposeEvent_Clone(this.h)) } func (this *QExposeEvent) Region() *QRegion { @@ -2983,7 +2745,7 @@ func (this *QExposeEvent) Region() *QRegion { func (this *QExposeEvent) callVirtualBase_Clone() *QExposeEvent { - return newQExposeEvent(C.QExposeEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQExposeEvent(C.QExposeEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QExposeEvent) OnClone(slot func(super func() *QExposeEvent) *QExposeEvent) { @@ -3067,37 +2829,32 @@ func (this *QPlatformSurfaceEvent) UnsafePointer() unsafe.Pointer { } // newQPlatformSurfaceEvent constructs the type using only CGO pointers. -func newQPlatformSurfaceEvent(h *C.QPlatformSurfaceEvent, h_QEvent *C.QEvent) *QPlatformSurfaceEvent { +func newQPlatformSurfaceEvent(h *C.QPlatformSurfaceEvent) *QPlatformSurfaceEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QPlatformSurfaceEvent_virtbase(h, &outptr_QEvent) + return &QPlatformSurfaceEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQPlatformSurfaceEvent constructs the type using only unsafe pointers. -func UnsafeNewQPlatformSurfaceEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QPlatformSurfaceEvent { - if h == nil { - return nil - } - - return &QPlatformSurfaceEvent{h: (*C.QPlatformSurfaceEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQPlatformSurfaceEvent(h unsafe.Pointer) *QPlatformSurfaceEvent { + return newQPlatformSurfaceEvent((*C.QPlatformSurfaceEvent)(h)) } // NewQPlatformSurfaceEvent constructs a new QPlatformSurfaceEvent object. func NewQPlatformSurfaceEvent(surfaceEventType QPlatformSurfaceEvent__SurfaceEventType) *QPlatformSurfaceEvent { - var outptr_QPlatformSurfaceEvent *C.QPlatformSurfaceEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QPlatformSurfaceEvent_new((C.int)(surfaceEventType), &outptr_QPlatformSurfaceEvent, &outptr_QEvent) - ret := newQPlatformSurfaceEvent(outptr_QPlatformSurfaceEvent, outptr_QEvent) + ret := newQPlatformSurfaceEvent(C.QPlatformSurfaceEvent_new((C.int)(surfaceEventType))) ret.isSubclass = true return ret } func (this *QPlatformSurfaceEvent) Clone() *QPlatformSurfaceEvent { - return newQPlatformSurfaceEvent(C.QPlatformSurfaceEvent_Clone(this.h), nil) + return newQPlatformSurfaceEvent(C.QPlatformSurfaceEvent_Clone(this.h)) } func (this *QPlatformSurfaceEvent) SurfaceEventType() QPlatformSurfaceEvent__SurfaceEventType { @@ -3106,7 +2863,7 @@ func (this *QPlatformSurfaceEvent) SurfaceEventType() QPlatformSurfaceEvent__Sur func (this *QPlatformSurfaceEvent) callVirtualBase_Clone() *QPlatformSurfaceEvent { - return newQPlatformSurfaceEvent(C.QPlatformSurfaceEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQPlatformSurfaceEvent(C.QPlatformSurfaceEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QPlatformSurfaceEvent) OnClone(slot func(super func() *QPlatformSurfaceEvent) *QPlatformSurfaceEvent) { @@ -3190,37 +2947,32 @@ func (this *QResizeEvent) UnsafePointer() unsafe.Pointer { } // newQResizeEvent constructs the type using only CGO pointers. -func newQResizeEvent(h *C.QResizeEvent, h_QEvent *C.QEvent) *QResizeEvent { +func newQResizeEvent(h *C.QResizeEvent) *QResizeEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QResizeEvent_virtbase(h, &outptr_QEvent) + return &QResizeEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQResizeEvent constructs the type using only unsafe pointers. -func UnsafeNewQResizeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QResizeEvent { - if h == nil { - return nil - } - - return &QResizeEvent{h: (*C.QResizeEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQResizeEvent(h unsafe.Pointer) *QResizeEvent { + return newQResizeEvent((*C.QResizeEvent)(h)) } // NewQResizeEvent constructs a new QResizeEvent object. func NewQResizeEvent(size *QSize, oldSize *QSize) *QResizeEvent { - var outptr_QResizeEvent *C.QResizeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QResizeEvent_new(size.cPointer(), oldSize.cPointer(), &outptr_QResizeEvent, &outptr_QEvent) - ret := newQResizeEvent(outptr_QResizeEvent, outptr_QEvent) + ret := newQResizeEvent(C.QResizeEvent_new(size.cPointer(), oldSize.cPointer())) ret.isSubclass = true return ret } func (this *QResizeEvent) Clone() *QResizeEvent { - return newQResizeEvent(C.QResizeEvent_Clone(this.h), nil) + return newQResizeEvent(C.QResizeEvent_Clone(this.h)) } func (this *QResizeEvent) Size() *QSize { @@ -3233,7 +2985,7 @@ func (this *QResizeEvent) OldSize() *QSize { func (this *QResizeEvent) callVirtualBase_Clone() *QResizeEvent { - return newQResizeEvent(C.QResizeEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQResizeEvent(C.QResizeEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QResizeEvent) OnClone(slot func(super func() *QResizeEvent) *QResizeEvent) { @@ -3317,42 +3069,37 @@ func (this *QCloseEvent) UnsafePointer() unsafe.Pointer { } // newQCloseEvent constructs the type using only CGO pointers. -func newQCloseEvent(h *C.QCloseEvent, h_QEvent *C.QEvent) *QCloseEvent { +func newQCloseEvent(h *C.QCloseEvent) *QCloseEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QCloseEvent_virtbase(h, &outptr_QEvent) + return &QCloseEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQCloseEvent constructs the type using only unsafe pointers. -func UnsafeNewQCloseEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QCloseEvent { - if h == nil { - return nil - } - - return &QCloseEvent{h: (*C.QCloseEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQCloseEvent(h unsafe.Pointer) *QCloseEvent { + return newQCloseEvent((*C.QCloseEvent)(h)) } // NewQCloseEvent constructs a new QCloseEvent object. func NewQCloseEvent() *QCloseEvent { - var outptr_QCloseEvent *C.QCloseEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QCloseEvent_new(&outptr_QCloseEvent, &outptr_QEvent) - ret := newQCloseEvent(outptr_QCloseEvent, outptr_QEvent) + ret := newQCloseEvent(C.QCloseEvent_new()) ret.isSubclass = true return ret } func (this *QCloseEvent) Clone() *QCloseEvent { - return newQCloseEvent(C.QCloseEvent_Clone(this.h), nil) + return newQCloseEvent(C.QCloseEvent_Clone(this.h)) } func (this *QCloseEvent) callVirtualBase_Clone() *QCloseEvent { - return newQCloseEvent(C.QCloseEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQCloseEvent(C.QCloseEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QCloseEvent) OnClone(slot func(super func() *QCloseEvent) *QCloseEvent) { @@ -3436,42 +3183,37 @@ func (this *QIconDragEvent) UnsafePointer() unsafe.Pointer { } // newQIconDragEvent constructs the type using only CGO pointers. -func newQIconDragEvent(h *C.QIconDragEvent, h_QEvent *C.QEvent) *QIconDragEvent { +func newQIconDragEvent(h *C.QIconDragEvent) *QIconDragEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QIconDragEvent_virtbase(h, &outptr_QEvent) + return &QIconDragEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQIconDragEvent constructs the type using only unsafe pointers. -func UnsafeNewQIconDragEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QIconDragEvent { - if h == nil { - return nil - } - - return &QIconDragEvent{h: (*C.QIconDragEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQIconDragEvent(h unsafe.Pointer) *QIconDragEvent { + return newQIconDragEvent((*C.QIconDragEvent)(h)) } // NewQIconDragEvent constructs a new QIconDragEvent object. func NewQIconDragEvent() *QIconDragEvent { - var outptr_QIconDragEvent *C.QIconDragEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QIconDragEvent_new(&outptr_QIconDragEvent, &outptr_QEvent) - ret := newQIconDragEvent(outptr_QIconDragEvent, outptr_QEvent) + ret := newQIconDragEvent(C.QIconDragEvent_new()) ret.isSubclass = true return ret } func (this *QIconDragEvent) Clone() *QIconDragEvent { - return newQIconDragEvent(C.QIconDragEvent_Clone(this.h), nil) + return newQIconDragEvent(C.QIconDragEvent_Clone(this.h)) } func (this *QIconDragEvent) callVirtualBase_Clone() *QIconDragEvent { - return newQIconDragEvent(C.QIconDragEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQIconDragEvent(C.QIconDragEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QIconDragEvent) OnClone(slot func(super func() *QIconDragEvent) *QIconDragEvent) { @@ -3555,42 +3297,37 @@ func (this *QShowEvent) UnsafePointer() unsafe.Pointer { } // newQShowEvent constructs the type using only CGO pointers. -func newQShowEvent(h *C.QShowEvent, h_QEvent *C.QEvent) *QShowEvent { +func newQShowEvent(h *C.QShowEvent) *QShowEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QShowEvent_virtbase(h, &outptr_QEvent) + return &QShowEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQShowEvent constructs the type using only unsafe pointers. -func UnsafeNewQShowEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QShowEvent { - if h == nil { - return nil - } - - return &QShowEvent{h: (*C.QShowEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQShowEvent(h unsafe.Pointer) *QShowEvent { + return newQShowEvent((*C.QShowEvent)(h)) } // NewQShowEvent constructs a new QShowEvent object. func NewQShowEvent() *QShowEvent { - var outptr_QShowEvent *C.QShowEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QShowEvent_new(&outptr_QShowEvent, &outptr_QEvent) - ret := newQShowEvent(outptr_QShowEvent, outptr_QEvent) + ret := newQShowEvent(C.QShowEvent_new()) ret.isSubclass = true return ret } func (this *QShowEvent) Clone() *QShowEvent { - return newQShowEvent(C.QShowEvent_Clone(this.h), nil) + return newQShowEvent(C.QShowEvent_Clone(this.h)) } func (this *QShowEvent) callVirtualBase_Clone() *QShowEvent { - return newQShowEvent(C.QShowEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQShowEvent(C.QShowEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QShowEvent) OnClone(slot func(super func() *QShowEvent) *QShowEvent) { @@ -3674,42 +3411,37 @@ func (this *QHideEvent) UnsafePointer() unsafe.Pointer { } // newQHideEvent constructs the type using only CGO pointers. -func newQHideEvent(h *C.QHideEvent, h_QEvent *C.QEvent) *QHideEvent { +func newQHideEvent(h *C.QHideEvent) *QHideEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QHideEvent_virtbase(h, &outptr_QEvent) + return &QHideEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQHideEvent constructs the type using only unsafe pointers. -func UnsafeNewQHideEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QHideEvent { - if h == nil { - return nil - } - - return &QHideEvent{h: (*C.QHideEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQHideEvent(h unsafe.Pointer) *QHideEvent { + return newQHideEvent((*C.QHideEvent)(h)) } // NewQHideEvent constructs a new QHideEvent object. func NewQHideEvent() *QHideEvent { - var outptr_QHideEvent *C.QHideEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QHideEvent_new(&outptr_QHideEvent, &outptr_QEvent) - ret := newQHideEvent(outptr_QHideEvent, outptr_QEvent) + ret := newQHideEvent(C.QHideEvent_new()) ret.isSubclass = true return ret } func (this *QHideEvent) Clone() *QHideEvent { - return newQHideEvent(C.QHideEvent_Clone(this.h), nil) + return newQHideEvent(C.QHideEvent_Clone(this.h)) } func (this *QHideEvent) callVirtualBase_Clone() *QHideEvent { - return newQHideEvent(C.QHideEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQHideEvent(C.QHideEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QHideEvent) OnClone(slot func(super func() *QHideEvent) *QHideEvent) { @@ -3793,62 +3525,48 @@ func (this *QContextMenuEvent) UnsafePointer() unsafe.Pointer { } // newQContextMenuEvent constructs the type using only CGO pointers. -func newQContextMenuEvent(h *C.QContextMenuEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QContextMenuEvent { +func newQContextMenuEvent(h *C.QContextMenuEvent) *QContextMenuEvent { if h == nil { return nil } + var outptr_QInputEvent *C.QInputEvent = nil + C.QContextMenuEvent_virtbase(h, &outptr_QInputEvent) + return &QContextMenuEvent{h: h, - QInputEvent: newQInputEvent(h_QInputEvent, h_QEvent)} + QInputEvent: newQInputEvent(outptr_QInputEvent)} } // UnsafeNewQContextMenuEvent constructs the type using only unsafe pointers. -func UnsafeNewQContextMenuEvent(h unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QContextMenuEvent { - if h == nil { - return nil - } - - return &QContextMenuEvent{h: (*C.QContextMenuEvent)(h), - QInputEvent: UnsafeNewQInputEvent(h_QInputEvent, h_QEvent)} +func UnsafeNewQContextMenuEvent(h unsafe.Pointer) *QContextMenuEvent { + return newQContextMenuEvent((*C.QContextMenuEvent)(h)) } // NewQContextMenuEvent constructs a new QContextMenuEvent object. func NewQContextMenuEvent(reason QContextMenuEvent__Reason, pos *QPoint, globalPos *QPoint) *QContextMenuEvent { - var outptr_QContextMenuEvent *C.QContextMenuEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QContextMenuEvent_new((C.int)(reason), pos.cPointer(), globalPos.cPointer(), &outptr_QContextMenuEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQContextMenuEvent(outptr_QContextMenuEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQContextMenuEvent(C.QContextMenuEvent_new((C.int)(reason), pos.cPointer(), globalPos.cPointer())) ret.isSubclass = true return ret } // NewQContextMenuEvent2 constructs a new QContextMenuEvent object. func NewQContextMenuEvent2(reason QContextMenuEvent__Reason, pos *QPoint) *QContextMenuEvent { - var outptr_QContextMenuEvent *C.QContextMenuEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QContextMenuEvent_new2((C.int)(reason), pos.cPointer(), &outptr_QContextMenuEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQContextMenuEvent(outptr_QContextMenuEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQContextMenuEvent(C.QContextMenuEvent_new2((C.int)(reason), pos.cPointer())) ret.isSubclass = true return ret } // NewQContextMenuEvent3 constructs a new QContextMenuEvent object. func NewQContextMenuEvent3(reason QContextMenuEvent__Reason, pos *QPoint, globalPos *QPoint, modifiers KeyboardModifier) *QContextMenuEvent { - var outptr_QContextMenuEvent *C.QContextMenuEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QContextMenuEvent_new3((C.int)(reason), pos.cPointer(), globalPos.cPointer(), (C.int)(modifiers), &outptr_QContextMenuEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQContextMenuEvent(outptr_QContextMenuEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQContextMenuEvent(C.QContextMenuEvent_new3((C.int)(reason), pos.cPointer(), globalPos.cPointer(), (C.int)(modifiers))) ret.isSubclass = true return ret } func (this *QContextMenuEvent) Clone() *QContextMenuEvent { - return newQContextMenuEvent(C.QContextMenuEvent_Clone(this.h), nil, nil) + return newQContextMenuEvent(C.QContextMenuEvent_Clone(this.h)) } func (this *QContextMenuEvent) X() int { @@ -3881,7 +3599,7 @@ func (this *QContextMenuEvent) Reason() QContextMenuEvent__Reason { func (this *QContextMenuEvent) callVirtualBase_Clone() *QContextMenuEvent { - return newQContextMenuEvent(C.QContextMenuEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil, nil) + return newQContextMenuEvent(C.QContextMenuEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QContextMenuEvent) OnClone(slot func(super func() *QContextMenuEvent) *QContextMenuEvent) { @@ -3965,31 +3683,26 @@ func (this *QInputMethodEvent) UnsafePointer() unsafe.Pointer { } // newQInputMethodEvent constructs the type using only CGO pointers. -func newQInputMethodEvent(h *C.QInputMethodEvent, h_QEvent *C.QEvent) *QInputMethodEvent { +func newQInputMethodEvent(h *C.QInputMethodEvent) *QInputMethodEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QInputMethodEvent_virtbase(h, &outptr_QEvent) + return &QInputMethodEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQInputMethodEvent constructs the type using only unsafe pointers. -func UnsafeNewQInputMethodEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QInputMethodEvent { - if h == nil { - return nil - } - - return &QInputMethodEvent{h: (*C.QInputMethodEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQInputMethodEvent(h unsafe.Pointer) *QInputMethodEvent { + return newQInputMethodEvent((*C.QInputMethodEvent)(h)) } // NewQInputMethodEvent constructs a new QInputMethodEvent object. func NewQInputMethodEvent() *QInputMethodEvent { - var outptr_QInputMethodEvent *C.QInputMethodEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QInputMethodEvent_new(&outptr_QInputMethodEvent, &outptr_QEvent) - ret := newQInputMethodEvent(outptr_QInputMethodEvent, outptr_QEvent) + ret := newQInputMethodEvent(C.QInputMethodEvent_new()) ret.isSubclass = true return ret } @@ -4006,17 +3719,14 @@ func NewQInputMethodEvent2(preeditText string, attributes []QInputMethodEvent__A attributes_CArray[i] = attributes[i].cPointer() } attributes_ma := C.struct_miqt_array{len: C.size_t(len(attributes)), data: unsafe.Pointer(attributes_CArray)} - var outptr_QInputMethodEvent *C.QInputMethodEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QInputMethodEvent_new2(preeditText_ms, attributes_ma, &outptr_QInputMethodEvent, &outptr_QEvent) - ret := newQInputMethodEvent(outptr_QInputMethodEvent, outptr_QEvent) + ret := newQInputMethodEvent(C.QInputMethodEvent_new2(preeditText_ms, attributes_ma)) ret.isSubclass = true return ret } func (this *QInputMethodEvent) Clone() *QInputMethodEvent { - return newQInputMethodEvent(C.QInputMethodEvent_Clone(this.h), nil) + return newQInputMethodEvent(C.QInputMethodEvent_Clone(this.h)) } func (this *QInputMethodEvent) SetCommitString(commitString string) { @@ -4079,7 +3789,7 @@ func (this *QInputMethodEvent) SetCommitString3(commitString string, replaceFrom func (this *QInputMethodEvent) callVirtualBase_Clone() *QInputMethodEvent { - return newQInputMethodEvent(C.QInputMethodEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQInputMethodEvent(C.QInputMethodEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QInputMethodEvent) OnClone(slot func(super func() *QInputMethodEvent) *QInputMethodEvent) { @@ -4163,37 +3873,32 @@ func (this *QInputMethodQueryEvent) UnsafePointer() unsafe.Pointer { } // newQInputMethodQueryEvent constructs the type using only CGO pointers. -func newQInputMethodQueryEvent(h *C.QInputMethodQueryEvent, h_QEvent *C.QEvent) *QInputMethodQueryEvent { +func newQInputMethodQueryEvent(h *C.QInputMethodQueryEvent) *QInputMethodQueryEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QInputMethodQueryEvent_virtbase(h, &outptr_QEvent) + return &QInputMethodQueryEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQInputMethodQueryEvent constructs the type using only unsafe pointers. -func UnsafeNewQInputMethodQueryEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QInputMethodQueryEvent { - if h == nil { - return nil - } - - return &QInputMethodQueryEvent{h: (*C.QInputMethodQueryEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQInputMethodQueryEvent(h unsafe.Pointer) *QInputMethodQueryEvent { + return newQInputMethodQueryEvent((*C.QInputMethodQueryEvent)(h)) } // NewQInputMethodQueryEvent constructs a new QInputMethodQueryEvent object. func NewQInputMethodQueryEvent(queries InputMethodQuery) *QInputMethodQueryEvent { - var outptr_QInputMethodQueryEvent *C.QInputMethodQueryEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QInputMethodQueryEvent_new((C.int)(queries), &outptr_QInputMethodQueryEvent, &outptr_QEvent) - ret := newQInputMethodQueryEvent(outptr_QInputMethodQueryEvent, outptr_QEvent) + ret := newQInputMethodQueryEvent(C.QInputMethodQueryEvent_new((C.int)(queries))) ret.isSubclass = true return ret } func (this *QInputMethodQueryEvent) Clone() *QInputMethodQueryEvent { - return newQInputMethodQueryEvent(C.QInputMethodQueryEvent_Clone(this.h), nil) + return newQInputMethodQueryEvent(C.QInputMethodQueryEvent_Clone(this.h)) } func (this *QInputMethodQueryEvent) Queries() InputMethodQuery { @@ -4212,7 +3917,7 @@ func (this *QInputMethodQueryEvent) Value(query InputMethodQuery) *QVariant { func (this *QInputMethodQueryEvent) callVirtualBase_Clone() *QInputMethodQueryEvent { - return newQInputMethodQueryEvent(C.QInputMethodQueryEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQInputMethodQueryEvent(C.QInputMethodQueryEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QInputMethodQueryEvent) OnClone(slot func(super func() *QInputMethodQueryEvent) *QInputMethodQueryEvent) { @@ -4296,48 +4001,40 @@ func (this *QDropEvent) UnsafePointer() unsafe.Pointer { } // newQDropEvent constructs the type using only CGO pointers. -func newQDropEvent(h *C.QDropEvent, h_QEvent *C.QEvent) *QDropEvent { +func newQDropEvent(h *C.QDropEvent) *QDropEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QDropEvent_virtbase(h, &outptr_QEvent) + return &QDropEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQDropEvent constructs the type using only unsafe pointers. -func UnsafeNewQDropEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QDropEvent { - if h == nil { - return nil - } - - return &QDropEvent{h: (*C.QDropEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQDropEvent(h unsafe.Pointer) *QDropEvent { + return newQDropEvent((*C.QDropEvent)(h)) } // NewQDropEvent constructs a new QDropEvent object. func NewQDropEvent(pos *QPointF, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier) *QDropEvent { - var outptr_QDropEvent *C.QDropEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDropEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), &outptr_QDropEvent, &outptr_QEvent) - ret := newQDropEvent(outptr_QDropEvent, outptr_QEvent) + ret := newQDropEvent(C.QDropEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQDropEvent2 constructs a new QDropEvent object. func NewQDropEvent2(pos *QPointF, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier, typeVal QEvent__Type) *QDropEvent { - var outptr_QDropEvent *C.QDropEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDropEvent_new2(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal), &outptr_QDropEvent, &outptr_QEvent) - ret := newQDropEvent(outptr_QDropEvent, outptr_QEvent) + ret := newQDropEvent(C.QDropEvent_new2(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal))) ret.isSubclass = true return ret } func (this *QDropEvent) Clone() *QDropEvent { - return newQDropEvent(C.QDropEvent_Clone(this.h), nil) + return newQDropEvent(C.QDropEvent_Clone(this.h)) } func (this *QDropEvent) Pos() *QPoint { @@ -4399,12 +4096,12 @@ func (this *QDropEvent) Source() *QObject { } func (this *QDropEvent) MimeData() *QMimeData { - return newQMimeData(C.QDropEvent_MimeData(this.h), nil) + return newQMimeData(C.QDropEvent_MimeData(this.h)) } func (this *QDropEvent) callVirtualBase_Clone() *QDropEvent { - return newQDropEvent(C.QDropEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQDropEvent(C.QDropEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QDropEvent) OnClone(slot func(super func() *QDropEvent) *QDropEvent) { @@ -4488,50 +4185,40 @@ func (this *QDragMoveEvent) UnsafePointer() unsafe.Pointer { } // newQDragMoveEvent constructs the type using only CGO pointers. -func newQDragMoveEvent(h *C.QDragMoveEvent, h_QDropEvent *C.QDropEvent, h_QEvent *C.QEvent) *QDragMoveEvent { +func newQDragMoveEvent(h *C.QDragMoveEvent) *QDragMoveEvent { if h == nil { return nil } + var outptr_QDropEvent *C.QDropEvent = nil + C.QDragMoveEvent_virtbase(h, &outptr_QDropEvent) + return &QDragMoveEvent{h: h, - QDropEvent: newQDropEvent(h_QDropEvent, h_QEvent)} + QDropEvent: newQDropEvent(outptr_QDropEvent)} } // UnsafeNewQDragMoveEvent constructs the type using only unsafe pointers. -func UnsafeNewQDragMoveEvent(h unsafe.Pointer, h_QDropEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QDragMoveEvent { - if h == nil { - return nil - } - - return &QDragMoveEvent{h: (*C.QDragMoveEvent)(h), - QDropEvent: UnsafeNewQDropEvent(h_QDropEvent, h_QEvent)} +func UnsafeNewQDragMoveEvent(h unsafe.Pointer) *QDragMoveEvent { + return newQDragMoveEvent((*C.QDragMoveEvent)(h)) } // NewQDragMoveEvent constructs a new QDragMoveEvent object. func NewQDragMoveEvent(pos *QPoint, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier) *QDragMoveEvent { - var outptr_QDragMoveEvent *C.QDragMoveEvent = nil - var outptr_QDropEvent *C.QDropEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDragMoveEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) - ret := newQDragMoveEvent(outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret := newQDragMoveEvent(C.QDragMoveEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers))) ret.isSubclass = true return ret } // NewQDragMoveEvent2 constructs a new QDragMoveEvent object. func NewQDragMoveEvent2(pos *QPoint, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier, typeVal QEvent__Type) *QDragMoveEvent { - var outptr_QDragMoveEvent *C.QDragMoveEvent = nil - var outptr_QDropEvent *C.QDropEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDragMoveEvent_new2(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal), &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) - ret := newQDragMoveEvent(outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret := newQDragMoveEvent(C.QDragMoveEvent_new2(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), (C.int)(typeVal))) ret.isSubclass = true return ret } func (this *QDragMoveEvent) Clone() *QDragMoveEvent { - return newQDragMoveEvent(C.QDragMoveEvent_Clone(this.h), nil, nil) + return newQDragMoveEvent(C.QDragMoveEvent_Clone(this.h)) } func (this *QDragMoveEvent) AnswerRect() *QRect { @@ -4558,7 +4245,7 @@ func (this *QDragMoveEvent) IgnoreWithQRect(r *QRect) { func (this *QDragMoveEvent) callVirtualBase_Clone() *QDragMoveEvent { - return newQDragMoveEvent(C.QDragMoveEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil, nil) + return newQDragMoveEvent(C.QDragMoveEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QDragMoveEvent) OnClone(slot func(super func() *QDragMoveEvent) *QDragMoveEvent) { @@ -4616,44 +4303,37 @@ func (this *QDragEnterEvent) UnsafePointer() unsafe.Pointer { } // newQDragEnterEvent constructs the type using only CGO pointers. -func newQDragEnterEvent(h *C.QDragEnterEvent, h_QDragMoveEvent *C.QDragMoveEvent, h_QDropEvent *C.QDropEvent, h_QEvent *C.QEvent) *QDragEnterEvent { +func newQDragEnterEvent(h *C.QDragEnterEvent) *QDragEnterEvent { if h == nil { return nil } + var outptr_QDragMoveEvent *C.QDragMoveEvent = nil + C.QDragEnterEvent_virtbase(h, &outptr_QDragMoveEvent) + return &QDragEnterEvent{h: h, - QDragMoveEvent: newQDragMoveEvent(h_QDragMoveEvent, h_QDropEvent, h_QEvent)} + QDragMoveEvent: newQDragMoveEvent(outptr_QDragMoveEvent)} } // UnsafeNewQDragEnterEvent constructs the type using only unsafe pointers. -func UnsafeNewQDragEnterEvent(h unsafe.Pointer, h_QDragMoveEvent unsafe.Pointer, h_QDropEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QDragEnterEvent { - if h == nil { - return nil - } - - return &QDragEnterEvent{h: (*C.QDragEnterEvent)(h), - QDragMoveEvent: UnsafeNewQDragMoveEvent(h_QDragMoveEvent, h_QDropEvent, h_QEvent)} +func UnsafeNewQDragEnterEvent(h unsafe.Pointer) *QDragEnterEvent { + return newQDragEnterEvent((*C.QDragEnterEvent)(h)) } // NewQDragEnterEvent constructs a new QDragEnterEvent object. func NewQDragEnterEvent(pos *QPoint, actions DropAction, data *QMimeData, buttons MouseButton, modifiers KeyboardModifier) *QDragEnterEvent { - var outptr_QDragEnterEvent *C.QDragEnterEvent = nil - var outptr_QDragMoveEvent *C.QDragMoveEvent = nil - var outptr_QDropEvent *C.QDropEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDragEnterEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers), &outptr_QDragEnterEvent, &outptr_QDragMoveEvent, &outptr_QDropEvent, &outptr_QEvent) - ret := newQDragEnterEvent(outptr_QDragEnterEvent, outptr_QDragMoveEvent, outptr_QDropEvent, outptr_QEvent) + ret := newQDragEnterEvent(C.QDragEnterEvent_new(pos.cPointer(), (C.int)(actions), data.cPointer(), (C.int)(buttons), (C.int)(modifiers))) ret.isSubclass = true return ret } func (this *QDragEnterEvent) Clone() *QDragEnterEvent { - return newQDragEnterEvent(C.QDragEnterEvent_Clone(this.h), nil, nil, nil) + return newQDragEnterEvent(C.QDragEnterEvent_Clone(this.h)) } func (this *QDragEnterEvent) callVirtualBase_Clone() *QDragEnterEvent { - return newQDragEnterEvent(C.QDragEnterEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil, nil, nil) + return newQDragEnterEvent(C.QDragEnterEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QDragEnterEvent) OnClone(slot func(super func() *QDragEnterEvent) *QDragEnterEvent) { @@ -4711,42 +4391,37 @@ func (this *QDragLeaveEvent) UnsafePointer() unsafe.Pointer { } // newQDragLeaveEvent constructs the type using only CGO pointers. -func newQDragLeaveEvent(h *C.QDragLeaveEvent, h_QEvent *C.QEvent) *QDragLeaveEvent { +func newQDragLeaveEvent(h *C.QDragLeaveEvent) *QDragLeaveEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QDragLeaveEvent_virtbase(h, &outptr_QEvent) + return &QDragLeaveEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQDragLeaveEvent constructs the type using only unsafe pointers. -func UnsafeNewQDragLeaveEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QDragLeaveEvent { - if h == nil { - return nil - } - - return &QDragLeaveEvent{h: (*C.QDragLeaveEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQDragLeaveEvent(h unsafe.Pointer) *QDragLeaveEvent { + return newQDragLeaveEvent((*C.QDragLeaveEvent)(h)) } // NewQDragLeaveEvent constructs a new QDragLeaveEvent object. func NewQDragLeaveEvent() *QDragLeaveEvent { - var outptr_QDragLeaveEvent *C.QDragLeaveEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QDragLeaveEvent_new(&outptr_QDragLeaveEvent, &outptr_QEvent) - ret := newQDragLeaveEvent(outptr_QDragLeaveEvent, outptr_QEvent) + ret := newQDragLeaveEvent(C.QDragLeaveEvent_new()) ret.isSubclass = true return ret } func (this *QDragLeaveEvent) Clone() *QDragLeaveEvent { - return newQDragLeaveEvent(C.QDragLeaveEvent_Clone(this.h), nil) + return newQDragLeaveEvent(C.QDragLeaveEvent_Clone(this.h)) } func (this *QDragLeaveEvent) callVirtualBase_Clone() *QDragLeaveEvent { - return newQDragLeaveEvent(C.QDragLeaveEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQDragLeaveEvent(C.QDragLeaveEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QDragLeaveEvent) OnClone(slot func(super func() *QDragLeaveEvent) *QDragLeaveEvent) { @@ -4830,37 +4505,32 @@ func (this *QHelpEvent) UnsafePointer() unsafe.Pointer { } // newQHelpEvent constructs the type using only CGO pointers. -func newQHelpEvent(h *C.QHelpEvent, h_QEvent *C.QEvent) *QHelpEvent { +func newQHelpEvent(h *C.QHelpEvent) *QHelpEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QHelpEvent_virtbase(h, &outptr_QEvent) + return &QHelpEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQHelpEvent constructs the type using only unsafe pointers. -func UnsafeNewQHelpEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QHelpEvent { - if h == nil { - return nil - } - - return &QHelpEvent{h: (*C.QHelpEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQHelpEvent(h unsafe.Pointer) *QHelpEvent { + return newQHelpEvent((*C.QHelpEvent)(h)) } // NewQHelpEvent constructs a new QHelpEvent object. func NewQHelpEvent(typeVal QEvent__Type, pos *QPoint, globalPos *QPoint) *QHelpEvent { - var outptr_QHelpEvent *C.QHelpEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QHelpEvent_new((C.int)(typeVal), pos.cPointer(), globalPos.cPointer(), &outptr_QHelpEvent, &outptr_QEvent) - ret := newQHelpEvent(outptr_QHelpEvent, outptr_QEvent) + ret := newQHelpEvent(C.QHelpEvent_new((C.int)(typeVal), pos.cPointer(), globalPos.cPointer())) ret.isSubclass = true return ret } func (this *QHelpEvent) Clone() *QHelpEvent { - return newQHelpEvent(C.QHelpEvent_Clone(this.h), nil) + return newQHelpEvent(C.QHelpEvent_Clone(this.h)) } func (this *QHelpEvent) X() int { @@ -4889,7 +4559,7 @@ func (this *QHelpEvent) GlobalPos() *QPoint { func (this *QHelpEvent) callVirtualBase_Clone() *QHelpEvent { - return newQHelpEvent(C.QHelpEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQHelpEvent(C.QHelpEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QHelpEvent) OnClone(slot func(super func() *QHelpEvent) *QHelpEvent) { @@ -4973,22 +4643,20 @@ func (this *QStatusTipEvent) UnsafePointer() unsafe.Pointer { } // newQStatusTipEvent constructs the type using only CGO pointers. -func newQStatusTipEvent(h *C.QStatusTipEvent, h_QEvent *C.QEvent) *QStatusTipEvent { +func newQStatusTipEvent(h *C.QStatusTipEvent) *QStatusTipEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QStatusTipEvent_virtbase(h, &outptr_QEvent) + return &QStatusTipEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQStatusTipEvent constructs the type using only unsafe pointers. -func UnsafeNewQStatusTipEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QStatusTipEvent { - if h == nil { - return nil - } - - return &QStatusTipEvent{h: (*C.QStatusTipEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQStatusTipEvent(h unsafe.Pointer) *QStatusTipEvent { + return newQStatusTipEvent((*C.QStatusTipEvent)(h)) } // NewQStatusTipEvent constructs a new QStatusTipEvent object. @@ -4997,17 +4665,14 @@ func NewQStatusTipEvent(tip string) *QStatusTipEvent { tip_ms.data = C.CString(tip) tip_ms.len = C.size_t(len(tip)) defer C.free(unsafe.Pointer(tip_ms.data)) - var outptr_QStatusTipEvent *C.QStatusTipEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QStatusTipEvent_new(tip_ms, &outptr_QStatusTipEvent, &outptr_QEvent) - ret := newQStatusTipEvent(outptr_QStatusTipEvent, outptr_QEvent) + ret := newQStatusTipEvent(C.QStatusTipEvent_new(tip_ms)) ret.isSubclass = true return ret } func (this *QStatusTipEvent) Clone() *QStatusTipEvent { - return newQStatusTipEvent(C.QStatusTipEvent_Clone(this.h), nil) + return newQStatusTipEvent(C.QStatusTipEvent_Clone(this.h)) } func (this *QStatusTipEvent) Tip() string { @@ -5019,7 +4684,7 @@ func (this *QStatusTipEvent) Tip() string { func (this *QStatusTipEvent) callVirtualBase_Clone() *QStatusTipEvent { - return newQStatusTipEvent(C.QStatusTipEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQStatusTipEvent(C.QStatusTipEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QStatusTipEvent) OnClone(slot func(super func() *QStatusTipEvent) *QStatusTipEvent) { @@ -5103,22 +4768,20 @@ func (this *QWhatsThisClickedEvent) UnsafePointer() unsafe.Pointer { } // newQWhatsThisClickedEvent constructs the type using only CGO pointers. -func newQWhatsThisClickedEvent(h *C.QWhatsThisClickedEvent, h_QEvent *C.QEvent) *QWhatsThisClickedEvent { +func newQWhatsThisClickedEvent(h *C.QWhatsThisClickedEvent) *QWhatsThisClickedEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QWhatsThisClickedEvent_virtbase(h, &outptr_QEvent) + return &QWhatsThisClickedEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQWhatsThisClickedEvent constructs the type using only unsafe pointers. -func UnsafeNewQWhatsThisClickedEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QWhatsThisClickedEvent { - if h == nil { - return nil - } - - return &QWhatsThisClickedEvent{h: (*C.QWhatsThisClickedEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQWhatsThisClickedEvent(h unsafe.Pointer) *QWhatsThisClickedEvent { + return newQWhatsThisClickedEvent((*C.QWhatsThisClickedEvent)(h)) } // NewQWhatsThisClickedEvent constructs a new QWhatsThisClickedEvent object. @@ -5127,17 +4790,14 @@ func NewQWhatsThisClickedEvent(href string) *QWhatsThisClickedEvent { href_ms.data = C.CString(href) href_ms.len = C.size_t(len(href)) defer C.free(unsafe.Pointer(href_ms.data)) - var outptr_QWhatsThisClickedEvent *C.QWhatsThisClickedEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWhatsThisClickedEvent_new(href_ms, &outptr_QWhatsThisClickedEvent, &outptr_QEvent) - ret := newQWhatsThisClickedEvent(outptr_QWhatsThisClickedEvent, outptr_QEvent) + ret := newQWhatsThisClickedEvent(C.QWhatsThisClickedEvent_new(href_ms)) ret.isSubclass = true return ret } func (this *QWhatsThisClickedEvent) Clone() *QWhatsThisClickedEvent { - return newQWhatsThisClickedEvent(C.QWhatsThisClickedEvent_Clone(this.h), nil) + return newQWhatsThisClickedEvent(C.QWhatsThisClickedEvent_Clone(this.h)) } func (this *QWhatsThisClickedEvent) Href() string { @@ -5149,7 +4809,7 @@ func (this *QWhatsThisClickedEvent) Href() string { func (this *QWhatsThisClickedEvent) callVirtualBase_Clone() *QWhatsThisClickedEvent { - return newQWhatsThisClickedEvent(C.QWhatsThisClickedEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQWhatsThisClickedEvent(C.QWhatsThisClickedEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QWhatsThisClickedEvent) OnClone(slot func(super func() *QWhatsThisClickedEvent) *QWhatsThisClickedEvent) { @@ -5233,61 +4893,53 @@ func (this *QActionEvent) UnsafePointer() unsafe.Pointer { } // newQActionEvent constructs the type using only CGO pointers. -func newQActionEvent(h *C.QActionEvent, h_QEvent *C.QEvent) *QActionEvent { +func newQActionEvent(h *C.QActionEvent) *QActionEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QActionEvent_virtbase(h, &outptr_QEvent) + return &QActionEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQActionEvent constructs the type using only unsafe pointers. -func UnsafeNewQActionEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QActionEvent { - if h == nil { - return nil - } - - return &QActionEvent{h: (*C.QActionEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQActionEvent(h unsafe.Pointer) *QActionEvent { + return newQActionEvent((*C.QActionEvent)(h)) } // NewQActionEvent constructs a new QActionEvent object. func NewQActionEvent(typeVal int, action *QAction) *QActionEvent { - var outptr_QActionEvent *C.QActionEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QActionEvent_new((C.int)(typeVal), action.cPointer(), &outptr_QActionEvent, &outptr_QEvent) - ret := newQActionEvent(outptr_QActionEvent, outptr_QEvent) + ret := newQActionEvent(C.QActionEvent_new((C.int)(typeVal), action.cPointer())) ret.isSubclass = true return ret } // NewQActionEvent2 constructs a new QActionEvent object. func NewQActionEvent2(typeVal int, action *QAction, before *QAction) *QActionEvent { - var outptr_QActionEvent *C.QActionEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QActionEvent_new2((C.int)(typeVal), action.cPointer(), before.cPointer(), &outptr_QActionEvent, &outptr_QEvent) - ret := newQActionEvent(outptr_QActionEvent, outptr_QEvent) + ret := newQActionEvent(C.QActionEvent_new2((C.int)(typeVal), action.cPointer(), before.cPointer())) ret.isSubclass = true return ret } func (this *QActionEvent) Clone() *QActionEvent { - return newQActionEvent(C.QActionEvent_Clone(this.h), nil) + return newQActionEvent(C.QActionEvent_Clone(this.h)) } func (this *QActionEvent) Action() *QAction { - return newQAction(C.QActionEvent_Action(this.h), nil) + return newQAction(C.QActionEvent_Action(this.h)) } func (this *QActionEvent) Before() *QAction { - return newQAction(C.QActionEvent_Before(this.h), nil) + return newQAction(C.QActionEvent_Before(this.h)) } func (this *QActionEvent) callVirtualBase_Clone() *QActionEvent { - return newQActionEvent(C.QActionEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQActionEvent(C.QActionEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QActionEvent) OnClone(slot func(super func() *QActionEvent) *QActionEvent) { @@ -5371,22 +5023,20 @@ func (this *QFileOpenEvent) UnsafePointer() unsafe.Pointer { } // newQFileOpenEvent constructs the type using only CGO pointers. -func newQFileOpenEvent(h *C.QFileOpenEvent, h_QEvent *C.QEvent) *QFileOpenEvent { +func newQFileOpenEvent(h *C.QFileOpenEvent) *QFileOpenEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QFileOpenEvent_virtbase(h, &outptr_QEvent) + return &QFileOpenEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQFileOpenEvent constructs the type using only unsafe pointers. -func UnsafeNewQFileOpenEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QFileOpenEvent { - if h == nil { - return nil - } - - return &QFileOpenEvent{h: (*C.QFileOpenEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQFileOpenEvent(h unsafe.Pointer) *QFileOpenEvent { + return newQFileOpenEvent((*C.QFileOpenEvent)(h)) } // NewQFileOpenEvent constructs a new QFileOpenEvent object. @@ -5395,28 +5045,22 @@ func NewQFileOpenEvent(file string) *QFileOpenEvent { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - var outptr_QFileOpenEvent *C.QFileOpenEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QFileOpenEvent_new(file_ms, &outptr_QFileOpenEvent, &outptr_QEvent) - ret := newQFileOpenEvent(outptr_QFileOpenEvent, outptr_QEvent) + ret := newQFileOpenEvent(C.QFileOpenEvent_new(file_ms)) ret.isSubclass = true return ret } // NewQFileOpenEvent2 constructs a new QFileOpenEvent object. func NewQFileOpenEvent2(url *QUrl) *QFileOpenEvent { - var outptr_QFileOpenEvent *C.QFileOpenEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QFileOpenEvent_new2(url.cPointer(), &outptr_QFileOpenEvent, &outptr_QEvent) - ret := newQFileOpenEvent(outptr_QFileOpenEvent, outptr_QEvent) + ret := newQFileOpenEvent(C.QFileOpenEvent_new2(url.cPointer())) ret.isSubclass = true return ret } func (this *QFileOpenEvent) Clone() *QFileOpenEvent { - return newQFileOpenEvent(C.QFileOpenEvent_Clone(this.h), nil) + return newQFileOpenEvent(C.QFileOpenEvent_Clone(this.h)) } func (this *QFileOpenEvent) File() string { @@ -5438,7 +5082,7 @@ func (this *QFileOpenEvent) OpenFile(file *QFile, flags QIODeviceBase__OpenModeF func (this *QFileOpenEvent) callVirtualBase_Clone() *QFileOpenEvent { - return newQFileOpenEvent(C.QFileOpenEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQFileOpenEvent(C.QFileOpenEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QFileOpenEvent) OnClone(slot func(super func() *QFileOpenEvent) *QFileOpenEvent) { @@ -5522,37 +5166,32 @@ func (this *QToolBarChangeEvent) UnsafePointer() unsafe.Pointer { } // newQToolBarChangeEvent constructs the type using only CGO pointers. -func newQToolBarChangeEvent(h *C.QToolBarChangeEvent, h_QEvent *C.QEvent) *QToolBarChangeEvent { +func newQToolBarChangeEvent(h *C.QToolBarChangeEvent) *QToolBarChangeEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QToolBarChangeEvent_virtbase(h, &outptr_QEvent) + return &QToolBarChangeEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQToolBarChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQToolBarChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QToolBarChangeEvent { - if h == nil { - return nil - } - - return &QToolBarChangeEvent{h: (*C.QToolBarChangeEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQToolBarChangeEvent(h unsafe.Pointer) *QToolBarChangeEvent { + return newQToolBarChangeEvent((*C.QToolBarChangeEvent)(h)) } // NewQToolBarChangeEvent constructs a new QToolBarChangeEvent object. func NewQToolBarChangeEvent(t bool) *QToolBarChangeEvent { - var outptr_QToolBarChangeEvent *C.QToolBarChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QToolBarChangeEvent_new((C.bool)(t), &outptr_QToolBarChangeEvent, &outptr_QEvent) - ret := newQToolBarChangeEvent(outptr_QToolBarChangeEvent, outptr_QEvent) + ret := newQToolBarChangeEvent(C.QToolBarChangeEvent_new((C.bool)(t))) ret.isSubclass = true return ret } func (this *QToolBarChangeEvent) Clone() *QToolBarChangeEvent { - return newQToolBarChangeEvent(C.QToolBarChangeEvent_Clone(this.h), nil) + return newQToolBarChangeEvent(C.QToolBarChangeEvent_Clone(this.h)) } func (this *QToolBarChangeEvent) Toggle() bool { @@ -5561,7 +5200,7 @@ func (this *QToolBarChangeEvent) Toggle() bool { func (this *QToolBarChangeEvent) callVirtualBase_Clone() *QToolBarChangeEvent { - return newQToolBarChangeEvent(C.QToolBarChangeEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQToolBarChangeEvent(C.QToolBarChangeEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QToolBarChangeEvent) OnClone(slot func(super func() *QToolBarChangeEvent) *QToolBarChangeEvent) { @@ -5645,48 +5284,40 @@ func (this *QShortcutEvent) UnsafePointer() unsafe.Pointer { } // newQShortcutEvent constructs the type using only CGO pointers. -func newQShortcutEvent(h *C.QShortcutEvent, h_QEvent *C.QEvent) *QShortcutEvent { +func newQShortcutEvent(h *C.QShortcutEvent) *QShortcutEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QShortcutEvent_virtbase(h, &outptr_QEvent) + return &QShortcutEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQShortcutEvent constructs the type using only unsafe pointers. -func UnsafeNewQShortcutEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QShortcutEvent { - if h == nil { - return nil - } - - return &QShortcutEvent{h: (*C.QShortcutEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQShortcutEvent(h unsafe.Pointer) *QShortcutEvent { + return newQShortcutEvent((*C.QShortcutEvent)(h)) } // NewQShortcutEvent constructs a new QShortcutEvent object. func NewQShortcutEvent(key *QKeySequence, id int) *QShortcutEvent { - var outptr_QShortcutEvent *C.QShortcutEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QShortcutEvent_new(key.cPointer(), (C.int)(id), &outptr_QShortcutEvent, &outptr_QEvent) - ret := newQShortcutEvent(outptr_QShortcutEvent, outptr_QEvent) + ret := newQShortcutEvent(C.QShortcutEvent_new(key.cPointer(), (C.int)(id))) ret.isSubclass = true return ret } // NewQShortcutEvent2 constructs a new QShortcutEvent object. func NewQShortcutEvent2(key *QKeySequence, id int, ambiguous bool) *QShortcutEvent { - var outptr_QShortcutEvent *C.QShortcutEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QShortcutEvent_new2(key.cPointer(), (C.int)(id), (C.bool)(ambiguous), &outptr_QShortcutEvent, &outptr_QEvent) - ret := newQShortcutEvent(outptr_QShortcutEvent, outptr_QEvent) + ret := newQShortcutEvent(C.QShortcutEvent_new2(key.cPointer(), (C.int)(id), (C.bool)(ambiguous))) ret.isSubclass = true return ret } func (this *QShortcutEvent) Clone() *QShortcutEvent { - return newQShortcutEvent(C.QShortcutEvent_Clone(this.h), nil) + return newQShortcutEvent(C.QShortcutEvent_Clone(this.h)) } func (this *QShortcutEvent) Key() *QKeySequence { @@ -5703,7 +5334,7 @@ func (this *QShortcutEvent) IsAmbiguous() bool { func (this *QShortcutEvent) callVirtualBase_Clone() *QShortcutEvent { - return newQShortcutEvent(C.QShortcutEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQShortcutEvent(C.QShortcutEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QShortcutEvent) OnClone(slot func(super func() *QShortcutEvent) *QShortcutEvent) { @@ -5787,48 +5418,40 @@ func (this *QWindowStateChangeEvent) UnsafePointer() unsafe.Pointer { } // newQWindowStateChangeEvent constructs the type using only CGO pointers. -func newQWindowStateChangeEvent(h *C.QWindowStateChangeEvent, h_QEvent *C.QEvent) *QWindowStateChangeEvent { +func newQWindowStateChangeEvent(h *C.QWindowStateChangeEvent) *QWindowStateChangeEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QWindowStateChangeEvent_virtbase(h, &outptr_QEvent) + return &QWindowStateChangeEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQWindowStateChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQWindowStateChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QWindowStateChangeEvent { - if h == nil { - return nil - } - - return &QWindowStateChangeEvent{h: (*C.QWindowStateChangeEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQWindowStateChangeEvent(h unsafe.Pointer) *QWindowStateChangeEvent { + return newQWindowStateChangeEvent((*C.QWindowStateChangeEvent)(h)) } // NewQWindowStateChangeEvent constructs a new QWindowStateChangeEvent object. func NewQWindowStateChangeEvent(oldState WindowState) *QWindowStateChangeEvent { - var outptr_QWindowStateChangeEvent *C.QWindowStateChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWindowStateChangeEvent_new((C.int)(oldState), &outptr_QWindowStateChangeEvent, &outptr_QEvent) - ret := newQWindowStateChangeEvent(outptr_QWindowStateChangeEvent, outptr_QEvent) + ret := newQWindowStateChangeEvent(C.QWindowStateChangeEvent_new((C.int)(oldState))) ret.isSubclass = true return ret } // NewQWindowStateChangeEvent2 constructs a new QWindowStateChangeEvent object. func NewQWindowStateChangeEvent2(oldState WindowState, isOverride bool) *QWindowStateChangeEvent { - var outptr_QWindowStateChangeEvent *C.QWindowStateChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QWindowStateChangeEvent_new2((C.int)(oldState), (C.bool)(isOverride), &outptr_QWindowStateChangeEvent, &outptr_QEvent) - ret := newQWindowStateChangeEvent(outptr_QWindowStateChangeEvent, outptr_QEvent) + ret := newQWindowStateChangeEvent(C.QWindowStateChangeEvent_new2((C.int)(oldState), (C.bool)(isOverride))) ret.isSubclass = true return ret } func (this *QWindowStateChangeEvent) Clone() *QWindowStateChangeEvent { - return newQWindowStateChangeEvent(C.QWindowStateChangeEvent_Clone(this.h), nil) + return newQWindowStateChangeEvent(C.QWindowStateChangeEvent_Clone(this.h)) } func (this *QWindowStateChangeEvent) OldState() WindowState { @@ -5841,7 +5464,7 @@ func (this *QWindowStateChangeEvent) IsOverride() bool { func (this *QWindowStateChangeEvent) callVirtualBase_Clone() *QWindowStateChangeEvent { - return newQWindowStateChangeEvent(C.QWindowStateChangeEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQWindowStateChangeEvent(C.QWindowStateChangeEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QWindowStateChangeEvent) OnClone(slot func(super func() *QWindowStateChangeEvent) *QWindowStateChangeEvent) { @@ -5925,72 +5548,50 @@ func (this *QTouchEvent) UnsafePointer() unsafe.Pointer { } // newQTouchEvent constructs the type using only CGO pointers. -func newQTouchEvent(h *C.QTouchEvent, h_QPointerEvent *C.QPointerEvent, h_QInputEvent *C.QInputEvent, h_QEvent *C.QEvent) *QTouchEvent { +func newQTouchEvent(h *C.QTouchEvent) *QTouchEvent { if h == nil { return nil } + var outptr_QPointerEvent *C.QPointerEvent = nil + C.QTouchEvent_virtbase(h, &outptr_QPointerEvent) + return &QTouchEvent{h: h, - QPointerEvent: newQPointerEvent(h_QPointerEvent, h_QInputEvent, h_QEvent)} + QPointerEvent: newQPointerEvent(outptr_QPointerEvent)} } // UnsafeNewQTouchEvent constructs the type using only unsafe pointers. -func UnsafeNewQTouchEvent(h unsafe.Pointer, h_QPointerEvent unsafe.Pointer, h_QInputEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QTouchEvent { - if h == nil { - return nil - } - - return &QTouchEvent{h: (*C.QTouchEvent)(h), - QPointerEvent: UnsafeNewQPointerEvent(h_QPointerEvent, h_QInputEvent, h_QEvent)} +func UnsafeNewQTouchEvent(h unsafe.Pointer) *QTouchEvent { + return newQTouchEvent((*C.QTouchEvent)(h)) } // NewQTouchEvent constructs a new QTouchEvent object. func NewQTouchEvent(eventType QEvent__Type) *QTouchEvent { - var outptr_QTouchEvent *C.QTouchEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTouchEvent_new((C.int)(eventType), &outptr_QTouchEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTouchEvent(outptr_QTouchEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTouchEvent(C.QTouchEvent_new((C.int)(eventType))) ret.isSubclass = true return ret } // NewQTouchEvent2 constructs a new QTouchEvent object. func NewQTouchEvent2(eventType QEvent__Type, device *QPointingDevice, modifiers KeyboardModifier, touchPointStates QEventPoint__State) *QTouchEvent { - var outptr_QTouchEvent *C.QTouchEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTouchEvent_new2((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.uint8_t)(touchPointStates), &outptr_QTouchEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTouchEvent(outptr_QTouchEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTouchEvent(C.QTouchEvent_new2((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.uint8_t)(touchPointStates))) ret.isSubclass = true return ret } // NewQTouchEvent3 constructs a new QTouchEvent object. func NewQTouchEvent3(eventType QEvent__Type, device *QPointingDevice) *QTouchEvent { - var outptr_QTouchEvent *C.QTouchEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTouchEvent_new3((C.int)(eventType), device.cPointer(), &outptr_QTouchEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTouchEvent(outptr_QTouchEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTouchEvent(C.QTouchEvent_new3((C.int)(eventType), device.cPointer())) ret.isSubclass = true return ret } // NewQTouchEvent4 constructs a new QTouchEvent object. func NewQTouchEvent4(eventType QEvent__Type, device *QPointingDevice, modifiers KeyboardModifier) *QTouchEvent { - var outptr_QTouchEvent *C.QTouchEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTouchEvent_new4((C.int)(eventType), device.cPointer(), (C.int)(modifiers), &outptr_QTouchEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTouchEvent(outptr_QTouchEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTouchEvent(C.QTouchEvent_new4((C.int)(eventType), device.cPointer(), (C.int)(modifiers))) ret.isSubclass = true return ret } @@ -6003,13 +5604,8 @@ func NewQTouchEvent5(eventType QEvent__Type, device *QPointingDevice, modifiers touchPoints_CArray[i] = touchPoints[i].cPointer() } touchPoints_ma := C.struct_miqt_array{len: C.size_t(len(touchPoints)), data: unsafe.Pointer(touchPoints_CArray)} - var outptr_QTouchEvent *C.QTouchEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTouchEvent_new5((C.int)(eventType), device.cPointer(), (C.int)(modifiers), touchPoints_ma, &outptr_QTouchEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTouchEvent(outptr_QTouchEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTouchEvent(C.QTouchEvent_new5((C.int)(eventType), device.cPointer(), (C.int)(modifiers), touchPoints_ma)) ret.isSubclass = true return ret } @@ -6022,19 +5618,14 @@ func NewQTouchEvent6(eventType QEvent__Type, device *QPointingDevice, modifiers touchPoints_CArray[i] = touchPoints[i].cPointer() } touchPoints_ma := C.struct_miqt_array{len: C.size_t(len(touchPoints)), data: unsafe.Pointer(touchPoints_CArray)} - var outptr_QTouchEvent *C.QTouchEvent = nil - var outptr_QPointerEvent *C.QPointerEvent = nil - var outptr_QInputEvent *C.QInputEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QTouchEvent_new6((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.uint8_t)(touchPointStates), touchPoints_ma, &outptr_QTouchEvent, &outptr_QPointerEvent, &outptr_QInputEvent, &outptr_QEvent) - ret := newQTouchEvent(outptr_QTouchEvent, outptr_QPointerEvent, outptr_QInputEvent, outptr_QEvent) + ret := newQTouchEvent(C.QTouchEvent_new6((C.int)(eventType), device.cPointer(), (C.int)(modifiers), (C.uint8_t)(touchPointStates), touchPoints_ma)) ret.isSubclass = true return ret } func (this *QTouchEvent) Clone() *QTouchEvent { - return newQTouchEvent(C.QTouchEvent_Clone(this.h), nil, nil, nil) + return newQTouchEvent(C.QTouchEvent_Clone(this.h)) } func (this *QTouchEvent) Target() *QObject { @@ -6071,7 +5662,7 @@ func (this *QTouchEvent) IsEndEvent() bool { func (this *QTouchEvent) callVirtualBase_Clone() *QTouchEvent { - return newQTouchEvent(C.QTouchEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil, nil, nil) + return newQTouchEvent(C.QTouchEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QTouchEvent) OnClone(slot func(super func() *QTouchEvent) *QTouchEvent) { @@ -6256,37 +5847,32 @@ func (this *QScrollPrepareEvent) UnsafePointer() unsafe.Pointer { } // newQScrollPrepareEvent constructs the type using only CGO pointers. -func newQScrollPrepareEvent(h *C.QScrollPrepareEvent, h_QEvent *C.QEvent) *QScrollPrepareEvent { +func newQScrollPrepareEvent(h *C.QScrollPrepareEvent) *QScrollPrepareEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QScrollPrepareEvent_virtbase(h, &outptr_QEvent) + return &QScrollPrepareEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQScrollPrepareEvent constructs the type using only unsafe pointers. -func UnsafeNewQScrollPrepareEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QScrollPrepareEvent { - if h == nil { - return nil - } - - return &QScrollPrepareEvent{h: (*C.QScrollPrepareEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQScrollPrepareEvent(h unsafe.Pointer) *QScrollPrepareEvent { + return newQScrollPrepareEvent((*C.QScrollPrepareEvent)(h)) } // NewQScrollPrepareEvent constructs a new QScrollPrepareEvent object. func NewQScrollPrepareEvent(startPos *QPointF) *QScrollPrepareEvent { - var outptr_QScrollPrepareEvent *C.QScrollPrepareEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QScrollPrepareEvent_new(startPos.cPointer(), &outptr_QScrollPrepareEvent, &outptr_QEvent) - ret := newQScrollPrepareEvent(outptr_QScrollPrepareEvent, outptr_QEvent) + ret := newQScrollPrepareEvent(C.QScrollPrepareEvent_new(startPos.cPointer())) ret.isSubclass = true return ret } func (this *QScrollPrepareEvent) Clone() *QScrollPrepareEvent { - return newQScrollPrepareEvent(C.QScrollPrepareEvent_Clone(this.h), nil) + return newQScrollPrepareEvent(C.QScrollPrepareEvent_Clone(this.h)) } func (this *QScrollPrepareEvent) StartPos() *QPointF { @@ -6327,7 +5913,7 @@ func (this *QScrollPrepareEvent) SetContentPos(pos *QPointF) { func (this *QScrollPrepareEvent) callVirtualBase_Clone() *QScrollPrepareEvent { - return newQScrollPrepareEvent(C.QScrollPrepareEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQScrollPrepareEvent(C.QScrollPrepareEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QScrollPrepareEvent) OnClone(slot func(super func() *QScrollPrepareEvent) *QScrollPrepareEvent) { @@ -6411,37 +5997,32 @@ func (this *QScrollEvent) UnsafePointer() unsafe.Pointer { } // newQScrollEvent constructs the type using only CGO pointers. -func newQScrollEvent(h *C.QScrollEvent, h_QEvent *C.QEvent) *QScrollEvent { +func newQScrollEvent(h *C.QScrollEvent) *QScrollEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QScrollEvent_virtbase(h, &outptr_QEvent) + return &QScrollEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQScrollEvent constructs the type using only unsafe pointers. -func UnsafeNewQScrollEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QScrollEvent { - if h == nil { - return nil - } - - return &QScrollEvent{h: (*C.QScrollEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQScrollEvent(h unsafe.Pointer) *QScrollEvent { + return newQScrollEvent((*C.QScrollEvent)(h)) } // NewQScrollEvent constructs a new QScrollEvent object. func NewQScrollEvent(contentPos *QPointF, overshoot *QPointF, scrollState QScrollEvent__ScrollState) *QScrollEvent { - var outptr_QScrollEvent *C.QScrollEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QScrollEvent_new(contentPos.cPointer(), overshoot.cPointer(), (C.int)(scrollState), &outptr_QScrollEvent, &outptr_QEvent) - ret := newQScrollEvent(outptr_QScrollEvent, outptr_QEvent) + ret := newQScrollEvent(C.QScrollEvent_new(contentPos.cPointer(), overshoot.cPointer(), (C.int)(scrollState))) ret.isSubclass = true return ret } func (this *QScrollEvent) Clone() *QScrollEvent { - return newQScrollEvent(C.QScrollEvent_Clone(this.h), nil) + return newQScrollEvent(C.QScrollEvent_Clone(this.h)) } func (this *QScrollEvent) ContentPos() *QPointF { @@ -6462,7 +6043,7 @@ func (this *QScrollEvent) ScrollState() QScrollEvent__ScrollState { func (this *QScrollEvent) callVirtualBase_Clone() *QScrollEvent { - return newQScrollEvent(C.QScrollEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQScrollEvent(C.QScrollEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QScrollEvent) OnClone(slot func(super func() *QScrollEvent) *QScrollEvent) { @@ -6546,41 +6127,36 @@ func (this *QScreenOrientationChangeEvent) UnsafePointer() unsafe.Pointer { } // newQScreenOrientationChangeEvent constructs the type using only CGO pointers. -func newQScreenOrientationChangeEvent(h *C.QScreenOrientationChangeEvent, h_QEvent *C.QEvent) *QScreenOrientationChangeEvent { +func newQScreenOrientationChangeEvent(h *C.QScreenOrientationChangeEvent) *QScreenOrientationChangeEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QScreenOrientationChangeEvent_virtbase(h, &outptr_QEvent) + return &QScreenOrientationChangeEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQScreenOrientationChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQScreenOrientationChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QScreenOrientationChangeEvent { - if h == nil { - return nil - } - - return &QScreenOrientationChangeEvent{h: (*C.QScreenOrientationChangeEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQScreenOrientationChangeEvent(h unsafe.Pointer) *QScreenOrientationChangeEvent { + return newQScreenOrientationChangeEvent((*C.QScreenOrientationChangeEvent)(h)) } // NewQScreenOrientationChangeEvent constructs a new QScreenOrientationChangeEvent object. func NewQScreenOrientationChangeEvent(screen *QScreen, orientation ScreenOrientation) *QScreenOrientationChangeEvent { - var outptr_QScreenOrientationChangeEvent *C.QScreenOrientationChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QScreenOrientationChangeEvent_new(screen.cPointer(), (C.int)(orientation), &outptr_QScreenOrientationChangeEvent, &outptr_QEvent) - ret := newQScreenOrientationChangeEvent(outptr_QScreenOrientationChangeEvent, outptr_QEvent) + ret := newQScreenOrientationChangeEvent(C.QScreenOrientationChangeEvent_new(screen.cPointer(), (C.int)(orientation))) ret.isSubclass = true return ret } func (this *QScreenOrientationChangeEvent) Clone() *QScreenOrientationChangeEvent { - return newQScreenOrientationChangeEvent(C.QScreenOrientationChangeEvent_Clone(this.h), nil) + return newQScreenOrientationChangeEvent(C.QScreenOrientationChangeEvent_Clone(this.h)) } func (this *QScreenOrientationChangeEvent) Screen() *QScreen { - return newQScreen(C.QScreenOrientationChangeEvent_Screen(this.h), nil) + return newQScreen(C.QScreenOrientationChangeEvent_Screen(this.h)) } func (this *QScreenOrientationChangeEvent) Orientation() ScreenOrientation { @@ -6589,7 +6165,7 @@ func (this *QScreenOrientationChangeEvent) Orientation() ScreenOrientation { func (this *QScreenOrientationChangeEvent) callVirtualBase_Clone() *QScreenOrientationChangeEvent { - return newQScreenOrientationChangeEvent(C.QScreenOrientationChangeEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQScreenOrientationChangeEvent(C.QScreenOrientationChangeEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QScreenOrientationChangeEvent) OnClone(slot func(super func() *QScreenOrientationChangeEvent) *QScreenOrientationChangeEvent) { @@ -6673,37 +6249,32 @@ func (this *QApplicationStateChangeEvent) UnsafePointer() unsafe.Pointer { } // newQApplicationStateChangeEvent constructs the type using only CGO pointers. -func newQApplicationStateChangeEvent(h *C.QApplicationStateChangeEvent, h_QEvent *C.QEvent) *QApplicationStateChangeEvent { +func newQApplicationStateChangeEvent(h *C.QApplicationStateChangeEvent) *QApplicationStateChangeEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QApplicationStateChangeEvent_virtbase(h, &outptr_QEvent) + return &QApplicationStateChangeEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQApplicationStateChangeEvent constructs the type using only unsafe pointers. -func UnsafeNewQApplicationStateChangeEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QApplicationStateChangeEvent { - if h == nil { - return nil - } - - return &QApplicationStateChangeEvent{h: (*C.QApplicationStateChangeEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQApplicationStateChangeEvent(h unsafe.Pointer) *QApplicationStateChangeEvent { + return newQApplicationStateChangeEvent((*C.QApplicationStateChangeEvent)(h)) } // NewQApplicationStateChangeEvent constructs a new QApplicationStateChangeEvent object. func NewQApplicationStateChangeEvent(state ApplicationState) *QApplicationStateChangeEvent { - var outptr_QApplicationStateChangeEvent *C.QApplicationStateChangeEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QApplicationStateChangeEvent_new((C.int)(state), &outptr_QApplicationStateChangeEvent, &outptr_QEvent) - ret := newQApplicationStateChangeEvent(outptr_QApplicationStateChangeEvent, outptr_QEvent) + ret := newQApplicationStateChangeEvent(C.QApplicationStateChangeEvent_new((C.int)(state))) ret.isSubclass = true return ret } func (this *QApplicationStateChangeEvent) Clone() *QApplicationStateChangeEvent { - return newQApplicationStateChangeEvent(C.QApplicationStateChangeEvent_Clone(this.h), nil) + return newQApplicationStateChangeEvent(C.QApplicationStateChangeEvent_Clone(this.h)) } func (this *QApplicationStateChangeEvent) ApplicationState() ApplicationState { @@ -6712,7 +6283,7 @@ func (this *QApplicationStateChangeEvent) ApplicationState() ApplicationState { func (this *QApplicationStateChangeEvent) callVirtualBase_Clone() *QApplicationStateChangeEvent { - return newQApplicationStateChangeEvent(C.QApplicationStateChangeEvent_virtualbase_Clone(unsafe.Pointer(this.h)), nil) + return newQApplicationStateChangeEvent(C.QApplicationStateChangeEvent_virtualbase_Clone(unsafe.Pointer(this.h))) } func (this *QApplicationStateChangeEvent) OnClone(slot func(super func() *QApplicationStateChangeEvent) *QApplicationStateChangeEvent) { @@ -6799,44 +6370,35 @@ func newQInputMethodEvent__Attribute(h *C.QInputMethodEvent__Attribute) *QInputM if h == nil { return nil } + return &QInputMethodEvent__Attribute{h: h} } // UnsafeNewQInputMethodEvent__Attribute constructs the type using only unsafe pointers. func UnsafeNewQInputMethodEvent__Attribute(h unsafe.Pointer) *QInputMethodEvent__Attribute { - if h == nil { - return nil - } - - return &QInputMethodEvent__Attribute{h: (*C.QInputMethodEvent__Attribute)(h)} + return newQInputMethodEvent__Attribute((*C.QInputMethodEvent__Attribute)(h)) } // NewQInputMethodEvent__Attribute constructs a new QInputMethodEvent::Attribute object. func NewQInputMethodEvent__Attribute(typ QInputMethodEvent__AttributeType, s int, l int, val QVariant) *QInputMethodEvent__Attribute { - var outptr_QInputMethodEvent__Attribute *C.QInputMethodEvent__Attribute = nil - C.QInputMethodEvent__Attribute_new((C.int)(typ), (C.int)(s), (C.int)(l), val.cPointer(), &outptr_QInputMethodEvent__Attribute) - ret := newQInputMethodEvent__Attribute(outptr_QInputMethodEvent__Attribute) + ret := newQInputMethodEvent__Attribute(C.QInputMethodEvent__Attribute_new((C.int)(typ), (C.int)(s), (C.int)(l), val.cPointer())) ret.isSubclass = true return ret } // NewQInputMethodEvent__Attribute2 constructs a new QInputMethodEvent::Attribute object. func NewQInputMethodEvent__Attribute2(typ QInputMethodEvent__AttributeType, s int, l int) *QInputMethodEvent__Attribute { - var outptr_QInputMethodEvent__Attribute *C.QInputMethodEvent__Attribute = nil - C.QInputMethodEvent__Attribute_new2((C.int)(typ), (C.int)(s), (C.int)(l), &outptr_QInputMethodEvent__Attribute) - ret := newQInputMethodEvent__Attribute(outptr_QInputMethodEvent__Attribute) + ret := newQInputMethodEvent__Attribute(C.QInputMethodEvent__Attribute_new2((C.int)(typ), (C.int)(s), (C.int)(l))) ret.isSubclass = true return ret } // NewQInputMethodEvent__Attribute3 constructs a new QInputMethodEvent::Attribute object. func NewQInputMethodEvent__Attribute3(param1 *QInputMethodEvent__Attribute) *QInputMethodEvent__Attribute { - var outptr_QInputMethodEvent__Attribute *C.QInputMethodEvent__Attribute = nil - C.QInputMethodEvent__Attribute_new3(param1.cPointer(), &outptr_QInputMethodEvent__Attribute) - ret := newQInputMethodEvent__Attribute(outptr_QInputMethodEvent__Attribute) + ret := newQInputMethodEvent__Attribute(C.QInputMethodEvent__Attribute_new3(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qevent.h b/qt6/gen_qevent.h index 68198f77..b0522fea 100644 --- a/qt6/gen_qevent.h +++ b/qt6/gen_qevent.h @@ -144,8 +144,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWindowStateChangeEvent QWindowStateChangeEvent; #endif -void QInputEvent_new(int typeVal, QInputDevice* m_dev, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QInputEvent_new2(int typeVal, QInputDevice* m_dev, int modifiers, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QInputEvent* QInputEvent_new(int typeVal, QInputDevice* m_dev); +QInputEvent* QInputEvent_new2(int typeVal, QInputDevice* m_dev, int modifiers); +void QInputEvent_virtbase(QInputEvent* src, QEvent** outptr_QEvent); QInputEvent* QInputEvent_Clone(const QInputEvent* self); QInputDevice* QInputEvent_Device(const QInputEvent* self); int QInputEvent_DeviceType(const QInputEvent* self); @@ -161,9 +162,10 @@ void QInputEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QInputEvent_virtualbase_SetAccepted(void* self, bool accepted); void QInputEvent_Delete(QInputEvent* self, bool isSubclass); -void QPointerEvent_new(int typeVal, QPointingDevice* dev, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QPointerEvent_new2(int typeVal, QPointingDevice* dev, int modifiers, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QPointerEvent_new3(int typeVal, QPointingDevice* dev, int modifiers, struct miqt_array /* of QEventPoint* */ points, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QPointerEvent* QPointerEvent_new(int typeVal, QPointingDevice* dev); +QPointerEvent* QPointerEvent_new2(int typeVal, QPointingDevice* dev, int modifiers); +QPointerEvent* QPointerEvent_new3(int typeVal, QPointingDevice* dev, int modifiers, struct miqt_array /* of QEventPoint* */ points); +void QPointerEvent_virtbase(QPointerEvent* src, QInputEvent** outptr_QInputEvent); QPointerEvent* QPointerEvent_Clone(const QPointerEvent* self); QPointingDevice* QPointerEvent_PointingDevice(const QPointerEvent* self); int QPointerEvent_PointerType(const QPointerEvent* self); @@ -197,6 +199,7 @@ void QPointerEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QPointerEvent_virtualbase_SetAccepted(void* self, bool accepted); void QPointerEvent_Delete(QPointerEvent* self, bool isSubclass); +void QSinglePointEvent_virtbase(QSinglePointEvent* src, QPointerEvent** outptr_QPointerEvent); QSinglePointEvent* QSinglePointEvent_Clone(const QSinglePointEvent* self); int QSinglePointEvent_Button(const QSinglePointEvent* self); int QSinglePointEvent_Buttons(const QSinglePointEvent* self); @@ -210,8 +213,9 @@ QObject* QSinglePointEvent_ExclusivePointGrabber(const QSinglePointEvent* self); void QSinglePointEvent_SetExclusivePointGrabber(QSinglePointEvent* self, QObject* exclusiveGrabber); void QSinglePointEvent_Delete(QSinglePointEvent* self, bool isSubclass); -void QEnterEvent_new(QPointF* localPos, QPointF* scenePos, QPointF* globalPos, QEnterEvent** outptr_QEnterEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QEnterEvent_new2(QPointF* localPos, QPointF* scenePos, QPointF* globalPos, QPointingDevice* device, QEnterEvent** outptr_QEnterEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QEnterEvent* QEnterEvent_new(QPointF* localPos, QPointF* scenePos, QPointF* globalPos); +QEnterEvent* QEnterEvent_new2(QPointF* localPos, QPointF* scenePos, QPointF* globalPos, QPointingDevice* device); +void QEnterEvent_virtbase(QEnterEvent* src, QSinglePointEvent** outptr_QSinglePointEvent); QEnterEvent* QEnterEvent_Clone(const QEnterEvent* self); QPoint* QEnterEvent_Pos(const QEnterEvent* self); QPoint* QEnterEvent_GlobalPos(const QEnterEvent* self); @@ -232,14 +236,15 @@ void QEnterEvent_override_virtual_IsEndEvent(void* self, intptr_t slot); bool QEnterEvent_virtualbase_IsEndEvent(const void* self); void QEnterEvent_Delete(QEnterEvent* self, bool isSubclass); -void QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QMouseEvent_new5(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QMouseEvent_new6(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QMouseEvent_new7(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QMouseEvent_new8(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source, QPointingDevice* device, QMouseEvent** outptr_QMouseEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QMouseEvent* QMouseEvent_new(int typeVal, QPointF* localPos, int button, int buttons, int modifiers); +QMouseEvent* QMouseEvent_new2(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers); +QMouseEvent* QMouseEvent_new3(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers); +QMouseEvent* QMouseEvent_new4(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source); +QMouseEvent* QMouseEvent_new5(int typeVal, QPointF* localPos, int button, int buttons, int modifiers, QPointingDevice* device); +QMouseEvent* QMouseEvent_new6(int typeVal, QPointF* localPos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device); +QMouseEvent* QMouseEvent_new7(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, QPointingDevice* device); +QMouseEvent* QMouseEvent_new8(int typeVal, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, int button, int buttons, int modifiers, int source, QPointingDevice* device); +void QMouseEvent_virtbase(QMouseEvent* src, QSinglePointEvent** outptr_QSinglePointEvent); QMouseEvent* QMouseEvent_Clone(const QMouseEvent* self); QPoint* QMouseEvent_Pos(const QMouseEvent* self); QPoint* QMouseEvent_GlobalPos(const QMouseEvent* self); @@ -262,12 +267,13 @@ void QMouseEvent_override_virtual_IsEndEvent(void* self, intptr_t slot); bool QMouseEvent_virtualbase_IsEndEvent(const void* self); void QMouseEvent_Delete(QMouseEvent* self, bool isSubclass); -void QHoverEvent_new(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QHoverEvent_new2(int typeVal, QPointF* pos, QPointF* oldPos, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QHoverEvent_new3(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QHoverEvent_new4(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers, QPointingDevice* device, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QHoverEvent_new5(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QHoverEvent_new6(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QPointingDevice* device, QHoverEvent** outptr_QHoverEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QHoverEvent* QHoverEvent_new(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos); +QHoverEvent* QHoverEvent_new2(int typeVal, QPointF* pos, QPointF* oldPos); +QHoverEvent* QHoverEvent_new3(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers); +QHoverEvent* QHoverEvent_new4(int typeVal, QPointF* scenePos, QPointF* globalPos, QPointF* oldPos, int modifiers, QPointingDevice* device); +QHoverEvent* QHoverEvent_new5(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers); +QHoverEvent* QHoverEvent_new6(int typeVal, QPointF* pos, QPointF* oldPos, int modifiers, QPointingDevice* device); +void QHoverEvent_virtbase(QHoverEvent* src, QSinglePointEvent** outptr_QSinglePointEvent); QHoverEvent* QHoverEvent_Clone(const QHoverEvent* self); QPoint* QHoverEvent_Pos(const QHoverEvent* self); QPointF* QHoverEvent_PosF(const QHoverEvent* self); @@ -284,9 +290,10 @@ void QHoverEvent_override_virtual_IsEndEvent(void* self, intptr_t slot); bool QHoverEvent_virtualbase_IsEndEvent(const void* self); void QHoverEvent_Delete(QHoverEvent* self, bool isSubclass); -void QWheelEvent_new(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, QWheelEvent** outptr_QWheelEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QWheelEvent_new2(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QWheelEvent** outptr_QWheelEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QPointingDevice* device, QWheelEvent** outptr_QWheelEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QWheelEvent* QWheelEvent_new(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted); +QWheelEvent* QWheelEvent_new2(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source); +QWheelEvent* QWheelEvent_new3(QPointF* pos, QPointF* globalPos, QPoint* pixelDelta, QPoint* angleDelta, int buttons, int modifiers, int phase, bool inverted, int source, QPointingDevice* device); +void QWheelEvent_virtbase(QWheelEvent* src, QSinglePointEvent** outptr_QSinglePointEvent); QWheelEvent* QWheelEvent_Clone(const QWheelEvent* self); QPoint* QWheelEvent_PixelDelta(const QWheelEvent* self); QPoint* QWheelEvent_AngleDelta(const QWheelEvent* self); @@ -308,7 +315,8 @@ void QWheelEvent_override_virtual_IsEndEvent(void* self, intptr_t slot); bool QWheelEvent_virtualbase_IsEndEvent(const void* self); void QWheelEvent_Delete(QWheelEvent* self, bool isSubclass); -void QTabletEvent_new(int t, QPointingDevice* device, QPointF* pos, QPointF* globalPos, double pressure, float xTilt, float yTilt, float tangentialPressure, double rotation, float z, int keyState, int button, int buttons, QTabletEvent** outptr_QTabletEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QTabletEvent* QTabletEvent_new(int t, QPointingDevice* device, QPointF* pos, QPointF* globalPos, double pressure, float xTilt, float yTilt, float tangentialPressure, double rotation, float z, int keyState, int button, int buttons); +void QTabletEvent_virtbase(QTabletEvent* src, QSinglePointEvent** outptr_QSinglePointEvent); QTabletEvent* QTabletEvent_Clone(const QTabletEvent* self); QPoint* QTabletEvent_Pos(const QTabletEvent* self); QPoint* QTabletEvent_GlobalPos(const QTabletEvent* self); @@ -337,9 +345,10 @@ void QTabletEvent_override_virtual_IsEndEvent(void* self, intptr_t slot); bool QTabletEvent_virtualbase_IsEndEvent(const void* self); void QTabletEvent_Delete(QTabletEvent* self, bool isSubclass); -void QNativeGestureEvent_new(int typeVal, QPointingDevice* dev, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, unsigned long long sequenceId, unsigned long long intArgument, QNativeGestureEvent** outptr_QNativeGestureEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QNativeGestureEvent_new2(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta, QNativeGestureEvent** outptr_QNativeGestureEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QNativeGestureEvent_new3(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta, unsigned long long sequenceId, QNativeGestureEvent** outptr_QNativeGestureEvent, QSinglePointEvent** outptr_QSinglePointEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QNativeGestureEvent* QNativeGestureEvent_new(int typeVal, QPointingDevice* dev, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, unsigned long long sequenceId, unsigned long long intArgument); +QNativeGestureEvent* QNativeGestureEvent_new2(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta); +QNativeGestureEvent* QNativeGestureEvent_new3(int typeVal, QPointingDevice* dev, int fingerCount, QPointF* localPos, QPointF* scenePos, QPointF* globalPos, double value, QPointF* delta, unsigned long long sequenceId); +void QNativeGestureEvent_virtbase(QNativeGestureEvent* src, QSinglePointEvent** outptr_QSinglePointEvent); QNativeGestureEvent* QNativeGestureEvent_Clone(const QNativeGestureEvent* self); int QNativeGestureEvent_GestureType(const QNativeGestureEvent* self); int QNativeGestureEvent_FingerCount(const QNativeGestureEvent* self); @@ -360,15 +369,16 @@ void QNativeGestureEvent_override_virtual_IsEndEvent(void* self, intptr_t slot); bool QNativeGestureEvent_virtualbase_IsEndEvent(const void* self); void QNativeGestureEvent_Delete(QNativeGestureEvent* self, bool isSubclass); -void QKeyEvent_new(int typeVal, int key, int modifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new3(int typeVal, int key, int modifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new6(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QInputDevice* device, QKeyEvent** outptr_QKeyEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QKeyEvent* QKeyEvent_new(int typeVal, int key, int modifiers); +QKeyEvent* QKeyEvent_new2(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers); +QKeyEvent* QKeyEvent_new3(int typeVal, int key, int modifiers, struct miqt_string text); +QKeyEvent* QKeyEvent_new4(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep); +QKeyEvent* QKeyEvent_new5(int typeVal, int key, int modifiers, struct miqt_string text, bool autorep, uint16_t count); +QKeyEvent* QKeyEvent_new6(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text); +QKeyEvent* QKeyEvent_new7(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep); +QKeyEvent* QKeyEvent_new8(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count); +QKeyEvent* QKeyEvent_new9(int typeVal, int key, int modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, struct miqt_string text, bool autorep, uint16_t count, QInputDevice* device); +void QKeyEvent_virtbase(QKeyEvent* src, QInputEvent** outptr_QInputEvent); QKeyEvent* QKeyEvent_Clone(const QKeyEvent* self); int QKeyEvent_Key(const QKeyEvent* self); bool QKeyEvent_Matches(const QKeyEvent* self, int key); @@ -386,8 +396,9 @@ void QKeyEvent_override_virtual_SetTimestamp(void* self, intptr_t slot); void QKeyEvent_virtualbase_SetTimestamp(void* self, unsigned long long timestamp); void QKeyEvent_Delete(QKeyEvent* self, bool isSubclass); -void QFocusEvent_new(int typeVal, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent); -void QFocusEvent_new2(int typeVal, int reason, QFocusEvent** outptr_QFocusEvent, QEvent** outptr_QEvent); +QFocusEvent* QFocusEvent_new(int typeVal); +QFocusEvent* QFocusEvent_new2(int typeVal, int reason); +void QFocusEvent_virtbase(QFocusEvent* src, QEvent** outptr_QEvent); QFocusEvent* QFocusEvent_Clone(const QFocusEvent* self); bool QFocusEvent_GotFocus(const QFocusEvent* self); bool QFocusEvent_LostFocus(const QFocusEvent* self); @@ -398,8 +409,9 @@ void QFocusEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QFocusEvent_virtualbase_SetAccepted(void* self, bool accepted); void QFocusEvent_Delete(QFocusEvent* self, bool isSubclass); -void QPaintEvent_new(QRegion* paintRegion, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent); -void QPaintEvent_new2(QRect* paintRect, QPaintEvent** outptr_QPaintEvent, QEvent** outptr_QEvent); +QPaintEvent* QPaintEvent_new(QRegion* paintRegion); +QPaintEvent* QPaintEvent_new2(QRect* paintRect); +void QPaintEvent_virtbase(QPaintEvent* src, QEvent** outptr_QEvent); QPaintEvent* QPaintEvent_Clone(const QPaintEvent* self); QRect* QPaintEvent_Rect(const QPaintEvent* self); QRegion* QPaintEvent_Region(const QPaintEvent* self); @@ -409,7 +421,8 @@ void QPaintEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QPaintEvent_virtualbase_SetAccepted(void* self, bool accepted); void QPaintEvent_Delete(QPaintEvent* self, bool isSubclass); -void QMoveEvent_new(QPoint* pos, QPoint* oldPos, QMoveEvent** outptr_QMoveEvent, QEvent** outptr_QEvent); +QMoveEvent* QMoveEvent_new(QPoint* pos, QPoint* oldPos); +void QMoveEvent_virtbase(QMoveEvent* src, QEvent** outptr_QEvent); QMoveEvent* QMoveEvent_Clone(const QMoveEvent* self); QPoint* QMoveEvent_Pos(const QMoveEvent* self); QPoint* QMoveEvent_OldPos(const QMoveEvent* self); @@ -419,7 +432,8 @@ void QMoveEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QMoveEvent_virtualbase_SetAccepted(void* self, bool accepted); void QMoveEvent_Delete(QMoveEvent* self, bool isSubclass); -void QExposeEvent_new(QRegion* m_region, QExposeEvent** outptr_QExposeEvent, QEvent** outptr_QEvent); +QExposeEvent* QExposeEvent_new(QRegion* m_region); +void QExposeEvent_virtbase(QExposeEvent* src, QEvent** outptr_QEvent); QExposeEvent* QExposeEvent_Clone(const QExposeEvent* self); QRegion* QExposeEvent_Region(const QExposeEvent* self); void QExposeEvent_override_virtual_Clone(void* self, intptr_t slot); @@ -428,7 +442,8 @@ void QExposeEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QExposeEvent_virtualbase_SetAccepted(void* self, bool accepted); void QExposeEvent_Delete(QExposeEvent* self, bool isSubclass); -void QPlatformSurfaceEvent_new(int surfaceEventType, QPlatformSurfaceEvent** outptr_QPlatformSurfaceEvent, QEvent** outptr_QEvent); +QPlatformSurfaceEvent* QPlatformSurfaceEvent_new(int surfaceEventType); +void QPlatformSurfaceEvent_virtbase(QPlatformSurfaceEvent* src, QEvent** outptr_QEvent); QPlatformSurfaceEvent* QPlatformSurfaceEvent_Clone(const QPlatformSurfaceEvent* self); int QPlatformSurfaceEvent_SurfaceEventType(const QPlatformSurfaceEvent* self); void QPlatformSurfaceEvent_override_virtual_Clone(void* self, intptr_t slot); @@ -437,7 +452,8 @@ void QPlatformSurfaceEvent_override_virtual_SetAccepted(void* self, intptr_t slo void QPlatformSurfaceEvent_virtualbase_SetAccepted(void* self, bool accepted); void QPlatformSurfaceEvent_Delete(QPlatformSurfaceEvent* self, bool isSubclass); -void QResizeEvent_new(QSize* size, QSize* oldSize, QResizeEvent** outptr_QResizeEvent, QEvent** outptr_QEvent); +QResizeEvent* QResizeEvent_new(QSize* size, QSize* oldSize); +void QResizeEvent_virtbase(QResizeEvent* src, QEvent** outptr_QEvent); QResizeEvent* QResizeEvent_Clone(const QResizeEvent* self); QSize* QResizeEvent_Size(const QResizeEvent* self); QSize* QResizeEvent_OldSize(const QResizeEvent* self); @@ -447,7 +463,8 @@ void QResizeEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QResizeEvent_virtualbase_SetAccepted(void* self, bool accepted); void QResizeEvent_Delete(QResizeEvent* self, bool isSubclass); -void QCloseEvent_new(QCloseEvent** outptr_QCloseEvent, QEvent** outptr_QEvent); +QCloseEvent* QCloseEvent_new(); +void QCloseEvent_virtbase(QCloseEvent* src, QEvent** outptr_QEvent); QCloseEvent* QCloseEvent_Clone(const QCloseEvent* self); void QCloseEvent_override_virtual_Clone(void* self, intptr_t slot); QCloseEvent* QCloseEvent_virtualbase_Clone(const void* self); @@ -455,7 +472,8 @@ void QCloseEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QCloseEvent_virtualbase_SetAccepted(void* self, bool accepted); void QCloseEvent_Delete(QCloseEvent* self, bool isSubclass); -void QIconDragEvent_new(QIconDragEvent** outptr_QIconDragEvent, QEvent** outptr_QEvent); +QIconDragEvent* QIconDragEvent_new(); +void QIconDragEvent_virtbase(QIconDragEvent* src, QEvent** outptr_QEvent); QIconDragEvent* QIconDragEvent_Clone(const QIconDragEvent* self); void QIconDragEvent_override_virtual_Clone(void* self, intptr_t slot); QIconDragEvent* QIconDragEvent_virtualbase_Clone(const void* self); @@ -463,7 +481,8 @@ void QIconDragEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QIconDragEvent_virtualbase_SetAccepted(void* self, bool accepted); void QIconDragEvent_Delete(QIconDragEvent* self, bool isSubclass); -void QShowEvent_new(QShowEvent** outptr_QShowEvent, QEvent** outptr_QEvent); +QShowEvent* QShowEvent_new(); +void QShowEvent_virtbase(QShowEvent* src, QEvent** outptr_QEvent); QShowEvent* QShowEvent_Clone(const QShowEvent* self); void QShowEvent_override_virtual_Clone(void* self, intptr_t slot); QShowEvent* QShowEvent_virtualbase_Clone(const void* self); @@ -471,7 +490,8 @@ void QShowEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QShowEvent_virtualbase_SetAccepted(void* self, bool accepted); void QShowEvent_Delete(QShowEvent* self, bool isSubclass); -void QHideEvent_new(QHideEvent** outptr_QHideEvent, QEvent** outptr_QEvent); +QHideEvent* QHideEvent_new(); +void QHideEvent_virtbase(QHideEvent* src, QEvent** outptr_QEvent); QHideEvent* QHideEvent_Clone(const QHideEvent* self); void QHideEvent_override_virtual_Clone(void* self, intptr_t slot); QHideEvent* QHideEvent_virtualbase_Clone(const void* self); @@ -479,9 +499,10 @@ void QHideEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QHideEvent_virtualbase_SetAccepted(void* self, bool accepted); void QHideEvent_Delete(QHideEvent* self, bool isSubclass); -void QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QContextMenuEvent_new2(int reason, QPoint* pos, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QContextMenuEvent_new3(int reason, QPoint* pos, QPoint* globalPos, int modifiers, QContextMenuEvent** outptr_QContextMenuEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QContextMenuEvent* QContextMenuEvent_new(int reason, QPoint* pos, QPoint* globalPos); +QContextMenuEvent* QContextMenuEvent_new2(int reason, QPoint* pos); +QContextMenuEvent* QContextMenuEvent_new3(int reason, QPoint* pos, QPoint* globalPos, int modifiers); +void QContextMenuEvent_virtbase(QContextMenuEvent* src, QInputEvent** outptr_QInputEvent); QContextMenuEvent* QContextMenuEvent_Clone(const QContextMenuEvent* self); int QContextMenuEvent_X(const QContextMenuEvent* self); int QContextMenuEvent_Y(const QContextMenuEvent* self); @@ -496,8 +517,9 @@ void QContextMenuEvent_override_virtual_SetTimestamp(void* self, intptr_t slot); void QContextMenuEvent_virtualbase_SetTimestamp(void* self, unsigned long long timestamp); void QContextMenuEvent_Delete(QContextMenuEvent* self, bool isSubclass); -void QInputMethodEvent_new(QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent); -void QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes, QInputMethodEvent** outptr_QInputMethodEvent, QEvent** outptr_QEvent); +QInputMethodEvent* QInputMethodEvent_new(); +QInputMethodEvent* QInputMethodEvent_new2(struct miqt_string preeditText, struct miqt_array /* of QInputMethodEvent__Attribute* */ attributes); +void QInputMethodEvent_virtbase(QInputMethodEvent* src, QEvent** outptr_QEvent); QInputMethodEvent* QInputMethodEvent_Clone(const QInputMethodEvent* self); void QInputMethodEvent_SetCommitString(QInputMethodEvent* self, struct miqt_string commitString); struct miqt_array /* of QInputMethodEvent__Attribute* */ QInputMethodEvent_Attributes(const QInputMethodEvent* self); @@ -513,7 +535,8 @@ void QInputMethodEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QInputMethodEvent_virtualbase_SetAccepted(void* self, bool accepted); void QInputMethodEvent_Delete(QInputMethodEvent* self, bool isSubclass); -void QInputMethodQueryEvent_new(int queries, QInputMethodQueryEvent** outptr_QInputMethodQueryEvent, QEvent** outptr_QEvent); +QInputMethodQueryEvent* QInputMethodQueryEvent_new(int queries); +void QInputMethodQueryEvent_virtbase(QInputMethodQueryEvent* src, QEvent** outptr_QEvent); QInputMethodQueryEvent* QInputMethodQueryEvent_Clone(const QInputMethodQueryEvent* self); int QInputMethodQueryEvent_Queries(const QInputMethodQueryEvent* self); void QInputMethodQueryEvent_SetValue(QInputMethodQueryEvent* self, int query, QVariant* value); @@ -524,8 +547,9 @@ void QInputMethodQueryEvent_override_virtual_SetAccepted(void* self, intptr_t sl void QInputMethodQueryEvent_virtualbase_SetAccepted(void* self, bool accepted); void QInputMethodQueryEvent_Delete(QInputMethodQueryEvent* self, bool isSubclass); -void QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); -void QDropEvent_new2(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); +QDropEvent* QDropEvent_new(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers); +QDropEvent* QDropEvent_new2(QPointF* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal); +void QDropEvent_virtbase(QDropEvent* src, QEvent** outptr_QEvent); QDropEvent* QDropEvent_Clone(const QDropEvent* self); QPoint* QDropEvent_Pos(const QDropEvent* self); QPointF* QDropEvent_PosF(const QDropEvent* self); @@ -547,8 +571,9 @@ void QDropEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QDropEvent_virtualbase_SetAccepted(void* self, bool accepted); void QDropEvent_Delete(QDropEvent* self, bool isSubclass); -void QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); -void QDragMoveEvent_new2(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); +QDragMoveEvent* QDragMoveEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers); +QDragMoveEvent* QDragMoveEvent_new2(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, int typeVal); +void QDragMoveEvent_virtbase(QDragMoveEvent* src, QDropEvent** outptr_QDropEvent); QDragMoveEvent* QDragMoveEvent_Clone(const QDragMoveEvent* self); QRect* QDragMoveEvent_AnswerRect(const QDragMoveEvent* self); void QDragMoveEvent_Accept(QDragMoveEvent* self); @@ -559,13 +584,15 @@ void QDragMoveEvent_override_virtual_Clone(void* self, intptr_t slot); QDragMoveEvent* QDragMoveEvent_virtualbase_Clone(const void* self); void QDragMoveEvent_Delete(QDragMoveEvent* self, bool isSubclass); -void QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers, QDragEnterEvent** outptr_QDragEnterEvent, QDragMoveEvent** outptr_QDragMoveEvent, QDropEvent** outptr_QDropEvent, QEvent** outptr_QEvent); +QDragEnterEvent* QDragEnterEvent_new(QPoint* pos, int actions, QMimeData* data, int buttons, int modifiers); +void QDragEnterEvent_virtbase(QDragEnterEvent* src, QDragMoveEvent** outptr_QDragMoveEvent); QDragEnterEvent* QDragEnterEvent_Clone(const QDragEnterEvent* self); void QDragEnterEvent_override_virtual_Clone(void* self, intptr_t slot); QDragEnterEvent* QDragEnterEvent_virtualbase_Clone(const void* self); void QDragEnterEvent_Delete(QDragEnterEvent* self, bool isSubclass); -void QDragLeaveEvent_new(QDragLeaveEvent** outptr_QDragLeaveEvent, QEvent** outptr_QEvent); +QDragLeaveEvent* QDragLeaveEvent_new(); +void QDragLeaveEvent_virtbase(QDragLeaveEvent* src, QEvent** outptr_QEvent); QDragLeaveEvent* QDragLeaveEvent_Clone(const QDragLeaveEvent* self); void QDragLeaveEvent_override_virtual_Clone(void* self, intptr_t slot); QDragLeaveEvent* QDragLeaveEvent_virtualbase_Clone(const void* self); @@ -573,7 +600,8 @@ void QDragLeaveEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QDragLeaveEvent_virtualbase_SetAccepted(void* self, bool accepted); void QDragLeaveEvent_Delete(QDragLeaveEvent* self, bool isSubclass); -void QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos, QHelpEvent** outptr_QHelpEvent, QEvent** outptr_QEvent); +QHelpEvent* QHelpEvent_new(int typeVal, QPoint* pos, QPoint* globalPos); +void QHelpEvent_virtbase(QHelpEvent* src, QEvent** outptr_QEvent); QHelpEvent* QHelpEvent_Clone(const QHelpEvent* self); int QHelpEvent_X(const QHelpEvent* self); int QHelpEvent_Y(const QHelpEvent* self); @@ -587,7 +615,8 @@ void QHelpEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QHelpEvent_virtualbase_SetAccepted(void* self, bool accepted); void QHelpEvent_Delete(QHelpEvent* self, bool isSubclass); -void QStatusTipEvent_new(struct miqt_string tip, QStatusTipEvent** outptr_QStatusTipEvent, QEvent** outptr_QEvent); +QStatusTipEvent* QStatusTipEvent_new(struct miqt_string tip); +void QStatusTipEvent_virtbase(QStatusTipEvent* src, QEvent** outptr_QEvent); QStatusTipEvent* QStatusTipEvent_Clone(const QStatusTipEvent* self); struct miqt_string QStatusTipEvent_Tip(const QStatusTipEvent* self); void QStatusTipEvent_override_virtual_Clone(void* self, intptr_t slot); @@ -596,7 +625,8 @@ void QStatusTipEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QStatusTipEvent_virtualbase_SetAccepted(void* self, bool accepted); void QStatusTipEvent_Delete(QStatusTipEvent* self, bool isSubclass); -void QWhatsThisClickedEvent_new(struct miqt_string href, QWhatsThisClickedEvent** outptr_QWhatsThisClickedEvent, QEvent** outptr_QEvent); +QWhatsThisClickedEvent* QWhatsThisClickedEvent_new(struct miqt_string href); +void QWhatsThisClickedEvent_virtbase(QWhatsThisClickedEvent* src, QEvent** outptr_QEvent); QWhatsThisClickedEvent* QWhatsThisClickedEvent_Clone(const QWhatsThisClickedEvent* self); struct miqt_string QWhatsThisClickedEvent_Href(const QWhatsThisClickedEvent* self); void QWhatsThisClickedEvent_override_virtual_Clone(void* self, intptr_t slot); @@ -605,8 +635,9 @@ void QWhatsThisClickedEvent_override_virtual_SetAccepted(void* self, intptr_t sl void QWhatsThisClickedEvent_virtualbase_SetAccepted(void* self, bool accepted); void QWhatsThisClickedEvent_Delete(QWhatsThisClickedEvent* self, bool isSubclass); -void QActionEvent_new(int typeVal, QAction* action, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent); -void QActionEvent_new2(int typeVal, QAction* action, QAction* before, QActionEvent** outptr_QActionEvent, QEvent** outptr_QEvent); +QActionEvent* QActionEvent_new(int typeVal, QAction* action); +QActionEvent* QActionEvent_new2(int typeVal, QAction* action, QAction* before); +void QActionEvent_virtbase(QActionEvent* src, QEvent** outptr_QEvent); QActionEvent* QActionEvent_Clone(const QActionEvent* self); QAction* QActionEvent_Action(const QActionEvent* self); QAction* QActionEvent_Before(const QActionEvent* self); @@ -616,8 +647,9 @@ void QActionEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QActionEvent_virtualbase_SetAccepted(void* self, bool accepted); void QActionEvent_Delete(QActionEvent* self, bool isSubclass); -void QFileOpenEvent_new(struct miqt_string file, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent); -void QFileOpenEvent_new2(QUrl* url, QFileOpenEvent** outptr_QFileOpenEvent, QEvent** outptr_QEvent); +QFileOpenEvent* QFileOpenEvent_new(struct miqt_string file); +QFileOpenEvent* QFileOpenEvent_new2(QUrl* url); +void QFileOpenEvent_virtbase(QFileOpenEvent* src, QEvent** outptr_QEvent); QFileOpenEvent* QFileOpenEvent_Clone(const QFileOpenEvent* self); struct miqt_string QFileOpenEvent_File(const QFileOpenEvent* self); QUrl* QFileOpenEvent_Url(const QFileOpenEvent* self); @@ -628,7 +660,8 @@ void QFileOpenEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QFileOpenEvent_virtualbase_SetAccepted(void* self, bool accepted); void QFileOpenEvent_Delete(QFileOpenEvent* self, bool isSubclass); -void QToolBarChangeEvent_new(bool t, QToolBarChangeEvent** outptr_QToolBarChangeEvent, QEvent** outptr_QEvent); +QToolBarChangeEvent* QToolBarChangeEvent_new(bool t); +void QToolBarChangeEvent_virtbase(QToolBarChangeEvent* src, QEvent** outptr_QEvent); QToolBarChangeEvent* QToolBarChangeEvent_Clone(const QToolBarChangeEvent* self); bool QToolBarChangeEvent_Toggle(const QToolBarChangeEvent* self); void QToolBarChangeEvent_override_virtual_Clone(void* self, intptr_t slot); @@ -637,8 +670,9 @@ void QToolBarChangeEvent_override_virtual_SetAccepted(void* self, intptr_t slot) void QToolBarChangeEvent_virtualbase_SetAccepted(void* self, bool accepted); void QToolBarChangeEvent_Delete(QToolBarChangeEvent* self, bool isSubclass); -void QShortcutEvent_new(QKeySequence* key, int id, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent); -void QShortcutEvent_new2(QKeySequence* key, int id, bool ambiguous, QShortcutEvent** outptr_QShortcutEvent, QEvent** outptr_QEvent); +QShortcutEvent* QShortcutEvent_new(QKeySequence* key, int id); +QShortcutEvent* QShortcutEvent_new2(QKeySequence* key, int id, bool ambiguous); +void QShortcutEvent_virtbase(QShortcutEvent* src, QEvent** outptr_QEvent); QShortcutEvent* QShortcutEvent_Clone(const QShortcutEvent* self); QKeySequence* QShortcutEvent_Key(const QShortcutEvent* self); int QShortcutEvent_ShortcutId(const QShortcutEvent* self); @@ -649,8 +683,9 @@ void QShortcutEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QShortcutEvent_virtualbase_SetAccepted(void* self, bool accepted); void QShortcutEvent_Delete(QShortcutEvent* self, bool isSubclass); -void QWindowStateChangeEvent_new(int oldState, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent); -void QWindowStateChangeEvent_new2(int oldState, bool isOverride, QWindowStateChangeEvent** outptr_QWindowStateChangeEvent, QEvent** outptr_QEvent); +QWindowStateChangeEvent* QWindowStateChangeEvent_new(int oldState); +QWindowStateChangeEvent* QWindowStateChangeEvent_new2(int oldState, bool isOverride); +void QWindowStateChangeEvent_virtbase(QWindowStateChangeEvent* src, QEvent** outptr_QEvent); QWindowStateChangeEvent* QWindowStateChangeEvent_Clone(const QWindowStateChangeEvent* self); int QWindowStateChangeEvent_OldState(const QWindowStateChangeEvent* self); bool QWindowStateChangeEvent_IsOverride(const QWindowStateChangeEvent* self); @@ -660,12 +695,13 @@ void QWindowStateChangeEvent_override_virtual_SetAccepted(void* self, intptr_t s void QWindowStateChangeEvent_virtualbase_SetAccepted(void* self, bool accepted); void QWindowStateChangeEvent_Delete(QWindowStateChangeEvent* self, bool isSubclass); -void QTouchEvent_new(int eventType, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QTouchEvent_new2(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QTouchEvent_new3(int eventType, QPointingDevice* device, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QTouchEvent_new4(int eventType, QPointingDevice* device, int modifiers, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QTouchEvent_new5(int eventType, QPointingDevice* device, int modifiers, struct miqt_array /* of QEventPoint* */ touchPoints, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); -void QTouchEvent_new6(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates, struct miqt_array /* of QEventPoint* */ touchPoints, QTouchEvent** outptr_QTouchEvent, QPointerEvent** outptr_QPointerEvent, QInputEvent** outptr_QInputEvent, QEvent** outptr_QEvent); +QTouchEvent* QTouchEvent_new(int eventType); +QTouchEvent* QTouchEvent_new2(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates); +QTouchEvent* QTouchEvent_new3(int eventType, QPointingDevice* device); +QTouchEvent* QTouchEvent_new4(int eventType, QPointingDevice* device, int modifiers); +QTouchEvent* QTouchEvent_new5(int eventType, QPointingDevice* device, int modifiers, struct miqt_array /* of QEventPoint* */ touchPoints); +QTouchEvent* QTouchEvent_new6(int eventType, QPointingDevice* device, int modifiers, uint8_t touchPointStates, struct miqt_array /* of QEventPoint* */ touchPoints); +void QTouchEvent_virtbase(QTouchEvent* src, QPointerEvent** outptr_QPointerEvent); QTouchEvent* QTouchEvent_Clone(const QTouchEvent* self); QObject* QTouchEvent_Target(const QTouchEvent* self); uint8_t QTouchEvent_TouchPointStates(const QTouchEvent* self); @@ -687,7 +723,8 @@ void QTouchEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QTouchEvent_virtualbase_SetAccepted(void* self, bool accepted); void QTouchEvent_Delete(QTouchEvent* self, bool isSubclass); -void QScrollPrepareEvent_new(QPointF* startPos, QScrollPrepareEvent** outptr_QScrollPrepareEvent, QEvent** outptr_QEvent); +QScrollPrepareEvent* QScrollPrepareEvent_new(QPointF* startPos); +void QScrollPrepareEvent_virtbase(QScrollPrepareEvent* src, QEvent** outptr_QEvent); QScrollPrepareEvent* QScrollPrepareEvent_Clone(const QScrollPrepareEvent* self); QPointF* QScrollPrepareEvent_StartPos(const QScrollPrepareEvent* self); QSizeF* QScrollPrepareEvent_ViewportSize(const QScrollPrepareEvent* self); @@ -702,7 +739,8 @@ void QScrollPrepareEvent_override_virtual_SetAccepted(void* self, intptr_t slot) void QScrollPrepareEvent_virtualbase_SetAccepted(void* self, bool accepted); void QScrollPrepareEvent_Delete(QScrollPrepareEvent* self, bool isSubclass); -void QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState, QScrollEvent** outptr_QScrollEvent, QEvent** outptr_QEvent); +QScrollEvent* QScrollEvent_new(QPointF* contentPos, QPointF* overshoot, int scrollState); +void QScrollEvent_virtbase(QScrollEvent* src, QEvent** outptr_QEvent); QScrollEvent* QScrollEvent_Clone(const QScrollEvent* self); QPointF* QScrollEvent_ContentPos(const QScrollEvent* self); QPointF* QScrollEvent_OvershootDistance(const QScrollEvent* self); @@ -713,7 +751,8 @@ void QScrollEvent_override_virtual_SetAccepted(void* self, intptr_t slot); void QScrollEvent_virtualbase_SetAccepted(void* self, bool accepted); void QScrollEvent_Delete(QScrollEvent* self, bool isSubclass); -void QScreenOrientationChangeEvent_new(QScreen* screen, int orientation, QScreenOrientationChangeEvent** outptr_QScreenOrientationChangeEvent, QEvent** outptr_QEvent); +QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_new(QScreen* screen, int orientation); +void QScreenOrientationChangeEvent_virtbase(QScreenOrientationChangeEvent* src, QEvent** outptr_QEvent); QScreenOrientationChangeEvent* QScreenOrientationChangeEvent_Clone(const QScreenOrientationChangeEvent* self); QScreen* QScreenOrientationChangeEvent_Screen(const QScreenOrientationChangeEvent* self); int QScreenOrientationChangeEvent_Orientation(const QScreenOrientationChangeEvent* self); @@ -723,7 +762,8 @@ void QScreenOrientationChangeEvent_override_virtual_SetAccepted(void* self, intp void QScreenOrientationChangeEvent_virtualbase_SetAccepted(void* self, bool accepted); void QScreenOrientationChangeEvent_Delete(QScreenOrientationChangeEvent* self, bool isSubclass); -void QApplicationStateChangeEvent_new(int state, QApplicationStateChangeEvent** outptr_QApplicationStateChangeEvent, QEvent** outptr_QEvent); +QApplicationStateChangeEvent* QApplicationStateChangeEvent_new(int state); +void QApplicationStateChangeEvent_virtbase(QApplicationStateChangeEvent* src, QEvent** outptr_QEvent); QApplicationStateChangeEvent* QApplicationStateChangeEvent_Clone(const QApplicationStateChangeEvent* self); int QApplicationStateChangeEvent_ApplicationState(const QApplicationStateChangeEvent* self); void QApplicationStateChangeEvent_override_virtual_Clone(void* self, intptr_t slot); @@ -732,9 +772,9 @@ void QApplicationStateChangeEvent_override_virtual_SetAccepted(void* self, intpt void QApplicationStateChangeEvent_virtualbase_SetAccepted(void* self, bool accepted); void QApplicationStateChangeEvent_Delete(QApplicationStateChangeEvent* self, bool isSubclass); -void QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute); -void QInputMethodEvent__Attribute_new2(int typ, int s, int l, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute); -void QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1, QInputMethodEvent__Attribute** outptr_QInputMethodEvent__Attribute); +QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new(int typ, int s, int l, QVariant* val); +QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new2(int typ, int s, int l); +QInputMethodEvent__Attribute* QInputMethodEvent__Attribute_new3(QInputMethodEvent__Attribute* param1); void QInputMethodEvent__Attribute_OperatorAssign(QInputMethodEvent__Attribute* self, QInputMethodEvent__Attribute* param1); void QInputMethodEvent__Attribute_Delete(QInputMethodEvent__Attribute* self, bool isSubclass); diff --git a/qt6/gen_qeventloop.cpp b/qt6/gen_qeventloop.cpp index d8d028d3..949179b3 100644 --- a/qt6/gen_qeventloop.cpp +++ b/qt6/gen_qeventloop.cpp @@ -195,16 +195,16 @@ public: }; -void QEventLoop_new(QEventLoop** outptr_QEventLoop, QObject** outptr_QObject) { - MiqtVirtualQEventLoop* ret = new MiqtVirtualQEventLoop(); - *outptr_QEventLoop = ret; - *outptr_QObject = static_cast(ret); +QEventLoop* QEventLoop_new() { + return new MiqtVirtualQEventLoop(); } -void QEventLoop_new2(QObject* parent, QEventLoop** outptr_QEventLoop, QObject** outptr_QObject) { - MiqtVirtualQEventLoop* ret = new MiqtVirtualQEventLoop(parent); - *outptr_QEventLoop = ret; - *outptr_QObject = static_cast(ret); +QEventLoop* QEventLoop_new2(QObject* parent) { + return new MiqtVirtualQEventLoop(parent); +} + +void QEventLoop_virtbase(QEventLoop* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QEventLoop_MetaObject(const QEventLoop* self) { @@ -356,19 +356,16 @@ void QEventLoop_Delete(QEventLoop* self, bool isSubclass) { } } -void QEventLoopLocker_new(QEventLoopLocker** outptr_QEventLoopLocker) { - QEventLoopLocker* ret = new QEventLoopLocker(); - *outptr_QEventLoopLocker = ret; +QEventLoopLocker* QEventLoopLocker_new() { + return new QEventLoopLocker(); } -void QEventLoopLocker_new2(QEventLoop* loop, QEventLoopLocker** outptr_QEventLoopLocker) { - QEventLoopLocker* ret = new QEventLoopLocker(loop); - *outptr_QEventLoopLocker = ret; +QEventLoopLocker* QEventLoopLocker_new2(QEventLoop* loop) { + return new QEventLoopLocker(loop); } -void QEventLoopLocker_new3(QThread* thread, QEventLoopLocker** outptr_QEventLoopLocker) { - QEventLoopLocker* ret = new QEventLoopLocker(thread); - *outptr_QEventLoopLocker = ret; +QEventLoopLocker* QEventLoopLocker_new3(QThread* thread) { + return new QEventLoopLocker(thread); } void QEventLoopLocker_Delete(QEventLoopLocker* self, bool isSubclass) { diff --git a/qt6/gen_qeventloop.go b/qt6/gen_qeventloop.go index ddc67332..da01de5e 100644 --- a/qt6/gen_qeventloop.go +++ b/qt6/gen_qeventloop.go @@ -48,42 +48,34 @@ func (this *QEventLoop) UnsafePointer() unsafe.Pointer { } // newQEventLoop constructs the type using only CGO pointers. -func newQEventLoop(h *C.QEventLoop, h_QObject *C.QObject) *QEventLoop { +func newQEventLoop(h *C.QEventLoop) *QEventLoop { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QEventLoop_virtbase(h, &outptr_QObject) + return &QEventLoop{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQEventLoop constructs the type using only unsafe pointers. -func UnsafeNewQEventLoop(h unsafe.Pointer, h_QObject unsafe.Pointer) *QEventLoop { - if h == nil { - return nil - } - - return &QEventLoop{h: (*C.QEventLoop)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQEventLoop(h unsafe.Pointer) *QEventLoop { + return newQEventLoop((*C.QEventLoop)(h)) } // NewQEventLoop constructs a new QEventLoop object. func NewQEventLoop() *QEventLoop { - var outptr_QEventLoop *C.QEventLoop = nil - var outptr_QObject *C.QObject = nil - C.QEventLoop_new(&outptr_QEventLoop, &outptr_QObject) - ret := newQEventLoop(outptr_QEventLoop, outptr_QObject) + ret := newQEventLoop(C.QEventLoop_new()) ret.isSubclass = true return ret } // NewQEventLoop2 constructs a new QEventLoop object. func NewQEventLoop2(parent *QObject) *QEventLoop { - var outptr_QEventLoop *C.QEventLoop = nil - var outptr_QObject *C.QObject = nil - C.QEventLoop_new2(parent.cPointer(), &outptr_QEventLoop, &outptr_QObject) - ret := newQEventLoop(outptr_QEventLoop, outptr_QObject) + ret := newQEventLoop(C.QEventLoop_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -251,7 +243,7 @@ func miqt_exec_callback_QEventLoop_TimerEvent(self *C.QEventLoop, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QEventLoop{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -277,7 +269,7 @@ func miqt_exec_callback_QEventLoop_ChildEvent(self *C.QEventLoop, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QEventLoop{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -399,44 +391,35 @@ func newQEventLoopLocker(h *C.QEventLoopLocker) *QEventLoopLocker { if h == nil { return nil } + return &QEventLoopLocker{h: h} } // UnsafeNewQEventLoopLocker constructs the type using only unsafe pointers. func UnsafeNewQEventLoopLocker(h unsafe.Pointer) *QEventLoopLocker { - if h == nil { - return nil - } - - return &QEventLoopLocker{h: (*C.QEventLoopLocker)(h)} + return newQEventLoopLocker((*C.QEventLoopLocker)(h)) } // NewQEventLoopLocker constructs a new QEventLoopLocker object. func NewQEventLoopLocker() *QEventLoopLocker { - var outptr_QEventLoopLocker *C.QEventLoopLocker = nil - C.QEventLoopLocker_new(&outptr_QEventLoopLocker) - ret := newQEventLoopLocker(outptr_QEventLoopLocker) + ret := newQEventLoopLocker(C.QEventLoopLocker_new()) ret.isSubclass = true return ret } // NewQEventLoopLocker2 constructs a new QEventLoopLocker object. func NewQEventLoopLocker2(loop *QEventLoop) *QEventLoopLocker { - var outptr_QEventLoopLocker *C.QEventLoopLocker = nil - C.QEventLoopLocker_new2(loop.cPointer(), &outptr_QEventLoopLocker) - ret := newQEventLoopLocker(outptr_QEventLoopLocker) + ret := newQEventLoopLocker(C.QEventLoopLocker_new2(loop.cPointer())) ret.isSubclass = true return ret } // NewQEventLoopLocker3 constructs a new QEventLoopLocker object. func NewQEventLoopLocker3(thread *QThread) *QEventLoopLocker { - var outptr_QEventLoopLocker *C.QEventLoopLocker = nil - C.QEventLoopLocker_new3(thread.cPointer(), &outptr_QEventLoopLocker) - ret := newQEventLoopLocker(outptr_QEventLoopLocker) + ret := newQEventLoopLocker(C.QEventLoopLocker_new3(thread.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qeventloop.h b/qt6/gen_qeventloop.h index f72d2400..de0d2f32 100644 --- a/qt6/gen_qeventloop.h +++ b/qt6/gen_qeventloop.h @@ -36,8 +36,9 @@ typedef struct QThread QThread; typedef struct QTimerEvent QTimerEvent; #endif -void QEventLoop_new(QEventLoop** outptr_QEventLoop, QObject** outptr_QObject); -void QEventLoop_new2(QObject* parent, QEventLoop** outptr_QEventLoop, QObject** outptr_QObject); +QEventLoop* QEventLoop_new(); +QEventLoop* QEventLoop_new2(QObject* parent); +void QEventLoop_virtbase(QEventLoop* src, QObject** outptr_QObject); QMetaObject* QEventLoop_MetaObject(const QEventLoop* self); void* QEventLoop_Metacast(QEventLoop* self, const char* param1); struct miqt_string QEventLoop_Tr(const char* s); @@ -70,9 +71,9 @@ void QEventLoop_override_virtual_DisconnectNotify(void* self, intptr_t slot); void QEventLoop_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QEventLoop_Delete(QEventLoop* self, bool isSubclass); -void QEventLoopLocker_new(QEventLoopLocker** outptr_QEventLoopLocker); -void QEventLoopLocker_new2(QEventLoop* loop, QEventLoopLocker** outptr_QEventLoopLocker); -void QEventLoopLocker_new3(QThread* thread, QEventLoopLocker** outptr_QEventLoopLocker); +QEventLoopLocker* QEventLoopLocker_new(); +QEventLoopLocker* QEventLoopLocker_new2(QEventLoop* loop); +QEventLoopLocker* QEventLoopLocker_new3(QThread* thread); void QEventLoopLocker_Delete(QEventLoopLocker* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qeventpoint.cpp b/qt6/gen_qeventpoint.cpp index 44addb34..856255f6 100644 --- a/qt6/gen_qeventpoint.cpp +++ b/qt6/gen_qeventpoint.cpp @@ -8,29 +8,24 @@ #include "gen_qeventpoint.h" #include "_cgo_export.h" -void QEventPoint_new(QEventPoint** outptr_QEventPoint) { - QEventPoint* ret = new QEventPoint(); - *outptr_QEventPoint = ret; +QEventPoint* QEventPoint_new() { + return new QEventPoint(); } -void QEventPoint_new2(int pointId, uint8_t state, QPointF* scenePosition, QPointF* globalPosition, QEventPoint** outptr_QEventPoint) { - QEventPoint* ret = new QEventPoint(static_cast(pointId), static_cast(state), *scenePosition, *globalPosition); - *outptr_QEventPoint = ret; +QEventPoint* QEventPoint_new2(int pointId, uint8_t state, QPointF* scenePosition, QPointF* globalPosition) { + return new QEventPoint(static_cast(pointId), static_cast(state), *scenePosition, *globalPosition); } -void QEventPoint_new3(QEventPoint* other, QEventPoint** outptr_QEventPoint) { - QEventPoint* ret = new QEventPoint(*other); - *outptr_QEventPoint = ret; +QEventPoint* QEventPoint_new3(QEventPoint* other) { + return new QEventPoint(*other); } -void QEventPoint_new4(int id, QEventPoint** outptr_QEventPoint) { - QEventPoint* ret = new QEventPoint(static_cast(id)); - *outptr_QEventPoint = ret; +QEventPoint* QEventPoint_new4(int id) { + return new QEventPoint(static_cast(id)); } -void QEventPoint_new5(int id, QPointingDevice* device, QEventPoint** outptr_QEventPoint) { - QEventPoint* ret = new QEventPoint(static_cast(id), device); - *outptr_QEventPoint = ret; +QEventPoint* QEventPoint_new5(int id, QPointingDevice* device) { + return new QEventPoint(static_cast(id), device); } void QEventPoint_OperatorAssign(QEventPoint* self, QEventPoint* other) { diff --git a/qt6/gen_qeventpoint.go b/qt6/gen_qeventpoint.go index 2dba056f..e8a2c6d7 100644 --- a/qt6/gen_qeventpoint.go +++ b/qt6/gen_qeventpoint.go @@ -47,64 +47,51 @@ func newQEventPoint(h *C.QEventPoint) *QEventPoint { if h == nil { return nil } + return &QEventPoint{h: h} } // UnsafeNewQEventPoint constructs the type using only unsafe pointers. func UnsafeNewQEventPoint(h unsafe.Pointer) *QEventPoint { - if h == nil { - return nil - } - - return &QEventPoint{h: (*C.QEventPoint)(h)} + return newQEventPoint((*C.QEventPoint)(h)) } // NewQEventPoint constructs a new QEventPoint object. func NewQEventPoint() *QEventPoint { - var outptr_QEventPoint *C.QEventPoint = nil - C.QEventPoint_new(&outptr_QEventPoint) - ret := newQEventPoint(outptr_QEventPoint) + ret := newQEventPoint(C.QEventPoint_new()) ret.isSubclass = true return ret } // NewQEventPoint2 constructs a new QEventPoint object. func NewQEventPoint2(pointId int, state QEventPoint__State, scenePosition *QPointF, globalPosition *QPointF) *QEventPoint { - var outptr_QEventPoint *C.QEventPoint = nil - C.QEventPoint_new2((C.int)(pointId), (C.uint8_t)(state), scenePosition.cPointer(), globalPosition.cPointer(), &outptr_QEventPoint) - ret := newQEventPoint(outptr_QEventPoint) + ret := newQEventPoint(C.QEventPoint_new2((C.int)(pointId), (C.uint8_t)(state), scenePosition.cPointer(), globalPosition.cPointer())) ret.isSubclass = true return ret } // NewQEventPoint3 constructs a new QEventPoint object. func NewQEventPoint3(other *QEventPoint) *QEventPoint { - var outptr_QEventPoint *C.QEventPoint = nil - C.QEventPoint_new3(other.cPointer(), &outptr_QEventPoint) - ret := newQEventPoint(outptr_QEventPoint) + ret := newQEventPoint(C.QEventPoint_new3(other.cPointer())) ret.isSubclass = true return ret } // NewQEventPoint4 constructs a new QEventPoint object. func NewQEventPoint4(id int) *QEventPoint { - var outptr_QEventPoint *C.QEventPoint = nil - C.QEventPoint_new4((C.int)(id), &outptr_QEventPoint) - ret := newQEventPoint(outptr_QEventPoint) + ret := newQEventPoint(C.QEventPoint_new4((C.int)(id))) ret.isSubclass = true return ret } // NewQEventPoint5 constructs a new QEventPoint object. func NewQEventPoint5(id int, device *QPointingDevice) *QEventPoint { - var outptr_QEventPoint *C.QEventPoint = nil - C.QEventPoint_new5((C.int)(id), device.cPointer(), &outptr_QEventPoint) - ret := newQEventPoint(outptr_QEventPoint) + ret := newQEventPoint(C.QEventPoint_new5((C.int)(id), device.cPointer())) ret.isSubclass = true return ret } @@ -286,7 +273,7 @@ func (this *QEventPoint) State() QEventPoint__State { } func (this *QEventPoint) Device() *QPointingDevice { - return newQPointingDevice(C.QEventPoint_Device(this.h), nil, nil) + return newQPointingDevice(C.QEventPoint_Device(this.h)) } func (this *QEventPoint) Id() int { diff --git a/qt6/gen_qeventpoint.h b/qt6/gen_qeventpoint.h index d44fed45..aa5291bb 100644 --- a/qt6/gen_qeventpoint.h +++ b/qt6/gen_qeventpoint.h @@ -30,11 +30,11 @@ typedef struct QSizeF QSizeF; typedef struct QVector2D QVector2D; #endif -void QEventPoint_new(QEventPoint** outptr_QEventPoint); -void QEventPoint_new2(int pointId, uint8_t state, QPointF* scenePosition, QPointF* globalPosition, QEventPoint** outptr_QEventPoint); -void QEventPoint_new3(QEventPoint* other, QEventPoint** outptr_QEventPoint); -void QEventPoint_new4(int id, QEventPoint** outptr_QEventPoint); -void QEventPoint_new5(int id, QPointingDevice* device, QEventPoint** outptr_QEventPoint); +QEventPoint* QEventPoint_new(); +QEventPoint* QEventPoint_new2(int pointId, uint8_t state, QPointF* scenePosition, QPointF* globalPosition); +QEventPoint* QEventPoint_new3(QEventPoint* other); +QEventPoint* QEventPoint_new4(int id); +QEventPoint* QEventPoint_new5(int id, QPointingDevice* device); void QEventPoint_OperatorAssign(QEventPoint* self, QEventPoint* other); bool QEventPoint_OperatorEqual(const QEventPoint* self, QEventPoint* other); bool QEventPoint_OperatorNotEqual(const QEventPoint* self, QEventPoint* other); diff --git a/qt6/gen_qfactoryinterface.go b/qt6/gen_qfactoryinterface.go index 6254f310..587896d8 100644 --- a/qt6/gen_qfactoryinterface.go +++ b/qt6/gen_qfactoryinterface.go @@ -37,16 +37,13 @@ func newQFactoryInterface(h *C.QFactoryInterface) *QFactoryInterface { if h == nil { return nil } + return &QFactoryInterface{h: h} } // UnsafeNewQFactoryInterface constructs the type using only unsafe pointers. func UnsafeNewQFactoryInterface(h unsafe.Pointer) *QFactoryInterface { - if h == nil { - return nil - } - - return &QFactoryInterface{h: (*C.QFactoryInterface)(h)} + return newQFactoryInterface((*C.QFactoryInterface)(h)) } func (this *QFactoryInterface) Keys() []string { diff --git a/qt6/gen_qfile.cpp b/qt6/gen_qfile.cpp index 7368732d..5a8cc4bf 100644 --- a/qt6/gen_qfile.cpp +++ b/qt6/gen_qfile.cpp @@ -364,42 +364,26 @@ public: }; -void QFile_new(QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQFile* ret = new MiqtVirtualQFile(); - *outptr_QFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QFile* QFile_new() { + return new MiqtVirtualQFile(); } -void QFile_new2(struct miqt_string name, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { +QFile* QFile_new2(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQFile* ret = new MiqtVirtualQFile(name_QString); - *outptr_QFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); + return new MiqtVirtualQFile(name_QString); } -void QFile_new3(QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQFile* ret = new MiqtVirtualQFile(parent); - *outptr_QFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QFile* QFile_new3(QObject* parent) { + return new MiqtVirtualQFile(parent); } -void QFile_new4(struct miqt_string name, QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { +QFile* QFile_new4(struct miqt_string name, QObject* parent) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQFile* ret = new MiqtVirtualQFile(name_QString, parent); - *outptr_QFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); + return new MiqtVirtualQFile(name_QString, parent); +} + +void QFile_virtbase(QFile* src, QFileDevice** outptr_QFileDevice) { + *outptr_QFileDevice = static_cast(src); } QMetaObject* QFile_MetaObject(const QFile* self) { diff --git a/qt6/gen_qfile.go b/qt6/gen_qfile.go index 89762021..728a3e5d 100644 --- a/qt6/gen_qfile.go +++ b/qt6/gen_qfile.go @@ -35,34 +35,26 @@ func (this *QFile) UnsafePointer() unsafe.Pointer { } // newQFile constructs the type using only CGO pointers. -func newQFile(h *C.QFile, h_QFileDevice *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QFile { +func newQFile(h *C.QFile) *QFile { if h == nil { return nil } + var outptr_QFileDevice *C.QFileDevice = nil + C.QFile_virtbase(h, &outptr_QFileDevice) + return &QFile{h: h, - QFileDevice: newQFileDevice(h_QFileDevice, h_QIODevice, h_QObject, h_QIODeviceBase)} + QFileDevice: newQFileDevice(outptr_QFileDevice)} } // UnsafeNewQFile constructs the type using only unsafe pointers. -func UnsafeNewQFile(h unsafe.Pointer, h_QFileDevice unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QFile { - if h == nil { - return nil - } - - return &QFile{h: (*C.QFile)(h), - QFileDevice: UnsafeNewQFileDevice(h_QFileDevice, h_QIODevice, h_QObject, h_QIODeviceBase)} +func UnsafeNewQFile(h unsafe.Pointer) *QFile { + return newQFile((*C.QFile)(h)) } // NewQFile constructs a new QFile object. func NewQFile() *QFile { - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QFile_new(&outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQFile(C.QFile_new()) ret.isSubclass = true return ret } @@ -73,28 +65,16 @@ func NewQFile2(name string) *QFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QFile_new2(name_ms, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQFile(C.QFile_new2(name_ms)) ret.isSubclass = true return ret } // NewQFile3 constructs a new QFile object. func NewQFile3(parent *QObject) *QFile { - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QFile_new3(parent.cPointer(), &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQFile(C.QFile_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -105,14 +85,8 @@ func NewQFile4(name string, parent *QObject) *QFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QFile_new4(name_ms, parent.cPointer(), &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQFile(outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQFile(C.QFile_new4(name_ms, parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qfile.h b/qt6/gen_qfile.h index 186ebedf..d3aa1c3f 100644 --- a/qt6/gen_qfile.h +++ b/qt6/gen_qfile.h @@ -30,10 +30,11 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -void QFile_new(QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QFile_new2(struct miqt_string name, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QFile_new3(QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QFile_new4(struct miqt_string name, QObject* parent, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +QFile* QFile_new(); +QFile* QFile_new2(struct miqt_string name); +QFile* QFile_new3(QObject* parent); +QFile* QFile_new4(struct miqt_string name, QObject* parent); +void QFile_virtbase(QFile* src, QFileDevice** outptr_QFileDevice); QMetaObject* QFile_MetaObject(const QFile* self); void* QFile_Metacast(QFile* self, const char* param1); struct miqt_string QFile_Tr(const char* s); diff --git a/qt6/gen_qfiledevice.cpp b/qt6/gen_qfiledevice.cpp index 90a80ac8..44f69109 100644 --- a/qt6/gen_qfiledevice.cpp +++ b/qt6/gen_qfiledevice.cpp @@ -11,6 +11,10 @@ #include "gen_qfiledevice.h" #include "_cgo_export.h" +void QFileDevice_virtbase(QFileDevice* src, QIODevice** outptr_QIODevice) { + *outptr_QIODevice = static_cast(src); +} + QMetaObject* QFileDevice_MetaObject(const QFileDevice* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/gen_qfiledevice.go b/qt6/gen_qfiledevice.go index 6afcba3d..c13c00c3 100644 --- a/qt6/gen_qfiledevice.go +++ b/qt6/gen_qfiledevice.go @@ -94,22 +94,20 @@ func (this *QFileDevice) UnsafePointer() unsafe.Pointer { } // newQFileDevice constructs the type using only CGO pointers. -func newQFileDevice(h *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QFileDevice { +func newQFileDevice(h *C.QFileDevice) *QFileDevice { if h == nil { return nil } + var outptr_QIODevice *C.QIODevice = nil + C.QFileDevice_virtbase(h, &outptr_QIODevice) + return &QFileDevice{h: h, - QIODevice: newQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} + QIODevice: newQIODevice(outptr_QIODevice)} } // UnsafeNewQFileDevice constructs the type using only unsafe pointers. -func UnsafeNewQFileDevice(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QFileDevice { - if h == nil { - return nil - } - - return &QFileDevice{h: (*C.QFileDevice)(h), - QIODevice: UnsafeNewQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} +func UnsafeNewQFileDevice(h unsafe.Pointer) *QFileDevice { + return newQFileDevice((*C.QFileDevice)(h)) } func (this *QFileDevice) MetaObject() *QMetaObject { diff --git a/qt6/gen_qfiledevice.h b/qt6/gen_qfiledevice.h index 530ffd52..b9f67a87 100644 --- a/qt6/gen_qfiledevice.h +++ b/qt6/gen_qfiledevice.h @@ -30,6 +30,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QFileDevice_virtbase(QFileDevice* src, QIODevice** outptr_QIODevice); QMetaObject* QFileDevice_MetaObject(const QFileDevice* self); void* QFileDevice_Metacast(QFileDevice* self, const char* param1); struct miqt_string QFileDevice_Tr(const char* s); diff --git a/qt6/gen_qfiledialog.cpp b/qt6/gen_qfiledialog.cpp index edd0cb77..3d8f5aa7 100644 --- a/qt6/gen_qfiledialog.cpp +++ b/qt6/gen_qfiledialog.cpp @@ -390,64 +390,38 @@ public: }; -void QFileDialog_new(QWidget* parent, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent); - *outptr_QFileDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFileDialog* QFileDialog_new(QWidget* parent) { + return new MiqtVirtualQFileDialog(parent); } -void QFileDialog_new2(QWidget* parent, int f, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, static_cast(f)); - *outptr_QFileDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFileDialog* QFileDialog_new2(QWidget* parent, int f) { + return new MiqtVirtualQFileDialog(parent, static_cast(f)); } -void QFileDialog_new3(QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(); - *outptr_QFileDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFileDialog* QFileDialog_new3() { + return new MiqtVirtualQFileDialog(); } -void QFileDialog_new4(QWidget* parent, struct miqt_string caption, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QFileDialog* QFileDialog_new4(QWidget* parent, struct miqt_string caption) { QString caption_QString = QString::fromUtf8(caption.data, caption.len); - MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, caption_QString); - *outptr_QFileDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQFileDialog(parent, caption_QString); } -void QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QFileDialog* QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory) { QString caption_QString = QString::fromUtf8(caption.data, caption.len); QString directory_QString = QString::fromUtf8(directory.data, directory.len); - MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, caption_QString, directory_QString); - *outptr_QFileDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQFileDialog(parent, caption_QString, directory_QString); } -void QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QFileDialog* QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter) { QString caption_QString = QString::fromUtf8(caption.data, caption.len); QString directory_QString = QString::fromUtf8(directory.data, directory.len); QString filter_QString = QString::fromUtf8(filter.data, filter.len); - MiqtVirtualQFileDialog* ret = new MiqtVirtualQFileDialog(parent, caption_QString, directory_QString, filter_QString); - *outptr_QFileDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQFileDialog(parent, caption_QString, directory_QString, filter_QString); +} + +void QFileDialog_virtbase(QFileDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QFileDialog_MetaObject(const QFileDialog* self) { diff --git a/qt6/gen_qfiledialog.go b/qt6/gen_qfiledialog.go index b0019c80..6be3afa3 100644 --- a/qt6/gen_qfiledialog.go +++ b/qt6/gen_qfiledialog.go @@ -80,62 +80,42 @@ func (this *QFileDialog) UnsafePointer() unsafe.Pointer { } // newQFileDialog constructs the type using only CGO pointers. -func newQFileDialog(h *C.QFileDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFileDialog { +func newQFileDialog(h *C.QFileDialog) *QFileDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QFileDialog_virtbase(h, &outptr_QDialog) + return &QFileDialog{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQFileDialog constructs the type using only unsafe pointers. -func UnsafeNewQFileDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFileDialog { - if h == nil { - return nil - } - - return &QFileDialog{h: (*C.QFileDialog)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQFileDialog(h unsafe.Pointer) *QFileDialog { + return newQFileDialog((*C.QFileDialog)(h)) } // NewQFileDialog constructs a new QFileDialog object. func NewQFileDialog(parent *QWidget) *QFileDialog { - var outptr_QFileDialog *C.QFileDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFileDialog_new(parent.cPointer(), &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFileDialog(C.QFileDialog_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQFileDialog2 constructs a new QFileDialog object. func NewQFileDialog2(parent *QWidget, f WindowType) *QFileDialog { - var outptr_QFileDialog *C.QFileDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFileDialog_new2(parent.cPointer(), (C.int)(f), &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFileDialog(C.QFileDialog_new2(parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } // NewQFileDialog3 constructs a new QFileDialog object. func NewQFileDialog3() *QFileDialog { - var outptr_QFileDialog *C.QFileDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFileDialog_new3(&outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFileDialog(C.QFileDialog_new3()) ret.isSubclass = true return ret } @@ -146,14 +126,8 @@ func NewQFileDialog4(parent *QWidget, caption string) *QFileDialog { caption_ms.data = C.CString(caption) caption_ms.len = C.size_t(len(caption)) defer C.free(unsafe.Pointer(caption_ms.data)) - var outptr_QFileDialog *C.QFileDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFileDialog_new4(parent.cPointer(), caption_ms, &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFileDialog(C.QFileDialog_new4(parent.cPointer(), caption_ms)) ret.isSubclass = true return ret } @@ -168,14 +142,8 @@ func NewQFileDialog5(parent *QWidget, caption string, directory string) *QFileDi directory_ms.data = C.CString(directory) directory_ms.len = C.size_t(len(directory)) defer C.free(unsafe.Pointer(directory_ms.data)) - var outptr_QFileDialog *C.QFileDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFileDialog_new5(parent.cPointer(), caption_ms, directory_ms, &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFileDialog(C.QFileDialog_new5(parent.cPointer(), caption_ms, directory_ms)) ret.isSubclass = true return ret } @@ -194,14 +162,8 @@ func NewQFileDialog6(parent *QWidget, caption string, directory string, filter s filter_ms.data = C.CString(filter) filter_ms.len = C.size_t(len(filter)) defer C.free(unsafe.Pointer(filter_ms.data)) - var outptr_QFileDialog *C.QFileDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFileDialog_new6(parent.cPointer(), caption_ms, directory_ms, filter_ms, &outptr_QFileDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFileDialog(outptr_QFileDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFileDialog(C.QFileDialog_new6(parent.cPointer(), caption_ms, directory_ms, filter_ms)) ret.isSubclass = true return ret } @@ -497,7 +459,7 @@ func (this *QFileDialog) SetItemDelegate(delegate *QAbstractItemDelegate) { } func (this *QFileDialog) ItemDelegate() *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QFileDialog_ItemDelegate(this.h), nil) + return newQAbstractItemDelegate(C.QFileDialog_ItemDelegate(this.h)) } func (this *QFileDialog) SetIconProvider(provider *QAbstractFileIconProvider) { @@ -555,7 +517,7 @@ func (this *QFileDialog) SetProxyModel(model *QAbstractProxyModel) { } func (this *QFileDialog) ProxyModel() *QAbstractProxyModel { - return newQAbstractProxyModel(C.QFileDialog_ProxyModel(this.h), nil, nil) + return newQAbstractProxyModel(C.QFileDialog_ProxyModel(this.h)) } func (this *QFileDialog) SetOption(option QFileDialog__Option) { @@ -1594,7 +1556,7 @@ func miqt_exec_callback_QFileDialog_KeyPressEvent(self *C.QFileDialog, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QFileDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1620,7 +1582,7 @@ func miqt_exec_callback_QFileDialog_CloseEvent(self *C.QFileDialog, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(param1, nil) + slotval1 := newQCloseEvent(param1) gofunc((&QFileDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1646,7 +1608,7 @@ func miqt_exec_callback_QFileDialog_ShowEvent(self *C.QFileDialog, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QFileDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1672,7 +1634,7 @@ func miqt_exec_callback_QFileDialog_ResizeEvent(self *C.QFileDialog, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QFileDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1698,7 +1660,7 @@ func miqt_exec_callback_QFileDialog_ContextMenuEvent(self *C.QFileDialog, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QFileDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt6/gen_qfiledialog.h b/qt6/gen_qfiledialog.h index 71cc4141..5b0724cd 100644 --- a/qt6/gen_qfiledialog.h +++ b/qt6/gen_qfiledialog.h @@ -54,12 +54,13 @@ typedef struct QUrl QUrl; typedef struct QWidget QWidget; #endif -void QFileDialog_new(QWidget* parent, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFileDialog_new2(QWidget* parent, int f, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFileDialog_new3(QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFileDialog_new4(QWidget* parent, struct miqt_string caption, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter, QFileDialog** outptr_QFileDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QFileDialog* QFileDialog_new(QWidget* parent); +QFileDialog* QFileDialog_new2(QWidget* parent, int f); +QFileDialog* QFileDialog_new3(); +QFileDialog* QFileDialog_new4(QWidget* parent, struct miqt_string caption); +QFileDialog* QFileDialog_new5(QWidget* parent, struct miqt_string caption, struct miqt_string directory); +QFileDialog* QFileDialog_new6(QWidget* parent, struct miqt_string caption, struct miqt_string directory, struct miqt_string filter); +void QFileDialog_virtbase(QFileDialog* src, QDialog** outptr_QDialog); QMetaObject* QFileDialog_MetaObject(const QFileDialog* self); void* QFileDialog_Metacast(QFileDialog* self, const char* param1); struct miqt_string QFileDialog_Tr(const char* s); diff --git a/qt6/gen_qfileiconprovider.cpp b/qt6/gen_qfileiconprovider.cpp index 6eaed461..69bfddaf 100644 --- a/qt6/gen_qfileiconprovider.cpp +++ b/qt6/gen_qfileiconprovider.cpp @@ -148,10 +148,12 @@ public: }; -void QFileIconProvider_new(QFileIconProvider** outptr_QFileIconProvider, QAbstractFileIconProvider** outptr_QAbstractFileIconProvider) { - MiqtVirtualQFileIconProvider* ret = new MiqtVirtualQFileIconProvider(); - *outptr_QFileIconProvider = ret; - *outptr_QAbstractFileIconProvider = static_cast(ret); +QFileIconProvider* QFileIconProvider_new() { + return new MiqtVirtualQFileIconProvider(); +} + +void QFileIconProvider_virtbase(QFileIconProvider* src, QAbstractFileIconProvider** outptr_QAbstractFileIconProvider) { + *outptr_QAbstractFileIconProvider = static_cast(src); } QIcon* QFileIconProvider_Icon(const QFileIconProvider* self, int typeVal) { diff --git a/qt6/gen_qfileiconprovider.go b/qt6/gen_qfileiconprovider.go index 8253d856..6b9bc21c 100644 --- a/qt6/gen_qfileiconprovider.go +++ b/qt6/gen_qfileiconprovider.go @@ -35,31 +35,26 @@ func (this *QFileIconProvider) UnsafePointer() unsafe.Pointer { } // newQFileIconProvider constructs the type using only CGO pointers. -func newQFileIconProvider(h *C.QFileIconProvider, h_QAbstractFileIconProvider *C.QAbstractFileIconProvider) *QFileIconProvider { +func newQFileIconProvider(h *C.QFileIconProvider) *QFileIconProvider { if h == nil { return nil } + var outptr_QAbstractFileIconProvider *C.QAbstractFileIconProvider = nil + C.QFileIconProvider_virtbase(h, &outptr_QAbstractFileIconProvider) + return &QFileIconProvider{h: h, - QAbstractFileIconProvider: newQAbstractFileIconProvider(h_QAbstractFileIconProvider)} + QAbstractFileIconProvider: newQAbstractFileIconProvider(outptr_QAbstractFileIconProvider)} } // UnsafeNewQFileIconProvider constructs the type using only unsafe pointers. -func UnsafeNewQFileIconProvider(h unsafe.Pointer, h_QAbstractFileIconProvider unsafe.Pointer) *QFileIconProvider { - if h == nil { - return nil - } - - return &QFileIconProvider{h: (*C.QFileIconProvider)(h), - QAbstractFileIconProvider: UnsafeNewQAbstractFileIconProvider(h_QAbstractFileIconProvider)} +func UnsafeNewQFileIconProvider(h unsafe.Pointer) *QFileIconProvider { + return newQFileIconProvider((*C.QFileIconProvider)(h)) } // NewQFileIconProvider constructs a new QFileIconProvider object. func NewQFileIconProvider() *QFileIconProvider { - var outptr_QFileIconProvider *C.QFileIconProvider = nil - var outptr_QAbstractFileIconProvider *C.QAbstractFileIconProvider = nil - C.QFileIconProvider_new(&outptr_QFileIconProvider, &outptr_QAbstractFileIconProvider) - ret := newQFileIconProvider(outptr_QFileIconProvider, outptr_QAbstractFileIconProvider) + ret := newQFileIconProvider(C.QFileIconProvider_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qfileiconprovider.h b/qt6/gen_qfileiconprovider.h index fd383494..da3c4458 100644 --- a/qt6/gen_qfileiconprovider.h +++ b/qt6/gen_qfileiconprovider.h @@ -26,7 +26,8 @@ typedef struct QFileInfo QFileInfo; typedef struct QIcon QIcon; #endif -void QFileIconProvider_new(QFileIconProvider** outptr_QFileIconProvider, QAbstractFileIconProvider** outptr_QAbstractFileIconProvider); +QFileIconProvider* QFileIconProvider_new(); +void QFileIconProvider_virtbase(QFileIconProvider* src, QAbstractFileIconProvider** outptr_QAbstractFileIconProvider); QIcon* QFileIconProvider_Icon(const QFileIconProvider* self, int typeVal); QIcon* QFileIconProvider_IconWithInfo(const QFileIconProvider* self, QFileInfo* info); void QFileIconProvider_override_virtual_Icon(void* self, intptr_t slot); diff --git a/qt6/gen_qfileinfo.cpp b/qt6/gen_qfileinfo.cpp index 32752dc0..6884ff86 100644 --- a/qt6/gen_qfileinfo.cpp +++ b/qt6/gen_qfileinfo.cpp @@ -9,31 +9,26 @@ #include "gen_qfileinfo.h" #include "_cgo_export.h" -void QFileInfo_new(QFileInfo** outptr_QFileInfo) { - QFileInfo* ret = new QFileInfo(); - *outptr_QFileInfo = ret; +QFileInfo* QFileInfo_new() { + return new QFileInfo(); } -void QFileInfo_new2(struct miqt_string file, QFileInfo** outptr_QFileInfo) { +QFileInfo* QFileInfo_new2(struct miqt_string file) { QString file_QString = QString::fromUtf8(file.data, file.len); - QFileInfo* ret = new QFileInfo(file_QString); - *outptr_QFileInfo = ret; + return new QFileInfo(file_QString); } -void QFileInfo_new3(QFileDevice* file, QFileInfo** outptr_QFileInfo) { - QFileInfo* ret = new QFileInfo(*file); - *outptr_QFileInfo = ret; +QFileInfo* QFileInfo_new3(QFileDevice* file) { + return new QFileInfo(*file); } -void QFileInfo_new4(QDir* dir, struct miqt_string file, QFileInfo** outptr_QFileInfo) { +QFileInfo* QFileInfo_new4(QDir* dir, struct miqt_string file) { QString file_QString = QString::fromUtf8(file.data, file.len); - QFileInfo* ret = new QFileInfo(*dir, file_QString); - *outptr_QFileInfo = ret; + return new QFileInfo(*dir, file_QString); } -void QFileInfo_new5(QFileInfo* fileinfo, QFileInfo** outptr_QFileInfo) { - QFileInfo* ret = new QFileInfo(*fileinfo); - *outptr_QFileInfo = ret; +QFileInfo* QFileInfo_new5(QFileInfo* fileinfo) { + return new QFileInfo(*fileinfo); } void QFileInfo_OperatorAssign(QFileInfo* self, QFileInfo* fileinfo) { diff --git a/qt6/gen_qfileinfo.go b/qt6/gen_qfileinfo.go index 4981c2c9..33fd5d54 100644 --- a/qt6/gen_qfileinfo.go +++ b/qt6/gen_qfileinfo.go @@ -37,24 +37,19 @@ func newQFileInfo(h *C.QFileInfo) *QFileInfo { if h == nil { return nil } + return &QFileInfo{h: h} } // UnsafeNewQFileInfo constructs the type using only unsafe pointers. func UnsafeNewQFileInfo(h unsafe.Pointer) *QFileInfo { - if h == nil { - return nil - } - - return &QFileInfo{h: (*C.QFileInfo)(h)} + return newQFileInfo((*C.QFileInfo)(h)) } // NewQFileInfo constructs a new QFileInfo object. func NewQFileInfo() *QFileInfo { - var outptr_QFileInfo *C.QFileInfo = nil - C.QFileInfo_new(&outptr_QFileInfo) - ret := newQFileInfo(outptr_QFileInfo) + ret := newQFileInfo(C.QFileInfo_new()) ret.isSubclass = true return ret } @@ -65,20 +60,16 @@ func NewQFileInfo2(file string) *QFileInfo { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - var outptr_QFileInfo *C.QFileInfo = nil - C.QFileInfo_new2(file_ms, &outptr_QFileInfo) - ret := newQFileInfo(outptr_QFileInfo) + ret := newQFileInfo(C.QFileInfo_new2(file_ms)) ret.isSubclass = true return ret } // NewQFileInfo3 constructs a new QFileInfo object. func NewQFileInfo3(file *QFileDevice) *QFileInfo { - var outptr_QFileInfo *C.QFileInfo = nil - C.QFileInfo_new3(file.cPointer(), &outptr_QFileInfo) - ret := newQFileInfo(outptr_QFileInfo) + ret := newQFileInfo(C.QFileInfo_new3(file.cPointer())) ret.isSubclass = true return ret } @@ -89,20 +80,16 @@ func NewQFileInfo4(dir *QDir, file string) *QFileInfo { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - var outptr_QFileInfo *C.QFileInfo = nil - C.QFileInfo_new4(dir.cPointer(), file_ms, &outptr_QFileInfo) - ret := newQFileInfo(outptr_QFileInfo) + ret := newQFileInfo(C.QFileInfo_new4(dir.cPointer(), file_ms)) ret.isSubclass = true return ret } // NewQFileInfo5 constructs a new QFileInfo object. func NewQFileInfo5(fileinfo *QFileInfo) *QFileInfo { - var outptr_QFileInfo *C.QFileInfo = nil - C.QFileInfo_new5(fileinfo.cPointer(), &outptr_QFileInfo) - ret := newQFileInfo(outptr_QFileInfo) + ret := newQFileInfo(C.QFileInfo_new5(fileinfo.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qfileinfo.h b/qt6/gen_qfileinfo.h index 4492abbf..c942978c 100644 --- a/qt6/gen_qfileinfo.h +++ b/qt6/gen_qfileinfo.h @@ -26,11 +26,11 @@ typedef struct QFileDevice QFileDevice; typedef struct QFileInfo QFileInfo; #endif -void QFileInfo_new(QFileInfo** outptr_QFileInfo); -void QFileInfo_new2(struct miqt_string file, QFileInfo** outptr_QFileInfo); -void QFileInfo_new3(QFileDevice* file, QFileInfo** outptr_QFileInfo); -void QFileInfo_new4(QDir* dir, struct miqt_string file, QFileInfo** outptr_QFileInfo); -void QFileInfo_new5(QFileInfo* fileinfo, QFileInfo** outptr_QFileInfo); +QFileInfo* QFileInfo_new(); +QFileInfo* QFileInfo_new2(struct miqt_string file); +QFileInfo* QFileInfo_new3(QFileDevice* file); +QFileInfo* QFileInfo_new4(QDir* dir, struct miqt_string file); +QFileInfo* QFileInfo_new5(QFileInfo* fileinfo); void QFileInfo_OperatorAssign(QFileInfo* self, QFileInfo* fileinfo); void QFileInfo_Swap(QFileInfo* self, QFileInfo* other); bool QFileInfo_OperatorEqual(const QFileInfo* self, QFileInfo* fileinfo); diff --git a/qt6/gen_qfileselector.cpp b/qt6/gen_qfileselector.cpp index 74f8152a..eb9b054d 100644 --- a/qt6/gen_qfileselector.cpp +++ b/qt6/gen_qfileselector.cpp @@ -195,16 +195,16 @@ public: }; -void QFileSelector_new(QFileSelector** outptr_QFileSelector, QObject** outptr_QObject) { - MiqtVirtualQFileSelector* ret = new MiqtVirtualQFileSelector(); - *outptr_QFileSelector = ret; - *outptr_QObject = static_cast(ret); +QFileSelector* QFileSelector_new() { + return new MiqtVirtualQFileSelector(); } -void QFileSelector_new2(QObject* parent, QFileSelector** outptr_QFileSelector, QObject** outptr_QObject) { - MiqtVirtualQFileSelector* ret = new MiqtVirtualQFileSelector(parent); - *outptr_QFileSelector = ret; - *outptr_QObject = static_cast(ret); +QFileSelector* QFileSelector_new2(QObject* parent) { + return new MiqtVirtualQFileSelector(parent); +} + +void QFileSelector_virtbase(QFileSelector* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QFileSelector_MetaObject(const QFileSelector* self) { diff --git a/qt6/gen_qfileselector.go b/qt6/gen_qfileselector.go index 9745c6bc..2b5977d3 100644 --- a/qt6/gen_qfileselector.go +++ b/qt6/gen_qfileselector.go @@ -35,42 +35,34 @@ func (this *QFileSelector) UnsafePointer() unsafe.Pointer { } // newQFileSelector constructs the type using only CGO pointers. -func newQFileSelector(h *C.QFileSelector, h_QObject *C.QObject) *QFileSelector { +func newQFileSelector(h *C.QFileSelector) *QFileSelector { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QFileSelector_virtbase(h, &outptr_QObject) + return &QFileSelector{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQFileSelector constructs the type using only unsafe pointers. -func UnsafeNewQFileSelector(h unsafe.Pointer, h_QObject unsafe.Pointer) *QFileSelector { - if h == nil { - return nil - } - - return &QFileSelector{h: (*C.QFileSelector)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQFileSelector(h unsafe.Pointer) *QFileSelector { + return newQFileSelector((*C.QFileSelector)(h)) } // NewQFileSelector constructs a new QFileSelector object. func NewQFileSelector() *QFileSelector { - var outptr_QFileSelector *C.QFileSelector = nil - var outptr_QObject *C.QObject = nil - C.QFileSelector_new(&outptr_QFileSelector, &outptr_QObject) - ret := newQFileSelector(outptr_QFileSelector, outptr_QObject) + ret := newQFileSelector(C.QFileSelector_new()) ret.isSubclass = true return ret } // NewQFileSelector2 constructs a new QFileSelector object. func NewQFileSelector2(parent *QObject) *QFileSelector { - var outptr_QFileSelector *C.QFileSelector = nil - var outptr_QObject *C.QObject = nil - C.QFileSelector_new2(parent.cPointer(), &outptr_QFileSelector, &outptr_QObject) - ret := newQFileSelector(outptr_QFileSelector, outptr_QObject) + ret := newQFileSelector(C.QFileSelector_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -251,7 +243,7 @@ func miqt_exec_callback_QFileSelector_TimerEvent(self *C.QFileSelector, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QFileSelector{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -277,7 +269,7 @@ func miqt_exec_callback_QFileSelector_ChildEvent(self *C.QFileSelector, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QFileSelector{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qfileselector.h b/qt6/gen_qfileselector.h index 96a76b8d..2efc5983 100644 --- a/qt6/gen_qfileselector.h +++ b/qt6/gen_qfileselector.h @@ -34,8 +34,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -void QFileSelector_new(QFileSelector** outptr_QFileSelector, QObject** outptr_QObject); -void QFileSelector_new2(QObject* parent, QFileSelector** outptr_QFileSelector, QObject** outptr_QObject); +QFileSelector* QFileSelector_new(); +QFileSelector* QFileSelector_new2(QObject* parent); +void QFileSelector_virtbase(QFileSelector* src, QObject** outptr_QObject); QMetaObject* QFileSelector_MetaObject(const QFileSelector* self); void* QFileSelector_Metacast(QFileSelector* self, const char* param1); struct miqt_string QFileSelector_Tr(const char* s); diff --git a/qt6/gen_qfilesystemmodel.cpp b/qt6/gen_qfilesystemmodel.cpp index 42a67ec5..9638c3ad 100644 --- a/qt6/gen_qfilesystemmodel.cpp +++ b/qt6/gen_qfilesystemmodel.cpp @@ -1164,18 +1164,16 @@ public: }; -void QFileSystemModel_new(QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQFileSystemModel* ret = new MiqtVirtualQFileSystemModel(); - *outptr_QFileSystemModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QFileSystemModel* QFileSystemModel_new() { + return new MiqtVirtualQFileSystemModel(); } -void QFileSystemModel_new2(QObject* parent, QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQFileSystemModel* ret = new MiqtVirtualQFileSystemModel(parent); - *outptr_QFileSystemModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QFileSystemModel* QFileSystemModel_new2(QObject* parent) { + return new MiqtVirtualQFileSystemModel(parent); +} + +void QFileSystemModel_virtbase(QFileSystemModel* src, QAbstractItemModel** outptr_QAbstractItemModel) { + *outptr_QAbstractItemModel = static_cast(src); } QMetaObject* QFileSystemModel_MetaObject(const QFileSystemModel* self) { diff --git a/qt6/gen_qfilesystemmodel.go b/qt6/gen_qfilesystemmodel.go index 749c873c..2dc794ea 100644 --- a/qt6/gen_qfilesystemmodel.go +++ b/qt6/gen_qfilesystemmodel.go @@ -52,44 +52,34 @@ func (this *QFileSystemModel) UnsafePointer() unsafe.Pointer { } // newQFileSystemModel constructs the type using only CGO pointers. -func newQFileSystemModel(h *C.QFileSystemModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QFileSystemModel { +func newQFileSystemModel(h *C.QFileSystemModel) *QFileSystemModel { if h == nil { return nil } + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + C.QFileSystemModel_virtbase(h, &outptr_QAbstractItemModel) + return &QFileSystemModel{h: h, - QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} + QAbstractItemModel: newQAbstractItemModel(outptr_QAbstractItemModel)} } // UnsafeNewQFileSystemModel constructs the type using only unsafe pointers. -func UnsafeNewQFileSystemModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QFileSystemModel { - if h == nil { - return nil - } - - return &QFileSystemModel{h: (*C.QFileSystemModel)(h), - QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} +func UnsafeNewQFileSystemModel(h unsafe.Pointer) *QFileSystemModel { + return newQFileSystemModel((*C.QFileSystemModel)(h)) } // NewQFileSystemModel constructs a new QFileSystemModel object. func NewQFileSystemModel() *QFileSystemModel { - var outptr_QFileSystemModel *C.QFileSystemModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QFileSystemModel_new(&outptr_QFileSystemModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQFileSystemModel(outptr_QFileSystemModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQFileSystemModel(C.QFileSystemModel_new()) ret.isSubclass = true return ret } // NewQFileSystemModel2 constructs a new QFileSystemModel object. func NewQFileSystemModel2(parent *QObject) *QFileSystemModel { - var outptr_QFileSystemModel *C.QFileSystemModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QFileSystemModel_new2(parent.cPointer(), &outptr_QFileSystemModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQFileSystemModel(outptr_QFileSystemModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQFileSystemModel(C.QFileSystemModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -308,7 +298,7 @@ func (this *QFileSystemModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QFileSystemModel_MimeData(this.h, indexes_ma), nil) + return newQMimeData(C.QFileSystemModel_MimeData(this.h, indexes_ma)) } func (this *QFileSystemModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -995,7 +985,7 @@ func (this *QFileSystemModel) callVirtualBase_MimeData(indexes []QModelIndex) *Q } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QFileSystemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QFileSystemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QFileSystemModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -1049,7 +1039,7 @@ func miqt_exec_callback_QFileSystemModel_DropMimeData(self *C.QFileSystemModel, } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -1166,7 +1156,7 @@ func miqt_exec_callback_QFileSystemModel_TimerEvent(self *C.QFileSystemModel, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QFileSystemModel{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1396,7 +1386,7 @@ func miqt_exec_callback_QFileSystemModel_CanDropMimeData(self *C.QFileSystemMode } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt6/gen_qfilesystemmodel.h b/qt6/gen_qfilesystemmodel.h index 98a62c71..e515f5c4 100644 --- a/qt6/gen_qfilesystemmodel.h +++ b/qt6/gen_qfilesystemmodel.h @@ -50,8 +50,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -void QFileSystemModel_new(QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QFileSystemModel_new2(QObject* parent, QFileSystemModel** outptr_QFileSystemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QFileSystemModel* QFileSystemModel_new(); +QFileSystemModel* QFileSystemModel_new2(QObject* parent); +void QFileSystemModel_virtbase(QFileSystemModel* src, QAbstractItemModel** outptr_QAbstractItemModel); QMetaObject* QFileSystemModel_MetaObject(const QFileSystemModel* self); void* QFileSystemModel_Metacast(QFileSystemModel* self, const char* param1); struct miqt_string QFileSystemModel_Tr(const char* s); diff --git a/qt6/gen_qfilesystemwatcher.cpp b/qt6/gen_qfilesystemwatcher.cpp index 8a848c96..f1806c4e 100644 --- a/qt6/gen_qfilesystemwatcher.cpp +++ b/qt6/gen_qfilesystemwatcher.cpp @@ -196,13 +196,11 @@ public: }; -void QFileSystemWatcher_new(QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { - MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(); - *outptr_QFileSystemWatcher = ret; - *outptr_QObject = static_cast(ret); +QFileSystemWatcher* QFileSystemWatcher_new() { + return new MiqtVirtualQFileSystemWatcher(); } -void QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { +QFileSystemWatcher* QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths) { QStringList paths_QList; paths_QList.reserve(paths.len); struct miqt_string* paths_arr = static_cast(paths.data); @@ -210,18 +208,14 @@ void QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ path QString paths_arr_i_QString = QString::fromUtf8(paths_arr[i].data, paths_arr[i].len); paths_QList.push_back(paths_arr_i_QString); } - MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(paths_QList); - *outptr_QFileSystemWatcher = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQFileSystemWatcher(paths_QList); } -void QFileSystemWatcher_new3(QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { - MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(parent); - *outptr_QFileSystemWatcher = ret; - *outptr_QObject = static_cast(ret); +QFileSystemWatcher* QFileSystemWatcher_new3(QObject* parent) { + return new MiqtVirtualQFileSystemWatcher(parent); } -void QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject) { +QFileSystemWatcher* QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent) { QStringList paths_QList; paths_QList.reserve(paths.len); struct miqt_string* paths_arr = static_cast(paths.data); @@ -229,9 +223,11 @@ void QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ path QString paths_arr_i_QString = QString::fromUtf8(paths_arr[i].data, paths_arr[i].len); paths_QList.push_back(paths_arr_i_QString); } - MiqtVirtualQFileSystemWatcher* ret = new MiqtVirtualQFileSystemWatcher(paths_QList, parent); - *outptr_QFileSystemWatcher = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQFileSystemWatcher(paths_QList, parent); +} + +void QFileSystemWatcher_virtbase(QFileSystemWatcher* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QFileSystemWatcher_MetaObject(const QFileSystemWatcher* self) { diff --git a/qt6/gen_qfilesystemwatcher.go b/qt6/gen_qfilesystemwatcher.go index ecebeee0..9d641d1e 100644 --- a/qt6/gen_qfilesystemwatcher.go +++ b/qt6/gen_qfilesystemwatcher.go @@ -35,31 +35,26 @@ func (this *QFileSystemWatcher) UnsafePointer() unsafe.Pointer { } // newQFileSystemWatcher constructs the type using only CGO pointers. -func newQFileSystemWatcher(h *C.QFileSystemWatcher, h_QObject *C.QObject) *QFileSystemWatcher { +func newQFileSystemWatcher(h *C.QFileSystemWatcher) *QFileSystemWatcher { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QFileSystemWatcher_virtbase(h, &outptr_QObject) + return &QFileSystemWatcher{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQFileSystemWatcher constructs the type using only unsafe pointers. -func UnsafeNewQFileSystemWatcher(h unsafe.Pointer, h_QObject unsafe.Pointer) *QFileSystemWatcher { - if h == nil { - return nil - } - - return &QFileSystemWatcher{h: (*C.QFileSystemWatcher)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQFileSystemWatcher(h unsafe.Pointer) *QFileSystemWatcher { + return newQFileSystemWatcher((*C.QFileSystemWatcher)(h)) } // NewQFileSystemWatcher constructs a new QFileSystemWatcher object. func NewQFileSystemWatcher() *QFileSystemWatcher { - var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil - var outptr_QObject *C.QObject = nil - C.QFileSystemWatcher_new(&outptr_QFileSystemWatcher, &outptr_QObject) - ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret := newQFileSystemWatcher(C.QFileSystemWatcher_new()) ret.isSubclass = true return ret } @@ -76,22 +71,16 @@ func NewQFileSystemWatcher2(paths []string) *QFileSystemWatcher { paths_CArray[i] = paths_i_ms } paths_ma := C.struct_miqt_array{len: C.size_t(len(paths)), data: unsafe.Pointer(paths_CArray)} - var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil - var outptr_QObject *C.QObject = nil - C.QFileSystemWatcher_new2(paths_ma, &outptr_QFileSystemWatcher, &outptr_QObject) - ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret := newQFileSystemWatcher(C.QFileSystemWatcher_new2(paths_ma)) ret.isSubclass = true return ret } // NewQFileSystemWatcher3 constructs a new QFileSystemWatcher object. func NewQFileSystemWatcher3(parent *QObject) *QFileSystemWatcher { - var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil - var outptr_QObject *C.QObject = nil - C.QFileSystemWatcher_new3(parent.cPointer(), &outptr_QFileSystemWatcher, &outptr_QObject) - ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret := newQFileSystemWatcher(C.QFileSystemWatcher_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -108,11 +97,8 @@ func NewQFileSystemWatcher4(paths []string, parent *QObject) *QFileSystemWatcher paths_CArray[i] = paths_i_ms } paths_ma := C.struct_miqt_array{len: C.size_t(len(paths)), data: unsafe.Pointer(paths_CArray)} - var outptr_QFileSystemWatcher *C.QFileSystemWatcher = nil - var outptr_QObject *C.QObject = nil - C.QFileSystemWatcher_new4(paths_ma, parent.cPointer(), &outptr_QFileSystemWatcher, &outptr_QObject) - ret := newQFileSystemWatcher(outptr_QFileSystemWatcher, outptr_QObject) + ret := newQFileSystemWatcher(C.QFileSystemWatcher_new4(paths_ma, parent.cPointer())) ret.isSubclass = true return ret } @@ -324,7 +310,7 @@ func miqt_exec_callback_QFileSystemWatcher_TimerEvent(self *C.QFileSystemWatcher } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -350,7 +336,7 @@ func miqt_exec_callback_QFileSystemWatcher_ChildEvent(self *C.QFileSystemWatcher } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QFileSystemWatcher{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qfilesystemwatcher.h b/qt6/gen_qfilesystemwatcher.h index 168edadf..9e9b7193 100644 --- a/qt6/gen_qfilesystemwatcher.h +++ b/qt6/gen_qfilesystemwatcher.h @@ -32,10 +32,11 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QFileSystemWatcher_new(QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); -void QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); -void QFileSystemWatcher_new3(QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); -void QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent, QFileSystemWatcher** outptr_QFileSystemWatcher, QObject** outptr_QObject); +QFileSystemWatcher* QFileSystemWatcher_new(); +QFileSystemWatcher* QFileSystemWatcher_new2(struct miqt_array /* of struct miqt_string */ paths); +QFileSystemWatcher* QFileSystemWatcher_new3(QObject* parent); +QFileSystemWatcher* QFileSystemWatcher_new4(struct miqt_array /* of struct miqt_string */ paths, QObject* parent); +void QFileSystemWatcher_virtbase(QFileSystemWatcher* src, QObject** outptr_QObject); QMetaObject* QFileSystemWatcher_MetaObject(const QFileSystemWatcher* self); void* QFileSystemWatcher_Metacast(QFileSystemWatcher* self, const char* param1); struct miqt_string QFileSystemWatcher_Tr(const char* s); diff --git a/qt6/gen_qfloat16.cpp b/qt6/gen_qfloat16.cpp index 03123caf..23696821 100644 --- a/qt6/gen_qfloat16.cpp +++ b/qt6/gen_qfloat16.cpp @@ -2,19 +2,16 @@ #include "gen_qfloat16.h" #include "_cgo_export.h" -void qfloat16_new(qfloat16** outptr_qfloat16) { - qfloat16* ret = new qfloat16(); - *outptr_qfloat16 = ret; +qfloat16* qfloat16_new() { + return new qfloat16(); } -void qfloat16_new2(int param1, qfloat16** outptr_qfloat16) { - qfloat16* ret = new qfloat16(static_cast(param1)); - *outptr_qfloat16 = ret; +qfloat16* qfloat16_new2(int param1) { + return new qfloat16(static_cast(param1)); } -void qfloat16_new3(float f, qfloat16** outptr_qfloat16) { - qfloat16* ret = new qfloat16(static_cast(f)); - *outptr_qfloat16 = ret; +qfloat16* qfloat16_new3(float f) { + return new qfloat16(static_cast(f)); } bool qfloat16_IsInf(const qfloat16* self) { diff --git a/qt6/gen_qfloat16.go b/qt6/gen_qfloat16.go index 7eb3cea8..3b93060a 100644 --- a/qt6/gen_qfloat16.go +++ b/qt6/gen_qfloat16.go @@ -37,44 +37,35 @@ func newqfloat16(h *C.qfloat16) *qfloat16 { if h == nil { return nil } + return &qfloat16{h: h} } // UnsafeNewqfloat16 constructs the type using only unsafe pointers. func UnsafeNewqfloat16(h unsafe.Pointer) *qfloat16 { - if h == nil { - return nil - } - - return &qfloat16{h: (*C.qfloat16)(h)} + return newqfloat16((*C.qfloat16)(h)) } // Newqfloat16 constructs a new qfloat16 object. func Newqfloat16() *qfloat16 { - var outptr_qfloat16 *C.qfloat16 = nil - C.qfloat16_new(&outptr_qfloat16) - ret := newqfloat16(outptr_qfloat16) + ret := newqfloat16(C.qfloat16_new()) ret.isSubclass = true return ret } // Newqfloat162 constructs a new qfloat16 object. func Newqfloat162(param1 Initialization) *qfloat16 { - var outptr_qfloat16 *C.qfloat16 = nil - C.qfloat16_new2((C.int)(param1), &outptr_qfloat16) - ret := newqfloat16(outptr_qfloat16) + ret := newqfloat16(C.qfloat16_new2((C.int)(param1))) ret.isSubclass = true return ret } // Newqfloat163 constructs a new qfloat16 object. func Newqfloat163(f float32) *qfloat16 { - var outptr_qfloat16 *C.qfloat16 = nil - C.qfloat16_new3((C.float)(f), &outptr_qfloat16) - ret := newqfloat16(outptr_qfloat16) + ret := newqfloat16(C.qfloat16_new3((C.float)(f))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qfloat16.h b/qt6/gen_qfloat16.h index 3e14e53d..270a6749 100644 --- a/qt6/gen_qfloat16.h +++ b/qt6/gen_qfloat16.h @@ -20,9 +20,9 @@ class qfloat16; typedef struct qfloat16 qfloat16; #endif -void qfloat16_new(qfloat16** outptr_qfloat16); -void qfloat16_new2(int param1, qfloat16** outptr_qfloat16); -void qfloat16_new3(float f, qfloat16** outptr_qfloat16); +qfloat16* qfloat16_new(); +qfloat16* qfloat16_new2(int param1); +qfloat16* qfloat16_new3(float f); bool qfloat16_IsInf(const qfloat16* self); bool qfloat16_IsNaN(const qfloat16* self); bool qfloat16_IsFinite(const qfloat16* self); diff --git a/qt6/gen_qfocusframe.cpp b/qt6/gen_qfocusframe.cpp index 4ec80834..53b6f1d2 100644 --- a/qt6/gen_qfocusframe.cpp +++ b/qt6/gen_qfocusframe.cpp @@ -1071,20 +1071,16 @@ public: }; -void QFocusFrame_new(QWidget* parent, QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFocusFrame* ret = new MiqtVirtualQFocusFrame(parent); - *outptr_QFocusFrame = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFocusFrame* QFocusFrame_new(QWidget* parent) { + return new MiqtVirtualQFocusFrame(parent); } -void QFocusFrame_new2(QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFocusFrame* ret = new MiqtVirtualQFocusFrame(); - *outptr_QFocusFrame = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFocusFrame* QFocusFrame_new2() { + return new MiqtVirtualQFocusFrame(); +} + +void QFocusFrame_virtbase(QFocusFrame* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QFocusFrame_MetaObject(const QFocusFrame* self) { diff --git a/qt6/gen_qfocusframe.go b/qt6/gen_qfocusframe.go index 1d34d6dd..e1b96310 100644 --- a/qt6/gen_qfocusframe.go +++ b/qt6/gen_qfocusframe.go @@ -35,46 +35,34 @@ func (this *QFocusFrame) UnsafePointer() unsafe.Pointer { } // newQFocusFrame constructs the type using only CGO pointers. -func newQFocusFrame(h *C.QFocusFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFocusFrame { +func newQFocusFrame(h *C.QFocusFrame) *QFocusFrame { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QFocusFrame_virtbase(h, &outptr_QWidget) + return &QFocusFrame{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQFocusFrame constructs the type using only unsafe pointers. -func UnsafeNewQFocusFrame(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFocusFrame { - if h == nil { - return nil - } - - return &QFocusFrame{h: (*C.QFocusFrame)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQFocusFrame(h unsafe.Pointer) *QFocusFrame { + return newQFocusFrame((*C.QFocusFrame)(h)) } // NewQFocusFrame constructs a new QFocusFrame object. func NewQFocusFrame(parent *QWidget) *QFocusFrame { - var outptr_QFocusFrame *C.QFocusFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFocusFrame_new(parent.cPointer(), &outptr_QFocusFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFocusFrame(outptr_QFocusFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFocusFrame(C.QFocusFrame_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQFocusFrame2 constructs a new QFocusFrame object. func NewQFocusFrame2() *QFocusFrame { - var outptr_QFocusFrame *C.QFocusFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFocusFrame_new2(&outptr_QFocusFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFocusFrame(outptr_QFocusFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFocusFrame(C.QFocusFrame_new2()) ret.isSubclass = true return ret } @@ -103,7 +91,7 @@ func (this *QFocusFrame) SetWidget(widget *QWidget) { } func (this *QFocusFrame) Widget() *QWidget { - return newQWidget(C.QFocusFrame_Widget(this.h), nil, nil) + return newQWidget(C.QFocusFrame_Widget(this.h)) } func QFocusFrame_Tr2(s string, c string) string { @@ -206,7 +194,7 @@ func miqt_exec_callback_QFocusFrame_PaintEvent(self *C.QFocusFrame, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QFocusFrame{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -441,7 +429,7 @@ func miqt_exec_callback_QFocusFrame_MousePressEvent(self *C.QFocusFrame, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -467,7 +455,7 @@ func miqt_exec_callback_QFocusFrame_MouseReleaseEvent(self *C.QFocusFrame, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -493,7 +481,7 @@ func miqt_exec_callback_QFocusFrame_MouseDoubleClickEvent(self *C.QFocusFrame, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -519,7 +507,7 @@ func miqt_exec_callback_QFocusFrame_MouseMoveEvent(self *C.QFocusFrame, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -545,7 +533,7 @@ func miqt_exec_callback_QFocusFrame_WheelEvent(self *C.QFocusFrame, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -571,7 +559,7 @@ func miqt_exec_callback_QFocusFrame_KeyPressEvent(self *C.QFocusFrame, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -597,7 +585,7 @@ func miqt_exec_callback_QFocusFrame_KeyReleaseEvent(self *C.QFocusFrame, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -623,7 +611,7 @@ func miqt_exec_callback_QFocusFrame_FocusInEvent(self *C.QFocusFrame, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -649,7 +637,7 @@ func miqt_exec_callback_QFocusFrame_FocusOutEvent(self *C.QFocusFrame, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -675,7 +663,7 @@ func miqt_exec_callback_QFocusFrame_EnterEvent(self *C.QFocusFrame, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -727,7 +715,7 @@ func miqt_exec_callback_QFocusFrame_MoveEvent(self *C.QFocusFrame, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -753,7 +741,7 @@ func miqt_exec_callback_QFocusFrame_ResizeEvent(self *C.QFocusFrame, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -779,7 +767,7 @@ func miqt_exec_callback_QFocusFrame_CloseEvent(self *C.QFocusFrame, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -805,7 +793,7 @@ func miqt_exec_callback_QFocusFrame_ContextMenuEvent(self *C.QFocusFrame, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -831,7 +819,7 @@ func miqt_exec_callback_QFocusFrame_TabletEvent(self *C.QFocusFrame, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -857,7 +845,7 @@ func miqt_exec_callback_QFocusFrame_ActionEvent(self *C.QFocusFrame, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -883,7 +871,7 @@ func miqt_exec_callback_QFocusFrame_DragEnterEvent(self *C.QFocusFrame, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -909,7 +897,7 @@ func miqt_exec_callback_QFocusFrame_DragMoveEvent(self *C.QFocusFrame, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -935,7 +923,7 @@ func miqt_exec_callback_QFocusFrame_DragLeaveEvent(self *C.QFocusFrame, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -961,7 +949,7 @@ func miqt_exec_callback_QFocusFrame_DropEvent(self *C.QFocusFrame, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_DropEvent, slotval1) @@ -987,7 +975,7 @@ func miqt_exec_callback_QFocusFrame_ShowEvent(self *C.QFocusFrame, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1013,7 +1001,7 @@ func miqt_exec_callback_QFocusFrame_HideEvent(self *C.QFocusFrame, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QFocusFrame{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1209,7 +1197,7 @@ func miqt_exec_callback_QFocusFrame_InputMethodEvent(self *C.QFocusFrame, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QFocusFrame{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qfocusframe.h b/qt6/gen_qfocusframe.h index 6b56b7a9..d52898e3 100644 --- a/qt6/gen_qfocusframe.h +++ b/qt6/gen_qfocusframe.h @@ -80,8 +80,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QFocusFrame_new(QWidget* parent, QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFocusFrame_new2(QFocusFrame** outptr_QFocusFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QFocusFrame* QFocusFrame_new(QWidget* parent); +QFocusFrame* QFocusFrame_new2(); +void QFocusFrame_virtbase(QFocusFrame* src, QWidget** outptr_QWidget); QMetaObject* QFocusFrame_MetaObject(const QFocusFrame* self); void* QFocusFrame_Metacast(QFocusFrame* self, const char* param1); struct miqt_string QFocusFrame_Tr(const char* s); diff --git a/qt6/gen_qfont.cpp b/qt6/gen_qfont.cpp index 04268090..12e87ad3 100644 --- a/qt6/gen_qfont.cpp +++ b/qt6/gen_qfont.cpp @@ -8,18 +8,16 @@ #include "gen_qfont.h" #include "_cgo_export.h" -void QFont_new(QFont** outptr_QFont) { - QFont* ret = new QFont(); - *outptr_QFont = ret; +QFont* QFont_new() { + return new QFont(); } -void QFont_new2(struct miqt_string family, QFont** outptr_QFont) { +QFont* QFont_new2(struct miqt_string family) { QString family_QString = QString::fromUtf8(family.data, family.len); - QFont* ret = new QFont(family_QString); - *outptr_QFont = ret; + return new QFont(family_QString); } -void QFont_new3(struct miqt_array /* of struct miqt_string */ families, QFont** outptr_QFont) { +QFont* QFont_new3(struct miqt_array /* of struct miqt_string */ families) { QStringList families_QList; families_QList.reserve(families.len); struct miqt_string* families_arr = static_cast(families.data); @@ -27,39 +25,33 @@ void QFont_new3(struct miqt_array /* of struct miqt_string */ families, QFont** QString families_arr_i_QString = QString::fromUtf8(families_arr[i].data, families_arr[i].len); families_QList.push_back(families_arr_i_QString); } - QFont* ret = new QFont(families_QList); - *outptr_QFont = ret; + return new QFont(families_QList); } -void QFont_new4(QFont* font, QPaintDevice* pd, QFont** outptr_QFont) { - QFont* ret = new QFont(*font, pd); - *outptr_QFont = ret; +QFont* QFont_new4(QFont* font, QPaintDevice* pd) { + return new QFont(*font, pd); } -void QFont_new5(QFont* font, QFont** outptr_QFont) { - QFont* ret = new QFont(*font); - *outptr_QFont = ret; +QFont* QFont_new5(QFont* font) { + return new QFont(*font); } -void QFont_new6(struct miqt_string family, int pointSize, QFont** outptr_QFont) { +QFont* QFont_new6(struct miqt_string family, int pointSize) { QString family_QString = QString::fromUtf8(family.data, family.len); - QFont* ret = new QFont(family_QString, static_cast(pointSize)); - *outptr_QFont = ret; + return new QFont(family_QString, static_cast(pointSize)); } -void QFont_new7(struct miqt_string family, int pointSize, int weight, QFont** outptr_QFont) { +QFont* QFont_new7(struct miqt_string family, int pointSize, int weight) { QString family_QString = QString::fromUtf8(family.data, family.len); - QFont* ret = new QFont(family_QString, static_cast(pointSize), static_cast(weight)); - *outptr_QFont = ret; + return new QFont(family_QString, static_cast(pointSize), static_cast(weight)); } -void QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic, QFont** outptr_QFont) { +QFont* QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic) { QString family_QString = QString::fromUtf8(family.data, family.len); - QFont* ret = new QFont(family_QString, static_cast(pointSize), static_cast(weight), italic); - *outptr_QFont = ret; + return new QFont(family_QString, static_cast(pointSize), static_cast(weight), italic); } -void QFont_new9(struct miqt_array /* of struct miqt_string */ families, int pointSize, QFont** outptr_QFont) { +QFont* QFont_new9(struct miqt_array /* of struct miqt_string */ families, int pointSize) { QStringList families_QList; families_QList.reserve(families.len); struct miqt_string* families_arr = static_cast(families.data); @@ -67,11 +59,10 @@ void QFont_new9(struct miqt_array /* of struct miqt_string */ families, int poi QString families_arr_i_QString = QString::fromUtf8(families_arr[i].data, families_arr[i].len); families_QList.push_back(families_arr_i_QString); } - QFont* ret = new QFont(families_QList, static_cast(pointSize)); - *outptr_QFont = ret; + return new QFont(families_QList, static_cast(pointSize)); } -void QFont_new10(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight, QFont** outptr_QFont) { +QFont* QFont_new10(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight) { QStringList families_QList; families_QList.reserve(families.len); struct miqt_string* families_arr = static_cast(families.data); @@ -79,11 +70,10 @@ void QFont_new10(struct miqt_array /* of struct miqt_string */ families, int po QString families_arr_i_QString = QString::fromUtf8(families_arr[i].data, families_arr[i].len); families_QList.push_back(families_arr_i_QString); } - QFont* ret = new QFont(families_QList, static_cast(pointSize), static_cast(weight)); - *outptr_QFont = ret; + return new QFont(families_QList, static_cast(pointSize), static_cast(weight)); } -void QFont_new11(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight, bool italic, QFont** outptr_QFont) { +QFont* QFont_new11(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight, bool italic) { QStringList families_QList; families_QList.reserve(families.len); struct miqt_string* families_arr = static_cast(families.data); @@ -91,8 +81,7 @@ void QFont_new11(struct miqt_array /* of struct miqt_string */ families, int po QString families_arr_i_QString = QString::fromUtf8(families_arr[i].data, families_arr[i].len); families_QList.push_back(families_arr_i_QString); } - QFont* ret = new QFont(families_QList, static_cast(pointSize), static_cast(weight), italic); - *outptr_QFont = ret; + return new QFont(families_QList, static_cast(pointSize), static_cast(weight), italic); } void QFont_Swap(QFont* self, QFont* other) { diff --git a/qt6/gen_qfont.go b/qt6/gen_qfont.go index 6ba4fd18..2c029f21 100644 --- a/qt6/gen_qfont.go +++ b/qt6/gen_qfont.go @@ -160,24 +160,19 @@ func newQFont(h *C.QFont) *QFont { if h == nil { return nil } + return &QFont{h: h} } // UnsafeNewQFont constructs the type using only unsafe pointers. func UnsafeNewQFont(h unsafe.Pointer) *QFont { - if h == nil { - return nil - } - - return &QFont{h: (*C.QFont)(h)} + return newQFont((*C.QFont)(h)) } // NewQFont constructs a new QFont object. func NewQFont() *QFont { - var outptr_QFont *C.QFont = nil - C.QFont_new(&outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new()) ret.isSubclass = true return ret } @@ -188,10 +183,8 @@ func NewQFont2(family string) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - var outptr_QFont *C.QFont = nil - C.QFont_new2(family_ms, &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new2(family_ms)) ret.isSubclass = true return ret } @@ -208,30 +201,24 @@ func NewQFont3(families []string) *QFont { families_CArray[i] = families_i_ms } families_ma := C.struct_miqt_array{len: C.size_t(len(families)), data: unsafe.Pointer(families_CArray)} - var outptr_QFont *C.QFont = nil - C.QFont_new3(families_ma, &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new3(families_ma)) ret.isSubclass = true return ret } // NewQFont4 constructs a new QFont object. func NewQFont4(font *QFont, pd *QPaintDevice) *QFont { - var outptr_QFont *C.QFont = nil - C.QFont_new4(font.cPointer(), pd.cPointer(), &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new4(font.cPointer(), pd.cPointer())) ret.isSubclass = true return ret } // NewQFont5 constructs a new QFont object. func NewQFont5(font *QFont) *QFont { - var outptr_QFont *C.QFont = nil - C.QFont_new5(font.cPointer(), &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new5(font.cPointer())) ret.isSubclass = true return ret } @@ -242,10 +229,8 @@ func NewQFont6(family string, pointSize int) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - var outptr_QFont *C.QFont = nil - C.QFont_new6(family_ms, (C.int)(pointSize), &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new6(family_ms, (C.int)(pointSize))) ret.isSubclass = true return ret } @@ -256,10 +241,8 @@ func NewQFont7(family string, pointSize int, weight int) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - var outptr_QFont *C.QFont = nil - C.QFont_new7(family_ms, (C.int)(pointSize), (C.int)(weight), &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new7(family_ms, (C.int)(pointSize), (C.int)(weight))) ret.isSubclass = true return ret } @@ -270,10 +253,8 @@ func NewQFont8(family string, pointSize int, weight int, italic bool) *QFont { family_ms.data = C.CString(family) family_ms.len = C.size_t(len(family)) defer C.free(unsafe.Pointer(family_ms.data)) - var outptr_QFont *C.QFont = nil - C.QFont_new8(family_ms, (C.int)(pointSize), (C.int)(weight), (C.bool)(italic), &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new8(family_ms, (C.int)(pointSize), (C.int)(weight), (C.bool)(italic))) ret.isSubclass = true return ret } @@ -290,10 +271,8 @@ func NewQFont9(families []string, pointSize int) *QFont { families_CArray[i] = families_i_ms } families_ma := C.struct_miqt_array{len: C.size_t(len(families)), data: unsafe.Pointer(families_CArray)} - var outptr_QFont *C.QFont = nil - C.QFont_new9(families_ma, (C.int)(pointSize), &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new9(families_ma, (C.int)(pointSize))) ret.isSubclass = true return ret } @@ -310,10 +289,8 @@ func NewQFont10(families []string, pointSize int, weight int) *QFont { families_CArray[i] = families_i_ms } families_ma := C.struct_miqt_array{len: C.size_t(len(families)), data: unsafe.Pointer(families_CArray)} - var outptr_QFont *C.QFont = nil - C.QFont_new10(families_ma, (C.int)(pointSize), (C.int)(weight), &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new10(families_ma, (C.int)(pointSize), (C.int)(weight))) ret.isSubclass = true return ret } @@ -330,10 +307,8 @@ func NewQFont11(families []string, pointSize int, weight int, italic bool) *QFon families_CArray[i] = families_i_ms } families_ma := C.struct_miqt_array{len: C.size_t(len(families)), data: unsafe.Pointer(families_CArray)} - var outptr_QFont *C.QFont = nil - C.QFont_new11(families_ma, (C.int)(pointSize), (C.int)(weight), (C.bool)(italic), &outptr_QFont) - ret := newQFont(outptr_QFont) + ret := newQFont(C.QFont_new11(families_ma, (C.int)(pointSize), (C.int)(weight), (C.bool)(italic))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qfont.h b/qt6/gen_qfont.h index 5a872f96..09d7b280 100644 --- a/qt6/gen_qfont.h +++ b/qt6/gen_qfont.h @@ -22,17 +22,17 @@ typedef struct QFont QFont; typedef struct QPaintDevice QPaintDevice; #endif -void QFont_new(QFont** outptr_QFont); -void QFont_new2(struct miqt_string family, QFont** outptr_QFont); -void QFont_new3(struct miqt_array /* of struct miqt_string */ families, QFont** outptr_QFont); -void QFont_new4(QFont* font, QPaintDevice* pd, QFont** outptr_QFont); -void QFont_new5(QFont* font, QFont** outptr_QFont); -void QFont_new6(struct miqt_string family, int pointSize, QFont** outptr_QFont); -void QFont_new7(struct miqt_string family, int pointSize, int weight, QFont** outptr_QFont); -void QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic, QFont** outptr_QFont); -void QFont_new9(struct miqt_array /* of struct miqt_string */ families, int pointSize, QFont** outptr_QFont); -void QFont_new10(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight, QFont** outptr_QFont); -void QFont_new11(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight, bool italic, QFont** outptr_QFont); +QFont* QFont_new(); +QFont* QFont_new2(struct miqt_string family); +QFont* QFont_new3(struct miqt_array /* of struct miqt_string */ families); +QFont* QFont_new4(QFont* font, QPaintDevice* pd); +QFont* QFont_new5(QFont* font); +QFont* QFont_new6(struct miqt_string family, int pointSize); +QFont* QFont_new7(struct miqt_string family, int pointSize, int weight); +QFont* QFont_new8(struct miqt_string family, int pointSize, int weight, bool italic); +QFont* QFont_new9(struct miqt_array /* of struct miqt_string */ families, int pointSize); +QFont* QFont_new10(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight); +QFont* QFont_new11(struct miqt_array /* of struct miqt_string */ families, int pointSize, int weight, bool italic); void QFont_Swap(QFont* self, QFont* other); struct miqt_string QFont_Family(const QFont* self); void QFont_SetFamily(QFont* self, struct miqt_string family); diff --git a/qt6/gen_qfontcombobox.cpp b/qt6/gen_qfontcombobox.cpp index 25ee743c..67a3504c 100644 --- a/qt6/gen_qfontcombobox.cpp +++ b/qt6/gen_qfontcombobox.cpp @@ -558,22 +558,16 @@ public: }; -void QFontComboBox_new(QWidget* parent, QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFontComboBox* ret = new MiqtVirtualQFontComboBox(parent); - *outptr_QFontComboBox = ret; - *outptr_QComboBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFontComboBox* QFontComboBox_new(QWidget* parent) { + return new MiqtVirtualQFontComboBox(parent); } -void QFontComboBox_new2(QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFontComboBox* ret = new MiqtVirtualQFontComboBox(); - *outptr_QFontComboBox = ret; - *outptr_QComboBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFontComboBox* QFontComboBox_new2() { + return new MiqtVirtualQFontComboBox(); +} + +void QFontComboBox_virtbase(QFontComboBox* src, QComboBox** outptr_QComboBox) { + *outptr_QComboBox = static_cast(src); } QMetaObject* QFontComboBox_MetaObject(const QFontComboBox* self) { diff --git a/qt6/gen_qfontcombobox.go b/qt6/gen_qfontcombobox.go index 0ee52836..816ab13b 100644 --- a/qt6/gen_qfontcombobox.go +++ b/qt6/gen_qfontcombobox.go @@ -45,48 +45,34 @@ func (this *QFontComboBox) UnsafePointer() unsafe.Pointer { } // newQFontComboBox constructs the type using only CGO pointers. -func newQFontComboBox(h *C.QFontComboBox, h_QComboBox *C.QComboBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFontComboBox { +func newQFontComboBox(h *C.QFontComboBox) *QFontComboBox { if h == nil { return nil } + var outptr_QComboBox *C.QComboBox = nil + C.QFontComboBox_virtbase(h, &outptr_QComboBox) + return &QFontComboBox{h: h, - QComboBox: newQComboBox(h_QComboBox, h_QWidget, h_QObject, h_QPaintDevice)} + QComboBox: newQComboBox(outptr_QComboBox)} } // UnsafeNewQFontComboBox constructs the type using only unsafe pointers. -func UnsafeNewQFontComboBox(h unsafe.Pointer, h_QComboBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFontComboBox { - if h == nil { - return nil - } - - return &QFontComboBox{h: (*C.QFontComboBox)(h), - QComboBox: UnsafeNewQComboBox(h_QComboBox, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQFontComboBox(h unsafe.Pointer) *QFontComboBox { + return newQFontComboBox((*C.QFontComboBox)(h)) } // NewQFontComboBox constructs a new QFontComboBox object. func NewQFontComboBox(parent *QWidget) *QFontComboBox { - var outptr_QFontComboBox *C.QFontComboBox = nil - var outptr_QComboBox *C.QComboBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFontComboBox_new(parent.cPointer(), &outptr_QFontComboBox, &outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFontComboBox(outptr_QFontComboBox, outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFontComboBox(C.QFontComboBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQFontComboBox2 constructs a new QFontComboBox object. func NewQFontComboBox2() *QFontComboBox { - var outptr_QFontComboBox *C.QFontComboBox = nil - var outptr_QComboBox *C.QComboBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFontComboBox_new2(&outptr_QFontComboBox, &outptr_QComboBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFontComboBox(outptr_QFontComboBox, outptr_QComboBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFontComboBox(C.QFontComboBox_new2()) ret.isSubclass = true return ret } @@ -305,7 +291,7 @@ func miqt_exec_callback_QFontComboBox_SetModel(self *C.QFontComboBox, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc((&QFontComboBox{h: self}).callVirtualBase_SetModel, slotval1) @@ -434,7 +420,7 @@ func miqt_exec_callback_QFontComboBox_FocusInEvent(self *C.QFontComboBox, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -460,7 +446,7 @@ func miqt_exec_callback_QFontComboBox_FocusOutEvent(self *C.QFontComboBox, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -512,7 +498,7 @@ func miqt_exec_callback_QFontComboBox_ResizeEvent(self *C.QFontComboBox, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -538,7 +524,7 @@ func miqt_exec_callback_QFontComboBox_PaintEvent(self *C.QFontComboBox, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -564,7 +550,7 @@ func miqt_exec_callback_QFontComboBox_ShowEvent(self *C.QFontComboBox, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(e, nil) + slotval1 := newQShowEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -590,7 +576,7 @@ func miqt_exec_callback_QFontComboBox_HideEvent(self *C.QFontComboBox, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(e, nil) + slotval1 := newQHideEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_HideEvent, slotval1) @@ -616,7 +602,7 @@ func miqt_exec_callback_QFontComboBox_MousePressEvent(self *C.QFontComboBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -642,7 +628,7 @@ func miqt_exec_callback_QFontComboBox_MouseReleaseEvent(self *C.QFontComboBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -668,7 +654,7 @@ func miqt_exec_callback_QFontComboBox_KeyPressEvent(self *C.QFontComboBox, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -694,7 +680,7 @@ func miqt_exec_callback_QFontComboBox_KeyReleaseEvent(self *C.QFontComboBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -720,7 +706,7 @@ func miqt_exec_callback_QFontComboBox_WheelEvent(self *C.QFontComboBox, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -746,7 +732,7 @@ func miqt_exec_callback_QFontComboBox_ContextMenuEvent(self *C.QFontComboBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(e, nil, nil) + slotval1 := newQContextMenuEvent(e) gofunc((&QFontComboBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -772,7 +758,7 @@ func miqt_exec_callback_QFontComboBox_InputMethodEvent(self *C.QFontComboBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QFontComboBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -798,7 +784,7 @@ func miqt_exec_callback_QFontComboBox_InitStyleOption(self *C.QFontComboBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionComboBox(option, nil, nil) + slotval1 := newQStyleOptionComboBox(option) gofunc((&QFontComboBox{h: self}).callVirtualBase_InitStyleOption, slotval1) diff --git a/qt6/gen_qfontcombobox.h b/qt6/gen_qfontcombobox.h index 511eee4c..ff45f8ea 100644 --- a/qt6/gen_qfontcombobox.h +++ b/qt6/gen_qfontcombobox.h @@ -62,8 +62,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QFontComboBox_new(QWidget* parent, QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFontComboBox_new2(QFontComboBox** outptr_QFontComboBox, QComboBox** outptr_QComboBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QFontComboBox* QFontComboBox_new(QWidget* parent); +QFontComboBox* QFontComboBox_new2(); +void QFontComboBox_virtbase(QFontComboBox* src, QComboBox** outptr_QComboBox); QMetaObject* QFontComboBox_MetaObject(const QFontComboBox* self); void* QFontComboBox_Metacast(QFontComboBox* self, const char* param1); struct miqt_string QFontComboBox_Tr(const char* s); diff --git a/qt6/gen_qfontdatabase.cpp b/qt6/gen_qfontdatabase.cpp index 74fb685e..3b76b6ac 100644 --- a/qt6/gen_qfontdatabase.cpp +++ b/qt6/gen_qfontdatabase.cpp @@ -10,9 +10,8 @@ #include "gen_qfontdatabase.h" #include "_cgo_export.h" -void QFontDatabase_new(QFontDatabase** outptr_QFontDatabase) { - QFontDatabase* ret = new QFontDatabase(); - *outptr_QFontDatabase = ret; +QFontDatabase* QFontDatabase_new() { + return new QFontDatabase(); } struct miqt_array /* of int */ QFontDatabase_StandardSizes() { diff --git a/qt6/gen_qfontdatabase.go b/qt6/gen_qfontdatabase.go index 9d0de6f1..2d2bc064 100644 --- a/qt6/gen_qfontdatabase.go +++ b/qt6/gen_qfontdatabase.go @@ -87,24 +87,19 @@ func newQFontDatabase(h *C.QFontDatabase) *QFontDatabase { if h == nil { return nil } + return &QFontDatabase{h: h} } // UnsafeNewQFontDatabase constructs the type using only unsafe pointers. func UnsafeNewQFontDatabase(h unsafe.Pointer) *QFontDatabase { - if h == nil { - return nil - } - - return &QFontDatabase{h: (*C.QFontDatabase)(h)} + return newQFontDatabase((*C.QFontDatabase)(h)) } // NewQFontDatabase constructs a new QFontDatabase object. func NewQFontDatabase() *QFontDatabase { - var outptr_QFontDatabase *C.QFontDatabase = nil - C.QFontDatabase_new(&outptr_QFontDatabase) - ret := newQFontDatabase(outptr_QFontDatabase) + ret := newQFontDatabase(C.QFontDatabase_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qfontdatabase.h b/qt6/gen_qfontdatabase.h index 2f25de77..3875ef15 100644 --- a/qt6/gen_qfontdatabase.h +++ b/qt6/gen_qfontdatabase.h @@ -24,7 +24,7 @@ typedef struct QFontDatabase QFontDatabase; typedef struct QFontInfo QFontInfo; #endif -void QFontDatabase_new(QFontDatabase** outptr_QFontDatabase); +QFontDatabase* QFontDatabase_new(); struct miqt_array /* of int */ QFontDatabase_StandardSizes(); struct miqt_array /* of int */ QFontDatabase_WritingSystems(); struct miqt_array /* of int */ QFontDatabase_WritingSystemsWithFamily(struct miqt_string family); diff --git a/qt6/gen_qfontdialog.cpp b/qt6/gen_qfontdialog.cpp index 42004b07..5ddf6773 100644 --- a/qt6/gen_qfontdialog.cpp +++ b/qt6/gen_qfontdialog.cpp @@ -382,40 +382,24 @@ public: }; -void QFontDialog_new(QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(parent); - *outptr_QFontDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFontDialog* QFontDialog_new(QWidget* parent) { + return new MiqtVirtualQFontDialog(parent); } -void QFontDialog_new2(QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(); - *outptr_QFontDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFontDialog* QFontDialog_new2() { + return new MiqtVirtualQFontDialog(); } -void QFontDialog_new3(QFont* initial, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(*initial); - *outptr_QFontDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFontDialog* QFontDialog_new3(QFont* initial) { + return new MiqtVirtualQFontDialog(*initial); } -void QFontDialog_new4(QFont* initial, QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFontDialog* ret = new MiqtVirtualQFontDialog(*initial, parent); - *outptr_QFontDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFontDialog* QFontDialog_new4(QFont* initial, QWidget* parent) { + return new MiqtVirtualQFontDialog(*initial, parent); +} + +void QFontDialog_virtbase(QFontDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QFontDialog_MetaObject(const QFontDialog* self) { diff --git a/qt6/gen_qfontdialog.go b/qt6/gen_qfontdialog.go index ca5728b2..bd0be8fb 100644 --- a/qt6/gen_qfontdialog.go +++ b/qt6/gen_qfontdialog.go @@ -46,76 +46,50 @@ func (this *QFontDialog) UnsafePointer() unsafe.Pointer { } // newQFontDialog constructs the type using only CGO pointers. -func newQFontDialog(h *C.QFontDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFontDialog { +func newQFontDialog(h *C.QFontDialog) *QFontDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QFontDialog_virtbase(h, &outptr_QDialog) + return &QFontDialog{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQFontDialog constructs the type using only unsafe pointers. -func UnsafeNewQFontDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFontDialog { - if h == nil { - return nil - } - - return &QFontDialog{h: (*C.QFontDialog)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQFontDialog(h unsafe.Pointer) *QFontDialog { + return newQFontDialog((*C.QFontDialog)(h)) } // NewQFontDialog constructs a new QFontDialog object. func NewQFontDialog(parent *QWidget) *QFontDialog { - var outptr_QFontDialog *C.QFontDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFontDialog_new(parent.cPointer(), &outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFontDialog(C.QFontDialog_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQFontDialog2 constructs a new QFontDialog object. func NewQFontDialog2() *QFontDialog { - var outptr_QFontDialog *C.QFontDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFontDialog_new2(&outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFontDialog(C.QFontDialog_new2()) ret.isSubclass = true return ret } // NewQFontDialog3 constructs a new QFontDialog object. func NewQFontDialog3(initial *QFont) *QFontDialog { - var outptr_QFontDialog *C.QFontDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFontDialog_new3(initial.cPointer(), &outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFontDialog(C.QFontDialog_new3(initial.cPointer())) ret.isSubclass = true return ret } // NewQFontDialog4 constructs a new QFontDialog object. func NewQFontDialog4(initial *QFont, parent *QWidget) *QFontDialog { - var outptr_QFontDialog *C.QFontDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFontDialog_new4(initial.cPointer(), parent.cPointer(), &outptr_QFontDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFontDialog(outptr_QFontDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFontDialog(C.QFontDialog_new4(initial.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -561,7 +535,7 @@ func miqt_exec_callback_QFontDialog_KeyPressEvent(self *C.QFontDialog, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QFontDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -587,7 +561,7 @@ func miqt_exec_callback_QFontDialog_CloseEvent(self *C.QFontDialog, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(param1, nil) + slotval1 := newQCloseEvent(param1) gofunc((&QFontDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -613,7 +587,7 @@ func miqt_exec_callback_QFontDialog_ShowEvent(self *C.QFontDialog, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QFontDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -639,7 +613,7 @@ func miqt_exec_callback_QFontDialog_ResizeEvent(self *C.QFontDialog, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QFontDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -665,7 +639,7 @@ func miqt_exec_callback_QFontDialog_ContextMenuEvent(self *C.QFontDialog, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QFontDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt6/gen_qfontdialog.h b/qt6/gen_qfontdialog.h index 30cfd766..0cc09aa0 100644 --- a/qt6/gen_qfontdialog.h +++ b/qt6/gen_qfontdialog.h @@ -46,10 +46,11 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QFontDialog_new(QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFontDialog_new2(QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFontDialog_new3(QFont* initial, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFontDialog_new4(QFont* initial, QWidget* parent, QFontDialog** outptr_QFontDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QFontDialog* QFontDialog_new(QWidget* parent); +QFontDialog* QFontDialog_new2(); +QFontDialog* QFontDialog_new3(QFont* initial); +QFontDialog* QFontDialog_new4(QFont* initial, QWidget* parent); +void QFontDialog_virtbase(QFontDialog* src, QDialog** outptr_QDialog); QMetaObject* QFontDialog_MetaObject(const QFontDialog* self); void* QFontDialog_Metacast(QFontDialog* self, const char* param1); struct miqt_string QFontDialog_Tr(const char* s); diff --git a/qt6/gen_qfontinfo.cpp b/qt6/gen_qfontinfo.cpp index e27367e3..3034f698 100644 --- a/qt6/gen_qfontinfo.cpp +++ b/qt6/gen_qfontinfo.cpp @@ -7,14 +7,12 @@ #include "gen_qfontinfo.h" #include "_cgo_export.h" -void QFontInfo_new(QFont* param1, QFontInfo** outptr_QFontInfo) { - QFontInfo* ret = new QFontInfo(*param1); - *outptr_QFontInfo = ret; +QFontInfo* QFontInfo_new(QFont* param1) { + return new QFontInfo(*param1); } -void QFontInfo_new2(QFontInfo* param1, QFontInfo** outptr_QFontInfo) { - QFontInfo* ret = new QFontInfo(*param1); - *outptr_QFontInfo = ret; +QFontInfo* QFontInfo_new2(QFontInfo* param1) { + return new QFontInfo(*param1); } void QFontInfo_OperatorAssign(QFontInfo* self, QFontInfo* param1) { diff --git a/qt6/gen_qfontinfo.go b/qt6/gen_qfontinfo.go index 240649f8..4c7abd3d 100644 --- a/qt6/gen_qfontinfo.go +++ b/qt6/gen_qfontinfo.go @@ -37,34 +37,27 @@ func newQFontInfo(h *C.QFontInfo) *QFontInfo { if h == nil { return nil } + return &QFontInfo{h: h} } // UnsafeNewQFontInfo constructs the type using only unsafe pointers. func UnsafeNewQFontInfo(h unsafe.Pointer) *QFontInfo { - if h == nil { - return nil - } - - return &QFontInfo{h: (*C.QFontInfo)(h)} + return newQFontInfo((*C.QFontInfo)(h)) } // NewQFontInfo constructs a new QFontInfo object. func NewQFontInfo(param1 *QFont) *QFontInfo { - var outptr_QFontInfo *C.QFontInfo = nil - C.QFontInfo_new(param1.cPointer(), &outptr_QFontInfo) - ret := newQFontInfo(outptr_QFontInfo) + ret := newQFontInfo(C.QFontInfo_new(param1.cPointer())) ret.isSubclass = true return ret } // NewQFontInfo2 constructs a new QFontInfo object. func NewQFontInfo2(param1 *QFontInfo) *QFontInfo { - var outptr_QFontInfo *C.QFontInfo = nil - C.QFontInfo_new2(param1.cPointer(), &outptr_QFontInfo) - ret := newQFontInfo(outptr_QFontInfo) + ret := newQFontInfo(C.QFontInfo_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qfontinfo.h b/qt6/gen_qfontinfo.h index 29b53760..4ff3fb5f 100644 --- a/qt6/gen_qfontinfo.h +++ b/qt6/gen_qfontinfo.h @@ -22,8 +22,8 @@ typedef struct QFont QFont; typedef struct QFontInfo QFontInfo; #endif -void QFontInfo_new(QFont* param1, QFontInfo** outptr_QFontInfo); -void QFontInfo_new2(QFontInfo* param1, QFontInfo** outptr_QFontInfo); +QFontInfo* QFontInfo_new(QFont* param1); +QFontInfo* QFontInfo_new2(QFontInfo* param1); void QFontInfo_OperatorAssign(QFontInfo* self, QFontInfo* param1); void QFontInfo_Swap(QFontInfo* self, QFontInfo* other); struct miqt_string QFontInfo_Family(const QFontInfo* self); diff --git a/qt6/gen_qfontmetrics.cpp b/qt6/gen_qfontmetrics.cpp index 9fcf1148..ce61b649 100644 --- a/qt6/gen_qfontmetrics.cpp +++ b/qt6/gen_qfontmetrics.cpp @@ -15,19 +15,16 @@ #include "gen_qfontmetrics.h" #include "_cgo_export.h" -void QFontMetrics_new(QFont* param1, QFontMetrics** outptr_QFontMetrics) { - QFontMetrics* ret = new QFontMetrics(*param1); - *outptr_QFontMetrics = ret; +QFontMetrics* QFontMetrics_new(QFont* param1) { + return new QFontMetrics(*param1); } -void QFontMetrics_new2(QFont* font, QPaintDevice* pd, QFontMetrics** outptr_QFontMetrics) { - QFontMetrics* ret = new QFontMetrics(*font, pd); - *outptr_QFontMetrics = ret; +QFontMetrics* QFontMetrics_new2(QFont* font, QPaintDevice* pd) { + return new QFontMetrics(*font, pd); } -void QFontMetrics_new3(QFontMetrics* param1, QFontMetrics** outptr_QFontMetrics) { - QFontMetrics* ret = new QFontMetrics(*param1); - *outptr_QFontMetrics = ret; +QFontMetrics* QFontMetrics_new3(QFontMetrics* param1) { + return new QFontMetrics(*param1); } void QFontMetrics_OperatorAssign(QFontMetrics* self, QFontMetrics* param1) { @@ -247,24 +244,20 @@ void QFontMetrics_Delete(QFontMetrics* self, bool isSubclass) { } } -void QFontMetricsF_new(QFont* font, QFontMetricsF** outptr_QFontMetricsF) { - QFontMetricsF* ret = new QFontMetricsF(*font); - *outptr_QFontMetricsF = ret; +QFontMetricsF* QFontMetricsF_new(QFont* font) { + return new QFontMetricsF(*font); } -void QFontMetricsF_new2(QFont* font, QPaintDevice* pd, QFontMetricsF** outptr_QFontMetricsF) { - QFontMetricsF* ret = new QFontMetricsF(*font, pd); - *outptr_QFontMetricsF = ret; +QFontMetricsF* QFontMetricsF_new2(QFont* font, QPaintDevice* pd) { + return new QFontMetricsF(*font, pd); } -void QFontMetricsF_new3(QFontMetrics* param1, QFontMetricsF** outptr_QFontMetricsF) { - QFontMetricsF* ret = new QFontMetricsF(*param1); - *outptr_QFontMetricsF = ret; +QFontMetricsF* QFontMetricsF_new3(QFontMetrics* param1) { + return new QFontMetricsF(*param1); } -void QFontMetricsF_new4(QFontMetricsF* param1, QFontMetricsF** outptr_QFontMetricsF) { - QFontMetricsF* ret = new QFontMetricsF(*param1); - *outptr_QFontMetricsF = ret; +QFontMetricsF* QFontMetricsF_new4(QFontMetricsF* param1) { + return new QFontMetricsF(*param1); } void QFontMetricsF_OperatorAssign(QFontMetricsF* self, QFontMetricsF* param1) { diff --git a/qt6/gen_qfontmetrics.go b/qt6/gen_qfontmetrics.go index 42b8fbd7..ac03096a 100644 --- a/qt6/gen_qfontmetrics.go +++ b/qt6/gen_qfontmetrics.go @@ -37,44 +37,35 @@ func newQFontMetrics(h *C.QFontMetrics) *QFontMetrics { if h == nil { return nil } + return &QFontMetrics{h: h} } // UnsafeNewQFontMetrics constructs the type using only unsafe pointers. func UnsafeNewQFontMetrics(h unsafe.Pointer) *QFontMetrics { - if h == nil { - return nil - } - - return &QFontMetrics{h: (*C.QFontMetrics)(h)} + return newQFontMetrics((*C.QFontMetrics)(h)) } // NewQFontMetrics constructs a new QFontMetrics object. func NewQFontMetrics(param1 *QFont) *QFontMetrics { - var outptr_QFontMetrics *C.QFontMetrics = nil - C.QFontMetrics_new(param1.cPointer(), &outptr_QFontMetrics) - ret := newQFontMetrics(outptr_QFontMetrics) + ret := newQFontMetrics(C.QFontMetrics_new(param1.cPointer())) ret.isSubclass = true return ret } // NewQFontMetrics2 constructs a new QFontMetrics object. func NewQFontMetrics2(font *QFont, pd *QPaintDevice) *QFontMetrics { - var outptr_QFontMetrics *C.QFontMetrics = nil - C.QFontMetrics_new2(font.cPointer(), pd.cPointer(), &outptr_QFontMetrics) - ret := newQFontMetrics(outptr_QFontMetrics) + ret := newQFontMetrics(C.QFontMetrics_new2(font.cPointer(), pd.cPointer())) ret.isSubclass = true return ret } // NewQFontMetrics3 constructs a new QFontMetrics object. func NewQFontMetrics3(param1 *QFontMetrics) *QFontMetrics { - var outptr_QFontMetrics *C.QFontMetrics = nil - C.QFontMetrics_new3(param1.cPointer(), &outptr_QFontMetrics) - ret := newQFontMetrics(outptr_QFontMetrics) + ret := newQFontMetrics(C.QFontMetrics_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -399,54 +390,43 @@ func newQFontMetricsF(h *C.QFontMetricsF) *QFontMetricsF { if h == nil { return nil } + return &QFontMetricsF{h: h} } // UnsafeNewQFontMetricsF constructs the type using only unsafe pointers. func UnsafeNewQFontMetricsF(h unsafe.Pointer) *QFontMetricsF { - if h == nil { - return nil - } - - return &QFontMetricsF{h: (*C.QFontMetricsF)(h)} + return newQFontMetricsF((*C.QFontMetricsF)(h)) } // NewQFontMetricsF constructs a new QFontMetricsF object. func NewQFontMetricsF(font *QFont) *QFontMetricsF { - var outptr_QFontMetricsF *C.QFontMetricsF = nil - C.QFontMetricsF_new(font.cPointer(), &outptr_QFontMetricsF) - ret := newQFontMetricsF(outptr_QFontMetricsF) + ret := newQFontMetricsF(C.QFontMetricsF_new(font.cPointer())) ret.isSubclass = true return ret } // NewQFontMetricsF2 constructs a new QFontMetricsF object. func NewQFontMetricsF2(font *QFont, pd *QPaintDevice) *QFontMetricsF { - var outptr_QFontMetricsF *C.QFontMetricsF = nil - C.QFontMetricsF_new2(font.cPointer(), pd.cPointer(), &outptr_QFontMetricsF) - ret := newQFontMetricsF(outptr_QFontMetricsF) + ret := newQFontMetricsF(C.QFontMetricsF_new2(font.cPointer(), pd.cPointer())) ret.isSubclass = true return ret } // NewQFontMetricsF3 constructs a new QFontMetricsF object. func NewQFontMetricsF3(param1 *QFontMetrics) *QFontMetricsF { - var outptr_QFontMetricsF *C.QFontMetricsF = nil - C.QFontMetricsF_new3(param1.cPointer(), &outptr_QFontMetricsF) - ret := newQFontMetricsF(outptr_QFontMetricsF) + ret := newQFontMetricsF(C.QFontMetricsF_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQFontMetricsF4 constructs a new QFontMetricsF object. func NewQFontMetricsF4(param1 *QFontMetricsF) *QFontMetricsF { - var outptr_QFontMetricsF *C.QFontMetricsF = nil - C.QFontMetricsF_new4(param1.cPointer(), &outptr_QFontMetricsF) - ret := newQFontMetricsF(outptr_QFontMetricsF) + ret := newQFontMetricsF(C.QFontMetricsF_new4(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qfontmetrics.h b/qt6/gen_qfontmetrics.h index 8afd1768..d0034f16 100644 --- a/qt6/gen_qfontmetrics.h +++ b/qt6/gen_qfontmetrics.h @@ -38,9 +38,9 @@ typedef struct QSizeF QSizeF; typedef struct QTextOption QTextOption; #endif -void QFontMetrics_new(QFont* param1, QFontMetrics** outptr_QFontMetrics); -void QFontMetrics_new2(QFont* font, QPaintDevice* pd, QFontMetrics** outptr_QFontMetrics); -void QFontMetrics_new3(QFontMetrics* param1, QFontMetrics** outptr_QFontMetrics); +QFontMetrics* QFontMetrics_new(QFont* param1); +QFontMetrics* QFontMetrics_new2(QFont* font, QPaintDevice* pd); +QFontMetrics* QFontMetrics_new3(QFontMetrics* param1); void QFontMetrics_OperatorAssign(QFontMetrics* self, QFontMetrics* param1); void QFontMetrics_Swap(QFontMetrics* self, QFontMetrics* other); int QFontMetrics_Ascent(const QFontMetrics* self); @@ -87,10 +87,10 @@ QSize* QFontMetrics_Size4(const QFontMetrics* self, int flags, struct miqt_strin struct miqt_string QFontMetrics_ElidedText4(const QFontMetrics* self, struct miqt_string text, int mode, int width, int flags); void QFontMetrics_Delete(QFontMetrics* self, bool isSubclass); -void QFontMetricsF_new(QFont* font, QFontMetricsF** outptr_QFontMetricsF); -void QFontMetricsF_new2(QFont* font, QPaintDevice* pd, QFontMetricsF** outptr_QFontMetricsF); -void QFontMetricsF_new3(QFontMetrics* param1, QFontMetricsF** outptr_QFontMetricsF); -void QFontMetricsF_new4(QFontMetricsF* param1, QFontMetricsF** outptr_QFontMetricsF); +QFontMetricsF* QFontMetricsF_new(QFont* font); +QFontMetricsF* QFontMetricsF_new2(QFont* font, QPaintDevice* pd); +QFontMetricsF* QFontMetricsF_new3(QFontMetrics* param1); +QFontMetricsF* QFontMetricsF_new4(QFontMetricsF* param1); void QFontMetricsF_OperatorAssign(QFontMetricsF* self, QFontMetricsF* param1); void QFontMetricsF_OperatorAssignWithQFontMetrics(QFontMetricsF* self, QFontMetrics* param1); void QFontMetricsF_Swap(QFontMetricsF* self, QFontMetricsF* other); diff --git a/qt6/gen_qformlayout.cpp b/qt6/gen_qformlayout.cpp index 1188a8db..86b3b7de 100644 --- a/qt6/gen_qformlayout.cpp +++ b/qt6/gen_qformlayout.cpp @@ -508,20 +508,16 @@ public: }; -void QFormLayout_new(QWidget* parent, QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQFormLayout* ret = new MiqtVirtualQFormLayout(parent); - *outptr_QFormLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QFormLayout* QFormLayout_new(QWidget* parent) { + return new MiqtVirtualQFormLayout(parent); } -void QFormLayout_new2(QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQFormLayout* ret = new MiqtVirtualQFormLayout(); - *outptr_QFormLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QFormLayout* QFormLayout_new2() { + return new MiqtVirtualQFormLayout(); +} + +void QFormLayout_virtbase(QFormLayout* src, QLayout** outptr_QLayout) { + *outptr_QLayout = static_cast(src); } QMetaObject* QFormLayout_MetaObject(const QFormLayout* self) { diff --git a/qt6/gen_qformlayout.go b/qt6/gen_qformlayout.go index 12d1994d..c0286142 100644 --- a/qt6/gen_qformlayout.go +++ b/qt6/gen_qformlayout.go @@ -59,46 +59,34 @@ func (this *QFormLayout) UnsafePointer() unsafe.Pointer { } // newQFormLayout constructs the type using only CGO pointers. -func newQFormLayout(h *C.QFormLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QFormLayout { +func newQFormLayout(h *C.QFormLayout) *QFormLayout { if h == nil { return nil } + var outptr_QLayout *C.QLayout = nil + C.QFormLayout_virtbase(h, &outptr_QLayout) + return &QFormLayout{h: h, - QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} + QLayout: newQLayout(outptr_QLayout)} } // UnsafeNewQFormLayout constructs the type using only unsafe pointers. -func UnsafeNewQFormLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QFormLayout { - if h == nil { - return nil - } - - return &QFormLayout{h: (*C.QFormLayout)(h), - QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} +func UnsafeNewQFormLayout(h unsafe.Pointer) *QFormLayout { + return newQFormLayout((*C.QFormLayout)(h)) } // NewQFormLayout constructs a new QFormLayout object. func NewQFormLayout(parent *QWidget) *QFormLayout { - var outptr_QFormLayout *C.QFormLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QFormLayout_new(parent.cPointer(), &outptr_QFormLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQFormLayout(outptr_QFormLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQFormLayout(C.QFormLayout_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQFormLayout2 constructs a new QFormLayout object. func NewQFormLayout2() *QFormLayout { - var outptr_QFormLayout *C.QFormLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QFormLayout_new2(&outptr_QFormLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQFormLayout(outptr_QFormLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQFormLayout(C.QFormLayout_new2()) ret.isSubclass = true return ret } @@ -313,11 +301,11 @@ func (this *QFormLayout) ItemAt(row int, role QFormLayout__ItemRole) *QLayoutIte } func (this *QFormLayout) LabelForField(field *QWidget) *QWidget { - return newQWidget(C.QFormLayout_LabelForField(this.h, field.cPointer()), nil, nil) + return newQWidget(C.QFormLayout_LabelForField(this.h, field.cPointer())) } func (this *QFormLayout) LabelForFieldWithField(field *QLayout) *QWidget { - return newQWidget(C.QFormLayout_LabelForFieldWithField(this.h, field.cPointer()), nil, nil) + return newQWidget(C.QFormLayout_LabelForFieldWithField(this.h, field.cPointer())) } func (this *QFormLayout) AddItem(item *QLayoutItem) { @@ -807,7 +795,7 @@ func miqt_exec_callback_QFormLayout_IndexOf(self *C.QFormLayout, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(param1, nil, nil) + slotval1 := newQWidget(param1) virtualReturn := gofunc((&QFormLayout{h: self}).callVirtualBase_IndexOf, slotval1) @@ -885,9 +873,9 @@ func miqt_exec_callback_QFormLayout_ReplaceWidget(self *C.QFormLayout, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(from, nil, nil) + slotval1 := newQWidget(from) - slotval2 := newQWidget(to, nil, nil) + slotval2 := newQWidget(to) slotval3 := (FindChildOption)(options) @@ -899,7 +887,7 @@ func miqt_exec_callback_QFormLayout_ReplaceWidget(self *C.QFormLayout, cb C.intp func (this *QFormLayout) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QFormLayout_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QFormLayout_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QFormLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -942,7 +930,7 @@ func miqt_exec_callback_QFormLayout_ChildEvent(self *C.QFormLayout, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(e, nil) + slotval1 := newQChildEvent(e) gofunc((&QFormLayout{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -986,16 +974,13 @@ func newQFormLayout__TakeRowResult(h *C.QFormLayout__TakeRowResult) *QFormLayout if h == nil { return nil } + return &QFormLayout__TakeRowResult{h: h} } // UnsafeNewQFormLayout__TakeRowResult constructs the type using only unsafe pointers. func UnsafeNewQFormLayout__TakeRowResult(h unsafe.Pointer) *QFormLayout__TakeRowResult { - if h == nil { - return nil - } - - return &QFormLayout__TakeRowResult{h: (*C.QFormLayout__TakeRowResult)(h)} + return newQFormLayout__TakeRowResult((*C.QFormLayout__TakeRowResult)(h)) } // Delete this object from C++ memory. diff --git a/qt6/gen_qformlayout.h b/qt6/gen_qformlayout.h index 61315492..6bfdbc85 100644 --- a/qt6/gen_qformlayout.h +++ b/qt6/gen_qformlayout.h @@ -42,8 +42,9 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QFormLayout_new(QWidget* parent, QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QFormLayout_new2(QFormLayout** outptr_QFormLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +QFormLayout* QFormLayout_new(QWidget* parent); +QFormLayout* QFormLayout_new2(); +void QFormLayout_virtbase(QFormLayout* src, QLayout** outptr_QLayout); QMetaObject* QFormLayout_MetaObject(const QFormLayout* self); void* QFormLayout_Metacast(QFormLayout* self, const char* param1); struct miqt_string QFormLayout_Tr(const char* s); diff --git a/qt6/gen_qframe.cpp b/qt6/gen_qframe.cpp index 22d5b99e..5cc5bee3 100644 --- a/qt6/gen_qframe.cpp +++ b/qt6/gen_qframe.cpp @@ -1049,28 +1049,20 @@ public: }; -void QFrame_new(QWidget* parent, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFrame* ret = new MiqtVirtualQFrame(parent); - *outptr_QFrame = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFrame* QFrame_new(QWidget* parent) { + return new MiqtVirtualQFrame(parent); } -void QFrame_new2(QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFrame* ret = new MiqtVirtualQFrame(); - *outptr_QFrame = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFrame* QFrame_new2() { + return new MiqtVirtualQFrame(); } -void QFrame_new3(QWidget* parent, int f, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQFrame* ret = new MiqtVirtualQFrame(parent, static_cast(f)); - *outptr_QFrame = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QFrame* QFrame_new3(QWidget* parent, int f) { + return new MiqtVirtualQFrame(parent, static_cast(f)); +} + +void QFrame_virtbase(QFrame* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QFrame_MetaObject(const QFrame* self) { diff --git a/qt6/gen_qframe.go b/qt6/gen_qframe.go index eec21f61..7daa1b06 100644 --- a/qt6/gen_qframe.go +++ b/qt6/gen_qframe.go @@ -62,59 +62,42 @@ func (this *QFrame) UnsafePointer() unsafe.Pointer { } // newQFrame constructs the type using only CGO pointers. -func newQFrame(h *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QFrame { +func newQFrame(h *C.QFrame) *QFrame { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QFrame_virtbase(h, &outptr_QWidget) + return &QFrame{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQFrame constructs the type using only unsafe pointers. -func UnsafeNewQFrame(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QFrame { - if h == nil { - return nil - } - - return &QFrame{h: (*C.QFrame)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQFrame(h unsafe.Pointer) *QFrame { + return newQFrame((*C.QFrame)(h)) } // NewQFrame constructs a new QFrame object. func NewQFrame(parent *QWidget) *QFrame { - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFrame_new(parent.cPointer(), &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFrame(outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFrame(C.QFrame_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQFrame2 constructs a new QFrame object. func NewQFrame2() *QFrame { - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFrame_new2(&outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFrame(outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFrame(C.QFrame_new2()) ret.isSubclass = true return ret } // NewQFrame3 constructs a new QFrame object. func NewQFrame3(parent *QWidget, f WindowType) *QFrame { - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QFrame_new3(parent.cPointer(), (C.int)(f), &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQFrame(outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQFrame(C.QFrame_new3(parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -295,7 +278,7 @@ func miqt_exec_callback_QFrame_PaintEvent(self *C.QFrame, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QFrame{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -347,7 +330,7 @@ func miqt_exec_callback_QFrame_InitStyleOption(self *C.QFrame, cb C.intptr_t, op } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionFrame(option, nil) + slotval1 := newQStyleOptionFrame(option) gofunc((&QFrame{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -529,7 +512,7 @@ func miqt_exec_callback_QFrame_MousePressEvent(self *C.QFrame, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -555,7 +538,7 @@ func miqt_exec_callback_QFrame_MouseReleaseEvent(self *C.QFrame, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -581,7 +564,7 @@ func miqt_exec_callback_QFrame_MouseDoubleClickEvent(self *C.QFrame, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -607,7 +590,7 @@ func miqt_exec_callback_QFrame_MouseMoveEvent(self *C.QFrame, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -633,7 +616,7 @@ func miqt_exec_callback_QFrame_WheelEvent(self *C.QFrame, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -659,7 +642,7 @@ func miqt_exec_callback_QFrame_KeyPressEvent(self *C.QFrame, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -685,7 +668,7 @@ func miqt_exec_callback_QFrame_KeyReleaseEvent(self *C.QFrame, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -711,7 +694,7 @@ func miqt_exec_callback_QFrame_FocusInEvent(self *C.QFrame, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -737,7 +720,7 @@ func miqt_exec_callback_QFrame_FocusOutEvent(self *C.QFrame, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -763,7 +746,7 @@ func miqt_exec_callback_QFrame_EnterEvent(self *C.QFrame, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -815,7 +798,7 @@ func miqt_exec_callback_QFrame_MoveEvent(self *C.QFrame, cb C.intptr_t, event *C } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -841,7 +824,7 @@ func miqt_exec_callback_QFrame_ResizeEvent(self *C.QFrame, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -867,7 +850,7 @@ func miqt_exec_callback_QFrame_CloseEvent(self *C.QFrame, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -893,7 +876,7 @@ func miqt_exec_callback_QFrame_ContextMenuEvent(self *C.QFrame, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -919,7 +902,7 @@ func miqt_exec_callback_QFrame_TabletEvent(self *C.QFrame, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -945,7 +928,7 @@ func miqt_exec_callback_QFrame_ActionEvent(self *C.QFrame, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -971,7 +954,7 @@ func miqt_exec_callback_QFrame_DragEnterEvent(self *C.QFrame, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -997,7 +980,7 @@ func miqt_exec_callback_QFrame_DragMoveEvent(self *C.QFrame, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1023,7 +1006,7 @@ func miqt_exec_callback_QFrame_DragLeaveEvent(self *C.QFrame, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1049,7 +1032,7 @@ func miqt_exec_callback_QFrame_DropEvent(self *C.QFrame, cb C.intptr_t, event *C } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1075,7 +1058,7 @@ func miqt_exec_callback_QFrame_ShowEvent(self *C.QFrame, cb C.intptr_t, event *C } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1101,7 +1084,7 @@ func miqt_exec_callback_QFrame_HideEvent(self *C.QFrame, cb C.intptr_t, event *C } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QFrame{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1271,7 +1254,7 @@ func miqt_exec_callback_QFrame_InputMethodEvent(self *C.QFrame, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QFrame{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qframe.h b/qt6/gen_qframe.h index 298571e8..198d4777 100644 --- a/qt6/gen_qframe.h +++ b/qt6/gen_qframe.h @@ -82,9 +82,10 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QFrame_new(QWidget* parent, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFrame_new2(QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QFrame_new3(QWidget* parent, int f, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QFrame* QFrame_new(QWidget* parent); +QFrame* QFrame_new2(); +QFrame* QFrame_new3(QWidget* parent, int f); +void QFrame_virtbase(QFrame* src, QWidget** outptr_QWidget); QMetaObject* QFrame_MetaObject(const QFrame* self); void* QFrame_Metacast(QFrame* self, const char* param1); struct miqt_string QFrame_Tr(const char* s); diff --git a/qt6/gen_qfutureinterface.cpp b/qt6/gen_qfutureinterface.cpp index 0df944ea..50432bee 100644 --- a/qt6/gen_qfutureinterface.cpp +++ b/qt6/gen_qfutureinterface.cpp @@ -9,19 +9,16 @@ #include "gen_qfutureinterface.h" #include "_cgo_export.h" -void QFutureInterfaceBase_new(QFutureInterfaceBase** outptr_QFutureInterfaceBase) { - QFutureInterfaceBase* ret = new QFutureInterfaceBase(); - *outptr_QFutureInterfaceBase = ret; +QFutureInterfaceBase* QFutureInterfaceBase_new() { + return new QFutureInterfaceBase(); } -void QFutureInterfaceBase_new2(QFutureInterfaceBase* other, QFutureInterfaceBase** outptr_QFutureInterfaceBase) { - QFutureInterfaceBase* ret = new QFutureInterfaceBase(*other); - *outptr_QFutureInterfaceBase = ret; +QFutureInterfaceBase* QFutureInterfaceBase_new2(QFutureInterfaceBase* other) { + return new QFutureInterfaceBase(*other); } -void QFutureInterfaceBase_new3(int initialState, QFutureInterfaceBase** outptr_QFutureInterfaceBase) { - QFutureInterfaceBase* ret = new QFutureInterfaceBase(static_cast(initialState)); - *outptr_QFutureInterfaceBase = ret; +QFutureInterfaceBase* QFutureInterfaceBase_new3(int initialState) { + return new QFutureInterfaceBase(static_cast(initialState)); } void QFutureInterfaceBase_OperatorAssign(QFutureInterfaceBase* self, QFutureInterfaceBase* other) { diff --git a/qt6/gen_qfutureinterface.go b/qt6/gen_qfutureinterface.go index 759d1d28..38e517d3 100644 --- a/qt6/gen_qfutureinterface.go +++ b/qt6/gen_qfutureinterface.go @@ -58,44 +58,35 @@ func newQFutureInterfaceBase(h *C.QFutureInterfaceBase) *QFutureInterfaceBase { if h == nil { return nil } + return &QFutureInterfaceBase{h: h} } // UnsafeNewQFutureInterfaceBase constructs the type using only unsafe pointers. func UnsafeNewQFutureInterfaceBase(h unsafe.Pointer) *QFutureInterfaceBase { - if h == nil { - return nil - } - - return &QFutureInterfaceBase{h: (*C.QFutureInterfaceBase)(h)} + return newQFutureInterfaceBase((*C.QFutureInterfaceBase)(h)) } // NewQFutureInterfaceBase constructs a new QFutureInterfaceBase object. func NewQFutureInterfaceBase() *QFutureInterfaceBase { - var outptr_QFutureInterfaceBase *C.QFutureInterfaceBase = nil - C.QFutureInterfaceBase_new(&outptr_QFutureInterfaceBase) - ret := newQFutureInterfaceBase(outptr_QFutureInterfaceBase) + ret := newQFutureInterfaceBase(C.QFutureInterfaceBase_new()) ret.isSubclass = true return ret } // NewQFutureInterfaceBase2 constructs a new QFutureInterfaceBase object. func NewQFutureInterfaceBase2(other *QFutureInterfaceBase) *QFutureInterfaceBase { - var outptr_QFutureInterfaceBase *C.QFutureInterfaceBase = nil - C.QFutureInterfaceBase_new2(other.cPointer(), &outptr_QFutureInterfaceBase) - ret := newQFutureInterfaceBase(outptr_QFutureInterfaceBase) + ret := newQFutureInterfaceBase(C.QFutureInterfaceBase_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQFutureInterfaceBase3 constructs a new QFutureInterfaceBase object. func NewQFutureInterfaceBase3(initialState QFutureInterfaceBase__State) *QFutureInterfaceBase { - var outptr_QFutureInterfaceBase *C.QFutureInterfaceBase = nil - C.QFutureInterfaceBase_new3((C.int)(initialState), &outptr_QFutureInterfaceBase) - ret := newQFutureInterfaceBase(outptr_QFutureInterfaceBase) + ret := newQFutureInterfaceBase(C.QFutureInterfaceBase_new3((C.int)(initialState))) ret.isSubclass = true return ret } @@ -129,7 +120,7 @@ func (this *QFutureInterfaceBase) SetThreadPool(pool *QThreadPool) { } func (this *QFutureInterfaceBase) ThreadPool() *QThreadPool { - return newQThreadPool(C.QFutureInterfaceBase_ThreadPool(this.h), nil) + return newQThreadPool(C.QFutureInterfaceBase_ThreadPool(this.h)) } func (this *QFutureInterfaceBase) SetFilterMode(enable bool) { @@ -288,7 +279,7 @@ func (this *QFutureInterfaceBase) SuspendIfRequested() { } func (this *QFutureInterfaceBase) Mutex() *QMutex { - return newQMutex(C.QFutureInterfaceBase_Mutex(this.h), nil) + return newQMutex(C.QFutureInterfaceBase_Mutex(this.h)) } func (this *QFutureInterfaceBase) HasException() bool { diff --git a/qt6/gen_qfutureinterface.h b/qt6/gen_qfutureinterface.h index ae8d425a..dd3c3062 100644 --- a/qt6/gen_qfutureinterface.h +++ b/qt6/gen_qfutureinterface.h @@ -26,9 +26,9 @@ typedef struct QRunnable QRunnable; typedef struct QThreadPool QThreadPool; #endif -void QFutureInterfaceBase_new(QFutureInterfaceBase** outptr_QFutureInterfaceBase); -void QFutureInterfaceBase_new2(QFutureInterfaceBase* other, QFutureInterfaceBase** outptr_QFutureInterfaceBase); -void QFutureInterfaceBase_new3(int initialState, QFutureInterfaceBase** outptr_QFutureInterfaceBase); +QFutureInterfaceBase* QFutureInterfaceBase_new(); +QFutureInterfaceBase* QFutureInterfaceBase_new2(QFutureInterfaceBase* other); +QFutureInterfaceBase* QFutureInterfaceBase_new3(int initialState); void QFutureInterfaceBase_OperatorAssign(QFutureInterfaceBase* self, QFutureInterfaceBase* other); void QFutureInterfaceBase_ReportStarted(QFutureInterfaceBase* self); void QFutureInterfaceBase_ReportFinished(QFutureInterfaceBase* self); diff --git a/qt6/gen_qfuturewatcher.cpp b/qt6/gen_qfuturewatcher.cpp index 28ffe774..25548582 100644 --- a/qt6/gen_qfuturewatcher.cpp +++ b/qt6/gen_qfuturewatcher.cpp @@ -10,6 +10,10 @@ #include "gen_qfuturewatcher.h" #include "_cgo_export.h" +void QFutureWatcherBase_virtbase(QFutureWatcherBase* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QFutureWatcherBase_MetaObject(const QFutureWatcherBase* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/gen_qfuturewatcher.go b/qt6/gen_qfuturewatcher.go index 02bcb187..326a8862 100644 --- a/qt6/gen_qfuturewatcher.go +++ b/qt6/gen_qfuturewatcher.go @@ -35,22 +35,20 @@ func (this *QFutureWatcherBase) UnsafePointer() unsafe.Pointer { } // newQFutureWatcherBase constructs the type using only CGO pointers. -func newQFutureWatcherBase(h *C.QFutureWatcherBase, h_QObject *C.QObject) *QFutureWatcherBase { +func newQFutureWatcherBase(h *C.QFutureWatcherBase) *QFutureWatcherBase { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QFutureWatcherBase_virtbase(h, &outptr_QObject) + return &QFutureWatcherBase{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQFutureWatcherBase constructs the type using only unsafe pointers. -func UnsafeNewQFutureWatcherBase(h unsafe.Pointer, h_QObject unsafe.Pointer) *QFutureWatcherBase { - if h == nil { - return nil - } - - return &QFutureWatcherBase{h: (*C.QFutureWatcherBase)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQFutureWatcherBase(h unsafe.Pointer) *QFutureWatcherBase { + return newQFutureWatcherBase((*C.QFutureWatcherBase)(h)) } func (this *QFutureWatcherBase) MetaObject() *QMetaObject { diff --git a/qt6/gen_qfuturewatcher.h b/qt6/gen_qfuturewatcher.h index deacf871..0d3890ed 100644 --- a/qt6/gen_qfuturewatcher.h +++ b/qt6/gen_qfuturewatcher.h @@ -28,6 +28,7 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif +void QFutureWatcherBase_virtbase(QFutureWatcherBase* src, QObject** outptr_QObject); QMetaObject* QFutureWatcherBase_MetaObject(const QFutureWatcherBase* self); void* QFutureWatcherBase_Metacast(QFutureWatcherBase* self, const char* param1); struct miqt_string QFutureWatcherBase_Tr(const char* s); diff --git a/qt6/gen_qgenericplugin.cpp b/qt6/gen_qgenericplugin.cpp index f371f628..ae8efb62 100644 --- a/qt6/gen_qgenericplugin.cpp +++ b/qt6/gen_qgenericplugin.cpp @@ -224,16 +224,16 @@ public: }; -void QGenericPlugin_new(QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject) { - MiqtVirtualQGenericPlugin* ret = new MiqtVirtualQGenericPlugin(); - *outptr_QGenericPlugin = ret; - *outptr_QObject = static_cast(ret); +QGenericPlugin* QGenericPlugin_new() { + return new MiqtVirtualQGenericPlugin(); } -void QGenericPlugin_new2(QObject* parent, QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject) { - MiqtVirtualQGenericPlugin* ret = new MiqtVirtualQGenericPlugin(parent); - *outptr_QGenericPlugin = ret; - *outptr_QObject = static_cast(ret); +QGenericPlugin* QGenericPlugin_new2(QObject* parent) { + return new MiqtVirtualQGenericPlugin(parent); +} + +void QGenericPlugin_virtbase(QGenericPlugin* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QGenericPlugin_MetaObject(const QGenericPlugin* self) { diff --git a/qt6/gen_qgenericplugin.go b/qt6/gen_qgenericplugin.go index 5270bd3d..e42abdb7 100644 --- a/qt6/gen_qgenericplugin.go +++ b/qt6/gen_qgenericplugin.go @@ -35,42 +35,34 @@ func (this *QGenericPlugin) UnsafePointer() unsafe.Pointer { } // newQGenericPlugin constructs the type using only CGO pointers. -func newQGenericPlugin(h *C.QGenericPlugin, h_QObject *C.QObject) *QGenericPlugin { +func newQGenericPlugin(h *C.QGenericPlugin) *QGenericPlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QGenericPlugin_virtbase(h, &outptr_QObject) + return &QGenericPlugin{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQGenericPlugin constructs the type using only unsafe pointers. -func UnsafeNewQGenericPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGenericPlugin { - if h == nil { - return nil - } - - return &QGenericPlugin{h: (*C.QGenericPlugin)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQGenericPlugin(h unsafe.Pointer) *QGenericPlugin { + return newQGenericPlugin((*C.QGenericPlugin)(h)) } // NewQGenericPlugin constructs a new QGenericPlugin object. func NewQGenericPlugin() *QGenericPlugin { - var outptr_QGenericPlugin *C.QGenericPlugin = nil - var outptr_QObject *C.QObject = nil - C.QGenericPlugin_new(&outptr_QGenericPlugin, &outptr_QObject) - ret := newQGenericPlugin(outptr_QGenericPlugin, outptr_QObject) + ret := newQGenericPlugin(C.QGenericPlugin_new()) ret.isSubclass = true return ret } // NewQGenericPlugin2 constructs a new QGenericPlugin object. func NewQGenericPlugin2(parent *QObject) *QGenericPlugin { - var outptr_QGenericPlugin *C.QGenericPlugin = nil - var outptr_QObject *C.QObject = nil - C.QGenericPlugin_new2(parent.cPointer(), &outptr_QGenericPlugin, &outptr_QObject) - ret := newQGenericPlugin(outptr_QGenericPlugin, outptr_QObject) + ret := newQGenericPlugin(C.QGenericPlugin_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -235,7 +227,7 @@ func miqt_exec_callback_QGenericPlugin_TimerEvent(self *C.QGenericPlugin, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QGenericPlugin{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -261,7 +253,7 @@ func miqt_exec_callback_QGenericPlugin_ChildEvent(self *C.QGenericPlugin, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGenericPlugin{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qgenericplugin.h b/qt6/gen_qgenericplugin.h index adac9697..18ec3afe 100644 --- a/qt6/gen_qgenericplugin.h +++ b/qt6/gen_qgenericplugin.h @@ -32,8 +32,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QGenericPlugin_new(QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject); -void QGenericPlugin_new2(QObject* parent, QGenericPlugin** outptr_QGenericPlugin, QObject** outptr_QObject); +QGenericPlugin* QGenericPlugin_new(); +QGenericPlugin* QGenericPlugin_new2(QObject* parent); +void QGenericPlugin_virtbase(QGenericPlugin* src, QObject** outptr_QObject); QMetaObject* QGenericPlugin_MetaObject(const QGenericPlugin* self); void* QGenericPlugin_Metacast(QGenericPlugin* self, const char* param1); struct miqt_string QGenericPlugin_Tr(const char* s); diff --git a/qt6/gen_qgenericpluginfactory.go b/qt6/gen_qgenericpluginfactory.go index 7667a5ac..9e57ca44 100644 --- a/qt6/gen_qgenericpluginfactory.go +++ b/qt6/gen_qgenericpluginfactory.go @@ -37,16 +37,13 @@ func newQGenericPluginFactory(h *C.QGenericPluginFactory) *QGenericPluginFactory if h == nil { return nil } + return &QGenericPluginFactory{h: h} } // UnsafeNewQGenericPluginFactory constructs the type using only unsafe pointers. func UnsafeNewQGenericPluginFactory(h unsafe.Pointer) *QGenericPluginFactory { - if h == nil { - return nil - } - - return &QGenericPluginFactory{h: (*C.QGenericPluginFactory)(h)} + return newQGenericPluginFactory((*C.QGenericPluginFactory)(h)) } func QGenericPluginFactory_Keys() []string { diff --git a/qt6/gen_qgesture.cpp b/qt6/gen_qgesture.cpp index 94ee8229..2f655480 100644 --- a/qt6/gen_qgesture.cpp +++ b/qt6/gen_qgesture.cpp @@ -202,16 +202,16 @@ public: }; -void QGesture_new(QGesture** outptr_QGesture, QObject** outptr_QObject) { - MiqtVirtualQGesture* ret = new MiqtVirtualQGesture(); - *outptr_QGesture = ret; - *outptr_QObject = static_cast(ret); +QGesture* QGesture_new() { + return new MiqtVirtualQGesture(); } -void QGesture_new2(QObject* parent, QGesture** outptr_QGesture, QObject** outptr_QObject) { - MiqtVirtualQGesture* ret = new MiqtVirtualQGesture(parent); - *outptr_QGesture = ret; - *outptr_QObject = static_cast(ret); +QGesture* QGesture_new2(QObject* parent) { + return new MiqtVirtualQGesture(parent); +} + +void QGesture_virtbase(QGesture* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QGesture_MetaObject(const QGesture* self) { @@ -354,18 +354,16 @@ void QGesture_Delete(QGesture* self, bool isSubclass) { } } -void QPanGesture_new(QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QPanGesture* ret = new QPanGesture(); - *outptr_QPanGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPanGesture* QPanGesture_new() { + return new QPanGesture(); } -void QPanGesture_new2(QObject* parent, QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QPanGesture* ret = new QPanGesture(parent); - *outptr_QPanGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPanGesture* QPanGesture_new2(QObject* parent) { + return new QPanGesture(parent); +} + +void QPanGesture_virtbase(QPanGesture* src, QGesture** outptr_QGesture) { + *outptr_QGesture = static_cast(src); } QMetaObject* QPanGesture_MetaObject(const QPanGesture* self) { @@ -446,18 +444,16 @@ void QPanGesture_Delete(QPanGesture* self, bool isSubclass) { } } -void QPinchGesture_new(QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QPinchGesture* ret = new QPinchGesture(); - *outptr_QPinchGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPinchGesture* QPinchGesture_new() { + return new QPinchGesture(); } -void QPinchGesture_new2(QObject* parent, QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QPinchGesture* ret = new QPinchGesture(parent); - *outptr_QPinchGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPinchGesture* QPinchGesture_new2(QObject* parent) { + return new QPinchGesture(parent); +} + +void QPinchGesture_virtbase(QPinchGesture* src, QGesture** outptr_QGesture) { + *outptr_QGesture = static_cast(src); } QMetaObject* QPinchGesture_MetaObject(const QPinchGesture* self) { @@ -605,18 +601,16 @@ void QPinchGesture_Delete(QPinchGesture* self, bool isSubclass) { } } -void QSwipeGesture_new(QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QSwipeGesture* ret = new QSwipeGesture(); - *outptr_QSwipeGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSwipeGesture* QSwipeGesture_new() { + return new QSwipeGesture(); } -void QSwipeGesture_new2(QObject* parent, QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QSwipeGesture* ret = new QSwipeGesture(parent); - *outptr_QSwipeGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSwipeGesture* QSwipeGesture_new2(QObject* parent) { + return new QSwipeGesture(parent); +} + +void QSwipeGesture_virtbase(QSwipeGesture* src, QGesture** outptr_QGesture) { + *outptr_QGesture = static_cast(src); } QMetaObject* QSwipeGesture_MetaObject(const QSwipeGesture* self) { @@ -687,18 +681,16 @@ void QSwipeGesture_Delete(QSwipeGesture* self, bool isSubclass) { } } -void QTapGesture_new(QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QTapGesture* ret = new QTapGesture(); - *outptr_QTapGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTapGesture* QTapGesture_new() { + return new QTapGesture(); } -void QTapGesture_new2(QObject* parent, QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QTapGesture* ret = new QTapGesture(parent); - *outptr_QTapGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTapGesture* QTapGesture_new2(QObject* parent) { + return new QTapGesture(parent); +} + +void QTapGesture_virtbase(QTapGesture* src, QGesture** outptr_QGesture) { + *outptr_QGesture = static_cast(src); } QMetaObject* QTapGesture_MetaObject(const QTapGesture* self) { @@ -758,18 +750,16 @@ void QTapGesture_Delete(QTapGesture* self, bool isSubclass) { } } -void QTapAndHoldGesture_new(QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QTapAndHoldGesture* ret = new QTapAndHoldGesture(); - *outptr_QTapAndHoldGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTapAndHoldGesture* QTapAndHoldGesture_new() { + return new QTapAndHoldGesture(); } -void QTapAndHoldGesture_new2(QObject* parent, QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject) { - QTapAndHoldGesture* ret = new QTapAndHoldGesture(parent); - *outptr_QTapAndHoldGesture = ret; - *outptr_QGesture = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTapAndHoldGesture* QTapAndHoldGesture_new2(QObject* parent) { + return new QTapAndHoldGesture(parent); +} + +void QTapAndHoldGesture_virtbase(QTapAndHoldGesture* src, QGesture** outptr_QGesture) { + *outptr_QGesture = static_cast(src); } QMetaObject* QTapAndHoldGesture_MetaObject(const QTapAndHoldGesture* self) { @@ -893,22 +883,22 @@ public: }; -void QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent) { +QGestureEvent* QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures) { QList gestures_QList; gestures_QList.reserve(gestures.len); QGesture** gestures_arr = static_cast(gestures.data); for(size_t i = 0; i < gestures.len; ++i) { gestures_QList.push_back(gestures_arr[i]); } - MiqtVirtualQGestureEvent* ret = new MiqtVirtualQGestureEvent(gestures_QList); - *outptr_QGestureEvent = ret; - *outptr_QEvent = static_cast(ret); + return new MiqtVirtualQGestureEvent(gestures_QList); } -void QGestureEvent_new2(QGestureEvent* param1, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent) { - MiqtVirtualQGestureEvent* ret = new MiqtVirtualQGestureEvent(*param1); - *outptr_QGestureEvent = ret; - *outptr_QEvent = static_cast(ret); +QGestureEvent* QGestureEvent_new2(QGestureEvent* param1) { + return new MiqtVirtualQGestureEvent(*param1); +} + +void QGestureEvent_virtbase(QGestureEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } struct miqt_array /* of QGesture* */ QGestureEvent_Gestures(const QGestureEvent* self) { diff --git a/qt6/gen_qgesture.go b/qt6/gen_qgesture.go index 4dad61f7..7e4ee941 100644 --- a/qt6/gen_qgesture.go +++ b/qt6/gen_qgesture.go @@ -60,42 +60,34 @@ func (this *QGesture) UnsafePointer() unsafe.Pointer { } // newQGesture constructs the type using only CGO pointers. -func newQGesture(h *C.QGesture, h_QObject *C.QObject) *QGesture { +func newQGesture(h *C.QGesture) *QGesture { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QGesture_virtbase(h, &outptr_QObject) + return &QGesture{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQGesture constructs the type using only unsafe pointers. -func UnsafeNewQGesture(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGesture { - if h == nil { - return nil - } - - return &QGesture{h: (*C.QGesture)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQGesture(h unsafe.Pointer) *QGesture { + return newQGesture((*C.QGesture)(h)) } // NewQGesture constructs a new QGesture object. func NewQGesture() *QGesture { - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QGesture_new(&outptr_QGesture, &outptr_QObject) - ret := newQGesture(outptr_QGesture, outptr_QObject) + ret := newQGesture(C.QGesture_new()) ret.isSubclass = true return ret } // NewQGesture2 constructs a new QGesture object. func NewQGesture2(parent *QObject) *QGesture { - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QGesture_new2(parent.cPointer(), &outptr_QGesture, &outptr_QObject) - ret := newQGesture(outptr_QGesture, outptr_QObject) + ret := newQGesture(C.QGesture_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -253,7 +245,7 @@ func miqt_exec_callback_QGesture_TimerEvent(self *C.QGesture, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QGesture{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -279,7 +271,7 @@ func miqt_exec_callback_QGesture_ChildEvent(self *C.QGesture, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGesture{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -398,44 +390,34 @@ func (this *QPanGesture) UnsafePointer() unsafe.Pointer { } // newQPanGesture constructs the type using only CGO pointers. -func newQPanGesture(h *C.QPanGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QPanGesture { +func newQPanGesture(h *C.QPanGesture) *QPanGesture { if h == nil { return nil } + var outptr_QGesture *C.QGesture = nil + C.QPanGesture_virtbase(h, &outptr_QGesture) + return &QPanGesture{h: h, - QGesture: newQGesture(h_QGesture, h_QObject)} + QGesture: newQGesture(outptr_QGesture)} } // UnsafeNewQPanGesture constructs the type using only unsafe pointers. -func UnsafeNewQPanGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QPanGesture { - if h == nil { - return nil - } - - return &QPanGesture{h: (*C.QPanGesture)(h), - QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} +func UnsafeNewQPanGesture(h unsafe.Pointer) *QPanGesture { + return newQPanGesture((*C.QPanGesture)(h)) } // NewQPanGesture constructs a new QPanGesture object. func NewQPanGesture() *QPanGesture { - var outptr_QPanGesture *C.QPanGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QPanGesture_new(&outptr_QPanGesture, &outptr_QGesture, &outptr_QObject) - ret := newQPanGesture(outptr_QPanGesture, outptr_QGesture, outptr_QObject) + ret := newQPanGesture(C.QPanGesture_new()) ret.isSubclass = true return ret } // NewQPanGesture2 constructs a new QPanGesture object. func NewQPanGesture2(parent *QObject) *QPanGesture { - var outptr_QPanGesture *C.QPanGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QPanGesture_new2(parent.cPointer(), &outptr_QPanGesture, &outptr_QGesture, &outptr_QObject) - ret := newQPanGesture(outptr_QPanGesture, outptr_QGesture, outptr_QObject) + ret := newQPanGesture(C.QPanGesture_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -550,44 +532,34 @@ func (this *QPinchGesture) UnsafePointer() unsafe.Pointer { } // newQPinchGesture constructs the type using only CGO pointers. -func newQPinchGesture(h *C.QPinchGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QPinchGesture { +func newQPinchGesture(h *C.QPinchGesture) *QPinchGesture { if h == nil { return nil } + var outptr_QGesture *C.QGesture = nil + C.QPinchGesture_virtbase(h, &outptr_QGesture) + return &QPinchGesture{h: h, - QGesture: newQGesture(h_QGesture, h_QObject)} + QGesture: newQGesture(outptr_QGesture)} } // UnsafeNewQPinchGesture constructs the type using only unsafe pointers. -func UnsafeNewQPinchGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QPinchGesture { - if h == nil { - return nil - } - - return &QPinchGesture{h: (*C.QPinchGesture)(h), - QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} +func UnsafeNewQPinchGesture(h unsafe.Pointer) *QPinchGesture { + return newQPinchGesture((*C.QPinchGesture)(h)) } // NewQPinchGesture constructs a new QPinchGesture object. func NewQPinchGesture() *QPinchGesture { - var outptr_QPinchGesture *C.QPinchGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QPinchGesture_new(&outptr_QPinchGesture, &outptr_QGesture, &outptr_QObject) - ret := newQPinchGesture(outptr_QPinchGesture, outptr_QGesture, outptr_QObject) + ret := newQPinchGesture(C.QPinchGesture_new()) ret.isSubclass = true return ret } // NewQPinchGesture2 constructs a new QPinchGesture object. func NewQPinchGesture2(parent *QObject) *QPinchGesture { - var outptr_QPinchGesture *C.QPinchGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QPinchGesture_new2(parent.cPointer(), &outptr_QPinchGesture, &outptr_QGesture, &outptr_QObject) - ret := newQPinchGesture(outptr_QPinchGesture, outptr_QGesture, outptr_QObject) + ret := newQPinchGesture(C.QPinchGesture_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -762,44 +734,34 @@ func (this *QSwipeGesture) UnsafePointer() unsafe.Pointer { } // newQSwipeGesture constructs the type using only CGO pointers. -func newQSwipeGesture(h *C.QSwipeGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QSwipeGesture { +func newQSwipeGesture(h *C.QSwipeGesture) *QSwipeGesture { if h == nil { return nil } + var outptr_QGesture *C.QGesture = nil + C.QSwipeGesture_virtbase(h, &outptr_QGesture) + return &QSwipeGesture{h: h, - QGesture: newQGesture(h_QGesture, h_QObject)} + QGesture: newQGesture(outptr_QGesture)} } // UnsafeNewQSwipeGesture constructs the type using only unsafe pointers. -func UnsafeNewQSwipeGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QSwipeGesture { - if h == nil { - return nil - } - - return &QSwipeGesture{h: (*C.QSwipeGesture)(h), - QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} +func UnsafeNewQSwipeGesture(h unsafe.Pointer) *QSwipeGesture { + return newQSwipeGesture((*C.QSwipeGesture)(h)) } // NewQSwipeGesture constructs a new QSwipeGesture object. func NewQSwipeGesture() *QSwipeGesture { - var outptr_QSwipeGesture *C.QSwipeGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QSwipeGesture_new(&outptr_QSwipeGesture, &outptr_QGesture, &outptr_QObject) - ret := newQSwipeGesture(outptr_QSwipeGesture, outptr_QGesture, outptr_QObject) + ret := newQSwipeGesture(C.QSwipeGesture_new()) ret.isSubclass = true return ret } // NewQSwipeGesture2 constructs a new QSwipeGesture object. func NewQSwipeGesture2(parent *QObject) *QSwipeGesture { - var outptr_QSwipeGesture *C.QSwipeGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QSwipeGesture_new2(parent.cPointer(), &outptr_QSwipeGesture, &outptr_QGesture, &outptr_QObject) - ret := newQSwipeGesture(outptr_QSwipeGesture, outptr_QGesture, outptr_QObject) + ret := newQSwipeGesture(C.QSwipeGesture_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -896,44 +858,34 @@ func (this *QTapGesture) UnsafePointer() unsafe.Pointer { } // newQTapGesture constructs the type using only CGO pointers. -func newQTapGesture(h *C.QTapGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QTapGesture { +func newQTapGesture(h *C.QTapGesture) *QTapGesture { if h == nil { return nil } + var outptr_QGesture *C.QGesture = nil + C.QTapGesture_virtbase(h, &outptr_QGesture) + return &QTapGesture{h: h, - QGesture: newQGesture(h_QGesture, h_QObject)} + QGesture: newQGesture(outptr_QGesture)} } // UnsafeNewQTapGesture constructs the type using only unsafe pointers. -func UnsafeNewQTapGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QTapGesture { - if h == nil { - return nil - } - - return &QTapGesture{h: (*C.QTapGesture)(h), - QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} +func UnsafeNewQTapGesture(h unsafe.Pointer) *QTapGesture { + return newQTapGesture((*C.QTapGesture)(h)) } // NewQTapGesture constructs a new QTapGesture object. func NewQTapGesture() *QTapGesture { - var outptr_QTapGesture *C.QTapGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QTapGesture_new(&outptr_QTapGesture, &outptr_QGesture, &outptr_QObject) - ret := newQTapGesture(outptr_QTapGesture, outptr_QGesture, outptr_QObject) + ret := newQTapGesture(C.QTapGesture_new()) ret.isSubclass = true return ret } // NewQTapGesture2 constructs a new QTapGesture object. func NewQTapGesture2(parent *QObject) *QTapGesture { - var outptr_QTapGesture *C.QTapGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QTapGesture_new2(parent.cPointer(), &outptr_QTapGesture, &outptr_QGesture, &outptr_QObject) - ret := newQTapGesture(outptr_QTapGesture, outptr_QGesture, outptr_QObject) + ret := newQTapGesture(C.QTapGesture_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -1024,44 +976,34 @@ func (this *QTapAndHoldGesture) UnsafePointer() unsafe.Pointer { } // newQTapAndHoldGesture constructs the type using only CGO pointers. -func newQTapAndHoldGesture(h *C.QTapAndHoldGesture, h_QGesture *C.QGesture, h_QObject *C.QObject) *QTapAndHoldGesture { +func newQTapAndHoldGesture(h *C.QTapAndHoldGesture) *QTapAndHoldGesture { if h == nil { return nil } + var outptr_QGesture *C.QGesture = nil + C.QTapAndHoldGesture_virtbase(h, &outptr_QGesture) + return &QTapAndHoldGesture{h: h, - QGesture: newQGesture(h_QGesture, h_QObject)} + QGesture: newQGesture(outptr_QGesture)} } // UnsafeNewQTapAndHoldGesture constructs the type using only unsafe pointers. -func UnsafeNewQTapAndHoldGesture(h unsafe.Pointer, h_QGesture unsafe.Pointer, h_QObject unsafe.Pointer) *QTapAndHoldGesture { - if h == nil { - return nil - } - - return &QTapAndHoldGesture{h: (*C.QTapAndHoldGesture)(h), - QGesture: UnsafeNewQGesture(h_QGesture, h_QObject)} +func UnsafeNewQTapAndHoldGesture(h unsafe.Pointer) *QTapAndHoldGesture { + return newQTapAndHoldGesture((*C.QTapAndHoldGesture)(h)) } // NewQTapAndHoldGesture constructs a new QTapAndHoldGesture object. func NewQTapAndHoldGesture() *QTapAndHoldGesture { - var outptr_QTapAndHoldGesture *C.QTapAndHoldGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QTapAndHoldGesture_new(&outptr_QTapAndHoldGesture, &outptr_QGesture, &outptr_QObject) - ret := newQTapAndHoldGesture(outptr_QTapAndHoldGesture, outptr_QGesture, outptr_QObject) + ret := newQTapAndHoldGesture(C.QTapAndHoldGesture_new()) ret.isSubclass = true return ret } // NewQTapAndHoldGesture2 constructs a new QTapAndHoldGesture object. func NewQTapAndHoldGesture2(parent *QObject) *QTapAndHoldGesture { - var outptr_QTapAndHoldGesture *C.QTapAndHoldGesture = nil - var outptr_QGesture *C.QGesture = nil - var outptr_QObject *C.QObject = nil - C.QTapAndHoldGesture_new2(parent.cPointer(), &outptr_QTapAndHoldGesture, &outptr_QGesture, &outptr_QObject) - ret := newQTapAndHoldGesture(outptr_QTapAndHoldGesture, outptr_QGesture, outptr_QObject) + ret := newQTapAndHoldGesture(C.QTapAndHoldGesture_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -1160,22 +1102,20 @@ func (this *QGestureEvent) UnsafePointer() unsafe.Pointer { } // newQGestureEvent constructs the type using only CGO pointers. -func newQGestureEvent(h *C.QGestureEvent, h_QEvent *C.QEvent) *QGestureEvent { +func newQGestureEvent(h *C.QGestureEvent) *QGestureEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QGestureEvent_virtbase(h, &outptr_QEvent) + return &QGestureEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQGestureEvent constructs the type using only unsafe pointers. -func UnsafeNewQGestureEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QGestureEvent { - if h == nil { - return nil - } - - return &QGestureEvent{h: (*C.QGestureEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQGestureEvent(h unsafe.Pointer) *QGestureEvent { + return newQGestureEvent((*C.QGestureEvent)(h)) } // NewQGestureEvent constructs a new QGestureEvent object. @@ -1186,22 +1126,16 @@ func NewQGestureEvent(gestures []*QGesture) *QGestureEvent { gestures_CArray[i] = gestures[i].cPointer() } gestures_ma := C.struct_miqt_array{len: C.size_t(len(gestures)), data: unsafe.Pointer(gestures_CArray)} - var outptr_QGestureEvent *C.QGestureEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGestureEvent_new(gestures_ma, &outptr_QGestureEvent, &outptr_QEvent) - ret := newQGestureEvent(outptr_QGestureEvent, outptr_QEvent) + ret := newQGestureEvent(C.QGestureEvent_new(gestures_ma)) ret.isSubclass = true return ret } // NewQGestureEvent2 constructs a new QGestureEvent object. func NewQGestureEvent2(param1 *QGestureEvent) *QGestureEvent { - var outptr_QGestureEvent *C.QGestureEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGestureEvent_new2(param1.cPointer(), &outptr_QGestureEvent, &outptr_QEvent) - ret := newQGestureEvent(outptr_QGestureEvent, outptr_QEvent) + ret := newQGestureEvent(C.QGestureEvent_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1211,13 +1145,13 @@ func (this *QGestureEvent) Gestures() []*QGesture { _ret := make([]*QGesture, int(_ma.len)) _outCast := (*[0xffff]*C.QGesture)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQGesture(_outCast[i], nil) + _ret[i] = newQGesture(_outCast[i]) } return _ret } func (this *QGestureEvent) Gesture(typeVal GestureType) *QGesture { - return newQGesture(C.QGestureEvent_Gesture(this.h, (C.int)(typeVal)), nil) + return newQGesture(C.QGestureEvent_Gesture(this.h, (C.int)(typeVal))) } func (this *QGestureEvent) ActiveGestures() []*QGesture { @@ -1225,7 +1159,7 @@ func (this *QGestureEvent) ActiveGestures() []*QGesture { _ret := make([]*QGesture, int(_ma.len)) _outCast := (*[0xffff]*C.QGesture)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQGesture(_outCast[i], nil) + _ret[i] = newQGesture(_outCast[i]) } return _ret } @@ -1235,7 +1169,7 @@ func (this *QGestureEvent) CanceledGestures() []*QGesture { _ret := make([]*QGesture, int(_ma.len)) _outCast := (*[0xffff]*C.QGesture)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQGesture(_outCast[i], nil) + _ret[i] = newQGesture(_outCast[i]) } return _ret } @@ -1277,7 +1211,7 @@ func (this *QGestureEvent) SetWidget(widget *QWidget) { } func (this *QGestureEvent) Widget() *QWidget { - return newQWidget(C.QGestureEvent_Widget(this.h), nil, nil) + return newQWidget(C.QGestureEvent_Widget(this.h)) } func (this *QGestureEvent) MapToGraphicsScene(gesturePoint *QPointF) *QPointF { diff --git a/qt6/gen_qgesture.h b/qt6/gen_qgesture.h index 29223587..f00067c9 100644 --- a/qt6/gen_qgesture.h +++ b/qt6/gen_qgesture.h @@ -48,8 +48,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QGesture_new(QGesture** outptr_QGesture, QObject** outptr_QObject); -void QGesture_new2(QObject* parent, QGesture** outptr_QGesture, QObject** outptr_QObject); +QGesture* QGesture_new(); +QGesture* QGesture_new2(QObject* parent); +void QGesture_virtbase(QGesture* src, QObject** outptr_QObject); QMetaObject* QGesture_MetaObject(const QGesture* self); void* QGesture_Metacast(QGesture* self, const char* param1); struct miqt_string QGesture_Tr(const char* s); @@ -79,8 +80,9 @@ void QGesture_override_virtual_DisconnectNotify(void* self, intptr_t slot); void QGesture_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QGesture_Delete(QGesture* self, bool isSubclass); -void QPanGesture_new(QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); -void QPanGesture_new2(QObject* parent, QPanGesture** outptr_QPanGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +QPanGesture* QPanGesture_new(); +QPanGesture* QPanGesture_new2(QObject* parent); +void QPanGesture_virtbase(QPanGesture* src, QGesture** outptr_QGesture); QMetaObject* QPanGesture_MetaObject(const QPanGesture* self); void* QPanGesture_Metacast(QPanGesture* self, const char* param1); struct miqt_string QPanGesture_Tr(const char* s); @@ -95,8 +97,9 @@ struct miqt_string QPanGesture_Tr2(const char* s, const char* c); struct miqt_string QPanGesture_Tr3(const char* s, const char* c, int n); void QPanGesture_Delete(QPanGesture* self, bool isSubclass); -void QPinchGesture_new(QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); -void QPinchGesture_new2(QObject* parent, QPinchGesture** outptr_QPinchGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +QPinchGesture* QPinchGesture_new(); +QPinchGesture* QPinchGesture_new2(QObject* parent); +void QPinchGesture_virtbase(QPinchGesture* src, QGesture** outptr_QGesture); QMetaObject* QPinchGesture_MetaObject(const QPinchGesture* self); void* QPinchGesture_Metacast(QPinchGesture* self, const char* param1); struct miqt_string QPinchGesture_Tr(const char* s); @@ -126,8 +129,9 @@ struct miqt_string QPinchGesture_Tr2(const char* s, const char* c); struct miqt_string QPinchGesture_Tr3(const char* s, const char* c, int n); void QPinchGesture_Delete(QPinchGesture* self, bool isSubclass); -void QSwipeGesture_new(QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); -void QSwipeGesture_new2(QObject* parent, QSwipeGesture** outptr_QSwipeGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +QSwipeGesture* QSwipeGesture_new(); +QSwipeGesture* QSwipeGesture_new2(QObject* parent); +void QSwipeGesture_virtbase(QSwipeGesture* src, QGesture** outptr_QGesture); QMetaObject* QSwipeGesture_MetaObject(const QSwipeGesture* self); void* QSwipeGesture_Metacast(QSwipeGesture* self, const char* param1); struct miqt_string QSwipeGesture_Tr(const char* s); @@ -139,8 +143,9 @@ struct miqt_string QSwipeGesture_Tr2(const char* s, const char* c); struct miqt_string QSwipeGesture_Tr3(const char* s, const char* c, int n); void QSwipeGesture_Delete(QSwipeGesture* self, bool isSubclass); -void QTapGesture_new(QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); -void QTapGesture_new2(QObject* parent, QTapGesture** outptr_QTapGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +QTapGesture* QTapGesture_new(); +QTapGesture* QTapGesture_new2(QObject* parent); +void QTapGesture_virtbase(QTapGesture* src, QGesture** outptr_QGesture); QMetaObject* QTapGesture_MetaObject(const QTapGesture* self); void* QTapGesture_Metacast(QTapGesture* self, const char* param1); struct miqt_string QTapGesture_Tr(const char* s); @@ -150,8 +155,9 @@ struct miqt_string QTapGesture_Tr2(const char* s, const char* c); struct miqt_string QTapGesture_Tr3(const char* s, const char* c, int n); void QTapGesture_Delete(QTapGesture* self, bool isSubclass); -void QTapAndHoldGesture_new(QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); -void QTapAndHoldGesture_new2(QObject* parent, QTapAndHoldGesture** outptr_QTapAndHoldGesture, QGesture** outptr_QGesture, QObject** outptr_QObject); +QTapAndHoldGesture* QTapAndHoldGesture_new(); +QTapAndHoldGesture* QTapAndHoldGesture_new2(QObject* parent); +void QTapAndHoldGesture_virtbase(QTapAndHoldGesture* src, QGesture** outptr_QGesture); QMetaObject* QTapAndHoldGesture_MetaObject(const QTapAndHoldGesture* self); void* QTapAndHoldGesture_Metacast(QTapAndHoldGesture* self, const char* param1); struct miqt_string QTapAndHoldGesture_Tr(const char* s); @@ -163,8 +169,9 @@ struct miqt_string QTapAndHoldGesture_Tr2(const char* s, const char* c); struct miqt_string QTapAndHoldGesture_Tr3(const char* s, const char* c, int n); void QTapAndHoldGesture_Delete(QTapAndHoldGesture* self, bool isSubclass); -void QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent); -void QGestureEvent_new2(QGestureEvent* param1, QGestureEvent** outptr_QGestureEvent, QEvent** outptr_QEvent); +QGestureEvent* QGestureEvent_new(struct miqt_array /* of QGesture* */ gestures); +QGestureEvent* QGestureEvent_new2(QGestureEvent* param1); +void QGestureEvent_virtbase(QGestureEvent* src, QEvent** outptr_QEvent); struct miqt_array /* of QGesture* */ QGestureEvent_Gestures(const QGestureEvent* self); QGesture* QGestureEvent_Gesture(const QGestureEvent* self, int typeVal); struct miqt_array /* of QGesture* */ QGestureEvent_ActiveGestures(const QGestureEvent* self); diff --git a/qt6/gen_qgesturerecognizer.cpp b/qt6/gen_qgesturerecognizer.cpp index 61a64702..821c191e 100644 --- a/qt6/gen_qgesturerecognizer.cpp +++ b/qt6/gen_qgesturerecognizer.cpp @@ -80,9 +80,8 @@ public: }; -void QGestureRecognizer_new(QGestureRecognizer** outptr_QGestureRecognizer) { - MiqtVirtualQGestureRecognizer* ret = new MiqtVirtualQGestureRecognizer(); - *outptr_QGestureRecognizer = ret; +QGestureRecognizer* QGestureRecognizer_new() { + return new MiqtVirtualQGestureRecognizer(); } QGesture* QGestureRecognizer_Create(QGestureRecognizer* self, QObject* target) { diff --git a/qt6/gen_qgesturerecognizer.go b/qt6/gen_qgesturerecognizer.go index 61a27f87..76709bcd 100644 --- a/qt6/gen_qgesturerecognizer.go +++ b/qt6/gen_qgesturerecognizer.go @@ -51,30 +51,25 @@ func newQGestureRecognizer(h *C.QGestureRecognizer) *QGestureRecognizer { if h == nil { return nil } + return &QGestureRecognizer{h: h} } // UnsafeNewQGestureRecognizer constructs the type using only unsafe pointers. func UnsafeNewQGestureRecognizer(h unsafe.Pointer) *QGestureRecognizer { - if h == nil { - return nil - } - - return &QGestureRecognizer{h: (*C.QGestureRecognizer)(h)} + return newQGestureRecognizer((*C.QGestureRecognizer)(h)) } // NewQGestureRecognizer constructs a new QGestureRecognizer object. func NewQGestureRecognizer() *QGestureRecognizer { - var outptr_QGestureRecognizer *C.QGestureRecognizer = nil - C.QGestureRecognizer_new(&outptr_QGestureRecognizer) - ret := newQGestureRecognizer(outptr_QGestureRecognizer) + ret := newQGestureRecognizer(C.QGestureRecognizer_new()) ret.isSubclass = true return ret } func (this *QGestureRecognizer) Create(target *QObject) *QGesture { - return newQGesture(C.QGestureRecognizer_Create(this.h, target.cPointer()), nil) + return newQGesture(C.QGestureRecognizer_Create(this.h, target.cPointer())) } func (this *QGestureRecognizer) Recognize(state *QGesture, watched *QObject, event *QEvent) QGestureRecognizer__ResultFlag { @@ -99,7 +94,7 @@ func (this *QGestureRecognizer) OperatorAssign(param1 *QGestureRecognizer) { func (this *QGestureRecognizer) callVirtualBase_Create(target *QObject) *QGesture { - return newQGesture(C.QGestureRecognizer_virtualbase_Create(unsafe.Pointer(this.h), target.cPointer()), nil) + return newQGesture(C.QGestureRecognizer_virtualbase_Create(unsafe.Pointer(this.h), target.cPointer())) } func (this *QGestureRecognizer) OnCreate(slot func(super func(target *QObject) *QGesture, target *QObject) *QGesture) { @@ -139,7 +134,7 @@ func miqt_exec_callback_QGestureRecognizer_Recognize(self *C.QGestureRecognizer, } // Convert all CABI parameters to Go parameters - slotval1 := newQGesture(state, nil) + slotval1 := newQGesture(state) slotval2 := newQObject(watched) @@ -171,7 +166,7 @@ func miqt_exec_callback_QGestureRecognizer_Reset(self *C.QGestureRecognizer, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGesture(state, nil) + slotval1 := newQGesture(state) gofunc((&QGestureRecognizer{h: self}).callVirtualBase_Reset, slotval1) diff --git a/qt6/gen_qgesturerecognizer.h b/qt6/gen_qgesturerecognizer.h index 65d69b96..c21bd234 100644 --- a/qt6/gen_qgesturerecognizer.h +++ b/qt6/gen_qgesturerecognizer.h @@ -26,7 +26,7 @@ typedef struct QGestureRecognizer QGestureRecognizer; typedef struct QObject QObject; #endif -void QGestureRecognizer_new(QGestureRecognizer** outptr_QGestureRecognizer); +QGestureRecognizer* QGestureRecognizer_new(); QGesture* QGestureRecognizer_Create(QGestureRecognizer* self, QObject* target); int QGestureRecognizer_Recognize(QGestureRecognizer* self, QGesture* state, QObject* watched, QEvent* event); void QGestureRecognizer_Reset(QGestureRecognizer* self, QGesture* state); diff --git a/qt6/gen_qglyphrun.cpp b/qt6/gen_qglyphrun.cpp index ef9cb574..407dc20f 100644 --- a/qt6/gen_qglyphrun.cpp +++ b/qt6/gen_qglyphrun.cpp @@ -7,14 +7,12 @@ #include "gen_qglyphrun.h" #include "_cgo_export.h" -void QGlyphRun_new(QGlyphRun** outptr_QGlyphRun) { - QGlyphRun* ret = new QGlyphRun(); - *outptr_QGlyphRun = ret; +QGlyphRun* QGlyphRun_new() { + return new QGlyphRun(); } -void QGlyphRun_new2(QGlyphRun* other, QGlyphRun** outptr_QGlyphRun) { - QGlyphRun* ret = new QGlyphRun(*other); - *outptr_QGlyphRun = ret; +QGlyphRun* QGlyphRun_new2(QGlyphRun* other) { + return new QGlyphRun(*other); } void QGlyphRun_OperatorAssign(QGlyphRun* self, QGlyphRun* other) { diff --git a/qt6/gen_qglyphrun.go b/qt6/gen_qglyphrun.go index ba1b003f..1bc5e273 100644 --- a/qt6/gen_qglyphrun.go +++ b/qt6/gen_qglyphrun.go @@ -47,34 +47,27 @@ func newQGlyphRun(h *C.QGlyphRun) *QGlyphRun { if h == nil { return nil } + return &QGlyphRun{h: h} } // UnsafeNewQGlyphRun constructs the type using only unsafe pointers. func UnsafeNewQGlyphRun(h unsafe.Pointer) *QGlyphRun { - if h == nil { - return nil - } - - return &QGlyphRun{h: (*C.QGlyphRun)(h)} + return newQGlyphRun((*C.QGlyphRun)(h)) } // NewQGlyphRun constructs a new QGlyphRun object. func NewQGlyphRun() *QGlyphRun { - var outptr_QGlyphRun *C.QGlyphRun = nil - C.QGlyphRun_new(&outptr_QGlyphRun) - ret := newQGlyphRun(outptr_QGlyphRun) + ret := newQGlyphRun(C.QGlyphRun_new()) ret.isSubclass = true return ret } // NewQGlyphRun2 constructs a new QGlyphRun object. func NewQGlyphRun2(other *QGlyphRun) *QGlyphRun { - var outptr_QGlyphRun *C.QGlyphRun = nil - C.QGlyphRun_new2(other.cPointer(), &outptr_QGlyphRun) - ret := newQGlyphRun(outptr_QGlyphRun) + ret := newQGlyphRun(C.QGlyphRun_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qglyphrun.h b/qt6/gen_qglyphrun.h index 22ab51c0..ee098a9d 100644 --- a/qt6/gen_qglyphrun.h +++ b/qt6/gen_qglyphrun.h @@ -26,8 +26,8 @@ typedef struct QRawFont QRawFont; typedef struct QRectF QRectF; #endif -void QGlyphRun_new(QGlyphRun** outptr_QGlyphRun); -void QGlyphRun_new2(QGlyphRun* other, QGlyphRun** outptr_QGlyphRun); +QGlyphRun* QGlyphRun_new(); +QGlyphRun* QGlyphRun_new2(QGlyphRun* other); void QGlyphRun_OperatorAssign(QGlyphRun* self, QGlyphRun* other); void QGlyphRun_Swap(QGlyphRun* self, QGlyphRun* other); QRawFont* QGlyphRun_RawFont(const QGlyphRun* self); diff --git a/qt6/gen_qgraphicsanchorlayout.cpp b/qt6/gen_qgraphicsanchorlayout.cpp index 40d556a5..47ad0e50 100644 --- a/qt6/gen_qgraphicsanchorlayout.cpp +++ b/qt6/gen_qgraphicsanchorlayout.cpp @@ -14,6 +14,10 @@ #include "gen_qgraphicsanchorlayout.h" #include "_cgo_export.h" +void QGraphicsAnchor_virtbase(QGraphicsAnchor* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QGraphicsAnchor_MetaObject(const QGraphicsAnchor* self) { return (QMetaObject*) self->metaObject(); } @@ -318,18 +322,16 @@ public: }; -void QGraphicsAnchorLayout_new(QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsAnchorLayout* ret = new MiqtVirtualQGraphicsAnchorLayout(); - *outptr_QGraphicsAnchorLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsAnchorLayout* QGraphicsAnchorLayout_new() { + return new MiqtVirtualQGraphicsAnchorLayout(); } -void QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent, QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsAnchorLayout* ret = new MiqtVirtualQGraphicsAnchorLayout(parent); - *outptr_QGraphicsAnchorLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsAnchorLayout* QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent) { + return new MiqtVirtualQGraphicsAnchorLayout(parent); +} + +void QGraphicsAnchorLayout_virtbase(QGraphicsAnchorLayout* src, QGraphicsLayout** outptr_QGraphicsLayout) { + *outptr_QGraphicsLayout = static_cast(src); } QGraphicsAnchor* QGraphicsAnchorLayout_AddAnchor(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstEdge, QGraphicsLayoutItem* secondItem, int secondEdge) { diff --git a/qt6/gen_qgraphicsanchorlayout.go b/qt6/gen_qgraphicsanchorlayout.go index 2e7a620b..11c62774 100644 --- a/qt6/gen_qgraphicsanchorlayout.go +++ b/qt6/gen_qgraphicsanchorlayout.go @@ -35,22 +35,20 @@ func (this *QGraphicsAnchor) UnsafePointer() unsafe.Pointer { } // newQGraphicsAnchor constructs the type using only CGO pointers. -func newQGraphicsAnchor(h *C.QGraphicsAnchor, h_QObject *C.QObject) *QGraphicsAnchor { +func newQGraphicsAnchor(h *C.QGraphicsAnchor) *QGraphicsAnchor { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QGraphicsAnchor_virtbase(h, &outptr_QObject) + return &QGraphicsAnchor{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQGraphicsAnchor constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsAnchor(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsAnchor { - if h == nil { - return nil - } - - return &QGraphicsAnchor{h: (*C.QGraphicsAnchor)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQGraphicsAnchor(h unsafe.Pointer) *QGraphicsAnchor { + return newQGraphicsAnchor((*C.QGraphicsAnchor)(h)) } func (this *QGraphicsAnchor) MetaObject() *QMetaObject { @@ -149,54 +147,44 @@ func (this *QGraphicsAnchorLayout) UnsafePointer() unsafe.Pointer { } // newQGraphicsAnchorLayout constructs the type using only CGO pointers. -func newQGraphicsAnchorLayout(h *C.QGraphicsAnchorLayout, h_QGraphicsLayout *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsAnchorLayout { +func newQGraphicsAnchorLayout(h *C.QGraphicsAnchorLayout) *QGraphicsAnchorLayout { if h == nil { return nil } + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + C.QGraphicsAnchorLayout_virtbase(h, &outptr_QGraphicsLayout) + return &QGraphicsAnchorLayout{h: h, - QGraphicsLayout: newQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} + QGraphicsLayout: newQGraphicsLayout(outptr_QGraphicsLayout)} } // UnsafeNewQGraphicsAnchorLayout constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsAnchorLayout(h unsafe.Pointer, h_QGraphicsLayout unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsAnchorLayout { - if h == nil { - return nil - } - - return &QGraphicsAnchorLayout{h: (*C.QGraphicsAnchorLayout)(h), - QGraphicsLayout: UnsafeNewQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} +func UnsafeNewQGraphicsAnchorLayout(h unsafe.Pointer) *QGraphicsAnchorLayout { + return newQGraphicsAnchorLayout((*C.QGraphicsAnchorLayout)(h)) } // NewQGraphicsAnchorLayout constructs a new QGraphicsAnchorLayout object. func NewQGraphicsAnchorLayout() *QGraphicsAnchorLayout { - var outptr_QGraphicsAnchorLayout *C.QGraphicsAnchorLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsAnchorLayout_new(&outptr_QGraphicsAnchorLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsAnchorLayout(outptr_QGraphicsAnchorLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsAnchorLayout(C.QGraphicsAnchorLayout_new()) ret.isSubclass = true return ret } // NewQGraphicsAnchorLayout2 constructs a new QGraphicsAnchorLayout object. func NewQGraphicsAnchorLayout2(parent *QGraphicsLayoutItem) *QGraphicsAnchorLayout { - var outptr_QGraphicsAnchorLayout *C.QGraphicsAnchorLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsAnchorLayout_new2(parent.cPointer(), &outptr_QGraphicsAnchorLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsAnchorLayout(outptr_QGraphicsAnchorLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsAnchorLayout(C.QGraphicsAnchorLayout_new2(parent.cPointer())) ret.isSubclass = true return ret } func (this *QGraphicsAnchorLayout) AddAnchor(firstItem *QGraphicsLayoutItem, firstEdge AnchorPoint, secondItem *QGraphicsLayoutItem, secondEdge AnchorPoint) *QGraphicsAnchor { - return newQGraphicsAnchor(C.QGraphicsAnchorLayout_AddAnchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge)), nil) + return newQGraphicsAnchor(C.QGraphicsAnchorLayout_AddAnchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge))) } func (this *QGraphicsAnchorLayout) Anchor(firstItem *QGraphicsLayoutItem, firstEdge AnchorPoint, secondItem *QGraphicsLayoutItem, secondEdge AnchorPoint) *QGraphicsAnchor { - return newQGraphicsAnchor(C.QGraphicsAnchorLayout_Anchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge)), nil) + return newQGraphicsAnchor(C.QGraphicsAnchorLayout_Anchor(this.h, firstItem.cPointer(), (C.int)(firstEdge), secondItem.cPointer(), (C.int)(secondEdge))) } func (this *QGraphicsAnchorLayout) AddCornerAnchors(firstItem *QGraphicsLayoutItem, firstCorner Corner, secondItem *QGraphicsLayoutItem, secondCorner Corner) { diff --git a/qt6/gen_qgraphicsanchorlayout.h b/qt6/gen_qgraphicsanchorlayout.h index 4bacb3bc..ff224b04 100644 --- a/qt6/gen_qgraphicsanchorlayout.h +++ b/qt6/gen_qgraphicsanchorlayout.h @@ -36,6 +36,7 @@ typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; #endif +void QGraphicsAnchor_virtbase(QGraphicsAnchor* src, QObject** outptr_QObject); QMetaObject* QGraphicsAnchor_MetaObject(const QGraphicsAnchor* self); void* QGraphicsAnchor_Metacast(QGraphicsAnchor* self, const char* param1); struct miqt_string QGraphicsAnchor_Tr(const char* s); @@ -48,8 +49,9 @@ struct miqt_string QGraphicsAnchor_Tr2(const char* s, const char* c); struct miqt_string QGraphicsAnchor_Tr3(const char* s, const char* c, int n); void QGraphicsAnchor_Delete(QGraphicsAnchor* self, bool isSubclass); -void QGraphicsAnchorLayout_new(QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent, QGraphicsAnchorLayout** outptr_QGraphicsAnchorLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QGraphicsAnchorLayout* QGraphicsAnchorLayout_new(); +QGraphicsAnchorLayout* QGraphicsAnchorLayout_new2(QGraphicsLayoutItem* parent); +void QGraphicsAnchorLayout_virtbase(QGraphicsAnchorLayout* src, QGraphicsLayout** outptr_QGraphicsLayout); QGraphicsAnchor* QGraphicsAnchorLayout_AddAnchor(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstEdge, QGraphicsLayoutItem* secondItem, int secondEdge); QGraphicsAnchor* QGraphicsAnchorLayout_Anchor(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstEdge, QGraphicsLayoutItem* secondItem, int secondEdge); void QGraphicsAnchorLayout_AddCornerAnchors(QGraphicsAnchorLayout* self, QGraphicsLayoutItem* firstItem, int firstCorner, QGraphicsLayoutItem* secondItem, int secondCorner); diff --git a/qt6/gen_qgraphicseffect.cpp b/qt6/gen_qgraphicseffect.cpp index 026e5bcf..925c7abe 100644 --- a/qt6/gen_qgraphicseffect.cpp +++ b/qt6/gen_qgraphicseffect.cpp @@ -268,16 +268,16 @@ public: }; -void QGraphicsEffect_new(QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsEffect* ret = new MiqtVirtualQGraphicsEffect(); - *outptr_QGraphicsEffect = ret; - *outptr_QObject = static_cast(ret); +QGraphicsEffect* QGraphicsEffect_new() { + return new MiqtVirtualQGraphicsEffect(); } -void QGraphicsEffect_new2(QObject* parent, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsEffect* ret = new MiqtVirtualQGraphicsEffect(parent); - *outptr_QGraphicsEffect = ret; - *outptr_QObject = static_cast(ret); +QGraphicsEffect* QGraphicsEffect_new2(QObject* parent) { + return new MiqtVirtualQGraphicsEffect(parent); +} + +void QGraphicsEffect_virtbase(QGraphicsEffect* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QGraphicsEffect_MetaObject(const QGraphicsEffect* self) { @@ -520,18 +520,16 @@ public: }; -void QGraphicsColorizeEffect_new(QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsColorizeEffect* ret = new MiqtVirtualQGraphicsColorizeEffect(); - *outptr_QGraphicsColorizeEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsColorizeEffect* QGraphicsColorizeEffect_new() { + return new MiqtVirtualQGraphicsColorizeEffect(); } -void QGraphicsColorizeEffect_new2(QObject* parent, QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsColorizeEffect* ret = new MiqtVirtualQGraphicsColorizeEffect(parent); - *outptr_QGraphicsColorizeEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsColorizeEffect* QGraphicsColorizeEffect_new2(QObject* parent) { + return new MiqtVirtualQGraphicsColorizeEffect(parent); +} + +void QGraphicsColorizeEffect_virtbase(QGraphicsColorizeEffect* src, QGraphicsEffect** outptr_QGraphicsEffect) { + *outptr_QGraphicsEffect = static_cast(src); } QMetaObject* QGraphicsColorizeEffect_MetaObject(const QGraphicsColorizeEffect* self) { @@ -733,18 +731,16 @@ public: }; -void QGraphicsBlurEffect_new(QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsBlurEffect* ret = new MiqtVirtualQGraphicsBlurEffect(); - *outptr_QGraphicsBlurEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsBlurEffect* QGraphicsBlurEffect_new() { + return new MiqtVirtualQGraphicsBlurEffect(); } -void QGraphicsBlurEffect_new2(QObject* parent, QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsBlurEffect* ret = new MiqtVirtualQGraphicsBlurEffect(parent); - *outptr_QGraphicsBlurEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsBlurEffect* QGraphicsBlurEffect_new2(QObject* parent) { + return new MiqtVirtualQGraphicsBlurEffect(parent); +} + +void QGraphicsBlurEffect_virtbase(QGraphicsBlurEffect* src, QGraphicsEffect** outptr_QGraphicsEffect) { + *outptr_QGraphicsEffect = static_cast(src); } QMetaObject* QGraphicsBlurEffect_MetaObject(const QGraphicsBlurEffect* self) { @@ -950,18 +946,16 @@ public: }; -void QGraphicsDropShadowEffect_new(QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsDropShadowEffect* ret = new MiqtVirtualQGraphicsDropShadowEffect(); - *outptr_QGraphicsDropShadowEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new() { + return new MiqtVirtualQGraphicsDropShadowEffect(); } -void QGraphicsDropShadowEffect_new2(QObject* parent, QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsDropShadowEffect* ret = new MiqtVirtualQGraphicsDropShadowEffect(parent); - *outptr_QGraphicsDropShadowEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new2(QObject* parent) { + return new MiqtVirtualQGraphicsDropShadowEffect(parent); +} + +void QGraphicsDropShadowEffect_virtbase(QGraphicsDropShadowEffect* src, QGraphicsEffect** outptr_QGraphicsEffect) { + *outptr_QGraphicsEffect = static_cast(src); } QMetaObject* QGraphicsDropShadowEffect_MetaObject(const QGraphicsDropShadowEffect* self) { @@ -1214,18 +1208,16 @@ public: }; -void QGraphicsOpacityEffect_new(QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsOpacityEffect* ret = new MiqtVirtualQGraphicsOpacityEffect(); - *outptr_QGraphicsOpacityEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsOpacityEffect* QGraphicsOpacityEffect_new() { + return new MiqtVirtualQGraphicsOpacityEffect(); } -void QGraphicsOpacityEffect_new2(QObject* parent, QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject) { - MiqtVirtualQGraphicsOpacityEffect* ret = new MiqtVirtualQGraphicsOpacityEffect(parent); - *outptr_QGraphicsOpacityEffect = ret; - *outptr_QGraphicsEffect = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsOpacityEffect* QGraphicsOpacityEffect_new2(QObject* parent) { + return new MiqtVirtualQGraphicsOpacityEffect(parent); +} + +void QGraphicsOpacityEffect_virtbase(QGraphicsOpacityEffect* src, QGraphicsEffect** outptr_QGraphicsEffect) { + *outptr_QGraphicsEffect = static_cast(src); } QMetaObject* QGraphicsOpacityEffect_MetaObject(const QGraphicsOpacityEffect* self) { diff --git a/qt6/gen_qgraphicseffect.go b/qt6/gen_qgraphicseffect.go index 870ed984..f4940342 100644 --- a/qt6/gen_qgraphicseffect.go +++ b/qt6/gen_qgraphicseffect.go @@ -60,42 +60,34 @@ func (this *QGraphicsEffect) UnsafePointer() unsafe.Pointer { } // newQGraphicsEffect constructs the type using only CGO pointers. -func newQGraphicsEffect(h *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsEffect { +func newQGraphicsEffect(h *C.QGraphicsEffect) *QGraphicsEffect { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QGraphicsEffect_virtbase(h, &outptr_QObject) + return &QGraphicsEffect{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQGraphicsEffect constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsEffect(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsEffect { - if h == nil { - return nil - } - - return &QGraphicsEffect{h: (*C.QGraphicsEffect)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQGraphicsEffect(h unsafe.Pointer) *QGraphicsEffect { + return newQGraphicsEffect((*C.QGraphicsEffect)(h)) } // NewQGraphicsEffect constructs a new QGraphicsEffect object. func NewQGraphicsEffect() *QGraphicsEffect { - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsEffect_new(&outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsEffect(outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsEffect(C.QGraphicsEffect_new()) ret.isSubclass = true return ret } // NewQGraphicsEffect2 constructs a new QGraphicsEffect object. func NewQGraphicsEffect2(parent *QObject) *QGraphicsEffect { - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsEffect_new2(parent.cPointer(), &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsEffect(outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsEffect(C.QGraphicsEffect_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -339,7 +331,7 @@ func miqt_exec_callback_QGraphicsEffect_TimerEvent(self *C.QGraphicsEffect, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QGraphicsEffect{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -365,7 +357,7 @@ func miqt_exec_callback_QGraphicsEffect_ChildEvent(self *C.QGraphicsEffect, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGraphicsEffect{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -484,44 +476,34 @@ func (this *QGraphicsColorizeEffect) UnsafePointer() unsafe.Pointer { } // newQGraphicsColorizeEffect constructs the type using only CGO pointers. -func newQGraphicsColorizeEffect(h *C.QGraphicsColorizeEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsColorizeEffect { +func newQGraphicsColorizeEffect(h *C.QGraphicsColorizeEffect) *QGraphicsColorizeEffect { if h == nil { return nil } + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + C.QGraphicsColorizeEffect_virtbase(h, &outptr_QGraphicsEffect) + return &QGraphicsColorizeEffect{h: h, - QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} + QGraphicsEffect: newQGraphicsEffect(outptr_QGraphicsEffect)} } // UnsafeNewQGraphicsColorizeEffect constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsColorizeEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsColorizeEffect { - if h == nil { - return nil - } - - return &QGraphicsColorizeEffect{h: (*C.QGraphicsColorizeEffect)(h), - QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} +func UnsafeNewQGraphicsColorizeEffect(h unsafe.Pointer) *QGraphicsColorizeEffect { + return newQGraphicsColorizeEffect((*C.QGraphicsColorizeEffect)(h)) } // NewQGraphicsColorizeEffect constructs a new QGraphicsColorizeEffect object. func NewQGraphicsColorizeEffect() *QGraphicsColorizeEffect { - var outptr_QGraphicsColorizeEffect *C.QGraphicsColorizeEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsColorizeEffect_new(&outptr_QGraphicsColorizeEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsColorizeEffect(outptr_QGraphicsColorizeEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsColorizeEffect(C.QGraphicsColorizeEffect_new()) ret.isSubclass = true return ret } // NewQGraphicsColorizeEffect2 constructs a new QGraphicsColorizeEffect object. func NewQGraphicsColorizeEffect2(parent *QObject) *QGraphicsColorizeEffect { - var outptr_QGraphicsColorizeEffect *C.QGraphicsColorizeEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsColorizeEffect_new2(parent.cPointer(), &outptr_QGraphicsColorizeEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsColorizeEffect(outptr_QGraphicsColorizeEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsColorizeEffect(C.QGraphicsColorizeEffect_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -742,44 +724,34 @@ func (this *QGraphicsBlurEffect) UnsafePointer() unsafe.Pointer { } // newQGraphicsBlurEffect constructs the type using only CGO pointers. -func newQGraphicsBlurEffect(h *C.QGraphicsBlurEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsBlurEffect { +func newQGraphicsBlurEffect(h *C.QGraphicsBlurEffect) *QGraphicsBlurEffect { if h == nil { return nil } + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + C.QGraphicsBlurEffect_virtbase(h, &outptr_QGraphicsEffect) + return &QGraphicsBlurEffect{h: h, - QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} + QGraphicsEffect: newQGraphicsEffect(outptr_QGraphicsEffect)} } // UnsafeNewQGraphicsBlurEffect constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsBlurEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsBlurEffect { - if h == nil { - return nil - } - - return &QGraphicsBlurEffect{h: (*C.QGraphicsBlurEffect)(h), - QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} +func UnsafeNewQGraphicsBlurEffect(h unsafe.Pointer) *QGraphicsBlurEffect { + return newQGraphicsBlurEffect((*C.QGraphicsBlurEffect)(h)) } // NewQGraphicsBlurEffect constructs a new QGraphicsBlurEffect object. func NewQGraphicsBlurEffect() *QGraphicsBlurEffect { - var outptr_QGraphicsBlurEffect *C.QGraphicsBlurEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsBlurEffect_new(&outptr_QGraphicsBlurEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsBlurEffect(outptr_QGraphicsBlurEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsBlurEffect(C.QGraphicsBlurEffect_new()) ret.isSubclass = true return ret } // NewQGraphicsBlurEffect2 constructs a new QGraphicsBlurEffect object. func NewQGraphicsBlurEffect2(parent *QObject) *QGraphicsBlurEffect { - var outptr_QGraphicsBlurEffect *C.QGraphicsBlurEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsBlurEffect_new2(parent.cPointer(), &outptr_QGraphicsBlurEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsBlurEffect(outptr_QGraphicsBlurEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsBlurEffect(C.QGraphicsBlurEffect_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -1004,44 +976,34 @@ func (this *QGraphicsDropShadowEffect) UnsafePointer() unsafe.Pointer { } // newQGraphicsDropShadowEffect constructs the type using only CGO pointers. -func newQGraphicsDropShadowEffect(h *C.QGraphicsDropShadowEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsDropShadowEffect { +func newQGraphicsDropShadowEffect(h *C.QGraphicsDropShadowEffect) *QGraphicsDropShadowEffect { if h == nil { return nil } + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + C.QGraphicsDropShadowEffect_virtbase(h, &outptr_QGraphicsEffect) + return &QGraphicsDropShadowEffect{h: h, - QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} + QGraphicsEffect: newQGraphicsEffect(outptr_QGraphicsEffect)} } // UnsafeNewQGraphicsDropShadowEffect constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsDropShadowEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsDropShadowEffect { - if h == nil { - return nil - } - - return &QGraphicsDropShadowEffect{h: (*C.QGraphicsDropShadowEffect)(h), - QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} +func UnsafeNewQGraphicsDropShadowEffect(h unsafe.Pointer) *QGraphicsDropShadowEffect { + return newQGraphicsDropShadowEffect((*C.QGraphicsDropShadowEffect)(h)) } // NewQGraphicsDropShadowEffect constructs a new QGraphicsDropShadowEffect object. func NewQGraphicsDropShadowEffect() *QGraphicsDropShadowEffect { - var outptr_QGraphicsDropShadowEffect *C.QGraphicsDropShadowEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsDropShadowEffect_new(&outptr_QGraphicsDropShadowEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsDropShadowEffect(outptr_QGraphicsDropShadowEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsDropShadowEffect(C.QGraphicsDropShadowEffect_new()) ret.isSubclass = true return ret } // NewQGraphicsDropShadowEffect2 constructs a new QGraphicsDropShadowEffect object. func NewQGraphicsDropShadowEffect2(parent *QObject) *QGraphicsDropShadowEffect { - var outptr_QGraphicsDropShadowEffect *C.QGraphicsDropShadowEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsDropShadowEffect_new2(parent.cPointer(), &outptr_QGraphicsDropShadowEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsDropShadowEffect(outptr_QGraphicsDropShadowEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsDropShadowEffect(C.QGraphicsDropShadowEffect_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -1322,44 +1284,34 @@ func (this *QGraphicsOpacityEffect) UnsafePointer() unsafe.Pointer { } // newQGraphicsOpacityEffect constructs the type using only CGO pointers. -func newQGraphicsOpacityEffect(h *C.QGraphicsOpacityEffect, h_QGraphicsEffect *C.QGraphicsEffect, h_QObject *C.QObject) *QGraphicsOpacityEffect { +func newQGraphicsOpacityEffect(h *C.QGraphicsOpacityEffect) *QGraphicsOpacityEffect { if h == nil { return nil } + var outptr_QGraphicsEffect *C.QGraphicsEffect = nil + C.QGraphicsOpacityEffect_virtbase(h, &outptr_QGraphicsEffect) + return &QGraphicsOpacityEffect{h: h, - QGraphicsEffect: newQGraphicsEffect(h_QGraphicsEffect, h_QObject)} + QGraphicsEffect: newQGraphicsEffect(outptr_QGraphicsEffect)} } // UnsafeNewQGraphicsOpacityEffect constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsOpacityEffect(h unsafe.Pointer, h_QGraphicsEffect unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsOpacityEffect { - if h == nil { - return nil - } - - return &QGraphicsOpacityEffect{h: (*C.QGraphicsOpacityEffect)(h), - QGraphicsEffect: UnsafeNewQGraphicsEffect(h_QGraphicsEffect, h_QObject)} +func UnsafeNewQGraphicsOpacityEffect(h unsafe.Pointer) *QGraphicsOpacityEffect { + return newQGraphicsOpacityEffect((*C.QGraphicsOpacityEffect)(h)) } // NewQGraphicsOpacityEffect constructs a new QGraphicsOpacityEffect object. func NewQGraphicsOpacityEffect() *QGraphicsOpacityEffect { - var outptr_QGraphicsOpacityEffect *C.QGraphicsOpacityEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsOpacityEffect_new(&outptr_QGraphicsOpacityEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsOpacityEffect(outptr_QGraphicsOpacityEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsOpacityEffect(C.QGraphicsOpacityEffect_new()) ret.isSubclass = true return ret } // NewQGraphicsOpacityEffect2 constructs a new QGraphicsOpacityEffect object. func NewQGraphicsOpacityEffect2(parent *QObject) *QGraphicsOpacityEffect { - var outptr_QGraphicsOpacityEffect *C.QGraphicsOpacityEffect = nil - var outptr_QGraphicsEffect *C.QGraphicsEffect = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsOpacityEffect_new2(parent.cPointer(), &outptr_QGraphicsOpacityEffect, &outptr_QGraphicsEffect, &outptr_QObject) - ret := newQGraphicsOpacityEffect(outptr_QGraphicsOpacityEffect, outptr_QGraphicsEffect, outptr_QObject) + ret := newQGraphicsOpacityEffect(C.QGraphicsOpacityEffect_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qgraphicseffect.h b/qt6/gen_qgraphicseffect.h index 220ef2d3..257b5f88 100644 --- a/qt6/gen_qgraphicseffect.h +++ b/qt6/gen_qgraphicseffect.h @@ -50,8 +50,9 @@ typedef struct QRectF QRectF; typedef struct QTimerEvent QTimerEvent; #endif -void QGraphicsEffect_new(QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); -void QGraphicsEffect_new2(QObject* parent, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +QGraphicsEffect* QGraphicsEffect_new(); +QGraphicsEffect* QGraphicsEffect_new2(QObject* parent); +void QGraphicsEffect_virtbase(QGraphicsEffect* src, QObject** outptr_QObject); QMetaObject* QGraphicsEffect_MetaObject(const QGraphicsEffect* self); void* QGraphicsEffect_Metacast(QGraphicsEffect* self, const char* param1); struct miqt_string QGraphicsEffect_Tr(const char* s); @@ -88,8 +89,9 @@ void QGraphicsEffect_override_virtual_DisconnectNotify(void* self, intptr_t slot void QGraphicsEffect_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QGraphicsEffect_Delete(QGraphicsEffect* self, bool isSubclass); -void QGraphicsColorizeEffect_new(QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); -void QGraphicsColorizeEffect_new2(QObject* parent, QGraphicsColorizeEffect** outptr_QGraphicsColorizeEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +QGraphicsColorizeEffect* QGraphicsColorizeEffect_new(); +QGraphicsColorizeEffect* QGraphicsColorizeEffect_new2(QObject* parent); +void QGraphicsColorizeEffect_virtbase(QGraphicsColorizeEffect* src, QGraphicsEffect** outptr_QGraphicsEffect); QMetaObject* QGraphicsColorizeEffect_MetaObject(const QGraphicsColorizeEffect* self); void* QGraphicsColorizeEffect_Metacast(QGraphicsColorizeEffect* self, const char* param1); struct miqt_string QGraphicsColorizeEffect_Tr(const char* s); @@ -112,8 +114,9 @@ void QGraphicsColorizeEffect_override_virtual_SourceChanged(void* self, intptr_t void QGraphicsColorizeEffect_virtualbase_SourceChanged(void* self, int flags); void QGraphicsColorizeEffect_Delete(QGraphicsColorizeEffect* self, bool isSubclass); -void QGraphicsBlurEffect_new(QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); -void QGraphicsBlurEffect_new2(QObject* parent, QGraphicsBlurEffect** outptr_QGraphicsBlurEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +QGraphicsBlurEffect* QGraphicsBlurEffect_new(); +QGraphicsBlurEffect* QGraphicsBlurEffect_new2(QObject* parent); +void QGraphicsBlurEffect_virtbase(QGraphicsBlurEffect* src, QGraphicsEffect** outptr_QGraphicsEffect); QMetaObject* QGraphicsBlurEffect_MetaObject(const QGraphicsBlurEffect* self); void* QGraphicsBlurEffect_Metacast(QGraphicsBlurEffect* self, const char* param1); struct miqt_string QGraphicsBlurEffect_Tr(const char* s); @@ -137,8 +140,9 @@ void QGraphicsBlurEffect_override_virtual_SourceChanged(void* self, intptr_t slo void QGraphicsBlurEffect_virtualbase_SourceChanged(void* self, int flags); void QGraphicsBlurEffect_Delete(QGraphicsBlurEffect* self, bool isSubclass); -void QGraphicsDropShadowEffect_new(QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); -void QGraphicsDropShadowEffect_new2(QObject* parent, QGraphicsDropShadowEffect** outptr_QGraphicsDropShadowEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new(); +QGraphicsDropShadowEffect* QGraphicsDropShadowEffect_new2(QObject* parent); +void QGraphicsDropShadowEffect_virtbase(QGraphicsDropShadowEffect* src, QGraphicsEffect** outptr_QGraphicsEffect); QMetaObject* QGraphicsDropShadowEffect_MetaObject(const QGraphicsDropShadowEffect* self); void* QGraphicsDropShadowEffect_Metacast(QGraphicsDropShadowEffect* self, const char* param1); struct miqt_string QGraphicsDropShadowEffect_Tr(const char* s); @@ -172,8 +176,9 @@ void QGraphicsDropShadowEffect_override_virtual_SourceChanged(void* self, intptr void QGraphicsDropShadowEffect_virtualbase_SourceChanged(void* self, int flags); void QGraphicsDropShadowEffect_Delete(QGraphicsDropShadowEffect* self, bool isSubclass); -void QGraphicsOpacityEffect_new(QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); -void QGraphicsOpacityEffect_new2(QObject* parent, QGraphicsOpacityEffect** outptr_QGraphicsOpacityEffect, QGraphicsEffect** outptr_QGraphicsEffect, QObject** outptr_QObject); +QGraphicsOpacityEffect* QGraphicsOpacityEffect_new(); +QGraphicsOpacityEffect* QGraphicsOpacityEffect_new2(QObject* parent); +void QGraphicsOpacityEffect_virtbase(QGraphicsOpacityEffect* src, QGraphicsEffect** outptr_QGraphicsEffect); QMetaObject* QGraphicsOpacityEffect_MetaObject(const QGraphicsOpacityEffect* self); void* QGraphicsOpacityEffect_Metacast(QGraphicsOpacityEffect* self, const char* param1); struct miqt_string QGraphicsOpacityEffect_Tr(const char* s); diff --git a/qt6/gen_qgraphicsgridlayout.cpp b/qt6/gen_qgraphicsgridlayout.cpp index 2cd46db0..7fd53187 100644 --- a/qt6/gen_qgraphicsgridlayout.cpp +++ b/qt6/gen_qgraphicsgridlayout.cpp @@ -241,18 +241,16 @@ public: }; -void QGraphicsGridLayout_new(QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsGridLayout* ret = new MiqtVirtualQGraphicsGridLayout(); - *outptr_QGraphicsGridLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsGridLayout* QGraphicsGridLayout_new() { + return new MiqtVirtualQGraphicsGridLayout(); } -void QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent, QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsGridLayout* ret = new MiqtVirtualQGraphicsGridLayout(parent); - *outptr_QGraphicsGridLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsGridLayout* QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent) { + return new MiqtVirtualQGraphicsGridLayout(parent); +} + +void QGraphicsGridLayout_virtbase(QGraphicsGridLayout* src, QGraphicsLayout** outptr_QGraphicsLayout) { + *outptr_QGraphicsLayout = static_cast(src); } void QGraphicsGridLayout_AddItem(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column, int rowSpan, int columnSpan) { diff --git a/qt6/gen_qgraphicsgridlayout.go b/qt6/gen_qgraphicsgridlayout.go index dcc1e3e6..570f25c0 100644 --- a/qt6/gen_qgraphicsgridlayout.go +++ b/qt6/gen_qgraphicsgridlayout.go @@ -35,44 +35,34 @@ func (this *QGraphicsGridLayout) UnsafePointer() unsafe.Pointer { } // newQGraphicsGridLayout constructs the type using only CGO pointers. -func newQGraphicsGridLayout(h *C.QGraphicsGridLayout, h_QGraphicsLayout *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsGridLayout { +func newQGraphicsGridLayout(h *C.QGraphicsGridLayout) *QGraphicsGridLayout { if h == nil { return nil } + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + C.QGraphicsGridLayout_virtbase(h, &outptr_QGraphicsLayout) + return &QGraphicsGridLayout{h: h, - QGraphicsLayout: newQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} + QGraphicsLayout: newQGraphicsLayout(outptr_QGraphicsLayout)} } // UnsafeNewQGraphicsGridLayout constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsGridLayout(h unsafe.Pointer, h_QGraphicsLayout unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsGridLayout { - if h == nil { - return nil - } - - return &QGraphicsGridLayout{h: (*C.QGraphicsGridLayout)(h), - QGraphicsLayout: UnsafeNewQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} +func UnsafeNewQGraphicsGridLayout(h unsafe.Pointer) *QGraphicsGridLayout { + return newQGraphicsGridLayout((*C.QGraphicsGridLayout)(h)) } // NewQGraphicsGridLayout constructs a new QGraphicsGridLayout object. func NewQGraphicsGridLayout() *QGraphicsGridLayout { - var outptr_QGraphicsGridLayout *C.QGraphicsGridLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsGridLayout_new(&outptr_QGraphicsGridLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsGridLayout(outptr_QGraphicsGridLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsGridLayout(C.QGraphicsGridLayout_new()) ret.isSubclass = true return ret } // NewQGraphicsGridLayout2 constructs a new QGraphicsGridLayout object. func NewQGraphicsGridLayout2(parent *QGraphicsLayoutItem) *QGraphicsGridLayout { - var outptr_QGraphicsGridLayout *C.QGraphicsGridLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsGridLayout_new2(parent.cPointer(), &outptr_QGraphicsGridLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsGridLayout(outptr_QGraphicsGridLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsGridLayout(C.QGraphicsGridLayout_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qgraphicsgridlayout.h b/qt6/gen_qgraphicsgridlayout.h index f577b62c..10d2de3f 100644 --- a/qt6/gen_qgraphicsgridlayout.h +++ b/qt6/gen_qgraphicsgridlayout.h @@ -30,8 +30,9 @@ typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; #endif -void QGraphicsGridLayout_new(QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent, QGraphicsGridLayout** outptr_QGraphicsGridLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QGraphicsGridLayout* QGraphicsGridLayout_new(); +QGraphicsGridLayout* QGraphicsGridLayout_new2(QGraphicsLayoutItem* parent); +void QGraphicsGridLayout_virtbase(QGraphicsGridLayout* src, QGraphicsLayout** outptr_QGraphicsLayout); void QGraphicsGridLayout_AddItem(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column, int rowSpan, int columnSpan); void QGraphicsGridLayout_AddItem2(QGraphicsGridLayout* self, QGraphicsLayoutItem* item, int row, int column); void QGraphicsGridLayout_SetHorizontalSpacing(QGraphicsGridLayout* self, double spacing); diff --git a/qt6/gen_qgraphicsitem.cpp b/qt6/gen_qgraphicsitem.cpp index f02236e2..5b020098 100644 --- a/qt6/gen_qgraphicsitem.cpp +++ b/qt6/gen_qgraphicsitem.cpp @@ -895,14 +895,12 @@ public: }; -void QGraphicsItem_new(QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsItem* ret = new MiqtVirtualQGraphicsItem(); - *outptr_QGraphicsItem = ret; +QGraphicsItem* QGraphicsItem_new() { + return new MiqtVirtualQGraphicsItem(); } -void QGraphicsItem_new2(QGraphicsItem* parent, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsItem* ret = new MiqtVirtualQGraphicsItem(parent); - *outptr_QGraphicsItem = ret; +QGraphicsItem* QGraphicsItem_new2(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsItem(parent); } QGraphicsScene* QGraphicsItem_Scene(const QGraphicsItem* self) { @@ -2959,18 +2957,17 @@ public: }; -void QGraphicsObject_new(QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsObject* ret = new MiqtVirtualQGraphicsObject(); - *outptr_QGraphicsObject = ret; - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsObject* QGraphicsObject_new() { + return new MiqtVirtualQGraphicsObject(); } -void QGraphicsObject_new2(QGraphicsItem* parent, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsObject* ret = new MiqtVirtualQGraphicsObject(parent); - *outptr_QGraphicsObject = ret; - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsObject* QGraphicsObject_new2(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsObject(parent); +} + +void QGraphicsObject_virtbase(QGraphicsObject* src, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { + *outptr_QObject = static_cast(src); + *outptr_QGraphicsItem = static_cast(src); } QMetaObject* QGraphicsObject_MetaObject(const QGraphicsObject* self) { @@ -4322,16 +4319,16 @@ public: }; -void QAbstractGraphicsShapeItem_new(QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQAbstractGraphicsShapeItem* ret = new MiqtVirtualQAbstractGraphicsShapeItem(); - *outptr_QAbstractGraphicsShapeItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QAbstractGraphicsShapeItem* QAbstractGraphicsShapeItem_new() { + return new MiqtVirtualQAbstractGraphicsShapeItem(); } -void QAbstractGraphicsShapeItem_new2(QGraphicsItem* parent, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQAbstractGraphicsShapeItem* ret = new MiqtVirtualQAbstractGraphicsShapeItem(parent); - *outptr_QAbstractGraphicsShapeItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QAbstractGraphicsShapeItem* QAbstractGraphicsShapeItem_new2(QGraphicsItem* parent) { + return new MiqtVirtualQAbstractGraphicsShapeItem(parent); +} + +void QAbstractGraphicsShapeItem_virtbase(QAbstractGraphicsShapeItem* src, QGraphicsItem** outptr_QGraphicsItem) { + *outptr_QGraphicsItem = static_cast(src); } QPen* QAbstractGraphicsShapeItem_Pen(const QAbstractGraphicsShapeItem* self) { @@ -4889,32 +4886,24 @@ public: }; -void QGraphicsPathItem_new(QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(); - *outptr_QGraphicsPathItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPathItem* QGraphicsPathItem_new() { + return new MiqtVirtualQGraphicsPathItem(); } -void QGraphicsPathItem_new2(QPainterPath* path, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(*path); - *outptr_QGraphicsPathItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPathItem* QGraphicsPathItem_new2(QPainterPath* path) { + return new MiqtVirtualQGraphicsPathItem(*path); } -void QGraphicsPathItem_new3(QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(parent); - *outptr_QGraphicsPathItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPathItem* QGraphicsPathItem_new3(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsPathItem(parent); } -void QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPathItem* ret = new MiqtVirtualQGraphicsPathItem(*path, parent); - *outptr_QGraphicsPathItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPathItem* QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsPathItem(*path, parent); +} + +void QGraphicsPathItem_virtbase(QGraphicsPathItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem) { + *outptr_QAbstractGraphicsShapeItem = static_cast(src); } QPainterPath* QGraphicsPathItem_Path(const QGraphicsPathItem* self) { @@ -5294,46 +5283,32 @@ public: }; -void QGraphicsRectItem_new(QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(); - *outptr_QGraphicsRectItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsRectItem* QGraphicsRectItem_new() { + return new MiqtVirtualQGraphicsRectItem(); } -void QGraphicsRectItem_new2(QRectF* rect, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(*rect); - *outptr_QGraphicsRectItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsRectItem* QGraphicsRectItem_new2(QRectF* rect) { + return new MiqtVirtualQGraphicsRectItem(*rect); } -void QGraphicsRectItem_new3(double x, double y, double w, double h, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); - *outptr_QGraphicsRectItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsRectItem* QGraphicsRectItem_new3(double x, double y, double w, double h) { + return new MiqtVirtualQGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); } -void QGraphicsRectItem_new4(QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(parent); - *outptr_QGraphicsRectItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsRectItem* QGraphicsRectItem_new4(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsRectItem(parent); } -void QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(*rect, parent); - *outptr_QGraphicsRectItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsRectItem* QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsRectItem(*rect, parent); } -void QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsRectItem* ret = new MiqtVirtualQGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); - *outptr_QGraphicsRectItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsRectItem* QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsRectItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); +} + +void QGraphicsRectItem_virtbase(QGraphicsRectItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem) { + *outptr_QAbstractGraphicsShapeItem = static_cast(src); } QRectF* QGraphicsRectItem_Rect(const QGraphicsRectItem* self) { @@ -5717,46 +5692,32 @@ public: }; -void QGraphicsEllipseItem_new(QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(); - *outptr_QGraphicsEllipseItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsEllipseItem* QGraphicsEllipseItem_new() { + return new MiqtVirtualQGraphicsEllipseItem(); } -void QGraphicsEllipseItem_new2(QRectF* rect, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(*rect); - *outptr_QGraphicsEllipseItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsEllipseItem* QGraphicsEllipseItem_new2(QRectF* rect) { + return new MiqtVirtualQGraphicsEllipseItem(*rect); } -void QGraphicsEllipseItem_new3(double x, double y, double w, double h, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); - *outptr_QGraphicsEllipseItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsEllipseItem* QGraphicsEllipseItem_new3(double x, double y, double w, double h) { + return new MiqtVirtualQGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); } -void QGraphicsEllipseItem_new4(QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(parent); - *outptr_QGraphicsEllipseItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsEllipseItem* QGraphicsEllipseItem_new4(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsEllipseItem(parent); } -void QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(*rect, parent); - *outptr_QGraphicsEllipseItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsEllipseItem* QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsEllipseItem(*rect, parent); } -void QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsEllipseItem* ret = new MiqtVirtualQGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); - *outptr_QGraphicsEllipseItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsEllipseItem* QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsEllipseItem(static_cast(x), static_cast(y), static_cast(w), static_cast(h), parent); +} + +void QGraphicsEllipseItem_virtbase(QGraphicsEllipseItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem) { + *outptr_QAbstractGraphicsShapeItem = static_cast(src); } QRectF* QGraphicsEllipseItem_Rect(const QGraphicsEllipseItem* self) { @@ -6152,18 +6113,16 @@ public: }; -void QGraphicsPolygonItem_new(QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPolygonItem* ret = new MiqtVirtualQGraphicsPolygonItem(); - *outptr_QGraphicsPolygonItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPolygonItem* QGraphicsPolygonItem_new() { + return new MiqtVirtualQGraphicsPolygonItem(); } -void QGraphicsPolygonItem_new2(QGraphicsItem* parent, QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPolygonItem* ret = new MiqtVirtualQGraphicsPolygonItem(parent); - *outptr_QGraphicsPolygonItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPolygonItem* QGraphicsPolygonItem_new2(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsPolygonItem(parent); +} + +void QGraphicsPolygonItem_virtbase(QGraphicsPolygonItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem) { + *outptr_QAbstractGraphicsShapeItem = static_cast(src); } int QGraphicsPolygonItem_FillRule(const QGraphicsPolygonItem* self) { @@ -7150,40 +7109,32 @@ public: }; -void QGraphicsLineItem_new(QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(); - *outptr_QGraphicsLineItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsLineItem* QGraphicsLineItem_new() { + return new MiqtVirtualQGraphicsLineItem(); } -void QGraphicsLineItem_new2(QLineF* line, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(*line); - *outptr_QGraphicsLineItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsLineItem* QGraphicsLineItem_new2(QLineF* line) { + return new MiqtVirtualQGraphicsLineItem(*line); } -void QGraphicsLineItem_new3(double x1, double y1, double x2, double y2, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); - *outptr_QGraphicsLineItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsLineItem* QGraphicsLineItem_new3(double x1, double y1, double x2, double y2) { + return new MiqtVirtualQGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); } -void QGraphicsLineItem_new4(QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(parent); - *outptr_QGraphicsLineItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsLineItem* QGraphicsLineItem_new4(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsLineItem(parent); } -void QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(*line, parent); - *outptr_QGraphicsLineItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsLineItem* QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsLineItem(*line, parent); } -void QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsLineItem* ret = new MiqtVirtualQGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2), parent); - *outptr_QGraphicsLineItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsLineItem* QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsLineItem(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2), parent); +} + +void QGraphicsLineItem_virtbase(QGraphicsLineItem* src, QGraphicsItem** outptr_QGraphicsItem) { + *outptr_QGraphicsItem = static_cast(src); } QPen* QGraphicsLineItem_Pen(const QGraphicsLineItem* self) { @@ -8379,28 +8330,24 @@ public: }; -void QGraphicsPixmapItem_new(QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(); - *outptr_QGraphicsPixmapItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPixmapItem* QGraphicsPixmapItem_new() { + return new MiqtVirtualQGraphicsPixmapItem(); } -void QGraphicsPixmapItem_new2(QPixmap* pixmap, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(*pixmap); - *outptr_QGraphicsPixmapItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPixmapItem* QGraphicsPixmapItem_new2(QPixmap* pixmap) { + return new MiqtVirtualQGraphicsPixmapItem(*pixmap); } -void QGraphicsPixmapItem_new3(QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(parent); - *outptr_QGraphicsPixmapItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPixmapItem* QGraphicsPixmapItem_new3(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsPixmapItem(parent); } -void QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsPixmapItem* ret = new MiqtVirtualQGraphicsPixmapItem(*pixmap, parent); - *outptr_QGraphicsPixmapItem = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsPixmapItem* QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsPixmapItem(*pixmap, parent); +} + +void QGraphicsPixmapItem_virtbase(QGraphicsPixmapItem* src, QGraphicsItem** outptr_QGraphicsItem) { + *outptr_QGraphicsItem = static_cast(src); } QPixmap* QGraphicsPixmapItem_Pixmap(const QGraphicsPixmapItem* self) { @@ -9486,38 +9433,26 @@ public: }; -void QGraphicsTextItem_new(QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(); - *outptr_QGraphicsTextItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsTextItem* QGraphicsTextItem_new() { + return new MiqtVirtualQGraphicsTextItem(); } -void QGraphicsTextItem_new2(struct miqt_string text, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { +QGraphicsTextItem* QGraphicsTextItem_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(text_QString); - *outptr_QGraphicsTextItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); + return new MiqtVirtualQGraphicsTextItem(text_QString); } -void QGraphicsTextItem_new3(QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(parent); - *outptr_QGraphicsTextItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsTextItem* QGraphicsTextItem_new3(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsTextItem(parent); } -void QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { +QGraphicsTextItem* QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQGraphicsTextItem* ret = new MiqtVirtualQGraphicsTextItem(text_QString, parent); - *outptr_QGraphicsTextItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); + return new MiqtVirtualQGraphicsTextItem(text_QString, parent); +} + +void QGraphicsTextItem_virtbase(QGraphicsTextItem* src, QGraphicsObject** outptr_QGraphicsObject) { + *outptr_QGraphicsObject = static_cast(src); } QMetaObject* QGraphicsTextItem_MetaObject(const QGraphicsTextItem* self) { @@ -10228,34 +10163,26 @@ public: }; -void QGraphicsSimpleTextItem_new(QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(); - *outptr_QGraphicsSimpleTextItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new() { + return new MiqtVirtualQGraphicsSimpleTextItem(); } -void QGraphicsSimpleTextItem_new2(struct miqt_string text, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(text_QString); - *outptr_QGraphicsSimpleTextItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); + return new MiqtVirtualQGraphicsSimpleTextItem(text_QString); } -void QGraphicsSimpleTextItem_new3(QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(parent); - *outptr_QGraphicsSimpleTextItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new3(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsSimpleTextItem(parent); } -void QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem) { +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQGraphicsSimpleTextItem* ret = new MiqtVirtualQGraphicsSimpleTextItem(text_QString, parent); - *outptr_QGraphicsSimpleTextItem = ret; - *outptr_QAbstractGraphicsShapeItem = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); + return new MiqtVirtualQGraphicsSimpleTextItem(text_QString, parent); +} + +void QGraphicsSimpleTextItem_virtbase(QGraphicsSimpleTextItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem) { + *outptr_QAbstractGraphicsShapeItem = static_cast(src); } void QGraphicsSimpleTextItem_SetText(QGraphicsSimpleTextItem* self, struct miqt_string text) { @@ -11253,16 +11180,16 @@ public: }; -void QGraphicsItemGroup_new(QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsItemGroup* ret = new MiqtVirtualQGraphicsItemGroup(); - *outptr_QGraphicsItemGroup = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsItemGroup* QGraphicsItemGroup_new() { + return new MiqtVirtualQGraphicsItemGroup(); } -void QGraphicsItemGroup_new2(QGraphicsItem* parent, QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsItemGroup* ret = new MiqtVirtualQGraphicsItemGroup(parent); - *outptr_QGraphicsItemGroup = ret; - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsItemGroup* QGraphicsItemGroup_new2(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsItemGroup(parent); +} + +void QGraphicsItemGroup_virtbase(QGraphicsItemGroup* src, QGraphicsItem** outptr_QGraphicsItem) { + *outptr_QGraphicsItem = static_cast(src); } void QGraphicsItemGroup_AddToGroup(QGraphicsItemGroup* self, QGraphicsItem* item) { diff --git a/qt6/gen_qgraphicsitem.go b/qt6/gen_qgraphicsitem.go index 3466c0c2..88b34896 100644 --- a/qt6/gen_qgraphicsitem.go +++ b/qt6/gen_qgraphicsitem.go @@ -192,40 +192,33 @@ func newQGraphicsItem(h *C.QGraphicsItem) *QGraphicsItem { if h == nil { return nil } + return &QGraphicsItem{h: h} } // UnsafeNewQGraphicsItem constructs the type using only unsafe pointers. func UnsafeNewQGraphicsItem(h unsafe.Pointer) *QGraphicsItem { - if h == nil { - return nil - } - - return &QGraphicsItem{h: (*C.QGraphicsItem)(h)} + return newQGraphicsItem((*C.QGraphicsItem)(h)) } // NewQGraphicsItem constructs a new QGraphicsItem object. func NewQGraphicsItem() *QGraphicsItem { - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsItem_new(&outptr_QGraphicsItem) - ret := newQGraphicsItem(outptr_QGraphicsItem) + ret := newQGraphicsItem(C.QGraphicsItem_new()) ret.isSubclass = true return ret } // NewQGraphicsItem2 constructs a new QGraphicsItem object. func NewQGraphicsItem2(parent *QGraphicsItem) *QGraphicsItem { - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsItem_new2(parent.cPointer(), &outptr_QGraphicsItem) - ret := newQGraphicsItem(outptr_QGraphicsItem) + ret := newQGraphicsItem(C.QGraphicsItem_new2(parent.cPointer())) ret.isSubclass = true return ret } func (this *QGraphicsItem) Scene() *QGraphicsScene { - return newQGraphicsScene(C.QGraphicsItem_Scene(this.h), nil) + return newQGraphicsScene(C.QGraphicsItem_Scene(this.h)) } func (this *QGraphicsItem) ParentItem() *QGraphicsItem { @@ -237,19 +230,19 @@ func (this *QGraphicsItem) TopLevelItem() *QGraphicsItem { } func (this *QGraphicsItem) ParentObject() *QGraphicsObject { - return newQGraphicsObject(C.QGraphicsItem_ParentObject(this.h), nil, nil) + return newQGraphicsObject(C.QGraphicsItem_ParentObject(this.h)) } func (this *QGraphicsItem) ParentWidget() *QGraphicsWidget { - return newQGraphicsWidget(C.QGraphicsItem_ParentWidget(this.h), nil, nil, nil, nil) + return newQGraphicsWidget(C.QGraphicsItem_ParentWidget(this.h)) } func (this *QGraphicsItem) TopLevelWidget() *QGraphicsWidget { - return newQGraphicsWidget(C.QGraphicsItem_TopLevelWidget(this.h), nil, nil, nil, nil) + return newQGraphicsWidget(C.QGraphicsItem_TopLevelWidget(this.h)) } func (this *QGraphicsItem) Window() *QGraphicsWidget { - return newQGraphicsWidget(C.QGraphicsItem_Window(this.h), nil, nil, nil, nil) + return newQGraphicsWidget(C.QGraphicsItem_Window(this.h)) } func (this *QGraphicsItem) Panel() *QGraphicsItem { @@ -283,15 +276,15 @@ func (this *QGraphicsItem) IsPanel() bool { } func (this *QGraphicsItem) ToGraphicsObject() *QGraphicsObject { - return newQGraphicsObject(C.QGraphicsItem_ToGraphicsObject(this.h), nil, nil) + return newQGraphicsObject(C.QGraphicsItem_ToGraphicsObject(this.h)) } func (this *QGraphicsItem) ToGraphicsObject2() *QGraphicsObject { - return newQGraphicsObject(C.QGraphicsItem_ToGraphicsObject2(this.h), nil, nil) + return newQGraphicsObject(C.QGraphicsItem_ToGraphicsObject2(this.h)) } func (this *QGraphicsItem) Group() *QGraphicsItemGroup { - return newQGraphicsItemGroup(C.QGraphicsItem_Group(this.h), nil) + return newQGraphicsItemGroup(C.QGraphicsItem_Group(this.h)) } func (this *QGraphicsItem) SetGroup(group *QGraphicsItemGroup) { @@ -420,7 +413,7 @@ func (this *QGraphicsItem) SetOpacity(opacity float64) { } func (this *QGraphicsItem) GraphicsEffect() *QGraphicsEffect { - return newQGraphicsEffect(C.QGraphicsItem_GraphicsEffect(this.h), nil) + return newQGraphicsEffect(C.QGraphicsItem_GraphicsEffect(this.h)) } func (this *QGraphicsItem) SetGraphicsEffect(effect *QGraphicsEffect) { @@ -620,7 +613,7 @@ func (this *QGraphicsItem) Transformations() []*QGraphicsTransform { _ret := make([]*QGraphicsTransform, int(_ma.len)) _outCast := (*[0xffff]*C.QGraphicsTransform)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQGraphicsTransform(_outCast[i], nil) + _ret[i] = newQGraphicsTransform(_outCast[i]) } return _ret } @@ -1286,9 +1279,9 @@ func miqt_exec_callback_QGraphicsItem_Paint(self *C.QGraphicsItem, cb C.intptr_t // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc(slotval1, slotval2, slotval3) @@ -1397,7 +1390,7 @@ func miqt_exec_callback_QGraphicsItem_ContextMenuEvent(self *C.QGraphicsItem, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1423,7 +1416,7 @@ func miqt_exec_callback_QGraphicsItem_DragEnterEvent(self *C.QGraphicsItem, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1449,7 +1442,7 @@ func miqt_exec_callback_QGraphicsItem_DragLeaveEvent(self *C.QGraphicsItem, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1475,7 +1468,7 @@ func miqt_exec_callback_QGraphicsItem_DragMoveEvent(self *C.QGraphicsItem, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1501,7 +1494,7 @@ func miqt_exec_callback_QGraphicsItem_DropEvent(self *C.QGraphicsItem, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1527,7 +1520,7 @@ func miqt_exec_callback_QGraphicsItem_FocusInEvent(self *C.QGraphicsItem, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1553,7 +1546,7 @@ func miqt_exec_callback_QGraphicsItem_FocusOutEvent(self *C.QGraphicsItem, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1579,7 +1572,7 @@ func miqt_exec_callback_QGraphicsItem_HoverEnterEvent(self *C.QGraphicsItem, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -1605,7 +1598,7 @@ func miqt_exec_callback_QGraphicsItem_HoverMoveEvent(self *C.QGraphicsItem, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -1631,7 +1624,7 @@ func miqt_exec_callback_QGraphicsItem_HoverLeaveEvent(self *C.QGraphicsItem, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -1657,7 +1650,7 @@ func miqt_exec_callback_QGraphicsItem_KeyPressEvent(self *C.QGraphicsItem, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1683,7 +1676,7 @@ func miqt_exec_callback_QGraphicsItem_KeyReleaseEvent(self *C.QGraphicsItem, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1709,7 +1702,7 @@ func miqt_exec_callback_QGraphicsItem_MousePressEvent(self *C.QGraphicsItem, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1735,7 +1728,7 @@ func miqt_exec_callback_QGraphicsItem_MouseMoveEvent(self *C.QGraphicsItem, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1761,7 +1754,7 @@ func miqt_exec_callback_QGraphicsItem_MouseReleaseEvent(self *C.QGraphicsItem, c } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1787,7 +1780,7 @@ func miqt_exec_callback_QGraphicsItem_MouseDoubleClickEvent(self *C.QGraphicsIte } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1813,7 +1806,7 @@ func miqt_exec_callback_QGraphicsItem_WheelEvent(self *C.QGraphicsItem, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1839,7 +1832,7 @@ func miqt_exec_callback_QGraphicsItem_InputMethodEvent(self *C.QGraphicsItem, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -2029,46 +2022,36 @@ func (this *QGraphicsObject) UnsafePointer() unsafe.Pointer { } // newQGraphicsObject constructs the type using only CGO pointers. -func newQGraphicsObject(h *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsObject { +func newQGraphicsObject(h *C.QGraphicsObject) *QGraphicsObject { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QGraphicsItem *C.QGraphicsItem = nil + C.QGraphicsObject_virtbase(h, &outptr_QObject, &outptr_QGraphicsItem) + return &QGraphicsObject{h: h, - QObject: newQObject(h_QObject), - QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} + QObject: newQObject(outptr_QObject), + QGraphicsItem: newQGraphicsItem(outptr_QGraphicsItem)} } // UnsafeNewQGraphicsObject constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsObject(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsObject { - if h == nil { - return nil - } - - return &QGraphicsObject{h: (*C.QGraphicsObject)(h), - QObject: UnsafeNewQObject(h_QObject), - QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} +func UnsafeNewQGraphicsObject(h unsafe.Pointer) *QGraphicsObject { + return newQGraphicsObject((*C.QGraphicsObject)(h)) } // NewQGraphicsObject constructs a new QGraphicsObject object. func NewQGraphicsObject() *QGraphicsObject { - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsObject_new(&outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsObject(outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsObject(C.QGraphicsObject_new()) ret.isSubclass = true return ret } // NewQGraphicsObject2 constructs a new QGraphicsObject object. func NewQGraphicsObject2(parent *QGraphicsItem) *QGraphicsObject { - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsObject_new2(parent.cPointer(), &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsObject(outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsObject(C.QGraphicsObject_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -2408,7 +2391,7 @@ func miqt_exec_callback_QGraphicsObject_TimerEvent(self *C.QGraphicsObject, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -2434,7 +2417,7 @@ func miqt_exec_callback_QGraphicsObject_ChildEvent(self *C.QGraphicsObject, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -2749,9 +2732,9 @@ func miqt_exec_callback_QGraphicsObject_Paint(self *C.QGraphicsObject, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc(slotval1, slotval2, slotval3) @@ -2860,7 +2843,7 @@ func miqt_exec_callback_QGraphicsObject_ContextMenuEvent(self *C.QGraphicsObject } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -2886,7 +2869,7 @@ func miqt_exec_callback_QGraphicsObject_DragEnterEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -2912,7 +2895,7 @@ func miqt_exec_callback_QGraphicsObject_DragLeaveEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -2938,7 +2921,7 @@ func miqt_exec_callback_QGraphicsObject_DragMoveEvent(self *C.QGraphicsObject, c } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -2964,7 +2947,7 @@ func miqt_exec_callback_QGraphicsObject_DropEvent(self *C.QGraphicsObject, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_DropEvent, slotval1) @@ -2990,7 +2973,7 @@ func miqt_exec_callback_QGraphicsObject_FocusInEvent(self *C.QGraphicsObject, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -3016,7 +2999,7 @@ func miqt_exec_callback_QGraphicsObject_FocusOutEvent(self *C.QGraphicsObject, c } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -3042,7 +3025,7 @@ func miqt_exec_callback_QGraphicsObject_HoverEnterEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -3068,7 +3051,7 @@ func miqt_exec_callback_QGraphicsObject_HoverMoveEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -3094,7 +3077,7 @@ func miqt_exec_callback_QGraphicsObject_HoverLeaveEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -3120,7 +3103,7 @@ func miqt_exec_callback_QGraphicsObject_KeyPressEvent(self *C.QGraphicsObject, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -3146,7 +3129,7 @@ func miqt_exec_callback_QGraphicsObject_KeyReleaseEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -3172,7 +3155,7 @@ func miqt_exec_callback_QGraphicsObject_MousePressEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -3198,7 +3181,7 @@ func miqt_exec_callback_QGraphicsObject_MouseMoveEvent(self *C.QGraphicsObject, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -3224,7 +3207,7 @@ func miqt_exec_callback_QGraphicsObject_MouseReleaseEvent(self *C.QGraphicsObjec } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -3250,7 +3233,7 @@ func miqt_exec_callback_QGraphicsObject_MouseDoubleClickEvent(self *C.QGraphicsO } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -3276,7 +3259,7 @@ func miqt_exec_callback_QGraphicsObject_WheelEvent(self *C.QGraphicsObject, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -3302,7 +3285,7 @@ func miqt_exec_callback_QGraphicsObject_InputMethodEvent(self *C.QGraphicsObject } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsObject{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -3491,42 +3474,34 @@ func (this *QAbstractGraphicsShapeItem) UnsafePointer() unsafe.Pointer { } // newQAbstractGraphicsShapeItem constructs the type using only CGO pointers. -func newQAbstractGraphicsShapeItem(h *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QAbstractGraphicsShapeItem { +func newQAbstractGraphicsShapeItem(h *C.QAbstractGraphicsShapeItem) *QAbstractGraphicsShapeItem { if h == nil { return nil } + var outptr_QGraphicsItem *C.QGraphicsItem = nil + C.QAbstractGraphicsShapeItem_virtbase(h, &outptr_QGraphicsItem) + return &QAbstractGraphicsShapeItem{h: h, - QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} + QGraphicsItem: newQGraphicsItem(outptr_QGraphicsItem)} } // UnsafeNewQAbstractGraphicsShapeItem constructs the type using only unsafe pointers. -func UnsafeNewQAbstractGraphicsShapeItem(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QAbstractGraphicsShapeItem { - if h == nil { - return nil - } - - return &QAbstractGraphicsShapeItem{h: (*C.QAbstractGraphicsShapeItem)(h), - QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} +func UnsafeNewQAbstractGraphicsShapeItem(h unsafe.Pointer) *QAbstractGraphicsShapeItem { + return newQAbstractGraphicsShapeItem((*C.QAbstractGraphicsShapeItem)(h)) } // NewQAbstractGraphicsShapeItem constructs a new QAbstractGraphicsShapeItem object. func NewQAbstractGraphicsShapeItem() *QAbstractGraphicsShapeItem { - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QAbstractGraphicsShapeItem_new(&outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQAbstractGraphicsShapeItem(C.QAbstractGraphicsShapeItem_new()) ret.isSubclass = true return ret } // NewQAbstractGraphicsShapeItem2 constructs a new QAbstractGraphicsShapeItem object. func NewQAbstractGraphicsShapeItem2(parent *QGraphicsItem) *QAbstractGraphicsShapeItem { - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QAbstractGraphicsShapeItem_new2(parent.cPointer(), &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQAbstractGraphicsShapeItem(C.QAbstractGraphicsShapeItem_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -3792,9 +3767,9 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_Paint(self *C.QAbstractGraphi // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc(slotval1, slotval2, slotval3) @@ -3903,7 +3878,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_ContextMenuEvent(self *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -3929,7 +3904,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_DragEnterEvent(self *C.QAbstr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -3955,7 +3930,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_DragLeaveEvent(self *C.QAbstr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -3981,7 +3956,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_DragMoveEvent(self *C.QAbstra } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -4007,7 +3982,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_DropEvent(self *C.QAbstractGr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_DropEvent, slotval1) @@ -4033,7 +4008,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_FocusInEvent(self *C.QAbstrac } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -4059,7 +4034,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_FocusOutEvent(self *C.QAbstra } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -4085,7 +4060,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_HoverEnterEvent(self *C.QAbst } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -4111,7 +4086,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_HoverMoveEvent(self *C.QAbstr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -4137,7 +4112,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_HoverLeaveEvent(self *C.QAbst } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -4163,7 +4138,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_KeyPressEvent(self *C.QAbstra } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -4189,7 +4164,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_KeyReleaseEvent(self *C.QAbst } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -4215,7 +4190,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_MousePressEvent(self *C.QAbst } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -4241,7 +4216,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_MouseMoveEvent(self *C.QAbstr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -4267,7 +4242,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_MouseReleaseEvent(self *C.QAb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -4293,7 +4268,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_MouseDoubleClickEvent(self *C } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -4319,7 +4294,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_WheelEvent(self *C.QAbstractG } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -4345,7 +4320,7 @@ func miqt_exec_callback_QAbstractGraphicsShapeItem_InputMethodEvent(self *C.QAbs } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QAbstractGraphicsShapeItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -4534,68 +4509,50 @@ func (this *QGraphicsPathItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsPathItem constructs the type using only CGO pointers. -func newQGraphicsPathItem(h *C.QGraphicsPathItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsPathItem { +func newQGraphicsPathItem(h *C.QGraphicsPathItem) *QGraphicsPathItem { if h == nil { return nil } + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + C.QGraphicsPathItem_virtbase(h, &outptr_QAbstractGraphicsShapeItem) + return &QGraphicsPathItem{h: h, - QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem)} } // UnsafeNewQGraphicsPathItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsPathItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsPathItem { - if h == nil { - return nil - } - - return &QGraphicsPathItem{h: (*C.QGraphicsPathItem)(h), - QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} +func UnsafeNewQGraphicsPathItem(h unsafe.Pointer) *QGraphicsPathItem { + return newQGraphicsPathItem((*C.QGraphicsPathItem)(h)) } // NewQGraphicsPathItem constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem() *QGraphicsPathItem { - var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPathItem_new(&outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsPathItem(C.QGraphicsPathItem_new()) ret.isSubclass = true return ret } // NewQGraphicsPathItem2 constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem2(path *QPainterPath) *QGraphicsPathItem { - var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPathItem_new2(path.cPointer(), &outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsPathItem(C.QGraphicsPathItem_new2(path.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsPathItem3 constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem3(parent *QGraphicsItem) *QGraphicsPathItem { - var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPathItem_new3(parent.cPointer(), &outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsPathItem(C.QGraphicsPathItem_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsPathItem4 constructs a new QGraphicsPathItem object. func NewQGraphicsPathItem4(path *QPainterPath, parent *QGraphicsItem) *QGraphicsPathItem { - var outptr_QGraphicsPathItem *C.QGraphicsPathItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPathItem_new4(path.cPointer(), parent.cPointer(), &outptr_QGraphicsPathItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsPathItem(outptr_QGraphicsPathItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsPathItem(C.QGraphicsPathItem_new4(path.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -4748,9 +4705,9 @@ func miqt_exec_callback_QGraphicsPathItem_Paint(self *C.QGraphicsPathItem, cb C. // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsPathItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -4957,92 +4914,66 @@ func (this *QGraphicsRectItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsRectItem constructs the type using only CGO pointers. -func newQGraphicsRectItem(h *C.QGraphicsRectItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsRectItem { +func newQGraphicsRectItem(h *C.QGraphicsRectItem) *QGraphicsRectItem { if h == nil { return nil } + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + C.QGraphicsRectItem_virtbase(h, &outptr_QAbstractGraphicsShapeItem) + return &QGraphicsRectItem{h: h, - QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem)} } // UnsafeNewQGraphicsRectItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsRectItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsRectItem { - if h == nil { - return nil - } - - return &QGraphicsRectItem{h: (*C.QGraphicsRectItem)(h), - QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} +func UnsafeNewQGraphicsRectItem(h unsafe.Pointer) *QGraphicsRectItem { + return newQGraphicsRectItem((*C.QGraphicsRectItem)(h)) } // NewQGraphicsRectItem constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem() *QGraphicsRectItem { - var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsRectItem_new(&outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsRectItem(C.QGraphicsRectItem_new()) ret.isSubclass = true return ret } // NewQGraphicsRectItem2 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem2(rect *QRectF) *QGraphicsRectItem { - var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsRectItem_new2(rect.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsRectItem(C.QGraphicsRectItem_new2(rect.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsRectItem3 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem3(x float64, y float64, w float64, h float64) *QGraphicsRectItem { - var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsRectItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsRectItem(C.QGraphicsRectItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h))) ret.isSubclass = true return ret } // NewQGraphicsRectItem4 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem4(parent *QGraphicsItem) *QGraphicsRectItem { - var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsRectItem_new4(parent.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsRectItem(C.QGraphicsRectItem_new4(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsRectItem5 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem5(rect *QRectF, parent *QGraphicsItem) *QGraphicsRectItem { - var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsRectItem_new5(rect.cPointer(), parent.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsRectItem(C.QGraphicsRectItem_new5(rect.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsRectItem6 constructs a new QGraphicsRectItem object. func NewQGraphicsRectItem6(x float64, y float64, w float64, h float64, parent *QGraphicsItem) *QGraphicsRectItem { - var outptr_QGraphicsRectItem *C.QGraphicsRectItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsRectItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer(), &outptr_QGraphicsRectItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsRectItem(outptr_QGraphicsRectItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsRectItem(C.QGraphicsRectItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer())) ret.isSubclass = true return ret } @@ -5199,9 +5130,9 @@ func miqt_exec_callback_QGraphicsRectItem_Paint(self *C.QGraphicsRectItem, cb C. // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsRectItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -5408,92 +5339,66 @@ func (this *QGraphicsEllipseItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsEllipseItem constructs the type using only CGO pointers. -func newQGraphicsEllipseItem(h *C.QGraphicsEllipseItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsEllipseItem { +func newQGraphicsEllipseItem(h *C.QGraphicsEllipseItem) *QGraphicsEllipseItem { if h == nil { return nil } + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + C.QGraphicsEllipseItem_virtbase(h, &outptr_QAbstractGraphicsShapeItem) + return &QGraphicsEllipseItem{h: h, - QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem)} } // UnsafeNewQGraphicsEllipseItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsEllipseItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsEllipseItem { - if h == nil { - return nil - } - - return &QGraphicsEllipseItem{h: (*C.QGraphicsEllipseItem)(h), - QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} +func UnsafeNewQGraphicsEllipseItem(h unsafe.Pointer) *QGraphicsEllipseItem { + return newQGraphicsEllipseItem((*C.QGraphicsEllipseItem)(h)) } // NewQGraphicsEllipseItem constructs a new QGraphicsEllipseItem object. func NewQGraphicsEllipseItem() *QGraphicsEllipseItem { - var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsEllipseItem_new(&outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(C.QGraphicsEllipseItem_new()) ret.isSubclass = true return ret } // NewQGraphicsEllipseItem2 constructs a new QGraphicsEllipseItem object. func NewQGraphicsEllipseItem2(rect *QRectF) *QGraphicsEllipseItem { - var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsEllipseItem_new2(rect.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(C.QGraphicsEllipseItem_new2(rect.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsEllipseItem3 constructs a new QGraphicsEllipseItem object. func NewQGraphicsEllipseItem3(x float64, y float64, w float64, h float64) *QGraphicsEllipseItem { - var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsEllipseItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(C.QGraphicsEllipseItem_new3((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h))) ret.isSubclass = true return ret } // NewQGraphicsEllipseItem4 constructs a new QGraphicsEllipseItem object. func NewQGraphicsEllipseItem4(parent *QGraphicsItem) *QGraphicsEllipseItem { - var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsEllipseItem_new4(parent.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(C.QGraphicsEllipseItem_new4(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsEllipseItem5 constructs a new QGraphicsEllipseItem object. func NewQGraphicsEllipseItem5(rect *QRectF, parent *QGraphicsItem) *QGraphicsEllipseItem { - var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsEllipseItem_new5(rect.cPointer(), parent.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(C.QGraphicsEllipseItem_new5(rect.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsEllipseItem6 constructs a new QGraphicsEllipseItem object. func NewQGraphicsEllipseItem6(x float64, y float64, w float64, h float64, parent *QGraphicsItem) *QGraphicsEllipseItem { - var outptr_QGraphicsEllipseItem *C.QGraphicsEllipseItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsEllipseItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer(), &outptr_QGraphicsEllipseItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsEllipseItem(outptr_QGraphicsEllipseItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsEllipseItem(C.QGraphicsEllipseItem_new6((C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), parent.cPointer())) ret.isSubclass = true return ret } @@ -5666,9 +5571,9 @@ func miqt_exec_callback_QGraphicsEllipseItem_Paint(self *C.QGraphicsEllipseItem, // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsEllipseItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -5875,44 +5780,34 @@ func (this *QGraphicsPolygonItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsPolygonItem constructs the type using only CGO pointers. -func newQGraphicsPolygonItem(h *C.QGraphicsPolygonItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsPolygonItem { +func newQGraphicsPolygonItem(h *C.QGraphicsPolygonItem) *QGraphicsPolygonItem { if h == nil { return nil } + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + C.QGraphicsPolygonItem_virtbase(h, &outptr_QAbstractGraphicsShapeItem) + return &QGraphicsPolygonItem{h: h, - QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem)} } // UnsafeNewQGraphicsPolygonItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsPolygonItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsPolygonItem { - if h == nil { - return nil - } - - return &QGraphicsPolygonItem{h: (*C.QGraphicsPolygonItem)(h), - QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} +func UnsafeNewQGraphicsPolygonItem(h unsafe.Pointer) *QGraphicsPolygonItem { + return newQGraphicsPolygonItem((*C.QGraphicsPolygonItem)(h)) } // NewQGraphicsPolygonItem constructs a new QGraphicsPolygonItem object. func NewQGraphicsPolygonItem() *QGraphicsPolygonItem { - var outptr_QGraphicsPolygonItem *C.QGraphicsPolygonItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPolygonItem_new(&outptr_QGraphicsPolygonItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsPolygonItem(outptr_QGraphicsPolygonItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsPolygonItem(C.QGraphicsPolygonItem_new()) ret.isSubclass = true return ret } // NewQGraphicsPolygonItem2 constructs a new QGraphicsPolygonItem object. func NewQGraphicsPolygonItem2(parent *QGraphicsItem) *QGraphicsPolygonItem { - var outptr_QGraphicsPolygonItem *C.QGraphicsPolygonItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPolygonItem_new2(parent.cPointer(), &outptr_QGraphicsPolygonItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsPolygonItem(outptr_QGraphicsPolygonItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsPolygonItem(C.QGraphicsPolygonItem_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -6063,9 +5958,9 @@ func miqt_exec_callback_QGraphicsPolygonItem_Paint(self *C.QGraphicsPolygonItem, // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsPolygonItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -6272,86 +6167,66 @@ func (this *QGraphicsLineItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsLineItem constructs the type using only CGO pointers. -func newQGraphicsLineItem(h *C.QGraphicsLineItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsLineItem { +func newQGraphicsLineItem(h *C.QGraphicsLineItem) *QGraphicsLineItem { if h == nil { return nil } + var outptr_QGraphicsItem *C.QGraphicsItem = nil + C.QGraphicsLineItem_virtbase(h, &outptr_QGraphicsItem) + return &QGraphicsLineItem{h: h, - QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} + QGraphicsItem: newQGraphicsItem(outptr_QGraphicsItem)} } // UnsafeNewQGraphicsLineItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsLineItem(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsLineItem { - if h == nil { - return nil - } - - return &QGraphicsLineItem{h: (*C.QGraphicsLineItem)(h), - QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} +func UnsafeNewQGraphicsLineItem(h unsafe.Pointer) *QGraphicsLineItem { + return newQGraphicsLineItem((*C.QGraphicsLineItem)(h)) } // NewQGraphicsLineItem constructs a new QGraphicsLineItem object. func NewQGraphicsLineItem() *QGraphicsLineItem { - var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsLineItem_new(&outptr_QGraphicsLineItem, &outptr_QGraphicsItem) - ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret := newQGraphicsLineItem(C.QGraphicsLineItem_new()) ret.isSubclass = true return ret } // NewQGraphicsLineItem2 constructs a new QGraphicsLineItem object. func NewQGraphicsLineItem2(line *QLineF) *QGraphicsLineItem { - var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsLineItem_new2(line.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) - ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret := newQGraphicsLineItem(C.QGraphicsLineItem_new2(line.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsLineItem3 constructs a new QGraphicsLineItem object. func NewQGraphicsLineItem3(x1 float64, y1 float64, x2 float64, y2 float64) *QGraphicsLineItem { - var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsLineItem_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) - ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret := newQGraphicsLineItem(C.QGraphicsLineItem_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2))) ret.isSubclass = true return ret } // NewQGraphicsLineItem4 constructs a new QGraphicsLineItem object. func NewQGraphicsLineItem4(parent *QGraphicsItem) *QGraphicsLineItem { - var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsLineItem_new4(parent.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) - ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret := newQGraphicsLineItem(C.QGraphicsLineItem_new4(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsLineItem5 constructs a new QGraphicsLineItem object. func NewQGraphicsLineItem5(line *QLineF, parent *QGraphicsItem) *QGraphicsLineItem { - var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsLineItem_new5(line.cPointer(), parent.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) - ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret := newQGraphicsLineItem(C.QGraphicsLineItem_new5(line.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsLineItem6 constructs a new QGraphicsLineItem object. func NewQGraphicsLineItem6(x1 float64, y1 float64, x2 float64, y2 float64, parent *QGraphicsItem) *QGraphicsLineItem { - var outptr_QGraphicsLineItem *C.QGraphicsLineItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsLineItem_new6((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), parent.cPointer(), &outptr_QGraphicsLineItem, &outptr_QGraphicsItem) - ret := newQGraphicsLineItem(outptr_QGraphicsLineItem, outptr_QGraphicsItem) + ret := newQGraphicsLineItem(C.QGraphicsLineItem_new6((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), parent.cPointer())) ret.isSubclass = true return ret } @@ -6518,9 +6393,9 @@ func miqt_exec_callback_QGraphicsLineItem_Paint(self *C.QGraphicsLineItem, cb C. // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -6856,7 +6731,7 @@ func miqt_exec_callback_QGraphicsLineItem_ContextMenuEvent(self *C.QGraphicsLine } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -6882,7 +6757,7 @@ func miqt_exec_callback_QGraphicsLineItem_DragEnterEvent(self *C.QGraphicsLineIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -6908,7 +6783,7 @@ func miqt_exec_callback_QGraphicsLineItem_DragLeaveEvent(self *C.QGraphicsLineIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -6934,7 +6809,7 @@ func miqt_exec_callback_QGraphicsLineItem_DragMoveEvent(self *C.QGraphicsLineIte } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -6960,7 +6835,7 @@ func miqt_exec_callback_QGraphicsLineItem_DropEvent(self *C.QGraphicsLineItem, c } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_DropEvent, slotval1) @@ -6986,7 +6861,7 @@ func miqt_exec_callback_QGraphicsLineItem_FocusInEvent(self *C.QGraphicsLineItem } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -7012,7 +6887,7 @@ func miqt_exec_callback_QGraphicsLineItem_FocusOutEvent(self *C.QGraphicsLineIte } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -7038,7 +6913,7 @@ func miqt_exec_callback_QGraphicsLineItem_HoverEnterEvent(self *C.QGraphicsLineI } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -7064,7 +6939,7 @@ func miqt_exec_callback_QGraphicsLineItem_HoverMoveEvent(self *C.QGraphicsLineIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -7090,7 +6965,7 @@ func miqt_exec_callback_QGraphicsLineItem_HoverLeaveEvent(self *C.QGraphicsLineI } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -7116,7 +6991,7 @@ func miqt_exec_callback_QGraphicsLineItem_KeyPressEvent(self *C.QGraphicsLineIte } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -7142,7 +7017,7 @@ func miqt_exec_callback_QGraphicsLineItem_KeyReleaseEvent(self *C.QGraphicsLineI } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -7168,7 +7043,7 @@ func miqt_exec_callback_QGraphicsLineItem_MousePressEvent(self *C.QGraphicsLineI } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -7194,7 +7069,7 @@ func miqt_exec_callback_QGraphicsLineItem_MouseMoveEvent(self *C.QGraphicsLineIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -7220,7 +7095,7 @@ func miqt_exec_callback_QGraphicsLineItem_MouseReleaseEvent(self *C.QGraphicsLin } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -7246,7 +7121,7 @@ func miqt_exec_callback_QGraphicsLineItem_MouseDoubleClickEvent(self *C.QGraphic } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -7272,7 +7147,7 @@ func miqt_exec_callback_QGraphicsLineItem_WheelEvent(self *C.QGraphicsLineItem, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -7298,7 +7173,7 @@ func miqt_exec_callback_QGraphicsLineItem_InputMethodEvent(self *C.QGraphicsLine } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsLineItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -7401,70 +7276,56 @@ func (this *QGraphicsPixmapItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsPixmapItem constructs the type using only CGO pointers. -func newQGraphicsPixmapItem(h *C.QGraphicsPixmapItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsPixmapItem { +func newQGraphicsPixmapItem(h *C.QGraphicsPixmapItem) *QGraphicsPixmapItem { if h == nil { return nil } + var outptr_QGraphicsItem *C.QGraphicsItem = nil + C.QGraphicsPixmapItem_virtbase(h, &outptr_QGraphicsItem) + return &QGraphicsPixmapItem{h: h, - QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} + QGraphicsItem: newQGraphicsItem(outptr_QGraphicsItem)} } // UnsafeNewQGraphicsPixmapItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsPixmapItem(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsPixmapItem { - if h == nil { - return nil - } - - return &QGraphicsPixmapItem{h: (*C.QGraphicsPixmapItem)(h), - QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} +func UnsafeNewQGraphicsPixmapItem(h unsafe.Pointer) *QGraphicsPixmapItem { + return newQGraphicsPixmapItem((*C.QGraphicsPixmapItem)(h)) } // NewQGraphicsPixmapItem constructs a new QGraphicsPixmapItem object. func NewQGraphicsPixmapItem() *QGraphicsPixmapItem { - var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPixmapItem_new(&outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) - ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(C.QGraphicsPixmapItem_new()) ret.isSubclass = true return ret } // NewQGraphicsPixmapItem2 constructs a new QGraphicsPixmapItem object. func NewQGraphicsPixmapItem2(pixmap *QPixmap) *QGraphicsPixmapItem { - var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPixmapItem_new2(pixmap.cPointer(), &outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) - ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(C.QGraphicsPixmapItem_new2(pixmap.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsPixmapItem3 constructs a new QGraphicsPixmapItem object. func NewQGraphicsPixmapItem3(parent *QGraphicsItem) *QGraphicsPixmapItem { - var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPixmapItem_new3(parent.cPointer(), &outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) - ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(C.QGraphicsPixmapItem_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsPixmapItem4 constructs a new QGraphicsPixmapItem object. func NewQGraphicsPixmapItem4(pixmap *QPixmap, parent *QGraphicsItem) *QGraphicsPixmapItem { - var outptr_QGraphicsPixmapItem *C.QGraphicsPixmapItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsPixmapItem_new4(pixmap.cPointer(), parent.cPointer(), &outptr_QGraphicsPixmapItem, &outptr_QGraphicsItem) - ret := newQGraphicsPixmapItem(outptr_QGraphicsPixmapItem, outptr_QGraphicsItem) + ret := newQGraphicsPixmapItem(C.QGraphicsPixmapItem_new4(pixmap.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } func (this *QGraphicsPixmapItem) Pixmap() *QPixmap { - _goptr := newQPixmap(C.QGraphicsPixmapItem_Pixmap(this.h), nil) + _goptr := newQPixmap(C.QGraphicsPixmapItem_Pixmap(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -7641,9 +7502,9 @@ func miqt_exec_callback_QGraphicsPixmapItem_Paint(self *C.QGraphicsPixmapItem, c // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -7979,7 +7840,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_ContextMenuEvent(self *C.QGraphicsPi } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -8005,7 +7866,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_DragEnterEvent(self *C.QGraphicsPixm } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -8031,7 +7892,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_DragLeaveEvent(self *C.QGraphicsPixm } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -8057,7 +7918,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_DragMoveEvent(self *C.QGraphicsPixma } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -8083,7 +7944,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_DropEvent(self *C.QGraphicsPixmapIte } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_DropEvent, slotval1) @@ -8109,7 +7970,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_FocusInEvent(self *C.QGraphicsPixmap } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -8135,7 +7996,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_FocusOutEvent(self *C.QGraphicsPixma } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -8161,7 +8022,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_HoverEnterEvent(self *C.QGraphicsPix } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -8187,7 +8048,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_HoverMoveEvent(self *C.QGraphicsPixm } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -8213,7 +8074,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_HoverLeaveEvent(self *C.QGraphicsPix } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -8239,7 +8100,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_KeyPressEvent(self *C.QGraphicsPixma } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -8265,7 +8126,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_KeyReleaseEvent(self *C.QGraphicsPix } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -8291,7 +8152,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_MousePressEvent(self *C.QGraphicsPix } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -8317,7 +8178,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_MouseMoveEvent(self *C.QGraphicsPixm } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -8343,7 +8204,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_MouseReleaseEvent(self *C.QGraphicsP } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -8369,7 +8230,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_MouseDoubleClickEvent(self *C.QGraph } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -8395,7 +8256,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_WheelEvent(self *C.QGraphicsPixmapIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -8421,7 +8282,7 @@ func miqt_exec_callback_QGraphicsPixmapItem_InputMethodEvent(self *C.QGraphicsPi } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsPixmapItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -8524,33 +8385,26 @@ func (this *QGraphicsTextItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsTextItem constructs the type using only CGO pointers. -func newQGraphicsTextItem(h *C.QGraphicsTextItem, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsTextItem { +func newQGraphicsTextItem(h *C.QGraphicsTextItem) *QGraphicsTextItem { if h == nil { return nil } + var outptr_QGraphicsObject *C.QGraphicsObject = nil + C.QGraphicsTextItem_virtbase(h, &outptr_QGraphicsObject) + return &QGraphicsTextItem{h: h, - QGraphicsObject: newQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem)} + QGraphicsObject: newQGraphicsObject(outptr_QGraphicsObject)} } // UnsafeNewQGraphicsTextItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsTextItem(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsTextItem { - if h == nil { - return nil - } - - return &QGraphicsTextItem{h: (*C.QGraphicsTextItem)(h), - QGraphicsObject: UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem)} +func UnsafeNewQGraphicsTextItem(h unsafe.Pointer) *QGraphicsTextItem { + return newQGraphicsTextItem((*C.QGraphicsTextItem)(h)) } // NewQGraphicsTextItem constructs a new QGraphicsTextItem object. func NewQGraphicsTextItem() *QGraphicsTextItem { - var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsTextItem_new(&outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsTextItem(C.QGraphicsTextItem_new()) ret.isSubclass = true return ret } @@ -8561,26 +8415,16 @@ func NewQGraphicsTextItem2(text string) *QGraphicsTextItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsTextItem_new2(text_ms, &outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsTextItem(C.QGraphicsTextItem_new2(text_ms)) ret.isSubclass = true return ret } // NewQGraphicsTextItem3 constructs a new QGraphicsTextItem object. func NewQGraphicsTextItem3(parent *QGraphicsItem) *QGraphicsTextItem { - var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsTextItem_new3(parent.cPointer(), &outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsTextItem(C.QGraphicsTextItem_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -8591,13 +8435,8 @@ func NewQGraphicsTextItem4(text string, parent *QGraphicsItem) *QGraphicsTextIte text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QGraphicsTextItem *C.QGraphicsTextItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsTextItem_new4(text_ms, parent.cPointer(), &outptr_QGraphicsTextItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsTextItem(outptr_QGraphicsTextItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsTextItem(C.QGraphicsTextItem_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -8722,7 +8561,7 @@ func (this *QGraphicsTextItem) SetDocument(document *QTextDocument) { } func (this *QGraphicsTextItem) Document() *QTextDocument { - return newQTextDocument(C.QGraphicsTextItem_Document(this.h), nil) + return newQTextDocument(C.QGraphicsTextItem_Document(this.h)) } func (this *QGraphicsTextItem) SetTextInteractionFlags(flags TextInteractionFlag) { @@ -8939,9 +8778,9 @@ func miqt_exec_callback_QGraphicsTextItem_Paint(self *C.QGraphicsTextItem, cb C. // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -9075,7 +8914,7 @@ func miqt_exec_callback_QGraphicsTextItem_MousePressEvent(self *C.QGraphicsTextI } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -9101,7 +8940,7 @@ func miqt_exec_callback_QGraphicsTextItem_MouseMoveEvent(self *C.QGraphicsTextIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -9127,7 +8966,7 @@ func miqt_exec_callback_QGraphicsTextItem_MouseReleaseEvent(self *C.QGraphicsTex } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -9153,7 +8992,7 @@ func miqt_exec_callback_QGraphicsTextItem_MouseDoubleClickEvent(self *C.QGraphic } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -9179,7 +9018,7 @@ func miqt_exec_callback_QGraphicsTextItem_ContextMenuEvent(self *C.QGraphicsText } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -9205,7 +9044,7 @@ func miqt_exec_callback_QGraphicsTextItem_KeyPressEvent(self *C.QGraphicsTextIte } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -9231,7 +9070,7 @@ func miqt_exec_callback_QGraphicsTextItem_KeyReleaseEvent(self *C.QGraphicsTextI } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -9257,7 +9096,7 @@ func miqt_exec_callback_QGraphicsTextItem_FocusInEvent(self *C.QGraphicsTextItem } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -9283,7 +9122,7 @@ func miqt_exec_callback_QGraphicsTextItem_FocusOutEvent(self *C.QGraphicsTextIte } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -9309,7 +9148,7 @@ func miqt_exec_callback_QGraphicsTextItem_DragEnterEvent(self *C.QGraphicsTextIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -9335,7 +9174,7 @@ func miqt_exec_callback_QGraphicsTextItem_DragLeaveEvent(self *C.QGraphicsTextIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -9361,7 +9200,7 @@ func miqt_exec_callback_QGraphicsTextItem_DragMoveEvent(self *C.QGraphicsTextIte } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -9387,7 +9226,7 @@ func miqt_exec_callback_QGraphicsTextItem_DropEvent(self *C.QGraphicsTextItem, c } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_DropEvent, slotval1) @@ -9413,7 +9252,7 @@ func miqt_exec_callback_QGraphicsTextItem_InputMethodEvent(self *C.QGraphicsText } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -9439,7 +9278,7 @@ func miqt_exec_callback_QGraphicsTextItem_HoverEnterEvent(self *C.QGraphicsTextI } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -9465,7 +9304,7 @@ func miqt_exec_callback_QGraphicsTextItem_HoverMoveEvent(self *C.QGraphicsTextIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -9491,7 +9330,7 @@ func miqt_exec_callback_QGraphicsTextItem_HoverLeaveEvent(self *C.QGraphicsTextI } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsTextItem{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -9676,32 +9515,26 @@ func (this *QGraphicsSimpleTextItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsSimpleTextItem constructs the type using only CGO pointers. -func newQGraphicsSimpleTextItem(h *C.QGraphicsSimpleTextItem, h_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsSimpleTextItem { +func newQGraphicsSimpleTextItem(h *C.QGraphicsSimpleTextItem) *QGraphicsSimpleTextItem { if h == nil { return nil } + var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil + C.QGraphicsSimpleTextItem_virtbase(h, &outptr_QAbstractGraphicsShapeItem) + return &QGraphicsSimpleTextItem{h: h, - QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} + QAbstractGraphicsShapeItem: newQAbstractGraphicsShapeItem(outptr_QAbstractGraphicsShapeItem)} } // UnsafeNewQGraphicsSimpleTextItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSimpleTextItem(h unsafe.Pointer, h_QAbstractGraphicsShapeItem unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsSimpleTextItem { - if h == nil { - return nil - } - - return &QGraphicsSimpleTextItem{h: (*C.QGraphicsSimpleTextItem)(h), - QAbstractGraphicsShapeItem: UnsafeNewQAbstractGraphicsShapeItem(h_QAbstractGraphicsShapeItem, h_QGraphicsItem)} +func UnsafeNewQGraphicsSimpleTextItem(h unsafe.Pointer) *QGraphicsSimpleTextItem { + return newQGraphicsSimpleTextItem((*C.QGraphicsSimpleTextItem)(h)) } // NewQGraphicsSimpleTextItem constructs a new QGraphicsSimpleTextItem object. func NewQGraphicsSimpleTextItem() *QGraphicsSimpleTextItem { - var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSimpleTextItem_new(&outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(C.QGraphicsSimpleTextItem_new()) ret.isSubclass = true return ret } @@ -9712,24 +9545,16 @@ func NewQGraphicsSimpleTextItem2(text string) *QGraphicsSimpleTextItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSimpleTextItem_new2(text_ms, &outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(C.QGraphicsSimpleTextItem_new2(text_ms)) ret.isSubclass = true return ret } // NewQGraphicsSimpleTextItem3 constructs a new QGraphicsSimpleTextItem object. func NewQGraphicsSimpleTextItem3(parent *QGraphicsItem) *QGraphicsSimpleTextItem { - var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSimpleTextItem_new3(parent.cPointer(), &outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(C.QGraphicsSimpleTextItem_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -9740,12 +9565,8 @@ func NewQGraphicsSimpleTextItem4(text string, parent *QGraphicsItem) *QGraphicsS text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QGraphicsSimpleTextItem *C.QGraphicsSimpleTextItem = nil - var outptr_QAbstractGraphicsShapeItem *C.QAbstractGraphicsShapeItem = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSimpleTextItem_new4(text_ms, parent.cPointer(), &outptr_QGraphicsSimpleTextItem, &outptr_QAbstractGraphicsShapeItem, &outptr_QGraphicsItem) - ret := newQGraphicsSimpleTextItem(outptr_QGraphicsSimpleTextItem, outptr_QAbstractGraphicsShapeItem, outptr_QGraphicsItem) + ret := newQGraphicsSimpleTextItem(C.QGraphicsSimpleTextItem_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -9913,9 +9734,9 @@ func miqt_exec_callback_QGraphicsSimpleTextItem_Paint(self *C.QGraphicsSimpleTex // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsSimpleTextItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -10122,42 +9943,34 @@ func (this *QGraphicsItemGroup) UnsafePointer() unsafe.Pointer { } // newQGraphicsItemGroup constructs the type using only CGO pointers. -func newQGraphicsItemGroup(h *C.QGraphicsItemGroup, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsItemGroup { +func newQGraphicsItemGroup(h *C.QGraphicsItemGroup) *QGraphicsItemGroup { if h == nil { return nil } + var outptr_QGraphicsItem *C.QGraphicsItem = nil + C.QGraphicsItemGroup_virtbase(h, &outptr_QGraphicsItem) + return &QGraphicsItemGroup{h: h, - QGraphicsItem: newQGraphicsItem(h_QGraphicsItem)} + QGraphicsItem: newQGraphicsItem(outptr_QGraphicsItem)} } // UnsafeNewQGraphicsItemGroup constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsItemGroup(h unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsItemGroup { - if h == nil { - return nil - } - - return &QGraphicsItemGroup{h: (*C.QGraphicsItemGroup)(h), - QGraphicsItem: UnsafeNewQGraphicsItem(h_QGraphicsItem)} +func UnsafeNewQGraphicsItemGroup(h unsafe.Pointer) *QGraphicsItemGroup { + return newQGraphicsItemGroup((*C.QGraphicsItemGroup)(h)) } // NewQGraphicsItemGroup constructs a new QGraphicsItemGroup object. func NewQGraphicsItemGroup() *QGraphicsItemGroup { - var outptr_QGraphicsItemGroup *C.QGraphicsItemGroup = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsItemGroup_new(&outptr_QGraphicsItemGroup, &outptr_QGraphicsItem) - ret := newQGraphicsItemGroup(outptr_QGraphicsItemGroup, outptr_QGraphicsItem) + ret := newQGraphicsItemGroup(C.QGraphicsItemGroup_new()) ret.isSubclass = true return ret } // NewQGraphicsItemGroup2 constructs a new QGraphicsItemGroup object. func NewQGraphicsItemGroup2(parent *QGraphicsItem) *QGraphicsItemGroup { - var outptr_QGraphicsItemGroup *C.QGraphicsItemGroup = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsItemGroup_new2(parent.cPointer(), &outptr_QGraphicsItemGroup, &outptr_QGraphicsItem) - ret := newQGraphicsItemGroup(outptr_QGraphicsItemGroup, outptr_QGraphicsItem) + ret := newQGraphicsItemGroup(C.QGraphicsItemGroup_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -10243,9 +10056,9 @@ func miqt_exec_callback_QGraphicsItemGroup_Paint(self *C.QGraphicsItemGroup, cb // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -10550,7 +10363,7 @@ func miqt_exec_callback_QGraphicsItemGroup_ContextMenuEvent(self *C.QGraphicsIte } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -10576,7 +10389,7 @@ func miqt_exec_callback_QGraphicsItemGroup_DragEnterEvent(self *C.QGraphicsItemG } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -10602,7 +10415,7 @@ func miqt_exec_callback_QGraphicsItemGroup_DragLeaveEvent(self *C.QGraphicsItemG } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -10628,7 +10441,7 @@ func miqt_exec_callback_QGraphicsItemGroup_DragMoveEvent(self *C.QGraphicsItemGr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -10654,7 +10467,7 @@ func miqt_exec_callback_QGraphicsItemGroup_DropEvent(self *C.QGraphicsItemGroup, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_DropEvent, slotval1) @@ -10680,7 +10493,7 @@ func miqt_exec_callback_QGraphicsItemGroup_FocusInEvent(self *C.QGraphicsItemGro } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -10706,7 +10519,7 @@ func miqt_exec_callback_QGraphicsItemGroup_FocusOutEvent(self *C.QGraphicsItemGr } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -10732,7 +10545,7 @@ func miqt_exec_callback_QGraphicsItemGroup_HoverEnterEvent(self *C.QGraphicsItem } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -10758,7 +10571,7 @@ func miqt_exec_callback_QGraphicsItemGroup_HoverMoveEvent(self *C.QGraphicsItemG } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -10784,7 +10597,7 @@ func miqt_exec_callback_QGraphicsItemGroup_HoverLeaveEvent(self *C.QGraphicsItem } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -10810,7 +10623,7 @@ func miqt_exec_callback_QGraphicsItemGroup_KeyPressEvent(self *C.QGraphicsItemGr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -10836,7 +10649,7 @@ func miqt_exec_callback_QGraphicsItemGroup_KeyReleaseEvent(self *C.QGraphicsItem } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -10862,7 +10675,7 @@ func miqt_exec_callback_QGraphicsItemGroup_MousePressEvent(self *C.QGraphicsItem } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -10888,7 +10701,7 @@ func miqt_exec_callback_QGraphicsItemGroup_MouseMoveEvent(self *C.QGraphicsItemG } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -10914,7 +10727,7 @@ func miqt_exec_callback_QGraphicsItemGroup_MouseReleaseEvent(self *C.QGraphicsIt } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -10940,7 +10753,7 @@ func miqt_exec_callback_QGraphicsItemGroup_MouseDoubleClickEvent(self *C.QGraphi } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -10966,7 +10779,7 @@ func miqt_exec_callback_QGraphicsItemGroup_WheelEvent(self *C.QGraphicsItemGroup } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -10992,7 +10805,7 @@ func miqt_exec_callback_QGraphicsItemGroup_InputMethodEvent(self *C.QGraphicsIte } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsItemGroup{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qgraphicsitem.h b/qt6/gen_qgraphicsitem.h index 5b1a157c..b348c8ac 100644 --- a/qt6/gen_qgraphicsitem.h +++ b/qt6/gen_qgraphicsitem.h @@ -116,8 +116,8 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QGraphicsItem_new(QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsItem_new2(QGraphicsItem* parent, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsItem* QGraphicsItem_new(); +QGraphicsItem* QGraphicsItem_new2(QGraphicsItem* parent); QGraphicsScene* QGraphicsItem_Scene(const QGraphicsItem* self); QGraphicsItem* QGraphicsItem_ParentItem(const QGraphicsItem* self); QGraphicsItem* QGraphicsItem_TopLevelItem(const QGraphicsItem* self); @@ -390,8 +390,9 @@ void QGraphicsItem_override_virtual_Extension(void* self, intptr_t slot); QVariant* QGraphicsItem_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsItem_Delete(QGraphicsItem* self, bool isSubclass); -void QGraphicsObject_new(QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsObject_new2(QGraphicsItem* parent, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsObject* QGraphicsObject_new(); +QGraphicsObject* QGraphicsObject_new2(QGraphicsItem* parent); +void QGraphicsObject_virtbase(QGraphicsObject* src, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); QMetaObject* QGraphicsObject_MetaObject(const QGraphicsObject* self); void* QGraphicsObject_Metacast(QGraphicsObject* self, const char* param1); struct miqt_string QGraphicsObject_Tr(const char* s); @@ -511,8 +512,9 @@ void QGraphicsObject_override_virtual_Extension(void* self, intptr_t slot); QVariant* QGraphicsObject_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsObject_Delete(QGraphicsObject* self, bool isSubclass); -void QAbstractGraphicsShapeItem_new(QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QAbstractGraphicsShapeItem_new2(QGraphicsItem* parent, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +QAbstractGraphicsShapeItem* QAbstractGraphicsShapeItem_new(); +QAbstractGraphicsShapeItem* QAbstractGraphicsShapeItem_new2(QGraphicsItem* parent); +void QAbstractGraphicsShapeItem_virtbase(QAbstractGraphicsShapeItem* src, QGraphicsItem** outptr_QGraphicsItem); QPen* QAbstractGraphicsShapeItem_Pen(const QAbstractGraphicsShapeItem* self); void QAbstractGraphicsShapeItem_SetPen(QAbstractGraphicsShapeItem* self, QPen* pen); QBrush* QAbstractGraphicsShapeItem_Brush(const QAbstractGraphicsShapeItem* self); @@ -591,10 +593,11 @@ void QAbstractGraphicsShapeItem_override_virtual_Extension(void* self, intptr_t QVariant* QAbstractGraphicsShapeItem_virtualbase_Extension(const void* self, QVariant* variant); void QAbstractGraphicsShapeItem_Delete(QAbstractGraphicsShapeItem* self, bool isSubclass); -void QGraphicsPathItem_new(QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsPathItem_new2(QPainterPath* path, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsPathItem_new3(QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent, QGraphicsPathItem** outptr_QGraphicsPathItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsPathItem* QGraphicsPathItem_new(); +QGraphicsPathItem* QGraphicsPathItem_new2(QPainterPath* path); +QGraphicsPathItem* QGraphicsPathItem_new3(QGraphicsItem* parent); +QGraphicsPathItem* QGraphicsPathItem_new4(QPainterPath* path, QGraphicsItem* parent); +void QGraphicsPathItem_virtbase(QGraphicsPathItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem); QPainterPath* QGraphicsPathItem_Path(const QGraphicsPathItem* self); void QGraphicsPathItem_SetPath(QGraphicsPathItem* self, QPainterPath* path); QRectF* QGraphicsPathItem_BoundingRect(const QGraphicsPathItem* self); @@ -629,12 +632,13 @@ void QGraphicsPathItem_override_virtual_Extension(void* self, intptr_t slot); QVariant* QGraphicsPathItem_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsPathItem_Delete(QGraphicsPathItem* self, bool isSubclass); -void QGraphicsRectItem_new(QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsRectItem_new2(QRectF* rect, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsRectItem_new3(double x, double y, double w, double h, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsRectItem_new4(QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsRectItem** outptr_QGraphicsRectItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsRectItem* QGraphicsRectItem_new(); +QGraphicsRectItem* QGraphicsRectItem_new2(QRectF* rect); +QGraphicsRectItem* QGraphicsRectItem_new3(double x, double y, double w, double h); +QGraphicsRectItem* QGraphicsRectItem_new4(QGraphicsItem* parent); +QGraphicsRectItem* QGraphicsRectItem_new5(QRectF* rect, QGraphicsItem* parent); +QGraphicsRectItem* QGraphicsRectItem_new6(double x, double y, double w, double h, QGraphicsItem* parent); +void QGraphicsRectItem_virtbase(QGraphicsRectItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem); QRectF* QGraphicsRectItem_Rect(const QGraphicsRectItem* self); void QGraphicsRectItem_SetRect(QGraphicsRectItem* self, QRectF* rect); void QGraphicsRectItem_SetRect2(QGraphicsRectItem* self, double x, double y, double w, double h); @@ -670,12 +674,13 @@ void QGraphicsRectItem_override_virtual_Extension(void* self, intptr_t slot); QVariant* QGraphicsRectItem_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsRectItem_Delete(QGraphicsRectItem* self, bool isSubclass); -void QGraphicsEllipseItem_new(QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsEllipseItem_new2(QRectF* rect, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsEllipseItem_new3(double x, double y, double w, double h, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsEllipseItem_new4(QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent, QGraphicsEllipseItem** outptr_QGraphicsEllipseItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsEllipseItem* QGraphicsEllipseItem_new(); +QGraphicsEllipseItem* QGraphicsEllipseItem_new2(QRectF* rect); +QGraphicsEllipseItem* QGraphicsEllipseItem_new3(double x, double y, double w, double h); +QGraphicsEllipseItem* QGraphicsEllipseItem_new4(QGraphicsItem* parent); +QGraphicsEllipseItem* QGraphicsEllipseItem_new5(QRectF* rect, QGraphicsItem* parent); +QGraphicsEllipseItem* QGraphicsEllipseItem_new6(double x, double y, double w, double h, QGraphicsItem* parent); +void QGraphicsEllipseItem_virtbase(QGraphicsEllipseItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem); QRectF* QGraphicsEllipseItem_Rect(const QGraphicsEllipseItem* self); void QGraphicsEllipseItem_SetRect(QGraphicsEllipseItem* self, QRectF* rect); void QGraphicsEllipseItem_SetRect2(QGraphicsEllipseItem* self, double x, double y, double w, double h); @@ -715,8 +720,9 @@ void QGraphicsEllipseItem_override_virtual_Extension(void* self, intptr_t slot); QVariant* QGraphicsEllipseItem_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsEllipseItem_Delete(QGraphicsEllipseItem* self, bool isSubclass); -void QGraphicsPolygonItem_new(QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsPolygonItem_new2(QGraphicsItem* parent, QGraphicsPolygonItem** outptr_QGraphicsPolygonItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsPolygonItem* QGraphicsPolygonItem_new(); +QGraphicsPolygonItem* QGraphicsPolygonItem_new2(QGraphicsItem* parent); +void QGraphicsPolygonItem_virtbase(QGraphicsPolygonItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem); int QGraphicsPolygonItem_FillRule(const QGraphicsPolygonItem* self); void QGraphicsPolygonItem_SetFillRule(QGraphicsPolygonItem* self, int rule); QRectF* QGraphicsPolygonItem_BoundingRect(const QGraphicsPolygonItem* self); @@ -751,12 +757,13 @@ void QGraphicsPolygonItem_override_virtual_Extension(void* self, intptr_t slot); QVariant* QGraphicsPolygonItem_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsPolygonItem_Delete(QGraphicsPolygonItem* self, bool isSubclass); -void QGraphicsLineItem_new(QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsLineItem_new2(QLineF* line, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsLineItem_new3(double x1, double y1, double x2, double y2, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsLineItem_new4(QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent, QGraphicsLineItem** outptr_QGraphicsLineItem, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsLineItem* QGraphicsLineItem_new(); +QGraphicsLineItem* QGraphicsLineItem_new2(QLineF* line); +QGraphicsLineItem* QGraphicsLineItem_new3(double x1, double y1, double x2, double y2); +QGraphicsLineItem* QGraphicsLineItem_new4(QGraphicsItem* parent); +QGraphicsLineItem* QGraphicsLineItem_new5(QLineF* line, QGraphicsItem* parent); +QGraphicsLineItem* QGraphicsLineItem_new6(double x1, double y1, double x2, double y2, QGraphicsItem* parent); +void QGraphicsLineItem_virtbase(QGraphicsLineItem* src, QGraphicsItem** outptr_QGraphicsItem); QPen* QGraphicsLineItem_Pen(const QGraphicsLineItem* self); void QGraphicsLineItem_SetPen(QGraphicsLineItem* self, QPen* pen); QLineF* QGraphicsLineItem_Line(const QGraphicsLineItem* self); @@ -844,10 +851,11 @@ void QGraphicsLineItem_override_virtual_ItemChange(void* self, intptr_t slot); QVariant* QGraphicsLineItem_virtualbase_ItemChange(void* self, int change, QVariant* value); void QGraphicsLineItem_Delete(QGraphicsLineItem* self, bool isSubclass); -void QGraphicsPixmapItem_new(QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsPixmapItem_new2(QPixmap* pixmap, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsPixmapItem_new3(QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent, QGraphicsPixmapItem** outptr_QGraphicsPixmapItem, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsPixmapItem* QGraphicsPixmapItem_new(); +QGraphicsPixmapItem* QGraphicsPixmapItem_new2(QPixmap* pixmap); +QGraphicsPixmapItem* QGraphicsPixmapItem_new3(QGraphicsItem* parent); +QGraphicsPixmapItem* QGraphicsPixmapItem_new4(QPixmap* pixmap, QGraphicsItem* parent); +void QGraphicsPixmapItem_virtbase(QGraphicsPixmapItem* src, QGraphicsItem** outptr_QGraphicsItem); QPixmap* QGraphicsPixmapItem_Pixmap(const QGraphicsPixmapItem* self); void QGraphicsPixmapItem_SetPixmap(QGraphicsPixmapItem* self, QPixmap* pixmap); int QGraphicsPixmapItem_TransformationMode(const QGraphicsPixmapItem* self); @@ -939,10 +947,11 @@ void QGraphicsPixmapItem_override_virtual_ItemChange(void* self, intptr_t slot); QVariant* QGraphicsPixmapItem_virtualbase_ItemChange(void* self, int change, QVariant* value); void QGraphicsPixmapItem_Delete(QGraphicsPixmapItem* self, bool isSubclass); -void QGraphicsTextItem_new(QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsTextItem_new2(struct miqt_string text, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsTextItem_new3(QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsTextItem** outptr_QGraphicsTextItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsTextItem* QGraphicsTextItem_new(); +QGraphicsTextItem* QGraphicsTextItem_new2(struct miqt_string text); +QGraphicsTextItem* QGraphicsTextItem_new3(QGraphicsItem* parent); +QGraphicsTextItem* QGraphicsTextItem_new4(struct miqt_string text, QGraphicsItem* parent); +void QGraphicsTextItem_virtbase(QGraphicsTextItem* src, QGraphicsObject** outptr_QGraphicsObject); QMetaObject* QGraphicsTextItem_MetaObject(const QGraphicsTextItem* self); void* QGraphicsTextItem_Metacast(QGraphicsTextItem* self, const char* param1); struct miqt_string QGraphicsTextItem_Tr(const char* s); @@ -1064,10 +1073,11 @@ void QGraphicsTextItem_override_virtual_Event(void* self, intptr_t slot); bool QGraphicsTextItem_virtualbase_Event(void* self, QEvent* ev); void QGraphicsTextItem_Delete(QGraphicsTextItem* self, bool isSubclass); -void QGraphicsSimpleTextItem_new(QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsSimpleTextItem_new2(struct miqt_string text, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsSimpleTextItem_new3(QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent, QGraphicsSimpleTextItem** outptr_QGraphicsSimpleTextItem, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new(); +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new2(struct miqt_string text); +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new3(QGraphicsItem* parent); +QGraphicsSimpleTextItem* QGraphicsSimpleTextItem_new4(struct miqt_string text, QGraphicsItem* parent); +void QGraphicsSimpleTextItem_virtbase(QGraphicsSimpleTextItem* src, QAbstractGraphicsShapeItem** outptr_QAbstractGraphicsShapeItem); void QGraphicsSimpleTextItem_SetText(QGraphicsSimpleTextItem* self, struct miqt_string text); struct miqt_string QGraphicsSimpleTextItem_Text(const QGraphicsSimpleTextItem* self); void QGraphicsSimpleTextItem_SetFont(QGraphicsSimpleTextItem* self, QFont* font); @@ -1104,8 +1114,9 @@ void QGraphicsSimpleTextItem_override_virtual_Extension(void* self, intptr_t slo QVariant* QGraphicsSimpleTextItem_virtualbase_Extension(const void* self, QVariant* variant); void QGraphicsSimpleTextItem_Delete(QGraphicsSimpleTextItem* self, bool isSubclass); -void QGraphicsItemGroup_new(QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsItemGroup_new2(QGraphicsItem* parent, QGraphicsItemGroup** outptr_QGraphicsItemGroup, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsItemGroup* QGraphicsItemGroup_new(); +QGraphicsItemGroup* QGraphicsItemGroup_new2(QGraphicsItem* parent); +void QGraphicsItemGroup_virtbase(QGraphicsItemGroup* src, QGraphicsItem** outptr_QGraphicsItem); void QGraphicsItemGroup_AddToGroup(QGraphicsItemGroup* self, QGraphicsItem* item); void QGraphicsItemGroup_RemoveFromGroup(QGraphicsItemGroup* self, QGraphicsItem* item); QRectF* QGraphicsItemGroup_BoundingRect(const QGraphicsItemGroup* self); diff --git a/qt6/gen_qgraphicsitemanimation.cpp b/qt6/gen_qgraphicsitemanimation.cpp index a20d815a..557e5d1d 100644 --- a/qt6/gen_qgraphicsitemanimation.cpp +++ b/qt6/gen_qgraphicsitemanimation.cpp @@ -249,16 +249,16 @@ public: }; -void QGraphicsItemAnimation_new(QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject) { - MiqtVirtualQGraphicsItemAnimation* ret = new MiqtVirtualQGraphicsItemAnimation(); - *outptr_QGraphicsItemAnimation = ret; - *outptr_QObject = static_cast(ret); +QGraphicsItemAnimation* QGraphicsItemAnimation_new() { + return new MiqtVirtualQGraphicsItemAnimation(); } -void QGraphicsItemAnimation_new2(QObject* parent, QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject) { - MiqtVirtualQGraphicsItemAnimation* ret = new MiqtVirtualQGraphicsItemAnimation(parent); - *outptr_QGraphicsItemAnimation = ret; - *outptr_QObject = static_cast(ret); +QGraphicsItemAnimation* QGraphicsItemAnimation_new2(QObject* parent) { + return new MiqtVirtualQGraphicsItemAnimation(parent); +} + +void QGraphicsItemAnimation_virtbase(QGraphicsItemAnimation* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QGraphicsItemAnimation_MetaObject(const QGraphicsItemAnimation* self) { diff --git a/qt6/gen_qgraphicsitemanimation.go b/qt6/gen_qgraphicsitemanimation.go index 77e739e2..b52abb29 100644 --- a/qt6/gen_qgraphicsitemanimation.go +++ b/qt6/gen_qgraphicsitemanimation.go @@ -35,42 +35,34 @@ func (this *QGraphicsItemAnimation) UnsafePointer() unsafe.Pointer { } // newQGraphicsItemAnimation constructs the type using only CGO pointers. -func newQGraphicsItemAnimation(h *C.QGraphicsItemAnimation, h_QObject *C.QObject) *QGraphicsItemAnimation { +func newQGraphicsItemAnimation(h *C.QGraphicsItemAnimation) *QGraphicsItemAnimation { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QGraphicsItemAnimation_virtbase(h, &outptr_QObject) + return &QGraphicsItemAnimation{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQGraphicsItemAnimation constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsItemAnimation(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsItemAnimation { - if h == nil { - return nil - } - - return &QGraphicsItemAnimation{h: (*C.QGraphicsItemAnimation)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQGraphicsItemAnimation(h unsafe.Pointer) *QGraphicsItemAnimation { + return newQGraphicsItemAnimation((*C.QGraphicsItemAnimation)(h)) } // NewQGraphicsItemAnimation constructs a new QGraphicsItemAnimation object. func NewQGraphicsItemAnimation() *QGraphicsItemAnimation { - var outptr_QGraphicsItemAnimation *C.QGraphicsItemAnimation = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsItemAnimation_new(&outptr_QGraphicsItemAnimation, &outptr_QObject) - ret := newQGraphicsItemAnimation(outptr_QGraphicsItemAnimation, outptr_QObject) + ret := newQGraphicsItemAnimation(C.QGraphicsItemAnimation_new()) ret.isSubclass = true return ret } // NewQGraphicsItemAnimation2 constructs a new QGraphicsItemAnimation object. func NewQGraphicsItemAnimation2(parent *QObject) *QGraphicsItemAnimation { - var outptr_QGraphicsItemAnimation *C.QGraphicsItemAnimation = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsItemAnimation_new2(parent.cPointer(), &outptr_QGraphicsItemAnimation, &outptr_QObject) - ret := newQGraphicsItemAnimation(outptr_QGraphicsItemAnimation, outptr_QObject) + ret := newQGraphicsItemAnimation(C.QGraphicsItemAnimation_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -103,7 +95,7 @@ func (this *QGraphicsItemAnimation) SetItem(item *QGraphicsItem) { } func (this *QGraphicsItemAnimation) TimeLine() *QTimeLine { - return newQTimeLine(C.QGraphicsItemAnimation_TimeLine(this.h), nil) + return newQTimeLine(C.QGraphicsItemAnimation_TimeLine(this.h)) } func (this *QGraphicsItemAnimation) SetTimeLine(timeLine *QTimeLine) { @@ -468,7 +460,7 @@ func miqt_exec_callback_QGraphicsItemAnimation_TimerEvent(self *C.QGraphicsItemA } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -494,7 +486,7 @@ func miqt_exec_callback_QGraphicsItemAnimation_ChildEvent(self *C.QGraphicsItemA } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGraphicsItemAnimation{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qgraphicsitemanimation.h b/qt6/gen_qgraphicsitemanimation.h index 622a5f64..246e7cf6 100644 --- a/qt6/gen_qgraphicsitemanimation.h +++ b/qt6/gen_qgraphicsitemanimation.h @@ -40,8 +40,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QTransform QTransform; #endif -void QGraphicsItemAnimation_new(QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject); -void QGraphicsItemAnimation_new2(QObject* parent, QGraphicsItemAnimation** outptr_QGraphicsItemAnimation, QObject** outptr_QObject); +QGraphicsItemAnimation* QGraphicsItemAnimation_new(); +QGraphicsItemAnimation* QGraphicsItemAnimation_new2(QObject* parent); +void QGraphicsItemAnimation_virtbase(QGraphicsItemAnimation* src, QObject** outptr_QObject); QMetaObject* QGraphicsItemAnimation_MetaObject(const QGraphicsItemAnimation* self); void* QGraphicsItemAnimation_Metacast(QGraphicsItemAnimation* self, const char* param1); struct miqt_string QGraphicsItemAnimation_Tr(const char* s); diff --git a/qt6/gen_qgraphicslayout.cpp b/qt6/gen_qgraphicslayout.cpp index 496eb83c..41d0c61a 100644 --- a/qt6/gen_qgraphicslayout.cpp +++ b/qt6/gen_qgraphicslayout.cpp @@ -233,16 +233,16 @@ public: }; -void QGraphicsLayout_new(QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLayout* ret = new MiqtVirtualQGraphicsLayout(); - *outptr_QGraphicsLayout = ret; - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsLayout* QGraphicsLayout_new() { + return new MiqtVirtualQGraphicsLayout(); } -void QGraphicsLayout_new2(QGraphicsLayoutItem* parent, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLayout* ret = new MiqtVirtualQGraphicsLayout(parent); - *outptr_QGraphicsLayout = ret; - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsLayout* QGraphicsLayout_new2(QGraphicsLayoutItem* parent) { + return new MiqtVirtualQGraphicsLayout(parent); +} + +void QGraphicsLayout_virtbase(QGraphicsLayout* src, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + *outptr_QGraphicsLayoutItem = static_cast(src); } void QGraphicsLayout_SetContentsMargins(QGraphicsLayout* self, double left, double top, double right, double bottom) { diff --git a/qt6/gen_qgraphicslayout.go b/qt6/gen_qgraphicslayout.go index 8363c982..9feecc43 100644 --- a/qt6/gen_qgraphicslayout.go +++ b/qt6/gen_qgraphicslayout.go @@ -35,42 +35,34 @@ func (this *QGraphicsLayout) UnsafePointer() unsafe.Pointer { } // newQGraphicsLayout constructs the type using only CGO pointers. -func newQGraphicsLayout(h *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsLayout { +func newQGraphicsLayout(h *C.QGraphicsLayout) *QGraphicsLayout { if h == nil { return nil } + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + C.QGraphicsLayout_virtbase(h, &outptr_QGraphicsLayoutItem) + return &QGraphicsLayout{h: h, - QGraphicsLayoutItem: newQGraphicsLayoutItem(h_QGraphicsLayoutItem)} + QGraphicsLayoutItem: newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem)} } // UnsafeNewQGraphicsLayout constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsLayout(h unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsLayout { - if h == nil { - return nil - } - - return &QGraphicsLayout{h: (*C.QGraphicsLayout)(h), - QGraphicsLayoutItem: UnsafeNewQGraphicsLayoutItem(h_QGraphicsLayoutItem)} +func UnsafeNewQGraphicsLayout(h unsafe.Pointer) *QGraphicsLayout { + return newQGraphicsLayout((*C.QGraphicsLayout)(h)) } // NewQGraphicsLayout constructs a new QGraphicsLayout object. func NewQGraphicsLayout() *QGraphicsLayout { - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLayout_new(&outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLayout(outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayout(C.QGraphicsLayout_new()) ret.isSubclass = true return ret } // NewQGraphicsLayout2 constructs a new QGraphicsLayout object. func NewQGraphicsLayout2(parent *QGraphicsLayoutItem) *QGraphicsLayout { - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLayout_new2(parent.cPointer(), &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLayout(outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayout(C.QGraphicsLayout_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qgraphicslayout.h b/qt6/gen_qgraphicslayout.h index 1e015e7e..e03b3c88 100644 --- a/qt6/gen_qgraphicslayout.h +++ b/qt6/gen_qgraphicslayout.h @@ -28,8 +28,9 @@ typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; #endif -void QGraphicsLayout_new(QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsLayout_new2(QGraphicsLayoutItem* parent, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QGraphicsLayout* QGraphicsLayout_new(); +QGraphicsLayout* QGraphicsLayout_new2(QGraphicsLayoutItem* parent); +void QGraphicsLayout_virtbase(QGraphicsLayout* src, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); void QGraphicsLayout_SetContentsMargins(QGraphicsLayout* self, double left, double top, double right, double bottom); void QGraphicsLayout_GetContentsMargins(const QGraphicsLayout* self, double* left, double* top, double* right, double* bottom); void QGraphicsLayout_Activate(QGraphicsLayout* self); diff --git a/qt6/gen_qgraphicslayoutitem.cpp b/qt6/gen_qgraphicslayoutitem.cpp index 6796ba74..96d1f2e4 100644 --- a/qt6/gen_qgraphicslayoutitem.cpp +++ b/qt6/gen_qgraphicslayoutitem.cpp @@ -140,19 +140,16 @@ public: }; -void QGraphicsLayoutItem_new(QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLayoutItem* ret = new MiqtVirtualQGraphicsLayoutItem(); - *outptr_QGraphicsLayoutItem = ret; +QGraphicsLayoutItem* QGraphicsLayoutItem_new() { + return new MiqtVirtualQGraphicsLayoutItem(); } -void QGraphicsLayoutItem_new2(QGraphicsLayoutItem* parent, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLayoutItem* ret = new MiqtVirtualQGraphicsLayoutItem(parent); - *outptr_QGraphicsLayoutItem = ret; +QGraphicsLayoutItem* QGraphicsLayoutItem_new2(QGraphicsLayoutItem* parent) { + return new MiqtVirtualQGraphicsLayoutItem(parent); } -void QGraphicsLayoutItem_new3(QGraphicsLayoutItem* parent, bool isLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLayoutItem* ret = new MiqtVirtualQGraphicsLayoutItem(parent, isLayout); - *outptr_QGraphicsLayoutItem = ret; +QGraphicsLayoutItem* QGraphicsLayoutItem_new3(QGraphicsLayoutItem* parent, bool isLayout) { + return new MiqtVirtualQGraphicsLayoutItem(parent, isLayout); } void QGraphicsLayoutItem_SetSizePolicy(QGraphicsLayoutItem* self, QSizePolicy* policy) { diff --git a/qt6/gen_qgraphicslayoutitem.go b/qt6/gen_qgraphicslayoutitem.go index 8a731971..f2756d6b 100644 --- a/qt6/gen_qgraphicslayoutitem.go +++ b/qt6/gen_qgraphicslayoutitem.go @@ -38,44 +38,35 @@ func newQGraphicsLayoutItem(h *C.QGraphicsLayoutItem) *QGraphicsLayoutItem { if h == nil { return nil } + return &QGraphicsLayoutItem{h: h} } // UnsafeNewQGraphicsLayoutItem constructs the type using only unsafe pointers. func UnsafeNewQGraphicsLayoutItem(h unsafe.Pointer) *QGraphicsLayoutItem { - if h == nil { - return nil - } - - return &QGraphicsLayoutItem{h: (*C.QGraphicsLayoutItem)(h)} + return newQGraphicsLayoutItem((*C.QGraphicsLayoutItem)(h)) } // NewQGraphicsLayoutItem constructs a new QGraphicsLayoutItem object. func NewQGraphicsLayoutItem() *QGraphicsLayoutItem { - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLayoutItem_new(&outptr_QGraphicsLayoutItem) - ret := newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayoutItem(C.QGraphicsLayoutItem_new()) ret.isSubclass = true return ret } // NewQGraphicsLayoutItem2 constructs a new QGraphicsLayoutItem object. func NewQGraphicsLayoutItem2(parent *QGraphicsLayoutItem) *QGraphicsLayoutItem { - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLayoutItem_new2(parent.cPointer(), &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayoutItem(C.QGraphicsLayoutItem_new2(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsLayoutItem3 constructs a new QGraphicsLayoutItem object. func NewQGraphicsLayoutItem3(parent *QGraphicsLayoutItem, isLayout bool) *QGraphicsLayoutItem { - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLayoutItem_new3(parent.cPointer(), (C.bool)(isLayout), &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem) + ret := newQGraphicsLayoutItem(C.QGraphicsLayoutItem_new3(parent.cPointer(), (C.bool)(isLayout))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qgraphicslayoutitem.h b/qt6/gen_qgraphicslayoutitem.h index 3a54c8b2..9f548c50 100644 --- a/qt6/gen_qgraphicslayoutitem.h +++ b/qt6/gen_qgraphicslayoutitem.h @@ -28,9 +28,9 @@ typedef struct QSizeF QSizeF; typedef struct QSizePolicy QSizePolicy; #endif -void QGraphicsLayoutItem_new(QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsLayoutItem_new2(QGraphicsLayoutItem* parent, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsLayoutItem_new3(QGraphicsLayoutItem* parent, bool isLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QGraphicsLayoutItem* QGraphicsLayoutItem_new(); +QGraphicsLayoutItem* QGraphicsLayoutItem_new2(QGraphicsLayoutItem* parent); +QGraphicsLayoutItem* QGraphicsLayoutItem_new3(QGraphicsLayoutItem* parent, bool isLayout); void QGraphicsLayoutItem_SetSizePolicy(QGraphicsLayoutItem* self, QSizePolicy* policy); void QGraphicsLayoutItem_SetSizePolicy2(QGraphicsLayoutItem* self, int hPolicy, int vPolicy); QSizePolicy* QGraphicsLayoutItem_SizePolicy(const QGraphicsLayoutItem* self); diff --git a/qt6/gen_qgraphicslinearlayout.cpp b/qt6/gen_qgraphicslinearlayout.cpp index f7372267..673474f5 100644 --- a/qt6/gen_qgraphicslinearlayout.cpp +++ b/qt6/gen_qgraphicslinearlayout.cpp @@ -243,32 +243,24 @@ public: }; -void QGraphicsLinearLayout_new(QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(); - *outptr_QGraphicsLinearLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsLinearLayout* QGraphicsLinearLayout_new() { + return new MiqtVirtualQGraphicsLinearLayout(); } -void QGraphicsLinearLayout_new2(int orientation, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(static_cast(orientation)); - *outptr_QGraphicsLinearLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsLinearLayout* QGraphicsLinearLayout_new2(int orientation) { + return new MiqtVirtualQGraphicsLinearLayout(static_cast(orientation)); } -void QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(parent); - *outptr_QGraphicsLinearLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsLinearLayout* QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent) { + return new MiqtVirtualQGraphicsLinearLayout(parent); } -void QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsLinearLayout* ret = new MiqtVirtualQGraphicsLinearLayout(static_cast(orientation), parent); - *outptr_QGraphicsLinearLayout = ret; - *outptr_QGraphicsLayout = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsLinearLayout* QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent) { + return new MiqtVirtualQGraphicsLinearLayout(static_cast(orientation), parent); +} + +void QGraphicsLinearLayout_virtbase(QGraphicsLinearLayout* src, QGraphicsLayout** outptr_QGraphicsLayout) { + *outptr_QGraphicsLayout = static_cast(src); } void QGraphicsLinearLayout_SetOrientation(QGraphicsLinearLayout* self, int orientation) { diff --git a/qt6/gen_qgraphicslinearlayout.go b/qt6/gen_qgraphicslinearlayout.go index 84d3a8cf..f43ccc59 100644 --- a/qt6/gen_qgraphicslinearlayout.go +++ b/qt6/gen_qgraphicslinearlayout.go @@ -35,68 +35,50 @@ func (this *QGraphicsLinearLayout) UnsafePointer() unsafe.Pointer { } // newQGraphicsLinearLayout constructs the type using only CGO pointers. -func newQGraphicsLinearLayout(h *C.QGraphicsLinearLayout, h_QGraphicsLayout *C.QGraphicsLayout, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsLinearLayout { +func newQGraphicsLinearLayout(h *C.QGraphicsLinearLayout) *QGraphicsLinearLayout { if h == nil { return nil } + var outptr_QGraphicsLayout *C.QGraphicsLayout = nil + C.QGraphicsLinearLayout_virtbase(h, &outptr_QGraphicsLayout) + return &QGraphicsLinearLayout{h: h, - QGraphicsLayout: newQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} + QGraphicsLayout: newQGraphicsLayout(outptr_QGraphicsLayout)} } // UnsafeNewQGraphicsLinearLayout constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsLinearLayout(h unsafe.Pointer, h_QGraphicsLayout unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsLinearLayout { - if h == nil { - return nil - } - - return &QGraphicsLinearLayout{h: (*C.QGraphicsLinearLayout)(h), - QGraphicsLayout: UnsafeNewQGraphicsLayout(h_QGraphicsLayout, h_QGraphicsLayoutItem)} +func UnsafeNewQGraphicsLinearLayout(h unsafe.Pointer) *QGraphicsLinearLayout { + return newQGraphicsLinearLayout((*C.QGraphicsLinearLayout)(h)) } // NewQGraphicsLinearLayout constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout() *QGraphicsLinearLayout { - var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLinearLayout_new(&outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(C.QGraphicsLinearLayout_new()) ret.isSubclass = true return ret } // NewQGraphicsLinearLayout2 constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout2(orientation Orientation) *QGraphicsLinearLayout { - var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLinearLayout_new2((C.int)(orientation), &outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(C.QGraphicsLinearLayout_new2((C.int)(orientation))) ret.isSubclass = true return ret } // NewQGraphicsLinearLayout3 constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout3(parent *QGraphicsLayoutItem) *QGraphicsLinearLayout { - var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLinearLayout_new3(parent.cPointer(), &outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(C.QGraphicsLinearLayout_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsLinearLayout4 constructs a new QGraphicsLinearLayout object. func NewQGraphicsLinearLayout4(orientation Orientation, parent *QGraphicsLayoutItem) *QGraphicsLinearLayout { - var outptr_QGraphicsLinearLayout *C.QGraphicsLinearLayout = nil - var outptr_QGraphicsLayout *C.QGraphicsLayout = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsLinearLayout_new4((C.int)(orientation), parent.cPointer(), &outptr_QGraphicsLinearLayout, &outptr_QGraphicsLayout, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsLinearLayout(outptr_QGraphicsLinearLayout, outptr_QGraphicsLayout, outptr_QGraphicsLayoutItem) + ret := newQGraphicsLinearLayout(C.QGraphicsLinearLayout_new4((C.int)(orientation), parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qgraphicslinearlayout.h b/qt6/gen_qgraphicslinearlayout.h index e06d5566..f0f6695c 100644 --- a/qt6/gen_qgraphicslinearlayout.h +++ b/qt6/gen_qgraphicslinearlayout.h @@ -30,10 +30,11 @@ typedef struct QRectF QRectF; typedef struct QSizeF QSizeF; #endif -void QGraphicsLinearLayout_new(QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsLinearLayout_new2(int orientation, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent, QGraphicsLinearLayout** outptr_QGraphicsLinearLayout, QGraphicsLayout** outptr_QGraphicsLayout, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QGraphicsLinearLayout* QGraphicsLinearLayout_new(); +QGraphicsLinearLayout* QGraphicsLinearLayout_new2(int orientation); +QGraphicsLinearLayout* QGraphicsLinearLayout_new3(QGraphicsLayoutItem* parent); +QGraphicsLinearLayout* QGraphicsLinearLayout_new4(int orientation, QGraphicsLayoutItem* parent); +void QGraphicsLinearLayout_virtbase(QGraphicsLinearLayout* src, QGraphicsLayout** outptr_QGraphicsLayout); void QGraphicsLinearLayout_SetOrientation(QGraphicsLinearLayout* self, int orientation); int QGraphicsLinearLayout_Orientation(const QGraphicsLinearLayout* self); void QGraphicsLinearLayout_AddItem(QGraphicsLinearLayout* self, QGraphicsLayoutItem* item); diff --git a/qt6/gen_qgraphicsproxywidget.cpp b/qt6/gen_qgraphicsproxywidget.cpp index a4209f3a..3f095285 100644 --- a/qt6/gen_qgraphicsproxywidget.cpp +++ b/qt6/gen_qgraphicsproxywidget.cpp @@ -1217,34 +1217,20 @@ public: }; -void QGraphicsProxyWidget_new(QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsProxyWidget* ret = new MiqtVirtualQGraphicsProxyWidget(); - *outptr_QGraphicsProxyWidget = ret; - *outptr_QGraphicsWidget = static_cast(ret); - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsProxyWidget* QGraphicsProxyWidget_new() { + return new MiqtVirtualQGraphicsProxyWidget(); } -void QGraphicsProxyWidget_new2(QGraphicsItem* parent, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsProxyWidget* ret = new MiqtVirtualQGraphicsProxyWidget(parent); - *outptr_QGraphicsProxyWidget = ret; - *outptr_QGraphicsWidget = static_cast(ret); - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsProxyWidget* QGraphicsProxyWidget_new2(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsProxyWidget(parent); } -void QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsProxyWidget* ret = new MiqtVirtualQGraphicsProxyWidget(parent, static_cast(wFlags)); - *outptr_QGraphicsProxyWidget = ret; - *outptr_QGraphicsWidget = static_cast(ret); - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsProxyWidget* QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags) { + return new MiqtVirtualQGraphicsProxyWidget(parent, static_cast(wFlags)); +} + +void QGraphicsProxyWidget_virtbase(QGraphicsProxyWidget* src, QGraphicsWidget** outptr_QGraphicsWidget) { + *outptr_QGraphicsWidget = static_cast(src); } QMetaObject* QGraphicsProxyWidget_MetaObject(const QGraphicsProxyWidget* self) { diff --git a/qt6/gen_qgraphicsproxywidget.go b/qt6/gen_qgraphicsproxywidget.go index 2659b1af..4905c098 100644 --- a/qt6/gen_qgraphicsproxywidget.go +++ b/qt6/gen_qgraphicsproxywidget.go @@ -41,65 +41,42 @@ func (this *QGraphicsProxyWidget) UnsafePointer() unsafe.Pointer { } // newQGraphicsProxyWidget constructs the type using only CGO pointers. -func newQGraphicsProxyWidget(h *C.QGraphicsProxyWidget, h_QGraphicsWidget *C.QGraphicsWidget, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsProxyWidget { +func newQGraphicsProxyWidget(h *C.QGraphicsProxyWidget) *QGraphicsProxyWidget { if h == nil { return nil } + var outptr_QGraphicsWidget *C.QGraphicsWidget = nil + C.QGraphicsProxyWidget_virtbase(h, &outptr_QGraphicsWidget) + return &QGraphicsProxyWidget{h: h, - QGraphicsWidget: newQGraphicsWidget(h_QGraphicsWidget, h_QGraphicsObject, h_QObject, h_QGraphicsItem, h_QGraphicsLayoutItem)} + QGraphicsWidget: newQGraphicsWidget(outptr_QGraphicsWidget)} } // UnsafeNewQGraphicsProxyWidget constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsProxyWidget(h unsafe.Pointer, h_QGraphicsWidget unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsProxyWidget { - if h == nil { - return nil - } - - return &QGraphicsProxyWidget{h: (*C.QGraphicsProxyWidget)(h), - QGraphicsWidget: UnsafeNewQGraphicsWidget(h_QGraphicsWidget, h_QGraphicsObject, h_QObject, h_QGraphicsItem, h_QGraphicsLayoutItem)} +func UnsafeNewQGraphicsProxyWidget(h unsafe.Pointer) *QGraphicsProxyWidget { + return newQGraphicsProxyWidget((*C.QGraphicsProxyWidget)(h)) } // NewQGraphicsProxyWidget constructs a new QGraphicsProxyWidget object. func NewQGraphicsProxyWidget() *QGraphicsProxyWidget { - var outptr_QGraphicsProxyWidget *C.QGraphicsProxyWidget = nil - var outptr_QGraphicsWidget *C.QGraphicsWidget = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsProxyWidget_new(&outptr_QGraphicsProxyWidget, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsProxyWidget(outptr_QGraphicsProxyWidget, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret := newQGraphicsProxyWidget(C.QGraphicsProxyWidget_new()) ret.isSubclass = true return ret } // NewQGraphicsProxyWidget2 constructs a new QGraphicsProxyWidget object. func NewQGraphicsProxyWidget2(parent *QGraphicsItem) *QGraphicsProxyWidget { - var outptr_QGraphicsProxyWidget *C.QGraphicsProxyWidget = nil - var outptr_QGraphicsWidget *C.QGraphicsWidget = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsProxyWidget_new2(parent.cPointer(), &outptr_QGraphicsProxyWidget, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsProxyWidget(outptr_QGraphicsProxyWidget, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret := newQGraphicsProxyWidget(C.QGraphicsProxyWidget_new2(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsProxyWidget3 constructs a new QGraphicsProxyWidget object. func NewQGraphicsProxyWidget3(parent *QGraphicsItem, wFlags WindowType) *QGraphicsProxyWidget { - var outptr_QGraphicsProxyWidget *C.QGraphicsProxyWidget = nil - var outptr_QGraphicsWidget *C.QGraphicsWidget = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsProxyWidget_new3(parent.cPointer(), (C.int)(wFlags), &outptr_QGraphicsProxyWidget, &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsProxyWidget(outptr_QGraphicsProxyWidget, outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret := newQGraphicsProxyWidget(C.QGraphicsProxyWidget_new3(parent.cPointer(), (C.int)(wFlags))) ret.isSubclass = true return ret } @@ -128,7 +105,7 @@ func (this *QGraphicsProxyWidget) SetWidget(widget *QWidget) { } func (this *QGraphicsProxyWidget) Widget() *QWidget { - return newQWidget(C.QGraphicsProxyWidget_Widget(this.h), nil, nil) + return newQWidget(C.QGraphicsProxyWidget_Widget(this.h)) } func (this *QGraphicsProxyWidget) SubWidgetRect(widget *QWidget) *QRectF { @@ -150,7 +127,7 @@ func (this *QGraphicsProxyWidget) Type() int { } func (this *QGraphicsProxyWidget) CreateProxyForChildWidget(child *QWidget) *QGraphicsProxyWidget { - return newQGraphicsProxyWidget(C.QGraphicsProxyWidget_CreateProxyForChildWidget(this.h, child.cPointer()), nil, nil, nil, nil, nil) + return newQGraphicsProxyWidget(C.QGraphicsProxyWidget_CreateProxyForChildWidget(this.h, child.cPointer())) } func QGraphicsProxyWidget_Tr2(s string, c string) string { @@ -223,9 +200,9 @@ func miqt_exec_callback_QGraphicsProxyWidget_Paint(self *C.QGraphicsProxyWidget, // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -366,7 +343,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_ShowEvent(self *C.QGraphicsProxyWid } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -392,7 +369,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_HideEvent(self *C.QGraphicsProxyWid } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -418,7 +395,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_ContextMenuEvent(self *C.QGraphicsP } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -444,7 +421,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_DragEnterEvent(self *C.QGraphicsPro } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -470,7 +447,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_DragLeaveEvent(self *C.QGraphicsPro } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -496,7 +473,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_DragMoveEvent(self *C.QGraphicsProx } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -522,7 +499,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_DropEvent(self *C.QGraphicsProxyWid } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -548,7 +525,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_HoverEnterEvent(self *C.QGraphicsPr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HoverEnterEvent, slotval1) @@ -574,7 +551,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_HoverLeaveEvent(self *C.QGraphicsPr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) @@ -600,7 +577,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_HoverMoveEvent(self *C.QGraphicsPro } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -678,7 +655,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_MouseMoveEvent(self *C.QGraphicsPro } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -704,7 +681,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_MousePressEvent(self *C.QGraphicsPr } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -730,7 +707,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_MouseReleaseEvent(self *C.QGraphics } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -756,7 +733,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_MouseDoubleClickEvent(self *C.QGrap } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -782,7 +759,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_WheelEvent(self *C.QGraphicsProxyWi } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -808,7 +785,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_KeyPressEvent(self *C.QGraphicsProx } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -834,7 +811,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_KeyReleaseEvent(self *C.QGraphicsPr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -860,7 +837,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_FocusInEvent(self *C.QGraphicsProxy } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -886,7 +863,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_FocusOutEvent(self *C.QGraphicsProx } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -970,7 +947,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_InputMethodEvent(self *C.QGraphicsP } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -1028,7 +1005,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_ResizeEvent(self *C.QGraphicsProxyW } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneResizeEvent(event, nil, nil) + slotval1 := newQGraphicsSceneResizeEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1088,9 +1065,9 @@ func miqt_exec_callback_QGraphicsProxyWidget_PaintWindowFrame(self *C.QGraphicsP // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_PaintWindowFrame, slotval1, slotval2, slotval3) @@ -1367,7 +1344,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_CloseEvent(self *C.QGraphicsProxyWi } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1393,7 +1370,7 @@ func miqt_exec_callback_QGraphicsProxyWidget_MoveEvent(self *C.QGraphicsProxyWid } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMoveEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMoveEvent(event) gofunc((&QGraphicsProxyWidget{h: self}).callVirtualBase_MoveEvent, slotval1) diff --git a/qt6/gen_qgraphicsproxywidget.h b/qt6/gen_qgraphicsproxywidget.h index 70459810..0c9946fc 100644 --- a/qt6/gen_qgraphicsproxywidget.h +++ b/qt6/gen_qgraphicsproxywidget.h @@ -78,9 +78,10 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QGraphicsProxyWidget_new(QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsProxyWidget_new2(QGraphicsItem* parent, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsProxyWidget** outptr_QGraphicsProxyWidget, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QGraphicsProxyWidget* QGraphicsProxyWidget_new(); +QGraphicsProxyWidget* QGraphicsProxyWidget_new2(QGraphicsItem* parent); +QGraphicsProxyWidget* QGraphicsProxyWidget_new3(QGraphicsItem* parent, int wFlags); +void QGraphicsProxyWidget_virtbase(QGraphicsProxyWidget* src, QGraphicsWidget** outptr_QGraphicsWidget); QMetaObject* QGraphicsProxyWidget_MetaObject(const QGraphicsProxyWidget* self); void* QGraphicsProxyWidget_Metacast(QGraphicsProxyWidget* self, const char* param1); struct miqt_string QGraphicsProxyWidget_Tr(const char* s); diff --git a/qt6/gen_qgraphicsscene.cpp b/qt6/gen_qgraphicsscene.cpp index 9f0a0b6f..7a1882f8 100644 --- a/qt6/gen_qgraphicsscene.cpp +++ b/qt6/gen_qgraphicsscene.cpp @@ -717,40 +717,32 @@ public: }; -void QGraphicsScene_new(QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(); - *outptr_QGraphicsScene = ret; - *outptr_QObject = static_cast(ret); +QGraphicsScene* QGraphicsScene_new() { + return new MiqtVirtualQGraphicsScene(); } -void QGraphicsScene_new2(QRectF* sceneRect, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(*sceneRect); - *outptr_QGraphicsScene = ret; - *outptr_QObject = static_cast(ret); +QGraphicsScene* QGraphicsScene_new2(QRectF* sceneRect) { + return new MiqtVirtualQGraphicsScene(*sceneRect); } -void QGraphicsScene_new3(double x, double y, double width, double height, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height)); - *outptr_QGraphicsScene = ret; - *outptr_QObject = static_cast(ret); +QGraphicsScene* QGraphicsScene_new3(double x, double y, double width, double height) { + return new MiqtVirtualQGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height)); } -void QGraphicsScene_new4(QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(parent); - *outptr_QGraphicsScene = ret; - *outptr_QObject = static_cast(ret); +QGraphicsScene* QGraphicsScene_new4(QObject* parent) { + return new MiqtVirtualQGraphicsScene(parent); } -void QGraphicsScene_new5(QRectF* sceneRect, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(*sceneRect, parent); - *outptr_QGraphicsScene = ret; - *outptr_QObject = static_cast(ret); +QGraphicsScene* QGraphicsScene_new5(QRectF* sceneRect, QObject* parent) { + return new MiqtVirtualQGraphicsScene(*sceneRect, parent); } -void QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScene* ret = new MiqtVirtualQGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height), parent); - *outptr_QGraphicsScene = ret; - *outptr_QObject = static_cast(ret); +QGraphicsScene* QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent) { + return new MiqtVirtualQGraphicsScene(static_cast(x), static_cast(y), static_cast(width), static_cast(height), parent); +} + +void QGraphicsScene_virtbase(QGraphicsScene* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QGraphicsScene_MetaObject(const QGraphicsScene* self) { diff --git a/qt6/gen_qgraphicsscene.go b/qt6/gen_qgraphicsscene.go index d04a2e52..dfaa1e7d 100644 --- a/qt6/gen_qgraphicsscene.go +++ b/qt6/gen_qgraphicsscene.go @@ -51,86 +51,66 @@ func (this *QGraphicsScene) UnsafePointer() unsafe.Pointer { } // newQGraphicsScene constructs the type using only CGO pointers. -func newQGraphicsScene(h *C.QGraphicsScene, h_QObject *C.QObject) *QGraphicsScene { +func newQGraphicsScene(h *C.QGraphicsScene) *QGraphicsScene { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QGraphicsScene_virtbase(h, &outptr_QObject) + return &QGraphicsScene{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQGraphicsScene constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsScene(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsScene { - if h == nil { - return nil - } - - return &QGraphicsScene{h: (*C.QGraphicsScene)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQGraphicsScene(h unsafe.Pointer) *QGraphicsScene { + return newQGraphicsScene((*C.QGraphicsScene)(h)) } // NewQGraphicsScene constructs a new QGraphicsScene object. func NewQGraphicsScene() *QGraphicsScene { - var outptr_QGraphicsScene *C.QGraphicsScene = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScene_new(&outptr_QGraphicsScene, &outptr_QObject) - ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret := newQGraphicsScene(C.QGraphicsScene_new()) ret.isSubclass = true return ret } // NewQGraphicsScene2 constructs a new QGraphicsScene object. func NewQGraphicsScene2(sceneRect *QRectF) *QGraphicsScene { - var outptr_QGraphicsScene *C.QGraphicsScene = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScene_new2(sceneRect.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) - ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret := newQGraphicsScene(C.QGraphicsScene_new2(sceneRect.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsScene3 constructs a new QGraphicsScene object. func NewQGraphicsScene3(x float64, y float64, width float64, height float64) *QGraphicsScene { - var outptr_QGraphicsScene *C.QGraphicsScene = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScene_new3((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height), &outptr_QGraphicsScene, &outptr_QObject) - ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret := newQGraphicsScene(C.QGraphicsScene_new3((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height))) ret.isSubclass = true return ret } // NewQGraphicsScene4 constructs a new QGraphicsScene object. func NewQGraphicsScene4(parent *QObject) *QGraphicsScene { - var outptr_QGraphicsScene *C.QGraphicsScene = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScene_new4(parent.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) - ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret := newQGraphicsScene(C.QGraphicsScene_new4(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsScene5 constructs a new QGraphicsScene object. func NewQGraphicsScene5(sceneRect *QRectF, parent *QObject) *QGraphicsScene { - var outptr_QGraphicsScene *C.QGraphicsScene = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScene_new5(sceneRect.cPointer(), parent.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) - ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret := newQGraphicsScene(C.QGraphicsScene_new5(sceneRect.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsScene6 constructs a new QGraphicsScene object. func NewQGraphicsScene6(x float64, y float64, width float64, height float64, parent *QObject) *QGraphicsScene { - var outptr_QGraphicsScene *C.QGraphicsScene = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScene_new6((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height), parent.cPointer(), &outptr_QGraphicsScene, &outptr_QObject) - ret := newQGraphicsScene(outptr_QGraphicsScene, outptr_QObject) + ret := newQGraphicsScene(C.QGraphicsScene_new6((C.double)(x), (C.double)(y), (C.double)(width), (C.double)(height), parent.cPointer())) ret.isSubclass = true return ret } @@ -301,7 +281,7 @@ func (this *QGraphicsScene) CreateItemGroup(items []*QGraphicsItem) *QGraphicsIt items_CArray[i] = items[i].cPointer() } items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} - return newQGraphicsItemGroup(C.QGraphicsScene_CreateItemGroup(this.h, items_ma), nil) + return newQGraphicsItemGroup(C.QGraphicsScene_CreateItemGroup(this.h, items_ma)) } func (this *QGraphicsScene) DestroyItemGroup(group *QGraphicsItemGroup) { @@ -313,23 +293,23 @@ func (this *QGraphicsScene) AddItem(item *QGraphicsItem) { } func (this *QGraphicsScene) AddEllipse(rect *QRectF) *QGraphicsEllipseItem { - return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse(this.h, rect.cPointer()), nil, nil) + return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse(this.h, rect.cPointer())) } func (this *QGraphicsScene) AddLine(line *QLineF) *QGraphicsLineItem { - return newQGraphicsLineItem(C.QGraphicsScene_AddLine(this.h, line.cPointer()), nil) + return newQGraphicsLineItem(C.QGraphicsScene_AddLine(this.h, line.cPointer())) } func (this *QGraphicsScene) AddPath(path *QPainterPath) *QGraphicsPathItem { - return newQGraphicsPathItem(C.QGraphicsScene_AddPath(this.h, path.cPointer()), nil, nil) + return newQGraphicsPathItem(C.QGraphicsScene_AddPath(this.h, path.cPointer())) } func (this *QGraphicsScene) AddPixmap(pixmap *QPixmap) *QGraphicsPixmapItem { - return newQGraphicsPixmapItem(C.QGraphicsScene_AddPixmap(this.h, pixmap.cPointer()), nil) + return newQGraphicsPixmapItem(C.QGraphicsScene_AddPixmap(this.h, pixmap.cPointer())) } func (this *QGraphicsScene) AddRect(rect *QRectF) *QGraphicsRectItem { - return newQGraphicsRectItem(C.QGraphicsScene_AddRect(this.h, rect.cPointer()), nil, nil) + return newQGraphicsRectItem(C.QGraphicsScene_AddRect(this.h, rect.cPointer())) } func (this *QGraphicsScene) AddText(text string) *QGraphicsTextItem { @@ -337,7 +317,7 @@ func (this *QGraphicsScene) AddText(text string) *QGraphicsTextItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQGraphicsTextItem(C.QGraphicsScene_AddText(this.h, text_ms), nil, nil, nil) + return newQGraphicsTextItem(C.QGraphicsScene_AddText(this.h, text_ms)) } func (this *QGraphicsScene) AddSimpleText(text string) *QGraphicsSimpleTextItem { @@ -345,23 +325,23 @@ func (this *QGraphicsScene) AddSimpleText(text string) *QGraphicsSimpleTextItem text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQGraphicsSimpleTextItem(C.QGraphicsScene_AddSimpleText(this.h, text_ms), nil, nil) + return newQGraphicsSimpleTextItem(C.QGraphicsScene_AddSimpleText(this.h, text_ms)) } func (this *QGraphicsScene) AddWidget(widget *QWidget) *QGraphicsProxyWidget { - return newQGraphicsProxyWidget(C.QGraphicsScene_AddWidget(this.h, widget.cPointer()), nil, nil, nil, nil, nil) + return newQGraphicsProxyWidget(C.QGraphicsScene_AddWidget(this.h, widget.cPointer())) } func (this *QGraphicsScene) AddEllipse2(x float64, y float64, w float64, h float64) *QGraphicsEllipseItem { - return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)), nil, nil) + return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h))) } func (this *QGraphicsScene) AddLine2(x1 float64, y1 float64, x2 float64, y2 float64) *QGraphicsLineItem { - return newQGraphicsLineItem(C.QGraphicsScene_AddLine2(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2)), nil) + return newQGraphicsLineItem(C.QGraphicsScene_AddLine2(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2))) } func (this *QGraphicsScene) AddRect2(x float64, y float64, w float64, h float64) *QGraphicsRectItem { - return newQGraphicsRectItem(C.QGraphicsScene_AddRect2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h)), nil, nil) + return newQGraphicsRectItem(C.QGraphicsScene_AddRect2(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h))) } func (this *QGraphicsScene) RemoveItem(item *QGraphicsItem) { @@ -431,7 +411,7 @@ func (this *QGraphicsScene) Views() []*QGraphicsView { _ret := make([]*QGraphicsView, int(_ma.len)) _outCast := (*[0xffff]*C.QGraphicsView)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQGraphicsView(_outCast[i], nil, nil, nil, nil, nil) + _ret[i] = newQGraphicsView(_outCast[i]) } return _ret } @@ -445,7 +425,7 @@ func (this *QGraphicsScene) Invalidate(x float64, y float64, w float64, h float6 } func (this *QGraphicsScene) Style() *QStyle { - return newQStyle(C.QGraphicsScene_Style(this.h), nil) + return newQStyle(C.QGraphicsScene_Style(this.h)) } func (this *QGraphicsScene) SetStyle(style *QStyle) { @@ -485,7 +465,7 @@ func (this *QGraphicsScene) SetActivePanel(item *QGraphicsItem) { } func (this *QGraphicsScene) ActiveWindow() *QGraphicsWidget { - return newQGraphicsWidget(C.QGraphicsScene_ActiveWindow(this.h), nil, nil, nil, nil) + return newQGraphicsWidget(C.QGraphicsScene_ActiveWindow(this.h)) } func (this *QGraphicsScene) SetActiveWindow(widget *QGraphicsWidget) { @@ -794,31 +774,31 @@ func (this *QGraphicsScene) SetSelectionArea4(path *QPainterPath, selectionOpera } func (this *QGraphicsScene) AddEllipse22(rect *QRectF, pen *QPen) *QGraphicsEllipseItem { - return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse22(this.h, rect.cPointer(), pen.cPointer()), nil, nil) + return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse22(this.h, rect.cPointer(), pen.cPointer())) } func (this *QGraphicsScene) AddEllipse3(rect *QRectF, pen *QPen, brush *QBrush) *QGraphicsEllipseItem { - return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer()), nil, nil) + return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer())) } func (this *QGraphicsScene) AddLine22(line *QLineF, pen *QPen) *QGraphicsLineItem { - return newQGraphicsLineItem(C.QGraphicsScene_AddLine22(this.h, line.cPointer(), pen.cPointer()), nil) + return newQGraphicsLineItem(C.QGraphicsScene_AddLine22(this.h, line.cPointer(), pen.cPointer())) } func (this *QGraphicsScene) AddPath2(path *QPainterPath, pen *QPen) *QGraphicsPathItem { - return newQGraphicsPathItem(C.QGraphicsScene_AddPath2(this.h, path.cPointer(), pen.cPointer()), nil, nil) + return newQGraphicsPathItem(C.QGraphicsScene_AddPath2(this.h, path.cPointer(), pen.cPointer())) } func (this *QGraphicsScene) AddPath3(path *QPainterPath, pen *QPen, brush *QBrush) *QGraphicsPathItem { - return newQGraphicsPathItem(C.QGraphicsScene_AddPath3(this.h, path.cPointer(), pen.cPointer(), brush.cPointer()), nil, nil) + return newQGraphicsPathItem(C.QGraphicsScene_AddPath3(this.h, path.cPointer(), pen.cPointer(), brush.cPointer())) } func (this *QGraphicsScene) AddRect22(rect *QRectF, pen *QPen) *QGraphicsRectItem { - return newQGraphicsRectItem(C.QGraphicsScene_AddRect22(this.h, rect.cPointer(), pen.cPointer()), nil, nil) + return newQGraphicsRectItem(C.QGraphicsScene_AddRect22(this.h, rect.cPointer(), pen.cPointer())) } func (this *QGraphicsScene) AddRect3(rect *QRectF, pen *QPen, brush *QBrush) *QGraphicsRectItem { - return newQGraphicsRectItem(C.QGraphicsScene_AddRect3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer()), nil, nil) + return newQGraphicsRectItem(C.QGraphicsScene_AddRect3(this.h, rect.cPointer(), pen.cPointer(), brush.cPointer())) } func (this *QGraphicsScene) AddText2(text string, font *QFont) *QGraphicsTextItem { @@ -826,7 +806,7 @@ func (this *QGraphicsScene) AddText2(text string, font *QFont) *QGraphicsTextIte text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQGraphicsTextItem(C.QGraphicsScene_AddText2(this.h, text_ms, font.cPointer()), nil, nil, nil) + return newQGraphicsTextItem(C.QGraphicsScene_AddText2(this.h, text_ms, font.cPointer())) } func (this *QGraphicsScene) AddSimpleText2(text string, font *QFont) *QGraphicsSimpleTextItem { @@ -834,31 +814,31 @@ func (this *QGraphicsScene) AddSimpleText2(text string, font *QFont) *QGraphicsS text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQGraphicsSimpleTextItem(C.QGraphicsScene_AddSimpleText2(this.h, text_ms, font.cPointer()), nil, nil) + return newQGraphicsSimpleTextItem(C.QGraphicsScene_AddSimpleText2(this.h, text_ms, font.cPointer())) } func (this *QGraphicsScene) AddWidget2(widget *QWidget, wFlags WindowType) *QGraphicsProxyWidget { - return newQGraphicsProxyWidget(C.QGraphicsScene_AddWidget2(this.h, widget.cPointer(), (C.int)(wFlags)), nil, nil, nil, nil, nil) + return newQGraphicsProxyWidget(C.QGraphicsScene_AddWidget2(this.h, widget.cPointer(), (C.int)(wFlags))) } func (this *QGraphicsScene) AddEllipse5(x float64, y float64, w float64, h float64, pen *QPen) *QGraphicsEllipseItem { - return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer()), nil, nil) + return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer())) } func (this *QGraphicsScene) AddEllipse6(x float64, y float64, w float64, h float64, pen *QPen, brush *QBrush) *QGraphicsEllipseItem { - return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer()), nil, nil) + return newQGraphicsEllipseItem(C.QGraphicsScene_AddEllipse6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer())) } func (this *QGraphicsScene) AddLine5(x1 float64, y1 float64, x2 float64, y2 float64, pen *QPen) *QGraphicsLineItem { - return newQGraphicsLineItem(C.QGraphicsScene_AddLine5(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), pen.cPointer()), nil) + return newQGraphicsLineItem(C.QGraphicsScene_AddLine5(this.h, (C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), pen.cPointer())) } func (this *QGraphicsScene) AddRect5(x float64, y float64, w float64, h float64, pen *QPen) *QGraphicsRectItem { - return newQGraphicsRectItem(C.QGraphicsScene_AddRect5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer()), nil, nil) + return newQGraphicsRectItem(C.QGraphicsScene_AddRect5(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer())) } func (this *QGraphicsScene) AddRect6(x float64, y float64, w float64, h float64, pen *QPen, brush *QBrush) *QGraphicsRectItem { - return newQGraphicsRectItem(C.QGraphicsScene_AddRect6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer()), nil, nil) + return newQGraphicsRectItem(C.QGraphicsScene_AddRect6(this.h, (C.double)(x), (C.double)(y), (C.double)(w), (C.double)(h), pen.cPointer(), brush.cPointer())) } func (this *QGraphicsScene) SetFocusItem2(item *QGraphicsItem, focusReason FocusReason) { @@ -993,7 +973,7 @@ func miqt_exec_callback_QGraphicsScene_ContextMenuEvent(self *C.QGraphicsScene, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneContextMenuEvent(event, nil, nil) + slotval1 := newQGraphicsSceneContextMenuEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1019,7 +999,7 @@ func miqt_exec_callback_QGraphicsScene_DragEnterEvent(self *C.QGraphicsScene, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1045,7 +1025,7 @@ func miqt_exec_callback_QGraphicsScene_DragMoveEvent(self *C.QGraphicsScene, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1071,7 +1051,7 @@ func miqt_exec_callback_QGraphicsScene_DragLeaveEvent(self *C.QGraphicsScene, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1097,7 +1077,7 @@ func miqt_exec_callback_QGraphicsScene_DropEvent(self *C.QGraphicsScene, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneDragDropEvent(event, nil, nil) + slotval1 := newQGraphicsSceneDragDropEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1123,7 +1103,7 @@ func miqt_exec_callback_QGraphicsScene_FocusInEvent(self *C.QGraphicsScene, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1149,7 +1129,7 @@ func miqt_exec_callback_QGraphicsScene_FocusOutEvent(self *C.QGraphicsScene, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1175,7 +1155,7 @@ func miqt_exec_callback_QGraphicsScene_HelpEvent(self *C.QGraphicsScene, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHelpEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHelpEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_HelpEvent, slotval1) @@ -1201,7 +1181,7 @@ func miqt_exec_callback_QGraphicsScene_KeyPressEvent(self *C.QGraphicsScene, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1227,7 +1207,7 @@ func miqt_exec_callback_QGraphicsScene_KeyReleaseEvent(self *C.QGraphicsScene, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1253,7 +1233,7 @@ func miqt_exec_callback_QGraphicsScene_MousePressEvent(self *C.QGraphicsScene, c } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1279,7 +1259,7 @@ func miqt_exec_callback_QGraphicsScene_MouseMoveEvent(self *C.QGraphicsScene, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1305,7 +1285,7 @@ func miqt_exec_callback_QGraphicsScene_MouseReleaseEvent(self *C.QGraphicsScene, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1331,7 +1311,7 @@ func miqt_exec_callback_QGraphicsScene_MouseDoubleClickEvent(self *C.QGraphicsSc } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMouseEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMouseEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1357,7 +1337,7 @@ func miqt_exec_callback_QGraphicsScene_WheelEvent(self *C.QGraphicsScene, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneWheelEvent(event, nil, nil) + slotval1 := newQGraphicsSceneWheelEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1383,7 +1363,7 @@ func miqt_exec_callback_QGraphicsScene_InputMethodEvent(self *C.QGraphicsScene, } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -1493,7 +1473,7 @@ func miqt_exec_callback_QGraphicsScene_TimerEvent(self *C.QGraphicsScene, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1519,7 +1499,7 @@ func miqt_exec_callback_QGraphicsScene_ChildEvent(self *C.QGraphicsScene, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGraphicsScene{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qgraphicsscene.h b/qt6/gen_qgraphicsscene.h index f0a8eb1d..c054de6a 100644 --- a/qt6/gen_qgraphicsscene.h +++ b/qt6/gen_qgraphicsscene.h @@ -100,12 +100,13 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QGraphicsScene_new(QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); -void QGraphicsScene_new2(QRectF* sceneRect, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); -void QGraphicsScene_new3(double x, double y, double width, double height, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); -void QGraphicsScene_new4(QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); -void QGraphicsScene_new5(QRectF* sceneRect, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); -void QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent, QGraphicsScene** outptr_QGraphicsScene, QObject** outptr_QObject); +QGraphicsScene* QGraphicsScene_new(); +QGraphicsScene* QGraphicsScene_new2(QRectF* sceneRect); +QGraphicsScene* QGraphicsScene_new3(double x, double y, double width, double height); +QGraphicsScene* QGraphicsScene_new4(QObject* parent); +QGraphicsScene* QGraphicsScene_new5(QRectF* sceneRect, QObject* parent); +QGraphicsScene* QGraphicsScene_new6(double x, double y, double width, double height, QObject* parent); +void QGraphicsScene_virtbase(QGraphicsScene* src, QObject** outptr_QObject); QMetaObject* QGraphicsScene_MetaObject(const QGraphicsScene* self); void* QGraphicsScene_Metacast(QGraphicsScene* self, const char* param1); struct miqt_string QGraphicsScene_Tr(const char* s); diff --git a/qt6/gen_qgraphicssceneevent.cpp b/qt6/gen_qgraphicssceneevent.cpp index 943e76d5..c7be2db8 100644 --- a/qt6/gen_qgraphicssceneevent.cpp +++ b/qt6/gen_qgraphicssceneevent.cpp @@ -72,10 +72,12 @@ public: }; -void QGraphicsSceneEvent_new(int typeVal, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - MiqtVirtualQGraphicsSceneEvent* ret = new MiqtVirtualQGraphicsSceneEvent(static_cast(typeVal)); - *outptr_QGraphicsSceneEvent = ret; - *outptr_QEvent = static_cast(ret); +QGraphicsSceneEvent* QGraphicsSceneEvent_new(int typeVal) { + return new MiqtVirtualQGraphicsSceneEvent(static_cast(typeVal)); +} + +void QGraphicsSceneEvent_virtbase(QGraphicsSceneEvent* src, QEvent** outptr_QEvent) { + *outptr_QEvent = static_cast(src); } QWidget* QGraphicsSceneEvent_Widget(const QGraphicsSceneEvent* self) { @@ -119,18 +121,16 @@ void QGraphicsSceneEvent_Delete(QGraphicsSceneEvent* self, bool isSubclass) { } } -void QGraphicsSceneMouseEvent_new(QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneMouseEvent* ret = new QGraphicsSceneMouseEvent(); - *outptr_QGraphicsSceneMouseEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new() { + return new QGraphicsSceneMouseEvent(); } -void QGraphicsSceneMouseEvent_new2(int typeVal, QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneMouseEvent* ret = new QGraphicsSceneMouseEvent(static_cast(typeVal)); - *outptr_QGraphicsSceneMouseEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new2(int typeVal) { + return new QGraphicsSceneMouseEvent(static_cast(typeVal)); +} + +void QGraphicsSceneMouseEvent_virtbase(QGraphicsSceneMouseEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QPointF* QGraphicsSceneMouseEvent_Pos(const QGraphicsSceneMouseEvent* self) { @@ -258,18 +258,16 @@ void QGraphicsSceneMouseEvent_Delete(QGraphicsSceneMouseEvent* self, bool isSubc } } -void QGraphicsSceneWheelEvent_new(QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneWheelEvent* ret = new QGraphicsSceneWheelEvent(); - *outptr_QGraphicsSceneWheelEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new() { + return new QGraphicsSceneWheelEvent(); } -void QGraphicsSceneWheelEvent_new2(int typeVal, QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneWheelEvent* ret = new QGraphicsSceneWheelEvent(static_cast(typeVal)); - *outptr_QGraphicsSceneWheelEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new2(int typeVal) { + return new QGraphicsSceneWheelEvent(static_cast(typeVal)); +} + +void QGraphicsSceneWheelEvent_virtbase(QGraphicsSceneWheelEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QPointF* QGraphicsSceneWheelEvent_Pos(const QGraphicsSceneWheelEvent* self) { @@ -364,18 +362,16 @@ void QGraphicsSceneWheelEvent_Delete(QGraphicsSceneWheelEvent* self, bool isSubc } } -void QGraphicsSceneContextMenuEvent_new(QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneContextMenuEvent* ret = new QGraphicsSceneContextMenuEvent(); - *outptr_QGraphicsSceneContextMenuEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new() { + return new QGraphicsSceneContextMenuEvent(); } -void QGraphicsSceneContextMenuEvent_new2(int typeVal, QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneContextMenuEvent* ret = new QGraphicsSceneContextMenuEvent(static_cast(typeVal)); - *outptr_QGraphicsSceneContextMenuEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new2(int typeVal) { + return new QGraphicsSceneContextMenuEvent(static_cast(typeVal)); +} + +void QGraphicsSceneContextMenuEvent_virtbase(QGraphicsSceneContextMenuEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QPointF* QGraphicsSceneContextMenuEvent_Pos(const QGraphicsSceneContextMenuEvent* self) { @@ -428,18 +424,16 @@ void QGraphicsSceneContextMenuEvent_Delete(QGraphicsSceneContextMenuEvent* self, } } -void QGraphicsSceneHoverEvent_new(QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneHoverEvent* ret = new QGraphicsSceneHoverEvent(); - *outptr_QGraphicsSceneHoverEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new() { + return new QGraphicsSceneHoverEvent(); } -void QGraphicsSceneHoverEvent_new2(int typeVal, QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneHoverEvent* ret = new QGraphicsSceneHoverEvent(static_cast(typeVal)); - *outptr_QGraphicsSceneHoverEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new2(int typeVal) { + return new QGraphicsSceneHoverEvent(static_cast(typeVal)); +} + +void QGraphicsSceneHoverEvent_virtbase(QGraphicsSceneHoverEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QPointF* QGraphicsSceneHoverEvent_Pos(const QGraphicsSceneHoverEvent* self) { @@ -507,18 +501,16 @@ void QGraphicsSceneHoverEvent_Delete(QGraphicsSceneHoverEvent* self, bool isSubc } } -void QGraphicsSceneHelpEvent_new(QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneHelpEvent* ret = new QGraphicsSceneHelpEvent(); - *outptr_QGraphicsSceneHelpEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new() { + return new QGraphicsSceneHelpEvent(); } -void QGraphicsSceneHelpEvent_new2(int typeVal, QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneHelpEvent* ret = new QGraphicsSceneHelpEvent(static_cast(typeVal)); - *outptr_QGraphicsSceneHelpEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new2(int typeVal) { + return new QGraphicsSceneHelpEvent(static_cast(typeVal)); +} + +void QGraphicsSceneHelpEvent_virtbase(QGraphicsSceneHelpEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QPointF* QGraphicsSceneHelpEvent_ScenePos(const QGraphicsSceneHelpEvent* self) { @@ -545,18 +537,16 @@ void QGraphicsSceneHelpEvent_Delete(QGraphicsSceneHelpEvent* self, bool isSubcla } } -void QGraphicsSceneDragDropEvent_new(QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneDragDropEvent* ret = new QGraphicsSceneDragDropEvent(); - *outptr_QGraphicsSceneDragDropEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new() { + return new QGraphicsSceneDragDropEvent(); } -void QGraphicsSceneDragDropEvent_new2(int typeVal, QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneDragDropEvent* ret = new QGraphicsSceneDragDropEvent(static_cast(typeVal)); - *outptr_QGraphicsSceneDragDropEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new2(int typeVal) { + return new QGraphicsSceneDragDropEvent(static_cast(typeVal)); +} + +void QGraphicsSceneDragDropEvent_virtbase(QGraphicsSceneDragDropEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QPointF* QGraphicsSceneDragDropEvent_Pos(const QGraphicsSceneDragDropEvent* self) { @@ -656,11 +646,12 @@ void QGraphicsSceneDragDropEvent_Delete(QGraphicsSceneDragDropEvent* self, bool } } -void QGraphicsSceneResizeEvent_new(QGraphicsSceneResizeEvent** outptr_QGraphicsSceneResizeEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneResizeEvent* ret = new QGraphicsSceneResizeEvent(); - *outptr_QGraphicsSceneResizeEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneResizeEvent* QGraphicsSceneResizeEvent_new() { + return new QGraphicsSceneResizeEvent(); +} + +void QGraphicsSceneResizeEvent_virtbase(QGraphicsSceneResizeEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QSizeF* QGraphicsSceneResizeEvent_OldSize(const QGraphicsSceneResizeEvent* self) { @@ -687,11 +678,12 @@ void QGraphicsSceneResizeEvent_Delete(QGraphicsSceneResizeEvent* self, bool isSu } } -void QGraphicsSceneMoveEvent_new(QGraphicsSceneMoveEvent** outptr_QGraphicsSceneMoveEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent) { - QGraphicsSceneMoveEvent* ret = new QGraphicsSceneMoveEvent(); - *outptr_QGraphicsSceneMoveEvent = ret; - *outptr_QGraphicsSceneEvent = static_cast(ret); - *outptr_QEvent = static_cast(ret); +QGraphicsSceneMoveEvent* QGraphicsSceneMoveEvent_new() { + return new QGraphicsSceneMoveEvent(); +} + +void QGraphicsSceneMoveEvent_virtbase(QGraphicsSceneMoveEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent) { + *outptr_QGraphicsSceneEvent = static_cast(src); } QPointF* QGraphicsSceneMoveEvent_OldPos(const QGraphicsSceneMoveEvent* self) { diff --git a/qt6/gen_qgraphicssceneevent.go b/qt6/gen_qgraphicssceneevent.go index 58058f68..9fa4992f 100644 --- a/qt6/gen_qgraphicssceneevent.go +++ b/qt6/gen_qgraphicssceneevent.go @@ -43,37 +43,32 @@ func (this *QGraphicsSceneEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneEvent constructs the type using only CGO pointers. -func newQGraphicsSceneEvent(h *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneEvent { +func newQGraphicsSceneEvent(h *C.QGraphicsSceneEvent) *QGraphicsSceneEvent { if h == nil { return nil } + var outptr_QEvent *C.QEvent = nil + C.QGraphicsSceneEvent_virtbase(h, &outptr_QEvent) + return &QGraphicsSceneEvent{h: h, - QEvent: newQEvent(h_QEvent)} + QEvent: newQEvent(outptr_QEvent)} } // UnsafeNewQGraphicsSceneEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneEvent(h unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneEvent{h: (*C.QGraphicsSceneEvent)(h), - QEvent: UnsafeNewQEvent(h_QEvent)} +func UnsafeNewQGraphicsSceneEvent(h unsafe.Pointer) *QGraphicsSceneEvent { + return newQGraphicsSceneEvent((*C.QGraphicsSceneEvent)(h)) } // NewQGraphicsSceneEvent constructs a new QGraphicsSceneEvent object. func NewQGraphicsSceneEvent(typeVal QEvent__Type) *QGraphicsSceneEvent { - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneEvent_new((C.int)(typeVal), &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneEvent(C.QGraphicsSceneEvent_new((C.int)(typeVal))) ret.isSubclass = true return ret } func (this *QGraphicsSceneEvent) Widget() *QWidget { - return newQWidget(C.QGraphicsSceneEvent_Widget(this.h), nil, nil) + return newQWidget(C.QGraphicsSceneEvent_Widget(this.h)) } func (this *QGraphicsSceneEvent) SetWidget(widget *QWidget) { @@ -174,44 +169,34 @@ func (this *QGraphicsSceneMouseEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneMouseEvent constructs the type using only CGO pointers. -func newQGraphicsSceneMouseEvent(h *C.QGraphicsSceneMouseEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneMouseEvent { +func newQGraphicsSceneMouseEvent(h *C.QGraphicsSceneMouseEvent) *QGraphicsSceneMouseEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneMouseEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneMouseEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneMouseEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneMouseEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneMouseEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneMouseEvent{h: (*C.QGraphicsSceneMouseEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneMouseEvent(h unsafe.Pointer) *QGraphicsSceneMouseEvent { + return newQGraphicsSceneMouseEvent((*C.QGraphicsSceneMouseEvent)(h)) } // NewQGraphicsSceneMouseEvent constructs a new QGraphicsSceneMouseEvent object. func NewQGraphicsSceneMouseEvent() *QGraphicsSceneMouseEvent { - var outptr_QGraphicsSceneMouseEvent *C.QGraphicsSceneMouseEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneMouseEvent_new(&outptr_QGraphicsSceneMouseEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneMouseEvent(outptr_QGraphicsSceneMouseEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneMouseEvent(C.QGraphicsSceneMouseEvent_new()) ret.isSubclass = true return ret } // NewQGraphicsSceneMouseEvent2 constructs a new QGraphicsSceneMouseEvent object. func NewQGraphicsSceneMouseEvent2(typeVal QEvent__Type) *QGraphicsSceneMouseEvent { - var outptr_QGraphicsSceneMouseEvent *C.QGraphicsSceneMouseEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneMouseEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneMouseEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneMouseEvent(outptr_QGraphicsSceneMouseEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneMouseEvent(C.QGraphicsSceneMouseEvent_new2((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -381,44 +366,34 @@ func (this *QGraphicsSceneWheelEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneWheelEvent constructs the type using only CGO pointers. -func newQGraphicsSceneWheelEvent(h *C.QGraphicsSceneWheelEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneWheelEvent { +func newQGraphicsSceneWheelEvent(h *C.QGraphicsSceneWheelEvent) *QGraphicsSceneWheelEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneWheelEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneWheelEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneWheelEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneWheelEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneWheelEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneWheelEvent{h: (*C.QGraphicsSceneWheelEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneWheelEvent(h unsafe.Pointer) *QGraphicsSceneWheelEvent { + return newQGraphicsSceneWheelEvent((*C.QGraphicsSceneWheelEvent)(h)) } // NewQGraphicsSceneWheelEvent constructs a new QGraphicsSceneWheelEvent object. func NewQGraphicsSceneWheelEvent() *QGraphicsSceneWheelEvent { - var outptr_QGraphicsSceneWheelEvent *C.QGraphicsSceneWheelEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneWheelEvent_new(&outptr_QGraphicsSceneWheelEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneWheelEvent(outptr_QGraphicsSceneWheelEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneWheelEvent(C.QGraphicsSceneWheelEvent_new()) ret.isSubclass = true return ret } // NewQGraphicsSceneWheelEvent2 constructs a new QGraphicsSceneWheelEvent object. func NewQGraphicsSceneWheelEvent2(typeVal QEvent__Type) *QGraphicsSceneWheelEvent { - var outptr_QGraphicsSceneWheelEvent *C.QGraphicsSceneWheelEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneWheelEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneWheelEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneWheelEvent(outptr_QGraphicsSceneWheelEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneWheelEvent(C.QGraphicsSceneWheelEvent_new2((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -546,44 +521,34 @@ func (this *QGraphicsSceneContextMenuEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneContextMenuEvent constructs the type using only CGO pointers. -func newQGraphicsSceneContextMenuEvent(h *C.QGraphicsSceneContextMenuEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneContextMenuEvent { +func newQGraphicsSceneContextMenuEvent(h *C.QGraphicsSceneContextMenuEvent) *QGraphicsSceneContextMenuEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneContextMenuEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneContextMenuEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneContextMenuEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneContextMenuEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneContextMenuEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneContextMenuEvent{h: (*C.QGraphicsSceneContextMenuEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneContextMenuEvent(h unsafe.Pointer) *QGraphicsSceneContextMenuEvent { + return newQGraphicsSceneContextMenuEvent((*C.QGraphicsSceneContextMenuEvent)(h)) } // NewQGraphicsSceneContextMenuEvent constructs a new QGraphicsSceneContextMenuEvent object. func NewQGraphicsSceneContextMenuEvent() *QGraphicsSceneContextMenuEvent { - var outptr_QGraphicsSceneContextMenuEvent *C.QGraphicsSceneContextMenuEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneContextMenuEvent_new(&outptr_QGraphicsSceneContextMenuEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneContextMenuEvent(outptr_QGraphicsSceneContextMenuEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneContextMenuEvent(C.QGraphicsSceneContextMenuEvent_new()) ret.isSubclass = true return ret } // NewQGraphicsSceneContextMenuEvent2 constructs a new QGraphicsSceneContextMenuEvent object. func NewQGraphicsSceneContextMenuEvent2(typeVal QEvent__Type) *QGraphicsSceneContextMenuEvent { - var outptr_QGraphicsSceneContextMenuEvent *C.QGraphicsSceneContextMenuEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneContextMenuEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneContextMenuEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneContextMenuEvent(outptr_QGraphicsSceneContextMenuEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneContextMenuEvent(C.QGraphicsSceneContextMenuEvent_new2((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -669,44 +634,34 @@ func (this *QGraphicsSceneHoverEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneHoverEvent constructs the type using only CGO pointers. -func newQGraphicsSceneHoverEvent(h *C.QGraphicsSceneHoverEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneHoverEvent { +func newQGraphicsSceneHoverEvent(h *C.QGraphicsSceneHoverEvent) *QGraphicsSceneHoverEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneHoverEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneHoverEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneHoverEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneHoverEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneHoverEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneHoverEvent{h: (*C.QGraphicsSceneHoverEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneHoverEvent(h unsafe.Pointer) *QGraphicsSceneHoverEvent { + return newQGraphicsSceneHoverEvent((*C.QGraphicsSceneHoverEvent)(h)) } // NewQGraphicsSceneHoverEvent constructs a new QGraphicsSceneHoverEvent object. func NewQGraphicsSceneHoverEvent() *QGraphicsSceneHoverEvent { - var outptr_QGraphicsSceneHoverEvent *C.QGraphicsSceneHoverEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneHoverEvent_new(&outptr_QGraphicsSceneHoverEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneHoverEvent(outptr_QGraphicsSceneHoverEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneHoverEvent(C.QGraphicsSceneHoverEvent_new()) ret.isSubclass = true return ret } // NewQGraphicsSceneHoverEvent2 constructs a new QGraphicsSceneHoverEvent object. func NewQGraphicsSceneHoverEvent2(typeVal QEvent__Type) *QGraphicsSceneHoverEvent { - var outptr_QGraphicsSceneHoverEvent *C.QGraphicsSceneHoverEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneHoverEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneHoverEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneHoverEvent(outptr_QGraphicsSceneHoverEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneHoverEvent(C.QGraphicsSceneHoverEvent_new2((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -814,44 +769,34 @@ func (this *QGraphicsSceneHelpEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneHelpEvent constructs the type using only CGO pointers. -func newQGraphicsSceneHelpEvent(h *C.QGraphicsSceneHelpEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneHelpEvent { +func newQGraphicsSceneHelpEvent(h *C.QGraphicsSceneHelpEvent) *QGraphicsSceneHelpEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneHelpEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneHelpEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneHelpEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneHelpEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneHelpEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneHelpEvent{h: (*C.QGraphicsSceneHelpEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneHelpEvent(h unsafe.Pointer) *QGraphicsSceneHelpEvent { + return newQGraphicsSceneHelpEvent((*C.QGraphicsSceneHelpEvent)(h)) } // NewQGraphicsSceneHelpEvent constructs a new QGraphicsSceneHelpEvent object. func NewQGraphicsSceneHelpEvent() *QGraphicsSceneHelpEvent { - var outptr_QGraphicsSceneHelpEvent *C.QGraphicsSceneHelpEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneHelpEvent_new(&outptr_QGraphicsSceneHelpEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneHelpEvent(outptr_QGraphicsSceneHelpEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneHelpEvent(C.QGraphicsSceneHelpEvent_new()) ret.isSubclass = true return ret } // NewQGraphicsSceneHelpEvent2 constructs a new QGraphicsSceneHelpEvent object. func NewQGraphicsSceneHelpEvent2(typeVal QEvent__Type) *QGraphicsSceneHelpEvent { - var outptr_QGraphicsSceneHelpEvent *C.QGraphicsSceneHelpEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneHelpEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneHelpEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneHelpEvent(outptr_QGraphicsSceneHelpEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneHelpEvent(C.QGraphicsSceneHelpEvent_new2((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -911,44 +856,34 @@ func (this *QGraphicsSceneDragDropEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneDragDropEvent constructs the type using only CGO pointers. -func newQGraphicsSceneDragDropEvent(h *C.QGraphicsSceneDragDropEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneDragDropEvent { +func newQGraphicsSceneDragDropEvent(h *C.QGraphicsSceneDragDropEvent) *QGraphicsSceneDragDropEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneDragDropEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneDragDropEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneDragDropEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneDragDropEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneDragDropEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneDragDropEvent{h: (*C.QGraphicsSceneDragDropEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneDragDropEvent(h unsafe.Pointer) *QGraphicsSceneDragDropEvent { + return newQGraphicsSceneDragDropEvent((*C.QGraphicsSceneDragDropEvent)(h)) } // NewQGraphicsSceneDragDropEvent constructs a new QGraphicsSceneDragDropEvent object. func NewQGraphicsSceneDragDropEvent() *QGraphicsSceneDragDropEvent { - var outptr_QGraphicsSceneDragDropEvent *C.QGraphicsSceneDragDropEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneDragDropEvent_new(&outptr_QGraphicsSceneDragDropEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneDragDropEvent(outptr_QGraphicsSceneDragDropEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneDragDropEvent(C.QGraphicsSceneDragDropEvent_new()) ret.isSubclass = true return ret } // NewQGraphicsSceneDragDropEvent2 constructs a new QGraphicsSceneDragDropEvent object. func NewQGraphicsSceneDragDropEvent2(typeVal QEvent__Type) *QGraphicsSceneDragDropEvent { - var outptr_QGraphicsSceneDragDropEvent *C.QGraphicsSceneDragDropEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneDragDropEvent_new2((C.int)(typeVal), &outptr_QGraphicsSceneDragDropEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneDragDropEvent(outptr_QGraphicsSceneDragDropEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneDragDropEvent(C.QGraphicsSceneDragDropEvent_new2((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -1028,7 +963,7 @@ func (this *QGraphicsSceneDragDropEvent) SetDropAction(action DropAction) { } func (this *QGraphicsSceneDragDropEvent) Source() *QWidget { - return newQWidget(C.QGraphicsSceneDragDropEvent_Source(this.h), nil, nil) + return newQWidget(C.QGraphicsSceneDragDropEvent_Source(this.h)) } func (this *QGraphicsSceneDragDropEvent) SetSource(source *QWidget) { @@ -1036,7 +971,7 @@ func (this *QGraphicsSceneDragDropEvent) SetSource(source *QWidget) { } func (this *QGraphicsSceneDragDropEvent) MimeData() *QMimeData { - return newQMimeData(C.QGraphicsSceneDragDropEvent_MimeData(this.h), nil) + return newQMimeData(C.QGraphicsSceneDragDropEvent_MimeData(this.h)) } func (this *QGraphicsSceneDragDropEvent) SetMimeData(data *QMimeData) { @@ -1078,32 +1013,26 @@ func (this *QGraphicsSceneResizeEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneResizeEvent constructs the type using only CGO pointers. -func newQGraphicsSceneResizeEvent(h *C.QGraphicsSceneResizeEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneResizeEvent { +func newQGraphicsSceneResizeEvent(h *C.QGraphicsSceneResizeEvent) *QGraphicsSceneResizeEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneResizeEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneResizeEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneResizeEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneResizeEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneResizeEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneResizeEvent{h: (*C.QGraphicsSceneResizeEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneResizeEvent(h unsafe.Pointer) *QGraphicsSceneResizeEvent { + return newQGraphicsSceneResizeEvent((*C.QGraphicsSceneResizeEvent)(h)) } // NewQGraphicsSceneResizeEvent constructs a new QGraphicsSceneResizeEvent object. func NewQGraphicsSceneResizeEvent() *QGraphicsSceneResizeEvent { - var outptr_QGraphicsSceneResizeEvent *C.QGraphicsSceneResizeEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneResizeEvent_new(&outptr_QGraphicsSceneResizeEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneResizeEvent(outptr_QGraphicsSceneResizeEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneResizeEvent(C.QGraphicsSceneResizeEvent_new()) ret.isSubclass = true return ret } @@ -1163,32 +1092,26 @@ func (this *QGraphicsSceneMoveEvent) UnsafePointer() unsafe.Pointer { } // newQGraphicsSceneMoveEvent constructs the type using only CGO pointers. -func newQGraphicsSceneMoveEvent(h *C.QGraphicsSceneMoveEvent, h_QGraphicsSceneEvent *C.QGraphicsSceneEvent, h_QEvent *C.QEvent) *QGraphicsSceneMoveEvent { +func newQGraphicsSceneMoveEvent(h *C.QGraphicsSceneMoveEvent) *QGraphicsSceneMoveEvent { if h == nil { return nil } + var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil + C.QGraphicsSceneMoveEvent_virtbase(h, &outptr_QGraphicsSceneEvent) + return &QGraphicsSceneMoveEvent{h: h, - QGraphicsSceneEvent: newQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} + QGraphicsSceneEvent: newQGraphicsSceneEvent(outptr_QGraphicsSceneEvent)} } // UnsafeNewQGraphicsSceneMoveEvent constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSceneMoveEvent(h unsafe.Pointer, h_QGraphicsSceneEvent unsafe.Pointer, h_QEvent unsafe.Pointer) *QGraphicsSceneMoveEvent { - if h == nil { - return nil - } - - return &QGraphicsSceneMoveEvent{h: (*C.QGraphicsSceneMoveEvent)(h), - QGraphicsSceneEvent: UnsafeNewQGraphicsSceneEvent(h_QGraphicsSceneEvent, h_QEvent)} +func UnsafeNewQGraphicsSceneMoveEvent(h unsafe.Pointer) *QGraphicsSceneMoveEvent { + return newQGraphicsSceneMoveEvent((*C.QGraphicsSceneMoveEvent)(h)) } // NewQGraphicsSceneMoveEvent constructs a new QGraphicsSceneMoveEvent object. func NewQGraphicsSceneMoveEvent() *QGraphicsSceneMoveEvent { - var outptr_QGraphicsSceneMoveEvent *C.QGraphicsSceneMoveEvent = nil - var outptr_QGraphicsSceneEvent *C.QGraphicsSceneEvent = nil - var outptr_QEvent *C.QEvent = nil - C.QGraphicsSceneMoveEvent_new(&outptr_QGraphicsSceneMoveEvent, &outptr_QGraphicsSceneEvent, &outptr_QEvent) - ret := newQGraphicsSceneMoveEvent(outptr_QGraphicsSceneMoveEvent, outptr_QGraphicsSceneEvent, outptr_QEvent) + ret := newQGraphicsSceneMoveEvent(C.QGraphicsSceneMoveEvent_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qgraphicssceneevent.h b/qt6/gen_qgraphicssceneevent.h index 534439ec..ed28e9fb 100644 --- a/qt6/gen_qgraphicssceneevent.h +++ b/qt6/gen_qgraphicssceneevent.h @@ -48,7 +48,8 @@ typedef struct QSizeF QSizeF; typedef struct QWidget QWidget; #endif -void QGraphicsSceneEvent_new(int typeVal, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneEvent* QGraphicsSceneEvent_new(int typeVal); +void QGraphicsSceneEvent_virtbase(QGraphicsSceneEvent* src, QEvent** outptr_QEvent); QWidget* QGraphicsSceneEvent_Widget(const QGraphicsSceneEvent* self); void QGraphicsSceneEvent_SetWidget(QGraphicsSceneEvent* self, QWidget* widget); unsigned long long QGraphicsSceneEvent_Timestamp(const QGraphicsSceneEvent* self); @@ -59,8 +60,9 @@ void QGraphicsSceneEvent_override_virtual_Clone(void* self, intptr_t slot); QEvent* QGraphicsSceneEvent_virtualbase_Clone(const void* self); void QGraphicsSceneEvent_Delete(QGraphicsSceneEvent* self, bool isSubclass); -void QGraphicsSceneMouseEvent_new(QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); -void QGraphicsSceneMouseEvent_new2(int typeVal, QGraphicsSceneMouseEvent** outptr_QGraphicsSceneMouseEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new(); +QGraphicsSceneMouseEvent* QGraphicsSceneMouseEvent_new2(int typeVal); +void QGraphicsSceneMouseEvent_virtbase(QGraphicsSceneMouseEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QPointF* QGraphicsSceneMouseEvent_Pos(const QGraphicsSceneMouseEvent* self); void QGraphicsSceneMouseEvent_SetPos(QGraphicsSceneMouseEvent* self, QPointF* pos); QPointF* QGraphicsSceneMouseEvent_ScenePos(const QGraphicsSceneMouseEvent* self); @@ -91,8 +93,9 @@ int QGraphicsSceneMouseEvent_Flags(const QGraphicsSceneMouseEvent* self); void QGraphicsSceneMouseEvent_SetFlags(QGraphicsSceneMouseEvent* self, int flags); void QGraphicsSceneMouseEvent_Delete(QGraphicsSceneMouseEvent* self, bool isSubclass); -void QGraphicsSceneWheelEvent_new(QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); -void QGraphicsSceneWheelEvent_new2(int typeVal, QGraphicsSceneWheelEvent** outptr_QGraphicsSceneWheelEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new(); +QGraphicsSceneWheelEvent* QGraphicsSceneWheelEvent_new2(int typeVal); +void QGraphicsSceneWheelEvent_virtbase(QGraphicsSceneWheelEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QPointF* QGraphicsSceneWheelEvent_Pos(const QGraphicsSceneWheelEvent* self); void QGraphicsSceneWheelEvent_SetPos(QGraphicsSceneWheelEvent* self, QPointF* pos); QPointF* QGraphicsSceneWheelEvent_ScenePos(const QGraphicsSceneWheelEvent* self); @@ -115,8 +118,9 @@ bool QGraphicsSceneWheelEvent_IsInverted(const QGraphicsSceneWheelEvent* self); void QGraphicsSceneWheelEvent_SetInverted(QGraphicsSceneWheelEvent* self, bool inverted); void QGraphicsSceneWheelEvent_Delete(QGraphicsSceneWheelEvent* self, bool isSubclass); -void QGraphicsSceneContextMenuEvent_new(QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); -void QGraphicsSceneContextMenuEvent_new2(int typeVal, QGraphicsSceneContextMenuEvent** outptr_QGraphicsSceneContextMenuEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new(); +QGraphicsSceneContextMenuEvent* QGraphicsSceneContextMenuEvent_new2(int typeVal); +void QGraphicsSceneContextMenuEvent_virtbase(QGraphicsSceneContextMenuEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QPointF* QGraphicsSceneContextMenuEvent_Pos(const QGraphicsSceneContextMenuEvent* self); void QGraphicsSceneContextMenuEvent_SetPos(QGraphicsSceneContextMenuEvent* self, QPointF* pos); QPointF* QGraphicsSceneContextMenuEvent_ScenePos(const QGraphicsSceneContextMenuEvent* self); @@ -129,8 +133,9 @@ int QGraphicsSceneContextMenuEvent_Reason(const QGraphicsSceneContextMenuEvent* void QGraphicsSceneContextMenuEvent_SetReason(QGraphicsSceneContextMenuEvent* self, int reason); void QGraphicsSceneContextMenuEvent_Delete(QGraphicsSceneContextMenuEvent* self, bool isSubclass); -void QGraphicsSceneHoverEvent_new(QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); -void QGraphicsSceneHoverEvent_new2(int typeVal, QGraphicsSceneHoverEvent** outptr_QGraphicsSceneHoverEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new(); +QGraphicsSceneHoverEvent* QGraphicsSceneHoverEvent_new2(int typeVal); +void QGraphicsSceneHoverEvent_virtbase(QGraphicsSceneHoverEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QPointF* QGraphicsSceneHoverEvent_Pos(const QGraphicsSceneHoverEvent* self); void QGraphicsSceneHoverEvent_SetPos(QGraphicsSceneHoverEvent* self, QPointF* pos); QPointF* QGraphicsSceneHoverEvent_ScenePos(const QGraphicsSceneHoverEvent* self); @@ -147,16 +152,18 @@ int QGraphicsSceneHoverEvent_Modifiers(const QGraphicsSceneHoverEvent* self); void QGraphicsSceneHoverEvent_SetModifiers(QGraphicsSceneHoverEvent* self, int modifiers); void QGraphicsSceneHoverEvent_Delete(QGraphicsSceneHoverEvent* self, bool isSubclass); -void QGraphicsSceneHelpEvent_new(QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); -void QGraphicsSceneHelpEvent_new2(int typeVal, QGraphicsSceneHelpEvent** outptr_QGraphicsSceneHelpEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new(); +QGraphicsSceneHelpEvent* QGraphicsSceneHelpEvent_new2(int typeVal); +void QGraphicsSceneHelpEvent_virtbase(QGraphicsSceneHelpEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QPointF* QGraphicsSceneHelpEvent_ScenePos(const QGraphicsSceneHelpEvent* self); void QGraphicsSceneHelpEvent_SetScenePos(QGraphicsSceneHelpEvent* self, QPointF* pos); QPoint* QGraphicsSceneHelpEvent_ScreenPos(const QGraphicsSceneHelpEvent* self); void QGraphicsSceneHelpEvent_SetScreenPos(QGraphicsSceneHelpEvent* self, QPoint* pos); void QGraphicsSceneHelpEvent_Delete(QGraphicsSceneHelpEvent* self, bool isSubclass); -void QGraphicsSceneDragDropEvent_new(QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); -void QGraphicsSceneDragDropEvent_new2(int typeVal, QGraphicsSceneDragDropEvent** outptr_QGraphicsSceneDragDropEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new(); +QGraphicsSceneDragDropEvent* QGraphicsSceneDragDropEvent_new2(int typeVal); +void QGraphicsSceneDragDropEvent_virtbase(QGraphicsSceneDragDropEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QPointF* QGraphicsSceneDragDropEvent_Pos(const QGraphicsSceneDragDropEvent* self); void QGraphicsSceneDragDropEvent_SetPos(QGraphicsSceneDragDropEvent* self, QPointF* pos); QPointF* QGraphicsSceneDragDropEvent_ScenePos(const QGraphicsSceneDragDropEvent* self); @@ -180,14 +187,16 @@ QMimeData* QGraphicsSceneDragDropEvent_MimeData(const QGraphicsSceneDragDropEven void QGraphicsSceneDragDropEvent_SetMimeData(QGraphicsSceneDragDropEvent* self, QMimeData* data); void QGraphicsSceneDragDropEvent_Delete(QGraphicsSceneDragDropEvent* self, bool isSubclass); -void QGraphicsSceneResizeEvent_new(QGraphicsSceneResizeEvent** outptr_QGraphicsSceneResizeEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneResizeEvent* QGraphicsSceneResizeEvent_new(); +void QGraphicsSceneResizeEvent_virtbase(QGraphicsSceneResizeEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QSizeF* QGraphicsSceneResizeEvent_OldSize(const QGraphicsSceneResizeEvent* self); void QGraphicsSceneResizeEvent_SetOldSize(QGraphicsSceneResizeEvent* self, QSizeF* size); QSizeF* QGraphicsSceneResizeEvent_NewSize(const QGraphicsSceneResizeEvent* self); void QGraphicsSceneResizeEvent_SetNewSize(QGraphicsSceneResizeEvent* self, QSizeF* size); void QGraphicsSceneResizeEvent_Delete(QGraphicsSceneResizeEvent* self, bool isSubclass); -void QGraphicsSceneMoveEvent_new(QGraphicsSceneMoveEvent** outptr_QGraphicsSceneMoveEvent, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent, QEvent** outptr_QEvent); +QGraphicsSceneMoveEvent* QGraphicsSceneMoveEvent_new(); +void QGraphicsSceneMoveEvent_virtbase(QGraphicsSceneMoveEvent* src, QGraphicsSceneEvent** outptr_QGraphicsSceneEvent); QPointF* QGraphicsSceneMoveEvent_OldPos(const QGraphicsSceneMoveEvent* self); void QGraphicsSceneMoveEvent_SetOldPos(QGraphicsSceneMoveEvent* self, QPointF* pos); QPointF* QGraphicsSceneMoveEvent_NewPos(const QGraphicsSceneMoveEvent* self); diff --git a/qt6/gen_qgraphicstransform.cpp b/qt6/gen_qgraphicstransform.cpp index 9963920f..47d224e5 100644 --- a/qt6/gen_qgraphicstransform.cpp +++ b/qt6/gen_qgraphicstransform.cpp @@ -213,16 +213,16 @@ public: }; -void QGraphicsTransform_new(QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { - MiqtVirtualQGraphicsTransform* ret = new MiqtVirtualQGraphicsTransform(); - *outptr_QGraphicsTransform = ret; - *outptr_QObject = static_cast(ret); +QGraphicsTransform* QGraphicsTransform_new() { + return new MiqtVirtualQGraphicsTransform(); } -void QGraphicsTransform_new2(QObject* parent, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { - MiqtVirtualQGraphicsTransform* ret = new MiqtVirtualQGraphicsTransform(parent); - *outptr_QGraphicsTransform = ret; - *outptr_QObject = static_cast(ret); +QGraphicsTransform* QGraphicsTransform_new2(QObject* parent) { + return new MiqtVirtualQGraphicsTransform(parent); +} + +void QGraphicsTransform_virtbase(QGraphicsTransform* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QGraphicsTransform_MetaObject(const QGraphicsTransform* self) { @@ -372,18 +372,16 @@ public: }; -void QGraphicsScale_new(QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScale* ret = new MiqtVirtualQGraphicsScale(); - *outptr_QGraphicsScale = ret; - *outptr_QGraphicsTransform = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsScale* QGraphicsScale_new() { + return new MiqtVirtualQGraphicsScale(); } -void QGraphicsScale_new2(QObject* parent, QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { - MiqtVirtualQGraphicsScale* ret = new MiqtVirtualQGraphicsScale(parent); - *outptr_QGraphicsScale = ret; - *outptr_QGraphicsTransform = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsScale* QGraphicsScale_new2(QObject* parent) { + return new MiqtVirtualQGraphicsScale(parent); +} + +void QGraphicsScale_virtbase(QGraphicsScale* src, QGraphicsTransform** outptr_QGraphicsTransform) { + *outptr_QGraphicsTransform = static_cast(src); } QMetaObject* QGraphicsScale_MetaObject(const QGraphicsScale* self) { @@ -566,18 +564,16 @@ public: }; -void QGraphicsRotation_new(QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { - MiqtVirtualQGraphicsRotation* ret = new MiqtVirtualQGraphicsRotation(); - *outptr_QGraphicsRotation = ret; - *outptr_QGraphicsTransform = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsRotation* QGraphicsRotation_new() { + return new MiqtVirtualQGraphicsRotation(); } -void QGraphicsRotation_new2(QObject* parent, QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject) { - MiqtVirtualQGraphicsRotation* ret = new MiqtVirtualQGraphicsRotation(parent); - *outptr_QGraphicsRotation = ret; - *outptr_QGraphicsTransform = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGraphicsRotation* QGraphicsRotation_new2(QObject* parent) { + return new MiqtVirtualQGraphicsRotation(parent); +} + +void QGraphicsRotation_virtbase(QGraphicsRotation* src, QGraphicsTransform** outptr_QGraphicsTransform) { + *outptr_QGraphicsTransform = static_cast(src); } QMetaObject* QGraphicsRotation_MetaObject(const QGraphicsRotation* self) { diff --git a/qt6/gen_qgraphicstransform.go b/qt6/gen_qgraphicstransform.go index c4b0c8eb..5745b55e 100644 --- a/qt6/gen_qgraphicstransform.go +++ b/qt6/gen_qgraphicstransform.go @@ -35,42 +35,34 @@ func (this *QGraphicsTransform) UnsafePointer() unsafe.Pointer { } // newQGraphicsTransform constructs the type using only CGO pointers. -func newQGraphicsTransform(h *C.QGraphicsTransform, h_QObject *C.QObject) *QGraphicsTransform { +func newQGraphicsTransform(h *C.QGraphicsTransform) *QGraphicsTransform { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QGraphicsTransform_virtbase(h, &outptr_QObject) + return &QGraphicsTransform{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQGraphicsTransform constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsTransform(h unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsTransform { - if h == nil { - return nil - } - - return &QGraphicsTransform{h: (*C.QGraphicsTransform)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQGraphicsTransform(h unsafe.Pointer) *QGraphicsTransform { + return newQGraphicsTransform((*C.QGraphicsTransform)(h)) } // NewQGraphicsTransform constructs a new QGraphicsTransform object. func NewQGraphicsTransform() *QGraphicsTransform { - var outptr_QGraphicsTransform *C.QGraphicsTransform = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsTransform_new(&outptr_QGraphicsTransform, &outptr_QObject) - ret := newQGraphicsTransform(outptr_QGraphicsTransform, outptr_QObject) + ret := newQGraphicsTransform(C.QGraphicsTransform_new()) ret.isSubclass = true return ret } // NewQGraphicsTransform2 constructs a new QGraphicsTransform object. func NewQGraphicsTransform2(parent *QObject) *QGraphicsTransform { - var outptr_QGraphicsTransform *C.QGraphicsTransform = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsTransform_new2(parent.cPointer(), &outptr_QGraphicsTransform, &outptr_QObject) - ret := newQGraphicsTransform(outptr_QGraphicsTransform, outptr_QObject) + ret := newQGraphicsTransform(C.QGraphicsTransform_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -218,7 +210,7 @@ func miqt_exec_callback_QGraphicsTransform_TimerEvent(self *C.QGraphicsTransform } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QGraphicsTransform{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -244,7 +236,7 @@ func miqt_exec_callback_QGraphicsTransform_ChildEvent(self *C.QGraphicsTransform } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGraphicsTransform{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -363,44 +355,34 @@ func (this *QGraphicsScale) UnsafePointer() unsafe.Pointer { } // newQGraphicsScale constructs the type using only CGO pointers. -func newQGraphicsScale(h *C.QGraphicsScale, h_QGraphicsTransform *C.QGraphicsTransform, h_QObject *C.QObject) *QGraphicsScale { +func newQGraphicsScale(h *C.QGraphicsScale) *QGraphicsScale { if h == nil { return nil } + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + C.QGraphicsScale_virtbase(h, &outptr_QGraphicsTransform) + return &QGraphicsScale{h: h, - QGraphicsTransform: newQGraphicsTransform(h_QGraphicsTransform, h_QObject)} + QGraphicsTransform: newQGraphicsTransform(outptr_QGraphicsTransform)} } // UnsafeNewQGraphicsScale constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsScale(h unsafe.Pointer, h_QGraphicsTransform unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsScale { - if h == nil { - return nil - } - - return &QGraphicsScale{h: (*C.QGraphicsScale)(h), - QGraphicsTransform: UnsafeNewQGraphicsTransform(h_QGraphicsTransform, h_QObject)} +func UnsafeNewQGraphicsScale(h unsafe.Pointer) *QGraphicsScale { + return newQGraphicsScale((*C.QGraphicsScale)(h)) } // NewQGraphicsScale constructs a new QGraphicsScale object. func NewQGraphicsScale() *QGraphicsScale { - var outptr_QGraphicsScale *C.QGraphicsScale = nil - var outptr_QGraphicsTransform *C.QGraphicsTransform = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScale_new(&outptr_QGraphicsScale, &outptr_QGraphicsTransform, &outptr_QObject) - ret := newQGraphicsScale(outptr_QGraphicsScale, outptr_QGraphicsTransform, outptr_QObject) + ret := newQGraphicsScale(C.QGraphicsScale_new()) ret.isSubclass = true return ret } // NewQGraphicsScale2 constructs a new QGraphicsScale object. func NewQGraphicsScale2(parent *QObject) *QGraphicsScale { - var outptr_QGraphicsScale *C.QGraphicsScale = nil - var outptr_QGraphicsTransform *C.QGraphicsTransform = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsScale_new2(parent.cPointer(), &outptr_QGraphicsScale, &outptr_QGraphicsTransform, &outptr_QObject) - ret := newQGraphicsScale(outptr_QGraphicsScale, outptr_QGraphicsTransform, outptr_QObject) + ret := newQGraphicsScale(C.QGraphicsScale_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -630,44 +612,34 @@ func (this *QGraphicsRotation) UnsafePointer() unsafe.Pointer { } // newQGraphicsRotation constructs the type using only CGO pointers. -func newQGraphicsRotation(h *C.QGraphicsRotation, h_QGraphicsTransform *C.QGraphicsTransform, h_QObject *C.QObject) *QGraphicsRotation { +func newQGraphicsRotation(h *C.QGraphicsRotation) *QGraphicsRotation { if h == nil { return nil } + var outptr_QGraphicsTransform *C.QGraphicsTransform = nil + C.QGraphicsRotation_virtbase(h, &outptr_QGraphicsTransform) + return &QGraphicsRotation{h: h, - QGraphicsTransform: newQGraphicsTransform(h_QGraphicsTransform, h_QObject)} + QGraphicsTransform: newQGraphicsTransform(outptr_QGraphicsTransform)} } // UnsafeNewQGraphicsRotation constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsRotation(h unsafe.Pointer, h_QGraphicsTransform unsafe.Pointer, h_QObject unsafe.Pointer) *QGraphicsRotation { - if h == nil { - return nil - } - - return &QGraphicsRotation{h: (*C.QGraphicsRotation)(h), - QGraphicsTransform: UnsafeNewQGraphicsTransform(h_QGraphicsTransform, h_QObject)} +func UnsafeNewQGraphicsRotation(h unsafe.Pointer) *QGraphicsRotation { + return newQGraphicsRotation((*C.QGraphicsRotation)(h)) } // NewQGraphicsRotation constructs a new QGraphicsRotation object. func NewQGraphicsRotation() *QGraphicsRotation { - var outptr_QGraphicsRotation *C.QGraphicsRotation = nil - var outptr_QGraphicsTransform *C.QGraphicsTransform = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsRotation_new(&outptr_QGraphicsRotation, &outptr_QGraphicsTransform, &outptr_QObject) - ret := newQGraphicsRotation(outptr_QGraphicsRotation, outptr_QGraphicsTransform, outptr_QObject) + ret := newQGraphicsRotation(C.QGraphicsRotation_new()) ret.isSubclass = true return ret } // NewQGraphicsRotation2 constructs a new QGraphicsRotation object. func NewQGraphicsRotation2(parent *QObject) *QGraphicsRotation { - var outptr_QGraphicsRotation *C.QGraphicsRotation = nil - var outptr_QGraphicsTransform *C.QGraphicsTransform = nil - var outptr_QObject *C.QObject = nil - C.QGraphicsRotation_new2(parent.cPointer(), &outptr_QGraphicsRotation, &outptr_QGraphicsTransform, &outptr_QObject) - ret := newQGraphicsRotation(outptr_QGraphicsRotation, outptr_QGraphicsTransform, outptr_QObject) + ret := newQGraphicsRotation(C.QGraphicsRotation_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qgraphicstransform.h b/qt6/gen_qgraphicstransform.h index 3389b1c4..8d96f57f 100644 --- a/qt6/gen_qgraphicstransform.h +++ b/qt6/gen_qgraphicstransform.h @@ -40,8 +40,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVector3D QVector3D; #endif -void QGraphicsTransform_new(QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); -void QGraphicsTransform_new2(QObject* parent, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); +QGraphicsTransform* QGraphicsTransform_new(); +QGraphicsTransform* QGraphicsTransform_new2(QObject* parent); +void QGraphicsTransform_virtbase(QGraphicsTransform* src, QObject** outptr_QObject); QMetaObject* QGraphicsTransform_MetaObject(const QGraphicsTransform* self); void* QGraphicsTransform_Metacast(QGraphicsTransform* self, const char* param1); struct miqt_string QGraphicsTransform_Tr(const char* s); @@ -66,8 +67,9 @@ void QGraphicsTransform_override_virtual_DisconnectNotify(void* self, intptr_t s void QGraphicsTransform_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QGraphicsTransform_Delete(QGraphicsTransform* self, bool isSubclass); -void QGraphicsScale_new(QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); -void QGraphicsScale_new2(QObject* parent, QGraphicsScale** outptr_QGraphicsScale, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); +QGraphicsScale* QGraphicsScale_new(); +QGraphicsScale* QGraphicsScale_new2(QObject* parent); +void QGraphicsScale_virtbase(QGraphicsScale* src, QGraphicsTransform** outptr_QGraphicsTransform); QMetaObject* QGraphicsScale_MetaObject(const QGraphicsScale* self); void* QGraphicsScale_Metacast(QGraphicsScale* self, const char* param1); struct miqt_string QGraphicsScale_Tr(const char* s); @@ -96,8 +98,9 @@ void QGraphicsScale_override_virtual_ApplyTo(void* self, intptr_t slot); void QGraphicsScale_virtualbase_ApplyTo(const void* self, QMatrix4x4* matrix); void QGraphicsScale_Delete(QGraphicsScale* self, bool isSubclass); -void QGraphicsRotation_new(QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); -void QGraphicsRotation_new2(QObject* parent, QGraphicsRotation** outptr_QGraphicsRotation, QGraphicsTransform** outptr_QGraphicsTransform, QObject** outptr_QObject); +QGraphicsRotation* QGraphicsRotation_new(); +QGraphicsRotation* QGraphicsRotation_new2(QObject* parent); +void QGraphicsRotation_virtbase(QGraphicsRotation* src, QGraphicsTransform** outptr_QGraphicsTransform); QMetaObject* QGraphicsRotation_MetaObject(const QGraphicsRotation* self); void* QGraphicsRotation_Metacast(QGraphicsRotation* self, const char* param1); struct miqt_string QGraphicsRotation_Tr(const char* s); diff --git a/qt6/gen_qgraphicsview.cpp b/qt6/gen_qgraphicsview.cpp index e830c32b..277cee75 100644 --- a/qt6/gen_qgraphicsview.cpp +++ b/qt6/gen_qgraphicsview.cpp @@ -769,44 +769,24 @@ public: }; -void QGraphicsView_new(QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(parent); - *outptr_QGraphicsView = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QGraphicsView* QGraphicsView_new(QWidget* parent) { + return new MiqtVirtualQGraphicsView(parent); } -void QGraphicsView_new2(QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(); - *outptr_QGraphicsView = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QGraphicsView* QGraphicsView_new2() { + return new MiqtVirtualQGraphicsView(); } -void QGraphicsView_new3(QGraphicsScene* scene, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(scene); - *outptr_QGraphicsView = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QGraphicsView* QGraphicsView_new3(QGraphicsScene* scene) { + return new MiqtVirtualQGraphicsView(scene); } -void QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQGraphicsView* ret = new MiqtVirtualQGraphicsView(scene, parent); - *outptr_QGraphicsView = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QGraphicsView* QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent) { + return new MiqtVirtualQGraphicsView(scene, parent); +} + +void QGraphicsView_virtbase(QGraphicsView* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); } QMetaObject* QGraphicsView_MetaObject(const QGraphicsView* self) { diff --git a/qt6/gen_qgraphicsview.go b/qt6/gen_qgraphicsview.go index b6a2c153..dd6d0692 100644 --- a/qt6/gen_qgraphicsview.go +++ b/qt6/gen_qgraphicsview.go @@ -76,80 +76,50 @@ func (this *QGraphicsView) UnsafePointer() unsafe.Pointer { } // newQGraphicsView constructs the type using only CGO pointers. -func newQGraphicsView(h *C.QGraphicsView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QGraphicsView { +func newQGraphicsView(h *C.QGraphicsView) *QGraphicsView { if h == nil { return nil } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QGraphicsView_virtbase(h, &outptr_QAbstractScrollArea) + return &QGraphicsView{h: h, - QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractScrollArea: newQAbstractScrollArea(outptr_QAbstractScrollArea)} } // UnsafeNewQGraphicsView constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsView(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QGraphicsView { - if h == nil { - return nil - } - - return &QGraphicsView{h: (*C.QGraphicsView)(h), - QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQGraphicsView(h unsafe.Pointer) *QGraphicsView { + return newQGraphicsView((*C.QGraphicsView)(h)) } // NewQGraphicsView constructs a new QGraphicsView object. func NewQGraphicsView(parent *QWidget) *QGraphicsView { - var outptr_QGraphicsView *C.QGraphicsView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGraphicsView_new(parent.cPointer(), &outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGraphicsView(C.QGraphicsView_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsView2 constructs a new QGraphicsView object. func NewQGraphicsView2() *QGraphicsView { - var outptr_QGraphicsView *C.QGraphicsView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGraphicsView_new2(&outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGraphicsView(C.QGraphicsView_new2()) ret.isSubclass = true return ret } // NewQGraphicsView3 constructs a new QGraphicsView object. func NewQGraphicsView3(scene *QGraphicsScene) *QGraphicsView { - var outptr_QGraphicsView *C.QGraphicsView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGraphicsView_new3(scene.cPointer(), &outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGraphicsView(C.QGraphicsView_new3(scene.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsView4 constructs a new QGraphicsView object. func NewQGraphicsView4(scene *QGraphicsScene, parent *QWidget) *QGraphicsView { - var outptr_QGraphicsView *C.QGraphicsView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGraphicsView_new4(scene.cPointer(), parent.cPointer(), &outptr_QGraphicsView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGraphicsView(outptr_QGraphicsView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGraphicsView(C.QGraphicsView_new4(scene.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -278,7 +248,7 @@ func (this *QGraphicsView) SetInteractive(allowed bool) { } func (this *QGraphicsView) Scene() *QGraphicsScene { - return newQGraphicsScene(C.QGraphicsView_Scene(this.h), nil) + return newQGraphicsScene(C.QGraphicsView_Scene(this.h)) } func (this *QGraphicsView) SetScene(scene *QGraphicsScene) { @@ -754,7 +724,7 @@ func miqt_exec_callback_QGraphicsView_SetupViewport(self *C.QGraphicsView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QGraphicsView{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -836,7 +806,7 @@ func miqt_exec_callback_QGraphicsView_ContextMenuEvent(self *C.QGraphicsView, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -862,7 +832,7 @@ func miqt_exec_callback_QGraphicsView_DragEnterEvent(self *C.QGraphicsView, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -888,7 +858,7 @@ func miqt_exec_callback_QGraphicsView_DragLeaveEvent(self *C.QGraphicsView, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -914,7 +884,7 @@ func miqt_exec_callback_QGraphicsView_DragMoveEvent(self *C.QGraphicsView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -940,7 +910,7 @@ func miqt_exec_callback_QGraphicsView_DropEvent(self *C.QGraphicsView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -966,7 +936,7 @@ func miqt_exec_callback_QGraphicsView_FocusInEvent(self *C.QGraphicsView, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1020,7 +990,7 @@ func miqt_exec_callback_QGraphicsView_FocusOutEvent(self *C.QGraphicsView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1046,7 +1016,7 @@ func miqt_exec_callback_QGraphicsView_KeyPressEvent(self *C.QGraphicsView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1072,7 +1042,7 @@ func miqt_exec_callback_QGraphicsView_KeyReleaseEvent(self *C.QGraphicsView, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1098,7 +1068,7 @@ func miqt_exec_callback_QGraphicsView_MouseDoubleClickEvent(self *C.QGraphicsVie } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1124,7 +1094,7 @@ func miqt_exec_callback_QGraphicsView_MousePressEvent(self *C.QGraphicsView, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1150,7 +1120,7 @@ func miqt_exec_callback_QGraphicsView_MouseMoveEvent(self *C.QGraphicsView, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1176,7 +1146,7 @@ func miqt_exec_callback_QGraphicsView_MouseReleaseEvent(self *C.QGraphicsView, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1202,7 +1172,7 @@ func miqt_exec_callback_QGraphicsView_WheelEvent(self *C.QGraphicsView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1228,7 +1198,7 @@ func miqt_exec_callback_QGraphicsView_PaintEvent(self *C.QGraphicsView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1254,7 +1224,7 @@ func miqt_exec_callback_QGraphicsView_ResizeEvent(self *C.QGraphicsView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1308,7 +1278,7 @@ func miqt_exec_callback_QGraphicsView_ShowEvent(self *C.QGraphicsView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1334,7 +1304,7 @@ func miqt_exec_callback_QGraphicsView_InputMethodEvent(self *C.QGraphicsView, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QGraphicsView{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qgraphicsview.h b/qt6/gen_qgraphicsview.h index e03834bf..495c0cbc 100644 --- a/qt6/gen_qgraphicsview.h +++ b/qt6/gen_qgraphicsview.h @@ -84,10 +84,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QGraphicsView_new(QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QGraphicsView_new2(QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QGraphicsView_new3(QGraphicsScene* scene, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent, QGraphicsView** outptr_QGraphicsView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QGraphicsView* QGraphicsView_new(QWidget* parent); +QGraphicsView* QGraphicsView_new2(); +QGraphicsView* QGraphicsView_new3(QGraphicsScene* scene); +QGraphicsView* QGraphicsView_new4(QGraphicsScene* scene, QWidget* parent); +void QGraphicsView_virtbase(QGraphicsView* src, QAbstractScrollArea** outptr_QAbstractScrollArea); QMetaObject* QGraphicsView_MetaObject(const QGraphicsView* self); void* QGraphicsView_Metacast(QGraphicsView* self, const char* param1); struct miqt_string QGraphicsView_Tr(const char* s); diff --git a/qt6/gen_qgraphicswidget.cpp b/qt6/gen_qgraphicswidget.cpp index d199233d..9e4c70b3 100644 --- a/qt6/gen_qgraphicswidget.cpp +++ b/qt6/gen_qgraphicswidget.cpp @@ -856,31 +856,21 @@ public: }; -void QGraphicsWidget_new(QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsWidget* ret = new MiqtVirtualQGraphicsWidget(); - *outptr_QGraphicsWidget = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsWidget* QGraphicsWidget_new() { + return new MiqtVirtualQGraphicsWidget(); } -void QGraphicsWidget_new2(QGraphicsItem* parent, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsWidget* ret = new MiqtVirtualQGraphicsWidget(parent); - *outptr_QGraphicsWidget = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsWidget* QGraphicsWidget_new2(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsWidget(parent); } -void QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { - MiqtVirtualQGraphicsWidget* ret = new MiqtVirtualQGraphicsWidget(parent, static_cast(wFlags)); - *outptr_QGraphicsWidget = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); - *outptr_QGraphicsLayoutItem = static_cast(ret); +QGraphicsWidget* QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags) { + return new MiqtVirtualQGraphicsWidget(parent, static_cast(wFlags)); +} + +void QGraphicsWidget_virtbase(QGraphicsWidget* src, QGraphicsObject** outptr_QGraphicsObject, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem) { + *outptr_QGraphicsObject = static_cast(src); + *outptr_QGraphicsLayoutItem = static_cast(src); } QMetaObject* QGraphicsWidget_MetaObject(const QGraphicsWidget* self) { diff --git a/qt6/gen_qgraphicswidget.go b/qt6/gen_qgraphicswidget.go index 145ef633..2abc77bd 100644 --- a/qt6/gen_qgraphicswidget.go +++ b/qt6/gen_qgraphicswidget.go @@ -42,64 +42,44 @@ func (this *QGraphicsWidget) UnsafePointer() unsafe.Pointer { } // newQGraphicsWidget constructs the type using only CGO pointers. -func newQGraphicsWidget(h *C.QGraphicsWidget, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem, h_QGraphicsLayoutItem *C.QGraphicsLayoutItem) *QGraphicsWidget { +func newQGraphicsWidget(h *C.QGraphicsWidget) *QGraphicsWidget { if h == nil { return nil } + var outptr_QGraphicsObject *C.QGraphicsObject = nil + var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil + C.QGraphicsWidget_virtbase(h, &outptr_QGraphicsObject, &outptr_QGraphicsLayoutItem) + return &QGraphicsWidget{h: h, - QGraphicsObject: newQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem), - QGraphicsLayoutItem: newQGraphicsLayoutItem(h_QGraphicsLayoutItem)} + QGraphicsObject: newQGraphicsObject(outptr_QGraphicsObject), + QGraphicsLayoutItem: newQGraphicsLayoutItem(outptr_QGraphicsLayoutItem)} } // UnsafeNewQGraphicsWidget constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsWidget(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer, h_QGraphicsLayoutItem unsafe.Pointer) *QGraphicsWidget { - if h == nil { - return nil - } - - return &QGraphicsWidget{h: (*C.QGraphicsWidget)(h), - QGraphicsObject: UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem), - QGraphicsLayoutItem: UnsafeNewQGraphicsLayoutItem(h_QGraphicsLayoutItem)} +func UnsafeNewQGraphicsWidget(h unsafe.Pointer) *QGraphicsWidget { + return newQGraphicsWidget((*C.QGraphicsWidget)(h)) } // NewQGraphicsWidget constructs a new QGraphicsWidget object. func NewQGraphicsWidget() *QGraphicsWidget { - var outptr_QGraphicsWidget *C.QGraphicsWidget = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsWidget_new(&outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsWidget(outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret := newQGraphicsWidget(C.QGraphicsWidget_new()) ret.isSubclass = true return ret } // NewQGraphicsWidget2 constructs a new QGraphicsWidget object. func NewQGraphicsWidget2(parent *QGraphicsItem) *QGraphicsWidget { - var outptr_QGraphicsWidget *C.QGraphicsWidget = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsWidget_new2(parent.cPointer(), &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsWidget(outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret := newQGraphicsWidget(C.QGraphicsWidget_new2(parent.cPointer())) ret.isSubclass = true return ret } // NewQGraphicsWidget3 constructs a new QGraphicsWidget object. func NewQGraphicsWidget3(parent *QGraphicsItem, wFlags WindowType) *QGraphicsWidget { - var outptr_QGraphicsWidget *C.QGraphicsWidget = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - var outptr_QGraphicsLayoutItem *C.QGraphicsLayoutItem = nil - C.QGraphicsWidget_new3(parent.cPointer(), (C.int)(wFlags), &outptr_QGraphicsWidget, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem, &outptr_QGraphicsLayoutItem) - ret := newQGraphicsWidget(outptr_QGraphicsWidget, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem, outptr_QGraphicsLayoutItem) + ret := newQGraphicsWidget(C.QGraphicsWidget_new3(parent.cPointer(), (C.int)(wFlags))) ret.isSubclass = true return ret } @@ -124,7 +104,7 @@ func QGraphicsWidget_Tr(s string) string { } func (this *QGraphicsWidget) Layout() *QGraphicsLayout { - return newQGraphicsLayout(C.QGraphicsWidget_Layout(this.h), nil) + return newQGraphicsLayout(C.QGraphicsWidget_Layout(this.h)) } func (this *QGraphicsWidget) SetLayout(layout *QGraphicsLayout) { @@ -148,7 +128,7 @@ func (this *QGraphicsWidget) UnsetLayoutDirection() { } func (this *QGraphicsWidget) Style() *QStyle { - return newQStyle(C.QGraphicsWidget_Style(this.h), nil) + return newQStyle(C.QGraphicsWidget_Style(this.h)) } func (this *QGraphicsWidget) SetStyle(style *QStyle) { @@ -295,7 +275,7 @@ func QGraphicsWidget_SetTabOrder(first *QGraphicsWidget, second *QGraphicsWidget } func (this *QGraphicsWidget) FocusWidget() *QGraphicsWidget { - return newQGraphicsWidget(C.QGraphicsWidget_FocusWidget(this.h), nil, nil, nil, nil) + return newQGraphicsWidget(C.QGraphicsWidget_FocusWidget(this.h)) } func (this *QGraphicsWidget) GrabShortcut(sequence *QKeySequence) int { @@ -351,7 +331,7 @@ func (this *QGraphicsWidget) Actions() []*QAction { _ret := make([]*QAction, int(_ma.len)) _outCast := (*[0xffff]*C.QAction)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAction(_outCast[i], nil) + _ret[i] = newQAction(_outCast[i]) } return _ret } @@ -569,9 +549,9 @@ func miqt_exec_callback_QGraphicsWidget_Paint(self *C.QGraphicsWidget, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -599,9 +579,9 @@ func miqt_exec_callback_QGraphicsWidget_PaintWindowFrame(self *C.QGraphicsWidget // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionGraphicsItem(option, nil) + slotval2 := newQStyleOptionGraphicsItem(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_PaintWindowFrame, slotval1, slotval2, slotval3) @@ -970,7 +950,7 @@ func miqt_exec_callback_QGraphicsWidget_CloseEvent(self *C.QGraphicsWidget, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -996,7 +976,7 @@ func miqt_exec_callback_QGraphicsWidget_FocusInEvent(self *C.QGraphicsWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1050,7 +1030,7 @@ func miqt_exec_callback_QGraphicsWidget_FocusOutEvent(self *C.QGraphicsWidget, c } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1076,7 +1056,7 @@ func miqt_exec_callback_QGraphicsWidget_HideEvent(self *C.QGraphicsWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1102,7 +1082,7 @@ func miqt_exec_callback_QGraphicsWidget_MoveEvent(self *C.QGraphicsWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneMoveEvent(event, nil, nil) + slotval1 := newQGraphicsSceneMoveEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1151,7 +1131,7 @@ func miqt_exec_callback_QGraphicsWidget_ResizeEvent(self *C.QGraphicsWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneResizeEvent(event, nil, nil) + slotval1 := newQGraphicsSceneResizeEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1177,7 +1157,7 @@ func miqt_exec_callback_QGraphicsWidget_ShowEvent(self *C.QGraphicsWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1203,7 +1183,7 @@ func miqt_exec_callback_QGraphicsWidget_HoverMoveEvent(self *C.QGraphicsWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_HoverMoveEvent, slotval1) @@ -1229,7 +1209,7 @@ func miqt_exec_callback_QGraphicsWidget_HoverLeaveEvent(self *C.QGraphicsWidget, } // Convert all CABI parameters to Go parameters - slotval1 := newQGraphicsSceneHoverEvent(event, nil, nil) + slotval1 := newQGraphicsSceneHoverEvent(event) gofunc((&QGraphicsWidget{h: self}).callVirtualBase_HoverLeaveEvent, slotval1) diff --git a/qt6/gen_qgraphicswidget.h b/qt6/gen_qgraphicswidget.h index 801afd4a..10f78cdf 100644 --- a/qt6/gen_qgraphicswidget.h +++ b/qt6/gen_qgraphicswidget.h @@ -78,9 +78,10 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QGraphicsWidget_new(QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsWidget_new2(QGraphicsItem* parent, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); -void QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags, QGraphicsWidget** outptr_QGraphicsWidget, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); +QGraphicsWidget* QGraphicsWidget_new(); +QGraphicsWidget* QGraphicsWidget_new2(QGraphicsItem* parent); +QGraphicsWidget* QGraphicsWidget_new3(QGraphicsItem* parent, int wFlags); +void QGraphicsWidget_virtbase(QGraphicsWidget* src, QGraphicsObject** outptr_QGraphicsObject, QGraphicsLayoutItem** outptr_QGraphicsLayoutItem); QMetaObject* QGraphicsWidget_MetaObject(const QGraphicsWidget* self); void* QGraphicsWidget_Metacast(QGraphicsWidget* self, const char* param1); struct miqt_string QGraphicsWidget_Tr(const char* s); diff --git a/qt6/gen_qgridlayout.cpp b/qt6/gen_qgridlayout.cpp index 8364ee73..4d8c04ed 100644 --- a/qt6/gen_qgridlayout.cpp +++ b/qt6/gen_qgridlayout.cpp @@ -530,20 +530,16 @@ public: }; -void QGridLayout_new(QWidget* parent, QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQGridLayout* ret = new MiqtVirtualQGridLayout(parent); - *outptr_QGridLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QGridLayout* QGridLayout_new(QWidget* parent) { + return new MiqtVirtualQGridLayout(parent); } -void QGridLayout_new2(QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQGridLayout* ret = new MiqtVirtualQGridLayout(); - *outptr_QGridLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QGridLayout* QGridLayout_new2() { + return new MiqtVirtualQGridLayout(); +} + +void QGridLayout_virtbase(QGridLayout* src, QLayout** outptr_QLayout) { + *outptr_QLayout = static_cast(src); } QMetaObject* QGridLayout_MetaObject(const QGridLayout* self) { diff --git a/qt6/gen_qgridlayout.go b/qt6/gen_qgridlayout.go index 46b3964d..e04e4ee5 100644 --- a/qt6/gen_qgridlayout.go +++ b/qt6/gen_qgridlayout.go @@ -35,46 +35,34 @@ func (this *QGridLayout) UnsafePointer() unsafe.Pointer { } // newQGridLayout constructs the type using only CGO pointers. -func newQGridLayout(h *C.QGridLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QGridLayout { +func newQGridLayout(h *C.QGridLayout) *QGridLayout { if h == nil { return nil } + var outptr_QLayout *C.QLayout = nil + C.QGridLayout_virtbase(h, &outptr_QLayout) + return &QGridLayout{h: h, - QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} + QLayout: newQLayout(outptr_QLayout)} } // UnsafeNewQGridLayout constructs the type using only unsafe pointers. -func UnsafeNewQGridLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QGridLayout { - if h == nil { - return nil - } - - return &QGridLayout{h: (*C.QGridLayout)(h), - QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} +func UnsafeNewQGridLayout(h unsafe.Pointer) *QGridLayout { + return newQGridLayout((*C.QGridLayout)(h)) } // NewQGridLayout constructs a new QGridLayout object. func NewQGridLayout(parent *QWidget) *QGridLayout { - var outptr_QGridLayout *C.QGridLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QGridLayout_new(parent.cPointer(), &outptr_QGridLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQGridLayout(outptr_QGridLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQGridLayout(C.QGridLayout_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQGridLayout2 constructs a new QGridLayout object. func NewQGridLayout2() *QGridLayout { - var outptr_QGridLayout *C.QGridLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QGridLayout_new2(&outptr_QGridLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQGridLayout(outptr_QGridLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQGridLayout(C.QGridLayout_new2()) ret.isSubclass = true return ret } @@ -757,7 +745,7 @@ func miqt_exec_callback_QGridLayout_IndexOf(self *C.QGridLayout, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(param1, nil, nil) + slotval1 := newQWidget(param1) virtualReturn := gofunc((&QGridLayout{h: self}).callVirtualBase_IndexOf, slotval1) @@ -835,9 +823,9 @@ func miqt_exec_callback_QGridLayout_ReplaceWidget(self *C.QGridLayout, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(from, nil, nil) + slotval1 := newQWidget(from) - slotval2 := newQWidget(to, nil, nil) + slotval2 := newQWidget(to) slotval3 := (FindChildOption)(options) @@ -849,7 +837,7 @@ func miqt_exec_callback_QGridLayout_ReplaceWidget(self *C.QGridLayout, cb C.intp func (this *QGridLayout) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QGridLayout_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QGridLayout_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QGridLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -892,7 +880,7 @@ func miqt_exec_callback_QGridLayout_ChildEvent(self *C.QGridLayout, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(e, nil) + slotval1 := newQChildEvent(e) gofunc((&QGridLayout{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qgridlayout.h b/qt6/gen_qgridlayout.h index 177b31e4..ed0d2476 100644 --- a/qt6/gen_qgridlayout.h +++ b/qt6/gen_qgridlayout.h @@ -36,8 +36,9 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QGridLayout_new(QWidget* parent, QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QGridLayout_new2(QGridLayout** outptr_QGridLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +QGridLayout* QGridLayout_new(QWidget* parent); +QGridLayout* QGridLayout_new2(); +void QGridLayout_virtbase(QGridLayout* src, QLayout** outptr_QLayout); QMetaObject* QGridLayout_MetaObject(const QGridLayout* self); void* QGridLayout_Metacast(QGridLayout* self, const char* param1); struct miqt_string QGridLayout_Tr(const char* s); diff --git a/qt6/gen_qgroupbox.cpp b/qt6/gen_qgroupbox.cpp index aa81d643..40138ee0 100644 --- a/qt6/gen_qgroupbox.cpp +++ b/qt6/gen_qgroupbox.cpp @@ -1074,38 +1074,26 @@ public: }; -void QGroupBox_new(QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(parent); - *outptr_QGroupBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QGroupBox* QGroupBox_new(QWidget* parent) { + return new MiqtVirtualQGroupBox(parent); } -void QGroupBox_new2(QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(); - *outptr_QGroupBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QGroupBox* QGroupBox_new2() { + return new MiqtVirtualQGroupBox(); } -void QGroupBox_new3(struct miqt_string title, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QGroupBox* QGroupBox_new3(struct miqt_string title) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(title_QString); - *outptr_QGroupBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQGroupBox(title_QString); } -void QGroupBox_new4(struct miqt_string title, QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QGroupBox* QGroupBox_new4(struct miqt_string title, QWidget* parent) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQGroupBox* ret = new MiqtVirtualQGroupBox(title_QString, parent); - *outptr_QGroupBox = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQGroupBox(title_QString, parent); +} + +void QGroupBox_virtbase(QGroupBox* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QGroupBox_MetaObject(const QGroupBox* self) { diff --git a/qt6/gen_qgroupbox.go b/qt6/gen_qgroupbox.go index 88d1430c..f02c871e 100644 --- a/qt6/gen_qgroupbox.go +++ b/qt6/gen_qgroupbox.go @@ -35,46 +35,34 @@ func (this *QGroupBox) UnsafePointer() unsafe.Pointer { } // newQGroupBox constructs the type using only CGO pointers. -func newQGroupBox(h *C.QGroupBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QGroupBox { +func newQGroupBox(h *C.QGroupBox) *QGroupBox { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QGroupBox_virtbase(h, &outptr_QWidget) + return &QGroupBox{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQGroupBox constructs the type using only unsafe pointers. -func UnsafeNewQGroupBox(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QGroupBox { - if h == nil { - return nil - } - - return &QGroupBox{h: (*C.QGroupBox)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQGroupBox(h unsafe.Pointer) *QGroupBox { + return newQGroupBox((*C.QGroupBox)(h)) } // NewQGroupBox constructs a new QGroupBox object. func NewQGroupBox(parent *QWidget) *QGroupBox { - var outptr_QGroupBox *C.QGroupBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGroupBox_new(parent.cPointer(), &outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGroupBox(C.QGroupBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQGroupBox2 constructs a new QGroupBox object. func NewQGroupBox2() *QGroupBox { - var outptr_QGroupBox *C.QGroupBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGroupBox_new2(&outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGroupBox(C.QGroupBox_new2()) ret.isSubclass = true return ret } @@ -85,13 +73,8 @@ func NewQGroupBox3(title string) *QGroupBox { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QGroupBox *C.QGroupBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGroupBox_new3(title_ms, &outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGroupBox(C.QGroupBox_new3(title_ms)) ret.isSubclass = true return ret } @@ -102,13 +85,8 @@ func NewQGroupBox4(title string, parent *QWidget) *QGroupBox { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QGroupBox *C.QGroupBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QGroupBox_new4(title_ms, parent.cPointer(), &outptr_QGroupBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQGroupBox(outptr_QGroupBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQGroupBox(C.QGroupBox_new4(title_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -339,7 +317,7 @@ func miqt_exec_callback_QGroupBox_ChildEvent(self *C.QGroupBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -365,7 +343,7 @@ func miqt_exec_callback_QGroupBox_ResizeEvent(self *C.QGroupBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -391,7 +369,7 @@ func miqt_exec_callback_QGroupBox_PaintEvent(self *C.QGroupBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -417,7 +395,7 @@ func miqt_exec_callback_QGroupBox_FocusInEvent(self *C.QGroupBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -469,7 +447,7 @@ func miqt_exec_callback_QGroupBox_MousePressEvent(self *C.QGroupBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -495,7 +473,7 @@ func miqt_exec_callback_QGroupBox_MouseMoveEvent(self *C.QGroupBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -521,7 +499,7 @@ func miqt_exec_callback_QGroupBox_MouseReleaseEvent(self *C.QGroupBox, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -547,7 +525,7 @@ func miqt_exec_callback_QGroupBox_InitStyleOption(self *C.QGroupBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionGroupBox(option, nil, nil) + slotval1 := newQStyleOptionGroupBox(option) gofunc((&QGroupBox{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -729,7 +707,7 @@ func miqt_exec_callback_QGroupBox_MouseDoubleClickEvent(self *C.QGroupBox, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -755,7 +733,7 @@ func miqt_exec_callback_QGroupBox_WheelEvent(self *C.QGroupBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -781,7 +759,7 @@ func miqt_exec_callback_QGroupBox_KeyPressEvent(self *C.QGroupBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -807,7 +785,7 @@ func miqt_exec_callback_QGroupBox_KeyReleaseEvent(self *C.QGroupBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -833,7 +811,7 @@ func miqt_exec_callback_QGroupBox_FocusOutEvent(self *C.QGroupBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -859,7 +837,7 @@ func miqt_exec_callback_QGroupBox_EnterEvent(self *C.QGroupBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -911,7 +889,7 @@ func miqt_exec_callback_QGroupBox_MoveEvent(self *C.QGroupBox, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -937,7 +915,7 @@ func miqt_exec_callback_QGroupBox_CloseEvent(self *C.QGroupBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -963,7 +941,7 @@ func miqt_exec_callback_QGroupBox_ContextMenuEvent(self *C.QGroupBox, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -989,7 +967,7 @@ func miqt_exec_callback_QGroupBox_TabletEvent(self *C.QGroupBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1015,7 +993,7 @@ func miqt_exec_callback_QGroupBox_ActionEvent(self *C.QGroupBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1041,7 +1019,7 @@ func miqt_exec_callback_QGroupBox_DragEnterEvent(self *C.QGroupBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1067,7 +1045,7 @@ func miqt_exec_callback_QGroupBox_DragMoveEvent(self *C.QGroupBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1093,7 +1071,7 @@ func miqt_exec_callback_QGroupBox_DragLeaveEvent(self *C.QGroupBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1119,7 +1097,7 @@ func miqt_exec_callback_QGroupBox_DropEvent(self *C.QGroupBox, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1145,7 +1123,7 @@ func miqt_exec_callback_QGroupBox_ShowEvent(self *C.QGroupBox, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1171,7 +1149,7 @@ func miqt_exec_callback_QGroupBox_HideEvent(self *C.QGroupBox, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QGroupBox{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1341,7 +1319,7 @@ func miqt_exec_callback_QGroupBox_InputMethodEvent(self *C.QGroupBox, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QGroupBox{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qgroupbox.h b/qt6/gen_qgroupbox.h index f8ee9e7d..37dfdb6d 100644 --- a/qt6/gen_qgroupbox.h +++ b/qt6/gen_qgroupbox.h @@ -82,10 +82,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QGroupBox_new(QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QGroupBox_new2(QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QGroupBox_new3(struct miqt_string title, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QGroupBox_new4(struct miqt_string title, QWidget* parent, QGroupBox** outptr_QGroupBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QGroupBox* QGroupBox_new(QWidget* parent); +QGroupBox* QGroupBox_new2(); +QGroupBox* QGroupBox_new3(struct miqt_string title); +QGroupBox* QGroupBox_new4(struct miqt_string title, QWidget* parent); +void QGroupBox_virtbase(QGroupBox* src, QWidget** outptr_QWidget); QMetaObject* QGroupBox_MetaObject(const QGroupBox* self); void* QGroupBox_Metacast(QGroupBox* self, const char* param1); struct miqt_string QGroupBox_Tr(const char* s); diff --git a/qt6/gen_qguiapplication.cpp b/qt6/gen_qguiapplication.cpp index bff2f508..efea3713 100644 --- a/qt6/gen_qguiapplication.cpp +++ b/qt6/gen_qguiapplication.cpp @@ -79,18 +79,16 @@ public: }; -void QGuiApplication_new(int* argc, char** argv, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { - MiqtVirtualQGuiApplication* ret = new MiqtVirtualQGuiApplication(static_cast(*argc), argv); - *outptr_QGuiApplication = ret; - *outptr_QCoreApplication = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGuiApplication* QGuiApplication_new(int* argc, char** argv) { + return new MiqtVirtualQGuiApplication(static_cast(*argc), argv); } -void QGuiApplication_new2(int* argc, char** argv, int param3, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject) { - MiqtVirtualQGuiApplication* ret = new MiqtVirtualQGuiApplication(static_cast(*argc), argv, static_cast(param3)); - *outptr_QGuiApplication = ret; - *outptr_QCoreApplication = static_cast(ret); - *outptr_QObject = static_cast(ret); +QGuiApplication* QGuiApplication_new2(int* argc, char** argv, int param3) { + return new MiqtVirtualQGuiApplication(static_cast(*argc), argv, static_cast(param3)); +} + +void QGuiApplication_virtbase(QGuiApplication* src, QCoreApplication** outptr_QCoreApplication) { + *outptr_QCoreApplication = static_cast(src); } QMetaObject* QGuiApplication_MetaObject(const QGuiApplication* self) { diff --git a/qt6/gen_qguiapplication.go b/qt6/gen_qguiapplication.go index 87dad2b7..23a8f48c 100644 --- a/qt6/gen_qguiapplication.go +++ b/qt6/gen_qguiapplication.go @@ -35,22 +35,20 @@ func (this *QGuiApplication) UnsafePointer() unsafe.Pointer { } // newQGuiApplication constructs the type using only CGO pointers. -func newQGuiApplication(h *C.QGuiApplication, h_QCoreApplication *C.QCoreApplication, h_QObject *C.QObject) *QGuiApplication { +func newQGuiApplication(h *C.QGuiApplication) *QGuiApplication { if h == nil { return nil } + var outptr_QCoreApplication *C.QCoreApplication = nil + C.QGuiApplication_virtbase(h, &outptr_QCoreApplication) + return &QGuiApplication{h: h, - QCoreApplication: newQCoreApplication(h_QCoreApplication, h_QObject)} + QCoreApplication: newQCoreApplication(outptr_QCoreApplication)} } // UnsafeNewQGuiApplication constructs the type using only unsafe pointers. -func UnsafeNewQGuiApplication(h unsafe.Pointer, h_QCoreApplication unsafe.Pointer, h_QObject unsafe.Pointer) *QGuiApplication { - if h == nil { - return nil - } - - return &QGuiApplication{h: (*C.QGuiApplication)(h), - QCoreApplication: UnsafeNewQCoreApplication(h_QCoreApplication, h_QObject)} +func UnsafeNewQGuiApplication(h unsafe.Pointer) *QGuiApplication { + return newQGuiApplication((*C.QGuiApplication)(h)) } // NewQGuiApplication constructs a new QGuiApplication object. @@ -65,12 +63,7 @@ func NewQGuiApplication(args []string) *QGuiApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - var outptr_QGuiApplication *C.QGuiApplication = nil - var outptr_QCoreApplication *C.QCoreApplication = nil - var outptr_QObject *C.QObject = nil - - C.QGuiApplication_new(argc, &argv[0], &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) - ret := newQGuiApplication(outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret := newQGuiApplication(C.QGuiApplication_new(argc, &argv[0])) ret.isSubclass = true return ret } @@ -87,12 +80,7 @@ func NewQGuiApplication2(args []string, param3 int) *QGuiApplication { runtime.LockOSThread() // Prevent Go from migrating the main Qt thread - var outptr_QGuiApplication *C.QGuiApplication = nil - var outptr_QCoreApplication *C.QCoreApplication = nil - var outptr_QObject *C.QObject = nil - - C.QGuiApplication_new2(argc, &argv[0], (C.int)(param3), &outptr_QGuiApplication, &outptr_QCoreApplication, &outptr_QObject) - ret := newQGuiApplication(outptr_QGuiApplication, outptr_QCoreApplication, outptr_QObject) + ret := newQGuiApplication(C.QGuiApplication_new2(argc, &argv[0], (C.int)(param3))) ret.isSubclass = true return ret } @@ -151,7 +139,7 @@ func QGuiApplication_AllWindows() []*QWindow { _ret := make([]*QWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQWindow(_outCast[i], nil, nil) + _ret[i] = newQWindow(_outCast[i]) } return _ret } @@ -161,13 +149,13 @@ func QGuiApplication_TopLevelWindows() []*QWindow { _ret := make([]*QWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQWindow(_outCast[i], nil, nil) + _ret[i] = newQWindow(_outCast[i]) } return _ret } func QGuiApplication_TopLevelAt(pos *QPoint) *QWindow { - return newQWindow(C.QGuiApplication_TopLevelAt(pos.cPointer()), nil, nil) + return newQWindow(C.QGuiApplication_TopLevelAt(pos.cPointer())) } func QGuiApplication_SetWindowIcon(icon *QIcon) { @@ -188,11 +176,11 @@ func QGuiApplication_PlatformName() string { } func QGuiApplication_ModalWindow() *QWindow { - return newQWindow(C.QGuiApplication_ModalWindow(), nil, nil) + return newQWindow(C.QGuiApplication_ModalWindow()) } func QGuiApplication_FocusWindow() *QWindow { - return newQWindow(C.QGuiApplication_FocusWindow(), nil, nil) + return newQWindow(C.QGuiApplication_FocusWindow()) } func QGuiApplication_FocusObject() *QObject { @@ -200,7 +188,7 @@ func QGuiApplication_FocusObject() *QObject { } func QGuiApplication_PrimaryScreen() *QScreen { - return newQScreen(C.QGuiApplication_PrimaryScreen(), nil) + return newQScreen(C.QGuiApplication_PrimaryScreen()) } func QGuiApplication_Screens() []*QScreen { @@ -208,13 +196,13 @@ func QGuiApplication_Screens() []*QScreen { _ret := make([]*QScreen, int(_ma.len)) _outCast := (*[0xffff]*C.QScreen)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQScreen(_outCast[i], nil) + _ret[i] = newQScreen(_outCast[i]) } return _ret } func QGuiApplication_ScreenAt(point *QPoint) *QScreen { - return newQScreen(C.QGuiApplication_ScreenAt(point.cPointer()), nil) + return newQScreen(C.QGuiApplication_ScreenAt(point.cPointer())) } func (this *QGuiApplication) DevicePixelRatio() float64 { @@ -248,7 +236,7 @@ func QGuiApplication_SetFont(font *QFont) { } func QGuiApplication_Clipboard() *QClipboard { - return newQClipboard(C.QGuiApplication_Clipboard(), nil) + return newQClipboard(C.QGuiApplication_Clipboard()) } func QGuiApplication_Palette() *QPalette { @@ -290,7 +278,7 @@ func QGuiApplication_IsLeftToRight() bool { } func QGuiApplication_StyleHints() *QStyleHints { - return newQStyleHints(C.QGuiApplication_StyleHints(), nil) + return newQStyleHints(C.QGuiApplication_StyleHints()) } func QGuiApplication_SetDesktopSettingsAware(on bool) { @@ -302,7 +290,7 @@ func QGuiApplication_DesktopSettingsAware() bool { } func QGuiApplication_InputMethod() *QInputMethod { - return newQInputMethod(C.QGuiApplication_InputMethod(), nil) + return newQInputMethod(C.QGuiApplication_InputMethod()) } func QGuiApplication_SetQuitOnLastWindowClosed(quit bool) { @@ -391,7 +379,7 @@ func miqt_exec_callback_QGuiApplication_ScreenAdded(cb C.intptr_t, screen *C.QSc } // Convert all CABI parameters to Go parameters - slotval1 := newQScreen(screen, nil) + slotval1 := newQScreen(screen) gofunc(slotval1) } @@ -411,7 +399,7 @@ func miqt_exec_callback_QGuiApplication_ScreenRemoved(cb C.intptr_t, screen *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := newQScreen(screen, nil) + slotval1 := newQScreen(screen) gofunc(slotval1) } @@ -431,7 +419,7 @@ func miqt_exec_callback_QGuiApplication_PrimaryScreenChanged(cb C.intptr_t, scre } // Convert all CABI parameters to Go parameters - slotval1 := newQScreen(screen, nil) + slotval1 := newQScreen(screen) gofunc(slotval1) } @@ -488,7 +476,7 @@ func miqt_exec_callback_QGuiApplication_FocusWindowChanged(cb C.intptr_t, focusW } // Convert all CABI parameters to Go parameters - slotval1 := newQWindow(focusWindow, nil, nil) + slotval1 := newQWindow(focusWindow) gofunc(slotval1) } @@ -548,7 +536,7 @@ func miqt_exec_callback_QGuiApplication_CommitDataRequest(cb C.intptr_t, session } // Convert all CABI parameters to Go parameters - slotval1 := newQSessionManager(sessionManager, nil) + slotval1 := newQSessionManager(sessionManager) gofunc(slotval1) } @@ -568,7 +556,7 @@ func miqt_exec_callback_QGuiApplication_SaveStateRequest(cb C.intptr_t, sessionM } // Convert all CABI parameters to Go parameters - slotval1 := newQSessionManager(sessionManager, nil) + slotval1 := newQSessionManager(sessionManager) gofunc(slotval1) } diff --git a/qt6/gen_qguiapplication.h b/qt6/gen_qguiapplication.h index c8b3a253..f02a1964 100644 --- a/qt6/gen_qguiapplication.h +++ b/qt6/gen_qguiapplication.h @@ -50,8 +50,9 @@ typedef struct QStyleHints QStyleHints; typedef struct QWindow QWindow; #endif -void QGuiApplication_new(int* argc, char** argv, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); -void QGuiApplication_new2(int* argc, char** argv, int param3, QGuiApplication** outptr_QGuiApplication, QCoreApplication** outptr_QCoreApplication, QObject** outptr_QObject); +QGuiApplication* QGuiApplication_new(int* argc, char** argv); +QGuiApplication* QGuiApplication_new2(int* argc, char** argv, int param3); +void QGuiApplication_virtbase(QGuiApplication* src, QCoreApplication** outptr_QCoreApplication); QMetaObject* QGuiApplication_MetaObject(const QGuiApplication* self); void* QGuiApplication_Metacast(QGuiApplication* self, const char* param1); struct miqt_string QGuiApplication_Tr(const char* s); diff --git a/qt6/gen_qhashfunctions.cpp b/qt6/gen_qhashfunctions.cpp index 6650d757..3d948d40 100644 --- a/qt6/gen_qhashfunctions.cpp +++ b/qt6/gen_qhashfunctions.cpp @@ -3,14 +3,12 @@ #include "gen_qhashfunctions.h" #include "_cgo_export.h" -void QHashSeed_new(QHashSeed** outptr_QHashSeed) { - QHashSeed* ret = new QHashSeed(); - *outptr_QHashSeed = ret; +QHashSeed* QHashSeed_new() { + return new QHashSeed(); } -void QHashSeed_new2(size_t d, QHashSeed** outptr_QHashSeed) { - QHashSeed* ret = new QHashSeed(static_cast(d)); - *outptr_QHashSeed = ret; +QHashSeed* QHashSeed_new2(size_t d) { + return new QHashSeed(static_cast(d)); } QHashSeed* QHashSeed_GlobalSeed() { diff --git a/qt6/gen_qhashfunctions.go b/qt6/gen_qhashfunctions.go index 5befd859..c3c0a93d 100644 --- a/qt6/gen_qhashfunctions.go +++ b/qt6/gen_qhashfunctions.go @@ -37,34 +37,27 @@ func newQHashSeed(h *C.QHashSeed) *QHashSeed { if h == nil { return nil } + return &QHashSeed{h: h} } // UnsafeNewQHashSeed constructs the type using only unsafe pointers. func UnsafeNewQHashSeed(h unsafe.Pointer) *QHashSeed { - if h == nil { - return nil - } - - return &QHashSeed{h: (*C.QHashSeed)(h)} + return newQHashSeed((*C.QHashSeed)(h)) } // NewQHashSeed constructs a new QHashSeed object. func NewQHashSeed() *QHashSeed { - var outptr_QHashSeed *C.QHashSeed = nil - C.QHashSeed_new(&outptr_QHashSeed) - ret := newQHashSeed(outptr_QHashSeed) + ret := newQHashSeed(C.QHashSeed_new()) ret.isSubclass = true return ret } // NewQHashSeed2 constructs a new QHashSeed object. func NewQHashSeed2(d uint64) *QHashSeed { - var outptr_QHashSeed *C.QHashSeed = nil - C.QHashSeed_new2((C.size_t)(d), &outptr_QHashSeed) - ret := newQHashSeed(outptr_QHashSeed) + ret := newQHashSeed(C.QHashSeed_new2((C.size_t)(d))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qhashfunctions.h b/qt6/gen_qhashfunctions.h index 48a8f833..9fa4f974 100644 --- a/qt6/gen_qhashfunctions.h +++ b/qt6/gen_qhashfunctions.h @@ -20,8 +20,8 @@ class QHashSeed; typedef struct QHashSeed QHashSeed; #endif -void QHashSeed_new(QHashSeed** outptr_QHashSeed); -void QHashSeed_new2(size_t d, QHashSeed** outptr_QHashSeed); +QHashSeed* QHashSeed_new(); +QHashSeed* QHashSeed_new2(size_t d); QHashSeed* QHashSeed_GlobalSeed(); void QHashSeed_SetDeterministicGlobalSeed(); void QHashSeed_ResetRandomGlobalSeed(); diff --git a/qt6/gen_qheaderview.cpp b/qt6/gen_qheaderview.cpp index 1d088b4e..03f858e4 100644 --- a/qt6/gen_qheaderview.cpp +++ b/qt6/gen_qheaderview.cpp @@ -1731,26 +1731,16 @@ public: }; -void QHeaderView_new(int orientation, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQHeaderView* ret = new MiqtVirtualQHeaderView(static_cast(orientation)); - *outptr_QHeaderView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QHeaderView* QHeaderView_new(int orientation) { + return new MiqtVirtualQHeaderView(static_cast(orientation)); } -void QHeaderView_new2(int orientation, QWidget* parent, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQHeaderView* ret = new MiqtVirtualQHeaderView(static_cast(orientation), parent); - *outptr_QHeaderView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QHeaderView* QHeaderView_new2(int orientation, QWidget* parent) { + return new MiqtVirtualQHeaderView(static_cast(orientation), parent); +} + +void QHeaderView_virtbase(QHeaderView* src, QAbstractItemView** outptr_QAbstractItemView) { + *outptr_QAbstractItemView = static_cast(src); } QMetaObject* QHeaderView_MetaObject(const QHeaderView* self) { diff --git a/qt6/gen_qheaderview.go b/qt6/gen_qheaderview.go index cb1a3679..5967b1b3 100644 --- a/qt6/gen_qheaderview.go +++ b/qt6/gen_qheaderview.go @@ -45,52 +45,34 @@ func (this *QHeaderView) UnsafePointer() unsafe.Pointer { } // newQHeaderView constructs the type using only CGO pointers. -func newQHeaderView(h *C.QHeaderView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QHeaderView { +func newQHeaderView(h *C.QHeaderView) *QHeaderView { if h == nil { return nil } + var outptr_QAbstractItemView *C.QAbstractItemView = nil + C.QHeaderView_virtbase(h, &outptr_QAbstractItemView) + return &QHeaderView{h: h, - QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractItemView: newQAbstractItemView(outptr_QAbstractItemView)} } // UnsafeNewQHeaderView constructs the type using only unsafe pointers. -func UnsafeNewQHeaderView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QHeaderView { - if h == nil { - return nil - } - - return &QHeaderView{h: (*C.QHeaderView)(h), - QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQHeaderView(h unsafe.Pointer) *QHeaderView { + return newQHeaderView((*C.QHeaderView)(h)) } // NewQHeaderView constructs a new QHeaderView object. func NewQHeaderView(orientation Orientation) *QHeaderView { - var outptr_QHeaderView *C.QHeaderView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QHeaderView_new((C.int)(orientation), &outptr_QHeaderView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQHeaderView(outptr_QHeaderView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQHeaderView(C.QHeaderView_new((C.int)(orientation))) ret.isSubclass = true return ret } // NewQHeaderView2 constructs a new QHeaderView object. func NewQHeaderView2(orientation Orientation, parent *QWidget) *QHeaderView { - var outptr_QHeaderView *C.QHeaderView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QHeaderView_new2((C.int)(orientation), parent.cPointer(), &outptr_QHeaderView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQHeaderView(outptr_QHeaderView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQHeaderView(C.QHeaderView_new2((C.int)(orientation), parent.cPointer())) ret.isSubclass = true return ret } @@ -673,7 +655,7 @@ func miqt_exec_callback_QHeaderView_SetModel(self *C.QHeaderView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc((&QHeaderView{h: self}).callVirtualBase_SetModel, slotval1) @@ -854,7 +836,7 @@ func miqt_exec_callback_QHeaderView_PaintEvent(self *C.QHeaderView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QHeaderView{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -880,7 +862,7 @@ func miqt_exec_callback_QHeaderView_MousePressEvent(self *C.QHeaderView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QHeaderView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -906,7 +888,7 @@ func miqt_exec_callback_QHeaderView_MouseMoveEvent(self *C.QHeaderView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QHeaderView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -932,7 +914,7 @@ func miqt_exec_callback_QHeaderView_MouseReleaseEvent(self *C.QHeaderView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QHeaderView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -958,7 +940,7 @@ func miqt_exec_callback_QHeaderView_MouseDoubleClickEvent(self *C.QHeaderView, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QHeaderView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1451,7 +1433,7 @@ func miqt_exec_callback_QHeaderView_InitStyleOptionForIndex(self *C.QHeaderView, } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionHeader(option, nil) + slotval1 := newQStyleOptionHeader(option) slotval2 := (int)(logicalIndex) @@ -1479,7 +1461,7 @@ func miqt_exec_callback_QHeaderView_InitStyleOption(self *C.QHeaderView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionHeader(option, nil) + slotval1 := newQStyleOptionHeader(option) gofunc((&QHeaderView{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -1505,7 +1487,7 @@ func miqt_exec_callback_QHeaderView_SetSelectionModel(self *C.QHeaderView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QHeaderView{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -1602,7 +1584,7 @@ func miqt_exec_callback_QHeaderView_SizeHintForColumn(self *C.QHeaderView, cb C. func (this *QHeaderView) callVirtualBase_ItemDelegateForIndex(index *QModelIndex) *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QHeaderView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer()), nil) + return newQAbstractItemDelegate(C.QHeaderView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer())) } func (this *QHeaderView) OnItemDelegateForIndex(slot func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) { @@ -1935,7 +1917,7 @@ func miqt_exec_callback_QHeaderView_CloseEditor(self *C.QHeaderView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) @@ -1963,7 +1945,7 @@ func miqt_exec_callback_QHeaderView_CommitData(self *C.QHeaderView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc((&QHeaderView{h: self}).callVirtualBase_CommitData, slotval1) @@ -2142,7 +2124,7 @@ func miqt_exec_callback_QHeaderView_InitViewItemOption(self *C.QHeaderView, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) gofunc((&QHeaderView{h: self}).callVirtualBase_InitViewItemOption, slotval1) @@ -2196,7 +2178,7 @@ func miqt_exec_callback_QHeaderView_DragEnterEvent(self *C.QHeaderView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -2222,7 +2204,7 @@ func miqt_exec_callback_QHeaderView_DragMoveEvent(self *C.QHeaderView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -2248,7 +2230,7 @@ func miqt_exec_callback_QHeaderView_DragLeaveEvent(self *C.QHeaderView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -2274,7 +2256,7 @@ func miqt_exec_callback_QHeaderView_DropEvent(self *C.QHeaderView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -2300,7 +2282,7 @@ func miqt_exec_callback_QHeaderView_FocusInEvent(self *C.QHeaderView, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -2326,7 +2308,7 @@ func miqt_exec_callback_QHeaderView_FocusOutEvent(self *C.QHeaderView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -2352,7 +2334,7 @@ func miqt_exec_callback_QHeaderView_KeyPressEvent(self *C.QHeaderView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -2378,7 +2360,7 @@ func miqt_exec_callback_QHeaderView_ResizeEvent(self *C.QHeaderView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -2404,7 +2386,7 @@ func miqt_exec_callback_QHeaderView_TimerEvent(self *C.QHeaderView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -2430,7 +2412,7 @@ func miqt_exec_callback_QHeaderView_InputMethodEvent(self *C.QHeaderView, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QHeaderView{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qheaderview.h b/qt6/gen_qheaderview.h index 2ce4140f..95df56b0 100644 --- a/qt6/gen_qheaderview.h +++ b/qt6/gen_qheaderview.h @@ -84,8 +84,9 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QHeaderView_new(int orientation, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QHeaderView_new2(int orientation, QWidget* parent, QHeaderView** outptr_QHeaderView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QHeaderView* QHeaderView_new(int orientation); +QHeaderView* QHeaderView_new2(int orientation, QWidget* parent); +void QHeaderView_virtbase(QHeaderView* src, QAbstractItemView** outptr_QAbstractItemView); QMetaObject* QHeaderView_MetaObject(const QHeaderView* self); void* QHeaderView_Metacast(QHeaderView* self, const char* param1); struct miqt_string QHeaderView_Tr(const char* s); diff --git a/qt6/gen_qicon.cpp b/qt6/gen_qicon.cpp index 841f9c8e..67ff9d42 100644 --- a/qt6/gen_qicon.cpp +++ b/qt6/gen_qicon.cpp @@ -13,30 +13,25 @@ #include "gen_qicon.h" #include "_cgo_export.h" -void QIcon_new(QIcon** outptr_QIcon) { - QIcon* ret = new QIcon(); - *outptr_QIcon = ret; +QIcon* QIcon_new() { + return new QIcon(); } -void QIcon_new2(QPixmap* pixmap, QIcon** outptr_QIcon) { - QIcon* ret = new QIcon(*pixmap); - *outptr_QIcon = ret; +QIcon* QIcon_new2(QPixmap* pixmap) { + return new QIcon(*pixmap); } -void QIcon_new3(QIcon* other, QIcon** outptr_QIcon) { - QIcon* ret = new QIcon(*other); - *outptr_QIcon = ret; +QIcon* QIcon_new3(QIcon* other) { + return new QIcon(*other); } -void QIcon_new4(struct miqt_string fileName, QIcon** outptr_QIcon) { +QIcon* QIcon_new4(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QIcon* ret = new QIcon(fileName_QString); - *outptr_QIcon = ret; + return new QIcon(fileName_QString); } -void QIcon_new5(QIconEngine* engine, QIcon** outptr_QIcon) { - QIcon* ret = new QIcon(engine); - *outptr_QIcon = ret; +QIcon* QIcon_new5(QIconEngine* engine) { + return new QIcon(engine); } void QIcon_OperatorAssign(QIcon* self, QIcon* other) { diff --git a/qt6/gen_qicon.go b/qt6/gen_qicon.go index 574dd9d9..991f6e07 100644 --- a/qt6/gen_qicon.go +++ b/qt6/gen_qicon.go @@ -53,44 +53,35 @@ func newQIcon(h *C.QIcon) *QIcon { if h == nil { return nil } + return &QIcon{h: h} } // UnsafeNewQIcon constructs the type using only unsafe pointers. func UnsafeNewQIcon(h unsafe.Pointer) *QIcon { - if h == nil { - return nil - } - - return &QIcon{h: (*C.QIcon)(h)} + return newQIcon((*C.QIcon)(h)) } // NewQIcon constructs a new QIcon object. func NewQIcon() *QIcon { - var outptr_QIcon *C.QIcon = nil - C.QIcon_new(&outptr_QIcon) - ret := newQIcon(outptr_QIcon) + ret := newQIcon(C.QIcon_new()) ret.isSubclass = true return ret } // NewQIcon2 constructs a new QIcon object. func NewQIcon2(pixmap *QPixmap) *QIcon { - var outptr_QIcon *C.QIcon = nil - C.QIcon_new2(pixmap.cPointer(), &outptr_QIcon) - ret := newQIcon(outptr_QIcon) + ret := newQIcon(C.QIcon_new2(pixmap.cPointer())) ret.isSubclass = true return ret } // NewQIcon3 constructs a new QIcon object. func NewQIcon3(other *QIcon) *QIcon { - var outptr_QIcon *C.QIcon = nil - C.QIcon_new3(other.cPointer(), &outptr_QIcon) - ret := newQIcon(outptr_QIcon) + ret := newQIcon(C.QIcon_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -101,20 +92,16 @@ func NewQIcon4(fileName string) *QIcon { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QIcon *C.QIcon = nil - C.QIcon_new4(fileName_ms, &outptr_QIcon) - ret := newQIcon(outptr_QIcon) + ret := newQIcon(C.QIcon_new4(fileName_ms)) ret.isSubclass = true return ret } // NewQIcon5 constructs a new QIcon object. func NewQIcon5(engine *QIconEngine) *QIcon { - var outptr_QIcon *C.QIcon = nil - C.QIcon_new5(engine.cPointer(), &outptr_QIcon) - ret := newQIcon(outptr_QIcon) + ret := newQIcon(C.QIcon_new5(engine.cPointer())) ret.isSubclass = true return ret } @@ -128,31 +115,31 @@ func (this *QIcon) Swap(other *QIcon) { } func (this *QIcon) Pixmap(size *QSize) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap(this.h, size.cPointer()), nil) + _goptr := newQPixmap(C.QIcon_Pixmap(this.h, size.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap2(w int, h int) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap2(this.h, (C.int)(w), (C.int)(h)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap2(this.h, (C.int)(w), (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) PixmapWithExtent(extent int) *QPixmap { - _goptr := newQPixmap(C.QIcon_PixmapWithExtent(this.h, (C.int)(extent)), nil) + _goptr := newQPixmap(C.QIcon_PixmapWithExtent(this.h, (C.int)(extent))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap3(size *QSize, devicePixelRatio float64) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap3(this.h, size.cPointer(), (C.double)(devicePixelRatio)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap3(this.h, size.cPointer(), (C.double)(devicePixelRatio))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap4(window *QWindow, size *QSize) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap4(this.h, window.cPointer(), size.cPointer()), nil) + _goptr := newQPixmap(C.QIcon_Pixmap4(this.h, window.cPointer(), size.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -345,61 +332,61 @@ func QIcon_SetFallbackThemeName(name string) { } func (this *QIcon) Pixmap22(size *QSize, mode QIcon__Mode) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap22(this.h, size.cPointer(), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap22(this.h, size.cPointer(), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap32(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap32(this.h, size.cPointer(), (C.int)(mode), (C.int)(state)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap32(this.h, size.cPointer(), (C.int)(mode), (C.int)(state))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap33(w int, h int, mode QIcon__Mode) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap33(this.h, (C.int)(w), (C.int)(h), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap33(this.h, (C.int)(w), (C.int)(h), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap42(w int, h int, mode QIcon__Mode, state QIcon__State) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap42(this.h, (C.int)(w), (C.int)(h), (C.int)(mode), (C.int)(state)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap42(this.h, (C.int)(w), (C.int)(h), (C.int)(mode), (C.int)(state))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap23(extent int, mode QIcon__Mode) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap23(this.h, (C.int)(extent), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap23(this.h, (C.int)(extent), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap34(extent int, mode QIcon__Mode, state QIcon__State) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap34(this.h, (C.int)(extent), (C.int)(mode), (C.int)(state)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap34(this.h, (C.int)(extent), (C.int)(mode), (C.int)(state))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap35(size *QSize, devicePixelRatio float64, mode QIcon__Mode) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap35(this.h, size.cPointer(), (C.double)(devicePixelRatio), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap35(this.h, size.cPointer(), (C.double)(devicePixelRatio), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap43(size *QSize, devicePixelRatio float64, mode QIcon__Mode, state QIcon__State) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap43(this.h, size.cPointer(), (C.double)(devicePixelRatio), (C.int)(mode), (C.int)(state)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap43(this.h, size.cPointer(), (C.double)(devicePixelRatio), (C.int)(mode), (C.int)(state))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap36(window *QWindow, size *QSize, mode QIcon__Mode) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap36(this.h, window.cPointer(), size.cPointer(), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap36(this.h, window.cPointer(), size.cPointer(), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QIcon) Pixmap44(window *QWindow, size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { - _goptr := newQPixmap(C.QIcon_Pixmap44(this.h, window.cPointer(), size.cPointer(), (C.int)(mode), (C.int)(state)), nil) + _goptr := newQPixmap(C.QIcon_Pixmap44(this.h, window.cPointer(), size.cPointer(), (C.int)(mode), (C.int)(state))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/gen_qicon.h b/qt6/gen_qicon.h index 35a808bb..2acdf095 100644 --- a/qt6/gen_qicon.h +++ b/qt6/gen_qicon.h @@ -32,11 +32,11 @@ typedef struct QSize QSize; typedef struct QWindow QWindow; #endif -void QIcon_new(QIcon** outptr_QIcon); -void QIcon_new2(QPixmap* pixmap, QIcon** outptr_QIcon); -void QIcon_new3(QIcon* other, QIcon** outptr_QIcon); -void QIcon_new4(struct miqt_string fileName, QIcon** outptr_QIcon); -void QIcon_new5(QIconEngine* engine, QIcon** outptr_QIcon); +QIcon* QIcon_new(); +QIcon* QIcon_new2(QPixmap* pixmap); +QIcon* QIcon_new3(QIcon* other); +QIcon* QIcon_new4(struct miqt_string fileName); +QIcon* QIcon_new5(QIconEngine* engine); void QIcon_OperatorAssign(QIcon* self, QIcon* other); void QIcon_Swap(QIcon* self, QIcon* other); QPixmap* QIcon_Pixmap(const QIcon* self, QSize* size); diff --git a/qt6/gen_qiconengine.cpp b/qt6/gen_qiconengine.cpp index a9b2866f..bc11037a 100644 --- a/qt6/gen_qiconengine.cpp +++ b/qt6/gen_qiconengine.cpp @@ -416,9 +416,8 @@ public: }; -void QIconEngine_new(QIconEngine** outptr_QIconEngine) { - MiqtVirtualQIconEngine* ret = new MiqtVirtualQIconEngine(); - *outptr_QIconEngine = ret; +QIconEngine* QIconEngine_new() { + return new MiqtVirtualQIconEngine(); } void QIconEngine_Paint(QIconEngine* self, QPainter* painter, QRect* rect, int mode, int state) { @@ -613,9 +612,8 @@ void QIconEngine_Delete(QIconEngine* self, bool isSubclass) { } } -void QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1, QIconEngine__ScaledPixmapArgument** outptr_QIconEngine__ScaledPixmapArgument) { - QIconEngine::ScaledPixmapArgument* ret = new QIconEngine::ScaledPixmapArgument(*param1); - *outptr_QIconEngine__ScaledPixmapArgument = ret; +QIconEngine__ScaledPixmapArgument* QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1) { + return new QIconEngine::ScaledPixmapArgument(*param1); } void QIconEngine__ScaledPixmapArgument_OperatorAssign(QIconEngine__ScaledPixmapArgument* self, QIconEngine__ScaledPixmapArgument* param1) { diff --git a/qt6/gen_qiconengine.go b/qt6/gen_qiconengine.go index 83af2302..623440ff 100644 --- a/qt6/gen_qiconengine.go +++ b/qt6/gen_qiconengine.go @@ -45,24 +45,19 @@ func newQIconEngine(h *C.QIconEngine) *QIconEngine { if h == nil { return nil } + return &QIconEngine{h: h} } // UnsafeNewQIconEngine constructs the type using only unsafe pointers. func UnsafeNewQIconEngine(h unsafe.Pointer) *QIconEngine { - if h == nil { - return nil - } - - return &QIconEngine{h: (*C.QIconEngine)(h)} + return newQIconEngine((*C.QIconEngine)(h)) } // NewQIconEngine constructs a new QIconEngine object. func NewQIconEngine() *QIconEngine { - var outptr_QIconEngine *C.QIconEngine = nil - C.QIconEngine_new(&outptr_QIconEngine) - ret := newQIconEngine(outptr_QIconEngine) + ret := newQIconEngine(C.QIconEngine_new()) ret.isSubclass = true return ret } @@ -78,7 +73,7 @@ func (this *QIconEngine) ActualSize(size *QSize, mode QIcon__Mode, state QIcon__ } func (this *QIconEngine) Pixmap(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { - _goptr := newQPixmap(C.QIconEngine_Pixmap(this.h, size.cPointer(), (C.int)(mode), (C.int)(state)), nil) + _goptr := newQPixmap(C.QIconEngine_Pixmap(this.h, size.cPointer(), (C.int)(mode), (C.int)(state))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -138,7 +133,7 @@ func (this *QIconEngine) IsNull() bool { } func (this *QIconEngine) ScaledPixmap(size *QSize, mode QIcon__Mode, state QIcon__State, scale float64) *QPixmap { - _goptr := newQPixmap(C.QIconEngine_ScaledPixmap(this.h, size.cPointer(), (C.int)(mode), (C.int)(state), (C.double)(scale)), nil) + _goptr := newQPixmap(C.QIconEngine_ScaledPixmap(this.h, size.cPointer(), (C.int)(mode), (C.int)(state), (C.double)(scale))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -209,7 +204,7 @@ func miqt_exec_callback_QIconEngine_ActualSize(self *C.QIconEngine, cb C.intptr_ func (this *QIconEngine) callVirtualBase_Pixmap(size *QSize, mode QIcon__Mode, state QIcon__State) *QPixmap { - _goptr := newQPixmap(C.QIconEngine_virtualbase_Pixmap(unsafe.Pointer(this.h), size.cPointer(), (C.int)(mode), (C.int)(state)), nil) + _goptr := newQPixmap(C.QIconEngine_virtualbase_Pixmap(unsafe.Pointer(this.h), size.cPointer(), (C.int)(mode), (C.int)(state))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -261,7 +256,7 @@ func miqt_exec_callback_QIconEngine_AddPixmap(self *C.QIconEngine, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQPixmap(pixmap, nil) + slotval1 := newQPixmap(pixmap) slotval2 := (QIcon__Mode)(mode) @@ -379,7 +374,7 @@ func miqt_exec_callback_QIconEngine_Read(self *C.QIconEngine, cb C.intptr_t, in } // Convert all CABI parameters to Go parameters - slotval1 := newQDataStream(in, nil) + slotval1 := newQDataStream(in) virtualReturn := gofunc((&QIconEngine{h: self}).callVirtualBase_Read, slotval1) @@ -407,7 +402,7 @@ func miqt_exec_callback_QIconEngine_Write(self *C.QIconEngine, cb C.intptr_t, ou } // Convert all CABI parameters to Go parameters - slotval1 := newQDataStream(out, nil) + slotval1 := newQDataStream(out) virtualReturn := gofunc((&QIconEngine{h: self}).callVirtualBase_Write, slotval1) @@ -517,7 +512,7 @@ func miqt_exec_callback_QIconEngine_IsNull(self *C.QIconEngine, cb C.intptr_t) C func (this *QIconEngine) callVirtualBase_ScaledPixmap(size *QSize, mode QIcon__Mode, state QIcon__State, scale float64) *QPixmap { - _goptr := newQPixmap(C.QIconEngine_virtualbase_ScaledPixmap(unsafe.Pointer(this.h), size.cPointer(), (C.int)(mode), (C.int)(state), (C.double)(scale)), nil) + _goptr := newQPixmap(C.QIconEngine_virtualbase_ScaledPixmap(unsafe.Pointer(this.h), size.cPointer(), (C.int)(mode), (C.int)(state), (C.double)(scale))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -617,24 +612,19 @@ func newQIconEngine__ScaledPixmapArgument(h *C.QIconEngine__ScaledPixmapArgument if h == nil { return nil } + return &QIconEngine__ScaledPixmapArgument{h: h} } // UnsafeNewQIconEngine__ScaledPixmapArgument constructs the type using only unsafe pointers. func UnsafeNewQIconEngine__ScaledPixmapArgument(h unsafe.Pointer) *QIconEngine__ScaledPixmapArgument { - if h == nil { - return nil - } - - return &QIconEngine__ScaledPixmapArgument{h: (*C.QIconEngine__ScaledPixmapArgument)(h)} + return newQIconEngine__ScaledPixmapArgument((*C.QIconEngine__ScaledPixmapArgument)(h)) } // NewQIconEngine__ScaledPixmapArgument constructs a new QIconEngine::ScaledPixmapArgument object. func NewQIconEngine__ScaledPixmapArgument(param1 *QIconEngine__ScaledPixmapArgument) *QIconEngine__ScaledPixmapArgument { - var outptr_QIconEngine__ScaledPixmapArgument *C.QIconEngine__ScaledPixmapArgument = nil - C.QIconEngine__ScaledPixmapArgument_new(param1.cPointer(), &outptr_QIconEngine__ScaledPixmapArgument) - ret := newQIconEngine__ScaledPixmapArgument(outptr_QIconEngine__ScaledPixmapArgument) + ret := newQIconEngine__ScaledPixmapArgument(C.QIconEngine__ScaledPixmapArgument_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qiconengine.h b/qt6/gen_qiconengine.h index eb54a82e..2f2cbc55 100644 --- a/qt6/gen_qiconengine.h +++ b/qt6/gen_qiconengine.h @@ -36,7 +36,7 @@ typedef struct QRect QRect; typedef struct QSize QSize; #endif -void QIconEngine_new(QIconEngine** outptr_QIconEngine); +QIconEngine* QIconEngine_new(); void QIconEngine_Paint(QIconEngine* self, QPainter* painter, QRect* rect, int mode, int state); QSize* QIconEngine_ActualSize(QIconEngine* self, QSize* size, int mode, int state); QPixmap* QIconEngine_Pixmap(QIconEngine* self, QSize* size, int mode, int state); @@ -81,7 +81,7 @@ void QIconEngine_override_virtual_VirtualHook(void* self, intptr_t slot); void QIconEngine_virtualbase_VirtualHook(void* self, int id, void* data); void QIconEngine_Delete(QIconEngine* self, bool isSubclass); -void QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1, QIconEngine__ScaledPixmapArgument** outptr_QIconEngine__ScaledPixmapArgument); +QIconEngine__ScaledPixmapArgument* QIconEngine__ScaledPixmapArgument_new(QIconEngine__ScaledPixmapArgument* param1); void QIconEngine__ScaledPixmapArgument_OperatorAssign(QIconEngine__ScaledPixmapArgument* self, QIconEngine__ScaledPixmapArgument* param1); void QIconEngine__ScaledPixmapArgument_Delete(QIconEngine__ScaledPixmapArgument* self, bool isSubclass); diff --git a/qt6/gen_qiconengineplugin.cpp b/qt6/gen_qiconengineplugin.cpp index 0ffa14d3..34d09ccc 100644 --- a/qt6/gen_qiconengineplugin.cpp +++ b/qt6/gen_qiconengineplugin.cpp @@ -217,16 +217,16 @@ public: }; -void QIconEnginePlugin_new(QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject) { - MiqtVirtualQIconEnginePlugin* ret = new MiqtVirtualQIconEnginePlugin(); - *outptr_QIconEnginePlugin = ret; - *outptr_QObject = static_cast(ret); +QIconEnginePlugin* QIconEnginePlugin_new() { + return new MiqtVirtualQIconEnginePlugin(); } -void QIconEnginePlugin_new2(QObject* parent, QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject) { - MiqtVirtualQIconEnginePlugin* ret = new MiqtVirtualQIconEnginePlugin(parent); - *outptr_QIconEnginePlugin = ret; - *outptr_QObject = static_cast(ret); +QIconEnginePlugin* QIconEnginePlugin_new2(QObject* parent) { + return new MiqtVirtualQIconEnginePlugin(parent); +} + +void QIconEnginePlugin_virtbase(QIconEnginePlugin* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QIconEnginePlugin_MetaObject(const QIconEnginePlugin* self) { diff --git a/qt6/gen_qiconengineplugin.go b/qt6/gen_qiconengineplugin.go index 985adfeb..96813939 100644 --- a/qt6/gen_qiconengineplugin.go +++ b/qt6/gen_qiconengineplugin.go @@ -35,42 +35,34 @@ func (this *QIconEnginePlugin) UnsafePointer() unsafe.Pointer { } // newQIconEnginePlugin constructs the type using only CGO pointers. -func newQIconEnginePlugin(h *C.QIconEnginePlugin, h_QObject *C.QObject) *QIconEnginePlugin { +func newQIconEnginePlugin(h *C.QIconEnginePlugin) *QIconEnginePlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QIconEnginePlugin_virtbase(h, &outptr_QObject) + return &QIconEnginePlugin{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQIconEnginePlugin constructs the type using only unsafe pointers. -func UnsafeNewQIconEnginePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QIconEnginePlugin { - if h == nil { - return nil - } - - return &QIconEnginePlugin{h: (*C.QIconEnginePlugin)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQIconEnginePlugin(h unsafe.Pointer) *QIconEnginePlugin { + return newQIconEnginePlugin((*C.QIconEnginePlugin)(h)) } // NewQIconEnginePlugin constructs a new QIconEnginePlugin object. func NewQIconEnginePlugin() *QIconEnginePlugin { - var outptr_QIconEnginePlugin *C.QIconEnginePlugin = nil - var outptr_QObject *C.QObject = nil - C.QIconEnginePlugin_new(&outptr_QIconEnginePlugin, &outptr_QObject) - ret := newQIconEnginePlugin(outptr_QIconEnginePlugin, outptr_QObject) + ret := newQIconEnginePlugin(C.QIconEnginePlugin_new()) ret.isSubclass = true return ret } // NewQIconEnginePlugin2 constructs a new QIconEnginePlugin object. func NewQIconEnginePlugin2(parent *QObject) *QIconEnginePlugin { - var outptr_QIconEnginePlugin *C.QIconEnginePlugin = nil - var outptr_QObject *C.QObject = nil - C.QIconEnginePlugin_new2(parent.cPointer(), &outptr_QIconEnginePlugin, &outptr_QObject) - ret := newQIconEnginePlugin(outptr_QIconEnginePlugin, outptr_QObject) + ret := newQIconEnginePlugin(C.QIconEnginePlugin_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -227,7 +219,7 @@ func miqt_exec_callback_QIconEnginePlugin_TimerEvent(self *C.QIconEnginePlugin, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QIconEnginePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -253,7 +245,7 @@ func miqt_exec_callback_QIconEnginePlugin_ChildEvent(self *C.QIconEnginePlugin, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QIconEnginePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qiconengineplugin.h b/qt6/gen_qiconengineplugin.h index 7acea96f..8344b39a 100644 --- a/qt6/gen_qiconengineplugin.h +++ b/qt6/gen_qiconengineplugin.h @@ -34,8 +34,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QIconEnginePlugin_new(QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject); -void QIconEnginePlugin_new2(QObject* parent, QIconEnginePlugin** outptr_QIconEnginePlugin, QObject** outptr_QObject); +QIconEnginePlugin* QIconEnginePlugin_new(); +QIconEnginePlugin* QIconEnginePlugin_new2(QObject* parent); +void QIconEnginePlugin_virtbase(QIconEnginePlugin* src, QObject** outptr_QObject); QMetaObject* QIconEnginePlugin_MetaObject(const QIconEnginePlugin* self); void* QIconEnginePlugin_Metacast(QIconEnginePlugin* self, const char* param1); struct miqt_string QIconEnginePlugin_Tr(const char* s); diff --git a/qt6/gen_qidentityproxymodel.cpp b/qt6/gen_qidentityproxymodel.cpp index c6589f45..5313ff2b 100644 --- a/qt6/gen_qidentityproxymodel.cpp +++ b/qt6/gen_qidentityproxymodel.cpp @@ -1185,20 +1185,16 @@ public: }; -void QIdentityProxyModel_new(QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQIdentityProxyModel* ret = new MiqtVirtualQIdentityProxyModel(); - *outptr_QIdentityProxyModel = ret; - *outptr_QAbstractProxyModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QIdentityProxyModel* QIdentityProxyModel_new() { + return new MiqtVirtualQIdentityProxyModel(); } -void QIdentityProxyModel_new2(QObject* parent, QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQIdentityProxyModel* ret = new MiqtVirtualQIdentityProxyModel(parent); - *outptr_QIdentityProxyModel = ret; - *outptr_QAbstractProxyModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QIdentityProxyModel* QIdentityProxyModel_new2(QObject* parent) { + return new MiqtVirtualQIdentityProxyModel(parent); +} + +void QIdentityProxyModel_virtbase(QIdentityProxyModel* src, QAbstractProxyModel** outptr_QAbstractProxyModel) { + *outptr_QAbstractProxyModel = static_cast(src); } QMetaObject* QIdentityProxyModel_MetaObject(const QIdentityProxyModel* self) { diff --git a/qt6/gen_qidentityproxymodel.go b/qt6/gen_qidentityproxymodel.go index b86bf35d..2a56dfe3 100644 --- a/qt6/gen_qidentityproxymodel.go +++ b/qt6/gen_qidentityproxymodel.go @@ -35,46 +35,34 @@ func (this *QIdentityProxyModel) UnsafePointer() unsafe.Pointer { } // newQIdentityProxyModel constructs the type using only CGO pointers. -func newQIdentityProxyModel(h *C.QIdentityProxyModel, h_QAbstractProxyModel *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QIdentityProxyModel { +func newQIdentityProxyModel(h *C.QIdentityProxyModel) *QIdentityProxyModel { if h == nil { return nil } + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + C.QIdentityProxyModel_virtbase(h, &outptr_QAbstractProxyModel) + return &QIdentityProxyModel{h: h, - QAbstractProxyModel: newQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} + QAbstractProxyModel: newQAbstractProxyModel(outptr_QAbstractProxyModel)} } // UnsafeNewQIdentityProxyModel constructs the type using only unsafe pointers. -func UnsafeNewQIdentityProxyModel(h unsafe.Pointer, h_QAbstractProxyModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QIdentityProxyModel { - if h == nil { - return nil - } - - return &QIdentityProxyModel{h: (*C.QIdentityProxyModel)(h), - QAbstractProxyModel: UnsafeNewQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} +func UnsafeNewQIdentityProxyModel(h unsafe.Pointer) *QIdentityProxyModel { + return newQIdentityProxyModel((*C.QIdentityProxyModel)(h)) } // NewQIdentityProxyModel constructs a new QIdentityProxyModel object. func NewQIdentityProxyModel() *QIdentityProxyModel { - var outptr_QIdentityProxyModel *C.QIdentityProxyModel = nil - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QIdentityProxyModel_new(&outptr_QIdentityProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQIdentityProxyModel(outptr_QIdentityProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQIdentityProxyModel(C.QIdentityProxyModel_new()) ret.isSubclass = true return ret } // NewQIdentityProxyModel2 constructs a new QIdentityProxyModel object. func NewQIdentityProxyModel2(parent *QObject) *QIdentityProxyModel { - var outptr_QIdentityProxyModel *C.QIdentityProxyModel = nil - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QIdentityProxyModel_new2(parent.cPointer(), &outptr_QIdentityProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQIdentityProxyModel(outptr_QIdentityProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQIdentityProxyModel(C.QIdentityProxyModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -454,7 +442,7 @@ func miqt_exec_callback_QIdentityProxyModel_DropMimeData(self *C.QIdentityProxyM } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -634,7 +622,7 @@ func miqt_exec_callback_QIdentityProxyModel_SetSourceModel(self *C.QIdentityProx } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(sourceModel, nil) + slotval1 := newQAbstractItemModel(sourceModel) gofunc((&QIdentityProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) @@ -1334,7 +1322,7 @@ func (this *QIdentityProxyModel) callVirtualBase_MimeData(indexes []QModelIndex) } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QIdentityProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QIdentityProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QIdentityProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -1388,7 +1376,7 @@ func miqt_exec_callback_QIdentityProxyModel_CanDropMimeData(self *C.QIdentityPro } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt6/gen_qidentityproxymodel.h b/qt6/gen_qidentityproxymodel.h index e6ad0eb1..b5aa61d9 100644 --- a/qt6/gen_qidentityproxymodel.h +++ b/qt6/gen_qidentityproxymodel.h @@ -38,8 +38,9 @@ typedef struct QSize QSize; typedef struct QVariant QVariant; #endif -void QIdentityProxyModel_new(QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QIdentityProxyModel_new2(QObject* parent, QIdentityProxyModel** outptr_QIdentityProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QIdentityProxyModel* QIdentityProxyModel_new(); +QIdentityProxyModel* QIdentityProxyModel_new2(QObject* parent); +void QIdentityProxyModel_virtbase(QIdentityProxyModel* src, QAbstractProxyModel** outptr_QAbstractProxyModel); QMetaObject* QIdentityProxyModel_MetaObject(const QIdentityProxyModel* self); void* QIdentityProxyModel_Metacast(QIdentityProxyModel* self, const char* param1); struct miqt_string QIdentityProxyModel_Tr(const char* s); diff --git a/qt6/gen_qimage.cpp b/qt6/gen_qimage.cpp index 6a55db87..bc6a2162 100644 --- a/qt6/gen_qimage.cpp +++ b/qt6/gen_qimage.cpp @@ -177,66 +177,50 @@ public: }; -void QImage_new(QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new() { + return new MiqtVirtualQImage(); } -void QImage_new2(QSize* size, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(*size, static_cast(format)); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new2(QSize* size, int format) { + return new MiqtVirtualQImage(*size, static_cast(format)); } -void QImage_new3(int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(width), static_cast(height), static_cast(format)); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new3(int width, int height, int format) { + return new MiqtVirtualQImage(static_cast(width), static_cast(height), static_cast(format)); } -void QImage_new4(unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new4(unsigned char* data, int width, int height, int format) { + return new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); } -void QImage_new5(const unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new5(const unsigned char* data, int width, int height, int format) { + return new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), static_cast(format)); } -void QImage_new6(unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), (qsizetype)(bytesPerLine), static_cast(format)); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new6(unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format) { + return new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), (qsizetype)(bytesPerLine), static_cast(format)); } -void QImage_new7(const unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), (qsizetype)(bytesPerLine), static_cast(format)); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new7(const unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format) { + return new MiqtVirtualQImage(static_cast(data), static_cast(width), static_cast(height), (qsizetype)(bytesPerLine), static_cast(format)); } -void QImage_new8(struct miqt_string fileName, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { +QImage* QImage_new8(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQImage* ret = new MiqtVirtualQImage(fileName_QString); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQImage(fileName_QString); } -void QImage_new9(QImage* param1, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQImage* ret = new MiqtVirtualQImage(*param1); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); +QImage* QImage_new9(QImage* param1) { + return new MiqtVirtualQImage(*param1); } -void QImage_new10(struct miqt_string fileName, const char* format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice) { +QImage* QImage_new10(struct miqt_string fileName, const char* format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQImage* ret = new MiqtVirtualQImage(fileName_QString, format); - *outptr_QImage = ret; - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQImage(fileName_QString, format); +} + +void QImage_virtbase(QImage* src, QPaintDevice** outptr_QPaintDevice) { + *outptr_QPaintDevice = static_cast(src); } void QImage_OperatorAssign(QImage* self, QImage* param1) { diff --git a/qt6/gen_qimage.go b/qt6/gen_qimage.go index cd8ed697..03e0b3fc 100644 --- a/qt6/gen_qimage.go +++ b/qt6/gen_qimage.go @@ -84,97 +84,74 @@ func (this *QImage) UnsafePointer() unsafe.Pointer { } // newQImage constructs the type using only CGO pointers. -func newQImage(h *C.QImage, h_QPaintDevice *C.QPaintDevice) *QImage { +func newQImage(h *C.QImage) *QImage { if h == nil { return nil } + var outptr_QPaintDevice *C.QPaintDevice = nil + C.QImage_virtbase(h, &outptr_QPaintDevice) + return &QImage{h: h, - QPaintDevice: newQPaintDevice(h_QPaintDevice)} + QPaintDevice: newQPaintDevice(outptr_QPaintDevice)} } // UnsafeNewQImage constructs the type using only unsafe pointers. -func UnsafeNewQImage(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QImage { - if h == nil { - return nil - } - - return &QImage{h: (*C.QImage)(h), - QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} +func UnsafeNewQImage(h unsafe.Pointer) *QImage { + return newQImage((*C.QImage)(h)) } // NewQImage constructs a new QImage object. func NewQImage() *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new(&outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new()) ret.isSubclass = true return ret } // NewQImage2 constructs a new QImage object. func NewQImage2(size *QSize, format QImage__Format) *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new2(size.cPointer(), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new2(size.cPointer(), (C.int)(format))) ret.isSubclass = true return ret } // NewQImage3 constructs a new QImage object. func NewQImage3(width int, height int, format QImage__Format) *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new3((C.int)(width), (C.int)(height), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new3((C.int)(width), (C.int)(height), (C.int)(format))) ret.isSubclass = true return ret } // NewQImage4 constructs a new QImage object. func NewQImage4(data *byte, width int, height int, format QImage__Format) *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new4((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new4((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format))) ret.isSubclass = true return ret } // NewQImage5 constructs a new QImage object. func NewQImage5(data *byte, width int, height int, format QImage__Format) *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new5((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new5((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.int)(format))) ret.isSubclass = true return ret } // NewQImage6 constructs a new QImage object. func NewQImage6(data *byte, width int, height int, bytesPerLine int64, format QImage__Format) *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new6((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.ptrdiff_t)(bytesPerLine), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new6((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.ptrdiff_t)(bytesPerLine), (C.int)(format))) ret.isSubclass = true return ret } // NewQImage7 constructs a new QImage object. func NewQImage7(data *byte, width int, height int, bytesPerLine int64, format QImage__Format) *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new7((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.ptrdiff_t)(bytesPerLine), (C.int)(format), &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new7((*C.uchar)(unsafe.Pointer(data)), (C.int)(width), (C.int)(height), (C.ptrdiff_t)(bytesPerLine), (C.int)(format))) ret.isSubclass = true return ret } @@ -185,22 +162,16 @@ func NewQImage8(fileName string) *QImage { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new8(fileName_ms, &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new8(fileName_ms)) ret.isSubclass = true return ret } // NewQImage9 constructs a new QImage object. func NewQImage9(param1 *QImage) *QImage { - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new9(param1.cPointer(), &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new9(param1.cPointer())) ret.isSubclass = true return ret } @@ -213,11 +184,8 @@ func NewQImage10(fileName string, format string) *QImage { defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - var outptr_QImage *C.QImage = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QImage_new10(fileName_ms, format_Cstring, &outptr_QImage, &outptr_QPaintDevice) - ret := newQImage(outptr_QImage, outptr_QPaintDevice) + ret := newQImage(C.QImage_new10(fileName_ms, format_Cstring)) ret.isSubclass = true return ret } @@ -255,13 +223,13 @@ func (this *QImage) IsDetached() bool { } func (this *QImage) Copy() *QImage { - _goptr := newQImage(C.QImage_Copy(this.h), nil) + _goptr := newQImage(C.QImage_Copy(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Copy2(x int, y int, w int, h int) *QImage { - _goptr := newQImage(C.QImage_Copy2(this.h, (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h)), nil) + _goptr := newQImage(C.QImage_Copy2(this.h, (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -271,7 +239,7 @@ func (this *QImage) Format() QImage__Format { } func (this *QImage) ConvertToFormat(f QImage__Format) *QImage { - _goptr := newQImage(C.QImage_ConvertToFormat(this.h, (C.int)(f)), nil) + _goptr := newQImage(C.QImage_ConvertToFormat(this.h, (C.int)(f))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -283,7 +251,7 @@ func (this *QImage) ConvertToFormat2(f QImage__Format, colorTable []uint) *QImag colorTable_CArray[i] = (C.uint)(colorTable[i]) } colorTable_ma := C.struct_miqt_array{len: C.size_t(len(colorTable)), data: unsafe.Pointer(colorTable_CArray)} - _goptr := newQImage(C.QImage_ConvertToFormat2(this.h, (C.int)(f), colorTable_ma), nil) + _goptr := newQImage(C.QImage_ConvertToFormat2(this.h, (C.int)(f), colorTable_ma)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -293,7 +261,7 @@ func (this *QImage) ReinterpretAsFormat(f QImage__Format) bool { } func (this *QImage) ConvertedTo(f QImage__Format) *QImage { - _goptr := newQImage(C.QImage_ConvertedTo(this.h, (C.int)(f)), nil) + _goptr := newQImage(C.QImage_ConvertedTo(this.h, (C.int)(f))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -493,49 +461,49 @@ func (this *QImage) SetAlphaChannel(alphaChannel *QImage) { } func (this *QImage) CreateAlphaMask() *QImage { - _goptr := newQImage(C.QImage_CreateAlphaMask(this.h), nil) + _goptr := newQImage(C.QImage_CreateAlphaMask(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateHeuristicMask() *QImage { - _goptr := newQImage(C.QImage_CreateHeuristicMask(this.h), nil) + _goptr := newQImage(C.QImage_CreateHeuristicMask(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateMaskFromColor(color uint) *QImage { - _goptr := newQImage(C.QImage_CreateMaskFromColor(this.h, (C.uint)(color)), nil) + _goptr := newQImage(C.QImage_CreateMaskFromColor(this.h, (C.uint)(color))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled(w int, h int) *QImage { - _goptr := newQImage(C.QImage_Scaled(this.h, (C.int)(w), (C.int)(h)), nil) + _goptr := newQImage(C.QImage_Scaled(this.h, (C.int)(w), (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledWithQSize(s *QSize) *QImage { - _goptr := newQImage(C.QImage_ScaledWithQSize(this.h, s.cPointer()), nil) + _goptr := newQImage(C.QImage_ScaledWithQSize(this.h, s.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToWidth(w int) *QImage { - _goptr := newQImage(C.QImage_ScaledToWidth(this.h, (C.int)(w)), nil) + _goptr := newQImage(C.QImage_ScaledToWidth(this.h, (C.int)(w))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToHeight(h int) *QImage { - _goptr := newQImage(C.QImage_ScaledToHeight(this.h, (C.int)(h)), nil) + _goptr := newQImage(C.QImage_ScaledToHeight(this.h, (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Transformed(matrix *QTransform) *QImage { - _goptr := newQImage(C.QImage_Transformed(this.h, matrix.cPointer()), nil) + _goptr := newQImage(C.QImage_Transformed(this.h, matrix.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -547,13 +515,13 @@ func QImage_TrueMatrix(param1 *QTransform, w int, h int) *QTransform { } func (this *QImage) Mirrored() *QImage { - _goptr := newQImage(C.QImage_Mirrored(this.h), nil) + _goptr := newQImage(C.QImage_Mirrored(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) RgbSwapped() *QImage { - _goptr := newQImage(C.QImage_RgbSwapped(this.h), nil) + _goptr := newQImage(C.QImage_RgbSwapped(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -577,7 +545,7 @@ func (this *QImage) ColorSpace() *QColorSpace { } func (this *QImage) ConvertedToColorSpace(param1 *QColorSpace) *QImage { - _goptr := newQImage(C.QImage_ConvertedToColorSpace(this.h, param1.cPointer()), nil) + _goptr := newQImage(C.QImage_ConvertedToColorSpace(this.h, param1.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -591,7 +559,7 @@ func (this *QImage) SetColorSpace(colorSpace *QColorSpace) { } func (this *QImage) ColorTransformed(transform *QColorTransform) *QImage { - _goptr := newQImage(C.QImage_ColorTransformed(this.h, transform.cPointer()), nil) + _goptr := newQImage(C.QImage_ColorTransformed(this.h, transform.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -642,13 +610,13 @@ func (this *QImage) SaveWithDevice(device *QIODevice) bool { } func QImage_FromData(data QByteArrayView) *QImage { - _goptr := newQImage(C.QImage_FromData(data.cPointer()), nil) + _goptr := newQImage(C.QImage_FromData(data.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QImage_FromData2(data *byte, size int) *QImage { - _goptr := newQImage(C.QImage_FromData2((*C.uchar)(unsafe.Pointer(data)), (C.int)(size)), nil) + _goptr := newQImage(C.QImage_FromData2((*C.uchar)(unsafe.Pointer(data)), (C.int)(size))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -657,7 +625,7 @@ func QImage_FromDataWithData(data []byte) *QImage { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - _goptr := newQImage(C.QImage_FromDataWithData(data_alias), nil) + _goptr := newQImage(C.QImage_FromDataWithData(data_alias)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -745,13 +713,13 @@ func QImage_ToImageFormat(format QPixelFormat) QImage__Format { } func (this *QImage) Copy1(rect *QRect) *QImage { - _goptr := newQImage(C.QImage_Copy1(this.h, rect.cPointer()), nil) + _goptr := newQImage(C.QImage_Copy1(this.h, rect.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ConvertToFormat22(f QImage__Format, flags ImageConversionFlag) *QImage { - _goptr := newQImage(C.QImage_ConvertToFormat22(this.h, (C.int)(f), (C.int)(flags)), nil) + _goptr := newQImage(C.QImage_ConvertToFormat22(this.h, (C.int)(f), (C.int)(flags))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -763,13 +731,13 @@ func (this *QImage) ConvertToFormat3(f QImage__Format, colorTable []uint, flags colorTable_CArray[i] = (C.uint)(colorTable[i]) } colorTable_ma := C.struct_miqt_array{len: C.size_t(len(colorTable)), data: unsafe.Pointer(colorTable_CArray)} - _goptr := newQImage(C.QImage_ConvertToFormat3(this.h, (C.int)(f), colorTable_ma, (C.int)(flags)), nil) + _goptr := newQImage(C.QImage_ConvertToFormat3(this.h, (C.int)(f), colorTable_ma, (C.int)(flags))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ConvertedTo2(f QImage__Format, flags ImageConversionFlag) *QImage { - _goptr := newQImage(C.QImage_ConvertedTo2(this.h, (C.int)(f), (C.int)(flags)), nil) + _goptr := newQImage(C.QImage_ConvertedTo2(this.h, (C.int)(f), (C.int)(flags))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -779,73 +747,73 @@ func (this *QImage) ConvertTo2(f QImage__Format, flags ImageConversionFlag) { } func (this *QImage) CreateAlphaMask1(flags ImageConversionFlag) *QImage { - _goptr := newQImage(C.QImage_CreateAlphaMask1(this.h, (C.int)(flags)), nil) + _goptr := newQImage(C.QImage_CreateAlphaMask1(this.h, (C.int)(flags))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateHeuristicMask1(clipTight bool) *QImage { - _goptr := newQImage(C.QImage_CreateHeuristicMask1(this.h, (C.bool)(clipTight)), nil) + _goptr := newQImage(C.QImage_CreateHeuristicMask1(this.h, (C.bool)(clipTight))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) CreateMaskFromColor2(color uint, mode MaskMode) *QImage { - _goptr := newQImage(C.QImage_CreateMaskFromColor2(this.h, (C.uint)(color), (C.int)(mode)), nil) + _goptr := newQImage(C.QImage_CreateMaskFromColor2(this.h, (C.uint)(color), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled3(w int, h int, aspectMode AspectRatioMode) *QImage { - _goptr := newQImage(C.QImage_Scaled3(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode)), nil) + _goptr := newQImage(C.QImage_Scaled3(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled4(w int, h int, aspectMode AspectRatioMode, mode TransformationMode) *QImage { - _goptr := newQImage(C.QImage_Scaled4(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode), (C.int)(mode)), nil) + _goptr := newQImage(C.QImage_Scaled4(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled2(s *QSize, aspectMode AspectRatioMode) *QImage { - _goptr := newQImage(C.QImage_Scaled2(this.h, s.cPointer(), (C.int)(aspectMode)), nil) + _goptr := newQImage(C.QImage_Scaled2(this.h, s.cPointer(), (C.int)(aspectMode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Scaled32(s *QSize, aspectMode AspectRatioMode, mode TransformationMode) *QImage { - _goptr := newQImage(C.QImage_Scaled32(this.h, s.cPointer(), (C.int)(aspectMode), (C.int)(mode)), nil) + _goptr := newQImage(C.QImage_Scaled32(this.h, s.cPointer(), (C.int)(aspectMode), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToWidth2(w int, mode TransformationMode) *QImage { - _goptr := newQImage(C.QImage_ScaledToWidth2(this.h, (C.int)(w), (C.int)(mode)), nil) + _goptr := newQImage(C.QImage_ScaledToWidth2(this.h, (C.int)(w), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) ScaledToHeight2(h int, mode TransformationMode) *QImage { - _goptr := newQImage(C.QImage_ScaledToHeight2(this.h, (C.int)(h), (C.int)(mode)), nil) + _goptr := newQImage(C.QImage_ScaledToHeight2(this.h, (C.int)(h), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Transformed2(matrix *QTransform, mode TransformationMode) *QImage { - _goptr := newQImage(C.QImage_Transformed2(this.h, matrix.cPointer(), (C.int)(mode)), nil) + _goptr := newQImage(C.QImage_Transformed2(this.h, matrix.cPointer(), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Mirrored1(horizontally bool) *QImage { - _goptr := newQImage(C.QImage_Mirrored1(this.h, (C.bool)(horizontally)), nil) + _goptr := newQImage(C.QImage_Mirrored1(this.h, (C.bool)(horizontally))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QImage) Mirrored2(horizontally bool, vertically bool) *QImage { - _goptr := newQImage(C.QImage_Mirrored2(this.h, (C.bool)(horizontally), (C.bool)(vertically)), nil) + _goptr := newQImage(C.QImage_Mirrored2(this.h, (C.bool)(horizontally), (C.bool)(vertically))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -928,7 +896,7 @@ func (this *QImage) Save32(device *QIODevice, format string, quality int) bool { func QImage_FromData22(data QByteArrayView, format string) *QImage { format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - _goptr := newQImage(C.QImage_FromData22(data.cPointer(), format_Cstring), nil) + _goptr := newQImage(C.QImage_FromData22(data.cPointer(), format_Cstring)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -936,7 +904,7 @@ func QImage_FromData22(data QByteArrayView, format string) *QImage { func QImage_FromData3(data *byte, size int, format string) *QImage { format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - _goptr := newQImage(C.QImage_FromData3((*C.uchar)(unsafe.Pointer(data)), (C.int)(size), format_Cstring), nil) + _goptr := newQImage(C.QImage_FromData3((*C.uchar)(unsafe.Pointer(data)), (C.int)(size), format_Cstring)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -947,7 +915,7 @@ func QImage_FromData23(data []byte, format string) *QImage { data_alias.len = C.size_t(len(data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - _goptr := newQImage(C.QImage_FromData23(data_alias, format_Cstring), nil) + _goptr := newQImage(C.QImage_FromData23(data_alias, format_Cstring)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/gen_qimage.h b/qt6/gen_qimage.h index 17b4343c..3609d36d 100644 --- a/qt6/gen_qimage.h +++ b/qt6/gen_qimage.h @@ -48,16 +48,17 @@ typedef struct QSizeF QSizeF; typedef struct QTransform QTransform; #endif -void QImage_new(QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new2(QSize* size, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new3(int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new4(unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new5(const unsigned char* data, int width, int height, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new6(unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new7(const unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new8(struct miqt_string fileName, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new9(QImage* param1, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); -void QImage_new10(struct miqt_string fileName, const char* format, QImage** outptr_QImage, QPaintDevice** outptr_QPaintDevice); +QImage* QImage_new(); +QImage* QImage_new2(QSize* size, int format); +QImage* QImage_new3(int width, int height, int format); +QImage* QImage_new4(unsigned char* data, int width, int height, int format); +QImage* QImage_new5(const unsigned char* data, int width, int height, int format); +QImage* QImage_new6(unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format); +QImage* QImage_new7(const unsigned char* data, int width, int height, ptrdiff_t bytesPerLine, int format); +QImage* QImage_new8(struct miqt_string fileName); +QImage* QImage_new9(QImage* param1); +QImage* QImage_new10(struct miqt_string fileName, const char* format); +void QImage_virtbase(QImage* src, QPaintDevice** outptr_QPaintDevice); void QImage_OperatorAssign(QImage* self, QImage* param1); void QImage_Swap(QImage* self, QImage* other); bool QImage_IsNull(const QImage* self); diff --git a/qt6/gen_qimageiohandler.cpp b/qt6/gen_qimageiohandler.cpp index 122de1e9..94def75f 100644 --- a/qt6/gen_qimageiohandler.cpp +++ b/qt6/gen_qimageiohandler.cpp @@ -315,9 +315,8 @@ public: }; -void QImageIOHandler_new(QImageIOHandler** outptr_QImageIOHandler) { - MiqtVirtualQImageIOHandler* ret = new MiqtVirtualQImageIOHandler(); - *outptr_QImageIOHandler = ret; +QImageIOHandler* QImageIOHandler_new() { + return new MiqtVirtualQImageIOHandler(); } void QImageIOHandler_SetDevice(QImageIOHandler* self, QIODevice* device) { @@ -732,16 +731,16 @@ public: }; -void QImageIOPlugin_new(QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject) { - MiqtVirtualQImageIOPlugin* ret = new MiqtVirtualQImageIOPlugin(); - *outptr_QImageIOPlugin = ret; - *outptr_QObject = static_cast(ret); +QImageIOPlugin* QImageIOPlugin_new() { + return new MiqtVirtualQImageIOPlugin(); } -void QImageIOPlugin_new2(QObject* parent, QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject) { - MiqtVirtualQImageIOPlugin* ret = new MiqtVirtualQImageIOPlugin(parent); - *outptr_QImageIOPlugin = ret; - *outptr_QObject = static_cast(ret); +QImageIOPlugin* QImageIOPlugin_new2(QObject* parent) { + return new MiqtVirtualQImageIOPlugin(parent); +} + +void QImageIOPlugin_virtbase(QImageIOPlugin* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QImageIOPlugin_MetaObject(const QImageIOPlugin* self) { diff --git a/qt6/gen_qimageiohandler.go b/qt6/gen_qimageiohandler.go index 50f56822..50dc7905 100644 --- a/qt6/gen_qimageiohandler.go +++ b/qt6/gen_qimageiohandler.go @@ -83,24 +83,19 @@ func newQImageIOHandler(h *C.QImageIOHandler) *QImageIOHandler { if h == nil { return nil } + return &QImageIOHandler{h: h} } // UnsafeNewQImageIOHandler constructs the type using only unsafe pointers. func UnsafeNewQImageIOHandler(h unsafe.Pointer) *QImageIOHandler { - if h == nil { - return nil - } - - return &QImageIOHandler{h: (*C.QImageIOHandler)(h)} + return newQImageIOHandler((*C.QImageIOHandler)(h)) } // NewQImageIOHandler constructs a new QImageIOHandler object. func NewQImageIOHandler() *QImageIOHandler { - var outptr_QImageIOHandler *C.QImageIOHandler = nil - C.QImageIOHandler_new(&outptr_QImageIOHandler) - ret := newQImageIOHandler(outptr_QImageIOHandler) + ret := newQImageIOHandler(C.QImageIOHandler_new()) ret.isSubclass = true return ret } @@ -110,7 +105,7 @@ func (this *QImageIOHandler) SetDevice(device *QIODevice) { } func (this *QImageIOHandler) Device() *QIODevice { - return newQIODevice(C.QImageIOHandler_Device(this.h), nil, nil) + return newQIODevice(C.QImageIOHandler_Device(this.h)) } func (this *QImageIOHandler) SetFormat(format []byte) { @@ -227,7 +222,7 @@ func miqt_exec_callback_QImageIOHandler_Read(self *C.QImageIOHandler, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQImage(image, nil) + slotval1 := newQImage(image) virtualReturn := gofunc(slotval1) @@ -255,7 +250,7 @@ func miqt_exec_callback_QImageIOHandler_Write(self *C.QImageIOHandler, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQImage(image, nil) + slotval1 := newQImage(image) virtualReturn := gofunc((&QImageIOHandler{h: self}).callVirtualBase_Write, slotval1) @@ -564,42 +559,34 @@ func (this *QImageIOPlugin) UnsafePointer() unsafe.Pointer { } // newQImageIOPlugin constructs the type using only CGO pointers. -func newQImageIOPlugin(h *C.QImageIOPlugin, h_QObject *C.QObject) *QImageIOPlugin { +func newQImageIOPlugin(h *C.QImageIOPlugin) *QImageIOPlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QImageIOPlugin_virtbase(h, &outptr_QObject) + return &QImageIOPlugin{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQImageIOPlugin constructs the type using only unsafe pointers. -func UnsafeNewQImageIOPlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QImageIOPlugin { - if h == nil { - return nil - } - - return &QImageIOPlugin{h: (*C.QImageIOPlugin)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQImageIOPlugin(h unsafe.Pointer) *QImageIOPlugin { + return newQImageIOPlugin((*C.QImageIOPlugin)(h)) } // NewQImageIOPlugin constructs a new QImageIOPlugin object. func NewQImageIOPlugin() *QImageIOPlugin { - var outptr_QImageIOPlugin *C.QImageIOPlugin = nil - var outptr_QObject *C.QObject = nil - C.QImageIOPlugin_new(&outptr_QImageIOPlugin, &outptr_QObject) - ret := newQImageIOPlugin(outptr_QImageIOPlugin, outptr_QObject) + ret := newQImageIOPlugin(C.QImageIOPlugin_new()) ret.isSubclass = true return ret } // NewQImageIOPlugin2 constructs a new QImageIOPlugin object. func NewQImageIOPlugin2(parent *QObject) *QImageIOPlugin { - var outptr_QImageIOPlugin *C.QImageIOPlugin = nil - var outptr_QObject *C.QObject = nil - C.QImageIOPlugin_new2(parent.cPointer(), &outptr_QImageIOPlugin, &outptr_QObject) - ret := newQImageIOPlugin(outptr_QImageIOPlugin, outptr_QObject) + ret := newQImageIOPlugin(C.QImageIOPlugin_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -673,7 +660,7 @@ func miqt_exec_callback_QImageIOPlugin_Capabilities(self *C.QImageIOPlugin, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQIODevice(device, nil, nil) + slotval1 := newQIODevice(device) var format_bytearray C.struct_miqt_string = format format_ret := C.GoBytes(unsafe.Pointer(format_bytearray.data), C.int(int64(format_bytearray.len))) @@ -700,7 +687,7 @@ func miqt_exec_callback_QImageIOPlugin_Create(self *C.QImageIOPlugin, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQIODevice(device, nil, nil) + slotval1 := newQIODevice(device) var format_bytearray C.struct_miqt_string = format format_ret := C.GoBytes(unsafe.Pointer(format_bytearray.data), C.int(int64(format_bytearray.len))) @@ -791,7 +778,7 @@ func miqt_exec_callback_QImageIOPlugin_TimerEvent(self *C.QImageIOPlugin, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QImageIOPlugin{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -817,7 +804,7 @@ func miqt_exec_callback_QImageIOPlugin_ChildEvent(self *C.QImageIOPlugin, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QImageIOPlugin{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qimageiohandler.h b/qt6/gen_qimageiohandler.h index 36e7563e..50b4714c 100644 --- a/qt6/gen_qimageiohandler.h +++ b/qt6/gen_qimageiohandler.h @@ -44,7 +44,7 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -void QImageIOHandler_new(QImageIOHandler** outptr_QImageIOHandler); +QImageIOHandler* QImageIOHandler_new(); void QImageIOHandler_SetDevice(QImageIOHandler* self, QIODevice* device); QIODevice* QImageIOHandler_Device(const QImageIOHandler* self); void QImageIOHandler_SetFormat(QImageIOHandler* self, struct miqt_string format); @@ -92,8 +92,9 @@ void QImageIOHandler_override_virtual_CurrentImageRect(void* self, intptr_t slot QRect* QImageIOHandler_virtualbase_CurrentImageRect(const void* self); void QImageIOHandler_Delete(QImageIOHandler* self, bool isSubclass); -void QImageIOPlugin_new(QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject); -void QImageIOPlugin_new2(QObject* parent, QImageIOPlugin** outptr_QImageIOPlugin, QObject** outptr_QObject); +QImageIOPlugin* QImageIOPlugin_new(); +QImageIOPlugin* QImageIOPlugin_new2(QObject* parent); +void QImageIOPlugin_virtbase(QImageIOPlugin* src, QObject** outptr_QObject); QMetaObject* QImageIOPlugin_MetaObject(const QImageIOPlugin* self); void* QImageIOPlugin_Metacast(QImageIOPlugin* self, const char* param1); struct miqt_string QImageIOPlugin_Tr(const char* s); diff --git a/qt6/gen_qimagereader.cpp b/qt6/gen_qimagereader.cpp index bc0b8463..afad2be9 100644 --- a/qt6/gen_qimagereader.cpp +++ b/qt6/gen_qimagereader.cpp @@ -13,33 +13,28 @@ #include "gen_qimagereader.h" #include "_cgo_export.h" -void QImageReader_new(QImageReader** outptr_QImageReader) { - QImageReader* ret = new QImageReader(); - *outptr_QImageReader = ret; +QImageReader* QImageReader_new() { + return new QImageReader(); } -void QImageReader_new2(QIODevice* device, QImageReader** outptr_QImageReader) { - QImageReader* ret = new QImageReader(device); - *outptr_QImageReader = ret; +QImageReader* QImageReader_new2(QIODevice* device) { + return new QImageReader(device); } -void QImageReader_new3(struct miqt_string fileName, QImageReader** outptr_QImageReader) { +QImageReader* QImageReader_new3(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QImageReader* ret = new QImageReader(fileName_QString); - *outptr_QImageReader = ret; + return new QImageReader(fileName_QString); } -void QImageReader_new4(QIODevice* device, struct miqt_string format, QImageReader** outptr_QImageReader) { +QImageReader* QImageReader_new4(QIODevice* device, struct miqt_string format) { QByteArray format_QByteArray(format.data, format.len); - QImageReader* ret = new QImageReader(device, format_QByteArray); - *outptr_QImageReader = ret; + return new QImageReader(device, format_QByteArray); } -void QImageReader_new5(struct miqt_string fileName, struct miqt_string format, QImageReader** outptr_QImageReader) { +QImageReader* QImageReader_new5(struct miqt_string fileName, struct miqt_string format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - QImageReader* ret = new QImageReader(fileName_QString, format_QByteArray); - *outptr_QImageReader = ret; + return new QImageReader(fileName_QString, format_QByteArray); } struct miqt_string QImageReader_Tr(const char* sourceText) { diff --git a/qt6/gen_qimagereader.go b/qt6/gen_qimagereader.go index 7b91241c..821a0ed4 100644 --- a/qt6/gen_qimagereader.go +++ b/qt6/gen_qimagereader.go @@ -47,34 +47,27 @@ func newQImageReader(h *C.QImageReader) *QImageReader { if h == nil { return nil } + return &QImageReader{h: h} } // UnsafeNewQImageReader constructs the type using only unsafe pointers. func UnsafeNewQImageReader(h unsafe.Pointer) *QImageReader { - if h == nil { - return nil - } - - return &QImageReader{h: (*C.QImageReader)(h)} + return newQImageReader((*C.QImageReader)(h)) } // NewQImageReader constructs a new QImageReader object. func NewQImageReader() *QImageReader { - var outptr_QImageReader *C.QImageReader = nil - C.QImageReader_new(&outptr_QImageReader) - ret := newQImageReader(outptr_QImageReader) + ret := newQImageReader(C.QImageReader_new()) ret.isSubclass = true return ret } // NewQImageReader2 constructs a new QImageReader object. func NewQImageReader2(device *QIODevice) *QImageReader { - var outptr_QImageReader *C.QImageReader = nil - C.QImageReader_new2(device.cPointer(), &outptr_QImageReader) - ret := newQImageReader(outptr_QImageReader) + ret := newQImageReader(C.QImageReader_new2(device.cPointer())) ret.isSubclass = true return ret } @@ -85,10 +78,8 @@ func NewQImageReader3(fileName string) *QImageReader { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QImageReader *C.QImageReader = nil - C.QImageReader_new3(fileName_ms, &outptr_QImageReader) - ret := newQImageReader(outptr_QImageReader) + ret := newQImageReader(C.QImageReader_new3(fileName_ms)) ret.isSubclass = true return ret } @@ -98,10 +89,8 @@ func NewQImageReader4(device *QIODevice, format []byte) *QImageReader { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QImageReader *C.QImageReader = nil - C.QImageReader_new4(device.cPointer(), format_alias, &outptr_QImageReader) - ret := newQImageReader(outptr_QImageReader) + ret := newQImageReader(C.QImageReader_new4(device.cPointer(), format_alias)) ret.isSubclass = true return ret } @@ -115,10 +104,8 @@ func NewQImageReader5(fileName string, format []byte) *QImageReader { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QImageReader *C.QImageReader = nil - C.QImageReader_new5(fileName_ms, format_alias, &outptr_QImageReader) - ret := newQImageReader(outptr_QImageReader) + ret := newQImageReader(C.QImageReader_new5(fileName_ms, format_alias)) ret.isSubclass = true return ret } @@ -167,7 +154,7 @@ func (this *QImageReader) SetDevice(device *QIODevice) { } func (this *QImageReader) Device() *QIODevice { - return newQIODevice(C.QImageReader_Device(this.h), nil, nil) + return newQIODevice(C.QImageReader_Device(this.h)) } func (this *QImageReader) SetFileName(fileName string) { @@ -308,7 +295,7 @@ func (this *QImageReader) CanRead() bool { } func (this *QImageReader) Read() *QImage { - _goptr := newQImage(C.QImageReader_Read(this.h), nil) + _goptr := newQImage(C.QImageReader_Read(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/gen_qimagereader.h b/qt6/gen_qimagereader.h index ebf59b32..8397954b 100644 --- a/qt6/gen_qimagereader.h +++ b/qt6/gen_qimagereader.h @@ -30,11 +30,11 @@ typedef struct QRect QRect; typedef struct QSize QSize; #endif -void QImageReader_new(QImageReader** outptr_QImageReader); -void QImageReader_new2(QIODevice* device, QImageReader** outptr_QImageReader); -void QImageReader_new3(struct miqt_string fileName, QImageReader** outptr_QImageReader); -void QImageReader_new4(QIODevice* device, struct miqt_string format, QImageReader** outptr_QImageReader); -void QImageReader_new5(struct miqt_string fileName, struct miqt_string format, QImageReader** outptr_QImageReader); +QImageReader* QImageReader_new(); +QImageReader* QImageReader_new2(QIODevice* device); +QImageReader* QImageReader_new3(struct miqt_string fileName); +QImageReader* QImageReader_new4(QIODevice* device, struct miqt_string format); +QImageReader* QImageReader_new5(struct miqt_string fileName, struct miqt_string format); struct miqt_string QImageReader_Tr(const char* sourceText); void QImageReader_SetFormat(QImageReader* self, struct miqt_string format); struct miqt_string QImageReader_Format(const QImageReader* self); diff --git a/qt6/gen_qimagewriter.cpp b/qt6/gen_qimagewriter.cpp index 0ed79eb3..574c595d 100644 --- a/qt6/gen_qimagewriter.cpp +++ b/qt6/gen_qimagewriter.cpp @@ -10,28 +10,24 @@ #include "gen_qimagewriter.h" #include "_cgo_export.h" -void QImageWriter_new(QImageWriter** outptr_QImageWriter) { - QImageWriter* ret = new QImageWriter(); - *outptr_QImageWriter = ret; +QImageWriter* QImageWriter_new() { + return new QImageWriter(); } -void QImageWriter_new2(QIODevice* device, struct miqt_string format, QImageWriter** outptr_QImageWriter) { +QImageWriter* QImageWriter_new2(QIODevice* device, struct miqt_string format) { QByteArray format_QByteArray(format.data, format.len); - QImageWriter* ret = new QImageWriter(device, format_QByteArray); - *outptr_QImageWriter = ret; + return new QImageWriter(device, format_QByteArray); } -void QImageWriter_new3(struct miqt_string fileName, QImageWriter** outptr_QImageWriter) { +QImageWriter* QImageWriter_new3(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QImageWriter* ret = new QImageWriter(fileName_QString); - *outptr_QImageWriter = ret; + return new QImageWriter(fileName_QString); } -void QImageWriter_new4(struct miqt_string fileName, struct miqt_string format, QImageWriter** outptr_QImageWriter) { +QImageWriter* QImageWriter_new4(struct miqt_string fileName, struct miqt_string format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - QImageWriter* ret = new QImageWriter(fileName_QString, format_QByteArray); - *outptr_QImageWriter = ret; + return new QImageWriter(fileName_QString, format_QByteArray); } struct miqt_string QImageWriter_Tr(const char* sourceText) { diff --git a/qt6/gen_qimagewriter.go b/qt6/gen_qimagewriter.go index 887fc392..67c2134b 100644 --- a/qt6/gen_qimagewriter.go +++ b/qt6/gen_qimagewriter.go @@ -46,24 +46,19 @@ func newQImageWriter(h *C.QImageWriter) *QImageWriter { if h == nil { return nil } + return &QImageWriter{h: h} } // UnsafeNewQImageWriter constructs the type using only unsafe pointers. func UnsafeNewQImageWriter(h unsafe.Pointer) *QImageWriter { - if h == nil { - return nil - } - - return &QImageWriter{h: (*C.QImageWriter)(h)} + return newQImageWriter((*C.QImageWriter)(h)) } // NewQImageWriter constructs a new QImageWriter object. func NewQImageWriter() *QImageWriter { - var outptr_QImageWriter *C.QImageWriter = nil - C.QImageWriter_new(&outptr_QImageWriter) - ret := newQImageWriter(outptr_QImageWriter) + ret := newQImageWriter(C.QImageWriter_new()) ret.isSubclass = true return ret } @@ -73,10 +68,8 @@ func NewQImageWriter2(device *QIODevice, format []byte) *QImageWriter { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QImageWriter *C.QImageWriter = nil - C.QImageWriter_new2(device.cPointer(), format_alias, &outptr_QImageWriter) - ret := newQImageWriter(outptr_QImageWriter) + ret := newQImageWriter(C.QImageWriter_new2(device.cPointer(), format_alias)) ret.isSubclass = true return ret } @@ -87,10 +80,8 @@ func NewQImageWriter3(fileName string) *QImageWriter { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QImageWriter *C.QImageWriter = nil - C.QImageWriter_new3(fileName_ms, &outptr_QImageWriter) - ret := newQImageWriter(outptr_QImageWriter) + ret := newQImageWriter(C.QImageWriter_new3(fileName_ms)) ret.isSubclass = true return ret } @@ -104,10 +95,8 @@ func NewQImageWriter4(fileName string, format []byte) *QImageWriter { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QImageWriter *C.QImageWriter = nil - C.QImageWriter_new4(fileName_ms, format_alias, &outptr_QImageWriter) - ret := newQImageWriter(outptr_QImageWriter) + ret := newQImageWriter(C.QImageWriter_new4(fileName_ms, format_alias)) ret.isSubclass = true return ret } @@ -140,7 +129,7 @@ func (this *QImageWriter) SetDevice(device *QIODevice) { } func (this *QImageWriter) Device() *QIODevice { - return newQIODevice(C.QImageWriter_Device(this.h), nil, nil) + return newQIODevice(C.QImageWriter_Device(this.h)) } func (this *QImageWriter) SetFileName(fileName string) { diff --git a/qt6/gen_qimagewriter.h b/qt6/gen_qimagewriter.h index 41cf67e2..8b62e0e0 100644 --- a/qt6/gen_qimagewriter.h +++ b/qt6/gen_qimagewriter.h @@ -24,10 +24,10 @@ typedef struct QImage QImage; typedef struct QImageWriter QImageWriter; #endif -void QImageWriter_new(QImageWriter** outptr_QImageWriter); -void QImageWriter_new2(QIODevice* device, struct miqt_string format, QImageWriter** outptr_QImageWriter); -void QImageWriter_new3(struct miqt_string fileName, QImageWriter** outptr_QImageWriter); -void QImageWriter_new4(struct miqt_string fileName, struct miqt_string format, QImageWriter** outptr_QImageWriter); +QImageWriter* QImageWriter_new(); +QImageWriter* QImageWriter_new2(QIODevice* device, struct miqt_string format); +QImageWriter* QImageWriter_new3(struct miqt_string fileName); +QImageWriter* QImageWriter_new4(struct miqt_string fileName, struct miqt_string format); struct miqt_string QImageWriter_Tr(const char* sourceText); void QImageWriter_SetFormat(QImageWriter* self, struct miqt_string format); struct miqt_string QImageWriter_Format(const QImageWriter* self); diff --git a/qt6/gen_qinputdevice.cpp b/qt6/gen_qinputdevice.cpp index cb28a6e7..973fb746 100644 --- a/qt6/gen_qinputdevice.cpp +++ b/qt6/gen_qinputdevice.cpp @@ -198,39 +198,33 @@ public: }; -void QInputDevice_new(QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { - MiqtVirtualQInputDevice* ret = new MiqtVirtualQInputDevice(); - *outptr_QInputDevice = ret; - *outptr_QObject = static_cast(ret); +QInputDevice* QInputDevice_new() { + return new MiqtVirtualQInputDevice(); } -void QInputDevice_new2(struct miqt_string name, long long systemId, int typeVal, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { +QInputDevice* QInputDevice_new2(struct miqt_string name, long long systemId, int typeVal) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQInputDevice* ret = new MiqtVirtualQInputDevice(name_QString, static_cast(systemId), static_cast(typeVal)); - *outptr_QInputDevice = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQInputDevice(name_QString, static_cast(systemId), static_cast(typeVal)); } -void QInputDevice_new3(QObject* parent, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { - MiqtVirtualQInputDevice* ret = new MiqtVirtualQInputDevice(parent); - *outptr_QInputDevice = ret; - *outptr_QObject = static_cast(ret); +QInputDevice* QInputDevice_new3(QObject* parent) { + return new MiqtVirtualQInputDevice(parent); } -void QInputDevice_new4(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { +QInputDevice* QInputDevice_new4(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName) { QString name_QString = QString::fromUtf8(name.data, name.len); QString seatName_QString = QString::fromUtf8(seatName.data, seatName.len); - MiqtVirtualQInputDevice* ret = new MiqtVirtualQInputDevice(name_QString, static_cast(systemId), static_cast(typeVal), seatName_QString); - *outptr_QInputDevice = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQInputDevice(name_QString, static_cast(systemId), static_cast(typeVal), seatName_QString); } -void QInputDevice_new5(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName, QObject* parent, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { +QInputDevice* QInputDevice_new5(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName, QObject* parent) { QString name_QString = QString::fromUtf8(name.data, name.len); QString seatName_QString = QString::fromUtf8(seatName.data, seatName.len); - MiqtVirtualQInputDevice* ret = new MiqtVirtualQInputDevice(name_QString, static_cast(systemId), static_cast(typeVal), seatName_QString, parent); - *outptr_QInputDevice = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQInputDevice(name_QString, static_cast(systemId), static_cast(typeVal), seatName_QString, parent); +} + +void QInputDevice_virtbase(QInputDevice* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QInputDevice_MetaObject(const QInputDevice* self) { diff --git a/qt6/gen_qinputdevice.go b/qt6/gen_qinputdevice.go index b349e51e..3cbc9a3e 100644 --- a/qt6/gen_qinputdevice.go +++ b/qt6/gen_qinputdevice.go @@ -70,31 +70,26 @@ func (this *QInputDevice) UnsafePointer() unsafe.Pointer { } // newQInputDevice constructs the type using only CGO pointers. -func newQInputDevice(h *C.QInputDevice, h_QObject *C.QObject) *QInputDevice { +func newQInputDevice(h *C.QInputDevice) *QInputDevice { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QInputDevice_virtbase(h, &outptr_QObject) + return &QInputDevice{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQInputDevice constructs the type using only unsafe pointers. -func UnsafeNewQInputDevice(h unsafe.Pointer, h_QObject unsafe.Pointer) *QInputDevice { - if h == nil { - return nil - } - - return &QInputDevice{h: (*C.QInputDevice)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQInputDevice(h unsafe.Pointer) *QInputDevice { + return newQInputDevice((*C.QInputDevice)(h)) } // NewQInputDevice constructs a new QInputDevice object. func NewQInputDevice() *QInputDevice { - var outptr_QInputDevice *C.QInputDevice = nil - var outptr_QObject *C.QObject = nil - C.QInputDevice_new(&outptr_QInputDevice, &outptr_QObject) - ret := newQInputDevice(outptr_QInputDevice, outptr_QObject) + ret := newQInputDevice(C.QInputDevice_new()) ret.isSubclass = true return ret } @@ -105,22 +100,16 @@ func NewQInputDevice2(name string, systemId int64, typeVal QInputDevice__DeviceT name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QInputDevice *C.QInputDevice = nil - var outptr_QObject *C.QObject = nil - C.QInputDevice_new2(name_ms, (C.longlong)(systemId), (C.int)(typeVal), &outptr_QInputDevice, &outptr_QObject) - ret := newQInputDevice(outptr_QInputDevice, outptr_QObject) + ret := newQInputDevice(C.QInputDevice_new2(name_ms, (C.longlong)(systemId), (C.int)(typeVal))) ret.isSubclass = true return ret } // NewQInputDevice3 constructs a new QInputDevice object. func NewQInputDevice3(parent *QObject) *QInputDevice { - var outptr_QInputDevice *C.QInputDevice = nil - var outptr_QObject *C.QObject = nil - C.QInputDevice_new3(parent.cPointer(), &outptr_QInputDevice, &outptr_QObject) - ret := newQInputDevice(outptr_QInputDevice, outptr_QObject) + ret := newQInputDevice(C.QInputDevice_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -135,11 +124,8 @@ func NewQInputDevice4(name string, systemId int64, typeVal QInputDevice__DeviceT seatName_ms.data = C.CString(seatName) seatName_ms.len = C.size_t(len(seatName)) defer C.free(unsafe.Pointer(seatName_ms.data)) - var outptr_QInputDevice *C.QInputDevice = nil - var outptr_QObject *C.QObject = nil - C.QInputDevice_new4(name_ms, (C.longlong)(systemId), (C.int)(typeVal), seatName_ms, &outptr_QInputDevice, &outptr_QObject) - ret := newQInputDevice(outptr_QInputDevice, outptr_QObject) + ret := newQInputDevice(C.QInputDevice_new4(name_ms, (C.longlong)(systemId), (C.int)(typeVal), seatName_ms)) ret.isSubclass = true return ret } @@ -154,11 +140,8 @@ func NewQInputDevice5(name string, systemId int64, typeVal QInputDevice__DeviceT seatName_ms.data = C.CString(seatName) seatName_ms.len = C.size_t(len(seatName)) defer C.free(unsafe.Pointer(seatName_ms.data)) - var outptr_QInputDevice *C.QInputDevice = nil - var outptr_QObject *C.QObject = nil - C.QInputDevice_new5(name_ms, (C.longlong)(systemId), (C.int)(typeVal), seatName_ms, parent.cPointer(), &outptr_QInputDevice, &outptr_QObject) - ret := newQInputDevice(outptr_QInputDevice, outptr_QObject) + ret := newQInputDevice(C.QInputDevice_new5(name_ms, (C.longlong)(systemId), (C.int)(typeVal), seatName_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -236,13 +219,13 @@ func QInputDevice_Devices() []*QInputDevice { _ret := make([]*QInputDevice, int(_ma.len)) _outCast := (*[0xffff]*C.QInputDevice)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQInputDevice(_outCast[i], nil) + _ret[i] = newQInputDevice(_outCast[i]) } return _ret } func QInputDevice_PrimaryKeyboard() *QInputDevice { - return newQInputDevice(C.QInputDevice_PrimaryKeyboard(), nil) + return newQInputDevice(C.QInputDevice_PrimaryKeyboard()) } func (this *QInputDevice) OperatorEqual(other *QInputDevice) bool { @@ -298,7 +281,7 @@ func QInputDevice_PrimaryKeyboard1(seatName string) *QInputDevice { seatName_ms.data = C.CString(seatName) seatName_ms.len = C.size_t(len(seatName)) defer C.free(unsafe.Pointer(seatName_ms.data)) - return newQInputDevice(C.QInputDevice_PrimaryKeyboard1(seatName_ms), nil) + return newQInputDevice(C.QInputDevice_PrimaryKeyboard1(seatName_ms)) } func (this *QInputDevice) callVirtualBase_Event(event *QEvent) bool { @@ -379,7 +362,7 @@ func miqt_exec_callback_QInputDevice_TimerEvent(self *C.QInputDevice, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QInputDevice{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -405,7 +388,7 @@ func miqt_exec_callback_QInputDevice_ChildEvent(self *C.QInputDevice, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QInputDevice{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qinputdevice.h b/qt6/gen_qinputdevice.h index 81b25f9c..68eb391d 100644 --- a/qt6/gen_qinputdevice.h +++ b/qt6/gen_qinputdevice.h @@ -34,11 +34,12 @@ typedef struct QRect QRect; typedef struct QTimerEvent QTimerEvent; #endif -void QInputDevice_new(QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); -void QInputDevice_new2(struct miqt_string name, long long systemId, int typeVal, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); -void QInputDevice_new3(QObject* parent, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); -void QInputDevice_new4(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); -void QInputDevice_new5(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName, QObject* parent, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); +QInputDevice* QInputDevice_new(); +QInputDevice* QInputDevice_new2(struct miqt_string name, long long systemId, int typeVal); +QInputDevice* QInputDevice_new3(QObject* parent); +QInputDevice* QInputDevice_new4(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName); +QInputDevice* QInputDevice_new5(struct miqt_string name, long long systemId, int typeVal, struct miqt_string seatName, QObject* parent); +void QInputDevice_virtbase(QInputDevice* src, QObject** outptr_QObject); QMetaObject* QInputDevice_MetaObject(const QInputDevice* self); void* QInputDevice_Metacast(QInputDevice* self, const char* param1); struct miqt_string QInputDevice_Tr(const char* s); diff --git a/qt6/gen_qinputdialog.cpp b/qt6/gen_qinputdialog.cpp index 7d3f4a37..6173f0cb 100644 --- a/qt6/gen_qinputdialog.cpp +++ b/qt6/gen_qinputdialog.cpp @@ -357,31 +357,20 @@ public: }; -void QInputDialog_new(QWidget* parent, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQInputDialog* ret = new MiqtVirtualQInputDialog(parent); - *outptr_QInputDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QInputDialog* QInputDialog_new(QWidget* parent) { + return new MiqtVirtualQInputDialog(parent); } -void QInputDialog_new2(QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQInputDialog* ret = new MiqtVirtualQInputDialog(); - *outptr_QInputDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QInputDialog* QInputDialog_new2() { + return new MiqtVirtualQInputDialog(); } -void QInputDialog_new3(QWidget* parent, int flags, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQInputDialog* ret = new MiqtVirtualQInputDialog(parent, static_cast(flags)); - *outptr_QInputDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QInputDialog* QInputDialog_new3(QWidget* parent, int flags) { + return new MiqtVirtualQInputDialog(parent, static_cast(flags)); +} + +void QInputDialog_virtbase(QInputDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QInputDialog_MetaObject(const QInputDialog* self) { diff --git a/qt6/gen_qinputdialog.go b/qt6/gen_qinputdialog.go index 37b000d7..d35492d4 100644 --- a/qt6/gen_qinputdialog.go +++ b/qt6/gen_qinputdialog.go @@ -51,62 +51,42 @@ func (this *QInputDialog) UnsafePointer() unsafe.Pointer { } // newQInputDialog constructs the type using only CGO pointers. -func newQInputDialog(h *C.QInputDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QInputDialog { +func newQInputDialog(h *C.QInputDialog) *QInputDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QInputDialog_virtbase(h, &outptr_QDialog) + return &QInputDialog{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQInputDialog constructs the type using only unsafe pointers. -func UnsafeNewQInputDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QInputDialog { - if h == nil { - return nil - } - - return &QInputDialog{h: (*C.QInputDialog)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQInputDialog(h unsafe.Pointer) *QInputDialog { + return newQInputDialog((*C.QInputDialog)(h)) } // NewQInputDialog constructs a new QInputDialog object. func NewQInputDialog(parent *QWidget) *QInputDialog { - var outptr_QInputDialog *C.QInputDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QInputDialog_new(parent.cPointer(), &outptr_QInputDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQInputDialog(outptr_QInputDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQInputDialog(C.QInputDialog_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQInputDialog2 constructs a new QInputDialog object. func NewQInputDialog2() *QInputDialog { - var outptr_QInputDialog *C.QInputDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QInputDialog_new2(&outptr_QInputDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQInputDialog(outptr_QInputDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQInputDialog(C.QInputDialog_new2()) ret.isSubclass = true return ret } // NewQInputDialog3 constructs a new QInputDialog object. func NewQInputDialog3(parent *QWidget, flags WindowType) *QInputDialog { - var outptr_QInputDialog *C.QInputDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QInputDialog_new3(parent.cPointer(), (C.int)(flags), &outptr_QInputDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQInputDialog(outptr_QInputDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQInputDialog(C.QInputDialog_new3(parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -1264,7 +1244,7 @@ func miqt_exec_callback_QInputDialog_KeyPressEvent(self *C.QInputDialog, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QInputDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1290,7 +1270,7 @@ func miqt_exec_callback_QInputDialog_CloseEvent(self *C.QInputDialog, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(param1, nil) + slotval1 := newQCloseEvent(param1) gofunc((&QInputDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1316,7 +1296,7 @@ func miqt_exec_callback_QInputDialog_ShowEvent(self *C.QInputDialog, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QInputDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1342,7 +1322,7 @@ func miqt_exec_callback_QInputDialog_ResizeEvent(self *C.QInputDialog, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QInputDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1368,7 +1348,7 @@ func miqt_exec_callback_QInputDialog_ContextMenuEvent(self *C.QInputDialog, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QInputDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt6/gen_qinputdialog.h b/qt6/gen_qinputdialog.h index 366eac59..1f6dda0d 100644 --- a/qt6/gen_qinputdialog.h +++ b/qt6/gen_qinputdialog.h @@ -44,9 +44,10 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QInputDialog_new(QWidget* parent, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QInputDialog_new2(QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QInputDialog_new3(QWidget* parent, int flags, QInputDialog** outptr_QInputDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QInputDialog* QInputDialog_new(QWidget* parent); +QInputDialog* QInputDialog_new2(); +QInputDialog* QInputDialog_new3(QWidget* parent, int flags); +void QInputDialog_virtbase(QInputDialog* src, QDialog** outptr_QDialog); QMetaObject* QInputDialog_MetaObject(const QInputDialog* self); void* QInputDialog_Metacast(QInputDialog* self, const char* param1); struct miqt_string QInputDialog_Tr(const char* s); diff --git a/qt6/gen_qinputmethod.cpp b/qt6/gen_qinputmethod.cpp index 16e82b1f..30e1d808 100644 --- a/qt6/gen_qinputmethod.cpp +++ b/qt6/gen_qinputmethod.cpp @@ -12,6 +12,10 @@ #include "gen_qinputmethod.h" #include "_cgo_export.h" +void QInputMethod_virtbase(QInputMethod* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QInputMethod_MetaObject(const QInputMethod* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/gen_qinputmethod.go b/qt6/gen_qinputmethod.go index 70be456f..2b06547e 100644 --- a/qt6/gen_qinputmethod.go +++ b/qt6/gen_qinputmethod.go @@ -41,22 +41,20 @@ func (this *QInputMethod) UnsafePointer() unsafe.Pointer { } // newQInputMethod constructs the type using only CGO pointers. -func newQInputMethod(h *C.QInputMethod, h_QObject *C.QObject) *QInputMethod { +func newQInputMethod(h *C.QInputMethod) *QInputMethod { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QInputMethod_virtbase(h, &outptr_QObject) + return &QInputMethod{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQInputMethod constructs the type using only unsafe pointers. -func UnsafeNewQInputMethod(h unsafe.Pointer, h_QObject unsafe.Pointer) *QInputMethod { - if h == nil { - return nil - } - - return &QInputMethod{h: (*C.QInputMethod)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQInputMethod(h unsafe.Pointer) *QInputMethod { + return newQInputMethod((*C.QInputMethod)(h)) } func (this *QInputMethod) MetaObject() *QMetaObject { diff --git a/qt6/gen_qinputmethod.h b/qt6/gen_qinputmethod.h index 357c676f..a7cc6887 100644 --- a/qt6/gen_qinputmethod.h +++ b/qt6/gen_qinputmethod.h @@ -32,6 +32,7 @@ typedef struct QTransform QTransform; typedef struct QVariant QVariant; #endif +void QInputMethod_virtbase(QInputMethod* src, QObject** outptr_QObject); QMetaObject* QInputMethod_MetaObject(const QInputMethod* self); void* QInputMethod_Metacast(QInputMethod* self, const char* param1); struct miqt_string QInputMethod_Tr(const char* s); diff --git a/qt6/gen_qiodevice.cpp b/qt6/gen_qiodevice.cpp index 2c73ad7c..f1ba0631 100644 --- a/qt6/gen_qiodevice.cpp +++ b/qt6/gen_qiodevice.cpp @@ -579,18 +579,17 @@ public: }; -void QIODevice_new(QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQIODevice* ret = new MiqtVirtualQIODevice(); - *outptr_QIODevice = ret; - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QIODevice* QIODevice_new() { + return new MiqtVirtualQIODevice(); } -void QIODevice_new2(QObject* parent, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQIODevice* ret = new MiqtVirtualQIODevice(parent); - *outptr_QIODevice = ret; - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QIODevice* QIODevice_new2(QObject* parent) { + return new MiqtVirtualQIODevice(parent); +} + +void QIODevice_virtbase(QIODevice* src, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { + *outptr_QObject = static_cast(src); + *outptr_QIODeviceBase = static_cast(src); } QMetaObject* QIODevice_MetaObject(const QIODevice* self) { diff --git a/qt6/gen_qiodevice.go b/qt6/gen_qiodevice.go index 0fa181d0..6c38e5aa 100644 --- a/qt6/gen_qiodevice.go +++ b/qt6/gen_qiodevice.go @@ -36,46 +36,36 @@ func (this *QIODevice) UnsafePointer() unsafe.Pointer { } // newQIODevice constructs the type using only CGO pointers. -func newQIODevice(h *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QIODevice { +func newQIODevice(h *C.QIODevice) *QIODevice { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QIODeviceBase *C.QIODeviceBase = nil + C.QIODevice_virtbase(h, &outptr_QObject, &outptr_QIODeviceBase) + return &QIODevice{h: h, - QObject: newQObject(h_QObject), - QIODeviceBase: newQIODeviceBase(h_QIODeviceBase)} + QObject: newQObject(outptr_QObject), + QIODeviceBase: newQIODeviceBase(outptr_QIODeviceBase)} } // UnsafeNewQIODevice constructs the type using only unsafe pointers. -func UnsafeNewQIODevice(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QIODevice { - if h == nil { - return nil - } - - return &QIODevice{h: (*C.QIODevice)(h), - QObject: UnsafeNewQObject(h_QObject), - QIODeviceBase: UnsafeNewQIODeviceBase(h_QIODeviceBase)} +func UnsafeNewQIODevice(h unsafe.Pointer) *QIODevice { + return newQIODevice((*C.QIODevice)(h)) } // NewQIODevice constructs a new QIODevice object. func NewQIODevice() *QIODevice { - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QIODevice_new(&outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQIODevice(outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQIODevice(C.QIODevice_new()) ret.isSubclass = true return ret } // NewQIODevice2 constructs a new QIODevice object. func NewQIODevice2(parent *QObject) *QIODevice { - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QIODevice_new2(parent.cPointer(), &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQIODevice(outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQIODevice(C.QIODevice_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -971,7 +961,7 @@ func miqt_exec_callback_QIODevice_TimerEvent(self *C.QIODevice, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QIODevice{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -997,7 +987,7 @@ func miqt_exec_callback_QIODevice_ChildEvent(self *C.QIODevice, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QIODevice{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qiodevice.h b/qt6/gen_qiodevice.h index 500f9629..92ac1904 100644 --- a/qt6/gen_qiodevice.h +++ b/qt6/gen_qiodevice.h @@ -34,8 +34,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QIODevice_new(QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QIODevice_new2(QObject* parent, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +QIODevice* QIODevice_new(); +QIODevice* QIODevice_new2(QObject* parent); +void QIODevice_virtbase(QIODevice* src, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); QMetaObject* QIODevice_MetaObject(const QIODevice* self); void* QIODevice_Metacast(QIODevice* self, const char* param1); struct miqt_string QIODevice_Tr(const char* s); diff --git a/qt6/gen_qiodevicebase.go b/qt6/gen_qiodevicebase.go index 89ef696d..7544daac 100644 --- a/qt6/gen_qiodevicebase.go +++ b/qt6/gen_qiodevicebase.go @@ -51,14 +51,11 @@ func newQIODeviceBase(h *C.QIODeviceBase) *QIODeviceBase { if h == nil { return nil } + return &QIODeviceBase{h: h} } // UnsafeNewQIODeviceBase constructs the type using only unsafe pointers. func UnsafeNewQIODeviceBase(h unsafe.Pointer) *QIODeviceBase { - if h == nil { - return nil - } - - return &QIODeviceBase{h: (*C.QIODeviceBase)(h)} + return newQIODeviceBase((*C.QIODeviceBase)(h)) } diff --git a/qt6/gen_qitemdelegate.cpp b/qt6/gen_qitemdelegate.cpp index 65e1a8d1..9565350c 100644 --- a/qt6/gen_qitemdelegate.cpp +++ b/qt6/gen_qitemdelegate.cpp @@ -486,18 +486,16 @@ public: }; -void QItemDelegate_new(QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { - MiqtVirtualQItemDelegate* ret = new MiqtVirtualQItemDelegate(); - *outptr_QItemDelegate = ret; - *outptr_QAbstractItemDelegate = static_cast(ret); - *outptr_QObject = static_cast(ret); +QItemDelegate* QItemDelegate_new() { + return new MiqtVirtualQItemDelegate(); } -void QItemDelegate_new2(QObject* parent, QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { - MiqtVirtualQItemDelegate* ret = new MiqtVirtualQItemDelegate(parent); - *outptr_QItemDelegate = ret; - *outptr_QAbstractItemDelegate = static_cast(ret); - *outptr_QObject = static_cast(ret); +QItemDelegate* QItemDelegate_new2(QObject* parent) { + return new MiqtVirtualQItemDelegate(parent); +} + +void QItemDelegate_virtbase(QItemDelegate* src, QAbstractItemDelegate** outptr_QAbstractItemDelegate) { + *outptr_QAbstractItemDelegate = static_cast(src); } QMetaObject* QItemDelegate_MetaObject(const QItemDelegate* self) { diff --git a/qt6/gen_qitemdelegate.go b/qt6/gen_qitemdelegate.go index 93f15f3d..0f2b4d84 100644 --- a/qt6/gen_qitemdelegate.go +++ b/qt6/gen_qitemdelegate.go @@ -35,44 +35,34 @@ func (this *QItemDelegate) UnsafePointer() unsafe.Pointer { } // newQItemDelegate constructs the type using only CGO pointers. -func newQItemDelegate(h *C.QItemDelegate, h_QAbstractItemDelegate *C.QAbstractItemDelegate, h_QObject *C.QObject) *QItemDelegate { +func newQItemDelegate(h *C.QItemDelegate) *QItemDelegate { if h == nil { return nil } + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + C.QItemDelegate_virtbase(h, &outptr_QAbstractItemDelegate) + return &QItemDelegate{h: h, - QAbstractItemDelegate: newQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} + QAbstractItemDelegate: newQAbstractItemDelegate(outptr_QAbstractItemDelegate)} } // UnsafeNewQItemDelegate constructs the type using only unsafe pointers. -func UnsafeNewQItemDelegate(h unsafe.Pointer, h_QAbstractItemDelegate unsafe.Pointer, h_QObject unsafe.Pointer) *QItemDelegate { - if h == nil { - return nil - } - - return &QItemDelegate{h: (*C.QItemDelegate)(h), - QAbstractItemDelegate: UnsafeNewQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} +func UnsafeNewQItemDelegate(h unsafe.Pointer) *QItemDelegate { + return newQItemDelegate((*C.QItemDelegate)(h)) } // NewQItemDelegate constructs a new QItemDelegate object. func NewQItemDelegate() *QItemDelegate { - var outptr_QItemDelegate *C.QItemDelegate = nil - var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil - var outptr_QObject *C.QObject = nil - C.QItemDelegate_new(&outptr_QItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) - ret := newQItemDelegate(outptr_QItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret := newQItemDelegate(C.QItemDelegate_new()) ret.isSubclass = true return ret } // NewQItemDelegate2 constructs a new QItemDelegate object. func NewQItemDelegate2(parent *QObject) *QItemDelegate { - var outptr_QItemDelegate *C.QItemDelegate = nil - var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil - var outptr_QObject *C.QObject = nil - C.QItemDelegate_new2(parent.cPointer(), &outptr_QItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) - ret := newQItemDelegate(outptr_QItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret := newQItemDelegate(C.QItemDelegate_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -115,7 +105,7 @@ func (this *QItemDelegate) SizeHint(option *QStyleOptionViewItem, index *QModelI } func (this *QItemDelegate) CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return newQWidget(C.QItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer()), nil, nil) + return newQWidget(C.QItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer())) } func (this *QItemDelegate) SetEditorData(editor *QWidget, index *QModelIndex) { @@ -182,7 +172,7 @@ func miqt_exec_callback_QItemDelegate_Paint(self *C.QItemDelegate, cb C.intptr_t // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -212,7 +202,7 @@ func miqt_exec_callback_QItemDelegate_SizeHint(self *C.QItemDelegate, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) slotval2 := newQModelIndex(index) @@ -224,7 +214,7 @@ func miqt_exec_callback_QItemDelegate_SizeHint(self *C.QItemDelegate, cb C.intpt func (this *QItemDelegate) callVirtualBase_CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return newQWidget(C.QItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer()), nil, nil) + return newQWidget(C.QItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer())) } func (this *QItemDelegate) OnCreateEditor(slot func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) { @@ -242,9 +232,9 @@ func miqt_exec_callback_QItemDelegate_CreateEditor(self *C.QItemDelegate, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(parent, nil, nil) + slotval1 := newQWidget(parent) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -274,7 +264,7 @@ func miqt_exec_callback_QItemDelegate_SetEditorData(self *C.QItemDelegate, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := newQModelIndex(index) @@ -302,9 +292,9 @@ func miqt_exec_callback_QItemDelegate_SetModelData(self *C.QItemDelegate, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) - slotval2 := newQAbstractItemModel(model, nil) + slotval2 := newQAbstractItemModel(model) slotval3 := newQModelIndex(index) @@ -332,9 +322,9 @@ func miqt_exec_callback_QItemDelegate_UpdateEditorGeometry(self *C.QItemDelegate } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -368,7 +358,7 @@ func miqt_exec_callback_QItemDelegate_DrawDisplay(self *C.QItemDelegate, cb C.in // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQRect(rect) @@ -403,11 +393,11 @@ func miqt_exec_callback_QItemDelegate_DrawDecoration(self *C.QItemDelegate, cb C // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQRect(rect) - slotval4 := newQPixmap(pixmap, nil) + slotval4 := newQPixmap(pixmap) gofunc((&QItemDelegate{h: self}).callVirtualBase_DrawDecoration, slotval1, slotval2, slotval3, slotval4) @@ -435,7 +425,7 @@ func miqt_exec_callback_QItemDelegate_DrawFocus(self *C.QItemDelegate, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQRect(rect) @@ -465,7 +455,7 @@ func miqt_exec_callback_QItemDelegate_DrawCheck(self *C.QItemDelegate, cb C.intp // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQRect(rect) @@ -527,9 +517,9 @@ func miqt_exec_callback_QItemDelegate_EditorEvent(self *C.QItemDelegate, cb C.in // Convert all CABI parameters to Go parameters slotval1 := newQEvent(event) - slotval2 := newQAbstractItemModel(model, nil) + slotval2 := newQAbstractItemModel(model) - slotval3 := newQStyleOptionViewItem(option, nil) + slotval3 := newQStyleOptionViewItem(option) slotval4 := newQModelIndex(index) @@ -559,7 +549,7 @@ func miqt_exec_callback_QItemDelegate_DestroyEditor(self *C.QItemDelegate, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := newQModelIndex(index) @@ -587,11 +577,11 @@ func miqt_exec_callback_QItemDelegate_HelpEvent(self *C.QItemDelegate, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQHelpEvent(event, nil) + slotval1 := newQHelpEvent(event) - slotval2 := newQAbstractItemView(view, nil, nil, nil, nil, nil) + slotval2 := newQAbstractItemView(view) - slotval3 := newQStyleOptionViewItem(option, nil) + slotval3 := newQStyleOptionViewItem(option) slotval4 := newQModelIndex(index) diff --git a/qt6/gen_qitemdelegate.h b/qt6/gen_qitemdelegate.h index 8df0943e..8cdd17b6 100644 --- a/qt6/gen_qitemdelegate.h +++ b/qt6/gen_qitemdelegate.h @@ -50,8 +50,9 @@ typedef struct QStyleOptionViewItem QStyleOptionViewItem; typedef struct QWidget QWidget; #endif -void QItemDelegate_new(QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); -void QItemDelegate_new2(QObject* parent, QItemDelegate** outptr_QItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); +QItemDelegate* QItemDelegate_new(); +QItemDelegate* QItemDelegate_new2(QObject* parent); +void QItemDelegate_virtbase(QItemDelegate* src, QAbstractItemDelegate** outptr_QAbstractItemDelegate); QMetaObject* QItemDelegate_MetaObject(const QItemDelegate* self); void* QItemDelegate_Metacast(QItemDelegate* self, const char* param1); struct miqt_string QItemDelegate_Tr(const char* s); diff --git a/qt6/gen_qitemeditorfactory.cpp b/qt6/gen_qitemeditorfactory.cpp index 08641f11..cb9fbebf 100644 --- a/qt6/gen_qitemeditorfactory.cpp +++ b/qt6/gen_qitemeditorfactory.cpp @@ -94,14 +94,12 @@ public: }; -void QItemEditorFactory_new(QItemEditorFactory** outptr_QItemEditorFactory) { - MiqtVirtualQItemEditorFactory* ret = new MiqtVirtualQItemEditorFactory(); - *outptr_QItemEditorFactory = ret; +QItemEditorFactory* QItemEditorFactory_new() { + return new MiqtVirtualQItemEditorFactory(); } -void QItemEditorFactory_new2(QItemEditorFactory* param1, QItemEditorFactory** outptr_QItemEditorFactory) { - MiqtVirtualQItemEditorFactory* ret = new MiqtVirtualQItemEditorFactory(*param1); - *outptr_QItemEditorFactory = ret; +QItemEditorFactory* QItemEditorFactory_new2(QItemEditorFactory* param1) { + return new MiqtVirtualQItemEditorFactory(*param1); } QWidget* QItemEditorFactory_CreateEditor(const QItemEditorFactory* self, int userType, QWidget* parent) { diff --git a/qt6/gen_qitemeditorfactory.go b/qt6/gen_qitemeditorfactory.go index d6d30844..520e9870 100644 --- a/qt6/gen_qitemeditorfactory.go +++ b/qt6/gen_qitemeditorfactory.go @@ -38,20 +38,17 @@ func newQItemEditorCreatorBase(h *C.QItemEditorCreatorBase) *QItemEditorCreatorB if h == nil { return nil } + return &QItemEditorCreatorBase{h: h} } // UnsafeNewQItemEditorCreatorBase constructs the type using only unsafe pointers. func UnsafeNewQItemEditorCreatorBase(h unsafe.Pointer) *QItemEditorCreatorBase { - if h == nil { - return nil - } - - return &QItemEditorCreatorBase{h: (*C.QItemEditorCreatorBase)(h)} + return newQItemEditorCreatorBase((*C.QItemEditorCreatorBase)(h)) } func (this *QItemEditorCreatorBase) CreateWidget(parent *QWidget) *QWidget { - return newQWidget(C.QItemEditorCreatorBase_CreateWidget(this.h, parent.cPointer()), nil, nil) + return newQWidget(C.QItemEditorCreatorBase_CreateWidget(this.h, parent.cPointer())) } func (this *QItemEditorCreatorBase) ValuePropertyName() []byte { @@ -103,40 +100,33 @@ func newQItemEditorFactory(h *C.QItemEditorFactory) *QItemEditorFactory { if h == nil { return nil } + return &QItemEditorFactory{h: h} } // UnsafeNewQItemEditorFactory constructs the type using only unsafe pointers. func UnsafeNewQItemEditorFactory(h unsafe.Pointer) *QItemEditorFactory { - if h == nil { - return nil - } - - return &QItemEditorFactory{h: (*C.QItemEditorFactory)(h)} + return newQItemEditorFactory((*C.QItemEditorFactory)(h)) } // NewQItemEditorFactory constructs a new QItemEditorFactory object. func NewQItemEditorFactory() *QItemEditorFactory { - var outptr_QItemEditorFactory *C.QItemEditorFactory = nil - C.QItemEditorFactory_new(&outptr_QItemEditorFactory) - ret := newQItemEditorFactory(outptr_QItemEditorFactory) + ret := newQItemEditorFactory(C.QItemEditorFactory_new()) ret.isSubclass = true return ret } // NewQItemEditorFactory2 constructs a new QItemEditorFactory object. func NewQItemEditorFactory2(param1 *QItemEditorFactory) *QItemEditorFactory { - var outptr_QItemEditorFactory *C.QItemEditorFactory = nil - C.QItemEditorFactory_new2(param1.cPointer(), &outptr_QItemEditorFactory) - ret := newQItemEditorFactory(outptr_QItemEditorFactory) + ret := newQItemEditorFactory(C.QItemEditorFactory_new2(param1.cPointer())) ret.isSubclass = true return ret } func (this *QItemEditorFactory) CreateEditor(userType int, parent *QWidget) *QWidget { - return newQWidget(C.QItemEditorFactory_CreateEditor(this.h, (C.int)(userType), parent.cPointer()), nil, nil) + return newQWidget(C.QItemEditorFactory_CreateEditor(this.h, (C.int)(userType), parent.cPointer())) } func (this *QItemEditorFactory) ValuePropertyName(userType int) []byte { @@ -160,7 +150,7 @@ func QItemEditorFactory_SetDefaultFactory(factory *QItemEditorFactory) { func (this *QItemEditorFactory) callVirtualBase_CreateEditor(userType int, parent *QWidget) *QWidget { - return newQWidget(C.QItemEditorFactory_virtualbase_CreateEditor(unsafe.Pointer(this.h), (C.int)(userType), parent.cPointer()), nil, nil) + return newQWidget(C.QItemEditorFactory_virtualbase_CreateEditor(unsafe.Pointer(this.h), (C.int)(userType), parent.cPointer())) } func (this *QItemEditorFactory) OnCreateEditor(slot func(super func(userType int, parent *QWidget) *QWidget, userType int, parent *QWidget) *QWidget) { @@ -180,7 +170,7 @@ func miqt_exec_callback_QItemEditorFactory_CreateEditor(self *C.QItemEditorFacto // Convert all CABI parameters to Go parameters slotval1 := (int)(userType) - slotval2 := newQWidget(parent, nil, nil) + slotval2 := newQWidget(parent) virtualReturn := gofunc((&QItemEditorFactory{h: self}).callVirtualBase_CreateEditor, slotval1, slotval2) diff --git a/qt6/gen_qitemeditorfactory.h b/qt6/gen_qitemeditorfactory.h index 411cab3f..8ac11ec5 100644 --- a/qt6/gen_qitemeditorfactory.h +++ b/qt6/gen_qitemeditorfactory.h @@ -29,8 +29,8 @@ struct miqt_string QItemEditorCreatorBase_ValuePropertyName(const QItemEditorCre void QItemEditorCreatorBase_OperatorAssign(QItemEditorCreatorBase* self, QItemEditorCreatorBase* param1); void QItemEditorCreatorBase_Delete(QItemEditorCreatorBase* self, bool isSubclass); -void QItemEditorFactory_new(QItemEditorFactory** outptr_QItemEditorFactory); -void QItemEditorFactory_new2(QItemEditorFactory* param1, QItemEditorFactory** outptr_QItemEditorFactory); +QItemEditorFactory* QItemEditorFactory_new(); +QItemEditorFactory* QItemEditorFactory_new2(QItemEditorFactory* param1); QWidget* QItemEditorFactory_CreateEditor(const QItemEditorFactory* self, int userType, QWidget* parent); struct miqt_string QItemEditorFactory_ValuePropertyName(const QItemEditorFactory* self, int userType); void QItemEditorFactory_RegisterEditor(QItemEditorFactory* self, int userType, QItemEditorCreatorBase* creator); diff --git a/qt6/gen_qitemselectionmodel.cpp b/qt6/gen_qitemselectionmodel.cpp index fc76707a..f383298f 100644 --- a/qt6/gen_qitemselectionmodel.cpp +++ b/qt6/gen_qitemselectionmodel.cpp @@ -18,24 +18,20 @@ #include "gen_qitemselectionmodel.h" #include "_cgo_export.h" -void QItemSelectionRange_new(QItemSelectionRange** outptr_QItemSelectionRange) { - QItemSelectionRange* ret = new QItemSelectionRange(); - *outptr_QItemSelectionRange = ret; +QItemSelectionRange* QItemSelectionRange_new() { + return new QItemSelectionRange(); } -void QItemSelectionRange_new2(QModelIndex* topL, QModelIndex* bottomR, QItemSelectionRange** outptr_QItemSelectionRange) { - QItemSelectionRange* ret = new QItemSelectionRange(*topL, *bottomR); - *outptr_QItemSelectionRange = ret; +QItemSelectionRange* QItemSelectionRange_new2(QModelIndex* topL, QModelIndex* bottomR) { + return new QItemSelectionRange(*topL, *bottomR); } -void QItemSelectionRange_new3(QModelIndex* index, QItemSelectionRange** outptr_QItemSelectionRange) { - QItemSelectionRange* ret = new QItemSelectionRange(*index); - *outptr_QItemSelectionRange = ret; +QItemSelectionRange* QItemSelectionRange_new3(QModelIndex* index) { + return new QItemSelectionRange(*index); } -void QItemSelectionRange_new4(QItemSelectionRange* param1, QItemSelectionRange** outptr_QItemSelectionRange) { - QItemSelectionRange* ret = new QItemSelectionRange(*param1); - *outptr_QItemSelectionRange = ret; +QItemSelectionRange* QItemSelectionRange_new4(QItemSelectionRange* param1) { + return new QItemSelectionRange(*param1); } void QItemSelectionRange_Swap(QItemSelectionRange* self, QItemSelectionRange* other) { @@ -474,22 +470,20 @@ public: }; -void QItemSelectionModel_new(QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject) { - MiqtVirtualQItemSelectionModel* ret = new MiqtVirtualQItemSelectionModel(); - *outptr_QItemSelectionModel = ret; - *outptr_QObject = static_cast(ret); +QItemSelectionModel* QItemSelectionModel_new() { + return new MiqtVirtualQItemSelectionModel(); } -void QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject) { - MiqtVirtualQItemSelectionModel* ret = new MiqtVirtualQItemSelectionModel(model, parent); - *outptr_QItemSelectionModel = ret; - *outptr_QObject = static_cast(ret); +QItemSelectionModel* QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent) { + return new MiqtVirtualQItemSelectionModel(model, parent); } -void QItemSelectionModel_new3(QAbstractItemModel* model, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject) { - MiqtVirtualQItemSelectionModel* ret = new MiqtVirtualQItemSelectionModel(model); - *outptr_QItemSelectionModel = ret; - *outptr_QObject = static_cast(ret); +QItemSelectionModel* QItemSelectionModel_new3(QAbstractItemModel* model) { + return new MiqtVirtualQItemSelectionModel(model); +} + +void QItemSelectionModel_virtbase(QItemSelectionModel* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QItemSelectionModel_MetaObject(const QItemSelectionModel* self) { @@ -873,19 +867,16 @@ void QItemSelectionModel_Delete(QItemSelectionModel* self, bool isSubclass) { } } -void QItemSelection_new(QModelIndex* topLeft, QModelIndex* bottomRight, QItemSelection** outptr_QItemSelection) { - QItemSelection* ret = new QItemSelection(*topLeft, *bottomRight); - *outptr_QItemSelection = ret; +QItemSelection* QItemSelection_new(QModelIndex* topLeft, QModelIndex* bottomRight) { + return new QItemSelection(*topLeft, *bottomRight); } -void QItemSelection_new2(QItemSelection** outptr_QItemSelection) { - QItemSelection* ret = new QItemSelection(); - *outptr_QItemSelection = ret; +QItemSelection* QItemSelection_new2() { + return new QItemSelection(); } -void QItemSelection_new3(QItemSelection* param1, QItemSelection** outptr_QItemSelection) { - QItemSelection* ret = new QItemSelection(*param1); - *outptr_QItemSelection = ret; +QItemSelection* QItemSelection_new3(QItemSelection* param1) { + return new QItemSelection(*param1); } void QItemSelection_Select(QItemSelection* self, QModelIndex* topLeft, QModelIndex* bottomRight) { diff --git a/qt6/gen_qitemselectionmodel.go b/qt6/gen_qitemselectionmodel.go index bc60ac42..216f6d74 100644 --- a/qt6/gen_qitemselectionmodel.go +++ b/qt6/gen_qitemselectionmodel.go @@ -54,54 +54,43 @@ func newQItemSelectionRange(h *C.QItemSelectionRange) *QItemSelectionRange { if h == nil { return nil } + return &QItemSelectionRange{h: h} } // UnsafeNewQItemSelectionRange constructs the type using only unsafe pointers. func UnsafeNewQItemSelectionRange(h unsafe.Pointer) *QItemSelectionRange { - if h == nil { - return nil - } - - return &QItemSelectionRange{h: (*C.QItemSelectionRange)(h)} + return newQItemSelectionRange((*C.QItemSelectionRange)(h)) } // NewQItemSelectionRange constructs a new QItemSelectionRange object. func NewQItemSelectionRange() *QItemSelectionRange { - var outptr_QItemSelectionRange *C.QItemSelectionRange = nil - C.QItemSelectionRange_new(&outptr_QItemSelectionRange) - ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret := newQItemSelectionRange(C.QItemSelectionRange_new()) ret.isSubclass = true return ret } // NewQItemSelectionRange2 constructs a new QItemSelectionRange object. func NewQItemSelectionRange2(topL *QModelIndex, bottomR *QModelIndex) *QItemSelectionRange { - var outptr_QItemSelectionRange *C.QItemSelectionRange = nil - C.QItemSelectionRange_new2(topL.cPointer(), bottomR.cPointer(), &outptr_QItemSelectionRange) - ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret := newQItemSelectionRange(C.QItemSelectionRange_new2(topL.cPointer(), bottomR.cPointer())) ret.isSubclass = true return ret } // NewQItemSelectionRange3 constructs a new QItemSelectionRange object. func NewQItemSelectionRange3(index *QModelIndex) *QItemSelectionRange { - var outptr_QItemSelectionRange *C.QItemSelectionRange = nil - C.QItemSelectionRange_new3(index.cPointer(), &outptr_QItemSelectionRange) - ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret := newQItemSelectionRange(C.QItemSelectionRange_new3(index.cPointer())) ret.isSubclass = true return ret } // NewQItemSelectionRange4 constructs a new QItemSelectionRange object. func NewQItemSelectionRange4(param1 *QItemSelectionRange) *QItemSelectionRange { - var outptr_QItemSelectionRange *C.QItemSelectionRange = nil - C.QItemSelectionRange_new4(param1.cPointer(), &outptr_QItemSelectionRange) - ret := newQItemSelectionRange(outptr_QItemSelectionRange) + ret := newQItemSelectionRange(C.QItemSelectionRange_new4(param1.cPointer())) ret.isSubclass = true return ret } @@ -149,7 +138,7 @@ func (this *QItemSelectionRange) Parent() *QModelIndex { } func (this *QItemSelectionRange) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QItemSelectionRange_Model(this.h), nil) + return newQAbstractItemModel(C.QItemSelectionRange_Model(this.h)) } func (this *QItemSelectionRange) Contains(index *QModelIndex) bool { @@ -233,53 +222,42 @@ func (this *QItemSelectionModel) UnsafePointer() unsafe.Pointer { } // newQItemSelectionModel constructs the type using only CGO pointers. -func newQItemSelectionModel(h *C.QItemSelectionModel, h_QObject *C.QObject) *QItemSelectionModel { +func newQItemSelectionModel(h *C.QItemSelectionModel) *QItemSelectionModel { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QItemSelectionModel_virtbase(h, &outptr_QObject) + return &QItemSelectionModel{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQItemSelectionModel constructs the type using only unsafe pointers. -func UnsafeNewQItemSelectionModel(h unsafe.Pointer, h_QObject unsafe.Pointer) *QItemSelectionModel { - if h == nil { - return nil - } - - return &QItemSelectionModel{h: (*C.QItemSelectionModel)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQItemSelectionModel(h unsafe.Pointer) *QItemSelectionModel { + return newQItemSelectionModel((*C.QItemSelectionModel)(h)) } // NewQItemSelectionModel constructs a new QItemSelectionModel object. func NewQItemSelectionModel() *QItemSelectionModel { - var outptr_QItemSelectionModel *C.QItemSelectionModel = nil - var outptr_QObject *C.QObject = nil - C.QItemSelectionModel_new(&outptr_QItemSelectionModel, &outptr_QObject) - ret := newQItemSelectionModel(outptr_QItemSelectionModel, outptr_QObject) + ret := newQItemSelectionModel(C.QItemSelectionModel_new()) ret.isSubclass = true return ret } // NewQItemSelectionModel2 constructs a new QItemSelectionModel object. func NewQItemSelectionModel2(model *QAbstractItemModel, parent *QObject) *QItemSelectionModel { - var outptr_QItemSelectionModel *C.QItemSelectionModel = nil - var outptr_QObject *C.QObject = nil - C.QItemSelectionModel_new2(model.cPointer(), parent.cPointer(), &outptr_QItemSelectionModel, &outptr_QObject) - ret := newQItemSelectionModel(outptr_QItemSelectionModel, outptr_QObject) + ret := newQItemSelectionModel(C.QItemSelectionModel_new2(model.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQItemSelectionModel3 constructs a new QItemSelectionModel object. func NewQItemSelectionModel3(model *QAbstractItemModel) *QItemSelectionModel { - var outptr_QItemSelectionModel *C.QItemSelectionModel = nil - var outptr_QObject *C.QObject = nil - C.QItemSelectionModel_new3(model.cPointer(), &outptr_QItemSelectionModel, &outptr_QObject) - ret := newQItemSelectionModel(outptr_QItemSelectionModel, outptr_QObject) + ret := newQItemSelectionModel(C.QItemSelectionModel_new3(model.cPointer())) ret.isSubclass = true return ret } @@ -376,11 +354,11 @@ func (this *QItemSelectionModel) Selection() *QItemSelection { } func (this *QItemSelectionModel) Model() *QAbstractItemModel { - return newQAbstractItemModel(C.QItemSelectionModel_Model(this.h), nil) + return newQAbstractItemModel(C.QItemSelectionModel_Model(this.h)) } func (this *QItemSelectionModel) Model2() *QAbstractItemModel { - return newQAbstractItemModel(C.QItemSelectionModel_Model2(this.h), nil) + return newQAbstractItemModel(C.QItemSelectionModel_Model2(this.h)) } func (this *QItemSelectionModel) SetModel(model *QAbstractItemModel) { @@ -518,7 +496,7 @@ func miqt_exec_callback_QItemSelectionModel_ModelChanged(cb C.intptr_t, model *C } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc(slotval1) } @@ -816,7 +794,7 @@ func miqt_exec_callback_QItemSelectionModel_TimerEvent(self *C.QItemSelectionMod } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QItemSelectionModel{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -842,7 +820,7 @@ func miqt_exec_callback_QItemSelectionModel_ChildEvent(self *C.QItemSelectionMod } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QItemSelectionModel{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -966,44 +944,35 @@ func newQItemSelection(h *C.QItemSelection) *QItemSelection { if h == nil { return nil } + return &QItemSelection{h: h} } // UnsafeNewQItemSelection constructs the type using only unsafe pointers. func UnsafeNewQItemSelection(h unsafe.Pointer) *QItemSelection { - if h == nil { - return nil - } - - return &QItemSelection{h: (*C.QItemSelection)(h)} + return newQItemSelection((*C.QItemSelection)(h)) } // NewQItemSelection constructs a new QItemSelection object. func NewQItemSelection(topLeft *QModelIndex, bottomRight *QModelIndex) *QItemSelection { - var outptr_QItemSelection *C.QItemSelection = nil - C.QItemSelection_new(topLeft.cPointer(), bottomRight.cPointer(), &outptr_QItemSelection) - ret := newQItemSelection(outptr_QItemSelection) + ret := newQItemSelection(C.QItemSelection_new(topLeft.cPointer(), bottomRight.cPointer())) ret.isSubclass = true return ret } // NewQItemSelection2 constructs a new QItemSelection object. func NewQItemSelection2() *QItemSelection { - var outptr_QItemSelection *C.QItemSelection = nil - C.QItemSelection_new2(&outptr_QItemSelection) - ret := newQItemSelection(outptr_QItemSelection) + ret := newQItemSelection(C.QItemSelection_new2()) ret.isSubclass = true return ret } // NewQItemSelection3 constructs a new QItemSelection object. func NewQItemSelection3(param1 *QItemSelection) *QItemSelection { - var outptr_QItemSelection *C.QItemSelection = nil - C.QItemSelection_new3(param1.cPointer(), &outptr_QItemSelection) - ret := newQItemSelection(outptr_QItemSelection) + ret := newQItemSelection(C.QItemSelection_new3(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qitemselectionmodel.h b/qt6/gen_qitemselectionmodel.h index 99c6264e..4c160d75 100644 --- a/qt6/gen_qitemselectionmodel.h +++ b/qt6/gen_qitemselectionmodel.h @@ -42,10 +42,10 @@ typedef struct QPersistentModelIndex QPersistentModelIndex; typedef struct QTimerEvent QTimerEvent; #endif -void QItemSelectionRange_new(QItemSelectionRange** outptr_QItemSelectionRange); -void QItemSelectionRange_new2(QModelIndex* topL, QModelIndex* bottomR, QItemSelectionRange** outptr_QItemSelectionRange); -void QItemSelectionRange_new3(QModelIndex* index, QItemSelectionRange** outptr_QItemSelectionRange); -void QItemSelectionRange_new4(QItemSelectionRange* param1, QItemSelectionRange** outptr_QItemSelectionRange); +QItemSelectionRange* QItemSelectionRange_new(); +QItemSelectionRange* QItemSelectionRange_new2(QModelIndex* topL, QModelIndex* bottomR); +QItemSelectionRange* QItemSelectionRange_new3(QModelIndex* index); +QItemSelectionRange* QItemSelectionRange_new4(QItemSelectionRange* param1); void QItemSelectionRange_Swap(QItemSelectionRange* self, QItemSelectionRange* other); int QItemSelectionRange_Top(const QItemSelectionRange* self); int QItemSelectionRange_Left(const QItemSelectionRange* self); @@ -68,9 +68,10 @@ bool QItemSelectionRange_IsEmpty(const QItemSelectionRange* self); struct miqt_array /* of QModelIndex* */ QItemSelectionRange_Indexes(const QItemSelectionRange* self); void QItemSelectionRange_Delete(QItemSelectionRange* self, bool isSubclass); -void QItemSelectionModel_new(QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject); -void QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject); -void QItemSelectionModel_new3(QAbstractItemModel* model, QItemSelectionModel** outptr_QItemSelectionModel, QObject** outptr_QObject); +QItemSelectionModel* QItemSelectionModel_new(); +QItemSelectionModel* QItemSelectionModel_new2(QAbstractItemModel* model, QObject* parent); +QItemSelectionModel* QItemSelectionModel_new3(QAbstractItemModel* model); +void QItemSelectionModel_virtbase(QItemSelectionModel* src, QObject** outptr_QObject); QMetaObject* QItemSelectionModel_MetaObject(const QItemSelectionModel* self); void* QItemSelectionModel_Metacast(QItemSelectionModel* self, const char* param1); struct miqt_string QItemSelectionModel_Tr(const char* s); @@ -141,9 +142,9 @@ void QItemSelectionModel_override_virtual_DisconnectNotify(void* self, intptr_t void QItemSelectionModel_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QItemSelectionModel_Delete(QItemSelectionModel* self, bool isSubclass); -void QItemSelection_new(QModelIndex* topLeft, QModelIndex* bottomRight, QItemSelection** outptr_QItemSelection); -void QItemSelection_new2(QItemSelection** outptr_QItemSelection); -void QItemSelection_new3(QItemSelection* param1, QItemSelection** outptr_QItemSelection); +QItemSelection* QItemSelection_new(QModelIndex* topLeft, QModelIndex* bottomRight); +QItemSelection* QItemSelection_new2(); +QItemSelection* QItemSelection_new3(QItemSelection* param1); void QItemSelection_Select(QItemSelection* self, QModelIndex* topLeft, QModelIndex* bottomRight); bool QItemSelection_Contains(const QItemSelection* self, QModelIndex* index); struct miqt_array /* of QModelIndex* */ QItemSelection_Indexes(const QItemSelection* self); diff --git a/qt6/gen_qjsonarray.cpp b/qt6/gen_qjsonarray.cpp index c783075b..568582f2 100644 --- a/qt6/gen_qjsonarray.cpp +++ b/qt6/gen_qjsonarray.cpp @@ -12,14 +12,12 @@ #include "gen_qjsonarray.h" #include "_cgo_export.h" -void QJsonArray_new(QJsonArray** outptr_QJsonArray) { - QJsonArray* ret = new QJsonArray(); - *outptr_QJsonArray = ret; +QJsonArray* QJsonArray_new() { + return new QJsonArray(); } -void QJsonArray_new2(QJsonArray* other, QJsonArray** outptr_QJsonArray) { - QJsonArray* ret = new QJsonArray(*other); - *outptr_QJsonArray = ret; +QJsonArray* QJsonArray_new2(QJsonArray* other) { + return new QJsonArray(*other); } void QJsonArray_OperatorAssign(QJsonArray* self, QJsonArray* other) { @@ -203,19 +201,16 @@ void QJsonArray_Delete(QJsonArray* self, bool isSubclass) { } } -void QJsonArray__iterator_new(QJsonArray__iterator** outptr_QJsonArray__iterator) { - QJsonArray::iterator* ret = new QJsonArray::iterator(); - *outptr_QJsonArray__iterator = ret; +QJsonArray__iterator* QJsonArray__iterator_new() { + return new QJsonArray::iterator(); } -void QJsonArray__iterator_new2(QJsonArray* array, ptrdiff_t index, QJsonArray__iterator** outptr_QJsonArray__iterator) { - QJsonArray::iterator* ret = new QJsonArray::iterator(array, (qsizetype)(index)); - *outptr_QJsonArray__iterator = ret; +QJsonArray__iterator* QJsonArray__iterator_new2(QJsonArray* array, ptrdiff_t index) { + return new QJsonArray::iterator(array, (qsizetype)(index)); } -void QJsonArray__iterator_new3(QJsonArray__iterator* other, QJsonArray__iterator** outptr_QJsonArray__iterator) { - QJsonArray::iterator* ret = new QJsonArray::iterator(*other); - *outptr_QJsonArray__iterator = ret; +QJsonArray__iterator* QJsonArray__iterator_new3(QJsonArray__iterator* other) { + return new QJsonArray::iterator(*other); } void QJsonArray__iterator_OperatorAssign(QJsonArray__iterator* self, QJsonArray__iterator* other) { @@ -339,24 +334,20 @@ void QJsonArray__iterator_Delete(QJsonArray__iterator* self, bool isSubclass) { } } -void QJsonArray__const_iterator_new(QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { - QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(); - *outptr_QJsonArray__const_iterator = ret; +QJsonArray__const_iterator* QJsonArray__const_iterator_new() { + return new QJsonArray::const_iterator(); } -void QJsonArray__const_iterator_new2(QJsonArray* array, ptrdiff_t index, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { - QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(array, (qsizetype)(index)); - *outptr_QJsonArray__const_iterator = ret; +QJsonArray__const_iterator* QJsonArray__const_iterator_new2(QJsonArray* array, ptrdiff_t index) { + return new QJsonArray::const_iterator(array, (qsizetype)(index)); } -void QJsonArray__const_iterator_new3(QJsonArray__iterator* o, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { - QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(*o); - *outptr_QJsonArray__const_iterator = ret; +QJsonArray__const_iterator* QJsonArray__const_iterator_new3(QJsonArray__iterator* o) { + return new QJsonArray::const_iterator(*o); } -void QJsonArray__const_iterator_new4(QJsonArray__const_iterator* other, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator) { - QJsonArray::const_iterator* ret = new QJsonArray::const_iterator(*other); - *outptr_QJsonArray__const_iterator = ret; +QJsonArray__const_iterator* QJsonArray__const_iterator_new4(QJsonArray__const_iterator* other) { + return new QJsonArray::const_iterator(*other); } void QJsonArray__const_iterator_OperatorAssign(QJsonArray__const_iterator* self, QJsonArray__const_iterator* other) { diff --git a/qt6/gen_qjsonarray.go b/qt6/gen_qjsonarray.go index e4fe9262..7299e4fe 100644 --- a/qt6/gen_qjsonarray.go +++ b/qt6/gen_qjsonarray.go @@ -37,34 +37,27 @@ func newQJsonArray(h *C.QJsonArray) *QJsonArray { if h == nil { return nil } + return &QJsonArray{h: h} } // UnsafeNewQJsonArray constructs the type using only unsafe pointers. func UnsafeNewQJsonArray(h unsafe.Pointer) *QJsonArray { - if h == nil { - return nil - } - - return &QJsonArray{h: (*C.QJsonArray)(h)} + return newQJsonArray((*C.QJsonArray)(h)) } // NewQJsonArray constructs a new QJsonArray object. func NewQJsonArray() *QJsonArray { - var outptr_QJsonArray *C.QJsonArray = nil - C.QJsonArray_new(&outptr_QJsonArray) - ret := newQJsonArray(outptr_QJsonArray) + ret := newQJsonArray(C.QJsonArray_new()) ret.isSubclass = true return ret } // NewQJsonArray2 constructs a new QJsonArray object. func NewQJsonArray2(other *QJsonArray) *QJsonArray { - var outptr_QJsonArray *C.QJsonArray = nil - C.QJsonArray_new2(other.cPointer(), &outptr_QJsonArray) - ret := newQJsonArray(outptr_QJsonArray) + ret := newQJsonArray(C.QJsonArray_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -158,7 +151,7 @@ func (this *QJsonArray) Contains(element *QJsonValue) bool { } func (this *QJsonArray) OperatorSubscript(i int64) *QJsonValueRef { - _goptr := newQJsonValueRef(C.QJsonArray_OperatorSubscript(this.h, (C.ptrdiff_t)(i)), nil) + _goptr := newQJsonValueRef(C.QJsonArray_OperatorSubscript(this.h, (C.ptrdiff_t)(i))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -313,44 +306,35 @@ func newQJsonArray__iterator(h *C.QJsonArray__iterator) *QJsonArray__iterator { if h == nil { return nil } + return &QJsonArray__iterator{h: h} } // UnsafeNewQJsonArray__iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonArray__iterator(h unsafe.Pointer) *QJsonArray__iterator { - if h == nil { - return nil - } - - return &QJsonArray__iterator{h: (*C.QJsonArray__iterator)(h)} + return newQJsonArray__iterator((*C.QJsonArray__iterator)(h)) } // NewQJsonArray__iterator constructs a new QJsonArray::iterator object. func NewQJsonArray__iterator() *QJsonArray__iterator { - var outptr_QJsonArray__iterator *C.QJsonArray__iterator = nil - C.QJsonArray__iterator_new(&outptr_QJsonArray__iterator) - ret := newQJsonArray__iterator(outptr_QJsonArray__iterator) + ret := newQJsonArray__iterator(C.QJsonArray__iterator_new()) ret.isSubclass = true return ret } // NewQJsonArray__iterator2 constructs a new QJsonArray::iterator object. func NewQJsonArray__iterator2(array *QJsonArray, index int64) *QJsonArray__iterator { - var outptr_QJsonArray__iterator *C.QJsonArray__iterator = nil - C.QJsonArray__iterator_new2(array.cPointer(), (C.ptrdiff_t)(index), &outptr_QJsonArray__iterator) - ret := newQJsonArray__iterator(outptr_QJsonArray__iterator) + ret := newQJsonArray__iterator(C.QJsonArray__iterator_new2(array.cPointer(), (C.ptrdiff_t)(index))) ret.isSubclass = true return ret } // NewQJsonArray__iterator3 constructs a new QJsonArray::iterator object. func NewQJsonArray__iterator3(other *QJsonArray__iterator) *QJsonArray__iterator { - var outptr_QJsonArray__iterator *C.QJsonArray__iterator = nil - C.QJsonArray__iterator_new3(other.cPointer(), &outptr_QJsonArray__iterator) - ret := newQJsonArray__iterator(outptr_QJsonArray__iterator) + ret := newQJsonArray__iterator(C.QJsonArray__iterator_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -360,7 +344,7 @@ func (this *QJsonArray__iterator) OperatorAssign(other *QJsonArray__iterator) { } func (this *QJsonArray__iterator) OperatorMultiply() *QJsonValueRef { - _goptr := newQJsonValueRef(C.QJsonArray__iterator_OperatorMultiply(this.h), nil) + _goptr := newQJsonValueRef(C.QJsonArray__iterator_OperatorMultiply(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -370,11 +354,11 @@ func (this *QJsonArray__iterator) OperatorMinusGreater() *QJsonValueConstRef { } func (this *QJsonArray__iterator) OperatorMinusGreater2() *QJsonValueRef { - return newQJsonValueRef(C.QJsonArray__iterator_OperatorMinusGreater2(this.h), nil) + return newQJsonValueRef(C.QJsonArray__iterator_OperatorMinusGreater2(this.h)) } func (this *QJsonArray__iterator) OperatorSubscript(j int64) *QJsonValueRef { - _goptr := newQJsonValueRef(C.QJsonArray__iterator_OperatorSubscript(this.h, (C.ptrdiff_t)(j)), nil) + _goptr := newQJsonValueRef(C.QJsonArray__iterator_OperatorSubscript(this.h, (C.ptrdiff_t)(j))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -509,54 +493,43 @@ func newQJsonArray__const_iterator(h *C.QJsonArray__const_iterator) *QJsonArray_ if h == nil { return nil } + return &QJsonArray__const_iterator{h: h} } // UnsafeNewQJsonArray__const_iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonArray__const_iterator(h unsafe.Pointer) *QJsonArray__const_iterator { - if h == nil { - return nil - } - - return &QJsonArray__const_iterator{h: (*C.QJsonArray__const_iterator)(h)} + return newQJsonArray__const_iterator((*C.QJsonArray__const_iterator)(h)) } // NewQJsonArray__const_iterator constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator() *QJsonArray__const_iterator { - var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil - C.QJsonArray__const_iterator_new(&outptr_QJsonArray__const_iterator) - ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(C.QJsonArray__const_iterator_new()) ret.isSubclass = true return ret } // NewQJsonArray__const_iterator2 constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator2(array *QJsonArray, index int64) *QJsonArray__const_iterator { - var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil - C.QJsonArray__const_iterator_new2(array.cPointer(), (C.ptrdiff_t)(index), &outptr_QJsonArray__const_iterator) - ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(C.QJsonArray__const_iterator_new2(array.cPointer(), (C.ptrdiff_t)(index))) ret.isSubclass = true return ret } // NewQJsonArray__const_iterator3 constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator3(o *QJsonArray__iterator) *QJsonArray__const_iterator { - var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil - C.QJsonArray__const_iterator_new3(o.cPointer(), &outptr_QJsonArray__const_iterator) - ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(C.QJsonArray__const_iterator_new3(o.cPointer())) ret.isSubclass = true return ret } // NewQJsonArray__const_iterator4 constructs a new QJsonArray::const_iterator object. func NewQJsonArray__const_iterator4(other *QJsonArray__const_iterator) *QJsonArray__const_iterator { - var outptr_QJsonArray__const_iterator *C.QJsonArray__const_iterator = nil - C.QJsonArray__const_iterator_new4(other.cPointer(), &outptr_QJsonArray__const_iterator) - ret := newQJsonArray__const_iterator(outptr_QJsonArray__const_iterator) + ret := newQJsonArray__const_iterator(C.QJsonArray__const_iterator_new4(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qjsonarray.h b/qt6/gen_qjsonarray.h index eea094ba..772dc257 100644 --- a/qt6/gen_qjsonarray.h +++ b/qt6/gen_qjsonarray.h @@ -38,8 +38,8 @@ typedef struct QJsonValueConstRef QJsonValueConstRef; typedef struct QJsonValueRef QJsonValueRef; #endif -void QJsonArray_new(QJsonArray** outptr_QJsonArray); -void QJsonArray_new2(QJsonArray* other, QJsonArray** outptr_QJsonArray); +QJsonArray* QJsonArray_new(); +QJsonArray* QJsonArray_new2(QJsonArray* other); void QJsonArray_OperatorAssign(QJsonArray* self, QJsonArray* other); QJsonArray* QJsonArray_FromStringList(struct miqt_array /* of struct miqt_string */ list); ptrdiff_t QJsonArray_Size(const QJsonArray* self); @@ -82,9 +82,9 @@ void QJsonArray_PopBack(QJsonArray* self); bool QJsonArray_Empty(const QJsonArray* self); void QJsonArray_Delete(QJsonArray* self, bool isSubclass); -void QJsonArray__iterator_new(QJsonArray__iterator** outptr_QJsonArray__iterator); -void QJsonArray__iterator_new2(QJsonArray* array, ptrdiff_t index, QJsonArray__iterator** outptr_QJsonArray__iterator); -void QJsonArray__iterator_new3(QJsonArray__iterator* other, QJsonArray__iterator** outptr_QJsonArray__iterator); +QJsonArray__iterator* QJsonArray__iterator_new(); +QJsonArray__iterator* QJsonArray__iterator_new2(QJsonArray* array, ptrdiff_t index); +QJsonArray__iterator* QJsonArray__iterator_new3(QJsonArray__iterator* other); void QJsonArray__iterator_OperatorAssign(QJsonArray__iterator* self, QJsonArray__iterator* other); QJsonValueRef* QJsonArray__iterator_OperatorMultiply(const QJsonArray__iterator* self); QJsonValueConstRef* QJsonArray__iterator_OperatorMinusGreater(const QJsonArray__iterator* self); @@ -113,10 +113,10 @@ QJsonArray__iterator* QJsonArray__iterator_OperatorMinus(const QJsonArray__itera ptrdiff_t QJsonArray__iterator_OperatorMinusWithQJsonArrayiterator(const QJsonArray__iterator* self, QJsonArray__iterator* j); void QJsonArray__iterator_Delete(QJsonArray__iterator* self, bool isSubclass); -void QJsonArray__const_iterator_new(QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); -void QJsonArray__const_iterator_new2(QJsonArray* array, ptrdiff_t index, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); -void QJsonArray__const_iterator_new3(QJsonArray__iterator* o, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); -void QJsonArray__const_iterator_new4(QJsonArray__const_iterator* other, QJsonArray__const_iterator** outptr_QJsonArray__const_iterator); +QJsonArray__const_iterator* QJsonArray__const_iterator_new(); +QJsonArray__const_iterator* QJsonArray__const_iterator_new2(QJsonArray* array, ptrdiff_t index); +QJsonArray__const_iterator* QJsonArray__const_iterator_new3(QJsonArray__iterator* o); +QJsonArray__const_iterator* QJsonArray__const_iterator_new4(QJsonArray__const_iterator* other); void QJsonArray__const_iterator_OperatorAssign(QJsonArray__const_iterator* self, QJsonArray__const_iterator* other); QJsonValueConstRef* QJsonArray__const_iterator_OperatorMultiply(const QJsonArray__const_iterator* self); QJsonValueConstRef* QJsonArray__const_iterator_OperatorMinusGreater(const QJsonArray__const_iterator* self); diff --git a/qt6/gen_qjsondocument.cpp b/qt6/gen_qjsondocument.cpp index 2d09c78f..5b4c6434 100644 --- a/qt6/gen_qjsondocument.cpp +++ b/qt6/gen_qjsondocument.cpp @@ -31,24 +31,20 @@ void QJsonParseError_Delete(QJsonParseError* self, bool isSubclass) { } } -void QJsonDocument_new(QJsonDocument** outptr_QJsonDocument) { - QJsonDocument* ret = new QJsonDocument(); - *outptr_QJsonDocument = ret; +QJsonDocument* QJsonDocument_new() { + return new QJsonDocument(); } -void QJsonDocument_new2(QJsonObject* object, QJsonDocument** outptr_QJsonDocument) { - QJsonDocument* ret = new QJsonDocument(*object); - *outptr_QJsonDocument = ret; +QJsonDocument* QJsonDocument_new2(QJsonObject* object) { + return new QJsonDocument(*object); } -void QJsonDocument_new3(QJsonArray* array, QJsonDocument** outptr_QJsonDocument) { - QJsonDocument* ret = new QJsonDocument(*array); - *outptr_QJsonDocument = ret; +QJsonDocument* QJsonDocument_new3(QJsonArray* array) { + return new QJsonDocument(*array); } -void QJsonDocument_new4(QJsonDocument* other, QJsonDocument** outptr_QJsonDocument) { - QJsonDocument* ret = new QJsonDocument(*other); - *outptr_QJsonDocument = ret; +QJsonDocument* QJsonDocument_new4(QJsonDocument* other) { + return new QJsonDocument(*other); } void QJsonDocument_OperatorAssign(QJsonDocument* self, QJsonDocument* other) { diff --git a/qt6/gen_qjsondocument.go b/qt6/gen_qjsondocument.go index 293374ea..9c4977df 100644 --- a/qt6/gen_qjsondocument.go +++ b/qt6/gen_qjsondocument.go @@ -64,16 +64,13 @@ func newQJsonParseError(h *C.QJsonParseError) *QJsonParseError { if h == nil { return nil } + return &QJsonParseError{h: h} } // UnsafeNewQJsonParseError constructs the type using only unsafe pointers. func UnsafeNewQJsonParseError(h unsafe.Pointer) *QJsonParseError { - if h == nil { - return nil - } - - return &QJsonParseError{h: (*C.QJsonParseError)(h)} + return newQJsonParseError((*C.QJsonParseError)(h)) } func (this *QJsonParseError) ErrorString() string { @@ -121,54 +118,43 @@ func newQJsonDocument(h *C.QJsonDocument) *QJsonDocument { if h == nil { return nil } + return &QJsonDocument{h: h} } // UnsafeNewQJsonDocument constructs the type using only unsafe pointers. func UnsafeNewQJsonDocument(h unsafe.Pointer) *QJsonDocument { - if h == nil { - return nil - } - - return &QJsonDocument{h: (*C.QJsonDocument)(h)} + return newQJsonDocument((*C.QJsonDocument)(h)) } // NewQJsonDocument constructs a new QJsonDocument object. func NewQJsonDocument() *QJsonDocument { - var outptr_QJsonDocument *C.QJsonDocument = nil - C.QJsonDocument_new(&outptr_QJsonDocument) - ret := newQJsonDocument(outptr_QJsonDocument) + ret := newQJsonDocument(C.QJsonDocument_new()) ret.isSubclass = true return ret } // NewQJsonDocument2 constructs a new QJsonDocument object. func NewQJsonDocument2(object *QJsonObject) *QJsonDocument { - var outptr_QJsonDocument *C.QJsonDocument = nil - C.QJsonDocument_new2(object.cPointer(), &outptr_QJsonDocument) - ret := newQJsonDocument(outptr_QJsonDocument) + ret := newQJsonDocument(C.QJsonDocument_new2(object.cPointer())) ret.isSubclass = true return ret } // NewQJsonDocument3 constructs a new QJsonDocument object. func NewQJsonDocument3(array *QJsonArray) *QJsonDocument { - var outptr_QJsonDocument *C.QJsonDocument = nil - C.QJsonDocument_new3(array.cPointer(), &outptr_QJsonDocument) - ret := newQJsonDocument(outptr_QJsonDocument) + ret := newQJsonDocument(C.QJsonDocument_new3(array.cPointer())) ret.isSubclass = true return ret } // NewQJsonDocument4 constructs a new QJsonDocument object. func NewQJsonDocument4(other *QJsonDocument) *QJsonDocument { - var outptr_QJsonDocument *C.QJsonDocument = nil - C.QJsonDocument_new4(other.cPointer(), &outptr_QJsonDocument) - ret := newQJsonDocument(outptr_QJsonDocument) + ret := newQJsonDocument(C.QJsonDocument_new4(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qjsondocument.h b/qt6/gen_qjsondocument.h index 20c30328..676bf42f 100644 --- a/qt6/gen_qjsondocument.h +++ b/qt6/gen_qjsondocument.h @@ -33,10 +33,10 @@ typedef struct QVariant QVariant; struct miqt_string QJsonParseError_ErrorString(const QJsonParseError* self); void QJsonParseError_Delete(QJsonParseError* self, bool isSubclass); -void QJsonDocument_new(QJsonDocument** outptr_QJsonDocument); -void QJsonDocument_new2(QJsonObject* object, QJsonDocument** outptr_QJsonDocument); -void QJsonDocument_new3(QJsonArray* array, QJsonDocument** outptr_QJsonDocument); -void QJsonDocument_new4(QJsonDocument* other, QJsonDocument** outptr_QJsonDocument); +QJsonDocument* QJsonDocument_new(); +QJsonDocument* QJsonDocument_new2(QJsonObject* object); +QJsonDocument* QJsonDocument_new3(QJsonArray* array); +QJsonDocument* QJsonDocument_new4(QJsonDocument* other); void QJsonDocument_OperatorAssign(QJsonDocument* self, QJsonDocument* other); void QJsonDocument_Swap(QJsonDocument* self, QJsonDocument* other); QJsonDocument* QJsonDocument_FromVariant(QVariant* variant); diff --git a/qt6/gen_qjsonobject.cpp b/qt6/gen_qjsonobject.cpp index 80e15f32..a8ec913c 100644 --- a/qt6/gen_qjsonobject.cpp +++ b/qt6/gen_qjsonobject.cpp @@ -14,14 +14,12 @@ #include "gen_qjsonobject.h" #include "_cgo_export.h" -void QJsonObject_new(QJsonObject** outptr_QJsonObject) { - QJsonObject* ret = new QJsonObject(); - *outptr_QJsonObject = ret; +QJsonObject* QJsonObject_new() { + return new QJsonObject(); } -void QJsonObject_new2(QJsonObject* other, QJsonObject** outptr_QJsonObject) { - QJsonObject* ret = new QJsonObject(*other); - *outptr_QJsonObject = ret; +QJsonObject* QJsonObject_new2(QJsonObject* other) { + return new QJsonObject(*other); } void QJsonObject_OperatorAssign(QJsonObject* self, QJsonObject* other) { @@ -242,19 +240,16 @@ void QJsonObject_Delete(QJsonObject* self, bool isSubclass) { } } -void QJsonObject__iterator_new(QJsonObject__iterator** outptr_QJsonObject__iterator) { - QJsonObject::iterator* ret = new QJsonObject::iterator(); - *outptr_QJsonObject__iterator = ret; +QJsonObject__iterator* QJsonObject__iterator_new() { + return new QJsonObject::iterator(); } -void QJsonObject__iterator_new2(QJsonObject* obj, ptrdiff_t index, QJsonObject__iterator** outptr_QJsonObject__iterator) { - QJsonObject::iterator* ret = new QJsonObject::iterator(obj, (qsizetype)(index)); - *outptr_QJsonObject__iterator = ret; +QJsonObject__iterator* QJsonObject__iterator_new2(QJsonObject* obj, ptrdiff_t index) { + return new QJsonObject::iterator(obj, (qsizetype)(index)); } -void QJsonObject__iterator_new3(QJsonObject__iterator* other, QJsonObject__iterator** outptr_QJsonObject__iterator) { - QJsonObject::iterator* ret = new QJsonObject::iterator(*other); - *outptr_QJsonObject__iterator = ret; +QJsonObject__iterator* QJsonObject__iterator_new3(QJsonObject__iterator* other) { + return new QJsonObject::iterator(*other); } void QJsonObject__iterator_OperatorAssign(QJsonObject__iterator* self, QJsonObject__iterator* other) { @@ -393,24 +388,20 @@ void QJsonObject__iterator_Delete(QJsonObject__iterator* self, bool isSubclass) } } -void QJsonObject__const_iterator_new(QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { - QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(); - *outptr_QJsonObject__const_iterator = ret; +QJsonObject__const_iterator* QJsonObject__const_iterator_new() { + return new QJsonObject::const_iterator(); } -void QJsonObject__const_iterator_new2(QJsonObject* obj, ptrdiff_t index, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { - QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(obj, (qsizetype)(index)); - *outptr_QJsonObject__const_iterator = ret; +QJsonObject__const_iterator* QJsonObject__const_iterator_new2(QJsonObject* obj, ptrdiff_t index) { + return new QJsonObject::const_iterator(obj, (qsizetype)(index)); } -void QJsonObject__const_iterator_new3(QJsonObject__iterator* other, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { - QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(*other); - *outptr_QJsonObject__const_iterator = ret; +QJsonObject__const_iterator* QJsonObject__const_iterator_new3(QJsonObject__iterator* other) { + return new QJsonObject::const_iterator(*other); } -void QJsonObject__const_iterator_new4(QJsonObject__const_iterator* other, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator) { - QJsonObject::const_iterator* ret = new QJsonObject::const_iterator(*other); - *outptr_QJsonObject__const_iterator = ret; +QJsonObject__const_iterator* QJsonObject__const_iterator_new4(QJsonObject__const_iterator* other) { + return new QJsonObject::const_iterator(*other); } void QJsonObject__const_iterator_OperatorAssign(QJsonObject__const_iterator* self, QJsonObject__const_iterator* other) { diff --git a/qt6/gen_qjsonobject.go b/qt6/gen_qjsonobject.go index 116f4f49..3f3513e5 100644 --- a/qt6/gen_qjsonobject.go +++ b/qt6/gen_qjsonobject.go @@ -37,34 +37,27 @@ func newQJsonObject(h *C.QJsonObject) *QJsonObject { if h == nil { return nil } + return &QJsonObject{h: h} } // UnsafeNewQJsonObject constructs the type using only unsafe pointers. func UnsafeNewQJsonObject(h unsafe.Pointer) *QJsonObject { - if h == nil { - return nil - } - - return &QJsonObject{h: (*C.QJsonObject)(h)} + return newQJsonObject((*C.QJsonObject)(h)) } // NewQJsonObject constructs a new QJsonObject object. func NewQJsonObject() *QJsonObject { - var outptr_QJsonObject *C.QJsonObject = nil - C.QJsonObject_new(&outptr_QJsonObject) - ret := newQJsonObject(outptr_QJsonObject) + ret := newQJsonObject(C.QJsonObject_new()) ret.isSubclass = true return ret } // NewQJsonObject2 constructs a new QJsonObject object. func NewQJsonObject2(other *QJsonObject) *QJsonObject { - var outptr_QJsonObject *C.QJsonObject = nil - C.QJsonObject_new2(other.cPointer(), &outptr_QJsonObject) - ret := newQJsonObject(outptr_QJsonObject) + ret := newQJsonObject(C.QJsonObject_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -219,7 +212,7 @@ func (this *QJsonObject) OperatorSubscriptWithKey(key string) *QJsonValueRef { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - _goptr := newQJsonValueRef(C.QJsonObject_OperatorSubscriptWithKey(this.h, key_ms), nil) + _goptr := newQJsonValueRef(C.QJsonObject_OperatorSubscriptWithKey(this.h, key_ms)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -382,44 +375,35 @@ func newQJsonObject__iterator(h *C.QJsonObject__iterator) *QJsonObject__iterator if h == nil { return nil } + return &QJsonObject__iterator{h: h} } // UnsafeNewQJsonObject__iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonObject__iterator(h unsafe.Pointer) *QJsonObject__iterator { - if h == nil { - return nil - } - - return &QJsonObject__iterator{h: (*C.QJsonObject__iterator)(h)} + return newQJsonObject__iterator((*C.QJsonObject__iterator)(h)) } // NewQJsonObject__iterator constructs a new QJsonObject::iterator object. func NewQJsonObject__iterator() *QJsonObject__iterator { - var outptr_QJsonObject__iterator *C.QJsonObject__iterator = nil - C.QJsonObject__iterator_new(&outptr_QJsonObject__iterator) - ret := newQJsonObject__iterator(outptr_QJsonObject__iterator) + ret := newQJsonObject__iterator(C.QJsonObject__iterator_new()) ret.isSubclass = true return ret } // NewQJsonObject__iterator2 constructs a new QJsonObject::iterator object. func NewQJsonObject__iterator2(obj *QJsonObject, index int64) *QJsonObject__iterator { - var outptr_QJsonObject__iterator *C.QJsonObject__iterator = nil - C.QJsonObject__iterator_new2(obj.cPointer(), (C.ptrdiff_t)(index), &outptr_QJsonObject__iterator) - ret := newQJsonObject__iterator(outptr_QJsonObject__iterator) + ret := newQJsonObject__iterator(C.QJsonObject__iterator_new2(obj.cPointer(), (C.ptrdiff_t)(index))) ret.isSubclass = true return ret } // NewQJsonObject__iterator3 constructs a new QJsonObject::iterator object. func NewQJsonObject__iterator3(other *QJsonObject__iterator) *QJsonObject__iterator { - var outptr_QJsonObject__iterator *C.QJsonObject__iterator = nil - C.QJsonObject__iterator_new3(other.cPointer(), &outptr_QJsonObject__iterator) - ret := newQJsonObject__iterator(outptr_QJsonObject__iterator) + ret := newQJsonObject__iterator(C.QJsonObject__iterator_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -436,13 +420,13 @@ func (this *QJsonObject__iterator) Key() string { } func (this *QJsonObject__iterator) Value() *QJsonValueRef { - _goptr := newQJsonValueRef(C.QJsonObject__iterator_Value(this.h), nil) + _goptr := newQJsonValueRef(C.QJsonObject__iterator_Value(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QJsonObject__iterator) OperatorMultiply() *QJsonValueRef { - _goptr := newQJsonValueRef(C.QJsonObject__iterator_OperatorMultiply(this.h), nil) + _goptr := newQJsonValueRef(C.QJsonObject__iterator_OperatorMultiply(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -452,11 +436,11 @@ func (this *QJsonObject__iterator) OperatorMinusGreater() *QJsonValueConstRef { } func (this *QJsonObject__iterator) OperatorMinusGreater2() *QJsonValueRef { - return newQJsonValueRef(C.QJsonObject__iterator_OperatorMinusGreater2(this.h), nil) + return newQJsonValueRef(C.QJsonObject__iterator_OperatorMinusGreater2(this.h)) } func (this *QJsonObject__iterator) OperatorSubscript(j int64) *QJsonValueRef { - _goptr := newQJsonValueRef(C.QJsonObject__iterator_OperatorSubscript(this.h, (C.ptrdiff_t)(j)), nil) + _goptr := newQJsonValueRef(C.QJsonObject__iterator_OperatorSubscript(this.h, (C.ptrdiff_t)(j))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -591,54 +575,43 @@ func newQJsonObject__const_iterator(h *C.QJsonObject__const_iterator) *QJsonObje if h == nil { return nil } + return &QJsonObject__const_iterator{h: h} } // UnsafeNewQJsonObject__const_iterator constructs the type using only unsafe pointers. func UnsafeNewQJsonObject__const_iterator(h unsafe.Pointer) *QJsonObject__const_iterator { - if h == nil { - return nil - } - - return &QJsonObject__const_iterator{h: (*C.QJsonObject__const_iterator)(h)} + return newQJsonObject__const_iterator((*C.QJsonObject__const_iterator)(h)) } // NewQJsonObject__const_iterator constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator() *QJsonObject__const_iterator { - var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil - C.QJsonObject__const_iterator_new(&outptr_QJsonObject__const_iterator) - ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(C.QJsonObject__const_iterator_new()) ret.isSubclass = true return ret } // NewQJsonObject__const_iterator2 constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator2(obj *QJsonObject, index int64) *QJsonObject__const_iterator { - var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil - C.QJsonObject__const_iterator_new2(obj.cPointer(), (C.ptrdiff_t)(index), &outptr_QJsonObject__const_iterator) - ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(C.QJsonObject__const_iterator_new2(obj.cPointer(), (C.ptrdiff_t)(index))) ret.isSubclass = true return ret } // NewQJsonObject__const_iterator3 constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator3(other *QJsonObject__iterator) *QJsonObject__const_iterator { - var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil - C.QJsonObject__const_iterator_new3(other.cPointer(), &outptr_QJsonObject__const_iterator) - ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(C.QJsonObject__const_iterator_new3(other.cPointer())) ret.isSubclass = true return ret } // NewQJsonObject__const_iterator4 constructs a new QJsonObject::const_iterator object. func NewQJsonObject__const_iterator4(other *QJsonObject__const_iterator) *QJsonObject__const_iterator { - var outptr_QJsonObject__const_iterator *C.QJsonObject__const_iterator = nil - C.QJsonObject__const_iterator_new4(other.cPointer(), &outptr_QJsonObject__const_iterator) - ret := newQJsonObject__const_iterator(outptr_QJsonObject__const_iterator) + ret := newQJsonObject__const_iterator(C.QJsonObject__const_iterator_new4(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qjsonobject.h b/qt6/gen_qjsonobject.h index 471c1cc0..3ba3a4cc 100644 --- a/qt6/gen_qjsonobject.h +++ b/qt6/gen_qjsonobject.h @@ -40,8 +40,8 @@ typedef struct QJsonValueRef QJsonValueRef; typedef struct QVariant QVariant; #endif -void QJsonObject_new(QJsonObject** outptr_QJsonObject); -void QJsonObject_new2(QJsonObject* other, QJsonObject** outptr_QJsonObject); +QJsonObject* QJsonObject_new(); +QJsonObject* QJsonObject_new2(QJsonObject* other); void QJsonObject_OperatorAssign(QJsonObject* self, QJsonObject* other); void QJsonObject_Swap(QJsonObject* self, QJsonObject* other); QJsonObject* QJsonObject_FromVariantMap(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal); @@ -75,9 +75,9 @@ QJsonObject__iterator* QJsonObject_Insert(QJsonObject* self, struct miqt_string bool QJsonObject_Empty(const QJsonObject* self); void QJsonObject_Delete(QJsonObject* self, bool isSubclass); -void QJsonObject__iterator_new(QJsonObject__iterator** outptr_QJsonObject__iterator); -void QJsonObject__iterator_new2(QJsonObject* obj, ptrdiff_t index, QJsonObject__iterator** outptr_QJsonObject__iterator); -void QJsonObject__iterator_new3(QJsonObject__iterator* other, QJsonObject__iterator** outptr_QJsonObject__iterator); +QJsonObject__iterator* QJsonObject__iterator_new(); +QJsonObject__iterator* QJsonObject__iterator_new2(QJsonObject* obj, ptrdiff_t index); +QJsonObject__iterator* QJsonObject__iterator_new3(QJsonObject__iterator* other); void QJsonObject__iterator_OperatorAssign(QJsonObject__iterator* self, QJsonObject__iterator* other); struct miqt_string QJsonObject__iterator_Key(const QJsonObject__iterator* self); QJsonValueRef* QJsonObject__iterator_Value(const QJsonObject__iterator* self); @@ -108,10 +108,10 @@ bool QJsonObject__iterator_OperatorGreaterWithOther(const QJsonObject__iterator* bool QJsonObject__iterator_OperatorGreaterOrEqualWithOther(const QJsonObject__iterator* self, QJsonObject__const_iterator* other); void QJsonObject__iterator_Delete(QJsonObject__iterator* self, bool isSubclass); -void QJsonObject__const_iterator_new(QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); -void QJsonObject__const_iterator_new2(QJsonObject* obj, ptrdiff_t index, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); -void QJsonObject__const_iterator_new3(QJsonObject__iterator* other, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); -void QJsonObject__const_iterator_new4(QJsonObject__const_iterator* other, QJsonObject__const_iterator** outptr_QJsonObject__const_iterator); +QJsonObject__const_iterator* QJsonObject__const_iterator_new(); +QJsonObject__const_iterator* QJsonObject__const_iterator_new2(QJsonObject* obj, ptrdiff_t index); +QJsonObject__const_iterator* QJsonObject__const_iterator_new3(QJsonObject__iterator* other); +QJsonObject__const_iterator* QJsonObject__const_iterator_new4(QJsonObject__const_iterator* other); void QJsonObject__const_iterator_OperatorAssign(QJsonObject__const_iterator* self, QJsonObject__const_iterator* other); struct miqt_string QJsonObject__const_iterator_Key(const QJsonObject__const_iterator* self); QJsonValueConstRef* QJsonObject__const_iterator_Value(const QJsonObject__const_iterator* self); diff --git a/qt6/gen_qjsonvalue.cpp b/qt6/gen_qjsonvalue.cpp index 516143d4..c4723de8 100644 --- a/qt6/gen_qjsonvalue.cpp +++ b/qt6/gen_qjsonvalue.cpp @@ -11,60 +11,49 @@ #include "gen_qjsonvalue.h" #include "_cgo_export.h" -void QJsonValue_new(QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new() { + return new QJsonValue(); } -void QJsonValue_new2(bool b, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(b); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new2(bool b) { + return new QJsonValue(b); } -void QJsonValue_new3(double n, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(static_cast(n)); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new3(double n) { + return new QJsonValue(static_cast(n)); } -void QJsonValue_new4(int n, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(static_cast(n)); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new4(int n) { + return new QJsonValue(static_cast(n)); } -void QJsonValue_new5(long long v, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(static_cast(v)); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new5(long long v) { + return new QJsonValue(static_cast(v)); } -void QJsonValue_new6(struct miqt_string s, QJsonValue** outptr_QJsonValue) { +QJsonValue* QJsonValue_new6(struct miqt_string s) { QString s_QString = QString::fromUtf8(s.data, s.len); - QJsonValue* ret = new QJsonValue(s_QString); - *outptr_QJsonValue = ret; + return new QJsonValue(s_QString); } -void QJsonValue_new7(const char* s, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(s); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new7(const char* s) { + return new QJsonValue(s); } -void QJsonValue_new8(QJsonArray* a, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(*a); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new8(QJsonArray* a) { + return new QJsonValue(*a); } -void QJsonValue_new9(QJsonObject* o, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(*o); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new9(QJsonObject* o) { + return new QJsonValue(*o); } -void QJsonValue_new10(QJsonValue* other, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(*other); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new10(QJsonValue* other) { + return new QJsonValue(*other); } -void QJsonValue_new11(int param1, QJsonValue** outptr_QJsonValue) { - QJsonValue* ret = new QJsonValue(static_cast(param1)); - *outptr_QJsonValue = ret; +QJsonValue* QJsonValue_new11(int param1) { + return new QJsonValue(static_cast(param1)); } void QJsonValue_OperatorAssign(QJsonValue* self, QJsonValue* other) { @@ -214,9 +203,8 @@ void QJsonValue_Delete(QJsonValue* self, bool isSubclass) { } } -void QJsonValueConstRef_new(QJsonValueConstRef* param1, QJsonValueConstRef** outptr_QJsonValueConstRef) { - QJsonValueConstRef* ret = new QJsonValueConstRef(*param1); - *outptr_QJsonValueConstRef = ret; +QJsonValueConstRef* QJsonValueConstRef_new(QJsonValueConstRef* param1) { + return new QJsonValueConstRef(*param1); } QVariant* QJsonValueConstRef_ToVariant(const QJsonValueConstRef* self) { @@ -341,22 +329,20 @@ void QJsonValueConstRef_Delete(QJsonValueConstRef* self, bool isSubclass) { } } -void QJsonValueRef_new(QJsonValueRef* param1, QJsonValueRef** outptr_QJsonValueRef, QJsonValueConstRef** outptr_QJsonValueConstRef) { - QJsonValueRef* ret = new QJsonValueRef(*param1); - *outptr_QJsonValueRef = ret; - *outptr_QJsonValueConstRef = static_cast(ret); +QJsonValueRef* QJsonValueRef_new(QJsonValueRef* param1) { + return new QJsonValueRef(*param1); } -void QJsonValueRef_new2(QJsonArray* array, ptrdiff_t idx, QJsonValueRef** outptr_QJsonValueRef, QJsonValueConstRef** outptr_QJsonValueConstRef) { - QJsonValueRef* ret = new QJsonValueRef(array, (qsizetype)(idx)); - *outptr_QJsonValueRef = ret; - *outptr_QJsonValueConstRef = static_cast(ret); +QJsonValueRef* QJsonValueRef_new2(QJsonArray* array, ptrdiff_t idx) { + return new QJsonValueRef(array, (qsizetype)(idx)); } -void QJsonValueRef_new3(QJsonObject* object, ptrdiff_t idx, QJsonValueRef** outptr_QJsonValueRef, QJsonValueConstRef** outptr_QJsonValueConstRef) { - QJsonValueRef* ret = new QJsonValueRef(object, (qsizetype)(idx)); - *outptr_QJsonValueRef = ret; - *outptr_QJsonValueConstRef = static_cast(ret); +QJsonValueRef* QJsonValueRef_new3(QJsonObject* object, ptrdiff_t idx) { + return new QJsonValueRef(object, (qsizetype)(idx)); +} + +void QJsonValueRef_virtbase(QJsonValueRef* src, QJsonValueConstRef** outptr_QJsonValueConstRef) { + *outptr_QJsonValueConstRef = static_cast(src); } void QJsonValueRef_OperatorAssign(QJsonValueRef* self, QJsonValue* val) { diff --git a/qt6/gen_qjsonvalue.go b/qt6/gen_qjsonvalue.go index 8f419214..e89874ac 100644 --- a/qt6/gen_qjsonvalue.go +++ b/qt6/gen_qjsonvalue.go @@ -49,64 +49,51 @@ func newQJsonValue(h *C.QJsonValue) *QJsonValue { if h == nil { return nil } + return &QJsonValue{h: h} } // UnsafeNewQJsonValue constructs the type using only unsafe pointers. func UnsafeNewQJsonValue(h unsafe.Pointer) *QJsonValue { - if h == nil { - return nil - } - - return &QJsonValue{h: (*C.QJsonValue)(h)} + return newQJsonValue((*C.QJsonValue)(h)) } // NewQJsonValue constructs a new QJsonValue object. func NewQJsonValue() *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new(&outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new()) ret.isSubclass = true return ret } // NewQJsonValue2 constructs a new QJsonValue object. func NewQJsonValue2(b bool) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new2((C.bool)(b), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new2((C.bool)(b))) ret.isSubclass = true return ret } // NewQJsonValue3 constructs a new QJsonValue object. func NewQJsonValue3(n float64) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new3((C.double)(n), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new3((C.double)(n))) ret.isSubclass = true return ret } // NewQJsonValue4 constructs a new QJsonValue object. func NewQJsonValue4(n int) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new4((C.int)(n), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new4((C.int)(n))) ret.isSubclass = true return ret } // NewQJsonValue5 constructs a new QJsonValue object. func NewQJsonValue5(v int64) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new5((C.longlong)(v), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new5((C.longlong)(v))) ret.isSubclass = true return ret } @@ -117,10 +104,8 @@ func NewQJsonValue6(s string) *QJsonValue { s_ms.data = C.CString(s) s_ms.len = C.size_t(len(s)) defer C.free(unsafe.Pointer(s_ms.data)) - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new6(s_ms, &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new6(s_ms)) ret.isSubclass = true return ret } @@ -129,50 +114,40 @@ func NewQJsonValue6(s string) *QJsonValue { func NewQJsonValue7(s string) *QJsonValue { s_Cstring := C.CString(s) defer C.free(unsafe.Pointer(s_Cstring)) - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new7(s_Cstring, &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new7(s_Cstring)) ret.isSubclass = true return ret } // NewQJsonValue8 constructs a new QJsonValue object. func NewQJsonValue8(a *QJsonArray) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new8(a.cPointer(), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new8(a.cPointer())) ret.isSubclass = true return ret } // NewQJsonValue9 constructs a new QJsonValue object. func NewQJsonValue9(o *QJsonObject) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new9(o.cPointer(), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new9(o.cPointer())) ret.isSubclass = true return ret } // NewQJsonValue10 constructs a new QJsonValue object. func NewQJsonValue10(other *QJsonValue) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new10(other.cPointer(), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new10(other.cPointer())) ret.isSubclass = true return ret } // NewQJsonValue11 constructs a new QJsonValue object. func NewQJsonValue11(param1 QJsonValue__Type) *QJsonValue { - var outptr_QJsonValue *C.QJsonValue = nil - C.QJsonValue_new11((C.int)(param1), &outptr_QJsonValue) - ret := newQJsonValue(outptr_QJsonValue) + ret := newQJsonValue(C.QJsonValue_new11((C.int)(param1))) ret.isSubclass = true return ret } @@ -365,24 +340,19 @@ func newQJsonValueConstRef(h *C.QJsonValueConstRef) *QJsonValueConstRef { if h == nil { return nil } + return &QJsonValueConstRef{h: h} } // UnsafeNewQJsonValueConstRef constructs the type using only unsafe pointers. func UnsafeNewQJsonValueConstRef(h unsafe.Pointer) *QJsonValueConstRef { - if h == nil { - return nil - } - - return &QJsonValueConstRef{h: (*C.QJsonValueConstRef)(h)} + return newQJsonValueConstRef((*C.QJsonValueConstRef)(h)) } // NewQJsonValueConstRef constructs a new QJsonValueConstRef object. func NewQJsonValueConstRef(param1 *QJsonValueConstRef) *QJsonValueConstRef { - var outptr_QJsonValueConstRef *C.QJsonValueConstRef = nil - C.QJsonValueConstRef_new(param1.cPointer(), &outptr_QJsonValueConstRef) - ret := newQJsonValueConstRef(outptr_QJsonValueConstRef) + ret := newQJsonValueConstRef(C.QJsonValueConstRef_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -536,53 +506,42 @@ func (this *QJsonValueRef) UnsafePointer() unsafe.Pointer { } // newQJsonValueRef constructs the type using only CGO pointers. -func newQJsonValueRef(h *C.QJsonValueRef, h_QJsonValueConstRef *C.QJsonValueConstRef) *QJsonValueRef { +func newQJsonValueRef(h *C.QJsonValueRef) *QJsonValueRef { if h == nil { return nil } + var outptr_QJsonValueConstRef *C.QJsonValueConstRef = nil + C.QJsonValueRef_virtbase(h, &outptr_QJsonValueConstRef) + return &QJsonValueRef{h: h, - QJsonValueConstRef: newQJsonValueConstRef(h_QJsonValueConstRef)} + QJsonValueConstRef: newQJsonValueConstRef(outptr_QJsonValueConstRef)} } // UnsafeNewQJsonValueRef constructs the type using only unsafe pointers. -func UnsafeNewQJsonValueRef(h unsafe.Pointer, h_QJsonValueConstRef unsafe.Pointer) *QJsonValueRef { - if h == nil { - return nil - } - - return &QJsonValueRef{h: (*C.QJsonValueRef)(h), - QJsonValueConstRef: UnsafeNewQJsonValueConstRef(h_QJsonValueConstRef)} +func UnsafeNewQJsonValueRef(h unsafe.Pointer) *QJsonValueRef { + return newQJsonValueRef((*C.QJsonValueRef)(h)) } // NewQJsonValueRef constructs a new QJsonValueRef object. func NewQJsonValueRef(param1 *QJsonValueRef) *QJsonValueRef { - var outptr_QJsonValueRef *C.QJsonValueRef = nil - var outptr_QJsonValueConstRef *C.QJsonValueConstRef = nil - C.QJsonValueRef_new(param1.cPointer(), &outptr_QJsonValueRef, &outptr_QJsonValueConstRef) - ret := newQJsonValueRef(outptr_QJsonValueRef, outptr_QJsonValueConstRef) + ret := newQJsonValueRef(C.QJsonValueRef_new(param1.cPointer())) ret.isSubclass = true return ret } // NewQJsonValueRef2 constructs a new QJsonValueRef object. func NewQJsonValueRef2(array *QJsonArray, idx int64) *QJsonValueRef { - var outptr_QJsonValueRef *C.QJsonValueRef = nil - var outptr_QJsonValueConstRef *C.QJsonValueConstRef = nil - C.QJsonValueRef_new2(array.cPointer(), (C.ptrdiff_t)(idx), &outptr_QJsonValueRef, &outptr_QJsonValueConstRef) - ret := newQJsonValueRef(outptr_QJsonValueRef, outptr_QJsonValueConstRef) + ret := newQJsonValueRef(C.QJsonValueRef_new2(array.cPointer(), (C.ptrdiff_t)(idx))) ret.isSubclass = true return ret } // NewQJsonValueRef3 constructs a new QJsonValueRef object. func NewQJsonValueRef3(object *QJsonObject, idx int64) *QJsonValueRef { - var outptr_QJsonValueRef *C.QJsonValueRef = nil - var outptr_QJsonValueConstRef *C.QJsonValueConstRef = nil - C.QJsonValueRef_new3(object.cPointer(), (C.ptrdiff_t)(idx), &outptr_QJsonValueRef, &outptr_QJsonValueConstRef) - ret := newQJsonValueRef(outptr_QJsonValueRef, outptr_QJsonValueConstRef) + ret := newQJsonValueRef(C.QJsonValueRef_new3(object.cPointer(), (C.ptrdiff_t)(idx))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qjsonvalue.h b/qt6/gen_qjsonvalue.h index a329d939..cf128e3f 100644 --- a/qt6/gen_qjsonvalue.h +++ b/qt6/gen_qjsonvalue.h @@ -30,17 +30,17 @@ typedef struct QJsonValueRef QJsonValueRef; typedef struct QVariant QVariant; #endif -void QJsonValue_new(QJsonValue** outptr_QJsonValue); -void QJsonValue_new2(bool b, QJsonValue** outptr_QJsonValue); -void QJsonValue_new3(double n, QJsonValue** outptr_QJsonValue); -void QJsonValue_new4(int n, QJsonValue** outptr_QJsonValue); -void QJsonValue_new5(long long v, QJsonValue** outptr_QJsonValue); -void QJsonValue_new6(struct miqt_string s, QJsonValue** outptr_QJsonValue); -void QJsonValue_new7(const char* s, QJsonValue** outptr_QJsonValue); -void QJsonValue_new8(QJsonArray* a, QJsonValue** outptr_QJsonValue); -void QJsonValue_new9(QJsonObject* o, QJsonValue** outptr_QJsonValue); -void QJsonValue_new10(QJsonValue* other, QJsonValue** outptr_QJsonValue); -void QJsonValue_new11(int param1, QJsonValue** outptr_QJsonValue); +QJsonValue* QJsonValue_new(); +QJsonValue* QJsonValue_new2(bool b); +QJsonValue* QJsonValue_new3(double n); +QJsonValue* QJsonValue_new4(int n); +QJsonValue* QJsonValue_new5(long long v); +QJsonValue* QJsonValue_new6(struct miqt_string s); +QJsonValue* QJsonValue_new7(const char* s); +QJsonValue* QJsonValue_new8(QJsonArray* a); +QJsonValue* QJsonValue_new9(QJsonObject* o); +QJsonValue* QJsonValue_new10(QJsonValue* other); +QJsonValue* QJsonValue_new11(int param1); void QJsonValue_OperatorAssign(QJsonValue* self, QJsonValue* other); void QJsonValue_Swap(QJsonValue* self, QJsonValue* other); QJsonValue* QJsonValue_FromVariant(QVariant* variant); @@ -73,7 +73,7 @@ long long QJsonValue_ToInteger1(const QJsonValue* self, long long defaultValue); double QJsonValue_ToDouble1(const QJsonValue* self, double defaultValue); void QJsonValue_Delete(QJsonValue* self, bool isSubclass); -void QJsonValueConstRef_new(QJsonValueConstRef* param1, QJsonValueConstRef** outptr_QJsonValueConstRef); +QJsonValueConstRef* QJsonValueConstRef_new(QJsonValueConstRef* param1); QVariant* QJsonValueConstRef_ToVariant(const QJsonValueConstRef* self); int QJsonValueConstRef_Type(const QJsonValueConstRef* self); bool QJsonValueConstRef_IsNull(const QJsonValueConstRef* self); @@ -100,9 +100,10 @@ double QJsonValueConstRef_ToDouble1(const QJsonValueConstRef* self, double defau struct miqt_string QJsonValueConstRef_ToString1(const QJsonValueConstRef* self, struct miqt_string defaultValue); void QJsonValueConstRef_Delete(QJsonValueConstRef* self, bool isSubclass); -void QJsonValueRef_new(QJsonValueRef* param1, QJsonValueRef** outptr_QJsonValueRef, QJsonValueConstRef** outptr_QJsonValueConstRef); -void QJsonValueRef_new2(QJsonArray* array, ptrdiff_t idx, QJsonValueRef** outptr_QJsonValueRef, QJsonValueConstRef** outptr_QJsonValueConstRef); -void QJsonValueRef_new3(QJsonObject* object, ptrdiff_t idx, QJsonValueRef** outptr_QJsonValueRef, QJsonValueConstRef** outptr_QJsonValueConstRef); +QJsonValueRef* QJsonValueRef_new(QJsonValueRef* param1); +QJsonValueRef* QJsonValueRef_new2(QJsonArray* array, ptrdiff_t idx); +QJsonValueRef* QJsonValueRef_new3(QJsonObject* object, ptrdiff_t idx); +void QJsonValueRef_virtbase(QJsonValueRef* src, QJsonValueConstRef** outptr_QJsonValueConstRef); void QJsonValueRef_OperatorAssign(QJsonValueRef* self, QJsonValue* val); void QJsonValueRef_OperatorAssignWithVal(QJsonValueRef* self, QJsonValueRef* val); QVariant* QJsonValueRef_ToVariant(const QJsonValueRef* self); diff --git a/qt6/gen_qkeysequence.cpp b/qt6/gen_qkeysequence.cpp index 0cd9c130..4b757ee6 100644 --- a/qt6/gen_qkeysequence.cpp +++ b/qt6/gen_qkeysequence.cpp @@ -8,71 +8,58 @@ #include "gen_qkeysequence.h" #include "_cgo_export.h" -void QKeySequence_new(QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new() { + return new QKeySequence(); } -void QKeySequence_new2(struct miqt_string key, QKeySequence** outptr_QKeySequence) { +QKeySequence* QKeySequence_new2(struct miqt_string key) { QString key_QString = QString::fromUtf8(key.data, key.len); - QKeySequence* ret = new QKeySequence(key_QString); - *outptr_QKeySequence = ret; + return new QKeySequence(key_QString); } -void QKeySequence_new3(int k1, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(static_cast(k1)); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new3(int k1) { + return new QKeySequence(static_cast(k1)); } -void QKeySequence_new4(QKeyCombination* k1, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(*k1); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new4(QKeyCombination* k1) { + return new QKeySequence(*k1); } -void QKeySequence_new5(QKeySequence* ks, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(*ks); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new5(QKeySequence* ks) { + return new QKeySequence(*ks); } -void QKeySequence_new6(int key, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(static_cast(key)); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new6(int key) { + return new QKeySequence(static_cast(key)); } -void QKeySequence_new7(struct miqt_string key, int format, QKeySequence** outptr_QKeySequence) { +QKeySequence* QKeySequence_new7(struct miqt_string key, int format) { QString key_QString = QString::fromUtf8(key.data, key.len); - QKeySequence* ret = new QKeySequence(key_QString, static_cast(format)); - *outptr_QKeySequence = ret; + return new QKeySequence(key_QString, static_cast(format)); } -void QKeySequence_new8(int k1, int k2, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(static_cast(k1), static_cast(k2)); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new8(int k1, int k2) { + return new QKeySequence(static_cast(k1), static_cast(k2)); } -void QKeySequence_new9(int k1, int k2, int k3, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3)); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new9(int k1, int k2, int k3) { + return new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3)); } -void QKeySequence_new10(int k1, int k2, int k3, int k4, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3), static_cast(k4)); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new10(int k1, int k2, int k3, int k4) { + return new QKeySequence(static_cast(k1), static_cast(k2), static_cast(k3), static_cast(k4)); } -void QKeySequence_new11(QKeyCombination* k1, QKeyCombination* k2, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(*k1, *k2); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new11(QKeyCombination* k1, QKeyCombination* k2) { + return new QKeySequence(*k1, *k2); } -void QKeySequence_new12(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(*k1, *k2, *k3); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new12(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3) { + return new QKeySequence(*k1, *k2, *k3); } -void QKeySequence_new13(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3, QKeyCombination* k4, QKeySequence** outptr_QKeySequence) { - QKeySequence* ret = new QKeySequence(*k1, *k2, *k3, *k4); - *outptr_QKeySequence = ret; +QKeySequence* QKeySequence_new13(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3, QKeyCombination* k4) { + return new QKeySequence(*k1, *k2, *k3, *k4); } int QKeySequence_Count(const QKeySequence* self) { diff --git a/qt6/gen_qkeysequence.go b/qt6/gen_qkeysequence.go index 94278568..6ec69279 100644 --- a/qt6/gen_qkeysequence.go +++ b/qt6/gen_qkeysequence.go @@ -128,24 +128,19 @@ func newQKeySequence(h *C.QKeySequence) *QKeySequence { if h == nil { return nil } + return &QKeySequence{h: h} } // UnsafeNewQKeySequence constructs the type using only unsafe pointers. func UnsafeNewQKeySequence(h unsafe.Pointer) *QKeySequence { - if h == nil { - return nil - } - - return &QKeySequence{h: (*C.QKeySequence)(h)} + return newQKeySequence((*C.QKeySequence)(h)) } // NewQKeySequence constructs a new QKeySequence object. func NewQKeySequence() *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new(&outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new()) ret.isSubclass = true return ret } @@ -156,50 +151,40 @@ func NewQKeySequence2(key string) *QKeySequence { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new2(key_ms, &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new2(key_ms)) ret.isSubclass = true return ret } // NewQKeySequence3 constructs a new QKeySequence object. func NewQKeySequence3(k1 int) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new3((C.int)(k1), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new3((C.int)(k1))) ret.isSubclass = true return ret } // NewQKeySequence4 constructs a new QKeySequence object. func NewQKeySequence4(k1 QKeyCombination) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new4(k1.cPointer(), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new4(k1.cPointer())) ret.isSubclass = true return ret } // NewQKeySequence5 constructs a new QKeySequence object. func NewQKeySequence5(ks *QKeySequence) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new5(ks.cPointer(), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new5(ks.cPointer())) ret.isSubclass = true return ret } // NewQKeySequence6 constructs a new QKeySequence object. func NewQKeySequence6(key QKeySequence__StandardKey) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new6((C.int)(key), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new6((C.int)(key))) ret.isSubclass = true return ret } @@ -210,70 +195,56 @@ func NewQKeySequence7(key string, format QKeySequence__SequenceFormat) *QKeySequ key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new7(key_ms, (C.int)(format), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new7(key_ms, (C.int)(format))) ret.isSubclass = true return ret } // NewQKeySequence8 constructs a new QKeySequence object. func NewQKeySequence8(k1 int, k2 int) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new8((C.int)(k1), (C.int)(k2), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new8((C.int)(k1), (C.int)(k2))) ret.isSubclass = true return ret } // NewQKeySequence9 constructs a new QKeySequence object. func NewQKeySequence9(k1 int, k2 int, k3 int) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new9((C.int)(k1), (C.int)(k2), (C.int)(k3), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new9((C.int)(k1), (C.int)(k2), (C.int)(k3))) ret.isSubclass = true return ret } // NewQKeySequence10 constructs a new QKeySequence object. func NewQKeySequence10(k1 int, k2 int, k3 int, k4 int) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new10((C.int)(k1), (C.int)(k2), (C.int)(k3), (C.int)(k4), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new10((C.int)(k1), (C.int)(k2), (C.int)(k3), (C.int)(k4))) ret.isSubclass = true return ret } // NewQKeySequence11 constructs a new QKeySequence object. func NewQKeySequence11(k1 QKeyCombination, k2 QKeyCombination) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new11(k1.cPointer(), k2.cPointer(), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new11(k1.cPointer(), k2.cPointer())) ret.isSubclass = true return ret } // NewQKeySequence12 constructs a new QKeySequence object. func NewQKeySequence12(k1 QKeyCombination, k2 QKeyCombination, k3 QKeyCombination) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new12(k1.cPointer(), k2.cPointer(), k3.cPointer(), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new12(k1.cPointer(), k2.cPointer(), k3.cPointer())) ret.isSubclass = true return ret } // NewQKeySequence13 constructs a new QKeySequence object. func NewQKeySequence13(k1 QKeyCombination, k2 QKeyCombination, k3 QKeyCombination, k4 QKeyCombination) *QKeySequence { - var outptr_QKeySequence *C.QKeySequence = nil - C.QKeySequence_new13(k1.cPointer(), k2.cPointer(), k3.cPointer(), k4.cPointer(), &outptr_QKeySequence) - ret := newQKeySequence(outptr_QKeySequence) + ret := newQKeySequence(C.QKeySequence_new13(k1.cPointer(), k2.cPointer(), k3.cPointer(), k4.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qkeysequence.h b/qt6/gen_qkeysequence.h index ce6285a5..122b1e74 100644 --- a/qt6/gen_qkeysequence.h +++ b/qt6/gen_qkeysequence.h @@ -22,19 +22,19 @@ typedef struct QKeyCombination QKeyCombination; typedef struct QKeySequence QKeySequence; #endif -void QKeySequence_new(QKeySequence** outptr_QKeySequence); -void QKeySequence_new2(struct miqt_string key, QKeySequence** outptr_QKeySequence); -void QKeySequence_new3(int k1, QKeySequence** outptr_QKeySequence); -void QKeySequence_new4(QKeyCombination* k1, QKeySequence** outptr_QKeySequence); -void QKeySequence_new5(QKeySequence* ks, QKeySequence** outptr_QKeySequence); -void QKeySequence_new6(int key, QKeySequence** outptr_QKeySequence); -void QKeySequence_new7(struct miqt_string key, int format, QKeySequence** outptr_QKeySequence); -void QKeySequence_new8(int k1, int k2, QKeySequence** outptr_QKeySequence); -void QKeySequence_new9(int k1, int k2, int k3, QKeySequence** outptr_QKeySequence); -void QKeySequence_new10(int k1, int k2, int k3, int k4, QKeySequence** outptr_QKeySequence); -void QKeySequence_new11(QKeyCombination* k1, QKeyCombination* k2, QKeySequence** outptr_QKeySequence); -void QKeySequence_new12(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3, QKeySequence** outptr_QKeySequence); -void QKeySequence_new13(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3, QKeyCombination* k4, QKeySequence** outptr_QKeySequence); +QKeySequence* QKeySequence_new(); +QKeySequence* QKeySequence_new2(struct miqt_string key); +QKeySequence* QKeySequence_new3(int k1); +QKeySequence* QKeySequence_new4(QKeyCombination* k1); +QKeySequence* QKeySequence_new5(QKeySequence* ks); +QKeySequence* QKeySequence_new6(int key); +QKeySequence* QKeySequence_new7(struct miqt_string key, int format); +QKeySequence* QKeySequence_new8(int k1, int k2); +QKeySequence* QKeySequence_new9(int k1, int k2, int k3); +QKeySequence* QKeySequence_new10(int k1, int k2, int k3, int k4); +QKeySequence* QKeySequence_new11(QKeyCombination* k1, QKeyCombination* k2); +QKeySequence* QKeySequence_new12(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3); +QKeySequence* QKeySequence_new13(QKeyCombination* k1, QKeyCombination* k2, QKeyCombination* k3, QKeyCombination* k4); int QKeySequence_Count(const QKeySequence* self); bool QKeySequence_IsEmpty(const QKeySequence* self); struct miqt_string QKeySequence_ToString(const QKeySequence* self); diff --git a/qt6/gen_qkeysequenceedit.cpp b/qt6/gen_qkeysequenceedit.cpp index 68249e37..eb63a31b 100644 --- a/qt6/gen_qkeysequenceedit.cpp +++ b/qt6/gen_qkeysequenceedit.cpp @@ -1050,36 +1050,24 @@ public: }; -void QKeySequenceEdit_new(QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(parent); - *outptr_QKeySequenceEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QKeySequenceEdit* QKeySequenceEdit_new(QWidget* parent) { + return new MiqtVirtualQKeySequenceEdit(parent); } -void QKeySequenceEdit_new2(QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(); - *outptr_QKeySequenceEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QKeySequenceEdit* QKeySequenceEdit_new2() { + return new MiqtVirtualQKeySequenceEdit(); } -void QKeySequenceEdit_new3(QKeySequence* keySequence, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(*keySequence); - *outptr_QKeySequenceEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QKeySequenceEdit* QKeySequenceEdit_new3(QKeySequence* keySequence) { + return new MiqtVirtualQKeySequenceEdit(*keySequence); } -void QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQKeySequenceEdit* ret = new MiqtVirtualQKeySequenceEdit(*keySequence, parent); - *outptr_QKeySequenceEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QKeySequenceEdit* QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent) { + return new MiqtVirtualQKeySequenceEdit(*keySequence, parent); +} + +void QKeySequenceEdit_virtbase(QKeySequenceEdit* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QKeySequenceEdit_MetaObject(const QKeySequenceEdit* self) { diff --git a/qt6/gen_qkeysequenceedit.go b/qt6/gen_qkeysequenceedit.go index 379d575b..a1ec070e 100644 --- a/qt6/gen_qkeysequenceedit.go +++ b/qt6/gen_qkeysequenceedit.go @@ -35,72 +35,50 @@ func (this *QKeySequenceEdit) UnsafePointer() unsafe.Pointer { } // newQKeySequenceEdit constructs the type using only CGO pointers. -func newQKeySequenceEdit(h *C.QKeySequenceEdit, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QKeySequenceEdit { +func newQKeySequenceEdit(h *C.QKeySequenceEdit) *QKeySequenceEdit { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QKeySequenceEdit_virtbase(h, &outptr_QWidget) + return &QKeySequenceEdit{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQKeySequenceEdit constructs the type using only unsafe pointers. -func UnsafeNewQKeySequenceEdit(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QKeySequenceEdit { - if h == nil { - return nil - } - - return &QKeySequenceEdit{h: (*C.QKeySequenceEdit)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQKeySequenceEdit(h unsafe.Pointer) *QKeySequenceEdit { + return newQKeySequenceEdit((*C.QKeySequenceEdit)(h)) } // NewQKeySequenceEdit constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit(parent *QWidget) *QKeySequenceEdit { - var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QKeySequenceEdit_new(parent.cPointer(), &outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQKeySequenceEdit(C.QKeySequenceEdit_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQKeySequenceEdit2 constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit2() *QKeySequenceEdit { - var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QKeySequenceEdit_new2(&outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQKeySequenceEdit(C.QKeySequenceEdit_new2()) ret.isSubclass = true return ret } // NewQKeySequenceEdit3 constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit3(keySequence *QKeySequence) *QKeySequenceEdit { - var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QKeySequenceEdit_new3(keySequence.cPointer(), &outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQKeySequenceEdit(C.QKeySequenceEdit_new3(keySequence.cPointer())) ret.isSubclass = true return ret } // NewQKeySequenceEdit4 constructs a new QKeySequenceEdit object. func NewQKeySequenceEdit4(keySequence *QKeySequence, parent *QWidget) *QKeySequenceEdit { - var outptr_QKeySequenceEdit *C.QKeySequenceEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QKeySequenceEdit_new4(keySequence.cPointer(), parent.cPointer(), &outptr_QKeySequenceEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQKeySequenceEdit(outptr_QKeySequenceEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQKeySequenceEdit(C.QKeySequenceEdit_new4(keySequence.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -253,7 +231,7 @@ func miqt_exec_callback_QKeySequenceEdit_KeyPressEvent(self *C.QKeySequenceEdit, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -279,7 +257,7 @@ func miqt_exec_callback_QKeySequenceEdit_KeyReleaseEvent(self *C.QKeySequenceEdi } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -305,7 +283,7 @@ func miqt_exec_callback_QKeySequenceEdit_TimerEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -331,7 +309,7 @@ func miqt_exec_callback_QKeySequenceEdit_FocusOutEvent(self *C.QKeySequenceEdit, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -540,7 +518,7 @@ func miqt_exec_callback_QKeySequenceEdit_MousePressEvent(self *C.QKeySequenceEdi } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -566,7 +544,7 @@ func miqt_exec_callback_QKeySequenceEdit_MouseReleaseEvent(self *C.QKeySequenceE } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -592,7 +570,7 @@ func miqt_exec_callback_QKeySequenceEdit_MouseDoubleClickEvent(self *C.QKeySeque } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -618,7 +596,7 @@ func miqt_exec_callback_QKeySequenceEdit_MouseMoveEvent(self *C.QKeySequenceEdit } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -644,7 +622,7 @@ func miqt_exec_callback_QKeySequenceEdit_WheelEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -670,7 +648,7 @@ func miqt_exec_callback_QKeySequenceEdit_FocusInEvent(self *C.QKeySequenceEdit, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -696,7 +674,7 @@ func miqt_exec_callback_QKeySequenceEdit_EnterEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -748,7 +726,7 @@ func miqt_exec_callback_QKeySequenceEdit_PaintEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -774,7 +752,7 @@ func miqt_exec_callback_QKeySequenceEdit_MoveEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -800,7 +778,7 @@ func miqt_exec_callback_QKeySequenceEdit_ResizeEvent(self *C.QKeySequenceEdit, c } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -826,7 +804,7 @@ func miqt_exec_callback_QKeySequenceEdit_CloseEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -852,7 +830,7 @@ func miqt_exec_callback_QKeySequenceEdit_ContextMenuEvent(self *C.QKeySequenceEd } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -878,7 +856,7 @@ func miqt_exec_callback_QKeySequenceEdit_TabletEvent(self *C.QKeySequenceEdit, c } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -904,7 +882,7 @@ func miqt_exec_callback_QKeySequenceEdit_ActionEvent(self *C.QKeySequenceEdit, c } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -930,7 +908,7 @@ func miqt_exec_callback_QKeySequenceEdit_DragEnterEvent(self *C.QKeySequenceEdit } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -956,7 +934,7 @@ func miqt_exec_callback_QKeySequenceEdit_DragMoveEvent(self *C.QKeySequenceEdit, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -982,7 +960,7 @@ func miqt_exec_callback_QKeySequenceEdit_DragLeaveEvent(self *C.QKeySequenceEdit } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1008,7 +986,7 @@ func miqt_exec_callback_QKeySequenceEdit_DropEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1034,7 +1012,7 @@ func miqt_exec_callback_QKeySequenceEdit_ShowEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1060,7 +1038,7 @@ func miqt_exec_callback_QKeySequenceEdit_HideEvent(self *C.QKeySequenceEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1256,7 +1234,7 @@ func miqt_exec_callback_QKeySequenceEdit_InputMethodEvent(self *C.QKeySequenceEd } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QKeySequenceEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qkeysequenceedit.h b/qt6/gen_qkeysequenceedit.h index ca69385b..995e8cf6 100644 --- a/qt6/gen_qkeysequenceedit.h +++ b/qt6/gen_qkeysequenceedit.h @@ -82,10 +82,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QKeySequenceEdit_new(QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QKeySequenceEdit_new2(QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QKeySequenceEdit_new3(QKeySequence* keySequence, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent, QKeySequenceEdit** outptr_QKeySequenceEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QKeySequenceEdit* QKeySequenceEdit_new(QWidget* parent); +QKeySequenceEdit* QKeySequenceEdit_new2(); +QKeySequenceEdit* QKeySequenceEdit_new3(QKeySequence* keySequence); +QKeySequenceEdit* QKeySequenceEdit_new4(QKeySequence* keySequence, QWidget* parent); +void QKeySequenceEdit_virtbase(QKeySequenceEdit* src, QWidget** outptr_QWidget); QMetaObject* QKeySequenceEdit_MetaObject(const QKeySequenceEdit* self); void* QKeySequenceEdit_Metacast(QKeySequenceEdit* self, const char* param1); struct miqt_string QKeySequenceEdit_Tr(const char* s); diff --git a/qt6/gen_qlabel.cpp b/qt6/gen_qlabel.cpp index 2413532b..d1aa2bd5 100644 --- a/qt6/gen_qlabel.cpp +++ b/qt6/gen_qlabel.cpp @@ -389,61 +389,35 @@ public: }; -void QLabel_new(QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(parent); - *outptr_QLabel = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLabel* QLabel_new(QWidget* parent) { + return new MiqtVirtualQLabel(parent); } -void QLabel_new2(QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(); - *outptr_QLabel = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLabel* QLabel_new2() { + return new MiqtVirtualQLabel(); } -void QLabel_new3(struct miqt_string text, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QLabel* QLabel_new3(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(text_QString); - *outptr_QLabel = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQLabel(text_QString); } -void QLabel_new4(QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(parent, static_cast(f)); - *outptr_QLabel = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLabel* QLabel_new4(QWidget* parent, int f) { + return new MiqtVirtualQLabel(parent, static_cast(f)); } -void QLabel_new5(struct miqt_string text, QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QLabel* QLabel_new5(struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(text_QString, parent); - *outptr_QLabel = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQLabel(text_QString, parent); } -void QLabel_new6(struct miqt_string text, QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QLabel* QLabel_new6(struct miqt_string text, QWidget* parent, int f) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQLabel* ret = new MiqtVirtualQLabel(text_QString, parent, static_cast(f)); - *outptr_QLabel = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQLabel(text_QString, parent, static_cast(f)); +} + +void QLabel_virtbase(QLabel* src, QFrame** outptr_QFrame) { + *outptr_QFrame = static_cast(src); } QMetaObject* QLabel_MetaObject(const QLabel* self) { diff --git a/qt6/gen_qlabel.go b/qt6/gen_qlabel.go index 9a02468b..85d649fe 100644 --- a/qt6/gen_qlabel.go +++ b/qt6/gen_qlabel.go @@ -35,48 +35,34 @@ func (this *QLabel) UnsafePointer() unsafe.Pointer { } // newQLabel constructs the type using only CGO pointers. -func newQLabel(h *C.QLabel, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QLabel { +func newQLabel(h *C.QLabel) *QLabel { if h == nil { return nil } + var outptr_QFrame *C.QFrame = nil + C.QLabel_virtbase(h, &outptr_QFrame) + return &QLabel{h: h, - QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QFrame: newQFrame(outptr_QFrame)} } // UnsafeNewQLabel constructs the type using only unsafe pointers. -func UnsafeNewQLabel(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QLabel { - if h == nil { - return nil - } - - return &QLabel{h: (*C.QLabel)(h), - QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQLabel(h unsafe.Pointer) *QLabel { + return newQLabel((*C.QLabel)(h)) } // NewQLabel constructs a new QLabel object. func NewQLabel(parent *QWidget) *QLabel { - var outptr_QLabel *C.QLabel = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLabel_new(parent.cPointer(), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLabel(C.QLabel_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQLabel2 constructs a new QLabel object. func NewQLabel2() *QLabel { - var outptr_QLabel *C.QLabel = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLabel_new2(&outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLabel(C.QLabel_new2()) ret.isSubclass = true return ret } @@ -87,28 +73,16 @@ func NewQLabel3(text string) *QLabel { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QLabel *C.QLabel = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLabel_new3(text_ms, &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLabel(C.QLabel_new3(text_ms)) ret.isSubclass = true return ret } // NewQLabel4 constructs a new QLabel object. func NewQLabel4(parent *QWidget, f WindowType) *QLabel { - var outptr_QLabel *C.QLabel = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLabel_new4(parent.cPointer(), (C.int)(f), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLabel(C.QLabel_new4(parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -119,14 +93,8 @@ func NewQLabel5(text string, parent *QWidget) *QLabel { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QLabel *C.QLabel = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLabel_new5(text_ms, parent.cPointer(), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLabel(C.QLabel_new5(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -137,14 +105,8 @@ func NewQLabel6(text string, parent *QWidget, f WindowType) *QLabel { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QLabel *C.QLabel = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLabel_new6(text_ms, parent.cPointer(), (C.int)(f), &outptr_QLabel, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLabel(outptr_QLabel, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLabel(C.QLabel_new6(text_ms, parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -176,31 +138,31 @@ func (this *QLabel) Text() string { } func (this *QLabel) Pixmap(param1 ReturnByValueConstant) *QPixmap { - _goptr := newQPixmap(C.QLabel_Pixmap(this.h, (C.int)(param1)), nil) + _goptr := newQPixmap(C.QLabel_Pixmap(this.h, (C.int)(param1))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QLabel) Pixmap2() *QPixmap { - _goptr := newQPixmap(C.QLabel_Pixmap2(this.h), nil) + _goptr := newQPixmap(C.QLabel_Pixmap2(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QLabel) Picture(param1 ReturnByValueConstant) *QPicture { - _goptr := newQPicture(C.QLabel_Picture(this.h, (C.int)(param1)), nil) + _goptr := newQPicture(C.QLabel_Picture(this.h, (C.int)(param1))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QLabel) Picture2() *QPicture { - _goptr := newQPicture(C.QLabel_Picture2(this.h), nil) + _goptr := newQPicture(C.QLabel_Picture2(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QLabel) Movie() *QMovie { - return newQMovie(C.QLabel_Movie(this.h), nil) + return newQMovie(C.QLabel_Movie(this.h)) } func (this *QLabel) TextFormat() TextFormat { @@ -268,7 +230,7 @@ func (this *QLabel) SetBuddy(buddy *QWidget) { } func (this *QLabel) Buddy() *QWidget { - return newQWidget(C.QLabel_Buddy(this.h), nil, nil) + return newQWidget(C.QLabel_Buddy(this.h)) } func (this *QLabel) HeightForWidth(param1 int) int { @@ -548,7 +510,7 @@ func miqt_exec_callback_QLabel_KeyPressEvent(self *C.QLabel, cb C.intptr_t, ev * } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(ev, nil, nil) + slotval1 := newQKeyEvent(ev) gofunc((&QLabel{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -574,7 +536,7 @@ func miqt_exec_callback_QLabel_PaintEvent(self *C.QLabel, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QLabel{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -626,7 +588,7 @@ func miqt_exec_callback_QLabel_MousePressEvent(self *C.QLabel, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QLabel{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -652,7 +614,7 @@ func miqt_exec_callback_QLabel_MouseMoveEvent(self *C.QLabel, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QLabel{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -678,7 +640,7 @@ func miqt_exec_callback_QLabel_MouseReleaseEvent(self *C.QLabel, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QLabel{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -704,7 +666,7 @@ func miqt_exec_callback_QLabel_ContextMenuEvent(self *C.QLabel, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(ev, nil, nil) + slotval1 := newQContextMenuEvent(ev) gofunc((&QLabel{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -730,7 +692,7 @@ func miqt_exec_callback_QLabel_FocusInEvent(self *C.QLabel, cb C.intptr_t, ev *C } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(ev, nil) + slotval1 := newQFocusEvent(ev) gofunc((&QLabel{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -756,7 +718,7 @@ func miqt_exec_callback_QLabel_FocusOutEvent(self *C.QLabel, cb C.intptr_t, ev * } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(ev, nil) + slotval1 := newQFocusEvent(ev) gofunc((&QLabel{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -810,7 +772,7 @@ func miqt_exec_callback_QLabel_InitStyleOption(self *C.QLabel, cb C.intptr_t, op } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionFrame(option, nil) + slotval1 := newQStyleOptionFrame(option) gofunc((&QLabel{h: self}).callVirtualBase_InitStyleOption, slotval1) diff --git a/qt6/gen_qlabel.h b/qt6/gen_qlabel.h index bd61d7c1..2445517c 100644 --- a/qt6/gen_qlabel.h +++ b/qt6/gen_qlabel.h @@ -52,12 +52,13 @@ typedef struct QStyleOptionFrame QStyleOptionFrame; typedef struct QWidget QWidget; #endif -void QLabel_new(QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLabel_new2(QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLabel_new3(struct miqt_string text, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLabel_new4(QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLabel_new5(struct miqt_string text, QWidget* parent, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLabel_new6(struct miqt_string text, QWidget* parent, int f, QLabel** outptr_QLabel, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QLabel* QLabel_new(QWidget* parent); +QLabel* QLabel_new2(); +QLabel* QLabel_new3(struct miqt_string text); +QLabel* QLabel_new4(QWidget* parent, int f); +QLabel* QLabel_new5(struct miqt_string text, QWidget* parent); +QLabel* QLabel_new6(struct miqt_string text, QWidget* parent, int f); +void QLabel_virtbase(QLabel* src, QFrame** outptr_QFrame); QMetaObject* QLabel_MetaObject(const QLabel* self); void* QLabel_Metacast(QLabel* self, const char* param1); struct miqt_string QLabel_Tr(const char* s); diff --git a/qt6/gen_qlayout.cpp b/qt6/gen_qlayout.cpp index 8a95d24d..85fb29a0 100644 --- a/qt6/gen_qlayout.cpp +++ b/qt6/gen_qlayout.cpp @@ -712,18 +712,17 @@ public: }; -void QLayout_new(QWidget* parent, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQLayout* ret = new MiqtVirtualQLayout(parent); - *outptr_QLayout = ret; - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QLayout* QLayout_new(QWidget* parent) { + return new MiqtVirtualQLayout(parent); } -void QLayout_new2(QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQLayout* ret = new MiqtVirtualQLayout(); - *outptr_QLayout = ret; - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QLayout* QLayout_new2() { + return new MiqtVirtualQLayout(); +} + +void QLayout_virtbase(QLayout* src, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { + *outptr_QObject = static_cast(src); + *outptr_QLayoutItem = static_cast(src); } QMetaObject* QLayout_MetaObject(const QLayout* self) { diff --git a/qt6/gen_qlayout.go b/qt6/gen_qlayout.go index d1aa0256..e3496957 100644 --- a/qt6/gen_qlayout.go +++ b/qt6/gen_qlayout.go @@ -47,46 +47,36 @@ func (this *QLayout) UnsafePointer() unsafe.Pointer { } // newQLayout constructs the type using only CGO pointers. -func newQLayout(h *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QLayout { +func newQLayout(h *C.QLayout) *QLayout { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QLayoutItem *C.QLayoutItem = nil + C.QLayout_virtbase(h, &outptr_QObject, &outptr_QLayoutItem) + return &QLayout{h: h, - QObject: newQObject(h_QObject), - QLayoutItem: newQLayoutItem(h_QLayoutItem)} + QObject: newQObject(outptr_QObject), + QLayoutItem: newQLayoutItem(outptr_QLayoutItem)} } // UnsafeNewQLayout constructs the type using only unsafe pointers. -func UnsafeNewQLayout(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QLayout { - if h == nil { - return nil - } - - return &QLayout{h: (*C.QLayout)(h), - QObject: UnsafeNewQObject(h_QObject), - QLayoutItem: UnsafeNewQLayoutItem(h_QLayoutItem)} +func UnsafeNewQLayout(h unsafe.Pointer) *QLayout { + return newQLayout((*C.QLayout)(h)) } // NewQLayout constructs a new QLayout object. func NewQLayout(parent *QWidget) *QLayout { - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QLayout_new(parent.cPointer(), &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQLayout(outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQLayout(C.QLayout_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQLayout2 constructs a new QLayout object. func NewQLayout2() *QLayout { - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QLayout_new2(&outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQLayout(outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQLayout(C.QLayout_new2()) ret.isSubclass = true return ret } @@ -167,11 +157,11 @@ func (this *QLayout) SetMenuBar(w *QWidget) { } func (this *QLayout) MenuBar() *QWidget { - return newQWidget(C.QLayout_MenuBar(this.h), nil, nil) + return newQWidget(C.QLayout_MenuBar(this.h)) } func (this *QLayout) ParentWidget() *QWidget { - return newQWidget(C.QLayout_ParentWidget(this.h), nil, nil) + return newQWidget(C.QLayout_ParentWidget(this.h)) } func (this *QLayout) Invalidate() { @@ -287,7 +277,7 @@ func (this *QLayout) TotalSizeHint() *QSize { } func (this *QLayout) Layout() *QLayout { - return newQLayout(C.QLayout_Layout(this.h), nil, nil) + return newQLayout(C.QLayout_Layout(this.h)) } func (this *QLayout) SetEnabled(enabled bool) { @@ -616,7 +606,7 @@ func miqt_exec_callback_QLayout_IndexOf(self *C.QLayout, cb C.intptr_t, param1 * } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(param1, nil, nil) + slotval1 := newQWidget(param1) virtualReturn := gofunc((&QLayout{h: self}).callVirtualBase_IndexOf, slotval1) @@ -741,9 +731,9 @@ func miqt_exec_callback_QLayout_ReplaceWidget(self *C.QLayout, cb C.intptr_t, fr } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(from, nil, nil) + slotval1 := newQWidget(from) - slotval2 := newQWidget(to, nil, nil) + slotval2 := newQWidget(to) slotval3 := (FindChildOption)(options) @@ -755,7 +745,7 @@ func miqt_exec_callback_QLayout_ReplaceWidget(self *C.QLayout, cb C.intptr_t, fr func (this *QLayout) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QLayout_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QLayout_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -798,7 +788,7 @@ func miqt_exec_callback_QLayout_ChildEvent(self *C.QLayout, cb C.intptr_t, e *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(e, nil) + slotval1 := newQChildEvent(e) gofunc((&QLayout{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -882,7 +872,7 @@ func miqt_exec_callback_QLayout_TimerEvent(self *C.QLayout, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QLayout{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1068,7 +1058,7 @@ func miqt_exec_callback_QLayout_MinimumHeightForWidth(self *C.QLayout, cb C.intp func (this *QLayout) callVirtualBase_Widget() *QWidget { - return newQWidget(C.QLayout_virtualbase_Widget(unsafe.Pointer(this.h)), nil, nil) + return newQWidget(C.QLayout_virtualbase_Widget(unsafe.Pointer(this.h))) } func (this *QLayout) OnWidget(slot func(super func() *QWidget) *QWidget) { @@ -1093,7 +1083,7 @@ func miqt_exec_callback_QLayout_Widget(self *C.QLayout, cb C.intptr_t) *C.QWidge func (this *QLayout) callVirtualBase_SpacerItem() *QSpacerItem { - return newQSpacerItem(C.QLayout_virtualbase_SpacerItem(unsafe.Pointer(this.h)), nil) + return newQSpacerItem(C.QLayout_virtualbase_SpacerItem(unsafe.Pointer(this.h))) } func (this *QLayout) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { diff --git a/qt6/gen_qlayout.h b/qt6/gen_qlayout.h index a84a62eb..3ec9c44b 100644 --- a/qt6/gen_qlayout.h +++ b/qt6/gen_qlayout.h @@ -44,8 +44,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QLayout_new(QWidget* parent, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QLayout_new2(QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +QLayout* QLayout_new(QWidget* parent); +QLayout* QLayout_new2(); +void QLayout_virtbase(QLayout* src, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); QMetaObject* QLayout_MetaObject(const QLayout* self); void* QLayout_Metacast(QLayout* self, const char* param1); struct miqt_string QLayout_Tr(const char* s); diff --git a/qt6/gen_qlayoutitem.cpp b/qt6/gen_qlayoutitem.cpp index 6b25d2e6..bf675048 100644 --- a/qt6/gen_qlayoutitem.cpp +++ b/qt6/gen_qlayoutitem.cpp @@ -310,19 +310,16 @@ public: }; -void QLayoutItem_new(QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQLayoutItem* ret = new MiqtVirtualQLayoutItem(); - *outptr_QLayoutItem = ret; +QLayoutItem* QLayoutItem_new() { + return new MiqtVirtualQLayoutItem(); } -void QLayoutItem_new2(QLayoutItem* param1, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQLayoutItem* ret = new MiqtVirtualQLayoutItem(*param1); - *outptr_QLayoutItem = ret; +QLayoutItem* QLayoutItem_new2(QLayoutItem* param1) { + return new MiqtVirtualQLayoutItem(*param1); } -void QLayoutItem_new3(int alignment, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQLayoutItem* ret = new MiqtVirtualQLayoutItem(static_cast(alignment)); - *outptr_QLayoutItem = ret; +QLayoutItem* QLayoutItem_new3(int alignment) { + return new MiqtVirtualQLayoutItem(static_cast(alignment)); } QSize* QLayoutItem_SizeHint(const QLayoutItem* self) { @@ -847,28 +844,24 @@ public: }; -void QSpacerItem_new(int w, int h, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h)); - *outptr_QSpacerItem = ret; - *outptr_QLayoutItem = static_cast(ret); +QSpacerItem* QSpacerItem_new(int w, int h) { + return new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h)); } -void QSpacerItem_new2(QSpacerItem* param1, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(*param1); - *outptr_QSpacerItem = ret; - *outptr_QLayoutItem = static_cast(ret); +QSpacerItem* QSpacerItem_new2(QSpacerItem* param1) { + return new MiqtVirtualQSpacerItem(*param1); } -void QSpacerItem_new3(int w, int h, int hData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h), static_cast(hData)); - *outptr_QSpacerItem = ret; - *outptr_QLayoutItem = static_cast(ret); +QSpacerItem* QSpacerItem_new3(int w, int h, int hData) { + return new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h), static_cast(hData)); } -void QSpacerItem_new4(int w, int h, int hData, int vData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQSpacerItem* ret = new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h), static_cast(hData), static_cast(vData)); - *outptr_QSpacerItem = ret; - *outptr_QLayoutItem = static_cast(ret); +QSpacerItem* QSpacerItem_new4(int w, int h, int hData, int vData) { + return new MiqtVirtualQSpacerItem(static_cast(w), static_cast(h), static_cast(hData), static_cast(vData)); +} + +void QSpacerItem_virtbase(QSpacerItem* src, QLayoutItem** outptr_QLayoutItem) { + *outptr_QLayoutItem = static_cast(src); } void QSpacerItem_ChangeSize(QSpacerItem* self, int w, int h) { @@ -1396,10 +1389,12 @@ public: }; -void QWidgetItem_new(QWidget* w, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQWidgetItem* ret = new MiqtVirtualQWidgetItem(w); - *outptr_QWidgetItem = ret; - *outptr_QLayoutItem = static_cast(ret); +QWidgetItem* QWidgetItem_new(QWidget* w) { + return new MiqtVirtualQWidgetItem(w); +} + +void QWidgetItem_virtbase(QWidgetItem* src, QLayoutItem** outptr_QLayoutItem) { + *outptr_QLayoutItem = static_cast(src); } QSize* QWidgetItem_SizeHint(const QWidgetItem* self) { @@ -1861,11 +1856,12 @@ public: }; -void QWidgetItemV2_new(QWidget* widget, QWidgetItemV2** outptr_QWidgetItemV2, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQWidgetItemV2* ret = new MiqtVirtualQWidgetItemV2(widget); - *outptr_QWidgetItemV2 = ret; - *outptr_QWidgetItem = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QWidgetItemV2* QWidgetItemV2_new(QWidget* widget) { + return new MiqtVirtualQWidgetItemV2(widget); +} + +void QWidgetItemV2_virtbase(QWidgetItemV2* src, QWidgetItem** outptr_QWidgetItem) { + *outptr_QWidgetItem = static_cast(src); } QSize* QWidgetItemV2_SizeHint(const QWidgetItemV2* self) { diff --git a/qt6/gen_qlayoutitem.go b/qt6/gen_qlayoutitem.go index 878088b7..03430f45 100644 --- a/qt6/gen_qlayoutitem.go +++ b/qt6/gen_qlayoutitem.go @@ -38,44 +38,35 @@ func newQLayoutItem(h *C.QLayoutItem) *QLayoutItem { if h == nil { return nil } + return &QLayoutItem{h: h} } // UnsafeNewQLayoutItem constructs the type using only unsafe pointers. func UnsafeNewQLayoutItem(h unsafe.Pointer) *QLayoutItem { - if h == nil { - return nil - } - - return &QLayoutItem{h: (*C.QLayoutItem)(h)} + return newQLayoutItem((*C.QLayoutItem)(h)) } // NewQLayoutItem constructs a new QLayoutItem object. func NewQLayoutItem() *QLayoutItem { - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QLayoutItem_new(&outptr_QLayoutItem) - ret := newQLayoutItem(outptr_QLayoutItem) + ret := newQLayoutItem(C.QLayoutItem_new()) ret.isSubclass = true return ret } // NewQLayoutItem2 constructs a new QLayoutItem object. func NewQLayoutItem2(param1 *QLayoutItem) *QLayoutItem { - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QLayoutItem_new2(param1.cPointer(), &outptr_QLayoutItem) - ret := newQLayoutItem(outptr_QLayoutItem) + ret := newQLayoutItem(C.QLayoutItem_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQLayoutItem3 constructs a new QLayoutItem object. func NewQLayoutItem3(alignment AlignmentFlag) *QLayoutItem { - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QLayoutItem_new3((C.int)(alignment), &outptr_QLayoutItem) - ret := newQLayoutItem(outptr_QLayoutItem) + ret := newQLayoutItem(C.QLayoutItem_new3((C.int)(alignment))) ret.isSubclass = true return ret } @@ -133,15 +124,15 @@ func (this *QLayoutItem) Invalidate() { } func (this *QLayoutItem) Widget() *QWidget { - return newQWidget(C.QLayoutItem_Widget(this.h), nil, nil) + return newQWidget(C.QLayoutItem_Widget(this.h)) } func (this *QLayoutItem) Layout() *QLayout { - return newQLayout(C.QLayoutItem_Layout(this.h), nil, nil) + return newQLayout(C.QLayoutItem_Layout(this.h)) } func (this *QLayoutItem) SpacerItem() *QSpacerItem { - return newQSpacerItem(C.QLayoutItem_SpacerItem(this.h), nil) + return newQSpacerItem(C.QLayoutItem_SpacerItem(this.h)) } func (this *QLayoutItem) Alignment() AlignmentFlag { @@ -396,7 +387,7 @@ func miqt_exec_callback_QLayoutItem_Invalidate(self *C.QLayoutItem, cb C.intptr_ func (this *QLayoutItem) callVirtualBase_Widget() *QWidget { - return newQWidget(C.QLayoutItem_virtualbase_Widget(unsafe.Pointer(this.h)), nil, nil) + return newQWidget(C.QLayoutItem_virtualbase_Widget(unsafe.Pointer(this.h))) } func (this *QLayoutItem) OnWidget(slot func(super func() *QWidget) *QWidget) { @@ -421,7 +412,7 @@ func miqt_exec_callback_QLayoutItem_Widget(self *C.QLayoutItem, cb C.intptr_t) * func (this *QLayoutItem) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QLayoutItem_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QLayoutItem_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QLayoutItem) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -446,7 +437,7 @@ func miqt_exec_callback_QLayoutItem_Layout(self *C.QLayoutItem, cb C.intptr_t) * func (this *QLayoutItem) callVirtualBase_SpacerItem() *QSpacerItem { - return newQSpacerItem(C.QLayoutItem_virtualbase_SpacerItem(unsafe.Pointer(this.h)), nil) + return newQSpacerItem(C.QLayoutItem_virtualbase_SpacerItem(unsafe.Pointer(this.h))) } func (this *QLayoutItem) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { @@ -529,64 +520,50 @@ func (this *QSpacerItem) UnsafePointer() unsafe.Pointer { } // newQSpacerItem constructs the type using only CGO pointers. -func newQSpacerItem(h *C.QSpacerItem, h_QLayoutItem *C.QLayoutItem) *QSpacerItem { +func newQSpacerItem(h *C.QSpacerItem) *QSpacerItem { if h == nil { return nil } + var outptr_QLayoutItem *C.QLayoutItem = nil + C.QSpacerItem_virtbase(h, &outptr_QLayoutItem) + return &QSpacerItem{h: h, - QLayoutItem: newQLayoutItem(h_QLayoutItem)} + QLayoutItem: newQLayoutItem(outptr_QLayoutItem)} } // UnsafeNewQSpacerItem constructs the type using only unsafe pointers. -func UnsafeNewQSpacerItem(h unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QSpacerItem { - if h == nil { - return nil - } - - return &QSpacerItem{h: (*C.QSpacerItem)(h), - QLayoutItem: UnsafeNewQLayoutItem(h_QLayoutItem)} +func UnsafeNewQSpacerItem(h unsafe.Pointer) *QSpacerItem { + return newQSpacerItem((*C.QSpacerItem)(h)) } // NewQSpacerItem constructs a new QSpacerItem object. func NewQSpacerItem(w int, h int) *QSpacerItem { - var outptr_QSpacerItem *C.QSpacerItem = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QSpacerItem_new((C.int)(w), (C.int)(h), &outptr_QSpacerItem, &outptr_QLayoutItem) - ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret := newQSpacerItem(C.QSpacerItem_new((C.int)(w), (C.int)(h))) ret.isSubclass = true return ret } // NewQSpacerItem2 constructs a new QSpacerItem object. func NewQSpacerItem2(param1 *QSpacerItem) *QSpacerItem { - var outptr_QSpacerItem *C.QSpacerItem = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QSpacerItem_new2(param1.cPointer(), &outptr_QSpacerItem, &outptr_QLayoutItem) - ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret := newQSpacerItem(C.QSpacerItem_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQSpacerItem3 constructs a new QSpacerItem object. func NewQSpacerItem3(w int, h int, hData QSizePolicy__Policy) *QSpacerItem { - var outptr_QSpacerItem *C.QSpacerItem = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QSpacerItem_new3((C.int)(w), (C.int)(h), (C.int)(hData), &outptr_QSpacerItem, &outptr_QLayoutItem) - ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret := newQSpacerItem(C.QSpacerItem_new3((C.int)(w), (C.int)(h), (C.int)(hData))) ret.isSubclass = true return ret } // NewQSpacerItem4 constructs a new QSpacerItem object. func NewQSpacerItem4(w int, h int, hData QSizePolicy__Policy, vData QSizePolicy__Policy) *QSpacerItem { - var outptr_QSpacerItem *C.QSpacerItem = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QSpacerItem_new4((C.int)(w), (C.int)(h), (C.int)(hData), (C.int)(vData), &outptr_QSpacerItem, &outptr_QLayoutItem) - ret := newQSpacerItem(outptr_QSpacerItem, outptr_QLayoutItem) + ret := newQSpacerItem(C.QSpacerItem_new4((C.int)(w), (C.int)(h), (C.int)(hData), (C.int)(vData))) ret.isSubclass = true return ret } @@ -632,7 +609,7 @@ func (this *QSpacerItem) Geometry() *QRect { } func (this *QSpacerItem) SpacerItem() *QSpacerItem { - return newQSpacerItem(C.QSpacerItem_SpacerItem(this.h), nil) + return newQSpacerItem(C.QSpacerItem_SpacerItem(this.h)) } func (this *QSpacerItem) SizePolicy() *QSizePolicy { @@ -835,7 +812,7 @@ func miqt_exec_callback_QSpacerItem_Geometry(self *C.QSpacerItem, cb C.intptr_t) func (this *QSpacerItem) callVirtualBase_SpacerItem() *QSpacerItem { - return newQSpacerItem(C.QSpacerItem_virtualbase_SpacerItem(unsafe.Pointer(this.h)), nil) + return newQSpacerItem(C.QSpacerItem_virtualbase_SpacerItem(unsafe.Pointer(this.h))) } func (this *QSpacerItem) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { @@ -964,7 +941,7 @@ func miqt_exec_callback_QSpacerItem_Invalidate(self *C.QSpacerItem, cb C.intptr_ func (this *QSpacerItem) callVirtualBase_Widget() *QWidget { - return newQWidget(C.QSpacerItem_virtualbase_Widget(unsafe.Pointer(this.h)), nil, nil) + return newQWidget(C.QSpacerItem_virtualbase_Widget(unsafe.Pointer(this.h))) } func (this *QSpacerItem) OnWidget(slot func(super func() *QWidget) *QWidget) { @@ -989,7 +966,7 @@ func miqt_exec_callback_QSpacerItem_Widget(self *C.QSpacerItem, cb C.intptr_t) * func (this *QSpacerItem) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QSpacerItem_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QSpacerItem_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QSpacerItem) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -1072,31 +1049,26 @@ func (this *QWidgetItem) UnsafePointer() unsafe.Pointer { } // newQWidgetItem constructs the type using only CGO pointers. -func newQWidgetItem(h *C.QWidgetItem, h_QLayoutItem *C.QLayoutItem) *QWidgetItem { +func newQWidgetItem(h *C.QWidgetItem) *QWidgetItem { if h == nil { return nil } + var outptr_QLayoutItem *C.QLayoutItem = nil + C.QWidgetItem_virtbase(h, &outptr_QLayoutItem) + return &QWidgetItem{h: h, - QLayoutItem: newQLayoutItem(h_QLayoutItem)} + QLayoutItem: newQLayoutItem(outptr_QLayoutItem)} } // UnsafeNewQWidgetItem constructs the type using only unsafe pointers. -func UnsafeNewQWidgetItem(h unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QWidgetItem { - if h == nil { - return nil - } - - return &QWidgetItem{h: (*C.QWidgetItem)(h), - QLayoutItem: UnsafeNewQLayoutItem(h_QLayoutItem)} +func UnsafeNewQWidgetItem(h unsafe.Pointer) *QWidgetItem { + return newQWidgetItem((*C.QWidgetItem)(h)) } // NewQWidgetItem constructs a new QWidgetItem object. func NewQWidgetItem(w *QWidget) *QWidgetItem { - var outptr_QWidgetItem *C.QWidgetItem = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QWidgetItem_new(w.cPointer(), &outptr_QWidgetItem, &outptr_QLayoutItem) - ret := newQWidgetItem(outptr_QWidgetItem, outptr_QLayoutItem) + ret := newQWidgetItem(C.QWidgetItem_new(w.cPointer())) ret.isSubclass = true return ret } @@ -1138,7 +1110,7 @@ func (this *QWidgetItem) Geometry() *QRect { } func (this *QWidgetItem) Widget() *QWidget { - return newQWidget(C.QWidgetItem_Widget(this.h), nil, nil) + return newQWidget(C.QWidgetItem_Widget(this.h)) } func (this *QWidgetItem) HasHeightForWidth() bool { @@ -1343,7 +1315,7 @@ func miqt_exec_callback_QWidgetItem_Geometry(self *C.QWidgetItem, cb C.intptr_t) func (this *QWidgetItem) callVirtualBase_Widget() *QWidget { - return newQWidget(C.QWidgetItem_virtualbase_Widget(unsafe.Pointer(this.h)), nil, nil) + return newQWidget(C.QWidgetItem_virtualbase_Widget(unsafe.Pointer(this.h))) } func (this *QWidgetItem) OnWidget(slot func(super func() *QWidget) *QWidget) { @@ -1497,7 +1469,7 @@ func miqt_exec_callback_QWidgetItem_Invalidate(self *C.QWidgetItem, cb C.intptr_ func (this *QWidgetItem) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QWidgetItem_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QWidgetItem_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QWidgetItem) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -1522,7 +1494,7 @@ func miqt_exec_callback_QWidgetItem_Layout(self *C.QWidgetItem, cb C.intptr_t) * func (this *QWidgetItem) callVirtualBase_SpacerItem() *QSpacerItem { - return newQSpacerItem(C.QWidgetItem_virtualbase_SpacerItem(unsafe.Pointer(this.h)), nil) + return newQSpacerItem(C.QWidgetItem_virtualbase_SpacerItem(unsafe.Pointer(this.h))) } func (this *QWidgetItem) OnSpacerItem(slot func(super func() *QSpacerItem) *QSpacerItem) { @@ -1580,32 +1552,26 @@ func (this *QWidgetItemV2) UnsafePointer() unsafe.Pointer { } // newQWidgetItemV2 constructs the type using only CGO pointers. -func newQWidgetItemV2(h *C.QWidgetItemV2, h_QWidgetItem *C.QWidgetItem, h_QLayoutItem *C.QLayoutItem) *QWidgetItemV2 { +func newQWidgetItemV2(h *C.QWidgetItemV2) *QWidgetItemV2 { if h == nil { return nil } + var outptr_QWidgetItem *C.QWidgetItem = nil + C.QWidgetItemV2_virtbase(h, &outptr_QWidgetItem) + return &QWidgetItemV2{h: h, - QWidgetItem: newQWidgetItem(h_QWidgetItem, h_QLayoutItem)} + QWidgetItem: newQWidgetItem(outptr_QWidgetItem)} } // UnsafeNewQWidgetItemV2 constructs the type using only unsafe pointers. -func UnsafeNewQWidgetItemV2(h unsafe.Pointer, h_QWidgetItem unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QWidgetItemV2 { - if h == nil { - return nil - } - - return &QWidgetItemV2{h: (*C.QWidgetItemV2)(h), - QWidgetItem: UnsafeNewQWidgetItem(h_QWidgetItem, h_QLayoutItem)} +func UnsafeNewQWidgetItemV2(h unsafe.Pointer) *QWidgetItemV2 { + return newQWidgetItemV2((*C.QWidgetItemV2)(h)) } // NewQWidgetItemV2 constructs a new QWidgetItemV2 object. func NewQWidgetItemV2(widget *QWidget) *QWidgetItemV2 { - var outptr_QWidgetItemV2 *C.QWidgetItemV2 = nil - var outptr_QWidgetItem *C.QWidgetItem = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QWidgetItemV2_new(widget.cPointer(), &outptr_QWidgetItemV2, &outptr_QWidgetItem, &outptr_QLayoutItem) - ret := newQWidgetItemV2(outptr_QWidgetItemV2, outptr_QWidgetItem, outptr_QLayoutItem) + ret := newQWidgetItemV2(C.QWidgetItemV2_new(widget.cPointer())) ret.isSubclass = true return ret } @@ -1846,7 +1812,7 @@ func miqt_exec_callback_QWidgetItemV2_Geometry(self *C.QWidgetItemV2, cb C.intpt func (this *QWidgetItemV2) callVirtualBase_Widget() *QWidget { - return newQWidget(C.QWidgetItemV2_virtualbase_Widget(unsafe.Pointer(this.h)), nil, nil) + return newQWidget(C.QWidgetItemV2_virtualbase_Widget(unsafe.Pointer(this.h))) } func (this *QWidgetItemV2) OnWidget(slot func(super func() *QWidget) *QWidget) { diff --git a/qt6/gen_qlayoutitem.h b/qt6/gen_qlayoutitem.h index b82f54e6..f643b883 100644 --- a/qt6/gen_qlayoutitem.h +++ b/qt6/gen_qlayoutitem.h @@ -36,9 +36,9 @@ typedef struct QWidgetItem QWidgetItem; typedef struct QWidgetItemV2 QWidgetItemV2; #endif -void QLayoutItem_new(QLayoutItem** outptr_QLayoutItem); -void QLayoutItem_new2(QLayoutItem* param1, QLayoutItem** outptr_QLayoutItem); -void QLayoutItem_new3(int alignment, QLayoutItem** outptr_QLayoutItem); +QLayoutItem* QLayoutItem_new(); +QLayoutItem* QLayoutItem_new2(QLayoutItem* param1); +QLayoutItem* QLayoutItem_new3(int alignment); QSize* QLayoutItem_SizeHint(const QLayoutItem* self); QSize* QLayoutItem_MinimumSize(const QLayoutItem* self); QSize* QLayoutItem_MaximumSize(const QLayoutItem* self); @@ -88,10 +88,11 @@ void QLayoutItem_override_virtual_ControlTypes(void* self, intptr_t slot); int QLayoutItem_virtualbase_ControlTypes(const void* self); void QLayoutItem_Delete(QLayoutItem* self, bool isSubclass); -void QSpacerItem_new(int w, int h, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); -void QSpacerItem_new2(QSpacerItem* param1, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); -void QSpacerItem_new3(int w, int h, int hData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); -void QSpacerItem_new4(int w, int h, int hData, int vData, QSpacerItem** outptr_QSpacerItem, QLayoutItem** outptr_QLayoutItem); +QSpacerItem* QSpacerItem_new(int w, int h); +QSpacerItem* QSpacerItem_new2(QSpacerItem* param1); +QSpacerItem* QSpacerItem_new3(int w, int h, int hData); +QSpacerItem* QSpacerItem_new4(int w, int h, int hData, int vData); +void QSpacerItem_virtbase(QSpacerItem* src, QLayoutItem** outptr_QLayoutItem); void QSpacerItem_ChangeSize(QSpacerItem* self, int w, int h); QSize* QSpacerItem_SizeHint(const QSpacerItem* self); QSize* QSpacerItem_MinimumSize(const QSpacerItem* self); @@ -136,7 +137,8 @@ void QSpacerItem_override_virtual_ControlTypes(void* self, intptr_t slot); int QSpacerItem_virtualbase_ControlTypes(const void* self); void QSpacerItem_Delete(QSpacerItem* self, bool isSubclass); -void QWidgetItem_new(QWidget* w, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem); +QWidgetItem* QWidgetItem_new(QWidget* w); +void QWidgetItem_virtbase(QWidgetItem* src, QLayoutItem** outptr_QLayoutItem); QSize* QWidgetItem_SizeHint(const QWidgetItem* self); QSize* QWidgetItem_MinimumSize(const QWidgetItem* self); QSize* QWidgetItem_MaximumSize(const QWidgetItem* self); @@ -181,7 +183,8 @@ void QWidgetItem_override_virtual_SpacerItem(void* self, intptr_t slot); QSpacerItem* QWidgetItem_virtualbase_SpacerItem(void* self); void QWidgetItem_Delete(QWidgetItem* self, bool isSubclass); -void QWidgetItemV2_new(QWidget* widget, QWidgetItemV2** outptr_QWidgetItemV2, QWidgetItem** outptr_QWidgetItem, QLayoutItem** outptr_QLayoutItem); +QWidgetItemV2* QWidgetItemV2_new(QWidget* widget); +void QWidgetItemV2_virtbase(QWidgetItemV2* src, QWidgetItem** outptr_QWidgetItem); QSize* QWidgetItemV2_SizeHint(const QWidgetItemV2* self); QSize* QWidgetItemV2_MinimumSize(const QWidgetItemV2* self); QSize* QWidgetItemV2_MaximumSize(const QWidgetItemV2* self); diff --git a/qt6/gen_qlcdnumber.cpp b/qt6/gen_qlcdnumber.cpp index 2c018396..42a6b1b4 100644 --- a/qt6/gen_qlcdnumber.cpp +++ b/qt6/gen_qlcdnumber.cpp @@ -144,40 +144,24 @@ public: }; -void QLCDNumber_new(QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(parent); - *outptr_QLCDNumber = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLCDNumber* QLCDNumber_new(QWidget* parent) { + return new MiqtVirtualQLCDNumber(parent); } -void QLCDNumber_new2(QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(); - *outptr_QLCDNumber = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLCDNumber* QLCDNumber_new2() { + return new MiqtVirtualQLCDNumber(); } -void QLCDNumber_new3(unsigned int numDigits, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(static_cast(numDigits)); - *outptr_QLCDNumber = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLCDNumber* QLCDNumber_new3(unsigned int numDigits) { + return new MiqtVirtualQLCDNumber(static_cast(numDigits)); } -void QLCDNumber_new4(unsigned int numDigits, QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLCDNumber* ret = new MiqtVirtualQLCDNumber(static_cast(numDigits), parent); - *outptr_QLCDNumber = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLCDNumber* QLCDNumber_new4(unsigned int numDigits, QWidget* parent) { + return new MiqtVirtualQLCDNumber(static_cast(numDigits), parent); +} + +void QLCDNumber_virtbase(QLCDNumber* src, QFrame** outptr_QFrame) { + *outptr_QFrame = static_cast(src); } QMetaObject* QLCDNumber_MetaObject(const QLCDNumber* self) { diff --git a/qt6/gen_qlcdnumber.go b/qt6/gen_qlcdnumber.go index a4496131..30c3e5a6 100644 --- a/qt6/gen_qlcdnumber.go +++ b/qt6/gen_qlcdnumber.go @@ -52,76 +52,50 @@ func (this *QLCDNumber) UnsafePointer() unsafe.Pointer { } // newQLCDNumber constructs the type using only CGO pointers. -func newQLCDNumber(h *C.QLCDNumber, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QLCDNumber { +func newQLCDNumber(h *C.QLCDNumber) *QLCDNumber { if h == nil { return nil } + var outptr_QFrame *C.QFrame = nil + C.QLCDNumber_virtbase(h, &outptr_QFrame) + return &QLCDNumber{h: h, - QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QFrame: newQFrame(outptr_QFrame)} } // UnsafeNewQLCDNumber constructs the type using only unsafe pointers. -func UnsafeNewQLCDNumber(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QLCDNumber { - if h == nil { - return nil - } - - return &QLCDNumber{h: (*C.QLCDNumber)(h), - QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQLCDNumber(h unsafe.Pointer) *QLCDNumber { + return newQLCDNumber((*C.QLCDNumber)(h)) } // NewQLCDNumber constructs a new QLCDNumber object. func NewQLCDNumber(parent *QWidget) *QLCDNumber { - var outptr_QLCDNumber *C.QLCDNumber = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLCDNumber_new(parent.cPointer(), &outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLCDNumber(C.QLCDNumber_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQLCDNumber2 constructs a new QLCDNumber object. func NewQLCDNumber2() *QLCDNumber { - var outptr_QLCDNumber *C.QLCDNumber = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLCDNumber_new2(&outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLCDNumber(C.QLCDNumber_new2()) ret.isSubclass = true return ret } // NewQLCDNumber3 constructs a new QLCDNumber object. func NewQLCDNumber3(numDigits uint) *QLCDNumber { - var outptr_QLCDNumber *C.QLCDNumber = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLCDNumber_new3((C.uint)(numDigits), &outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLCDNumber(C.QLCDNumber_new3((C.uint)(numDigits))) ret.isSubclass = true return ret } // NewQLCDNumber4 constructs a new QLCDNumber object. func NewQLCDNumber4(numDigits uint, parent *QWidget) *QLCDNumber { - var outptr_QLCDNumber *C.QLCDNumber = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLCDNumber_new4((C.uint)(numDigits), parent.cPointer(), &outptr_QLCDNumber, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLCDNumber(outptr_QLCDNumber, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLCDNumber(C.QLCDNumber_new4((C.uint)(numDigits), parent.cPointer())) ret.isSubclass = true return ret } @@ -345,7 +319,7 @@ func miqt_exec_callback_QLCDNumber_PaintEvent(self *C.QLCDNumber, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QLCDNumber{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -397,7 +371,7 @@ func miqt_exec_callback_QLCDNumber_InitStyleOption(self *C.QLCDNumber, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionFrame(option, nil) + slotval1 := newQStyleOptionFrame(option) gofunc((&QLCDNumber{h: self}).callVirtualBase_InitStyleOption, slotval1) diff --git a/qt6/gen_qlcdnumber.h b/qt6/gen_qlcdnumber.h index 46728374..4d4fcd7b 100644 --- a/qt6/gen_qlcdnumber.h +++ b/qt6/gen_qlcdnumber.h @@ -38,10 +38,11 @@ typedef struct QStyleOptionFrame QStyleOptionFrame; typedef struct QWidget QWidget; #endif -void QLCDNumber_new(QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLCDNumber_new2(QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLCDNumber_new3(unsigned int numDigits, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLCDNumber_new4(unsigned int numDigits, QWidget* parent, QLCDNumber** outptr_QLCDNumber, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QLCDNumber* QLCDNumber_new(QWidget* parent); +QLCDNumber* QLCDNumber_new2(); +QLCDNumber* QLCDNumber_new3(unsigned int numDigits); +QLCDNumber* QLCDNumber_new4(unsigned int numDigits, QWidget* parent); +void QLCDNumber_virtbase(QLCDNumber* src, QFrame** outptr_QFrame); QMetaObject* QLCDNumber_MetaObject(const QLCDNumber* self); void* QLCDNumber_Metacast(QLCDNumber* self, const char* param1); struct miqt_string QLCDNumber_Tr(const char* s); diff --git a/qt6/gen_qlibrary.cpp b/qt6/gen_qlibrary.cpp index c5e6a944..a81e1c66 100644 --- a/qt6/gen_qlibrary.cpp +++ b/qt6/gen_qlibrary.cpp @@ -199,60 +199,48 @@ public: }; -void QLibrary_new(QLibrary** outptr_QLibrary, QObject** outptr_QObject) { - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); +QLibrary* QLibrary_new() { + return new MiqtVirtualQLibrary(); } -void QLibrary_new2(struct miqt_string fileName, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { +QLibrary* QLibrary_new2(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQLibrary(fileName_QString); } -void QLibrary_new3(struct miqt_string fileName, int verNum, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { +QLibrary* QLibrary_new3(struct miqt_string fileName, int verNum) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, static_cast(verNum)); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQLibrary(fileName_QString, static_cast(verNum)); } -void QLibrary_new4(struct miqt_string fileName, struct miqt_string version, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { +QLibrary* QLibrary_new4(struct miqt_string fileName, struct miqt_string version) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QString version_QString = QString::fromUtf8(version.data, version.len); - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, version_QString); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQLibrary(fileName_QString, version_QString); } -void QLibrary_new5(QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(parent); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); +QLibrary* QLibrary_new5(QObject* parent) { + return new MiqtVirtualQLibrary(parent); } -void QLibrary_new6(struct miqt_string fileName, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { +QLibrary* QLibrary_new6(struct miqt_string fileName, QObject* parent) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, parent); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQLibrary(fileName_QString, parent); } -void QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { +QLibrary* QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, static_cast(verNum), parent); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQLibrary(fileName_QString, static_cast(verNum), parent); } -void QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject) { +QLibrary* QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QString version_QString = QString::fromUtf8(version.data, version.len); - MiqtVirtualQLibrary* ret = new MiqtVirtualQLibrary(fileName_QString, version_QString, parent); - *outptr_QLibrary = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQLibrary(fileName_QString, version_QString, parent); +} + +void QLibrary_virtbase(QLibrary* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QLibrary_MetaObject(const QLibrary* self) { diff --git a/qt6/gen_qlibrary.go b/qt6/gen_qlibrary.go index 6b597725..9adff78d 100644 --- a/qt6/gen_qlibrary.go +++ b/qt6/gen_qlibrary.go @@ -45,31 +45,26 @@ func (this *QLibrary) UnsafePointer() unsafe.Pointer { } // newQLibrary constructs the type using only CGO pointers. -func newQLibrary(h *C.QLibrary, h_QObject *C.QObject) *QLibrary { +func newQLibrary(h *C.QLibrary) *QLibrary { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QLibrary_virtbase(h, &outptr_QObject) + return &QLibrary{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQLibrary constructs the type using only unsafe pointers. -func UnsafeNewQLibrary(h unsafe.Pointer, h_QObject unsafe.Pointer) *QLibrary { - if h == nil { - return nil - } - - return &QLibrary{h: (*C.QLibrary)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQLibrary(h unsafe.Pointer) *QLibrary { + return newQLibrary((*C.QLibrary)(h)) } // NewQLibrary constructs a new QLibrary object. func NewQLibrary() *QLibrary { - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new(&outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new()) ret.isSubclass = true return ret } @@ -80,11 +75,8 @@ func NewQLibrary2(fileName string) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new2(fileName_ms, &outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new2(fileName_ms)) ret.isSubclass = true return ret } @@ -95,11 +87,8 @@ func NewQLibrary3(fileName string, verNum int) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new3(fileName_ms, (C.int)(verNum), &outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new3(fileName_ms, (C.int)(verNum))) ret.isSubclass = true return ret } @@ -114,22 +103,16 @@ func NewQLibrary4(fileName string, version string) *QLibrary { version_ms.data = C.CString(version) version_ms.len = C.size_t(len(version)) defer C.free(unsafe.Pointer(version_ms.data)) - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new4(fileName_ms, version_ms, &outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new4(fileName_ms, version_ms)) ret.isSubclass = true return ret } // NewQLibrary5 constructs a new QLibrary object. func NewQLibrary5(parent *QObject) *QLibrary { - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new5(parent.cPointer(), &outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new5(parent.cPointer())) ret.isSubclass = true return ret } @@ -140,11 +123,8 @@ func NewQLibrary6(fileName string, parent *QObject) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new6(fileName_ms, parent.cPointer(), &outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new6(fileName_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -155,11 +135,8 @@ func NewQLibrary7(fileName string, verNum int, parent *QObject) *QLibrary { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new7(fileName_ms, (C.int)(verNum), parent.cPointer(), &outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new7(fileName_ms, (C.int)(verNum), parent.cPointer())) ret.isSubclass = true return ret } @@ -174,11 +151,8 @@ func NewQLibrary8(fileName string, version string, parent *QObject) *QLibrary { version_ms.data = C.CString(version) version_ms.len = C.size_t(len(version)) defer C.free(unsafe.Pointer(version_ms.data)) - var outptr_QLibrary *C.QLibrary = nil - var outptr_QObject *C.QObject = nil - C.QLibrary_new8(fileName_ms, version_ms, parent.cPointer(), &outptr_QLibrary, &outptr_QObject) - ret := newQLibrary(outptr_QLibrary, outptr_QObject) + ret := newQLibrary(C.QLibrary_new8(fileName_ms, version_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -372,7 +346,7 @@ func miqt_exec_callback_QLibrary_TimerEvent(self *C.QLibrary, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QLibrary{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -398,7 +372,7 @@ func miqt_exec_callback_QLibrary_ChildEvent(self *C.QLibrary, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QLibrary{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qlibrary.h b/qt6/gen_qlibrary.h index 1ac03e14..fe9855ee 100644 --- a/qt6/gen_qlibrary.h +++ b/qt6/gen_qlibrary.h @@ -32,14 +32,15 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QLibrary_new(QLibrary** outptr_QLibrary, QObject** outptr_QObject); -void QLibrary_new2(struct miqt_string fileName, QLibrary** outptr_QLibrary, QObject** outptr_QObject); -void QLibrary_new3(struct miqt_string fileName, int verNum, QLibrary** outptr_QLibrary, QObject** outptr_QObject); -void QLibrary_new4(struct miqt_string fileName, struct miqt_string version, QLibrary** outptr_QLibrary, QObject** outptr_QObject); -void QLibrary_new5(QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); -void QLibrary_new6(struct miqt_string fileName, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); -void QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); -void QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent, QLibrary** outptr_QLibrary, QObject** outptr_QObject); +QLibrary* QLibrary_new(); +QLibrary* QLibrary_new2(struct miqt_string fileName); +QLibrary* QLibrary_new3(struct miqt_string fileName, int verNum); +QLibrary* QLibrary_new4(struct miqt_string fileName, struct miqt_string version); +QLibrary* QLibrary_new5(QObject* parent); +QLibrary* QLibrary_new6(struct miqt_string fileName, QObject* parent); +QLibrary* QLibrary_new7(struct miqt_string fileName, int verNum, QObject* parent); +QLibrary* QLibrary_new8(struct miqt_string fileName, struct miqt_string version, QObject* parent); +void QLibrary_virtbase(QLibrary* src, QObject** outptr_QObject); QMetaObject* QLibrary_MetaObject(const QLibrary* self); void* QLibrary_Metacast(QLibrary* self, const char* param1); struct miqt_string QLibrary_Tr(const char* s); diff --git a/qt6/gen_qlibraryinfo.go b/qt6/gen_qlibraryinfo.go index 3f67e102..37cee223 100644 --- a/qt6/gen_qlibraryinfo.go +++ b/qt6/gen_qlibraryinfo.go @@ -57,16 +57,13 @@ func newQLibraryInfo(h *C.QLibraryInfo) *QLibraryInfo { if h == nil { return nil } + return &QLibraryInfo{h: h} } // UnsafeNewQLibraryInfo constructs the type using only unsafe pointers. func UnsafeNewQLibraryInfo(h unsafe.Pointer) *QLibraryInfo { - if h == nil { - return nil - } - - return &QLibraryInfo{h: (*C.QLibraryInfo)(h)} + return newQLibraryInfo((*C.QLibraryInfo)(h)) } func QLibraryInfo_Build() string { diff --git a/qt6/gen_qline.cpp b/qt6/gen_qline.cpp index bd783083..72789a52 100644 --- a/qt6/gen_qline.cpp +++ b/qt6/gen_qline.cpp @@ -6,24 +6,20 @@ #include "gen_qline.h" #include "_cgo_export.h" -void QLine_new(QLine** outptr_QLine) { - QLine* ret = new QLine(); - *outptr_QLine = ret; +QLine* QLine_new() { + return new QLine(); } -void QLine_new2(QPoint* pt1, QPoint* pt2, QLine** outptr_QLine) { - QLine* ret = new QLine(*pt1, *pt2); - *outptr_QLine = ret; +QLine* QLine_new2(QPoint* pt1, QPoint* pt2) { + return new QLine(*pt1, *pt2); } -void QLine_new3(int x1, int y1, int x2, int y2, QLine** outptr_QLine) { - QLine* ret = new QLine(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); - *outptr_QLine = ret; +QLine* QLine_new3(int x1, int y1, int x2, int y2) { + return new QLine(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); } -void QLine_new4(QLine* param1, QLine** outptr_QLine) { - QLine* ret = new QLine(*param1); - *outptr_QLine = ret; +QLine* QLine_new4(QLine* param1) { + return new QLine(*param1); } bool QLine_IsNull(const QLine* self) { @@ -118,29 +114,24 @@ void QLine_Delete(QLine* self, bool isSubclass) { } } -void QLineF_new(QLineF** outptr_QLineF) { - QLineF* ret = new QLineF(); - *outptr_QLineF = ret; +QLineF* QLineF_new() { + return new QLineF(); } -void QLineF_new2(QPointF* pt1, QPointF* pt2, QLineF** outptr_QLineF) { - QLineF* ret = new QLineF(*pt1, *pt2); - *outptr_QLineF = ret; +QLineF* QLineF_new2(QPointF* pt1, QPointF* pt2) { + return new QLineF(*pt1, *pt2); } -void QLineF_new3(double x1, double y1, double x2, double y2, QLineF** outptr_QLineF) { - QLineF* ret = new QLineF(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); - *outptr_QLineF = ret; +QLineF* QLineF_new3(double x1, double y1, double x2, double y2) { + return new QLineF(static_cast(x1), static_cast(y1), static_cast(x2), static_cast(y2)); } -void QLineF_new4(QLine* line, QLineF** outptr_QLineF) { - QLineF* ret = new QLineF(*line); - *outptr_QLineF = ret; +QLineF* QLineF_new4(QLine* line) { + return new QLineF(*line); } -void QLineF_new5(QLineF* param1, QLineF** outptr_QLineF) { - QLineF* ret = new QLineF(*param1); - *outptr_QLineF = ret; +QLineF* QLineF_new5(QLineF* param1) { + return new QLineF(*param1); } QLineF* QLineF_FromPolar(double length, double angle) { diff --git a/qt6/gen_qline.go b/qt6/gen_qline.go index 675f9eb9..00f9c666 100644 --- a/qt6/gen_qline.go +++ b/qt6/gen_qline.go @@ -45,54 +45,43 @@ func newQLine(h *C.QLine) *QLine { if h == nil { return nil } + return &QLine{h: h} } // UnsafeNewQLine constructs the type using only unsafe pointers. func UnsafeNewQLine(h unsafe.Pointer) *QLine { - if h == nil { - return nil - } - - return &QLine{h: (*C.QLine)(h)} + return newQLine((*C.QLine)(h)) } // NewQLine constructs a new QLine object. func NewQLine() *QLine { - var outptr_QLine *C.QLine = nil - C.QLine_new(&outptr_QLine) - ret := newQLine(outptr_QLine) + ret := newQLine(C.QLine_new()) ret.isSubclass = true return ret } // NewQLine2 constructs a new QLine object. func NewQLine2(pt1 *QPoint, pt2 *QPoint) *QLine { - var outptr_QLine *C.QLine = nil - C.QLine_new2(pt1.cPointer(), pt2.cPointer(), &outptr_QLine) - ret := newQLine(outptr_QLine) + ret := newQLine(C.QLine_new2(pt1.cPointer(), pt2.cPointer())) ret.isSubclass = true return ret } // NewQLine3 constructs a new QLine object. func NewQLine3(x1 int, y1 int, x2 int, y2 int) *QLine { - var outptr_QLine *C.QLine = nil - C.QLine_new3((C.int)(x1), (C.int)(y1), (C.int)(x2), (C.int)(y2), &outptr_QLine) - ret := newQLine(outptr_QLine) + ret := newQLine(C.QLine_new3((C.int)(x1), (C.int)(y1), (C.int)(x2), (C.int)(y2))) ret.isSubclass = true return ret } // NewQLine4 constructs a new QLine object. func NewQLine4(param1 *QLine) *QLine { - var outptr_QLine *C.QLine = nil - C.QLine_new4(param1.cPointer(), &outptr_QLine) - ret := newQLine(outptr_QLine) + ret := newQLine(C.QLine_new4(param1.cPointer())) ret.isSubclass = true return ret } @@ -231,64 +220,51 @@ func newQLineF(h *C.QLineF) *QLineF { if h == nil { return nil } + return &QLineF{h: h} } // UnsafeNewQLineF constructs the type using only unsafe pointers. func UnsafeNewQLineF(h unsafe.Pointer) *QLineF { - if h == nil { - return nil - } - - return &QLineF{h: (*C.QLineF)(h)} + return newQLineF((*C.QLineF)(h)) } // NewQLineF constructs a new QLineF object. func NewQLineF() *QLineF { - var outptr_QLineF *C.QLineF = nil - C.QLineF_new(&outptr_QLineF) - ret := newQLineF(outptr_QLineF) + ret := newQLineF(C.QLineF_new()) ret.isSubclass = true return ret } // NewQLineF2 constructs a new QLineF object. func NewQLineF2(pt1 *QPointF, pt2 *QPointF) *QLineF { - var outptr_QLineF *C.QLineF = nil - C.QLineF_new2(pt1.cPointer(), pt2.cPointer(), &outptr_QLineF) - ret := newQLineF(outptr_QLineF) + ret := newQLineF(C.QLineF_new2(pt1.cPointer(), pt2.cPointer())) ret.isSubclass = true return ret } // NewQLineF3 constructs a new QLineF object. func NewQLineF3(x1 float64, y1 float64, x2 float64, y2 float64) *QLineF { - var outptr_QLineF *C.QLineF = nil - C.QLineF_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2), &outptr_QLineF) - ret := newQLineF(outptr_QLineF) + ret := newQLineF(C.QLineF_new3((C.double)(x1), (C.double)(y1), (C.double)(x2), (C.double)(y2))) ret.isSubclass = true return ret } // NewQLineF4 constructs a new QLineF object. func NewQLineF4(line *QLine) *QLineF { - var outptr_QLineF *C.QLineF = nil - C.QLineF_new4(line.cPointer(), &outptr_QLineF) - ret := newQLineF(outptr_QLineF) + ret := newQLineF(C.QLineF_new4(line.cPointer())) ret.isSubclass = true return ret } // NewQLineF5 constructs a new QLineF object. func NewQLineF5(param1 *QLineF) *QLineF { - var outptr_QLineF *C.QLineF = nil - C.QLineF_new5(param1.cPointer(), &outptr_QLineF) - ret := newQLineF(outptr_QLineF) + ret := newQLineF(C.QLineF_new5(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qline.h b/qt6/gen_qline.h index 67e7f1d2..2306ea9c 100644 --- a/qt6/gen_qline.h +++ b/qt6/gen_qline.h @@ -26,10 +26,10 @@ typedef struct QPoint QPoint; typedef struct QPointF QPointF; #endif -void QLine_new(QLine** outptr_QLine); -void QLine_new2(QPoint* pt1, QPoint* pt2, QLine** outptr_QLine); -void QLine_new3(int x1, int y1, int x2, int y2, QLine** outptr_QLine); -void QLine_new4(QLine* param1, QLine** outptr_QLine); +QLine* QLine_new(); +QLine* QLine_new2(QPoint* pt1, QPoint* pt2); +QLine* QLine_new3(int x1, int y1, int x2, int y2); +QLine* QLine_new4(QLine* param1); bool QLine_IsNull(const QLine* self); QPoint* QLine_P1(const QLine* self); QPoint* QLine_P2(const QLine* self); @@ -53,11 +53,11 @@ bool QLine_OperatorNotEqual(const QLine* self, QLine* d); QLineF* QLine_ToLineF(const QLine* self); void QLine_Delete(QLine* self, bool isSubclass); -void QLineF_new(QLineF** outptr_QLineF); -void QLineF_new2(QPointF* pt1, QPointF* pt2, QLineF** outptr_QLineF); -void QLineF_new3(double x1, double y1, double x2, double y2, QLineF** outptr_QLineF); -void QLineF_new4(QLine* line, QLineF** outptr_QLineF); -void QLineF_new5(QLineF* param1, QLineF** outptr_QLineF); +QLineF* QLineF_new(); +QLineF* QLineF_new2(QPointF* pt1, QPointF* pt2); +QLineF* QLineF_new3(double x1, double y1, double x2, double y2); +QLineF* QLineF_new4(QLine* line); +QLineF* QLineF_new5(QLineF* param1); QLineF* QLineF_FromPolar(double length, double angle); bool QLineF_IsNull(const QLineF* self); QPointF* QLineF_P1(const QLineF* self); diff --git a/qt6/gen_qlineedit.cpp b/qt6/gen_qlineedit.cpp index e4a351e4..582c4995 100644 --- a/qt6/gen_qlineedit.cpp +++ b/qt6/gen_qlineedit.cpp @@ -1080,38 +1080,26 @@ public: }; -void QLineEdit_new(QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(parent); - *outptr_QLineEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLineEdit* QLineEdit_new(QWidget* parent) { + return new MiqtVirtualQLineEdit(parent); } -void QLineEdit_new2(QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(); - *outptr_QLineEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QLineEdit* QLineEdit_new2() { + return new MiqtVirtualQLineEdit(); } -void QLineEdit_new3(struct miqt_string param1, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QLineEdit* QLineEdit_new3(struct miqt_string param1) { QString param1_QString = QString::fromUtf8(param1.data, param1.len); - MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(param1_QString); - *outptr_QLineEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQLineEdit(param1_QString); } -void QLineEdit_new4(struct miqt_string param1, QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QLineEdit* QLineEdit_new4(struct miqt_string param1, QWidget* parent) { QString param1_QString = QString::fromUtf8(param1.data, param1.len); - MiqtVirtualQLineEdit* ret = new MiqtVirtualQLineEdit(param1_QString, parent); - *outptr_QLineEdit = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQLineEdit(param1_QString, parent); +} + +void QLineEdit_virtbase(QLineEdit* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QLineEdit_MetaObject(const QLineEdit* self) { diff --git a/qt6/gen_qlineedit.go b/qt6/gen_qlineedit.go index b9a37ea1..8ee51fbf 100644 --- a/qt6/gen_qlineedit.go +++ b/qt6/gen_qlineedit.go @@ -51,46 +51,34 @@ func (this *QLineEdit) UnsafePointer() unsafe.Pointer { } // newQLineEdit constructs the type using only CGO pointers. -func newQLineEdit(h *C.QLineEdit, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QLineEdit { +func newQLineEdit(h *C.QLineEdit) *QLineEdit { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QLineEdit_virtbase(h, &outptr_QWidget) + return &QLineEdit{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQLineEdit constructs the type using only unsafe pointers. -func UnsafeNewQLineEdit(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QLineEdit { - if h == nil { - return nil - } - - return &QLineEdit{h: (*C.QLineEdit)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQLineEdit(h unsafe.Pointer) *QLineEdit { + return newQLineEdit((*C.QLineEdit)(h)) } // NewQLineEdit constructs a new QLineEdit object. func NewQLineEdit(parent *QWidget) *QLineEdit { - var outptr_QLineEdit *C.QLineEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLineEdit_new(parent.cPointer(), &outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLineEdit(C.QLineEdit_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQLineEdit2 constructs a new QLineEdit object. func NewQLineEdit2() *QLineEdit { - var outptr_QLineEdit *C.QLineEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLineEdit_new2(&outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLineEdit(C.QLineEdit_new2()) ret.isSubclass = true return ret } @@ -101,13 +89,8 @@ func NewQLineEdit3(param1 string) *QLineEdit { param1_ms.data = C.CString(param1) param1_ms.len = C.size_t(len(param1)) defer C.free(unsafe.Pointer(param1_ms.data)) - var outptr_QLineEdit *C.QLineEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLineEdit_new3(param1_ms, &outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLineEdit(C.QLineEdit_new3(param1_ms)) ret.isSubclass = true return ret } @@ -118,13 +101,8 @@ func NewQLineEdit4(param1 string, parent *QWidget) *QLineEdit { param1_ms.data = C.CString(param1) param1_ms.len = C.size_t(len(param1)) defer C.free(unsafe.Pointer(param1_ms.data)) - var outptr_QLineEdit *C.QLineEdit = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QLineEdit_new4(param1_ms, parent.cPointer(), &outptr_QLineEdit, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQLineEdit(outptr_QLineEdit, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQLineEdit(C.QLineEdit_new4(param1_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -222,7 +200,7 @@ func (this *QLineEdit) SetValidator(validator *QValidator) { } func (this *QLineEdit) Validator() *QValidator { - return newQValidator(C.QLineEdit_Validator(this.h), nil) + return newQValidator(C.QLineEdit_Validator(this.h)) } func (this *QLineEdit) SetCompleter(completer *QCompleter) { @@ -230,7 +208,7 @@ func (this *QLineEdit) SetCompleter(completer *QCompleter) { } func (this *QLineEdit) Completer() *QCompleter { - return newQCompleter(C.QLineEdit_Completer(this.h), nil) + return newQCompleter(C.QLineEdit_Completer(this.h)) } func (this *QLineEdit) SizeHint() *QSize { @@ -394,7 +372,7 @@ func (this *QLineEdit) AddAction(action *QAction, position QLineEdit__ActionPosi } func (this *QLineEdit) AddAction2(icon *QIcon, position QLineEdit__ActionPosition) *QAction { - return newQAction(C.QLineEdit_AddAction2(this.h, icon.cPointer(), (C.int)(position)), nil) + return newQAction(C.QLineEdit_AddAction2(this.h, icon.cPointer(), (C.int)(position))) } func (this *QLineEdit) SetText(text string) { @@ -446,7 +424,7 @@ func (this *QLineEdit) Insert(param1 string) { } func (this *QLineEdit) CreateStandardContextMenu() *QMenu { - return newQMenu(C.QLineEdit_CreateStandardContextMenu(this.h), nil, nil, nil) + return newQMenu(C.QLineEdit_CreateStandardContextMenu(this.h)) } func (this *QLineEdit) TextChanged(param1 string) { @@ -717,7 +695,7 @@ func miqt_exec_callback_QLineEdit_MousePressEvent(self *C.QLineEdit, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -743,7 +721,7 @@ func miqt_exec_callback_QLineEdit_MouseMoveEvent(self *C.QLineEdit, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -769,7 +747,7 @@ func miqt_exec_callback_QLineEdit_MouseReleaseEvent(self *C.QLineEdit, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -795,7 +773,7 @@ func miqt_exec_callback_QLineEdit_MouseDoubleClickEvent(self *C.QLineEdit, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -821,7 +799,7 @@ func miqt_exec_callback_QLineEdit_KeyPressEvent(self *C.QLineEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -847,7 +825,7 @@ func miqt_exec_callback_QLineEdit_KeyReleaseEvent(self *C.QLineEdit, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -873,7 +851,7 @@ func miqt_exec_callback_QLineEdit_FocusInEvent(self *C.QLineEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -899,7 +877,7 @@ func miqt_exec_callback_QLineEdit_FocusOutEvent(self *C.QLineEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -925,7 +903,7 @@ func miqt_exec_callback_QLineEdit_PaintEvent(self *C.QLineEdit, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -951,7 +929,7 @@ func miqt_exec_callback_QLineEdit_DragEnterEvent(self *C.QLineEdit, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(param1, nil, nil, nil) + slotval1 := newQDragEnterEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -977,7 +955,7 @@ func miqt_exec_callback_QLineEdit_DragMoveEvent(self *C.QLineEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(e, nil, nil) + slotval1 := newQDragMoveEvent(e) gofunc((&QLineEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1003,7 +981,7 @@ func miqt_exec_callback_QLineEdit_DragLeaveEvent(self *C.QLineEdit, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(e, nil) + slotval1 := newQDragLeaveEvent(e) gofunc((&QLineEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1029,7 +1007,7 @@ func miqt_exec_callback_QLineEdit_DropEvent(self *C.QLineEdit, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(param1, nil) + slotval1 := newQDropEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1081,7 +1059,7 @@ func miqt_exec_callback_QLineEdit_ContextMenuEvent(self *C.QLineEdit, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1107,7 +1085,7 @@ func miqt_exec_callback_QLineEdit_InputMethodEvent(self *C.QLineEdit, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -1133,7 +1111,7 @@ func miqt_exec_callback_QLineEdit_InitStyleOption(self *C.QLineEdit, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionFrame(option, nil) + slotval1 := newQStyleOptionFrame(option) gofunc((&QLineEdit{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -1189,7 +1167,7 @@ func miqt_exec_callback_QLineEdit_TimerEvent(self *C.QLineEdit, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QLineEdit{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1372,7 +1350,7 @@ func miqt_exec_callback_QLineEdit_WheelEvent(self *C.QLineEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1398,7 +1376,7 @@ func miqt_exec_callback_QLineEdit_EnterEvent(self *C.QLineEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -1450,7 +1428,7 @@ func miqt_exec_callback_QLineEdit_MoveEvent(self *C.QLineEdit, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1476,7 +1454,7 @@ func miqt_exec_callback_QLineEdit_ResizeEvent(self *C.QLineEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1502,7 +1480,7 @@ func miqt_exec_callback_QLineEdit_CloseEvent(self *C.QLineEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1528,7 +1506,7 @@ func miqt_exec_callback_QLineEdit_TabletEvent(self *C.QLineEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1554,7 +1532,7 @@ func miqt_exec_callback_QLineEdit_ActionEvent(self *C.QLineEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1580,7 +1558,7 @@ func miqt_exec_callback_QLineEdit_ShowEvent(self *C.QLineEdit, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1606,7 +1584,7 @@ func miqt_exec_callback_QLineEdit_HideEvent(self *C.QLineEdit, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QLineEdit{h: self}).callVirtualBase_HideEvent, slotval1) diff --git a/qt6/gen_qlineedit.h b/qt6/gen_qlineedit.h index 1bbfbc94..becf08e4 100644 --- a/qt6/gen_qlineedit.h +++ b/qt6/gen_qlineedit.h @@ -94,10 +94,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QLineEdit_new(QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLineEdit_new2(QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLineEdit_new3(struct miqt_string param1, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QLineEdit_new4(struct miqt_string param1, QWidget* parent, QLineEdit** outptr_QLineEdit, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QLineEdit* QLineEdit_new(QWidget* parent); +QLineEdit* QLineEdit_new2(); +QLineEdit* QLineEdit_new3(struct miqt_string param1); +QLineEdit* QLineEdit_new4(struct miqt_string param1, QWidget* parent); +void QLineEdit_virtbase(QLineEdit* src, QWidget** outptr_QWidget); QMetaObject* QLineEdit_MetaObject(const QLineEdit* self); void* QLineEdit_Metacast(QLineEdit* self, const char* param1); struct miqt_string QLineEdit_Tr(const char* s); diff --git a/qt6/gen_qlistview.cpp b/qt6/gen_qlistview.cpp index f29e084f..1637f34a 100644 --- a/qt6/gen_qlistview.cpp +++ b/qt6/gen_qlistview.cpp @@ -1607,26 +1607,16 @@ public: }; -void QListView_new(QWidget* parent, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQListView* ret = new MiqtVirtualQListView(parent); - *outptr_QListView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QListView* QListView_new(QWidget* parent) { + return new MiqtVirtualQListView(parent); } -void QListView_new2(QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQListView* ret = new MiqtVirtualQListView(); - *outptr_QListView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QListView* QListView_new2() { + return new MiqtVirtualQListView(); +} + +void QListView_virtbase(QListView* src, QAbstractItemView** outptr_QAbstractItemView) { + *outptr_QAbstractItemView = static_cast(src); } QMetaObject* QListView_MetaObject(const QListView* self) { diff --git a/qt6/gen_qlistview.go b/qt6/gen_qlistview.go index 0fbe340d..4d4ea269 100644 --- a/qt6/gen_qlistview.go +++ b/qt6/gen_qlistview.go @@ -71,52 +71,34 @@ func (this *QListView) UnsafePointer() unsafe.Pointer { } // newQListView constructs the type using only CGO pointers. -func newQListView(h *C.QListView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QListView { +func newQListView(h *C.QListView) *QListView { if h == nil { return nil } + var outptr_QAbstractItemView *C.QAbstractItemView = nil + C.QListView_virtbase(h, &outptr_QAbstractItemView) + return &QListView{h: h, - QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractItemView: newQAbstractItemView(outptr_QAbstractItemView)} } // UnsafeNewQListView constructs the type using only unsafe pointers. -func UnsafeNewQListView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QListView { - if h == nil { - return nil - } - - return &QListView{h: (*C.QListView)(h), - QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQListView(h unsafe.Pointer) *QListView { + return newQListView((*C.QListView)(h)) } // NewQListView constructs a new QListView object. func NewQListView(parent *QWidget) *QListView { - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QListView_new(parent.cPointer(), &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQListView(outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQListView(C.QListView_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQListView2 constructs a new QListView object. func NewQListView2() *QListView { - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QListView_new2(&outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQListView(outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQListView(C.QListView_new2()) ret.isSubclass = true return ret } @@ -688,7 +670,7 @@ func miqt_exec_callback_QListView_MouseMoveEvent(self *C.QListView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QListView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -714,7 +696,7 @@ func miqt_exec_callback_QListView_MouseReleaseEvent(self *C.QListView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QListView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -740,7 +722,7 @@ func miqt_exec_callback_QListView_WheelEvent(self *C.QListView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QListView{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -766,7 +748,7 @@ func miqt_exec_callback_QListView_TimerEvent(self *C.QListView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QListView{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -792,7 +774,7 @@ func miqt_exec_callback_QListView_ResizeEvent(self *C.QListView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QListView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -818,7 +800,7 @@ func miqt_exec_callback_QListView_DragMoveEvent(self *C.QListView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(e, nil, nil) + slotval1 := newQDragMoveEvent(e) gofunc((&QListView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -844,7 +826,7 @@ func miqt_exec_callback_QListView_DragLeaveEvent(self *C.QListView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(e, nil) + slotval1 := newQDragLeaveEvent(e) gofunc((&QListView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -870,7 +852,7 @@ func miqt_exec_callback_QListView_DropEvent(self *C.QListView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(e, nil) + slotval1 := newQDropEvent(e) gofunc((&QListView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -922,7 +904,7 @@ func miqt_exec_callback_QListView_InitViewItemOption(self *C.QListView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) gofunc((&QListView{h: self}).callVirtualBase_InitViewItemOption, slotval1) @@ -948,7 +930,7 @@ func miqt_exec_callback_QListView_PaintEvent(self *C.QListView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QListView{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1287,7 +1269,7 @@ func miqt_exec_callback_QListView_SetModel(self *C.QListView, cb C.intptr_t, mod } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc((&QListView{h: self}).callVirtualBase_SetModel, slotval1) @@ -1313,7 +1295,7 @@ func miqt_exec_callback_QListView_SetSelectionModel(self *C.QListView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QListView{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -1410,7 +1392,7 @@ func miqt_exec_callback_QListView_SizeHintForColumn(self *C.QListView, cb C.intp func (this *QListView) callVirtualBase_ItemDelegateForIndex(index *QModelIndex) *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QListView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer()), nil) + return newQAbstractItemDelegate(C.QListView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer())) } func (this *QListView) OnItemDelegateForIndex(slot func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) { @@ -1659,7 +1641,7 @@ func miqt_exec_callback_QListView_CloseEditor(self *C.QListView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) @@ -1687,7 +1669,7 @@ func miqt_exec_callback_QListView_CommitData(self *C.QListView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc((&QListView{h: self}).callVirtualBase_CommitData, slotval1) @@ -1857,7 +1839,7 @@ func miqt_exec_callback_QListView_MousePressEvent(self *C.QListView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QListView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1883,7 +1865,7 @@ func miqt_exec_callback_QListView_MouseDoubleClickEvent(self *C.QListView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QListView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1909,7 +1891,7 @@ func miqt_exec_callback_QListView_DragEnterEvent(self *C.QListView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QListView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1935,7 +1917,7 @@ func miqt_exec_callback_QListView_FocusInEvent(self *C.QListView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QListView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1961,7 +1943,7 @@ func miqt_exec_callback_QListView_FocusOutEvent(self *C.QListView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QListView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1987,7 +1969,7 @@ func miqt_exec_callback_QListView_KeyPressEvent(self *C.QListView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QListView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -2013,7 +1995,7 @@ func miqt_exec_callback_QListView_InputMethodEvent(self *C.QListView, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QListView{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qlistview.h b/qt6/gen_qlistview.h index 164b982e..7facc7fa 100644 --- a/qt6/gen_qlistview.h +++ b/qt6/gen_qlistview.h @@ -82,8 +82,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QListView_new(QWidget* parent, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QListView_new2(QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QListView* QListView_new(QWidget* parent); +QListView* QListView_new2(); +void QListView_virtbase(QListView* src, QAbstractItemView** outptr_QAbstractItemView); QMetaObject* QListView_MetaObject(const QListView* self); void* QListView_Metacast(QListView* self, const char* param1); struct miqt_string QListView_Tr(const char* s); diff --git a/qt6/gen_qlistwidget.cpp b/qt6/gen_qlistwidget.cpp index a2f540fe..94df01e5 100644 --- a/qt6/gen_qlistwidget.cpp +++ b/qt6/gen_qlistwidget.cpp @@ -206,60 +206,50 @@ public: }; -void QListWidgetItem_new(QListWidgetItem** outptr_QListWidgetItem) { - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(); - *outptr_QListWidgetItem = ret; +QListWidgetItem* QListWidgetItem_new() { + return new MiqtVirtualQListWidgetItem(); } -void QListWidgetItem_new2(struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem) { +QListWidgetItem* QListWidgetItem_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(text_QString); - *outptr_QListWidgetItem = ret; + return new MiqtVirtualQListWidgetItem(text_QString); } -void QListWidgetItem_new3(QIcon* icon, struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem) { +QListWidgetItem* QListWidgetItem_new3(QIcon* icon, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*icon, text_QString); - *outptr_QListWidgetItem = ret; + return new MiqtVirtualQListWidgetItem(*icon, text_QString); } -void QListWidgetItem_new4(QListWidgetItem* other, QListWidgetItem** outptr_QListWidgetItem) { - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*other); - *outptr_QListWidgetItem = ret; +QListWidgetItem* QListWidgetItem_new4(QListWidgetItem* other) { + return new MiqtVirtualQListWidgetItem(*other); } -void QListWidgetItem_new5(QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem) { - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(listview); - *outptr_QListWidgetItem = ret; +QListWidgetItem* QListWidgetItem_new5(QListWidget* listview) { + return new MiqtVirtualQListWidgetItem(listview); } -void QListWidgetItem_new6(QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem) { - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(listview, static_cast(typeVal)); - *outptr_QListWidgetItem = ret; +QListWidgetItem* QListWidgetItem_new6(QListWidget* listview, int typeVal) { + return new MiqtVirtualQListWidgetItem(listview, static_cast(typeVal)); } -void QListWidgetItem_new7(struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem) { +QListWidgetItem* QListWidgetItem_new7(struct miqt_string text, QListWidget* listview) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(text_QString, listview); - *outptr_QListWidgetItem = ret; + return new MiqtVirtualQListWidgetItem(text_QString, listview); } -void QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem) { +QListWidgetItem* QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(text_QString, listview, static_cast(typeVal)); - *outptr_QListWidgetItem = ret; + return new MiqtVirtualQListWidgetItem(text_QString, listview, static_cast(typeVal)); } -void QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem) { +QListWidgetItem* QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*icon, text_QString, listview); - *outptr_QListWidgetItem = ret; + return new MiqtVirtualQListWidgetItem(*icon, text_QString, listview); } -void QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem) { +QListWidgetItem* QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQListWidgetItem* ret = new MiqtVirtualQListWidgetItem(*icon, text_QString, listview, static_cast(typeVal)); - *outptr_QListWidgetItem = ret; + return new MiqtVirtualQListWidgetItem(*icon, text_QString, listview, static_cast(typeVal)); } QListWidgetItem* QListWidgetItem_Clone(const QListWidgetItem* self) { @@ -1526,28 +1516,16 @@ public: }; -void QListWidget_new(QWidget* parent, QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQListWidget* ret = new MiqtVirtualQListWidget(parent); - *outptr_QListWidget = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QListWidget* QListWidget_new(QWidget* parent) { + return new MiqtVirtualQListWidget(parent); } -void QListWidget_new2(QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQListWidget* ret = new MiqtVirtualQListWidget(); - *outptr_QListWidget = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QListWidget* QListWidget_new2() { + return new MiqtVirtualQListWidget(); +} + +void QListWidget_virtbase(QListWidget* src, QListView** outptr_QListView) { + *outptr_QListView = static_cast(src); } QMetaObject* QListWidget_MetaObject(const QListWidget* self) { diff --git a/qt6/gen_qlistwidget.go b/qt6/gen_qlistwidget.go index a8d5a260..68e53fa1 100644 --- a/qt6/gen_qlistwidget.go +++ b/qt6/gen_qlistwidget.go @@ -45,24 +45,19 @@ func newQListWidgetItem(h *C.QListWidgetItem) *QListWidgetItem { if h == nil { return nil } + return &QListWidgetItem{h: h} } // UnsafeNewQListWidgetItem constructs the type using only unsafe pointers. func UnsafeNewQListWidgetItem(h unsafe.Pointer) *QListWidgetItem { - if h == nil { - return nil - } - - return &QListWidgetItem{h: (*C.QListWidgetItem)(h)} + return newQListWidgetItem((*C.QListWidgetItem)(h)) } // NewQListWidgetItem constructs a new QListWidgetItem object. func NewQListWidgetItem() *QListWidgetItem { - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new(&outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new()) ret.isSubclass = true return ret } @@ -73,10 +68,8 @@ func NewQListWidgetItem2(text string) *QListWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new2(text_ms, &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new2(text_ms)) ret.isSubclass = true return ret } @@ -87,40 +80,32 @@ func NewQListWidgetItem3(icon *QIcon, text string) *QListWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new3(icon.cPointer(), text_ms, &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new3(icon.cPointer(), text_ms)) ret.isSubclass = true return ret } // NewQListWidgetItem4 constructs a new QListWidgetItem object. func NewQListWidgetItem4(other *QListWidgetItem) *QListWidgetItem { - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new4(other.cPointer(), &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new4(other.cPointer())) ret.isSubclass = true return ret } // NewQListWidgetItem5 constructs a new QListWidgetItem object. func NewQListWidgetItem5(listview *QListWidget) *QListWidgetItem { - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new5(listview.cPointer(), &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new5(listview.cPointer())) ret.isSubclass = true return ret } // NewQListWidgetItem6 constructs a new QListWidgetItem object. func NewQListWidgetItem6(listview *QListWidget, typeVal int) *QListWidgetItem { - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new6(listview.cPointer(), (C.int)(typeVal), &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new6(listview.cPointer(), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -131,10 +116,8 @@ func NewQListWidgetItem7(text string, listview *QListWidget) *QListWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new7(text_ms, listview.cPointer(), &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new7(text_ms, listview.cPointer())) ret.isSubclass = true return ret } @@ -145,10 +128,8 @@ func NewQListWidgetItem8(text string, listview *QListWidget, typeVal int) *QList text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new8(text_ms, listview.cPointer(), (C.int)(typeVal), &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new8(text_ms, listview.cPointer(), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -159,10 +140,8 @@ func NewQListWidgetItem9(icon *QIcon, text string, listview *QListWidget) *QList text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new9(icon.cPointer(), text_ms, listview.cPointer(), &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new9(icon.cPointer(), text_ms, listview.cPointer())) ret.isSubclass = true return ret } @@ -173,10 +152,8 @@ func NewQListWidgetItem10(icon *QIcon, text string, listview *QListWidget, typeV text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QListWidgetItem *C.QListWidgetItem = nil - C.QListWidgetItem_new10(icon.cPointer(), text_ms, listview.cPointer(), (C.int)(typeVal), &outptr_QListWidgetItem) - ret := newQListWidgetItem(outptr_QListWidgetItem) + ret := newQListWidgetItem(C.QListWidgetItem_new10(icon.cPointer(), text_ms, listview.cPointer(), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -186,7 +163,7 @@ func (this *QListWidgetItem) Clone() *QListWidgetItem { } func (this *QListWidgetItem) ListWidget() *QListWidget { - return newQListWidget(C.QListWidgetItem_ListWidget(this.h), nil, nil, nil, nil, nil, nil, nil) + return newQListWidget(C.QListWidgetItem_ListWidget(this.h)) } func (this *QListWidgetItem) SetSelected(selectVal bool) { @@ -508,7 +485,7 @@ func miqt_exec_callback_QListWidgetItem_Read(self *C.QListWidgetItem, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQDataStream(in, nil) + slotval1 := newQDataStream(in) gofunc((&QListWidgetItem{h: self}).callVirtualBase_Read, slotval1) @@ -534,7 +511,7 @@ func miqt_exec_callback_QListWidgetItem_Write(self *C.QListWidgetItem, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDataStream(out, nil) + slotval1 := newQDataStream(out) gofunc((&QListWidgetItem{h: self}).callVirtualBase_Write, slotval1) @@ -575,54 +552,34 @@ func (this *QListWidget) UnsafePointer() unsafe.Pointer { } // newQListWidget constructs the type using only CGO pointers. -func newQListWidget(h *C.QListWidget, h_QListView *C.QListView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QListWidget { +func newQListWidget(h *C.QListWidget) *QListWidget { if h == nil { return nil } + var outptr_QListView *C.QListView = nil + C.QListWidget_virtbase(h, &outptr_QListView) + return &QListWidget{h: h, - QListView: newQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QListView: newQListView(outptr_QListView)} } // UnsafeNewQListWidget constructs the type using only unsafe pointers. -func UnsafeNewQListWidget(h unsafe.Pointer, h_QListView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QListWidget { - if h == nil { - return nil - } - - return &QListWidget{h: (*C.QListWidget)(h), - QListView: UnsafeNewQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQListWidget(h unsafe.Pointer) *QListWidget { + return newQListWidget((*C.QListWidget)(h)) } // NewQListWidget constructs a new QListWidget object. func NewQListWidget(parent *QWidget) *QListWidget { - var outptr_QListWidget *C.QListWidget = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QListWidget_new(parent.cPointer(), &outptr_QListWidget, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQListWidget(outptr_QListWidget, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQListWidget(C.QListWidget_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQListWidget2 constructs a new QListWidget object. func NewQListWidget2() *QListWidget { - var outptr_QListWidget *C.QListWidget = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QListWidget_new2(&outptr_QListWidget, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQListWidget(outptr_QListWidget, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQListWidget(C.QListWidget_new2()) ret.isSubclass = true return ret } @@ -785,7 +742,7 @@ func (this *QListWidget) IsPersistentEditorOpen(item *QListWidgetItem) bool { } func (this *QListWidget) ItemWidget(item *QListWidgetItem) *QWidget { - return newQWidget(C.QListWidget_ItemWidget(this.h, item.cPointer()), nil, nil) + return newQWidget(C.QListWidget_ItemWidget(this.h, item.cPointer())) } func (this *QListWidget) SetItemWidget(item *QListWidgetItem, widget *QWidget) { @@ -1104,7 +1061,7 @@ func miqt_exec_callback_QListWidget_SetSelectionModel(self *C.QListWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QListWidget{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -1130,7 +1087,7 @@ func miqt_exec_callback_QListWidget_DropEvent(self *C.QListWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QListWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1216,7 +1173,7 @@ func (this *QListWidget) callVirtualBase_MimeData(items []*QListWidgetItem) *QMi } items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} - return newQMimeData(C.QListWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma), nil) + return newQMimeData(C.QListWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma)) } func (this *QListWidget) OnMimeData(slot func(super func(items []*QListWidgetItem) *QMimeData, items []*QListWidgetItem) *QMimeData) { @@ -1270,7 +1227,7 @@ func miqt_exec_callback_QListWidget_DropMimeData(self *C.QListWidget, cb C.intpt // Convert all CABI parameters to Go parameters slotval1 := (int)(index) - slotval2 := newQMimeData(data, nil) + slotval2 := newQMimeData(data) slotval3 := (DropAction)(action) @@ -1615,7 +1572,7 @@ func miqt_exec_callback_QListWidget_MouseMoveEvent(self *C.QListWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1641,7 +1598,7 @@ func miqt_exec_callback_QListWidget_MouseReleaseEvent(self *C.QListWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1667,7 +1624,7 @@ func miqt_exec_callback_QListWidget_WheelEvent(self *C.QListWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1693,7 +1650,7 @@ func miqt_exec_callback_QListWidget_TimerEvent(self *C.QListWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1719,7 +1676,7 @@ func miqt_exec_callback_QListWidget_ResizeEvent(self *C.QListWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1745,7 +1702,7 @@ func miqt_exec_callback_QListWidget_DragMoveEvent(self *C.QListWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(e, nil, nil) + slotval1 := newQDragMoveEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1771,7 +1728,7 @@ func miqt_exec_callback_QListWidget_DragLeaveEvent(self *C.QListWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(e, nil) + slotval1 := newQDragLeaveEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1823,7 +1780,7 @@ func miqt_exec_callback_QListWidget_InitViewItemOption(self *C.QListWidget, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) gofunc((&QListWidget{h: self}).callVirtualBase_InitViewItemOption, slotval1) @@ -1849,7 +1806,7 @@ func miqt_exec_callback_QListWidget_PaintEvent(self *C.QListWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QListWidget{h: self}).callVirtualBase_PaintEvent, slotval1) diff --git a/qt6/gen_qlistwidget.h b/qt6/gen_qlistwidget.h index 5bb28f48..a1f7ee92 100644 --- a/qt6/gen_qlistwidget.h +++ b/qt6/gen_qlistwidget.h @@ -84,16 +84,16 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QListWidgetItem_new(QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new2(struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new3(QIcon* icon, struct miqt_string text, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new4(QListWidgetItem* other, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new5(QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new6(QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new7(struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview, QListWidgetItem** outptr_QListWidgetItem); -void QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal, QListWidgetItem** outptr_QListWidgetItem); +QListWidgetItem* QListWidgetItem_new(); +QListWidgetItem* QListWidgetItem_new2(struct miqt_string text); +QListWidgetItem* QListWidgetItem_new3(QIcon* icon, struct miqt_string text); +QListWidgetItem* QListWidgetItem_new4(QListWidgetItem* other); +QListWidgetItem* QListWidgetItem_new5(QListWidget* listview); +QListWidgetItem* QListWidgetItem_new6(QListWidget* listview, int typeVal); +QListWidgetItem* QListWidgetItem_new7(struct miqt_string text, QListWidget* listview); +QListWidgetItem* QListWidgetItem_new8(struct miqt_string text, QListWidget* listview, int typeVal); +QListWidgetItem* QListWidgetItem_new9(QIcon* icon, struct miqt_string text, QListWidget* listview); +QListWidgetItem* QListWidgetItem_new10(QIcon* icon, struct miqt_string text, QListWidget* listview, int typeVal); QListWidgetItem* QListWidgetItem_Clone(const QListWidgetItem* self); QListWidget* QListWidgetItem_ListWidget(const QListWidgetItem* self); void QListWidgetItem_SetSelected(QListWidgetItem* self, bool selectVal); @@ -147,8 +147,9 @@ void QListWidgetItem_override_virtual_Write(void* self, intptr_t slot); void QListWidgetItem_virtualbase_Write(const void* self, QDataStream* out); void QListWidgetItem_Delete(QListWidgetItem* self, bool isSubclass); -void QListWidget_new(QWidget* parent, QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QListWidget_new2(QListWidget** outptr_QListWidget, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QListWidget* QListWidget_new(QWidget* parent); +QListWidget* QListWidget_new2(); +void QListWidget_virtbase(QListWidget* src, QListView** outptr_QListView); QMetaObject* QListWidget_MetaObject(const QListWidget* self); void* QListWidget_Metacast(QListWidget* self, const char* param1); struct miqt_string QListWidget_Tr(const char* s); diff --git a/qt6/gen_qlocale.cpp b/qt6/gen_qlocale.cpp index 762c183a..6c2d4656 100644 --- a/qt6/gen_qlocale.cpp +++ b/qt6/gen_qlocale.cpp @@ -11,40 +11,33 @@ #include "gen_qlocale.h" #include "_cgo_export.h" -void QLocale_new(QLocale** outptr_QLocale) { - QLocale* ret = new QLocale(); - *outptr_QLocale = ret; +QLocale* QLocale_new() { + return new QLocale(); } -void QLocale_new2(struct miqt_string name, QLocale** outptr_QLocale) { +QLocale* QLocale_new2(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - QLocale* ret = new QLocale(name_QString); - *outptr_QLocale = ret; + return new QLocale(name_QString); } -void QLocale_new3(uint16_t language, uint16_t territory, QLocale** outptr_QLocale) { - QLocale* ret = new QLocale(static_cast(language), static_cast(territory)); - *outptr_QLocale = ret; +QLocale* QLocale_new3(uint16_t language, uint16_t territory) { + return new QLocale(static_cast(language), static_cast(territory)); } -void QLocale_new4(uint16_t language, QLocale** outptr_QLocale) { - QLocale* ret = new QLocale(static_cast(language)); - *outptr_QLocale = ret; +QLocale* QLocale_new4(uint16_t language) { + return new QLocale(static_cast(language)); } -void QLocale_new5(QLocale* other, QLocale** outptr_QLocale) { - QLocale* ret = new QLocale(*other); - *outptr_QLocale = ret; +QLocale* QLocale_new5(QLocale* other) { + return new QLocale(*other); } -void QLocale_new6(uint16_t language, uint16_t script, QLocale** outptr_QLocale) { - QLocale* ret = new QLocale(static_cast(language), static_cast(script)); - *outptr_QLocale = ret; +QLocale* QLocale_new6(uint16_t language, uint16_t script) { + return new QLocale(static_cast(language), static_cast(script)); } -void QLocale_new7(uint16_t language, uint16_t script, uint16_t territory, QLocale** outptr_QLocale) { - QLocale* ret = new QLocale(static_cast(language), static_cast(script), static_cast(territory)); - *outptr_QLocale = ret; +QLocale* QLocale_new7(uint16_t language, uint16_t script, uint16_t territory) { + return new QLocale(static_cast(language), static_cast(script), static_cast(territory)); } void QLocale_OperatorAssign(QLocale* self, QLocale* other) { diff --git a/qt6/gen_qlocale.go b/qt6/gen_qlocale.go index ae33a404..e004b089 100644 --- a/qt6/gen_qlocale.go +++ b/qt6/gen_qlocale.go @@ -913,24 +913,19 @@ func newQLocale(h *C.QLocale) *QLocale { if h == nil { return nil } + return &QLocale{h: h} } // UnsafeNewQLocale constructs the type using only unsafe pointers. func UnsafeNewQLocale(h unsafe.Pointer) *QLocale { - if h == nil { - return nil - } - - return &QLocale{h: (*C.QLocale)(h)} + return newQLocale((*C.QLocale)(h)) } // NewQLocale constructs a new QLocale object. func NewQLocale() *QLocale { - var outptr_QLocale *C.QLocale = nil - C.QLocale_new(&outptr_QLocale) - ret := newQLocale(outptr_QLocale) + ret := newQLocale(C.QLocale_new()) ret.isSubclass = true return ret } @@ -941,60 +936,48 @@ func NewQLocale2(name string) *QLocale { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QLocale *C.QLocale = nil - C.QLocale_new2(name_ms, &outptr_QLocale) - ret := newQLocale(outptr_QLocale) + ret := newQLocale(C.QLocale_new2(name_ms)) ret.isSubclass = true return ret } // NewQLocale3 constructs a new QLocale object. func NewQLocale3(language QLocale__Language, territory QLocale__Country) *QLocale { - var outptr_QLocale *C.QLocale = nil - C.QLocale_new3((C.uint16_t)(language), (C.uint16_t)(territory), &outptr_QLocale) - ret := newQLocale(outptr_QLocale) + ret := newQLocale(C.QLocale_new3((C.uint16_t)(language), (C.uint16_t)(territory))) ret.isSubclass = true return ret } // NewQLocale4 constructs a new QLocale object. func NewQLocale4(language QLocale__Language) *QLocale { - var outptr_QLocale *C.QLocale = nil - C.QLocale_new4((C.uint16_t)(language), &outptr_QLocale) - ret := newQLocale(outptr_QLocale) + ret := newQLocale(C.QLocale_new4((C.uint16_t)(language))) ret.isSubclass = true return ret } // NewQLocale5 constructs a new QLocale object. func NewQLocale5(other *QLocale) *QLocale { - var outptr_QLocale *C.QLocale = nil - C.QLocale_new5(other.cPointer(), &outptr_QLocale) - ret := newQLocale(outptr_QLocale) + ret := newQLocale(C.QLocale_new5(other.cPointer())) ret.isSubclass = true return ret } // NewQLocale6 constructs a new QLocale object. func NewQLocale6(language QLocale__Language, script QLocale__Script) *QLocale { - var outptr_QLocale *C.QLocale = nil - C.QLocale_new6((C.uint16_t)(language), (C.uint16_t)(script), &outptr_QLocale) - ret := newQLocale(outptr_QLocale) + ret := newQLocale(C.QLocale_new6((C.uint16_t)(language), (C.uint16_t)(script))) ret.isSubclass = true return ret } // NewQLocale7 constructs a new QLocale object. func NewQLocale7(language QLocale__Language, script QLocale__Script, territory QLocale__Country) *QLocale { - var outptr_QLocale *C.QLocale = nil - C.QLocale_new7((C.uint16_t)(language), (C.uint16_t)(script), (C.uint16_t)(territory), &outptr_QLocale) - ret := newQLocale(outptr_QLocale) + ret := newQLocale(C.QLocale_new7((C.uint16_t)(language), (C.uint16_t)(script), (C.uint16_t)(territory))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qlocale.h b/qt6/gen_qlocale.h index 2d7f3487..f302637b 100644 --- a/qt6/gen_qlocale.h +++ b/qt6/gen_qlocale.h @@ -28,13 +28,13 @@ typedef struct QLocale QLocale; typedef struct QTime QTime; #endif -void QLocale_new(QLocale** outptr_QLocale); -void QLocale_new2(struct miqt_string name, QLocale** outptr_QLocale); -void QLocale_new3(uint16_t language, uint16_t territory, QLocale** outptr_QLocale); -void QLocale_new4(uint16_t language, QLocale** outptr_QLocale); -void QLocale_new5(QLocale* other, QLocale** outptr_QLocale); -void QLocale_new6(uint16_t language, uint16_t script, QLocale** outptr_QLocale); -void QLocale_new7(uint16_t language, uint16_t script, uint16_t territory, QLocale** outptr_QLocale); +QLocale* QLocale_new(); +QLocale* QLocale_new2(struct miqt_string name); +QLocale* QLocale_new3(uint16_t language, uint16_t territory); +QLocale* QLocale_new4(uint16_t language); +QLocale* QLocale_new5(QLocale* other); +QLocale* QLocale_new6(uint16_t language, uint16_t script); +QLocale* QLocale_new7(uint16_t language, uint16_t script, uint16_t territory); void QLocale_OperatorAssign(QLocale* self, QLocale* other); void QLocale_Swap(QLocale* self, QLocale* other); uint16_t QLocale_Language(const QLocale* self); diff --git a/qt6/gen_qlockfile.cpp b/qt6/gen_qlockfile.cpp index 3f3e5ce0..25b81195 100644 --- a/qt6/gen_qlockfile.cpp +++ b/qt6/gen_qlockfile.cpp @@ -6,10 +6,9 @@ #include "gen_qlockfile.h" #include "_cgo_export.h" -void QLockFile_new(struct miqt_string fileName, QLockFile** outptr_QLockFile) { +QLockFile* QLockFile_new(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QLockFile* ret = new QLockFile(fileName_QString); - *outptr_QLockFile = ret; + return new QLockFile(fileName_QString); } struct miqt_string QLockFile_FileName(const QLockFile* self) { diff --git a/qt6/gen_qlockfile.go b/qt6/gen_qlockfile.go index 4430447e..0dbbe8a3 100644 --- a/qt6/gen_qlockfile.go +++ b/qt6/gen_qlockfile.go @@ -46,16 +46,13 @@ func newQLockFile(h *C.QLockFile) *QLockFile { if h == nil { return nil } + return &QLockFile{h: h} } // UnsafeNewQLockFile constructs the type using only unsafe pointers. func UnsafeNewQLockFile(h unsafe.Pointer) *QLockFile { - if h == nil { - return nil - } - - return &QLockFile{h: (*C.QLockFile)(h)} + return newQLockFile((*C.QLockFile)(h)) } // NewQLockFile constructs a new QLockFile object. @@ -64,10 +61,8 @@ func NewQLockFile(fileName string) *QLockFile { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QLockFile *C.QLockFile = nil - C.QLockFile_new(fileName_ms, &outptr_QLockFile) - ret := newQLockFile(outptr_QLockFile) + ret := newQLockFile(C.QLockFile_new(fileName_ms)) ret.isSubclass = true return ret } diff --git a/qt6/gen_qlockfile.h b/qt6/gen_qlockfile.h index f74c5204..52e64a9e 100644 --- a/qt6/gen_qlockfile.h +++ b/qt6/gen_qlockfile.h @@ -20,7 +20,7 @@ class QLockFile; typedef struct QLockFile QLockFile; #endif -void QLockFile_new(struct miqt_string fileName, QLockFile** outptr_QLockFile); +QLockFile* QLockFile_new(struct miqt_string fileName); struct miqt_string QLockFile_FileName(const QLockFile* self); bool QLockFile_Lock(QLockFile* self); bool QLockFile_TryLock(QLockFile* self); diff --git a/qt6/gen_qloggingcategory.cpp b/qt6/gen_qloggingcategory.cpp index e9926534..6dcdc369 100644 --- a/qt6/gen_qloggingcategory.cpp +++ b/qt6/gen_qloggingcategory.cpp @@ -6,9 +6,8 @@ #include "gen_qloggingcategory.h" #include "_cgo_export.h" -void QLoggingCategory_new(const char* category, QLoggingCategory** outptr_QLoggingCategory) { - QLoggingCategory* ret = new QLoggingCategory(category); - *outptr_QLoggingCategory = ret; +QLoggingCategory* QLoggingCategory_new(const char* category) { + return new QLoggingCategory(category); } bool QLoggingCategory_IsDebugEnabled(const QLoggingCategory* self) { diff --git a/qt6/gen_qloggingcategory.go b/qt6/gen_qloggingcategory.go index cceb2b95..197dec9e 100644 --- a/qt6/gen_qloggingcategory.go +++ b/qt6/gen_qloggingcategory.go @@ -37,26 +37,21 @@ func newQLoggingCategory(h *C.QLoggingCategory) *QLoggingCategory { if h == nil { return nil } + return &QLoggingCategory{h: h} } // UnsafeNewQLoggingCategory constructs the type using only unsafe pointers. func UnsafeNewQLoggingCategory(h unsafe.Pointer) *QLoggingCategory { - if h == nil { - return nil - } - - return &QLoggingCategory{h: (*C.QLoggingCategory)(h)} + return newQLoggingCategory((*C.QLoggingCategory)(h)) } // NewQLoggingCategory constructs a new QLoggingCategory object. func NewQLoggingCategory(category string) *QLoggingCategory { category_Cstring := C.CString(category) defer C.free(unsafe.Pointer(category_Cstring)) - var outptr_QLoggingCategory *C.QLoggingCategory = nil - C.QLoggingCategory_new(category_Cstring, &outptr_QLoggingCategory) - ret := newQLoggingCategory(outptr_QLoggingCategory) + ret := newQLoggingCategory(C.QLoggingCategory_new(category_Cstring)) ret.isSubclass = true return ret } diff --git a/qt6/gen_qloggingcategory.h b/qt6/gen_qloggingcategory.h index 9415c5f5..7aa37ee3 100644 --- a/qt6/gen_qloggingcategory.h +++ b/qt6/gen_qloggingcategory.h @@ -20,7 +20,7 @@ class QLoggingCategory; typedef struct QLoggingCategory QLoggingCategory; #endif -void QLoggingCategory_new(const char* category, QLoggingCategory** outptr_QLoggingCategory); +QLoggingCategory* QLoggingCategory_new(const char* category); bool QLoggingCategory_IsDebugEnabled(const QLoggingCategory* self); bool QLoggingCategory_IsInfoEnabled(const QLoggingCategory* self); bool QLoggingCategory_IsWarningEnabled(const QLoggingCategory* self); diff --git a/qt6/gen_qmainwindow.cpp b/qt6/gen_qmainwindow.cpp index 4844bd65..7a6643dd 100644 --- a/qt6/gen_qmainwindow.cpp +++ b/qt6/gen_qmainwindow.cpp @@ -1051,28 +1051,20 @@ public: }; -void QMainWindow_new(QWidget* parent, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMainWindow* ret = new MiqtVirtualQMainWindow(parent); - *outptr_QMainWindow = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMainWindow* QMainWindow_new(QWidget* parent) { + return new MiqtVirtualQMainWindow(parent); } -void QMainWindow_new2(QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMainWindow* ret = new MiqtVirtualQMainWindow(); - *outptr_QMainWindow = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMainWindow* QMainWindow_new2() { + return new MiqtVirtualQMainWindow(); } -void QMainWindow_new3(QWidget* parent, int flags, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMainWindow* ret = new MiqtVirtualQMainWindow(parent, static_cast(flags)); - *outptr_QMainWindow = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMainWindow* QMainWindow_new3(QWidget* parent, int flags) { + return new MiqtVirtualQMainWindow(parent, static_cast(flags)); +} + +void QMainWindow_virtbase(QMainWindow* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QMainWindow_MetaObject(const QMainWindow* self) { diff --git a/qt6/gen_qmainwindow.go b/qt6/gen_qmainwindow.go index b6811332..5242cba2 100644 --- a/qt6/gen_qmainwindow.go +++ b/qt6/gen_qmainwindow.go @@ -46,59 +46,42 @@ func (this *QMainWindow) UnsafePointer() unsafe.Pointer { } // newQMainWindow constructs the type using only CGO pointers. -func newQMainWindow(h *C.QMainWindow, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMainWindow { +func newQMainWindow(h *C.QMainWindow) *QMainWindow { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QMainWindow_virtbase(h, &outptr_QWidget) + return &QMainWindow{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQMainWindow constructs the type using only unsafe pointers. -func UnsafeNewQMainWindow(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMainWindow { - if h == nil { - return nil - } - - return &QMainWindow{h: (*C.QMainWindow)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQMainWindow(h unsafe.Pointer) *QMainWindow { + return newQMainWindow((*C.QMainWindow)(h)) } // NewQMainWindow constructs a new QMainWindow object. func NewQMainWindow(parent *QWidget) *QMainWindow { - var outptr_QMainWindow *C.QMainWindow = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMainWindow_new(parent.cPointer(), &outptr_QMainWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMainWindow(outptr_QMainWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMainWindow(C.QMainWindow_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQMainWindow2 constructs a new QMainWindow object. func NewQMainWindow2() *QMainWindow { - var outptr_QMainWindow *C.QMainWindow = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMainWindow_new2(&outptr_QMainWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMainWindow(outptr_QMainWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMainWindow(C.QMainWindow_new2()) ret.isSubclass = true return ret } // NewQMainWindow3 constructs a new QMainWindow object. func NewQMainWindow3(parent *QWidget, flags WindowType) *QMainWindow { - var outptr_QMainWindow *C.QMainWindow = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMainWindow_new3(parent.cPointer(), (C.int)(flags), &outptr_QMainWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMainWindow(outptr_QMainWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMainWindow(C.QMainWindow_new3(parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -185,7 +168,7 @@ func (this *QMainWindow) IsSeparator(pos *QPoint) bool { } func (this *QMainWindow) MenuBar() *QMenuBar { - return newQMenuBar(C.QMainWindow_MenuBar(this.h), nil, nil, nil) + return newQMenuBar(C.QMainWindow_MenuBar(this.h)) } func (this *QMainWindow) SetMenuBar(menubar *QMenuBar) { @@ -193,7 +176,7 @@ func (this *QMainWindow) SetMenuBar(menubar *QMenuBar) { } func (this *QMainWindow) MenuWidget() *QWidget { - return newQWidget(C.QMainWindow_MenuWidget(this.h), nil, nil) + return newQWidget(C.QMainWindow_MenuWidget(this.h)) } func (this *QMainWindow) SetMenuWidget(menubar *QWidget) { @@ -201,7 +184,7 @@ func (this *QMainWindow) SetMenuWidget(menubar *QWidget) { } func (this *QMainWindow) StatusBar() *QStatusBar { - return newQStatusBar(C.QMainWindow_StatusBar(this.h), nil, nil, nil) + return newQStatusBar(C.QMainWindow_StatusBar(this.h)) } func (this *QMainWindow) SetStatusBar(statusbar *QStatusBar) { @@ -209,7 +192,7 @@ func (this *QMainWindow) SetStatusBar(statusbar *QStatusBar) { } func (this *QMainWindow) CentralWidget() *QWidget { - return newQWidget(C.QMainWindow_CentralWidget(this.h), nil, nil) + return newQWidget(C.QMainWindow_CentralWidget(this.h)) } func (this *QMainWindow) SetCentralWidget(widget *QWidget) { @@ -217,7 +200,7 @@ func (this *QMainWindow) SetCentralWidget(widget *QWidget) { } func (this *QMainWindow) TakeCentralWidget() *QWidget { - return newQWidget(C.QMainWindow_TakeCentralWidget(this.h), nil, nil) + return newQWidget(C.QMainWindow_TakeCentralWidget(this.h)) } func (this *QMainWindow) SetCorner(corner Corner, area DockWidgetArea) { @@ -249,7 +232,7 @@ func (this *QMainWindow) AddToolBarWithTitle(title string) *QToolBar { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return newQToolBar(C.QMainWindow_AddToolBarWithTitle(this.h, title_ms), nil, nil, nil) + return newQToolBar(C.QMainWindow_AddToolBarWithTitle(this.h, title_ms)) } func (this *QMainWindow) InsertToolBar(before *QToolBar, toolbar *QToolBar) { @@ -297,7 +280,7 @@ func (this *QMainWindow) TabifiedDockWidgets(dockwidget *QDockWidget) []*QDockWi _ret := make([]*QDockWidget, int(_ma.len)) _outCast := (*[0xffff]*C.QDockWidget)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQDockWidget(_outCast[i], nil, nil, nil) + _ret[i] = newQDockWidget(_outCast[i]) } return _ret } @@ -345,7 +328,7 @@ func (this *QMainWindow) RestoreState(state []byte) bool { } func (this *QMainWindow) CreatePopupMenu() *QMenu { - return newQMenu(C.QMainWindow_CreatePopupMenu(this.h), nil, nil, nil) + return newQMenu(C.QMainWindow_CreatePopupMenu(this.h)) } func (this *QMainWindow) SetAnimated(enabled bool) { @@ -415,7 +398,7 @@ func miqt_exec_callback_QMainWindow_TabifiedDockWidgetActivated(cb C.intptr_t, d } // Convert all CABI parameters to Go parameters - slotval1 := newQDockWidget(dockWidget, nil, nil, nil) + slotval1 := newQDockWidget(dockWidget) gofunc(slotval1) } @@ -462,7 +445,7 @@ func (this *QMainWindow) RestoreState2(state []byte, version int) bool { func (this *QMainWindow) callVirtualBase_CreatePopupMenu() *QMenu { - return newQMenu(C.QMainWindow_virtualbase_CreatePopupMenu(unsafe.Pointer(this.h)), nil, nil, nil) + return newQMenu(C.QMainWindow_virtualbase_CreatePopupMenu(unsafe.Pointer(this.h))) } func (this *QMainWindow) OnCreatePopupMenu(slot func(super func() *QMenu) *QMenu) { @@ -505,7 +488,7 @@ func miqt_exec_callback_QMainWindow_ContextMenuEvent(self *C.QMainWindow, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -742,7 +725,7 @@ func miqt_exec_callback_QMainWindow_MousePressEvent(self *C.QMainWindow, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -768,7 +751,7 @@ func miqt_exec_callback_QMainWindow_MouseReleaseEvent(self *C.QMainWindow, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -794,7 +777,7 @@ func miqt_exec_callback_QMainWindow_MouseDoubleClickEvent(self *C.QMainWindow, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -820,7 +803,7 @@ func miqt_exec_callback_QMainWindow_MouseMoveEvent(self *C.QMainWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -846,7 +829,7 @@ func miqt_exec_callback_QMainWindow_WheelEvent(self *C.QMainWindow, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -872,7 +855,7 @@ func miqt_exec_callback_QMainWindow_KeyPressEvent(self *C.QMainWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -898,7 +881,7 @@ func miqt_exec_callback_QMainWindow_KeyReleaseEvent(self *C.QMainWindow, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -924,7 +907,7 @@ func miqt_exec_callback_QMainWindow_FocusInEvent(self *C.QMainWindow, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -950,7 +933,7 @@ func miqt_exec_callback_QMainWindow_FocusOutEvent(self *C.QMainWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -976,7 +959,7 @@ func miqt_exec_callback_QMainWindow_EnterEvent(self *C.QMainWindow, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -1028,7 +1011,7 @@ func miqt_exec_callback_QMainWindow_PaintEvent(self *C.QMainWindow, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1054,7 +1037,7 @@ func miqt_exec_callback_QMainWindow_MoveEvent(self *C.QMainWindow, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1080,7 +1063,7 @@ func miqt_exec_callback_QMainWindow_ResizeEvent(self *C.QMainWindow, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1106,7 +1089,7 @@ func miqt_exec_callback_QMainWindow_CloseEvent(self *C.QMainWindow, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1132,7 +1115,7 @@ func miqt_exec_callback_QMainWindow_TabletEvent(self *C.QMainWindow, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1158,7 +1141,7 @@ func miqt_exec_callback_QMainWindow_ActionEvent(self *C.QMainWindow, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1184,7 +1167,7 @@ func miqt_exec_callback_QMainWindow_DragEnterEvent(self *C.QMainWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1210,7 +1193,7 @@ func miqt_exec_callback_QMainWindow_DragMoveEvent(self *C.QMainWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1236,7 +1219,7 @@ func miqt_exec_callback_QMainWindow_DragLeaveEvent(self *C.QMainWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1262,7 +1245,7 @@ func miqt_exec_callback_QMainWindow_DropEvent(self *C.QMainWindow, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1288,7 +1271,7 @@ func miqt_exec_callback_QMainWindow_ShowEvent(self *C.QMainWindow, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1314,7 +1297,7 @@ func miqt_exec_callback_QMainWindow_HideEvent(self *C.QMainWindow, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QMainWindow{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1510,7 +1493,7 @@ func miqt_exec_callback_QMainWindow_InputMethodEvent(self *C.QMainWindow, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QMainWindow{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qmainwindow.h b/qt6/gen_qmainwindow.h index 0ae8ddfd..96da26b9 100644 --- a/qt6/gen_qmainwindow.h +++ b/qt6/gen_qmainwindow.h @@ -88,9 +88,10 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QMainWindow_new(QWidget* parent, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMainWindow_new2(QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMainWindow_new3(QWidget* parent, int flags, QMainWindow** outptr_QMainWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMainWindow* QMainWindow_new(QWidget* parent); +QMainWindow* QMainWindow_new2(); +QMainWindow* QMainWindow_new3(QWidget* parent, int flags); +void QMainWindow_virtbase(QMainWindow* src, QWidget** outptr_QWidget); QMetaObject* QMainWindow_MetaObject(const QMainWindow* self); void* QMainWindow_Metacast(QMainWindow* self, const char* param1); struct miqt_string QMainWindow_Tr(const char* s); diff --git a/qt6/gen_qmargins.cpp b/qt6/gen_qmargins.cpp index b5d4f963..db2ece08 100644 --- a/qt6/gen_qmargins.cpp +++ b/qt6/gen_qmargins.cpp @@ -4,19 +4,16 @@ #include "gen_qmargins.h" #include "_cgo_export.h" -void QMargins_new(QMargins** outptr_QMargins) { - QMargins* ret = new QMargins(); - *outptr_QMargins = ret; +QMargins* QMargins_new() { + return new QMargins(); } -void QMargins_new2(int left, int top, int right, int bottom, QMargins** outptr_QMargins) { - QMargins* ret = new QMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); - *outptr_QMargins = ret; +QMargins* QMargins_new2(int left, int top, int right, int bottom) { + return new QMargins(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); } -void QMargins_new3(QMargins* param1, QMargins** outptr_QMargins) { - QMargins* ret = new QMargins(*param1); - *outptr_QMargins = ret; +QMargins* QMargins_new3(QMargins* param1) { + return new QMargins(*param1); } bool QMargins_IsNull(const QMargins* self) { @@ -115,24 +112,20 @@ void QMargins_Delete(QMargins* self, bool isSubclass) { } } -void QMarginsF_new(QMarginsF** outptr_QMarginsF) { - QMarginsF* ret = new QMarginsF(); - *outptr_QMarginsF = ret; +QMarginsF* QMarginsF_new() { + return new QMarginsF(); } -void QMarginsF_new2(double left, double top, double right, double bottom, QMarginsF** outptr_QMarginsF) { - QMarginsF* ret = new QMarginsF(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); - *outptr_QMarginsF = ret; +QMarginsF* QMarginsF_new2(double left, double top, double right, double bottom) { + return new QMarginsF(static_cast(left), static_cast(top), static_cast(right), static_cast(bottom)); } -void QMarginsF_new3(QMargins* margins, QMarginsF** outptr_QMarginsF) { - QMarginsF* ret = new QMarginsF(*margins); - *outptr_QMarginsF = ret; +QMarginsF* QMarginsF_new3(QMargins* margins) { + return new QMarginsF(*margins); } -void QMarginsF_new4(QMarginsF* param1, QMarginsF** outptr_QMarginsF) { - QMarginsF* ret = new QMarginsF(*param1); - *outptr_QMarginsF = ret; +QMarginsF* QMarginsF_new4(QMarginsF* param1) { + return new QMarginsF(*param1); } bool QMarginsF_IsNull(const QMarginsF* self) { diff --git a/qt6/gen_qmargins.go b/qt6/gen_qmargins.go index 288d40de..500773f9 100644 --- a/qt6/gen_qmargins.go +++ b/qt6/gen_qmargins.go @@ -37,44 +37,35 @@ func newQMargins(h *C.QMargins) *QMargins { if h == nil { return nil } + return &QMargins{h: h} } // UnsafeNewQMargins constructs the type using only unsafe pointers. func UnsafeNewQMargins(h unsafe.Pointer) *QMargins { - if h == nil { - return nil - } - - return &QMargins{h: (*C.QMargins)(h)} + return newQMargins((*C.QMargins)(h)) } // NewQMargins constructs a new QMargins object. func NewQMargins() *QMargins { - var outptr_QMargins *C.QMargins = nil - C.QMargins_new(&outptr_QMargins) - ret := newQMargins(outptr_QMargins) + ret := newQMargins(C.QMargins_new()) ret.isSubclass = true return ret } // NewQMargins2 constructs a new QMargins object. func NewQMargins2(left int, top int, right int, bottom int) *QMargins { - var outptr_QMargins *C.QMargins = nil - C.QMargins_new2((C.int)(left), (C.int)(top), (C.int)(right), (C.int)(bottom), &outptr_QMargins) - ret := newQMargins(outptr_QMargins) + ret := newQMargins(C.QMargins_new2((C.int)(left), (C.int)(top), (C.int)(right), (C.int)(bottom))) ret.isSubclass = true return ret } // NewQMargins3 constructs a new QMargins object. func NewQMargins3(param1 *QMargins) *QMargins { - var outptr_QMargins *C.QMargins = nil - C.QMargins_new3(param1.cPointer(), &outptr_QMargins) - ret := newQMargins(outptr_QMargins) + ret := newQMargins(C.QMargins_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -191,54 +182,43 @@ func newQMarginsF(h *C.QMarginsF) *QMarginsF { if h == nil { return nil } + return &QMarginsF{h: h} } // UnsafeNewQMarginsF constructs the type using only unsafe pointers. func UnsafeNewQMarginsF(h unsafe.Pointer) *QMarginsF { - if h == nil { - return nil - } - - return &QMarginsF{h: (*C.QMarginsF)(h)} + return newQMarginsF((*C.QMarginsF)(h)) } // NewQMarginsF constructs a new QMarginsF object. func NewQMarginsF() *QMarginsF { - var outptr_QMarginsF *C.QMarginsF = nil - C.QMarginsF_new(&outptr_QMarginsF) - ret := newQMarginsF(outptr_QMarginsF) + ret := newQMarginsF(C.QMarginsF_new()) ret.isSubclass = true return ret } // NewQMarginsF2 constructs a new QMarginsF object. func NewQMarginsF2(left float64, top float64, right float64, bottom float64) *QMarginsF { - var outptr_QMarginsF *C.QMarginsF = nil - C.QMarginsF_new2((C.double)(left), (C.double)(top), (C.double)(right), (C.double)(bottom), &outptr_QMarginsF) - ret := newQMarginsF(outptr_QMarginsF) + ret := newQMarginsF(C.QMarginsF_new2((C.double)(left), (C.double)(top), (C.double)(right), (C.double)(bottom))) ret.isSubclass = true return ret } // NewQMarginsF3 constructs a new QMarginsF object. func NewQMarginsF3(margins *QMargins) *QMarginsF { - var outptr_QMarginsF *C.QMarginsF = nil - C.QMarginsF_new3(margins.cPointer(), &outptr_QMarginsF) - ret := newQMarginsF(outptr_QMarginsF) + ret := newQMarginsF(C.QMarginsF_new3(margins.cPointer())) ret.isSubclass = true return ret } // NewQMarginsF4 constructs a new QMarginsF object. func NewQMarginsF4(param1 *QMarginsF) *QMarginsF { - var outptr_QMarginsF *C.QMarginsF = nil - C.QMarginsF_new4(param1.cPointer(), &outptr_QMarginsF) - ret := newQMarginsF(outptr_QMarginsF) + ret := newQMarginsF(C.QMarginsF_new4(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qmargins.h b/qt6/gen_qmargins.h index 5f3d4281..a35a3a6d 100644 --- a/qt6/gen_qmargins.h +++ b/qt6/gen_qmargins.h @@ -22,9 +22,9 @@ typedef struct QMargins QMargins; typedef struct QMarginsF QMarginsF; #endif -void QMargins_new(QMargins** outptr_QMargins); -void QMargins_new2(int left, int top, int right, int bottom, QMargins** outptr_QMargins); -void QMargins_new3(QMargins* param1, QMargins** outptr_QMargins); +QMargins* QMargins_new(); +QMargins* QMargins_new2(int left, int top, int right, int bottom); +QMargins* QMargins_new3(QMargins* param1); bool QMargins_IsNull(const QMargins* self); int QMargins_Left(const QMargins* self); int QMargins_Top(const QMargins* self); @@ -45,10 +45,10 @@ QMargins* QMargins_OperatorDivideAssignWithQreal(QMargins* self, double param1); QMarginsF* QMargins_ToMarginsF(const QMargins* self); void QMargins_Delete(QMargins* self, bool isSubclass); -void QMarginsF_new(QMarginsF** outptr_QMarginsF); -void QMarginsF_new2(double left, double top, double right, double bottom, QMarginsF** outptr_QMarginsF); -void QMarginsF_new3(QMargins* margins, QMarginsF** outptr_QMarginsF); -void QMarginsF_new4(QMarginsF* param1, QMarginsF** outptr_QMarginsF); +QMarginsF* QMarginsF_new(); +QMarginsF* QMarginsF_new2(double left, double top, double right, double bottom); +QMarginsF* QMarginsF_new3(QMargins* margins); +QMarginsF* QMarginsF_new4(QMarginsF* param1); bool QMarginsF_IsNull(const QMarginsF* self); double QMarginsF_Left(const QMarginsF* self); double QMarginsF_Top(const QMarginsF* self); diff --git a/qt6/gen_qmatrix4x4.cpp b/qt6/gen_qmatrix4x4.cpp index ae2ec2d8..a304c555 100644 --- a/qt6/gen_qmatrix4x4.cpp +++ b/qt6/gen_qmatrix4x4.cpp @@ -11,39 +11,32 @@ #include "gen_qmatrix4x4.h" #include "_cgo_export.h" -void QMatrix4x4_new(QMatrix4x4** outptr_QMatrix4x4) { - QMatrix4x4* ret = new QMatrix4x4(); - *outptr_QMatrix4x4 = ret; +QMatrix4x4* QMatrix4x4_new() { + return new QMatrix4x4(); } -void QMatrix4x4_new2(int param1, QMatrix4x4** outptr_QMatrix4x4) { - QMatrix4x4* ret = new QMatrix4x4(static_cast(param1)); - *outptr_QMatrix4x4 = ret; +QMatrix4x4* QMatrix4x4_new2(int param1) { + return new QMatrix4x4(static_cast(param1)); } -void QMatrix4x4_new3(const float* values, QMatrix4x4** outptr_QMatrix4x4) { - QMatrix4x4* ret = new QMatrix4x4(static_cast(values)); - *outptr_QMatrix4x4 = ret; +QMatrix4x4* QMatrix4x4_new3(const float* values) { + return new QMatrix4x4(static_cast(values)); } -void QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44, QMatrix4x4** outptr_QMatrix4x4) { - QMatrix4x4* ret = new QMatrix4x4(static_cast(m11), static_cast(m12), static_cast(m13), static_cast(m14), static_cast(m21), static_cast(m22), static_cast(m23), static_cast(m24), static_cast(m31), static_cast(m32), static_cast(m33), static_cast(m34), static_cast(m41), static_cast(m42), static_cast(m43), static_cast(m44)); - *outptr_QMatrix4x4 = ret; +QMatrix4x4* QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) { + return new QMatrix4x4(static_cast(m11), static_cast(m12), static_cast(m13), static_cast(m14), static_cast(m21), static_cast(m22), static_cast(m23), static_cast(m24), static_cast(m31), static_cast(m32), static_cast(m33), static_cast(m34), static_cast(m41), static_cast(m42), static_cast(m43), static_cast(m44)); } -void QMatrix4x4_new5(const float* values, int cols, int rows, QMatrix4x4** outptr_QMatrix4x4) { - QMatrix4x4* ret = new QMatrix4x4(static_cast(values), static_cast(cols), static_cast(rows)); - *outptr_QMatrix4x4 = ret; +QMatrix4x4* QMatrix4x4_new5(const float* values, int cols, int rows) { + return new QMatrix4x4(static_cast(values), static_cast(cols), static_cast(rows)); } -void QMatrix4x4_new6(QTransform* transform, QMatrix4x4** outptr_QMatrix4x4) { - QMatrix4x4* ret = new QMatrix4x4(*transform); - *outptr_QMatrix4x4 = ret; +QMatrix4x4* QMatrix4x4_new6(QTransform* transform) { + return new QMatrix4x4(*transform); } -void QMatrix4x4_new7(QMatrix4x4* param1, QMatrix4x4** outptr_QMatrix4x4) { - QMatrix4x4* ret = new QMatrix4x4(*param1); - *outptr_QMatrix4x4 = ret; +QMatrix4x4* QMatrix4x4_new7(QMatrix4x4* param1) { + return new QMatrix4x4(*param1); } QVector4D* QMatrix4x4_Column(const QMatrix4x4* self, int index) { diff --git a/qt6/gen_qmatrix4x4.go b/qt6/gen_qmatrix4x4.go index ec78c013..e6002203 100644 --- a/qt6/gen_qmatrix4x4.go +++ b/qt6/gen_qmatrix4x4.go @@ -49,84 +49,67 @@ func newQMatrix4x4(h *C.QMatrix4x4) *QMatrix4x4 { if h == nil { return nil } + return &QMatrix4x4{h: h} } // UnsafeNewQMatrix4x4 constructs the type using only unsafe pointers. func UnsafeNewQMatrix4x4(h unsafe.Pointer) *QMatrix4x4 { - if h == nil { - return nil - } - - return &QMatrix4x4{h: (*C.QMatrix4x4)(h)} + return newQMatrix4x4((*C.QMatrix4x4)(h)) } // NewQMatrix4x4 constructs a new QMatrix4x4 object. func NewQMatrix4x4() *QMatrix4x4 { - var outptr_QMatrix4x4 *C.QMatrix4x4 = nil - C.QMatrix4x4_new(&outptr_QMatrix4x4) - ret := newQMatrix4x4(outptr_QMatrix4x4) + ret := newQMatrix4x4(C.QMatrix4x4_new()) ret.isSubclass = true return ret } // NewQMatrix4x42 constructs a new QMatrix4x4 object. func NewQMatrix4x42(param1 Initialization) *QMatrix4x4 { - var outptr_QMatrix4x4 *C.QMatrix4x4 = nil - C.QMatrix4x4_new2((C.int)(param1), &outptr_QMatrix4x4) - ret := newQMatrix4x4(outptr_QMatrix4x4) + ret := newQMatrix4x4(C.QMatrix4x4_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQMatrix4x43 constructs a new QMatrix4x4 object. func NewQMatrix4x43(values *float32) *QMatrix4x4 { - var outptr_QMatrix4x4 *C.QMatrix4x4 = nil - C.QMatrix4x4_new3((*C.float)(unsafe.Pointer(values)), &outptr_QMatrix4x4) - ret := newQMatrix4x4(outptr_QMatrix4x4) + ret := newQMatrix4x4(C.QMatrix4x4_new3((*C.float)(unsafe.Pointer(values)))) ret.isSubclass = true return ret } // NewQMatrix4x44 constructs a new QMatrix4x4 object. func NewQMatrix4x44(m11 float32, m12 float32, m13 float32, m14 float32, m21 float32, m22 float32, m23 float32, m24 float32, m31 float32, m32 float32, m33 float32, m34 float32, m41 float32, m42 float32, m43 float32, m44 float32) *QMatrix4x4 { - var outptr_QMatrix4x4 *C.QMatrix4x4 = nil - C.QMatrix4x4_new4((C.float)(m11), (C.float)(m12), (C.float)(m13), (C.float)(m14), (C.float)(m21), (C.float)(m22), (C.float)(m23), (C.float)(m24), (C.float)(m31), (C.float)(m32), (C.float)(m33), (C.float)(m34), (C.float)(m41), (C.float)(m42), (C.float)(m43), (C.float)(m44), &outptr_QMatrix4x4) - ret := newQMatrix4x4(outptr_QMatrix4x4) + ret := newQMatrix4x4(C.QMatrix4x4_new4((C.float)(m11), (C.float)(m12), (C.float)(m13), (C.float)(m14), (C.float)(m21), (C.float)(m22), (C.float)(m23), (C.float)(m24), (C.float)(m31), (C.float)(m32), (C.float)(m33), (C.float)(m34), (C.float)(m41), (C.float)(m42), (C.float)(m43), (C.float)(m44))) ret.isSubclass = true return ret } // NewQMatrix4x45 constructs a new QMatrix4x4 object. func NewQMatrix4x45(values *float32, cols int, rows int) *QMatrix4x4 { - var outptr_QMatrix4x4 *C.QMatrix4x4 = nil - C.QMatrix4x4_new5((*C.float)(unsafe.Pointer(values)), (C.int)(cols), (C.int)(rows), &outptr_QMatrix4x4) - ret := newQMatrix4x4(outptr_QMatrix4x4) + ret := newQMatrix4x4(C.QMatrix4x4_new5((*C.float)(unsafe.Pointer(values)), (C.int)(cols), (C.int)(rows))) ret.isSubclass = true return ret } // NewQMatrix4x46 constructs a new QMatrix4x4 object. func NewQMatrix4x46(transform *QTransform) *QMatrix4x4 { - var outptr_QMatrix4x4 *C.QMatrix4x4 = nil - C.QMatrix4x4_new6(transform.cPointer(), &outptr_QMatrix4x4) - ret := newQMatrix4x4(outptr_QMatrix4x4) + ret := newQMatrix4x4(C.QMatrix4x4_new6(transform.cPointer())) ret.isSubclass = true return ret } // NewQMatrix4x47 constructs a new QMatrix4x4 object. func NewQMatrix4x47(param1 *QMatrix4x4) *QMatrix4x4 { - var outptr_QMatrix4x4 *C.QMatrix4x4 = nil - C.QMatrix4x4_new7(param1.cPointer(), &outptr_QMatrix4x4) - ret := newQMatrix4x4(outptr_QMatrix4x4) + ret := newQMatrix4x4(C.QMatrix4x4_new7(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qmatrix4x4.h b/qt6/gen_qmatrix4x4.h index 8a3bbee9..ec93e2bc 100644 --- a/qt6/gen_qmatrix4x4.h +++ b/qt6/gen_qmatrix4x4.h @@ -36,13 +36,13 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -void QMatrix4x4_new(QMatrix4x4** outptr_QMatrix4x4); -void QMatrix4x4_new2(int param1, QMatrix4x4** outptr_QMatrix4x4); -void QMatrix4x4_new3(const float* values, QMatrix4x4** outptr_QMatrix4x4); -void QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44, QMatrix4x4** outptr_QMatrix4x4); -void QMatrix4x4_new5(const float* values, int cols, int rows, QMatrix4x4** outptr_QMatrix4x4); -void QMatrix4x4_new6(QTransform* transform, QMatrix4x4** outptr_QMatrix4x4); -void QMatrix4x4_new7(QMatrix4x4* param1, QMatrix4x4** outptr_QMatrix4x4); +QMatrix4x4* QMatrix4x4_new(); +QMatrix4x4* QMatrix4x4_new2(int param1); +QMatrix4x4* QMatrix4x4_new3(const float* values); +QMatrix4x4* QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44); +QMatrix4x4* QMatrix4x4_new5(const float* values, int cols, int rows); +QMatrix4x4* QMatrix4x4_new6(QTransform* transform); +QMatrix4x4* QMatrix4x4_new7(QMatrix4x4* param1); QVector4D* QMatrix4x4_Column(const QMatrix4x4* self, int index); void QMatrix4x4_SetColumn(QMatrix4x4* self, int index, QVector4D* value); QVector4D* QMatrix4x4_Row(const QMatrix4x4* self, int index); diff --git a/qt6/gen_qmdiarea.cpp b/qt6/gen_qmdiarea.cpp index 02a57e09..440b6201 100644 --- a/qt6/gen_qmdiarea.cpp +++ b/qt6/gen_qmdiarea.cpp @@ -609,24 +609,16 @@ public: }; -void QMdiArea_new(QWidget* parent, QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMdiArea* ret = new MiqtVirtualQMdiArea(parent); - *outptr_QMdiArea = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMdiArea* QMdiArea_new(QWidget* parent) { + return new MiqtVirtualQMdiArea(parent); } -void QMdiArea_new2(QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMdiArea* ret = new MiqtVirtualQMdiArea(); - *outptr_QMdiArea = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMdiArea* QMdiArea_new2() { + return new MiqtVirtualQMdiArea(); +} + +void QMdiArea_virtbase(QMdiArea* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); } QMetaObject* QMdiArea_MetaObject(const QMdiArea* self) { diff --git a/qt6/gen_qmdiarea.go b/qt6/gen_qmdiarea.go index 5c8d49bd..4b7a10ff 100644 --- a/qt6/gen_qmdiarea.go +++ b/qt6/gen_qmdiarea.go @@ -56,50 +56,34 @@ func (this *QMdiArea) UnsafePointer() unsafe.Pointer { } // newQMdiArea constructs the type using only CGO pointers. -func newQMdiArea(h *C.QMdiArea, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMdiArea { +func newQMdiArea(h *C.QMdiArea) *QMdiArea { if h == nil { return nil } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QMdiArea_virtbase(h, &outptr_QAbstractScrollArea) + return &QMdiArea{h: h, - QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractScrollArea: newQAbstractScrollArea(outptr_QAbstractScrollArea)} } // UnsafeNewQMdiArea constructs the type using only unsafe pointers. -func UnsafeNewQMdiArea(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMdiArea { - if h == nil { - return nil - } - - return &QMdiArea{h: (*C.QMdiArea)(h), - QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQMdiArea(h unsafe.Pointer) *QMdiArea { + return newQMdiArea((*C.QMdiArea)(h)) } // NewQMdiArea constructs a new QMdiArea object. func NewQMdiArea(parent *QWidget) *QMdiArea { - var outptr_QMdiArea *C.QMdiArea = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMdiArea_new(parent.cPointer(), &outptr_QMdiArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMdiArea(outptr_QMdiArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMdiArea(C.QMdiArea_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQMdiArea2 constructs a new QMdiArea object. func NewQMdiArea2() *QMdiArea { - var outptr_QMdiArea *C.QMdiArea = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMdiArea_new2(&outptr_QMdiArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMdiArea(outptr_QMdiArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMdiArea(C.QMdiArea_new2()) ret.isSubclass = true return ret } @@ -136,11 +120,11 @@ func (this *QMdiArea) MinimumSizeHint() *QSize { } func (this *QMdiArea) CurrentSubWindow() *QMdiSubWindow { - return newQMdiSubWindow(C.QMdiArea_CurrentSubWindow(this.h), nil, nil, nil) + return newQMdiSubWindow(C.QMdiArea_CurrentSubWindow(this.h)) } func (this *QMdiArea) ActiveSubWindow() *QMdiSubWindow { - return newQMdiSubWindow(C.QMdiArea_ActiveSubWindow(this.h), nil, nil, nil) + return newQMdiSubWindow(C.QMdiArea_ActiveSubWindow(this.h)) } func (this *QMdiArea) SubWindowList() []*QMdiSubWindow { @@ -148,13 +132,13 @@ func (this *QMdiArea) SubWindowList() []*QMdiSubWindow { _ret := make([]*QMdiSubWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QMdiSubWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQMdiSubWindow(_outCast[i], nil, nil, nil) + _ret[i] = newQMdiSubWindow(_outCast[i]) } return _ret } func (this *QMdiArea) AddSubWindow(widget *QWidget) *QMdiSubWindow { - return newQMdiSubWindow(C.QMdiArea_AddSubWindow(this.h, widget.cPointer()), nil, nil, nil) + return newQMdiSubWindow(C.QMdiArea_AddSubWindow(this.h, widget.cPointer())) } func (this *QMdiArea) RemoveSubWindow(widget *QWidget) { @@ -250,7 +234,7 @@ func miqt_exec_callback_QMdiArea_SubWindowActivated(cb C.intptr_t, param1 *C.QMd } // Convert all CABI parameters to Go parameters - slotval1 := newQMdiSubWindow(param1, nil, nil, nil) + slotval1 := newQMdiSubWindow(param1) gofunc(slotval1) } @@ -310,13 +294,13 @@ func (this *QMdiArea) SubWindowList1(order QMdiArea__WindowOrder) []*QMdiSubWind _ret := make([]*QMdiSubWindow, int(_ma.len)) _outCast := (*[0xffff]*C.QMdiSubWindow)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQMdiSubWindow(_outCast[i], nil, nil, nil) + _ret[i] = newQMdiSubWindow(_outCast[i]) } return _ret } func (this *QMdiArea) AddSubWindow2(widget *QWidget, flags WindowType) *QMdiSubWindow { - return newQMdiSubWindow(C.QMdiArea_AddSubWindow2(this.h, widget.cPointer(), (C.int)(flags)), nil, nil, nil) + return newQMdiSubWindow(C.QMdiArea_AddSubWindow2(this.h, widget.cPointer(), (C.int)(flags))) } func (this *QMdiArea) SetOption2(option QMdiArea__AreaOption, on bool) { @@ -397,7 +381,7 @@ func miqt_exec_callback_QMdiArea_SetupViewport(self *C.QMdiArea, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(viewport, nil, nil) + slotval1 := newQWidget(viewport) gofunc((&QMdiArea{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -481,7 +465,7 @@ func miqt_exec_callback_QMdiArea_PaintEvent(self *C.QMdiArea, cb C.intptr_t, pai } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(paintEvent, nil) + slotval1 := newQPaintEvent(paintEvent) gofunc((&QMdiArea{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -507,7 +491,7 @@ func miqt_exec_callback_QMdiArea_ChildEvent(self *C.QMdiArea, cb C.intptr_t, chi } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(childEvent, nil) + slotval1 := newQChildEvent(childEvent) gofunc((&QMdiArea{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -533,7 +517,7 @@ func miqt_exec_callback_QMdiArea_ResizeEvent(self *C.QMdiArea, cb C.intptr_t, re } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(resizeEvent, nil) + slotval1 := newQResizeEvent(resizeEvent) gofunc((&QMdiArea{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -559,7 +543,7 @@ func miqt_exec_callback_QMdiArea_TimerEvent(self *C.QMdiArea, cb C.intptr_t, tim } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(timerEvent, nil) + slotval1 := newQTimerEvent(timerEvent) gofunc((&QMdiArea{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -585,7 +569,7 @@ func miqt_exec_callback_QMdiArea_ShowEvent(self *C.QMdiArea, cb C.intptr_t, show } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(showEvent, nil) + slotval1 := newQShowEvent(showEvent) gofunc((&QMdiArea{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -667,7 +651,7 @@ func miqt_exec_callback_QMdiArea_MousePressEvent(self *C.QMdiArea, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -693,7 +677,7 @@ func miqt_exec_callback_QMdiArea_MouseReleaseEvent(self *C.QMdiArea, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -719,7 +703,7 @@ func miqt_exec_callback_QMdiArea_MouseDoubleClickEvent(self *C.QMdiArea, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -745,7 +729,7 @@ func miqt_exec_callback_QMdiArea_MouseMoveEvent(self *C.QMdiArea, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -771,7 +755,7 @@ func miqt_exec_callback_QMdiArea_WheelEvent(self *C.QMdiArea, cb C.intptr_t, par } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(param1, nil, nil, nil, nil) + slotval1 := newQWheelEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -797,7 +781,7 @@ func miqt_exec_callback_QMdiArea_ContextMenuEvent(self *C.QMdiArea, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -823,7 +807,7 @@ func miqt_exec_callback_QMdiArea_DragEnterEvent(self *C.QMdiArea, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(param1, nil, nil, nil) + slotval1 := newQDragEnterEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -849,7 +833,7 @@ func miqt_exec_callback_QMdiArea_DragMoveEvent(self *C.QMdiArea, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(param1, nil, nil) + slotval1 := newQDragMoveEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -875,7 +859,7 @@ func miqt_exec_callback_QMdiArea_DragLeaveEvent(self *C.QMdiArea, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(param1, nil) + slotval1 := newQDragLeaveEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -901,7 +885,7 @@ func miqt_exec_callback_QMdiArea_DropEvent(self *C.QMdiArea, cb C.intptr_t, para } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(param1, nil) + slotval1 := newQDropEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_DropEvent, slotval1) @@ -927,7 +911,7 @@ func miqt_exec_callback_QMdiArea_KeyPressEvent(self *C.QMdiArea, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QMdiArea{h: self}).callVirtualBase_KeyPressEvent, slotval1) diff --git a/qt6/gen_qmdiarea.h b/qt6/gen_qmdiarea.h index 728fee2a..054ac61d 100644 --- a/qt6/gen_qmdiarea.h +++ b/qt6/gen_qmdiarea.h @@ -66,8 +66,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QMdiArea_new(QWidget* parent, QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMdiArea_new2(QMdiArea** outptr_QMdiArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMdiArea* QMdiArea_new(QWidget* parent); +QMdiArea* QMdiArea_new2(); +void QMdiArea_virtbase(QMdiArea* src, QAbstractScrollArea** outptr_QAbstractScrollArea); QMetaObject* QMdiArea_MetaObject(const QMdiArea* self); void* QMdiArea_Metacast(QMdiArea* self, const char* param1); struct miqt_string QMdiArea_Tr(const char* s); diff --git a/qt6/gen_qmdisubwindow.cpp b/qt6/gen_qmdisubwindow.cpp index 0c7c06ac..41168b08 100644 --- a/qt6/gen_qmdisubwindow.cpp +++ b/qt6/gen_qmdisubwindow.cpp @@ -1099,28 +1099,20 @@ public: }; -void QMdiSubWindow_new(QWidget* parent, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMdiSubWindow* ret = new MiqtVirtualQMdiSubWindow(parent); - *outptr_QMdiSubWindow = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMdiSubWindow* QMdiSubWindow_new(QWidget* parent) { + return new MiqtVirtualQMdiSubWindow(parent); } -void QMdiSubWindow_new2(QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMdiSubWindow* ret = new MiqtVirtualQMdiSubWindow(); - *outptr_QMdiSubWindow = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMdiSubWindow* QMdiSubWindow_new2() { + return new MiqtVirtualQMdiSubWindow(); } -void QMdiSubWindow_new3(QWidget* parent, int flags, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMdiSubWindow* ret = new MiqtVirtualQMdiSubWindow(parent, static_cast(flags)); - *outptr_QMdiSubWindow = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMdiSubWindow* QMdiSubWindow_new3(QWidget* parent, int flags) { + return new MiqtVirtualQMdiSubWindow(parent, static_cast(flags)); +} + +void QMdiSubWindow_virtbase(QMdiSubWindow* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QMdiSubWindow_MetaObject(const QMdiSubWindow* self) { diff --git a/qt6/gen_qmdisubwindow.go b/qt6/gen_qmdisubwindow.go index c639f559..1be65e9a 100644 --- a/qt6/gen_qmdisubwindow.go +++ b/qt6/gen_qmdisubwindow.go @@ -44,59 +44,42 @@ func (this *QMdiSubWindow) UnsafePointer() unsafe.Pointer { } // newQMdiSubWindow constructs the type using only CGO pointers. -func newQMdiSubWindow(h *C.QMdiSubWindow, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMdiSubWindow { +func newQMdiSubWindow(h *C.QMdiSubWindow) *QMdiSubWindow { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QMdiSubWindow_virtbase(h, &outptr_QWidget) + return &QMdiSubWindow{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQMdiSubWindow constructs the type using only unsafe pointers. -func UnsafeNewQMdiSubWindow(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMdiSubWindow { - if h == nil { - return nil - } - - return &QMdiSubWindow{h: (*C.QMdiSubWindow)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQMdiSubWindow(h unsafe.Pointer) *QMdiSubWindow { + return newQMdiSubWindow((*C.QMdiSubWindow)(h)) } // NewQMdiSubWindow constructs a new QMdiSubWindow object. func NewQMdiSubWindow(parent *QWidget) *QMdiSubWindow { - var outptr_QMdiSubWindow *C.QMdiSubWindow = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMdiSubWindow_new(parent.cPointer(), &outptr_QMdiSubWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMdiSubWindow(outptr_QMdiSubWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMdiSubWindow(C.QMdiSubWindow_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQMdiSubWindow2 constructs a new QMdiSubWindow object. func NewQMdiSubWindow2() *QMdiSubWindow { - var outptr_QMdiSubWindow *C.QMdiSubWindow = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMdiSubWindow_new2(&outptr_QMdiSubWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMdiSubWindow(outptr_QMdiSubWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMdiSubWindow(C.QMdiSubWindow_new2()) ret.isSubclass = true return ret } // NewQMdiSubWindow3 constructs a new QMdiSubWindow object. func NewQMdiSubWindow3(parent *QWidget, flags WindowType) *QMdiSubWindow { - var outptr_QMdiSubWindow *C.QMdiSubWindow = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMdiSubWindow_new3(parent.cPointer(), (C.int)(flags), &outptr_QMdiSubWindow, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMdiSubWindow(outptr_QMdiSubWindow, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMdiSubWindow(C.QMdiSubWindow_new3(parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -137,15 +120,15 @@ func (this *QMdiSubWindow) SetWidget(widget *QWidget) { } func (this *QMdiSubWindow) Widget() *QWidget { - return newQWidget(C.QMdiSubWindow_Widget(this.h), nil, nil) + return newQWidget(C.QMdiSubWindow_Widget(this.h)) } func (this *QMdiSubWindow) MaximizedButtonsWidget() *QWidget { - return newQWidget(C.QMdiSubWindow_MaximizedButtonsWidget(this.h), nil, nil) + return newQWidget(C.QMdiSubWindow_MaximizedButtonsWidget(this.h)) } func (this *QMdiSubWindow) MaximizedSystemMenuIconWidget() *QWidget { - return newQWidget(C.QMdiSubWindow_MaximizedSystemMenuIconWidget(this.h), nil, nil) + return newQWidget(C.QMdiSubWindow_MaximizedSystemMenuIconWidget(this.h)) } func (this *QMdiSubWindow) IsShaded() bool { @@ -181,11 +164,11 @@ func (this *QMdiSubWindow) SetSystemMenu(systemMenu *QMenu) { } func (this *QMdiSubWindow) SystemMenu() *QMenu { - return newQMenu(C.QMdiSubWindow_SystemMenu(this.h), nil, nil, nil) + return newQMenu(C.QMdiSubWindow_SystemMenu(this.h)) } func (this *QMdiSubWindow) MdiArea() *QMdiArea { - return newQMdiArea(C.QMdiSubWindow_MdiArea(this.h), nil, nil, nil, nil, nil) + return newQMdiArea(C.QMdiSubWindow_MdiArea(this.h)) } func (this *QMdiSubWindow) WindowStateChanged(oldState WindowState, newState WindowState) { @@ -393,7 +376,7 @@ func miqt_exec_callback_QMdiSubWindow_ShowEvent(self *C.QMdiSubWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(showEvent, nil) + slotval1 := newQShowEvent(showEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -419,7 +402,7 @@ func miqt_exec_callback_QMdiSubWindow_HideEvent(self *C.QMdiSubWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(hideEvent, nil) + slotval1 := newQHideEvent(hideEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_HideEvent, slotval1) @@ -471,7 +454,7 @@ func miqt_exec_callback_QMdiSubWindow_CloseEvent(self *C.QMdiSubWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(closeEvent, nil) + slotval1 := newQCloseEvent(closeEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -523,7 +506,7 @@ func miqt_exec_callback_QMdiSubWindow_ResizeEvent(self *C.QMdiSubWindow, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(resizeEvent, nil) + slotval1 := newQResizeEvent(resizeEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -549,7 +532,7 @@ func miqt_exec_callback_QMdiSubWindow_TimerEvent(self *C.QMdiSubWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(timerEvent, nil) + slotval1 := newQTimerEvent(timerEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -575,7 +558,7 @@ func miqt_exec_callback_QMdiSubWindow_MoveEvent(self *C.QMdiSubWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(moveEvent, nil) + slotval1 := newQMoveEvent(moveEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -601,7 +584,7 @@ func miqt_exec_callback_QMdiSubWindow_PaintEvent(self *C.QMdiSubWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(paintEvent, nil) + slotval1 := newQPaintEvent(paintEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -627,7 +610,7 @@ func miqt_exec_callback_QMdiSubWindow_MousePressEvent(self *C.QMdiSubWindow, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(mouseEvent, nil, nil, nil, nil) + slotval1 := newQMouseEvent(mouseEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -653,7 +636,7 @@ func miqt_exec_callback_QMdiSubWindow_MouseDoubleClickEvent(self *C.QMdiSubWindo } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(mouseEvent, nil, nil, nil, nil) + slotval1 := newQMouseEvent(mouseEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -679,7 +662,7 @@ func miqt_exec_callback_QMdiSubWindow_MouseReleaseEvent(self *C.QMdiSubWindow, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(mouseEvent, nil, nil, nil, nil) + slotval1 := newQMouseEvent(mouseEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -705,7 +688,7 @@ func miqt_exec_callback_QMdiSubWindow_MouseMoveEvent(self *C.QMdiSubWindow, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(mouseEvent, nil, nil, nil, nil) + slotval1 := newQMouseEvent(mouseEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -731,7 +714,7 @@ func miqt_exec_callback_QMdiSubWindow_KeyPressEvent(self *C.QMdiSubWindow, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(keyEvent, nil, nil) + slotval1 := newQKeyEvent(keyEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -757,7 +740,7 @@ func miqt_exec_callback_QMdiSubWindow_ContextMenuEvent(self *C.QMdiSubWindow, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(contextMenuEvent, nil, nil) + slotval1 := newQContextMenuEvent(contextMenuEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -783,7 +766,7 @@ func miqt_exec_callback_QMdiSubWindow_FocusInEvent(self *C.QMdiSubWindow, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(focusInEvent, nil) + slotval1 := newQFocusEvent(focusInEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -809,7 +792,7 @@ func miqt_exec_callback_QMdiSubWindow_FocusOutEvent(self *C.QMdiSubWindow, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(focusOutEvent, nil) + slotval1 := newQFocusEvent(focusOutEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -835,7 +818,7 @@ func miqt_exec_callback_QMdiSubWindow_ChildEvent(self *C.QMdiSubWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(childEvent, nil) + slotval1 := newQChildEvent(childEvent) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -990,7 +973,7 @@ func miqt_exec_callback_QMdiSubWindow_WheelEvent(self *C.QMdiSubWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1016,7 +999,7 @@ func miqt_exec_callback_QMdiSubWindow_KeyReleaseEvent(self *C.QMdiSubWindow, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1042,7 +1025,7 @@ func miqt_exec_callback_QMdiSubWindow_EnterEvent(self *C.QMdiSubWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -1068,7 +1051,7 @@ func miqt_exec_callback_QMdiSubWindow_TabletEvent(self *C.QMdiSubWindow, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1094,7 +1077,7 @@ func miqt_exec_callback_QMdiSubWindow_ActionEvent(self *C.QMdiSubWindow, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1120,7 +1103,7 @@ func miqt_exec_callback_QMdiSubWindow_DragEnterEvent(self *C.QMdiSubWindow, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1146,7 +1129,7 @@ func miqt_exec_callback_QMdiSubWindow_DragMoveEvent(self *C.QMdiSubWindow, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1172,7 +1155,7 @@ func miqt_exec_callback_QMdiSubWindow_DragLeaveEvent(self *C.QMdiSubWindow, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1198,7 +1181,7 @@ func miqt_exec_callback_QMdiSubWindow_DropEvent(self *C.QMdiSubWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1368,7 +1351,7 @@ func miqt_exec_callback_QMdiSubWindow_InputMethodEvent(self *C.QMdiSubWindow, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QMdiSubWindow{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qmdisubwindow.h b/qt6/gen_qmdisubwindow.h index bc1c7f0f..17fe6395 100644 --- a/qt6/gen_qmdisubwindow.h +++ b/qt6/gen_qmdisubwindow.h @@ -86,9 +86,10 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QMdiSubWindow_new(QWidget* parent, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMdiSubWindow_new2(QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMdiSubWindow_new3(QWidget* parent, int flags, QMdiSubWindow** outptr_QMdiSubWindow, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMdiSubWindow* QMdiSubWindow_new(QWidget* parent); +QMdiSubWindow* QMdiSubWindow_new2(); +QMdiSubWindow* QMdiSubWindow_new3(QWidget* parent, int flags); +void QMdiSubWindow_virtbase(QMdiSubWindow* src, QWidget** outptr_QWidget); QMetaObject* QMdiSubWindow_MetaObject(const QMdiSubWindow* self); void* QMdiSubWindow_Metacast(QMdiSubWindow* self, const char* param1); struct miqt_string QMdiSubWindow_Tr(const char* s); diff --git a/qt6/gen_qmenu.cpp b/qt6/gen_qmenu.cpp index 179b945a..9ade077b 100644 --- a/qt6/gen_qmenu.cpp +++ b/qt6/gen_qmenu.cpp @@ -1079,38 +1079,26 @@ public: }; -void QMenu_new(QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(parent); - *outptr_QMenu = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMenu* QMenu_new(QWidget* parent) { + return new MiqtVirtualQMenu(parent); } -void QMenu_new2(QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(); - *outptr_QMenu = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMenu* QMenu_new2() { + return new MiqtVirtualQMenu(); } -void QMenu_new3(struct miqt_string title, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMenu* QMenu_new3(struct miqt_string title) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(title_QString); - *outptr_QMenu = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMenu(title_QString); } -void QMenu_new4(struct miqt_string title, QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMenu* QMenu_new4(struct miqt_string title, QWidget* parent) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQMenu* ret = new MiqtVirtualQMenu(title_QString, parent); - *outptr_QMenu = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMenu(title_QString, parent); +} + +void QMenu_virtbase(QMenu* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QMenu_MetaObject(const QMenu* self) { diff --git a/qt6/gen_qmenu.go b/qt6/gen_qmenu.go index 7ba0272b..9df56737 100644 --- a/qt6/gen_qmenu.go +++ b/qt6/gen_qmenu.go @@ -35,46 +35,34 @@ func (this *QMenu) UnsafePointer() unsafe.Pointer { } // newQMenu constructs the type using only CGO pointers. -func newQMenu(h *C.QMenu, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMenu { +func newQMenu(h *C.QMenu) *QMenu { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QMenu_virtbase(h, &outptr_QWidget) + return &QMenu{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQMenu constructs the type using only unsafe pointers. -func UnsafeNewQMenu(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMenu { - if h == nil { - return nil - } - - return &QMenu{h: (*C.QMenu)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQMenu(h unsafe.Pointer) *QMenu { + return newQMenu((*C.QMenu)(h)) } // NewQMenu constructs a new QMenu object. func NewQMenu(parent *QWidget) *QMenu { - var outptr_QMenu *C.QMenu = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMenu_new(parent.cPointer(), &outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMenu(C.QMenu_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQMenu2 constructs a new QMenu object. func NewQMenu2() *QMenu { - var outptr_QMenu *C.QMenu = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMenu_new2(&outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMenu(C.QMenu_new2()) ret.isSubclass = true return ret } @@ -85,13 +73,8 @@ func NewQMenu3(title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QMenu *C.QMenu = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMenu_new3(title_ms, &outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMenu(C.QMenu_new3(title_ms)) ret.isSubclass = true return ret } @@ -102,13 +85,8 @@ func NewQMenu4(title string, parent *QWidget) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QMenu *C.QMenu = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMenu_new4(title_ms, parent.cPointer(), &outptr_QMenu, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMenu(outptr_QMenu, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMenu(C.QMenu_new4(title_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -133,7 +111,7 @@ func QMenu_Tr(s string) string { } func (this *QMenu) AddMenu(menu *QMenu) *QAction { - return newQAction(C.QMenu_AddMenu(this.h, menu.cPointer()), nil) + return newQAction(C.QMenu_AddMenu(this.h, menu.cPointer())) } func (this *QMenu) AddMenuWithTitle(title string) *QMenu { @@ -141,7 +119,7 @@ func (this *QMenu) AddMenuWithTitle(title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return newQMenu(C.QMenu_AddMenuWithTitle(this.h, title_ms), nil, nil, nil) + return newQMenu(C.QMenu_AddMenuWithTitle(this.h, title_ms)) } func (this *QMenu) AddMenu2(icon *QIcon, title string) *QMenu { @@ -149,11 +127,11 @@ func (this *QMenu) AddMenu2(icon *QIcon, title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return newQMenu(C.QMenu_AddMenu2(this.h, icon.cPointer(), title_ms), nil, nil, nil) + return newQMenu(C.QMenu_AddMenu2(this.h, icon.cPointer(), title_ms)) } func (this *QMenu) AddSeparator() *QAction { - return newQAction(C.QMenu_AddSeparator(this.h), nil) + return newQAction(C.QMenu_AddSeparator(this.h)) } func (this *QMenu) AddSection(text string) *QAction { @@ -161,7 +139,7 @@ func (this *QMenu) AddSection(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QMenu_AddSection(this.h, text_ms), nil) + return newQAction(C.QMenu_AddSection(this.h, text_ms)) } func (this *QMenu) AddSection2(icon *QIcon, text string) *QAction { @@ -169,15 +147,15 @@ func (this *QMenu) AddSection2(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QMenu_AddSection2(this.h, icon.cPointer(), text_ms), nil) + return newQAction(C.QMenu_AddSection2(this.h, icon.cPointer(), text_ms)) } func (this *QMenu) InsertMenu(before *QAction, menu *QMenu) *QAction { - return newQAction(C.QMenu_InsertMenu(this.h, before.cPointer(), menu.cPointer()), nil) + return newQAction(C.QMenu_InsertMenu(this.h, before.cPointer(), menu.cPointer())) } func (this *QMenu) InsertSeparator(before *QAction) *QAction { - return newQAction(C.QMenu_InsertSeparator(this.h, before.cPointer()), nil) + return newQAction(C.QMenu_InsertSeparator(this.h, before.cPointer())) } func (this *QMenu) InsertSection(before *QAction, text string) *QAction { @@ -185,7 +163,7 @@ func (this *QMenu) InsertSection(before *QAction, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QMenu_InsertSection(this.h, before.cPointer(), text_ms), nil) + return newQAction(C.QMenu_InsertSection(this.h, before.cPointer(), text_ms)) } func (this *QMenu) InsertSection2(before *QAction, icon *QIcon, text string) *QAction { @@ -193,7 +171,7 @@ func (this *QMenu) InsertSection2(before *QAction, icon *QIcon, text string) *QA text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QMenu_InsertSection2(this.h, before.cPointer(), icon.cPointer(), text_ms), nil) + return newQAction(C.QMenu_InsertSection2(this.h, before.cPointer(), icon.cPointer(), text_ms)) } func (this *QMenu) IsEmpty() bool { @@ -233,7 +211,7 @@ func (this *QMenu) SetDefaultAction(defaultAction *QAction) { } func (this *QMenu) DefaultAction() *QAction { - return newQAction(C.QMenu_DefaultAction(this.h), nil) + return newQAction(C.QMenu_DefaultAction(this.h)) } func (this *QMenu) SetActiveAction(act *QAction) { @@ -241,7 +219,7 @@ func (this *QMenu) SetActiveAction(act *QAction) { } func (this *QMenu) ActiveAction() *QAction { - return newQAction(C.QMenu_ActiveAction(this.h), nil) + return newQAction(C.QMenu_ActiveAction(this.h)) } func (this *QMenu) Popup(pos *QPoint) { @@ -249,11 +227,11 @@ func (this *QMenu) Popup(pos *QPoint) { } func (this *QMenu) Exec() *QAction { - return newQAction(C.QMenu_Exec(this.h), nil) + return newQAction(C.QMenu_Exec(this.h)) } func (this *QMenu) ExecWithPos(pos *QPoint) *QAction { - return newQAction(C.QMenu_ExecWithPos(this.h, pos.cPointer()), nil) + return newQAction(C.QMenu_ExecWithPos(this.h, pos.cPointer())) } func QMenu_Exec2(actions []*QAction, pos *QPoint) *QAction { @@ -263,7 +241,7 @@ func QMenu_Exec2(actions []*QAction, pos *QPoint) *QAction { actions_CArray[i] = actions[i].cPointer() } actions_ma := C.struct_miqt_array{len: C.size_t(len(actions)), data: unsafe.Pointer(actions_CArray)} - return newQAction(C.QMenu_Exec2(actions_ma, pos.cPointer()), nil) + return newQAction(C.QMenu_Exec2(actions_ma, pos.cPointer())) } func (this *QMenu) SizeHint() *QSize { @@ -279,15 +257,15 @@ func (this *QMenu) ActionGeometry(param1 *QAction) *QRect { } func (this *QMenu) ActionAt(param1 *QPoint) *QAction { - return newQAction(C.QMenu_ActionAt(this.h, param1.cPointer()), nil) + return newQAction(C.QMenu_ActionAt(this.h, param1.cPointer())) } func (this *QMenu) MenuAction() *QAction { - return newQAction(C.QMenu_MenuAction(this.h), nil) + return newQAction(C.QMenu_MenuAction(this.h)) } func QMenu_MenuInAction(action *QAction) *QMenu { - return newQMenu(C.QMenu_MenuInAction(action.cPointer()), nil, nil, nil) + return newQMenu(C.QMenu_MenuInAction(action.cPointer())) } func (this *QMenu) Title() string { @@ -384,7 +362,7 @@ func miqt_exec_callback_QMenu_Triggered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(action, nil) + slotval1 := newQAction(action) gofunc(slotval1) } @@ -404,7 +382,7 @@ func miqt_exec_callback_QMenu_Hovered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(action, nil) + slotval1 := newQAction(action) gofunc(slotval1) } @@ -436,7 +414,7 @@ func (this *QMenu) Popup2(pos *QPoint, at *QAction) { } func (this *QMenu) Exec22(pos *QPoint, at *QAction) *QAction { - return newQAction(C.QMenu_Exec22(this.h, pos.cPointer(), at.cPointer()), nil) + return newQAction(C.QMenu_Exec22(this.h, pos.cPointer(), at.cPointer())) } func QMenu_Exec3(actions []*QAction, pos *QPoint, at *QAction) *QAction { @@ -446,7 +424,7 @@ func QMenu_Exec3(actions []*QAction, pos *QPoint, at *QAction) *QAction { actions_CArray[i] = actions[i].cPointer() } actions_ma := C.struct_miqt_array{len: C.size_t(len(actions)), data: unsafe.Pointer(actions_CArray)} - return newQAction(C.QMenu_Exec3(actions_ma, pos.cPointer(), at.cPointer()), nil) + return newQAction(C.QMenu_Exec3(actions_ma, pos.cPointer(), at.cPointer())) } func QMenu_Exec4(actions []*QAction, pos *QPoint, at *QAction, parent *QWidget) *QAction { @@ -456,7 +434,7 @@ func QMenu_Exec4(actions []*QAction, pos *QPoint, at *QAction, parent *QWidget) actions_CArray[i] = actions[i].cPointer() } actions_ma := C.struct_miqt_array{len: C.size_t(len(actions)), data: unsafe.Pointer(actions_CArray)} - return newQAction(C.QMenu_Exec4(actions_ma, pos.cPointer(), at.cPointer(), parent.cPointer()), nil) + return newQAction(C.QMenu_Exec4(actions_ma, pos.cPointer(), at.cPointer(), parent.cPointer())) } func (this *QMenu) callVirtualBase_SizeHint() *QSize { @@ -532,7 +510,7 @@ func miqt_exec_callback_QMenu_KeyPressEvent(self *C.QMenu, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -558,7 +536,7 @@ func miqt_exec_callback_QMenu_MouseReleaseEvent(self *C.QMenu, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -584,7 +562,7 @@ func miqt_exec_callback_QMenu_MousePressEvent(self *C.QMenu, cb C.intptr_t, para } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -610,7 +588,7 @@ func miqt_exec_callback_QMenu_MouseMoveEvent(self *C.QMenu, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -636,7 +614,7 @@ func miqt_exec_callback_QMenu_WheelEvent(self *C.QMenu, cb C.intptr_t, param1 *C } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(param1, nil, nil, nil, nil) + slotval1 := newQWheelEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -662,7 +640,7 @@ func miqt_exec_callback_QMenu_EnterEvent(self *C.QMenu, cb C.intptr_t, param1 *C } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(param1, nil, nil, nil, nil) + slotval1 := newQEnterEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -714,7 +692,7 @@ func miqt_exec_callback_QMenu_HideEvent(self *C.QMenu, cb C.intptr_t, param1 *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(param1, nil) + slotval1 := newQHideEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_HideEvent, slotval1) @@ -740,7 +718,7 @@ func miqt_exec_callback_QMenu_PaintEvent(self *C.QMenu, cb C.intptr_t, param1 *C } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -766,7 +744,7 @@ func miqt_exec_callback_QMenu_ActionEvent(self *C.QMenu, cb C.intptr_t, param1 * } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(param1, nil) + slotval1 := newQActionEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -792,7 +770,7 @@ func miqt_exec_callback_QMenu_TimerEvent(self *C.QMenu, cb C.intptr_t, param1 *C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -874,9 +852,9 @@ func miqt_exec_callback_QMenu_InitStyleOption(self *C.QMenu, cb C.intptr_t, opti } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionMenuItem(option, nil) + slotval1 := newQStyleOptionMenuItem(option) - slotval2 := newQAction(action, nil) + slotval2 := newQAction(action) gofunc((&QMenu{h: self}).callVirtualBase_InitStyleOption, slotval1, slotval2) @@ -1058,7 +1036,7 @@ func miqt_exec_callback_QMenu_MouseDoubleClickEvent(self *C.QMenu, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1084,7 +1062,7 @@ func miqt_exec_callback_QMenu_KeyReleaseEvent(self *C.QMenu, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1110,7 +1088,7 @@ func miqt_exec_callback_QMenu_FocusInEvent(self *C.QMenu, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1136,7 +1114,7 @@ func miqt_exec_callback_QMenu_FocusOutEvent(self *C.QMenu, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1162,7 +1140,7 @@ func miqt_exec_callback_QMenu_MoveEvent(self *C.QMenu, cb C.intptr_t, event *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1188,7 +1166,7 @@ func miqt_exec_callback_QMenu_ResizeEvent(self *C.QMenu, cb C.intptr_t, event *C } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1214,7 +1192,7 @@ func miqt_exec_callback_QMenu_CloseEvent(self *C.QMenu, cb C.intptr_t, event *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1240,7 +1218,7 @@ func miqt_exec_callback_QMenu_ContextMenuEvent(self *C.QMenu, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1266,7 +1244,7 @@ func miqt_exec_callback_QMenu_TabletEvent(self *C.QMenu, cb C.intptr_t, event *C } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1292,7 +1270,7 @@ func miqt_exec_callback_QMenu_DragEnterEvent(self *C.QMenu, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1318,7 +1296,7 @@ func miqt_exec_callback_QMenu_DragMoveEvent(self *C.QMenu, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1344,7 +1322,7 @@ func miqt_exec_callback_QMenu_DragLeaveEvent(self *C.QMenu, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1370,7 +1348,7 @@ func miqt_exec_callback_QMenu_DropEvent(self *C.QMenu, cb C.intptr_t, event *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1396,7 +1374,7 @@ func miqt_exec_callback_QMenu_ShowEvent(self *C.QMenu, cb C.intptr_t, event *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QMenu{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1566,7 +1544,7 @@ func miqt_exec_callback_QMenu_InputMethodEvent(self *C.QMenu, cb C.intptr_t, par } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QMenu{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qmenu.h b/qt6/gen_qmenu.h index a023d5b8..3c32cac7 100644 --- a/qt6/gen_qmenu.h +++ b/qt6/gen_qmenu.h @@ -88,10 +88,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QMenu_new(QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMenu_new2(QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMenu_new3(struct miqt_string title, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMenu_new4(struct miqt_string title, QWidget* parent, QMenu** outptr_QMenu, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMenu* QMenu_new(QWidget* parent); +QMenu* QMenu_new2(); +QMenu* QMenu_new3(struct miqt_string title); +QMenu* QMenu_new4(struct miqt_string title, QWidget* parent); +void QMenu_virtbase(QMenu* src, QWidget** outptr_QWidget); QMetaObject* QMenu_MetaObject(const QMenu* self); void* QMenu_Metacast(QMenu* self, const char* param1); struct miqt_string QMenu_Tr(const char* s); diff --git a/qt6/gen_qmenubar.cpp b/qt6/gen_qmenubar.cpp index 5026b400..df9f62d3 100644 --- a/qt6/gen_qmenubar.cpp +++ b/qt6/gen_qmenubar.cpp @@ -1101,20 +1101,16 @@ public: }; -void QMenuBar_new(QWidget* parent, QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMenuBar* ret = new MiqtVirtualQMenuBar(parent); - *outptr_QMenuBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMenuBar* QMenuBar_new(QWidget* parent) { + return new MiqtVirtualQMenuBar(parent); } -void QMenuBar_new2(QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMenuBar* ret = new MiqtVirtualQMenuBar(); - *outptr_QMenuBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMenuBar* QMenuBar_new2() { + return new MiqtVirtualQMenuBar(); +} + +void QMenuBar_virtbase(QMenuBar* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QMenuBar_MetaObject(const QMenuBar* self) { diff --git a/qt6/gen_qmenubar.go b/qt6/gen_qmenubar.go index 38f5de30..d48bca31 100644 --- a/qt6/gen_qmenubar.go +++ b/qt6/gen_qmenubar.go @@ -35,46 +35,34 @@ func (this *QMenuBar) UnsafePointer() unsafe.Pointer { } // newQMenuBar constructs the type using only CGO pointers. -func newQMenuBar(h *C.QMenuBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMenuBar { +func newQMenuBar(h *C.QMenuBar) *QMenuBar { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QMenuBar_virtbase(h, &outptr_QWidget) + return &QMenuBar{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQMenuBar constructs the type using only unsafe pointers. -func UnsafeNewQMenuBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMenuBar { - if h == nil { - return nil - } - - return &QMenuBar{h: (*C.QMenuBar)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQMenuBar(h unsafe.Pointer) *QMenuBar { + return newQMenuBar((*C.QMenuBar)(h)) } // NewQMenuBar constructs a new QMenuBar object. func NewQMenuBar(parent *QWidget) *QMenuBar { - var outptr_QMenuBar *C.QMenuBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMenuBar_new(parent.cPointer(), &outptr_QMenuBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMenuBar(outptr_QMenuBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMenuBar(C.QMenuBar_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQMenuBar2 constructs a new QMenuBar object. func NewQMenuBar2() *QMenuBar { - var outptr_QMenuBar *C.QMenuBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMenuBar_new2(&outptr_QMenuBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMenuBar(outptr_QMenuBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMenuBar(C.QMenuBar_new2()) ret.isSubclass = true return ret } @@ -99,7 +87,7 @@ func QMenuBar_Tr(s string) string { } func (this *QMenuBar) AddMenu(menu *QMenu) *QAction { - return newQAction(C.QMenuBar_AddMenu(this.h, menu.cPointer()), nil) + return newQAction(C.QMenuBar_AddMenu(this.h, menu.cPointer())) } func (this *QMenuBar) AddMenuWithTitle(title string) *QMenu { @@ -107,7 +95,7 @@ func (this *QMenuBar) AddMenuWithTitle(title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return newQMenu(C.QMenuBar_AddMenuWithTitle(this.h, title_ms), nil, nil, nil) + return newQMenu(C.QMenuBar_AddMenuWithTitle(this.h, title_ms)) } func (this *QMenuBar) AddMenu2(icon *QIcon, title string) *QMenu { @@ -115,19 +103,19 @@ func (this *QMenuBar) AddMenu2(icon *QIcon, title string) *QMenu { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - return newQMenu(C.QMenuBar_AddMenu2(this.h, icon.cPointer(), title_ms), nil, nil, nil) + return newQMenu(C.QMenuBar_AddMenu2(this.h, icon.cPointer(), title_ms)) } func (this *QMenuBar) AddSeparator() *QAction { - return newQAction(C.QMenuBar_AddSeparator(this.h), nil) + return newQAction(C.QMenuBar_AddSeparator(this.h)) } func (this *QMenuBar) InsertSeparator(before *QAction) *QAction { - return newQAction(C.QMenuBar_InsertSeparator(this.h, before.cPointer()), nil) + return newQAction(C.QMenuBar_InsertSeparator(this.h, before.cPointer())) } func (this *QMenuBar) InsertMenu(before *QAction, menu *QMenu) *QAction { - return newQAction(C.QMenuBar_InsertMenu(this.h, before.cPointer(), menu.cPointer()), nil) + return newQAction(C.QMenuBar_InsertMenu(this.h, before.cPointer(), menu.cPointer())) } func (this *QMenuBar) Clear() { @@ -135,7 +123,7 @@ func (this *QMenuBar) Clear() { } func (this *QMenuBar) ActiveAction() *QAction { - return newQAction(C.QMenuBar_ActiveAction(this.h), nil) + return newQAction(C.QMenuBar_ActiveAction(this.h)) } func (this *QMenuBar) SetActiveAction(action *QAction) { @@ -173,7 +161,7 @@ func (this *QMenuBar) ActionGeometry(param1 *QAction) *QRect { } func (this *QMenuBar) ActionAt(param1 *QPoint) *QAction { - return newQAction(C.QMenuBar_ActionAt(this.h, param1.cPointer()), nil) + return newQAction(C.QMenuBar_ActionAt(this.h, param1.cPointer())) } func (this *QMenuBar) SetCornerWidget(w *QWidget) { @@ -181,7 +169,7 @@ func (this *QMenuBar) SetCornerWidget(w *QWidget) { } func (this *QMenuBar) CornerWidget() *QWidget { - return newQWidget(C.QMenuBar_CornerWidget(this.h), nil, nil) + return newQWidget(C.QMenuBar_CornerWidget(this.h)) } func (this *QMenuBar) IsNativeMenuBar() bool { @@ -211,7 +199,7 @@ func miqt_exec_callback_QMenuBar_Triggered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(action, nil) + slotval1 := newQAction(action) gofunc(slotval1) } @@ -231,7 +219,7 @@ func miqt_exec_callback_QMenuBar_Hovered(cb C.intptr_t, action *C.QAction) { } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(action, nil) + slotval1 := newQAction(action) gofunc(slotval1) } @@ -263,7 +251,7 @@ func (this *QMenuBar) SetCornerWidget2(w *QWidget, corner Corner) { } func (this *QMenuBar) CornerWidget1(corner Corner) *QWidget { - return newQWidget(C.QMenuBar_CornerWidget1(this.h, (C.int)(corner)), nil, nil) + return newQWidget(C.QMenuBar_CornerWidget1(this.h, (C.int)(corner))) } func (this *QMenuBar) callVirtualBase_SizeHint() *QSize { @@ -420,7 +408,7 @@ func miqt_exec_callback_QMenuBar_KeyPressEvent(self *C.QMenuBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -446,7 +434,7 @@ func miqt_exec_callback_QMenuBar_MouseReleaseEvent(self *C.QMenuBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -472,7 +460,7 @@ func miqt_exec_callback_QMenuBar_MousePressEvent(self *C.QMenuBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -498,7 +486,7 @@ func miqt_exec_callback_QMenuBar_MouseMoveEvent(self *C.QMenuBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -550,7 +538,7 @@ func miqt_exec_callback_QMenuBar_PaintEvent(self *C.QMenuBar, cb C.intptr_t, par } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -576,7 +564,7 @@ func miqt_exec_callback_QMenuBar_ResizeEvent(self *C.QMenuBar, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -602,7 +590,7 @@ func miqt_exec_callback_QMenuBar_ActionEvent(self *C.QMenuBar, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(param1, nil) + slotval1 := newQActionEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -628,7 +616,7 @@ func miqt_exec_callback_QMenuBar_FocusOutEvent(self *C.QMenuBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -654,7 +642,7 @@ func miqt_exec_callback_QMenuBar_FocusInEvent(self *C.QMenuBar, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -680,7 +668,7 @@ func miqt_exec_callback_QMenuBar_TimerEvent(self *C.QMenuBar, cb C.intptr_t, par } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -764,9 +752,9 @@ func miqt_exec_callback_QMenuBar_InitStyleOption(self *C.QMenuBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionMenuItem(option, nil) + slotval1 := newQStyleOptionMenuItem(option) - slotval2 := newQAction(action, nil) + slotval2 := newQAction(action) gofunc((&QMenuBar{h: self}).callVirtualBase_InitStyleOption, slotval1, slotval2) @@ -867,7 +855,7 @@ func miqt_exec_callback_QMenuBar_MouseDoubleClickEvent(self *C.QMenuBar, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -893,7 +881,7 @@ func miqt_exec_callback_QMenuBar_WheelEvent(self *C.QMenuBar, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -919,7 +907,7 @@ func miqt_exec_callback_QMenuBar_KeyReleaseEvent(self *C.QMenuBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -945,7 +933,7 @@ func miqt_exec_callback_QMenuBar_EnterEvent(self *C.QMenuBar, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -971,7 +959,7 @@ func miqt_exec_callback_QMenuBar_MoveEvent(self *C.QMenuBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -997,7 +985,7 @@ func miqt_exec_callback_QMenuBar_CloseEvent(self *C.QMenuBar, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1023,7 +1011,7 @@ func miqt_exec_callback_QMenuBar_ContextMenuEvent(self *C.QMenuBar, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1049,7 +1037,7 @@ func miqt_exec_callback_QMenuBar_TabletEvent(self *C.QMenuBar, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1075,7 +1063,7 @@ func miqt_exec_callback_QMenuBar_DragEnterEvent(self *C.QMenuBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1101,7 +1089,7 @@ func miqt_exec_callback_QMenuBar_DragMoveEvent(self *C.QMenuBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1127,7 +1115,7 @@ func miqt_exec_callback_QMenuBar_DragLeaveEvent(self *C.QMenuBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1153,7 +1141,7 @@ func miqt_exec_callback_QMenuBar_DropEvent(self *C.QMenuBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1179,7 +1167,7 @@ func miqt_exec_callback_QMenuBar_ShowEvent(self *C.QMenuBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1205,7 +1193,7 @@ func miqt_exec_callback_QMenuBar_HideEvent(self *C.QMenuBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QMenuBar{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1375,7 +1363,7 @@ func miqt_exec_callback_QMenuBar_InputMethodEvent(self *C.QMenuBar, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QMenuBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qmenubar.h b/qt6/gen_qmenubar.h index 8eead24d..0163e647 100644 --- a/qt6/gen_qmenubar.h +++ b/qt6/gen_qmenubar.h @@ -90,8 +90,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QMenuBar_new(QWidget* parent, QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMenuBar_new2(QMenuBar** outptr_QMenuBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMenuBar* QMenuBar_new(QWidget* parent); +QMenuBar* QMenuBar_new2(); +void QMenuBar_virtbase(QMenuBar* src, QWidget** outptr_QWidget); QMetaObject* QMenuBar_MetaObject(const QMenuBar* self); void* QMenuBar_Metacast(QMenuBar* self, const char* param1); struct miqt_string QMenuBar_Tr(const char* s); diff --git a/qt6/gen_qmessageauthenticationcode.cpp b/qt6/gen_qmessageauthenticationcode.cpp index 436a8bb1..7c92e66e 100644 --- a/qt6/gen_qmessageauthenticationcode.cpp +++ b/qt6/gen_qmessageauthenticationcode.cpp @@ -5,15 +5,13 @@ #include "gen_qmessageauthenticationcode.h" #include "_cgo_export.h" -void QMessageAuthenticationCode_new(int method, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode) { - QMessageAuthenticationCode* ret = new QMessageAuthenticationCode(static_cast(method)); - *outptr_QMessageAuthenticationCode = ret; +QMessageAuthenticationCode* QMessageAuthenticationCode_new(int method) { + return new QMessageAuthenticationCode(static_cast(method)); } -void QMessageAuthenticationCode_new2(int method, struct miqt_string key, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode) { +QMessageAuthenticationCode* QMessageAuthenticationCode_new2(int method, struct miqt_string key) { QByteArray key_QByteArray(key.data, key.len); - QMessageAuthenticationCode* ret = new QMessageAuthenticationCode(static_cast(method), key_QByteArray); - *outptr_QMessageAuthenticationCode = ret; + return new QMessageAuthenticationCode(static_cast(method), key_QByteArray); } void QMessageAuthenticationCode_Reset(QMessageAuthenticationCode* self) { diff --git a/qt6/gen_qmessageauthenticationcode.go b/qt6/gen_qmessageauthenticationcode.go index ce7de6cf..4f5f2b5a 100644 --- a/qt6/gen_qmessageauthenticationcode.go +++ b/qt6/gen_qmessageauthenticationcode.go @@ -37,24 +37,19 @@ func newQMessageAuthenticationCode(h *C.QMessageAuthenticationCode) *QMessageAut if h == nil { return nil } + return &QMessageAuthenticationCode{h: h} } // UnsafeNewQMessageAuthenticationCode constructs the type using only unsafe pointers. func UnsafeNewQMessageAuthenticationCode(h unsafe.Pointer) *QMessageAuthenticationCode { - if h == nil { - return nil - } - - return &QMessageAuthenticationCode{h: (*C.QMessageAuthenticationCode)(h)} + return newQMessageAuthenticationCode((*C.QMessageAuthenticationCode)(h)) } // NewQMessageAuthenticationCode constructs a new QMessageAuthenticationCode object. func NewQMessageAuthenticationCode(method QCryptographicHash__Algorithm) *QMessageAuthenticationCode { - var outptr_QMessageAuthenticationCode *C.QMessageAuthenticationCode = nil - C.QMessageAuthenticationCode_new((C.int)(method), &outptr_QMessageAuthenticationCode) - ret := newQMessageAuthenticationCode(outptr_QMessageAuthenticationCode) + ret := newQMessageAuthenticationCode(C.QMessageAuthenticationCode_new((C.int)(method))) ret.isSubclass = true return ret } @@ -64,10 +59,8 @@ func NewQMessageAuthenticationCode2(method QCryptographicHash__Algorithm, key [] key_alias := C.struct_miqt_string{} key_alias.data = (*C.char)(unsafe.Pointer(&key[0])) key_alias.len = C.size_t(len(key)) - var outptr_QMessageAuthenticationCode *C.QMessageAuthenticationCode = nil - C.QMessageAuthenticationCode_new2((C.int)(method), key_alias, &outptr_QMessageAuthenticationCode) - ret := newQMessageAuthenticationCode(outptr_QMessageAuthenticationCode) + ret := newQMessageAuthenticationCode(C.QMessageAuthenticationCode_new2((C.int)(method), key_alias)) ret.isSubclass = true return ret } diff --git a/qt6/gen_qmessageauthenticationcode.h b/qt6/gen_qmessageauthenticationcode.h index 08c330e4..54f82742 100644 --- a/qt6/gen_qmessageauthenticationcode.h +++ b/qt6/gen_qmessageauthenticationcode.h @@ -22,8 +22,8 @@ typedef struct QIODevice QIODevice; typedef struct QMessageAuthenticationCode QMessageAuthenticationCode; #endif -void QMessageAuthenticationCode_new(int method, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode); -void QMessageAuthenticationCode_new2(int method, struct miqt_string key, QMessageAuthenticationCode** outptr_QMessageAuthenticationCode); +QMessageAuthenticationCode* QMessageAuthenticationCode_new(int method); +QMessageAuthenticationCode* QMessageAuthenticationCode_new2(int method, struct miqt_string key); void QMessageAuthenticationCode_Reset(QMessageAuthenticationCode* self); void QMessageAuthenticationCode_SetKey(QMessageAuthenticationCode* self, struct miqt_string key); void QMessageAuthenticationCode_AddData(QMessageAuthenticationCode* self, const char* data, ptrdiff_t length); diff --git a/qt6/gen_qmessagebox.cpp b/qt6/gen_qmessagebox.cpp index acfc9db5..276e293c 100644 --- a/qt6/gen_qmessagebox.cpp +++ b/qt6/gen_qmessagebox.cpp @@ -414,99 +414,58 @@ public: }; -void QMessageBox_new(QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(parent); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMessageBox* QMessageBox_new(QWidget* parent) { + return new MiqtVirtualQMessageBox(parent); } -void QMessageBox_new2(QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QMessageBox* QMessageBox_new2() { + return new MiqtVirtualQMessageBox(); } -void QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMessageBox* QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString); } -void QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMessageBox* QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2)); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2)); } -void QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMessageBox* QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons)); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons)); } -void QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMessageBox* QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent); } -void QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMessageBox* QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent, static_cast(flags)); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMessageBox(static_cast(icon), title_QString, text_QString, static_cast(buttons), parent, static_cast(flags)); } -void QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMessageBox* QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent); } -void QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QMessageBox* QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f) { QString title_QString = QString::fromUtf8(title.data, title.len); QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQMessageBox* ret = new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent, static_cast(f)); - *outptr_QMessageBox = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQMessageBox(title_QString, text_QString, static_cast(icon), static_cast(button0), static_cast(button1), static_cast(button2), parent, static_cast(f)); +} + +void QMessageBox_virtbase(QMessageBox* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QMessageBox_MetaObject(const QMessageBox* self) { diff --git a/qt6/gen_qmessagebox.go b/qt6/gen_qmessagebox.go index 85893604..fa02dd61 100644 --- a/qt6/gen_qmessagebox.go +++ b/qt6/gen_qmessagebox.go @@ -93,48 +93,34 @@ func (this *QMessageBox) UnsafePointer() unsafe.Pointer { } // newQMessageBox constructs the type using only CGO pointers. -func newQMessageBox(h *C.QMessageBox, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QMessageBox { +func newQMessageBox(h *C.QMessageBox) *QMessageBox { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QMessageBox_virtbase(h, &outptr_QDialog) + return &QMessageBox{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQMessageBox constructs the type using only unsafe pointers. -func UnsafeNewQMessageBox(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QMessageBox { - if h == nil { - return nil - } - - return &QMessageBox{h: (*C.QMessageBox)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQMessageBox(h unsafe.Pointer) *QMessageBox { + return newQMessageBox((*C.QMessageBox)(h)) } // NewQMessageBox constructs a new QMessageBox object. func NewQMessageBox(parent *QWidget) *QMessageBox { - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new(parent.cPointer(), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQMessageBox2 constructs a new QMessageBox object. func NewQMessageBox2() *QMessageBox { - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new2(&outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new2()) ret.isSubclass = true return ret } @@ -149,14 +135,8 @@ func NewQMessageBox3(icon QMessageBox__Icon, title string, text string) *QMessag text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new3((C.int)(icon), title_ms, text_ms, &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new3((C.int)(icon), title_ms, text_ms)) ret.isSubclass = true return ret } @@ -171,14 +151,8 @@ func NewQMessageBox4(title string, text string, icon QMessageBox__Icon, button0 text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new4(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new4(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2))) ret.isSubclass = true return ret } @@ -193,14 +167,8 @@ func NewQMessageBox5(icon QMessageBox__Icon, title string, text string, buttons text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new5((C.int)(icon), title_ms, text_ms, (C.int)(buttons), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new5((C.int)(icon), title_ms, text_ms, (C.int)(buttons))) ret.isSubclass = true return ret } @@ -215,14 +183,8 @@ func NewQMessageBox6(icon QMessageBox__Icon, title string, text string, buttons text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new6((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer(), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new6((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer())) ret.isSubclass = true return ret } @@ -237,14 +199,8 @@ func NewQMessageBox7(icon QMessageBox__Icon, title string, text string, buttons text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new7((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer(), (C.int)(flags), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new7((C.int)(icon), title_ms, text_ms, (C.int)(buttons), parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -259,14 +215,8 @@ func NewQMessageBox8(title string, text string, icon QMessageBox__Icon, button0 text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new8(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer(), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new8(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer())) ret.isSubclass = true return ret } @@ -281,14 +231,8 @@ func NewQMessageBox9(title string, text string, icon QMessageBox__Icon, button0 text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QMessageBox *C.QMessageBox = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QMessageBox_new9(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer(), (C.int)(f), &outptr_QMessageBox, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQMessageBox(outptr_QMessageBox, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQMessageBox(C.QMessageBox_new9(title_ms, text_ms, (C.int)(icon), (C.int)(button0), (C.int)(button1), (C.int)(button2), parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -321,11 +265,11 @@ func (this *QMessageBox) AddButton2(text string, role QMessageBox__ButtonRole) * text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQPushButton(C.QMessageBox_AddButton2(this.h, text_ms, (C.int)(role)), nil, nil, nil, nil) + return newQPushButton(C.QMessageBox_AddButton2(this.h, text_ms, (C.int)(role))) } func (this *QMessageBox) AddButtonWithButton(button QMessageBox__StandardButton) *QPushButton { - return newQPushButton(C.QMessageBox_AddButtonWithButton(this.h, (C.int)(button)), nil, nil, nil, nil) + return newQPushButton(C.QMessageBox_AddButtonWithButton(this.h, (C.int)(button))) } func (this *QMessageBox) RemoveButton(button *QAbstractButton) { @@ -337,7 +281,7 @@ func (this *QMessageBox) Buttons() []*QAbstractButton { _ret := make([]*QAbstractButton, int(_ma.len)) _outCast := (*[0xffff]*C.QAbstractButton)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAbstractButton(_outCast[i], nil, nil, nil) + _ret[i] = newQAbstractButton(_outCast[i]) } return _ret } @@ -359,11 +303,11 @@ func (this *QMessageBox) StandardButton(button *QAbstractButton) QMessageBox__St } func (this *QMessageBox) Button(which QMessageBox__StandardButton) *QAbstractButton { - return newQAbstractButton(C.QMessageBox_Button(this.h, (C.int)(which)), nil, nil, nil) + return newQAbstractButton(C.QMessageBox_Button(this.h, (C.int)(which))) } func (this *QMessageBox) DefaultButton() *QPushButton { - return newQPushButton(C.QMessageBox_DefaultButton(this.h), nil, nil, nil, nil) + return newQPushButton(C.QMessageBox_DefaultButton(this.h)) } func (this *QMessageBox) SetDefaultButton(button *QPushButton) { @@ -375,7 +319,7 @@ func (this *QMessageBox) SetDefaultButtonWithButton(button QMessageBox__Standard } func (this *QMessageBox) EscapeButton() *QAbstractButton { - return newQAbstractButton(C.QMessageBox_EscapeButton(this.h), nil, nil, nil) + return newQAbstractButton(C.QMessageBox_EscapeButton(this.h)) } func (this *QMessageBox) SetEscapeButton(button *QAbstractButton) { @@ -387,7 +331,7 @@ func (this *QMessageBox) SetEscapeButtonWithButton(button QMessageBox__StandardB } func (this *QMessageBox) ClickedButton() *QAbstractButton { - return newQAbstractButton(C.QMessageBox_ClickedButton(this.h), nil, nil, nil) + return newQAbstractButton(C.QMessageBox_ClickedButton(this.h)) } func (this *QMessageBox) Text() string { @@ -414,7 +358,7 @@ func (this *QMessageBox) SetIcon(icon QMessageBox__Icon) { } func (this *QMessageBox) IconPixmap() *QPixmap { - _goptr := newQPixmap(C.QMessageBox_IconPixmap(this.h), nil) + _goptr := newQPixmap(C.QMessageBox_IconPixmap(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -444,7 +388,7 @@ func (this *QMessageBox) SetCheckBox(cb *QCheckBox) { } func (this *QMessageBox) CheckBox() *QCheckBox { - return newQCheckBox(C.QMessageBox_CheckBox(this.h), nil, nil, nil, nil) + return newQCheckBox(C.QMessageBox_CheckBox(this.h)) } func QMessageBox_Information(parent *QWidget, title string, text string) QMessageBox__StandardButton { @@ -729,7 +673,7 @@ func (this *QMessageBox) SetWindowModality(windowModality WindowModality) { } func QMessageBox_StandardIcon(icon QMessageBox__Icon) *QPixmap { - _goptr := newQPixmap(C.QMessageBox_StandardIcon((C.int)(icon)), nil) + _goptr := newQPixmap(C.QMessageBox_StandardIcon((C.int)(icon))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -749,7 +693,7 @@ func miqt_exec_callback_QMessageBox_ButtonClicked(cb C.intptr_t, button *C.QAbst } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractButton(button, nil, nil, nil) + slotval1 := newQAbstractButton(button) gofunc(slotval1) } @@ -1380,7 +1324,7 @@ func miqt_exec_callback_QMessageBox_ResizeEvent(self *C.QMessageBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QMessageBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1406,7 +1350,7 @@ func miqt_exec_callback_QMessageBox_ShowEvent(self *C.QMessageBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QMessageBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1432,7 +1376,7 @@ func miqt_exec_callback_QMessageBox_CloseEvent(self *C.QMessageBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QMessageBox{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1458,7 +1402,7 @@ func miqt_exec_callback_QMessageBox_KeyPressEvent(self *C.QMessageBox, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QMessageBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1710,7 +1654,7 @@ func miqt_exec_callback_QMessageBox_ContextMenuEvent(self *C.QMessageBox, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QMessageBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt6/gen_qmessagebox.h b/qt6/gen_qmessagebox.h index e380a068..7a8e93d7 100644 --- a/qt6/gen_qmessagebox.h +++ b/qt6/gen_qmessagebox.h @@ -52,15 +52,16 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QMessageBox_new(QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new2(QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f, QMessageBox** outptr_QMessageBox, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QMessageBox* QMessageBox_new(QWidget* parent); +QMessageBox* QMessageBox_new2(); +QMessageBox* QMessageBox_new3(int icon, struct miqt_string title, struct miqt_string text); +QMessageBox* QMessageBox_new4(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2); +QMessageBox* QMessageBox_new5(int icon, struct miqt_string title, struct miqt_string text, int buttons); +QMessageBox* QMessageBox_new6(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent); +QMessageBox* QMessageBox_new7(int icon, struct miqt_string title, struct miqt_string text, int buttons, QWidget* parent, int flags); +QMessageBox* QMessageBox_new8(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent); +QMessageBox* QMessageBox_new9(struct miqt_string title, struct miqt_string text, int icon, int button0, int button1, int button2, QWidget* parent, int f); +void QMessageBox_virtbase(QMessageBox* src, QDialog** outptr_QDialog); QMetaObject* QMessageBox_MetaObject(const QMessageBox* self); void* QMessageBox_Metacast(QMessageBox* self, const char* param1); struct miqt_string QMessageBox_Tr(const char* s); diff --git a/qt6/gen_qmetacontainer.cpp b/qt6/gen_qmetacontainer.cpp index 08ba5165..a22aa492 100644 --- a/qt6/gen_qmetacontainer.cpp +++ b/qt6/gen_qmetacontainer.cpp @@ -6,14 +6,12 @@ #include "gen_qmetacontainer.h" #include "_cgo_export.h" -void QMetaContainer_new(QMetaContainer** outptr_QMetaContainer) { - QMetaContainer* ret = new QMetaContainer(); - *outptr_QMetaContainer = ret; +QMetaContainer* QMetaContainer_new() { + return new QMetaContainer(); } -void QMetaContainer_new2(QMetaContainer* param1, QMetaContainer** outptr_QMetaContainer) { - QMetaContainer* ret = new QMetaContainer(*param1); - *outptr_QMetaContainer = ret; +QMetaContainer* QMetaContainer_new2(QMetaContainer* param1) { + return new QMetaContainer(*param1); } bool QMetaContainer_HasInputIterator(const QMetaContainer* self) { @@ -123,10 +121,12 @@ void QMetaContainer_Delete(QMetaContainer* self, bool isSubclass) { } } -void QMetaSequence_new(QMetaSequence** outptr_QMetaSequence, QMetaContainer** outptr_QMetaContainer) { - QMetaSequence* ret = new QMetaSequence(); - *outptr_QMetaSequence = ret; - *outptr_QMetaContainer = static_cast(ret); +QMetaSequence* QMetaSequence_new() { + return new QMetaSequence(); +} + +void QMetaSequence_virtbase(QMetaSequence* src, QMetaContainer** outptr_QMetaContainer) { + *outptr_QMetaContainer = static_cast(src); } QMetaType* QMetaSequence_ValueMetaType(const QMetaSequence* self) { @@ -257,10 +257,12 @@ void QMetaSequence_Delete(QMetaSequence* self, bool isSubclass) { } } -void QMetaAssociation_new(QMetaAssociation** outptr_QMetaAssociation, QMetaContainer** outptr_QMetaContainer) { - QMetaAssociation* ret = new QMetaAssociation(); - *outptr_QMetaAssociation = ret; - *outptr_QMetaContainer = static_cast(ret); +QMetaAssociation* QMetaAssociation_new() { + return new QMetaAssociation(); +} + +void QMetaAssociation_virtbase(QMetaAssociation* src, QMetaContainer** outptr_QMetaContainer) { + *outptr_QMetaContainer = static_cast(src); } QMetaType* QMetaAssociation_KeyMetaType(const QMetaAssociation* self) { diff --git a/qt6/gen_qmetacontainer.go b/qt6/gen_qmetacontainer.go index d8c8a25e..281975ee 100644 --- a/qt6/gen_qmetacontainer.go +++ b/qt6/gen_qmetacontainer.go @@ -63,34 +63,27 @@ func newQMetaContainer(h *C.QMetaContainer) *QMetaContainer { if h == nil { return nil } + return &QMetaContainer{h: h} } // UnsafeNewQMetaContainer constructs the type using only unsafe pointers. func UnsafeNewQMetaContainer(h unsafe.Pointer) *QMetaContainer { - if h == nil { - return nil - } - - return &QMetaContainer{h: (*C.QMetaContainer)(h)} + return newQMetaContainer((*C.QMetaContainer)(h)) } // NewQMetaContainer constructs a new QMetaContainer object. func NewQMetaContainer() *QMetaContainer { - var outptr_QMetaContainer *C.QMetaContainer = nil - C.QMetaContainer_new(&outptr_QMetaContainer) - ret := newQMetaContainer(outptr_QMetaContainer) + ret := newQMetaContainer(C.QMetaContainer_new()) ret.isSubclass = true return ret } // NewQMetaContainer2 constructs a new QMetaContainer object. func NewQMetaContainer2(param1 *QMetaContainer) *QMetaContainer { - var outptr_QMetaContainer *C.QMetaContainer = nil - C.QMetaContainer_new2(param1.cPointer(), &outptr_QMetaContainer) - ret := newQMetaContainer(outptr_QMetaContainer) + ret := newQMetaContainer(C.QMetaContainer_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -226,31 +219,26 @@ func (this *QMetaSequence) UnsafePointer() unsafe.Pointer { } // newQMetaSequence constructs the type using only CGO pointers. -func newQMetaSequence(h *C.QMetaSequence, h_QMetaContainer *C.QMetaContainer) *QMetaSequence { +func newQMetaSequence(h *C.QMetaSequence) *QMetaSequence { if h == nil { return nil } + var outptr_QMetaContainer *C.QMetaContainer = nil + C.QMetaSequence_virtbase(h, &outptr_QMetaContainer) + return &QMetaSequence{h: h, - QMetaContainer: newQMetaContainer(h_QMetaContainer)} + QMetaContainer: newQMetaContainer(outptr_QMetaContainer)} } // UnsafeNewQMetaSequence constructs the type using only unsafe pointers. -func UnsafeNewQMetaSequence(h unsafe.Pointer, h_QMetaContainer unsafe.Pointer) *QMetaSequence { - if h == nil { - return nil - } - - return &QMetaSequence{h: (*C.QMetaSequence)(h), - QMetaContainer: UnsafeNewQMetaContainer(h_QMetaContainer)} +func UnsafeNewQMetaSequence(h unsafe.Pointer) *QMetaSequence { + return newQMetaSequence((*C.QMetaSequence)(h)) } // NewQMetaSequence constructs a new QMetaSequence object. func NewQMetaSequence() *QMetaSequence { - var outptr_QMetaSequence *C.QMetaSequence = nil - var outptr_QMetaContainer *C.QMetaContainer = nil - C.QMetaSequence_new(&outptr_QMetaSequence, &outptr_QMetaContainer) - ret := newQMetaSequence(outptr_QMetaSequence, outptr_QMetaContainer) + ret := newQMetaSequence(C.QMetaSequence_new()) ret.isSubclass = true return ret } @@ -412,31 +400,26 @@ func (this *QMetaAssociation) UnsafePointer() unsafe.Pointer { } // newQMetaAssociation constructs the type using only CGO pointers. -func newQMetaAssociation(h *C.QMetaAssociation, h_QMetaContainer *C.QMetaContainer) *QMetaAssociation { +func newQMetaAssociation(h *C.QMetaAssociation) *QMetaAssociation { if h == nil { return nil } + var outptr_QMetaContainer *C.QMetaContainer = nil + C.QMetaAssociation_virtbase(h, &outptr_QMetaContainer) + return &QMetaAssociation{h: h, - QMetaContainer: newQMetaContainer(h_QMetaContainer)} + QMetaContainer: newQMetaContainer(outptr_QMetaContainer)} } // UnsafeNewQMetaAssociation constructs the type using only unsafe pointers. -func UnsafeNewQMetaAssociation(h unsafe.Pointer, h_QMetaContainer unsafe.Pointer) *QMetaAssociation { - if h == nil { - return nil - } - - return &QMetaAssociation{h: (*C.QMetaAssociation)(h), - QMetaContainer: UnsafeNewQMetaContainer(h_QMetaContainer)} +func UnsafeNewQMetaAssociation(h unsafe.Pointer) *QMetaAssociation { + return newQMetaAssociation((*C.QMetaAssociation)(h)) } // NewQMetaAssociation constructs a new QMetaAssociation object. func NewQMetaAssociation() *QMetaAssociation { - var outptr_QMetaAssociation *C.QMetaAssociation = nil - var outptr_QMetaContainer *C.QMetaContainer = nil - C.QMetaAssociation_new(&outptr_QMetaAssociation, &outptr_QMetaContainer) - ret := newQMetaAssociation(outptr_QMetaAssociation, outptr_QMetaContainer) + ret := newQMetaAssociation(C.QMetaAssociation_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qmetacontainer.h b/qt6/gen_qmetacontainer.h index 3009111a..ea674b0f 100644 --- a/qt6/gen_qmetacontainer.h +++ b/qt6/gen_qmetacontainer.h @@ -26,8 +26,8 @@ typedef struct QMetaSequence QMetaSequence; typedef struct QMetaType QMetaType; #endif -void QMetaContainer_new(QMetaContainer** outptr_QMetaContainer); -void QMetaContainer_new2(QMetaContainer* param1, QMetaContainer** outptr_QMetaContainer); +QMetaContainer* QMetaContainer_new(); +QMetaContainer* QMetaContainer_new2(QMetaContainer* param1); bool QMetaContainer_HasInputIterator(const QMetaContainer* self); bool QMetaContainer_HasForwardIterator(const QMetaContainer* self); bool QMetaContainer_HasBidirectionalIterator(const QMetaContainer* self); @@ -54,7 +54,8 @@ void QMetaContainer_AdvanceConstIterator(const QMetaContainer* self, void* itera ptrdiff_t QMetaContainer_DiffConstIterator(const QMetaContainer* self, const void* i, const void* j); void QMetaContainer_Delete(QMetaContainer* self, bool isSubclass); -void QMetaSequence_new(QMetaSequence** outptr_QMetaSequence, QMetaContainer** outptr_QMetaContainer); +QMetaSequence* QMetaSequence_new(); +void QMetaSequence_virtbase(QMetaSequence* src, QMetaContainer** outptr_QMetaContainer); QMetaType* QMetaSequence_ValueMetaType(const QMetaSequence* self); bool QMetaSequence_IsSortable(const QMetaSequence* self); bool QMetaSequence_CanAddValueAtBegin(const QMetaSequence* self); @@ -87,7 +88,8 @@ bool QMetaSequence_CanGetValueAtConstIterator(const QMetaSequence* self); void QMetaSequence_ValueAtConstIterator(const QMetaSequence* self, const void* iterator, void* result); void QMetaSequence_Delete(QMetaSequence* self, bool isSubclass); -void QMetaAssociation_new(QMetaAssociation** outptr_QMetaAssociation, QMetaContainer** outptr_QMetaContainer); +QMetaAssociation* QMetaAssociation_new(); +void QMetaAssociation_virtbase(QMetaAssociation* src, QMetaContainer** outptr_QMetaContainer); QMetaType* QMetaAssociation_KeyMetaType(const QMetaAssociation* self); QMetaType* QMetaAssociation_MappedMetaType(const QMetaAssociation* self); bool QMetaAssociation_CanInsertKey(const QMetaAssociation* self); diff --git a/qt6/gen_qmetaobject.cpp b/qt6/gen_qmetaobject.cpp index aa5937c3..e46290e2 100644 --- a/qt6/gen_qmetaobject.cpp +++ b/qt6/gen_qmetaobject.cpp @@ -15,14 +15,12 @@ #include "gen_qmetaobject.h" #include "_cgo_export.h" -void QMetaMethod_new(QMetaMethod** outptr_QMetaMethod) { - QMetaMethod* ret = new QMetaMethod(); - *outptr_QMetaMethod = ret; +QMetaMethod* QMetaMethod_new() { + return new QMetaMethod(); } -void QMetaMethod_new2(QMetaMethod* param1, QMetaMethod** outptr_QMetaMethod) { - QMetaMethod* ret = new QMetaMethod(*param1); - *outptr_QMetaMethod = ret; +QMetaMethod* QMetaMethod_new2(QMetaMethod* param1) { + return new QMetaMethod(*param1); } struct miqt_string QMetaMethod_MethodSignature(const QMetaMethod* self) { @@ -430,14 +428,12 @@ void QMetaMethod_Delete(QMetaMethod* self, bool isSubclass) { } } -void QMetaEnum_new(QMetaEnum** outptr_QMetaEnum) { - QMetaEnum* ret = new QMetaEnum(); - *outptr_QMetaEnum = ret; +QMetaEnum* QMetaEnum_new() { + return new QMetaEnum(); } -void QMetaEnum_new2(QMetaEnum* param1, QMetaEnum** outptr_QMetaEnum) { - QMetaEnum* ret = new QMetaEnum(*param1); - *outptr_QMetaEnum = ret; +QMetaEnum* QMetaEnum_new2(QMetaEnum* param1) { + return new QMetaEnum(*param1); } const char* QMetaEnum_Name(const QMetaEnum* self) { @@ -517,9 +513,8 @@ void QMetaEnum_Delete(QMetaEnum* self, bool isSubclass) { } } -void QMetaProperty_new(QMetaProperty** outptr_QMetaProperty) { - QMetaProperty* ret = new QMetaProperty(); - *outptr_QMetaProperty = ret; +QMetaProperty* QMetaProperty_new() { + return new QMetaProperty(); } const char* QMetaProperty_Name(const QMetaProperty* self) { @@ -679,9 +674,8 @@ void QMetaProperty_Delete(QMetaProperty* self, bool isSubclass) { } } -void QMetaClassInfo_new(QMetaClassInfo** outptr_QMetaClassInfo) { - QMetaClassInfo* ret = new QMetaClassInfo(); - *outptr_QMetaClassInfo = ret; +QMetaClassInfo* QMetaClassInfo_new() { + return new QMetaClassInfo(); } const char* QMetaClassInfo_Name(const QMetaClassInfo* self) { diff --git a/qt6/gen_qmetaobject.go b/qt6/gen_qmetaobject.go index e075aea9..34e333fd 100644 --- a/qt6/gen_qmetaobject.go +++ b/qt6/gen_qmetaobject.go @@ -62,34 +62,27 @@ func newQMetaMethod(h *C.QMetaMethod) *QMetaMethod { if h == nil { return nil } + return &QMetaMethod{h: h} } // UnsafeNewQMetaMethod constructs the type using only unsafe pointers. func UnsafeNewQMetaMethod(h unsafe.Pointer) *QMetaMethod { - if h == nil { - return nil - } - - return &QMetaMethod{h: (*C.QMetaMethod)(h)} + return newQMetaMethod((*C.QMetaMethod)(h)) } // NewQMetaMethod constructs a new QMetaMethod object. func NewQMetaMethod() *QMetaMethod { - var outptr_QMetaMethod *C.QMetaMethod = nil - C.QMetaMethod_new(&outptr_QMetaMethod) - ret := newQMetaMethod(outptr_QMetaMethod) + ret := newQMetaMethod(C.QMetaMethod_new()) ret.isSubclass = true return ret } // NewQMetaMethod2 constructs a new QMetaMethod object. func NewQMetaMethod2(param1 *QMetaMethod) *QMetaMethod { - var outptr_QMetaMethod *C.QMetaMethod = nil - C.QMetaMethod_new2(param1.cPointer(), &outptr_QMetaMethod) - ret := newQMetaMethod(outptr_QMetaMethod) + ret := newQMetaMethod(C.QMetaMethod_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -517,34 +510,27 @@ func newQMetaEnum(h *C.QMetaEnum) *QMetaEnum { if h == nil { return nil } + return &QMetaEnum{h: h} } // UnsafeNewQMetaEnum constructs the type using only unsafe pointers. func UnsafeNewQMetaEnum(h unsafe.Pointer) *QMetaEnum { - if h == nil { - return nil - } - - return &QMetaEnum{h: (*C.QMetaEnum)(h)} + return newQMetaEnum((*C.QMetaEnum)(h)) } // NewQMetaEnum constructs a new QMetaEnum object. func NewQMetaEnum() *QMetaEnum { - var outptr_QMetaEnum *C.QMetaEnum = nil - C.QMetaEnum_new(&outptr_QMetaEnum) - ret := newQMetaEnum(outptr_QMetaEnum) + ret := newQMetaEnum(C.QMetaEnum_new()) ret.isSubclass = true return ret } // NewQMetaEnum2 constructs a new QMetaEnum object. func NewQMetaEnum2(param1 *QMetaEnum) *QMetaEnum { - var outptr_QMetaEnum *C.QMetaEnum = nil - C.QMetaEnum_new2(param1.cPointer(), &outptr_QMetaEnum) - ret := newQMetaEnum(outptr_QMetaEnum) + ret := newQMetaEnum(C.QMetaEnum_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -667,24 +653,19 @@ func newQMetaProperty(h *C.QMetaProperty) *QMetaProperty { if h == nil { return nil } + return &QMetaProperty{h: h} } // UnsafeNewQMetaProperty constructs the type using only unsafe pointers. func UnsafeNewQMetaProperty(h unsafe.Pointer) *QMetaProperty { - if h == nil { - return nil - } - - return &QMetaProperty{h: (*C.QMetaProperty)(h)} + return newQMetaProperty((*C.QMetaProperty)(h)) } // NewQMetaProperty constructs a new QMetaProperty object. func NewQMetaProperty() *QMetaProperty { - var outptr_QMetaProperty *C.QMetaProperty = nil - C.QMetaProperty_new(&outptr_QMetaProperty) - ret := newQMetaProperty(outptr_QMetaProperty) + ret := newQMetaProperty(C.QMetaProperty_new()) ret.isSubclass = true return ret } @@ -889,24 +870,19 @@ func newQMetaClassInfo(h *C.QMetaClassInfo) *QMetaClassInfo { if h == nil { return nil } + return &QMetaClassInfo{h: h} } // UnsafeNewQMetaClassInfo constructs the type using only unsafe pointers. func UnsafeNewQMetaClassInfo(h unsafe.Pointer) *QMetaClassInfo { - if h == nil { - return nil - } - - return &QMetaClassInfo{h: (*C.QMetaClassInfo)(h)} + return newQMetaClassInfo((*C.QMetaClassInfo)(h)) } // NewQMetaClassInfo constructs a new QMetaClassInfo object. func NewQMetaClassInfo() *QMetaClassInfo { - var outptr_QMetaClassInfo *C.QMetaClassInfo = nil - C.QMetaClassInfo_new(&outptr_QMetaClassInfo) - ret := newQMetaClassInfo(outptr_QMetaClassInfo) + ret := newQMetaClassInfo(C.QMetaClassInfo_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qmetaobject.h b/qt6/gen_qmetaobject.h index 859014e3..149334f9 100644 --- a/qt6/gen_qmetaobject.h +++ b/qt6/gen_qmetaobject.h @@ -40,8 +40,8 @@ typedef struct QUntypedBindable QUntypedBindable; typedef struct QVariant QVariant; #endif -void QMetaMethod_new(QMetaMethod** outptr_QMetaMethod); -void QMetaMethod_new2(QMetaMethod* param1, QMetaMethod** outptr_QMetaMethod); +QMetaMethod* QMetaMethod_new(); +QMetaMethod* QMetaMethod_new2(QMetaMethod* param1); struct miqt_string QMetaMethod_MethodSignature(const QMetaMethod* self); struct miqt_string QMetaMethod_Name(const QMetaMethod* self); const char* QMetaMethod_TypeName(const QMetaMethod* self); @@ -132,8 +132,8 @@ bool QMetaMethod_InvokeOnGadget102(const QMetaMethod* self, void* gadget, QGener bool QMetaMethod_InvokeOnGadget112(const QMetaMethod* self, void* gadget, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7, QGenericArgument* val8, QGenericArgument* val9); void QMetaMethod_Delete(QMetaMethod* self, bool isSubclass); -void QMetaEnum_new(QMetaEnum** outptr_QMetaEnum); -void QMetaEnum_new2(QMetaEnum* param1, QMetaEnum** outptr_QMetaEnum); +QMetaEnum* QMetaEnum_new(); +QMetaEnum* QMetaEnum_new2(QMetaEnum* param1); const char* QMetaEnum_Name(const QMetaEnum* self); const char* QMetaEnum_EnumName(const QMetaEnum* self); bool QMetaEnum_IsFlag(const QMetaEnum* self); @@ -152,7 +152,7 @@ int QMetaEnum_KeyToValue2(const QMetaEnum* self, const char* key, bool* ok); int QMetaEnum_KeysToValue2(const QMetaEnum* self, const char* keys, bool* ok); void QMetaEnum_Delete(QMetaEnum* self, bool isSubclass); -void QMetaProperty_new(QMetaProperty** outptr_QMetaProperty); +QMetaProperty* QMetaProperty_new(); const char* QMetaProperty_Name(const QMetaProperty* self); const char* QMetaProperty_TypeName(const QMetaProperty* self); int QMetaProperty_Type(const QMetaProperty* self); @@ -192,7 +192,7 @@ bool QMetaProperty_IsValid(const QMetaProperty* self); QMetaObject* QMetaProperty_EnclosingMetaObject(const QMetaProperty* self); void QMetaProperty_Delete(QMetaProperty* self, bool isSubclass); -void QMetaClassInfo_new(QMetaClassInfo** outptr_QMetaClassInfo); +QMetaClassInfo* QMetaClassInfo_new(); const char* QMetaClassInfo_Name(const QMetaClassInfo* self); const char* QMetaClassInfo_Value(const QMetaClassInfo* self); QMetaObject* QMetaClassInfo_EnclosingMetaObject(const QMetaClassInfo* self); diff --git a/qt6/gen_qmetatype.cpp b/qt6/gen_qmetatype.cpp index 1ce82bea..aaa94b35 100644 --- a/qt6/gen_qmetatype.cpp +++ b/qt6/gen_qmetatype.cpp @@ -9,19 +9,16 @@ #include "gen_qmetatype.h" #include "_cgo_export.h" -void QMetaType_new(int typeVal, QMetaType** outptr_QMetaType) { - QMetaType* ret = new QMetaType(static_cast(typeVal)); - *outptr_QMetaType = ret; +QMetaType* QMetaType_new(int typeVal) { + return new QMetaType(static_cast(typeVal)); } -void QMetaType_new2(QMetaType** outptr_QMetaType) { - QMetaType* ret = new QMetaType(); - *outptr_QMetaType = ret; +QMetaType* QMetaType_new2() { + return new QMetaType(); } -void QMetaType_new3(QMetaType* param1, QMetaType** outptr_QMetaType) { - QMetaType* ret = new QMetaType(*param1); - *outptr_QMetaType = ret; +QMetaType* QMetaType_new3(QMetaType* param1) { + return new QMetaType(*param1); } void QMetaType_RegisterNormalizedTypedef(struct miqt_string normalizedTypeName, QMetaType* typeVal) { diff --git a/qt6/gen_qmetatype.go b/qt6/gen_qmetatype.go index d2d0831b..a695eed4 100644 --- a/qt6/gen_qmetatype.go +++ b/qt6/gen_qmetatype.go @@ -155,44 +155,35 @@ func newQMetaType(h *C.QMetaType) *QMetaType { if h == nil { return nil } + return &QMetaType{h: h} } // UnsafeNewQMetaType constructs the type using only unsafe pointers. func UnsafeNewQMetaType(h unsafe.Pointer) *QMetaType { - if h == nil { - return nil - } - - return &QMetaType{h: (*C.QMetaType)(h)} + return newQMetaType((*C.QMetaType)(h)) } // NewQMetaType constructs a new QMetaType object. func NewQMetaType(typeVal int) *QMetaType { - var outptr_QMetaType *C.QMetaType = nil - C.QMetaType_new((C.int)(typeVal), &outptr_QMetaType) - ret := newQMetaType(outptr_QMetaType) + ret := newQMetaType(C.QMetaType_new((C.int)(typeVal))) ret.isSubclass = true return ret } // NewQMetaType2 constructs a new QMetaType object. func NewQMetaType2() *QMetaType { - var outptr_QMetaType *C.QMetaType = nil - C.QMetaType_new2(&outptr_QMetaType) - ret := newQMetaType(outptr_QMetaType) + ret := newQMetaType(C.QMetaType_new2()) ret.isSubclass = true return ret } // NewQMetaType3 constructs a new QMetaType object. func NewQMetaType3(param1 *QMetaType) *QMetaType { - var outptr_QMetaType *C.QMetaType = nil - C.QMetaType_new3(param1.cPointer(), &outptr_QMetaType) - ret := newQMetaType(outptr_QMetaType) + ret := newQMetaType(C.QMetaType_new3(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qmetatype.h b/qt6/gen_qmetatype.h index debc02e9..db75aeef 100644 --- a/qt6/gen_qmetatype.h +++ b/qt6/gen_qmetatype.h @@ -30,9 +30,9 @@ typedef struct QMetaType QMetaType; typedef struct QPartialOrdering QPartialOrdering; #endif -void QMetaType_new(int typeVal, QMetaType** outptr_QMetaType); -void QMetaType_new2(QMetaType** outptr_QMetaType); -void QMetaType_new3(QMetaType* param1, QMetaType** outptr_QMetaType); +QMetaType* QMetaType_new(int typeVal); +QMetaType* QMetaType_new2(); +QMetaType* QMetaType_new3(QMetaType* param1); void QMetaType_RegisterNormalizedTypedef(struct miqt_string normalizedTypeName, QMetaType* typeVal); int QMetaType_Type(const char* typeName); int QMetaType_TypeWithTypeName(struct miqt_string typeName); diff --git a/qt6/gen_qmimedata.cpp b/qt6/gen_qmimedata.cpp index 93199963..6a9269ee 100644 --- a/qt6/gen_qmimedata.cpp +++ b/qt6/gen_qmimedata.cpp @@ -305,10 +305,12 @@ public: }; -void QMimeData_new(QMimeData** outptr_QMimeData, QObject** outptr_QObject) { - MiqtVirtualQMimeData* ret = new MiqtVirtualQMimeData(); - *outptr_QMimeData = ret; - *outptr_QObject = static_cast(ret); +QMimeData* QMimeData_new() { + return new MiqtVirtualQMimeData(); +} + +void QMimeData_virtbase(QMimeData* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QMimeData_MetaObject(const QMimeData* self) { diff --git a/qt6/gen_qmimedata.go b/qt6/gen_qmimedata.go index 36c9b582..11e97138 100644 --- a/qt6/gen_qmimedata.go +++ b/qt6/gen_qmimedata.go @@ -35,31 +35,26 @@ func (this *QMimeData) UnsafePointer() unsafe.Pointer { } // newQMimeData constructs the type using only CGO pointers. -func newQMimeData(h *C.QMimeData, h_QObject *C.QObject) *QMimeData { +func newQMimeData(h *C.QMimeData) *QMimeData { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QMimeData_virtbase(h, &outptr_QObject) + return &QMimeData{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQMimeData constructs the type using only unsafe pointers. -func UnsafeNewQMimeData(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMimeData { - if h == nil { - return nil - } - - return &QMimeData{h: (*C.QMimeData)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQMimeData(h unsafe.Pointer) *QMimeData { + return newQMimeData((*C.QMimeData)(h)) } // NewQMimeData constructs a new QMimeData object. func NewQMimeData() *QMimeData { - var outptr_QMimeData *C.QMimeData = nil - var outptr_QObject *C.QObject = nil - C.QMimeData_new(&outptr_QMimeData, &outptr_QObject) - ret := newQMimeData(outptr_QMimeData, outptr_QObject) + ret := newQMimeData(C.QMimeData_new()) ret.isSubclass = true return ret } @@ -449,7 +444,7 @@ func miqt_exec_callback_QMimeData_TimerEvent(self *C.QMimeData, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QMimeData{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -475,7 +470,7 @@ func miqt_exec_callback_QMimeData_ChildEvent(self *C.QMimeData, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QMimeData{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qmimedata.h b/qt6/gen_qmimedata.h index f7cbaa7c..7d421bbc 100644 --- a/qt6/gen_qmimedata.h +++ b/qt6/gen_qmimedata.h @@ -38,7 +38,8 @@ typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -void QMimeData_new(QMimeData** outptr_QMimeData, QObject** outptr_QObject); +QMimeData* QMimeData_new(); +void QMimeData_virtbase(QMimeData* src, QObject** outptr_QObject); QMetaObject* QMimeData_MetaObject(const QMimeData* self); void* QMimeData_Metacast(QMimeData* self, const char* param1); struct miqt_string QMimeData_Tr(const char* s); diff --git a/qt6/gen_qmimedatabase.cpp b/qt6/gen_qmimedatabase.cpp index ee71f459..7c2e2bb7 100644 --- a/qt6/gen_qmimedatabase.cpp +++ b/qt6/gen_qmimedatabase.cpp @@ -12,9 +12,8 @@ #include "gen_qmimedatabase.h" #include "_cgo_export.h" -void QMimeDatabase_new(QMimeDatabase** outptr_QMimeDatabase) { - QMimeDatabase* ret = new QMimeDatabase(); - *outptr_QMimeDatabase = ret; +QMimeDatabase* QMimeDatabase_new() { + return new QMimeDatabase(); } QMimeType* QMimeDatabase_MimeTypeForName(const QMimeDatabase* self, struct miqt_string nameOrAlias) { diff --git a/qt6/gen_qmimedatabase.go b/qt6/gen_qmimedatabase.go index ad8d4ff0..6b424083 100644 --- a/qt6/gen_qmimedatabase.go +++ b/qt6/gen_qmimedatabase.go @@ -45,24 +45,19 @@ func newQMimeDatabase(h *C.QMimeDatabase) *QMimeDatabase { if h == nil { return nil } + return &QMimeDatabase{h: h} } // UnsafeNewQMimeDatabase constructs the type using only unsafe pointers. func UnsafeNewQMimeDatabase(h unsafe.Pointer) *QMimeDatabase { - if h == nil { - return nil - } - - return &QMimeDatabase{h: (*C.QMimeDatabase)(h)} + return newQMimeDatabase((*C.QMimeDatabase)(h)) } // NewQMimeDatabase constructs a new QMimeDatabase object. func NewQMimeDatabase() *QMimeDatabase { - var outptr_QMimeDatabase *C.QMimeDatabase = nil - C.QMimeDatabase_new(&outptr_QMimeDatabase) - ret := newQMimeDatabase(outptr_QMimeDatabase) + ret := newQMimeDatabase(C.QMimeDatabase_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qmimedatabase.h b/qt6/gen_qmimedatabase.h index 185f5936..7bec6e9f 100644 --- a/qt6/gen_qmimedatabase.h +++ b/qt6/gen_qmimedatabase.h @@ -28,7 +28,7 @@ typedef struct QMimeType QMimeType; typedef struct QUrl QUrl; #endif -void QMimeDatabase_new(QMimeDatabase** outptr_QMimeDatabase); +QMimeDatabase* QMimeDatabase_new(); QMimeType* QMimeDatabase_MimeTypeForName(const QMimeDatabase* self, struct miqt_string nameOrAlias); QMimeType* QMimeDatabase_MimeTypeForFile(const QMimeDatabase* self, struct miqt_string fileName); QMimeType* QMimeDatabase_MimeTypeForFileWithFileInfo(const QMimeDatabase* self, QFileInfo* fileInfo); diff --git a/qt6/gen_qmimetype.cpp b/qt6/gen_qmimetype.cpp index 8d3a7f1c..e9750035 100644 --- a/qt6/gen_qmimetype.cpp +++ b/qt6/gen_qmimetype.cpp @@ -7,14 +7,12 @@ #include "gen_qmimetype.h" #include "_cgo_export.h" -void QMimeType_new(QMimeType** outptr_QMimeType) { - QMimeType* ret = new QMimeType(); - *outptr_QMimeType = ret; +QMimeType* QMimeType_new() { + return new QMimeType(); } -void QMimeType_new2(QMimeType* other, QMimeType** outptr_QMimeType) { - QMimeType* ret = new QMimeType(*other); - *outptr_QMimeType = ret; +QMimeType* QMimeType_new2(QMimeType* other) { + return new QMimeType(*other); } void QMimeType_OperatorAssign(QMimeType* self, QMimeType* other) { diff --git a/qt6/gen_qmimetype.go b/qt6/gen_qmimetype.go index f43a57dd..ae24f7ae 100644 --- a/qt6/gen_qmimetype.go +++ b/qt6/gen_qmimetype.go @@ -37,34 +37,27 @@ func newQMimeType(h *C.QMimeType) *QMimeType { if h == nil { return nil } + return &QMimeType{h: h} } // UnsafeNewQMimeType constructs the type using only unsafe pointers. func UnsafeNewQMimeType(h unsafe.Pointer) *QMimeType { - if h == nil { - return nil - } - - return &QMimeType{h: (*C.QMimeType)(h)} + return newQMimeType((*C.QMimeType)(h)) } // NewQMimeType constructs a new QMimeType object. func NewQMimeType() *QMimeType { - var outptr_QMimeType *C.QMimeType = nil - C.QMimeType_new(&outptr_QMimeType) - ret := newQMimeType(outptr_QMimeType) + ret := newQMimeType(C.QMimeType_new()) ret.isSubclass = true return ret } // NewQMimeType2 constructs a new QMimeType object. func NewQMimeType2(other *QMimeType) *QMimeType { - var outptr_QMimeType *C.QMimeType = nil - C.QMimeType_new2(other.cPointer(), &outptr_QMimeType) - ret := newQMimeType(outptr_QMimeType) + ret := newQMimeType(C.QMimeType_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qmimetype.h b/qt6/gen_qmimetype.h index 0706eb16..9d8087b4 100644 --- a/qt6/gen_qmimetype.h +++ b/qt6/gen_qmimetype.h @@ -20,8 +20,8 @@ class QMimeType; typedef struct QMimeType QMimeType; #endif -void QMimeType_new(QMimeType** outptr_QMimeType); -void QMimeType_new2(QMimeType* other, QMimeType** outptr_QMimeType); +QMimeType* QMimeType_new(); +QMimeType* QMimeType_new2(QMimeType* other); void QMimeType_OperatorAssign(QMimeType* self, QMimeType* other); void QMimeType_Swap(QMimeType* self, QMimeType* other); bool QMimeType_OperatorEqual(const QMimeType* self, QMimeType* other); diff --git a/qt6/gen_qmovie.cpp b/qt6/gen_qmovie.cpp index a6f902e4..d5d2943e 100644 --- a/qt6/gen_qmovie.cpp +++ b/qt6/gen_qmovie.cpp @@ -207,59 +207,47 @@ public: }; -void QMovie_new(QMovie** outptr_QMovie, QObject** outptr_QObject) { - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); +QMovie* QMovie_new() { + return new MiqtVirtualQMovie(); } -void QMovie_new2(QIODevice* device, QMovie** outptr_QMovie, QObject** outptr_QObject) { - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(device); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); +QMovie* QMovie_new2(QIODevice* device) { + return new MiqtVirtualQMovie(device); } -void QMovie_new3(struct miqt_string fileName, QMovie** outptr_QMovie, QObject** outptr_QObject) { +QMovie* QMovie_new3(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(fileName_QString); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQMovie(fileName_QString); } -void QMovie_new4(QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject) { - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(parent); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); +QMovie* QMovie_new4(QObject* parent) { + return new MiqtVirtualQMovie(parent); } -void QMovie_new5(QIODevice* device, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject) { +QMovie* QMovie_new5(QIODevice* device, struct miqt_string format) { QByteArray format_QByteArray(format.data, format.len); - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(device, format_QByteArray); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQMovie(device, format_QByteArray); } -void QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject) { +QMovie* QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent) { QByteArray format_QByteArray(format.data, format.len); - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(device, format_QByteArray, parent); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQMovie(device, format_QByteArray, parent); } -void QMovie_new7(struct miqt_string fileName, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject) { +QMovie* QMovie_new7(struct miqt_string fileName, struct miqt_string format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(fileName_QString, format_QByteArray); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQMovie(fileName_QString, format_QByteArray); } -void QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject) { +QMovie* QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - MiqtVirtualQMovie* ret = new MiqtVirtualQMovie(fileName_QString, format_QByteArray, parent); - *outptr_QMovie = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQMovie(fileName_QString, format_QByteArray, parent); +} + +void QMovie_virtbase(QMovie* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QMovie_MetaObject(const QMovie* self) { diff --git a/qt6/gen_qmovie.go b/qt6/gen_qmovie.go index ab8b4f31..ee49d033 100644 --- a/qt6/gen_qmovie.go +++ b/qt6/gen_qmovie.go @@ -50,42 +50,34 @@ func (this *QMovie) UnsafePointer() unsafe.Pointer { } // newQMovie constructs the type using only CGO pointers. -func newQMovie(h *C.QMovie, h_QObject *C.QObject) *QMovie { +func newQMovie(h *C.QMovie) *QMovie { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QMovie_virtbase(h, &outptr_QObject) + return &QMovie{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQMovie constructs the type using only unsafe pointers. -func UnsafeNewQMovie(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMovie { - if h == nil { - return nil - } - - return &QMovie{h: (*C.QMovie)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQMovie(h unsafe.Pointer) *QMovie { + return newQMovie((*C.QMovie)(h)) } // NewQMovie constructs a new QMovie object. func NewQMovie() *QMovie { - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new(&outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new()) ret.isSubclass = true return ret } // NewQMovie2 constructs a new QMovie object. func NewQMovie2(device *QIODevice) *QMovie { - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new2(device.cPointer(), &outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new2(device.cPointer())) ret.isSubclass = true return ret } @@ -96,22 +88,16 @@ func NewQMovie3(fileName string) *QMovie { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new3(fileName_ms, &outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new3(fileName_ms)) ret.isSubclass = true return ret } // NewQMovie4 constructs a new QMovie object. func NewQMovie4(parent *QObject) *QMovie { - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new4(parent.cPointer(), &outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new4(parent.cPointer())) ret.isSubclass = true return ret } @@ -121,11 +107,8 @@ func NewQMovie5(device *QIODevice, format []byte) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new5(device.cPointer(), format_alias, &outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new5(device.cPointer(), format_alias)) ret.isSubclass = true return ret } @@ -135,11 +118,8 @@ func NewQMovie6(device *QIODevice, format []byte, parent *QObject) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new6(device.cPointer(), format_alias, parent.cPointer(), &outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new6(device.cPointer(), format_alias, parent.cPointer())) ret.isSubclass = true return ret } @@ -153,11 +133,8 @@ func NewQMovie7(fileName string, format []byte) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new7(fileName_ms, format_alias, &outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new7(fileName_ms, format_alias)) ret.isSubclass = true return ret } @@ -171,11 +148,8 @@ func NewQMovie8(fileName string, format []byte, parent *QObject) *QMovie { format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QMovie *C.QMovie = nil - var outptr_QObject *C.QObject = nil - C.QMovie_new8(fileName_ms, format_alias, parent.cPointer(), &outptr_QMovie, &outptr_QObject) - ret := newQMovie(outptr_QMovie, outptr_QObject) + ret := newQMovie(C.QMovie_new8(fileName_ms, format_alias, parent.cPointer())) ret.isSubclass = true return ret } @@ -217,7 +191,7 @@ func (this *QMovie) SetDevice(device *QIODevice) { } func (this *QMovie) Device() *QIODevice { - return newQIODevice(C.QMovie_Device(this.h), nil, nil) + return newQIODevice(C.QMovie_Device(this.h)) } func (this *QMovie) SetFileName(fileName string) { @@ -270,13 +244,13 @@ func (this *QMovie) FrameRect() *QRect { } func (this *QMovie) CurrentImage() *QImage { - _goptr := newQImage(C.QMovie_CurrentImage(this.h), nil) + _goptr := newQImage(C.QMovie_CurrentImage(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QMovie) CurrentPixmap() *QPixmap { - _goptr := newQPixmap(C.QMovie_CurrentPixmap(this.h), nil) + _goptr := newQPixmap(C.QMovie_CurrentPixmap(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -592,7 +566,7 @@ func miqt_exec_callback_QMovie_TimerEvent(self *C.QMovie, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QMovie{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -618,7 +592,7 @@ func miqt_exec_callback_QMovie_ChildEvent(self *C.QMovie, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QMovie{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qmovie.h b/qt6/gen_qmovie.h index 6e9e8ed7..6f6a575e 100644 --- a/qt6/gen_qmovie.h +++ b/qt6/gen_qmovie.h @@ -44,14 +44,15 @@ typedef struct QSize QSize; typedef struct QTimerEvent QTimerEvent; #endif -void QMovie_new(QMovie** outptr_QMovie, QObject** outptr_QObject); -void QMovie_new2(QIODevice* device, QMovie** outptr_QMovie, QObject** outptr_QObject); -void QMovie_new3(struct miqt_string fileName, QMovie** outptr_QMovie, QObject** outptr_QObject); -void QMovie_new4(QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject); -void QMovie_new5(QIODevice* device, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject); -void QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject); -void QMovie_new7(struct miqt_string fileName, struct miqt_string format, QMovie** outptr_QMovie, QObject** outptr_QObject); -void QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent, QMovie** outptr_QMovie, QObject** outptr_QObject); +QMovie* QMovie_new(); +QMovie* QMovie_new2(QIODevice* device); +QMovie* QMovie_new3(struct miqt_string fileName); +QMovie* QMovie_new4(QObject* parent); +QMovie* QMovie_new5(QIODevice* device, struct miqt_string format); +QMovie* QMovie_new6(QIODevice* device, struct miqt_string format, QObject* parent); +QMovie* QMovie_new7(struct miqt_string fileName, struct miqt_string format); +QMovie* QMovie_new8(struct miqt_string fileName, struct miqt_string format, QObject* parent); +void QMovie_virtbase(QMovie* src, QObject** outptr_QObject); QMetaObject* QMovie_MetaObject(const QMovie* self); void* QMovie_Metacast(QMovie* self, const char* param1); struct miqt_string QMovie_Tr(const char* s); diff --git a/qt6/gen_qmutex.cpp b/qt6/gen_qmutex.cpp index a739a77c..55a29cc2 100644 --- a/qt6/gen_qmutex.cpp +++ b/qt6/gen_qmutex.cpp @@ -5,9 +5,8 @@ #include "gen_qmutex.h" #include "_cgo_export.h" -void QBasicMutex_new(QBasicMutex** outptr_QBasicMutex) { - QBasicMutex* ret = new QBasicMutex(); - *outptr_QBasicMutex = ret; +QBasicMutex* QBasicMutex_new() { + return new QBasicMutex(); } void QBasicMutex_Lock(QBasicMutex* self) { @@ -34,10 +33,12 @@ void QBasicMutex_Delete(QBasicMutex* self, bool isSubclass) { } } -void QMutex_new(QMutex** outptr_QMutex, QBasicMutex** outptr_QBasicMutex) { - QMutex* ret = new QMutex(); - *outptr_QMutex = ret; - *outptr_QBasicMutex = static_cast(ret); +QMutex* QMutex_new() { + return new QMutex(); +} + +void QMutex_virtbase(QMutex* src, QBasicMutex** outptr_QBasicMutex) { + *outptr_QBasicMutex = static_cast(src); } bool QMutex_TryLock(QMutex* self) { @@ -56,9 +57,8 @@ void QMutex_Delete(QMutex* self, bool isSubclass) { } } -void QRecursiveMutex_new(QRecursiveMutex** outptr_QRecursiveMutex) { - QRecursiveMutex* ret = new QRecursiveMutex(); - *outptr_QRecursiveMutex = ret; +QRecursiveMutex* QRecursiveMutex_new() { + return new QRecursiveMutex(); } void QRecursiveMutex_Lock(QRecursiveMutex* self) { diff --git a/qt6/gen_qmutex.go b/qt6/gen_qmutex.go index 78af6413..4342b4a1 100644 --- a/qt6/gen_qmutex.go +++ b/qt6/gen_qmutex.go @@ -37,24 +37,19 @@ func newQBasicMutex(h *C.QBasicMutex) *QBasicMutex { if h == nil { return nil } + return &QBasicMutex{h: h} } // UnsafeNewQBasicMutex constructs the type using only unsafe pointers. func UnsafeNewQBasicMutex(h unsafe.Pointer) *QBasicMutex { - if h == nil { - return nil - } - - return &QBasicMutex{h: (*C.QBasicMutex)(h)} + return newQBasicMutex((*C.QBasicMutex)(h)) } // NewQBasicMutex constructs a new QBasicMutex object. func NewQBasicMutex() *QBasicMutex { - var outptr_QBasicMutex *C.QBasicMutex = nil - C.QBasicMutex_new(&outptr_QBasicMutex) - ret := newQBasicMutex(outptr_QBasicMutex) + ret := newQBasicMutex(C.QBasicMutex_new()) ret.isSubclass = true return ret } @@ -110,31 +105,26 @@ func (this *QMutex) UnsafePointer() unsafe.Pointer { } // newQMutex constructs the type using only CGO pointers. -func newQMutex(h *C.QMutex, h_QBasicMutex *C.QBasicMutex) *QMutex { +func newQMutex(h *C.QMutex) *QMutex { if h == nil { return nil } + var outptr_QBasicMutex *C.QBasicMutex = nil + C.QMutex_virtbase(h, &outptr_QBasicMutex) + return &QMutex{h: h, - QBasicMutex: newQBasicMutex(h_QBasicMutex)} + QBasicMutex: newQBasicMutex(outptr_QBasicMutex)} } // UnsafeNewQMutex constructs the type using only unsafe pointers. -func UnsafeNewQMutex(h unsafe.Pointer, h_QBasicMutex unsafe.Pointer) *QMutex { - if h == nil { - return nil - } - - return &QMutex{h: (*C.QMutex)(h), - QBasicMutex: UnsafeNewQBasicMutex(h_QBasicMutex)} +func UnsafeNewQMutex(h unsafe.Pointer) *QMutex { + return newQMutex((*C.QMutex)(h)) } // NewQMutex constructs a new QMutex object. func NewQMutex() *QMutex { - var outptr_QMutex *C.QMutex = nil - var outptr_QBasicMutex *C.QBasicMutex = nil - C.QMutex_new(&outptr_QMutex, &outptr_QBasicMutex) - ret := newQMutex(outptr_QMutex, outptr_QBasicMutex) + ret := newQMutex(C.QMutex_new()) ret.isSubclass = true return ret } @@ -185,24 +175,19 @@ func newQRecursiveMutex(h *C.QRecursiveMutex) *QRecursiveMutex { if h == nil { return nil } + return &QRecursiveMutex{h: h} } // UnsafeNewQRecursiveMutex constructs the type using only unsafe pointers. func UnsafeNewQRecursiveMutex(h unsafe.Pointer) *QRecursiveMutex { - if h == nil { - return nil - } - - return &QRecursiveMutex{h: (*C.QRecursiveMutex)(h)} + return newQRecursiveMutex((*C.QRecursiveMutex)(h)) } // NewQRecursiveMutex constructs a new QRecursiveMutex object. func NewQRecursiveMutex() *QRecursiveMutex { - var outptr_QRecursiveMutex *C.QRecursiveMutex = nil - C.QRecursiveMutex_new(&outptr_QRecursiveMutex) - ret := newQRecursiveMutex(outptr_QRecursiveMutex) + ret := newQRecursiveMutex(C.QRecursiveMutex_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qmutex.h b/qt6/gen_qmutex.h index c3973af2..d9d146d2 100644 --- a/qt6/gen_qmutex.h +++ b/qt6/gen_qmutex.h @@ -24,19 +24,20 @@ typedef struct QMutex QMutex; typedef struct QRecursiveMutex QRecursiveMutex; #endif -void QBasicMutex_new(QBasicMutex** outptr_QBasicMutex); +QBasicMutex* QBasicMutex_new(); void QBasicMutex_Lock(QBasicMutex* self); void QBasicMutex_Unlock(QBasicMutex* self); bool QBasicMutex_TryLock(QBasicMutex* self); bool QBasicMutex_TryLock2(QBasicMutex* self); void QBasicMutex_Delete(QBasicMutex* self, bool isSubclass); -void QMutex_new(QMutex** outptr_QMutex, QBasicMutex** outptr_QBasicMutex); +QMutex* QMutex_new(); +void QMutex_virtbase(QMutex* src, QBasicMutex** outptr_QBasicMutex); bool QMutex_TryLock(QMutex* self); bool QMutex_TryLockWithTimeout(QMutex* self, int timeout); void QMutex_Delete(QMutex* self, bool isSubclass); -void QRecursiveMutex_new(QRecursiveMutex** outptr_QRecursiveMutex); +QRecursiveMutex* QRecursiveMutex_new(); void QRecursiveMutex_Lock(QRecursiveMutex* self); bool QRecursiveMutex_TryLock(QRecursiveMutex* self); void QRecursiveMutex_Unlock(QRecursiveMutex* self); diff --git a/qt6/gen_qnamespace.cpp b/qt6/gen_qnamespace.cpp index 32ece54f..8c4be00a 100644 --- a/qt6/gen_qnamespace.cpp +++ b/qt6/gen_qnamespace.cpp @@ -5,14 +5,12 @@ #include "gen_qnamespace.h" #include "_cgo_export.h" -void Disambiguated_t_new(Disambiguated_t** outptr_Disambiguated_t) { - Qt::Disambiguated_t* ret = new Qt::Disambiguated_t(); - *outptr_Disambiguated_t = ret; +Disambiguated_t* Disambiguated_t_new() { + return new Qt::Disambiguated_t(); } -void Disambiguated_t_new2(Disambiguated_t* param1, Disambiguated_t** outptr_Disambiguated_t) { - Qt::Disambiguated_t* ret = new Qt::Disambiguated_t(*param1); - *outptr_Disambiguated_t = ret; +Disambiguated_t* Disambiguated_t_new2(Disambiguated_t* param1) { + return new Qt::Disambiguated_t(*param1); } void Disambiguated_t_Delete(Disambiguated_t* self, bool isSubclass) { @@ -31,39 +29,32 @@ void QInternal_Delete(QInternal* self, bool isSubclass) { } } -void QKeyCombination_new(QKeyCombination** outptr_QKeyCombination) { - QKeyCombination* ret = new QKeyCombination(); - *outptr_QKeyCombination = ret; +QKeyCombination* QKeyCombination_new() { + return new QKeyCombination(); } -void QKeyCombination_new2(int modifiers, QKeyCombination** outptr_QKeyCombination) { - QKeyCombination* ret = new QKeyCombination(static_cast(modifiers)); - *outptr_QKeyCombination = ret; +QKeyCombination* QKeyCombination_new2(int modifiers) { + return new QKeyCombination(static_cast(modifiers)); } -void QKeyCombination_new3(int modifiers, QKeyCombination** outptr_QKeyCombination) { - QKeyCombination* ret = new QKeyCombination(static_cast(modifiers)); - *outptr_QKeyCombination = ret; +QKeyCombination* QKeyCombination_new3(int modifiers) { + return new QKeyCombination(static_cast(modifiers)); } -void QKeyCombination_new4(QKeyCombination* param1, QKeyCombination** outptr_QKeyCombination) { - QKeyCombination* ret = new QKeyCombination(*param1); - *outptr_QKeyCombination = ret; +QKeyCombination* QKeyCombination_new4(QKeyCombination* param1) { + return new QKeyCombination(*param1); } -void QKeyCombination_new5(int key, QKeyCombination** outptr_QKeyCombination) { - QKeyCombination* ret = new QKeyCombination(static_cast(key)); - *outptr_QKeyCombination = ret; +QKeyCombination* QKeyCombination_new5(int key) { + return new QKeyCombination(static_cast(key)); } -void QKeyCombination_new6(int modifiers, int key, QKeyCombination** outptr_QKeyCombination) { - QKeyCombination* ret = new QKeyCombination(static_cast(modifiers), static_cast(key)); - *outptr_QKeyCombination = ret; +QKeyCombination* QKeyCombination_new6(int modifiers, int key) { + return new QKeyCombination(static_cast(modifiers), static_cast(key)); } -void QKeyCombination_new7(int modifiers, int key, QKeyCombination** outptr_QKeyCombination) { - QKeyCombination* ret = new QKeyCombination(static_cast(modifiers), static_cast(key)); - *outptr_QKeyCombination = ret; +QKeyCombination* QKeyCombination_new7(int modifiers, int key) { + return new QKeyCombination(static_cast(modifiers), static_cast(key)); } int QKeyCombination_KeyboardModifiers(const QKeyCombination* self) { diff --git a/qt6/gen_qnamespace.go b/qt6/gen_qnamespace.go index 9019d266..7e1c528d 100644 --- a/qt6/gen_qnamespace.go +++ b/qt6/gen_qnamespace.go @@ -1697,34 +1697,27 @@ func newDisambiguated_t(h *C.Disambiguated_t) *Disambiguated_t { if h == nil { return nil } + return &Disambiguated_t{h: h} } // UnsafeNewDisambiguated_t constructs the type using only unsafe pointers. func UnsafeNewDisambiguated_t(h unsafe.Pointer) *Disambiguated_t { - if h == nil { - return nil - } - - return &Disambiguated_t{h: (*C.Disambiguated_t)(h)} + return newDisambiguated_t((*C.Disambiguated_t)(h)) } // NewDisambiguated_t constructs a new Qt::Disambiguated_t object. func NewDisambiguated_t() *Disambiguated_t { - var outptr_Disambiguated_t *C.Disambiguated_t = nil - C.Disambiguated_t_new(&outptr_Disambiguated_t) - ret := newDisambiguated_t(outptr_Disambiguated_t) + ret := newDisambiguated_t(C.Disambiguated_t_new()) ret.isSubclass = true return ret } // NewDisambiguated_t2 constructs a new Qt::Disambiguated_t object. func NewDisambiguated_t2(param1 *Disambiguated_t) *Disambiguated_t { - var outptr_Disambiguated_t *C.Disambiguated_t = nil - C.Disambiguated_t_new2(param1.cPointer(), &outptr_Disambiguated_t) - ret := newDisambiguated_t(outptr_Disambiguated_t) + ret := newDisambiguated_t(C.Disambiguated_t_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1767,16 +1760,13 @@ func newQInternal(h *C.QInternal) *QInternal { if h == nil { return nil } + return &QInternal{h: h} } // UnsafeNewQInternal constructs the type using only unsafe pointers. func UnsafeNewQInternal(h unsafe.Pointer) *QInternal { - if h == nil { - return nil - } - - return &QInternal{h: (*C.QInternal)(h)} + return newQInternal((*C.QInternal)(h)) } // Delete this object from C++ memory. @@ -1817,84 +1807,67 @@ func newQKeyCombination(h *C.QKeyCombination) *QKeyCombination { if h == nil { return nil } + return &QKeyCombination{h: h} } // UnsafeNewQKeyCombination constructs the type using only unsafe pointers. func UnsafeNewQKeyCombination(h unsafe.Pointer) *QKeyCombination { - if h == nil { - return nil - } - - return &QKeyCombination{h: (*C.QKeyCombination)(h)} + return newQKeyCombination((*C.QKeyCombination)(h)) } // NewQKeyCombination constructs a new QKeyCombination object. func NewQKeyCombination() *QKeyCombination { - var outptr_QKeyCombination *C.QKeyCombination = nil - C.QKeyCombination_new(&outptr_QKeyCombination) - ret := newQKeyCombination(outptr_QKeyCombination) + ret := newQKeyCombination(C.QKeyCombination_new()) ret.isSubclass = true return ret } // NewQKeyCombination2 constructs a new QKeyCombination object. func NewQKeyCombination2(modifiers Modifier) *QKeyCombination { - var outptr_QKeyCombination *C.QKeyCombination = nil - C.QKeyCombination_new2((C.int)(modifiers), &outptr_QKeyCombination) - ret := newQKeyCombination(outptr_QKeyCombination) + ret := newQKeyCombination(C.QKeyCombination_new2((C.int)(modifiers))) ret.isSubclass = true return ret } // NewQKeyCombination3 constructs a new QKeyCombination object. func NewQKeyCombination3(modifiers KeyboardModifier) *QKeyCombination { - var outptr_QKeyCombination *C.QKeyCombination = nil - C.QKeyCombination_new3((C.int)(modifiers), &outptr_QKeyCombination) - ret := newQKeyCombination(outptr_QKeyCombination) + ret := newQKeyCombination(C.QKeyCombination_new3((C.int)(modifiers))) ret.isSubclass = true return ret } // NewQKeyCombination4 constructs a new QKeyCombination object. func NewQKeyCombination4(param1 *QKeyCombination) *QKeyCombination { - var outptr_QKeyCombination *C.QKeyCombination = nil - C.QKeyCombination_new4(param1.cPointer(), &outptr_QKeyCombination) - ret := newQKeyCombination(outptr_QKeyCombination) + ret := newQKeyCombination(C.QKeyCombination_new4(param1.cPointer())) ret.isSubclass = true return ret } // NewQKeyCombination5 constructs a new QKeyCombination object. func NewQKeyCombination5(key Key) *QKeyCombination { - var outptr_QKeyCombination *C.QKeyCombination = nil - C.QKeyCombination_new5((C.int)(key), &outptr_QKeyCombination) - ret := newQKeyCombination(outptr_QKeyCombination) + ret := newQKeyCombination(C.QKeyCombination_new5((C.int)(key))) ret.isSubclass = true return ret } // NewQKeyCombination6 constructs a new QKeyCombination object. func NewQKeyCombination6(modifiers Modifier, key Key) *QKeyCombination { - var outptr_QKeyCombination *C.QKeyCombination = nil - C.QKeyCombination_new6((C.int)(modifiers), (C.int)(key), &outptr_QKeyCombination) - ret := newQKeyCombination(outptr_QKeyCombination) + ret := newQKeyCombination(C.QKeyCombination_new6((C.int)(modifiers), (C.int)(key))) ret.isSubclass = true return ret } // NewQKeyCombination7 constructs a new QKeyCombination object. func NewQKeyCombination7(modifiers KeyboardModifier, key Key) *QKeyCombination { - var outptr_QKeyCombination *C.QKeyCombination = nil - C.QKeyCombination_new7((C.int)(modifiers), (C.int)(key), &outptr_QKeyCombination) - ret := newQKeyCombination(outptr_QKeyCombination) + ret := newQKeyCombination(C.QKeyCombination_new7((C.int)(modifiers), (C.int)(key))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qnamespace.h b/qt6/gen_qnamespace.h index d1874802..0510af7c 100644 --- a/qt6/gen_qnamespace.h +++ b/qt6/gen_qnamespace.h @@ -28,19 +28,19 @@ typedef struct QKeyCombination QKeyCombination; typedef struct Disambiguated_t Disambiguated_t; #endif -void Disambiguated_t_new(Disambiguated_t** outptr_Disambiguated_t); -void Disambiguated_t_new2(Disambiguated_t* param1, Disambiguated_t** outptr_Disambiguated_t); +Disambiguated_t* Disambiguated_t_new(); +Disambiguated_t* Disambiguated_t_new2(Disambiguated_t* param1); void Disambiguated_t_Delete(Disambiguated_t* self, bool isSubclass); void QInternal_Delete(QInternal* self, bool isSubclass); -void QKeyCombination_new(QKeyCombination** outptr_QKeyCombination); -void QKeyCombination_new2(int modifiers, QKeyCombination** outptr_QKeyCombination); -void QKeyCombination_new3(int modifiers, QKeyCombination** outptr_QKeyCombination); -void QKeyCombination_new4(QKeyCombination* param1, QKeyCombination** outptr_QKeyCombination); -void QKeyCombination_new5(int key, QKeyCombination** outptr_QKeyCombination); -void QKeyCombination_new6(int modifiers, int key, QKeyCombination** outptr_QKeyCombination); -void QKeyCombination_new7(int modifiers, int key, QKeyCombination** outptr_QKeyCombination); +QKeyCombination* QKeyCombination_new(); +QKeyCombination* QKeyCombination_new2(int modifiers); +QKeyCombination* QKeyCombination_new3(int modifiers); +QKeyCombination* QKeyCombination_new4(QKeyCombination* param1); +QKeyCombination* QKeyCombination_new5(int key); +QKeyCombination* QKeyCombination_new6(int modifiers, int key); +QKeyCombination* QKeyCombination_new7(int modifiers, int key); int QKeyCombination_KeyboardModifiers(const QKeyCombination* self); int QKeyCombination_Key(const QKeyCombination* self); QKeyCombination* QKeyCombination_FromCombined(int combined); diff --git a/qt6/gen_qobject.cpp b/qt6/gen_qobject.cpp index 2c77c94f..ad2d5ec6 100644 --- a/qt6/gen_qobject.cpp +++ b/qt6/gen_qobject.cpp @@ -213,14 +213,12 @@ public: }; -void QObject_new(QObject** outptr_QObject) { - MiqtVirtualQObject* ret = new MiqtVirtualQObject(); - *outptr_QObject = ret; +QObject* QObject_new() { + return new MiqtVirtualQObject(); } -void QObject_new2(QObject* parent, QObject** outptr_QObject) { - MiqtVirtualQObject* ret = new MiqtVirtualQObject(parent); - *outptr_QObject = ret; +QObject* QObject_new2(QObject* parent) { + return new MiqtVirtualQObject(parent); } QMetaObject* QObject_MetaObject(const QObject* self) { @@ -515,14 +513,12 @@ void QObject_Delete(QObject* self, bool isSubclass) { } } -void QSignalBlocker_new(QObject* o, QSignalBlocker** outptr_QSignalBlocker) { - QSignalBlocker* ret = new QSignalBlocker(o); - *outptr_QSignalBlocker = ret; +QSignalBlocker* QSignalBlocker_new(QObject* o) { + return new QSignalBlocker(o); } -void QSignalBlocker_new2(QObject* o, QSignalBlocker** outptr_QSignalBlocker) { - QSignalBlocker* ret = new QSignalBlocker(*o); - *outptr_QSignalBlocker = ret; +QSignalBlocker* QSignalBlocker_new2(QObject* o) { + return new QSignalBlocker(*o); } void QSignalBlocker_Reblock(QSignalBlocker* self) { diff --git a/qt6/gen_qobject.go b/qt6/gen_qobject.go index 088b5e5d..4b6fc31d 100644 --- a/qt6/gen_qobject.go +++ b/qt6/gen_qobject.go @@ -44,16 +44,13 @@ func newQObjectData(h *C.QObjectData) *QObjectData { if h == nil { return nil } + return &QObjectData{h: h} } // UnsafeNewQObjectData constructs the type using only unsafe pointers. func UnsafeNewQObjectData(h unsafe.Pointer) *QObjectData { - if h == nil { - return nil - } - - return &QObjectData{h: (*C.QObjectData)(h)} + return newQObjectData((*C.QObjectData)(h)) } func (this *QObjectData) DynamicMetaObject() *QMetaObject { @@ -98,34 +95,27 @@ func newQObject(h *C.QObject) *QObject { if h == nil { return nil } + return &QObject{h: h} } // UnsafeNewQObject constructs the type using only unsafe pointers. func UnsafeNewQObject(h unsafe.Pointer) *QObject { - if h == nil { - return nil - } - - return &QObject{h: (*C.QObject)(h)} + return newQObject((*C.QObject)(h)) } // NewQObject constructs a new QObject object. func NewQObject() *QObject { - var outptr_QObject *C.QObject = nil - C.QObject_new(&outptr_QObject) - ret := newQObject(outptr_QObject) + ret := newQObject(C.QObject_new()) ret.isSubclass = true return ret } // NewQObject2 constructs a new QObject object. func NewQObject2(parent *QObject) *QObject { - var outptr_QObject *C.QObject = nil - C.QObject_new2(parent.cPointer(), &outptr_QObject) - ret := newQObject(outptr_QObject) + ret := newQObject(C.QObject_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -189,7 +179,7 @@ func (this *QObject) BlockSignals(b bool) bool { } func (this *QObject) Thread() *QThread { - return newQThread(C.QObject_Thread(this.h), nil) + return newQThread(C.QObject_Thread(this.h)) } func (this *QObject) MoveToThread(thread *QThread) { @@ -464,7 +454,7 @@ func miqt_exec_callback_QObject_TimerEvent(self *C.QObject, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QObject{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -490,7 +480,7 @@ func miqt_exec_callback_QObject_ChildEvent(self *C.QObject, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QObject{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -612,34 +602,27 @@ func newQSignalBlocker(h *C.QSignalBlocker) *QSignalBlocker { if h == nil { return nil } + return &QSignalBlocker{h: h} } // UnsafeNewQSignalBlocker constructs the type using only unsafe pointers. func UnsafeNewQSignalBlocker(h unsafe.Pointer) *QSignalBlocker { - if h == nil { - return nil - } - - return &QSignalBlocker{h: (*C.QSignalBlocker)(h)} + return newQSignalBlocker((*C.QSignalBlocker)(h)) } // NewQSignalBlocker constructs a new QSignalBlocker object. func NewQSignalBlocker(o *QObject) *QSignalBlocker { - var outptr_QSignalBlocker *C.QSignalBlocker = nil - C.QSignalBlocker_new(o.cPointer(), &outptr_QSignalBlocker) - ret := newQSignalBlocker(outptr_QSignalBlocker) + ret := newQSignalBlocker(C.QSignalBlocker_new(o.cPointer())) ret.isSubclass = true return ret } // NewQSignalBlocker2 constructs a new QSignalBlocker object. func NewQSignalBlocker2(o *QObject) *QSignalBlocker { - var outptr_QSignalBlocker *C.QSignalBlocker = nil - C.QSignalBlocker_new2(o.cPointer(), &outptr_QSignalBlocker) - ret := newQSignalBlocker(outptr_QSignalBlocker) + ret := newQSignalBlocker(C.QSignalBlocker_new2(o.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qobject.h b/qt6/gen_qobject.h index 043ffd0d..284bded9 100644 --- a/qt6/gen_qobject.h +++ b/qt6/gen_qobject.h @@ -51,8 +51,8 @@ typedef struct QVariant QVariant; QMetaObject* QObjectData_DynamicMetaObject(const QObjectData* self); void QObjectData_Delete(QObjectData* self, bool isSubclass); -void QObject_new(QObject** outptr_QObject); -void QObject_new2(QObject* parent, QObject** outptr_QObject); +QObject* QObject_new(); +QObject* QObject_new2(QObject* parent); QMetaObject* QObject_MetaObject(const QObject* self); void* QObject_Metacast(QObject* self, const char* param1); struct miqt_string QObject_Tr(const char* s); @@ -117,8 +117,8 @@ void QObject_override_virtual_DisconnectNotify(void* self, intptr_t slot); void QObject_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QObject_Delete(QObject* self, bool isSubclass); -void QSignalBlocker_new(QObject* o, QSignalBlocker** outptr_QSignalBlocker); -void QSignalBlocker_new2(QObject* o, QSignalBlocker** outptr_QSignalBlocker); +QSignalBlocker* QSignalBlocker_new(QObject* o); +QSignalBlocker* QSignalBlocker_new2(QObject* o); void QSignalBlocker_Reblock(QSignalBlocker* self); void QSignalBlocker_Unblock(QSignalBlocker* self); void QSignalBlocker_Delete(QSignalBlocker* self, bool isSubclass); diff --git a/qt6/gen_qobjectcleanuphandler.cpp b/qt6/gen_qobjectcleanuphandler.cpp index 3d4e6e21..8648e551 100644 --- a/qt6/gen_qobjectcleanuphandler.cpp +++ b/qt6/gen_qobjectcleanuphandler.cpp @@ -192,10 +192,12 @@ public: }; -void QObjectCleanupHandler_new(QObjectCleanupHandler** outptr_QObjectCleanupHandler, QObject** outptr_QObject) { - MiqtVirtualQObjectCleanupHandler* ret = new MiqtVirtualQObjectCleanupHandler(); - *outptr_QObjectCleanupHandler = ret; - *outptr_QObject = static_cast(ret); +QObjectCleanupHandler* QObjectCleanupHandler_new() { + return new MiqtVirtualQObjectCleanupHandler(); +} + +void QObjectCleanupHandler_virtbase(QObjectCleanupHandler* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QObjectCleanupHandler_MetaObject(const QObjectCleanupHandler* self) { diff --git a/qt6/gen_qobjectcleanuphandler.go b/qt6/gen_qobjectcleanuphandler.go index fbcb351f..e25a7e76 100644 --- a/qt6/gen_qobjectcleanuphandler.go +++ b/qt6/gen_qobjectcleanuphandler.go @@ -35,31 +35,26 @@ func (this *QObjectCleanupHandler) UnsafePointer() unsafe.Pointer { } // newQObjectCleanupHandler constructs the type using only CGO pointers. -func newQObjectCleanupHandler(h *C.QObjectCleanupHandler, h_QObject *C.QObject) *QObjectCleanupHandler { +func newQObjectCleanupHandler(h *C.QObjectCleanupHandler) *QObjectCleanupHandler { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QObjectCleanupHandler_virtbase(h, &outptr_QObject) + return &QObjectCleanupHandler{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQObjectCleanupHandler constructs the type using only unsafe pointers. -func UnsafeNewQObjectCleanupHandler(h unsafe.Pointer, h_QObject unsafe.Pointer) *QObjectCleanupHandler { - if h == nil { - return nil - } - - return &QObjectCleanupHandler{h: (*C.QObjectCleanupHandler)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQObjectCleanupHandler(h unsafe.Pointer) *QObjectCleanupHandler { + return newQObjectCleanupHandler((*C.QObjectCleanupHandler)(h)) } // NewQObjectCleanupHandler constructs a new QObjectCleanupHandler object. func NewQObjectCleanupHandler() *QObjectCleanupHandler { - var outptr_QObjectCleanupHandler *C.QObjectCleanupHandler = nil - var outptr_QObject *C.QObject = nil - C.QObjectCleanupHandler_new(&outptr_QObjectCleanupHandler, &outptr_QObject) - ret := newQObjectCleanupHandler(outptr_QObjectCleanupHandler, outptr_QObject) + ret := newQObjectCleanupHandler(C.QObjectCleanupHandler_new()) ret.isSubclass = true return ret } @@ -199,7 +194,7 @@ func miqt_exec_callback_QObjectCleanupHandler_TimerEvent(self *C.QObjectCleanupH } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -225,7 +220,7 @@ func miqt_exec_callback_QObjectCleanupHandler_ChildEvent(self *C.QObjectCleanupH } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QObjectCleanupHandler{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qobjectcleanuphandler.h b/qt6/gen_qobjectcleanuphandler.h index 0d39ab34..b1300bac 100644 --- a/qt6/gen_qobjectcleanuphandler.h +++ b/qt6/gen_qobjectcleanuphandler.h @@ -32,7 +32,8 @@ typedef struct QObjectCleanupHandler QObjectCleanupHandler; typedef struct QTimerEvent QTimerEvent; #endif -void QObjectCleanupHandler_new(QObjectCleanupHandler** outptr_QObjectCleanupHandler, QObject** outptr_QObject); +QObjectCleanupHandler* QObjectCleanupHandler_new(); +void QObjectCleanupHandler_virtbase(QObjectCleanupHandler* src, QObject** outptr_QObject); QMetaObject* QObjectCleanupHandler_MetaObject(const QObjectCleanupHandler* self); void* QObjectCleanupHandler_Metacast(QObjectCleanupHandler* self, const char* param1); struct miqt_string QObjectCleanupHandler_Tr(const char* s); diff --git a/qt6/gen_qobjectdefs.cpp b/qt6/gen_qobjectdefs.cpp index 13b96562..47c391f4 100644 --- a/qt6/gen_qobjectdefs.cpp +++ b/qt6/gen_qobjectdefs.cpp @@ -27,24 +27,20 @@ void QMethodRawArguments_Delete(QMethodRawArguments* self, bool isSubclass) { } } -void QGenericArgument_new(QGenericArgument** outptr_QGenericArgument) { - QGenericArgument* ret = new QGenericArgument(); - *outptr_QGenericArgument = ret; +QGenericArgument* QGenericArgument_new() { + return new QGenericArgument(); } -void QGenericArgument_new2(QGenericArgument* param1, QGenericArgument** outptr_QGenericArgument) { - QGenericArgument* ret = new QGenericArgument(*param1); - *outptr_QGenericArgument = ret; +QGenericArgument* QGenericArgument_new2(QGenericArgument* param1) { + return new QGenericArgument(*param1); } -void QGenericArgument_new3(const char* aName, QGenericArgument** outptr_QGenericArgument) { - QGenericArgument* ret = new QGenericArgument(aName); - *outptr_QGenericArgument = ret; +QGenericArgument* QGenericArgument_new3(const char* aName) { + return new QGenericArgument(aName); } -void QGenericArgument_new4(const char* aName, const void* aData, QGenericArgument** outptr_QGenericArgument) { - QGenericArgument* ret = new QGenericArgument(aName, aData); - *outptr_QGenericArgument = ret; +QGenericArgument* QGenericArgument_new4(const char* aName, const void* aData) { + return new QGenericArgument(aName, aData); } void* QGenericArgument_Data(const QGenericArgument* self) { @@ -63,28 +59,24 @@ void QGenericArgument_Delete(QGenericArgument* self, bool isSubclass) { } } -void QGenericReturnArgument_new(QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { - QGenericReturnArgument* ret = new QGenericReturnArgument(); - *outptr_QGenericReturnArgument = ret; - *outptr_QGenericArgument = static_cast(ret); +QGenericReturnArgument* QGenericReturnArgument_new() { + return new QGenericReturnArgument(); } -void QGenericReturnArgument_new2(QGenericReturnArgument* param1, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { - QGenericReturnArgument* ret = new QGenericReturnArgument(*param1); - *outptr_QGenericReturnArgument = ret; - *outptr_QGenericArgument = static_cast(ret); +QGenericReturnArgument* QGenericReturnArgument_new2(QGenericReturnArgument* param1) { + return new QGenericReturnArgument(*param1); } -void QGenericReturnArgument_new3(const char* aName, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { - QGenericReturnArgument* ret = new QGenericReturnArgument(aName); - *outptr_QGenericReturnArgument = ret; - *outptr_QGenericArgument = static_cast(ret); +QGenericReturnArgument* QGenericReturnArgument_new3(const char* aName) { + return new QGenericReturnArgument(aName); } -void QGenericReturnArgument_new4(const char* aName, void* aData, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument) { - QGenericReturnArgument* ret = new QGenericReturnArgument(aName, aData); - *outptr_QGenericReturnArgument = ret; - *outptr_QGenericArgument = static_cast(ret); +QGenericReturnArgument* QGenericReturnArgument_new4(const char* aName, void* aData) { + return new QGenericReturnArgument(aName, aData); +} + +void QGenericReturnArgument_virtbase(QGenericReturnArgument* src, QGenericArgument** outptr_QGenericArgument) { + *outptr_QGenericArgument = static_cast(src); } void QGenericReturnArgument_Delete(QGenericReturnArgument* self, bool isSubclass) { @@ -95,14 +87,12 @@ void QGenericReturnArgument_Delete(QGenericReturnArgument* self, bool isSubclass } } -void QMetaObject_new(QMetaObject** outptr_QMetaObject) { - QMetaObject* ret = new QMetaObject(); - *outptr_QMetaObject = ret; +QMetaObject* QMetaObject_new() { + return new QMetaObject(); } -void QMetaObject_new2(QMetaObject* param1, QMetaObject** outptr_QMetaObject) { - QMetaObject* ret = new QMetaObject(*param1); - *outptr_QMetaObject = ret; +QMetaObject* QMetaObject_new2(QMetaObject* param1) { + return new QMetaObject(*param1); } const char* QMetaObject_ClassName(const QMetaObject* self) { @@ -517,14 +507,12 @@ void QMetaObject_Delete(QMetaObject* self, bool isSubclass) { } } -void QMetaObject__Connection_new(QMetaObject__Connection** outptr_QMetaObject__Connection) { - QMetaObject::Connection* ret = new QMetaObject::Connection(); - *outptr_QMetaObject__Connection = ret; +QMetaObject__Connection* QMetaObject__Connection_new() { + return new QMetaObject::Connection(); } -void QMetaObject__Connection_new2(QMetaObject__Connection* other, QMetaObject__Connection** outptr_QMetaObject__Connection) { - QMetaObject::Connection* ret = new QMetaObject::Connection(*other); - *outptr_QMetaObject__Connection = ret; +QMetaObject__Connection* QMetaObject__Connection_new2(QMetaObject__Connection* other) { + return new QMetaObject::Connection(*other); } void QMetaObject__Connection_OperatorAssign(QMetaObject__Connection* self, QMetaObject__Connection* other) { @@ -543,19 +531,16 @@ void QMetaObject__Connection_Delete(QMetaObject__Connection* self, bool isSubcla } } -void QMetaObject__SuperData_new(QMetaObject__SuperData** outptr_QMetaObject__SuperData) { - QMetaObject::SuperData* ret = new QMetaObject::SuperData(); - *outptr_QMetaObject__SuperData = ret; +QMetaObject__SuperData* QMetaObject__SuperData_new() { + return new QMetaObject::SuperData(); } -void QMetaObject__SuperData_new2(QMetaObject* mo, QMetaObject__SuperData** outptr_QMetaObject__SuperData) { - QMetaObject::SuperData* ret = new QMetaObject::SuperData(mo); - *outptr_QMetaObject__SuperData = ret; +QMetaObject__SuperData* QMetaObject__SuperData_new2(QMetaObject* mo) { + return new QMetaObject::SuperData(mo); } -void QMetaObject__SuperData_new3(QMetaObject__SuperData* param1, QMetaObject__SuperData** outptr_QMetaObject__SuperData) { - QMetaObject::SuperData* ret = new QMetaObject::SuperData(*param1); - *outptr_QMetaObject__SuperData = ret; +QMetaObject__SuperData* QMetaObject__SuperData_new3(QMetaObject__SuperData* param1) { + return new QMetaObject::SuperData(*param1); } QMetaObject* QMetaObject__SuperData_OperatorMinusGreater(const QMetaObject__SuperData* self) { @@ -574,14 +559,12 @@ void QMetaObject__SuperData_Delete(QMetaObject__SuperData* self, bool isSubclass } } -void QMetaObject__Data_new(QMetaObject__Data** outptr_QMetaObject__Data) { - QMetaObject::Data* ret = new QMetaObject::Data(); - *outptr_QMetaObject__Data = ret; +QMetaObject__Data* QMetaObject__Data_new() { + return new QMetaObject::Data(); } -void QMetaObject__Data_new2(QMetaObject__Data* param1, QMetaObject__Data** outptr_QMetaObject__Data) { - QMetaObject::Data* ret = new QMetaObject::Data(*param1); - *outptr_QMetaObject__Data = ret; +QMetaObject__Data* QMetaObject__Data_new2(QMetaObject__Data* param1) { + return new QMetaObject::Data(*param1); } void QMetaObject__Data_OperatorAssign(QMetaObject__Data* self, QMetaObject__Data* param1) { diff --git a/qt6/gen_qobjectdefs.go b/qt6/gen_qobjectdefs.go index f78fd56c..6bfdb8dc 100644 --- a/qt6/gen_qobjectdefs.go +++ b/qt6/gen_qobjectdefs.go @@ -52,16 +52,13 @@ func newQMethodRawArguments(h *C.QMethodRawArguments) *QMethodRawArguments { if h == nil { return nil } + return &QMethodRawArguments{h: h} } // UnsafeNewQMethodRawArguments constructs the type using only unsafe pointers. func UnsafeNewQMethodRawArguments(h unsafe.Pointer) *QMethodRawArguments { - if h == nil { - return nil - } - - return &QMethodRawArguments{h: (*C.QMethodRawArguments)(h)} + return newQMethodRawArguments((*C.QMethodRawArguments)(h)) } // Delete this object from C++ memory. @@ -102,34 +99,27 @@ func newQGenericArgument(h *C.QGenericArgument) *QGenericArgument { if h == nil { return nil } + return &QGenericArgument{h: h} } // UnsafeNewQGenericArgument constructs the type using only unsafe pointers. func UnsafeNewQGenericArgument(h unsafe.Pointer) *QGenericArgument { - if h == nil { - return nil - } - - return &QGenericArgument{h: (*C.QGenericArgument)(h)} + return newQGenericArgument((*C.QGenericArgument)(h)) } // NewQGenericArgument constructs a new QGenericArgument object. func NewQGenericArgument() *QGenericArgument { - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericArgument_new(&outptr_QGenericArgument) - ret := newQGenericArgument(outptr_QGenericArgument) + ret := newQGenericArgument(C.QGenericArgument_new()) ret.isSubclass = true return ret } // NewQGenericArgument2 constructs a new QGenericArgument object. func NewQGenericArgument2(param1 *QGenericArgument) *QGenericArgument { - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericArgument_new2(param1.cPointer(), &outptr_QGenericArgument) - ret := newQGenericArgument(outptr_QGenericArgument) + ret := newQGenericArgument(C.QGenericArgument_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -138,10 +128,8 @@ func NewQGenericArgument2(param1 *QGenericArgument) *QGenericArgument { func NewQGenericArgument3(aName string) *QGenericArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericArgument_new3(aName_Cstring, &outptr_QGenericArgument) - ret := newQGenericArgument(outptr_QGenericArgument) + ret := newQGenericArgument(C.QGenericArgument_new3(aName_Cstring)) ret.isSubclass = true return ret } @@ -150,10 +138,8 @@ func NewQGenericArgument3(aName string) *QGenericArgument { func NewQGenericArgument4(aName string, aData unsafe.Pointer) *QGenericArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericArgument_new4(aName_Cstring, aData, &outptr_QGenericArgument) - ret := newQGenericArgument(outptr_QGenericArgument) + ret := newQGenericArgument(C.QGenericArgument_new4(aName_Cstring, aData)) ret.isSubclass = true return ret } @@ -202,42 +188,34 @@ func (this *QGenericReturnArgument) UnsafePointer() unsafe.Pointer { } // newQGenericReturnArgument constructs the type using only CGO pointers. -func newQGenericReturnArgument(h *C.QGenericReturnArgument, h_QGenericArgument *C.QGenericArgument) *QGenericReturnArgument { +func newQGenericReturnArgument(h *C.QGenericReturnArgument) *QGenericReturnArgument { if h == nil { return nil } + var outptr_QGenericArgument *C.QGenericArgument = nil + C.QGenericReturnArgument_virtbase(h, &outptr_QGenericArgument) + return &QGenericReturnArgument{h: h, - QGenericArgument: newQGenericArgument(h_QGenericArgument)} + QGenericArgument: newQGenericArgument(outptr_QGenericArgument)} } // UnsafeNewQGenericReturnArgument constructs the type using only unsafe pointers. -func UnsafeNewQGenericReturnArgument(h unsafe.Pointer, h_QGenericArgument unsafe.Pointer) *QGenericReturnArgument { - if h == nil { - return nil - } - - return &QGenericReturnArgument{h: (*C.QGenericReturnArgument)(h), - QGenericArgument: UnsafeNewQGenericArgument(h_QGenericArgument)} +func UnsafeNewQGenericReturnArgument(h unsafe.Pointer) *QGenericReturnArgument { + return newQGenericReturnArgument((*C.QGenericReturnArgument)(h)) } // NewQGenericReturnArgument constructs a new QGenericReturnArgument object. func NewQGenericReturnArgument() *QGenericReturnArgument { - var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericReturnArgument_new(&outptr_QGenericReturnArgument, &outptr_QGenericArgument) - ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret := newQGenericReturnArgument(C.QGenericReturnArgument_new()) ret.isSubclass = true return ret } // NewQGenericReturnArgument2 constructs a new QGenericReturnArgument object. func NewQGenericReturnArgument2(param1 *QGenericReturnArgument) *QGenericReturnArgument { - var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericReturnArgument_new2(param1.cPointer(), &outptr_QGenericReturnArgument, &outptr_QGenericArgument) - ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret := newQGenericReturnArgument(C.QGenericReturnArgument_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -246,11 +224,8 @@ func NewQGenericReturnArgument2(param1 *QGenericReturnArgument) *QGenericReturnA func NewQGenericReturnArgument3(aName string) *QGenericReturnArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericReturnArgument_new3(aName_Cstring, &outptr_QGenericReturnArgument, &outptr_QGenericArgument) - ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret := newQGenericReturnArgument(C.QGenericReturnArgument_new3(aName_Cstring)) ret.isSubclass = true return ret } @@ -259,11 +234,8 @@ func NewQGenericReturnArgument3(aName string) *QGenericReturnArgument { func NewQGenericReturnArgument4(aName string, aData unsafe.Pointer) *QGenericReturnArgument { aName_Cstring := C.CString(aName) defer C.free(unsafe.Pointer(aName_Cstring)) - var outptr_QGenericReturnArgument *C.QGenericReturnArgument = nil - var outptr_QGenericArgument *C.QGenericArgument = nil - C.QGenericReturnArgument_new4(aName_Cstring, aData, &outptr_QGenericReturnArgument, &outptr_QGenericArgument) - ret := newQGenericReturnArgument(outptr_QGenericReturnArgument, outptr_QGenericArgument) + ret := newQGenericReturnArgument(C.QGenericReturnArgument_new4(aName_Cstring, aData)) ret.isSubclass = true return ret } @@ -306,34 +278,27 @@ func newQMetaObject(h *C.QMetaObject) *QMetaObject { if h == nil { return nil } + return &QMetaObject{h: h} } // UnsafeNewQMetaObject constructs the type using only unsafe pointers. func UnsafeNewQMetaObject(h unsafe.Pointer) *QMetaObject { - if h == nil { - return nil - } - - return &QMetaObject{h: (*C.QMetaObject)(h)} + return newQMetaObject((*C.QMetaObject)(h)) } // NewQMetaObject constructs a new QMetaObject object. func NewQMetaObject() *QMetaObject { - var outptr_QMetaObject *C.QMetaObject = nil - C.QMetaObject_new(&outptr_QMetaObject) - ret := newQMetaObject(outptr_QMetaObject) + ret := newQMetaObject(C.QMetaObject_new()) ret.isSubclass = true return ret } // NewQMetaObject2 constructs a new QMetaObject object. func NewQMetaObject2(param1 *QMetaObject) *QMetaObject { - var outptr_QMetaObject *C.QMetaObject = nil - C.QMetaObject_new2(param1.cPointer(), &outptr_QMetaObject) - ret := newQMetaObject(outptr_QMetaObject) + ret := newQMetaObject(C.QMetaObject_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -907,34 +872,27 @@ func newQMetaObject__Connection(h *C.QMetaObject__Connection) *QMetaObject__Conn if h == nil { return nil } + return &QMetaObject__Connection{h: h} } // UnsafeNewQMetaObject__Connection constructs the type using only unsafe pointers. func UnsafeNewQMetaObject__Connection(h unsafe.Pointer) *QMetaObject__Connection { - if h == nil { - return nil - } - - return &QMetaObject__Connection{h: (*C.QMetaObject__Connection)(h)} + return newQMetaObject__Connection((*C.QMetaObject__Connection)(h)) } // NewQMetaObject__Connection constructs a new QMetaObject::Connection object. func NewQMetaObject__Connection() *QMetaObject__Connection { - var outptr_QMetaObject__Connection *C.QMetaObject__Connection = nil - C.QMetaObject__Connection_new(&outptr_QMetaObject__Connection) - ret := newQMetaObject__Connection(outptr_QMetaObject__Connection) + ret := newQMetaObject__Connection(C.QMetaObject__Connection_new()) ret.isSubclass = true return ret } // NewQMetaObject__Connection2 constructs a new QMetaObject::Connection object. func NewQMetaObject__Connection2(other *QMetaObject__Connection) *QMetaObject__Connection { - var outptr_QMetaObject__Connection *C.QMetaObject__Connection = nil - C.QMetaObject__Connection_new2(other.cPointer(), &outptr_QMetaObject__Connection) - ret := newQMetaObject__Connection(outptr_QMetaObject__Connection) + ret := newQMetaObject__Connection(C.QMetaObject__Connection_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -985,44 +943,35 @@ func newQMetaObject__SuperData(h *C.QMetaObject__SuperData) *QMetaObject__SuperD if h == nil { return nil } + return &QMetaObject__SuperData{h: h} } // UnsafeNewQMetaObject__SuperData constructs the type using only unsafe pointers. func UnsafeNewQMetaObject__SuperData(h unsafe.Pointer) *QMetaObject__SuperData { - if h == nil { - return nil - } - - return &QMetaObject__SuperData{h: (*C.QMetaObject__SuperData)(h)} + return newQMetaObject__SuperData((*C.QMetaObject__SuperData)(h)) } // NewQMetaObject__SuperData constructs a new QMetaObject::SuperData object. func NewQMetaObject__SuperData() *QMetaObject__SuperData { - var outptr_QMetaObject__SuperData *C.QMetaObject__SuperData = nil - C.QMetaObject__SuperData_new(&outptr_QMetaObject__SuperData) - ret := newQMetaObject__SuperData(outptr_QMetaObject__SuperData) + ret := newQMetaObject__SuperData(C.QMetaObject__SuperData_new()) ret.isSubclass = true return ret } // NewQMetaObject__SuperData2 constructs a new QMetaObject::SuperData object. func NewQMetaObject__SuperData2(mo *QMetaObject) *QMetaObject__SuperData { - var outptr_QMetaObject__SuperData *C.QMetaObject__SuperData = nil - C.QMetaObject__SuperData_new2(mo.cPointer(), &outptr_QMetaObject__SuperData) - ret := newQMetaObject__SuperData(outptr_QMetaObject__SuperData) + ret := newQMetaObject__SuperData(C.QMetaObject__SuperData_new2(mo.cPointer())) ret.isSubclass = true return ret } // NewQMetaObject__SuperData3 constructs a new QMetaObject::SuperData object. func NewQMetaObject__SuperData3(param1 *QMetaObject__SuperData) *QMetaObject__SuperData { - var outptr_QMetaObject__SuperData *C.QMetaObject__SuperData = nil - C.QMetaObject__SuperData_new3(param1.cPointer(), &outptr_QMetaObject__SuperData) - ret := newQMetaObject__SuperData(outptr_QMetaObject__SuperData) + ret := newQMetaObject__SuperData(C.QMetaObject__SuperData_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -1073,34 +1022,27 @@ func newQMetaObject__Data(h *C.QMetaObject__Data) *QMetaObject__Data { if h == nil { return nil } + return &QMetaObject__Data{h: h} } // UnsafeNewQMetaObject__Data constructs the type using only unsafe pointers. func UnsafeNewQMetaObject__Data(h unsafe.Pointer) *QMetaObject__Data { - if h == nil { - return nil - } - - return &QMetaObject__Data{h: (*C.QMetaObject__Data)(h)} + return newQMetaObject__Data((*C.QMetaObject__Data)(h)) } // NewQMetaObject__Data constructs a new QMetaObject::Data object. func NewQMetaObject__Data() *QMetaObject__Data { - var outptr_QMetaObject__Data *C.QMetaObject__Data = nil - C.QMetaObject__Data_new(&outptr_QMetaObject__Data) - ret := newQMetaObject__Data(outptr_QMetaObject__Data) + ret := newQMetaObject__Data(C.QMetaObject__Data_new()) ret.isSubclass = true return ret } // NewQMetaObject__Data2 constructs a new QMetaObject::Data object. func NewQMetaObject__Data2(param1 *QMetaObject__Data) *QMetaObject__Data { - var outptr_QMetaObject__Data *C.QMetaObject__Data = nil - C.QMetaObject__Data_new2(param1.cPointer(), &outptr_QMetaObject__Data) - ret := newQMetaObject__Data(outptr_QMetaObject__Data) + ret := newQMetaObject__Data(C.QMetaObject__Data_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qobjectdefs.h b/qt6/gen_qobjectdefs.h index a5f9be60..7bb9bfbc 100644 --- a/qt6/gen_qobjectdefs.h +++ b/qt6/gen_qobjectdefs.h @@ -58,22 +58,23 @@ typedef struct QObject QObject; void QMethodRawArguments_Delete(QMethodRawArguments* self, bool isSubclass); -void QGenericArgument_new(QGenericArgument** outptr_QGenericArgument); -void QGenericArgument_new2(QGenericArgument* param1, QGenericArgument** outptr_QGenericArgument); -void QGenericArgument_new3(const char* aName, QGenericArgument** outptr_QGenericArgument); -void QGenericArgument_new4(const char* aName, const void* aData, QGenericArgument** outptr_QGenericArgument); +QGenericArgument* QGenericArgument_new(); +QGenericArgument* QGenericArgument_new2(QGenericArgument* param1); +QGenericArgument* QGenericArgument_new3(const char* aName); +QGenericArgument* QGenericArgument_new4(const char* aName, const void* aData); void* QGenericArgument_Data(const QGenericArgument* self); const char* QGenericArgument_Name(const QGenericArgument* self); void QGenericArgument_Delete(QGenericArgument* self, bool isSubclass); -void QGenericReturnArgument_new(QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); -void QGenericReturnArgument_new2(QGenericReturnArgument* param1, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); -void QGenericReturnArgument_new3(const char* aName, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); -void QGenericReturnArgument_new4(const char* aName, void* aData, QGenericReturnArgument** outptr_QGenericReturnArgument, QGenericArgument** outptr_QGenericArgument); +QGenericReturnArgument* QGenericReturnArgument_new(); +QGenericReturnArgument* QGenericReturnArgument_new2(QGenericReturnArgument* param1); +QGenericReturnArgument* QGenericReturnArgument_new3(const char* aName); +QGenericReturnArgument* QGenericReturnArgument_new4(const char* aName, void* aData); +void QGenericReturnArgument_virtbase(QGenericReturnArgument* src, QGenericArgument** outptr_QGenericArgument); void QGenericReturnArgument_Delete(QGenericReturnArgument* self, bool isSubclass); -void QMetaObject_new(QMetaObject** outptr_QMetaObject); -void QMetaObject_new2(QMetaObject* param1, QMetaObject** outptr_QMetaObject); +QMetaObject* QMetaObject_new(); +QMetaObject* QMetaObject_new2(QMetaObject* param1); const char* QMetaObject_ClassName(const QMetaObject* self); QMetaObject* QMetaObject_SuperClass(const QMetaObject* self); bool QMetaObject_Inherits(const QMetaObject* self, QMetaObject* metaObject); @@ -171,21 +172,21 @@ QObject* QMetaObject_NewInstance9(const QMetaObject* self, QGenericArgument* val QObject* QMetaObject_NewInstance10(const QMetaObject* self, QGenericArgument* val0, QGenericArgument* val1, QGenericArgument* val2, QGenericArgument* val3, QGenericArgument* val4, QGenericArgument* val5, QGenericArgument* val6, QGenericArgument* val7, QGenericArgument* val8, QGenericArgument* val9); void QMetaObject_Delete(QMetaObject* self, bool isSubclass); -void QMetaObject__Connection_new(QMetaObject__Connection** outptr_QMetaObject__Connection); -void QMetaObject__Connection_new2(QMetaObject__Connection* other, QMetaObject__Connection** outptr_QMetaObject__Connection); +QMetaObject__Connection* QMetaObject__Connection_new(); +QMetaObject__Connection* QMetaObject__Connection_new2(QMetaObject__Connection* other); void QMetaObject__Connection_OperatorAssign(QMetaObject__Connection* self, QMetaObject__Connection* other); void QMetaObject__Connection_Swap(QMetaObject__Connection* self, QMetaObject__Connection* other); void QMetaObject__Connection_Delete(QMetaObject__Connection* self, bool isSubclass); -void QMetaObject__SuperData_new(QMetaObject__SuperData** outptr_QMetaObject__SuperData); -void QMetaObject__SuperData_new2(QMetaObject* mo, QMetaObject__SuperData** outptr_QMetaObject__SuperData); -void QMetaObject__SuperData_new3(QMetaObject__SuperData* param1, QMetaObject__SuperData** outptr_QMetaObject__SuperData); +QMetaObject__SuperData* QMetaObject__SuperData_new(); +QMetaObject__SuperData* QMetaObject__SuperData_new2(QMetaObject* mo); +QMetaObject__SuperData* QMetaObject__SuperData_new3(QMetaObject__SuperData* param1); QMetaObject* QMetaObject__SuperData_OperatorMinusGreater(const QMetaObject__SuperData* self); void QMetaObject__SuperData_OperatorAssign(QMetaObject__SuperData* self, QMetaObject__SuperData* param1); void QMetaObject__SuperData_Delete(QMetaObject__SuperData* self, bool isSubclass); -void QMetaObject__Data_new(QMetaObject__Data** outptr_QMetaObject__Data); -void QMetaObject__Data_new2(QMetaObject__Data* param1, QMetaObject__Data** outptr_QMetaObject__Data); +QMetaObject__Data* QMetaObject__Data_new(); +QMetaObject__Data* QMetaObject__Data_new2(QMetaObject__Data* param1); void QMetaObject__Data_OperatorAssign(QMetaObject__Data* self, QMetaObject__Data* param1); void QMetaObject__Data_Delete(QMetaObject__Data* self, bool isSubclass); diff --git a/qt6/gen_qoffscreensurface.cpp b/qt6/gen_qoffscreensurface.cpp index 7f0e79e7..376f45e7 100644 --- a/qt6/gen_qoffscreensurface.cpp +++ b/qt6/gen_qoffscreensurface.cpp @@ -265,25 +265,21 @@ public: }; -void QOffscreenSurface_new(QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface) { - MiqtVirtualQOffscreenSurface* ret = new MiqtVirtualQOffscreenSurface(); - *outptr_QOffscreenSurface = ret; - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); +QOffscreenSurface* QOffscreenSurface_new() { + return new MiqtVirtualQOffscreenSurface(); } -void QOffscreenSurface_new2(QScreen* screen, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface) { - MiqtVirtualQOffscreenSurface* ret = new MiqtVirtualQOffscreenSurface(screen); - *outptr_QOffscreenSurface = ret; - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); +QOffscreenSurface* QOffscreenSurface_new2(QScreen* screen) { + return new MiqtVirtualQOffscreenSurface(screen); } -void QOffscreenSurface_new3(QScreen* screen, QObject* parent, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface) { - MiqtVirtualQOffscreenSurface* ret = new MiqtVirtualQOffscreenSurface(screen, parent); - *outptr_QOffscreenSurface = ret; - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); +QOffscreenSurface* QOffscreenSurface_new3(QScreen* screen, QObject* parent) { + return new MiqtVirtualQOffscreenSurface(screen, parent); +} + +void QOffscreenSurface_virtbase(QOffscreenSurface* src, QObject** outptr_QObject, QSurface** outptr_QSurface) { + *outptr_QObject = static_cast(src); + *outptr_QSurface = static_cast(src); } QMetaObject* QOffscreenSurface_MetaObject(const QOffscreenSurface* self) { diff --git a/qt6/gen_qoffscreensurface.go b/qt6/gen_qoffscreensurface.go index 9864787e..d5d51fbf 100644 --- a/qt6/gen_qoffscreensurface.go +++ b/qt6/gen_qoffscreensurface.go @@ -36,58 +36,44 @@ func (this *QOffscreenSurface) UnsafePointer() unsafe.Pointer { } // newQOffscreenSurface constructs the type using only CGO pointers. -func newQOffscreenSurface(h *C.QOffscreenSurface, h_QObject *C.QObject, h_QSurface *C.QSurface) *QOffscreenSurface { +func newQOffscreenSurface(h *C.QOffscreenSurface) *QOffscreenSurface { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + C.QOffscreenSurface_virtbase(h, &outptr_QObject, &outptr_QSurface) + return &QOffscreenSurface{h: h, - QObject: newQObject(h_QObject), - QSurface: newQSurface(h_QSurface)} + QObject: newQObject(outptr_QObject), + QSurface: newQSurface(outptr_QSurface)} } // UnsafeNewQOffscreenSurface constructs the type using only unsafe pointers. -func UnsafeNewQOffscreenSurface(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer) *QOffscreenSurface { - if h == nil { - return nil - } - - return &QOffscreenSurface{h: (*C.QOffscreenSurface)(h), - QObject: UnsafeNewQObject(h_QObject), - QSurface: UnsafeNewQSurface(h_QSurface)} +func UnsafeNewQOffscreenSurface(h unsafe.Pointer) *QOffscreenSurface { + return newQOffscreenSurface((*C.QOffscreenSurface)(h)) } // NewQOffscreenSurface constructs a new QOffscreenSurface object. func NewQOffscreenSurface() *QOffscreenSurface { - var outptr_QOffscreenSurface *C.QOffscreenSurface = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - C.QOffscreenSurface_new(&outptr_QOffscreenSurface, &outptr_QObject, &outptr_QSurface) - ret := newQOffscreenSurface(outptr_QOffscreenSurface, outptr_QObject, outptr_QSurface) + ret := newQOffscreenSurface(C.QOffscreenSurface_new()) ret.isSubclass = true return ret } // NewQOffscreenSurface2 constructs a new QOffscreenSurface object. func NewQOffscreenSurface2(screen *QScreen) *QOffscreenSurface { - var outptr_QOffscreenSurface *C.QOffscreenSurface = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - C.QOffscreenSurface_new2(screen.cPointer(), &outptr_QOffscreenSurface, &outptr_QObject, &outptr_QSurface) - ret := newQOffscreenSurface(outptr_QOffscreenSurface, outptr_QObject, outptr_QSurface) + ret := newQOffscreenSurface(C.QOffscreenSurface_new2(screen.cPointer())) ret.isSubclass = true return ret } // NewQOffscreenSurface3 constructs a new QOffscreenSurface object. func NewQOffscreenSurface3(screen *QScreen, parent *QObject) *QOffscreenSurface { - var outptr_QOffscreenSurface *C.QOffscreenSurface = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - C.QOffscreenSurface_new3(screen.cPointer(), parent.cPointer(), &outptr_QOffscreenSurface, &outptr_QObject, &outptr_QSurface) - ret := newQOffscreenSurface(outptr_QOffscreenSurface, outptr_QObject, outptr_QSurface) + ret := newQOffscreenSurface(C.QOffscreenSurface_new3(screen.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -150,7 +136,7 @@ func (this *QOffscreenSurface) Size() *QSize { } func (this *QOffscreenSurface) Screen() *QScreen { - return newQScreen(C.QOffscreenSurface_Screen(this.h), nil) + return newQScreen(C.QOffscreenSurface_Screen(this.h)) } func (this *QOffscreenSurface) SetScreen(screen *QScreen) { @@ -172,7 +158,7 @@ func miqt_exec_callback_QOffscreenSurface_ScreenChanged(cb C.intptr_t, screen *C } // Convert all CABI parameters to Go parameters - slotval1 := newQScreen(screen, nil) + slotval1 := newQScreen(screen) gofunc(slotval1) } @@ -356,7 +342,7 @@ func miqt_exec_callback_QOffscreenSurface_TimerEvent(self *C.QOffscreenSurface, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QOffscreenSurface{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -382,7 +368,7 @@ func miqt_exec_callback_QOffscreenSurface_ChildEvent(self *C.QOffscreenSurface, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QOffscreenSurface{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qoffscreensurface.h b/qt6/gen_qoffscreensurface.h index c7032f1b..464f9b6d 100644 --- a/qt6/gen_qoffscreensurface.h +++ b/qt6/gen_qoffscreensurface.h @@ -40,9 +40,10 @@ typedef struct QSurfaceFormat QSurfaceFormat; typedef struct QTimerEvent QTimerEvent; #endif -void QOffscreenSurface_new(QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface); -void QOffscreenSurface_new2(QScreen* screen, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface); -void QOffscreenSurface_new3(QScreen* screen, QObject* parent, QOffscreenSurface** outptr_QOffscreenSurface, QObject** outptr_QObject, QSurface** outptr_QSurface); +QOffscreenSurface* QOffscreenSurface_new(); +QOffscreenSurface* QOffscreenSurface_new2(QScreen* screen); +QOffscreenSurface* QOffscreenSurface_new3(QScreen* screen, QObject* parent); +void QOffscreenSurface_virtbase(QOffscreenSurface* src, QObject** outptr_QObject, QSurface** outptr_QSurface); QMetaObject* QOffscreenSurface_MetaObject(const QOffscreenSurface* self); void* QOffscreenSurface_Metacast(QOffscreenSurface* self, const char* param1); struct miqt_string QOffscreenSurface_Tr(const char* s); diff --git a/qt6/gen_qoperatingsystemversion.cpp b/qt6/gen_qoperatingsystemversion.cpp index b3365e71..11f37b3e 100644 --- a/qt6/gen_qoperatingsystemversion.cpp +++ b/qt6/gen_qoperatingsystemversion.cpp @@ -8,24 +8,20 @@ #include "gen_qoperatingsystemversion.h" #include "_cgo_export.h" -void QOperatingSystemVersionBase_new(int osType, int vmajor, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { - QOperatingSystemVersionBase* ret = new QOperatingSystemVersionBase(static_cast(osType), static_cast(vmajor)); - *outptr_QOperatingSystemVersionBase = ret; +QOperatingSystemVersionBase* QOperatingSystemVersionBase_new(int osType, int vmajor) { + return new QOperatingSystemVersionBase(static_cast(osType), static_cast(vmajor)); } -void QOperatingSystemVersionBase_new2(QOperatingSystemVersionBase* param1, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { - QOperatingSystemVersionBase* ret = new QOperatingSystemVersionBase(*param1); - *outptr_QOperatingSystemVersionBase = ret; +QOperatingSystemVersionBase* QOperatingSystemVersionBase_new2(QOperatingSystemVersionBase* param1) { + return new QOperatingSystemVersionBase(*param1); } -void QOperatingSystemVersionBase_new3(int osType, int vmajor, int vminor, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { - QOperatingSystemVersionBase* ret = new QOperatingSystemVersionBase(static_cast(osType), static_cast(vmajor), static_cast(vminor)); - *outptr_QOperatingSystemVersionBase = ret; +QOperatingSystemVersionBase* QOperatingSystemVersionBase_new3(int osType, int vmajor, int vminor) { + return new QOperatingSystemVersionBase(static_cast(osType), static_cast(vmajor), static_cast(vminor)); } -void QOperatingSystemVersionBase_new4(int osType, int vmajor, int vminor, int vmicro, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { - QOperatingSystemVersionBase* ret = new QOperatingSystemVersionBase(static_cast(osType), static_cast(vmajor), static_cast(vminor), static_cast(vmicro)); - *outptr_QOperatingSystemVersionBase = ret; +QOperatingSystemVersionBase* QOperatingSystemVersionBase_new4(int osType, int vmajor, int vminor, int vmicro) { + return new QOperatingSystemVersionBase(static_cast(osType), static_cast(vmajor), static_cast(vminor), static_cast(vmicro)); } QOperatingSystemVersionBase* QOperatingSystemVersionBase_Current() { @@ -92,34 +88,28 @@ void QOperatingSystemVersionBase_Delete(QOperatingSystemVersionBase* self, bool } } -void QOperatingSystemVersion_new(QOperatingSystemVersionBase* osversion, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { - QOperatingSystemVersion* ret = new QOperatingSystemVersion(*osversion); - *outptr_QOperatingSystemVersion = ret; - *outptr_QOperatingSystemVersionBase = static_cast(ret); +QOperatingSystemVersion* QOperatingSystemVersion_new(QOperatingSystemVersionBase* osversion) { + return new QOperatingSystemVersion(*osversion); } -void QOperatingSystemVersion_new2(int osType, int vmajor, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { - QOperatingSystemVersion* ret = new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor)); - *outptr_QOperatingSystemVersion = ret; - *outptr_QOperatingSystemVersionBase = static_cast(ret); +QOperatingSystemVersion* QOperatingSystemVersion_new2(int osType, int vmajor) { + return new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor)); } -void QOperatingSystemVersion_new3(QOperatingSystemVersion* param1, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { - QOperatingSystemVersion* ret = new QOperatingSystemVersion(*param1); - *outptr_QOperatingSystemVersion = ret; - *outptr_QOperatingSystemVersionBase = static_cast(ret); +QOperatingSystemVersion* QOperatingSystemVersion_new3(QOperatingSystemVersion* param1) { + return new QOperatingSystemVersion(*param1); } -void QOperatingSystemVersion_new4(int osType, int vmajor, int vminor, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { - QOperatingSystemVersion* ret = new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor)); - *outptr_QOperatingSystemVersion = ret; - *outptr_QOperatingSystemVersionBase = static_cast(ret); +QOperatingSystemVersion* QOperatingSystemVersion_new4(int osType, int vmajor, int vminor) { + return new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor)); } -void QOperatingSystemVersion_new5(int osType, int vmajor, int vminor, int vmicro, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { - QOperatingSystemVersion* ret = new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor), static_cast(vmicro)); - *outptr_QOperatingSystemVersion = ret; - *outptr_QOperatingSystemVersionBase = static_cast(ret); +QOperatingSystemVersion* QOperatingSystemVersion_new5(int osType, int vmajor, int vminor, int vmicro) { + return new QOperatingSystemVersion(static_cast(osType), static_cast(vmajor), static_cast(vminor), static_cast(vmicro)); +} + +void QOperatingSystemVersion_virtbase(QOperatingSystemVersion* src, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase) { + *outptr_QOperatingSystemVersionBase = static_cast(src); } QOperatingSystemVersion* QOperatingSystemVersion_Current() { diff --git a/qt6/gen_qoperatingsystemversion.go b/qt6/gen_qoperatingsystemversion.go index 7e6a1b09..95454ccb 100644 --- a/qt6/gen_qoperatingsystemversion.go +++ b/qt6/gen_qoperatingsystemversion.go @@ -61,54 +61,43 @@ func newQOperatingSystemVersionBase(h *C.QOperatingSystemVersionBase) *QOperatin if h == nil { return nil } + return &QOperatingSystemVersionBase{h: h} } // UnsafeNewQOperatingSystemVersionBase constructs the type using only unsafe pointers. func UnsafeNewQOperatingSystemVersionBase(h unsafe.Pointer) *QOperatingSystemVersionBase { - if h == nil { - return nil - } - - return &QOperatingSystemVersionBase{h: (*C.QOperatingSystemVersionBase)(h)} + return newQOperatingSystemVersionBase((*C.QOperatingSystemVersionBase)(h)) } // NewQOperatingSystemVersionBase constructs a new QOperatingSystemVersionBase object. func NewQOperatingSystemVersionBase(osType QOperatingSystemVersionBase__OSType, vmajor int) *QOperatingSystemVersionBase { - var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil - C.QOperatingSystemVersionBase_new((C.int)(osType), (C.int)(vmajor), &outptr_QOperatingSystemVersionBase) - ret := newQOperatingSystemVersionBase(outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersionBase(C.QOperatingSystemVersionBase_new((C.int)(osType), (C.int)(vmajor))) ret.isSubclass = true return ret } // NewQOperatingSystemVersionBase2 constructs a new QOperatingSystemVersionBase object. func NewQOperatingSystemVersionBase2(param1 *QOperatingSystemVersionBase) *QOperatingSystemVersionBase { - var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil - C.QOperatingSystemVersionBase_new2(param1.cPointer(), &outptr_QOperatingSystemVersionBase) - ret := newQOperatingSystemVersionBase(outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersionBase(C.QOperatingSystemVersionBase_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQOperatingSystemVersionBase3 constructs a new QOperatingSystemVersionBase object. func NewQOperatingSystemVersionBase3(osType QOperatingSystemVersionBase__OSType, vmajor int, vminor int) *QOperatingSystemVersionBase { - var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil - C.QOperatingSystemVersionBase_new3((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), &outptr_QOperatingSystemVersionBase) - ret := newQOperatingSystemVersionBase(outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersionBase(C.QOperatingSystemVersionBase_new3((C.int)(osType), (C.int)(vmajor), (C.int)(vminor))) ret.isSubclass = true return ret } // NewQOperatingSystemVersionBase4 constructs a new QOperatingSystemVersionBase object. func NewQOperatingSystemVersionBase4(osType QOperatingSystemVersionBase__OSType, vmajor int, vminor int, vmicro int) *QOperatingSystemVersionBase { - var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil - C.QOperatingSystemVersionBase_new4((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), (C.int)(vmicro), &outptr_QOperatingSystemVersionBase) - ret := newQOperatingSystemVersionBase(outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersionBase(C.QOperatingSystemVersionBase_new4((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), (C.int)(vmicro))) ret.isSubclass = true return ret } @@ -198,81 +187,64 @@ func (this *QOperatingSystemVersion) UnsafePointer() unsafe.Pointer { } // newQOperatingSystemVersion constructs the type using only CGO pointers. -func newQOperatingSystemVersion(h *C.QOperatingSystemVersion, h_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase) *QOperatingSystemVersion { +func newQOperatingSystemVersion(h *C.QOperatingSystemVersion) *QOperatingSystemVersion { if h == nil { return nil } + var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil + C.QOperatingSystemVersion_virtbase(h, &outptr_QOperatingSystemVersionBase) + return &QOperatingSystemVersion{h: h, - QOperatingSystemVersionBase: newQOperatingSystemVersionBase(h_QOperatingSystemVersionBase)} + QOperatingSystemVersionBase: newQOperatingSystemVersionBase(outptr_QOperatingSystemVersionBase)} } // UnsafeNewQOperatingSystemVersion constructs the type using only unsafe pointers. -func UnsafeNewQOperatingSystemVersion(h unsafe.Pointer, h_QOperatingSystemVersionBase unsafe.Pointer) *QOperatingSystemVersion { - if h == nil { - return nil - } - - return &QOperatingSystemVersion{h: (*C.QOperatingSystemVersion)(h), - QOperatingSystemVersionBase: UnsafeNewQOperatingSystemVersionBase(h_QOperatingSystemVersionBase)} +func UnsafeNewQOperatingSystemVersion(h unsafe.Pointer) *QOperatingSystemVersion { + return newQOperatingSystemVersion((*C.QOperatingSystemVersion)(h)) } // NewQOperatingSystemVersion constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion(osversion *QOperatingSystemVersionBase) *QOperatingSystemVersion { - var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil - var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil - C.QOperatingSystemVersion_new(osversion.cPointer(), &outptr_QOperatingSystemVersion, &outptr_QOperatingSystemVersionBase) - ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion, outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersion(C.QOperatingSystemVersion_new(osversion.cPointer())) ret.isSubclass = true return ret } // NewQOperatingSystemVersion2 constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion2(osType QOperatingSystemVersion__OSType, vmajor int) *QOperatingSystemVersion { - var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil - var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil - C.QOperatingSystemVersion_new2((C.int)(osType), (C.int)(vmajor), &outptr_QOperatingSystemVersion, &outptr_QOperatingSystemVersionBase) - ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion, outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersion(C.QOperatingSystemVersion_new2((C.int)(osType), (C.int)(vmajor))) ret.isSubclass = true return ret } // NewQOperatingSystemVersion3 constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion3(param1 *QOperatingSystemVersion) *QOperatingSystemVersion { - var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil - var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil - C.QOperatingSystemVersion_new3(param1.cPointer(), &outptr_QOperatingSystemVersion, &outptr_QOperatingSystemVersionBase) - ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion, outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersion(C.QOperatingSystemVersion_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQOperatingSystemVersion4 constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion4(osType QOperatingSystemVersion__OSType, vmajor int, vminor int) *QOperatingSystemVersion { - var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil - var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil - C.QOperatingSystemVersion_new4((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), &outptr_QOperatingSystemVersion, &outptr_QOperatingSystemVersionBase) - ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion, outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersion(C.QOperatingSystemVersion_new4((C.int)(osType), (C.int)(vmajor), (C.int)(vminor))) ret.isSubclass = true return ret } // NewQOperatingSystemVersion5 constructs a new QOperatingSystemVersion object. func NewQOperatingSystemVersion5(osType QOperatingSystemVersion__OSType, vmajor int, vminor int, vmicro int) *QOperatingSystemVersion { - var outptr_QOperatingSystemVersion *C.QOperatingSystemVersion = nil - var outptr_QOperatingSystemVersionBase *C.QOperatingSystemVersionBase = nil - C.QOperatingSystemVersion_new5((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), (C.int)(vmicro), &outptr_QOperatingSystemVersion, &outptr_QOperatingSystemVersionBase) - ret := newQOperatingSystemVersion(outptr_QOperatingSystemVersion, outptr_QOperatingSystemVersionBase) + ret := newQOperatingSystemVersion(C.QOperatingSystemVersion_new5((C.int)(osType), (C.int)(vmajor), (C.int)(vminor), (C.int)(vmicro))) ret.isSubclass = true return ret } func QOperatingSystemVersion_Current() *QOperatingSystemVersion { - _goptr := newQOperatingSystemVersion(C.QOperatingSystemVersion_Current(), nil) + _goptr := newQOperatingSystemVersion(C.QOperatingSystemVersion_Current()) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/gen_qoperatingsystemversion.h b/qt6/gen_qoperatingsystemversion.h index 2b9150ac..e12fa613 100644 --- a/qt6/gen_qoperatingsystemversion.h +++ b/qt6/gen_qoperatingsystemversion.h @@ -24,10 +24,10 @@ typedef struct QOperatingSystemVersionBase QOperatingSystemVersionBase; typedef struct QVersionNumber QVersionNumber; #endif -void QOperatingSystemVersionBase_new(int osType, int vmajor, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); -void QOperatingSystemVersionBase_new2(QOperatingSystemVersionBase* param1, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); -void QOperatingSystemVersionBase_new3(int osType, int vmajor, int vminor, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); -void QOperatingSystemVersionBase_new4(int osType, int vmajor, int vminor, int vmicro, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); +QOperatingSystemVersionBase* QOperatingSystemVersionBase_new(int osType, int vmajor); +QOperatingSystemVersionBase* QOperatingSystemVersionBase_new2(QOperatingSystemVersionBase* param1); +QOperatingSystemVersionBase* QOperatingSystemVersionBase_new3(int osType, int vmajor, int vminor); +QOperatingSystemVersionBase* QOperatingSystemVersionBase_new4(int osType, int vmajor, int vminor, int vmicro); QOperatingSystemVersionBase* QOperatingSystemVersionBase_Current(); struct miqt_string QOperatingSystemVersionBase_Name(QOperatingSystemVersionBase* osversion); int QOperatingSystemVersionBase_CurrentType(); @@ -40,11 +40,12 @@ int QOperatingSystemVersionBase_Type(const QOperatingSystemVersionBase* self); struct miqt_string QOperatingSystemVersionBase_Name2(const QOperatingSystemVersionBase* self); void QOperatingSystemVersionBase_Delete(QOperatingSystemVersionBase* self, bool isSubclass); -void QOperatingSystemVersion_new(QOperatingSystemVersionBase* osversion, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); -void QOperatingSystemVersion_new2(int osType, int vmajor, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); -void QOperatingSystemVersion_new3(QOperatingSystemVersion* param1, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); -void QOperatingSystemVersion_new4(int osType, int vmajor, int vminor, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); -void QOperatingSystemVersion_new5(int osType, int vmajor, int vminor, int vmicro, QOperatingSystemVersion** outptr_QOperatingSystemVersion, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); +QOperatingSystemVersion* QOperatingSystemVersion_new(QOperatingSystemVersionBase* osversion); +QOperatingSystemVersion* QOperatingSystemVersion_new2(int osType, int vmajor); +QOperatingSystemVersion* QOperatingSystemVersion_new3(QOperatingSystemVersion* param1); +QOperatingSystemVersion* QOperatingSystemVersion_new4(int osType, int vmajor, int vminor); +QOperatingSystemVersion* QOperatingSystemVersion_new5(int osType, int vmajor, int vminor, int vmicro); +void QOperatingSystemVersion_virtbase(QOperatingSystemVersion* src, QOperatingSystemVersionBase** outptr_QOperatingSystemVersionBase); QOperatingSystemVersion* QOperatingSystemVersion_Current(); int QOperatingSystemVersion_CurrentType(); QVersionNumber* QOperatingSystemVersion_Version(const QOperatingSystemVersion* self); diff --git a/qt6/gen_qpagedpaintdevice.cpp b/qt6/gen_qpagedpaintdevice.cpp index bcd65220..b0081673 100644 --- a/qt6/gen_qpagedpaintdevice.cpp +++ b/qt6/gen_qpagedpaintdevice.cpp @@ -8,6 +8,10 @@ #include "gen_qpagedpaintdevice.h" #include "_cgo_export.h" +void QPagedPaintDevice_virtbase(QPagedPaintDevice* src, QPaintDevice** outptr_QPaintDevice) { + *outptr_QPaintDevice = static_cast(src); +} + bool QPagedPaintDevice_NewPage(QPagedPaintDevice* self) { return self->newPage(); } diff --git a/qt6/gen_qpagedpaintdevice.go b/qt6/gen_qpagedpaintdevice.go index 448610f7..5344eded 100644 --- a/qt6/gen_qpagedpaintdevice.go +++ b/qt6/gen_qpagedpaintdevice.go @@ -42,22 +42,20 @@ func (this *QPagedPaintDevice) UnsafePointer() unsafe.Pointer { } // newQPagedPaintDevice constructs the type using only CGO pointers. -func newQPagedPaintDevice(h *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QPagedPaintDevice { +func newQPagedPaintDevice(h *C.QPagedPaintDevice) *QPagedPaintDevice { if h == nil { return nil } + var outptr_QPaintDevice *C.QPaintDevice = nil + C.QPagedPaintDevice_virtbase(h, &outptr_QPaintDevice) + return &QPagedPaintDevice{h: h, - QPaintDevice: newQPaintDevice(h_QPaintDevice)} + QPaintDevice: newQPaintDevice(outptr_QPaintDevice)} } // UnsafeNewQPagedPaintDevice constructs the type using only unsafe pointers. -func UnsafeNewQPagedPaintDevice(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPagedPaintDevice { - if h == nil { - return nil - } - - return &QPagedPaintDevice{h: (*C.QPagedPaintDevice)(h), - QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} +func UnsafeNewQPagedPaintDevice(h unsafe.Pointer) *QPagedPaintDevice { + return newQPagedPaintDevice((*C.QPagedPaintDevice)(h)) } func (this *QPagedPaintDevice) NewPage() bool { diff --git a/qt6/gen_qpagedpaintdevice.h b/qt6/gen_qpagedpaintdevice.h index 8a6b86b2..c785bc7c 100644 --- a/qt6/gen_qpagedpaintdevice.h +++ b/qt6/gen_qpagedpaintdevice.h @@ -30,6 +30,7 @@ typedef struct QPagedPaintDevice QPagedPaintDevice; typedef struct QPaintDevice QPaintDevice; #endif +void QPagedPaintDevice_virtbase(QPagedPaintDevice* src, QPaintDevice** outptr_QPaintDevice); bool QPagedPaintDevice_NewPage(QPagedPaintDevice* self); bool QPagedPaintDevice_SetPageLayout(QPagedPaintDevice* self, QPageLayout* pageLayout); bool QPagedPaintDevice_SetPageSize(QPagedPaintDevice* self, QPageSize* pageSize); diff --git a/qt6/gen_qpagelayout.cpp b/qt6/gen_qpagelayout.cpp index aafdbcb3..f2a4761a 100644 --- a/qt6/gen_qpagelayout.cpp +++ b/qt6/gen_qpagelayout.cpp @@ -8,29 +8,24 @@ #include "gen_qpagelayout.h" #include "_cgo_export.h" -void QPageLayout_new(QPageLayout** outptr_QPageLayout) { - QPageLayout* ret = new QPageLayout(); - *outptr_QPageLayout = ret; +QPageLayout* QPageLayout_new() { + return new QPageLayout(); } -void QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins, QPageLayout** outptr_QPageLayout) { - QPageLayout* ret = new QPageLayout(*pageSize, static_cast(orientation), *margins); - *outptr_QPageLayout = ret; +QPageLayout* QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins) { + return new QPageLayout(*pageSize, static_cast(orientation), *margins); } -void QPageLayout_new3(QPageLayout* other, QPageLayout** outptr_QPageLayout) { - QPageLayout* ret = new QPageLayout(*other); - *outptr_QPageLayout = ret; +QPageLayout* QPageLayout_new3(QPageLayout* other) { + return new QPageLayout(*other); } -void QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QPageLayout** outptr_QPageLayout) { - QPageLayout* ret = new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units)); - *outptr_QPageLayout = ret; +QPageLayout* QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units) { + return new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units)); } -void QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins, QPageLayout** outptr_QPageLayout) { - QPageLayout* ret = new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units), *minMargins); - *outptr_QPageLayout = ret; +QPageLayout* QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins) { + return new QPageLayout(*pageSize, static_cast(orientation), *margins, static_cast(units), *minMargins); } void QPageLayout_OperatorAssign(QPageLayout* self, QPageLayout* other) { diff --git a/qt6/gen_qpagelayout.go b/qt6/gen_qpagelayout.go index 2c8e2583..194ea7a4 100644 --- a/qt6/gen_qpagelayout.go +++ b/qt6/gen_qpagelayout.go @@ -62,64 +62,51 @@ func newQPageLayout(h *C.QPageLayout) *QPageLayout { if h == nil { return nil } + return &QPageLayout{h: h} } // UnsafeNewQPageLayout constructs the type using only unsafe pointers. func UnsafeNewQPageLayout(h unsafe.Pointer) *QPageLayout { - if h == nil { - return nil - } - - return &QPageLayout{h: (*C.QPageLayout)(h)} + return newQPageLayout((*C.QPageLayout)(h)) } // NewQPageLayout constructs a new QPageLayout object. func NewQPageLayout() *QPageLayout { - var outptr_QPageLayout *C.QPageLayout = nil - C.QPageLayout_new(&outptr_QPageLayout) - ret := newQPageLayout(outptr_QPageLayout) + ret := newQPageLayout(C.QPageLayout_new()) ret.isSubclass = true return ret } // NewQPageLayout2 constructs a new QPageLayout object. func NewQPageLayout2(pageSize *QPageSize, orientation QPageLayout__Orientation, margins *QMarginsF) *QPageLayout { - var outptr_QPageLayout *C.QPageLayout = nil - C.QPageLayout_new2(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), &outptr_QPageLayout) - ret := newQPageLayout(outptr_QPageLayout) + ret := newQPageLayout(C.QPageLayout_new2(pageSize.cPointer(), (C.int)(orientation), margins.cPointer())) ret.isSubclass = true return ret } // NewQPageLayout3 constructs a new QPageLayout object. func NewQPageLayout3(other *QPageLayout) *QPageLayout { - var outptr_QPageLayout *C.QPageLayout = nil - C.QPageLayout_new3(other.cPointer(), &outptr_QPageLayout) - ret := newQPageLayout(outptr_QPageLayout) + ret := newQPageLayout(C.QPageLayout_new3(other.cPointer())) ret.isSubclass = true return ret } // NewQPageLayout4 constructs a new QPageLayout object. func NewQPageLayout4(pageSize *QPageSize, orientation QPageLayout__Orientation, margins *QMarginsF, units QPageLayout__Unit) *QPageLayout { - var outptr_QPageLayout *C.QPageLayout = nil - C.QPageLayout_new4(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units), &outptr_QPageLayout) - ret := newQPageLayout(outptr_QPageLayout) + ret := newQPageLayout(C.QPageLayout_new4(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units))) ret.isSubclass = true return ret } // NewQPageLayout5 constructs a new QPageLayout object. func NewQPageLayout5(pageSize *QPageSize, orientation QPageLayout__Orientation, margins *QMarginsF, units QPageLayout__Unit, minMargins *QMarginsF) *QPageLayout { - var outptr_QPageLayout *C.QPageLayout = nil - C.QPageLayout_new5(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units), minMargins.cPointer(), &outptr_QPageLayout) - ret := newQPageLayout(outptr_QPageLayout) + ret := newQPageLayout(C.QPageLayout_new5(pageSize.cPointer(), (C.int)(orientation), margins.cPointer(), (C.int)(units), minMargins.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qpagelayout.h b/qt6/gen_qpagelayout.h index 220b868d..4817624b 100644 --- a/qt6/gen_qpagelayout.h +++ b/qt6/gen_qpagelayout.h @@ -30,11 +30,11 @@ typedef struct QRect QRect; typedef struct QRectF QRectF; #endif -void QPageLayout_new(QPageLayout** outptr_QPageLayout); -void QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins, QPageLayout** outptr_QPageLayout); -void QPageLayout_new3(QPageLayout* other, QPageLayout** outptr_QPageLayout); -void QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QPageLayout** outptr_QPageLayout); -void QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins, QPageLayout** outptr_QPageLayout); +QPageLayout* QPageLayout_new(); +QPageLayout* QPageLayout_new2(QPageSize* pageSize, int orientation, QMarginsF* margins); +QPageLayout* QPageLayout_new3(QPageLayout* other); +QPageLayout* QPageLayout_new4(QPageSize* pageSize, int orientation, QMarginsF* margins, int units); +QPageLayout* QPageLayout_new5(QPageSize* pageSize, int orientation, QMarginsF* margins, int units, QMarginsF* minMargins); void QPageLayout_OperatorAssign(QPageLayout* self, QPageLayout* other); void QPageLayout_Swap(QPageLayout* self, QPageLayout* other); bool QPageLayout_IsEquivalentTo(const QPageLayout* self, QPageLayout* other); diff --git a/qt6/gen_qpageranges.cpp b/qt6/gen_qpageranges.cpp index 030f9e9f..d5a7a662 100644 --- a/qt6/gen_qpageranges.cpp +++ b/qt6/gen_qpageranges.cpp @@ -8,14 +8,12 @@ #include "gen_qpageranges.h" #include "_cgo_export.h" -void QPageRanges_new(QPageRanges** outptr_QPageRanges) { - QPageRanges* ret = new QPageRanges(); - *outptr_QPageRanges = ret; +QPageRanges* QPageRanges_new() { + return new QPageRanges(); } -void QPageRanges_new2(QPageRanges* other, QPageRanges** outptr_QPageRanges) { - QPageRanges* ret = new QPageRanges(*other); - *outptr_QPageRanges = ret; +QPageRanges* QPageRanges_new2(QPageRanges* other) { + return new QPageRanges(*other); } void QPageRanges_OperatorAssign(QPageRanges* self, QPageRanges* other) { @@ -95,14 +93,12 @@ void QPageRanges_Delete(QPageRanges* self, bool isSubclass) { } } -void QPageRanges__Range_new(QPageRanges__Range** outptr_QPageRanges__Range) { - QPageRanges::Range* ret = new QPageRanges::Range(); - *outptr_QPageRanges__Range = ret; +QPageRanges__Range* QPageRanges__Range_new() { + return new QPageRanges::Range(); } -void QPageRanges__Range_new2(QPageRanges__Range* param1, QPageRanges__Range** outptr_QPageRanges__Range) { - QPageRanges::Range* ret = new QPageRanges::Range(*param1); - *outptr_QPageRanges__Range = ret; +QPageRanges__Range* QPageRanges__Range_new2(QPageRanges__Range* param1) { + return new QPageRanges::Range(*param1); } bool QPageRanges__Range_Contains(const QPageRanges__Range* self, int pageNumber) { diff --git a/qt6/gen_qpageranges.go b/qt6/gen_qpageranges.go index bec81904..e09feec5 100644 --- a/qt6/gen_qpageranges.go +++ b/qt6/gen_qpageranges.go @@ -37,34 +37,27 @@ func newQPageRanges(h *C.QPageRanges) *QPageRanges { if h == nil { return nil } + return &QPageRanges{h: h} } // UnsafeNewQPageRanges constructs the type using only unsafe pointers. func UnsafeNewQPageRanges(h unsafe.Pointer) *QPageRanges { - if h == nil { - return nil - } - - return &QPageRanges{h: (*C.QPageRanges)(h)} + return newQPageRanges((*C.QPageRanges)(h)) } // NewQPageRanges constructs a new QPageRanges object. func NewQPageRanges() *QPageRanges { - var outptr_QPageRanges *C.QPageRanges = nil - C.QPageRanges_new(&outptr_QPageRanges) - ret := newQPageRanges(outptr_QPageRanges) + ret := newQPageRanges(C.QPageRanges_new()) ret.isSubclass = true return ret } // NewQPageRanges2 constructs a new QPageRanges object. func NewQPageRanges2(other *QPageRanges) *QPageRanges { - var outptr_QPageRanges *C.QPageRanges = nil - C.QPageRanges_new2(other.cPointer(), &outptr_QPageRanges) - ret := newQPageRanges(outptr_QPageRanges) + ret := newQPageRanges(C.QPageRanges_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -176,34 +169,27 @@ func newQPageRanges__Range(h *C.QPageRanges__Range) *QPageRanges__Range { if h == nil { return nil } + return &QPageRanges__Range{h: h} } // UnsafeNewQPageRanges__Range constructs the type using only unsafe pointers. func UnsafeNewQPageRanges__Range(h unsafe.Pointer) *QPageRanges__Range { - if h == nil { - return nil - } - - return &QPageRanges__Range{h: (*C.QPageRanges__Range)(h)} + return newQPageRanges__Range((*C.QPageRanges__Range)(h)) } // NewQPageRanges__Range constructs a new QPageRanges::Range object. func NewQPageRanges__Range() *QPageRanges__Range { - var outptr_QPageRanges__Range *C.QPageRanges__Range = nil - C.QPageRanges__Range_new(&outptr_QPageRanges__Range) - ret := newQPageRanges__Range(outptr_QPageRanges__Range) + ret := newQPageRanges__Range(C.QPageRanges__Range_new()) ret.isSubclass = true return ret } // NewQPageRanges__Range2 constructs a new QPageRanges::Range object. func NewQPageRanges__Range2(param1 *QPageRanges__Range) *QPageRanges__Range { - var outptr_QPageRanges__Range *C.QPageRanges__Range = nil - C.QPageRanges__Range_new2(param1.cPointer(), &outptr_QPageRanges__Range) - ret := newQPageRanges__Range(outptr_QPageRanges__Range) + ret := newQPageRanges__Range(C.QPageRanges__Range_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qpageranges.h b/qt6/gen_qpageranges.h index f3f1e905..391b62f5 100644 --- a/qt6/gen_qpageranges.h +++ b/qt6/gen_qpageranges.h @@ -26,8 +26,8 @@ typedef struct QPageRanges QPageRanges; typedef struct QPageRanges__Range QPageRanges__Range; #endif -void QPageRanges_new(QPageRanges** outptr_QPageRanges); -void QPageRanges_new2(QPageRanges* other, QPageRanges** outptr_QPageRanges); +QPageRanges* QPageRanges_new(); +QPageRanges* QPageRanges_new2(QPageRanges* other); void QPageRanges_OperatorAssign(QPageRanges* self, QPageRanges* other); void QPageRanges_Swap(QPageRanges* self, QPageRanges* other); void QPageRanges_AddPage(QPageRanges* self, int pageNumber); @@ -43,8 +43,8 @@ int QPageRanges_LastPage(const QPageRanges* self); void QPageRanges_Detach(QPageRanges* self); void QPageRanges_Delete(QPageRanges* self, bool isSubclass); -void QPageRanges__Range_new(QPageRanges__Range** outptr_QPageRanges__Range); -void QPageRanges__Range_new2(QPageRanges__Range* param1, QPageRanges__Range** outptr_QPageRanges__Range); +QPageRanges__Range* QPageRanges__Range_new(); +QPageRanges__Range* QPageRanges__Range_new2(QPageRanges__Range* param1); bool QPageRanges__Range_Contains(const QPageRanges__Range* self, int pageNumber); void QPageRanges__Range_Delete(QPageRanges__Range* self, bool isSubclass); diff --git a/qt6/gen_qpagesize.cpp b/qt6/gen_qpagesize.cpp index f7121d1f..6f51efce 100644 --- a/qt6/gen_qpagesize.cpp +++ b/qt6/gen_qpagesize.cpp @@ -10,53 +10,44 @@ #include "gen_qpagesize.h" #include "_cgo_export.h" -void QPageSize_new(QPageSize** outptr_QPageSize) { - QPageSize* ret = new QPageSize(); - *outptr_QPageSize = ret; +QPageSize* QPageSize_new() { + return new QPageSize(); } -void QPageSize_new2(int pageSizeId, QPageSize** outptr_QPageSize) { - QPageSize* ret = new QPageSize(static_cast(pageSizeId)); - *outptr_QPageSize = ret; +QPageSize* QPageSize_new2(int pageSizeId) { + return new QPageSize(static_cast(pageSizeId)); } -void QPageSize_new3(QSize* pointSize, QPageSize** outptr_QPageSize) { - QPageSize* ret = new QPageSize(*pointSize); - *outptr_QPageSize = ret; +QPageSize* QPageSize_new3(QSize* pointSize) { + return new QPageSize(*pointSize); } -void QPageSize_new4(QSizeF* size, int units, QPageSize** outptr_QPageSize) { - QPageSize* ret = new QPageSize(*size, static_cast(units)); - *outptr_QPageSize = ret; +QPageSize* QPageSize_new4(QSizeF* size, int units) { + return new QPageSize(*size, static_cast(units)); } -void QPageSize_new5(QPageSize* other, QPageSize** outptr_QPageSize) { - QPageSize* ret = new QPageSize(*other); - *outptr_QPageSize = ret; +QPageSize* QPageSize_new5(QPageSize* other) { + return new QPageSize(*other); } -void QPageSize_new6(QSize* pointSize, struct miqt_string name, QPageSize** outptr_QPageSize) { +QPageSize* QPageSize_new6(QSize* pointSize, struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - QPageSize* ret = new QPageSize(*pointSize, name_QString); - *outptr_QPageSize = ret; + return new QPageSize(*pointSize, name_QString); } -void QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize) { +QPageSize* QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy) { QString name_QString = QString::fromUtf8(name.data, name.len); - QPageSize* ret = new QPageSize(*pointSize, name_QString, static_cast(matchPolicy)); - *outptr_QPageSize = ret; + return new QPageSize(*pointSize, name_QString, static_cast(matchPolicy)); } -void QPageSize_new8(QSizeF* size, int units, struct miqt_string name, QPageSize** outptr_QPageSize) { +QPageSize* QPageSize_new8(QSizeF* size, int units, struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - QPageSize* ret = new QPageSize(*size, static_cast(units), name_QString); - *outptr_QPageSize = ret; + return new QPageSize(*size, static_cast(units), name_QString); } -void QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize) { +QPageSize* QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy) { QString name_QString = QString::fromUtf8(name.data, name.len); - QPageSize* ret = new QPageSize(*size, static_cast(units), name_QString, static_cast(matchPolicy)); - *outptr_QPageSize = ret; + return new QPageSize(*size, static_cast(units), name_QString, static_cast(matchPolicy)); } void QPageSize_OperatorAssign(QPageSize* self, QPageSize* other) { diff --git a/qt6/gen_qpagesize.go b/qt6/gen_qpagesize.go index 5ec0bc2e..c41aba68 100644 --- a/qt6/gen_qpagesize.go +++ b/qt6/gen_qpagesize.go @@ -186,64 +186,51 @@ func newQPageSize(h *C.QPageSize) *QPageSize { if h == nil { return nil } + return &QPageSize{h: h} } // UnsafeNewQPageSize constructs the type using only unsafe pointers. func UnsafeNewQPageSize(h unsafe.Pointer) *QPageSize { - if h == nil { - return nil - } - - return &QPageSize{h: (*C.QPageSize)(h)} + return newQPageSize((*C.QPageSize)(h)) } // NewQPageSize constructs a new QPageSize object. func NewQPageSize() *QPageSize { - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new(&outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new()) ret.isSubclass = true return ret } // NewQPageSize2 constructs a new QPageSize object. func NewQPageSize2(pageSizeId QPageSize__PageSizeId) *QPageSize { - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new2((C.int)(pageSizeId), &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new2((C.int)(pageSizeId))) ret.isSubclass = true return ret } // NewQPageSize3 constructs a new QPageSize object. func NewQPageSize3(pointSize *QSize) *QPageSize { - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new3(pointSize.cPointer(), &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new3(pointSize.cPointer())) ret.isSubclass = true return ret } // NewQPageSize4 constructs a new QPageSize object. func NewQPageSize4(size *QSizeF, units QPageSize__Unit) *QPageSize { - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new4(size.cPointer(), (C.int)(units), &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new4(size.cPointer(), (C.int)(units))) ret.isSubclass = true return ret } // NewQPageSize5 constructs a new QPageSize object. func NewQPageSize5(other *QPageSize) *QPageSize { - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new5(other.cPointer(), &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new5(other.cPointer())) ret.isSubclass = true return ret } @@ -254,10 +241,8 @@ func NewQPageSize6(pointSize *QSize, name string) *QPageSize { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new6(pointSize.cPointer(), name_ms, &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new6(pointSize.cPointer(), name_ms)) ret.isSubclass = true return ret } @@ -268,10 +253,8 @@ func NewQPageSize7(pointSize *QSize, name string, matchPolicy QPageSize__SizeMat name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new7(pointSize.cPointer(), name_ms, (C.int)(matchPolicy), &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new7(pointSize.cPointer(), name_ms, (C.int)(matchPolicy))) ret.isSubclass = true return ret } @@ -282,10 +265,8 @@ func NewQPageSize8(size *QSizeF, units QPageSize__Unit, name string) *QPageSize name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new8(size.cPointer(), (C.int)(units), name_ms, &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new8(size.cPointer(), (C.int)(units), name_ms)) ret.isSubclass = true return ret } @@ -296,10 +277,8 @@ func NewQPageSize9(size *QSizeF, units QPageSize__Unit, name string, matchPolicy name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QPageSize *C.QPageSize = nil - C.QPageSize_new9(size.cPointer(), (C.int)(units), name_ms, (C.int)(matchPolicy), &outptr_QPageSize) - ret := newQPageSize(outptr_QPageSize) + ret := newQPageSize(C.QPageSize_new9(size.cPointer(), (C.int)(units), name_ms, (C.int)(matchPolicy))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qpagesize.h b/qt6/gen_qpagesize.h index 70042f32..9331bf98 100644 --- a/qt6/gen_qpagesize.h +++ b/qt6/gen_qpagesize.h @@ -28,15 +28,15 @@ typedef struct QSize QSize; typedef struct QSizeF QSizeF; #endif -void QPageSize_new(QPageSize** outptr_QPageSize); -void QPageSize_new2(int pageSizeId, QPageSize** outptr_QPageSize); -void QPageSize_new3(QSize* pointSize, QPageSize** outptr_QPageSize); -void QPageSize_new4(QSizeF* size, int units, QPageSize** outptr_QPageSize); -void QPageSize_new5(QPageSize* other, QPageSize** outptr_QPageSize); -void QPageSize_new6(QSize* pointSize, struct miqt_string name, QPageSize** outptr_QPageSize); -void QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize); -void QPageSize_new8(QSizeF* size, int units, struct miqt_string name, QPageSize** outptr_QPageSize); -void QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy, QPageSize** outptr_QPageSize); +QPageSize* QPageSize_new(); +QPageSize* QPageSize_new2(int pageSizeId); +QPageSize* QPageSize_new3(QSize* pointSize); +QPageSize* QPageSize_new4(QSizeF* size, int units); +QPageSize* QPageSize_new5(QPageSize* other); +QPageSize* QPageSize_new6(QSize* pointSize, struct miqt_string name); +QPageSize* QPageSize_new7(QSize* pointSize, struct miqt_string name, int matchPolicy); +QPageSize* QPageSize_new8(QSizeF* size, int units, struct miqt_string name); +QPageSize* QPageSize_new9(QSizeF* size, int units, struct miqt_string name, int matchPolicy); void QPageSize_OperatorAssign(QPageSize* self, QPageSize* other); void QPageSize_Swap(QPageSize* self, QPageSize* other); bool QPageSize_IsEquivalentTo(const QPageSize* self, QPageSize* other); diff --git a/qt6/gen_qpaintdevice.go b/qt6/gen_qpaintdevice.go index f9311d65..a524ba25 100644 --- a/qt6/gen_qpaintdevice.go +++ b/qt6/gen_qpaintdevice.go @@ -54,16 +54,13 @@ func newQPaintDevice(h *C.QPaintDevice) *QPaintDevice { if h == nil { return nil } + return &QPaintDevice{h: h} } // UnsafeNewQPaintDevice constructs the type using only unsafe pointers. func UnsafeNewQPaintDevice(h unsafe.Pointer) *QPaintDevice { - if h == nil { - return nil - } - - return &QPaintDevice{h: (*C.QPaintDevice)(h)} + return newQPaintDevice((*C.QPaintDevice)(h)) } func (this *QPaintDevice) DevType() int { diff --git a/qt6/gen_qpaintdevicewindow.cpp b/qt6/gen_qpaintdevicewindow.cpp index b32d8ba2..5d197593 100644 --- a/qt6/gen_qpaintdevicewindow.cpp +++ b/qt6/gen_qpaintdevicewindow.cpp @@ -16,6 +16,11 @@ #include "gen_qpaintdevicewindow.h" #include "_cgo_export.h" +void QPaintDeviceWindow_virtbase(QPaintDeviceWindow* src, QWindow** outptr_QWindow, QPaintDevice** outptr_QPaintDevice) { + *outptr_QWindow = static_cast(src); + *outptr_QPaintDevice = static_cast(src); +} + QMetaObject* QPaintDeviceWindow_MetaObject(const QPaintDeviceWindow* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/gen_qpaintdevicewindow.go b/qt6/gen_qpaintdevicewindow.go index ab33ef16..e26f6215 100644 --- a/qt6/gen_qpaintdevicewindow.go +++ b/qt6/gen_qpaintdevicewindow.go @@ -35,24 +35,22 @@ func (this *QPaintDeviceWindow) UnsafePointer() unsafe.Pointer { } // newQPaintDeviceWindow constructs the type using only CGO pointers. -func newQPaintDeviceWindow(h *C.QPaintDeviceWindow, h_QWindow *C.QWindow, h_QObject *C.QObject, h_QSurface *C.QSurface, h_QPaintDevice *C.QPaintDevice) *QPaintDeviceWindow { +func newQPaintDeviceWindow(h *C.QPaintDeviceWindow) *QPaintDeviceWindow { if h == nil { return nil } + var outptr_QWindow *C.QWindow = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + C.QPaintDeviceWindow_virtbase(h, &outptr_QWindow, &outptr_QPaintDevice) + return &QPaintDeviceWindow{h: h, - QWindow: newQWindow(h_QWindow, h_QObject, h_QSurface), - QPaintDevice: newQPaintDevice(h_QPaintDevice)} + QWindow: newQWindow(outptr_QWindow), + QPaintDevice: newQPaintDevice(outptr_QPaintDevice)} } // UnsafeNewQPaintDeviceWindow constructs the type using only unsafe pointers. -func UnsafeNewQPaintDeviceWindow(h unsafe.Pointer, h_QWindow unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPaintDeviceWindow { - if h == nil { - return nil - } - - return &QPaintDeviceWindow{h: (*C.QPaintDeviceWindow)(h), - QWindow: UnsafeNewQWindow(h_QWindow, h_QObject, h_QSurface), - QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} +func UnsafeNewQPaintDeviceWindow(h unsafe.Pointer) *QPaintDeviceWindow { + return newQPaintDeviceWindow((*C.QPaintDeviceWindow)(h)) } func (this *QPaintDeviceWindow) MetaObject() *QMetaObject { diff --git a/qt6/gen_qpaintdevicewindow.h b/qt6/gen_qpaintdevicewindow.h index 28aae7b4..023cacd0 100644 --- a/qt6/gen_qpaintdevicewindow.h +++ b/qt6/gen_qpaintdevicewindow.h @@ -40,6 +40,7 @@ typedef struct QSurface QSurface; typedef struct QWindow QWindow; #endif +void QPaintDeviceWindow_virtbase(QPaintDeviceWindow* src, QWindow** outptr_QWindow, QPaintDevice** outptr_QPaintDevice); QMetaObject* QPaintDeviceWindow_MetaObject(const QPaintDeviceWindow* self); void* QPaintDeviceWindow_Metacast(QPaintDeviceWindow* self, const char* param1); struct miqt_string QPaintDeviceWindow_Tr(const char* s); diff --git a/qt6/gen_qpaintengine.cpp b/qt6/gen_qpaintengine.cpp index 4cc655b9..35ff22a2 100644 --- a/qt6/gen_qpaintengine.cpp +++ b/qt6/gen_qpaintengine.cpp @@ -613,14 +613,12 @@ public: }; -void QPaintEngine_new(QPaintEngine** outptr_QPaintEngine) { - MiqtVirtualQPaintEngine* ret = new MiqtVirtualQPaintEngine(); - *outptr_QPaintEngine = ret; +QPaintEngine* QPaintEngine_new() { + return new MiqtVirtualQPaintEngine(); } -void QPaintEngine_new2(int features, QPaintEngine** outptr_QPaintEngine) { - MiqtVirtualQPaintEngine* ret = new MiqtVirtualQPaintEngine(static_cast(features)); - *outptr_QPaintEngine = ret; +QPaintEngine* QPaintEngine_new2(int features) { + return new MiqtVirtualQPaintEngine(static_cast(features)); } bool QPaintEngine_IsActive(const QPaintEngine* self) { diff --git a/qt6/gen_qpaintengine.go b/qt6/gen_qpaintengine.go index 0236f614..cfb9d694 100644 --- a/qt6/gen_qpaintengine.go +++ b/qt6/gen_qpaintengine.go @@ -125,16 +125,13 @@ func newQTextItem(h *C.QTextItem) *QTextItem { if h == nil { return nil } + return &QTextItem{h: h} } // UnsafeNewQTextItem constructs the type using only unsafe pointers. func UnsafeNewQTextItem(h unsafe.Pointer) *QTextItem { - if h == nil { - return nil - } - - return &QTextItem{h: (*C.QTextItem)(h)} + return newQTextItem((*C.QTextItem)(h)) } func (this *QTextItem) Descent() float64 { @@ -204,34 +201,27 @@ func newQPaintEngine(h *C.QPaintEngine) *QPaintEngine { if h == nil { return nil } + return &QPaintEngine{h: h} } // UnsafeNewQPaintEngine constructs the type using only unsafe pointers. func UnsafeNewQPaintEngine(h unsafe.Pointer) *QPaintEngine { - if h == nil { - return nil - } - - return &QPaintEngine{h: (*C.QPaintEngine)(h)} + return newQPaintEngine((*C.QPaintEngine)(h)) } // NewQPaintEngine constructs a new QPaintEngine object. func NewQPaintEngine() *QPaintEngine { - var outptr_QPaintEngine *C.QPaintEngine = nil - C.QPaintEngine_new(&outptr_QPaintEngine) - ret := newQPaintEngine(outptr_QPaintEngine) + ret := newQPaintEngine(C.QPaintEngine_new()) ret.isSubclass = true return ret } // NewQPaintEngine2 constructs a new QPaintEngine object. func NewQPaintEngine2(features QPaintEngine__PaintEngineFeature) *QPaintEngine { - var outptr_QPaintEngine *C.QPaintEngine = nil - C.QPaintEngine_new2((C.int)(features), &outptr_QPaintEngine) - ret := newQPaintEngine(outptr_QPaintEngine) + ret := newQPaintEngine(C.QPaintEngine_new2((C.int)(features))) ret.isSubclass = true return ret } @@ -387,13 +377,13 @@ func (this *QPaintEngine) IsExtended() bool { } func (this *QPaintEngine) CreatePixmap(size QSize) *QPixmap { - _goptr := newQPixmap(C.QPaintEngine_CreatePixmap(this.h, size.cPointer()), nil) + _goptr := newQPixmap(C.QPaintEngine_CreatePixmap(this.h, size.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPaintEngine) CreatePixmapFromImage(image QImage, flags ImageConversionFlag) *QPixmap { - _goptr := newQPixmap(C.QPaintEngine_CreatePixmapFromImage(this.h, image.cPointer(), (C.int)(flags)), nil) + _goptr := newQPixmap(C.QPaintEngine_CreatePixmapFromImage(this.h, image.cPointer(), (C.int)(flags))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -781,7 +771,7 @@ func miqt_exec_callback_QPaintEngine_DrawPixmap(self *C.QPaintEngine, cb C.intpt // Convert all CABI parameters to Go parameters slotval1 := newQRectF(r) - slotval2 := newQPixmap(pm, nil) + slotval2 := newQPixmap(pm) slotval3 := newQRectF(sr) @@ -839,7 +829,7 @@ func miqt_exec_callback_QPaintEngine_DrawTiledPixmap(self *C.QPaintEngine, cb C. // Convert all CABI parameters to Go parameters slotval1 := newQRectF(r) - slotval2 := newQPixmap(pixmap, nil) + slotval2 := newQPixmap(pixmap) slotval3 := newQPointF(s) @@ -869,7 +859,7 @@ func miqt_exec_callback_QPaintEngine_DrawImage(self *C.QPaintEngine, cb C.intptr // Convert all CABI parameters to Go parameters slotval1 := newQRectF(r) - slotval2 := newQImage(pm, nil) + slotval2 := newQImage(pm) slotval3 := newQRectF(sr) @@ -927,7 +917,7 @@ func miqt_exec_callback_QPaintEngine_Type(self *C.QPaintEngine, cb C.intptr_t) C func (this *QPaintEngine) callVirtualBase_CreatePixmap(size QSize) *QPixmap { - _goptr := newQPixmap(C.QPaintEngine_virtualbase_CreatePixmap(unsafe.Pointer(this.h), size.cPointer()), nil) + _goptr := newQPixmap(C.QPaintEngine_virtualbase_CreatePixmap(unsafe.Pointer(this.h), size.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -959,7 +949,7 @@ func miqt_exec_callback_QPaintEngine_CreatePixmap(self *C.QPaintEngine, cb C.int func (this *QPaintEngine) callVirtualBase_CreatePixmapFromImage(image QImage, flags ImageConversionFlag) *QPixmap { - _goptr := newQPixmap(C.QPaintEngine_virtualbase_CreatePixmapFromImage(unsafe.Pointer(this.h), image.cPointer(), (C.int)(flags)), nil) + _goptr := newQPixmap(C.QPaintEngine_virtualbase_CreatePixmapFromImage(unsafe.Pointer(this.h), image.cPointer(), (C.int)(flags))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -979,7 +969,7 @@ func miqt_exec_callback_QPaintEngine_CreatePixmapFromImage(self *C.QPaintEngine, } // Convert all CABI parameters to Go parameters - image_goptr := newQImage(image, nil) + image_goptr := newQImage(image) image_goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer slotval1 := *image_goptr @@ -1029,16 +1019,13 @@ func newQPaintEngineState(h *C.QPaintEngineState) *QPaintEngineState { if h == nil { return nil } + return &QPaintEngineState{h: h} } // UnsafeNewQPaintEngineState constructs the type using only unsafe pointers. func UnsafeNewQPaintEngineState(h unsafe.Pointer) *QPaintEngineState { - if h == nil { - return nil - } - - return &QPaintEngineState{h: (*C.QPaintEngineState)(h)} + return newQPaintEngineState((*C.QPaintEngineState)(h)) } func (this *QPaintEngineState) State() QPaintEngine__DirtyFlag { diff --git a/qt6/gen_qpaintengine.h b/qt6/gen_qpaintengine.h index 19ecbed7..7d5fca79 100644 --- a/qt6/gen_qpaintengine.h +++ b/qt6/gen_qpaintengine.h @@ -66,8 +66,8 @@ struct miqt_string QTextItem_Text(const QTextItem* self); QFont* QTextItem_Font(const QTextItem* self); void QTextItem_Delete(QTextItem* self, bool isSubclass); -void QPaintEngine_new(QPaintEngine** outptr_QPaintEngine); -void QPaintEngine_new2(int features, QPaintEngine** outptr_QPaintEngine); +QPaintEngine* QPaintEngine_new(); +QPaintEngine* QPaintEngine_new2(int features); bool QPaintEngine_IsActive(const QPaintEngine* self); void QPaintEngine_SetActive(QPaintEngine* self, bool newState); bool QPaintEngine_Begin(QPaintEngine* self, QPaintDevice* pdev); diff --git a/qt6/gen_qpainter.cpp b/qt6/gen_qpainter.cpp index 1a1f2932..38429a14 100644 --- a/qt6/gen_qpainter.cpp +++ b/qt6/gen_qpainter.cpp @@ -32,14 +32,12 @@ #include "gen_qpainter.h" #include "_cgo_export.h" -void QPainter_new(QPainter** outptr_QPainter) { - QPainter* ret = new QPainter(); - *outptr_QPainter = ret; +QPainter* QPainter_new() { + return new QPainter(); } -void QPainter_new2(QPaintDevice* param1, QPainter** outptr_QPainter) { - QPainter* ret = new QPainter(param1); - *outptr_QPainter = ret; +QPainter* QPainter_new2(QPaintDevice* param1) { + return new QPainter(param1); } QPaintDevice* QPainter_Device(const QPainter* self) { diff --git a/qt6/gen_qpainter.go b/qt6/gen_qpainter.go index 1c8c3d41..a7e5d417 100644 --- a/qt6/gen_qpainter.go +++ b/qt6/gen_qpainter.go @@ -97,34 +97,27 @@ func newQPainter(h *C.QPainter) *QPainter { if h == nil { return nil } + return &QPainter{h: h} } // UnsafeNewQPainter constructs the type using only unsafe pointers. func UnsafeNewQPainter(h unsafe.Pointer) *QPainter { - if h == nil { - return nil - } - - return &QPainter{h: (*C.QPainter)(h)} + return newQPainter((*C.QPainter)(h)) } // NewQPainter constructs a new QPainter object. func NewQPainter() *QPainter { - var outptr_QPainter *C.QPainter = nil - C.QPainter_new(&outptr_QPainter) - ret := newQPainter(outptr_QPainter) + ret := newQPainter(C.QPainter_new()) ret.isSubclass = true return ret } // NewQPainter2 constructs a new QPainter object. func NewQPainter2(param1 *QPaintDevice) *QPainter { - var outptr_QPainter *C.QPainter = nil - C.QPainter_new2(param1.cPointer(), &outptr_QPainter) - ret := newQPainter(outptr_QPainter) + ret := newQPainter(C.QPainter_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1175,16 +1168,13 @@ func newQPainter__PixmapFragment(h *C.QPainter__PixmapFragment) *QPainter__Pixma if h == nil { return nil } + return &QPainter__PixmapFragment{h: h} } // UnsafeNewQPainter__PixmapFragment constructs the type using only unsafe pointers. func UnsafeNewQPainter__PixmapFragment(h unsafe.Pointer) *QPainter__PixmapFragment { - if h == nil { - return nil - } - - return &QPainter__PixmapFragment{h: (*C.QPainter__PixmapFragment)(h)} + return newQPainter__PixmapFragment((*C.QPainter__PixmapFragment)(h)) } func QPainter__PixmapFragment_Create(pos *QPointF, sourceRect *QRectF) *QPainter__PixmapFragment { diff --git a/qt6/gen_qpainter.h b/qt6/gen_qpainter.h index 846f4c6a..4ac05e36 100644 --- a/qt6/gen_qpainter.h +++ b/qt6/gen_qpainter.h @@ -74,8 +74,8 @@ typedef struct QTextOption QTextOption; typedef struct QTransform QTransform; #endif -void QPainter_new(QPainter** outptr_QPainter); -void QPainter_new2(QPaintDevice* param1, QPainter** outptr_QPainter); +QPainter* QPainter_new(); +QPainter* QPainter_new2(QPaintDevice* param1); QPaintDevice* QPainter_Device(const QPainter* self); bool QPainter_Begin(QPainter* self, QPaintDevice* param1); bool QPainter_End(QPainter* self); diff --git a/qt6/gen_qpainterpath.cpp b/qt6/gen_qpainterpath.cpp index cc5de905..0176ecf7 100644 --- a/qt6/gen_qpainterpath.cpp +++ b/qt6/gen_qpainterpath.cpp @@ -14,19 +14,16 @@ #include "gen_qpainterpath.h" #include "_cgo_export.h" -void QPainterPath_new(QPainterPath** outptr_QPainterPath) { - QPainterPath* ret = new QPainterPath(); - *outptr_QPainterPath = ret; +QPainterPath* QPainterPath_new() { + return new QPainterPath(); } -void QPainterPath_new2(QPointF* startPoint, QPainterPath** outptr_QPainterPath) { - QPainterPath* ret = new QPainterPath(*startPoint); - *outptr_QPainterPath = ret; +QPainterPath* QPainterPath_new2(QPointF* startPoint) { + return new QPainterPath(*startPoint); } -void QPainterPath_new3(QPainterPath* other, QPainterPath** outptr_QPainterPath) { - QPainterPath* ret = new QPainterPath(*other); - *outptr_QPainterPath = ret; +QPainterPath* QPainterPath_new3(QPainterPath* other) { + return new QPainterPath(*other); } void QPainterPath_OperatorAssign(QPainterPath* self, QPainterPath* other) { @@ -328,14 +325,12 @@ void QPainterPath_Delete(QPainterPath* self, bool isSubclass) { } } -void QPainterPathStroker_new(QPainterPathStroker** outptr_QPainterPathStroker) { - QPainterPathStroker* ret = new QPainterPathStroker(); - *outptr_QPainterPathStroker = ret; +QPainterPathStroker* QPainterPathStroker_new() { + return new QPainterPathStroker(); } -void QPainterPathStroker_new2(QPen* pen, QPainterPathStroker** outptr_QPainterPathStroker) { - QPainterPathStroker* ret = new QPainterPathStroker(*pen); - *outptr_QPainterPathStroker = ret; +QPainterPathStroker* QPainterPathStroker_new2(QPen* pen) { + return new QPainterPathStroker(*pen); } void QPainterPathStroker_SetWidth(QPainterPathStroker* self, double width) { diff --git a/qt6/gen_qpainterpath.go b/qt6/gen_qpainterpath.go index 062ec2d7..314f45ca 100644 --- a/qt6/gen_qpainterpath.go +++ b/qt6/gen_qpainterpath.go @@ -46,44 +46,35 @@ func newQPainterPath(h *C.QPainterPath) *QPainterPath { if h == nil { return nil } + return &QPainterPath{h: h} } // UnsafeNewQPainterPath constructs the type using only unsafe pointers. func UnsafeNewQPainterPath(h unsafe.Pointer) *QPainterPath { - if h == nil { - return nil - } - - return &QPainterPath{h: (*C.QPainterPath)(h)} + return newQPainterPath((*C.QPainterPath)(h)) } // NewQPainterPath constructs a new QPainterPath object. func NewQPainterPath() *QPainterPath { - var outptr_QPainterPath *C.QPainterPath = nil - C.QPainterPath_new(&outptr_QPainterPath) - ret := newQPainterPath(outptr_QPainterPath) + ret := newQPainterPath(C.QPainterPath_new()) ret.isSubclass = true return ret } // NewQPainterPath2 constructs a new QPainterPath object. func NewQPainterPath2(startPoint *QPointF) *QPainterPath { - var outptr_QPainterPath *C.QPainterPath = nil - C.QPainterPath_new2(startPoint.cPointer(), &outptr_QPainterPath) - ret := newQPainterPath(outptr_QPainterPath) + ret := newQPainterPath(C.QPainterPath_new2(startPoint.cPointer())) ret.isSubclass = true return ret } // NewQPainterPath3 constructs a new QPainterPath object. func NewQPainterPath3(other *QPainterPath) *QPainterPath { - var outptr_QPainterPath *C.QPainterPath = nil - C.QPainterPath_new3(other.cPointer(), &outptr_QPainterPath) - ret := newQPainterPath(outptr_QPainterPath) + ret := newQPainterPath(C.QPainterPath_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -446,34 +437,27 @@ func newQPainterPathStroker(h *C.QPainterPathStroker) *QPainterPathStroker { if h == nil { return nil } + return &QPainterPathStroker{h: h} } // UnsafeNewQPainterPathStroker constructs the type using only unsafe pointers. func UnsafeNewQPainterPathStroker(h unsafe.Pointer) *QPainterPathStroker { - if h == nil { - return nil - } - - return &QPainterPathStroker{h: (*C.QPainterPathStroker)(h)} + return newQPainterPathStroker((*C.QPainterPathStroker)(h)) } // NewQPainterPathStroker constructs a new QPainterPathStroker object. func NewQPainterPathStroker() *QPainterPathStroker { - var outptr_QPainterPathStroker *C.QPainterPathStroker = nil - C.QPainterPathStroker_new(&outptr_QPainterPathStroker) - ret := newQPainterPathStroker(outptr_QPainterPathStroker) + ret := newQPainterPathStroker(C.QPainterPathStroker_new()) ret.isSubclass = true return ret } // NewQPainterPathStroker2 constructs a new QPainterPathStroker object. func NewQPainterPathStroker2(pen *QPen) *QPainterPathStroker { - var outptr_QPainterPathStroker *C.QPainterPathStroker = nil - C.QPainterPathStroker_new2(pen.cPointer(), &outptr_QPainterPathStroker) - ret := newQPainterPathStroker(outptr_QPainterPathStroker) + ret := newQPainterPathStroker(C.QPainterPathStroker_new2(pen.cPointer())) ret.isSubclass = true return ret } @@ -594,16 +578,13 @@ func newQPainterPath__Element(h *C.QPainterPath__Element) *QPainterPath__Element if h == nil { return nil } + return &QPainterPath__Element{h: h} } // UnsafeNewQPainterPath__Element constructs the type using only unsafe pointers. func UnsafeNewQPainterPath__Element(h unsafe.Pointer) *QPainterPath__Element { - if h == nil { - return nil - } - - return &QPainterPath__Element{h: (*C.QPainterPath__Element)(h)} + return newQPainterPath__Element((*C.QPainterPath__Element)(h)) } func (this *QPainterPath__Element) IsMoveTo() bool { diff --git a/qt6/gen_qpainterpath.h b/qt6/gen_qpainterpath.h index af4a5126..bc1a0c31 100644 --- a/qt6/gen_qpainterpath.h +++ b/qt6/gen_qpainterpath.h @@ -38,9 +38,9 @@ typedef struct QRectF QRectF; typedef struct QRegion QRegion; #endif -void QPainterPath_new(QPainterPath** outptr_QPainterPath); -void QPainterPath_new2(QPointF* startPoint, QPainterPath** outptr_QPainterPath); -void QPainterPath_new3(QPainterPath* other, QPainterPath** outptr_QPainterPath); +QPainterPath* QPainterPath_new(); +QPainterPath* QPainterPath_new2(QPointF* startPoint); +QPainterPath* QPainterPath_new3(QPainterPath* other); void QPainterPath_OperatorAssign(QPainterPath* self, QPainterPath* other); void QPainterPath_Swap(QPainterPath* self, QPainterPath* other); void QPainterPath_Clear(QPainterPath* self); @@ -113,8 +113,8 @@ void QPainterPath_AddRoundedRect4(QPainterPath* self, QRectF* rect, double xRadi void QPainterPath_AddRoundedRect7(QPainterPath* self, double x, double y, double w, double h, double xRadius, double yRadius, int mode); void QPainterPath_Delete(QPainterPath* self, bool isSubclass); -void QPainterPathStroker_new(QPainterPathStroker** outptr_QPainterPathStroker); -void QPainterPathStroker_new2(QPen* pen, QPainterPathStroker** outptr_QPainterPathStroker); +QPainterPathStroker* QPainterPathStroker_new(); +QPainterPathStroker* QPainterPathStroker_new2(QPen* pen); void QPainterPathStroker_SetWidth(QPainterPathStroker* self, double width); double QPainterPathStroker_Width(const QPainterPathStroker* self); void QPainterPathStroker_SetCapStyle(QPainterPathStroker* self, int style); diff --git a/qt6/gen_qpalette.cpp b/qt6/gen_qpalette.cpp index db86fafa..45d74eb7 100644 --- a/qt6/gen_qpalette.cpp +++ b/qt6/gen_qpalette.cpp @@ -5,39 +5,32 @@ #include "gen_qpalette.h" #include "_cgo_export.h" -void QPalette_new(QPalette** outptr_QPalette) { - QPalette* ret = new QPalette(); - *outptr_QPalette = ret; +QPalette* QPalette_new() { + return new QPalette(); } -void QPalette_new2(QColor* button, QPalette** outptr_QPalette) { - QPalette* ret = new QPalette(*button); - *outptr_QPalette = ret; +QPalette* QPalette_new2(QColor* button) { + return new QPalette(*button); } -void QPalette_new3(int button, QPalette** outptr_QPalette) { - QPalette* ret = new QPalette(static_cast(button)); - *outptr_QPalette = ret; +QPalette* QPalette_new3(int button) { + return new QPalette(static_cast(button)); } -void QPalette_new4(QColor* button, QColor* window, QPalette** outptr_QPalette) { - QPalette* ret = new QPalette(*button, *window); - *outptr_QPalette = ret; +QPalette* QPalette_new4(QColor* button, QColor* window) { + return new QPalette(*button, *window); } -void QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window, QPalette** outptr_QPalette) { - QPalette* ret = new QPalette(*windowText, *button, *light, *dark, *mid, *text, *bright_text, *base, *window); - *outptr_QPalette = ret; +QPalette* QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window) { + return new QPalette(*windowText, *button, *light, *dark, *mid, *text, *bright_text, *base, *window); } -void QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base, QPalette** outptr_QPalette) { - QPalette* ret = new QPalette(*windowText, *window, *light, *dark, *mid, *text, *base); - *outptr_QPalette = ret; +QPalette* QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base) { + return new QPalette(*windowText, *window, *light, *dark, *mid, *text, *base); } -void QPalette_new7(QPalette* palette, QPalette** outptr_QPalette) { - QPalette* ret = new QPalette(*palette); - *outptr_QPalette = ret; +QPalette* QPalette_new7(QPalette* palette) { + return new QPalette(*palette); } void QPalette_OperatorAssign(QPalette* self, QPalette* palette) { diff --git a/qt6/gen_qpalette.go b/qt6/gen_qpalette.go index 758a0310..68589bbf 100644 --- a/qt6/gen_qpalette.go +++ b/qt6/gen_qpalette.go @@ -76,84 +76,67 @@ func newQPalette(h *C.QPalette) *QPalette { if h == nil { return nil } + return &QPalette{h: h} } // UnsafeNewQPalette constructs the type using only unsafe pointers. func UnsafeNewQPalette(h unsafe.Pointer) *QPalette { - if h == nil { - return nil - } - - return &QPalette{h: (*C.QPalette)(h)} + return newQPalette((*C.QPalette)(h)) } // NewQPalette constructs a new QPalette object. func NewQPalette() *QPalette { - var outptr_QPalette *C.QPalette = nil - C.QPalette_new(&outptr_QPalette) - ret := newQPalette(outptr_QPalette) + ret := newQPalette(C.QPalette_new()) ret.isSubclass = true return ret } // NewQPalette2 constructs a new QPalette object. func NewQPalette2(button *QColor) *QPalette { - var outptr_QPalette *C.QPalette = nil - C.QPalette_new2(button.cPointer(), &outptr_QPalette) - ret := newQPalette(outptr_QPalette) + ret := newQPalette(C.QPalette_new2(button.cPointer())) ret.isSubclass = true return ret } // NewQPalette3 constructs a new QPalette object. func NewQPalette3(button GlobalColor) *QPalette { - var outptr_QPalette *C.QPalette = nil - C.QPalette_new3((C.int)(button), &outptr_QPalette) - ret := newQPalette(outptr_QPalette) + ret := newQPalette(C.QPalette_new3((C.int)(button))) ret.isSubclass = true return ret } // NewQPalette4 constructs a new QPalette object. func NewQPalette4(button *QColor, window *QColor) *QPalette { - var outptr_QPalette *C.QPalette = nil - C.QPalette_new4(button.cPointer(), window.cPointer(), &outptr_QPalette) - ret := newQPalette(outptr_QPalette) + ret := newQPalette(C.QPalette_new4(button.cPointer(), window.cPointer())) ret.isSubclass = true return ret } // NewQPalette5 constructs a new QPalette object. func NewQPalette5(windowText *QBrush, button *QBrush, light *QBrush, dark *QBrush, mid *QBrush, text *QBrush, bright_text *QBrush, base *QBrush, window *QBrush) *QPalette { - var outptr_QPalette *C.QPalette = nil - C.QPalette_new5(windowText.cPointer(), button.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), bright_text.cPointer(), base.cPointer(), window.cPointer(), &outptr_QPalette) - ret := newQPalette(outptr_QPalette) + ret := newQPalette(C.QPalette_new5(windowText.cPointer(), button.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), bright_text.cPointer(), base.cPointer(), window.cPointer())) ret.isSubclass = true return ret } // NewQPalette6 constructs a new QPalette object. func NewQPalette6(windowText *QColor, window *QColor, light *QColor, dark *QColor, mid *QColor, text *QColor, base *QColor) *QPalette { - var outptr_QPalette *C.QPalette = nil - C.QPalette_new6(windowText.cPointer(), window.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), base.cPointer(), &outptr_QPalette) - ret := newQPalette(outptr_QPalette) + ret := newQPalette(C.QPalette_new6(windowText.cPointer(), window.cPointer(), light.cPointer(), dark.cPointer(), mid.cPointer(), text.cPointer(), base.cPointer())) ret.isSubclass = true return ret } // NewQPalette7 constructs a new QPalette object. func NewQPalette7(palette *QPalette) *QPalette { - var outptr_QPalette *C.QPalette = nil - C.QPalette_new7(palette.cPointer(), &outptr_QPalette) - ret := newQPalette(outptr_QPalette) + ret := newQPalette(C.QPalette_new7(palette.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qpalette.h b/qt6/gen_qpalette.h index af10434e..d51f24c3 100644 --- a/qt6/gen_qpalette.h +++ b/qt6/gen_qpalette.h @@ -24,13 +24,13 @@ typedef struct QColor QColor; typedef struct QPalette QPalette; #endif -void QPalette_new(QPalette** outptr_QPalette); -void QPalette_new2(QColor* button, QPalette** outptr_QPalette); -void QPalette_new3(int button, QPalette** outptr_QPalette); -void QPalette_new4(QColor* button, QColor* window, QPalette** outptr_QPalette); -void QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window, QPalette** outptr_QPalette); -void QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base, QPalette** outptr_QPalette); -void QPalette_new7(QPalette* palette, QPalette** outptr_QPalette); +QPalette* QPalette_new(); +QPalette* QPalette_new2(QColor* button); +QPalette* QPalette_new3(int button); +QPalette* QPalette_new4(QColor* button, QColor* window); +QPalette* QPalette_new5(QBrush* windowText, QBrush* button, QBrush* light, QBrush* dark, QBrush* mid, QBrush* text, QBrush* bright_text, QBrush* base, QBrush* window); +QPalette* QPalette_new6(QColor* windowText, QColor* window, QColor* light, QColor* dark, QColor* mid, QColor* text, QColor* base); +QPalette* QPalette_new7(QPalette* palette); void QPalette_OperatorAssign(QPalette* self, QPalette* palette); void QPalette_Swap(QPalette* self, QPalette* other); int QPalette_CurrentColorGroup(const QPalette* self); diff --git a/qt6/gen_qparallelanimationgroup.cpp b/qt6/gen_qparallelanimationgroup.cpp index 6c426500..56d69b79 100644 --- a/qt6/gen_qparallelanimationgroup.cpp +++ b/qt6/gen_qparallelanimationgroup.cpp @@ -142,20 +142,16 @@ public: }; -void QParallelAnimationGroup_new(QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQParallelAnimationGroup* ret = new MiqtVirtualQParallelAnimationGroup(); - *outptr_QParallelAnimationGroup = ret; - *outptr_QAnimationGroup = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QParallelAnimationGroup* QParallelAnimationGroup_new() { + return new MiqtVirtualQParallelAnimationGroup(); } -void QParallelAnimationGroup_new2(QObject* parent, QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQParallelAnimationGroup* ret = new MiqtVirtualQParallelAnimationGroup(parent); - *outptr_QParallelAnimationGroup = ret; - *outptr_QAnimationGroup = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QParallelAnimationGroup* QParallelAnimationGroup_new2(QObject* parent) { + return new MiqtVirtualQParallelAnimationGroup(parent); +} + +void QParallelAnimationGroup_virtbase(QParallelAnimationGroup* src, QAnimationGroup** outptr_QAnimationGroup) { + *outptr_QAnimationGroup = static_cast(src); } QMetaObject* QParallelAnimationGroup_MetaObject(const QParallelAnimationGroup* self) { diff --git a/qt6/gen_qparallelanimationgroup.go b/qt6/gen_qparallelanimationgroup.go index 55a457ca..07d66f38 100644 --- a/qt6/gen_qparallelanimationgroup.go +++ b/qt6/gen_qparallelanimationgroup.go @@ -35,46 +35,34 @@ func (this *QParallelAnimationGroup) UnsafePointer() unsafe.Pointer { } // newQParallelAnimationGroup constructs the type using only CGO pointers. -func newQParallelAnimationGroup(h *C.QParallelAnimationGroup, h_QAnimationGroup *C.QAnimationGroup, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QParallelAnimationGroup { +func newQParallelAnimationGroup(h *C.QParallelAnimationGroup) *QParallelAnimationGroup { if h == nil { return nil } + var outptr_QAnimationGroup *C.QAnimationGroup = nil + C.QParallelAnimationGroup_virtbase(h, &outptr_QAnimationGroup) + return &QParallelAnimationGroup{h: h, - QAnimationGroup: newQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} + QAnimationGroup: newQAnimationGroup(outptr_QAnimationGroup)} } // UnsafeNewQParallelAnimationGroup constructs the type using only unsafe pointers. -func UnsafeNewQParallelAnimationGroup(h unsafe.Pointer, h_QAnimationGroup unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QParallelAnimationGroup { - if h == nil { - return nil - } - - return &QParallelAnimationGroup{h: (*C.QParallelAnimationGroup)(h), - QAnimationGroup: UnsafeNewQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} +func UnsafeNewQParallelAnimationGroup(h unsafe.Pointer) *QParallelAnimationGroup { + return newQParallelAnimationGroup((*C.QParallelAnimationGroup)(h)) } // NewQParallelAnimationGroup constructs a new QParallelAnimationGroup object. func NewQParallelAnimationGroup() *QParallelAnimationGroup { - var outptr_QParallelAnimationGroup *C.QParallelAnimationGroup = nil - var outptr_QAnimationGroup *C.QAnimationGroup = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QParallelAnimationGroup_new(&outptr_QParallelAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQParallelAnimationGroup(outptr_QParallelAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret := newQParallelAnimationGroup(C.QParallelAnimationGroup_new()) ret.isSubclass = true return ret } // NewQParallelAnimationGroup2 constructs a new QParallelAnimationGroup object. func NewQParallelAnimationGroup2(parent *QObject) *QParallelAnimationGroup { - var outptr_QParallelAnimationGroup *C.QParallelAnimationGroup = nil - var outptr_QAnimationGroup *C.QAnimationGroup = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QParallelAnimationGroup_new2(parent.cPointer(), &outptr_QParallelAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQParallelAnimationGroup(outptr_QParallelAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret := newQParallelAnimationGroup(C.QParallelAnimationGroup_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qparallelanimationgroup.h b/qt6/gen_qparallelanimationgroup.h index 3fc3e002..a26c0c63 100644 --- a/qt6/gen_qparallelanimationgroup.h +++ b/qt6/gen_qparallelanimationgroup.h @@ -30,8 +30,9 @@ typedef struct QObject QObject; typedef struct QParallelAnimationGroup QParallelAnimationGroup; #endif -void QParallelAnimationGroup_new(QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QParallelAnimationGroup_new2(QObject* parent, QParallelAnimationGroup** outptr_QParallelAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +QParallelAnimationGroup* QParallelAnimationGroup_new(); +QParallelAnimationGroup* QParallelAnimationGroup_new2(QObject* parent); +void QParallelAnimationGroup_virtbase(QParallelAnimationGroup* src, QAnimationGroup** outptr_QAnimationGroup); QMetaObject* QParallelAnimationGroup_MetaObject(const QParallelAnimationGroup* self); void* QParallelAnimationGroup_Metacast(QParallelAnimationGroup* self, const char* param1); struct miqt_string QParallelAnimationGroup_Tr(const char* s); diff --git a/qt6/gen_qpauseanimation.cpp b/qt6/gen_qpauseanimation.cpp index dbe8f6ec..2c355a2a 100644 --- a/qt6/gen_qpauseanimation.cpp +++ b/qt6/gen_qpauseanimation.cpp @@ -143,32 +143,24 @@ public: }; -void QPauseAnimation_new(QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(); - *outptr_QPauseAnimation = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPauseAnimation* QPauseAnimation_new() { + return new MiqtVirtualQPauseAnimation(); } -void QPauseAnimation_new2(int msecs, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(static_cast(msecs)); - *outptr_QPauseAnimation = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPauseAnimation* QPauseAnimation_new2(int msecs) { + return new MiqtVirtualQPauseAnimation(static_cast(msecs)); } -void QPauseAnimation_new3(QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(parent); - *outptr_QPauseAnimation = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPauseAnimation* QPauseAnimation_new3(QObject* parent) { + return new MiqtVirtualQPauseAnimation(parent); } -void QPauseAnimation_new4(int msecs, QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQPauseAnimation* ret = new MiqtVirtualQPauseAnimation(static_cast(msecs), parent); - *outptr_QPauseAnimation = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPauseAnimation* QPauseAnimation_new4(int msecs, QObject* parent) { + return new MiqtVirtualQPauseAnimation(static_cast(msecs), parent); +} + +void QPauseAnimation_virtbase(QPauseAnimation* src, QAbstractAnimation** outptr_QAbstractAnimation) { + *outptr_QAbstractAnimation = static_cast(src); } QMetaObject* QPauseAnimation_MetaObject(const QPauseAnimation* self) { diff --git a/qt6/gen_qpauseanimation.go b/qt6/gen_qpauseanimation.go index 5dfd47c2..3272831e 100644 --- a/qt6/gen_qpauseanimation.go +++ b/qt6/gen_qpauseanimation.go @@ -35,68 +35,50 @@ func (this *QPauseAnimation) UnsafePointer() unsafe.Pointer { } // newQPauseAnimation constructs the type using only CGO pointers. -func newQPauseAnimation(h *C.QPauseAnimation, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QPauseAnimation { +func newQPauseAnimation(h *C.QPauseAnimation) *QPauseAnimation { if h == nil { return nil } + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + C.QPauseAnimation_virtbase(h, &outptr_QAbstractAnimation) + return &QPauseAnimation{h: h, - QAbstractAnimation: newQAbstractAnimation(h_QAbstractAnimation, h_QObject)} + QAbstractAnimation: newQAbstractAnimation(outptr_QAbstractAnimation)} } // UnsafeNewQPauseAnimation constructs the type using only unsafe pointers. -func UnsafeNewQPauseAnimation(h unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QPauseAnimation { - if h == nil { - return nil - } - - return &QPauseAnimation{h: (*C.QPauseAnimation)(h), - QAbstractAnimation: UnsafeNewQAbstractAnimation(h_QAbstractAnimation, h_QObject)} +func UnsafeNewQPauseAnimation(h unsafe.Pointer) *QPauseAnimation { + return newQPauseAnimation((*C.QPauseAnimation)(h)) } // NewQPauseAnimation constructs a new QPauseAnimation object. func NewQPauseAnimation() *QPauseAnimation { - var outptr_QPauseAnimation *C.QPauseAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPauseAnimation_new(&outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPauseAnimation(C.QPauseAnimation_new()) ret.isSubclass = true return ret } // NewQPauseAnimation2 constructs a new QPauseAnimation object. func NewQPauseAnimation2(msecs int) *QPauseAnimation { - var outptr_QPauseAnimation *C.QPauseAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPauseAnimation_new2((C.int)(msecs), &outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPauseAnimation(C.QPauseAnimation_new2((C.int)(msecs))) ret.isSubclass = true return ret } // NewQPauseAnimation3 constructs a new QPauseAnimation object. func NewQPauseAnimation3(parent *QObject) *QPauseAnimation { - var outptr_QPauseAnimation *C.QPauseAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPauseAnimation_new3(parent.cPointer(), &outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPauseAnimation(C.QPauseAnimation_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQPauseAnimation4 constructs a new QPauseAnimation object. func NewQPauseAnimation4(msecs int, parent *QObject) *QPauseAnimation { - var outptr_QPauseAnimation *C.QPauseAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPauseAnimation_new4((C.int)(msecs), parent.cPointer(), &outptr_QPauseAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPauseAnimation(outptr_QPauseAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPauseAnimation(C.QPauseAnimation_new4((C.int)(msecs), parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qpauseanimation.h b/qt6/gen_qpauseanimation.h index cf824085..af2cf1ff 100644 --- a/qt6/gen_qpauseanimation.h +++ b/qt6/gen_qpauseanimation.h @@ -28,10 +28,11 @@ typedef struct QObject QObject; typedef struct QPauseAnimation QPauseAnimation; #endif -void QPauseAnimation_new(QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QPauseAnimation_new2(int msecs, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QPauseAnimation_new3(QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QPauseAnimation_new4(int msecs, QObject* parent, QPauseAnimation** outptr_QPauseAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +QPauseAnimation* QPauseAnimation_new(); +QPauseAnimation* QPauseAnimation_new2(int msecs); +QPauseAnimation* QPauseAnimation_new3(QObject* parent); +QPauseAnimation* QPauseAnimation_new4(int msecs, QObject* parent); +void QPauseAnimation_virtbase(QPauseAnimation* src, QAbstractAnimation** outptr_QAbstractAnimation); QMetaObject* QPauseAnimation_MetaObject(const QPauseAnimation* self); void* QPauseAnimation_Metacast(QPauseAnimation* self, const char* param1); struct miqt_string QPauseAnimation_Tr(const char* s); diff --git a/qt6/gen_qpdfwriter.cpp b/qt6/gen_qpdfwriter.cpp index c2ee3e89..07e8ffe6 100644 --- a/qt6/gen_qpdfwriter.cpp +++ b/qt6/gen_qpdfwriter.cpp @@ -397,21 +397,18 @@ public: }; -void QPdfWriter_new(struct miqt_string filename, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { +QPdfWriter* QPdfWriter_new(struct miqt_string filename) { QString filename_QString = QString::fromUtf8(filename.data, filename.len); - MiqtVirtualQPdfWriter* ret = new MiqtVirtualQPdfWriter(filename_QString); - *outptr_QPdfWriter = ret; - *outptr_QObject = static_cast(ret); - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPdfWriter(filename_QString); } -void QPdfWriter_new2(QIODevice* device, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPdfWriter* ret = new MiqtVirtualQPdfWriter(device); - *outptr_QPdfWriter = ret; - *outptr_QObject = static_cast(ret); - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPdfWriter* QPdfWriter_new2(QIODevice* device) { + return new MiqtVirtualQPdfWriter(device); +} + +void QPdfWriter_virtbase(QPdfWriter* src, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice) { + *outptr_QObject = static_cast(src); + *outptr_QPagedPaintDevice = static_cast(src); } QMetaObject* QPdfWriter_MetaObject(const QPdfWriter* self) { diff --git a/qt6/gen_qpdfwriter.go b/qt6/gen_qpdfwriter.go index 980cb58f..c6af58f2 100644 --- a/qt6/gen_qpdfwriter.go +++ b/qt6/gen_qpdfwriter.go @@ -36,24 +36,22 @@ func (this *QPdfWriter) UnsafePointer() unsafe.Pointer { } // newQPdfWriter constructs the type using only CGO pointers. -func newQPdfWriter(h *C.QPdfWriter, h_QObject *C.QObject, h_QPagedPaintDevice *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QPdfWriter { +func newQPdfWriter(h *C.QPdfWriter) *QPdfWriter { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + C.QPdfWriter_virtbase(h, &outptr_QObject, &outptr_QPagedPaintDevice) + return &QPdfWriter{h: h, - QObject: newQObject(h_QObject), - QPagedPaintDevice: newQPagedPaintDevice(h_QPagedPaintDevice, h_QPaintDevice)} + QObject: newQObject(outptr_QObject), + QPagedPaintDevice: newQPagedPaintDevice(outptr_QPagedPaintDevice)} } // UnsafeNewQPdfWriter constructs the type using only unsafe pointers. -func UnsafeNewQPdfWriter(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QPagedPaintDevice unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPdfWriter { - if h == nil { - return nil - } - - return &QPdfWriter{h: (*C.QPdfWriter)(h), - QObject: UnsafeNewQObject(h_QObject), - QPagedPaintDevice: UnsafeNewQPagedPaintDevice(h_QPagedPaintDevice, h_QPaintDevice)} +func UnsafeNewQPdfWriter(h unsafe.Pointer) *QPdfWriter { + return newQPdfWriter((*C.QPdfWriter)(h)) } // NewQPdfWriter constructs a new QPdfWriter object. @@ -62,26 +60,16 @@ func NewQPdfWriter(filename string) *QPdfWriter { filename_ms.data = C.CString(filename) filename_ms.len = C.size_t(len(filename)) defer C.free(unsafe.Pointer(filename_ms.data)) - var outptr_QPdfWriter *C.QPdfWriter = nil - var outptr_QObject *C.QObject = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPdfWriter_new(filename_ms, &outptr_QPdfWriter, &outptr_QObject, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQPdfWriter(outptr_QPdfWriter, outptr_QObject, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQPdfWriter(C.QPdfWriter_new(filename_ms)) ret.isSubclass = true return ret } // NewQPdfWriter2 constructs a new QPdfWriter object. func NewQPdfWriter2(device *QIODevice) *QPdfWriter { - var outptr_QPdfWriter *C.QPdfWriter = nil - var outptr_QObject *C.QObject = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPdfWriter_new2(device.cPointer(), &outptr_QPdfWriter, &outptr_QObject, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQPdfWriter(outptr_QPdfWriter, outptr_QObject, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQPdfWriter(C.QPdfWriter_new2(device.cPointer())) ret.isSubclass = true return ret } @@ -373,7 +361,7 @@ func miqt_exec_callback_QPdfWriter_TimerEvent(self *C.QPdfWriter, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QPdfWriter{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -399,7 +387,7 @@ func miqt_exec_callback_QPdfWriter_ChildEvent(self *C.QPdfWriter, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QPdfWriter{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qpdfwriter.h b/qt6/gen_qpdfwriter.h index c850a738..8efb4ed7 100644 --- a/qt6/gen_qpdfwriter.h +++ b/qt6/gen_qpdfwriter.h @@ -48,8 +48,9 @@ typedef struct QPdfWriter QPdfWriter; typedef struct QTimerEvent QTimerEvent; #endif -void QPdfWriter_new(struct miqt_string filename, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); -void QPdfWriter_new2(QIODevice* device, QPdfWriter** outptr_QPdfWriter, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +QPdfWriter* QPdfWriter_new(struct miqt_string filename); +QPdfWriter* QPdfWriter_new2(QIODevice* device); +void QPdfWriter_virtbase(QPdfWriter* src, QObject** outptr_QObject, QPagedPaintDevice** outptr_QPagedPaintDevice); QMetaObject* QPdfWriter_MetaObject(const QPdfWriter* self); void* QPdfWriter_Metacast(QPdfWriter* self, const char* param1); struct miqt_string QPdfWriter_Tr(const char* s); diff --git a/qt6/gen_qpen.cpp b/qt6/gen_qpen.cpp index 25558aee..9d5c5ea0 100644 --- a/qt6/gen_qpen.cpp +++ b/qt6/gen_qpen.cpp @@ -6,44 +6,36 @@ #include "gen_qpen.h" #include "_cgo_export.h" -void QPen_new(QPen** outptr_QPen) { - QPen* ret = new QPen(); - *outptr_QPen = ret; +QPen* QPen_new() { + return new QPen(); } -void QPen_new2(int param1, QPen** outptr_QPen) { - QPen* ret = new QPen(static_cast(param1)); - *outptr_QPen = ret; +QPen* QPen_new2(int param1) { + return new QPen(static_cast(param1)); } -void QPen_new3(QColor* color, QPen** outptr_QPen) { - QPen* ret = new QPen(*color); - *outptr_QPen = ret; +QPen* QPen_new3(QColor* color) { + return new QPen(*color); } -void QPen_new4(QBrush* brush, double width, QPen** outptr_QPen) { - QPen* ret = new QPen(*brush, static_cast(width)); - *outptr_QPen = ret; +QPen* QPen_new4(QBrush* brush, double width) { + return new QPen(*brush, static_cast(width)); } -void QPen_new5(QPen* pen, QPen** outptr_QPen) { - QPen* ret = new QPen(*pen); - *outptr_QPen = ret; +QPen* QPen_new5(QPen* pen) { + return new QPen(*pen); } -void QPen_new6(QBrush* brush, double width, int s, QPen** outptr_QPen) { - QPen* ret = new QPen(*brush, static_cast(width), static_cast(s)); - *outptr_QPen = ret; +QPen* QPen_new6(QBrush* brush, double width, int s) { + return new QPen(*brush, static_cast(width), static_cast(s)); } -void QPen_new7(QBrush* brush, double width, int s, int c, QPen** outptr_QPen) { - QPen* ret = new QPen(*brush, static_cast(width), static_cast(s), static_cast(c)); - *outptr_QPen = ret; +QPen* QPen_new7(QBrush* brush, double width, int s, int c) { + return new QPen(*brush, static_cast(width), static_cast(s), static_cast(c)); } -void QPen_new8(QBrush* brush, double width, int s, int c, int j, QPen** outptr_QPen) { - QPen* ret = new QPen(*brush, static_cast(width), static_cast(s), static_cast(c), static_cast(j)); - *outptr_QPen = ret; +QPen* QPen_new8(QBrush* brush, double width, int s, int c, int j) { + return new QPen(*brush, static_cast(width), static_cast(s), static_cast(c), static_cast(j)); } void QPen_OperatorAssign(QPen* self, QPen* pen) { diff --git a/qt6/gen_qpen.go b/qt6/gen_qpen.go index 21c1031a..4c24543b 100644 --- a/qt6/gen_qpen.go +++ b/qt6/gen_qpen.go @@ -37,94 +37,75 @@ func newQPen(h *C.QPen) *QPen { if h == nil { return nil } + return &QPen{h: h} } // UnsafeNewQPen constructs the type using only unsafe pointers. func UnsafeNewQPen(h unsafe.Pointer) *QPen { - if h == nil { - return nil - } - - return &QPen{h: (*C.QPen)(h)} + return newQPen((*C.QPen)(h)) } // NewQPen constructs a new QPen object. func NewQPen() *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new(&outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new()) ret.isSubclass = true return ret } // NewQPen2 constructs a new QPen object. func NewQPen2(param1 PenStyle) *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new2((C.int)(param1), &outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQPen3 constructs a new QPen object. func NewQPen3(color *QColor) *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new3(color.cPointer(), &outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new3(color.cPointer())) ret.isSubclass = true return ret } // NewQPen4 constructs a new QPen object. func NewQPen4(brush *QBrush, width float64) *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new4(brush.cPointer(), (C.double)(width), &outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new4(brush.cPointer(), (C.double)(width))) ret.isSubclass = true return ret } // NewQPen5 constructs a new QPen object. func NewQPen5(pen *QPen) *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new5(pen.cPointer(), &outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new5(pen.cPointer())) ret.isSubclass = true return ret } // NewQPen6 constructs a new QPen object. func NewQPen6(brush *QBrush, width float64, s PenStyle) *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new6(brush.cPointer(), (C.double)(width), (C.int)(s), &outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new6(brush.cPointer(), (C.double)(width), (C.int)(s))) ret.isSubclass = true return ret } // NewQPen7 constructs a new QPen object. func NewQPen7(brush *QBrush, width float64, s PenStyle, c PenCapStyle) *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new7(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c), &outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new7(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c))) ret.isSubclass = true return ret } // NewQPen8 constructs a new QPen object. func NewQPen8(brush *QBrush, width float64, s PenStyle, c PenCapStyle, j PenJoinStyle) *QPen { - var outptr_QPen *C.QPen = nil - C.QPen_new8(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c), (C.int)(j), &outptr_QPen) - ret := newQPen(outptr_QPen) + ret := newQPen(C.QPen_new8(brush.cPointer(), (C.double)(width), (C.int)(s), (C.int)(c), (C.int)(j))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qpen.h b/qt6/gen_qpen.h index 661eefd4..cb283fc6 100644 --- a/qt6/gen_qpen.h +++ b/qt6/gen_qpen.h @@ -24,14 +24,14 @@ typedef struct QColor QColor; typedef struct QPen QPen; #endif -void QPen_new(QPen** outptr_QPen); -void QPen_new2(int param1, QPen** outptr_QPen); -void QPen_new3(QColor* color, QPen** outptr_QPen); -void QPen_new4(QBrush* brush, double width, QPen** outptr_QPen); -void QPen_new5(QPen* pen, QPen** outptr_QPen); -void QPen_new6(QBrush* brush, double width, int s, QPen** outptr_QPen); -void QPen_new7(QBrush* brush, double width, int s, int c, QPen** outptr_QPen); -void QPen_new8(QBrush* brush, double width, int s, int c, int j, QPen** outptr_QPen); +QPen* QPen_new(); +QPen* QPen_new2(int param1); +QPen* QPen_new3(QColor* color); +QPen* QPen_new4(QBrush* brush, double width); +QPen* QPen_new5(QPen* pen); +QPen* QPen_new6(QBrush* brush, double width, int s); +QPen* QPen_new7(QBrush* brush, double width, int s, int c); +QPen* QPen_new8(QBrush* brush, double width, int s, int c, int j); void QPen_OperatorAssign(QPen* self, QPen* pen); void QPen_Swap(QPen* self, QPen* other); int QPen_Style(const QPen* self); diff --git a/qt6/gen_qpicture.cpp b/qt6/gen_qpicture.cpp index 18cf0f4e..5d84e810 100644 --- a/qt6/gen_qpicture.cpp +++ b/qt6/gen_qpicture.cpp @@ -186,22 +186,20 @@ public: }; -void QPicture_new(QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPicture* ret = new MiqtVirtualQPicture(); - *outptr_QPicture = ret; - *outptr_QPaintDevice = static_cast(ret); +QPicture* QPicture_new() { + return new MiqtVirtualQPicture(); } -void QPicture_new2(QPicture* param1, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPicture* ret = new MiqtVirtualQPicture(*param1); - *outptr_QPicture = ret; - *outptr_QPaintDevice = static_cast(ret); +QPicture* QPicture_new2(QPicture* param1) { + return new MiqtVirtualQPicture(*param1); } -void QPicture_new3(int formatVersion, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPicture* ret = new MiqtVirtualQPicture(static_cast(formatVersion)); - *outptr_QPicture = ret; - *outptr_QPaintDevice = static_cast(ret); +QPicture* QPicture_new3(int formatVersion) { + return new MiqtVirtualQPicture(static_cast(formatVersion)); +} + +void QPicture_virtbase(QPicture* src, QPaintDevice** outptr_QPaintDevice) { + *outptr_QPaintDevice = static_cast(src); } bool QPicture_IsNull(const QPicture* self) { diff --git a/qt6/gen_qpicture.go b/qt6/gen_qpicture.go index 99a823c7..6988f8e5 100644 --- a/qt6/gen_qpicture.go +++ b/qt6/gen_qpicture.go @@ -35,53 +35,42 @@ func (this *QPicture) UnsafePointer() unsafe.Pointer { } // newQPicture constructs the type using only CGO pointers. -func newQPicture(h *C.QPicture, h_QPaintDevice *C.QPaintDevice) *QPicture { +func newQPicture(h *C.QPicture) *QPicture { if h == nil { return nil } + var outptr_QPaintDevice *C.QPaintDevice = nil + C.QPicture_virtbase(h, &outptr_QPaintDevice) + return &QPicture{h: h, - QPaintDevice: newQPaintDevice(h_QPaintDevice)} + QPaintDevice: newQPaintDevice(outptr_QPaintDevice)} } // UnsafeNewQPicture constructs the type using only unsafe pointers. -func UnsafeNewQPicture(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPicture { - if h == nil { - return nil - } - - return &QPicture{h: (*C.QPicture)(h), - QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} +func UnsafeNewQPicture(h unsafe.Pointer) *QPicture { + return newQPicture((*C.QPicture)(h)) } // NewQPicture constructs a new QPicture object. func NewQPicture() *QPicture { - var outptr_QPicture *C.QPicture = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPicture_new(&outptr_QPicture, &outptr_QPaintDevice) - ret := newQPicture(outptr_QPicture, outptr_QPaintDevice) + ret := newQPicture(C.QPicture_new()) ret.isSubclass = true return ret } // NewQPicture2 constructs a new QPicture object. func NewQPicture2(param1 *QPicture) *QPicture { - var outptr_QPicture *C.QPicture = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPicture_new2(param1.cPointer(), &outptr_QPicture, &outptr_QPaintDevice) - ret := newQPicture(outptr_QPicture, outptr_QPaintDevice) + ret := newQPicture(C.QPicture_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQPicture3 constructs a new QPicture object. func NewQPicture3(formatVersion int) *QPicture { - var outptr_QPicture *C.QPicture = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPicture_new3((C.int)(formatVersion), &outptr_QPicture, &outptr_QPaintDevice) - ret := newQPicture(outptr_QPicture, outptr_QPaintDevice) + ret := newQPicture(C.QPicture_new3((C.int)(formatVersion))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qpicture.h b/qt6/gen_qpicture.h index 75eeaf59..83415c32 100644 --- a/qt6/gen_qpicture.h +++ b/qt6/gen_qpicture.h @@ -32,9 +32,10 @@ typedef struct QPoint QPoint; typedef struct QRect QRect; #endif -void QPicture_new(QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice); -void QPicture_new2(QPicture* param1, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice); -void QPicture_new3(int formatVersion, QPicture** outptr_QPicture, QPaintDevice** outptr_QPaintDevice); +QPicture* QPicture_new(); +QPicture* QPicture_new2(QPicture* param1); +QPicture* QPicture_new3(int formatVersion); +void QPicture_virtbase(QPicture* src, QPaintDevice** outptr_QPaintDevice); bool QPicture_IsNull(const QPicture* self); int QPicture_DevType(const QPicture* self); unsigned int QPicture_Size(const QPicture* self); diff --git a/qt6/gen_qpixelformat.cpp b/qt6/gen_qpixelformat.cpp index a5747dfa..1fc72f38 100644 --- a/qt6/gen_qpixelformat.cpp +++ b/qt6/gen_qpixelformat.cpp @@ -3,29 +3,24 @@ #include "gen_qpixelformat.h" #include "_cgo_export.h" -void QPixelFormat_new(QPixelFormat** outptr_QPixelFormat) { - QPixelFormat* ret = new QPixelFormat(); - *outptr_QPixelFormat = ret; +QPixelFormat* QPixelFormat_new() { + return new QPixelFormat(); } -void QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, QPixelFormat** outptr_QPixelFormat) { - QPixelFormat* ret = new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation)); - *outptr_QPixelFormat = ret; +QPixelFormat* QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation) { + return new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation)); } -void QPixelFormat_new3(QPixelFormat* param1, QPixelFormat** outptr_QPixelFormat) { - QPixelFormat* ret = new QPixelFormat(*param1); - *outptr_QPixelFormat = ret; +QPixelFormat* QPixelFormat_new3(QPixelFormat* param1) { + return new QPixelFormat(*param1); } -void QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, QPixelFormat** outptr_QPixelFormat) { - QPixelFormat* ret = new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder)); - *outptr_QPixelFormat = ret; +QPixelFormat* QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder) { + return new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder)); } -void QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum, QPixelFormat** outptr_QPixelFormat) { - QPixelFormat* ret = new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder), static_cast(subEnum)); - *outptr_QPixelFormat = ret; +QPixelFormat* QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum) { + return new QPixelFormat(static_cast(colorModel), static_cast(firstSize), static_cast(secondSize), static_cast(thirdSize), static_cast(fourthSize), static_cast(fifthSize), static_cast(alphaSize), static_cast(alphaUsage), static_cast(alphaPosition), static_cast(premultiplied), static_cast(typeInterpretation), static_cast(byteOrder), static_cast(subEnum)); } int QPixelFormat_ColorModel(const QPixelFormat* self) { diff --git a/qt6/gen_qpixelformat.go b/qt6/gen_qpixelformat.go index de05ebf7..e3cdc971 100644 --- a/qt6/gen_qpixelformat.go +++ b/qt6/gen_qpixelformat.go @@ -110,64 +110,51 @@ func newQPixelFormat(h *C.QPixelFormat) *QPixelFormat { if h == nil { return nil } + return &QPixelFormat{h: h} } // UnsafeNewQPixelFormat constructs the type using only unsafe pointers. func UnsafeNewQPixelFormat(h unsafe.Pointer) *QPixelFormat { - if h == nil { - return nil - } - - return &QPixelFormat{h: (*C.QPixelFormat)(h)} + return newQPixelFormat((*C.QPixelFormat)(h)) } // NewQPixelFormat constructs a new QPixelFormat object. func NewQPixelFormat() *QPixelFormat { - var outptr_QPixelFormat *C.QPixelFormat = nil - C.QPixelFormat_new(&outptr_QPixelFormat) - ret := newQPixelFormat(outptr_QPixelFormat) + ret := newQPixelFormat(C.QPixelFormat_new()) ret.isSubclass = true return ret } // NewQPixelFormat2 constructs a new QPixelFormat object. func NewQPixelFormat2(colorModel QPixelFormat__ColorModel, firstSize byte, secondSize byte, thirdSize byte, fourthSize byte, fifthSize byte, alphaSize byte, alphaUsage QPixelFormat__AlphaUsage, alphaPosition QPixelFormat__AlphaPosition, premultiplied QPixelFormat__AlphaPremultiplied, typeInterpretation QPixelFormat__TypeInterpretation) *QPixelFormat { - var outptr_QPixelFormat *C.QPixelFormat = nil - C.QPixelFormat_new2((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), &outptr_QPixelFormat) - ret := newQPixelFormat(outptr_QPixelFormat) + ret := newQPixelFormat(C.QPixelFormat_new2((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation))) ret.isSubclass = true return ret } // NewQPixelFormat3 constructs a new QPixelFormat object. func NewQPixelFormat3(param1 *QPixelFormat) *QPixelFormat { - var outptr_QPixelFormat *C.QPixelFormat = nil - C.QPixelFormat_new3(param1.cPointer(), &outptr_QPixelFormat) - ret := newQPixelFormat(outptr_QPixelFormat) + ret := newQPixelFormat(C.QPixelFormat_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQPixelFormat4 constructs a new QPixelFormat object. func NewQPixelFormat4(colorModel QPixelFormat__ColorModel, firstSize byte, secondSize byte, thirdSize byte, fourthSize byte, fifthSize byte, alphaSize byte, alphaUsage QPixelFormat__AlphaUsage, alphaPosition QPixelFormat__AlphaPosition, premultiplied QPixelFormat__AlphaPremultiplied, typeInterpretation QPixelFormat__TypeInterpretation, byteOrder QPixelFormat__ByteOrder) *QPixelFormat { - var outptr_QPixelFormat *C.QPixelFormat = nil - C.QPixelFormat_new4((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder), &outptr_QPixelFormat) - ret := newQPixelFormat(outptr_QPixelFormat) + ret := newQPixelFormat(C.QPixelFormat_new4((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder))) ret.isSubclass = true return ret } // NewQPixelFormat5 constructs a new QPixelFormat object. func NewQPixelFormat5(colorModel QPixelFormat__ColorModel, firstSize byte, secondSize byte, thirdSize byte, fourthSize byte, fifthSize byte, alphaSize byte, alphaUsage QPixelFormat__AlphaUsage, alphaPosition QPixelFormat__AlphaPosition, premultiplied QPixelFormat__AlphaPremultiplied, typeInterpretation QPixelFormat__TypeInterpretation, byteOrder QPixelFormat__ByteOrder, subEnum byte) *QPixelFormat { - var outptr_QPixelFormat *C.QPixelFormat = nil - C.QPixelFormat_new5((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder), (C.uchar)(subEnum), &outptr_QPixelFormat) - ret := newQPixelFormat(outptr_QPixelFormat) + ret := newQPixelFormat(C.QPixelFormat_new5((C.int)(colorModel), (C.uchar)(firstSize), (C.uchar)(secondSize), (C.uchar)(thirdSize), (C.uchar)(fourthSize), (C.uchar)(fifthSize), (C.uchar)(alphaSize), (C.int)(alphaUsage), (C.int)(alphaPosition), (C.int)(premultiplied), (C.int)(typeInterpretation), (C.int)(byteOrder), (C.uchar)(subEnum))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qpixelformat.h b/qt6/gen_qpixelformat.h index 60cf504b..24542458 100644 --- a/qt6/gen_qpixelformat.h +++ b/qt6/gen_qpixelformat.h @@ -20,11 +20,11 @@ class QPixelFormat; typedef struct QPixelFormat QPixelFormat; #endif -void QPixelFormat_new(QPixelFormat** outptr_QPixelFormat); -void QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, QPixelFormat** outptr_QPixelFormat); -void QPixelFormat_new3(QPixelFormat* param1, QPixelFormat** outptr_QPixelFormat); -void QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, QPixelFormat** outptr_QPixelFormat); -void QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum, QPixelFormat** outptr_QPixelFormat); +QPixelFormat* QPixelFormat_new(); +QPixelFormat* QPixelFormat_new2(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation); +QPixelFormat* QPixelFormat_new3(QPixelFormat* param1); +QPixelFormat* QPixelFormat_new4(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder); +QPixelFormat* QPixelFormat_new5(int colorModel, unsigned char firstSize, unsigned char secondSize, unsigned char thirdSize, unsigned char fourthSize, unsigned char fifthSize, unsigned char alphaSize, int alphaUsage, int alphaPosition, int premultiplied, int typeInterpretation, int byteOrder, unsigned char subEnum); int QPixelFormat_ColorModel(const QPixelFormat* self); unsigned char QPixelFormat_ChannelCount(const QPixelFormat* self); unsigned char QPixelFormat_RedSize(const QPixelFormat* self); diff --git a/qt6/gen_qpixmap.cpp b/qt6/gen_qpixmap.cpp index 72862b11..3c1029eb 100644 --- a/qt6/gen_qpixmap.cpp +++ b/qt6/gen_qpixmap.cpp @@ -173,49 +173,39 @@ public: }; -void QPixmap_new(QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(); - *outptr_QPixmap = ret; - *outptr_QPaintDevice = static_cast(ret); +QPixmap* QPixmap_new() { + return new MiqtVirtualQPixmap(); } -void QPixmap_new2(int w, int h, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(static_cast(w), static_cast(h)); - *outptr_QPixmap = ret; - *outptr_QPaintDevice = static_cast(ret); +QPixmap* QPixmap_new2(int w, int h) { + return new MiqtVirtualQPixmap(static_cast(w), static_cast(h)); } -void QPixmap_new3(QSize* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(*param1); - *outptr_QPixmap = ret; - *outptr_QPaintDevice = static_cast(ret); +QPixmap* QPixmap_new3(QSize* param1) { + return new MiqtVirtualQPixmap(*param1); } -void QPixmap_new4(struct miqt_string fileName, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { +QPixmap* QPixmap_new4(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(fileName_QString); - *outptr_QPixmap = ret; - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPixmap(fileName_QString); } -void QPixmap_new5(QPixmap* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(*param1); - *outptr_QPixmap = ret; - *outptr_QPaintDevice = static_cast(ret); +QPixmap* QPixmap_new5(QPixmap* param1) { + return new MiqtVirtualQPixmap(*param1); } -void QPixmap_new6(struct miqt_string fileName, const char* format, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { +QPixmap* QPixmap_new6(struct miqt_string fileName, const char* format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(fileName_QString, format); - *outptr_QPixmap = ret; - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPixmap(fileName_QString, format); } -void QPixmap_new7(struct miqt_string fileName, const char* format, int flags, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice) { +QPixmap* QPixmap_new7(struct miqt_string fileName, const char* format, int flags) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQPixmap* ret = new MiqtVirtualQPixmap(fileName_QString, format, static_cast(flags)); - *outptr_QPixmap = ret; - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPixmap(fileName_QString, format, static_cast(flags)); +} + +void QPixmap_virtbase(QPixmap* src, QPaintDevice** outptr_QPaintDevice) { + *outptr_QPaintDevice = static_cast(src); } void QPixmap_OperatorAssign(QPixmap* self, QPixmap* param1) { diff --git a/qt6/gen_qpixmap.go b/qt6/gen_qpixmap.go index 2de174ad..8f394955 100644 --- a/qt6/gen_qpixmap.go +++ b/qt6/gen_qpixmap.go @@ -35,53 +35,42 @@ func (this *QPixmap) UnsafePointer() unsafe.Pointer { } // newQPixmap constructs the type using only CGO pointers. -func newQPixmap(h *C.QPixmap, h_QPaintDevice *C.QPaintDevice) *QPixmap { +func newQPixmap(h *C.QPixmap) *QPixmap { if h == nil { return nil } + var outptr_QPaintDevice *C.QPaintDevice = nil + C.QPixmap_virtbase(h, &outptr_QPaintDevice) + return &QPixmap{h: h, - QPaintDevice: newQPaintDevice(h_QPaintDevice)} + QPaintDevice: newQPaintDevice(outptr_QPaintDevice)} } // UnsafeNewQPixmap constructs the type using only unsafe pointers. -func UnsafeNewQPixmap(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPixmap { - if h == nil { - return nil - } - - return &QPixmap{h: (*C.QPixmap)(h), - QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} +func UnsafeNewQPixmap(h unsafe.Pointer) *QPixmap { + return newQPixmap((*C.QPixmap)(h)) } // NewQPixmap constructs a new QPixmap object. func NewQPixmap() *QPixmap { - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPixmap_new(&outptr_QPixmap, &outptr_QPaintDevice) - ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret := newQPixmap(C.QPixmap_new()) ret.isSubclass = true return ret } // NewQPixmap2 constructs a new QPixmap object. func NewQPixmap2(w int, h int) *QPixmap { - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPixmap_new2((C.int)(w), (C.int)(h), &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret := newQPixmap(C.QPixmap_new2((C.int)(w), (C.int)(h))) ret.isSubclass = true return ret } // NewQPixmap3 constructs a new QPixmap object. func NewQPixmap3(param1 *QSize) *QPixmap { - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPixmap_new3(param1.cPointer(), &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret := newQPixmap(C.QPixmap_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -92,22 +81,16 @@ func NewQPixmap4(fileName string) *QPixmap { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPixmap_new4(fileName_ms, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret := newQPixmap(C.QPixmap_new4(fileName_ms)) ret.isSubclass = true return ret } // NewQPixmap5 constructs a new QPixmap object. func NewQPixmap5(param1 *QPixmap) *QPixmap { - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPixmap_new5(param1.cPointer(), &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret := newQPixmap(C.QPixmap_new5(param1.cPointer())) ret.isSubclass = true return ret } @@ -120,11 +103,8 @@ func NewQPixmap6(fileName string, format string) *QPixmap { defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPixmap_new6(fileName_ms, format_Cstring, &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret := newQPixmap(C.QPixmap_new6(fileName_ms, format_Cstring)) ret.isSubclass = true return ret } @@ -137,11 +117,8 @@ func NewQPixmap7(fileName string, format string, flags ImageConversionFlag) *QPi defer C.free(unsafe.Pointer(fileName_ms.data)) format_Cstring := C.CString(format) defer C.free(unsafe.Pointer(format_Cstring)) - var outptr_QPixmap *C.QPixmap = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPixmap_new7(fileName_ms, format_Cstring, (C.int)(flags), &outptr_QPixmap, &outptr_QPaintDevice) - ret := newQPixmap(outptr_QPixmap, outptr_QPaintDevice) + ret := newQPixmap(C.QPixmap_new7(fileName_ms, format_Cstring, (C.int)(flags))) ret.isSubclass = true return ret } @@ -195,7 +172,7 @@ func (this *QPixmap) Fill() { } func (this *QPixmap) Mask() *QBitmap { - _goptr := newQBitmap(C.QPixmap_Mask(this.h), nil, nil) + _goptr := newQBitmap(C.QPixmap_Mask(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -227,43 +204,43 @@ func (this *QPixmap) HasAlphaChannel() bool { } func (this *QPixmap) CreateHeuristicMask() *QBitmap { - _goptr := newQBitmap(C.QPixmap_CreateHeuristicMask(this.h), nil, nil) + _goptr := newQBitmap(C.QPixmap_CreateHeuristicMask(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) CreateMaskFromColor(maskColor *QColor) *QBitmap { - _goptr := newQBitmap(C.QPixmap_CreateMaskFromColor(this.h, maskColor.cPointer()), nil, nil) + _goptr := newQBitmap(C.QPixmap_CreateMaskFromColor(this.h, maskColor.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled(w int, h int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Scaled(this.h, (C.int)(w), (C.int)(h)), nil) + _goptr := newQPixmap(C.QPixmap_Scaled(this.h, (C.int)(w), (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledWithQSize(s *QSize) *QPixmap { - _goptr := newQPixmap(C.QPixmap_ScaledWithQSize(this.h, s.cPointer()), nil) + _goptr := newQPixmap(C.QPixmap_ScaledWithQSize(this.h, s.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToWidth(w int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_ScaledToWidth(this.h, (C.int)(w)), nil) + _goptr := newQPixmap(C.QPixmap_ScaledToWidth(this.h, (C.int)(w))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToHeight(h int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_ScaledToHeight(this.h, (C.int)(h)), nil) + _goptr := newQPixmap(C.QPixmap_ScaledToHeight(this.h, (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Transformed(param1 *QTransform) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Transformed(this.h, param1.cPointer()), nil) + _goptr := newQPixmap(C.QPixmap_Transformed(this.h, param1.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -275,19 +252,19 @@ func QPixmap_TrueMatrix(m *QTransform, w int, h int) *QTransform { } func (this *QPixmap) ToImage() *QImage { - _goptr := newQImage(C.QPixmap_ToImage(this.h), nil) + _goptr := newQImage(C.QPixmap_ToImage(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImage(image *QImage) *QPixmap { - _goptr := newQPixmap(C.QPixmap_FromImage(image.cPointer()), nil) + _goptr := newQPixmap(C.QPixmap_FromImage(image.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImageReader(imageReader *QImageReader) *QPixmap { - _goptr := newQPixmap(C.QPixmap_FromImageReader(imageReader.cPointer()), nil) + _goptr := newQPixmap(C.QPixmap_FromImageReader(imageReader.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -328,13 +305,13 @@ func (this *QPixmap) ConvertFromImage(img *QImage) bool { } func (this *QPixmap) Copy(x int, y int, width int, height int) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Copy(this.h, (C.int)(x), (C.int)(y), (C.int)(width), (C.int)(height)), nil) + _goptr := newQPixmap(C.QPixmap_Copy(this.h, (C.int)(x), (C.int)(y), (C.int)(width), (C.int)(height))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Copy2() *QPixmap { - _goptr := newQPixmap(C.QPixmap_Copy2(this.h), nil) + _goptr := newQPixmap(C.QPixmap_Copy2(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -376,67 +353,67 @@ func (this *QPixmap) Fill1(fillColor *QColor) { } func (this *QPixmap) CreateHeuristicMask1(clipTight bool) *QBitmap { - _goptr := newQBitmap(C.QPixmap_CreateHeuristicMask1(this.h, (C.bool)(clipTight)), nil, nil) + _goptr := newQBitmap(C.QPixmap_CreateHeuristicMask1(this.h, (C.bool)(clipTight))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) CreateMaskFromColor2(maskColor *QColor, mode MaskMode) *QBitmap { - _goptr := newQBitmap(C.QPixmap_CreateMaskFromColor2(this.h, maskColor.cPointer(), (C.int)(mode)), nil, nil) + _goptr := newQBitmap(C.QPixmap_CreateMaskFromColor2(this.h, maskColor.cPointer(), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled3(w int, h int, aspectMode AspectRatioMode) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Scaled3(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode)), nil) + _goptr := newQPixmap(C.QPixmap_Scaled3(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled4(w int, h int, aspectMode AspectRatioMode, mode TransformationMode) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Scaled4(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QPixmap_Scaled4(this.h, (C.int)(w), (C.int)(h), (C.int)(aspectMode), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled2(s *QSize, aspectMode AspectRatioMode) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Scaled2(this.h, s.cPointer(), (C.int)(aspectMode)), nil) + _goptr := newQPixmap(C.QPixmap_Scaled2(this.h, s.cPointer(), (C.int)(aspectMode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Scaled32(s *QSize, aspectMode AspectRatioMode, mode TransformationMode) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Scaled32(this.h, s.cPointer(), (C.int)(aspectMode), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QPixmap_Scaled32(this.h, s.cPointer(), (C.int)(aspectMode), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToWidth2(w int, mode TransformationMode) *QPixmap { - _goptr := newQPixmap(C.QPixmap_ScaledToWidth2(this.h, (C.int)(w), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QPixmap_ScaledToWidth2(this.h, (C.int)(w), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) ScaledToHeight2(h int, mode TransformationMode) *QPixmap { - _goptr := newQPixmap(C.QPixmap_ScaledToHeight2(this.h, (C.int)(h), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QPixmap_ScaledToHeight2(this.h, (C.int)(h), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QPixmap) Transformed2(param1 *QTransform, mode TransformationMode) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Transformed2(this.h, param1.cPointer(), (C.int)(mode)), nil) + _goptr := newQPixmap(C.QPixmap_Transformed2(this.h, param1.cPointer(), (C.int)(mode))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImage2(image *QImage, flags ImageConversionFlag) *QPixmap { - _goptr := newQPixmap(C.QPixmap_FromImage2(image.cPointer(), (C.int)(flags)), nil) + _goptr := newQPixmap(C.QPixmap_FromImage2(image.cPointer(), (C.int)(flags))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func QPixmap_FromImageReader2(imageReader *QImageReader, flags ImageConversionFlag) *QPixmap { - _goptr := newQPixmap(C.QPixmap_FromImageReader2(imageReader.cPointer(), (C.int)(flags)), nil) + _goptr := newQPixmap(C.QPixmap_FromImageReader2(imageReader.cPointer(), (C.int)(flags))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -528,7 +505,7 @@ func (this *QPixmap) ConvertFromImage2(img *QImage, flags ImageConversionFlag) b } func (this *QPixmap) Copy1(rect *QRect) *QPixmap { - _goptr := newQPixmap(C.QPixmap_Copy1(this.h, rect.cPointer()), nil) + _goptr := newQPixmap(C.QPixmap_Copy1(this.h, rect.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/gen_qpixmap.h b/qt6/gen_qpixmap.h index f1ec3f43..820d7c7c 100644 --- a/qt6/gen_qpixmap.h +++ b/qt6/gen_qpixmap.h @@ -48,13 +48,14 @@ typedef struct QSizeF QSizeF; typedef struct QTransform QTransform; #endif -void QPixmap_new(QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QPixmap_new2(int w, int h, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QPixmap_new3(QSize* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QPixmap_new4(struct miqt_string fileName, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QPixmap_new5(QPixmap* param1, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QPixmap_new6(struct miqt_string fileName, const char* format, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); -void QPixmap_new7(struct miqt_string fileName, const char* format, int flags, QPixmap** outptr_QPixmap, QPaintDevice** outptr_QPaintDevice); +QPixmap* QPixmap_new(); +QPixmap* QPixmap_new2(int w, int h); +QPixmap* QPixmap_new3(QSize* param1); +QPixmap* QPixmap_new4(struct miqt_string fileName); +QPixmap* QPixmap_new5(QPixmap* param1); +QPixmap* QPixmap_new6(struct miqt_string fileName, const char* format); +QPixmap* QPixmap_new7(struct miqt_string fileName, const char* format, int flags); +void QPixmap_virtbase(QPixmap* src, QPaintDevice** outptr_QPaintDevice); void QPixmap_OperatorAssign(QPixmap* self, QPixmap* param1); void QPixmap_Swap(QPixmap* self, QPixmap* other); bool QPixmap_IsNull(const QPixmap* self); diff --git a/qt6/gen_qpixmapcache.cpp b/qt6/gen_qpixmapcache.cpp index 99b0f340..cf4c3099 100644 --- a/qt6/gen_qpixmapcache.cpp +++ b/qt6/gen_qpixmapcache.cpp @@ -59,14 +59,12 @@ void QPixmapCache_Delete(QPixmapCache* self, bool isSubclass) { } } -void QPixmapCache__Key_new(QPixmapCache__Key** outptr_QPixmapCache__Key) { - QPixmapCache::Key* ret = new QPixmapCache::Key(); - *outptr_QPixmapCache__Key = ret; +QPixmapCache__Key* QPixmapCache__Key_new() { + return new QPixmapCache::Key(); } -void QPixmapCache__Key_new2(QPixmapCache__Key* other, QPixmapCache__Key** outptr_QPixmapCache__Key) { - QPixmapCache::Key* ret = new QPixmapCache::Key(*other); - *outptr_QPixmapCache__Key = ret; +QPixmapCache__Key* QPixmapCache__Key_new2(QPixmapCache__Key* other) { + return new QPixmapCache::Key(*other); } bool QPixmapCache__Key_OperatorEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key) { diff --git a/qt6/gen_qpixmapcache.go b/qt6/gen_qpixmapcache.go index 858905aa..90968f08 100644 --- a/qt6/gen_qpixmapcache.go +++ b/qt6/gen_qpixmapcache.go @@ -37,16 +37,13 @@ func newQPixmapCache(h *C.QPixmapCache) *QPixmapCache { if h == nil { return nil } + return &QPixmapCache{h: h} } // UnsafeNewQPixmapCache constructs the type using only unsafe pointers. func UnsafeNewQPixmapCache(h unsafe.Pointer) *QPixmapCache { - if h == nil { - return nil - } - - return &QPixmapCache{h: (*C.QPixmapCache)(h)} + return newQPixmapCache((*C.QPixmapCache)(h)) } func QPixmapCache_CacheLimit() int { @@ -141,34 +138,27 @@ func newQPixmapCache__Key(h *C.QPixmapCache__Key) *QPixmapCache__Key { if h == nil { return nil } + return &QPixmapCache__Key{h: h} } // UnsafeNewQPixmapCache__Key constructs the type using only unsafe pointers. func UnsafeNewQPixmapCache__Key(h unsafe.Pointer) *QPixmapCache__Key { - if h == nil { - return nil - } - - return &QPixmapCache__Key{h: (*C.QPixmapCache__Key)(h)} + return newQPixmapCache__Key((*C.QPixmapCache__Key)(h)) } // NewQPixmapCache__Key constructs a new QPixmapCache::Key object. func NewQPixmapCache__Key() *QPixmapCache__Key { - var outptr_QPixmapCache__Key *C.QPixmapCache__Key = nil - C.QPixmapCache__Key_new(&outptr_QPixmapCache__Key) - ret := newQPixmapCache__Key(outptr_QPixmapCache__Key) + ret := newQPixmapCache__Key(C.QPixmapCache__Key_new()) ret.isSubclass = true return ret } // NewQPixmapCache__Key2 constructs a new QPixmapCache::Key object. func NewQPixmapCache__Key2(other *QPixmapCache__Key) *QPixmapCache__Key { - var outptr_QPixmapCache__Key *C.QPixmapCache__Key = nil - C.QPixmapCache__Key_new2(other.cPointer(), &outptr_QPixmapCache__Key) - ret := newQPixmapCache__Key(outptr_QPixmapCache__Key) + ret := newQPixmapCache__Key(C.QPixmapCache__Key_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qpixmapcache.h b/qt6/gen_qpixmapcache.h index 4bc0a19e..8df8d494 100644 --- a/qt6/gen_qpixmapcache.h +++ b/qt6/gen_qpixmapcache.h @@ -40,8 +40,8 @@ void QPixmapCache_RemoveWithKey(QPixmapCache__Key* key); void QPixmapCache_Clear(); void QPixmapCache_Delete(QPixmapCache* self, bool isSubclass); -void QPixmapCache__Key_new(QPixmapCache__Key** outptr_QPixmapCache__Key); -void QPixmapCache__Key_new2(QPixmapCache__Key* other, QPixmapCache__Key** outptr_QPixmapCache__Key); +QPixmapCache__Key* QPixmapCache__Key_new(); +QPixmapCache__Key* QPixmapCache__Key_new2(QPixmapCache__Key* other); bool QPixmapCache__Key_OperatorEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key); bool QPixmapCache__Key_OperatorNotEqual(const QPixmapCache__Key* self, QPixmapCache__Key* key); void QPixmapCache__Key_OperatorAssign(QPixmapCache__Key* self, QPixmapCache__Key* other); diff --git a/qt6/gen_qplaintextedit.cpp b/qt6/gen_qplaintextedit.cpp index b468df0f..19876796 100644 --- a/qt6/gen_qplaintextedit.cpp +++ b/qt6/gen_qplaintextedit.cpp @@ -897,46 +897,26 @@ public: }; -void QPlainTextEdit_new(QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(parent); - *outptr_QPlainTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPlainTextEdit* QPlainTextEdit_new(QWidget* parent) { + return new MiqtVirtualQPlainTextEdit(parent); } -void QPlainTextEdit_new2(QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(); - *outptr_QPlainTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPlainTextEdit* QPlainTextEdit_new2() { + return new MiqtVirtualQPlainTextEdit(); } -void QPlainTextEdit_new3(struct miqt_string text, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QPlainTextEdit* QPlainTextEdit_new3(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(text_QString); - *outptr_QPlainTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPlainTextEdit(text_QString); } -void QPlainTextEdit_new4(struct miqt_string text, QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QPlainTextEdit* QPlainTextEdit_new4(struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQPlainTextEdit* ret = new MiqtVirtualQPlainTextEdit(text_QString, parent); - *outptr_QPlainTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPlainTextEdit(text_QString, parent); +} + +void QPlainTextEdit_virtbase(QPlainTextEdit* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); } QMetaObject* QPlainTextEdit_MetaObject(const QPlainTextEdit* self) { @@ -1983,11 +1963,12 @@ public: }; -void QPlainTextDocumentLayout_new(QTextDocument* document, QPlainTextDocumentLayout** outptr_QPlainTextDocumentLayout, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject) { - MiqtVirtualQPlainTextDocumentLayout* ret = new MiqtVirtualQPlainTextDocumentLayout(document); - *outptr_QPlainTextDocumentLayout = ret; - *outptr_QAbstractTextDocumentLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPlainTextDocumentLayout* QPlainTextDocumentLayout_new(QTextDocument* document) { + return new MiqtVirtualQPlainTextDocumentLayout(document); +} + +void QPlainTextDocumentLayout_virtbase(QPlainTextDocumentLayout* src, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout) { + *outptr_QAbstractTextDocumentLayout = static_cast(src); } QMetaObject* QPlainTextDocumentLayout_MetaObject(const QPlainTextDocumentLayout* self) { diff --git a/qt6/gen_qplaintextedit.go b/qt6/gen_qplaintextedit.go index d1b3dbd5..4567ca0f 100644 --- a/qt6/gen_qplaintextedit.go +++ b/qt6/gen_qplaintextedit.go @@ -42,50 +42,34 @@ func (this *QPlainTextEdit) UnsafePointer() unsafe.Pointer { } // newQPlainTextEdit constructs the type using only CGO pointers. -func newQPlainTextEdit(h *C.QPlainTextEdit, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPlainTextEdit { +func newQPlainTextEdit(h *C.QPlainTextEdit) *QPlainTextEdit { if h == nil { return nil } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QPlainTextEdit_virtbase(h, &outptr_QAbstractScrollArea) + return &QPlainTextEdit{h: h, - QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractScrollArea: newQAbstractScrollArea(outptr_QAbstractScrollArea)} } // UnsafeNewQPlainTextEdit constructs the type using only unsafe pointers. -func UnsafeNewQPlainTextEdit(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPlainTextEdit { - if h == nil { - return nil - } - - return &QPlainTextEdit{h: (*C.QPlainTextEdit)(h), - QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQPlainTextEdit(h unsafe.Pointer) *QPlainTextEdit { + return newQPlainTextEdit((*C.QPlainTextEdit)(h)) } // NewQPlainTextEdit constructs a new QPlainTextEdit object. func NewQPlainTextEdit(parent *QWidget) *QPlainTextEdit { - var outptr_QPlainTextEdit *C.QPlainTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPlainTextEdit_new(parent.cPointer(), &outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPlainTextEdit(C.QPlainTextEdit_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQPlainTextEdit2 constructs a new QPlainTextEdit object. func NewQPlainTextEdit2() *QPlainTextEdit { - var outptr_QPlainTextEdit *C.QPlainTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPlainTextEdit_new2(&outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPlainTextEdit(C.QPlainTextEdit_new2()) ret.isSubclass = true return ret } @@ -96,15 +80,8 @@ func NewQPlainTextEdit3(text string) *QPlainTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QPlainTextEdit *C.QPlainTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPlainTextEdit_new3(text_ms, &outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPlainTextEdit(C.QPlainTextEdit_new3(text_ms)) ret.isSubclass = true return ret } @@ -115,15 +92,8 @@ func NewQPlainTextEdit4(text string, parent *QWidget) *QPlainTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QPlainTextEdit *C.QPlainTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPlainTextEdit_new4(text_ms, parent.cPointer(), &outptr_QPlainTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPlainTextEdit(outptr_QPlainTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPlainTextEdit(C.QPlainTextEdit_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -152,7 +122,7 @@ func (this *QPlainTextEdit) SetDocument(document *QTextDocument) { } func (this *QPlainTextEdit) Document() *QTextDocument { - return newQTextDocument(C.QPlainTextEdit_Document(this.h), nil) + return newQTextDocument(C.QPlainTextEdit_Document(this.h)) } func (this *QPlainTextEdit) SetPlaceholderText(placeholderText string) { @@ -205,7 +175,7 @@ func (this *QPlainTextEdit) SetCurrentCharFormat(format *QTextCharFormat) { } func (this *QPlainTextEdit) CurrentCharFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QPlainTextEdit_CurrentCharFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QPlainTextEdit_CurrentCharFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -311,11 +281,11 @@ func (this *QPlainTextEdit) LoadResource(typeVal int, name *QUrl) *QVariant { } func (this *QPlainTextEdit) CreateStandardContextMenu() *QMenu { - return newQMenu(C.QPlainTextEdit_CreateStandardContextMenu(this.h), nil, nil, nil) + return newQMenu(C.QPlainTextEdit_CreateStandardContextMenu(this.h)) } func (this *QPlainTextEdit) CreateStandardContextMenuWithPosition(position *QPoint) *QMenu { - return newQMenu(C.QPlainTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer()), nil, nil, nil) + return newQMenu(C.QPlainTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer())) } func (this *QPlainTextEdit) CursorForPosition(pos *QPoint) *QTextCursor { @@ -818,7 +788,7 @@ func miqt_exec_callback_QPlainTextEdit_TimerEvent(self *C.QPlainTextEdit, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -844,7 +814,7 @@ func miqt_exec_callback_QPlainTextEdit_KeyPressEvent(self *C.QPlainTextEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -870,7 +840,7 @@ func miqt_exec_callback_QPlainTextEdit_KeyReleaseEvent(self *C.QPlainTextEdit, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -896,7 +866,7 @@ func miqt_exec_callback_QPlainTextEdit_ResizeEvent(self *C.QPlainTextEdit, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -922,7 +892,7 @@ func miqt_exec_callback_QPlainTextEdit_PaintEvent(self *C.QPlainTextEdit, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -948,7 +918,7 @@ func miqt_exec_callback_QPlainTextEdit_MousePressEvent(self *C.QPlainTextEdit, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -974,7 +944,7 @@ func miqt_exec_callback_QPlainTextEdit_MouseMoveEvent(self *C.QPlainTextEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1000,7 +970,7 @@ func miqt_exec_callback_QPlainTextEdit_MouseReleaseEvent(self *C.QPlainTextEdit, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1026,7 +996,7 @@ func miqt_exec_callback_QPlainTextEdit_MouseDoubleClickEvent(self *C.QPlainTextE } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1080,7 +1050,7 @@ func miqt_exec_callback_QPlainTextEdit_ContextMenuEvent(self *C.QPlainTextEdit, } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(e, nil, nil) + slotval1 := newQContextMenuEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1106,7 +1076,7 @@ func miqt_exec_callback_QPlainTextEdit_DragEnterEvent(self *C.QPlainTextEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(e, nil, nil, nil) + slotval1 := newQDragEnterEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1132,7 +1102,7 @@ func miqt_exec_callback_QPlainTextEdit_DragLeaveEvent(self *C.QPlainTextEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(e, nil) + slotval1 := newQDragLeaveEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1158,7 +1128,7 @@ func miqt_exec_callback_QPlainTextEdit_DragMoveEvent(self *C.QPlainTextEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(e, nil, nil) + slotval1 := newQDragMoveEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1184,7 +1154,7 @@ func miqt_exec_callback_QPlainTextEdit_DropEvent(self *C.QPlainTextEdit, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(e, nil) + slotval1 := newQDropEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1210,7 +1180,7 @@ func miqt_exec_callback_QPlainTextEdit_FocusInEvent(self *C.QPlainTextEdit, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1236,7 +1206,7 @@ func miqt_exec_callback_QPlainTextEdit_FocusOutEvent(self *C.QPlainTextEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1262,7 +1232,7 @@ func miqt_exec_callback_QPlainTextEdit_ShowEvent(self *C.QPlainTextEdit, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1314,7 +1284,7 @@ func miqt_exec_callback_QPlainTextEdit_WheelEvent(self *C.QPlainTextEdit, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1322,7 +1292,7 @@ func miqt_exec_callback_QPlainTextEdit_WheelEvent(self *C.QPlainTextEdit, cb C.i func (this *QPlainTextEdit) callVirtualBase_CreateMimeDataFromSelection() *QMimeData { - return newQMimeData(C.QPlainTextEdit_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h)), nil) + return newQMimeData(C.QPlainTextEdit_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h))) } func (this *QPlainTextEdit) OnCreateMimeDataFromSelection(slot func(super func() *QMimeData) *QMimeData) { @@ -1365,7 +1335,7 @@ func miqt_exec_callback_QPlainTextEdit_CanInsertFromMimeData(self *C.QPlainTextE } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(source, nil) + slotval1 := newQMimeData(source) virtualReturn := gofunc((&QPlainTextEdit{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) @@ -1393,7 +1363,7 @@ func miqt_exec_callback_QPlainTextEdit_InsertFromMimeData(self *C.QPlainTextEdit } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(source, nil) + slotval1 := newQMimeData(source) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_InsertFromMimeData, slotval1) @@ -1419,7 +1389,7 @@ func miqt_exec_callback_QPlainTextEdit_InputMethodEvent(self *C.QPlainTextEdit, } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -1553,7 +1523,7 @@ func miqt_exec_callback_QPlainTextEdit_SetupViewport(self *C.QPlainTextEdit, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(viewport, nil, nil) + slotval1 := newQWidget(viewport) gofunc((&QPlainTextEdit{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -1679,32 +1649,26 @@ func (this *QPlainTextDocumentLayout) UnsafePointer() unsafe.Pointer { } // newQPlainTextDocumentLayout constructs the type using only CGO pointers. -func newQPlainTextDocumentLayout(h *C.QPlainTextDocumentLayout, h_QAbstractTextDocumentLayout *C.QAbstractTextDocumentLayout, h_QObject *C.QObject) *QPlainTextDocumentLayout { +func newQPlainTextDocumentLayout(h *C.QPlainTextDocumentLayout) *QPlainTextDocumentLayout { if h == nil { return nil } + var outptr_QAbstractTextDocumentLayout *C.QAbstractTextDocumentLayout = nil + C.QPlainTextDocumentLayout_virtbase(h, &outptr_QAbstractTextDocumentLayout) + return &QPlainTextDocumentLayout{h: h, - QAbstractTextDocumentLayout: newQAbstractTextDocumentLayout(h_QAbstractTextDocumentLayout, h_QObject)} + QAbstractTextDocumentLayout: newQAbstractTextDocumentLayout(outptr_QAbstractTextDocumentLayout)} } // UnsafeNewQPlainTextDocumentLayout constructs the type using only unsafe pointers. -func UnsafeNewQPlainTextDocumentLayout(h unsafe.Pointer, h_QAbstractTextDocumentLayout unsafe.Pointer, h_QObject unsafe.Pointer) *QPlainTextDocumentLayout { - if h == nil { - return nil - } - - return &QPlainTextDocumentLayout{h: (*C.QPlainTextDocumentLayout)(h), - QAbstractTextDocumentLayout: UnsafeNewQAbstractTextDocumentLayout(h_QAbstractTextDocumentLayout, h_QObject)} +func UnsafeNewQPlainTextDocumentLayout(h unsafe.Pointer) *QPlainTextDocumentLayout { + return newQPlainTextDocumentLayout((*C.QPlainTextDocumentLayout)(h)) } // NewQPlainTextDocumentLayout constructs a new QPlainTextDocumentLayout object. func NewQPlainTextDocumentLayout(document *QTextDocument) *QPlainTextDocumentLayout { - var outptr_QPlainTextDocumentLayout *C.QPlainTextDocumentLayout = nil - var outptr_QAbstractTextDocumentLayout *C.QAbstractTextDocumentLayout = nil - var outptr_QObject *C.QObject = nil - C.QPlainTextDocumentLayout_new(document.cPointer(), &outptr_QPlainTextDocumentLayout, &outptr_QAbstractTextDocumentLayout, &outptr_QObject) - ret := newQPlainTextDocumentLayout(outptr_QPlainTextDocumentLayout, outptr_QAbstractTextDocumentLayout, outptr_QObject) + ret := newQPlainTextDocumentLayout(C.QPlainTextDocumentLayout_new(document.cPointer())) ret.isSubclass = true return ret } @@ -1928,7 +1892,7 @@ func miqt_exec_callback_QPlainTextDocumentLayout_FrameBoundingRect(self *C.QPlai } // Convert all CABI parameters to Go parameters - slotval1 := newQTextFrame(param1, nil, nil) + slotval1 := newQTextFrame(param1) virtualReturn := gofunc((&QPlainTextDocumentLayout{h: self}).callVirtualBase_FrameBoundingRect, slotval1) diff --git a/qt6/gen_qplaintextedit.h b/qt6/gen_qplaintextedit.h index a8b3aab8..2d46bb3e 100644 --- a/qt6/gen_qplaintextedit.h +++ b/qt6/gen_qplaintextedit.h @@ -118,10 +118,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QPlainTextEdit_new(QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPlainTextEdit_new2(QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPlainTextEdit_new3(struct miqt_string text, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPlainTextEdit_new4(struct miqt_string text, QWidget* parent, QPlainTextEdit** outptr_QPlainTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QPlainTextEdit* QPlainTextEdit_new(QWidget* parent); +QPlainTextEdit* QPlainTextEdit_new2(); +QPlainTextEdit* QPlainTextEdit_new3(struct miqt_string text); +QPlainTextEdit* QPlainTextEdit_new4(struct miqt_string text, QWidget* parent); +void QPlainTextEdit_virtbase(QPlainTextEdit* src, QAbstractScrollArea** outptr_QAbstractScrollArea); QMetaObject* QPlainTextEdit_MetaObject(const QPlainTextEdit* self); void* QPlainTextEdit_Metacast(QPlainTextEdit* self, const char* param1); struct miqt_string QPlainTextEdit_Tr(const char* s); @@ -317,7 +318,8 @@ void QPlainTextEdit_override_virtual_ViewportSizeHint(void* self, intptr_t slot) QSize* QPlainTextEdit_virtualbase_ViewportSizeHint(const void* self); void QPlainTextEdit_Delete(QPlainTextEdit* self, bool isSubclass); -void QPlainTextDocumentLayout_new(QTextDocument* document, QPlainTextDocumentLayout** outptr_QPlainTextDocumentLayout, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout, QObject** outptr_QObject); +QPlainTextDocumentLayout* QPlainTextDocumentLayout_new(QTextDocument* document); +void QPlainTextDocumentLayout_virtbase(QPlainTextDocumentLayout* src, QAbstractTextDocumentLayout** outptr_QAbstractTextDocumentLayout); QMetaObject* QPlainTextDocumentLayout_MetaObject(const QPlainTextDocumentLayout* self); void* QPlainTextDocumentLayout_Metacast(QPlainTextDocumentLayout* self, const char* param1); struct miqt_string QPlainTextDocumentLayout_Tr(const char* s); diff --git a/qt6/gen_qplugin.cpp b/qt6/gen_qplugin.cpp index 62f8bf9e..f95e5ef5 100644 --- a/qt6/gen_qplugin.cpp +++ b/qt6/gen_qplugin.cpp @@ -33,9 +33,8 @@ void QStaticPlugin_Delete(QStaticPlugin* self, bool isSubclass) { } } -void QPluginMetaData__Header_new(QPluginMetaData__Header* param1, QPluginMetaData__Header** outptr_QPluginMetaData__Header) { - QPluginMetaData::Header* ret = new QPluginMetaData::Header(*param1); - *outptr_QPluginMetaData__Header = ret; +QPluginMetaData__Header* QPluginMetaData__Header_new(QPluginMetaData__Header* param1) { + return new QPluginMetaData::Header(*param1); } void QPluginMetaData__Header_Delete(QPluginMetaData__Header* self, bool isSubclass) { @@ -46,9 +45,8 @@ void QPluginMetaData__Header_Delete(QPluginMetaData__Header* self, bool isSubcla } } -void QPluginMetaData__MagicHeader_new(QPluginMetaData__MagicHeader** outptr_QPluginMetaData__MagicHeader) { - QPluginMetaData::MagicHeader* ret = new QPluginMetaData::MagicHeader(); - *outptr_QPluginMetaData__MagicHeader = ret; +QPluginMetaData__MagicHeader* QPluginMetaData__MagicHeader_new() { + return new QPluginMetaData::MagicHeader(); } void QPluginMetaData__MagicHeader_Delete(QPluginMetaData__MagicHeader* self, bool isSubclass) { @@ -59,14 +57,12 @@ void QPluginMetaData__MagicHeader_Delete(QPluginMetaData__MagicHeader* self, boo } } -void QPluginMetaData__ElfNoteHeader_new(unsigned int payloadSize, QPluginMetaData__ElfNoteHeader** outptr_QPluginMetaData__ElfNoteHeader) { - QPluginMetaData::ElfNoteHeader* ret = new QPluginMetaData::ElfNoteHeader(static_cast(payloadSize)); - *outptr_QPluginMetaData__ElfNoteHeader = ret; +QPluginMetaData__ElfNoteHeader* QPluginMetaData__ElfNoteHeader_new(unsigned int payloadSize) { + return new QPluginMetaData::ElfNoteHeader(static_cast(payloadSize)); } -void QPluginMetaData__ElfNoteHeader_new2(QPluginMetaData__ElfNoteHeader* param1, QPluginMetaData__ElfNoteHeader** outptr_QPluginMetaData__ElfNoteHeader) { - QPluginMetaData::ElfNoteHeader* ret = new QPluginMetaData::ElfNoteHeader(*param1); - *outptr_QPluginMetaData__ElfNoteHeader = ret; +QPluginMetaData__ElfNoteHeader* QPluginMetaData__ElfNoteHeader_new2(QPluginMetaData__ElfNoteHeader* param1) { + return new QPluginMetaData::ElfNoteHeader(*param1); } void QPluginMetaData__ElfNoteHeader_Delete(QPluginMetaData__ElfNoteHeader* self, bool isSubclass) { diff --git a/qt6/gen_qplugin.go b/qt6/gen_qplugin.go index 0e2c8a4d..3f067bb2 100644 --- a/qt6/gen_qplugin.go +++ b/qt6/gen_qplugin.go @@ -37,16 +37,13 @@ func newQPluginMetaData(h *C.QPluginMetaData) *QPluginMetaData { if h == nil { return nil } + return &QPluginMetaData{h: h} } // UnsafeNewQPluginMetaData constructs the type using only unsafe pointers. func UnsafeNewQPluginMetaData(h unsafe.Pointer) *QPluginMetaData { - if h == nil { - return nil - } - - return &QPluginMetaData{h: (*C.QPluginMetaData)(h)} + return newQPluginMetaData((*C.QPluginMetaData)(h)) } func QPluginMetaData_ArchRequirements() byte { @@ -91,16 +88,13 @@ func newQStaticPlugin(h *C.QStaticPlugin) *QStaticPlugin { if h == nil { return nil } + return &QStaticPlugin{h: h} } // UnsafeNewQStaticPlugin constructs the type using only unsafe pointers. func UnsafeNewQStaticPlugin(h unsafe.Pointer) *QStaticPlugin { - if h == nil { - return nil - } - - return &QStaticPlugin{h: (*C.QStaticPlugin)(h)} + return newQStaticPlugin((*C.QStaticPlugin)(h)) } func (this *QStaticPlugin) MetaData() *QJsonObject { @@ -147,24 +141,19 @@ func newQPluginMetaData__Header(h *C.QPluginMetaData__Header) *QPluginMetaData__ if h == nil { return nil } + return &QPluginMetaData__Header{h: h} } // UnsafeNewQPluginMetaData__Header constructs the type using only unsafe pointers. func UnsafeNewQPluginMetaData__Header(h unsafe.Pointer) *QPluginMetaData__Header { - if h == nil { - return nil - } - - return &QPluginMetaData__Header{h: (*C.QPluginMetaData__Header)(h)} + return newQPluginMetaData__Header((*C.QPluginMetaData__Header)(h)) } // NewQPluginMetaData__Header constructs a new QPluginMetaData::Header object. func NewQPluginMetaData__Header(param1 *QPluginMetaData__Header) *QPluginMetaData__Header { - var outptr_QPluginMetaData__Header *C.QPluginMetaData__Header = nil - C.QPluginMetaData__Header_new(param1.cPointer(), &outptr_QPluginMetaData__Header) - ret := newQPluginMetaData__Header(outptr_QPluginMetaData__Header) + ret := newQPluginMetaData__Header(C.QPluginMetaData__Header_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -207,24 +196,19 @@ func newQPluginMetaData__MagicHeader(h *C.QPluginMetaData__MagicHeader) *QPlugin if h == nil { return nil } + return &QPluginMetaData__MagicHeader{h: h} } // UnsafeNewQPluginMetaData__MagicHeader constructs the type using only unsafe pointers. func UnsafeNewQPluginMetaData__MagicHeader(h unsafe.Pointer) *QPluginMetaData__MagicHeader { - if h == nil { - return nil - } - - return &QPluginMetaData__MagicHeader{h: (*C.QPluginMetaData__MagicHeader)(h)} + return newQPluginMetaData__MagicHeader((*C.QPluginMetaData__MagicHeader)(h)) } // NewQPluginMetaData__MagicHeader constructs a new QPluginMetaData::MagicHeader object. func NewQPluginMetaData__MagicHeader() *QPluginMetaData__MagicHeader { - var outptr_QPluginMetaData__MagicHeader *C.QPluginMetaData__MagicHeader = nil - C.QPluginMetaData__MagicHeader_new(&outptr_QPluginMetaData__MagicHeader) - ret := newQPluginMetaData__MagicHeader(outptr_QPluginMetaData__MagicHeader) + ret := newQPluginMetaData__MagicHeader(C.QPluginMetaData__MagicHeader_new()) ret.isSubclass = true return ret } @@ -267,34 +251,27 @@ func newQPluginMetaData__ElfNoteHeader(h *C.QPluginMetaData__ElfNoteHeader) *QPl if h == nil { return nil } + return &QPluginMetaData__ElfNoteHeader{h: h} } // UnsafeNewQPluginMetaData__ElfNoteHeader constructs the type using only unsafe pointers. func UnsafeNewQPluginMetaData__ElfNoteHeader(h unsafe.Pointer) *QPluginMetaData__ElfNoteHeader { - if h == nil { - return nil - } - - return &QPluginMetaData__ElfNoteHeader{h: (*C.QPluginMetaData__ElfNoteHeader)(h)} + return newQPluginMetaData__ElfNoteHeader((*C.QPluginMetaData__ElfNoteHeader)(h)) } // NewQPluginMetaData__ElfNoteHeader constructs a new QPluginMetaData::ElfNoteHeader object. func NewQPluginMetaData__ElfNoteHeader(payloadSize uint) *QPluginMetaData__ElfNoteHeader { - var outptr_QPluginMetaData__ElfNoteHeader *C.QPluginMetaData__ElfNoteHeader = nil - C.QPluginMetaData__ElfNoteHeader_new((C.uint)(payloadSize), &outptr_QPluginMetaData__ElfNoteHeader) - ret := newQPluginMetaData__ElfNoteHeader(outptr_QPluginMetaData__ElfNoteHeader) + ret := newQPluginMetaData__ElfNoteHeader(C.QPluginMetaData__ElfNoteHeader_new((C.uint)(payloadSize))) ret.isSubclass = true return ret } // NewQPluginMetaData__ElfNoteHeader2 constructs a new QPluginMetaData::ElfNoteHeader object. func NewQPluginMetaData__ElfNoteHeader2(param1 *QPluginMetaData__ElfNoteHeader) *QPluginMetaData__ElfNoteHeader { - var outptr_QPluginMetaData__ElfNoteHeader *C.QPluginMetaData__ElfNoteHeader = nil - C.QPluginMetaData__ElfNoteHeader_new2(param1.cPointer(), &outptr_QPluginMetaData__ElfNoteHeader) - ret := newQPluginMetaData__ElfNoteHeader(outptr_QPluginMetaData__ElfNoteHeader) + ret := newQPluginMetaData__ElfNoteHeader(C.QPluginMetaData__ElfNoteHeader_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qplugin.h b/qt6/gen_qplugin.h index fa6f1eb7..707f27c8 100644 --- a/qt6/gen_qplugin.h +++ b/qt6/gen_qplugin.h @@ -48,14 +48,14 @@ void QPluginMetaData_Delete(QPluginMetaData* self, bool isSubclass); QJsonObject* QStaticPlugin_MetaData(const QStaticPlugin* self); void QStaticPlugin_Delete(QStaticPlugin* self, bool isSubclass); -void QPluginMetaData__Header_new(QPluginMetaData__Header* param1, QPluginMetaData__Header** outptr_QPluginMetaData__Header); +QPluginMetaData__Header* QPluginMetaData__Header_new(QPluginMetaData__Header* param1); void QPluginMetaData__Header_Delete(QPluginMetaData__Header* self, bool isSubclass); -void QPluginMetaData__MagicHeader_new(QPluginMetaData__MagicHeader** outptr_QPluginMetaData__MagicHeader); +QPluginMetaData__MagicHeader* QPluginMetaData__MagicHeader_new(); void QPluginMetaData__MagicHeader_Delete(QPluginMetaData__MagicHeader* self, bool isSubclass); -void QPluginMetaData__ElfNoteHeader_new(unsigned int payloadSize, QPluginMetaData__ElfNoteHeader** outptr_QPluginMetaData__ElfNoteHeader); -void QPluginMetaData__ElfNoteHeader_new2(QPluginMetaData__ElfNoteHeader* param1, QPluginMetaData__ElfNoteHeader** outptr_QPluginMetaData__ElfNoteHeader); +QPluginMetaData__ElfNoteHeader* QPluginMetaData__ElfNoteHeader_new(unsigned int payloadSize); +QPluginMetaData__ElfNoteHeader* QPluginMetaData__ElfNoteHeader_new2(QPluginMetaData__ElfNoteHeader* param1); void QPluginMetaData__ElfNoteHeader_Delete(QPluginMetaData__ElfNoteHeader* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qpluginloader.cpp b/qt6/gen_qpluginloader.cpp index 024cafaf..2ae9ec73 100644 --- a/qt6/gen_qpluginloader.cpp +++ b/qt6/gen_qpluginloader.cpp @@ -198,30 +198,26 @@ public: }; -void QPluginLoader_new(QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { - MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(); - *outptr_QPluginLoader = ret; - *outptr_QObject = static_cast(ret); +QPluginLoader* QPluginLoader_new() { + return new MiqtVirtualQPluginLoader(); } -void QPluginLoader_new2(struct miqt_string fileName, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { +QPluginLoader* QPluginLoader_new2(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(fileName_QString); - *outptr_QPluginLoader = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQPluginLoader(fileName_QString); } -void QPluginLoader_new3(QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { - MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(parent); - *outptr_QPluginLoader = ret; - *outptr_QObject = static_cast(ret); +QPluginLoader* QPluginLoader_new3(QObject* parent) { + return new MiqtVirtualQPluginLoader(parent); } -void QPluginLoader_new4(struct miqt_string fileName, QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject) { +QPluginLoader* QPluginLoader_new4(struct miqt_string fileName, QObject* parent) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQPluginLoader* ret = new MiqtVirtualQPluginLoader(fileName_QString, parent); - *outptr_QPluginLoader = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQPluginLoader(fileName_QString, parent); +} + +void QPluginLoader_virtbase(QPluginLoader* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QPluginLoader_MetaObject(const QPluginLoader* self) { diff --git a/qt6/gen_qpluginloader.go b/qt6/gen_qpluginloader.go index 48f7995d..e399348a 100644 --- a/qt6/gen_qpluginloader.go +++ b/qt6/gen_qpluginloader.go @@ -35,31 +35,26 @@ func (this *QPluginLoader) UnsafePointer() unsafe.Pointer { } // newQPluginLoader constructs the type using only CGO pointers. -func newQPluginLoader(h *C.QPluginLoader, h_QObject *C.QObject) *QPluginLoader { +func newQPluginLoader(h *C.QPluginLoader) *QPluginLoader { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QPluginLoader_virtbase(h, &outptr_QObject) + return &QPluginLoader{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQPluginLoader constructs the type using only unsafe pointers. -func UnsafeNewQPluginLoader(h unsafe.Pointer, h_QObject unsafe.Pointer) *QPluginLoader { - if h == nil { - return nil - } - - return &QPluginLoader{h: (*C.QPluginLoader)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQPluginLoader(h unsafe.Pointer) *QPluginLoader { + return newQPluginLoader((*C.QPluginLoader)(h)) } // NewQPluginLoader constructs a new QPluginLoader object. func NewQPluginLoader() *QPluginLoader { - var outptr_QPluginLoader *C.QPluginLoader = nil - var outptr_QObject *C.QObject = nil - C.QPluginLoader_new(&outptr_QPluginLoader, &outptr_QObject) - ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret := newQPluginLoader(C.QPluginLoader_new()) ret.isSubclass = true return ret } @@ -70,22 +65,16 @@ func NewQPluginLoader2(fileName string) *QPluginLoader { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QPluginLoader *C.QPluginLoader = nil - var outptr_QObject *C.QObject = nil - C.QPluginLoader_new2(fileName_ms, &outptr_QPluginLoader, &outptr_QObject) - ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret := newQPluginLoader(C.QPluginLoader_new2(fileName_ms)) ret.isSubclass = true return ret } // NewQPluginLoader3 constructs a new QPluginLoader object. func NewQPluginLoader3(parent *QObject) *QPluginLoader { - var outptr_QPluginLoader *C.QPluginLoader = nil - var outptr_QObject *C.QObject = nil - C.QPluginLoader_new3(parent.cPointer(), &outptr_QPluginLoader, &outptr_QObject) - ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret := newQPluginLoader(C.QPluginLoader_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -96,11 +85,8 @@ func NewQPluginLoader4(fileName string, parent *QObject) *QPluginLoader { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QPluginLoader *C.QPluginLoader = nil - var outptr_QObject *C.QObject = nil - C.QPluginLoader_new4(fileName_ms, parent.cPointer(), &outptr_QPluginLoader, &outptr_QObject) - ret := newQPluginLoader(outptr_QPluginLoader, outptr_QObject) + ret := newQPluginLoader(C.QPluginLoader_new4(fileName_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -298,7 +284,7 @@ func miqt_exec_callback_QPluginLoader_TimerEvent(self *C.QPluginLoader, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QPluginLoader{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -324,7 +310,7 @@ func miqt_exec_callback_QPluginLoader_ChildEvent(self *C.QPluginLoader, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QPluginLoader{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qpluginloader.h b/qt6/gen_qpluginloader.h index a22a13b3..87f8b978 100644 --- a/qt6/gen_qpluginloader.h +++ b/qt6/gen_qpluginloader.h @@ -36,10 +36,11 @@ typedef struct QStaticPlugin QStaticPlugin; typedef struct QTimerEvent QTimerEvent; #endif -void QPluginLoader_new(QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); -void QPluginLoader_new2(struct miqt_string fileName, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); -void QPluginLoader_new3(QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); -void QPluginLoader_new4(struct miqt_string fileName, QObject* parent, QPluginLoader** outptr_QPluginLoader, QObject** outptr_QObject); +QPluginLoader* QPluginLoader_new(); +QPluginLoader* QPluginLoader_new2(struct miqt_string fileName); +QPluginLoader* QPluginLoader_new3(QObject* parent); +QPluginLoader* QPluginLoader_new4(struct miqt_string fileName, QObject* parent); +void QPluginLoader_virtbase(QPluginLoader* src, QObject** outptr_QObject); QMetaObject* QPluginLoader_MetaObject(const QPluginLoader* self); void* QPluginLoader_Metacast(QPluginLoader* self, const char* param1); struct miqt_string QPluginLoader_Tr(const char* s); diff --git a/qt6/gen_qpoint.cpp b/qt6/gen_qpoint.cpp index 60a83951..f9f44223 100644 --- a/qt6/gen_qpoint.cpp +++ b/qt6/gen_qpoint.cpp @@ -4,19 +4,16 @@ #include "gen_qpoint.h" #include "_cgo_export.h" -void QPoint_new(QPoint** outptr_QPoint) { - QPoint* ret = new QPoint(); - *outptr_QPoint = ret; +QPoint* QPoint_new() { + return new QPoint(); } -void QPoint_new2(int xpos, int ypos, QPoint** outptr_QPoint) { - QPoint* ret = new QPoint(static_cast(xpos), static_cast(ypos)); - *outptr_QPoint = ret; +QPoint* QPoint_new2(int xpos, int ypos) { + return new QPoint(static_cast(xpos), static_cast(ypos)); } -void QPoint_new3(QPoint* param1, QPoint** outptr_QPoint) { - QPoint* ret = new QPoint(*param1); - *outptr_QPoint = ret; +QPoint* QPoint_new3(QPoint* param1) { + return new QPoint(*param1); } bool QPoint_IsNull(const QPoint* self) { @@ -99,24 +96,20 @@ void QPoint_Delete(QPoint* self, bool isSubclass) { } } -void QPointF_new(QPointF** outptr_QPointF) { - QPointF* ret = new QPointF(); - *outptr_QPointF = ret; +QPointF* QPointF_new() { + return new QPointF(); } -void QPointF_new2(QPoint* p, QPointF** outptr_QPointF) { - QPointF* ret = new QPointF(*p); - *outptr_QPointF = ret; +QPointF* QPointF_new2(QPoint* p) { + return new QPointF(*p); } -void QPointF_new3(double xpos, double ypos, QPointF** outptr_QPointF) { - QPointF* ret = new QPointF(static_cast(xpos), static_cast(ypos)); - *outptr_QPointF = ret; +QPointF* QPointF_new3(double xpos, double ypos) { + return new QPointF(static_cast(xpos), static_cast(ypos)); } -void QPointF_new4(QPointF* param1, QPointF** outptr_QPointF) { - QPointF* ret = new QPointF(*param1); - *outptr_QPointF = ret; +QPointF* QPointF_new4(QPointF* param1) { + return new QPointF(*param1); } double QPointF_ManhattanLength(const QPointF* self) { diff --git a/qt6/gen_qpoint.go b/qt6/gen_qpoint.go index 91f5d7fd..d17606d3 100644 --- a/qt6/gen_qpoint.go +++ b/qt6/gen_qpoint.go @@ -37,44 +37,35 @@ func newQPoint(h *C.QPoint) *QPoint { if h == nil { return nil } + return &QPoint{h: h} } // UnsafeNewQPoint constructs the type using only unsafe pointers. func UnsafeNewQPoint(h unsafe.Pointer) *QPoint { - if h == nil { - return nil - } - - return &QPoint{h: (*C.QPoint)(h)} + return newQPoint((*C.QPoint)(h)) } // NewQPoint constructs a new QPoint object. func NewQPoint() *QPoint { - var outptr_QPoint *C.QPoint = nil - C.QPoint_new(&outptr_QPoint) - ret := newQPoint(outptr_QPoint) + ret := newQPoint(C.QPoint_new()) ret.isSubclass = true return ret } // NewQPoint2 constructs a new QPoint object. func NewQPoint2(xpos int, ypos int) *QPoint { - var outptr_QPoint *C.QPoint = nil - C.QPoint_new2((C.int)(xpos), (C.int)(ypos), &outptr_QPoint) - ret := newQPoint(outptr_QPoint) + ret := newQPoint(C.QPoint_new2((C.int)(xpos), (C.int)(ypos))) ret.isSubclass = true return ret } // NewQPoint3 constructs a new QPoint object. func NewQPoint3(param1 *QPoint) *QPoint { - var outptr_QPoint *C.QPoint = nil - C.QPoint_new3(param1.cPointer(), &outptr_QPoint) - ret := newQPoint(outptr_QPoint) + ret := newQPoint(C.QPoint_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -181,54 +172,43 @@ func newQPointF(h *C.QPointF) *QPointF { if h == nil { return nil } + return &QPointF{h: h} } // UnsafeNewQPointF constructs the type using only unsafe pointers. func UnsafeNewQPointF(h unsafe.Pointer) *QPointF { - if h == nil { - return nil - } - - return &QPointF{h: (*C.QPointF)(h)} + return newQPointF((*C.QPointF)(h)) } // NewQPointF constructs a new QPointF object. func NewQPointF() *QPointF { - var outptr_QPointF *C.QPointF = nil - C.QPointF_new(&outptr_QPointF) - ret := newQPointF(outptr_QPointF) + ret := newQPointF(C.QPointF_new()) ret.isSubclass = true return ret } // NewQPointF2 constructs a new QPointF object. func NewQPointF2(p *QPoint) *QPointF { - var outptr_QPointF *C.QPointF = nil - C.QPointF_new2(p.cPointer(), &outptr_QPointF) - ret := newQPointF(outptr_QPointF) + ret := newQPointF(C.QPointF_new2(p.cPointer())) ret.isSubclass = true return ret } // NewQPointF3 constructs a new QPointF object. func NewQPointF3(xpos float64, ypos float64) *QPointF { - var outptr_QPointF *C.QPointF = nil - C.QPointF_new3((C.double)(xpos), (C.double)(ypos), &outptr_QPointF) - ret := newQPointF(outptr_QPointF) + ret := newQPointF(C.QPointF_new3((C.double)(xpos), (C.double)(ypos))) ret.isSubclass = true return ret } // NewQPointF4 constructs a new QPointF object. func NewQPointF4(param1 *QPointF) *QPointF { - var outptr_QPointF *C.QPointF = nil - C.QPointF_new4(param1.cPointer(), &outptr_QPointF) - ret := newQPointF(outptr_QPointF) + ret := newQPointF(C.QPointF_new4(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qpoint.h b/qt6/gen_qpoint.h index 4d9c1e99..97ed0c8a 100644 --- a/qt6/gen_qpoint.h +++ b/qt6/gen_qpoint.h @@ -22,9 +22,9 @@ typedef struct QPoint QPoint; typedef struct QPointF QPointF; #endif -void QPoint_new(QPoint** outptr_QPoint); -void QPoint_new2(int xpos, int ypos, QPoint** outptr_QPoint); -void QPoint_new3(QPoint* param1, QPoint** outptr_QPoint); +QPoint* QPoint_new(); +QPoint* QPoint_new2(int xpos, int ypos); +QPoint* QPoint_new3(QPoint* param1); bool QPoint_IsNull(const QPoint* self); int QPoint_X(const QPoint* self); int QPoint_Y(const QPoint* self); @@ -42,10 +42,10 @@ int QPoint_DotProduct(QPoint* p1, QPoint* p2); QPointF* QPoint_ToPointF(const QPoint* self); void QPoint_Delete(QPoint* self, bool isSubclass); -void QPointF_new(QPointF** outptr_QPointF); -void QPointF_new2(QPoint* p, QPointF** outptr_QPointF); -void QPointF_new3(double xpos, double ypos, QPointF** outptr_QPointF); -void QPointF_new4(QPointF* param1, QPointF** outptr_QPointF); +QPointF* QPointF_new(); +QPointF* QPointF_new2(QPoint* p); +QPointF* QPointF_new3(double xpos, double ypos); +QPointF* QPointF_new4(QPointF* param1); double QPointF_ManhattanLength(const QPointF* self); bool QPointF_IsNull(const QPointF* self); double QPointF_X(const QPointF* self); diff --git a/qt6/gen_qpointingdevice.cpp b/qt6/gen_qpointingdevice.cpp index 0214918d..1f95297b 100644 --- a/qt6/gen_qpointingdevice.cpp +++ b/qt6/gen_qpointingdevice.cpp @@ -12,14 +12,12 @@ #include "gen_qpointingdevice.h" #include "_cgo_export.h" -void QPointingDeviceUniqueId_new(QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId) { - QPointingDeviceUniqueId* ret = new QPointingDeviceUniqueId(); - *outptr_QPointingDeviceUniqueId = ret; +QPointingDeviceUniqueId* QPointingDeviceUniqueId_new() { + return new QPointingDeviceUniqueId(); } -void QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1, QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId) { - QPointingDeviceUniqueId* ret = new QPointingDeviceUniqueId(*param1); - *outptr_QPointingDeviceUniqueId = ret; +QPointingDeviceUniqueId* QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1) { + return new QPointingDeviceUniqueId(*param1); } QPointingDeviceUniqueId* QPointingDeviceUniqueId_FromNumericId(long long id) { @@ -43,53 +41,39 @@ void QPointingDeviceUniqueId_Delete(QPointingDeviceUniqueId* self, bool isSubcla } } -void QPointingDevice_new(QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { - QPointingDevice* ret = new QPointingDevice(); - *outptr_QPointingDevice = ret; - *outptr_QInputDevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPointingDevice* QPointingDevice_new() { + return new QPointingDevice(); } -void QPointingDevice_new2(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { +QPointingDevice* QPointingDevice_new2(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount) { QString name_QString = QString::fromUtf8(name.data, name.len); - QPointingDevice* ret = new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount)); - *outptr_QPointingDevice = ret; - *outptr_QInputDevice = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount)); } -void QPointingDevice_new3(QObject* parent, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { - QPointingDevice* ret = new QPointingDevice(parent); - *outptr_QPointingDevice = ret; - *outptr_QInputDevice = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPointingDevice* QPointingDevice_new3(QObject* parent) { + return new QPointingDevice(parent); } -void QPointingDevice_new4(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { +QPointingDevice* QPointingDevice_new4(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName) { QString name_QString = QString::fromUtf8(name.data, name.len); QString seatName_QString = QString::fromUtf8(seatName.data, seatName.len); - QPointingDevice* ret = new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount), seatName_QString); - *outptr_QPointingDevice = ret; - *outptr_QInputDevice = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount), seatName_QString); } -void QPointingDevice_new5(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { +QPointingDevice* QPointingDevice_new5(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId) { QString name_QString = QString::fromUtf8(name.data, name.len); QString seatName_QString = QString::fromUtf8(seatName.data, seatName.len); - QPointingDevice* ret = new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount), seatName_QString, *uniqueId); - *outptr_QPointingDevice = ret; - *outptr_QInputDevice = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount), seatName_QString, *uniqueId); } -void QPointingDevice_new6(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId, QObject* parent, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject) { +QPointingDevice* QPointingDevice_new6(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId, QObject* parent) { QString name_QString = QString::fromUtf8(name.data, name.len); QString seatName_QString = QString::fromUtf8(seatName.data, seatName.len); - QPointingDevice* ret = new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount), seatName_QString, *uniqueId, parent); - *outptr_QPointingDevice = ret; - *outptr_QInputDevice = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new QPointingDevice(name_QString, static_cast(systemId), static_cast(devType), static_cast(pType), static_cast(caps), static_cast(maxPoints), static_cast(buttonCount), seatName_QString, *uniqueId, parent); +} + +void QPointingDevice_virtbase(QPointingDevice* src, QInputDevice** outptr_QInputDevice) { + *outptr_QInputDevice = static_cast(src); } QMetaObject* QPointingDevice_MetaObject(const QPointingDevice* self) { diff --git a/qt6/gen_qpointingdevice.go b/qt6/gen_qpointingdevice.go index 1a714e61..5488c17c 100644 --- a/qt6/gen_qpointingdevice.go +++ b/qt6/gen_qpointingdevice.go @@ -62,34 +62,27 @@ func newQPointingDeviceUniqueId(h *C.QPointingDeviceUniqueId) *QPointingDeviceUn if h == nil { return nil } + return &QPointingDeviceUniqueId{h: h} } // UnsafeNewQPointingDeviceUniqueId constructs the type using only unsafe pointers. func UnsafeNewQPointingDeviceUniqueId(h unsafe.Pointer) *QPointingDeviceUniqueId { - if h == nil { - return nil - } - - return &QPointingDeviceUniqueId{h: (*C.QPointingDeviceUniqueId)(h)} + return newQPointingDeviceUniqueId((*C.QPointingDeviceUniqueId)(h)) } // NewQPointingDeviceUniqueId constructs a new QPointingDeviceUniqueId object. func NewQPointingDeviceUniqueId() *QPointingDeviceUniqueId { - var outptr_QPointingDeviceUniqueId *C.QPointingDeviceUniqueId = nil - C.QPointingDeviceUniqueId_new(&outptr_QPointingDeviceUniqueId) - ret := newQPointingDeviceUniqueId(outptr_QPointingDeviceUniqueId) + ret := newQPointingDeviceUniqueId(C.QPointingDeviceUniqueId_new()) ret.isSubclass = true return ret } // NewQPointingDeviceUniqueId2 constructs a new QPointingDeviceUniqueId object. func NewQPointingDeviceUniqueId2(param1 *QPointingDeviceUniqueId) *QPointingDeviceUniqueId { - var outptr_QPointingDeviceUniqueId *C.QPointingDeviceUniqueId = nil - C.QPointingDeviceUniqueId_new2(param1.cPointer(), &outptr_QPointingDeviceUniqueId) - ret := newQPointingDeviceUniqueId(outptr_QPointingDeviceUniqueId) + ret := newQPointingDeviceUniqueId(C.QPointingDeviceUniqueId_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -143,32 +136,26 @@ func (this *QPointingDevice) UnsafePointer() unsafe.Pointer { } // newQPointingDevice constructs the type using only CGO pointers. -func newQPointingDevice(h *C.QPointingDevice, h_QInputDevice *C.QInputDevice, h_QObject *C.QObject) *QPointingDevice { +func newQPointingDevice(h *C.QPointingDevice) *QPointingDevice { if h == nil { return nil } + var outptr_QInputDevice *C.QInputDevice = nil + C.QPointingDevice_virtbase(h, &outptr_QInputDevice) + return &QPointingDevice{h: h, - QInputDevice: newQInputDevice(h_QInputDevice, h_QObject)} + QInputDevice: newQInputDevice(outptr_QInputDevice)} } // UnsafeNewQPointingDevice constructs the type using only unsafe pointers. -func UnsafeNewQPointingDevice(h unsafe.Pointer, h_QInputDevice unsafe.Pointer, h_QObject unsafe.Pointer) *QPointingDevice { - if h == nil { - return nil - } - - return &QPointingDevice{h: (*C.QPointingDevice)(h), - QInputDevice: UnsafeNewQInputDevice(h_QInputDevice, h_QObject)} +func UnsafeNewQPointingDevice(h unsafe.Pointer) *QPointingDevice { + return newQPointingDevice((*C.QPointingDevice)(h)) } // NewQPointingDevice constructs a new QPointingDevice object. func NewQPointingDevice() *QPointingDevice { - var outptr_QPointingDevice *C.QPointingDevice = nil - var outptr_QInputDevice *C.QInputDevice = nil - var outptr_QObject *C.QObject = nil - C.QPointingDevice_new(&outptr_QPointingDevice, &outptr_QInputDevice, &outptr_QObject) - ret := newQPointingDevice(outptr_QPointingDevice, outptr_QInputDevice, outptr_QObject) + ret := newQPointingDevice(C.QPointingDevice_new()) ret.isSubclass = true return ret } @@ -179,24 +166,16 @@ func NewQPointingDevice2(name string, systemId int64, devType QInputDevice__Devi name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QPointingDevice *C.QPointingDevice = nil - var outptr_QInputDevice *C.QInputDevice = nil - var outptr_QObject *C.QObject = nil - C.QPointingDevice_new2(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount), &outptr_QPointingDevice, &outptr_QInputDevice, &outptr_QObject) - ret := newQPointingDevice(outptr_QPointingDevice, outptr_QInputDevice, outptr_QObject) + ret := newQPointingDevice(C.QPointingDevice_new2(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount))) ret.isSubclass = true return ret } // NewQPointingDevice3 constructs a new QPointingDevice object. func NewQPointingDevice3(parent *QObject) *QPointingDevice { - var outptr_QPointingDevice *C.QPointingDevice = nil - var outptr_QInputDevice *C.QInputDevice = nil - var outptr_QObject *C.QObject = nil - C.QPointingDevice_new3(parent.cPointer(), &outptr_QPointingDevice, &outptr_QInputDevice, &outptr_QObject) - ret := newQPointingDevice(outptr_QPointingDevice, outptr_QInputDevice, outptr_QObject) + ret := newQPointingDevice(C.QPointingDevice_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -211,12 +190,8 @@ func NewQPointingDevice4(name string, systemId int64, devType QInputDevice__Devi seatName_ms.data = C.CString(seatName) seatName_ms.len = C.size_t(len(seatName)) defer C.free(unsafe.Pointer(seatName_ms.data)) - var outptr_QPointingDevice *C.QPointingDevice = nil - var outptr_QInputDevice *C.QInputDevice = nil - var outptr_QObject *C.QObject = nil - C.QPointingDevice_new4(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount), seatName_ms, &outptr_QPointingDevice, &outptr_QInputDevice, &outptr_QObject) - ret := newQPointingDevice(outptr_QPointingDevice, outptr_QInputDevice, outptr_QObject) + ret := newQPointingDevice(C.QPointingDevice_new4(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount), seatName_ms)) ret.isSubclass = true return ret } @@ -231,12 +206,8 @@ func NewQPointingDevice5(name string, systemId int64, devType QInputDevice__Devi seatName_ms.data = C.CString(seatName) seatName_ms.len = C.size_t(len(seatName)) defer C.free(unsafe.Pointer(seatName_ms.data)) - var outptr_QPointingDevice *C.QPointingDevice = nil - var outptr_QInputDevice *C.QInputDevice = nil - var outptr_QObject *C.QObject = nil - C.QPointingDevice_new5(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount), seatName_ms, uniqueId.cPointer(), &outptr_QPointingDevice, &outptr_QInputDevice, &outptr_QObject) - ret := newQPointingDevice(outptr_QPointingDevice, outptr_QInputDevice, outptr_QObject) + ret := newQPointingDevice(C.QPointingDevice_new5(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount), seatName_ms, uniqueId.cPointer())) ret.isSubclass = true return ret } @@ -251,12 +222,8 @@ func NewQPointingDevice6(name string, systemId int64, devType QInputDevice__Devi seatName_ms.data = C.CString(seatName) seatName_ms.len = C.size_t(len(seatName)) defer C.free(unsafe.Pointer(seatName_ms.data)) - var outptr_QPointingDevice *C.QPointingDevice = nil - var outptr_QInputDevice *C.QInputDevice = nil - var outptr_QObject *C.QObject = nil - C.QPointingDevice_new6(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount), seatName_ms, uniqueId.cPointer(), parent.cPointer(), &outptr_QPointingDevice, &outptr_QInputDevice, &outptr_QObject) - ret := newQPointingDevice(outptr_QPointingDevice, outptr_QInputDevice, outptr_QObject) + ret := newQPointingDevice(C.QPointingDevice_new6(name_ms, (C.longlong)(systemId), (C.int)(devType), (C.int)(pType), (C.int)(caps), (C.int)(maxPoints), (C.int)(buttonCount), seatName_ms, uniqueId.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -311,7 +278,7 @@ func (this *QPointingDevice) UniqueId() *QPointingDeviceUniqueId { } func QPointingDevice_PrimaryPointingDevice() *QPointingDevice { - return newQPointingDevice(C.QPointingDevice_PrimaryPointingDevice(), nil, nil) + return newQPointingDevice(C.QPointingDevice_PrimaryPointingDevice()) } func (this *QPointingDevice) OperatorEqual(other *QPointingDevice) bool { @@ -337,7 +304,7 @@ func miqt_exec_callback_QPointingDevice_GrabChanged(cb C.intptr_t, grabber *C.QO slotval2 := (QPointingDevice__GrabTransition)(transition) - slotval3 := newQPointerEvent(event, nil, nil) + slotval3 := newQPointerEvent(event) slotval4 := newQEventPoint(point) @@ -371,7 +338,7 @@ func QPointingDevice_PrimaryPointingDevice1(seatName string) *QPointingDevice { seatName_ms.data = C.CString(seatName) seatName_ms.len = C.size_t(len(seatName)) defer C.free(unsafe.Pointer(seatName_ms.data)) - return newQPointingDevice(C.QPointingDevice_PrimaryPointingDevice1(seatName_ms), nil, nil) + return newQPointingDevice(C.QPointingDevice_PrimaryPointingDevice1(seatName_ms)) } // Delete this object from C++ memory. diff --git a/qt6/gen_qpointingdevice.h b/qt6/gen_qpointingdevice.h index 8c412f59..9da1eb46 100644 --- a/qt6/gen_qpointingdevice.h +++ b/qt6/gen_qpointingdevice.h @@ -32,19 +32,20 @@ typedef struct QPointingDevice QPointingDevice; typedef struct QPointingDeviceUniqueId QPointingDeviceUniqueId; #endif -void QPointingDeviceUniqueId_new(QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId); -void QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1, QPointingDeviceUniqueId** outptr_QPointingDeviceUniqueId); +QPointingDeviceUniqueId* QPointingDeviceUniqueId_new(); +QPointingDeviceUniqueId* QPointingDeviceUniqueId_new2(QPointingDeviceUniqueId* param1); QPointingDeviceUniqueId* QPointingDeviceUniqueId_FromNumericId(long long id); bool QPointingDeviceUniqueId_IsValid(const QPointingDeviceUniqueId* self); long long QPointingDeviceUniqueId_NumericId(const QPointingDeviceUniqueId* self); void QPointingDeviceUniqueId_Delete(QPointingDeviceUniqueId* self, bool isSubclass); -void QPointingDevice_new(QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); -void QPointingDevice_new2(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); -void QPointingDevice_new3(QObject* parent, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); -void QPointingDevice_new4(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); -void QPointingDevice_new5(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); -void QPointingDevice_new6(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId, QObject* parent, QPointingDevice** outptr_QPointingDevice, QInputDevice** outptr_QInputDevice, QObject** outptr_QObject); +QPointingDevice* QPointingDevice_new(); +QPointingDevice* QPointingDevice_new2(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount); +QPointingDevice* QPointingDevice_new3(QObject* parent); +QPointingDevice* QPointingDevice_new4(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName); +QPointingDevice* QPointingDevice_new5(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId); +QPointingDevice* QPointingDevice_new6(struct miqt_string name, long long systemId, int devType, int pType, int caps, int maxPoints, int buttonCount, struct miqt_string seatName, QPointingDeviceUniqueId* uniqueId, QObject* parent); +void QPointingDevice_virtbase(QPointingDevice* src, QInputDevice** outptr_QInputDevice); QMetaObject* QPointingDevice_MetaObject(const QPointingDevice* self); void* QPointingDevice_Metacast(QPointingDevice* self, const char* param1); struct miqt_string QPointingDevice_Tr(const char* s); diff --git a/qt6/gen_qprocess.cpp b/qt6/gen_qprocess.cpp index 8db04d2e..6802a77d 100644 --- a/qt6/gen_qprocess.cpp +++ b/qt6/gen_qprocess.cpp @@ -13,19 +13,16 @@ #include "gen_qprocess.h" #include "_cgo_export.h" -void QProcessEnvironment_new(QProcessEnvironment** outptr_QProcessEnvironment) { - QProcessEnvironment* ret = new QProcessEnvironment(); - *outptr_QProcessEnvironment = ret; +QProcessEnvironment* QProcessEnvironment_new() { + return new QProcessEnvironment(); } -void QProcessEnvironment_new2(int param1, QProcessEnvironment** outptr_QProcessEnvironment) { - QProcessEnvironment* ret = new QProcessEnvironment(static_cast(param1)); - *outptr_QProcessEnvironment = ret; +QProcessEnvironment* QProcessEnvironment_new2(int param1) { + return new QProcessEnvironment(static_cast(param1)); } -void QProcessEnvironment_new3(QProcessEnvironment* other, QProcessEnvironment** outptr_QProcessEnvironment) { - QProcessEnvironment* ret = new QProcessEnvironment(*other); - *outptr_QProcessEnvironment = ret; +QProcessEnvironment* QProcessEnvironment_new3(QProcessEnvironment* other) { + return new QProcessEnvironment(*other); } void QProcessEnvironment_OperatorAssign(QProcessEnvironment* self, QProcessEnvironment* other) { @@ -563,20 +560,16 @@ public: }; -void QProcess_new(QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQProcess* ret = new MiqtVirtualQProcess(); - *outptr_QProcess = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QProcess* QProcess_new() { + return new MiqtVirtualQProcess(); } -void QProcess_new2(QObject* parent, QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQProcess* ret = new MiqtVirtualQProcess(parent); - *outptr_QProcess = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QProcess* QProcess_new2(QObject* parent) { + return new MiqtVirtualQProcess(parent); +} + +void QProcess_virtbase(QProcess* src, QIODevice** outptr_QIODevice) { + *outptr_QIODevice = static_cast(src); } QMetaObject* QProcess_MetaObject(const QProcess* self) { diff --git a/qt6/gen_qprocess.go b/qt6/gen_qprocess.go index 5a466c7c..1c4d8e3e 100644 --- a/qt6/gen_qprocess.go +++ b/qt6/gen_qprocess.go @@ -94,44 +94,35 @@ func newQProcessEnvironment(h *C.QProcessEnvironment) *QProcessEnvironment { if h == nil { return nil } + return &QProcessEnvironment{h: h} } // UnsafeNewQProcessEnvironment constructs the type using only unsafe pointers. func UnsafeNewQProcessEnvironment(h unsafe.Pointer) *QProcessEnvironment { - if h == nil { - return nil - } - - return &QProcessEnvironment{h: (*C.QProcessEnvironment)(h)} + return newQProcessEnvironment((*C.QProcessEnvironment)(h)) } // NewQProcessEnvironment constructs a new QProcessEnvironment object. func NewQProcessEnvironment() *QProcessEnvironment { - var outptr_QProcessEnvironment *C.QProcessEnvironment = nil - C.QProcessEnvironment_new(&outptr_QProcessEnvironment) - ret := newQProcessEnvironment(outptr_QProcessEnvironment) + ret := newQProcessEnvironment(C.QProcessEnvironment_new()) ret.isSubclass = true return ret } // NewQProcessEnvironment2 constructs a new QProcessEnvironment object. func NewQProcessEnvironment2(param1 QProcessEnvironment__Initialization) *QProcessEnvironment { - var outptr_QProcessEnvironment *C.QProcessEnvironment = nil - C.QProcessEnvironment_new2((C.int)(param1), &outptr_QProcessEnvironment) - ret := newQProcessEnvironment(outptr_QProcessEnvironment) + ret := newQProcessEnvironment(C.QProcessEnvironment_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQProcessEnvironment3 constructs a new QProcessEnvironment object. func NewQProcessEnvironment3(other *QProcessEnvironment) *QProcessEnvironment { - var outptr_QProcessEnvironment *C.QProcessEnvironment = nil - C.QProcessEnvironment_new3(other.cPointer(), &outptr_QProcessEnvironment) - ret := newQProcessEnvironment(outptr_QProcessEnvironment) + ret := newQProcessEnvironment(C.QProcessEnvironment_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -289,46 +280,34 @@ func (this *QProcess) UnsafePointer() unsafe.Pointer { } // newQProcess constructs the type using only CGO pointers. -func newQProcess(h *C.QProcess, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QProcess { +func newQProcess(h *C.QProcess) *QProcess { if h == nil { return nil } + var outptr_QIODevice *C.QIODevice = nil + C.QProcess_virtbase(h, &outptr_QIODevice) + return &QProcess{h: h, - QIODevice: newQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} + QIODevice: newQIODevice(outptr_QIODevice)} } // UnsafeNewQProcess constructs the type using only unsafe pointers. -func UnsafeNewQProcess(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QProcess { - if h == nil { - return nil - } - - return &QProcess{h: (*C.QProcess)(h), - QIODevice: UnsafeNewQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} +func UnsafeNewQProcess(h unsafe.Pointer) *QProcess { + return newQProcess((*C.QProcess)(h)) } // NewQProcess constructs a new QProcess object. func NewQProcess() *QProcess { - var outptr_QProcess *C.QProcess = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QProcess_new(&outptr_QProcess, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQProcess(outptr_QProcess, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQProcess(C.QProcess_new()) ret.isSubclass = true return ret } // NewQProcess2 constructs a new QProcess object. func NewQProcess2(parent *QObject) *QProcess { - var outptr_QProcess *C.QProcess = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QProcess_new2(parent.cPointer(), &outptr_QProcess, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQProcess(outptr_QProcess, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQProcess(C.QProcess_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qprocess.h b/qt6/gen_qprocess.h index c2c39b56..81622407 100644 --- a/qt6/gen_qprocess.h +++ b/qt6/gen_qprocess.h @@ -30,9 +30,9 @@ typedef struct QProcess QProcess; typedef struct QProcessEnvironment QProcessEnvironment; #endif -void QProcessEnvironment_new(QProcessEnvironment** outptr_QProcessEnvironment); -void QProcessEnvironment_new2(int param1, QProcessEnvironment** outptr_QProcessEnvironment); -void QProcessEnvironment_new3(QProcessEnvironment* other, QProcessEnvironment** outptr_QProcessEnvironment); +QProcessEnvironment* QProcessEnvironment_new(); +QProcessEnvironment* QProcessEnvironment_new2(int param1); +QProcessEnvironment* QProcessEnvironment_new3(QProcessEnvironment* other); void QProcessEnvironment_OperatorAssign(QProcessEnvironment* self, QProcessEnvironment* other); void QProcessEnvironment_Swap(QProcessEnvironment* self, QProcessEnvironment* other); bool QProcessEnvironment_OperatorEqual(const QProcessEnvironment* self, QProcessEnvironment* other); @@ -51,8 +51,9 @@ QProcessEnvironment* QProcessEnvironment_SystemEnvironment(); struct miqt_string QProcessEnvironment_Value2(const QProcessEnvironment* self, struct miqt_string name, struct miqt_string defaultValue); void QProcessEnvironment_Delete(QProcessEnvironment* self, bool isSubclass); -void QProcess_new(QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QProcess_new2(QObject* parent, QProcess** outptr_QProcess, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +QProcess* QProcess_new(); +QProcess* QProcess_new2(QObject* parent); +void QProcess_virtbase(QProcess* src, QIODevice** outptr_QIODevice); QMetaObject* QProcess_MetaObject(const QProcess* self); void* QProcess_Metacast(QProcess* self, const char* param1); struct miqt_string QProcess_Tr(const char* s); diff --git a/qt6/gen_qprogressbar.cpp b/qt6/gen_qprogressbar.cpp index 626fb4cc..e0520018 100644 --- a/qt6/gen_qprogressbar.cpp +++ b/qt6/gen_qprogressbar.cpp @@ -1077,20 +1077,16 @@ public: }; -void QProgressBar_new(QWidget* parent, QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQProgressBar* ret = new MiqtVirtualQProgressBar(parent); - *outptr_QProgressBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QProgressBar* QProgressBar_new(QWidget* parent) { + return new MiqtVirtualQProgressBar(parent); } -void QProgressBar_new2(QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQProgressBar* ret = new MiqtVirtualQProgressBar(); - *outptr_QProgressBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QProgressBar* QProgressBar_new2() { + return new MiqtVirtualQProgressBar(); +} + +void QProgressBar_virtbase(QProgressBar* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QProgressBar_MetaObject(const QProgressBar* self) { diff --git a/qt6/gen_qprogressbar.go b/qt6/gen_qprogressbar.go index a973d354..b8511cd0 100644 --- a/qt6/gen_qprogressbar.go +++ b/qt6/gen_qprogressbar.go @@ -42,46 +42,34 @@ func (this *QProgressBar) UnsafePointer() unsafe.Pointer { } // newQProgressBar constructs the type using only CGO pointers. -func newQProgressBar(h *C.QProgressBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QProgressBar { +func newQProgressBar(h *C.QProgressBar) *QProgressBar { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QProgressBar_virtbase(h, &outptr_QWidget) + return &QProgressBar{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQProgressBar constructs the type using only unsafe pointers. -func UnsafeNewQProgressBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QProgressBar { - if h == nil { - return nil - } - - return &QProgressBar{h: (*C.QProgressBar)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQProgressBar(h unsafe.Pointer) *QProgressBar { + return newQProgressBar((*C.QProgressBar)(h)) } // NewQProgressBar constructs a new QProgressBar object. func NewQProgressBar(parent *QWidget) *QProgressBar { - var outptr_QProgressBar *C.QProgressBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressBar_new(parent.cPointer(), &outptr_QProgressBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressBar(outptr_QProgressBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressBar(C.QProgressBar_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQProgressBar2 constructs a new QProgressBar object. func NewQProgressBar2() *QProgressBar { - var outptr_QProgressBar *C.QProgressBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressBar_new2(&outptr_QProgressBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressBar(outptr_QProgressBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressBar(C.QProgressBar_new2()) ret.isSubclass = true return ret } @@ -390,7 +378,7 @@ func miqt_exec_callback_QProgressBar_PaintEvent(self *C.QProgressBar, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QProgressBar{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -416,7 +404,7 @@ func miqt_exec_callback_QProgressBar_InitStyleOption(self *C.QProgressBar, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionProgressBar(option, nil) + slotval1 := newQStyleOptionProgressBar(option) gofunc((&QProgressBar{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -571,7 +559,7 @@ func miqt_exec_callback_QProgressBar_MousePressEvent(self *C.QProgressBar, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -597,7 +585,7 @@ func miqt_exec_callback_QProgressBar_MouseReleaseEvent(self *C.QProgressBar, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -623,7 +611,7 @@ func miqt_exec_callback_QProgressBar_MouseDoubleClickEvent(self *C.QProgressBar, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -649,7 +637,7 @@ func miqt_exec_callback_QProgressBar_MouseMoveEvent(self *C.QProgressBar, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -675,7 +663,7 @@ func miqt_exec_callback_QProgressBar_WheelEvent(self *C.QProgressBar, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -701,7 +689,7 @@ func miqt_exec_callback_QProgressBar_KeyPressEvent(self *C.QProgressBar, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -727,7 +715,7 @@ func miqt_exec_callback_QProgressBar_KeyReleaseEvent(self *C.QProgressBar, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -753,7 +741,7 @@ func miqt_exec_callback_QProgressBar_FocusInEvent(self *C.QProgressBar, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -779,7 +767,7 @@ func miqt_exec_callback_QProgressBar_FocusOutEvent(self *C.QProgressBar, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -805,7 +793,7 @@ func miqt_exec_callback_QProgressBar_EnterEvent(self *C.QProgressBar, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -857,7 +845,7 @@ func miqt_exec_callback_QProgressBar_MoveEvent(self *C.QProgressBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -883,7 +871,7 @@ func miqt_exec_callback_QProgressBar_ResizeEvent(self *C.QProgressBar, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -909,7 +897,7 @@ func miqt_exec_callback_QProgressBar_CloseEvent(self *C.QProgressBar, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -935,7 +923,7 @@ func miqt_exec_callback_QProgressBar_ContextMenuEvent(self *C.QProgressBar, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -961,7 +949,7 @@ func miqt_exec_callback_QProgressBar_TabletEvent(self *C.QProgressBar, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -987,7 +975,7 @@ func miqt_exec_callback_QProgressBar_ActionEvent(self *C.QProgressBar, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1013,7 +1001,7 @@ func miqt_exec_callback_QProgressBar_DragEnterEvent(self *C.QProgressBar, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1039,7 +1027,7 @@ func miqt_exec_callback_QProgressBar_DragMoveEvent(self *C.QProgressBar, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1065,7 +1053,7 @@ func miqt_exec_callback_QProgressBar_DragLeaveEvent(self *C.QProgressBar, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1091,7 +1079,7 @@ func miqt_exec_callback_QProgressBar_DropEvent(self *C.QProgressBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1117,7 +1105,7 @@ func miqt_exec_callback_QProgressBar_ShowEvent(self *C.QProgressBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1143,7 +1131,7 @@ func miqt_exec_callback_QProgressBar_HideEvent(self *C.QProgressBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QProgressBar{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1339,7 +1327,7 @@ func miqt_exec_callback_QProgressBar_InputMethodEvent(self *C.QProgressBar, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QProgressBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qprogressbar.h b/qt6/gen_qprogressbar.h index 4976692f..078f8e05 100644 --- a/qt6/gen_qprogressbar.h +++ b/qt6/gen_qprogressbar.h @@ -80,8 +80,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QProgressBar_new(QWidget* parent, QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QProgressBar_new2(QProgressBar** outptr_QProgressBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QProgressBar* QProgressBar_new(QWidget* parent); +QProgressBar* QProgressBar_new2(); +void QProgressBar_virtbase(QProgressBar* src, QWidget** outptr_QWidget); QMetaObject* QProgressBar_MetaObject(const QProgressBar* self); void* QProgressBar_Metacast(QProgressBar* self, const char* param1); struct miqt_string QProgressBar_Tr(const char* s); diff --git a/qt6/gen_qprogressdialog.cpp b/qt6/gen_qprogressdialog.cpp index a59c4d6e..786b5f5c 100644 --- a/qt6/gen_qprogressdialog.cpp +++ b/qt6/gen_qprogressdialog.cpp @@ -386,64 +386,38 @@ public: }; -void QProgressDialog_new(QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(parent); - *outptr_QProgressDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QProgressDialog* QProgressDialog_new(QWidget* parent) { + return new MiqtVirtualQProgressDialog(parent); } -void QProgressDialog_new2(QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(); - *outptr_QProgressDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QProgressDialog* QProgressDialog_new2() { + return new MiqtVirtualQProgressDialog(); } -void QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QProgressDialog* QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum) { QString labelText_QString = QString::fromUtf8(labelText.data, labelText.len); QString cancelButtonText_QString = QString::fromUtf8(cancelButtonText.data, cancelButtonText.len); - MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum)); - *outptr_QProgressDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum)); } -void QProgressDialog_new4(QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(parent, static_cast(flags)); - *outptr_QProgressDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QProgressDialog* QProgressDialog_new4(QWidget* parent, int flags) { + return new MiqtVirtualQProgressDialog(parent, static_cast(flags)); } -void QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QProgressDialog* QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent) { QString labelText_QString = QString::fromUtf8(labelText.data, labelText.len); QString cancelButtonText_QString = QString::fromUtf8(cancelButtonText.data, cancelButtonText.len); - MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent); - *outptr_QProgressDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent); } -void QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QProgressDialog* QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags) { QString labelText_QString = QString::fromUtf8(labelText.data, labelText.len); QString cancelButtonText_QString = QString::fromUtf8(cancelButtonText.data, cancelButtonText.len); - MiqtVirtualQProgressDialog* ret = new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent, static_cast(flags)); - *outptr_QProgressDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQProgressDialog(labelText_QString, cancelButtonText_QString, static_cast(minimum), static_cast(maximum), parent, static_cast(flags)); +} + +void QProgressDialog_virtbase(QProgressDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QProgressDialog_MetaObject(const QProgressDialog* self) { diff --git a/qt6/gen_qprogressdialog.go b/qt6/gen_qprogressdialog.go index 13985062..3b7e16f9 100644 --- a/qt6/gen_qprogressdialog.go +++ b/qt6/gen_qprogressdialog.go @@ -35,48 +35,34 @@ func (this *QProgressDialog) UnsafePointer() unsafe.Pointer { } // newQProgressDialog constructs the type using only CGO pointers. -func newQProgressDialog(h *C.QProgressDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QProgressDialog { +func newQProgressDialog(h *C.QProgressDialog) *QProgressDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QProgressDialog_virtbase(h, &outptr_QDialog) + return &QProgressDialog{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQProgressDialog constructs the type using only unsafe pointers. -func UnsafeNewQProgressDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QProgressDialog { - if h == nil { - return nil - } - - return &QProgressDialog{h: (*C.QProgressDialog)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQProgressDialog(h unsafe.Pointer) *QProgressDialog { + return newQProgressDialog((*C.QProgressDialog)(h)) } // NewQProgressDialog constructs a new QProgressDialog object. func NewQProgressDialog(parent *QWidget) *QProgressDialog { - var outptr_QProgressDialog *C.QProgressDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressDialog_new(parent.cPointer(), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressDialog(C.QProgressDialog_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQProgressDialog2 constructs a new QProgressDialog object. func NewQProgressDialog2() *QProgressDialog { - var outptr_QProgressDialog *C.QProgressDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressDialog_new2(&outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressDialog(C.QProgressDialog_new2()) ret.isSubclass = true return ret } @@ -91,28 +77,16 @@ func NewQProgressDialog3(labelText string, cancelButtonText string, minimum int, cancelButtonText_ms.data = C.CString(cancelButtonText) cancelButtonText_ms.len = C.size_t(len(cancelButtonText)) defer C.free(unsafe.Pointer(cancelButtonText_ms.data)) - var outptr_QProgressDialog *C.QProgressDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressDialog_new3(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressDialog(C.QProgressDialog_new3(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum))) ret.isSubclass = true return ret } // NewQProgressDialog4 constructs a new QProgressDialog object. func NewQProgressDialog4(parent *QWidget, flags WindowType) *QProgressDialog { - var outptr_QProgressDialog *C.QProgressDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressDialog_new4(parent.cPointer(), (C.int)(flags), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressDialog(C.QProgressDialog_new4(parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -127,14 +101,8 @@ func NewQProgressDialog5(labelText string, cancelButtonText string, minimum int, cancelButtonText_ms.data = C.CString(cancelButtonText) cancelButtonText_ms.len = C.size_t(len(cancelButtonText)) defer C.free(unsafe.Pointer(cancelButtonText_ms.data)) - var outptr_QProgressDialog *C.QProgressDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressDialog_new5(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer(), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressDialog(C.QProgressDialog_new5(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer())) ret.isSubclass = true return ret } @@ -149,14 +117,8 @@ func NewQProgressDialog6(labelText string, cancelButtonText string, minimum int, cancelButtonText_ms.data = C.CString(cancelButtonText) cancelButtonText_ms.len = C.size_t(len(cancelButtonText)) defer C.free(unsafe.Pointer(cancelButtonText_ms.data)) - var outptr_QProgressDialog *C.QProgressDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QProgressDialog_new6(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer(), (C.int)(flags), &outptr_QProgressDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQProgressDialog(outptr_QProgressDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQProgressDialog(C.QProgressDialog_new6(labelText_ms, cancelButtonText_ms, (C.int)(minimum), (C.int)(maximum), parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -371,7 +333,7 @@ func miqt_exec_callback_QProgressDialog_ResizeEvent(self *C.QProgressDialog, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QProgressDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -397,7 +359,7 @@ func miqt_exec_callback_QProgressDialog_CloseEvent(self *C.QProgressDialog, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QProgressDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -449,7 +411,7 @@ func miqt_exec_callback_QProgressDialog_ShowEvent(self *C.QProgressDialog, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QProgressDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -648,7 +610,7 @@ func miqt_exec_callback_QProgressDialog_KeyPressEvent(self *C.QProgressDialog, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QProgressDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -674,7 +636,7 @@ func miqt_exec_callback_QProgressDialog_ContextMenuEvent(self *C.QProgressDialog } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QProgressDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt6/gen_qprogressdialog.h b/qt6/gen_qprogressdialog.h index 4bc9c157..03b5f56b 100644 --- a/qt6/gen_qprogressdialog.h +++ b/qt6/gen_qprogressdialog.h @@ -50,12 +50,13 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QProgressDialog_new(QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QProgressDialog_new2(QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QProgressDialog_new4(QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags, QProgressDialog** outptr_QProgressDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QProgressDialog* QProgressDialog_new(QWidget* parent); +QProgressDialog* QProgressDialog_new2(); +QProgressDialog* QProgressDialog_new3(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum); +QProgressDialog* QProgressDialog_new4(QWidget* parent, int flags); +QProgressDialog* QProgressDialog_new5(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent); +QProgressDialog* QProgressDialog_new6(struct miqt_string labelText, struct miqt_string cancelButtonText, int minimum, int maximum, QWidget* parent, int flags); +void QProgressDialog_virtbase(QProgressDialog* src, QDialog** outptr_QDialog); QMetaObject* QProgressDialog_MetaObject(const QProgressDialog* self); void* QProgressDialog_Metacast(QProgressDialog* self, const char* param1); struct miqt_string QProgressDialog_Tr(const char* s); diff --git a/qt6/gen_qproperty.cpp b/qt6/gen_qproperty.cpp index f8dea8a9..958ef135 100644 --- a/qt6/gen_qproperty.cpp +++ b/qt6/gen_qproperty.cpp @@ -13,14 +13,12 @@ #include "gen_qproperty.h" #include "_cgo_export.h" -void QPropertyBindingSourceLocation_new(QPropertyBindingSourceLocation** outptr_QPropertyBindingSourceLocation) { - QPropertyBindingSourceLocation* ret = new QPropertyBindingSourceLocation(); - *outptr_QPropertyBindingSourceLocation = ret; +QPropertyBindingSourceLocation* QPropertyBindingSourceLocation_new() { + return new QPropertyBindingSourceLocation(); } -void QPropertyBindingSourceLocation_new2(QPropertyBindingSourceLocation* param1, QPropertyBindingSourceLocation** outptr_QPropertyBindingSourceLocation) { - QPropertyBindingSourceLocation* ret = new QPropertyBindingSourceLocation(*param1); - *outptr_QPropertyBindingSourceLocation = ret; +QPropertyBindingSourceLocation* QPropertyBindingSourceLocation_new2(QPropertyBindingSourceLocation* param1) { + return new QPropertyBindingSourceLocation(*param1); } void QPropertyBindingSourceLocation_Delete(QPropertyBindingSourceLocation* self, bool isSubclass) { @@ -31,25 +29,21 @@ void QPropertyBindingSourceLocation_Delete(QPropertyBindingSourceLocation* self, } } -void QPropertyBindingError_new(QPropertyBindingError** outptr_QPropertyBindingError) { - QPropertyBindingError* ret = new QPropertyBindingError(); - *outptr_QPropertyBindingError = ret; +QPropertyBindingError* QPropertyBindingError_new() { + return new QPropertyBindingError(); } -void QPropertyBindingError_new2(int typeVal, QPropertyBindingError** outptr_QPropertyBindingError) { - QPropertyBindingError* ret = new QPropertyBindingError(static_cast(typeVal)); - *outptr_QPropertyBindingError = ret; +QPropertyBindingError* QPropertyBindingError_new2(int typeVal) { + return new QPropertyBindingError(static_cast(typeVal)); } -void QPropertyBindingError_new3(QPropertyBindingError* other, QPropertyBindingError** outptr_QPropertyBindingError) { - QPropertyBindingError* ret = new QPropertyBindingError(*other); - *outptr_QPropertyBindingError = ret; +QPropertyBindingError* QPropertyBindingError_new3(QPropertyBindingError* other) { + return new QPropertyBindingError(*other); } -void QPropertyBindingError_new4(int typeVal, struct miqt_string description, QPropertyBindingError** outptr_QPropertyBindingError) { +QPropertyBindingError* QPropertyBindingError_new4(int typeVal, struct miqt_string description) { QString description_QString = QString::fromUtf8(description.data, description.len); - QPropertyBindingError* ret = new QPropertyBindingError(static_cast(typeVal), description_QString); - *outptr_QPropertyBindingError = ret; + return new QPropertyBindingError(static_cast(typeVal), description_QString); } void QPropertyBindingError_OperatorAssign(QPropertyBindingError* self, QPropertyBindingError* other) { @@ -84,14 +78,12 @@ void QPropertyBindingError_Delete(QPropertyBindingError* self, bool isSubclass) } } -void QUntypedPropertyBinding_new(QUntypedPropertyBinding** outptr_QUntypedPropertyBinding) { - QUntypedPropertyBinding* ret = new QUntypedPropertyBinding(); - *outptr_QUntypedPropertyBinding = ret; +QUntypedPropertyBinding* QUntypedPropertyBinding_new() { + return new QUntypedPropertyBinding(); } -void QUntypedPropertyBinding_new2(QUntypedPropertyBinding* other, QUntypedPropertyBinding** outptr_QUntypedPropertyBinding) { - QUntypedPropertyBinding* ret = new QUntypedPropertyBinding(*other); - *outptr_QUntypedPropertyBinding = ret; +QUntypedPropertyBinding* QUntypedPropertyBinding_new2(QUntypedPropertyBinding* other) { + return new QUntypedPropertyBinding(*other); } void QUntypedPropertyBinding_OperatorAssign(QUntypedPropertyBinding* self, QUntypedPropertyBinding* other) { @@ -118,14 +110,12 @@ void QUntypedPropertyBinding_Delete(QUntypedPropertyBinding* self, bool isSubcla } } -void QPropertyObserverBase_new(QPropertyObserverBase** outptr_QPropertyObserverBase) { - QPropertyObserverBase* ret = new QPropertyObserverBase(); - *outptr_QPropertyObserverBase = ret; +QPropertyObserverBase* QPropertyObserverBase_new() { + return new QPropertyObserverBase(); } -void QPropertyObserverBase_new2(QPropertyObserverBase* param1, QPropertyObserverBase** outptr_QPropertyObserverBase) { - QPropertyObserverBase* ret = new QPropertyObserverBase(*param1); - *outptr_QPropertyObserverBase = ret; +QPropertyObserverBase* QPropertyObserverBase_new2(QPropertyObserverBase* param1) { + return new QPropertyObserverBase(*param1); } void QPropertyObserverBase_Delete(QPropertyObserverBase* self, bool isSubclass) { @@ -136,10 +126,12 @@ void QPropertyObserverBase_Delete(QPropertyObserverBase* self, bool isSubclass) } } -void QPropertyObserver_new(QPropertyObserver** outptr_QPropertyObserver, QPropertyObserverBase** outptr_QPropertyObserverBase) { - QPropertyObserver* ret = new QPropertyObserver(); - *outptr_QPropertyObserver = ret; - *outptr_QPropertyObserverBase = static_cast(ret); +QPropertyObserver* QPropertyObserver_new() { + return new QPropertyObserver(); +} + +void QPropertyObserver_virtbase(QPropertyObserver* src, QPropertyObserverBase** outptr_QPropertyObserverBase) { + *outptr_QPropertyObserverBase = static_cast(src); } void QPropertyObserver_Delete(QPropertyObserver* self, bool isSubclass) { @@ -150,11 +142,12 @@ void QPropertyObserver_Delete(QPropertyObserver* self, bool isSubclass) { } } -void QPropertyNotifier_new(QPropertyNotifier** outptr_QPropertyNotifier, QPropertyObserver** outptr_QPropertyObserver, QPropertyObserverBase** outptr_QPropertyObserverBase) { - QPropertyNotifier* ret = new QPropertyNotifier(); - *outptr_QPropertyNotifier = ret; - *outptr_QPropertyObserver = static_cast(ret); - *outptr_QPropertyObserverBase = static_cast(ret); +QPropertyNotifier* QPropertyNotifier_new() { + return new QPropertyNotifier(); +} + +void QPropertyNotifier_virtbase(QPropertyNotifier* src, QPropertyObserver** outptr_QPropertyObserver) { + *outptr_QPropertyObserver = static_cast(src); } void QPropertyNotifier_Delete(QPropertyNotifier* self, bool isSubclass) { @@ -165,14 +158,12 @@ void QPropertyNotifier_Delete(QPropertyNotifier* self, bool isSubclass) { } } -void QUntypedBindable_new(QUntypedBindable** outptr_QUntypedBindable) { - QUntypedBindable* ret = new QUntypedBindable(); - *outptr_QUntypedBindable = ret; +QUntypedBindable* QUntypedBindable_new() { + return new QUntypedBindable(); } -void QUntypedBindable_new2(QUntypedBindable* param1, QUntypedBindable** outptr_QUntypedBindable) { - QUntypedBindable* ret = new QUntypedBindable(*param1); - *outptr_QUntypedBindable = ret; +QUntypedBindable* QUntypedBindable_new2(QUntypedBindable* param1) { + return new QUntypedBindable(*param1); } bool QUntypedBindable_IsValid(const QUntypedBindable* self) { diff --git a/qt6/gen_qproperty.go b/qt6/gen_qproperty.go index 26fe3b0c..bc1bfaae 100644 --- a/qt6/gen_qproperty.go +++ b/qt6/gen_qproperty.go @@ -63,34 +63,27 @@ func newQPropertyBindingSourceLocation(h *C.QPropertyBindingSourceLocation) *QPr if h == nil { return nil } + return &QPropertyBindingSourceLocation{h: h} } // UnsafeNewQPropertyBindingSourceLocation constructs the type using only unsafe pointers. func UnsafeNewQPropertyBindingSourceLocation(h unsafe.Pointer) *QPropertyBindingSourceLocation { - if h == nil { - return nil - } - - return &QPropertyBindingSourceLocation{h: (*C.QPropertyBindingSourceLocation)(h)} + return newQPropertyBindingSourceLocation((*C.QPropertyBindingSourceLocation)(h)) } // NewQPropertyBindingSourceLocation constructs a new QPropertyBindingSourceLocation object. func NewQPropertyBindingSourceLocation() *QPropertyBindingSourceLocation { - var outptr_QPropertyBindingSourceLocation *C.QPropertyBindingSourceLocation = nil - C.QPropertyBindingSourceLocation_new(&outptr_QPropertyBindingSourceLocation) - ret := newQPropertyBindingSourceLocation(outptr_QPropertyBindingSourceLocation) + ret := newQPropertyBindingSourceLocation(C.QPropertyBindingSourceLocation_new()) ret.isSubclass = true return ret } // NewQPropertyBindingSourceLocation2 constructs a new QPropertyBindingSourceLocation object. func NewQPropertyBindingSourceLocation2(param1 *QPropertyBindingSourceLocation) *QPropertyBindingSourceLocation { - var outptr_QPropertyBindingSourceLocation *C.QPropertyBindingSourceLocation = nil - C.QPropertyBindingSourceLocation_new2(param1.cPointer(), &outptr_QPropertyBindingSourceLocation) - ret := newQPropertyBindingSourceLocation(outptr_QPropertyBindingSourceLocation) + ret := newQPropertyBindingSourceLocation(C.QPropertyBindingSourceLocation_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -133,44 +126,35 @@ func newQPropertyBindingError(h *C.QPropertyBindingError) *QPropertyBindingError if h == nil { return nil } + return &QPropertyBindingError{h: h} } // UnsafeNewQPropertyBindingError constructs the type using only unsafe pointers. func UnsafeNewQPropertyBindingError(h unsafe.Pointer) *QPropertyBindingError { - if h == nil { - return nil - } - - return &QPropertyBindingError{h: (*C.QPropertyBindingError)(h)} + return newQPropertyBindingError((*C.QPropertyBindingError)(h)) } // NewQPropertyBindingError constructs a new QPropertyBindingError object. func NewQPropertyBindingError() *QPropertyBindingError { - var outptr_QPropertyBindingError *C.QPropertyBindingError = nil - C.QPropertyBindingError_new(&outptr_QPropertyBindingError) - ret := newQPropertyBindingError(outptr_QPropertyBindingError) + ret := newQPropertyBindingError(C.QPropertyBindingError_new()) ret.isSubclass = true return ret } // NewQPropertyBindingError2 constructs a new QPropertyBindingError object. func NewQPropertyBindingError2(typeVal QPropertyBindingError__Type) *QPropertyBindingError { - var outptr_QPropertyBindingError *C.QPropertyBindingError = nil - C.QPropertyBindingError_new2((C.int)(typeVal), &outptr_QPropertyBindingError) - ret := newQPropertyBindingError(outptr_QPropertyBindingError) + ret := newQPropertyBindingError(C.QPropertyBindingError_new2((C.int)(typeVal))) ret.isSubclass = true return ret } // NewQPropertyBindingError3 constructs a new QPropertyBindingError object. func NewQPropertyBindingError3(other *QPropertyBindingError) *QPropertyBindingError { - var outptr_QPropertyBindingError *C.QPropertyBindingError = nil - C.QPropertyBindingError_new3(other.cPointer(), &outptr_QPropertyBindingError) - ret := newQPropertyBindingError(outptr_QPropertyBindingError) + ret := newQPropertyBindingError(C.QPropertyBindingError_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -181,10 +165,8 @@ func NewQPropertyBindingError4(typeVal QPropertyBindingError__Type, description description_ms.data = C.CString(description) description_ms.len = C.size_t(len(description)) defer C.free(unsafe.Pointer(description_ms.data)) - var outptr_QPropertyBindingError *C.QPropertyBindingError = nil - C.QPropertyBindingError_new4((C.int)(typeVal), description_ms, &outptr_QPropertyBindingError) - ret := newQPropertyBindingError(outptr_QPropertyBindingError) + ret := newQPropertyBindingError(C.QPropertyBindingError_new4((C.int)(typeVal), description_ms)) ret.isSubclass = true return ret } @@ -246,34 +228,27 @@ func newQUntypedPropertyBinding(h *C.QUntypedPropertyBinding) *QUntypedPropertyB if h == nil { return nil } + return &QUntypedPropertyBinding{h: h} } // UnsafeNewQUntypedPropertyBinding constructs the type using only unsafe pointers. func UnsafeNewQUntypedPropertyBinding(h unsafe.Pointer) *QUntypedPropertyBinding { - if h == nil { - return nil - } - - return &QUntypedPropertyBinding{h: (*C.QUntypedPropertyBinding)(h)} + return newQUntypedPropertyBinding((*C.QUntypedPropertyBinding)(h)) } // NewQUntypedPropertyBinding constructs a new QUntypedPropertyBinding object. func NewQUntypedPropertyBinding() *QUntypedPropertyBinding { - var outptr_QUntypedPropertyBinding *C.QUntypedPropertyBinding = nil - C.QUntypedPropertyBinding_new(&outptr_QUntypedPropertyBinding) - ret := newQUntypedPropertyBinding(outptr_QUntypedPropertyBinding) + ret := newQUntypedPropertyBinding(C.QUntypedPropertyBinding_new()) ret.isSubclass = true return ret } // NewQUntypedPropertyBinding2 constructs a new QUntypedPropertyBinding object. func NewQUntypedPropertyBinding2(other *QUntypedPropertyBinding) *QUntypedPropertyBinding { - var outptr_QUntypedPropertyBinding *C.QUntypedPropertyBinding = nil - C.QUntypedPropertyBinding_new2(other.cPointer(), &outptr_QUntypedPropertyBinding) - ret := newQUntypedPropertyBinding(outptr_QUntypedPropertyBinding) + ret := newQUntypedPropertyBinding(C.QUntypedPropertyBinding_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -336,34 +311,27 @@ func newQPropertyObserverBase(h *C.QPropertyObserverBase) *QPropertyObserverBase if h == nil { return nil } + return &QPropertyObserverBase{h: h} } // UnsafeNewQPropertyObserverBase constructs the type using only unsafe pointers. func UnsafeNewQPropertyObserverBase(h unsafe.Pointer) *QPropertyObserverBase { - if h == nil { - return nil - } - - return &QPropertyObserverBase{h: (*C.QPropertyObserverBase)(h)} + return newQPropertyObserverBase((*C.QPropertyObserverBase)(h)) } // NewQPropertyObserverBase constructs a new QPropertyObserverBase object. func NewQPropertyObserverBase() *QPropertyObserverBase { - var outptr_QPropertyObserverBase *C.QPropertyObserverBase = nil - C.QPropertyObserverBase_new(&outptr_QPropertyObserverBase) - ret := newQPropertyObserverBase(outptr_QPropertyObserverBase) + ret := newQPropertyObserverBase(C.QPropertyObserverBase_new()) ret.isSubclass = true return ret } // NewQPropertyObserverBase2 constructs a new QPropertyObserverBase object. func NewQPropertyObserverBase2(param1 *QPropertyObserverBase) *QPropertyObserverBase { - var outptr_QPropertyObserverBase *C.QPropertyObserverBase = nil - C.QPropertyObserverBase_new2(param1.cPointer(), &outptr_QPropertyObserverBase) - ret := newQPropertyObserverBase(outptr_QPropertyObserverBase) + ret := newQPropertyObserverBase(C.QPropertyObserverBase_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -403,31 +371,26 @@ func (this *QPropertyObserver) UnsafePointer() unsafe.Pointer { } // newQPropertyObserver constructs the type using only CGO pointers. -func newQPropertyObserver(h *C.QPropertyObserver, h_QPropertyObserverBase *C.QPropertyObserverBase) *QPropertyObserver { +func newQPropertyObserver(h *C.QPropertyObserver) *QPropertyObserver { if h == nil { return nil } + var outptr_QPropertyObserverBase *C.QPropertyObserverBase = nil + C.QPropertyObserver_virtbase(h, &outptr_QPropertyObserverBase) + return &QPropertyObserver{h: h, - QPropertyObserverBase: newQPropertyObserverBase(h_QPropertyObserverBase)} + QPropertyObserverBase: newQPropertyObserverBase(outptr_QPropertyObserverBase)} } // UnsafeNewQPropertyObserver constructs the type using only unsafe pointers. -func UnsafeNewQPropertyObserver(h unsafe.Pointer, h_QPropertyObserverBase unsafe.Pointer) *QPropertyObserver { - if h == nil { - return nil - } - - return &QPropertyObserver{h: (*C.QPropertyObserver)(h), - QPropertyObserverBase: UnsafeNewQPropertyObserverBase(h_QPropertyObserverBase)} +func UnsafeNewQPropertyObserver(h unsafe.Pointer) *QPropertyObserver { + return newQPropertyObserver((*C.QPropertyObserver)(h)) } // NewQPropertyObserver constructs a new QPropertyObserver object. func NewQPropertyObserver() *QPropertyObserver { - var outptr_QPropertyObserver *C.QPropertyObserver = nil - var outptr_QPropertyObserverBase *C.QPropertyObserverBase = nil - C.QPropertyObserver_new(&outptr_QPropertyObserver, &outptr_QPropertyObserverBase) - ret := newQPropertyObserver(outptr_QPropertyObserver, outptr_QPropertyObserverBase) + ret := newQPropertyObserver(C.QPropertyObserver_new()) ret.isSubclass = true return ret } @@ -467,32 +430,26 @@ func (this *QPropertyNotifier) UnsafePointer() unsafe.Pointer { } // newQPropertyNotifier constructs the type using only CGO pointers. -func newQPropertyNotifier(h *C.QPropertyNotifier, h_QPropertyObserver *C.QPropertyObserver, h_QPropertyObserverBase *C.QPropertyObserverBase) *QPropertyNotifier { +func newQPropertyNotifier(h *C.QPropertyNotifier) *QPropertyNotifier { if h == nil { return nil } + var outptr_QPropertyObserver *C.QPropertyObserver = nil + C.QPropertyNotifier_virtbase(h, &outptr_QPropertyObserver) + return &QPropertyNotifier{h: h, - QPropertyObserver: newQPropertyObserver(h_QPropertyObserver, h_QPropertyObserverBase)} + QPropertyObserver: newQPropertyObserver(outptr_QPropertyObserver)} } // UnsafeNewQPropertyNotifier constructs the type using only unsafe pointers. -func UnsafeNewQPropertyNotifier(h unsafe.Pointer, h_QPropertyObserver unsafe.Pointer, h_QPropertyObserverBase unsafe.Pointer) *QPropertyNotifier { - if h == nil { - return nil - } - - return &QPropertyNotifier{h: (*C.QPropertyNotifier)(h), - QPropertyObserver: UnsafeNewQPropertyObserver(h_QPropertyObserver, h_QPropertyObserverBase)} +func UnsafeNewQPropertyNotifier(h unsafe.Pointer) *QPropertyNotifier { + return newQPropertyNotifier((*C.QPropertyNotifier)(h)) } // NewQPropertyNotifier constructs a new QPropertyNotifier object. func NewQPropertyNotifier() *QPropertyNotifier { - var outptr_QPropertyNotifier *C.QPropertyNotifier = nil - var outptr_QPropertyObserver *C.QPropertyObserver = nil - var outptr_QPropertyObserverBase *C.QPropertyObserverBase = nil - C.QPropertyNotifier_new(&outptr_QPropertyNotifier, &outptr_QPropertyObserver, &outptr_QPropertyObserverBase) - ret := newQPropertyNotifier(outptr_QPropertyNotifier, outptr_QPropertyObserver, outptr_QPropertyObserverBase) + ret := newQPropertyNotifier(C.QPropertyNotifier_new()) ret.isSubclass = true return ret } @@ -535,34 +492,27 @@ func newQUntypedBindable(h *C.QUntypedBindable) *QUntypedBindable { if h == nil { return nil } + return &QUntypedBindable{h: h} } // UnsafeNewQUntypedBindable constructs the type using only unsafe pointers. func UnsafeNewQUntypedBindable(h unsafe.Pointer) *QUntypedBindable { - if h == nil { - return nil - } - - return &QUntypedBindable{h: (*C.QUntypedBindable)(h)} + return newQUntypedBindable((*C.QUntypedBindable)(h)) } // NewQUntypedBindable constructs a new QUntypedBindable object. func NewQUntypedBindable() *QUntypedBindable { - var outptr_QUntypedBindable *C.QUntypedBindable = nil - C.QUntypedBindable_new(&outptr_QUntypedBindable) - ret := newQUntypedBindable(outptr_QUntypedBindable) + ret := newQUntypedBindable(C.QUntypedBindable_new()) ret.isSubclass = true return ret } // NewQUntypedBindable2 constructs a new QUntypedBindable object. func NewQUntypedBindable2(param1 *QUntypedBindable) *QUntypedBindable { - var outptr_QUntypedBindable *C.QUntypedBindable = nil - C.QUntypedBindable_new2(param1.cPointer(), &outptr_QUntypedBindable) - ret := newQUntypedBindable(outptr_QUntypedBindable) + ret := newQUntypedBindable(C.QUntypedBindable_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qproperty.h b/qt6/gen_qproperty.h index b3c59c18..66e6ed3f 100644 --- a/qt6/gen_qproperty.h +++ b/qt6/gen_qproperty.h @@ -34,40 +34,42 @@ typedef struct QUntypedBindable QUntypedBindable; typedef struct QUntypedPropertyBinding QUntypedPropertyBinding; #endif -void QPropertyBindingSourceLocation_new(QPropertyBindingSourceLocation** outptr_QPropertyBindingSourceLocation); -void QPropertyBindingSourceLocation_new2(QPropertyBindingSourceLocation* param1, QPropertyBindingSourceLocation** outptr_QPropertyBindingSourceLocation); +QPropertyBindingSourceLocation* QPropertyBindingSourceLocation_new(); +QPropertyBindingSourceLocation* QPropertyBindingSourceLocation_new2(QPropertyBindingSourceLocation* param1); void QPropertyBindingSourceLocation_Delete(QPropertyBindingSourceLocation* self, bool isSubclass); -void QPropertyBindingError_new(QPropertyBindingError** outptr_QPropertyBindingError); -void QPropertyBindingError_new2(int typeVal, QPropertyBindingError** outptr_QPropertyBindingError); -void QPropertyBindingError_new3(QPropertyBindingError* other, QPropertyBindingError** outptr_QPropertyBindingError); -void QPropertyBindingError_new4(int typeVal, struct miqt_string description, QPropertyBindingError** outptr_QPropertyBindingError); +QPropertyBindingError* QPropertyBindingError_new(); +QPropertyBindingError* QPropertyBindingError_new2(int typeVal); +QPropertyBindingError* QPropertyBindingError_new3(QPropertyBindingError* other); +QPropertyBindingError* QPropertyBindingError_new4(int typeVal, struct miqt_string description); void QPropertyBindingError_OperatorAssign(QPropertyBindingError* self, QPropertyBindingError* other); bool QPropertyBindingError_HasError(const QPropertyBindingError* self); int QPropertyBindingError_Type(const QPropertyBindingError* self); struct miqt_string QPropertyBindingError_Description(const QPropertyBindingError* self); void QPropertyBindingError_Delete(QPropertyBindingError* self, bool isSubclass); -void QUntypedPropertyBinding_new(QUntypedPropertyBinding** outptr_QUntypedPropertyBinding); -void QUntypedPropertyBinding_new2(QUntypedPropertyBinding* other, QUntypedPropertyBinding** outptr_QUntypedPropertyBinding); +QUntypedPropertyBinding* QUntypedPropertyBinding_new(); +QUntypedPropertyBinding* QUntypedPropertyBinding_new2(QUntypedPropertyBinding* other); void QUntypedPropertyBinding_OperatorAssign(QUntypedPropertyBinding* self, QUntypedPropertyBinding* other); bool QUntypedPropertyBinding_IsNull(const QUntypedPropertyBinding* self); QPropertyBindingError* QUntypedPropertyBinding_Error(const QUntypedPropertyBinding* self); QMetaType* QUntypedPropertyBinding_ValueMetaType(const QUntypedPropertyBinding* self); void QUntypedPropertyBinding_Delete(QUntypedPropertyBinding* self, bool isSubclass); -void QPropertyObserverBase_new(QPropertyObserverBase** outptr_QPropertyObserverBase); -void QPropertyObserverBase_new2(QPropertyObserverBase* param1, QPropertyObserverBase** outptr_QPropertyObserverBase); +QPropertyObserverBase* QPropertyObserverBase_new(); +QPropertyObserverBase* QPropertyObserverBase_new2(QPropertyObserverBase* param1); void QPropertyObserverBase_Delete(QPropertyObserverBase* self, bool isSubclass); -void QPropertyObserver_new(QPropertyObserver** outptr_QPropertyObserver, QPropertyObserverBase** outptr_QPropertyObserverBase); +QPropertyObserver* QPropertyObserver_new(); +void QPropertyObserver_virtbase(QPropertyObserver* src, QPropertyObserverBase** outptr_QPropertyObserverBase); void QPropertyObserver_Delete(QPropertyObserver* self, bool isSubclass); -void QPropertyNotifier_new(QPropertyNotifier** outptr_QPropertyNotifier, QPropertyObserver** outptr_QPropertyObserver, QPropertyObserverBase** outptr_QPropertyObserverBase); +QPropertyNotifier* QPropertyNotifier_new(); +void QPropertyNotifier_virtbase(QPropertyNotifier* src, QPropertyObserver** outptr_QPropertyObserver); void QPropertyNotifier_Delete(QPropertyNotifier* self, bool isSubclass); -void QUntypedBindable_new(QUntypedBindable** outptr_QUntypedBindable); -void QUntypedBindable_new2(QUntypedBindable* param1, QUntypedBindable** outptr_QUntypedBindable); +QUntypedBindable* QUntypedBindable_new(); +QUntypedBindable* QUntypedBindable_new2(QUntypedBindable* param1); bool QUntypedBindable_IsValid(const QUntypedBindable* self); bool QUntypedBindable_IsBindable(const QUntypedBindable* self); bool QUntypedBindable_IsReadOnly(const QUntypedBindable* self); diff --git a/qt6/gen_qpropertyanimation.cpp b/qt6/gen_qpropertyanimation.cpp index 248f87bb..bf25a2a8 100644 --- a/qt6/gen_qpropertyanimation.cpp +++ b/qt6/gen_qpropertyanimation.cpp @@ -177,38 +177,26 @@ public: }; -void QPropertyAnimation_new(QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(); - *outptr_QPropertyAnimation = ret; - *outptr_QVariantAnimation = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPropertyAnimation* QPropertyAnimation_new() { + return new MiqtVirtualQPropertyAnimation(); } -void QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { +QPropertyAnimation* QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName) { QByteArray propertyName_QByteArray(propertyName.data, propertyName.len); - MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(target, propertyName_QByteArray); - *outptr_QPropertyAnimation = ret; - *outptr_QVariantAnimation = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQPropertyAnimation(target, propertyName_QByteArray); } -void QPropertyAnimation_new3(QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(parent); - *outptr_QPropertyAnimation = ret; - *outptr_QVariantAnimation = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QPropertyAnimation* QPropertyAnimation_new3(QObject* parent) { + return new MiqtVirtualQPropertyAnimation(parent); } -void QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { +QPropertyAnimation* QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent) { QByteArray propertyName_QByteArray(propertyName.data, propertyName.len); - MiqtVirtualQPropertyAnimation* ret = new MiqtVirtualQPropertyAnimation(target, propertyName_QByteArray, parent); - *outptr_QPropertyAnimation = ret; - *outptr_QVariantAnimation = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQPropertyAnimation(target, propertyName_QByteArray, parent); +} + +void QPropertyAnimation_virtbase(QPropertyAnimation* src, QVariantAnimation** outptr_QVariantAnimation) { + *outptr_QVariantAnimation = static_cast(src); } QMetaObject* QPropertyAnimation_MetaObject(const QPropertyAnimation* self) { diff --git a/qt6/gen_qpropertyanimation.go b/qt6/gen_qpropertyanimation.go index 92819406..8e740f9d 100644 --- a/qt6/gen_qpropertyanimation.go +++ b/qt6/gen_qpropertyanimation.go @@ -35,33 +35,26 @@ func (this *QPropertyAnimation) UnsafePointer() unsafe.Pointer { } // newQPropertyAnimation constructs the type using only CGO pointers. -func newQPropertyAnimation(h *C.QPropertyAnimation, h_QVariantAnimation *C.QVariantAnimation, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QPropertyAnimation { +func newQPropertyAnimation(h *C.QPropertyAnimation) *QPropertyAnimation { if h == nil { return nil } + var outptr_QVariantAnimation *C.QVariantAnimation = nil + C.QPropertyAnimation_virtbase(h, &outptr_QVariantAnimation) + return &QPropertyAnimation{h: h, - QVariantAnimation: newQVariantAnimation(h_QVariantAnimation, h_QAbstractAnimation, h_QObject)} + QVariantAnimation: newQVariantAnimation(outptr_QVariantAnimation)} } // UnsafeNewQPropertyAnimation constructs the type using only unsafe pointers. -func UnsafeNewQPropertyAnimation(h unsafe.Pointer, h_QVariantAnimation unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QPropertyAnimation { - if h == nil { - return nil - } - - return &QPropertyAnimation{h: (*C.QPropertyAnimation)(h), - QVariantAnimation: UnsafeNewQVariantAnimation(h_QVariantAnimation, h_QAbstractAnimation, h_QObject)} +func UnsafeNewQPropertyAnimation(h unsafe.Pointer) *QPropertyAnimation { + return newQPropertyAnimation((*C.QPropertyAnimation)(h)) } // NewQPropertyAnimation constructs a new QPropertyAnimation object. func NewQPropertyAnimation() *QPropertyAnimation { - var outptr_QPropertyAnimation *C.QPropertyAnimation = nil - var outptr_QVariantAnimation *C.QVariantAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPropertyAnimation_new(&outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPropertyAnimation(C.QPropertyAnimation_new()) ret.isSubclass = true return ret } @@ -71,26 +64,16 @@ func NewQPropertyAnimation2(target *QObject, propertyName []byte) *QPropertyAnim propertyName_alias := C.struct_miqt_string{} propertyName_alias.data = (*C.char)(unsafe.Pointer(&propertyName[0])) propertyName_alias.len = C.size_t(len(propertyName)) - var outptr_QPropertyAnimation *C.QPropertyAnimation = nil - var outptr_QVariantAnimation *C.QVariantAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPropertyAnimation_new2(target.cPointer(), propertyName_alias, &outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPropertyAnimation(C.QPropertyAnimation_new2(target.cPointer(), propertyName_alias)) ret.isSubclass = true return ret } // NewQPropertyAnimation3 constructs a new QPropertyAnimation object. func NewQPropertyAnimation3(parent *QObject) *QPropertyAnimation { - var outptr_QPropertyAnimation *C.QPropertyAnimation = nil - var outptr_QVariantAnimation *C.QVariantAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPropertyAnimation_new3(parent.cPointer(), &outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPropertyAnimation(C.QPropertyAnimation_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -100,13 +83,8 @@ func NewQPropertyAnimation4(target *QObject, propertyName []byte, parent *QObjec propertyName_alias := C.struct_miqt_string{} propertyName_alias.data = (*C.char)(unsafe.Pointer(&propertyName[0])) propertyName_alias.len = C.size_t(len(propertyName)) - var outptr_QPropertyAnimation *C.QPropertyAnimation = nil - var outptr_QVariantAnimation *C.QVariantAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QPropertyAnimation_new4(target.cPointer(), propertyName_alias, parent.cPointer(), &outptr_QPropertyAnimation, &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQPropertyAnimation(outptr_QPropertyAnimation, outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQPropertyAnimation(C.QPropertyAnimation_new4(target.cPointer(), propertyName_alias, parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qpropertyanimation.h b/qt6/gen_qpropertyanimation.h index ca86b869..29602aa1 100644 --- a/qt6/gen_qpropertyanimation.h +++ b/qt6/gen_qpropertyanimation.h @@ -32,10 +32,11 @@ typedef struct QVariant QVariant; typedef struct QVariantAnimation QVariantAnimation; #endif -void QPropertyAnimation_new(QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QPropertyAnimation_new3(QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent, QPropertyAnimation** outptr_QPropertyAnimation, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +QPropertyAnimation* QPropertyAnimation_new(); +QPropertyAnimation* QPropertyAnimation_new2(QObject* target, struct miqt_string propertyName); +QPropertyAnimation* QPropertyAnimation_new3(QObject* parent); +QPropertyAnimation* QPropertyAnimation_new4(QObject* target, struct miqt_string propertyName, QObject* parent); +void QPropertyAnimation_virtbase(QPropertyAnimation* src, QVariantAnimation** outptr_QVariantAnimation); QMetaObject* QPropertyAnimation_MetaObject(const QPropertyAnimation* self); void* QPropertyAnimation_Metacast(QPropertyAnimation* self, const char* param1); struct miqt_string QPropertyAnimation_Tr(const char* s); diff --git a/qt6/gen_qpropertyprivate.go b/qt6/gen_qpropertyprivate.go index db28d382..a5ee5125 100644 --- a/qt6/gen_qpropertyprivate.go +++ b/qt6/gen_qpropertyprivate.go @@ -37,16 +37,13 @@ func newQUntypedPropertyData(h *C.QUntypedPropertyData) *QUntypedPropertyData { if h == nil { return nil } + return &QUntypedPropertyData{h: h} } // UnsafeNewQUntypedPropertyData constructs the type using only unsafe pointers. func UnsafeNewQUntypedPropertyData(h unsafe.Pointer) *QUntypedPropertyData { - if h == nil { - return nil - } - - return &QUntypedPropertyData{h: (*C.QUntypedPropertyData)(h)} + return newQUntypedPropertyData((*C.QUntypedPropertyData)(h)) } // Delete this object from C++ memory. @@ -87,16 +84,13 @@ func newQPropertyProxyBindingData(h *C.QPropertyProxyBindingData) *QPropertyProx if h == nil { return nil } + return &QPropertyProxyBindingData{h: h} } // UnsafeNewQPropertyProxyBindingData constructs the type using only unsafe pointers. func UnsafeNewQPropertyProxyBindingData(h unsafe.Pointer) *QPropertyProxyBindingData { - if h == nil { - return nil - } - - return &QPropertyProxyBindingData{h: (*C.QPropertyProxyBindingData)(h)} + return newQPropertyProxyBindingData((*C.QPropertyProxyBindingData)(h)) } // Delete this object from C++ memory. diff --git a/qt6/gen_qproxystyle.cpp b/qt6/gen_qproxystyle.cpp index 643b520b..7ab5c221 100644 --- a/qt6/gen_qproxystyle.cpp +++ b/qt6/gen_qproxystyle.cpp @@ -704,29 +704,21 @@ public: }; -void QProxyStyle_new(QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { - MiqtVirtualQProxyStyle* ret = new MiqtVirtualQProxyStyle(); - *outptr_QProxyStyle = ret; - *outptr_QCommonStyle = static_cast(ret); - *outptr_QStyle = static_cast(ret); - *outptr_QObject = static_cast(ret); +QProxyStyle* QProxyStyle_new() { + return new MiqtVirtualQProxyStyle(); } -void QProxyStyle_new2(struct miqt_string key, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { +QProxyStyle* QProxyStyle_new2(struct miqt_string key) { QString key_QString = QString::fromUtf8(key.data, key.len); - MiqtVirtualQProxyStyle* ret = new MiqtVirtualQProxyStyle(key_QString); - *outptr_QProxyStyle = ret; - *outptr_QCommonStyle = static_cast(ret); - *outptr_QStyle = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQProxyStyle(key_QString); } -void QProxyStyle_new3(QStyle* style, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject) { - MiqtVirtualQProxyStyle* ret = new MiqtVirtualQProxyStyle(style); - *outptr_QProxyStyle = ret; - *outptr_QCommonStyle = static_cast(ret); - *outptr_QStyle = static_cast(ret); - *outptr_QObject = static_cast(ret); +QProxyStyle* QProxyStyle_new3(QStyle* style) { + return new MiqtVirtualQProxyStyle(style); +} + +void QProxyStyle_virtbase(QProxyStyle* src, QCommonStyle** outptr_QCommonStyle) { + *outptr_QCommonStyle = static_cast(src); } QMetaObject* QProxyStyle_MetaObject(const QProxyStyle* self) { diff --git a/qt6/gen_qproxystyle.go b/qt6/gen_qproxystyle.go index 4281dec8..7bc325e8 100644 --- a/qt6/gen_qproxystyle.go +++ b/qt6/gen_qproxystyle.go @@ -35,33 +35,26 @@ func (this *QProxyStyle) UnsafePointer() unsafe.Pointer { } // newQProxyStyle constructs the type using only CGO pointers. -func newQProxyStyle(h *C.QProxyStyle, h_QCommonStyle *C.QCommonStyle, h_QStyle *C.QStyle, h_QObject *C.QObject) *QProxyStyle { +func newQProxyStyle(h *C.QProxyStyle) *QProxyStyle { if h == nil { return nil } + var outptr_QCommonStyle *C.QCommonStyle = nil + C.QProxyStyle_virtbase(h, &outptr_QCommonStyle) + return &QProxyStyle{h: h, - QCommonStyle: newQCommonStyle(h_QCommonStyle, h_QStyle, h_QObject)} + QCommonStyle: newQCommonStyle(outptr_QCommonStyle)} } // UnsafeNewQProxyStyle constructs the type using only unsafe pointers. -func UnsafeNewQProxyStyle(h unsafe.Pointer, h_QCommonStyle unsafe.Pointer, h_QStyle unsafe.Pointer, h_QObject unsafe.Pointer) *QProxyStyle { - if h == nil { - return nil - } - - return &QProxyStyle{h: (*C.QProxyStyle)(h), - QCommonStyle: UnsafeNewQCommonStyle(h_QCommonStyle, h_QStyle, h_QObject)} +func UnsafeNewQProxyStyle(h unsafe.Pointer) *QProxyStyle { + return newQProxyStyle((*C.QProxyStyle)(h)) } // NewQProxyStyle constructs a new QProxyStyle object. func NewQProxyStyle() *QProxyStyle { - var outptr_QProxyStyle *C.QProxyStyle = nil - var outptr_QCommonStyle *C.QCommonStyle = nil - var outptr_QStyle *C.QStyle = nil - var outptr_QObject *C.QObject = nil - C.QProxyStyle_new(&outptr_QProxyStyle, &outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) - ret := newQProxyStyle(outptr_QProxyStyle, outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret := newQProxyStyle(C.QProxyStyle_new()) ret.isSubclass = true return ret } @@ -72,26 +65,16 @@ func NewQProxyStyle2(key string) *QProxyStyle { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QProxyStyle *C.QProxyStyle = nil - var outptr_QCommonStyle *C.QCommonStyle = nil - var outptr_QStyle *C.QStyle = nil - var outptr_QObject *C.QObject = nil - C.QProxyStyle_new2(key_ms, &outptr_QProxyStyle, &outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) - ret := newQProxyStyle(outptr_QProxyStyle, outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret := newQProxyStyle(C.QProxyStyle_new2(key_ms)) ret.isSubclass = true return ret } // NewQProxyStyle3 constructs a new QProxyStyle object. func NewQProxyStyle3(style *QStyle) *QProxyStyle { - var outptr_QProxyStyle *C.QProxyStyle = nil - var outptr_QCommonStyle *C.QCommonStyle = nil - var outptr_QStyle *C.QStyle = nil - var outptr_QObject *C.QObject = nil - C.QProxyStyle_new3(style.cPointer(), &outptr_QProxyStyle, &outptr_QCommonStyle, &outptr_QStyle, &outptr_QObject) - ret := newQProxyStyle(outptr_QProxyStyle, outptr_QCommonStyle, outptr_QStyle, outptr_QObject) + ret := newQProxyStyle(C.QProxyStyle_new3(style.cPointer())) ret.isSubclass = true return ret } @@ -116,7 +99,7 @@ func QProxyStyle_Tr(s string) string { } func (this *QProxyStyle) BaseStyle() *QStyle { - return newQStyle(C.QProxyStyle_BaseStyle(this.h), nil) + return newQStyle(C.QProxyStyle_BaseStyle(this.h)) } func (this *QProxyStyle) SetBaseStyle(style *QStyle) { @@ -204,13 +187,13 @@ func (this *QProxyStyle) StandardIcon(standardIcon QStyle__StandardPixmap, optio } func (this *QProxyStyle) StandardPixmap(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _goptr := newQPixmap(C.QProxyStyle_StandardPixmap(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()), nil) + _goptr := newQPixmap(C.QProxyStyle_StandardPixmap(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QProxyStyle) GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { - _goptr := newQPixmap(C.QProxyStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()), nil) + _goptr := newQPixmap(C.QProxyStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -289,7 +272,7 @@ func miqt_exec_callback_QProxyStyle_DrawPrimitive(self *C.QProxyStyle, cb C.intp slotval3 := newQPainter(painter) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawPrimitive, slotval1, slotval2, slotval3, slotval4) @@ -321,7 +304,7 @@ func miqt_exec_callback_QProxyStyle_DrawControl(self *C.QProxyStyle, cb C.intptr slotval3 := newQPainter(painter) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawControl, slotval1, slotval2, slotval3, slotval4) @@ -349,11 +332,11 @@ func miqt_exec_callback_QProxyStyle_DrawComplexControl(self *C.QProxyStyle, cb C // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(control) - slotval2 := newQStyleOptionComplex(option, nil) + slotval2 := newQStyleOptionComplex(option) slotval3 := newQPainter(painter) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawComplexControl, slotval1, slotval2, slotval3, slotval4) @@ -429,7 +412,7 @@ func miqt_exec_callback_QProxyStyle_DrawItemPixmap(self *C.QProxyStyle, cb C.int slotval3 := (int)(alignment) - slotval4 := newQPixmap(pixmap, nil) + slotval4 := newQPixmap(pixmap) gofunc((&QProxyStyle{h: self}).callVirtualBase_DrawItemPixmap, slotval1, slotval2, slotval3, slotval4) @@ -463,7 +446,7 @@ func miqt_exec_callback_QProxyStyle_SizeFromContents(self *C.QProxyStyle, cb C.i slotval3 := newQSize(size) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_SizeFromContents, slotval1, slotval2, slotval3, slotval4) @@ -497,7 +480,7 @@ func miqt_exec_callback_QProxyStyle_SubElementRect(self *C.QProxyStyle, cb C.int slotval2 := newQStyleOption(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_SubElementRect, slotval1, slotval2, slotval3) @@ -529,11 +512,11 @@ func miqt_exec_callback_QProxyStyle_SubControlRect(self *C.QProxyStyle, cb C.int // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(cc) - slotval2 := newQStyleOptionComplex(opt, nil) + slotval2 := newQStyleOptionComplex(opt) slotval3 := (QStyle__SubControl)(sc) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_SubControlRect, slotval1, slotval2, slotval3, slotval4) @@ -612,7 +595,7 @@ func miqt_exec_callback_QProxyStyle_ItemPixmapRect(self *C.QProxyStyle, cb C.int slotval2 := (int)(flags) - slotval3 := newQPixmap(pixmap, nil) + slotval3 := newQPixmap(pixmap) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_ItemPixmapRect, slotval1, slotval2, slotval3) @@ -642,11 +625,11 @@ func miqt_exec_callback_QProxyStyle_HitTestComplexControl(self *C.QProxyStyle, c // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(control) - slotval2 := newQStyleOptionComplex(option, nil) + slotval2 := newQStyleOptionComplex(option) slotval3 := newQPoint(pos) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_HitTestComplexControl, slotval1, slotval2, slotval3, slotval4) @@ -678,7 +661,7 @@ func miqt_exec_callback_QProxyStyle_StyleHint(self *C.QProxyStyle, cb C.intptr_t slotval2 := newQStyleOption(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) slotval4 := newQStyleHintReturn(returnData) @@ -712,7 +695,7 @@ func miqt_exec_callback_QProxyStyle_PixelMetric(self *C.QProxyStyle, cb C.intptr slotval2 := newQStyleOption(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_PixelMetric, slotval1, slotval2, slotval3) @@ -748,7 +731,7 @@ func miqt_exec_callback_QProxyStyle_LayoutSpacing(self *C.QProxyStyle, cb C.intp slotval4 := newQStyleOption(option) - slotval5 := newQWidget(widget, nil, nil) + slotval5 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_LayoutSpacing, slotval1, slotval2, slotval3, slotval4, slotval5) @@ -782,7 +765,7 @@ func miqt_exec_callback_QProxyStyle_StandardIcon(self *C.QProxyStyle, cb C.intpt slotval2 := newQStyleOption(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_StandardIcon, slotval1, slotval2, slotval3) @@ -792,7 +775,7 @@ func miqt_exec_callback_QProxyStyle_StandardIcon(self *C.QProxyStyle, cb C.intpt func (this *QProxyStyle) callVirtualBase_StandardPixmap(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _goptr := newQPixmap(C.QProxyStyle_virtualbase_StandardPixmap(unsafe.Pointer(this.h), (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()), nil) + _goptr := newQPixmap(C.QProxyStyle_virtualbase_StandardPixmap(unsafe.Pointer(this.h), (C.int)(standardPixmap), opt.cPointer(), widget.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -816,7 +799,7 @@ func miqt_exec_callback_QProxyStyle_StandardPixmap(self *C.QProxyStyle, cb C.int slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc((&QProxyStyle{h: self}).callVirtualBase_StandardPixmap, slotval1, slotval2, slotval3) @@ -826,7 +809,7 @@ func miqt_exec_callback_QProxyStyle_StandardPixmap(self *C.QProxyStyle, cb C.int func (this *QProxyStyle) callVirtualBase_GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { - _goptr := newQPixmap(C.QProxyStyle_virtualbase_GeneratedIconPixmap(unsafe.Pointer(this.h), (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()), nil) + _goptr := newQPixmap(C.QProxyStyle_virtualbase_GeneratedIconPixmap(unsafe.Pointer(this.h), (C.int)(iconMode), pixmap.cPointer(), opt.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr @@ -848,7 +831,7 @@ func miqt_exec_callback_QProxyStyle_GeneratedIconPixmap(self *C.QProxyStyle, cb // Convert all CABI parameters to Go parameters slotval1 := (QIcon__Mode)(iconMode) - slotval2 := newQPixmap(pixmap, nil) + slotval2 := newQPixmap(pixmap) slotval3 := newQStyleOption(opt) @@ -905,7 +888,7 @@ func miqt_exec_callback_QProxyStyle_Polish(self *C.QProxyStyle, cb C.intptr_t, w } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QProxyStyle{h: self}).callVirtualBase_Polish, slotval1) @@ -957,7 +940,7 @@ func miqt_exec_callback_QProxyStyle_PolishWithApp(self *C.QProxyStyle, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQApplication(app, nil, nil, nil) + slotval1 := newQApplication(app) gofunc((&QProxyStyle{h: self}).callVirtualBase_PolishWithApp, slotval1) @@ -983,7 +966,7 @@ func miqt_exec_callback_QProxyStyle_Unpolish(self *C.QProxyStyle, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QProxyStyle{h: self}).callVirtualBase_Unpolish, slotval1) @@ -1009,7 +992,7 @@ func miqt_exec_callback_QProxyStyle_UnpolishWithApp(self *C.QProxyStyle, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQApplication(app, nil, nil, nil) + slotval1 := newQApplication(app) gofunc((&QProxyStyle{h: self}).callVirtualBase_UnpolishWithApp, slotval1) diff --git a/qt6/gen_qproxystyle.h b/qt6/gen_qproxystyle.h index d6bcece9..7143eaef 100644 --- a/qt6/gen_qproxystyle.h +++ b/qt6/gen_qproxystyle.h @@ -56,9 +56,10 @@ typedef struct QStyleOptionComplex QStyleOptionComplex; typedef struct QWidget QWidget; #endif -void QProxyStyle_new(QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); -void QProxyStyle_new2(struct miqt_string key, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); -void QProxyStyle_new3(QStyle* style, QProxyStyle** outptr_QProxyStyle, QCommonStyle** outptr_QCommonStyle, QStyle** outptr_QStyle, QObject** outptr_QObject); +QProxyStyle* QProxyStyle_new(); +QProxyStyle* QProxyStyle_new2(struct miqt_string key); +QProxyStyle* QProxyStyle_new3(QStyle* style); +void QProxyStyle_virtbase(QProxyStyle* src, QCommonStyle** outptr_QCommonStyle); QMetaObject* QProxyStyle_MetaObject(const QProxyStyle* self); void* QProxyStyle_Metacast(QProxyStyle* self, const char* param1); struct miqt_string QProxyStyle_Tr(const char* s); diff --git a/qt6/gen_qpushbutton.cpp b/qt6/gen_qpushbutton.cpp index 14bbd7e5..cfbdf19f 100644 --- a/qt6/gen_qpushbutton.cpp +++ b/qt6/gen_qpushbutton.cpp @@ -438,62 +438,36 @@ public: }; -void QPushButton_new(QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(parent); - *outptr_QPushButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPushButton* QPushButton_new(QWidget* parent) { + return new MiqtVirtualQPushButton(parent); } -void QPushButton_new2(QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(); - *outptr_QPushButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPushButton* QPushButton_new2() { + return new MiqtVirtualQPushButton(); } -void QPushButton_new3(struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QPushButton* QPushButton_new3(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(text_QString); - *outptr_QPushButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPushButton(text_QString); } -void QPushButton_new4(QIcon* icon, struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QPushButton* QPushButton_new4(QIcon* icon, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(*icon, text_QString); - *outptr_QPushButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPushButton(*icon, text_QString); } -void QPushButton_new5(struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QPushButton* QPushButton_new5(struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(text_QString, parent); - *outptr_QPushButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPushButton(text_QString, parent); } -void QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QPushButton* QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQPushButton* ret = new MiqtVirtualQPushButton(*icon, text_QString, parent); - *outptr_QPushButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQPushButton(*icon, text_QString, parent); +} + +void QPushButton_virtbase(QPushButton* src, QAbstractButton** outptr_QAbstractButton) { + *outptr_QAbstractButton = static_cast(src); } QMetaObject* QPushButton_MetaObject(const QPushButton* self) { diff --git a/qt6/gen_qpushbutton.go b/qt6/gen_qpushbutton.go index 371dc915..950c6ef8 100644 --- a/qt6/gen_qpushbutton.go +++ b/qt6/gen_qpushbutton.go @@ -35,48 +35,34 @@ func (this *QPushButton) UnsafePointer() unsafe.Pointer { } // newQPushButton constructs the type using only CGO pointers. -func newQPushButton(h *C.QPushButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPushButton { +func newQPushButton(h *C.QPushButton) *QPushButton { if h == nil { return nil } + var outptr_QAbstractButton *C.QAbstractButton = nil + C.QPushButton_virtbase(h, &outptr_QAbstractButton) + return &QPushButton{h: h, - QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractButton: newQAbstractButton(outptr_QAbstractButton)} } // UnsafeNewQPushButton constructs the type using only unsafe pointers. -func UnsafeNewQPushButton(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPushButton { - if h == nil { - return nil - } - - return &QPushButton{h: (*C.QPushButton)(h), - QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQPushButton(h unsafe.Pointer) *QPushButton { + return newQPushButton((*C.QPushButton)(h)) } // NewQPushButton constructs a new QPushButton object. func NewQPushButton(parent *QWidget) *QPushButton { - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPushButton_new(parent.cPointer(), &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPushButton(C.QPushButton_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQPushButton2 constructs a new QPushButton object. func NewQPushButton2() *QPushButton { - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPushButton_new2(&outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPushButton(C.QPushButton_new2()) ret.isSubclass = true return ret } @@ -87,14 +73,8 @@ func NewQPushButton3(text string) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPushButton_new3(text_ms, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPushButton(C.QPushButton_new3(text_ms)) ret.isSubclass = true return ret } @@ -105,14 +85,8 @@ func NewQPushButton4(icon *QIcon, text string) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPushButton_new4(icon.cPointer(), text_ms, &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPushButton(C.QPushButton_new4(icon.cPointer(), text_ms)) ret.isSubclass = true return ret } @@ -123,14 +97,8 @@ func NewQPushButton5(text string, parent *QWidget) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPushButton_new5(text_ms, parent.cPointer(), &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPushButton(C.QPushButton_new5(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -141,14 +109,8 @@ func NewQPushButton6(icon *QIcon, text string, parent *QWidget) *QPushButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QPushButton *C.QPushButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPushButton_new6(icon.cPointer(), text_ms, parent.cPointer(), &outptr_QPushButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPushButton(outptr_QPushButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPushButton(C.QPushButton_new6(icon.cPointer(), text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -205,7 +167,7 @@ func (this *QPushButton) SetMenu(menu *QMenu) { } func (this *QPushButton) Menu() *QMenu { - return newQMenu(C.QPushButton_Menu(this.h), nil, nil, nil) + return newQMenu(C.QPushButton_Menu(this.h)) } func (this *QPushButton) SetFlat(flat bool) { @@ -344,7 +306,7 @@ func miqt_exec_callback_QPushButton_PaintEvent(self *C.QPushButton, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QPushButton{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -370,7 +332,7 @@ func miqt_exec_callback_QPushButton_KeyPressEvent(self *C.QPushButton, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QPushButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -396,7 +358,7 @@ func miqt_exec_callback_QPushButton_FocusInEvent(self *C.QPushButton, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QPushButton{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -422,7 +384,7 @@ func miqt_exec_callback_QPushButton_FocusOutEvent(self *C.QPushButton, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QPushButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -448,7 +410,7 @@ func miqt_exec_callback_QPushButton_MouseMoveEvent(self *C.QPushButton, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QPushButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -474,7 +436,7 @@ func miqt_exec_callback_QPushButton_InitStyleOption(self *C.QPushButton, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionButton(option, nil) + slotval1 := newQStyleOptionButton(option) gofunc((&QPushButton{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -574,7 +536,7 @@ func miqt_exec_callback_QPushButton_KeyReleaseEvent(self *C.QPushButton, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QPushButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -600,7 +562,7 @@ func miqt_exec_callback_QPushButton_MousePressEvent(self *C.QPushButton, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QPushButton{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -626,7 +588,7 @@ func miqt_exec_callback_QPushButton_MouseReleaseEvent(self *C.QPushButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QPushButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -678,7 +640,7 @@ func miqt_exec_callback_QPushButton_TimerEvent(self *C.QPushButton, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QPushButton{h: self}).callVirtualBase_TimerEvent, slotval1) diff --git a/qt6/gen_qpushbutton.h b/qt6/gen_qpushbutton.h index 558272c9..acd64771 100644 --- a/qt6/gen_qpushbutton.h +++ b/qt6/gen_qpushbutton.h @@ -52,12 +52,13 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QPushButton_new(QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPushButton_new2(QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPushButton_new3(struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPushButton_new4(QIcon* icon, struct miqt_string text, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPushButton_new5(struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent, QPushButton** outptr_QPushButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QPushButton* QPushButton_new(QWidget* parent); +QPushButton* QPushButton_new2(); +QPushButton* QPushButton_new3(struct miqt_string text); +QPushButton* QPushButton_new4(QIcon* icon, struct miqt_string text); +QPushButton* QPushButton_new5(struct miqt_string text, QWidget* parent); +QPushButton* QPushButton_new6(QIcon* icon, struct miqt_string text, QWidget* parent); +void QPushButton_virtbase(QPushButton* src, QAbstractButton** outptr_QAbstractButton); QMetaObject* QPushButton_MetaObject(const QPushButton* self); void* QPushButton_Metacast(QPushButton* self, const char* param1); struct miqt_string QPushButton_Tr(const char* s); diff --git a/qt6/gen_qquaternion.cpp b/qt6/gen_qquaternion.cpp index 162120ff..14151caf 100644 --- a/qt6/gen_qquaternion.cpp +++ b/qt6/gen_qquaternion.cpp @@ -5,34 +5,28 @@ #include "gen_qquaternion.h" #include "_cgo_export.h" -void QQuaternion_new(QQuaternion** outptr_QQuaternion) { - QQuaternion* ret = new QQuaternion(); - *outptr_QQuaternion = ret; +QQuaternion* QQuaternion_new() { + return new QQuaternion(); } -void QQuaternion_new2(int param1, QQuaternion** outptr_QQuaternion) { - QQuaternion* ret = new QQuaternion(static_cast(param1)); - *outptr_QQuaternion = ret; +QQuaternion* QQuaternion_new2(int param1) { + return new QQuaternion(static_cast(param1)); } -void QQuaternion_new3(float scalar, float xpos, float ypos, float zpos, QQuaternion** outptr_QQuaternion) { - QQuaternion* ret = new QQuaternion(static_cast(scalar), static_cast(xpos), static_cast(ypos), static_cast(zpos)); - *outptr_QQuaternion = ret; +QQuaternion* QQuaternion_new3(float scalar, float xpos, float ypos, float zpos) { + return new QQuaternion(static_cast(scalar), static_cast(xpos), static_cast(ypos), static_cast(zpos)); } -void QQuaternion_new4(float scalar, QVector3D* vector, QQuaternion** outptr_QQuaternion) { - QQuaternion* ret = new QQuaternion(static_cast(scalar), *vector); - *outptr_QQuaternion = ret; +QQuaternion* QQuaternion_new4(float scalar, QVector3D* vector) { + return new QQuaternion(static_cast(scalar), *vector); } -void QQuaternion_new5(QVector4D* vector, QQuaternion** outptr_QQuaternion) { - QQuaternion* ret = new QQuaternion(*vector); - *outptr_QQuaternion = ret; +QQuaternion* QQuaternion_new5(QVector4D* vector) { + return new QQuaternion(*vector); } -void QQuaternion_new6(QQuaternion* param1, QQuaternion** outptr_QQuaternion) { - QQuaternion* ret = new QQuaternion(*param1); - *outptr_QQuaternion = ret; +QQuaternion* QQuaternion_new6(QQuaternion* param1) { + return new QQuaternion(*param1); } bool QQuaternion_IsNull(const QQuaternion* self) { diff --git a/qt6/gen_qquaternion.go b/qt6/gen_qquaternion.go index 4878609c..db4e6221 100644 --- a/qt6/gen_qquaternion.go +++ b/qt6/gen_qquaternion.go @@ -37,74 +37,59 @@ func newQQuaternion(h *C.QQuaternion) *QQuaternion { if h == nil { return nil } + return &QQuaternion{h: h} } // UnsafeNewQQuaternion constructs the type using only unsafe pointers. func UnsafeNewQQuaternion(h unsafe.Pointer) *QQuaternion { - if h == nil { - return nil - } - - return &QQuaternion{h: (*C.QQuaternion)(h)} + return newQQuaternion((*C.QQuaternion)(h)) } // NewQQuaternion constructs a new QQuaternion object. func NewQQuaternion() *QQuaternion { - var outptr_QQuaternion *C.QQuaternion = nil - C.QQuaternion_new(&outptr_QQuaternion) - ret := newQQuaternion(outptr_QQuaternion) + ret := newQQuaternion(C.QQuaternion_new()) ret.isSubclass = true return ret } // NewQQuaternion2 constructs a new QQuaternion object. func NewQQuaternion2(param1 Initialization) *QQuaternion { - var outptr_QQuaternion *C.QQuaternion = nil - C.QQuaternion_new2((C.int)(param1), &outptr_QQuaternion) - ret := newQQuaternion(outptr_QQuaternion) + ret := newQQuaternion(C.QQuaternion_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQQuaternion3 constructs a new QQuaternion object. func NewQQuaternion3(scalar float32, xpos float32, ypos float32, zpos float32) *QQuaternion { - var outptr_QQuaternion *C.QQuaternion = nil - C.QQuaternion_new3((C.float)(scalar), (C.float)(xpos), (C.float)(ypos), (C.float)(zpos), &outptr_QQuaternion) - ret := newQQuaternion(outptr_QQuaternion) + ret := newQQuaternion(C.QQuaternion_new3((C.float)(scalar), (C.float)(xpos), (C.float)(ypos), (C.float)(zpos))) ret.isSubclass = true return ret } // NewQQuaternion4 constructs a new QQuaternion object. func NewQQuaternion4(scalar float32, vector *QVector3D) *QQuaternion { - var outptr_QQuaternion *C.QQuaternion = nil - C.QQuaternion_new4((C.float)(scalar), vector.cPointer(), &outptr_QQuaternion) - ret := newQQuaternion(outptr_QQuaternion) + ret := newQQuaternion(C.QQuaternion_new4((C.float)(scalar), vector.cPointer())) ret.isSubclass = true return ret } // NewQQuaternion5 constructs a new QQuaternion object. func NewQQuaternion5(vector *QVector4D) *QQuaternion { - var outptr_QQuaternion *C.QQuaternion = nil - C.QQuaternion_new5(vector.cPointer(), &outptr_QQuaternion) - ret := newQQuaternion(outptr_QQuaternion) + ret := newQQuaternion(C.QQuaternion_new5(vector.cPointer())) ret.isSubclass = true return ret } // NewQQuaternion6 constructs a new QQuaternion object. func NewQQuaternion6(param1 *QQuaternion) *QQuaternion { - var outptr_QQuaternion *C.QQuaternion = nil - C.QQuaternion_new6(param1.cPointer(), &outptr_QQuaternion) - ret := newQQuaternion(outptr_QQuaternion) + ret := newQQuaternion(C.QQuaternion_new6(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qquaternion.h b/qt6/gen_qquaternion.h index 2a2c3b44..8de46e1f 100644 --- a/qt6/gen_qquaternion.h +++ b/qt6/gen_qquaternion.h @@ -24,12 +24,12 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -void QQuaternion_new(QQuaternion** outptr_QQuaternion); -void QQuaternion_new2(int param1, QQuaternion** outptr_QQuaternion); -void QQuaternion_new3(float scalar, float xpos, float ypos, float zpos, QQuaternion** outptr_QQuaternion); -void QQuaternion_new4(float scalar, QVector3D* vector, QQuaternion** outptr_QQuaternion); -void QQuaternion_new5(QVector4D* vector, QQuaternion** outptr_QQuaternion); -void QQuaternion_new6(QQuaternion* param1, QQuaternion** outptr_QQuaternion); +QQuaternion* QQuaternion_new(); +QQuaternion* QQuaternion_new2(int param1); +QQuaternion* QQuaternion_new3(float scalar, float xpos, float ypos, float zpos); +QQuaternion* QQuaternion_new4(float scalar, QVector3D* vector); +QQuaternion* QQuaternion_new5(QVector4D* vector); +QQuaternion* QQuaternion_new6(QQuaternion* param1); bool QQuaternion_IsNull(const QQuaternion* self); bool QQuaternion_IsIdentity(const QQuaternion* self); QVector3D* QQuaternion_Vector(const QQuaternion* self); diff --git a/qt6/gen_qradiobutton.cpp b/qt6/gen_qradiobutton.cpp index 93a22b4d..f4d22b34 100644 --- a/qt6/gen_qradiobutton.cpp +++ b/qt6/gen_qradiobutton.cpp @@ -434,42 +434,26 @@ public: }; -void QRadioButton_new(QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(parent); - *outptr_QRadioButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QRadioButton* QRadioButton_new(QWidget* parent) { + return new MiqtVirtualQRadioButton(parent); } -void QRadioButton_new2(QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(); - *outptr_QRadioButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QRadioButton* QRadioButton_new2() { + return new MiqtVirtualQRadioButton(); } -void QRadioButton_new3(struct miqt_string text, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QRadioButton* QRadioButton_new3(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(text_QString); - *outptr_QRadioButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQRadioButton(text_QString); } -void QRadioButton_new4(struct miqt_string text, QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QRadioButton* QRadioButton_new4(struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQRadioButton* ret = new MiqtVirtualQRadioButton(text_QString, parent); - *outptr_QRadioButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQRadioButton(text_QString, parent); +} + +void QRadioButton_virtbase(QRadioButton* src, QAbstractButton** outptr_QAbstractButton) { + *outptr_QAbstractButton = static_cast(src); } QMetaObject* QRadioButton_MetaObject(const QRadioButton* self) { diff --git a/qt6/gen_qradiobutton.go b/qt6/gen_qradiobutton.go index 0e6da31a..c3474f47 100644 --- a/qt6/gen_qradiobutton.go +++ b/qt6/gen_qradiobutton.go @@ -35,48 +35,34 @@ func (this *QRadioButton) UnsafePointer() unsafe.Pointer { } // newQRadioButton constructs the type using only CGO pointers. -func newQRadioButton(h *C.QRadioButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QRadioButton { +func newQRadioButton(h *C.QRadioButton) *QRadioButton { if h == nil { return nil } + var outptr_QAbstractButton *C.QAbstractButton = nil + C.QRadioButton_virtbase(h, &outptr_QAbstractButton) + return &QRadioButton{h: h, - QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractButton: newQAbstractButton(outptr_QAbstractButton)} } // UnsafeNewQRadioButton constructs the type using only unsafe pointers. -func UnsafeNewQRadioButton(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QRadioButton { - if h == nil { - return nil - } - - return &QRadioButton{h: (*C.QRadioButton)(h), - QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQRadioButton(h unsafe.Pointer) *QRadioButton { + return newQRadioButton((*C.QRadioButton)(h)) } // NewQRadioButton constructs a new QRadioButton object. func NewQRadioButton(parent *QWidget) *QRadioButton { - var outptr_QRadioButton *C.QRadioButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRadioButton_new(parent.cPointer(), &outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQRadioButton(C.QRadioButton_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQRadioButton2 constructs a new QRadioButton object. func NewQRadioButton2() *QRadioButton { - var outptr_QRadioButton *C.QRadioButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRadioButton_new2(&outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQRadioButton(C.QRadioButton_new2()) ret.isSubclass = true return ret } @@ -87,14 +73,8 @@ func NewQRadioButton3(text string) *QRadioButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QRadioButton *C.QRadioButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRadioButton_new3(text_ms, &outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQRadioButton(C.QRadioButton_new3(text_ms)) ret.isSubclass = true return ret } @@ -105,14 +85,8 @@ func NewQRadioButton4(text string, parent *QWidget) *QRadioButton { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QRadioButton *C.QRadioButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRadioButton_new4(text_ms, parent.cPointer(), &outptr_QRadioButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQRadioButton(outptr_QRadioButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQRadioButton(C.QRadioButton_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -300,7 +274,7 @@ func miqt_exec_callback_QRadioButton_PaintEvent(self *C.QRadioButton, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QRadioButton{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -326,7 +300,7 @@ func miqt_exec_callback_QRadioButton_MouseMoveEvent(self *C.QRadioButton, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QRadioButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -352,7 +326,7 @@ func miqt_exec_callback_QRadioButton_InitStyleOption(self *C.QRadioButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionButton(button, nil) + slotval1 := newQStyleOptionButton(button) gofunc((&QRadioButton{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -424,7 +398,7 @@ func miqt_exec_callback_QRadioButton_KeyPressEvent(self *C.QRadioButton, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QRadioButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -450,7 +424,7 @@ func miqt_exec_callback_QRadioButton_KeyReleaseEvent(self *C.QRadioButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QRadioButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -476,7 +450,7 @@ func miqt_exec_callback_QRadioButton_MousePressEvent(self *C.QRadioButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QRadioButton{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -502,7 +476,7 @@ func miqt_exec_callback_QRadioButton_MouseReleaseEvent(self *C.QRadioButton, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QRadioButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -528,7 +502,7 @@ func miqt_exec_callback_QRadioButton_FocusInEvent(self *C.QRadioButton, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QRadioButton{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -554,7 +528,7 @@ func miqt_exec_callback_QRadioButton_FocusOutEvent(self *C.QRadioButton, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QRadioButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -606,7 +580,7 @@ func miqt_exec_callback_QRadioButton_TimerEvent(self *C.QRadioButton, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QRadioButton{h: self}).callVirtualBase_TimerEvent, slotval1) diff --git a/qt6/gen_qradiobutton.h b/qt6/gen_qradiobutton.h index 4481b001..534138c4 100644 --- a/qt6/gen_qradiobutton.h +++ b/qt6/gen_qradiobutton.h @@ -48,10 +48,11 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QRadioButton_new(QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QRadioButton_new2(QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QRadioButton_new3(struct miqt_string text, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QRadioButton_new4(struct miqt_string text, QWidget* parent, QRadioButton** outptr_QRadioButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QRadioButton* QRadioButton_new(QWidget* parent); +QRadioButton* QRadioButton_new2(); +QRadioButton* QRadioButton_new3(struct miqt_string text); +QRadioButton* QRadioButton_new4(struct miqt_string text, QWidget* parent); +void QRadioButton_virtbase(QRadioButton* src, QAbstractButton** outptr_QAbstractButton); QMetaObject* QRadioButton_MetaObject(const QRadioButton* self); void* QRadioButton_Metacast(QRadioButton* self, const char* param1); struct miqt_string QRadioButton_Tr(const char* s); diff --git a/qt6/gen_qrandom.cpp b/qt6/gen_qrandom.cpp index 6e4d36ae..bcf7daf5 100644 --- a/qt6/gen_qrandom.cpp +++ b/qt6/gen_qrandom.cpp @@ -4,29 +4,24 @@ #include "gen_qrandom.h" #include "_cgo_export.h" -void QRandomGenerator_new(QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator* ret = new QRandomGenerator(); - *outptr_QRandomGenerator = ret; +QRandomGenerator* QRandomGenerator_new() { + return new QRandomGenerator(); } -void QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator* ret = new QRandomGenerator(static_cast(seedBuffer), (qsizetype)(lenVal)); - *outptr_QRandomGenerator = ret; +QRandomGenerator* QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal) { + return new QRandomGenerator(static_cast(seedBuffer), (qsizetype)(lenVal)); } -void QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator* ret = new QRandomGenerator(static_cast(begin), static_cast(end)); - *outptr_QRandomGenerator = ret; +QRandomGenerator* QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end) { + return new QRandomGenerator(static_cast(begin), static_cast(end)); } -void QRandomGenerator_new4(QRandomGenerator* other, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator* ret = new QRandomGenerator(*other); - *outptr_QRandomGenerator = ret; +QRandomGenerator* QRandomGenerator_new4(QRandomGenerator* other) { + return new QRandomGenerator(*other); } -void QRandomGenerator_new5(unsigned int seedValue, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator* ret = new QRandomGenerator(static_cast(seedValue)); - *outptr_QRandomGenerator = ret; +QRandomGenerator* QRandomGenerator_new5(unsigned int seedValue) { + return new QRandomGenerator(static_cast(seedValue)); } void QRandomGenerator_OperatorAssign(QRandomGenerator* self, QRandomGenerator* other) { @@ -160,40 +155,32 @@ void QRandomGenerator_Delete(QRandomGenerator* self, bool isSubclass) { } } -void QRandomGenerator64_new(QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator64* ret = new QRandomGenerator64(); - *outptr_QRandomGenerator64 = ret; - *outptr_QRandomGenerator = static_cast(ret); +QRandomGenerator64* QRandomGenerator64_new() { + return new QRandomGenerator64(); } -void QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator64* ret = new QRandomGenerator64(static_cast(seedBuffer), (qsizetype)(lenVal)); - *outptr_QRandomGenerator64 = ret; - *outptr_QRandomGenerator = static_cast(ret); +QRandomGenerator64* QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal) { + return new QRandomGenerator64(static_cast(seedBuffer), (qsizetype)(lenVal)); } -void QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator64* ret = new QRandomGenerator64(static_cast(begin), static_cast(end)); - *outptr_QRandomGenerator64 = ret; - *outptr_QRandomGenerator = static_cast(ret); +QRandomGenerator64* QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end) { + return new QRandomGenerator64(static_cast(begin), static_cast(end)); } -void QRandomGenerator64_new4(QRandomGenerator* other, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator64* ret = new QRandomGenerator64(*other); - *outptr_QRandomGenerator64 = ret; - *outptr_QRandomGenerator = static_cast(ret); +QRandomGenerator64* QRandomGenerator64_new4(QRandomGenerator* other) { + return new QRandomGenerator64(*other); } -void QRandomGenerator64_new5(QRandomGenerator64* param1, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator64* ret = new QRandomGenerator64(*param1); - *outptr_QRandomGenerator64 = ret; - *outptr_QRandomGenerator = static_cast(ret); +QRandomGenerator64* QRandomGenerator64_new5(QRandomGenerator64* param1) { + return new QRandomGenerator64(*param1); } -void QRandomGenerator64_new6(unsigned int seedValue, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator) { - QRandomGenerator64* ret = new QRandomGenerator64(static_cast(seedValue)); - *outptr_QRandomGenerator64 = ret; - *outptr_QRandomGenerator = static_cast(ret); +QRandomGenerator64* QRandomGenerator64_new6(unsigned int seedValue) { + return new QRandomGenerator64(static_cast(seedValue)); +} + +void QRandomGenerator64_virtbase(QRandomGenerator64* src, QRandomGenerator** outptr_QRandomGenerator) { + *outptr_QRandomGenerator = static_cast(src); } unsigned long long QRandomGenerator64_Generate(QRandomGenerator64* self) { diff --git a/qt6/gen_qrandom.go b/qt6/gen_qrandom.go index 4c505759..63b5a0bc 100644 --- a/qt6/gen_qrandom.go +++ b/qt6/gen_qrandom.go @@ -37,64 +37,51 @@ func newQRandomGenerator(h *C.QRandomGenerator) *QRandomGenerator { if h == nil { return nil } + return &QRandomGenerator{h: h} } // UnsafeNewQRandomGenerator constructs the type using only unsafe pointers. func UnsafeNewQRandomGenerator(h unsafe.Pointer) *QRandomGenerator { - if h == nil { - return nil - } - - return &QRandomGenerator{h: (*C.QRandomGenerator)(h)} + return newQRandomGenerator((*C.QRandomGenerator)(h)) } // NewQRandomGenerator constructs a new QRandomGenerator object. func NewQRandomGenerator() *QRandomGenerator { - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator_new(&outptr_QRandomGenerator) - ret := newQRandomGenerator(outptr_QRandomGenerator) + ret := newQRandomGenerator(C.QRandomGenerator_new()) ret.isSubclass = true return ret } // NewQRandomGenerator2 constructs a new QRandomGenerator object. func NewQRandomGenerator2(seedBuffer *uint, lenVal int64) *QRandomGenerator { - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal), &outptr_QRandomGenerator) - ret := newQRandomGenerator(outptr_QRandomGenerator) + ret := newQRandomGenerator(C.QRandomGenerator_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal))) ret.isSubclass = true return ret } // NewQRandomGenerator3 constructs a new QRandomGenerator object. func NewQRandomGenerator3(begin *uint, end *uint) *QRandomGenerator { - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end)), &outptr_QRandomGenerator) - ret := newQRandomGenerator(outptr_QRandomGenerator) + ret := newQRandomGenerator(C.QRandomGenerator_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end)))) ret.isSubclass = true return ret } // NewQRandomGenerator4 constructs a new QRandomGenerator object. func NewQRandomGenerator4(other *QRandomGenerator) *QRandomGenerator { - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator_new4(other.cPointer(), &outptr_QRandomGenerator) - ret := newQRandomGenerator(outptr_QRandomGenerator) + ret := newQRandomGenerator(C.QRandomGenerator_new4(other.cPointer())) ret.isSubclass = true return ret } // NewQRandomGenerator5 constructs a new QRandomGenerator object. func NewQRandomGenerator5(seedValue uint) *QRandomGenerator { - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator_new5((C.uint)(seedValue), &outptr_QRandomGenerator) - ret := newQRandomGenerator(outptr_QRandomGenerator) + ret := newQRandomGenerator(C.QRandomGenerator_new5((C.uint)(seedValue))) ret.isSubclass = true return ret } @@ -244,86 +231,66 @@ func (this *QRandomGenerator64) UnsafePointer() unsafe.Pointer { } // newQRandomGenerator64 constructs the type using only CGO pointers. -func newQRandomGenerator64(h *C.QRandomGenerator64, h_QRandomGenerator *C.QRandomGenerator) *QRandomGenerator64 { +func newQRandomGenerator64(h *C.QRandomGenerator64) *QRandomGenerator64 { if h == nil { return nil } + var outptr_QRandomGenerator *C.QRandomGenerator = nil + C.QRandomGenerator64_virtbase(h, &outptr_QRandomGenerator) + return &QRandomGenerator64{h: h, - QRandomGenerator: newQRandomGenerator(h_QRandomGenerator)} + QRandomGenerator: newQRandomGenerator(outptr_QRandomGenerator)} } // UnsafeNewQRandomGenerator64 constructs the type using only unsafe pointers. -func UnsafeNewQRandomGenerator64(h unsafe.Pointer, h_QRandomGenerator unsafe.Pointer) *QRandomGenerator64 { - if h == nil { - return nil - } - - return &QRandomGenerator64{h: (*C.QRandomGenerator64)(h), - QRandomGenerator: UnsafeNewQRandomGenerator(h_QRandomGenerator)} +func UnsafeNewQRandomGenerator64(h unsafe.Pointer) *QRandomGenerator64 { + return newQRandomGenerator64((*C.QRandomGenerator64)(h)) } // NewQRandomGenerator64 constructs a new QRandomGenerator64 object. func NewQRandomGenerator64() *QRandomGenerator64 { - var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator64_new(&outptr_QRandomGenerator64, &outptr_QRandomGenerator) - ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret := newQRandomGenerator64(C.QRandomGenerator64_new()) ret.isSubclass = true return ret } // NewQRandomGenerator642 constructs a new QRandomGenerator64 object. func NewQRandomGenerator642(seedBuffer *uint, lenVal int64) *QRandomGenerator64 { - var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator64_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) - ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret := newQRandomGenerator64(C.QRandomGenerator64_new2((*C.uint)(unsafe.Pointer(seedBuffer)), (C.ptrdiff_t)(lenVal))) ret.isSubclass = true return ret } // NewQRandomGenerator643 constructs a new QRandomGenerator64 object. func NewQRandomGenerator643(begin *uint, end *uint) *QRandomGenerator64 { - var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator64_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end)), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) - ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret := newQRandomGenerator64(C.QRandomGenerator64_new3((*C.uint)(unsafe.Pointer(begin)), (*C.uint)(unsafe.Pointer(end)))) ret.isSubclass = true return ret } // NewQRandomGenerator644 constructs a new QRandomGenerator64 object. func NewQRandomGenerator644(other *QRandomGenerator) *QRandomGenerator64 { - var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator64_new4(other.cPointer(), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) - ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret := newQRandomGenerator64(C.QRandomGenerator64_new4(other.cPointer())) ret.isSubclass = true return ret } // NewQRandomGenerator645 constructs a new QRandomGenerator64 object. func NewQRandomGenerator645(param1 *QRandomGenerator64) *QRandomGenerator64 { - var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator64_new5(param1.cPointer(), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) - ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret := newQRandomGenerator64(C.QRandomGenerator64_new5(param1.cPointer())) ret.isSubclass = true return ret } // NewQRandomGenerator646 constructs a new QRandomGenerator64 object. func NewQRandomGenerator646(seedValue uint) *QRandomGenerator64 { - var outptr_QRandomGenerator64 *C.QRandomGenerator64 = nil - var outptr_QRandomGenerator *C.QRandomGenerator = nil - C.QRandomGenerator64_new6((C.uint)(seedValue), &outptr_QRandomGenerator64, &outptr_QRandomGenerator) - ret := newQRandomGenerator64(outptr_QRandomGenerator64, outptr_QRandomGenerator) + ret := newQRandomGenerator64(C.QRandomGenerator64_new6((C.uint)(seedValue))) ret.isSubclass = true return ret } @@ -349,15 +316,15 @@ func QRandomGenerator64_Max() uint64 { } func QRandomGenerator64_System() *QRandomGenerator64 { - return newQRandomGenerator64(C.QRandomGenerator64_System(), nil) + return newQRandomGenerator64(C.QRandomGenerator64_System()) } func QRandomGenerator64_Global() *QRandomGenerator64 { - return newQRandomGenerator64(C.QRandomGenerator64_Global(), nil) + return newQRandomGenerator64(C.QRandomGenerator64_Global()) } func QRandomGenerator64_SecurelySeeded() *QRandomGenerator64 { - _goptr := newQRandomGenerator64(C.QRandomGenerator64_SecurelySeeded(), nil) + _goptr := newQRandomGenerator64(C.QRandomGenerator64_SecurelySeeded()) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/gen_qrandom.h b/qt6/gen_qrandom.h index 3a20f9b9..a8fa6e7c 100644 --- a/qt6/gen_qrandom.h +++ b/qt6/gen_qrandom.h @@ -22,11 +22,11 @@ typedef struct QRandomGenerator QRandomGenerator; typedef struct QRandomGenerator64 QRandomGenerator64; #endif -void QRandomGenerator_new(QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator_new4(QRandomGenerator* other, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator_new5(unsigned int seedValue, QRandomGenerator** outptr_QRandomGenerator); +QRandomGenerator* QRandomGenerator_new(); +QRandomGenerator* QRandomGenerator_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal); +QRandomGenerator* QRandomGenerator_new3(const unsigned int* begin, const unsigned int* end); +QRandomGenerator* QRandomGenerator_new4(QRandomGenerator* other); +QRandomGenerator* QRandomGenerator_new5(unsigned int seedValue); void QRandomGenerator_OperatorAssign(QRandomGenerator* self, QRandomGenerator* other); unsigned int QRandomGenerator_Generate(QRandomGenerator* self); unsigned long long QRandomGenerator_Generate64(QRandomGenerator* self); @@ -56,12 +56,13 @@ QRandomGenerator* QRandomGenerator_SecurelySeeded(); void QRandomGenerator_Seed1(QRandomGenerator* self, unsigned int s); void QRandomGenerator_Delete(QRandomGenerator* self, bool isSubclass); -void QRandomGenerator64_new(QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator64_new4(QRandomGenerator* other, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator64_new5(QRandomGenerator64* param1, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); -void QRandomGenerator64_new6(unsigned int seedValue, QRandomGenerator64** outptr_QRandomGenerator64, QRandomGenerator** outptr_QRandomGenerator); +QRandomGenerator64* QRandomGenerator64_new(); +QRandomGenerator64* QRandomGenerator64_new2(const unsigned int* seedBuffer, ptrdiff_t lenVal); +QRandomGenerator64* QRandomGenerator64_new3(const unsigned int* begin, const unsigned int* end); +QRandomGenerator64* QRandomGenerator64_new4(QRandomGenerator* other); +QRandomGenerator64* QRandomGenerator64_new5(QRandomGenerator64* param1); +QRandomGenerator64* QRandomGenerator64_new6(unsigned int seedValue); +void QRandomGenerator64_virtbase(QRandomGenerator64* src, QRandomGenerator** outptr_QRandomGenerator); unsigned long long QRandomGenerator64_Generate(QRandomGenerator64* self); unsigned long long QRandomGenerator64_OperatorCall(QRandomGenerator64* self); void QRandomGenerator64_Discard(QRandomGenerator64* self, unsigned long long z); diff --git a/qt6/gen_qrasterwindow.cpp b/qt6/gen_qrasterwindow.cpp index 78d9e165..32fd1410 100644 --- a/qt6/gen_qrasterwindow.cpp +++ b/qt6/gen_qrasterwindow.cpp @@ -144,24 +144,16 @@ public: }; -void QRasterWindow_new(QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQRasterWindow* ret = new MiqtVirtualQRasterWindow(); - *outptr_QRasterWindow = ret; - *outptr_QPaintDeviceWindow = static_cast(ret); - *outptr_QWindow = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QRasterWindow* QRasterWindow_new() { + return new MiqtVirtualQRasterWindow(); } -void QRasterWindow_new2(QWindow* parent, QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQRasterWindow* ret = new MiqtVirtualQRasterWindow(parent); - *outptr_QRasterWindow = ret; - *outptr_QPaintDeviceWindow = static_cast(ret); - *outptr_QWindow = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QRasterWindow* QRasterWindow_new2(QWindow* parent) { + return new MiqtVirtualQRasterWindow(parent); +} + +void QRasterWindow_virtbase(QRasterWindow* src, QPaintDeviceWindow** outptr_QPaintDeviceWindow) { + *outptr_QPaintDeviceWindow = static_cast(src); } QMetaObject* QRasterWindow_MetaObject(const QRasterWindow* self) { diff --git a/qt6/gen_qrasterwindow.go b/qt6/gen_qrasterwindow.go index 36d59779..01ab52fe 100644 --- a/qt6/gen_qrasterwindow.go +++ b/qt6/gen_qrasterwindow.go @@ -35,50 +35,34 @@ func (this *QRasterWindow) UnsafePointer() unsafe.Pointer { } // newQRasterWindow constructs the type using only CGO pointers. -func newQRasterWindow(h *C.QRasterWindow, h_QPaintDeviceWindow *C.QPaintDeviceWindow, h_QWindow *C.QWindow, h_QObject *C.QObject, h_QSurface *C.QSurface, h_QPaintDevice *C.QPaintDevice) *QRasterWindow { +func newQRasterWindow(h *C.QRasterWindow) *QRasterWindow { if h == nil { return nil } + var outptr_QPaintDeviceWindow *C.QPaintDeviceWindow = nil + C.QRasterWindow_virtbase(h, &outptr_QPaintDeviceWindow) + return &QRasterWindow{h: h, - QPaintDeviceWindow: newQPaintDeviceWindow(h_QPaintDeviceWindow, h_QWindow, h_QObject, h_QSurface, h_QPaintDevice)} + QPaintDeviceWindow: newQPaintDeviceWindow(outptr_QPaintDeviceWindow)} } // UnsafeNewQRasterWindow constructs the type using only unsafe pointers. -func UnsafeNewQRasterWindow(h unsafe.Pointer, h_QPaintDeviceWindow unsafe.Pointer, h_QWindow unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QRasterWindow { - if h == nil { - return nil - } - - return &QRasterWindow{h: (*C.QRasterWindow)(h), - QPaintDeviceWindow: UnsafeNewQPaintDeviceWindow(h_QPaintDeviceWindow, h_QWindow, h_QObject, h_QSurface, h_QPaintDevice)} +func UnsafeNewQRasterWindow(h unsafe.Pointer) *QRasterWindow { + return newQRasterWindow((*C.QRasterWindow)(h)) } // NewQRasterWindow constructs a new QRasterWindow object. func NewQRasterWindow() *QRasterWindow { - var outptr_QRasterWindow *C.QRasterWindow = nil - var outptr_QPaintDeviceWindow *C.QPaintDeviceWindow = nil - var outptr_QWindow *C.QWindow = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRasterWindow_new(&outptr_QRasterWindow, &outptr_QPaintDeviceWindow, &outptr_QWindow, &outptr_QObject, &outptr_QSurface, &outptr_QPaintDevice) - ret := newQRasterWindow(outptr_QRasterWindow, outptr_QPaintDeviceWindow, outptr_QWindow, outptr_QObject, outptr_QSurface, outptr_QPaintDevice) + ret := newQRasterWindow(C.QRasterWindow_new()) ret.isSubclass = true return ret } // NewQRasterWindow2 constructs a new QRasterWindow object. func NewQRasterWindow2(parent *QWindow) *QRasterWindow { - var outptr_QRasterWindow *C.QRasterWindow = nil - var outptr_QPaintDeviceWindow *C.QPaintDeviceWindow = nil - var outptr_QWindow *C.QWindow = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRasterWindow_new2(parent.cPointer(), &outptr_QRasterWindow, &outptr_QPaintDeviceWindow, &outptr_QWindow, &outptr_QObject, &outptr_QSurface, &outptr_QPaintDevice) - ret := newQRasterWindow(outptr_QRasterWindow, outptr_QPaintDeviceWindow, outptr_QWindow, outptr_QObject, outptr_QSurface, outptr_QPaintDevice) + ret := newQRasterWindow(C.QRasterWindow_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -200,7 +184,7 @@ func miqt_exec_callback_QRasterWindow_ExposeEvent(self *C.QRasterWindow, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQExposeEvent(param1, nil) + slotval1 := newQExposeEvent(param1) gofunc((&QRasterWindow{h: self}).callVirtualBase_ExposeEvent, slotval1) @@ -226,7 +210,7 @@ func miqt_exec_callback_QRasterWindow_PaintEvent(self *C.QRasterWindow, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QRasterWindow{h: self}).callVirtualBase_PaintEvent, slotval1) diff --git a/qt6/gen_qrasterwindow.h b/qt6/gen_qrasterwindow.h index 2cc1f00f..ea81503b 100644 --- a/qt6/gen_qrasterwindow.h +++ b/qt6/gen_qrasterwindow.h @@ -40,8 +40,9 @@ typedef struct QSurface QSurface; typedef struct QWindow QWindow; #endif -void QRasterWindow_new(QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice); -void QRasterWindow_new2(QWindow* parent, QRasterWindow** outptr_QRasterWindow, QPaintDeviceWindow** outptr_QPaintDeviceWindow, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface, QPaintDevice** outptr_QPaintDevice); +QRasterWindow* QRasterWindow_new(); +QRasterWindow* QRasterWindow_new2(QWindow* parent); +void QRasterWindow_virtbase(QRasterWindow* src, QPaintDeviceWindow** outptr_QPaintDeviceWindow); QMetaObject* QRasterWindow_MetaObject(const QRasterWindow* self); void* QRasterWindow_Metacast(QRasterWindow* self, const char* param1); struct miqt_string QRasterWindow_Tr(const char* s); diff --git a/qt6/gen_qrawfont.cpp b/qt6/gen_qrawfont.cpp index 8e35dc73..e336f688 100644 --- a/qt6/gen_qrawfont.cpp +++ b/qt6/gen_qrawfont.cpp @@ -15,38 +15,32 @@ #include "gen_qrawfont.h" #include "_cgo_export.h" -void QRawFont_new(QRawFont** outptr_QRawFont) { - QRawFont* ret = new QRawFont(); - *outptr_QRawFont = ret; +QRawFont* QRawFont_new() { + return new QRawFont(); } -void QRawFont_new2(struct miqt_string fileName, double pixelSize, QRawFont** outptr_QRawFont) { +QRawFont* QRawFont_new2(struct miqt_string fileName, double pixelSize) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QRawFont* ret = new QRawFont(fileName_QString, static_cast(pixelSize)); - *outptr_QRawFont = ret; + return new QRawFont(fileName_QString, static_cast(pixelSize)); } -void QRawFont_new3(struct miqt_string fontData, double pixelSize, QRawFont** outptr_QRawFont) { +QRawFont* QRawFont_new3(struct miqt_string fontData, double pixelSize) { QByteArray fontData_QByteArray(fontData.data, fontData.len); - QRawFont* ret = new QRawFont(fontData_QByteArray, static_cast(pixelSize)); - *outptr_QRawFont = ret; + return new QRawFont(fontData_QByteArray, static_cast(pixelSize)); } -void QRawFont_new4(QRawFont* other, QRawFont** outptr_QRawFont) { - QRawFont* ret = new QRawFont(*other); - *outptr_QRawFont = ret; +QRawFont* QRawFont_new4(QRawFont* other) { + return new QRawFont(*other); } -void QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont) { +QRawFont* QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QRawFont* ret = new QRawFont(fileName_QString, static_cast(pixelSize), static_cast(hintingPreference)); - *outptr_QRawFont = ret; + return new QRawFont(fileName_QString, static_cast(pixelSize), static_cast(hintingPreference)); } -void QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont) { +QRawFont* QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference) { QByteArray fontData_QByteArray(fontData.data, fontData.len); - QRawFont* ret = new QRawFont(fontData_QByteArray, static_cast(pixelSize), static_cast(hintingPreference)); - *outptr_QRawFont = ret; + return new QRawFont(fontData_QByteArray, static_cast(pixelSize), static_cast(hintingPreference)); } void QRawFont_OperatorAssign(QRawFont* self, QRawFont* other) { diff --git a/qt6/gen_qrawfont.go b/qt6/gen_qrawfont.go index 397accb8..1bab9d57 100644 --- a/qt6/gen_qrawfont.go +++ b/qt6/gen_qrawfont.go @@ -52,24 +52,19 @@ func newQRawFont(h *C.QRawFont) *QRawFont { if h == nil { return nil } + return &QRawFont{h: h} } // UnsafeNewQRawFont constructs the type using only unsafe pointers. func UnsafeNewQRawFont(h unsafe.Pointer) *QRawFont { - if h == nil { - return nil - } - - return &QRawFont{h: (*C.QRawFont)(h)} + return newQRawFont((*C.QRawFont)(h)) } // NewQRawFont constructs a new QRawFont object. func NewQRawFont() *QRawFont { - var outptr_QRawFont *C.QRawFont = nil - C.QRawFont_new(&outptr_QRawFont) - ret := newQRawFont(outptr_QRawFont) + ret := newQRawFont(C.QRawFont_new()) ret.isSubclass = true return ret } @@ -80,10 +75,8 @@ func NewQRawFont2(fileName string, pixelSize float64) *QRawFont { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QRawFont *C.QRawFont = nil - C.QRawFont_new2(fileName_ms, (C.double)(pixelSize), &outptr_QRawFont) - ret := newQRawFont(outptr_QRawFont) + ret := newQRawFont(C.QRawFont_new2(fileName_ms, (C.double)(pixelSize))) ret.isSubclass = true return ret } @@ -93,20 +86,16 @@ func NewQRawFont3(fontData []byte, pixelSize float64) *QRawFont { fontData_alias := C.struct_miqt_string{} fontData_alias.data = (*C.char)(unsafe.Pointer(&fontData[0])) fontData_alias.len = C.size_t(len(fontData)) - var outptr_QRawFont *C.QRawFont = nil - C.QRawFont_new3(fontData_alias, (C.double)(pixelSize), &outptr_QRawFont) - ret := newQRawFont(outptr_QRawFont) + ret := newQRawFont(C.QRawFont_new3(fontData_alias, (C.double)(pixelSize))) ret.isSubclass = true return ret } // NewQRawFont4 constructs a new QRawFont object. func NewQRawFont4(other *QRawFont) *QRawFont { - var outptr_QRawFont *C.QRawFont = nil - C.QRawFont_new4(other.cPointer(), &outptr_QRawFont) - ret := newQRawFont(outptr_QRawFont) + ret := newQRawFont(C.QRawFont_new4(other.cPointer())) ret.isSubclass = true return ret } @@ -117,10 +106,8 @@ func NewQRawFont5(fileName string, pixelSize float64, hintingPreference QFont__H fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QRawFont *C.QRawFont = nil - C.QRawFont_new5(fileName_ms, (C.double)(pixelSize), (C.int)(hintingPreference), &outptr_QRawFont) - ret := newQRawFont(outptr_QRawFont) + ret := newQRawFont(C.QRawFont_new5(fileName_ms, (C.double)(pixelSize), (C.int)(hintingPreference))) ret.isSubclass = true return ret } @@ -130,10 +117,8 @@ func NewQRawFont6(fontData []byte, pixelSize float64, hintingPreference QFont__H fontData_alias := C.struct_miqt_string{} fontData_alias.data = (*C.char)(unsafe.Pointer(&fontData[0])) fontData_alias.len = C.size_t(len(fontData)) - var outptr_QRawFont *C.QRawFont = nil - C.QRawFont_new6(fontData_alias, (C.double)(pixelSize), (C.int)(hintingPreference), &outptr_QRawFont) - ret := newQRawFont(outptr_QRawFont) + ret := newQRawFont(C.QRawFont_new6(fontData_alias, (C.double)(pixelSize), (C.int)(hintingPreference))) ret.isSubclass = true return ret } @@ -243,7 +228,7 @@ func (this *QRawFont) AdvancesForGlyphIndexes4(glyphIndexes *uint, advances *QPo } func (this *QRawFont) AlphaMapForGlyph(glyphIndex uint) *QImage { - _goptr := newQImage(C.QRawFont_AlphaMapForGlyph(this.h, (C.uint)(glyphIndex)), nil) + _goptr := newQImage(C.QRawFont_AlphaMapForGlyph(this.h, (C.uint)(glyphIndex))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -361,13 +346,13 @@ func QRawFont_FromFont(font *QFont) *QRawFont { } func (this *QRawFont) AlphaMapForGlyph2(glyphIndex uint, antialiasingType QRawFont__AntialiasingType) *QImage { - _goptr := newQImage(C.QRawFont_AlphaMapForGlyph2(this.h, (C.uint)(glyphIndex), (C.int)(antialiasingType)), nil) + _goptr := newQImage(C.QRawFont_AlphaMapForGlyph2(this.h, (C.uint)(glyphIndex), (C.int)(antialiasingType))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QRawFont) AlphaMapForGlyph3(glyphIndex uint, antialiasingType QRawFont__AntialiasingType, transform *QTransform) *QImage { - _goptr := newQImage(C.QRawFont_AlphaMapForGlyph3(this.h, (C.uint)(glyphIndex), (C.int)(antialiasingType), transform.cPointer()), nil) + _goptr := newQImage(C.QRawFont_AlphaMapForGlyph3(this.h, (C.uint)(glyphIndex), (C.int)(antialiasingType), transform.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/gen_qrawfont.h b/qt6/gen_qrawfont.h index 205642eb..bd346535 100644 --- a/qt6/gen_qrawfont.h +++ b/qt6/gen_qrawfont.h @@ -34,12 +34,12 @@ typedef struct QRectF QRectF; typedef struct QTransform QTransform; #endif -void QRawFont_new(QRawFont** outptr_QRawFont); -void QRawFont_new2(struct miqt_string fileName, double pixelSize, QRawFont** outptr_QRawFont); -void QRawFont_new3(struct miqt_string fontData, double pixelSize, QRawFont** outptr_QRawFont); -void QRawFont_new4(QRawFont* other, QRawFont** outptr_QRawFont); -void QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont); -void QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference, QRawFont** outptr_QRawFont); +QRawFont* QRawFont_new(); +QRawFont* QRawFont_new2(struct miqt_string fileName, double pixelSize); +QRawFont* QRawFont_new3(struct miqt_string fontData, double pixelSize); +QRawFont* QRawFont_new4(QRawFont* other); +QRawFont* QRawFont_new5(struct miqt_string fileName, double pixelSize, int hintingPreference); +QRawFont* QRawFont_new6(struct miqt_string fontData, double pixelSize, int hintingPreference); void QRawFont_OperatorAssign(QRawFont* self, QRawFont* other); void QRawFont_Swap(QRawFont* self, QRawFont* other); bool QRawFont_IsValid(const QRawFont* self); diff --git a/qt6/gen_qreadwritelock.cpp b/qt6/gen_qreadwritelock.cpp index 67011be5..7cb17962 100644 --- a/qt6/gen_qreadwritelock.cpp +++ b/qt6/gen_qreadwritelock.cpp @@ -5,14 +5,12 @@ #include "gen_qreadwritelock.h" #include "_cgo_export.h" -void QReadWriteLock_new(QReadWriteLock** outptr_QReadWriteLock) { - QReadWriteLock* ret = new QReadWriteLock(); - *outptr_QReadWriteLock = ret; +QReadWriteLock* QReadWriteLock_new() { + return new QReadWriteLock(); } -void QReadWriteLock_new2(int recursionMode, QReadWriteLock** outptr_QReadWriteLock) { - QReadWriteLock* ret = new QReadWriteLock(static_cast(recursionMode)); - *outptr_QReadWriteLock = ret; +QReadWriteLock* QReadWriteLock_new2(int recursionMode) { + return new QReadWriteLock(static_cast(recursionMode)); } void QReadWriteLock_LockForRead(QReadWriteLock* self) { @@ -51,9 +49,8 @@ void QReadWriteLock_Delete(QReadWriteLock* self, bool isSubclass) { } } -void QReadLocker_new(QReadWriteLock* readWriteLock, QReadLocker** outptr_QReadLocker) { - QReadLocker* ret = new QReadLocker(readWriteLock); - *outptr_QReadLocker = ret; +QReadLocker* QReadLocker_new(QReadWriteLock* readWriteLock) { + return new QReadLocker(readWriteLock); } void QReadLocker_Unlock(QReadLocker* self) { @@ -76,9 +73,8 @@ void QReadLocker_Delete(QReadLocker* self, bool isSubclass) { } } -void QWriteLocker_new(QReadWriteLock* readWriteLock, QWriteLocker** outptr_QWriteLocker) { - QWriteLocker* ret = new QWriteLocker(readWriteLock); - *outptr_QWriteLocker = ret; +QWriteLocker* QWriteLocker_new(QReadWriteLock* readWriteLock) { + return new QWriteLocker(readWriteLock); } void QWriteLocker_Unlock(QWriteLocker* self) { diff --git a/qt6/gen_qreadwritelock.go b/qt6/gen_qreadwritelock.go index ae60ae98..7ce9c103 100644 --- a/qt6/gen_qreadwritelock.go +++ b/qt6/gen_qreadwritelock.go @@ -44,34 +44,27 @@ func newQReadWriteLock(h *C.QReadWriteLock) *QReadWriteLock { if h == nil { return nil } + return &QReadWriteLock{h: h} } // UnsafeNewQReadWriteLock constructs the type using only unsafe pointers. func UnsafeNewQReadWriteLock(h unsafe.Pointer) *QReadWriteLock { - if h == nil { - return nil - } - - return &QReadWriteLock{h: (*C.QReadWriteLock)(h)} + return newQReadWriteLock((*C.QReadWriteLock)(h)) } // NewQReadWriteLock constructs a new QReadWriteLock object. func NewQReadWriteLock() *QReadWriteLock { - var outptr_QReadWriteLock *C.QReadWriteLock = nil - C.QReadWriteLock_new(&outptr_QReadWriteLock) - ret := newQReadWriteLock(outptr_QReadWriteLock) + ret := newQReadWriteLock(C.QReadWriteLock_new()) ret.isSubclass = true return ret } // NewQReadWriteLock2 constructs a new QReadWriteLock object. func NewQReadWriteLock2(recursionMode QReadWriteLock__RecursionMode) *QReadWriteLock { - var outptr_QReadWriteLock *C.QReadWriteLock = nil - C.QReadWriteLock_new2((C.int)(recursionMode), &outptr_QReadWriteLock) - ret := newQReadWriteLock(outptr_QReadWriteLock) + ret := newQReadWriteLock(C.QReadWriteLock_new2((C.int)(recursionMode))) ret.isSubclass = true return ret } @@ -142,24 +135,19 @@ func newQReadLocker(h *C.QReadLocker) *QReadLocker { if h == nil { return nil } + return &QReadLocker{h: h} } // UnsafeNewQReadLocker constructs the type using only unsafe pointers. func UnsafeNewQReadLocker(h unsafe.Pointer) *QReadLocker { - if h == nil { - return nil - } - - return &QReadLocker{h: (*C.QReadLocker)(h)} + return newQReadLocker((*C.QReadLocker)(h)) } // NewQReadLocker constructs a new QReadLocker object. func NewQReadLocker(readWriteLock *QReadWriteLock) *QReadLocker { - var outptr_QReadLocker *C.QReadLocker = nil - C.QReadLocker_new(readWriteLock.cPointer(), &outptr_QReadLocker) - ret := newQReadLocker(outptr_QReadLocker) + ret := newQReadLocker(C.QReadLocker_new(readWriteLock.cPointer())) ret.isSubclass = true return ret } @@ -214,24 +202,19 @@ func newQWriteLocker(h *C.QWriteLocker) *QWriteLocker { if h == nil { return nil } + return &QWriteLocker{h: h} } // UnsafeNewQWriteLocker constructs the type using only unsafe pointers. func UnsafeNewQWriteLocker(h unsafe.Pointer) *QWriteLocker { - if h == nil { - return nil - } - - return &QWriteLocker{h: (*C.QWriteLocker)(h)} + return newQWriteLocker((*C.QWriteLocker)(h)) } // NewQWriteLocker constructs a new QWriteLocker object. func NewQWriteLocker(readWriteLock *QReadWriteLock) *QWriteLocker { - var outptr_QWriteLocker *C.QWriteLocker = nil - C.QWriteLocker_new(readWriteLock.cPointer(), &outptr_QWriteLocker) - ret := newQWriteLocker(outptr_QWriteLocker) + ret := newQWriteLocker(C.QWriteLocker_new(readWriteLock.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qreadwritelock.h b/qt6/gen_qreadwritelock.h index fee0e264..136c1d56 100644 --- a/qt6/gen_qreadwritelock.h +++ b/qt6/gen_qreadwritelock.h @@ -24,8 +24,8 @@ typedef struct QReadWriteLock QReadWriteLock; typedef struct QWriteLocker QWriteLocker; #endif -void QReadWriteLock_new(QReadWriteLock** outptr_QReadWriteLock); -void QReadWriteLock_new2(int recursionMode, QReadWriteLock** outptr_QReadWriteLock); +QReadWriteLock* QReadWriteLock_new(); +QReadWriteLock* QReadWriteLock_new2(int recursionMode); void QReadWriteLock_LockForRead(QReadWriteLock* self); bool QReadWriteLock_TryLockForRead(QReadWriteLock* self); bool QReadWriteLock_TryLockForReadWithTimeout(QReadWriteLock* self, int timeout); @@ -35,13 +35,13 @@ bool QReadWriteLock_TryLockForWriteWithTimeout(QReadWriteLock* self, int timeout void QReadWriteLock_Unlock(QReadWriteLock* self); void QReadWriteLock_Delete(QReadWriteLock* self, bool isSubclass); -void QReadLocker_new(QReadWriteLock* readWriteLock, QReadLocker** outptr_QReadLocker); +QReadLocker* QReadLocker_new(QReadWriteLock* readWriteLock); void QReadLocker_Unlock(QReadLocker* self); void QReadLocker_Relock(QReadLocker* self); QReadWriteLock* QReadLocker_ReadWriteLock(const QReadLocker* self); void QReadLocker_Delete(QReadLocker* self, bool isSubclass); -void QWriteLocker_new(QReadWriteLock* readWriteLock, QWriteLocker** outptr_QWriteLocker); +QWriteLocker* QWriteLocker_new(QReadWriteLock* readWriteLock); void QWriteLocker_Unlock(QWriteLocker* self); void QWriteLocker_Relock(QWriteLocker* self); QReadWriteLock* QWriteLocker_ReadWriteLock(const QWriteLocker* self); diff --git a/qt6/gen_qrect.cpp b/qt6/gen_qrect.cpp index 949f1570..b53ce887 100644 --- a/qt6/gen_qrect.cpp +++ b/qt6/gen_qrect.cpp @@ -10,29 +10,24 @@ #include "gen_qrect.h" #include "_cgo_export.h" -void QRect_new(QRect** outptr_QRect) { - QRect* ret = new QRect(); - *outptr_QRect = ret; +QRect* QRect_new() { + return new QRect(); } -void QRect_new2(QPoint* topleft, QPoint* bottomright, QRect** outptr_QRect) { - QRect* ret = new QRect(*topleft, *bottomright); - *outptr_QRect = ret; +QRect* QRect_new2(QPoint* topleft, QPoint* bottomright) { + return new QRect(*topleft, *bottomright); } -void QRect_new3(QPoint* topleft, QSize* size, QRect** outptr_QRect) { - QRect* ret = new QRect(*topleft, *size); - *outptr_QRect = ret; +QRect* QRect_new3(QPoint* topleft, QSize* size) { + return new QRect(*topleft, *size); } -void QRect_new4(int left, int top, int width, int height, QRect** outptr_QRect) { - QRect* ret = new QRect(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); - *outptr_QRect = ret; +QRect* QRect_new4(int left, int top, int width, int height) { + return new QRect(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); } -void QRect_new5(QRect* param1, QRect** outptr_QRect) { - QRect* ret = new QRect(*param1); - *outptr_QRect = ret; +QRect* QRect_new5(QRect* param1) { + return new QRect(*param1); } bool QRect_IsNull(const QRect* self) { @@ -335,34 +330,28 @@ void QRect_Delete(QRect* self, bool isSubclass) { } } -void QRectF_new(QRectF** outptr_QRectF) { - QRectF* ret = new QRectF(); - *outptr_QRectF = ret; +QRectF* QRectF_new() { + return new QRectF(); } -void QRectF_new2(QPointF* topleft, QSizeF* size, QRectF** outptr_QRectF) { - QRectF* ret = new QRectF(*topleft, *size); - *outptr_QRectF = ret; +QRectF* QRectF_new2(QPointF* topleft, QSizeF* size) { + return new QRectF(*topleft, *size); } -void QRectF_new3(QPointF* topleft, QPointF* bottomRight, QRectF** outptr_QRectF) { - QRectF* ret = new QRectF(*topleft, *bottomRight); - *outptr_QRectF = ret; +QRectF* QRectF_new3(QPointF* topleft, QPointF* bottomRight) { + return new QRectF(*topleft, *bottomRight); } -void QRectF_new4(double left, double top, double width, double height, QRectF** outptr_QRectF) { - QRectF* ret = new QRectF(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); - *outptr_QRectF = ret; +QRectF* QRectF_new4(double left, double top, double width, double height) { + return new QRectF(static_cast(left), static_cast(top), static_cast(width), static_cast(height)); } -void QRectF_new5(QRect* rect, QRectF** outptr_QRectF) { - QRectF* ret = new QRectF(*rect); - *outptr_QRectF = ret; +QRectF* QRectF_new5(QRect* rect) { + return new QRectF(*rect); } -void QRectF_new6(QRectF* param1, QRectF** outptr_QRectF) { - QRectF* ret = new QRectF(*param1); - *outptr_QRectF = ret; +QRectF* QRectF_new6(QRectF* param1) { + return new QRectF(*param1); } bool QRectF_IsNull(const QRectF* self) { diff --git a/qt6/gen_qrect.go b/qt6/gen_qrect.go index 17d8e91b..cd5cf618 100644 --- a/qt6/gen_qrect.go +++ b/qt6/gen_qrect.go @@ -37,64 +37,51 @@ func newQRect(h *C.QRect) *QRect { if h == nil { return nil } + return &QRect{h: h} } // UnsafeNewQRect constructs the type using only unsafe pointers. func UnsafeNewQRect(h unsafe.Pointer) *QRect { - if h == nil { - return nil - } - - return &QRect{h: (*C.QRect)(h)} + return newQRect((*C.QRect)(h)) } // NewQRect constructs a new QRect object. func NewQRect() *QRect { - var outptr_QRect *C.QRect = nil - C.QRect_new(&outptr_QRect) - ret := newQRect(outptr_QRect) + ret := newQRect(C.QRect_new()) ret.isSubclass = true return ret } // NewQRect2 constructs a new QRect object. func NewQRect2(topleft *QPoint, bottomright *QPoint) *QRect { - var outptr_QRect *C.QRect = nil - C.QRect_new2(topleft.cPointer(), bottomright.cPointer(), &outptr_QRect) - ret := newQRect(outptr_QRect) + ret := newQRect(C.QRect_new2(topleft.cPointer(), bottomright.cPointer())) ret.isSubclass = true return ret } // NewQRect3 constructs a new QRect object. func NewQRect3(topleft *QPoint, size *QSize) *QRect { - var outptr_QRect *C.QRect = nil - C.QRect_new3(topleft.cPointer(), size.cPointer(), &outptr_QRect) - ret := newQRect(outptr_QRect) + ret := newQRect(C.QRect_new3(topleft.cPointer(), size.cPointer())) ret.isSubclass = true return ret } // NewQRect4 constructs a new QRect object. func NewQRect4(left int, top int, width int, height int) *QRect { - var outptr_QRect *C.QRect = nil - C.QRect_new4((C.int)(left), (C.int)(top), (C.int)(width), (C.int)(height), &outptr_QRect) - ret := newQRect(outptr_QRect) + ret := newQRect(C.QRect_new4((C.int)(left), (C.int)(top), (C.int)(width), (C.int)(height))) ret.isSubclass = true return ret } // NewQRect5 constructs a new QRect object. func NewQRect5(param1 *QRect) *QRect { - var outptr_QRect *C.QRect = nil - C.QRect_new5(param1.cPointer(), &outptr_QRect) - ret := newQRect(outptr_QRect) + ret := newQRect(C.QRect_new5(param1.cPointer())) ret.isSubclass = true return ret } @@ -463,74 +450,59 @@ func newQRectF(h *C.QRectF) *QRectF { if h == nil { return nil } + return &QRectF{h: h} } // UnsafeNewQRectF constructs the type using only unsafe pointers. func UnsafeNewQRectF(h unsafe.Pointer) *QRectF { - if h == nil { - return nil - } - - return &QRectF{h: (*C.QRectF)(h)} + return newQRectF((*C.QRectF)(h)) } // NewQRectF constructs a new QRectF object. func NewQRectF() *QRectF { - var outptr_QRectF *C.QRectF = nil - C.QRectF_new(&outptr_QRectF) - ret := newQRectF(outptr_QRectF) + ret := newQRectF(C.QRectF_new()) ret.isSubclass = true return ret } // NewQRectF2 constructs a new QRectF object. func NewQRectF2(topleft *QPointF, size *QSizeF) *QRectF { - var outptr_QRectF *C.QRectF = nil - C.QRectF_new2(topleft.cPointer(), size.cPointer(), &outptr_QRectF) - ret := newQRectF(outptr_QRectF) + ret := newQRectF(C.QRectF_new2(topleft.cPointer(), size.cPointer())) ret.isSubclass = true return ret } // NewQRectF3 constructs a new QRectF object. func NewQRectF3(topleft *QPointF, bottomRight *QPointF) *QRectF { - var outptr_QRectF *C.QRectF = nil - C.QRectF_new3(topleft.cPointer(), bottomRight.cPointer(), &outptr_QRectF) - ret := newQRectF(outptr_QRectF) + ret := newQRectF(C.QRectF_new3(topleft.cPointer(), bottomRight.cPointer())) ret.isSubclass = true return ret } // NewQRectF4 constructs a new QRectF object. func NewQRectF4(left float64, top float64, width float64, height float64) *QRectF { - var outptr_QRectF *C.QRectF = nil - C.QRectF_new4((C.double)(left), (C.double)(top), (C.double)(width), (C.double)(height), &outptr_QRectF) - ret := newQRectF(outptr_QRectF) + ret := newQRectF(C.QRectF_new4((C.double)(left), (C.double)(top), (C.double)(width), (C.double)(height))) ret.isSubclass = true return ret } // NewQRectF5 constructs a new QRectF object. func NewQRectF5(rect *QRect) *QRectF { - var outptr_QRectF *C.QRectF = nil - C.QRectF_new5(rect.cPointer(), &outptr_QRectF) - ret := newQRectF(outptr_QRectF) + ret := newQRectF(C.QRectF_new5(rect.cPointer())) ret.isSubclass = true return ret } // NewQRectF6 constructs a new QRectF object. func NewQRectF6(param1 *QRectF) *QRectF { - var outptr_QRectF *C.QRectF = nil - C.QRectF_new6(param1.cPointer(), &outptr_QRectF) - ret := newQRectF(outptr_QRectF) + ret := newQRectF(C.QRectF_new6(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qrect.h b/qt6/gen_qrect.h index cce8fb26..881eef62 100644 --- a/qt6/gen_qrect.h +++ b/qt6/gen_qrect.h @@ -34,11 +34,11 @@ typedef struct QSize QSize; typedef struct QSizeF QSizeF; #endif -void QRect_new(QRect** outptr_QRect); -void QRect_new2(QPoint* topleft, QPoint* bottomright, QRect** outptr_QRect); -void QRect_new3(QPoint* topleft, QSize* size, QRect** outptr_QRect); -void QRect_new4(int left, int top, int width, int height, QRect** outptr_QRect); -void QRect_new5(QRect* param1, QRect** outptr_QRect); +QRect* QRect_new(); +QRect* QRect_new2(QPoint* topleft, QPoint* bottomright); +QRect* QRect_new3(QPoint* topleft, QSize* size); +QRect* QRect_new4(int left, int top, int width, int height); +QRect* QRect_new5(QRect* param1); bool QRect_IsNull(const QRect* self); bool QRect_IsEmpty(const QRect* self); bool QRect_IsValid(const QRect* self); @@ -113,12 +113,12 @@ bool QRect_Contains22(const QRect* self, QRect* r, bool proper); bool QRect_Contains23(const QRect* self, QPoint* p, bool proper); void QRect_Delete(QRect* self, bool isSubclass); -void QRectF_new(QRectF** outptr_QRectF); -void QRectF_new2(QPointF* topleft, QSizeF* size, QRectF** outptr_QRectF); -void QRectF_new3(QPointF* topleft, QPointF* bottomRight, QRectF** outptr_QRectF); -void QRectF_new4(double left, double top, double width, double height, QRectF** outptr_QRectF); -void QRectF_new5(QRect* rect, QRectF** outptr_QRectF); -void QRectF_new6(QRectF* param1, QRectF** outptr_QRectF); +QRectF* QRectF_new(); +QRectF* QRectF_new2(QPointF* topleft, QSizeF* size); +QRectF* QRectF_new3(QPointF* topleft, QPointF* bottomRight); +QRectF* QRectF_new4(double left, double top, double width, double height); +QRectF* QRectF_new5(QRect* rect); +QRectF* QRectF_new6(QRectF* param1); bool QRectF_IsNull(const QRectF* self); bool QRectF_IsEmpty(const QRectF* self); bool QRectF_IsValid(const QRectF* self); diff --git a/qt6/gen_qregion.cpp b/qt6/gen_qregion.cpp index 40e5e880..8bf26b3f 100644 --- a/qt6/gen_qregion.cpp +++ b/qt6/gen_qregion.cpp @@ -6,39 +6,32 @@ #include "gen_qregion.h" #include "_cgo_export.h" -void QRegion_new(QRegion** outptr_QRegion) { - QRegion* ret = new QRegion(); - *outptr_QRegion = ret; +QRegion* QRegion_new() { + return new QRegion(); } -void QRegion_new2(int x, int y, int w, int h, QRegion** outptr_QRegion) { - QRegion* ret = new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); - *outptr_QRegion = ret; +QRegion* QRegion_new2(int x, int y, int w, int h) { + return new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h)); } -void QRegion_new3(QRect* r, QRegion** outptr_QRegion) { - QRegion* ret = new QRegion(*r); - *outptr_QRegion = ret; +QRegion* QRegion_new3(QRect* r) { + return new QRegion(*r); } -void QRegion_new4(QRegion* region, QRegion** outptr_QRegion) { - QRegion* ret = new QRegion(*region); - *outptr_QRegion = ret; +QRegion* QRegion_new4(QRegion* region) { + return new QRegion(*region); } -void QRegion_new5(QBitmap* bitmap, QRegion** outptr_QRegion) { - QRegion* ret = new QRegion(*bitmap); - *outptr_QRegion = ret; +QRegion* QRegion_new5(QBitmap* bitmap) { + return new QRegion(*bitmap); } -void QRegion_new6(int x, int y, int w, int h, int t, QRegion** outptr_QRegion) { - QRegion* ret = new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h), static_cast(t)); - *outptr_QRegion = ret; +QRegion* QRegion_new6(int x, int y, int w, int h, int t) { + return new QRegion(static_cast(x), static_cast(y), static_cast(w), static_cast(h), static_cast(t)); } -void QRegion_new7(QRect* r, int t, QRegion** outptr_QRegion) { - QRegion* ret = new QRegion(*r, static_cast(t)); - *outptr_QRegion = ret; +QRegion* QRegion_new7(QRect* r, int t) { + return new QRegion(*r, static_cast(t)); } void QRegion_OperatorAssign(QRegion* self, QRegion* param1) { diff --git a/qt6/gen_qregion.go b/qt6/gen_qregion.go index 8c347c75..58c76a06 100644 --- a/qt6/gen_qregion.go +++ b/qt6/gen_qregion.go @@ -44,84 +44,67 @@ func newQRegion(h *C.QRegion) *QRegion { if h == nil { return nil } + return &QRegion{h: h} } // UnsafeNewQRegion constructs the type using only unsafe pointers. func UnsafeNewQRegion(h unsafe.Pointer) *QRegion { - if h == nil { - return nil - } - - return &QRegion{h: (*C.QRegion)(h)} + return newQRegion((*C.QRegion)(h)) } // NewQRegion constructs a new QRegion object. func NewQRegion() *QRegion { - var outptr_QRegion *C.QRegion = nil - C.QRegion_new(&outptr_QRegion) - ret := newQRegion(outptr_QRegion) + ret := newQRegion(C.QRegion_new()) ret.isSubclass = true return ret } // NewQRegion2 constructs a new QRegion object. func NewQRegion2(x int, y int, w int, h int) *QRegion { - var outptr_QRegion *C.QRegion = nil - C.QRegion_new2((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h), &outptr_QRegion) - ret := newQRegion(outptr_QRegion) + ret := newQRegion(C.QRegion_new2((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h))) ret.isSubclass = true return ret } // NewQRegion3 constructs a new QRegion object. func NewQRegion3(r *QRect) *QRegion { - var outptr_QRegion *C.QRegion = nil - C.QRegion_new3(r.cPointer(), &outptr_QRegion) - ret := newQRegion(outptr_QRegion) + ret := newQRegion(C.QRegion_new3(r.cPointer())) ret.isSubclass = true return ret } // NewQRegion4 constructs a new QRegion object. func NewQRegion4(region *QRegion) *QRegion { - var outptr_QRegion *C.QRegion = nil - C.QRegion_new4(region.cPointer(), &outptr_QRegion) - ret := newQRegion(outptr_QRegion) + ret := newQRegion(C.QRegion_new4(region.cPointer())) ret.isSubclass = true return ret } // NewQRegion5 constructs a new QRegion object. func NewQRegion5(bitmap *QBitmap) *QRegion { - var outptr_QRegion *C.QRegion = nil - C.QRegion_new5(bitmap.cPointer(), &outptr_QRegion) - ret := newQRegion(outptr_QRegion) + ret := newQRegion(C.QRegion_new5(bitmap.cPointer())) ret.isSubclass = true return ret } // NewQRegion6 constructs a new QRegion object. func NewQRegion6(x int, y int, w int, h int, t QRegion__RegionType) *QRegion { - var outptr_QRegion *C.QRegion = nil - C.QRegion_new6((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h), (C.int)(t), &outptr_QRegion) - ret := newQRegion(outptr_QRegion) + ret := newQRegion(C.QRegion_new6((C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h), (C.int)(t))) ret.isSubclass = true return ret } // NewQRegion7 constructs a new QRegion object. func NewQRegion7(r *QRect, t QRegion__RegionType) *QRegion { - var outptr_QRegion *C.QRegion = nil - C.QRegion_new7(r.cPointer(), (C.int)(t), &outptr_QRegion) - ret := newQRegion(outptr_QRegion) + ret := newQRegion(C.QRegion_new7(r.cPointer(), (C.int)(t))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qregion.h b/qt6/gen_qregion.h index 8a976359..7877dc3a 100644 --- a/qt6/gen_qregion.h +++ b/qt6/gen_qregion.h @@ -26,13 +26,13 @@ typedef struct QRect QRect; typedef struct QRegion QRegion; #endif -void QRegion_new(QRegion** outptr_QRegion); -void QRegion_new2(int x, int y, int w, int h, QRegion** outptr_QRegion); -void QRegion_new3(QRect* r, QRegion** outptr_QRegion); -void QRegion_new4(QRegion* region, QRegion** outptr_QRegion); -void QRegion_new5(QBitmap* bitmap, QRegion** outptr_QRegion); -void QRegion_new6(int x, int y, int w, int h, int t, QRegion** outptr_QRegion); -void QRegion_new7(QRect* r, int t, QRegion** outptr_QRegion); +QRegion* QRegion_new(); +QRegion* QRegion_new2(int x, int y, int w, int h); +QRegion* QRegion_new3(QRect* r); +QRegion* QRegion_new4(QRegion* region); +QRegion* QRegion_new5(QBitmap* bitmap); +QRegion* QRegion_new6(int x, int y, int w, int h, int t); +QRegion* QRegion_new7(QRect* r, int t); void QRegion_OperatorAssign(QRegion* self, QRegion* param1); void QRegion_Swap(QRegion* self, QRegion* other); bool QRegion_IsEmpty(const QRegion* self); diff --git a/qt6/gen_qregularexpression.cpp b/qt6/gen_qregularexpression.cpp index c5574746..8e1b00f6 100644 --- a/qt6/gen_qregularexpression.cpp +++ b/qt6/gen_qregularexpression.cpp @@ -9,26 +9,22 @@ #include "gen_qregularexpression.h" #include "_cgo_export.h" -void QRegularExpression_new(QRegularExpression** outptr_QRegularExpression) { - QRegularExpression* ret = new QRegularExpression(); - *outptr_QRegularExpression = ret; +QRegularExpression* QRegularExpression_new() { + return new QRegularExpression(); } -void QRegularExpression_new2(struct miqt_string pattern, QRegularExpression** outptr_QRegularExpression) { +QRegularExpression* QRegularExpression_new2(struct miqt_string pattern) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - QRegularExpression* ret = new QRegularExpression(pattern_QString); - *outptr_QRegularExpression = ret; + return new QRegularExpression(pattern_QString); } -void QRegularExpression_new3(QRegularExpression* re, QRegularExpression** outptr_QRegularExpression) { - QRegularExpression* ret = new QRegularExpression(*re); - *outptr_QRegularExpression = ret; +QRegularExpression* QRegularExpression_new3(QRegularExpression* re) { + return new QRegularExpression(*re); } -void QRegularExpression_new4(struct miqt_string pattern, int options, QRegularExpression** outptr_QRegularExpression) { +QRegularExpression* QRegularExpression_new4(struct miqt_string pattern, int options) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - QRegularExpression* ret = new QRegularExpression(pattern_QString, static_cast(options)); - *outptr_QRegularExpression = ret; + return new QRegularExpression(pattern_QString, static_cast(options)); } int QRegularExpression_PatternOptions(const QRegularExpression* self) { @@ -216,14 +212,12 @@ void QRegularExpression_Delete(QRegularExpression* self, bool isSubclass) { } } -void QRegularExpressionMatch_new(QRegularExpressionMatch** outptr_QRegularExpressionMatch) { - QRegularExpressionMatch* ret = new QRegularExpressionMatch(); - *outptr_QRegularExpressionMatch = ret; +QRegularExpressionMatch* QRegularExpressionMatch_new() { + return new QRegularExpressionMatch(); } -void QRegularExpressionMatch_new2(QRegularExpressionMatch* match, QRegularExpressionMatch** outptr_QRegularExpressionMatch) { - QRegularExpressionMatch* ret = new QRegularExpressionMatch(*match); - *outptr_QRegularExpressionMatch = ret; +QRegularExpressionMatch* QRegularExpressionMatch_new2(QRegularExpressionMatch* match) { + return new QRegularExpressionMatch(*match); } void QRegularExpressionMatch_OperatorAssign(QRegularExpressionMatch* self, QRegularExpressionMatch* match) { @@ -383,14 +377,12 @@ void QRegularExpressionMatch_Delete(QRegularExpressionMatch* self, bool isSubcla } } -void QRegularExpressionMatchIterator_new(QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator) { - QRegularExpressionMatchIterator* ret = new QRegularExpressionMatchIterator(); - *outptr_QRegularExpressionMatchIterator = ret; +QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new() { + return new QRegularExpressionMatchIterator(); } -void QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator, QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator) { - QRegularExpressionMatchIterator* ret = new QRegularExpressionMatchIterator(*iterator); - *outptr_QRegularExpressionMatchIterator = ret; +QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator) { + return new QRegularExpressionMatchIterator(*iterator); } void QRegularExpressionMatchIterator_OperatorAssign(QRegularExpressionMatchIterator* self, QRegularExpressionMatchIterator* iterator) { diff --git a/qt6/gen_qregularexpression.go b/qt6/gen_qregularexpression.go index b4913c93..f05818cf 100644 --- a/qt6/gen_qregularexpression.go +++ b/qt6/gen_qregularexpression.go @@ -75,24 +75,19 @@ func newQRegularExpression(h *C.QRegularExpression) *QRegularExpression { if h == nil { return nil } + return &QRegularExpression{h: h} } // UnsafeNewQRegularExpression constructs the type using only unsafe pointers. func UnsafeNewQRegularExpression(h unsafe.Pointer) *QRegularExpression { - if h == nil { - return nil - } - - return &QRegularExpression{h: (*C.QRegularExpression)(h)} + return newQRegularExpression((*C.QRegularExpression)(h)) } // NewQRegularExpression constructs a new QRegularExpression object. func NewQRegularExpression() *QRegularExpression { - var outptr_QRegularExpression *C.QRegularExpression = nil - C.QRegularExpression_new(&outptr_QRegularExpression) - ret := newQRegularExpression(outptr_QRegularExpression) + ret := newQRegularExpression(C.QRegularExpression_new()) ret.isSubclass = true return ret } @@ -103,20 +98,16 @@ func NewQRegularExpression2(pattern string) *QRegularExpression { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - var outptr_QRegularExpression *C.QRegularExpression = nil - C.QRegularExpression_new2(pattern_ms, &outptr_QRegularExpression) - ret := newQRegularExpression(outptr_QRegularExpression) + ret := newQRegularExpression(C.QRegularExpression_new2(pattern_ms)) ret.isSubclass = true return ret } // NewQRegularExpression3 constructs a new QRegularExpression object. func NewQRegularExpression3(re *QRegularExpression) *QRegularExpression { - var outptr_QRegularExpression *C.QRegularExpression = nil - C.QRegularExpression_new3(re.cPointer(), &outptr_QRegularExpression) - ret := newQRegularExpression(outptr_QRegularExpression) + ret := newQRegularExpression(C.QRegularExpression_new3(re.cPointer())) ret.isSubclass = true return ret } @@ -127,10 +118,8 @@ func NewQRegularExpression4(pattern string, options QRegularExpression__PatternO pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - var outptr_QRegularExpression *C.QRegularExpression = nil - C.QRegularExpression_new4(pattern_ms, (C.int)(options), &outptr_QRegularExpression) - ret := newQRegularExpression(outptr_QRegularExpression) + ret := newQRegularExpression(C.QRegularExpression_new4(pattern_ms, (C.int)(options))) ret.isSubclass = true return ret } @@ -372,34 +361,27 @@ func newQRegularExpressionMatch(h *C.QRegularExpressionMatch) *QRegularExpressio if h == nil { return nil } + return &QRegularExpressionMatch{h: h} } // UnsafeNewQRegularExpressionMatch constructs the type using only unsafe pointers. func UnsafeNewQRegularExpressionMatch(h unsafe.Pointer) *QRegularExpressionMatch { - if h == nil { - return nil - } - - return &QRegularExpressionMatch{h: (*C.QRegularExpressionMatch)(h)} + return newQRegularExpressionMatch((*C.QRegularExpressionMatch)(h)) } // NewQRegularExpressionMatch constructs a new QRegularExpressionMatch object. func NewQRegularExpressionMatch() *QRegularExpressionMatch { - var outptr_QRegularExpressionMatch *C.QRegularExpressionMatch = nil - C.QRegularExpressionMatch_new(&outptr_QRegularExpressionMatch) - ret := newQRegularExpressionMatch(outptr_QRegularExpressionMatch) + ret := newQRegularExpressionMatch(C.QRegularExpressionMatch_new()) ret.isSubclass = true return ret } // NewQRegularExpressionMatch2 constructs a new QRegularExpressionMatch object. func NewQRegularExpressionMatch2(match *QRegularExpressionMatch) *QRegularExpressionMatch { - var outptr_QRegularExpressionMatch *C.QRegularExpressionMatch = nil - C.QRegularExpressionMatch_new2(match.cPointer(), &outptr_QRegularExpressionMatch) - ret := newQRegularExpressionMatch(outptr_QRegularExpressionMatch) + ret := newQRegularExpressionMatch(C.QRegularExpressionMatch_new2(match.cPointer())) ret.isSubclass = true return ret } @@ -578,34 +560,27 @@ func newQRegularExpressionMatchIterator(h *C.QRegularExpressionMatchIterator) *Q if h == nil { return nil } + return &QRegularExpressionMatchIterator{h: h} } // UnsafeNewQRegularExpressionMatchIterator constructs the type using only unsafe pointers. func UnsafeNewQRegularExpressionMatchIterator(h unsafe.Pointer) *QRegularExpressionMatchIterator { - if h == nil { - return nil - } - - return &QRegularExpressionMatchIterator{h: (*C.QRegularExpressionMatchIterator)(h)} + return newQRegularExpressionMatchIterator((*C.QRegularExpressionMatchIterator)(h)) } // NewQRegularExpressionMatchIterator constructs a new QRegularExpressionMatchIterator object. func NewQRegularExpressionMatchIterator() *QRegularExpressionMatchIterator { - var outptr_QRegularExpressionMatchIterator *C.QRegularExpressionMatchIterator = nil - C.QRegularExpressionMatchIterator_new(&outptr_QRegularExpressionMatchIterator) - ret := newQRegularExpressionMatchIterator(outptr_QRegularExpressionMatchIterator) + ret := newQRegularExpressionMatchIterator(C.QRegularExpressionMatchIterator_new()) ret.isSubclass = true return ret } // NewQRegularExpressionMatchIterator2 constructs a new QRegularExpressionMatchIterator object. func NewQRegularExpressionMatchIterator2(iterator *QRegularExpressionMatchIterator) *QRegularExpressionMatchIterator { - var outptr_QRegularExpressionMatchIterator *C.QRegularExpressionMatchIterator = nil - C.QRegularExpressionMatchIterator_new2(iterator.cPointer(), &outptr_QRegularExpressionMatchIterator) - ret := newQRegularExpressionMatchIterator(outptr_QRegularExpressionMatchIterator) + ret := newQRegularExpressionMatchIterator(C.QRegularExpressionMatchIterator_new2(iterator.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qregularexpression.h b/qt6/gen_qregularexpression.h index 62741655..e61eb706 100644 --- a/qt6/gen_qregularexpression.h +++ b/qt6/gen_qregularexpression.h @@ -24,10 +24,10 @@ typedef struct QRegularExpressionMatch QRegularExpressionMatch; typedef struct QRegularExpressionMatchIterator QRegularExpressionMatchIterator; #endif -void QRegularExpression_new(QRegularExpression** outptr_QRegularExpression); -void QRegularExpression_new2(struct miqt_string pattern, QRegularExpression** outptr_QRegularExpression); -void QRegularExpression_new3(QRegularExpression* re, QRegularExpression** outptr_QRegularExpression); -void QRegularExpression_new4(struct miqt_string pattern, int options, QRegularExpression** outptr_QRegularExpression); +QRegularExpression* QRegularExpression_new(); +QRegularExpression* QRegularExpression_new2(struct miqt_string pattern); +QRegularExpression* QRegularExpression_new3(QRegularExpression* re); +QRegularExpression* QRegularExpression_new4(struct miqt_string pattern, int options); int QRegularExpression_PatternOptions(const QRegularExpression* self); void QRegularExpression_SetPatternOptions(QRegularExpression* self, int options); void QRegularExpression_OperatorAssign(QRegularExpression* self, QRegularExpression* re); @@ -56,8 +56,8 @@ QRegularExpressionMatchIterator* QRegularExpression_GlobalMatch4(const QRegularE struct miqt_string QRegularExpression_WildcardToRegularExpression2(struct miqt_string str, int options); void QRegularExpression_Delete(QRegularExpression* self, bool isSubclass); -void QRegularExpressionMatch_new(QRegularExpressionMatch** outptr_QRegularExpressionMatch); -void QRegularExpressionMatch_new2(QRegularExpressionMatch* match, QRegularExpressionMatch** outptr_QRegularExpressionMatch); +QRegularExpressionMatch* QRegularExpressionMatch_new(); +QRegularExpressionMatch* QRegularExpressionMatch_new2(QRegularExpressionMatch* match); void QRegularExpressionMatch_OperatorAssign(QRegularExpressionMatch* self, QRegularExpressionMatch* match); void QRegularExpressionMatch_Swap(QRegularExpressionMatch* self, QRegularExpressionMatch* other); QRegularExpression* QRegularExpressionMatch_RegularExpression(const QRegularExpressionMatch* self); @@ -84,8 +84,8 @@ ptrdiff_t QRegularExpressionMatch_CapturedLength1(const QRegularExpressionMatch* ptrdiff_t QRegularExpressionMatch_CapturedEnd1(const QRegularExpressionMatch* self, int nth); void QRegularExpressionMatch_Delete(QRegularExpressionMatch* self, bool isSubclass); -void QRegularExpressionMatchIterator_new(QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator); -void QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator, QRegularExpressionMatchIterator** outptr_QRegularExpressionMatchIterator); +QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new(); +QRegularExpressionMatchIterator* QRegularExpressionMatchIterator_new2(QRegularExpressionMatchIterator* iterator); void QRegularExpressionMatchIterator_OperatorAssign(QRegularExpressionMatchIterator* self, QRegularExpressionMatchIterator* iterator); void QRegularExpressionMatchIterator_Swap(QRegularExpressionMatchIterator* self, QRegularExpressionMatchIterator* other); bool QRegularExpressionMatchIterator_IsValid(const QRegularExpressionMatchIterator* self); diff --git a/qt6/gen_qresource.cpp b/qt6/gen_qresource.cpp index d06e5bcd..8bd2f540 100644 --- a/qt6/gen_qresource.cpp +++ b/qt6/gen_qresource.cpp @@ -9,21 +9,18 @@ #include "gen_qresource.h" #include "_cgo_export.h" -void QResource_new(QResource** outptr_QResource) { - QResource* ret = new QResource(); - *outptr_QResource = ret; +QResource* QResource_new() { + return new QResource(); } -void QResource_new2(struct miqt_string file, QResource** outptr_QResource) { +QResource* QResource_new2(struct miqt_string file) { QString file_QString = QString::fromUtf8(file.data, file.len); - QResource* ret = new QResource(file_QString); - *outptr_QResource = ret; + return new QResource(file_QString); } -void QResource_new3(struct miqt_string file, QLocale* locale, QResource** outptr_QResource) { +QResource* QResource_new3(struct miqt_string file, QLocale* locale) { QString file_QString = QString::fromUtf8(file.data, file.len); - QResource* ret = new QResource(file_QString, *locale); - *outptr_QResource = ret; + return new QResource(file_QString, *locale); } void QResource_SetFileName(QResource* self, struct miqt_string file) { diff --git a/qt6/gen_qresource.go b/qt6/gen_qresource.go index 8f8bab9f..69241847 100644 --- a/qt6/gen_qresource.go +++ b/qt6/gen_qresource.go @@ -45,24 +45,19 @@ func newQResource(h *C.QResource) *QResource { if h == nil { return nil } + return &QResource{h: h} } // UnsafeNewQResource constructs the type using only unsafe pointers. func UnsafeNewQResource(h unsafe.Pointer) *QResource { - if h == nil { - return nil - } - - return &QResource{h: (*C.QResource)(h)} + return newQResource((*C.QResource)(h)) } // NewQResource constructs a new QResource object. func NewQResource() *QResource { - var outptr_QResource *C.QResource = nil - C.QResource_new(&outptr_QResource) - ret := newQResource(outptr_QResource) + ret := newQResource(C.QResource_new()) ret.isSubclass = true return ret } @@ -73,10 +68,8 @@ func NewQResource2(file string) *QResource { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - var outptr_QResource *C.QResource = nil - C.QResource_new2(file_ms, &outptr_QResource) - ret := newQResource(outptr_QResource) + ret := newQResource(C.QResource_new2(file_ms)) ret.isSubclass = true return ret } @@ -87,10 +80,8 @@ func NewQResource3(file string, locale *QLocale) *QResource { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - var outptr_QResource *C.QResource = nil - C.QResource_new3(file_ms, locale.cPointer(), &outptr_QResource) - ret := newQResource(outptr_QResource) + ret := newQResource(C.QResource_new3(file_ms, locale.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qresource.h b/qt6/gen_qresource.h index f69ffc9c..df607f7b 100644 --- a/qt6/gen_qresource.h +++ b/qt6/gen_qresource.h @@ -24,9 +24,9 @@ typedef struct QLocale QLocale; typedef struct QResource QResource; #endif -void QResource_new(QResource** outptr_QResource); -void QResource_new2(struct miqt_string file, QResource** outptr_QResource); -void QResource_new3(struct miqt_string file, QLocale* locale, QResource** outptr_QResource); +QResource* QResource_new(); +QResource* QResource_new2(struct miqt_string file); +QResource* QResource_new3(struct miqt_string file, QLocale* locale); void QResource_SetFileName(QResource* self, struct miqt_string file); struct miqt_string QResource_FileName(const QResource* self); struct miqt_string QResource_AbsoluteFilePath(const QResource* self); diff --git a/qt6/gen_qrgba64.cpp b/qt6/gen_qrgba64.cpp index b008c03a..9ccf590e 100644 --- a/qt6/gen_qrgba64.cpp +++ b/qt6/gen_qrgba64.cpp @@ -3,14 +3,12 @@ #include "gen_qrgba64.h" #include "_cgo_export.h" -void QRgba64_new(QRgba64** outptr_QRgba64) { - QRgba64* ret = new QRgba64(); - *outptr_QRgba64 = ret; +QRgba64* QRgba64_new() { + return new QRgba64(); } -void QRgba64_new2(QRgba64* param1, QRgba64** outptr_QRgba64) { - QRgba64* ret = new QRgba64(*param1); - *outptr_QRgba64 = ret; +QRgba64* QRgba64_new2(QRgba64* param1) { + return new QRgba64(*param1); } QRgba64* QRgba64_FromRgba64(unsigned long long c) { diff --git a/qt6/gen_qrgba64.go b/qt6/gen_qrgba64.go index 883e4c7a..d0edb400 100644 --- a/qt6/gen_qrgba64.go +++ b/qt6/gen_qrgba64.go @@ -37,34 +37,27 @@ func newQRgba64(h *C.QRgba64) *QRgba64 { if h == nil { return nil } + return &QRgba64{h: h} } // UnsafeNewQRgba64 constructs the type using only unsafe pointers. func UnsafeNewQRgba64(h unsafe.Pointer) *QRgba64 { - if h == nil { - return nil - } - - return &QRgba64{h: (*C.QRgba64)(h)} + return newQRgba64((*C.QRgba64)(h)) } // NewQRgba64 constructs a new QRgba64 object. func NewQRgba64() *QRgba64 { - var outptr_QRgba64 *C.QRgba64 = nil - C.QRgba64_new(&outptr_QRgba64) - ret := newQRgba64(outptr_QRgba64) + ret := newQRgba64(C.QRgba64_new()) ret.isSubclass = true return ret } // NewQRgba642 constructs a new QRgba64 object. func NewQRgba642(param1 *QRgba64) *QRgba64 { - var outptr_QRgba64 *C.QRgba64 = nil - C.QRgba64_new2(param1.cPointer(), &outptr_QRgba64) - ret := newQRgba64(outptr_QRgba64) + ret := newQRgba64(C.QRgba64_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qrgba64.h b/qt6/gen_qrgba64.h index f1d71927..52b7040d 100644 --- a/qt6/gen_qrgba64.h +++ b/qt6/gen_qrgba64.h @@ -20,8 +20,8 @@ class QRgba64; typedef struct QRgba64 QRgba64; #endif -void QRgba64_new(QRgba64** outptr_QRgba64); -void QRgba64_new2(QRgba64* param1, QRgba64** outptr_QRgba64); +QRgba64* QRgba64_new(); +QRgba64* QRgba64_new2(QRgba64* param1); QRgba64* QRgba64_FromRgba64(unsigned long long c); QRgba64* QRgba64_FromRgba642(uint16_t red, uint16_t green, uint16_t blue, uint16_t alpha); QRgba64* QRgba64_FromRgba(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha); diff --git a/qt6/gen_qrubberband.cpp b/qt6/gen_qrubberband.cpp index eb2cb29a..b5211654 100644 --- a/qt6/gen_qrubberband.cpp +++ b/qt6/gen_qrubberband.cpp @@ -1048,20 +1048,16 @@ public: }; -void QRubberBand_new(int param1, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQRubberBand* ret = new MiqtVirtualQRubberBand(static_cast(param1)); - *outptr_QRubberBand = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QRubberBand* QRubberBand_new(int param1) { + return new MiqtVirtualQRubberBand(static_cast(param1)); } -void QRubberBand_new2(int param1, QWidget* param2, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQRubberBand* ret = new MiqtVirtualQRubberBand(static_cast(param1), param2); - *outptr_QRubberBand = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QRubberBand* QRubberBand_new2(int param1, QWidget* param2) { + return new MiqtVirtualQRubberBand(static_cast(param1), param2); +} + +void QRubberBand_virtbase(QRubberBand* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QRubberBand_MetaObject(const QRubberBand* self) { diff --git a/qt6/gen_qrubberband.go b/qt6/gen_qrubberband.go index 402c2743..7e2bcba0 100644 --- a/qt6/gen_qrubberband.go +++ b/qt6/gen_qrubberband.go @@ -42,46 +42,34 @@ func (this *QRubberBand) UnsafePointer() unsafe.Pointer { } // newQRubberBand constructs the type using only CGO pointers. -func newQRubberBand(h *C.QRubberBand, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QRubberBand { +func newQRubberBand(h *C.QRubberBand) *QRubberBand { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QRubberBand_virtbase(h, &outptr_QWidget) + return &QRubberBand{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQRubberBand constructs the type using only unsafe pointers. -func UnsafeNewQRubberBand(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QRubberBand { - if h == nil { - return nil - } - - return &QRubberBand{h: (*C.QRubberBand)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQRubberBand(h unsafe.Pointer) *QRubberBand { + return newQRubberBand((*C.QRubberBand)(h)) } // NewQRubberBand constructs a new QRubberBand object. func NewQRubberBand(param1 QRubberBand__Shape) *QRubberBand { - var outptr_QRubberBand *C.QRubberBand = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRubberBand_new((C.int)(param1), &outptr_QRubberBand, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQRubberBand(outptr_QRubberBand, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQRubberBand(C.QRubberBand_new((C.int)(param1))) ret.isSubclass = true return ret } // NewQRubberBand2 constructs a new QRubberBand object. func NewQRubberBand2(param1 QRubberBand__Shape, param2 *QWidget) *QRubberBand { - var outptr_QRubberBand *C.QRubberBand = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QRubberBand_new2((C.int)(param1), param2.cPointer(), &outptr_QRubberBand, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQRubberBand(outptr_QRubberBand, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQRubberBand(C.QRubberBand_new2((C.int)(param1), param2.cPointer())) ret.isSubclass = true return ret } @@ -203,7 +191,7 @@ func miqt_exec_callback_QRubberBand_PaintEvent(self *C.QRubberBand, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QRubberBand{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -255,7 +243,7 @@ func miqt_exec_callback_QRubberBand_ShowEvent(self *C.QRubberBand, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QRubberBand{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -281,7 +269,7 @@ func miqt_exec_callback_QRubberBand_ResizeEvent(self *C.QRubberBand, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QRubberBand{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -307,7 +295,7 @@ func miqt_exec_callback_QRubberBand_MoveEvent(self *C.QRubberBand, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(param1, nil) + slotval1 := newQMoveEvent(param1) gofunc((&QRubberBand{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -333,7 +321,7 @@ func miqt_exec_callback_QRubberBand_InitStyleOption(self *C.QRubberBand, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionRubberBand(option, nil) + slotval1 := newQStyleOptionRubberBand(option) gofunc((&QRubberBand{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -542,7 +530,7 @@ func miqt_exec_callback_QRubberBand_MousePressEvent(self *C.QRubberBand, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -568,7 +556,7 @@ func miqt_exec_callback_QRubberBand_MouseReleaseEvent(self *C.QRubberBand, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -594,7 +582,7 @@ func miqt_exec_callback_QRubberBand_MouseDoubleClickEvent(self *C.QRubberBand, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -620,7 +608,7 @@ func miqt_exec_callback_QRubberBand_MouseMoveEvent(self *C.QRubberBand, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -646,7 +634,7 @@ func miqt_exec_callback_QRubberBand_WheelEvent(self *C.QRubberBand, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -672,7 +660,7 @@ func miqt_exec_callback_QRubberBand_KeyPressEvent(self *C.QRubberBand, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -698,7 +686,7 @@ func miqt_exec_callback_QRubberBand_KeyReleaseEvent(self *C.QRubberBand, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -724,7 +712,7 @@ func miqt_exec_callback_QRubberBand_FocusInEvent(self *C.QRubberBand, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -750,7 +738,7 @@ func miqt_exec_callback_QRubberBand_FocusOutEvent(self *C.QRubberBand, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -776,7 +764,7 @@ func miqt_exec_callback_QRubberBand_EnterEvent(self *C.QRubberBand, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -828,7 +816,7 @@ func miqt_exec_callback_QRubberBand_CloseEvent(self *C.QRubberBand, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -854,7 +842,7 @@ func miqt_exec_callback_QRubberBand_ContextMenuEvent(self *C.QRubberBand, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -880,7 +868,7 @@ func miqt_exec_callback_QRubberBand_TabletEvent(self *C.QRubberBand, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -906,7 +894,7 @@ func miqt_exec_callback_QRubberBand_ActionEvent(self *C.QRubberBand, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -932,7 +920,7 @@ func miqt_exec_callback_QRubberBand_DragEnterEvent(self *C.QRubberBand, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -958,7 +946,7 @@ func miqt_exec_callback_QRubberBand_DragMoveEvent(self *C.QRubberBand, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -984,7 +972,7 @@ func miqt_exec_callback_QRubberBand_DragLeaveEvent(self *C.QRubberBand, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1010,7 +998,7 @@ func miqt_exec_callback_QRubberBand_DropEvent(self *C.QRubberBand, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1036,7 +1024,7 @@ func miqt_exec_callback_QRubberBand_HideEvent(self *C.QRubberBand, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QRubberBand{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1206,7 +1194,7 @@ func miqt_exec_callback_QRubberBand_InputMethodEvent(self *C.QRubberBand, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QRubberBand{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qrubberband.h b/qt6/gen_qrubberband.h index b740c587..417fdf13 100644 --- a/qt6/gen_qrubberband.h +++ b/qt6/gen_qrubberband.h @@ -82,8 +82,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QRubberBand_new(int param1, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QRubberBand_new2(int param1, QWidget* param2, QRubberBand** outptr_QRubberBand, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QRubberBand* QRubberBand_new(int param1); +QRubberBand* QRubberBand_new2(int param1, QWidget* param2); +void QRubberBand_virtbase(QRubberBand* src, QWidget** outptr_QWidget); QMetaObject* QRubberBand_MetaObject(const QRubberBand* self); void* QRubberBand_Metacast(QRubberBand* self, const char* param1); struct miqt_string QRubberBand_Tr(const char* s); diff --git a/qt6/gen_qrunnable.cpp b/qt6/gen_qrunnable.cpp index 129fc5d9..3089e86d 100644 --- a/qt6/gen_qrunnable.cpp +++ b/qt6/gen_qrunnable.cpp @@ -27,9 +27,8 @@ public: }; -void QRunnable_new(QRunnable** outptr_QRunnable) { - MiqtVirtualQRunnable* ret = new MiqtVirtualQRunnable(); - *outptr_QRunnable = ret; +QRunnable* QRunnable_new() { + return new MiqtVirtualQRunnable(); } void QRunnable_Run(QRunnable* self) { diff --git a/qt6/gen_qrunnable.go b/qt6/gen_qrunnable.go index 70dd43f3..1b2e9814 100644 --- a/qt6/gen_qrunnable.go +++ b/qt6/gen_qrunnable.go @@ -38,24 +38,19 @@ func newQRunnable(h *C.QRunnable) *QRunnable { if h == nil { return nil } + return &QRunnable{h: h} } // UnsafeNewQRunnable constructs the type using only unsafe pointers. func UnsafeNewQRunnable(h unsafe.Pointer) *QRunnable { - if h == nil { - return nil - } - - return &QRunnable{h: (*C.QRunnable)(h)} + return newQRunnable((*C.QRunnable)(h)) } // NewQRunnable constructs a new QRunnable object. func NewQRunnable() *QRunnable { - var outptr_QRunnable *C.QRunnable = nil - C.QRunnable_new(&outptr_QRunnable) - ret := newQRunnable(outptr_QRunnable) + ret := newQRunnable(C.QRunnable_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qrunnable.h b/qt6/gen_qrunnable.h index 194eaba8..3587c3ef 100644 --- a/qt6/gen_qrunnable.h +++ b/qt6/gen_qrunnable.h @@ -20,7 +20,7 @@ class QRunnable; typedef struct QRunnable QRunnable; #endif -void QRunnable_new(QRunnable** outptr_QRunnable); +QRunnable* QRunnable_new(); void QRunnable_Run(QRunnable* self); bool QRunnable_AutoDelete(const QRunnable* self); void QRunnable_SetAutoDelete(QRunnable* self, bool autoDelete); diff --git a/qt6/gen_qsavefile.cpp b/qt6/gen_qsavefile.cpp index ee2f28d9..a9848682 100644 --- a/qt6/gen_qsavefile.cpp +++ b/qt6/gen_qsavefile.cpp @@ -340,42 +340,26 @@ public: }; -void QSaveFile_new(struct miqt_string name, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { +QSaveFile* QSaveFile_new(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(name_QString); - *outptr_QSaveFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); + return new MiqtVirtualQSaveFile(name_QString); } -void QSaveFile_new2(QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(); - *outptr_QSaveFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QSaveFile* QSaveFile_new2() { + return new MiqtVirtualQSaveFile(); } -void QSaveFile_new3(struct miqt_string name, QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { +QSaveFile* QSaveFile_new3(struct miqt_string name, QObject* parent) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(name_QString, parent); - *outptr_QSaveFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); + return new MiqtVirtualQSaveFile(name_QString, parent); } -void QSaveFile_new4(QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQSaveFile* ret = new MiqtVirtualQSaveFile(parent); - *outptr_QSaveFile = ret; - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QSaveFile* QSaveFile_new4(QObject* parent) { + return new MiqtVirtualQSaveFile(parent); +} + +void QSaveFile_virtbase(QSaveFile* src, QFileDevice** outptr_QFileDevice) { + *outptr_QFileDevice = static_cast(src); } QMetaObject* QSaveFile_MetaObject(const QSaveFile* self) { diff --git a/qt6/gen_qsavefile.go b/qt6/gen_qsavefile.go index 4934b059..e9a0f9e6 100644 --- a/qt6/gen_qsavefile.go +++ b/qt6/gen_qsavefile.go @@ -35,22 +35,20 @@ func (this *QSaveFile) UnsafePointer() unsafe.Pointer { } // newQSaveFile constructs the type using only CGO pointers. -func newQSaveFile(h *C.QSaveFile, h_QFileDevice *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QSaveFile { +func newQSaveFile(h *C.QSaveFile) *QSaveFile { if h == nil { return nil } + var outptr_QFileDevice *C.QFileDevice = nil + C.QSaveFile_virtbase(h, &outptr_QFileDevice) + return &QSaveFile{h: h, - QFileDevice: newQFileDevice(h_QFileDevice, h_QIODevice, h_QObject, h_QIODeviceBase)} + QFileDevice: newQFileDevice(outptr_QFileDevice)} } // UnsafeNewQSaveFile constructs the type using only unsafe pointers. -func UnsafeNewQSaveFile(h unsafe.Pointer, h_QFileDevice unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QSaveFile { - if h == nil { - return nil - } - - return &QSaveFile{h: (*C.QSaveFile)(h), - QFileDevice: UnsafeNewQFileDevice(h_QFileDevice, h_QIODevice, h_QObject, h_QIODeviceBase)} +func UnsafeNewQSaveFile(h unsafe.Pointer) *QSaveFile { + return newQSaveFile((*C.QSaveFile)(h)) } // NewQSaveFile constructs a new QSaveFile object. @@ -59,28 +57,16 @@ func NewQSaveFile(name string) *QSaveFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QSaveFile *C.QSaveFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QSaveFile_new(name_ms, &outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQSaveFile(C.QSaveFile_new(name_ms)) ret.isSubclass = true return ret } // NewQSaveFile2 constructs a new QSaveFile object. func NewQSaveFile2() *QSaveFile { - var outptr_QSaveFile *C.QSaveFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QSaveFile_new2(&outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQSaveFile(C.QSaveFile_new2()) ret.isSubclass = true return ret } @@ -91,28 +77,16 @@ func NewQSaveFile3(name string, parent *QObject) *QSaveFile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QSaveFile *C.QSaveFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QSaveFile_new3(name_ms, parent.cPointer(), &outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQSaveFile(C.QSaveFile_new3(name_ms, parent.cPointer())) ret.isSubclass = true return ret } // NewQSaveFile4 constructs a new QSaveFile object. func NewQSaveFile4(parent *QObject) *QSaveFile { - var outptr_QSaveFile *C.QSaveFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QSaveFile_new4(parent.cPointer(), &outptr_QSaveFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQSaveFile(outptr_QSaveFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQSaveFile(C.QSaveFile_new4(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qsavefile.h b/qt6/gen_qsavefile.h index cda256ae..2ca264b6 100644 --- a/qt6/gen_qsavefile.h +++ b/qt6/gen_qsavefile.h @@ -30,10 +30,11 @@ typedef struct QObject QObject; typedef struct QSaveFile QSaveFile; #endif -void QSaveFile_new(struct miqt_string name, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QSaveFile_new2(QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QSaveFile_new3(struct miqt_string name, QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QSaveFile_new4(QObject* parent, QSaveFile** outptr_QSaveFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +QSaveFile* QSaveFile_new(struct miqt_string name); +QSaveFile* QSaveFile_new2(); +QSaveFile* QSaveFile_new3(struct miqt_string name, QObject* parent); +QSaveFile* QSaveFile_new4(QObject* parent); +void QSaveFile_virtbase(QSaveFile* src, QFileDevice** outptr_QFileDevice); QMetaObject* QSaveFile_MetaObject(const QSaveFile* self); void* QSaveFile_Metacast(QSaveFile* self, const char* param1); struct miqt_string QSaveFile_Tr(const char* s); diff --git a/qt6/gen_qscopedpointer.go b/qt6/gen_qscopedpointer.go index 7e9ba74b..cf0e7ed9 100644 --- a/qt6/gen_qscopedpointer.go +++ b/qt6/gen_qscopedpointer.go @@ -37,16 +37,13 @@ func newQScopedPointerPodDeleter(h *C.QScopedPointerPodDeleter) *QScopedPointerP if h == nil { return nil } + return &QScopedPointerPodDeleter{h: h} } // UnsafeNewQScopedPointerPodDeleter constructs the type using only unsafe pointers. func UnsafeNewQScopedPointerPodDeleter(h unsafe.Pointer) *QScopedPointerPodDeleter { - if h == nil { - return nil - } - - return &QScopedPointerPodDeleter{h: (*C.QScopedPointerPodDeleter)(h)} + return newQScopedPointerPodDeleter((*C.QScopedPointerPodDeleter)(h)) } func QScopedPointerPodDeleter_Cleanup(pointer unsafe.Pointer) { diff --git a/qt6/gen_qscreen.cpp b/qt6/gen_qscreen.cpp index 0c82d9e1..7033d9b8 100644 --- a/qt6/gen_qscreen.cpp +++ b/qt6/gen_qscreen.cpp @@ -15,6 +15,10 @@ #include "gen_qscreen.h" #include "_cgo_export.h" +void QScreen_virtbase(QScreen* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QScreen_MetaObject(const QScreen* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/gen_qscreen.go b/qt6/gen_qscreen.go index d7d5033b..9a14d41b 100644 --- a/qt6/gen_qscreen.go +++ b/qt6/gen_qscreen.go @@ -35,22 +35,20 @@ func (this *QScreen) UnsafePointer() unsafe.Pointer { } // newQScreen constructs the type using only CGO pointers. -func newQScreen(h *C.QScreen, h_QObject *C.QObject) *QScreen { +func newQScreen(h *C.QScreen) *QScreen { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QScreen_virtbase(h, &outptr_QObject) + return &QScreen{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQScreen constructs the type using only unsafe pointers. -func UnsafeNewQScreen(h unsafe.Pointer, h_QObject unsafe.Pointer) *QScreen { - if h == nil { - return nil - } - - return &QScreen{h: (*C.QScreen)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQScreen(h unsafe.Pointer) *QScreen { + return newQScreen((*C.QScreen)(h)) } func (this *QScreen) MetaObject() *QMetaObject { @@ -167,13 +165,13 @@ func (this *QScreen) VirtualSiblings() []*QScreen { _ret := make([]*QScreen, int(_ma.len)) _outCast := (*[0xffff]*C.QScreen)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQScreen(_outCast[i], nil) + _ret[i] = newQScreen(_outCast[i]) } return _ret } func (this *QScreen) VirtualSiblingAt(point QPoint) *QScreen { - return newQScreen(C.QScreen_VirtualSiblingAt(this.h, point.cPointer()), nil) + return newQScreen(C.QScreen_VirtualSiblingAt(this.h, point.cPointer())) } func (this *QScreen) VirtualSize() *QSize { @@ -237,7 +235,7 @@ func (this *QScreen) IsLandscape(orientation ScreenOrientation) bool { } func (this *QScreen) GrabWindow() *QPixmap { - _goptr := newQPixmap(C.QScreen_GrabWindow(this.h), nil) + _goptr := newQPixmap(C.QScreen_GrabWindow(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -449,31 +447,31 @@ func QScreen_Tr3(s string, c string, n int) string { } func (this *QScreen) GrabWindow1(window uintptr) *QPixmap { - _goptr := newQPixmap(C.QScreen_GrabWindow1(this.h, (C.uintptr_t)(window)), nil) + _goptr := newQPixmap(C.QScreen_GrabWindow1(this.h, (C.uintptr_t)(window))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QScreen) GrabWindow2(window uintptr, x int) *QPixmap { - _goptr := newQPixmap(C.QScreen_GrabWindow2(this.h, (C.uintptr_t)(window), (C.int)(x)), nil) + _goptr := newQPixmap(C.QScreen_GrabWindow2(this.h, (C.uintptr_t)(window), (C.int)(x))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QScreen) GrabWindow3(window uintptr, x int, y int) *QPixmap { - _goptr := newQPixmap(C.QScreen_GrabWindow3(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y)), nil) + _goptr := newQPixmap(C.QScreen_GrabWindow3(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QScreen) GrabWindow4(window uintptr, x int, y int, w int) *QPixmap { - _goptr := newQPixmap(C.QScreen_GrabWindow4(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y), (C.int)(w)), nil) + _goptr := newQPixmap(C.QScreen_GrabWindow4(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y), (C.int)(w))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QScreen) GrabWindow5(window uintptr, x int, y int, w int, h int) *QPixmap { - _goptr := newQPixmap(C.QScreen_GrabWindow5(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h)), nil) + _goptr := newQPixmap(C.QScreen_GrabWindow5(this.h, (C.uintptr_t)(window), (C.int)(x), (C.int)(y), (C.int)(w), (C.int)(h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/gen_qscreen.h b/qt6/gen_qscreen.h index 74e402fa..a3efba9a 100644 --- a/qt6/gen_qscreen.h +++ b/qt6/gen_qscreen.h @@ -36,6 +36,7 @@ typedef struct QSizeF QSizeF; typedef struct QTransform QTransform; #endif +void QScreen_virtbase(QScreen* src, QObject** outptr_QObject); QMetaObject* QScreen_MetaObject(const QScreen* self); void* QScreen_Metacast(QScreen* self, const char* param1); struct miqt_string QScreen_Tr(const char* s); diff --git a/qt6/gen_qscrollarea.cpp b/qt6/gen_qscrollarea.cpp index aa5e61bb..96e8450d 100644 --- a/qt6/gen_qscrollarea.cpp +++ b/qt6/gen_qscrollarea.cpp @@ -554,24 +554,16 @@ public: }; -void QScrollArea_new(QWidget* parent, QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQScrollArea* ret = new MiqtVirtualQScrollArea(parent); - *outptr_QScrollArea = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QScrollArea* QScrollArea_new(QWidget* parent) { + return new MiqtVirtualQScrollArea(parent); } -void QScrollArea_new2(QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQScrollArea* ret = new MiqtVirtualQScrollArea(); - *outptr_QScrollArea = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QScrollArea* QScrollArea_new2() { + return new MiqtVirtualQScrollArea(); +} + +void QScrollArea_virtbase(QScrollArea* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); } QMetaObject* QScrollArea_MetaObject(const QScrollArea* self) { diff --git a/qt6/gen_qscrollarea.go b/qt6/gen_qscrollarea.go index 90073fba..e5dd8d12 100644 --- a/qt6/gen_qscrollarea.go +++ b/qt6/gen_qscrollarea.go @@ -35,50 +35,34 @@ func (this *QScrollArea) UnsafePointer() unsafe.Pointer { } // newQScrollArea constructs the type using only CGO pointers. -func newQScrollArea(h *C.QScrollArea, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QScrollArea { +func newQScrollArea(h *C.QScrollArea) *QScrollArea { if h == nil { return nil } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QScrollArea_virtbase(h, &outptr_QAbstractScrollArea) + return &QScrollArea{h: h, - QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractScrollArea: newQAbstractScrollArea(outptr_QAbstractScrollArea)} } // UnsafeNewQScrollArea constructs the type using only unsafe pointers. -func UnsafeNewQScrollArea(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QScrollArea { - if h == nil { - return nil - } - - return &QScrollArea{h: (*C.QScrollArea)(h), - QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQScrollArea(h unsafe.Pointer) *QScrollArea { + return newQScrollArea((*C.QScrollArea)(h)) } // NewQScrollArea constructs a new QScrollArea object. func NewQScrollArea(parent *QWidget) *QScrollArea { - var outptr_QScrollArea *C.QScrollArea = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QScrollArea_new(parent.cPointer(), &outptr_QScrollArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQScrollArea(outptr_QScrollArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQScrollArea(C.QScrollArea_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQScrollArea2 constructs a new QScrollArea object. func NewQScrollArea2() *QScrollArea { - var outptr_QScrollArea *C.QScrollArea = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QScrollArea_new2(&outptr_QScrollArea, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQScrollArea(outptr_QScrollArea, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQScrollArea(C.QScrollArea_new2()) ret.isSubclass = true return ret } @@ -103,7 +87,7 @@ func QScrollArea_Tr(s string) string { } func (this *QScrollArea) Widget() *QWidget { - return newQWidget(C.QScrollArea_Widget(this.h), nil, nil) + return newQWidget(C.QScrollArea_Widget(this.h)) } func (this *QScrollArea) SetWidget(widget *QWidget) { @@ -111,7 +95,7 @@ func (this *QScrollArea) SetWidget(widget *QWidget) { } func (this *QScrollArea) TakeWidget() *QWidget { - return newQWidget(C.QScrollArea_TakeWidget(this.h), nil, nil) + return newQWidget(C.QScrollArea_TakeWidget(this.h)) } func (this *QScrollArea) WidgetResizable() bool { @@ -319,7 +303,7 @@ func miqt_exec_callback_QScrollArea_ResizeEvent(self *C.QScrollArea, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -427,7 +411,7 @@ func miqt_exec_callback_QScrollArea_SetupViewport(self *C.QScrollArea, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(viewport, nil, nil) + slotval1 := newQWidget(viewport) gofunc((&QScrollArea{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -481,7 +465,7 @@ func miqt_exec_callback_QScrollArea_PaintEvent(self *C.QScrollArea, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -507,7 +491,7 @@ func miqt_exec_callback_QScrollArea_MousePressEvent(self *C.QScrollArea, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -533,7 +517,7 @@ func miqt_exec_callback_QScrollArea_MouseReleaseEvent(self *C.QScrollArea, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -559,7 +543,7 @@ func miqt_exec_callback_QScrollArea_MouseDoubleClickEvent(self *C.QScrollArea, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -585,7 +569,7 @@ func miqt_exec_callback_QScrollArea_MouseMoveEvent(self *C.QScrollArea, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -611,7 +595,7 @@ func miqt_exec_callback_QScrollArea_WheelEvent(self *C.QScrollArea, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(param1, nil, nil, nil, nil) + slotval1 := newQWheelEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -637,7 +621,7 @@ func miqt_exec_callback_QScrollArea_ContextMenuEvent(self *C.QScrollArea, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -663,7 +647,7 @@ func miqt_exec_callback_QScrollArea_DragEnterEvent(self *C.QScrollArea, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(param1, nil, nil, nil) + slotval1 := newQDragEnterEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -689,7 +673,7 @@ func miqt_exec_callback_QScrollArea_DragMoveEvent(self *C.QScrollArea, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(param1, nil, nil) + slotval1 := newQDragMoveEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -715,7 +699,7 @@ func miqt_exec_callback_QScrollArea_DragLeaveEvent(self *C.QScrollArea, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(param1, nil) + slotval1 := newQDragLeaveEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -741,7 +725,7 @@ func miqt_exec_callback_QScrollArea_DropEvent(self *C.QScrollArea, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(param1, nil) + slotval1 := newQDropEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_DropEvent, slotval1) @@ -767,7 +751,7 @@ func miqt_exec_callback_QScrollArea_KeyPressEvent(self *C.QScrollArea, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QScrollArea{h: self}).callVirtualBase_KeyPressEvent, slotval1) diff --git a/qt6/gen_qscrollarea.h b/qt6/gen_qscrollarea.h index 10e1af9a..8044a66d 100644 --- a/qt6/gen_qscrollarea.h +++ b/qt6/gen_qscrollarea.h @@ -56,8 +56,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QScrollArea_new(QWidget* parent, QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QScrollArea_new2(QScrollArea** outptr_QScrollArea, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QScrollArea* QScrollArea_new(QWidget* parent); +QScrollArea* QScrollArea_new2(); +void QScrollArea_virtbase(QScrollArea* src, QAbstractScrollArea** outptr_QAbstractScrollArea); QMetaObject* QScrollArea_MetaObject(const QScrollArea* self); void* QScrollArea_Metacast(QScrollArea* self, const char* param1); struct miqt_string QScrollArea_Tr(const char* s); diff --git a/qt6/gen_qscrollbar.cpp b/qt6/gen_qscrollbar.cpp index e3e5fdf8..7af11f72 100644 --- a/qt6/gen_qscrollbar.cpp +++ b/qt6/gen_qscrollbar.cpp @@ -367,40 +367,24 @@ public: }; -void QScrollBar_new(QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(parent); - *outptr_QScrollBar = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QScrollBar* QScrollBar_new(QWidget* parent) { + return new MiqtVirtualQScrollBar(parent); } -void QScrollBar_new2(QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(); - *outptr_QScrollBar = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QScrollBar* QScrollBar_new2() { + return new MiqtVirtualQScrollBar(); } -void QScrollBar_new3(int param1, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(static_cast(param1)); - *outptr_QScrollBar = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QScrollBar* QScrollBar_new3(int param1) { + return new MiqtVirtualQScrollBar(static_cast(param1)); } -void QScrollBar_new4(int param1, QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQScrollBar* ret = new MiqtVirtualQScrollBar(static_cast(param1), parent); - *outptr_QScrollBar = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QScrollBar* QScrollBar_new4(int param1, QWidget* parent) { + return new MiqtVirtualQScrollBar(static_cast(param1), parent); +} + +void QScrollBar_virtbase(QScrollBar* src, QAbstractSlider** outptr_QAbstractSlider) { + *outptr_QAbstractSlider = static_cast(src); } QMetaObject* QScrollBar_MetaObject(const QScrollBar* self) { diff --git a/qt6/gen_qscrollbar.go b/qt6/gen_qscrollbar.go index 836e95a8..7d6f0eeb 100644 --- a/qt6/gen_qscrollbar.go +++ b/qt6/gen_qscrollbar.go @@ -35,76 +35,50 @@ func (this *QScrollBar) UnsafePointer() unsafe.Pointer { } // newQScrollBar constructs the type using only CGO pointers. -func newQScrollBar(h *C.QScrollBar, h_QAbstractSlider *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QScrollBar { +func newQScrollBar(h *C.QScrollBar) *QScrollBar { if h == nil { return nil } + var outptr_QAbstractSlider *C.QAbstractSlider = nil + C.QScrollBar_virtbase(h, &outptr_QAbstractSlider) + return &QScrollBar{h: h, - QAbstractSlider: newQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractSlider: newQAbstractSlider(outptr_QAbstractSlider)} } // UnsafeNewQScrollBar constructs the type using only unsafe pointers. -func UnsafeNewQScrollBar(h unsafe.Pointer, h_QAbstractSlider unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QScrollBar { - if h == nil { - return nil - } - - return &QScrollBar{h: (*C.QScrollBar)(h), - QAbstractSlider: UnsafeNewQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQScrollBar(h unsafe.Pointer) *QScrollBar { + return newQScrollBar((*C.QScrollBar)(h)) } // NewQScrollBar constructs a new QScrollBar object. func NewQScrollBar(parent *QWidget) *QScrollBar { - var outptr_QScrollBar *C.QScrollBar = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QScrollBar_new(parent.cPointer(), &outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQScrollBar(C.QScrollBar_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQScrollBar2 constructs a new QScrollBar object. func NewQScrollBar2() *QScrollBar { - var outptr_QScrollBar *C.QScrollBar = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QScrollBar_new2(&outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQScrollBar(C.QScrollBar_new2()) ret.isSubclass = true return ret } // NewQScrollBar3 constructs a new QScrollBar object. func NewQScrollBar3(param1 Orientation) *QScrollBar { - var outptr_QScrollBar *C.QScrollBar = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QScrollBar_new3((C.int)(param1), &outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQScrollBar(C.QScrollBar_new3((C.int)(param1))) ret.isSubclass = true return ret } // NewQScrollBar4 constructs a new QScrollBar object. func NewQScrollBar4(param1 Orientation, parent *QWidget) *QScrollBar { - var outptr_QScrollBar *C.QScrollBar = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QScrollBar_new4((C.int)(param1), parent.cPointer(), &outptr_QScrollBar, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQScrollBar(outptr_QScrollBar, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQScrollBar(C.QScrollBar_new4((C.int)(param1), parent.cPointer())) ret.isSubclass = true return ret } @@ -235,7 +209,7 @@ func miqt_exec_callback_QScrollBar_WheelEvent(self *C.QScrollBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(param1, nil, nil, nil, nil) + slotval1 := newQWheelEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -261,7 +235,7 @@ func miqt_exec_callback_QScrollBar_PaintEvent(self *C.QScrollBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -287,7 +261,7 @@ func miqt_exec_callback_QScrollBar_MousePressEvent(self *C.QScrollBar, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -313,7 +287,7 @@ func miqt_exec_callback_QScrollBar_MouseReleaseEvent(self *C.QScrollBar, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -339,7 +313,7 @@ func miqt_exec_callback_QScrollBar_MouseMoveEvent(self *C.QScrollBar, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -365,7 +339,7 @@ func miqt_exec_callback_QScrollBar_HideEvent(self *C.QScrollBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(param1, nil) + slotval1 := newQHideEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_HideEvent, slotval1) @@ -417,7 +391,7 @@ func miqt_exec_callback_QScrollBar_ContextMenuEvent(self *C.QScrollBar, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -443,7 +417,7 @@ func miqt_exec_callback_QScrollBar_InitStyleOption(self *C.QScrollBar, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionSlider(option, nil, nil) + slotval1 := newQStyleOptionSlider(option) gofunc((&QScrollBar{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -469,7 +443,7 @@ func miqt_exec_callback_QScrollBar_KeyPressEvent(self *C.QScrollBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(ev, nil, nil) + slotval1 := newQKeyEvent(ev) gofunc((&QScrollBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -495,7 +469,7 @@ func miqt_exec_callback_QScrollBar_TimerEvent(self *C.QScrollBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QScrollBar{h: self}).callVirtualBase_TimerEvent, slotval1) diff --git a/qt6/gen_qscrollbar.h b/qt6/gen_qscrollbar.h index 7f5257fb..2c4fd6df 100644 --- a/qt6/gen_qscrollbar.h +++ b/qt6/gen_qscrollbar.h @@ -50,10 +50,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QScrollBar_new(QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QScrollBar_new2(QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QScrollBar_new3(int param1, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QScrollBar_new4(int param1, QWidget* parent, QScrollBar** outptr_QScrollBar, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QScrollBar* QScrollBar_new(QWidget* parent); +QScrollBar* QScrollBar_new2(); +QScrollBar* QScrollBar_new3(int param1); +QScrollBar* QScrollBar_new4(int param1, QWidget* parent); +void QScrollBar_virtbase(QScrollBar* src, QAbstractSlider** outptr_QAbstractSlider); QMetaObject* QScrollBar_MetaObject(const QScrollBar* self); void* QScrollBar_Metacast(QScrollBar* self, const char* param1); struct miqt_string QScrollBar_Tr(const char* s); diff --git a/qt6/gen_qscroller.cpp b/qt6/gen_qscroller.cpp index 546dd785..69177f94 100644 --- a/qt6/gen_qscroller.cpp +++ b/qt6/gen_qscroller.cpp @@ -12,6 +12,10 @@ #include "gen_qscroller.h" #include "_cgo_export.h" +void QScroller_virtbase(QScroller* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QScroller_MetaObject(const QScroller* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/gen_qscroller.go b/qt6/gen_qscroller.go index 6251a9ab..1e719b4b 100644 --- a/qt6/gen_qscroller.go +++ b/qt6/gen_qscroller.go @@ -60,22 +60,20 @@ func (this *QScroller) UnsafePointer() unsafe.Pointer { } // newQScroller constructs the type using only CGO pointers. -func newQScroller(h *C.QScroller, h_QObject *C.QObject) *QScroller { +func newQScroller(h *C.QScroller) *QScroller { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QScroller_virtbase(h, &outptr_QObject) + return &QScroller{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQScroller constructs the type using only unsafe pointers. -func UnsafeNewQScroller(h unsafe.Pointer, h_QObject unsafe.Pointer) *QScroller { - if h == nil { - return nil - } - - return &QScroller{h: (*C.QScroller)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQScroller(h unsafe.Pointer) *QScroller { + return newQScroller((*C.QScroller)(h)) } func (this *QScroller) MetaObject() *QMetaObject { @@ -102,11 +100,11 @@ func QScroller_HasScroller(target *QObject) bool { } func QScroller_Scroller(target *QObject) *QScroller { - return newQScroller(C.QScroller_Scroller(target.cPointer()), nil) + return newQScroller(C.QScroller_Scroller(target.cPointer())) } func QScroller_ScrollerWithTarget(target *QObject) *QScroller { - return newQScroller(C.QScroller_ScrollerWithTarget(target.cPointer()), nil) + return newQScroller(C.QScroller_ScrollerWithTarget(target.cPointer())) } func QScroller_GrabGesture(target *QObject) GestureType { @@ -126,7 +124,7 @@ func QScroller_ActiveScrollers() []*QScroller { _ret := make([]*QScroller, int(_ma.len)) _outCast := (*[0xffff]*C.QScroller)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQScroller(_outCast[i], nil) + _ret[i] = newQScroller(_outCast[i]) } return _ret } diff --git a/qt6/gen_qscroller.h b/qt6/gen_qscroller.h index d30d78fb..c1feb97e 100644 --- a/qt6/gen_qscroller.h +++ b/qt6/gen_qscroller.h @@ -30,6 +30,7 @@ typedef struct QScroller QScroller; typedef struct QScrollerProperties QScrollerProperties; #endif +void QScroller_virtbase(QScroller* src, QObject** outptr_QObject); QMetaObject* QScroller_MetaObject(const QScroller* self); void* QScroller_Metacast(QScroller* self, const char* param1); struct miqt_string QScroller_Tr(const char* s); diff --git a/qt6/gen_qscrollerproperties.cpp b/qt6/gen_qscrollerproperties.cpp index 416ea728..477f9ebf 100644 --- a/qt6/gen_qscrollerproperties.cpp +++ b/qt6/gen_qscrollerproperties.cpp @@ -4,14 +4,12 @@ #include "gen_qscrollerproperties.h" #include "_cgo_export.h" -void QScrollerProperties_new(QScrollerProperties** outptr_QScrollerProperties) { - QScrollerProperties* ret = new QScrollerProperties(); - *outptr_QScrollerProperties = ret; +QScrollerProperties* QScrollerProperties_new() { + return new QScrollerProperties(); } -void QScrollerProperties_new2(QScrollerProperties* sp, QScrollerProperties** outptr_QScrollerProperties) { - QScrollerProperties* ret = new QScrollerProperties(*sp); - *outptr_QScrollerProperties = ret; +QScrollerProperties* QScrollerProperties_new2(QScrollerProperties* sp) { + return new QScrollerProperties(*sp); } void QScrollerProperties_OperatorAssign(QScrollerProperties* self, QScrollerProperties* sp) { diff --git a/qt6/gen_qscrollerproperties.go b/qt6/gen_qscrollerproperties.go index be6fcc22..016962fc 100644 --- a/qt6/gen_qscrollerproperties.go +++ b/qt6/gen_qscrollerproperties.go @@ -80,34 +80,27 @@ func newQScrollerProperties(h *C.QScrollerProperties) *QScrollerProperties { if h == nil { return nil } + return &QScrollerProperties{h: h} } // UnsafeNewQScrollerProperties constructs the type using only unsafe pointers. func UnsafeNewQScrollerProperties(h unsafe.Pointer) *QScrollerProperties { - if h == nil { - return nil - } - - return &QScrollerProperties{h: (*C.QScrollerProperties)(h)} + return newQScrollerProperties((*C.QScrollerProperties)(h)) } // NewQScrollerProperties constructs a new QScrollerProperties object. func NewQScrollerProperties() *QScrollerProperties { - var outptr_QScrollerProperties *C.QScrollerProperties = nil - C.QScrollerProperties_new(&outptr_QScrollerProperties) - ret := newQScrollerProperties(outptr_QScrollerProperties) + ret := newQScrollerProperties(C.QScrollerProperties_new()) ret.isSubclass = true return ret } // NewQScrollerProperties2 constructs a new QScrollerProperties object. func NewQScrollerProperties2(sp *QScrollerProperties) *QScrollerProperties { - var outptr_QScrollerProperties *C.QScrollerProperties = nil - C.QScrollerProperties_new2(sp.cPointer(), &outptr_QScrollerProperties) - ret := newQScrollerProperties(outptr_QScrollerProperties) + ret := newQScrollerProperties(C.QScrollerProperties_new2(sp.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qscrollerproperties.h b/qt6/gen_qscrollerproperties.h index 577bf882..82f7c6c4 100644 --- a/qt6/gen_qscrollerproperties.h +++ b/qt6/gen_qscrollerproperties.h @@ -22,8 +22,8 @@ typedef struct QScrollerProperties QScrollerProperties; typedef struct QVariant QVariant; #endif -void QScrollerProperties_new(QScrollerProperties** outptr_QScrollerProperties); -void QScrollerProperties_new2(QScrollerProperties* sp, QScrollerProperties** outptr_QScrollerProperties); +QScrollerProperties* QScrollerProperties_new(); +QScrollerProperties* QScrollerProperties_new2(QScrollerProperties* sp); void QScrollerProperties_OperatorAssign(QScrollerProperties* self, QScrollerProperties* sp); bool QScrollerProperties_OperatorEqual(const QScrollerProperties* self, QScrollerProperties* sp); bool QScrollerProperties_OperatorNotEqual(const QScrollerProperties* self, QScrollerProperties* sp); diff --git a/qt6/gen_qsemaphore.cpp b/qt6/gen_qsemaphore.cpp index e19d8eac..beb2eef6 100644 --- a/qt6/gen_qsemaphore.cpp +++ b/qt6/gen_qsemaphore.cpp @@ -4,14 +4,12 @@ #include "gen_qsemaphore.h" #include "_cgo_export.h" -void QSemaphore_new(QSemaphore** outptr_QSemaphore) { - QSemaphore* ret = new QSemaphore(); - *outptr_QSemaphore = ret; +QSemaphore* QSemaphore_new() { + return new QSemaphore(); } -void QSemaphore_new2(int n, QSemaphore** outptr_QSemaphore) { - QSemaphore* ret = new QSemaphore(static_cast(n)); - *outptr_QSemaphore = ret; +QSemaphore* QSemaphore_new2(int n) { + return new QSemaphore(static_cast(n)); } void QSemaphore_Acquire(QSemaphore* self) { @@ -58,29 +56,24 @@ void QSemaphore_Delete(QSemaphore* self, bool isSubclass) { } } -void QSemaphoreReleaser_new(QSemaphoreReleaser** outptr_QSemaphoreReleaser) { - QSemaphoreReleaser* ret = new QSemaphoreReleaser(); - *outptr_QSemaphoreReleaser = ret; +QSemaphoreReleaser* QSemaphoreReleaser_new() { + return new QSemaphoreReleaser(); } -void QSemaphoreReleaser_new2(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { - QSemaphoreReleaser* ret = new QSemaphoreReleaser(*sem); - *outptr_QSemaphoreReleaser = ret; +QSemaphoreReleaser* QSemaphoreReleaser_new2(QSemaphore* sem) { + return new QSemaphoreReleaser(*sem); } -void QSemaphoreReleaser_new3(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { - QSemaphoreReleaser* ret = new QSemaphoreReleaser(sem); - *outptr_QSemaphoreReleaser = ret; +QSemaphoreReleaser* QSemaphoreReleaser_new3(QSemaphore* sem) { + return new QSemaphoreReleaser(sem); } -void QSemaphoreReleaser_new4(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { - QSemaphoreReleaser* ret = new QSemaphoreReleaser(*sem, static_cast(n)); - *outptr_QSemaphoreReleaser = ret; +QSemaphoreReleaser* QSemaphoreReleaser_new4(QSemaphore* sem, int n) { + return new QSemaphoreReleaser(*sem, static_cast(n)); } -void QSemaphoreReleaser_new5(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser) { - QSemaphoreReleaser* ret = new QSemaphoreReleaser(sem, static_cast(n)); - *outptr_QSemaphoreReleaser = ret; +QSemaphoreReleaser* QSemaphoreReleaser_new5(QSemaphore* sem, int n) { + return new QSemaphoreReleaser(sem, static_cast(n)); } void QSemaphoreReleaser_Swap(QSemaphoreReleaser* self, QSemaphoreReleaser* other) { diff --git a/qt6/gen_qsemaphore.go b/qt6/gen_qsemaphore.go index 6d512379..4d6555e9 100644 --- a/qt6/gen_qsemaphore.go +++ b/qt6/gen_qsemaphore.go @@ -37,34 +37,27 @@ func newQSemaphore(h *C.QSemaphore) *QSemaphore { if h == nil { return nil } + return &QSemaphore{h: h} } // UnsafeNewQSemaphore constructs the type using only unsafe pointers. func UnsafeNewQSemaphore(h unsafe.Pointer) *QSemaphore { - if h == nil { - return nil - } - - return &QSemaphore{h: (*C.QSemaphore)(h)} + return newQSemaphore((*C.QSemaphore)(h)) } // NewQSemaphore constructs a new QSemaphore object. func NewQSemaphore() *QSemaphore { - var outptr_QSemaphore *C.QSemaphore = nil - C.QSemaphore_new(&outptr_QSemaphore) - ret := newQSemaphore(outptr_QSemaphore) + ret := newQSemaphore(C.QSemaphore_new()) ret.isSubclass = true return ret } // NewQSemaphore2 constructs a new QSemaphore object. func NewQSemaphore2(n int) *QSemaphore { - var outptr_QSemaphore *C.QSemaphore = nil - C.QSemaphore_new2((C.int)(n), &outptr_QSemaphore) - ret := newQSemaphore(outptr_QSemaphore) + ret := newQSemaphore(C.QSemaphore_new2((C.int)(n))) ret.isSubclass = true return ret } @@ -143,64 +136,51 @@ func newQSemaphoreReleaser(h *C.QSemaphoreReleaser) *QSemaphoreReleaser { if h == nil { return nil } + return &QSemaphoreReleaser{h: h} } // UnsafeNewQSemaphoreReleaser constructs the type using only unsafe pointers. func UnsafeNewQSemaphoreReleaser(h unsafe.Pointer) *QSemaphoreReleaser { - if h == nil { - return nil - } - - return &QSemaphoreReleaser{h: (*C.QSemaphoreReleaser)(h)} + return newQSemaphoreReleaser((*C.QSemaphoreReleaser)(h)) } // NewQSemaphoreReleaser constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser() *QSemaphoreReleaser { - var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil - C.QSemaphoreReleaser_new(&outptr_QSemaphoreReleaser) - ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(C.QSemaphoreReleaser_new()) ret.isSubclass = true return ret } // NewQSemaphoreReleaser2 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser2(sem *QSemaphore) *QSemaphoreReleaser { - var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil - C.QSemaphoreReleaser_new2(sem.cPointer(), &outptr_QSemaphoreReleaser) - ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(C.QSemaphoreReleaser_new2(sem.cPointer())) ret.isSubclass = true return ret } // NewQSemaphoreReleaser3 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser3(sem *QSemaphore) *QSemaphoreReleaser { - var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil - C.QSemaphoreReleaser_new3(sem.cPointer(), &outptr_QSemaphoreReleaser) - ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(C.QSemaphoreReleaser_new3(sem.cPointer())) ret.isSubclass = true return ret } // NewQSemaphoreReleaser4 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser4(sem *QSemaphore, n int) *QSemaphoreReleaser { - var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil - C.QSemaphoreReleaser_new4(sem.cPointer(), (C.int)(n), &outptr_QSemaphoreReleaser) - ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(C.QSemaphoreReleaser_new4(sem.cPointer(), (C.int)(n))) ret.isSubclass = true return ret } // NewQSemaphoreReleaser5 constructs a new QSemaphoreReleaser object. func NewQSemaphoreReleaser5(sem *QSemaphore, n int) *QSemaphoreReleaser { - var outptr_QSemaphoreReleaser *C.QSemaphoreReleaser = nil - C.QSemaphoreReleaser_new5(sem.cPointer(), (C.int)(n), &outptr_QSemaphoreReleaser) - ret := newQSemaphoreReleaser(outptr_QSemaphoreReleaser) + ret := newQSemaphoreReleaser(C.QSemaphoreReleaser_new5(sem.cPointer(), (C.int)(n))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qsemaphore.h b/qt6/gen_qsemaphore.h index b97ea9b1..48786235 100644 --- a/qt6/gen_qsemaphore.h +++ b/qt6/gen_qsemaphore.h @@ -22,8 +22,8 @@ typedef struct QSemaphore QSemaphore; typedef struct QSemaphoreReleaser QSemaphoreReleaser; #endif -void QSemaphore_new(QSemaphore** outptr_QSemaphore); -void QSemaphore_new2(int n, QSemaphore** outptr_QSemaphore); +QSemaphore* QSemaphore_new(); +QSemaphore* QSemaphore_new2(int n); void QSemaphore_Acquire(QSemaphore* self); bool QSemaphore_TryAcquire(QSemaphore* self); bool QSemaphore_TryAcquire2(QSemaphore* self, int n, int timeout); @@ -35,11 +35,11 @@ bool QSemaphore_TryAcquire1(QSemaphore* self, int n); void QSemaphore_Release1(QSemaphore* self, int n); void QSemaphore_Delete(QSemaphore* self, bool isSubclass); -void QSemaphoreReleaser_new(QSemaphoreReleaser** outptr_QSemaphoreReleaser); -void QSemaphoreReleaser_new2(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser); -void QSemaphoreReleaser_new3(QSemaphore* sem, QSemaphoreReleaser** outptr_QSemaphoreReleaser); -void QSemaphoreReleaser_new4(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser); -void QSemaphoreReleaser_new5(QSemaphore* sem, int n, QSemaphoreReleaser** outptr_QSemaphoreReleaser); +QSemaphoreReleaser* QSemaphoreReleaser_new(); +QSemaphoreReleaser* QSemaphoreReleaser_new2(QSemaphore* sem); +QSemaphoreReleaser* QSemaphoreReleaser_new3(QSemaphore* sem); +QSemaphoreReleaser* QSemaphoreReleaser_new4(QSemaphore* sem, int n); +QSemaphoreReleaser* QSemaphoreReleaser_new5(QSemaphore* sem, int n); void QSemaphoreReleaser_Swap(QSemaphoreReleaser* self, QSemaphoreReleaser* other); QSemaphore* QSemaphoreReleaser_Semaphore(const QSemaphoreReleaser* self); QSemaphore* QSemaphoreReleaser_Cancel(QSemaphoreReleaser* self); diff --git a/qt6/gen_qsequentialanimationgroup.cpp b/qt6/gen_qsequentialanimationgroup.cpp index 3069dbbb..7fcb1d4a 100644 --- a/qt6/gen_qsequentialanimationgroup.cpp +++ b/qt6/gen_qsequentialanimationgroup.cpp @@ -143,20 +143,16 @@ public: }; -void QSequentialAnimationGroup_new(QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQSequentialAnimationGroup* ret = new MiqtVirtualQSequentialAnimationGroup(); - *outptr_QSequentialAnimationGroup = ret; - *outptr_QAnimationGroup = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSequentialAnimationGroup* QSequentialAnimationGroup_new() { + return new MiqtVirtualQSequentialAnimationGroup(); } -void QSequentialAnimationGroup_new2(QObject* parent, QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQSequentialAnimationGroup* ret = new MiqtVirtualQSequentialAnimationGroup(parent); - *outptr_QSequentialAnimationGroup = ret; - *outptr_QAnimationGroup = static_cast(ret); - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSequentialAnimationGroup* QSequentialAnimationGroup_new2(QObject* parent) { + return new MiqtVirtualQSequentialAnimationGroup(parent); +} + +void QSequentialAnimationGroup_virtbase(QSequentialAnimationGroup* src, QAnimationGroup** outptr_QAnimationGroup) { + *outptr_QAnimationGroup = static_cast(src); } QMetaObject* QSequentialAnimationGroup_MetaObject(const QSequentialAnimationGroup* self) { diff --git a/qt6/gen_qsequentialanimationgroup.go b/qt6/gen_qsequentialanimationgroup.go index a78b5ac8..81aa2ecd 100644 --- a/qt6/gen_qsequentialanimationgroup.go +++ b/qt6/gen_qsequentialanimationgroup.go @@ -35,46 +35,34 @@ func (this *QSequentialAnimationGroup) UnsafePointer() unsafe.Pointer { } // newQSequentialAnimationGroup constructs the type using only CGO pointers. -func newQSequentialAnimationGroup(h *C.QSequentialAnimationGroup, h_QAnimationGroup *C.QAnimationGroup, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QSequentialAnimationGroup { +func newQSequentialAnimationGroup(h *C.QSequentialAnimationGroup) *QSequentialAnimationGroup { if h == nil { return nil } + var outptr_QAnimationGroup *C.QAnimationGroup = nil + C.QSequentialAnimationGroup_virtbase(h, &outptr_QAnimationGroup) + return &QSequentialAnimationGroup{h: h, - QAnimationGroup: newQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} + QAnimationGroup: newQAnimationGroup(outptr_QAnimationGroup)} } // UnsafeNewQSequentialAnimationGroup constructs the type using only unsafe pointers. -func UnsafeNewQSequentialAnimationGroup(h unsafe.Pointer, h_QAnimationGroup unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QSequentialAnimationGroup { - if h == nil { - return nil - } - - return &QSequentialAnimationGroup{h: (*C.QSequentialAnimationGroup)(h), - QAnimationGroup: UnsafeNewQAnimationGroup(h_QAnimationGroup, h_QAbstractAnimation, h_QObject)} +func UnsafeNewQSequentialAnimationGroup(h unsafe.Pointer) *QSequentialAnimationGroup { + return newQSequentialAnimationGroup((*C.QSequentialAnimationGroup)(h)) } // NewQSequentialAnimationGroup constructs a new QSequentialAnimationGroup object. func NewQSequentialAnimationGroup() *QSequentialAnimationGroup { - var outptr_QSequentialAnimationGroup *C.QSequentialAnimationGroup = nil - var outptr_QAnimationGroup *C.QAnimationGroup = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QSequentialAnimationGroup_new(&outptr_QSequentialAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQSequentialAnimationGroup(outptr_QSequentialAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret := newQSequentialAnimationGroup(C.QSequentialAnimationGroup_new()) ret.isSubclass = true return ret } // NewQSequentialAnimationGroup2 constructs a new QSequentialAnimationGroup object. func NewQSequentialAnimationGroup2(parent *QObject) *QSequentialAnimationGroup { - var outptr_QSequentialAnimationGroup *C.QSequentialAnimationGroup = nil - var outptr_QAnimationGroup *C.QAnimationGroup = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QSequentialAnimationGroup_new2(parent.cPointer(), &outptr_QSequentialAnimationGroup, &outptr_QAnimationGroup, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQSequentialAnimationGroup(outptr_QSequentialAnimationGroup, outptr_QAnimationGroup, outptr_QAbstractAnimation, outptr_QObject) + ret := newQSequentialAnimationGroup(C.QSequentialAnimationGroup_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -99,15 +87,15 @@ func QSequentialAnimationGroup_Tr(s string) string { } func (this *QSequentialAnimationGroup) AddPause(msecs int) *QPauseAnimation { - return newQPauseAnimation(C.QSequentialAnimationGroup_AddPause(this.h, (C.int)(msecs)), nil, nil) + return newQPauseAnimation(C.QSequentialAnimationGroup_AddPause(this.h, (C.int)(msecs))) } func (this *QSequentialAnimationGroup) InsertPause(index int, msecs int) *QPauseAnimation { - return newQPauseAnimation(C.QSequentialAnimationGroup_InsertPause(this.h, (C.int)(index), (C.int)(msecs)), nil, nil) + return newQPauseAnimation(C.QSequentialAnimationGroup_InsertPause(this.h, (C.int)(index), (C.int)(msecs))) } func (this *QSequentialAnimationGroup) CurrentAnimation() *QAbstractAnimation { - return newQAbstractAnimation(C.QSequentialAnimationGroup_CurrentAnimation(this.h), nil) + return newQAbstractAnimation(C.QSequentialAnimationGroup_CurrentAnimation(this.h)) } func (this *QSequentialAnimationGroup) Duration() int { @@ -129,7 +117,7 @@ func miqt_exec_callback_QSequentialAnimationGroup_CurrentAnimationChanged(cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractAnimation(current, nil) + slotval1 := newQAbstractAnimation(current) gofunc(slotval1) } diff --git a/qt6/gen_qsequentialanimationgroup.h b/qt6/gen_qsequentialanimationgroup.h index 6dffd850..83f3362b 100644 --- a/qt6/gen_qsequentialanimationgroup.h +++ b/qt6/gen_qsequentialanimationgroup.h @@ -32,8 +32,9 @@ typedef struct QPauseAnimation QPauseAnimation; typedef struct QSequentialAnimationGroup QSequentialAnimationGroup; #endif -void QSequentialAnimationGroup_new(QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QSequentialAnimationGroup_new2(QObject* parent, QSequentialAnimationGroup** outptr_QSequentialAnimationGroup, QAnimationGroup** outptr_QAnimationGroup, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +QSequentialAnimationGroup* QSequentialAnimationGroup_new(); +QSequentialAnimationGroup* QSequentialAnimationGroup_new2(QObject* parent); +void QSequentialAnimationGroup_virtbase(QSequentialAnimationGroup* src, QAnimationGroup** outptr_QAnimationGroup); QMetaObject* QSequentialAnimationGroup_MetaObject(const QSequentialAnimationGroup* self); void* QSequentialAnimationGroup_Metacast(QSequentialAnimationGroup* self, const char* param1); struct miqt_string QSequentialAnimationGroup_Tr(const char* s); diff --git a/qt6/gen_qsessionmanager.cpp b/qt6/gen_qsessionmanager.cpp index bf133b57..0eea8ed4 100644 --- a/qt6/gen_qsessionmanager.cpp +++ b/qt6/gen_qsessionmanager.cpp @@ -9,6 +9,10 @@ #include "gen_qsessionmanager.h" #include "_cgo_export.h" +void QSessionManager_virtbase(QSessionManager* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QSessionManager_MetaObject(const QSessionManager* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/gen_qsessionmanager.go b/qt6/gen_qsessionmanager.go index f80d1854..a50bccd8 100644 --- a/qt6/gen_qsessionmanager.go +++ b/qt6/gen_qsessionmanager.go @@ -42,22 +42,20 @@ func (this *QSessionManager) UnsafePointer() unsafe.Pointer { } // newQSessionManager constructs the type using only CGO pointers. -func newQSessionManager(h *C.QSessionManager, h_QObject *C.QObject) *QSessionManager { +func newQSessionManager(h *C.QSessionManager) *QSessionManager { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSessionManager_virtbase(h, &outptr_QObject) + return &QSessionManager{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQSessionManager constructs the type using only unsafe pointers. -func UnsafeNewQSessionManager(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSessionManager { - if h == nil { - return nil - } - - return &QSessionManager{h: (*C.QSessionManager)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQSessionManager(h unsafe.Pointer) *QSessionManager { + return newQSessionManager((*C.QSessionManager)(h)) } func (this *QSessionManager) MetaObject() *QMetaObject { diff --git a/qt6/gen_qsessionmanager.h b/qt6/gen_qsessionmanager.h index 7771d014..338ff11f 100644 --- a/qt6/gen_qsessionmanager.h +++ b/qt6/gen_qsessionmanager.h @@ -24,6 +24,7 @@ typedef struct QObject QObject; typedef struct QSessionManager QSessionManager; #endif +void QSessionManager_virtbase(QSessionManager* src, QObject** outptr_QObject); QMetaObject* QSessionManager_MetaObject(const QSessionManager* self); void* QSessionManager_Metacast(QSessionManager* self, const char* param1); struct miqt_string QSessionManager_Tr(const char* s); diff --git a/qt6/gen_qsettings.cpp b/qt6/gen_qsettings.cpp index 46547cff..33227ffd 100644 --- a/qt6/gen_qsettings.cpp +++ b/qt6/gen_qsettings.cpp @@ -209,111 +209,85 @@ public: }; -void QSettings_new(struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new(struct miqt_string organization) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(organization_QString); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(organization_QString); } -void QSettings_new2(int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new2(int scope, struct miqt_string organization) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), organization_QString); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(static_cast(scope), organization_QString); } -void QSettings_new3(int format, int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new3(int format, int scope, struct miqt_string organization) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString); } -void QSettings_new4(struct miqt_string fileName, int format, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new4(struct miqt_string fileName, int format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(fileName_QString, static_cast(format)); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(fileName_QString, static_cast(format)); } -void QSettings_new5(QSettings** outptr_QSettings, QObject** outptr_QObject) { - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); +QSettings* QSettings_new5() { + return new MiqtVirtualQSettings(); } -void QSettings_new6(int scope, QSettings** outptr_QSettings, QObject** outptr_QObject) { - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope)); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); +QSettings* QSettings_new6(int scope) { + return new MiqtVirtualQSettings(static_cast(scope)); } -void QSettings_new7(struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new7(struct miqt_string organization, struct miqt_string application) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(organization_QString, application_QString); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(organization_QString, application_QString); } -void QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(organization_QString, application_QString, parent); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(organization_QString, application_QString, parent); } -void QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), organization_QString, application_QString); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(static_cast(scope), organization_QString, application_QString); } -void QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), organization_QString, application_QString, parent); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(static_cast(scope), organization_QString, application_QString, parent); } -void QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString, application_QString); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString, application_QString); } -void QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent) { QString organization_QString = QString::fromUtf8(organization.data, organization.len); QString application_QString = QString::fromUtf8(application.data, application.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString, application_QString, parent); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(static_cast(format), static_cast(scope), organization_QString, application_QString, parent); } -void QSettings_new13(struct miqt_string fileName, int format, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { +QSettings* QSettings_new13(struct miqt_string fileName, int format, QObject* parent) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(fileName_QString, static_cast(format), parent); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSettings(fileName_QString, static_cast(format), parent); } -void QSettings_new14(QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(parent); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); +QSettings* QSettings_new14(QObject* parent) { + return new MiqtVirtualQSettings(parent); } -void QSettings_new15(int scope, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject) { - MiqtVirtualQSettings* ret = new MiqtVirtualQSettings(static_cast(scope), parent); - *outptr_QSettings = ret; - *outptr_QObject = static_cast(ret); +QSettings* QSettings_new15(int scope, QObject* parent) { + return new MiqtVirtualQSettings(static_cast(scope), parent); +} + +void QSettings_virtbase(QSettings* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSettings_MetaObject(const QSettings* self) { diff --git a/qt6/gen_qsettings.go b/qt6/gen_qsettings.go index d507bcb6..cd926ae2 100644 --- a/qt6/gen_qsettings.go +++ b/qt6/gen_qsettings.go @@ -74,22 +74,20 @@ func (this *QSettings) UnsafePointer() unsafe.Pointer { } // newQSettings constructs the type using only CGO pointers. -func newQSettings(h *C.QSettings, h_QObject *C.QObject) *QSettings { +func newQSettings(h *C.QSettings) *QSettings { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSettings_virtbase(h, &outptr_QObject) + return &QSettings{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQSettings constructs the type using only unsafe pointers. -func UnsafeNewQSettings(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSettings { - if h == nil { - return nil - } - - return &QSettings{h: (*C.QSettings)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQSettings(h unsafe.Pointer) *QSettings { + return newQSettings((*C.QSettings)(h)) } // NewQSettings constructs a new QSettings object. @@ -98,11 +96,8 @@ func NewQSettings(organization string) *QSettings { organization_ms.data = C.CString(organization) organization_ms.len = C.size_t(len(organization)) defer C.free(unsafe.Pointer(organization_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new(organization_ms, &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new(organization_ms)) ret.isSubclass = true return ret } @@ -113,11 +108,8 @@ func NewQSettings2(scope QSettings__Scope, organization string) *QSettings { organization_ms.data = C.CString(organization) organization_ms.len = C.size_t(len(organization)) defer C.free(unsafe.Pointer(organization_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new2((C.int)(scope), organization_ms, &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new2((C.int)(scope), organization_ms)) ret.isSubclass = true return ret } @@ -128,11 +120,8 @@ func NewQSettings3(format QSettings__Format, scope QSettings__Scope, organizatio organization_ms.data = C.CString(organization) organization_ms.len = C.size_t(len(organization)) defer C.free(unsafe.Pointer(organization_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new3((C.int)(format), (C.int)(scope), organization_ms, &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new3((C.int)(format), (C.int)(scope), organization_ms)) ret.isSubclass = true return ret } @@ -143,33 +132,24 @@ func NewQSettings4(fileName string, format QSettings__Format) *QSettings { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new4(fileName_ms, (C.int)(format), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new4(fileName_ms, (C.int)(format))) ret.isSubclass = true return ret } // NewQSettings5 constructs a new QSettings object. func NewQSettings5() *QSettings { - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new5(&outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new5()) ret.isSubclass = true return ret } // NewQSettings6 constructs a new QSettings object. func NewQSettings6(scope QSettings__Scope) *QSettings { - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new6((C.int)(scope), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new6((C.int)(scope))) ret.isSubclass = true return ret } @@ -184,11 +164,8 @@ func NewQSettings7(organization string, application string) *QSettings { application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new7(organization_ms, application_ms, &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new7(organization_ms, application_ms)) ret.isSubclass = true return ret } @@ -203,11 +180,8 @@ func NewQSettings8(organization string, application string, parent *QObject) *QS application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new8(organization_ms, application_ms, parent.cPointer(), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new8(organization_ms, application_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -222,11 +196,8 @@ func NewQSettings9(scope QSettings__Scope, organization string, application stri application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new9((C.int)(scope), organization_ms, application_ms, &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new9((C.int)(scope), organization_ms, application_ms)) ret.isSubclass = true return ret } @@ -241,11 +212,8 @@ func NewQSettings10(scope QSettings__Scope, organization string, application str application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new10((C.int)(scope), organization_ms, application_ms, parent.cPointer(), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new10((C.int)(scope), organization_ms, application_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -260,11 +228,8 @@ func NewQSettings11(format QSettings__Format, scope QSettings__Scope, organizati application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new11((C.int)(format), (C.int)(scope), organization_ms, application_ms, &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new11((C.int)(format), (C.int)(scope), organization_ms, application_ms)) ret.isSubclass = true return ret } @@ -279,11 +244,8 @@ func NewQSettings12(format QSettings__Format, scope QSettings__Scope, organizati application_ms.data = C.CString(application) application_ms.len = C.size_t(len(application)) defer C.free(unsafe.Pointer(application_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new12((C.int)(format), (C.int)(scope), organization_ms, application_ms, parent.cPointer(), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new12((C.int)(format), (C.int)(scope), organization_ms, application_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -294,33 +256,24 @@ func NewQSettings13(fileName string, format QSettings__Format, parent *QObject) fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new13(fileName_ms, (C.int)(format), parent.cPointer(), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new13(fileName_ms, (C.int)(format), parent.cPointer())) ret.isSubclass = true return ret } // NewQSettings14 constructs a new QSettings object. func NewQSettings14(parent *QObject) *QSettings { - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new14(parent.cPointer(), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new14(parent.cPointer())) ret.isSubclass = true return ret } // NewQSettings15 constructs a new QSettings object. func NewQSettings15(scope QSettings__Scope, parent *QObject) *QSettings { - var outptr_QSettings *C.QSettings = nil - var outptr_QObject *C.QObject = nil - C.QSettings_new15((C.int)(scope), parent.cPointer(), &outptr_QSettings, &outptr_QObject) - ret := newQSettings(outptr_QSettings, outptr_QObject) + ret := newQSettings(C.QSettings_new15((C.int)(scope), parent.cPointer())) ret.isSubclass = true return ret } @@ -619,7 +572,7 @@ func miqt_exec_callback_QSettings_TimerEvent(self *C.QSettings, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QSettings{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -645,7 +598,7 @@ func miqt_exec_callback_QSettings_ChildEvent(self *C.QSettings, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QSettings{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qsettings.h b/qt6/gen_qsettings.h index 53f2d217..21651dfd 100644 --- a/qt6/gen_qsettings.h +++ b/qt6/gen_qsettings.h @@ -36,21 +36,22 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -void QSettings_new(struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new2(int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new3(int format, int scope, struct miqt_string organization, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new4(struct miqt_string fileName, int format, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new5(QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new6(int scope, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new7(struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new13(struct miqt_string fileName, int format, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new14(QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); -void QSettings_new15(int scope, QObject* parent, QSettings** outptr_QSettings, QObject** outptr_QObject); +QSettings* QSettings_new(struct miqt_string organization); +QSettings* QSettings_new2(int scope, struct miqt_string organization); +QSettings* QSettings_new3(int format, int scope, struct miqt_string organization); +QSettings* QSettings_new4(struct miqt_string fileName, int format); +QSettings* QSettings_new5(); +QSettings* QSettings_new6(int scope); +QSettings* QSettings_new7(struct miqt_string organization, struct miqt_string application); +QSettings* QSettings_new8(struct miqt_string organization, struct miqt_string application, QObject* parent); +QSettings* QSettings_new9(int scope, struct miqt_string organization, struct miqt_string application); +QSettings* QSettings_new10(int scope, struct miqt_string organization, struct miqt_string application, QObject* parent); +QSettings* QSettings_new11(int format, int scope, struct miqt_string organization, struct miqt_string application); +QSettings* QSettings_new12(int format, int scope, struct miqt_string organization, struct miqt_string application, QObject* parent); +QSettings* QSettings_new13(struct miqt_string fileName, int format, QObject* parent); +QSettings* QSettings_new14(QObject* parent); +QSettings* QSettings_new15(int scope, QObject* parent); +void QSettings_virtbase(QSettings* src, QObject** outptr_QObject); QMetaObject* QSettings_MetaObject(const QSettings* self); void* QSettings_Metacast(QSettings* self, const char* param1); struct miqt_string QSettings_Tr(const char* s); diff --git a/qt6/gen_qshareddata.cpp b/qt6/gen_qshareddata.cpp index cb6875dc..f0b74962 100644 --- a/qt6/gen_qshareddata.cpp +++ b/qt6/gen_qshareddata.cpp @@ -3,14 +3,12 @@ #include "gen_qshareddata.h" #include "_cgo_export.h" -void QSharedData_new(QSharedData** outptr_QSharedData) { - QSharedData* ret = new QSharedData(); - *outptr_QSharedData = ret; +QSharedData* QSharedData_new() { + return new QSharedData(); } -void QSharedData_new2(QSharedData* param1, QSharedData** outptr_QSharedData) { - QSharedData* ret = new QSharedData(*param1); - *outptr_QSharedData = ret; +QSharedData* QSharedData_new2(QSharedData* param1) { + return new QSharedData(*param1); } void QSharedData_Delete(QSharedData* self, bool isSubclass) { @@ -21,9 +19,8 @@ void QSharedData_Delete(QSharedData* self, bool isSubclass) { } } -void QAdoptSharedDataTag_new(QAdoptSharedDataTag** outptr_QAdoptSharedDataTag) { - QAdoptSharedDataTag* ret = new QAdoptSharedDataTag(); - *outptr_QAdoptSharedDataTag = ret; +QAdoptSharedDataTag* QAdoptSharedDataTag_new() { + return new QAdoptSharedDataTag(); } void QAdoptSharedDataTag_Delete(QAdoptSharedDataTag* self, bool isSubclass) { diff --git a/qt6/gen_qshareddata.go b/qt6/gen_qshareddata.go index 329322ae..4e45d707 100644 --- a/qt6/gen_qshareddata.go +++ b/qt6/gen_qshareddata.go @@ -37,34 +37,27 @@ func newQSharedData(h *C.QSharedData) *QSharedData { if h == nil { return nil } + return &QSharedData{h: h} } // UnsafeNewQSharedData constructs the type using only unsafe pointers. func UnsafeNewQSharedData(h unsafe.Pointer) *QSharedData { - if h == nil { - return nil - } - - return &QSharedData{h: (*C.QSharedData)(h)} + return newQSharedData((*C.QSharedData)(h)) } // NewQSharedData constructs a new QSharedData object. func NewQSharedData() *QSharedData { - var outptr_QSharedData *C.QSharedData = nil - C.QSharedData_new(&outptr_QSharedData) - ret := newQSharedData(outptr_QSharedData) + ret := newQSharedData(C.QSharedData_new()) ret.isSubclass = true return ret } // NewQSharedData2 constructs a new QSharedData object. func NewQSharedData2(param1 *QSharedData) *QSharedData { - var outptr_QSharedData *C.QSharedData = nil - C.QSharedData_new2(param1.cPointer(), &outptr_QSharedData) - ret := newQSharedData(outptr_QSharedData) + ret := newQSharedData(C.QSharedData_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -107,24 +100,19 @@ func newQAdoptSharedDataTag(h *C.QAdoptSharedDataTag) *QAdoptSharedDataTag { if h == nil { return nil } + return &QAdoptSharedDataTag{h: h} } // UnsafeNewQAdoptSharedDataTag constructs the type using only unsafe pointers. func UnsafeNewQAdoptSharedDataTag(h unsafe.Pointer) *QAdoptSharedDataTag { - if h == nil { - return nil - } - - return &QAdoptSharedDataTag{h: (*C.QAdoptSharedDataTag)(h)} + return newQAdoptSharedDataTag((*C.QAdoptSharedDataTag)(h)) } // NewQAdoptSharedDataTag constructs a new QAdoptSharedDataTag object. func NewQAdoptSharedDataTag() *QAdoptSharedDataTag { - var outptr_QAdoptSharedDataTag *C.QAdoptSharedDataTag = nil - C.QAdoptSharedDataTag_new(&outptr_QAdoptSharedDataTag) - ret := newQAdoptSharedDataTag(outptr_QAdoptSharedDataTag) + ret := newQAdoptSharedDataTag(C.QAdoptSharedDataTag_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qshareddata.h b/qt6/gen_qshareddata.h index 7a4ee485..1950b2ad 100644 --- a/qt6/gen_qshareddata.h +++ b/qt6/gen_qshareddata.h @@ -22,11 +22,11 @@ typedef struct QAdoptSharedDataTag QAdoptSharedDataTag; typedef struct QSharedData QSharedData; #endif -void QSharedData_new(QSharedData** outptr_QSharedData); -void QSharedData_new2(QSharedData* param1, QSharedData** outptr_QSharedData); +QSharedData* QSharedData_new(); +QSharedData* QSharedData_new2(QSharedData* param1); void QSharedData_Delete(QSharedData* self, bool isSubclass); -void QAdoptSharedDataTag_new(QAdoptSharedDataTag** outptr_QAdoptSharedDataTag); +QAdoptSharedDataTag* QAdoptSharedDataTag_new(); void QAdoptSharedDataTag_Delete(QAdoptSharedDataTag* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qsharedmemory.cpp b/qt6/gen_qsharedmemory.cpp index 08e06ea2..c22c44bb 100644 --- a/qt6/gen_qsharedmemory.cpp +++ b/qt6/gen_qsharedmemory.cpp @@ -195,30 +195,26 @@ public: }; -void QSharedMemory_new(QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { - MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(); - *outptr_QSharedMemory = ret; - *outptr_QObject = static_cast(ret); +QSharedMemory* QSharedMemory_new() { + return new MiqtVirtualQSharedMemory(); } -void QSharedMemory_new2(struct miqt_string key, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { +QSharedMemory* QSharedMemory_new2(struct miqt_string key) { QString key_QString = QString::fromUtf8(key.data, key.len); - MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(key_QString); - *outptr_QSharedMemory = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSharedMemory(key_QString); } -void QSharedMemory_new3(QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { - MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(parent); - *outptr_QSharedMemory = ret; - *outptr_QObject = static_cast(ret); +QSharedMemory* QSharedMemory_new3(QObject* parent) { + return new MiqtVirtualQSharedMemory(parent); } -void QSharedMemory_new4(struct miqt_string key, QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject) { +QSharedMemory* QSharedMemory_new4(struct miqt_string key, QObject* parent) { QString key_QString = QString::fromUtf8(key.data, key.len); - MiqtVirtualQSharedMemory* ret = new MiqtVirtualQSharedMemory(key_QString, parent); - *outptr_QSharedMemory = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSharedMemory(key_QString, parent); +} + +void QSharedMemory_virtbase(QSharedMemory* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSharedMemory_MetaObject(const QSharedMemory* self) { diff --git a/qt6/gen_qsharedmemory.go b/qt6/gen_qsharedmemory.go index ac707a36..4523db07 100644 --- a/qt6/gen_qsharedmemory.go +++ b/qt6/gen_qsharedmemory.go @@ -56,31 +56,26 @@ func (this *QSharedMemory) UnsafePointer() unsafe.Pointer { } // newQSharedMemory constructs the type using only CGO pointers. -func newQSharedMemory(h *C.QSharedMemory, h_QObject *C.QObject) *QSharedMemory { +func newQSharedMemory(h *C.QSharedMemory) *QSharedMemory { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSharedMemory_virtbase(h, &outptr_QObject) + return &QSharedMemory{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQSharedMemory constructs the type using only unsafe pointers. -func UnsafeNewQSharedMemory(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSharedMemory { - if h == nil { - return nil - } - - return &QSharedMemory{h: (*C.QSharedMemory)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQSharedMemory(h unsafe.Pointer) *QSharedMemory { + return newQSharedMemory((*C.QSharedMemory)(h)) } // NewQSharedMemory constructs a new QSharedMemory object. func NewQSharedMemory() *QSharedMemory { - var outptr_QSharedMemory *C.QSharedMemory = nil - var outptr_QObject *C.QObject = nil - C.QSharedMemory_new(&outptr_QSharedMemory, &outptr_QObject) - ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret := newQSharedMemory(C.QSharedMemory_new()) ret.isSubclass = true return ret } @@ -91,22 +86,16 @@ func NewQSharedMemory2(key string) *QSharedMemory { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QSharedMemory *C.QSharedMemory = nil - var outptr_QObject *C.QObject = nil - C.QSharedMemory_new2(key_ms, &outptr_QSharedMemory, &outptr_QObject) - ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret := newQSharedMemory(C.QSharedMemory_new2(key_ms)) ret.isSubclass = true return ret } // NewQSharedMemory3 constructs a new QSharedMemory object. func NewQSharedMemory3(parent *QObject) *QSharedMemory { - var outptr_QSharedMemory *C.QSharedMemory = nil - var outptr_QObject *C.QObject = nil - C.QSharedMemory_new3(parent.cPointer(), &outptr_QSharedMemory, &outptr_QObject) - ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret := newQSharedMemory(C.QSharedMemory_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -117,11 +106,8 @@ func NewQSharedMemory4(key string, parent *QObject) *QSharedMemory { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QSharedMemory *C.QSharedMemory = nil - var outptr_QObject *C.QObject = nil - C.QSharedMemory_new4(key_ms, parent.cPointer(), &outptr_QSharedMemory, &outptr_QObject) - ret := newQSharedMemory(outptr_QSharedMemory, outptr_QObject) + ret := newQSharedMemory(C.QSharedMemory_new4(key_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -334,7 +320,7 @@ func miqt_exec_callback_QSharedMemory_TimerEvent(self *C.QSharedMemory, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QSharedMemory{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -360,7 +346,7 @@ func miqt_exec_callback_QSharedMemory_ChildEvent(self *C.QSharedMemory, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QSharedMemory{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qsharedmemory.h b/qt6/gen_qsharedmemory.h index 3a6b9f09..b1da394b 100644 --- a/qt6/gen_qsharedmemory.h +++ b/qt6/gen_qsharedmemory.h @@ -32,10 +32,11 @@ typedef struct QSharedMemory QSharedMemory; typedef struct QTimerEvent QTimerEvent; #endif -void QSharedMemory_new(QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); -void QSharedMemory_new2(struct miqt_string key, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); -void QSharedMemory_new3(QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); -void QSharedMemory_new4(struct miqt_string key, QObject* parent, QSharedMemory** outptr_QSharedMemory, QObject** outptr_QObject); +QSharedMemory* QSharedMemory_new(); +QSharedMemory* QSharedMemory_new2(struct miqt_string key); +QSharedMemory* QSharedMemory_new3(QObject* parent); +QSharedMemory* QSharedMemory_new4(struct miqt_string key, QObject* parent); +void QSharedMemory_virtbase(QSharedMemory* src, QObject** outptr_QObject); QMetaObject* QSharedMemory_MetaObject(const QSharedMemory* self); void* QSharedMemory_Metacast(QSharedMemory* self, const char* param1); struct miqt_string QSharedMemory_Tr(const char* s); diff --git a/qt6/gen_qshortcut.cpp b/qt6/gen_qshortcut.cpp index 3d444ddd..a991d255 100644 --- a/qt6/gen_qshortcut.cpp +++ b/qt6/gen_qshortcut.cpp @@ -202,58 +202,44 @@ public: }; -void QShortcut_new(QObject* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { - MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(parent); - *outptr_QShortcut = ret; - *outptr_QObject = static_cast(ret); +QShortcut* QShortcut_new(QObject* parent) { + return new MiqtVirtualQShortcut(parent); } -void QShortcut_new2(QKeySequence* key, QObject* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { - MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent); - *outptr_QShortcut = ret; - *outptr_QObject = static_cast(ret); +QShortcut* QShortcut_new2(QKeySequence* key, QObject* parent) { + return new MiqtVirtualQShortcut(*key, parent); } -void QShortcut_new3(int key, QObject* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { - MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(static_cast(key), parent); - *outptr_QShortcut = ret; - *outptr_QObject = static_cast(ret); +QShortcut* QShortcut_new3(int key, QObject* parent) { + return new MiqtVirtualQShortcut(static_cast(key), parent); } -void QShortcut_new4(QKeySequence* key, QObject* parent, const char* member, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { - MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent, member); - *outptr_QShortcut = ret; - *outptr_QObject = static_cast(ret); +QShortcut* QShortcut_new4(QKeySequence* key, QObject* parent, const char* member) { + return new MiqtVirtualQShortcut(*key, parent, member); } -void QShortcut_new5(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { - MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent, member, ambiguousMember); - *outptr_QShortcut = ret; - *outptr_QObject = static_cast(ret); +QShortcut* QShortcut_new5(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember) { + return new MiqtVirtualQShortcut(*key, parent, member, ambiguousMember); } -void QShortcut_new6(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember, int context, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { - MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(*key, parent, member, ambiguousMember, static_cast(context)); - *outptr_QShortcut = ret; - *outptr_QObject = static_cast(ret); +QShortcut* QShortcut_new6(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember, int context) { + return new MiqtVirtualQShortcut(*key, parent, member, ambiguousMember, static_cast(context)); } -void QShortcut_new7(int key, QObject* parent, const char* member, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { - MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(static_cast(key), parent, member); - *outptr_QShortcut = ret; - *outptr_QObject = static_cast(ret); +QShortcut* QShortcut_new7(int key, QObject* parent, const char* member) { + return new MiqtVirtualQShortcut(static_cast(key), parent, member); } -void QShortcut_new8(int key, QObject* parent, const char* member, const char* ambiguousMember, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { - MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(static_cast(key), parent, member, ambiguousMember); - *outptr_QShortcut = ret; - *outptr_QObject = static_cast(ret); +QShortcut* QShortcut_new8(int key, QObject* parent, const char* member, const char* ambiguousMember) { + return new MiqtVirtualQShortcut(static_cast(key), parent, member, ambiguousMember); } -void QShortcut_new9(int key, QObject* parent, const char* member, const char* ambiguousMember, int context, QShortcut** outptr_QShortcut, QObject** outptr_QObject) { - MiqtVirtualQShortcut* ret = new MiqtVirtualQShortcut(static_cast(key), parent, member, ambiguousMember, static_cast(context)); - *outptr_QShortcut = ret; - *outptr_QObject = static_cast(ret); +QShortcut* QShortcut_new9(int key, QObject* parent, const char* member, const char* ambiguousMember, int context) { + return new MiqtVirtualQShortcut(static_cast(key), parent, member, ambiguousMember, static_cast(context)); +} + +void QShortcut_virtbase(QShortcut* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QShortcut_MetaObject(const QShortcut* self) { diff --git a/qt6/gen_qshortcut.go b/qt6/gen_qshortcut.go index c594d169..6a61a112 100644 --- a/qt6/gen_qshortcut.go +++ b/qt6/gen_qshortcut.go @@ -35,53 +35,42 @@ func (this *QShortcut) UnsafePointer() unsafe.Pointer { } // newQShortcut constructs the type using only CGO pointers. -func newQShortcut(h *C.QShortcut, h_QObject *C.QObject) *QShortcut { +func newQShortcut(h *C.QShortcut) *QShortcut { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QShortcut_virtbase(h, &outptr_QObject) + return &QShortcut{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQShortcut constructs the type using only unsafe pointers. -func UnsafeNewQShortcut(h unsafe.Pointer, h_QObject unsafe.Pointer) *QShortcut { - if h == nil { - return nil - } - - return &QShortcut{h: (*C.QShortcut)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQShortcut(h unsafe.Pointer) *QShortcut { + return newQShortcut((*C.QShortcut)(h)) } // NewQShortcut constructs a new QShortcut object. func NewQShortcut(parent *QObject) *QShortcut { - var outptr_QShortcut *C.QShortcut = nil - var outptr_QObject *C.QObject = nil - C.QShortcut_new(parent.cPointer(), &outptr_QShortcut, &outptr_QObject) - ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret := newQShortcut(C.QShortcut_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQShortcut2 constructs a new QShortcut object. func NewQShortcut2(key *QKeySequence, parent *QObject) *QShortcut { - var outptr_QShortcut *C.QShortcut = nil - var outptr_QObject *C.QObject = nil - C.QShortcut_new2(key.cPointer(), parent.cPointer(), &outptr_QShortcut, &outptr_QObject) - ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret := newQShortcut(C.QShortcut_new2(key.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQShortcut3 constructs a new QShortcut object. func NewQShortcut3(key QKeySequence__StandardKey, parent *QObject) *QShortcut { - var outptr_QShortcut *C.QShortcut = nil - var outptr_QObject *C.QObject = nil - C.QShortcut_new3((C.int)(key), parent.cPointer(), &outptr_QShortcut, &outptr_QObject) - ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret := newQShortcut(C.QShortcut_new3((C.int)(key), parent.cPointer())) ret.isSubclass = true return ret } @@ -90,11 +79,8 @@ func NewQShortcut3(key QKeySequence__StandardKey, parent *QObject) *QShortcut { func NewQShortcut4(key *QKeySequence, parent *QObject, member string) *QShortcut { member_Cstring := C.CString(member) defer C.free(unsafe.Pointer(member_Cstring)) - var outptr_QShortcut *C.QShortcut = nil - var outptr_QObject *C.QObject = nil - C.QShortcut_new4(key.cPointer(), parent.cPointer(), member_Cstring, &outptr_QShortcut, &outptr_QObject) - ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret := newQShortcut(C.QShortcut_new4(key.cPointer(), parent.cPointer(), member_Cstring)) ret.isSubclass = true return ret } @@ -105,11 +91,8 @@ func NewQShortcut5(key *QKeySequence, parent *QObject, member string, ambiguousM defer C.free(unsafe.Pointer(member_Cstring)) ambiguousMember_Cstring := C.CString(ambiguousMember) defer C.free(unsafe.Pointer(ambiguousMember_Cstring)) - var outptr_QShortcut *C.QShortcut = nil - var outptr_QObject *C.QObject = nil - C.QShortcut_new5(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, &outptr_QShortcut, &outptr_QObject) - ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret := newQShortcut(C.QShortcut_new5(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring)) ret.isSubclass = true return ret } @@ -120,11 +103,8 @@ func NewQShortcut6(key *QKeySequence, parent *QObject, member string, ambiguousM defer C.free(unsafe.Pointer(member_Cstring)) ambiguousMember_Cstring := C.CString(ambiguousMember) defer C.free(unsafe.Pointer(ambiguousMember_Cstring)) - var outptr_QShortcut *C.QShortcut = nil - var outptr_QObject *C.QObject = nil - C.QShortcut_new6(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, (C.int)(context), &outptr_QShortcut, &outptr_QObject) - ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret := newQShortcut(C.QShortcut_new6(key.cPointer(), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, (C.int)(context))) ret.isSubclass = true return ret } @@ -133,11 +113,8 @@ func NewQShortcut6(key *QKeySequence, parent *QObject, member string, ambiguousM func NewQShortcut7(key QKeySequence__StandardKey, parent *QObject, member string) *QShortcut { member_Cstring := C.CString(member) defer C.free(unsafe.Pointer(member_Cstring)) - var outptr_QShortcut *C.QShortcut = nil - var outptr_QObject *C.QObject = nil - C.QShortcut_new7((C.int)(key), parent.cPointer(), member_Cstring, &outptr_QShortcut, &outptr_QObject) - ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret := newQShortcut(C.QShortcut_new7((C.int)(key), parent.cPointer(), member_Cstring)) ret.isSubclass = true return ret } @@ -148,11 +125,8 @@ func NewQShortcut8(key QKeySequence__StandardKey, parent *QObject, member string defer C.free(unsafe.Pointer(member_Cstring)) ambiguousMember_Cstring := C.CString(ambiguousMember) defer C.free(unsafe.Pointer(ambiguousMember_Cstring)) - var outptr_QShortcut *C.QShortcut = nil - var outptr_QObject *C.QObject = nil - C.QShortcut_new8((C.int)(key), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, &outptr_QShortcut, &outptr_QObject) - ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret := newQShortcut(C.QShortcut_new8((C.int)(key), parent.cPointer(), member_Cstring, ambiguousMember_Cstring)) ret.isSubclass = true return ret } @@ -163,11 +137,8 @@ func NewQShortcut9(key QKeySequence__StandardKey, parent *QObject, member string defer C.free(unsafe.Pointer(member_Cstring)) ambiguousMember_Cstring := C.CString(ambiguousMember) defer C.free(unsafe.Pointer(ambiguousMember_Cstring)) - var outptr_QShortcut *C.QShortcut = nil - var outptr_QObject *C.QObject = nil - C.QShortcut_new9((C.int)(key), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, (C.int)(context), &outptr_QShortcut, &outptr_QObject) - ret := newQShortcut(outptr_QShortcut, outptr_QObject) + ret := newQShortcut(C.QShortcut_new9((C.int)(key), parent.cPointer(), member_Cstring, ambiguousMember_Cstring, (C.int)(context))) ret.isSubclass = true return ret } @@ -404,7 +375,7 @@ func miqt_exec_callback_QShortcut_TimerEvent(self *C.QShortcut, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QShortcut{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -430,7 +401,7 @@ func miqt_exec_callback_QShortcut_ChildEvent(self *C.QShortcut, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QShortcut{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qshortcut.h b/qt6/gen_qshortcut.h index ee2cca52..ef605b17 100644 --- a/qt6/gen_qshortcut.h +++ b/qt6/gen_qshortcut.h @@ -34,15 +34,16 @@ typedef struct QShortcut QShortcut; typedef struct QTimerEvent QTimerEvent; #endif -void QShortcut_new(QObject* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject); -void QShortcut_new2(QKeySequence* key, QObject* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject); -void QShortcut_new3(int key, QObject* parent, QShortcut** outptr_QShortcut, QObject** outptr_QObject); -void QShortcut_new4(QKeySequence* key, QObject* parent, const char* member, QShortcut** outptr_QShortcut, QObject** outptr_QObject); -void QShortcut_new5(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember, QShortcut** outptr_QShortcut, QObject** outptr_QObject); -void QShortcut_new6(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember, int context, QShortcut** outptr_QShortcut, QObject** outptr_QObject); -void QShortcut_new7(int key, QObject* parent, const char* member, QShortcut** outptr_QShortcut, QObject** outptr_QObject); -void QShortcut_new8(int key, QObject* parent, const char* member, const char* ambiguousMember, QShortcut** outptr_QShortcut, QObject** outptr_QObject); -void QShortcut_new9(int key, QObject* parent, const char* member, const char* ambiguousMember, int context, QShortcut** outptr_QShortcut, QObject** outptr_QObject); +QShortcut* QShortcut_new(QObject* parent); +QShortcut* QShortcut_new2(QKeySequence* key, QObject* parent); +QShortcut* QShortcut_new3(int key, QObject* parent); +QShortcut* QShortcut_new4(QKeySequence* key, QObject* parent, const char* member); +QShortcut* QShortcut_new5(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember); +QShortcut* QShortcut_new6(QKeySequence* key, QObject* parent, const char* member, const char* ambiguousMember, int context); +QShortcut* QShortcut_new7(int key, QObject* parent, const char* member); +QShortcut* QShortcut_new8(int key, QObject* parent, const char* member, const char* ambiguousMember); +QShortcut* QShortcut_new9(int key, QObject* parent, const char* member, const char* ambiguousMember, int context); +void QShortcut_virtbase(QShortcut* src, QObject** outptr_QObject); QMetaObject* QShortcut_MetaObject(const QShortcut* self); void* QShortcut_Metacast(QShortcut* self, const char* param1); struct miqt_string QShortcut_Tr(const char* s); diff --git a/qt6/gen_qsignalmapper.cpp b/qt6/gen_qsignalmapper.cpp index 387dbe70..aedc10ff 100644 --- a/qt6/gen_qsignalmapper.cpp +++ b/qt6/gen_qsignalmapper.cpp @@ -193,16 +193,16 @@ public: }; -void QSignalMapper_new(QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject) { - MiqtVirtualQSignalMapper* ret = new MiqtVirtualQSignalMapper(); - *outptr_QSignalMapper = ret; - *outptr_QObject = static_cast(ret); +QSignalMapper* QSignalMapper_new() { + return new MiqtVirtualQSignalMapper(); } -void QSignalMapper_new2(QObject* parent, QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject) { - MiqtVirtualQSignalMapper* ret = new MiqtVirtualQSignalMapper(parent); - *outptr_QSignalMapper = ret; - *outptr_QObject = static_cast(ret); +QSignalMapper* QSignalMapper_new2(QObject* parent) { + return new MiqtVirtualQSignalMapper(parent); +} + +void QSignalMapper_virtbase(QSignalMapper* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSignalMapper_MetaObject(const QSignalMapper* self) { diff --git a/qt6/gen_qsignalmapper.go b/qt6/gen_qsignalmapper.go index e4621679..43a69f16 100644 --- a/qt6/gen_qsignalmapper.go +++ b/qt6/gen_qsignalmapper.go @@ -35,42 +35,34 @@ func (this *QSignalMapper) UnsafePointer() unsafe.Pointer { } // newQSignalMapper constructs the type using only CGO pointers. -func newQSignalMapper(h *C.QSignalMapper, h_QObject *C.QObject) *QSignalMapper { +func newQSignalMapper(h *C.QSignalMapper) *QSignalMapper { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSignalMapper_virtbase(h, &outptr_QObject) + return &QSignalMapper{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQSignalMapper constructs the type using only unsafe pointers. -func UnsafeNewQSignalMapper(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSignalMapper { - if h == nil { - return nil - } - - return &QSignalMapper{h: (*C.QSignalMapper)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQSignalMapper(h unsafe.Pointer) *QSignalMapper { + return newQSignalMapper((*C.QSignalMapper)(h)) } // NewQSignalMapper constructs a new QSignalMapper object. func NewQSignalMapper() *QSignalMapper { - var outptr_QSignalMapper *C.QSignalMapper = nil - var outptr_QObject *C.QObject = nil - C.QSignalMapper_new(&outptr_QSignalMapper, &outptr_QObject) - ret := newQSignalMapper(outptr_QSignalMapper, outptr_QObject) + ret := newQSignalMapper(C.QSignalMapper_new()) ret.isSubclass = true return ret } // NewQSignalMapper2 constructs a new QSignalMapper object. func NewQSignalMapper2(parent *QObject) *QSignalMapper { - var outptr_QSignalMapper *C.QSignalMapper = nil - var outptr_QObject *C.QObject = nil - C.QSignalMapper_new2(parent.cPointer(), &outptr_QSignalMapper, &outptr_QObject) - ret := newQSignalMapper(outptr_QSignalMapper, outptr_QObject) + ret := newQSignalMapper(C.QSignalMapper_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -305,7 +297,7 @@ func miqt_exec_callback_QSignalMapper_TimerEvent(self *C.QSignalMapper, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QSignalMapper{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -331,7 +323,7 @@ func miqt_exec_callback_QSignalMapper_ChildEvent(self *C.QSignalMapper, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QSignalMapper{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qsignalmapper.h b/qt6/gen_qsignalmapper.h index c3079bed..78661813 100644 --- a/qt6/gen_qsignalmapper.h +++ b/qt6/gen_qsignalmapper.h @@ -32,8 +32,9 @@ typedef struct QSignalMapper QSignalMapper; typedef struct QTimerEvent QTimerEvent; #endif -void QSignalMapper_new(QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject); -void QSignalMapper_new2(QObject* parent, QSignalMapper** outptr_QSignalMapper, QObject** outptr_QObject); +QSignalMapper* QSignalMapper_new(); +QSignalMapper* QSignalMapper_new2(QObject* parent); +void QSignalMapper_virtbase(QSignalMapper* src, QObject** outptr_QObject); QMetaObject* QSignalMapper_MetaObject(const QSignalMapper* self); void* QSignalMapper_Metacast(QSignalMapper* self, const char* param1); struct miqt_string QSignalMapper_Tr(const char* s); diff --git a/qt6/gen_qsize.cpp b/qt6/gen_qsize.cpp index f94d6e97..7a622502 100644 --- a/qt6/gen_qsize.cpp +++ b/qt6/gen_qsize.cpp @@ -6,19 +6,16 @@ #include "gen_qsize.h" #include "_cgo_export.h" -void QSize_new(QSize** outptr_QSize) { - QSize* ret = new QSize(); - *outptr_QSize = ret; +QSize* QSize_new() { + return new QSize(); } -void QSize_new2(int w, int h, QSize** outptr_QSize) { - QSize* ret = new QSize(static_cast(w), static_cast(h)); - *outptr_QSize = ret; +QSize* QSize_new2(int w, int h) { + return new QSize(static_cast(w), static_cast(h)); } -void QSize_new3(QSize* param1, QSize** outptr_QSize) { - QSize* ret = new QSize(*param1); - *outptr_QSize = ret; +QSize* QSize_new3(QSize* param1) { + return new QSize(*param1); } bool QSize_IsNull(const QSize* self) { @@ -125,24 +122,20 @@ void QSize_Delete(QSize* self, bool isSubclass) { } } -void QSizeF_new(QSizeF** outptr_QSizeF) { - QSizeF* ret = new QSizeF(); - *outptr_QSizeF = ret; +QSizeF* QSizeF_new() { + return new QSizeF(); } -void QSizeF_new2(QSize* sz, QSizeF** outptr_QSizeF) { - QSizeF* ret = new QSizeF(*sz); - *outptr_QSizeF = ret; +QSizeF* QSizeF_new2(QSize* sz) { + return new QSizeF(*sz); } -void QSizeF_new3(double w, double h, QSizeF** outptr_QSizeF) { - QSizeF* ret = new QSizeF(static_cast(w), static_cast(h)); - *outptr_QSizeF = ret; +QSizeF* QSizeF_new3(double w, double h) { + return new QSizeF(static_cast(w), static_cast(h)); } -void QSizeF_new4(QSizeF* param1, QSizeF** outptr_QSizeF) { - QSizeF* ret = new QSizeF(*param1); - *outptr_QSizeF = ret; +QSizeF* QSizeF_new4(QSizeF* param1) { + return new QSizeF(*param1); } bool QSizeF_IsNull(const QSizeF* self) { diff --git a/qt6/gen_qsize.go b/qt6/gen_qsize.go index 751605d7..850513c3 100644 --- a/qt6/gen_qsize.go +++ b/qt6/gen_qsize.go @@ -37,44 +37,35 @@ func newQSize(h *C.QSize) *QSize { if h == nil { return nil } + return &QSize{h: h} } // UnsafeNewQSize constructs the type using only unsafe pointers. func UnsafeNewQSize(h unsafe.Pointer) *QSize { - if h == nil { - return nil - } - - return &QSize{h: (*C.QSize)(h)} + return newQSize((*C.QSize)(h)) } // NewQSize constructs a new QSize object. func NewQSize() *QSize { - var outptr_QSize *C.QSize = nil - C.QSize_new(&outptr_QSize) - ret := newQSize(outptr_QSize) + ret := newQSize(C.QSize_new()) ret.isSubclass = true return ret } // NewQSize2 constructs a new QSize object. func NewQSize2(w int, h int) *QSize { - var outptr_QSize *C.QSize = nil - C.QSize_new2((C.int)(w), (C.int)(h), &outptr_QSize) - ret := newQSize(outptr_QSize) + ret := newQSize(C.QSize_new2((C.int)(w), (C.int)(h))) ret.isSubclass = true return ret } // NewQSize3 constructs a new QSize object. func NewQSize3(param1 *QSize) *QSize { - var outptr_QSize *C.QSize = nil - C.QSize_new3(param1.cPointer(), &outptr_QSize) - ret := newQSize(outptr_QSize) + ret := newQSize(C.QSize_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -221,54 +212,43 @@ func newQSizeF(h *C.QSizeF) *QSizeF { if h == nil { return nil } + return &QSizeF{h: h} } // UnsafeNewQSizeF constructs the type using only unsafe pointers. func UnsafeNewQSizeF(h unsafe.Pointer) *QSizeF { - if h == nil { - return nil - } - - return &QSizeF{h: (*C.QSizeF)(h)} + return newQSizeF((*C.QSizeF)(h)) } // NewQSizeF constructs a new QSizeF object. func NewQSizeF() *QSizeF { - var outptr_QSizeF *C.QSizeF = nil - C.QSizeF_new(&outptr_QSizeF) - ret := newQSizeF(outptr_QSizeF) + ret := newQSizeF(C.QSizeF_new()) ret.isSubclass = true return ret } // NewQSizeF2 constructs a new QSizeF object. func NewQSizeF2(sz *QSize) *QSizeF { - var outptr_QSizeF *C.QSizeF = nil - C.QSizeF_new2(sz.cPointer(), &outptr_QSizeF) - ret := newQSizeF(outptr_QSizeF) + ret := newQSizeF(C.QSizeF_new2(sz.cPointer())) ret.isSubclass = true return ret } // NewQSizeF3 constructs a new QSizeF object. func NewQSizeF3(w float64, h float64) *QSizeF { - var outptr_QSizeF *C.QSizeF = nil - C.QSizeF_new3((C.double)(w), (C.double)(h), &outptr_QSizeF) - ret := newQSizeF(outptr_QSizeF) + ret := newQSizeF(C.QSizeF_new3((C.double)(w), (C.double)(h))) ret.isSubclass = true return ret } // NewQSizeF4 constructs a new QSizeF object. func NewQSizeF4(param1 *QSizeF) *QSizeF { - var outptr_QSizeF *C.QSizeF = nil - C.QSizeF_new4(param1.cPointer(), &outptr_QSizeF) - ret := newQSizeF(outptr_QSizeF) + ret := newQSizeF(C.QSizeF_new4(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qsize.h b/qt6/gen_qsize.h index 330fcbcd..118ee8bd 100644 --- a/qt6/gen_qsize.h +++ b/qt6/gen_qsize.h @@ -26,9 +26,9 @@ typedef struct QSize QSize; typedef struct QSizeF QSizeF; #endif -void QSize_new(QSize** outptr_QSize); -void QSize_new2(int w, int h, QSize** outptr_QSize); -void QSize_new3(QSize* param1, QSize** outptr_QSize); +QSize* QSize_new(); +QSize* QSize_new2(int w, int h); +QSize* QSize_new3(QSize* param1); bool QSize_IsNull(const QSize* self); bool QSize_IsEmpty(const QSize* self); bool QSize_IsValid(const QSize* self); @@ -53,10 +53,10 @@ QSize* QSize_OperatorDivideAssign(QSize* self, double c); QSizeF* QSize_ToSizeF(const QSize* self); void QSize_Delete(QSize* self, bool isSubclass); -void QSizeF_new(QSizeF** outptr_QSizeF); -void QSizeF_new2(QSize* sz, QSizeF** outptr_QSizeF); -void QSizeF_new3(double w, double h, QSizeF** outptr_QSizeF); -void QSizeF_new4(QSizeF* param1, QSizeF** outptr_QSizeF); +QSizeF* QSizeF_new(); +QSizeF* QSizeF_new2(QSize* sz); +QSizeF* QSizeF_new3(double w, double h); +QSizeF* QSizeF_new4(QSizeF* param1); bool QSizeF_IsNull(const QSizeF* self); bool QSizeF_IsEmpty(const QSizeF* self); bool QSizeF_IsValid(const QSizeF* self); diff --git a/qt6/gen_qsizegrip.cpp b/qt6/gen_qsizegrip.cpp index 1cd36974..f46d23c7 100644 --- a/qt6/gen_qsizegrip.cpp +++ b/qt6/gen_qsizegrip.cpp @@ -1045,12 +1045,12 @@ public: }; -void QSizeGrip_new(QWidget* parent, QSizeGrip** outptr_QSizeGrip, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSizeGrip* ret = new MiqtVirtualQSizeGrip(parent); - *outptr_QSizeGrip = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSizeGrip* QSizeGrip_new(QWidget* parent) { + return new MiqtVirtualQSizeGrip(parent); +} + +void QSizeGrip_virtbase(QSizeGrip* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QSizeGrip_MetaObject(const QSizeGrip* self) { diff --git a/qt6/gen_qsizegrip.go b/qt6/gen_qsizegrip.go index 498a730a..05249096 100644 --- a/qt6/gen_qsizegrip.go +++ b/qt6/gen_qsizegrip.go @@ -35,33 +35,26 @@ func (this *QSizeGrip) UnsafePointer() unsafe.Pointer { } // newQSizeGrip constructs the type using only CGO pointers. -func newQSizeGrip(h *C.QSizeGrip, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSizeGrip { +func newQSizeGrip(h *C.QSizeGrip) *QSizeGrip { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QSizeGrip_virtbase(h, &outptr_QWidget) + return &QSizeGrip{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQSizeGrip constructs the type using only unsafe pointers. -func UnsafeNewQSizeGrip(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSizeGrip { - if h == nil { - return nil - } - - return &QSizeGrip{h: (*C.QSizeGrip)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQSizeGrip(h unsafe.Pointer) *QSizeGrip { + return newQSizeGrip((*C.QSizeGrip)(h)) } // NewQSizeGrip constructs a new QSizeGrip object. func NewQSizeGrip(parent *QWidget) *QSizeGrip { - var outptr_QSizeGrip *C.QSizeGrip = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSizeGrip_new(parent.cPointer(), &outptr_QSizeGrip, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSizeGrip(outptr_QSizeGrip, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSizeGrip(C.QSizeGrip_new(parent.cPointer())) ret.isSubclass = true return ret } @@ -190,7 +183,7 @@ func miqt_exec_callback_QSizeGrip_PaintEvent(self *C.QSizeGrip, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QSizeGrip{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -216,7 +209,7 @@ func miqt_exec_callback_QSizeGrip_MousePressEvent(self *C.QSizeGrip, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QSizeGrip{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -242,7 +235,7 @@ func miqt_exec_callback_QSizeGrip_MouseMoveEvent(self *C.QSizeGrip, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QSizeGrip{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -268,7 +261,7 @@ func miqt_exec_callback_QSizeGrip_MouseReleaseEvent(self *C.QSizeGrip, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(mouseEvent, nil, nil, nil, nil) + slotval1 := newQMouseEvent(mouseEvent) gofunc((&QSizeGrip{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -294,7 +287,7 @@ func miqt_exec_callback_QSizeGrip_MoveEvent(self *C.QSizeGrip, cb C.intptr_t, mo } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(moveEvent, nil) + slotval1 := newQMoveEvent(moveEvent) gofunc((&QSizeGrip{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -320,7 +313,7 @@ func miqt_exec_callback_QSizeGrip_ShowEvent(self *C.QSizeGrip, cb C.intptr_t, sh } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(showEvent, nil) + slotval1 := newQShowEvent(showEvent) gofunc((&QSizeGrip{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -346,7 +339,7 @@ func miqt_exec_callback_QSizeGrip_HideEvent(self *C.QSizeGrip, cb C.intptr_t, hi } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(hideEvent, nil) + slotval1 := newQHideEvent(hideEvent) gofunc((&QSizeGrip{h: self}).callVirtualBase_HideEvent, slotval1) @@ -560,7 +553,7 @@ func miqt_exec_callback_QSizeGrip_MouseDoubleClickEvent(self *C.QSizeGrip, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -586,7 +579,7 @@ func miqt_exec_callback_QSizeGrip_WheelEvent(self *C.QSizeGrip, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -612,7 +605,7 @@ func miqt_exec_callback_QSizeGrip_KeyPressEvent(self *C.QSizeGrip, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -638,7 +631,7 @@ func miqt_exec_callback_QSizeGrip_KeyReleaseEvent(self *C.QSizeGrip, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -664,7 +657,7 @@ func miqt_exec_callback_QSizeGrip_FocusInEvent(self *C.QSizeGrip, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -690,7 +683,7 @@ func miqt_exec_callback_QSizeGrip_FocusOutEvent(self *C.QSizeGrip, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -716,7 +709,7 @@ func miqt_exec_callback_QSizeGrip_EnterEvent(self *C.QSizeGrip, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -768,7 +761,7 @@ func miqt_exec_callback_QSizeGrip_ResizeEvent(self *C.QSizeGrip, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -794,7 +787,7 @@ func miqt_exec_callback_QSizeGrip_CloseEvent(self *C.QSizeGrip, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -820,7 +813,7 @@ func miqt_exec_callback_QSizeGrip_ContextMenuEvent(self *C.QSizeGrip, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -846,7 +839,7 @@ func miqt_exec_callback_QSizeGrip_TabletEvent(self *C.QSizeGrip, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -872,7 +865,7 @@ func miqt_exec_callback_QSizeGrip_ActionEvent(self *C.QSizeGrip, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -898,7 +891,7 @@ func miqt_exec_callback_QSizeGrip_DragEnterEvent(self *C.QSizeGrip, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -924,7 +917,7 @@ func miqt_exec_callback_QSizeGrip_DragMoveEvent(self *C.QSizeGrip, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -950,7 +943,7 @@ func miqt_exec_callback_QSizeGrip_DragLeaveEvent(self *C.QSizeGrip, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -976,7 +969,7 @@ func miqt_exec_callback_QSizeGrip_DropEvent(self *C.QSizeGrip, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QSizeGrip{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1172,7 +1165,7 @@ func miqt_exec_callback_QSizeGrip_InputMethodEvent(self *C.QSizeGrip, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QSizeGrip{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qsizegrip.h b/qt6/gen_qsizegrip.h index 8ce60dbf..ea19fccd 100644 --- a/qt6/gen_qsizegrip.h +++ b/qt6/gen_qsizegrip.h @@ -78,7 +78,8 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QSizeGrip_new(QWidget* parent, QSizeGrip** outptr_QSizeGrip, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QSizeGrip* QSizeGrip_new(QWidget* parent); +void QSizeGrip_virtbase(QSizeGrip* src, QWidget** outptr_QWidget); QMetaObject* QSizeGrip_MetaObject(const QSizeGrip* self); void* QSizeGrip_Metacast(QSizeGrip* self, const char* param1); struct miqt_string QSizeGrip_Tr(const char* s); diff --git a/qt6/gen_qsizepolicy.cpp b/qt6/gen_qsizepolicy.cpp index 0d11a31c..a5e94620 100644 --- a/qt6/gen_qsizepolicy.cpp +++ b/qt6/gen_qsizepolicy.cpp @@ -3,24 +3,20 @@ #include "gen_qsizepolicy.h" #include "_cgo_export.h" -void QSizePolicy_new(QSizePolicy** outptr_QSizePolicy) { - QSizePolicy* ret = new QSizePolicy(); - *outptr_QSizePolicy = ret; +QSizePolicy* QSizePolicy_new() { + return new QSizePolicy(); } -void QSizePolicy_new2(int horizontal, int vertical, QSizePolicy** outptr_QSizePolicy) { - QSizePolicy* ret = new QSizePolicy(static_cast(horizontal), static_cast(vertical)); - *outptr_QSizePolicy = ret; +QSizePolicy* QSizePolicy_new2(int horizontal, int vertical) { + return new QSizePolicy(static_cast(horizontal), static_cast(vertical)); } -void QSizePolicy_new3(QSizePolicy* param1, QSizePolicy** outptr_QSizePolicy) { - QSizePolicy* ret = new QSizePolicy(*param1); - *outptr_QSizePolicy = ret; +QSizePolicy* QSizePolicy_new3(QSizePolicy* param1) { + return new QSizePolicy(*param1); } -void QSizePolicy_new4(int horizontal, int vertical, int typeVal, QSizePolicy** outptr_QSizePolicy) { - QSizePolicy* ret = new QSizePolicy(static_cast(horizontal), static_cast(vertical), static_cast(typeVal)); - *outptr_QSizePolicy = ret; +QSizePolicy* QSizePolicy_new4(int horizontal, int vertical, int typeVal) { + return new QSizePolicy(static_cast(horizontal), static_cast(vertical), static_cast(typeVal)); } int QSizePolicy_HorizontalPolicy(const QSizePolicy* self) { diff --git a/qt6/gen_qsizepolicy.go b/qt6/gen_qsizepolicy.go index 9289cb7b..f29e9097 100644 --- a/qt6/gen_qsizepolicy.go +++ b/qt6/gen_qsizepolicy.go @@ -78,54 +78,43 @@ func newQSizePolicy(h *C.QSizePolicy) *QSizePolicy { if h == nil { return nil } + return &QSizePolicy{h: h} } // UnsafeNewQSizePolicy constructs the type using only unsafe pointers. func UnsafeNewQSizePolicy(h unsafe.Pointer) *QSizePolicy { - if h == nil { - return nil - } - - return &QSizePolicy{h: (*C.QSizePolicy)(h)} + return newQSizePolicy((*C.QSizePolicy)(h)) } // NewQSizePolicy constructs a new QSizePolicy object. func NewQSizePolicy() *QSizePolicy { - var outptr_QSizePolicy *C.QSizePolicy = nil - C.QSizePolicy_new(&outptr_QSizePolicy) - ret := newQSizePolicy(outptr_QSizePolicy) + ret := newQSizePolicy(C.QSizePolicy_new()) ret.isSubclass = true return ret } // NewQSizePolicy2 constructs a new QSizePolicy object. func NewQSizePolicy2(horizontal QSizePolicy__Policy, vertical QSizePolicy__Policy) *QSizePolicy { - var outptr_QSizePolicy *C.QSizePolicy = nil - C.QSizePolicy_new2((C.int)(horizontal), (C.int)(vertical), &outptr_QSizePolicy) - ret := newQSizePolicy(outptr_QSizePolicy) + ret := newQSizePolicy(C.QSizePolicy_new2((C.int)(horizontal), (C.int)(vertical))) ret.isSubclass = true return ret } // NewQSizePolicy3 constructs a new QSizePolicy object. func NewQSizePolicy3(param1 *QSizePolicy) *QSizePolicy { - var outptr_QSizePolicy *C.QSizePolicy = nil - C.QSizePolicy_new3(param1.cPointer(), &outptr_QSizePolicy) - ret := newQSizePolicy(outptr_QSizePolicy) + ret := newQSizePolicy(C.QSizePolicy_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQSizePolicy4 constructs a new QSizePolicy object. func NewQSizePolicy4(horizontal QSizePolicy__Policy, vertical QSizePolicy__Policy, typeVal QSizePolicy__ControlType) *QSizePolicy { - var outptr_QSizePolicy *C.QSizePolicy = nil - C.QSizePolicy_new4((C.int)(horizontal), (C.int)(vertical), (C.int)(typeVal), &outptr_QSizePolicy) - ret := newQSizePolicy(outptr_QSizePolicy) + ret := newQSizePolicy(C.QSizePolicy_new4((C.int)(horizontal), (C.int)(vertical), (C.int)(typeVal))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qsizepolicy.h b/qt6/gen_qsizepolicy.h index 283aa622..3b82e760 100644 --- a/qt6/gen_qsizepolicy.h +++ b/qt6/gen_qsizepolicy.h @@ -20,10 +20,10 @@ class QSizePolicy; typedef struct QSizePolicy QSizePolicy; #endif -void QSizePolicy_new(QSizePolicy** outptr_QSizePolicy); -void QSizePolicy_new2(int horizontal, int vertical, QSizePolicy** outptr_QSizePolicy); -void QSizePolicy_new3(QSizePolicy* param1, QSizePolicy** outptr_QSizePolicy); -void QSizePolicy_new4(int horizontal, int vertical, int typeVal, QSizePolicy** outptr_QSizePolicy); +QSizePolicy* QSizePolicy_new(); +QSizePolicy* QSizePolicy_new2(int horizontal, int vertical); +QSizePolicy* QSizePolicy_new3(QSizePolicy* param1); +QSizePolicy* QSizePolicy_new4(int horizontal, int vertical, int typeVal); int QSizePolicy_HorizontalPolicy(const QSizePolicy* self); int QSizePolicy_VerticalPolicy(const QSizePolicy* self); int QSizePolicy_ControlType(const QSizePolicy* self); diff --git a/qt6/gen_qslider.cpp b/qt6/gen_qslider.cpp index 4c9b676e..5112481c 100644 --- a/qt6/gen_qslider.cpp +++ b/qt6/gen_qslider.cpp @@ -339,40 +339,24 @@ public: }; -void QSlider_new(QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(parent); - *outptr_QSlider = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSlider* QSlider_new(QWidget* parent) { + return new MiqtVirtualQSlider(parent); } -void QSlider_new2(QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(); - *outptr_QSlider = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSlider* QSlider_new2() { + return new MiqtVirtualQSlider(); } -void QSlider_new3(int orientation, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(static_cast(orientation)); - *outptr_QSlider = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSlider* QSlider_new3(int orientation) { + return new MiqtVirtualQSlider(static_cast(orientation)); } -void QSlider_new4(int orientation, QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSlider* ret = new MiqtVirtualQSlider(static_cast(orientation), parent); - *outptr_QSlider = ret; - *outptr_QAbstractSlider = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSlider* QSlider_new4(int orientation, QWidget* parent) { + return new MiqtVirtualQSlider(static_cast(orientation), parent); +} + +void QSlider_virtbase(QSlider* src, QAbstractSlider** outptr_QAbstractSlider) { + *outptr_QAbstractSlider = static_cast(src); } QMetaObject* QSlider_MetaObject(const QSlider* self) { diff --git a/qt6/gen_qslider.go b/qt6/gen_qslider.go index ff5bb6a8..fa539efd 100644 --- a/qt6/gen_qslider.go +++ b/qt6/gen_qslider.go @@ -46,76 +46,50 @@ func (this *QSlider) UnsafePointer() unsafe.Pointer { } // newQSlider constructs the type using only CGO pointers. -func newQSlider(h *C.QSlider, h_QAbstractSlider *C.QAbstractSlider, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSlider { +func newQSlider(h *C.QSlider) *QSlider { if h == nil { return nil } + var outptr_QAbstractSlider *C.QAbstractSlider = nil + C.QSlider_virtbase(h, &outptr_QAbstractSlider) + return &QSlider{h: h, - QAbstractSlider: newQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractSlider: newQAbstractSlider(outptr_QAbstractSlider)} } // UnsafeNewQSlider constructs the type using only unsafe pointers. -func UnsafeNewQSlider(h unsafe.Pointer, h_QAbstractSlider unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSlider { - if h == nil { - return nil - } - - return &QSlider{h: (*C.QSlider)(h), - QAbstractSlider: UnsafeNewQAbstractSlider(h_QAbstractSlider, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQSlider(h unsafe.Pointer) *QSlider { + return newQSlider((*C.QSlider)(h)) } // NewQSlider constructs a new QSlider object. func NewQSlider(parent *QWidget) *QSlider { - var outptr_QSlider *C.QSlider = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSlider_new(parent.cPointer(), &outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSlider(C.QSlider_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQSlider2 constructs a new QSlider object. func NewQSlider2() *QSlider { - var outptr_QSlider *C.QSlider = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSlider_new2(&outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSlider(C.QSlider_new2()) ret.isSubclass = true return ret } // NewQSlider3 constructs a new QSlider object. func NewQSlider3(orientation Orientation) *QSlider { - var outptr_QSlider *C.QSlider = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSlider_new3((C.int)(orientation), &outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSlider(C.QSlider_new3((C.int)(orientation))) ret.isSubclass = true return ret } // NewQSlider4 constructs a new QSlider object. func NewQSlider4(orientation Orientation, parent *QWidget) *QSlider { - var outptr_QSlider *C.QSlider = nil - var outptr_QAbstractSlider *C.QAbstractSlider = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSlider_new4((C.int)(orientation), parent.cPointer(), &outptr_QSlider, &outptr_QAbstractSlider, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSlider(outptr_QSlider, outptr_QAbstractSlider, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSlider(C.QSlider_new4((C.int)(orientation), parent.cPointer())) ret.isSubclass = true return ret } @@ -295,7 +269,7 @@ func miqt_exec_callback_QSlider_PaintEvent(self *C.QSlider, cb C.intptr_t, ev *C } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(ev, nil) + slotval1 := newQPaintEvent(ev) gofunc((&QSlider{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -321,7 +295,7 @@ func miqt_exec_callback_QSlider_MousePressEvent(self *C.QSlider, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QSlider{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -347,7 +321,7 @@ func miqt_exec_callback_QSlider_MouseReleaseEvent(self *C.QSlider, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QSlider{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -373,7 +347,7 @@ func miqt_exec_callback_QSlider_MouseMoveEvent(self *C.QSlider, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QSlider{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -399,7 +373,7 @@ func miqt_exec_callback_QSlider_InitStyleOption(self *C.QSlider, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionSlider(option, nil, nil) + slotval1 := newQStyleOptionSlider(option) gofunc((&QSlider{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -451,7 +425,7 @@ func miqt_exec_callback_QSlider_KeyPressEvent(self *C.QSlider, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(ev, nil, nil) + slotval1 := newQKeyEvent(ev) gofunc((&QSlider{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -477,7 +451,7 @@ func miqt_exec_callback_QSlider_TimerEvent(self *C.QSlider, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QSlider{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -503,7 +477,7 @@ func miqt_exec_callback_QSlider_WheelEvent(self *C.QSlider, cb C.intptr_t, e *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QSlider{h: self}).callVirtualBase_WheelEvent, slotval1) diff --git a/qt6/gen_qslider.h b/qt6/gen_qslider.h index b616a61c..333cb2ac 100644 --- a/qt6/gen_qslider.h +++ b/qt6/gen_qslider.h @@ -46,10 +46,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QSlider_new(QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSlider_new2(QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSlider_new3(int orientation, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSlider_new4(int orientation, QWidget* parent, QSlider** outptr_QSlider, QAbstractSlider** outptr_QAbstractSlider, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QSlider* QSlider_new(QWidget* parent); +QSlider* QSlider_new2(); +QSlider* QSlider_new3(int orientation); +QSlider* QSlider_new4(int orientation, QWidget* parent); +void QSlider_virtbase(QSlider* src, QAbstractSlider** outptr_QAbstractSlider); QMetaObject* QSlider_MetaObject(const QSlider* self); void* QSlider_Metacast(QSlider* self, const char* param1); struct miqt_string QSlider_Tr(const char* s); diff --git a/qt6/gen_qsocketnotifier.cpp b/qt6/gen_qsocketnotifier.cpp index dd8115fe..274552ce 100644 --- a/qt6/gen_qsocketnotifier.cpp +++ b/qt6/gen_qsocketnotifier.cpp @@ -196,28 +196,24 @@ public: }; -void QSocketNotifier_new(int param1, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject) { - MiqtVirtualQSocketNotifier* ret = new MiqtVirtualQSocketNotifier(static_cast(param1)); - *outptr_QSocketNotifier = ret; - *outptr_QObject = static_cast(ret); +QSocketNotifier* QSocketNotifier_new(int param1) { + return new MiqtVirtualQSocketNotifier(static_cast(param1)); } -void QSocketNotifier_new2(intptr_t socket, int param2, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject) { - MiqtVirtualQSocketNotifier* ret = new MiqtVirtualQSocketNotifier((qintptr)(socket), static_cast(param2)); - *outptr_QSocketNotifier = ret; - *outptr_QObject = static_cast(ret); +QSocketNotifier* QSocketNotifier_new2(intptr_t socket, int param2) { + return new MiqtVirtualQSocketNotifier((qintptr)(socket), static_cast(param2)); } -void QSocketNotifier_new3(int param1, QObject* parent, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject) { - MiqtVirtualQSocketNotifier* ret = new MiqtVirtualQSocketNotifier(static_cast(param1), parent); - *outptr_QSocketNotifier = ret; - *outptr_QObject = static_cast(ret); +QSocketNotifier* QSocketNotifier_new3(int param1, QObject* parent) { + return new MiqtVirtualQSocketNotifier(static_cast(param1), parent); } -void QSocketNotifier_new4(intptr_t socket, int param2, QObject* parent, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject) { - MiqtVirtualQSocketNotifier* ret = new MiqtVirtualQSocketNotifier((qintptr)(socket), static_cast(param2), parent); - *outptr_QSocketNotifier = ret; - *outptr_QObject = static_cast(ret); +QSocketNotifier* QSocketNotifier_new4(intptr_t socket, int param2, QObject* parent) { + return new MiqtVirtualQSocketNotifier((qintptr)(socket), static_cast(param2), parent); +} + +void QSocketNotifier_virtbase(QSocketNotifier* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSocketNotifier_MetaObject(const QSocketNotifier* self) { @@ -351,22 +347,19 @@ void QSocketNotifier_Delete(QSocketNotifier* self, bool isSubclass) { } } -void QSocketDescriptor_new(QSocketDescriptor** outptr_QSocketDescriptor) { - QSocketDescriptor* ret = new QSocketDescriptor(); - *outptr_QSocketDescriptor = ret; +QSocketDescriptor* QSocketDescriptor_new() { + return new QSocketDescriptor(); } -void QSocketDescriptor_new2(QSocketDescriptor* param1, QSocketDescriptor** outptr_QSocketDescriptor) { - QSocketDescriptor* ret = new QSocketDescriptor(*param1); - *outptr_QSocketDescriptor = ret; +QSocketDescriptor* QSocketDescriptor_new2(QSocketDescriptor* param1) { + return new QSocketDescriptor(*param1); } -void QSocketDescriptor_new3(int descriptor, QSocketDescriptor** outptr_QSocketDescriptor) { +QSocketDescriptor* QSocketDescriptor_new3(int descriptor) { #ifndef Q_OS_LINUX - return; + return nullptr; #else - QSocketDescriptor* ret = new QSocketDescriptor(static_cast(descriptor)); - *outptr_QSocketDescriptor = ret; + return new QSocketDescriptor(static_cast(descriptor)); #endif } diff --git a/qt6/gen_qsocketnotifier.go b/qt6/gen_qsocketnotifier.go index bf303752..f3d9623e 100644 --- a/qt6/gen_qsocketnotifier.go +++ b/qt6/gen_qsocketnotifier.go @@ -43,64 +43,50 @@ func (this *QSocketNotifier) UnsafePointer() unsafe.Pointer { } // newQSocketNotifier constructs the type using only CGO pointers. -func newQSocketNotifier(h *C.QSocketNotifier, h_QObject *C.QObject) *QSocketNotifier { +func newQSocketNotifier(h *C.QSocketNotifier) *QSocketNotifier { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSocketNotifier_virtbase(h, &outptr_QObject) + return &QSocketNotifier{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQSocketNotifier constructs the type using only unsafe pointers. -func UnsafeNewQSocketNotifier(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSocketNotifier { - if h == nil { - return nil - } - - return &QSocketNotifier{h: (*C.QSocketNotifier)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQSocketNotifier(h unsafe.Pointer) *QSocketNotifier { + return newQSocketNotifier((*C.QSocketNotifier)(h)) } // NewQSocketNotifier constructs a new QSocketNotifier object. func NewQSocketNotifier(param1 QSocketNotifier__Type) *QSocketNotifier { - var outptr_QSocketNotifier *C.QSocketNotifier = nil - var outptr_QObject *C.QObject = nil - C.QSocketNotifier_new((C.int)(param1), &outptr_QSocketNotifier, &outptr_QObject) - ret := newQSocketNotifier(outptr_QSocketNotifier, outptr_QObject) + ret := newQSocketNotifier(C.QSocketNotifier_new((C.int)(param1))) ret.isSubclass = true return ret } // NewQSocketNotifier2 constructs a new QSocketNotifier object. func NewQSocketNotifier2(socket uintptr, param2 QSocketNotifier__Type) *QSocketNotifier { - var outptr_QSocketNotifier *C.QSocketNotifier = nil - var outptr_QObject *C.QObject = nil - C.QSocketNotifier_new2((C.intptr_t)(socket), (C.int)(param2), &outptr_QSocketNotifier, &outptr_QObject) - ret := newQSocketNotifier(outptr_QSocketNotifier, outptr_QObject) + ret := newQSocketNotifier(C.QSocketNotifier_new2((C.intptr_t)(socket), (C.int)(param2))) ret.isSubclass = true return ret } // NewQSocketNotifier3 constructs a new QSocketNotifier object. func NewQSocketNotifier3(param1 QSocketNotifier__Type, parent *QObject) *QSocketNotifier { - var outptr_QSocketNotifier *C.QSocketNotifier = nil - var outptr_QObject *C.QObject = nil - C.QSocketNotifier_new3((C.int)(param1), parent.cPointer(), &outptr_QSocketNotifier, &outptr_QObject) - ret := newQSocketNotifier(outptr_QSocketNotifier, outptr_QObject) + ret := newQSocketNotifier(C.QSocketNotifier_new3((C.int)(param1), parent.cPointer())) ret.isSubclass = true return ret } // NewQSocketNotifier4 constructs a new QSocketNotifier object. func NewQSocketNotifier4(socket uintptr, param2 QSocketNotifier__Type, parent *QObject) *QSocketNotifier { - var outptr_QSocketNotifier *C.QSocketNotifier = nil - var outptr_QObject *C.QObject = nil - C.QSocketNotifier_new4((C.intptr_t)(socket), (C.int)(param2), parent.cPointer(), &outptr_QSocketNotifier, &outptr_QObject) - ret := newQSocketNotifier(outptr_QSocketNotifier, outptr_QObject) + ret := newQSocketNotifier(C.QSocketNotifier_new4((C.intptr_t)(socket), (C.int)(param2), parent.cPointer())) ret.isSubclass = true return ret } @@ -248,7 +234,7 @@ func miqt_exec_callback_QSocketNotifier_TimerEvent(self *C.QSocketNotifier, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QSocketNotifier{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -274,7 +260,7 @@ func miqt_exec_callback_QSocketNotifier_ChildEvent(self *C.QSocketNotifier, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QSocketNotifier{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -396,34 +382,27 @@ func newQSocketDescriptor(h *C.QSocketDescriptor) *QSocketDescriptor { if h == nil { return nil } + return &QSocketDescriptor{h: h} } // UnsafeNewQSocketDescriptor constructs the type using only unsafe pointers. func UnsafeNewQSocketDescriptor(h unsafe.Pointer) *QSocketDescriptor { - if h == nil { - return nil - } - - return &QSocketDescriptor{h: (*C.QSocketDescriptor)(h)} + return newQSocketDescriptor((*C.QSocketDescriptor)(h)) } // NewQSocketDescriptor constructs a new QSocketDescriptor object. func NewQSocketDescriptor() *QSocketDescriptor { - var outptr_QSocketDescriptor *C.QSocketDescriptor = nil - C.QSocketDescriptor_new(&outptr_QSocketDescriptor) - ret := newQSocketDescriptor(outptr_QSocketDescriptor) + ret := newQSocketDescriptor(C.QSocketDescriptor_new()) ret.isSubclass = true return ret } // NewQSocketDescriptor2 constructs a new QSocketDescriptor object. func NewQSocketDescriptor2(param1 *QSocketDescriptor) *QSocketDescriptor { - var outptr_QSocketDescriptor *C.QSocketDescriptor = nil - C.QSocketDescriptor_new2(param1.cPointer(), &outptr_QSocketDescriptor) - ret := newQSocketDescriptor(outptr_QSocketDescriptor) + ret := newQSocketDescriptor(C.QSocketDescriptor_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -434,10 +413,8 @@ func NewQSocketDescriptor3(descriptor int) *QSocketDescriptor { if runtime.GOOS != "linux" { panic("Unsupported OS") } - var outptr_QSocketDescriptor *C.QSocketDescriptor = nil - C.QSocketDescriptor_new3((C.int)(descriptor), &outptr_QSocketDescriptor) - ret := newQSocketDescriptor(outptr_QSocketDescriptor) + ret := newQSocketDescriptor(C.QSocketDescriptor_new3((C.int)(descriptor))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qsocketnotifier.h b/qt6/gen_qsocketnotifier.h index c22008b5..c88f227e 100644 --- a/qt6/gen_qsocketnotifier.h +++ b/qt6/gen_qsocketnotifier.h @@ -34,10 +34,11 @@ typedef struct QSocketNotifier QSocketNotifier; typedef struct QTimerEvent QTimerEvent; #endif -void QSocketNotifier_new(int param1, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject); -void QSocketNotifier_new2(intptr_t socket, int param2, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject); -void QSocketNotifier_new3(int param1, QObject* parent, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject); -void QSocketNotifier_new4(intptr_t socket, int param2, QObject* parent, QSocketNotifier** outptr_QSocketNotifier, QObject** outptr_QObject); +QSocketNotifier* QSocketNotifier_new(int param1); +QSocketNotifier* QSocketNotifier_new2(intptr_t socket, int param2); +QSocketNotifier* QSocketNotifier_new3(int param1, QObject* parent); +QSocketNotifier* QSocketNotifier_new4(intptr_t socket, int param2, QObject* parent); +void QSocketNotifier_virtbase(QSocketNotifier* src, QObject** outptr_QObject); QMetaObject* QSocketNotifier_MetaObject(const QSocketNotifier* self); void* QSocketNotifier_Metacast(QSocketNotifier* self, const char* param1); struct miqt_string QSocketNotifier_Tr(const char* s); @@ -66,9 +67,9 @@ void QSocketNotifier_override_virtual_DisconnectNotify(void* self, intptr_t slot void QSocketNotifier_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QSocketNotifier_Delete(QSocketNotifier* self, bool isSubclass); -void QSocketDescriptor_new(QSocketDescriptor** outptr_QSocketDescriptor); -void QSocketDescriptor_new2(QSocketDescriptor* param1, QSocketDescriptor** outptr_QSocketDescriptor); -void QSocketDescriptor_new3(int descriptor, QSocketDescriptor** outptr_QSocketDescriptor); +QSocketDescriptor* QSocketDescriptor_new(); +QSocketDescriptor* QSocketDescriptor_new2(QSocketDescriptor* param1); +QSocketDescriptor* QSocketDescriptor_new3(int descriptor); bool QSocketDescriptor_IsValid(const QSocketDescriptor* self); void QSocketDescriptor_Delete(QSocketDescriptor* self, bool isSubclass); diff --git a/qt6/gen_qsortfilterproxymodel.cpp b/qt6/gen_qsortfilterproxymodel.cpp index abc4ed8e..09d4485d 100644 --- a/qt6/gen_qsortfilterproxymodel.cpp +++ b/qt6/gen_qsortfilterproxymodel.cpp @@ -1204,20 +1204,16 @@ public: }; -void QSortFilterProxyModel_new(QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQSortFilterProxyModel* ret = new MiqtVirtualQSortFilterProxyModel(); - *outptr_QSortFilterProxyModel = ret; - *outptr_QAbstractProxyModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSortFilterProxyModel* QSortFilterProxyModel_new() { + return new MiqtVirtualQSortFilterProxyModel(); } -void QSortFilterProxyModel_new2(QObject* parent, QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQSortFilterProxyModel* ret = new MiqtVirtualQSortFilterProxyModel(parent); - *outptr_QSortFilterProxyModel = ret; - *outptr_QAbstractProxyModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSortFilterProxyModel* QSortFilterProxyModel_new2(QObject* parent) { + return new MiqtVirtualQSortFilterProxyModel(parent); +} + +void QSortFilterProxyModel_virtbase(QSortFilterProxyModel* src, QAbstractProxyModel** outptr_QAbstractProxyModel) { + *outptr_QAbstractProxyModel = static_cast(src); } QMetaObject* QSortFilterProxyModel_MetaObject(const QSortFilterProxyModel* self) { diff --git a/qt6/gen_qsortfilterproxymodel.go b/qt6/gen_qsortfilterproxymodel.go index 7aee3a78..189756fe 100644 --- a/qt6/gen_qsortfilterproxymodel.go +++ b/qt6/gen_qsortfilterproxymodel.go @@ -35,46 +35,34 @@ func (this *QSortFilterProxyModel) UnsafePointer() unsafe.Pointer { } // newQSortFilterProxyModel constructs the type using only CGO pointers. -func newQSortFilterProxyModel(h *C.QSortFilterProxyModel, h_QAbstractProxyModel *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QSortFilterProxyModel { +func newQSortFilterProxyModel(h *C.QSortFilterProxyModel) *QSortFilterProxyModel { if h == nil { return nil } + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + C.QSortFilterProxyModel_virtbase(h, &outptr_QAbstractProxyModel) + return &QSortFilterProxyModel{h: h, - QAbstractProxyModel: newQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} + QAbstractProxyModel: newQAbstractProxyModel(outptr_QAbstractProxyModel)} } // UnsafeNewQSortFilterProxyModel constructs the type using only unsafe pointers. -func UnsafeNewQSortFilterProxyModel(h unsafe.Pointer, h_QAbstractProxyModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QSortFilterProxyModel { - if h == nil { - return nil - } - - return &QSortFilterProxyModel{h: (*C.QSortFilterProxyModel)(h), - QAbstractProxyModel: UnsafeNewQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} +func UnsafeNewQSortFilterProxyModel(h unsafe.Pointer) *QSortFilterProxyModel { + return newQSortFilterProxyModel((*C.QSortFilterProxyModel)(h)) } // NewQSortFilterProxyModel constructs a new QSortFilterProxyModel object. func NewQSortFilterProxyModel() *QSortFilterProxyModel { - var outptr_QSortFilterProxyModel *C.QSortFilterProxyModel = nil - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QSortFilterProxyModel_new(&outptr_QSortFilterProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQSortFilterProxyModel(outptr_QSortFilterProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQSortFilterProxyModel(C.QSortFilterProxyModel_new()) ret.isSubclass = true return ret } // NewQSortFilterProxyModel2 constructs a new QSortFilterProxyModel object. func NewQSortFilterProxyModel2(parent *QObject) *QSortFilterProxyModel { - var outptr_QSortFilterProxyModel *C.QSortFilterProxyModel = nil - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QSortFilterProxyModel_new2(parent.cPointer(), &outptr_QSortFilterProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQSortFilterProxyModel(outptr_QSortFilterProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQSortFilterProxyModel(C.QSortFilterProxyModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -301,7 +289,7 @@ func (this *QSortFilterProxyModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QSortFilterProxyModel_MimeData(this.h, indexes_ma), nil) + return newQMimeData(C.QSortFilterProxyModel_MimeData(this.h, indexes_ma)) } func (this *QSortFilterProxyModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -583,7 +571,7 @@ func miqt_exec_callback_QSortFilterProxyModel_SetSourceModel(self *C.QSortFilter } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(sourceModel, nil) + slotval1 := newQAbstractItemModel(sourceModel) gofunc((&QSortFilterProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) @@ -1121,7 +1109,7 @@ func (this *QSortFilterProxyModel) callVirtualBase_MimeData(indexes []QModelInde } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QSortFilterProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QSortFilterProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QSortFilterProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -1175,7 +1163,7 @@ func miqt_exec_callback_QSortFilterProxyModel_DropMimeData(self *C.QSortFilterPr } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -1818,7 +1806,7 @@ func miqt_exec_callback_QSortFilterProxyModel_CanDropMimeData(self *C.QSortFilte } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt6/gen_qsortfilterproxymodel.h b/qt6/gen_qsortfilterproxymodel.h index 226e2b47..67bb29b2 100644 --- a/qt6/gen_qsortfilterproxymodel.h +++ b/qt6/gen_qsortfilterproxymodel.h @@ -40,8 +40,9 @@ typedef struct QSortFilterProxyModel QSortFilterProxyModel; typedef struct QVariant QVariant; #endif -void QSortFilterProxyModel_new(QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QSortFilterProxyModel_new2(QObject* parent, QSortFilterProxyModel** outptr_QSortFilterProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QSortFilterProxyModel* QSortFilterProxyModel_new(); +QSortFilterProxyModel* QSortFilterProxyModel_new2(QObject* parent); +void QSortFilterProxyModel_virtbase(QSortFilterProxyModel* src, QAbstractProxyModel** outptr_QAbstractProxyModel); QMetaObject* QSortFilterProxyModel_MetaObject(const QSortFilterProxyModel* self); void* QSortFilterProxyModel_Metacast(QSortFilterProxyModel* self, const char* param1); struct miqt_string QSortFilterProxyModel_Tr(const char* s); diff --git a/qt6/gen_qspinbox.cpp b/qt6/gen_qspinbox.cpp index 8a1e7862..467b1b0b 100644 --- a/qt6/gen_qspinbox.cpp +++ b/qt6/gen_qspinbox.cpp @@ -733,22 +733,16 @@ public: }; -void QSpinBox_new(QWidget* parent, QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSpinBox* ret = new MiqtVirtualQSpinBox(parent); - *outptr_QSpinBox = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSpinBox* QSpinBox_new(QWidget* parent) { + return new MiqtVirtualQSpinBox(parent); } -void QSpinBox_new2(QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSpinBox* ret = new MiqtVirtualQSpinBox(); - *outptr_QSpinBox = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSpinBox* QSpinBox_new2() { + return new MiqtVirtualQSpinBox(); +} + +void QSpinBox_virtbase(QSpinBox* src, QAbstractSpinBox** outptr_QAbstractSpinBox) { + *outptr_QAbstractSpinBox = static_cast(src); } QMetaObject* QSpinBox_MetaObject(const QSpinBox* self) { @@ -1856,22 +1850,16 @@ public: }; -void QDoubleSpinBox_new(QWidget* parent, QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDoubleSpinBox* ret = new MiqtVirtualQDoubleSpinBox(parent); - *outptr_QDoubleSpinBox = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDoubleSpinBox* QDoubleSpinBox_new(QWidget* parent) { + return new MiqtVirtualQDoubleSpinBox(parent); } -void QDoubleSpinBox_new2(QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQDoubleSpinBox* ret = new MiqtVirtualQDoubleSpinBox(); - *outptr_QDoubleSpinBox = ret; - *outptr_QAbstractSpinBox = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QDoubleSpinBox* QDoubleSpinBox_new2() { + return new MiqtVirtualQDoubleSpinBox(); +} + +void QDoubleSpinBox_virtbase(QDoubleSpinBox* src, QAbstractSpinBox** outptr_QAbstractSpinBox) { + *outptr_QAbstractSpinBox = static_cast(src); } QMetaObject* QDoubleSpinBox_MetaObject(const QDoubleSpinBox* self) { diff --git a/qt6/gen_qspinbox.go b/qt6/gen_qspinbox.go index 1ab99735..9c6982dc 100644 --- a/qt6/gen_qspinbox.go +++ b/qt6/gen_qspinbox.go @@ -35,48 +35,34 @@ func (this *QSpinBox) UnsafePointer() unsafe.Pointer { } // newQSpinBox constructs the type using only CGO pointers. -func newQSpinBox(h *C.QSpinBox, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSpinBox { +func newQSpinBox(h *C.QSpinBox) *QSpinBox { if h == nil { return nil } + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + C.QSpinBox_virtbase(h, &outptr_QAbstractSpinBox) + return &QSpinBox{h: h, - QAbstractSpinBox: newQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractSpinBox: newQAbstractSpinBox(outptr_QAbstractSpinBox)} } // UnsafeNewQSpinBox constructs the type using only unsafe pointers. -func UnsafeNewQSpinBox(h unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSpinBox { - if h == nil { - return nil - } - - return &QSpinBox{h: (*C.QSpinBox)(h), - QAbstractSpinBox: UnsafeNewQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQSpinBox(h unsafe.Pointer) *QSpinBox { + return newQSpinBox((*C.QSpinBox)(h)) } // NewQSpinBox constructs a new QSpinBox object. func NewQSpinBox(parent *QWidget) *QSpinBox { - var outptr_QSpinBox *C.QSpinBox = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSpinBox_new(parent.cPointer(), &outptr_QSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSpinBox(outptr_QSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSpinBox(C.QSpinBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQSpinBox2 constructs a new QSpinBox object. func NewQSpinBox2() *QSpinBox { - var outptr_QSpinBox *C.QSpinBox = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSpinBox_new2(&outptr_QSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSpinBox(outptr_QSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSpinBox(C.QSpinBox_new2()) ret.isSubclass = true return ret } @@ -577,7 +563,7 @@ func miqt_exec_callback_QSpinBox_ResizeEvent(self *C.QSpinBox, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -603,7 +589,7 @@ func miqt_exec_callback_QSpinBox_KeyPressEvent(self *C.QSpinBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -629,7 +615,7 @@ func miqt_exec_callback_QSpinBox_KeyReleaseEvent(self *C.QSpinBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -655,7 +641,7 @@ func miqt_exec_callback_QSpinBox_WheelEvent(self *C.QSpinBox, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -681,7 +667,7 @@ func miqt_exec_callback_QSpinBox_FocusInEvent(self *C.QSpinBox, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -707,7 +693,7 @@ func miqt_exec_callback_QSpinBox_FocusOutEvent(self *C.QSpinBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -733,7 +719,7 @@ func miqt_exec_callback_QSpinBox_ContextMenuEvent(self *C.QSpinBox, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -785,7 +771,7 @@ func miqt_exec_callback_QSpinBox_CloseEvent(self *C.QSpinBox, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -811,7 +797,7 @@ func miqt_exec_callback_QSpinBox_HideEvent(self *C.QSpinBox, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_HideEvent, slotval1) @@ -837,7 +823,7 @@ func miqt_exec_callback_QSpinBox_MousePressEvent(self *C.QSpinBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -863,7 +849,7 @@ func miqt_exec_callback_QSpinBox_MouseReleaseEvent(self *C.QSpinBox, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -889,7 +875,7 @@ func miqt_exec_callback_QSpinBox_MouseMoveEvent(self *C.QSpinBox, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -915,7 +901,7 @@ func miqt_exec_callback_QSpinBox_TimerEvent(self *C.QSpinBox, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -941,7 +927,7 @@ func miqt_exec_callback_QSpinBox_PaintEvent(self *C.QSpinBox, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -967,7 +953,7 @@ func miqt_exec_callback_QSpinBox_ShowEvent(self *C.QSpinBox, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QSpinBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -993,7 +979,7 @@ func miqt_exec_callback_QSpinBox_InitStyleOption(self *C.QSpinBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionSpinBox(option, nil, nil) + slotval1 := newQStyleOptionSpinBox(option) gofunc((&QSpinBox{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -1059,48 +1045,34 @@ func (this *QDoubleSpinBox) UnsafePointer() unsafe.Pointer { } // newQDoubleSpinBox constructs the type using only CGO pointers. -func newQDoubleSpinBox(h *C.QDoubleSpinBox, h_QAbstractSpinBox *C.QAbstractSpinBox, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QDoubleSpinBox { +func newQDoubleSpinBox(h *C.QDoubleSpinBox) *QDoubleSpinBox { if h == nil { return nil } + var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil + C.QDoubleSpinBox_virtbase(h, &outptr_QAbstractSpinBox) + return &QDoubleSpinBox{h: h, - QAbstractSpinBox: newQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractSpinBox: newQAbstractSpinBox(outptr_QAbstractSpinBox)} } // UnsafeNewQDoubleSpinBox constructs the type using only unsafe pointers. -func UnsafeNewQDoubleSpinBox(h unsafe.Pointer, h_QAbstractSpinBox unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QDoubleSpinBox { - if h == nil { - return nil - } - - return &QDoubleSpinBox{h: (*C.QDoubleSpinBox)(h), - QAbstractSpinBox: UnsafeNewQAbstractSpinBox(h_QAbstractSpinBox, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQDoubleSpinBox(h unsafe.Pointer) *QDoubleSpinBox { + return newQDoubleSpinBox((*C.QDoubleSpinBox)(h)) } // NewQDoubleSpinBox constructs a new QDoubleSpinBox object. func NewQDoubleSpinBox(parent *QWidget) *QDoubleSpinBox { - var outptr_QDoubleSpinBox *C.QDoubleSpinBox = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDoubleSpinBox_new(parent.cPointer(), &outptr_QDoubleSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDoubleSpinBox(outptr_QDoubleSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDoubleSpinBox(C.QDoubleSpinBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQDoubleSpinBox2 constructs a new QDoubleSpinBox object. func NewQDoubleSpinBox2() *QDoubleSpinBox { - var outptr_QDoubleSpinBox *C.QDoubleSpinBox = nil - var outptr_QAbstractSpinBox *C.QAbstractSpinBox = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QDoubleSpinBox_new2(&outptr_QDoubleSpinBox, &outptr_QAbstractSpinBox, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQDoubleSpinBox(outptr_QDoubleSpinBox, outptr_QAbstractSpinBox, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQDoubleSpinBox(C.QDoubleSpinBox_new2()) ret.isSubclass = true return ret } @@ -1632,7 +1604,7 @@ func miqt_exec_callback_QDoubleSpinBox_ResizeEvent(self *C.QDoubleSpinBox, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1658,7 +1630,7 @@ func miqt_exec_callback_QDoubleSpinBox_KeyPressEvent(self *C.QDoubleSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1684,7 +1656,7 @@ func miqt_exec_callback_QDoubleSpinBox_KeyReleaseEvent(self *C.QDoubleSpinBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1710,7 +1682,7 @@ func miqt_exec_callback_QDoubleSpinBox_WheelEvent(self *C.QDoubleSpinBox, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1736,7 +1708,7 @@ func miqt_exec_callback_QDoubleSpinBox_FocusInEvent(self *C.QDoubleSpinBox, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1762,7 +1734,7 @@ func miqt_exec_callback_QDoubleSpinBox_FocusOutEvent(self *C.QDoubleSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1788,7 +1760,7 @@ func miqt_exec_callback_QDoubleSpinBox_ContextMenuEvent(self *C.QDoubleSpinBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1840,7 +1812,7 @@ func miqt_exec_callback_QDoubleSpinBox_CloseEvent(self *C.QDoubleSpinBox, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1866,7 +1838,7 @@ func miqt_exec_callback_QDoubleSpinBox_HideEvent(self *C.QDoubleSpinBox, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1892,7 +1864,7 @@ func miqt_exec_callback_QDoubleSpinBox_MousePressEvent(self *C.QDoubleSpinBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1918,7 +1890,7 @@ func miqt_exec_callback_QDoubleSpinBox_MouseReleaseEvent(self *C.QDoubleSpinBox, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1944,7 +1916,7 @@ func miqt_exec_callback_QDoubleSpinBox_MouseMoveEvent(self *C.QDoubleSpinBox, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1970,7 +1942,7 @@ func miqt_exec_callback_QDoubleSpinBox_TimerEvent(self *C.QDoubleSpinBox, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1996,7 +1968,7 @@ func miqt_exec_callback_QDoubleSpinBox_PaintEvent(self *C.QDoubleSpinBox, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -2022,7 +1994,7 @@ func miqt_exec_callback_QDoubleSpinBox_ShowEvent(self *C.QDoubleSpinBox, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -2048,7 +2020,7 @@ func miqt_exec_callback_QDoubleSpinBox_InitStyleOption(self *C.QDoubleSpinBox, c } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionSpinBox(option, nil, nil) + slotval1 := newQStyleOptionSpinBox(option) gofunc((&QDoubleSpinBox{h: self}).callVirtualBase_InitStyleOption, slotval1) diff --git a/qt6/gen_qspinbox.h b/qt6/gen_qspinbox.h index fb30b393..7571c52a 100644 --- a/qt6/gen_qspinbox.h +++ b/qt6/gen_qspinbox.h @@ -62,8 +62,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QSpinBox_new(QWidget* parent, QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSpinBox_new2(QSpinBox** outptr_QSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QSpinBox* QSpinBox_new(QWidget* parent); +QSpinBox* QSpinBox_new2(); +void QSpinBox_virtbase(QSpinBox* src, QAbstractSpinBox** outptr_QAbstractSpinBox); QMetaObject* QSpinBox_MetaObject(const QSpinBox* self); void* QSpinBox_Metacast(QSpinBox* self, const char* param1); struct miqt_string QSpinBox_Tr(const char* s); @@ -154,8 +155,9 @@ void QSpinBox_override_virtual_StepEnabled(void* self, intptr_t slot); int QSpinBox_virtualbase_StepEnabled(const void* self); void QSpinBox_Delete(QSpinBox* self, bool isSubclass); -void QDoubleSpinBox_new(QWidget* parent, QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QDoubleSpinBox_new2(QDoubleSpinBox** outptr_QDoubleSpinBox, QAbstractSpinBox** outptr_QAbstractSpinBox, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QDoubleSpinBox* QDoubleSpinBox_new(QWidget* parent); +QDoubleSpinBox* QDoubleSpinBox_new2(); +void QDoubleSpinBox_virtbase(QDoubleSpinBox* src, QAbstractSpinBox** outptr_QAbstractSpinBox); QMetaObject* QDoubleSpinBox_MetaObject(const QDoubleSpinBox* self); void* QDoubleSpinBox_Metacast(QDoubleSpinBox* self, const char* param1); struct miqt_string QDoubleSpinBox_Tr(const char* s); diff --git a/qt6/gen_qsplashscreen.cpp b/qt6/gen_qsplashscreen.cpp index 61dc5f7d..9c2d642f 100644 --- a/qt6/gen_qsplashscreen.cpp +++ b/qt6/gen_qsplashscreen.cpp @@ -1053,52 +1053,32 @@ public: }; -void QSplashScreen_new(QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(); - *outptr_QSplashScreen = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplashScreen* QSplashScreen_new() { + return new MiqtVirtualQSplashScreen(); } -void QSplashScreen_new2(QScreen* screen, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(screen); - *outptr_QSplashScreen = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplashScreen* QSplashScreen_new2(QScreen* screen) { + return new MiqtVirtualQSplashScreen(screen); } -void QSplashScreen_new3(QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(*pixmap); - *outptr_QSplashScreen = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplashScreen* QSplashScreen_new3(QPixmap* pixmap) { + return new MiqtVirtualQSplashScreen(*pixmap); } -void QSplashScreen_new4(QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(*pixmap, static_cast(f)); - *outptr_QSplashScreen = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplashScreen* QSplashScreen_new4(QPixmap* pixmap, int f) { + return new MiqtVirtualQSplashScreen(*pixmap, static_cast(f)); } -void QSplashScreen_new5(QScreen* screen, QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(screen, *pixmap); - *outptr_QSplashScreen = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplashScreen* QSplashScreen_new5(QScreen* screen, QPixmap* pixmap) { + return new MiqtVirtualQSplashScreen(screen, *pixmap); } -void QSplashScreen_new6(QScreen* screen, QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplashScreen* ret = new MiqtVirtualQSplashScreen(screen, *pixmap, static_cast(f)); - *outptr_QSplashScreen = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplashScreen* QSplashScreen_new6(QScreen* screen, QPixmap* pixmap, int f) { + return new MiqtVirtualQSplashScreen(screen, *pixmap, static_cast(f)); +} + +void QSplashScreen_virtbase(QSplashScreen* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QSplashScreen_MetaObject(const QSplashScreen* self) { diff --git a/qt6/gen_qsplashscreen.go b/qt6/gen_qsplashscreen.go index 0eb17e92..c13995b8 100644 --- a/qt6/gen_qsplashscreen.go +++ b/qt6/gen_qsplashscreen.go @@ -35,98 +35,66 @@ func (this *QSplashScreen) UnsafePointer() unsafe.Pointer { } // newQSplashScreen constructs the type using only CGO pointers. -func newQSplashScreen(h *C.QSplashScreen, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSplashScreen { +func newQSplashScreen(h *C.QSplashScreen) *QSplashScreen { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QSplashScreen_virtbase(h, &outptr_QWidget) + return &QSplashScreen{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQSplashScreen constructs the type using only unsafe pointers. -func UnsafeNewQSplashScreen(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSplashScreen { - if h == nil { - return nil - } - - return &QSplashScreen{h: (*C.QSplashScreen)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQSplashScreen(h unsafe.Pointer) *QSplashScreen { + return newQSplashScreen((*C.QSplashScreen)(h)) } // NewQSplashScreen constructs a new QSplashScreen object. func NewQSplashScreen() *QSplashScreen { - var outptr_QSplashScreen *C.QSplashScreen = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplashScreen_new(&outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplashScreen(C.QSplashScreen_new()) ret.isSubclass = true return ret } // NewQSplashScreen2 constructs a new QSplashScreen object. func NewQSplashScreen2(screen *QScreen) *QSplashScreen { - var outptr_QSplashScreen *C.QSplashScreen = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplashScreen_new2(screen.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplashScreen(C.QSplashScreen_new2(screen.cPointer())) ret.isSubclass = true return ret } // NewQSplashScreen3 constructs a new QSplashScreen object. func NewQSplashScreen3(pixmap *QPixmap) *QSplashScreen { - var outptr_QSplashScreen *C.QSplashScreen = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplashScreen_new3(pixmap.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplashScreen(C.QSplashScreen_new3(pixmap.cPointer())) ret.isSubclass = true return ret } // NewQSplashScreen4 constructs a new QSplashScreen object. func NewQSplashScreen4(pixmap *QPixmap, f WindowType) *QSplashScreen { - var outptr_QSplashScreen *C.QSplashScreen = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplashScreen_new4(pixmap.cPointer(), (C.int)(f), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplashScreen(C.QSplashScreen_new4(pixmap.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } // NewQSplashScreen5 constructs a new QSplashScreen object. func NewQSplashScreen5(screen *QScreen, pixmap *QPixmap) *QSplashScreen { - var outptr_QSplashScreen *C.QSplashScreen = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplashScreen_new5(screen.cPointer(), pixmap.cPointer(), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplashScreen(C.QSplashScreen_new5(screen.cPointer(), pixmap.cPointer())) ret.isSubclass = true return ret } // NewQSplashScreen6 constructs a new QSplashScreen object. func NewQSplashScreen6(screen *QScreen, pixmap *QPixmap, f WindowType) *QSplashScreen { - var outptr_QSplashScreen *C.QSplashScreen = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplashScreen_new6(screen.cPointer(), pixmap.cPointer(), (C.int)(f), &outptr_QSplashScreen, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplashScreen(outptr_QSplashScreen, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplashScreen(C.QSplashScreen_new6(screen.cPointer(), pixmap.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -155,7 +123,7 @@ func (this *QSplashScreen) SetPixmap(pixmap *QPixmap) { } func (this *QSplashScreen) Pixmap() *QPixmap { - _goptr := newQPixmap(C.QSplashScreen_Pixmap(this.h), nil) + _goptr := newQPixmap(C.QSplashScreen_Pixmap(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -326,7 +294,7 @@ func miqt_exec_callback_QSplashScreen_MousePressEvent(self *C.QSplashScreen, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QSplashScreen{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -535,7 +503,7 @@ func miqt_exec_callback_QSplashScreen_MouseReleaseEvent(self *C.QSplashScreen, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -561,7 +529,7 @@ func miqt_exec_callback_QSplashScreen_MouseDoubleClickEvent(self *C.QSplashScree } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -587,7 +555,7 @@ func miqt_exec_callback_QSplashScreen_MouseMoveEvent(self *C.QSplashScreen, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -613,7 +581,7 @@ func miqt_exec_callback_QSplashScreen_WheelEvent(self *C.QSplashScreen, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -639,7 +607,7 @@ func miqt_exec_callback_QSplashScreen_KeyPressEvent(self *C.QSplashScreen, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -665,7 +633,7 @@ func miqt_exec_callback_QSplashScreen_KeyReleaseEvent(self *C.QSplashScreen, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -691,7 +659,7 @@ func miqt_exec_callback_QSplashScreen_FocusInEvent(self *C.QSplashScreen, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -717,7 +685,7 @@ func miqt_exec_callback_QSplashScreen_FocusOutEvent(self *C.QSplashScreen, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -743,7 +711,7 @@ func miqt_exec_callback_QSplashScreen_EnterEvent(self *C.QSplashScreen, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -795,7 +763,7 @@ func miqt_exec_callback_QSplashScreen_PaintEvent(self *C.QSplashScreen, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -821,7 +789,7 @@ func miqt_exec_callback_QSplashScreen_MoveEvent(self *C.QSplashScreen, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -847,7 +815,7 @@ func miqt_exec_callback_QSplashScreen_ResizeEvent(self *C.QSplashScreen, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -873,7 +841,7 @@ func miqt_exec_callback_QSplashScreen_CloseEvent(self *C.QSplashScreen, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -899,7 +867,7 @@ func miqt_exec_callback_QSplashScreen_ContextMenuEvent(self *C.QSplashScreen, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -925,7 +893,7 @@ func miqt_exec_callback_QSplashScreen_TabletEvent(self *C.QSplashScreen, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -951,7 +919,7 @@ func miqt_exec_callback_QSplashScreen_ActionEvent(self *C.QSplashScreen, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -977,7 +945,7 @@ func miqt_exec_callback_QSplashScreen_DragEnterEvent(self *C.QSplashScreen, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1003,7 +971,7 @@ func miqt_exec_callback_QSplashScreen_DragMoveEvent(self *C.QSplashScreen, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1029,7 +997,7 @@ func miqt_exec_callback_QSplashScreen_DragLeaveEvent(self *C.QSplashScreen, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1055,7 +1023,7 @@ func miqt_exec_callback_QSplashScreen_DropEvent(self *C.QSplashScreen, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1081,7 +1049,7 @@ func miqt_exec_callback_QSplashScreen_ShowEvent(self *C.QSplashScreen, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1107,7 +1075,7 @@ func miqt_exec_callback_QSplashScreen_HideEvent(self *C.QSplashScreen, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QSplashScreen{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1303,7 +1271,7 @@ func miqt_exec_callback_QSplashScreen_InputMethodEvent(self *C.QSplashScreen, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QSplashScreen{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qsplashscreen.h b/qt6/gen_qsplashscreen.h index 019fd281..7863c682 100644 --- a/qt6/gen_qsplashscreen.h +++ b/qt6/gen_qsplashscreen.h @@ -84,12 +84,13 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QSplashScreen_new(QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplashScreen_new2(QScreen* screen, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplashScreen_new3(QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplashScreen_new4(QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplashScreen_new5(QScreen* screen, QPixmap* pixmap, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplashScreen_new6(QScreen* screen, QPixmap* pixmap, int f, QSplashScreen** outptr_QSplashScreen, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QSplashScreen* QSplashScreen_new(); +QSplashScreen* QSplashScreen_new2(QScreen* screen); +QSplashScreen* QSplashScreen_new3(QPixmap* pixmap); +QSplashScreen* QSplashScreen_new4(QPixmap* pixmap, int f); +QSplashScreen* QSplashScreen_new5(QScreen* screen, QPixmap* pixmap); +QSplashScreen* QSplashScreen_new6(QScreen* screen, QPixmap* pixmap, int f); +void QSplashScreen_virtbase(QSplashScreen* src, QWidget** outptr_QWidget); QMetaObject* QSplashScreen_MetaObject(const QSplashScreen* self); void* QSplashScreen_Metacast(QSplashScreen* self, const char* param1); struct miqt_string QSplashScreen_Tr(const char* s); diff --git a/qt6/gen_qsplitter.cpp b/qt6/gen_qsplitter.cpp index 2d374fff..e8f1e159 100644 --- a/qt6/gen_qsplitter.cpp +++ b/qt6/gen_qsplitter.cpp @@ -262,40 +262,24 @@ public: }; -void QSplitter_new(QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(parent); - *outptr_QSplitter = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplitter* QSplitter_new(QWidget* parent) { + return new MiqtVirtualQSplitter(parent); } -void QSplitter_new2(QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(); - *outptr_QSplitter = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplitter* QSplitter_new2() { + return new MiqtVirtualQSplitter(); } -void QSplitter_new3(int param1, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(static_cast(param1)); - *outptr_QSplitter = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplitter* QSplitter_new3(int param1) { + return new MiqtVirtualQSplitter(static_cast(param1)); } -void QSplitter_new4(int param1, QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplitter* ret = new MiqtVirtualQSplitter(static_cast(param1), parent); - *outptr_QSplitter = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplitter* QSplitter_new4(int param1, QWidget* parent) { + return new MiqtVirtualQSplitter(static_cast(param1), parent); +} + +void QSplitter_virtbase(QSplitter* src, QFrame** outptr_QFrame) { + *outptr_QFrame = static_cast(src); } QMetaObject* QSplitter_MetaObject(const QSplitter* self) { @@ -1546,12 +1530,12 @@ public: }; -void QSplitterHandle_new(int o, QSplitter* parent, QSplitterHandle** outptr_QSplitterHandle, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSplitterHandle* ret = new MiqtVirtualQSplitterHandle(static_cast(o), parent); - *outptr_QSplitterHandle = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSplitterHandle* QSplitterHandle_new(int o, QSplitter* parent) { + return new MiqtVirtualQSplitterHandle(static_cast(o), parent); +} + +void QSplitterHandle_virtbase(QSplitterHandle* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QSplitterHandle_MetaObject(const QSplitterHandle* self) { diff --git a/qt6/gen_qsplitter.go b/qt6/gen_qsplitter.go index a2b5c649..b4b0b7ae 100644 --- a/qt6/gen_qsplitter.go +++ b/qt6/gen_qsplitter.go @@ -35,76 +35,50 @@ func (this *QSplitter) UnsafePointer() unsafe.Pointer { } // newQSplitter constructs the type using only CGO pointers. -func newQSplitter(h *C.QSplitter, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSplitter { +func newQSplitter(h *C.QSplitter) *QSplitter { if h == nil { return nil } + var outptr_QFrame *C.QFrame = nil + C.QSplitter_virtbase(h, &outptr_QFrame) + return &QSplitter{h: h, - QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QFrame: newQFrame(outptr_QFrame)} } // UnsafeNewQSplitter constructs the type using only unsafe pointers. -func UnsafeNewQSplitter(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSplitter { - if h == nil { - return nil - } - - return &QSplitter{h: (*C.QSplitter)(h), - QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQSplitter(h unsafe.Pointer) *QSplitter { + return newQSplitter((*C.QSplitter)(h)) } // NewQSplitter constructs a new QSplitter object. func NewQSplitter(parent *QWidget) *QSplitter { - var outptr_QSplitter *C.QSplitter = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplitter_new(parent.cPointer(), &outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplitter(C.QSplitter_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQSplitter2 constructs a new QSplitter object. func NewQSplitter2() *QSplitter { - var outptr_QSplitter *C.QSplitter = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplitter_new2(&outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplitter(C.QSplitter_new2()) ret.isSubclass = true return ret } // NewQSplitter3 constructs a new QSplitter object. func NewQSplitter3(param1 Orientation) *QSplitter { - var outptr_QSplitter *C.QSplitter = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplitter_new3((C.int)(param1), &outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplitter(C.QSplitter_new3((C.int)(param1))) ret.isSubclass = true return ret } // NewQSplitter4 constructs a new QSplitter object. func NewQSplitter4(param1 Orientation, parent *QWidget) *QSplitter { - var outptr_QSplitter *C.QSplitter = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplitter_new4((C.int)(param1), parent.cPointer(), &outptr_QSplitter, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplitter(outptr_QSplitter, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplitter(C.QSplitter_new4((C.int)(param1), parent.cPointer())) ret.isSubclass = true return ret } @@ -137,7 +111,7 @@ func (this *QSplitter) InsertWidget(index int, widget *QWidget) { } func (this *QSplitter) ReplaceWidget(index int, widget *QWidget) *QWidget { - return newQWidget(C.QSplitter_ReplaceWidget(this.h, (C.int)(index), widget.cPointer()), nil, nil) + return newQWidget(C.QSplitter_ReplaceWidget(this.h, (C.int)(index), widget.cPointer())) } func (this *QSplitter) SetOrientation(orientation Orientation) { @@ -235,7 +209,7 @@ func (this *QSplitter) IndexOf(w *QWidget) int { } func (this *QSplitter) Widget(index int) *QWidget { - return newQWidget(C.QSplitter_Widget(this.h, (C.int)(index)), nil, nil) + return newQWidget(C.QSplitter_Widget(this.h, (C.int)(index))) } func (this *QSplitter) Count() int { @@ -247,7 +221,7 @@ func (this *QSplitter) GetRange(index int, param2 *int, param3 *int) { } func (this *QSplitter) Handle(index int) *QSplitterHandle { - return newQSplitterHandle(C.QSplitter_Handle(this.h, (C.int)(index)), nil, nil, nil) + return newQSplitterHandle(C.QSplitter_Handle(this.h, (C.int)(index))) } func (this *QSplitter) SetStretchFactor(index int, stretch int) { @@ -358,7 +332,7 @@ func miqt_exec_callback_QSplitter_MinimumSizeHint(self *C.QSplitter, cb C.intptr func (this *QSplitter) callVirtualBase_CreateHandle() *QSplitterHandle { - return newQSplitterHandle(C.QSplitter_virtualbase_CreateHandle(unsafe.Pointer(this.h)), nil, nil, nil) + return newQSplitterHandle(C.QSplitter_virtualbase_CreateHandle(unsafe.Pointer(this.h))) } func (this *QSplitter) OnCreateHandle(slot func(super func() *QSplitterHandle) *QSplitterHandle) { @@ -401,7 +375,7 @@ func miqt_exec_callback_QSplitter_ChildEvent(self *C.QSplitter, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(param1, nil) + slotval1 := newQChildEvent(param1) gofunc((&QSplitter{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -455,7 +429,7 @@ func miqt_exec_callback_QSplitter_ResizeEvent(self *C.QSplitter, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QSplitter{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -507,7 +481,7 @@ func miqt_exec_callback_QSplitter_PaintEvent(self *C.QSplitter, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QSplitter{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -533,7 +507,7 @@ func miqt_exec_callback_QSplitter_InitStyleOption(self *C.QSplitter, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionFrame(option, nil) + slotval1 := newQStyleOptionFrame(option) gofunc((&QSplitter{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -574,33 +548,26 @@ func (this *QSplitterHandle) UnsafePointer() unsafe.Pointer { } // newQSplitterHandle constructs the type using only CGO pointers. -func newQSplitterHandle(h *C.QSplitterHandle, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSplitterHandle { +func newQSplitterHandle(h *C.QSplitterHandle) *QSplitterHandle { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QSplitterHandle_virtbase(h, &outptr_QWidget) + return &QSplitterHandle{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQSplitterHandle constructs the type using only unsafe pointers. -func UnsafeNewQSplitterHandle(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSplitterHandle { - if h == nil { - return nil - } - - return &QSplitterHandle{h: (*C.QSplitterHandle)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQSplitterHandle(h unsafe.Pointer) *QSplitterHandle { + return newQSplitterHandle((*C.QSplitterHandle)(h)) } // NewQSplitterHandle constructs a new QSplitterHandle object. func NewQSplitterHandle(o Orientation, parent *QSplitter) *QSplitterHandle { - var outptr_QSplitterHandle *C.QSplitterHandle = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSplitterHandle_new((C.int)(o), parent.cPointer(), &outptr_QSplitterHandle, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSplitterHandle(outptr_QSplitterHandle, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSplitterHandle(C.QSplitterHandle_new((C.int)(o), parent.cPointer())) ret.isSubclass = true return ret } @@ -637,7 +604,7 @@ func (this *QSplitterHandle) OpaqueResize() bool { } func (this *QSplitterHandle) Splitter() *QSplitter { - return newQSplitter(C.QSplitterHandle_Splitter(this.h), nil, nil, nil, nil) + return newQSplitter(C.QSplitterHandle_Splitter(this.h)) } func (this *QSplitterHandle) SizeHint() *QSize { @@ -715,7 +682,7 @@ func miqt_exec_callback_QSplitterHandle_PaintEvent(self *C.QSplitterHandle, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QSplitterHandle{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -741,7 +708,7 @@ func miqt_exec_callback_QSplitterHandle_MouseMoveEvent(self *C.QSplitterHandle, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QSplitterHandle{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -767,7 +734,7 @@ func miqt_exec_callback_QSplitterHandle_MousePressEvent(self *C.QSplitterHandle, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QSplitterHandle{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -793,7 +760,7 @@ func miqt_exec_callback_QSplitterHandle_MouseReleaseEvent(self *C.QSplitterHandl } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QSplitterHandle{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -819,7 +786,7 @@ func miqt_exec_callback_QSplitterHandle_ResizeEvent(self *C.QSplitterHandle, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QSplitterHandle{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1029,7 +996,7 @@ func miqt_exec_callback_QSplitterHandle_MouseDoubleClickEvent(self *C.QSplitterH } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1055,7 +1022,7 @@ func miqt_exec_callback_QSplitterHandle_WheelEvent(self *C.QSplitterHandle, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1081,7 +1048,7 @@ func miqt_exec_callback_QSplitterHandle_KeyPressEvent(self *C.QSplitterHandle, c } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1107,7 +1074,7 @@ func miqt_exec_callback_QSplitterHandle_KeyReleaseEvent(self *C.QSplitterHandle, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1133,7 +1100,7 @@ func miqt_exec_callback_QSplitterHandle_FocusInEvent(self *C.QSplitterHandle, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1159,7 +1126,7 @@ func miqt_exec_callback_QSplitterHandle_FocusOutEvent(self *C.QSplitterHandle, c } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1185,7 +1152,7 @@ func miqt_exec_callback_QSplitterHandle_EnterEvent(self *C.QSplitterHandle, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -1237,7 +1204,7 @@ func miqt_exec_callback_QSplitterHandle_MoveEvent(self *C.QSplitterHandle, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1263,7 +1230,7 @@ func miqt_exec_callback_QSplitterHandle_CloseEvent(self *C.QSplitterHandle, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1289,7 +1256,7 @@ func miqt_exec_callback_QSplitterHandle_ContextMenuEvent(self *C.QSplitterHandle } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1315,7 +1282,7 @@ func miqt_exec_callback_QSplitterHandle_TabletEvent(self *C.QSplitterHandle, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1341,7 +1308,7 @@ func miqt_exec_callback_QSplitterHandle_ActionEvent(self *C.QSplitterHandle, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1367,7 +1334,7 @@ func miqt_exec_callback_QSplitterHandle_DragEnterEvent(self *C.QSplitterHandle, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1393,7 +1360,7 @@ func miqt_exec_callback_QSplitterHandle_DragMoveEvent(self *C.QSplitterHandle, c } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1419,7 +1386,7 @@ func miqt_exec_callback_QSplitterHandle_DragLeaveEvent(self *C.QSplitterHandle, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1445,7 +1412,7 @@ func miqt_exec_callback_QSplitterHandle_DropEvent(self *C.QSplitterHandle, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1471,7 +1438,7 @@ func miqt_exec_callback_QSplitterHandle_ShowEvent(self *C.QSplitterHandle, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1497,7 +1464,7 @@ func miqt_exec_callback_QSplitterHandle_HideEvent(self *C.QSplitterHandle, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QSplitterHandle{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1693,7 +1660,7 @@ func miqt_exec_callback_QSplitterHandle_InputMethodEvent(self *C.QSplitterHandle } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QSplitterHandle{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qsplitter.h b/qt6/gen_qsplitter.h index 2caf2993..9b2e92b7 100644 --- a/qt6/gen_qsplitter.h +++ b/qt6/gen_qsplitter.h @@ -86,10 +86,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QSplitter_new(QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplitter_new2(QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplitter_new3(int param1, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSplitter_new4(int param1, QWidget* parent, QSplitter** outptr_QSplitter, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QSplitter* QSplitter_new(QWidget* parent); +QSplitter* QSplitter_new2(); +QSplitter* QSplitter_new3(int param1); +QSplitter* QSplitter_new4(int param1, QWidget* parent); +void QSplitter_virtbase(QSplitter* src, QFrame** outptr_QFrame); QMetaObject* QSplitter_MetaObject(const QSplitter* self); void* QSplitter_Metacast(QSplitter* self, const char* param1); struct miqt_string QSplitter_Tr(const char* s); @@ -149,7 +150,8 @@ void QSplitter_override_virtual_InitStyleOption(void* self, intptr_t slot); void QSplitter_virtualbase_InitStyleOption(const void* self, QStyleOptionFrame* option); void QSplitter_Delete(QSplitter* self, bool isSubclass); -void QSplitterHandle_new(int o, QSplitter* parent, QSplitterHandle** outptr_QSplitterHandle, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QSplitterHandle* QSplitterHandle_new(int o, QSplitter* parent); +void QSplitterHandle_virtbase(QSplitterHandle* src, QWidget** outptr_QWidget); QMetaObject* QSplitterHandle_MetaObject(const QSplitterHandle* self); void* QSplitterHandle_Metacast(QSplitterHandle* self, const char* param1); struct miqt_string QSplitterHandle_Tr(const char* s); diff --git a/qt6/gen_qstackedlayout.cpp b/qt6/gen_qstackedlayout.cpp index 4c0ebea1..ece3e74b 100644 --- a/qt6/gen_qstackedlayout.cpp +++ b/qt6/gen_qstackedlayout.cpp @@ -508,28 +508,20 @@ public: }; -void QStackedLayout_new(QWidget* parent, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQStackedLayout* ret = new MiqtVirtualQStackedLayout(parent); - *outptr_QStackedLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QStackedLayout* QStackedLayout_new(QWidget* parent) { + return new MiqtVirtualQStackedLayout(parent); } -void QStackedLayout_new2(QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQStackedLayout* ret = new MiqtVirtualQStackedLayout(); - *outptr_QStackedLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QStackedLayout* QStackedLayout_new2() { + return new MiqtVirtualQStackedLayout(); } -void QStackedLayout_new3(QLayout* parentLayout, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem) { - MiqtVirtualQStackedLayout* ret = new MiqtVirtualQStackedLayout(parentLayout); - *outptr_QStackedLayout = ret; - *outptr_QLayout = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QLayoutItem = static_cast(ret); +QStackedLayout* QStackedLayout_new3(QLayout* parentLayout) { + return new MiqtVirtualQStackedLayout(parentLayout); +} + +void QStackedLayout_virtbase(QStackedLayout* src, QLayout** outptr_QLayout) { + *outptr_QLayout = static_cast(src); } QMetaObject* QStackedLayout_MetaObject(const QStackedLayout* self) { diff --git a/qt6/gen_qstackedlayout.go b/qt6/gen_qstackedlayout.go index 78c7b95f..6b660525 100644 --- a/qt6/gen_qstackedlayout.go +++ b/qt6/gen_qstackedlayout.go @@ -42,59 +42,42 @@ func (this *QStackedLayout) UnsafePointer() unsafe.Pointer { } // newQStackedLayout constructs the type using only CGO pointers. -func newQStackedLayout(h *C.QStackedLayout, h_QLayout *C.QLayout, h_QObject *C.QObject, h_QLayoutItem *C.QLayoutItem) *QStackedLayout { +func newQStackedLayout(h *C.QStackedLayout) *QStackedLayout { if h == nil { return nil } + var outptr_QLayout *C.QLayout = nil + C.QStackedLayout_virtbase(h, &outptr_QLayout) + return &QStackedLayout{h: h, - QLayout: newQLayout(h_QLayout, h_QObject, h_QLayoutItem)} + QLayout: newQLayout(outptr_QLayout)} } // UnsafeNewQStackedLayout constructs the type using only unsafe pointers. -func UnsafeNewQStackedLayout(h unsafe.Pointer, h_QLayout unsafe.Pointer, h_QObject unsafe.Pointer, h_QLayoutItem unsafe.Pointer) *QStackedLayout { - if h == nil { - return nil - } - - return &QStackedLayout{h: (*C.QStackedLayout)(h), - QLayout: UnsafeNewQLayout(h_QLayout, h_QObject, h_QLayoutItem)} +func UnsafeNewQStackedLayout(h unsafe.Pointer) *QStackedLayout { + return newQStackedLayout((*C.QStackedLayout)(h)) } // NewQStackedLayout constructs a new QStackedLayout object. func NewQStackedLayout(parent *QWidget) *QStackedLayout { - var outptr_QStackedLayout *C.QStackedLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QStackedLayout_new(parent.cPointer(), &outptr_QStackedLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQStackedLayout(outptr_QStackedLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQStackedLayout(C.QStackedLayout_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQStackedLayout2 constructs a new QStackedLayout object. func NewQStackedLayout2() *QStackedLayout { - var outptr_QStackedLayout *C.QStackedLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QStackedLayout_new2(&outptr_QStackedLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQStackedLayout(outptr_QStackedLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQStackedLayout(C.QStackedLayout_new2()) ret.isSubclass = true return ret } // NewQStackedLayout3 constructs a new QStackedLayout object. func NewQStackedLayout3(parentLayout *QLayout) *QStackedLayout { - var outptr_QStackedLayout *C.QStackedLayout = nil - var outptr_QLayout *C.QLayout = nil - var outptr_QObject *C.QObject = nil - var outptr_QLayoutItem *C.QLayoutItem = nil - C.QStackedLayout_new3(parentLayout.cPointer(), &outptr_QStackedLayout, &outptr_QLayout, &outptr_QObject, &outptr_QLayoutItem) - ret := newQStackedLayout(outptr_QStackedLayout, outptr_QLayout, outptr_QObject, outptr_QLayoutItem) + ret := newQStackedLayout(C.QStackedLayout_new3(parentLayout.cPointer())) ret.isSubclass = true return ret } @@ -127,7 +110,7 @@ func (this *QStackedLayout) InsertWidget(index int, w *QWidget) int { } func (this *QStackedLayout) CurrentWidget() *QWidget { - return newQWidget(C.QStackedLayout_CurrentWidget(this.h), nil, nil) + return newQWidget(C.QStackedLayout_CurrentWidget(this.h)) } func (this *QStackedLayout) CurrentIndex() int { @@ -135,7 +118,7 @@ func (this *QStackedLayout) CurrentIndex() int { } func (this *QStackedLayout) Widget(param1 int) *QWidget { - return newQWidget(C.QStackedLayout_Widget(this.h, (C.int)(param1)), nil, nil) + return newQWidget(C.QStackedLayout_Widget(this.h, (C.int)(param1))) } func (this *QStackedLayout) Count() int { @@ -669,7 +652,7 @@ func miqt_exec_callback_QStackedLayout_IndexOf(self *C.QStackedLayout, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(param1, nil, nil) + slotval1 := newQWidget(param1) virtualReturn := gofunc((&QStackedLayout{h: self}).callVirtualBase_IndexOf, slotval1) @@ -747,9 +730,9 @@ func miqt_exec_callback_QStackedLayout_ReplaceWidget(self *C.QStackedLayout, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(from, nil, nil) + slotval1 := newQWidget(from) - slotval2 := newQWidget(to, nil, nil) + slotval2 := newQWidget(to) slotval3 := (FindChildOption)(options) @@ -761,7 +744,7 @@ func miqt_exec_callback_QStackedLayout_ReplaceWidget(self *C.QStackedLayout, cb func (this *QStackedLayout) callVirtualBase_Layout() *QLayout { - return newQLayout(C.QStackedLayout_virtualbase_Layout(unsafe.Pointer(this.h)), nil, nil) + return newQLayout(C.QStackedLayout_virtualbase_Layout(unsafe.Pointer(this.h))) } func (this *QStackedLayout) OnLayout(slot func(super func() *QLayout) *QLayout) { @@ -804,7 +787,7 @@ func miqt_exec_callback_QStackedLayout_ChildEvent(self *C.QStackedLayout, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(e, nil) + slotval1 := newQChildEvent(e) gofunc((&QStackedLayout{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qstackedlayout.h b/qt6/gen_qstackedlayout.h index e1734e52..ad235049 100644 --- a/qt6/gen_qstackedlayout.h +++ b/qt6/gen_qstackedlayout.h @@ -36,9 +36,10 @@ typedef struct QStackedLayout QStackedLayout; typedef struct QWidget QWidget; #endif -void QStackedLayout_new(QWidget* parent, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QStackedLayout_new2(QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); -void QStackedLayout_new3(QLayout* parentLayout, QStackedLayout** outptr_QStackedLayout, QLayout** outptr_QLayout, QObject** outptr_QObject, QLayoutItem** outptr_QLayoutItem); +QStackedLayout* QStackedLayout_new(QWidget* parent); +QStackedLayout* QStackedLayout_new2(); +QStackedLayout* QStackedLayout_new3(QLayout* parentLayout); +void QStackedLayout_virtbase(QStackedLayout* src, QLayout** outptr_QLayout); QMetaObject* QStackedLayout_MetaObject(const QStackedLayout* self); void* QStackedLayout_Metacast(QStackedLayout* self, const char* param1); struct miqt_string QStackedLayout_Tr(const char* s); diff --git a/qt6/gen_qstackedwidget.cpp b/qt6/gen_qstackedwidget.cpp index 7558df26..3a71e588 100644 --- a/qt6/gen_qstackedwidget.cpp +++ b/qt6/gen_qstackedwidget.cpp @@ -142,22 +142,16 @@ public: }; -void QStackedWidget_new(QWidget* parent, QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQStackedWidget* ret = new MiqtVirtualQStackedWidget(parent); - *outptr_QStackedWidget = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QStackedWidget* QStackedWidget_new(QWidget* parent) { + return new MiqtVirtualQStackedWidget(parent); } -void QStackedWidget_new2(QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQStackedWidget* ret = new MiqtVirtualQStackedWidget(); - *outptr_QStackedWidget = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QStackedWidget* QStackedWidget_new2() { + return new MiqtVirtualQStackedWidget(); +} + +void QStackedWidget_virtbase(QStackedWidget* src, QFrame** outptr_QFrame) { + *outptr_QFrame = static_cast(src); } QMetaObject* QStackedWidget_MetaObject(const QStackedWidget* self) { diff --git a/qt6/gen_qstackedwidget.go b/qt6/gen_qstackedwidget.go index d74783a5..0f8c64b0 100644 --- a/qt6/gen_qstackedwidget.go +++ b/qt6/gen_qstackedwidget.go @@ -35,48 +35,34 @@ func (this *QStackedWidget) UnsafePointer() unsafe.Pointer { } // newQStackedWidget constructs the type using only CGO pointers. -func newQStackedWidget(h *C.QStackedWidget, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QStackedWidget { +func newQStackedWidget(h *C.QStackedWidget) *QStackedWidget { if h == nil { return nil } + var outptr_QFrame *C.QFrame = nil + C.QStackedWidget_virtbase(h, &outptr_QFrame) + return &QStackedWidget{h: h, - QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QFrame: newQFrame(outptr_QFrame)} } // UnsafeNewQStackedWidget constructs the type using only unsafe pointers. -func UnsafeNewQStackedWidget(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QStackedWidget { - if h == nil { - return nil - } - - return &QStackedWidget{h: (*C.QStackedWidget)(h), - QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQStackedWidget(h unsafe.Pointer) *QStackedWidget { + return newQStackedWidget((*C.QStackedWidget)(h)) } // NewQStackedWidget constructs a new QStackedWidget object. func NewQStackedWidget(parent *QWidget) *QStackedWidget { - var outptr_QStackedWidget *C.QStackedWidget = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QStackedWidget_new(parent.cPointer(), &outptr_QStackedWidget, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQStackedWidget(outptr_QStackedWidget, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQStackedWidget(C.QStackedWidget_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQStackedWidget2 constructs a new QStackedWidget object. func NewQStackedWidget2() *QStackedWidget { - var outptr_QStackedWidget *C.QStackedWidget = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QStackedWidget_new2(&outptr_QStackedWidget, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQStackedWidget(outptr_QStackedWidget, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQStackedWidget(C.QStackedWidget_new2()) ret.isSubclass = true return ret } @@ -113,7 +99,7 @@ func (this *QStackedWidget) RemoveWidget(w *QWidget) { } func (this *QStackedWidget) CurrentWidget() *QWidget { - return newQWidget(C.QStackedWidget_CurrentWidget(this.h), nil, nil) + return newQWidget(C.QStackedWidget_CurrentWidget(this.h)) } func (this *QStackedWidget) CurrentIndex() int { @@ -125,7 +111,7 @@ func (this *QStackedWidget) IndexOf(param1 *QWidget) int { } func (this *QStackedWidget) Widget(param1 int) *QWidget { - return newQWidget(C.QStackedWidget_Widget(this.h, (C.int)(param1)), nil, nil) + return newQWidget(C.QStackedWidget_Widget(this.h, (C.int)(param1))) } func (this *QStackedWidget) Count() int { @@ -277,7 +263,7 @@ func miqt_exec_callback_QStackedWidget_PaintEvent(self *C.QStackedWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QStackedWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -329,7 +315,7 @@ func miqt_exec_callback_QStackedWidget_InitStyleOption(self *C.QStackedWidget, c } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionFrame(option, nil) + slotval1 := newQStyleOptionFrame(option) gofunc((&QStackedWidget{h: self}).callVirtualBase_InitStyleOption, slotval1) diff --git a/qt6/gen_qstackedwidget.h b/qt6/gen_qstackedwidget.h index 9251864f..d7f3764c 100644 --- a/qt6/gen_qstackedwidget.h +++ b/qt6/gen_qstackedwidget.h @@ -38,8 +38,9 @@ typedef struct QStyleOptionFrame QStyleOptionFrame; typedef struct QWidget QWidget; #endif -void QStackedWidget_new(QWidget* parent, QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QStackedWidget_new2(QStackedWidget** outptr_QStackedWidget, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QStackedWidget* QStackedWidget_new(QWidget* parent); +QStackedWidget* QStackedWidget_new2(); +void QStackedWidget_virtbase(QStackedWidget* src, QFrame** outptr_QFrame); QMetaObject* QStackedWidget_MetaObject(const QStackedWidget* self); void* QStackedWidget_Metacast(QStackedWidget* self, const char* param1); struct miqt_string QStackedWidget_Tr(const char* s); diff --git a/qt6/gen_qstandarditemmodel.cpp b/qt6/gen_qstandarditemmodel.cpp index 7a4df770..229925a2 100644 --- a/qt6/gen_qstandarditemmodel.cpp +++ b/qt6/gen_qstandarditemmodel.cpp @@ -230,31 +230,26 @@ public: }; -void QStandardItem_new(QStandardItem** outptr_QStandardItem) { - MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(); - *outptr_QStandardItem = ret; +QStandardItem* QStandardItem_new() { + return new MiqtVirtualQStandardItem(); } -void QStandardItem_new2(struct miqt_string text, QStandardItem** outptr_QStandardItem) { +QStandardItem* QStandardItem_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(text_QString); - *outptr_QStandardItem = ret; + return new MiqtVirtualQStandardItem(text_QString); } -void QStandardItem_new3(QIcon* icon, struct miqt_string text, QStandardItem** outptr_QStandardItem) { +QStandardItem* QStandardItem_new3(QIcon* icon, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(*icon, text_QString); - *outptr_QStandardItem = ret; + return new MiqtVirtualQStandardItem(*icon, text_QString); } -void QStandardItem_new4(int rows, QStandardItem** outptr_QStandardItem) { - MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(static_cast(rows)); - *outptr_QStandardItem = ret; +QStandardItem* QStandardItem_new4(int rows) { + return new MiqtVirtualQStandardItem(static_cast(rows)); } -void QStandardItem_new5(int rows, int columns, QStandardItem** outptr_QStandardItem) { - MiqtVirtualQStandardItem* ret = new MiqtVirtualQStandardItem(static_cast(rows), static_cast(columns)); - *outptr_QStandardItem = ret; +QStandardItem* QStandardItem_new5(int rows, int columns) { + return new MiqtVirtualQStandardItem(static_cast(rows), static_cast(columns)); } QVariant* QStandardItem_Data(const QStandardItem* self, int role) { @@ -1877,32 +1872,24 @@ public: }; -void QStandardItemModel_new(QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(); - *outptr_QStandardItemModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStandardItemModel* QStandardItemModel_new() { + return new MiqtVirtualQStandardItemModel(); } -void QStandardItemModel_new2(int rows, int columns, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(static_cast(rows), static_cast(columns)); - *outptr_QStandardItemModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStandardItemModel* QStandardItemModel_new2(int rows, int columns) { + return new MiqtVirtualQStandardItemModel(static_cast(rows), static_cast(columns)); } -void QStandardItemModel_new3(QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(parent); - *outptr_QStandardItemModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStandardItemModel* QStandardItemModel_new3(QObject* parent) { + return new MiqtVirtualQStandardItemModel(parent); } -void QStandardItemModel_new4(int rows, int columns, QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQStandardItemModel* ret = new MiqtVirtualQStandardItemModel(static_cast(rows), static_cast(columns), parent); - *outptr_QStandardItemModel = ret; - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStandardItemModel* QStandardItemModel_new4(int rows, int columns, QObject* parent) { + return new MiqtVirtualQStandardItemModel(static_cast(rows), static_cast(columns), parent); +} + +void QStandardItemModel_virtbase(QStandardItemModel* src, QAbstractItemModel** outptr_QAbstractItemModel) { + *outptr_QAbstractItemModel = static_cast(src); } QMetaObject* QStandardItemModel_MetaObject(const QStandardItemModel* self) { diff --git a/qt6/gen_qstandarditemmodel.go b/qt6/gen_qstandarditemmodel.go index 1e6a17db..699c956a 100644 --- a/qt6/gen_qstandarditemmodel.go +++ b/qt6/gen_qstandarditemmodel.go @@ -45,24 +45,19 @@ func newQStandardItem(h *C.QStandardItem) *QStandardItem { if h == nil { return nil } + return &QStandardItem{h: h} } // UnsafeNewQStandardItem constructs the type using only unsafe pointers. func UnsafeNewQStandardItem(h unsafe.Pointer) *QStandardItem { - if h == nil { - return nil - } - - return &QStandardItem{h: (*C.QStandardItem)(h)} + return newQStandardItem((*C.QStandardItem)(h)) } // NewQStandardItem constructs a new QStandardItem object. func NewQStandardItem() *QStandardItem { - var outptr_QStandardItem *C.QStandardItem = nil - C.QStandardItem_new(&outptr_QStandardItem) - ret := newQStandardItem(outptr_QStandardItem) + ret := newQStandardItem(C.QStandardItem_new()) ret.isSubclass = true return ret } @@ -73,10 +68,8 @@ func NewQStandardItem2(text string) *QStandardItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QStandardItem *C.QStandardItem = nil - C.QStandardItem_new2(text_ms, &outptr_QStandardItem) - ret := newQStandardItem(outptr_QStandardItem) + ret := newQStandardItem(C.QStandardItem_new2(text_ms)) ret.isSubclass = true return ret } @@ -87,30 +80,24 @@ func NewQStandardItem3(icon *QIcon, text string) *QStandardItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QStandardItem *C.QStandardItem = nil - C.QStandardItem_new3(icon.cPointer(), text_ms, &outptr_QStandardItem) - ret := newQStandardItem(outptr_QStandardItem) + ret := newQStandardItem(C.QStandardItem_new3(icon.cPointer(), text_ms)) ret.isSubclass = true return ret } // NewQStandardItem4 constructs a new QStandardItem object. func NewQStandardItem4(rows int) *QStandardItem { - var outptr_QStandardItem *C.QStandardItem = nil - C.QStandardItem_new4((C.int)(rows), &outptr_QStandardItem) - ret := newQStandardItem(outptr_QStandardItem) + ret := newQStandardItem(C.QStandardItem_new4((C.int)(rows))) ret.isSubclass = true return ret } // NewQStandardItem5 constructs a new QStandardItem object. func NewQStandardItem5(rows int, columns int) *QStandardItem { - var outptr_QStandardItem *C.QStandardItem = nil - C.QStandardItem_new5((C.int)(rows), (C.int)(columns), &outptr_QStandardItem) - ret := newQStandardItem(outptr_QStandardItem) + ret := newQStandardItem(C.QStandardItem_new5((C.int)(rows), (C.int)(columns))) ret.isSubclass = true return ret } @@ -380,7 +367,7 @@ func (this *QStandardItem) Index() *QModelIndex { } func (this *QStandardItem) Model() *QStandardItemModel { - return newQStandardItemModel(C.QStandardItem_Model(this.h), nil, nil) + return newQStandardItemModel(C.QStandardItem_Model(this.h)) } func (this *QStandardItem) RowCount() int { @@ -723,7 +710,7 @@ func miqt_exec_callback_QStandardItem_Read(self *C.QStandardItem, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDataStream(in, nil) + slotval1 := newQDataStream(in) gofunc((&QStandardItem{h: self}).callVirtualBase_Read, slotval1) @@ -749,7 +736,7 @@ func miqt_exec_callback_QStandardItem_Write(self *C.QStandardItem, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDataStream(out, nil) + slotval1 := newQDataStream(out) gofunc((&QStandardItem{h: self}).callVirtualBase_Write, slotval1) @@ -818,68 +805,50 @@ func (this *QStandardItemModel) UnsafePointer() unsafe.Pointer { } // newQStandardItemModel constructs the type using only CGO pointers. -func newQStandardItemModel(h *C.QStandardItemModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QStandardItemModel { +func newQStandardItemModel(h *C.QStandardItemModel) *QStandardItemModel { if h == nil { return nil } + var outptr_QAbstractItemModel *C.QAbstractItemModel = nil + C.QStandardItemModel_virtbase(h, &outptr_QAbstractItemModel) + return &QStandardItemModel{h: h, - QAbstractItemModel: newQAbstractItemModel(h_QAbstractItemModel, h_QObject)} + QAbstractItemModel: newQAbstractItemModel(outptr_QAbstractItemModel)} } // UnsafeNewQStandardItemModel constructs the type using only unsafe pointers. -func UnsafeNewQStandardItemModel(h unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QStandardItemModel { - if h == nil { - return nil - } - - return &QStandardItemModel{h: (*C.QStandardItemModel)(h), - QAbstractItemModel: UnsafeNewQAbstractItemModel(h_QAbstractItemModel, h_QObject)} +func UnsafeNewQStandardItemModel(h unsafe.Pointer) *QStandardItemModel { + return newQStandardItemModel((*C.QStandardItemModel)(h)) } // NewQStandardItemModel constructs a new QStandardItemModel object. func NewQStandardItemModel() *QStandardItemModel { - var outptr_QStandardItemModel *C.QStandardItemModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStandardItemModel_new(&outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStandardItemModel(C.QStandardItemModel_new()) ret.isSubclass = true return ret } // NewQStandardItemModel2 constructs a new QStandardItemModel object. func NewQStandardItemModel2(rows int, columns int) *QStandardItemModel { - var outptr_QStandardItemModel *C.QStandardItemModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStandardItemModel_new2((C.int)(rows), (C.int)(columns), &outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStandardItemModel(C.QStandardItemModel_new2((C.int)(rows), (C.int)(columns))) ret.isSubclass = true return ret } // NewQStandardItemModel3 constructs a new QStandardItemModel object. func NewQStandardItemModel3(parent *QObject) *QStandardItemModel { - var outptr_QStandardItemModel *C.QStandardItemModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStandardItemModel_new3(parent.cPointer(), &outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStandardItemModel(C.QStandardItemModel_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQStandardItemModel4 constructs a new QStandardItemModel object. func NewQStandardItemModel4(rows int, columns int, parent *QObject) *QStandardItemModel { - var outptr_QStandardItemModel *C.QStandardItemModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStandardItemModel_new4((C.int)(rows), (C.int)(columns), parent.cPointer(), &outptr_QStandardItemModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStandardItemModel(outptr_QStandardItemModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStandardItemModel(C.QStandardItemModel_new4((C.int)(rows), (C.int)(columns), parent.cPointer())) ret.isSubclass = true return ret } @@ -1278,7 +1247,7 @@ func (this *QStandardItemModel) MimeData(indexes []QModelIndex) *QMimeData { indexes_CArray[i] = indexes[i].cPointer() } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QStandardItemModel_MimeData(this.h, indexes_ma), nil) + return newQMimeData(C.QStandardItemModel_MimeData(this.h, indexes_ma)) } func (this *QStandardItemModel) DropMimeData(data *QMimeData, action DropAction, row int, column int, parent *QModelIndex) bool { @@ -2140,7 +2109,7 @@ func (this *QStandardItemModel) callVirtualBase_MimeData(indexes []QModelIndex) } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QStandardItemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QStandardItemModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QStandardItemModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -2194,7 +2163,7 @@ func miqt_exec_callback_QStandardItemModel_DropMimeData(self *C.QStandardItemMod } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -2264,7 +2233,7 @@ func miqt_exec_callback_QStandardItemModel_CanDropMimeData(self *C.QStandardItem } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt6/gen_qstandarditemmodel.h b/qt6/gen_qstandarditemmodel.h index c1301969..fd66d365 100644 --- a/qt6/gen_qstandarditemmodel.h +++ b/qt6/gen_qstandarditemmodel.h @@ -46,11 +46,11 @@ typedef struct QStandardItemModel QStandardItemModel; typedef struct QVariant QVariant; #endif -void QStandardItem_new(QStandardItem** outptr_QStandardItem); -void QStandardItem_new2(struct miqt_string text, QStandardItem** outptr_QStandardItem); -void QStandardItem_new3(QIcon* icon, struct miqt_string text, QStandardItem** outptr_QStandardItem); -void QStandardItem_new4(int rows, QStandardItem** outptr_QStandardItem); -void QStandardItem_new5(int rows, int columns, QStandardItem** outptr_QStandardItem); +QStandardItem* QStandardItem_new(); +QStandardItem* QStandardItem_new2(struct miqt_string text); +QStandardItem* QStandardItem_new3(QIcon* icon, struct miqt_string text); +QStandardItem* QStandardItem_new4(int rows); +QStandardItem* QStandardItem_new5(int rows, int columns); QVariant* QStandardItem_Data(const QStandardItem* self, int role); void QStandardItem_MultiData(const QStandardItem* self, QModelRoleDataSpan* roleDataSpan); void QStandardItem_SetData(QStandardItem* self, QVariant* value, int role); @@ -156,10 +156,11 @@ void QStandardItem_override_virtual_OperatorLesser(void* self, intptr_t slot); bool QStandardItem_virtualbase_OperatorLesser(const void* self, QStandardItem* other); void QStandardItem_Delete(QStandardItem* self, bool isSubclass); -void QStandardItemModel_new(QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QStandardItemModel_new2(int rows, int columns, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QStandardItemModel_new3(QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QStandardItemModel_new4(int rows, int columns, QObject* parent, QStandardItemModel** outptr_QStandardItemModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QStandardItemModel* QStandardItemModel_new(); +QStandardItemModel* QStandardItemModel_new2(int rows, int columns); +QStandardItemModel* QStandardItemModel_new3(QObject* parent); +QStandardItemModel* QStandardItemModel_new4(int rows, int columns, QObject* parent); +void QStandardItemModel_virtbase(QStandardItemModel* src, QAbstractItemModel** outptr_QAbstractItemModel); QMetaObject* QStandardItemModel_MetaObject(const QStandardItemModel* self); void* QStandardItemModel_Metacast(QStandardItemModel* self, const char* param1); struct miqt_string QStandardItemModel_Tr(const char* s); diff --git a/qt6/gen_qstandardpaths.go b/qt6/gen_qstandardpaths.go index fff7a2bb..802801e4 100644 --- a/qt6/gen_qstandardpaths.go +++ b/qt6/gen_qstandardpaths.go @@ -69,16 +69,13 @@ func newQStandardPaths(h *C.QStandardPaths) *QStandardPaths { if h == nil { return nil } + return &QStandardPaths{h: h} } // UnsafeNewQStandardPaths constructs the type using only unsafe pointers. func UnsafeNewQStandardPaths(h unsafe.Pointer) *QStandardPaths { - if h == nil { - return nil - } - - return &QStandardPaths{h: (*C.QStandardPaths)(h)} + return newQStandardPaths((*C.QStandardPaths)(h)) } func QStandardPaths_WritableLocation(typeVal QStandardPaths__StandardLocation) string { diff --git a/qt6/gen_qstatictext.cpp b/qt6/gen_qstatictext.cpp index e98bc412..c4e1fe44 100644 --- a/qt6/gen_qstatictext.cpp +++ b/qt6/gen_qstatictext.cpp @@ -10,20 +10,17 @@ #include "gen_qstatictext.h" #include "_cgo_export.h" -void QStaticText_new(QStaticText** outptr_QStaticText) { - QStaticText* ret = new QStaticText(); - *outptr_QStaticText = ret; +QStaticText* QStaticText_new() { + return new QStaticText(); } -void QStaticText_new2(struct miqt_string text, QStaticText** outptr_QStaticText) { +QStaticText* QStaticText_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - QStaticText* ret = new QStaticText(text_QString); - *outptr_QStaticText = ret; + return new QStaticText(text_QString); } -void QStaticText_new3(QStaticText* other, QStaticText** outptr_QStaticText) { - QStaticText* ret = new QStaticText(*other); - *outptr_QStaticText = ret; +QStaticText* QStaticText_new3(QStaticText* other) { + return new QStaticText(*other); } void QStaticText_OperatorAssign(QStaticText* self, QStaticText* param1) { diff --git a/qt6/gen_qstatictext.go b/qt6/gen_qstatictext.go index 36d6402c..4b23c2bd 100644 --- a/qt6/gen_qstatictext.go +++ b/qt6/gen_qstatictext.go @@ -44,24 +44,19 @@ func newQStaticText(h *C.QStaticText) *QStaticText { if h == nil { return nil } + return &QStaticText{h: h} } // UnsafeNewQStaticText constructs the type using only unsafe pointers. func UnsafeNewQStaticText(h unsafe.Pointer) *QStaticText { - if h == nil { - return nil - } - - return &QStaticText{h: (*C.QStaticText)(h)} + return newQStaticText((*C.QStaticText)(h)) } // NewQStaticText constructs a new QStaticText object. func NewQStaticText() *QStaticText { - var outptr_QStaticText *C.QStaticText = nil - C.QStaticText_new(&outptr_QStaticText) - ret := newQStaticText(outptr_QStaticText) + ret := newQStaticText(C.QStaticText_new()) ret.isSubclass = true return ret } @@ -72,20 +67,16 @@ func NewQStaticText2(text string) *QStaticText { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QStaticText *C.QStaticText = nil - C.QStaticText_new2(text_ms, &outptr_QStaticText) - ret := newQStaticText(outptr_QStaticText) + ret := newQStaticText(C.QStaticText_new2(text_ms)) ret.isSubclass = true return ret } // NewQStaticText3 constructs a new QStaticText object. func NewQStaticText3(other *QStaticText) *QStaticText { - var outptr_QStaticText *C.QStaticText = nil - C.QStaticText_new3(other.cPointer(), &outptr_QStaticText) - ret := newQStaticText(outptr_QStaticText) + ret := newQStaticText(C.QStaticText_new3(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qstatictext.h b/qt6/gen_qstatictext.h index 9b14e499..583f049c 100644 --- a/qt6/gen_qstatictext.h +++ b/qt6/gen_qstatictext.h @@ -28,9 +28,9 @@ typedef struct QTextOption QTextOption; typedef struct QTransform QTransform; #endif -void QStaticText_new(QStaticText** outptr_QStaticText); -void QStaticText_new2(struct miqt_string text, QStaticText** outptr_QStaticText); -void QStaticText_new3(QStaticText* other, QStaticText** outptr_QStaticText); +QStaticText* QStaticText_new(); +QStaticText* QStaticText_new2(struct miqt_string text); +QStaticText* QStaticText_new3(QStaticText* other); void QStaticText_OperatorAssign(QStaticText* self, QStaticText* param1); void QStaticText_Swap(QStaticText* self, QStaticText* other); void QStaticText_SetText(QStaticText* self, struct miqt_string text); diff --git a/qt6/gen_qstatusbar.cpp b/qt6/gen_qstatusbar.cpp index 7dcd9b22..3d29bbf8 100644 --- a/qt6/gen_qstatusbar.cpp +++ b/qt6/gen_qstatusbar.cpp @@ -1022,20 +1022,16 @@ public: }; -void QStatusBar_new(QWidget* parent, QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQStatusBar* ret = new MiqtVirtualQStatusBar(parent); - *outptr_QStatusBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QStatusBar* QStatusBar_new(QWidget* parent) { + return new MiqtVirtualQStatusBar(parent); } -void QStatusBar_new2(QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQStatusBar* ret = new MiqtVirtualQStatusBar(); - *outptr_QStatusBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QStatusBar* QStatusBar_new2() { + return new MiqtVirtualQStatusBar(); +} + +void QStatusBar_virtbase(QStatusBar* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QStatusBar_MetaObject(const QStatusBar* self) { diff --git a/qt6/gen_qstatusbar.go b/qt6/gen_qstatusbar.go index 32bb3100..efbffe9d 100644 --- a/qt6/gen_qstatusbar.go +++ b/qt6/gen_qstatusbar.go @@ -35,46 +35,34 @@ func (this *QStatusBar) UnsafePointer() unsafe.Pointer { } // newQStatusBar constructs the type using only CGO pointers. -func newQStatusBar(h *C.QStatusBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QStatusBar { +func newQStatusBar(h *C.QStatusBar) *QStatusBar { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QStatusBar_virtbase(h, &outptr_QWidget) + return &QStatusBar{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQStatusBar constructs the type using only unsafe pointers. -func UnsafeNewQStatusBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QStatusBar { - if h == nil { - return nil - } - - return &QStatusBar{h: (*C.QStatusBar)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQStatusBar(h unsafe.Pointer) *QStatusBar { + return newQStatusBar((*C.QStatusBar)(h)) } // NewQStatusBar constructs a new QStatusBar object. func NewQStatusBar(parent *QWidget) *QStatusBar { - var outptr_QStatusBar *C.QStatusBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QStatusBar_new(parent.cPointer(), &outptr_QStatusBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQStatusBar(outptr_QStatusBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQStatusBar(C.QStatusBar_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQStatusBar2 constructs a new QStatusBar object. func NewQStatusBar2() *QStatusBar { - var outptr_QStatusBar *C.QStatusBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QStatusBar_new2(&outptr_QStatusBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQStatusBar(outptr_QStatusBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQStatusBar(C.QStatusBar_new2()) ret.isSubclass = true return ret } @@ -238,7 +226,7 @@ func miqt_exec_callback_QStatusBar_ShowEvent(self *C.QStatusBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QStatusBar{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -264,7 +252,7 @@ func miqt_exec_callback_QStatusBar_PaintEvent(self *C.QStatusBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QStatusBar{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -290,7 +278,7 @@ func miqt_exec_callback_QStatusBar_ResizeEvent(self *C.QStatusBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QStatusBar{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -527,7 +515,7 @@ func miqt_exec_callback_QStatusBar_MousePressEvent(self *C.QStatusBar, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -553,7 +541,7 @@ func miqt_exec_callback_QStatusBar_MouseReleaseEvent(self *C.QStatusBar, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -579,7 +567,7 @@ func miqt_exec_callback_QStatusBar_MouseDoubleClickEvent(self *C.QStatusBar, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -605,7 +593,7 @@ func miqt_exec_callback_QStatusBar_MouseMoveEvent(self *C.QStatusBar, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -631,7 +619,7 @@ func miqt_exec_callback_QStatusBar_WheelEvent(self *C.QStatusBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -657,7 +645,7 @@ func miqt_exec_callback_QStatusBar_KeyPressEvent(self *C.QStatusBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -683,7 +671,7 @@ func miqt_exec_callback_QStatusBar_KeyReleaseEvent(self *C.QStatusBar, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -709,7 +697,7 @@ func miqt_exec_callback_QStatusBar_FocusInEvent(self *C.QStatusBar, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -735,7 +723,7 @@ func miqt_exec_callback_QStatusBar_FocusOutEvent(self *C.QStatusBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -761,7 +749,7 @@ func miqt_exec_callback_QStatusBar_EnterEvent(self *C.QStatusBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -813,7 +801,7 @@ func miqt_exec_callback_QStatusBar_MoveEvent(self *C.QStatusBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -839,7 +827,7 @@ func miqt_exec_callback_QStatusBar_CloseEvent(self *C.QStatusBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -865,7 +853,7 @@ func miqt_exec_callback_QStatusBar_ContextMenuEvent(self *C.QStatusBar, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -891,7 +879,7 @@ func miqt_exec_callback_QStatusBar_TabletEvent(self *C.QStatusBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -917,7 +905,7 @@ func miqt_exec_callback_QStatusBar_ActionEvent(self *C.QStatusBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -943,7 +931,7 @@ func miqt_exec_callback_QStatusBar_DragEnterEvent(self *C.QStatusBar, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -969,7 +957,7 @@ func miqt_exec_callback_QStatusBar_DragMoveEvent(self *C.QStatusBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -995,7 +983,7 @@ func miqt_exec_callback_QStatusBar_DragLeaveEvent(self *C.QStatusBar, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1021,7 +1009,7 @@ func miqt_exec_callback_QStatusBar_DropEvent(self *C.QStatusBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1047,7 +1035,7 @@ func miqt_exec_callback_QStatusBar_HideEvent(self *C.QStatusBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QStatusBar{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1243,7 +1231,7 @@ func miqt_exec_callback_QStatusBar_InputMethodEvent(self *C.QStatusBar, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QStatusBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qstatusbar.h b/qt6/gen_qstatusbar.h index add31da5..a6d9089f 100644 --- a/qt6/gen_qstatusbar.h +++ b/qt6/gen_qstatusbar.h @@ -78,8 +78,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QStatusBar_new(QWidget* parent, QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QStatusBar_new2(QStatusBar** outptr_QStatusBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QStatusBar* QStatusBar_new(QWidget* parent); +QStatusBar* QStatusBar_new2(); +void QStatusBar_virtbase(QStatusBar* src, QWidget** outptr_QWidget); QMetaObject* QStatusBar_MetaObject(const QStatusBar* self); void* QStatusBar_Metacast(QStatusBar* self, const char* param1); struct miqt_string QStatusBar_Tr(const char* s); diff --git a/qt6/gen_qstorageinfo.cpp b/qt6/gen_qstorageinfo.cpp index bd643154..dffa6c97 100644 --- a/qt6/gen_qstorageinfo.cpp +++ b/qt6/gen_qstorageinfo.cpp @@ -9,25 +9,21 @@ #include "gen_qstorageinfo.h" #include "_cgo_export.h" -void QStorageInfo_new(QStorageInfo** outptr_QStorageInfo) { - QStorageInfo* ret = new QStorageInfo(); - *outptr_QStorageInfo = ret; +QStorageInfo* QStorageInfo_new() { + return new QStorageInfo(); } -void QStorageInfo_new2(struct miqt_string path, QStorageInfo** outptr_QStorageInfo) { +QStorageInfo* QStorageInfo_new2(struct miqt_string path) { QString path_QString = QString::fromUtf8(path.data, path.len); - QStorageInfo* ret = new QStorageInfo(path_QString); - *outptr_QStorageInfo = ret; + return new QStorageInfo(path_QString); } -void QStorageInfo_new3(QDir* dir, QStorageInfo** outptr_QStorageInfo) { - QStorageInfo* ret = new QStorageInfo(*dir); - *outptr_QStorageInfo = ret; +QStorageInfo* QStorageInfo_new3(QDir* dir) { + return new QStorageInfo(*dir); } -void QStorageInfo_new4(QStorageInfo* other, QStorageInfo** outptr_QStorageInfo) { - QStorageInfo* ret = new QStorageInfo(*other); - *outptr_QStorageInfo = ret; +QStorageInfo* QStorageInfo_new4(QStorageInfo* other) { + return new QStorageInfo(*other); } void QStorageInfo_OperatorAssign(QStorageInfo* self, QStorageInfo* other) { diff --git a/qt6/gen_qstorageinfo.go b/qt6/gen_qstorageinfo.go index d1e50f80..2376196e 100644 --- a/qt6/gen_qstorageinfo.go +++ b/qt6/gen_qstorageinfo.go @@ -37,24 +37,19 @@ func newQStorageInfo(h *C.QStorageInfo) *QStorageInfo { if h == nil { return nil } + return &QStorageInfo{h: h} } // UnsafeNewQStorageInfo constructs the type using only unsafe pointers. func UnsafeNewQStorageInfo(h unsafe.Pointer) *QStorageInfo { - if h == nil { - return nil - } - - return &QStorageInfo{h: (*C.QStorageInfo)(h)} + return newQStorageInfo((*C.QStorageInfo)(h)) } // NewQStorageInfo constructs a new QStorageInfo object. func NewQStorageInfo() *QStorageInfo { - var outptr_QStorageInfo *C.QStorageInfo = nil - C.QStorageInfo_new(&outptr_QStorageInfo) - ret := newQStorageInfo(outptr_QStorageInfo) + ret := newQStorageInfo(C.QStorageInfo_new()) ret.isSubclass = true return ret } @@ -65,30 +60,24 @@ func NewQStorageInfo2(path string) *QStorageInfo { path_ms.data = C.CString(path) path_ms.len = C.size_t(len(path)) defer C.free(unsafe.Pointer(path_ms.data)) - var outptr_QStorageInfo *C.QStorageInfo = nil - C.QStorageInfo_new2(path_ms, &outptr_QStorageInfo) - ret := newQStorageInfo(outptr_QStorageInfo) + ret := newQStorageInfo(C.QStorageInfo_new2(path_ms)) ret.isSubclass = true return ret } // NewQStorageInfo3 constructs a new QStorageInfo object. func NewQStorageInfo3(dir *QDir) *QStorageInfo { - var outptr_QStorageInfo *C.QStorageInfo = nil - C.QStorageInfo_new3(dir.cPointer(), &outptr_QStorageInfo) - ret := newQStorageInfo(outptr_QStorageInfo) + ret := newQStorageInfo(C.QStorageInfo_new3(dir.cPointer())) ret.isSubclass = true return ret } // NewQStorageInfo4 constructs a new QStorageInfo object. func NewQStorageInfo4(other *QStorageInfo) *QStorageInfo { - var outptr_QStorageInfo *C.QStorageInfo = nil - C.QStorageInfo_new4(other.cPointer(), &outptr_QStorageInfo) - ret := newQStorageInfo(outptr_QStorageInfo) + ret := newQStorageInfo(C.QStorageInfo_new4(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qstorageinfo.h b/qt6/gen_qstorageinfo.h index 310d0878..5e439c9c 100644 --- a/qt6/gen_qstorageinfo.h +++ b/qt6/gen_qstorageinfo.h @@ -22,10 +22,10 @@ typedef struct QDir QDir; typedef struct QStorageInfo QStorageInfo; #endif -void QStorageInfo_new(QStorageInfo** outptr_QStorageInfo); -void QStorageInfo_new2(struct miqt_string path, QStorageInfo** outptr_QStorageInfo); -void QStorageInfo_new3(QDir* dir, QStorageInfo** outptr_QStorageInfo); -void QStorageInfo_new4(QStorageInfo* other, QStorageInfo** outptr_QStorageInfo); +QStorageInfo* QStorageInfo_new(); +QStorageInfo* QStorageInfo_new2(struct miqt_string path); +QStorageInfo* QStorageInfo_new3(QDir* dir); +QStorageInfo* QStorageInfo_new4(QStorageInfo* other); void QStorageInfo_OperatorAssign(QStorageInfo* self, QStorageInfo* other); void QStorageInfo_Swap(QStorageInfo* self, QStorageInfo* other); void QStorageInfo_SetPath(QStorageInfo* self, struct miqt_string path); diff --git a/qt6/gen_qstringbuilder.go b/qt6/gen_qstringbuilder.go index 3bcd472a..f897018e 100644 --- a/qt6/gen_qstringbuilder.go +++ b/qt6/gen_qstringbuilder.go @@ -37,16 +37,13 @@ func newQAbstractConcatenable(h *C.QAbstractConcatenable) *QAbstractConcatenable if h == nil { return nil } + return &QAbstractConcatenable{h: h} } // UnsafeNewQAbstractConcatenable constructs the type using only unsafe pointers. func UnsafeNewQAbstractConcatenable(h unsafe.Pointer) *QAbstractConcatenable { - if h == nil { - return nil - } - - return &QAbstractConcatenable{h: (*C.QAbstractConcatenable)(h)} + return newQAbstractConcatenable((*C.QAbstractConcatenable)(h)) } // Delete this object from C++ memory. diff --git a/qt6/gen_qstringconverter.cpp b/qt6/gen_qstringconverter.cpp index 864fe4b4..2e974b95 100644 --- a/qt6/gen_qstringconverter.cpp +++ b/qt6/gen_qstringconverter.cpp @@ -8,39 +8,28 @@ #include "gen_qstringconverter.h" #include "_cgo_export.h" -void QStringEncoder_new(QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { - QStringEncoder* ret = new QStringEncoder(); - *outptr_QStringEncoder = ret; - *outptr_QStringConverter = static_cast(ret); - *outptr_QStringConverterBase = static_cast(ret); +QStringEncoder* QStringEncoder_new() { + return new QStringEncoder(); } -void QStringEncoder_new2(int encoding, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { - QStringEncoder* ret = new QStringEncoder(static_cast(encoding)); - *outptr_QStringEncoder = ret; - *outptr_QStringConverter = static_cast(ret); - *outptr_QStringConverterBase = static_cast(ret); +QStringEncoder* QStringEncoder_new2(int encoding) { + return new QStringEncoder(static_cast(encoding)); } -void QStringEncoder_new3(const char* name, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { - QStringEncoder* ret = new QStringEncoder(name); - *outptr_QStringEncoder = ret; - *outptr_QStringConverter = static_cast(ret); - *outptr_QStringConverterBase = static_cast(ret); +QStringEncoder* QStringEncoder_new3(const char* name) { + return new QStringEncoder(name); } -void QStringEncoder_new4(int encoding, int flags, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { - QStringEncoder* ret = new QStringEncoder(static_cast(encoding), static_cast(flags)); - *outptr_QStringEncoder = ret; - *outptr_QStringConverter = static_cast(ret); - *outptr_QStringConverterBase = static_cast(ret); +QStringEncoder* QStringEncoder_new4(int encoding, int flags) { + return new QStringEncoder(static_cast(encoding), static_cast(flags)); } -void QStringEncoder_new5(const char* name, int flags, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { - QStringEncoder* ret = new QStringEncoder(name, static_cast(flags)); - *outptr_QStringEncoder = ret; - *outptr_QStringConverter = static_cast(ret); - *outptr_QStringConverterBase = static_cast(ret); +QStringEncoder* QStringEncoder_new5(const char* name, int flags) { + return new QStringEncoder(name, static_cast(flags)); +} + +void QStringEncoder_virtbase(QStringEncoder* src, QStringConverter** outptr_QStringConverter) { + *outptr_QStringConverter = static_cast(src); } ptrdiff_t QStringEncoder_RequiredSpace(const QStringEncoder* self, ptrdiff_t inputLength) { @@ -56,39 +45,28 @@ void QStringEncoder_Delete(QStringEncoder* self, bool isSubclass) { } } -void QStringDecoder_new(int encoding, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { - QStringDecoder* ret = new QStringDecoder(static_cast(encoding)); - *outptr_QStringDecoder = ret; - *outptr_QStringConverter = static_cast(ret); - *outptr_QStringConverterBase = static_cast(ret); +QStringDecoder* QStringDecoder_new(int encoding) { + return new QStringDecoder(static_cast(encoding)); } -void QStringDecoder_new2(QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { - QStringDecoder* ret = new QStringDecoder(); - *outptr_QStringDecoder = ret; - *outptr_QStringConverter = static_cast(ret); - *outptr_QStringConverterBase = static_cast(ret); +QStringDecoder* QStringDecoder_new2() { + return new QStringDecoder(); } -void QStringDecoder_new3(const char* name, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { - QStringDecoder* ret = new QStringDecoder(name); - *outptr_QStringDecoder = ret; - *outptr_QStringConverter = static_cast(ret); - *outptr_QStringConverterBase = static_cast(ret); +QStringDecoder* QStringDecoder_new3(const char* name) { + return new QStringDecoder(name); } -void QStringDecoder_new4(int encoding, int flags, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { - QStringDecoder* ret = new QStringDecoder(static_cast(encoding), static_cast(flags)); - *outptr_QStringDecoder = ret; - *outptr_QStringConverter = static_cast(ret); - *outptr_QStringConverterBase = static_cast(ret); +QStringDecoder* QStringDecoder_new4(int encoding, int flags) { + return new QStringDecoder(static_cast(encoding), static_cast(flags)); } -void QStringDecoder_new5(const char* name, int f, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) { - QStringDecoder* ret = new QStringDecoder(name, static_cast(f)); - *outptr_QStringDecoder = ret; - *outptr_QStringConverter = static_cast(ret); - *outptr_QStringConverterBase = static_cast(ret); +QStringDecoder* QStringDecoder_new5(const char* name, int f) { + return new QStringDecoder(name, static_cast(f)); +} + +void QStringDecoder_virtbase(QStringDecoder* src, QStringConverter** outptr_QStringConverter) { + *outptr_QStringConverter = static_cast(src); } ptrdiff_t QStringDecoder_RequiredSpace(const QStringDecoder* self, ptrdiff_t inputLength) { diff --git a/qt6/gen_qstringconverter.go b/qt6/gen_qstringconverter.go index 9e81401c..0492ef31 100644 --- a/qt6/gen_qstringconverter.go +++ b/qt6/gen_qstringconverter.go @@ -34,44 +34,34 @@ func (this *QStringEncoder) UnsafePointer() unsafe.Pointer { } // newQStringEncoder constructs the type using only CGO pointers. -func newQStringEncoder(h *C.QStringEncoder, h_QStringConverter *C.QStringConverter, h_QStringConverterBase *C.QStringConverterBase) *QStringEncoder { +func newQStringEncoder(h *C.QStringEncoder) *QStringEncoder { if h == nil { return nil } + var outptr_QStringConverter *C.QStringConverter = nil + C.QStringEncoder_virtbase(h, &outptr_QStringConverter) + return &QStringEncoder{h: h, - QStringConverter: newQStringConverter(h_QStringConverter, h_QStringConverterBase)} + QStringConverter: newQStringConverter(outptr_QStringConverter)} } // UnsafeNewQStringEncoder constructs the type using only unsafe pointers. -func UnsafeNewQStringEncoder(h unsafe.Pointer, h_QStringConverter unsafe.Pointer, h_QStringConverterBase unsafe.Pointer) *QStringEncoder { - if h == nil { - return nil - } - - return &QStringEncoder{h: (*C.QStringEncoder)(h), - QStringConverter: UnsafeNewQStringConverter(h_QStringConverter, h_QStringConverterBase)} +func UnsafeNewQStringEncoder(h unsafe.Pointer) *QStringEncoder { + return newQStringEncoder((*C.QStringEncoder)(h)) } // NewQStringEncoder constructs a new QStringEncoder object. func NewQStringEncoder() *QStringEncoder { - var outptr_QStringEncoder *C.QStringEncoder = nil - var outptr_QStringConverter *C.QStringConverter = nil - var outptr_QStringConverterBase *C.QStringConverterBase = nil - C.QStringEncoder_new(&outptr_QStringEncoder, &outptr_QStringConverter, &outptr_QStringConverterBase) - ret := newQStringEncoder(outptr_QStringEncoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret := newQStringEncoder(C.QStringEncoder_new()) ret.isSubclass = true return ret } // NewQStringEncoder2 constructs a new QStringEncoder object. func NewQStringEncoder2(encoding QStringConverter__Encoding) *QStringEncoder { - var outptr_QStringEncoder *C.QStringEncoder = nil - var outptr_QStringConverter *C.QStringConverter = nil - var outptr_QStringConverterBase *C.QStringConverterBase = nil - C.QStringEncoder_new2((C.int)(encoding), &outptr_QStringEncoder, &outptr_QStringConverter, &outptr_QStringConverterBase) - ret := newQStringEncoder(outptr_QStringEncoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret := newQStringEncoder(C.QStringEncoder_new2((C.int)(encoding))) ret.isSubclass = true return ret } @@ -80,24 +70,16 @@ func NewQStringEncoder2(encoding QStringConverter__Encoding) *QStringEncoder { func NewQStringEncoder3(name string) *QStringEncoder { name_Cstring := C.CString(name) defer C.free(unsafe.Pointer(name_Cstring)) - var outptr_QStringEncoder *C.QStringEncoder = nil - var outptr_QStringConverter *C.QStringConverter = nil - var outptr_QStringConverterBase *C.QStringConverterBase = nil - C.QStringEncoder_new3(name_Cstring, &outptr_QStringEncoder, &outptr_QStringConverter, &outptr_QStringConverterBase) - ret := newQStringEncoder(outptr_QStringEncoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret := newQStringEncoder(C.QStringEncoder_new3(name_Cstring)) ret.isSubclass = true return ret } // NewQStringEncoder4 constructs a new QStringEncoder object. func NewQStringEncoder4(encoding QStringConverter__Encoding, flags QStringConverterBase__Flag) *QStringEncoder { - var outptr_QStringEncoder *C.QStringEncoder = nil - var outptr_QStringConverter *C.QStringConverter = nil - var outptr_QStringConverterBase *C.QStringConverterBase = nil - C.QStringEncoder_new4((C.int)(encoding), (C.int)(flags), &outptr_QStringEncoder, &outptr_QStringConverter, &outptr_QStringConverterBase) - ret := newQStringEncoder(outptr_QStringEncoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret := newQStringEncoder(C.QStringEncoder_new4((C.int)(encoding), (C.int)(flags))) ret.isSubclass = true return ret } @@ -106,12 +88,8 @@ func NewQStringEncoder4(encoding QStringConverter__Encoding, flags QStringConver func NewQStringEncoder5(name string, flags QStringConverterBase__Flag) *QStringEncoder { name_Cstring := C.CString(name) defer C.free(unsafe.Pointer(name_Cstring)) - var outptr_QStringEncoder *C.QStringEncoder = nil - var outptr_QStringConverter *C.QStringConverter = nil - var outptr_QStringConverterBase *C.QStringConverterBase = nil - C.QStringEncoder_new5(name_Cstring, (C.int)(flags), &outptr_QStringEncoder, &outptr_QStringConverter, &outptr_QStringConverterBase) - ret := newQStringEncoder(outptr_QStringEncoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret := newQStringEncoder(C.QStringEncoder_new5(name_Cstring, (C.int)(flags))) ret.isSubclass = true return ret } @@ -155,44 +133,34 @@ func (this *QStringDecoder) UnsafePointer() unsafe.Pointer { } // newQStringDecoder constructs the type using only CGO pointers. -func newQStringDecoder(h *C.QStringDecoder, h_QStringConverter *C.QStringConverter, h_QStringConverterBase *C.QStringConverterBase) *QStringDecoder { +func newQStringDecoder(h *C.QStringDecoder) *QStringDecoder { if h == nil { return nil } + var outptr_QStringConverter *C.QStringConverter = nil + C.QStringDecoder_virtbase(h, &outptr_QStringConverter) + return &QStringDecoder{h: h, - QStringConverter: newQStringConverter(h_QStringConverter, h_QStringConverterBase)} + QStringConverter: newQStringConverter(outptr_QStringConverter)} } // UnsafeNewQStringDecoder constructs the type using only unsafe pointers. -func UnsafeNewQStringDecoder(h unsafe.Pointer, h_QStringConverter unsafe.Pointer, h_QStringConverterBase unsafe.Pointer) *QStringDecoder { - if h == nil { - return nil - } - - return &QStringDecoder{h: (*C.QStringDecoder)(h), - QStringConverter: UnsafeNewQStringConverter(h_QStringConverter, h_QStringConverterBase)} +func UnsafeNewQStringDecoder(h unsafe.Pointer) *QStringDecoder { + return newQStringDecoder((*C.QStringDecoder)(h)) } // NewQStringDecoder constructs a new QStringDecoder object. func NewQStringDecoder(encoding QStringConverter__Encoding) *QStringDecoder { - var outptr_QStringDecoder *C.QStringDecoder = nil - var outptr_QStringConverter *C.QStringConverter = nil - var outptr_QStringConverterBase *C.QStringConverterBase = nil - C.QStringDecoder_new((C.int)(encoding), &outptr_QStringDecoder, &outptr_QStringConverter, &outptr_QStringConverterBase) - ret := newQStringDecoder(outptr_QStringDecoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret := newQStringDecoder(C.QStringDecoder_new((C.int)(encoding))) ret.isSubclass = true return ret } // NewQStringDecoder2 constructs a new QStringDecoder object. func NewQStringDecoder2() *QStringDecoder { - var outptr_QStringDecoder *C.QStringDecoder = nil - var outptr_QStringConverter *C.QStringConverter = nil - var outptr_QStringConverterBase *C.QStringConverterBase = nil - C.QStringDecoder_new2(&outptr_QStringDecoder, &outptr_QStringConverter, &outptr_QStringConverterBase) - ret := newQStringDecoder(outptr_QStringDecoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret := newQStringDecoder(C.QStringDecoder_new2()) ret.isSubclass = true return ret } @@ -201,24 +169,16 @@ func NewQStringDecoder2() *QStringDecoder { func NewQStringDecoder3(name string) *QStringDecoder { name_Cstring := C.CString(name) defer C.free(unsafe.Pointer(name_Cstring)) - var outptr_QStringDecoder *C.QStringDecoder = nil - var outptr_QStringConverter *C.QStringConverter = nil - var outptr_QStringConverterBase *C.QStringConverterBase = nil - C.QStringDecoder_new3(name_Cstring, &outptr_QStringDecoder, &outptr_QStringConverter, &outptr_QStringConverterBase) - ret := newQStringDecoder(outptr_QStringDecoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret := newQStringDecoder(C.QStringDecoder_new3(name_Cstring)) ret.isSubclass = true return ret } // NewQStringDecoder4 constructs a new QStringDecoder object. func NewQStringDecoder4(encoding QStringConverter__Encoding, flags QStringConverterBase__Flag) *QStringDecoder { - var outptr_QStringDecoder *C.QStringDecoder = nil - var outptr_QStringConverter *C.QStringConverter = nil - var outptr_QStringConverterBase *C.QStringConverterBase = nil - C.QStringDecoder_new4((C.int)(encoding), (C.int)(flags), &outptr_QStringDecoder, &outptr_QStringConverter, &outptr_QStringConverterBase) - ret := newQStringDecoder(outptr_QStringDecoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret := newQStringDecoder(C.QStringDecoder_new4((C.int)(encoding), (C.int)(flags))) ret.isSubclass = true return ret } @@ -227,12 +187,8 @@ func NewQStringDecoder4(encoding QStringConverter__Encoding, flags QStringConver func NewQStringDecoder5(name string, f QStringConverterBase__Flag) *QStringDecoder { name_Cstring := C.CString(name) defer C.free(unsafe.Pointer(name_Cstring)) - var outptr_QStringDecoder *C.QStringDecoder = nil - var outptr_QStringConverter *C.QStringConverter = nil - var outptr_QStringConverterBase *C.QStringConverterBase = nil - C.QStringDecoder_new5(name_Cstring, (C.int)(f), &outptr_QStringDecoder, &outptr_QStringConverter, &outptr_QStringConverterBase) - ret := newQStringDecoder(outptr_QStringDecoder, outptr_QStringConverter, outptr_QStringConverterBase) + ret := newQStringDecoder(C.QStringDecoder_new5(name_Cstring, (C.int)(f))) ret.isSubclass = true return ret } @@ -246,7 +202,7 @@ func (this *QStringDecoder) AppendToBuffer(out *QChar, ba QByteArrayView) *QChar } func QStringDecoder_DecoderForHtml(data QByteArrayView) *QStringDecoder { - _goptr := newQStringDecoder(C.QStringDecoder_DecoderForHtml(data.cPointer()), nil, nil) + _goptr := newQStringDecoder(C.QStringDecoder_DecoderForHtml(data.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/gen_qstringconverter.h b/qt6/gen_qstringconverter.h index 7d60d94d..8b1f5615 100644 --- a/qt6/gen_qstringconverter.h +++ b/qt6/gen_qstringconverter.h @@ -30,19 +30,21 @@ typedef struct QStringDecoder QStringDecoder; typedef struct QStringEncoder QStringEncoder; #endif -void QStringEncoder_new(QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); -void QStringEncoder_new2(int encoding, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); -void QStringEncoder_new3(const char* name, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); -void QStringEncoder_new4(int encoding, int flags, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); -void QStringEncoder_new5(const char* name, int flags, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); +QStringEncoder* QStringEncoder_new(); +QStringEncoder* QStringEncoder_new2(int encoding); +QStringEncoder* QStringEncoder_new3(const char* name); +QStringEncoder* QStringEncoder_new4(int encoding, int flags); +QStringEncoder* QStringEncoder_new5(const char* name, int flags); +void QStringEncoder_virtbase(QStringEncoder* src, QStringConverter** outptr_QStringConverter); ptrdiff_t QStringEncoder_RequiredSpace(const QStringEncoder* self, ptrdiff_t inputLength); void QStringEncoder_Delete(QStringEncoder* self, bool isSubclass); -void QStringDecoder_new(int encoding, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); -void QStringDecoder_new2(QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); -void QStringDecoder_new3(const char* name, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); -void QStringDecoder_new4(int encoding, int flags, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); -void QStringDecoder_new5(const char* name, int f, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase); +QStringDecoder* QStringDecoder_new(int encoding); +QStringDecoder* QStringDecoder_new2(); +QStringDecoder* QStringDecoder_new3(const char* name); +QStringDecoder* QStringDecoder_new4(int encoding, int flags); +QStringDecoder* QStringDecoder_new5(const char* name, int f); +void QStringDecoder_virtbase(QStringDecoder* src, QStringConverter** outptr_QStringConverter); ptrdiff_t QStringDecoder_RequiredSpace(const QStringDecoder* self, ptrdiff_t inputLength); QChar* QStringDecoder_AppendToBuffer(QStringDecoder* self, QChar* out, QByteArrayView* ba); QStringDecoder* QStringDecoder_DecoderForHtml(QByteArrayView* data); diff --git a/qt6/gen_qstringconverter_base.cpp b/qt6/gen_qstringconverter_base.cpp index 3ad5ae14..c90ce88c 100644 --- a/qt6/gen_qstringconverter_base.cpp +++ b/qt6/gen_qstringconverter_base.cpp @@ -5,14 +5,16 @@ #include "gen_qstringconverter_base.h" #include "_cgo_export.h" -void QStringConverterBase_new(QStringConverterBase* param1, QStringConverterBase** outptr_QStringConverterBase) { - QStringConverterBase* ret = new QStringConverterBase(*param1); - *outptr_QStringConverterBase = ret; +QStringConverterBase* QStringConverterBase_new(QStringConverterBase* param1) { + return new QStringConverterBase(*param1); } -void QStringConverterBase_new2(QStringConverterBase** outptr_QStringConverterBase) { - QStringConverterBase* ret = new QStringConverterBase(); - *outptr_QStringConverterBase = ret; +QStringConverterBase* QStringConverterBase_new2() { + return new QStringConverterBase(); +} + +void QStringConverter_virtbase(QStringConverter* src, QStringConverterBase** outptr_QStringConverterBase) { + *outptr_QStringConverterBase = static_cast(src); } bool QStringConverter_IsValid(const QStringConverter* self) { @@ -35,14 +37,12 @@ const char* QStringConverter_NameForEncoding(int e) { return (const char*) QStringConverter::nameForEncoding(static_cast(e)); } -void QStringConverterBase__State_new(QStringConverterBase__State** outptr_QStringConverterBase__State) { - QStringConverterBase::State* ret = new QStringConverterBase::State(); - *outptr_QStringConverterBase__State = ret; +QStringConverterBase__State* QStringConverterBase__State_new() { + return new QStringConverterBase::State(); } -void QStringConverterBase__State_new2(int f, QStringConverterBase__State** outptr_QStringConverterBase__State) { - QStringConverterBase::State* ret = new QStringConverterBase::State(static_cast(f)); - *outptr_QStringConverterBase__State = ret; +QStringConverterBase__State* QStringConverterBase__State_new2(int f) { + return new QStringConverterBase::State(static_cast(f)); } void QStringConverterBase__State_Clear(QStringConverterBase__State* self) { diff --git a/qt6/gen_qstringconverter_base.go b/qt6/gen_qstringconverter_base.go index 5a4008eb..69f36062 100644 --- a/qt6/gen_qstringconverter_base.go +++ b/qt6/gen_qstringconverter_base.go @@ -63,34 +63,27 @@ func newQStringConverterBase(h *C.QStringConverterBase) *QStringConverterBase { if h == nil { return nil } + return &QStringConverterBase{h: h} } // UnsafeNewQStringConverterBase constructs the type using only unsafe pointers. func UnsafeNewQStringConverterBase(h unsafe.Pointer) *QStringConverterBase { - if h == nil { - return nil - } - - return &QStringConverterBase{h: (*C.QStringConverterBase)(h)} + return newQStringConverterBase((*C.QStringConverterBase)(h)) } // NewQStringConverterBase constructs a new QStringConverterBase object. func NewQStringConverterBase(param1 *QStringConverterBase) *QStringConverterBase { - var outptr_QStringConverterBase *C.QStringConverterBase = nil - C.QStringConverterBase_new(param1.cPointer(), &outptr_QStringConverterBase) - ret := newQStringConverterBase(outptr_QStringConverterBase) + ret := newQStringConverterBase(C.QStringConverterBase_new(param1.cPointer())) ret.isSubclass = true return ret } // NewQStringConverterBase2 constructs a new QStringConverterBase object. func NewQStringConverterBase2() *QStringConverterBase { - var outptr_QStringConverterBase *C.QStringConverterBase = nil - C.QStringConverterBase_new2(&outptr_QStringConverterBase) - ret := newQStringConverterBase(outptr_QStringConverterBase) + ret := newQStringConverterBase(C.QStringConverterBase_new2()) ret.isSubclass = true return ret } @@ -116,22 +109,20 @@ func (this *QStringConverter) UnsafePointer() unsafe.Pointer { } // newQStringConverter constructs the type using only CGO pointers. -func newQStringConverter(h *C.QStringConverter, h_QStringConverterBase *C.QStringConverterBase) *QStringConverter { +func newQStringConverter(h *C.QStringConverter) *QStringConverter { if h == nil { return nil } + var outptr_QStringConverterBase *C.QStringConverterBase = nil + C.QStringConverter_virtbase(h, &outptr_QStringConverterBase) + return &QStringConverter{h: h, - QStringConverterBase: newQStringConverterBase(h_QStringConverterBase)} + QStringConverterBase: newQStringConverterBase(outptr_QStringConverterBase)} } // UnsafeNewQStringConverter constructs the type using only unsafe pointers. -func UnsafeNewQStringConverter(h unsafe.Pointer, h_QStringConverterBase unsafe.Pointer) *QStringConverter { - if h == nil { - return nil - } - - return &QStringConverter{h: (*C.QStringConverter)(h), - QStringConverterBase: UnsafeNewQStringConverterBase(h_QStringConverterBase)} +func UnsafeNewQStringConverter(h unsafe.Pointer) *QStringConverter { + return newQStringConverter((*C.QStringConverter)(h)) } func (this *QStringConverter) IsValid() bool { @@ -180,34 +171,27 @@ func newQStringConverterBase__State(h *C.QStringConverterBase__State) *QStringCo if h == nil { return nil } + return &QStringConverterBase__State{h: h} } // UnsafeNewQStringConverterBase__State constructs the type using only unsafe pointers. func UnsafeNewQStringConverterBase__State(h unsafe.Pointer) *QStringConverterBase__State { - if h == nil { - return nil - } - - return &QStringConverterBase__State{h: (*C.QStringConverterBase__State)(h)} + return newQStringConverterBase__State((*C.QStringConverterBase__State)(h)) } // NewQStringConverterBase__State constructs a new QStringConverterBase::State object. func NewQStringConverterBase__State() *QStringConverterBase__State { - var outptr_QStringConverterBase__State *C.QStringConverterBase__State = nil - C.QStringConverterBase__State_new(&outptr_QStringConverterBase__State) - ret := newQStringConverterBase__State(outptr_QStringConverterBase__State) + ret := newQStringConverterBase__State(C.QStringConverterBase__State_new()) ret.isSubclass = true return ret } // NewQStringConverterBase__State2 constructs a new QStringConverterBase::State object. func NewQStringConverterBase__State2(f QStringConverterBase__Flag) *QStringConverterBase__State { - var outptr_QStringConverterBase__State *C.QStringConverterBase__State = nil - C.QStringConverterBase__State_new2((C.int)(f), &outptr_QStringConverterBase__State) - ret := newQStringConverterBase__State(outptr_QStringConverterBase__State) + ret := newQStringConverterBase__State(C.QStringConverterBase__State_new2((C.int)(f))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qstringconverter_base.h b/qt6/gen_qstringconverter_base.h index f6737a61..65973e17 100644 --- a/qt6/gen_qstringconverter_base.h +++ b/qt6/gen_qstringconverter_base.h @@ -28,17 +28,18 @@ typedef struct QStringConverterBase QStringConverterBase; typedef struct QStringConverterBase__State QStringConverterBase__State; #endif -void QStringConverterBase_new(QStringConverterBase* param1, QStringConverterBase** outptr_QStringConverterBase); -void QStringConverterBase_new2(QStringConverterBase** outptr_QStringConverterBase); +QStringConverterBase* QStringConverterBase_new(QStringConverterBase* param1); +QStringConverterBase* QStringConverterBase_new2(); +void QStringConverter_virtbase(QStringConverter* src, QStringConverterBase** outptr_QStringConverterBase); bool QStringConverter_IsValid(const QStringConverter* self); void QStringConverter_ResetState(QStringConverter* self); bool QStringConverter_HasError(const QStringConverter* self); const char* QStringConverter_Name(const QStringConverter* self); const char* QStringConverter_NameForEncoding(int e); -void QStringConverterBase__State_new(QStringConverterBase__State** outptr_QStringConverterBase__State); -void QStringConverterBase__State_new2(int f, QStringConverterBase__State** outptr_QStringConverterBase__State); +QStringConverterBase__State* QStringConverterBase__State_new(); +QStringConverterBase__State* QStringConverterBase__State_new2(int f); void QStringConverterBase__State_Clear(QStringConverterBase__State* self); void QStringConverterBase__State_Reset(QStringConverterBase__State* self); void QStringConverterBase__State_Delete(QStringConverterBase__State* self, bool isSubclass); diff --git a/qt6/gen_qstringlistmodel.cpp b/qt6/gen_qstringlistmodel.cpp index 677c5dc2..27d820c0 100644 --- a/qt6/gen_qstringlistmodel.cpp +++ b/qt6/gen_qstringlistmodel.cpp @@ -467,15 +467,11 @@ public: }; -void QStringListModel_new(QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(); - *outptr_QStringListModel = ret; - *outptr_QAbstractListModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStringListModel* QStringListModel_new() { + return new MiqtVirtualQStringListModel(); } -void QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { +QStringListModel* QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -483,22 +479,14 @@ void QStringListModel_new2(struct miqt_array /* of struct miqt_string */ string QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(strings_QList); - *outptr_QStringListModel = ret; - *outptr_QAbstractListModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQStringListModel(strings_QList); } -void QStringListModel_new3(QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(parent); - *outptr_QStringListModel = ret; - *outptr_QAbstractListModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStringListModel* QStringListModel_new3(QObject* parent) { + return new MiqtVirtualQStringListModel(parent); } -void QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { +QStringListModel* QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -506,11 +494,11 @@ void QStringListModel_new4(struct miqt_array /* of struct miqt_string */ string QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQStringListModel* ret = new MiqtVirtualQStringListModel(strings_QList, parent); - *outptr_QStringListModel = ret; - *outptr_QAbstractListModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQStringListModel(strings_QList, parent); +} + +void QStringListModel_virtbase(QStringListModel* src, QAbstractListModel** outptr_QAbstractListModel) { + *outptr_QAbstractListModel = static_cast(src); } QMetaObject* QStringListModel_MetaObject(const QStringListModel* self) { diff --git a/qt6/gen_qstringlistmodel.go b/qt6/gen_qstringlistmodel.go index 59000220..b3aeba20 100644 --- a/qt6/gen_qstringlistmodel.go +++ b/qt6/gen_qstringlistmodel.go @@ -35,33 +35,26 @@ func (this *QStringListModel) UnsafePointer() unsafe.Pointer { } // newQStringListModel constructs the type using only CGO pointers. -func newQStringListModel(h *C.QStringListModel, h_QAbstractListModel *C.QAbstractListModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QStringListModel { +func newQStringListModel(h *C.QStringListModel) *QStringListModel { if h == nil { return nil } + var outptr_QAbstractListModel *C.QAbstractListModel = nil + C.QStringListModel_virtbase(h, &outptr_QAbstractListModel) + return &QStringListModel{h: h, - QAbstractListModel: newQAbstractListModel(h_QAbstractListModel, h_QAbstractItemModel, h_QObject)} + QAbstractListModel: newQAbstractListModel(outptr_QAbstractListModel)} } // UnsafeNewQStringListModel constructs the type using only unsafe pointers. -func UnsafeNewQStringListModel(h unsafe.Pointer, h_QAbstractListModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QStringListModel { - if h == nil { - return nil - } - - return &QStringListModel{h: (*C.QStringListModel)(h), - QAbstractListModel: UnsafeNewQAbstractListModel(h_QAbstractListModel, h_QAbstractItemModel, h_QObject)} +func UnsafeNewQStringListModel(h unsafe.Pointer) *QStringListModel { + return newQStringListModel((*C.QStringListModel)(h)) } // NewQStringListModel constructs a new QStringListModel object. func NewQStringListModel() *QStringListModel { - var outptr_QStringListModel *C.QStringListModel = nil - var outptr_QAbstractListModel *C.QAbstractListModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStringListModel_new(&outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStringListModel(C.QStringListModel_new()) ret.isSubclass = true return ret } @@ -78,26 +71,16 @@ func NewQStringListModel2(strings []string) *QStringListModel { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QStringListModel *C.QStringListModel = nil - var outptr_QAbstractListModel *C.QAbstractListModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStringListModel_new2(strings_ma, &outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStringListModel(C.QStringListModel_new2(strings_ma)) ret.isSubclass = true return ret } // NewQStringListModel3 constructs a new QStringListModel object. func NewQStringListModel3(parent *QObject) *QStringListModel { - var outptr_QStringListModel *C.QStringListModel = nil - var outptr_QAbstractListModel *C.QAbstractListModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStringListModel_new3(parent.cPointer(), &outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStringListModel(C.QStringListModel_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -114,13 +97,8 @@ func NewQStringListModel4(strings []string, parent *QObject) *QStringListModel { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QStringListModel *C.QStringListModel = nil - var outptr_QAbstractListModel *C.QAbstractListModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QStringListModel_new4(strings_ma, parent.cPointer(), &outptr_QStringListModel, &outptr_QAbstractListModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQStringListModel(outptr_QStringListModel, outptr_QAbstractListModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQStringListModel(C.QStringListModel_new4(strings_ma, parent.cPointer())) ret.isSubclass = true return ret } @@ -780,7 +758,7 @@ func miqt_exec_callback_QStringListModel_DropMimeData(self *C.QStringListModel, } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt6/gen_qstringlistmodel.h b/qt6/gen_qstringlistmodel.h index 42e9429e..49c6d7bb 100644 --- a/qt6/gen_qstringlistmodel.h +++ b/qt6/gen_qstringlistmodel.h @@ -34,10 +34,11 @@ typedef struct QStringListModel QStringListModel; typedef struct QVariant QVariant; #endif -void QStringListModel_new(QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QStringListModel_new3(QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent, QStringListModel** outptr_QStringListModel, QAbstractListModel** outptr_QAbstractListModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QStringListModel* QStringListModel_new(); +QStringListModel* QStringListModel_new2(struct miqt_array /* of struct miqt_string */ strings); +QStringListModel* QStringListModel_new3(QObject* parent); +QStringListModel* QStringListModel_new4(struct miqt_array /* of struct miqt_string */ strings, QObject* parent); +void QStringListModel_virtbase(QStringListModel* src, QAbstractListModel** outptr_QAbstractListModel); QMetaObject* QStringListModel_MetaObject(const QStringListModel* self); void* QStringListModel_Metacast(QStringListModel* self, const char* param1); struct miqt_string QStringListModel_Tr(const char* s); diff --git a/qt6/gen_qstringmatcher.cpp b/qt6/gen_qstringmatcher.cpp index e9a5611e..1d91f085 100644 --- a/qt6/gen_qstringmatcher.cpp +++ b/qt6/gen_qstringmatcher.cpp @@ -7,36 +7,30 @@ #include "gen_qstringmatcher.h" #include "_cgo_export.h" -void QStringMatcher_new(QStringMatcher** outptr_QStringMatcher) { - QStringMatcher* ret = new QStringMatcher(); - *outptr_QStringMatcher = ret; +QStringMatcher* QStringMatcher_new() { + return new QStringMatcher(); } -void QStringMatcher_new2(struct miqt_string pattern, QStringMatcher** outptr_QStringMatcher) { +QStringMatcher* QStringMatcher_new2(struct miqt_string pattern) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - QStringMatcher* ret = new QStringMatcher(pattern_QString); - *outptr_QStringMatcher = ret; + return new QStringMatcher(pattern_QString); } -void QStringMatcher_new3(QChar* uc, ptrdiff_t lenVal, QStringMatcher** outptr_QStringMatcher) { - QStringMatcher* ret = new QStringMatcher(uc, (qsizetype)(lenVal)); - *outptr_QStringMatcher = ret; +QStringMatcher* QStringMatcher_new3(QChar* uc, ptrdiff_t lenVal) { + return new QStringMatcher(uc, (qsizetype)(lenVal)); } -void QStringMatcher_new4(QStringMatcher* other, QStringMatcher** outptr_QStringMatcher) { - QStringMatcher* ret = new QStringMatcher(*other); - *outptr_QStringMatcher = ret; +QStringMatcher* QStringMatcher_new4(QStringMatcher* other) { + return new QStringMatcher(*other); } -void QStringMatcher_new5(struct miqt_string pattern, int cs, QStringMatcher** outptr_QStringMatcher) { +QStringMatcher* QStringMatcher_new5(struct miqt_string pattern, int cs) { QString pattern_QString = QString::fromUtf8(pattern.data, pattern.len); - QStringMatcher* ret = new QStringMatcher(pattern_QString, static_cast(cs)); - *outptr_QStringMatcher = ret; + return new QStringMatcher(pattern_QString, static_cast(cs)); } -void QStringMatcher_new6(QChar* uc, ptrdiff_t lenVal, int cs, QStringMatcher** outptr_QStringMatcher) { - QStringMatcher* ret = new QStringMatcher(uc, (qsizetype)(lenVal), static_cast(cs)); - *outptr_QStringMatcher = ret; +QStringMatcher* QStringMatcher_new6(QChar* uc, ptrdiff_t lenVal, int cs) { + return new QStringMatcher(uc, (qsizetype)(lenVal), static_cast(cs)); } void QStringMatcher_OperatorAssign(QStringMatcher* self, QStringMatcher* other) { diff --git a/qt6/gen_qstringmatcher.go b/qt6/gen_qstringmatcher.go index 11075109..62532e66 100644 --- a/qt6/gen_qstringmatcher.go +++ b/qt6/gen_qstringmatcher.go @@ -37,24 +37,19 @@ func newQStringMatcher(h *C.QStringMatcher) *QStringMatcher { if h == nil { return nil } + return &QStringMatcher{h: h} } // UnsafeNewQStringMatcher constructs the type using only unsafe pointers. func UnsafeNewQStringMatcher(h unsafe.Pointer) *QStringMatcher { - if h == nil { - return nil - } - - return &QStringMatcher{h: (*C.QStringMatcher)(h)} + return newQStringMatcher((*C.QStringMatcher)(h)) } // NewQStringMatcher constructs a new QStringMatcher object. func NewQStringMatcher() *QStringMatcher { - var outptr_QStringMatcher *C.QStringMatcher = nil - C.QStringMatcher_new(&outptr_QStringMatcher) - ret := newQStringMatcher(outptr_QStringMatcher) + ret := newQStringMatcher(C.QStringMatcher_new()) ret.isSubclass = true return ret } @@ -65,30 +60,24 @@ func NewQStringMatcher2(pattern string) *QStringMatcher { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - var outptr_QStringMatcher *C.QStringMatcher = nil - C.QStringMatcher_new2(pattern_ms, &outptr_QStringMatcher) - ret := newQStringMatcher(outptr_QStringMatcher) + ret := newQStringMatcher(C.QStringMatcher_new2(pattern_ms)) ret.isSubclass = true return ret } // NewQStringMatcher3 constructs a new QStringMatcher object. func NewQStringMatcher3(uc *QChar, lenVal int64) *QStringMatcher { - var outptr_QStringMatcher *C.QStringMatcher = nil - C.QStringMatcher_new3(uc.cPointer(), (C.ptrdiff_t)(lenVal), &outptr_QStringMatcher) - ret := newQStringMatcher(outptr_QStringMatcher) + ret := newQStringMatcher(C.QStringMatcher_new3(uc.cPointer(), (C.ptrdiff_t)(lenVal))) ret.isSubclass = true return ret } // NewQStringMatcher4 constructs a new QStringMatcher object. func NewQStringMatcher4(other *QStringMatcher) *QStringMatcher { - var outptr_QStringMatcher *C.QStringMatcher = nil - C.QStringMatcher_new4(other.cPointer(), &outptr_QStringMatcher) - ret := newQStringMatcher(outptr_QStringMatcher) + ret := newQStringMatcher(C.QStringMatcher_new4(other.cPointer())) ret.isSubclass = true return ret } @@ -99,20 +88,16 @@ func NewQStringMatcher5(pattern string, cs CaseSensitivity) *QStringMatcher { pattern_ms.data = C.CString(pattern) pattern_ms.len = C.size_t(len(pattern)) defer C.free(unsafe.Pointer(pattern_ms.data)) - var outptr_QStringMatcher *C.QStringMatcher = nil - C.QStringMatcher_new5(pattern_ms, (C.int)(cs), &outptr_QStringMatcher) - ret := newQStringMatcher(outptr_QStringMatcher) + ret := newQStringMatcher(C.QStringMatcher_new5(pattern_ms, (C.int)(cs))) ret.isSubclass = true return ret } // NewQStringMatcher6 constructs a new QStringMatcher object. func NewQStringMatcher6(uc *QChar, lenVal int64, cs CaseSensitivity) *QStringMatcher { - var outptr_QStringMatcher *C.QStringMatcher = nil - C.QStringMatcher_new6(uc.cPointer(), (C.ptrdiff_t)(lenVal), (C.int)(cs), &outptr_QStringMatcher) - ret := newQStringMatcher(outptr_QStringMatcher) + ret := newQStringMatcher(C.QStringMatcher_new6(uc.cPointer(), (C.ptrdiff_t)(lenVal), (C.int)(cs))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qstringmatcher.h b/qt6/gen_qstringmatcher.h index d84b835e..9eea7c02 100644 --- a/qt6/gen_qstringmatcher.h +++ b/qt6/gen_qstringmatcher.h @@ -22,12 +22,12 @@ typedef struct QChar QChar; typedef struct QStringMatcher QStringMatcher; #endif -void QStringMatcher_new(QStringMatcher** outptr_QStringMatcher); -void QStringMatcher_new2(struct miqt_string pattern, QStringMatcher** outptr_QStringMatcher); -void QStringMatcher_new3(QChar* uc, ptrdiff_t lenVal, QStringMatcher** outptr_QStringMatcher); -void QStringMatcher_new4(QStringMatcher* other, QStringMatcher** outptr_QStringMatcher); -void QStringMatcher_new5(struct miqt_string pattern, int cs, QStringMatcher** outptr_QStringMatcher); -void QStringMatcher_new6(QChar* uc, ptrdiff_t lenVal, int cs, QStringMatcher** outptr_QStringMatcher); +QStringMatcher* QStringMatcher_new(); +QStringMatcher* QStringMatcher_new2(struct miqt_string pattern); +QStringMatcher* QStringMatcher_new3(QChar* uc, ptrdiff_t lenVal); +QStringMatcher* QStringMatcher_new4(QStringMatcher* other); +QStringMatcher* QStringMatcher_new5(struct miqt_string pattern, int cs); +QStringMatcher* QStringMatcher_new6(QChar* uc, ptrdiff_t lenVal, int cs); void QStringMatcher_OperatorAssign(QStringMatcher* self, QStringMatcher* other); void QStringMatcher_SetPattern(QStringMatcher* self, struct miqt_string pattern); void QStringMatcher_SetCaseSensitivity(QStringMatcher* self, int cs); diff --git a/qt6/gen_qstringtokenizer.cpp b/qt6/gen_qstringtokenizer.cpp index 3934bdea..8b9f345d 100644 --- a/qt6/gen_qstringtokenizer.cpp +++ b/qt6/gen_qstringtokenizer.cpp @@ -3,8 +3,7 @@ #include "gen_qstringtokenizer.h" #include "_cgo_export.h" -void QStringTokenizerBaseBase_new(QStringTokenizerBaseBase* param1, QStringTokenizerBaseBase** outptr_QStringTokenizerBaseBase) { - QStringTokenizerBaseBase* ret = new QStringTokenizerBaseBase(*param1); - *outptr_QStringTokenizerBaseBase = ret; +QStringTokenizerBaseBase* QStringTokenizerBaseBase_new(QStringTokenizerBaseBase* param1) { + return new QStringTokenizerBaseBase(*param1); } diff --git a/qt6/gen_qstringtokenizer.go b/qt6/gen_qstringtokenizer.go index 98201c63..eb28e05b 100644 --- a/qt6/gen_qstringtokenizer.go +++ b/qt6/gen_qstringtokenizer.go @@ -36,24 +36,19 @@ func newQStringTokenizerBaseBase(h *C.QStringTokenizerBaseBase) *QStringTokenize if h == nil { return nil } + return &QStringTokenizerBaseBase{h: h} } // UnsafeNewQStringTokenizerBaseBase constructs the type using only unsafe pointers. func UnsafeNewQStringTokenizerBaseBase(h unsafe.Pointer) *QStringTokenizerBaseBase { - if h == nil { - return nil - } - - return &QStringTokenizerBaseBase{h: (*C.QStringTokenizerBaseBase)(h)} + return newQStringTokenizerBaseBase((*C.QStringTokenizerBaseBase)(h)) } // NewQStringTokenizerBaseBase constructs a new QStringTokenizerBaseBase object. func NewQStringTokenizerBaseBase(param1 *QStringTokenizerBaseBase) *QStringTokenizerBaseBase { - var outptr_QStringTokenizerBaseBase *C.QStringTokenizerBaseBase = nil - C.QStringTokenizerBaseBase_new(param1.cPointer(), &outptr_QStringTokenizerBaseBase) - ret := newQStringTokenizerBaseBase(outptr_QStringTokenizerBaseBase) + ret := newQStringTokenizerBaseBase(C.QStringTokenizerBaseBase_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qstringtokenizer.h b/qt6/gen_qstringtokenizer.h index a4ca6509..de175df9 100644 --- a/qt6/gen_qstringtokenizer.h +++ b/qt6/gen_qstringtokenizer.h @@ -20,7 +20,7 @@ class QStringTokenizerBaseBase; typedef struct QStringTokenizerBaseBase QStringTokenizerBaseBase; #endif -void QStringTokenizerBaseBase_new(QStringTokenizerBaseBase* param1, QStringTokenizerBaseBase** outptr_QStringTokenizerBaseBase); +QStringTokenizerBaseBase* QStringTokenizerBaseBase_new(QStringTokenizerBaseBase* param1); #ifdef __cplusplus } /* extern C */ diff --git a/qt6/gen_qstringview.cpp b/qt6/gen_qstringview.cpp index 9411bb02..969c893e 100644 --- a/qt6/gen_qstringview.cpp +++ b/qt6/gen_qstringview.cpp @@ -11,9 +11,8 @@ #include "gen_qstringview.h" #include "_cgo_export.h" -void QStringView_new(QStringView** outptr_QStringView) { - QStringView* ret = new QStringView(); - *outptr_QStringView = ret; +QStringView* QStringView_new() { + return new QStringView(); } struct miqt_string QStringView_ToString(const QStringView* self) { diff --git a/qt6/gen_qstringview.go b/qt6/gen_qstringview.go index 9e23897f..ea2a607a 100644 --- a/qt6/gen_qstringview.go +++ b/qt6/gen_qstringview.go @@ -37,24 +37,19 @@ func newQStringView(h *C.QStringView) *QStringView { if h == nil { return nil } + return &QStringView{h: h} } // UnsafeNewQStringView constructs the type using only unsafe pointers. func UnsafeNewQStringView(h unsafe.Pointer) *QStringView { - if h == nil { - return nil - } - - return &QStringView{h: (*C.QStringView)(h)} + return newQStringView((*C.QStringView)(h)) } // NewQStringView constructs a new QStringView object. func NewQStringView() *QStringView { - var outptr_QStringView *C.QStringView = nil - C.QStringView_new(&outptr_QStringView) - ret := newQStringView(outptr_QStringView) + ret := newQStringView(C.QStringView_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qstringview.h b/qt6/gen_qstringview.h index 0ad40401..f472fc7d 100644 --- a/qt6/gen_qstringview.h +++ b/qt6/gen_qstringview.h @@ -26,7 +26,7 @@ typedef struct QRegularExpressionMatch QRegularExpressionMatch; typedef struct QStringView QStringView; #endif -void QStringView_new(QStringView** outptr_QStringView); +QStringView* QStringView_new(); struct miqt_string QStringView_ToString(const QStringView* self); ptrdiff_t QStringView_Size(const QStringView* self); QChar* QStringView_Data(const QStringView* self); diff --git a/qt6/gen_qstyle.cpp b/qt6/gen_qstyle.cpp index d2d44a15..a76f2b8d 100644 --- a/qt6/gen_qstyle.cpp +++ b/qt6/gen_qstyle.cpp @@ -756,10 +756,12 @@ public: }; -void QStyle_new(QStyle** outptr_QStyle, QObject** outptr_QObject) { - MiqtVirtualQStyle* ret = new MiqtVirtualQStyle(); - *outptr_QStyle = ret; - *outptr_QObject = static_cast(ret); +QStyle* QStyle_new() { + return new MiqtVirtualQStyle(); +} + +void QStyle_virtbase(QStyle* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QStyle_MetaObject(const QStyle* self) { diff --git a/qt6/gen_qstyle.go b/qt6/gen_qstyle.go index a4940c41..95461fc3 100644 --- a/qt6/gen_qstyle.go +++ b/qt6/gen_qstyle.go @@ -654,31 +654,26 @@ func (this *QStyle) UnsafePointer() unsafe.Pointer { } // newQStyle constructs the type using only CGO pointers. -func newQStyle(h *C.QStyle, h_QObject *C.QObject) *QStyle { +func newQStyle(h *C.QStyle) *QStyle { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QStyle_virtbase(h, &outptr_QObject) + return &QStyle{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQStyle constructs the type using only unsafe pointers. -func UnsafeNewQStyle(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStyle { - if h == nil { - return nil - } - - return &QStyle{h: (*C.QStyle)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQStyle(h unsafe.Pointer) *QStyle { + return newQStyle((*C.QStyle)(h)) } // NewQStyle constructs a new QStyle object. func NewQStyle() *QStyle { - var outptr_QStyle *C.QStyle = nil - var outptr_QObject *C.QObject = nil - C.QStyle_new(&outptr_QStyle, &outptr_QObject) - ret := newQStyle(outptr_QStyle, outptr_QObject) + ret := newQStyle(C.QStyle_new()) ret.isSubclass = true return ret } @@ -806,7 +801,7 @@ func (this *QStyle) StyleHint(stylehint QStyle__StyleHint, opt *QStyleOption, wi } func (this *QStyle) StandardPixmap(standardPixmap QStyle__StandardPixmap, opt *QStyleOption, widget *QWidget) *QPixmap { - _goptr := newQPixmap(C.QStyle_StandardPixmap(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer()), nil) + _goptr := newQPixmap(C.QStyle_StandardPixmap(this.h, (C.int)(standardPixmap), opt.cPointer(), widget.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -818,7 +813,7 @@ func (this *QStyle) StandardIcon(standardIcon QStyle__StandardPixmap, option *QS } func (this *QStyle) GeneratedIconPixmap(iconMode QIcon__Mode, pixmap *QPixmap, opt *QStyleOption) *QPixmap { - _goptr := newQPixmap(C.QStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer()), nil) + _goptr := newQPixmap(C.QStyle_GeneratedIconPixmap(this.h, (C.int)(iconMode), pixmap.cPointer(), opt.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -862,7 +857,7 @@ func (this *QStyle) CombinedLayoutSpacing(controls1 QSizePolicy__ControlType, co } func (this *QStyle) Proxy() *QStyle { - return newQStyle(C.QStyle_Proxy(this.h), nil) + return newQStyle(C.QStyle_Proxy(this.h)) } func QStyle_Tr2(s string, c string) string { @@ -923,7 +918,7 @@ func miqt_exec_callback_QStyle_Polish(self *C.QStyle, cb C.intptr_t, widget *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QStyle{h: self}).callVirtualBase_Polish, slotval1) @@ -949,7 +944,7 @@ func miqt_exec_callback_QStyle_Unpolish(self *C.QStyle, cb C.intptr_t, widget *C } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QStyle{h: self}).callVirtualBase_Unpolish, slotval1) @@ -975,7 +970,7 @@ func miqt_exec_callback_QStyle_PolishWithApplication(self *C.QStyle, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQApplication(application, nil, nil, nil) + slotval1 := newQApplication(application) gofunc((&QStyle{h: self}).callVirtualBase_PolishWithApplication, slotval1) @@ -1001,7 +996,7 @@ func miqt_exec_callback_QStyle_UnpolishWithApplication(self *C.QStyle, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQApplication(application, nil, nil, nil) + slotval1 := newQApplication(application) gofunc((&QStyle{h: self}).callVirtualBase_UnpolishWithApplication, slotval1) @@ -1104,7 +1099,7 @@ func miqt_exec_callback_QStyle_ItemPixmapRect(self *C.QStyle, cb C.intptr_t, r * slotval2 := (int)(flags) - slotval3 := newQPixmap(pixmap, nil) + slotval3 := newQPixmap(pixmap) virtualReturn := gofunc((&QStyle{h: self}).callVirtualBase_ItemPixmapRect, slotval1, slotval2, slotval3) @@ -1182,7 +1177,7 @@ func miqt_exec_callback_QStyle_DrawItemPixmap(self *C.QStyle, cb C.intptr_t, pai slotval3 := (int)(alignment) - slotval4 := newQPixmap(pixmap, nil) + slotval4 := newQPixmap(pixmap) gofunc((&QStyle{h: self}).callVirtualBase_DrawItemPixmap, slotval1, slotval2, slotval3, slotval4) @@ -1235,7 +1230,7 @@ func miqt_exec_callback_QStyle_DrawPrimitive(self *C.QStyle, cb C.intptr_t, pe C slotval3 := newQPainter(p) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) gofunc(slotval1, slotval2, slotval3, slotval4) @@ -1261,7 +1256,7 @@ func miqt_exec_callback_QStyle_DrawControl(self *C.QStyle, cb C.intptr_t, elemen slotval3 := newQPainter(p) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) gofunc(slotval1, slotval2, slotval3, slotval4) @@ -1285,7 +1280,7 @@ func miqt_exec_callback_QStyle_SubElementRect(self *C.QStyle, cb C.intptr_t, sub slotval2 := newQStyleOption(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc(slotval1, slotval2, slotval3) @@ -1309,11 +1304,11 @@ func miqt_exec_callback_QStyle_DrawComplexControl(self *C.QStyle, cb C.intptr_t, // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(cc) - slotval2 := newQStyleOptionComplex(opt, nil) + slotval2 := newQStyleOptionComplex(opt) slotval3 := newQPainter(p) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) gofunc(slotval1, slotval2, slotval3, slotval4) @@ -1335,11 +1330,11 @@ func miqt_exec_callback_QStyle_HitTestComplexControl(self *C.QStyle, cb C.intptr // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(cc) - slotval2 := newQStyleOptionComplex(opt, nil) + slotval2 := newQStyleOptionComplex(opt) slotval3 := newQPoint(pt) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4) @@ -1363,11 +1358,11 @@ func miqt_exec_callback_QStyle_SubControlRect(self *C.QStyle, cb C.intptr_t, cc // Convert all CABI parameters to Go parameters slotval1 := (QStyle__ComplexControl)(cc) - slotval2 := newQStyleOptionComplex(opt, nil) + slotval2 := newQStyleOptionComplex(opt) slotval3 := (QStyle__SubControl)(sc) - slotval4 := newQWidget(widget, nil, nil) + slotval4 := newQWidget(widget) virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4) @@ -1393,7 +1388,7 @@ func miqt_exec_callback_QStyle_PixelMetric(self *C.QStyle, cb C.intptr_t, metric slotval2 := newQStyleOption(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc(slotval1, slotval2, slotval3) @@ -1421,7 +1416,7 @@ func miqt_exec_callback_QStyle_SizeFromContents(self *C.QStyle, cb C.intptr_t, c slotval3 := newQSize(contentsSize) - slotval4 := newQWidget(w, nil, nil) + slotval4 := newQWidget(w) virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4) @@ -1447,7 +1442,7 @@ func miqt_exec_callback_QStyle_StyleHint(self *C.QStyle, cb C.intptr_t, stylehin slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) slotval4 := newQStyleHintReturn(returnData) @@ -1475,7 +1470,7 @@ func miqt_exec_callback_QStyle_StandardPixmap(self *C.QStyle, cb C.intptr_t, sta slotval2 := newQStyleOption(opt) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc(slotval1, slotval2, slotval3) @@ -1501,7 +1496,7 @@ func miqt_exec_callback_QStyle_StandardIcon(self *C.QStyle, cb C.intptr_t, stand slotval2 := newQStyleOption(option) - slotval3 := newQWidget(widget, nil, nil) + slotval3 := newQWidget(widget) virtualReturn := gofunc(slotval1, slotval2, slotval3) @@ -1525,7 +1520,7 @@ func miqt_exec_callback_QStyle_GeneratedIconPixmap(self *C.QStyle, cb C.intptr_t // Convert all CABI parameters to Go parameters slotval1 := (QIcon__Mode)(iconMode) - slotval2 := newQPixmap(pixmap, nil) + slotval2 := newQPixmap(pixmap) slotval3 := newQStyleOption(opt) @@ -1557,7 +1552,7 @@ func miqt_exec_callback_QStyle_LayoutSpacing(self *C.QStyle, cb C.intptr_t, cont slotval4 := newQStyleOption(option) - slotval5 := newQWidget(widget, nil, nil) + slotval5 := newQWidget(widget) virtualReturn := gofunc(slotval1, slotval2, slotval3, slotval4, slotval5) @@ -1643,7 +1638,7 @@ func miqt_exec_callback_QStyle_TimerEvent(self *C.QStyle, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QStyle{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1669,7 +1664,7 @@ func miqt_exec_callback_QStyle_ChildEvent(self *C.QStyle, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QStyle{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qstyle.h b/qt6/gen_qstyle.h index 8d306e2c..5ace58f2 100644 --- a/qt6/gen_qstyle.h +++ b/qt6/gen_qstyle.h @@ -58,7 +58,8 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWidget QWidget; #endif -void QStyle_new(QStyle** outptr_QStyle, QObject** outptr_QObject); +QStyle* QStyle_new(); +void QStyle_virtbase(QStyle* src, QObject** outptr_QObject); QMetaObject* QStyle_MetaObject(const QStyle* self); void* QStyle_Metacast(QStyle* self, const char* param1); struct miqt_string QStyle_Tr(const char* s); diff --git a/qt6/gen_qstyleditemdelegate.cpp b/qt6/gen_qstyleditemdelegate.cpp index f5edd177..e20c6246 100644 --- a/qt6/gen_qstyleditemdelegate.cpp +++ b/qt6/gen_qstyleditemdelegate.cpp @@ -415,18 +415,16 @@ public: }; -void QStyledItemDelegate_new(QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { - MiqtVirtualQStyledItemDelegate* ret = new MiqtVirtualQStyledItemDelegate(); - *outptr_QStyledItemDelegate = ret; - *outptr_QAbstractItemDelegate = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStyledItemDelegate* QStyledItemDelegate_new() { + return new MiqtVirtualQStyledItemDelegate(); } -void QStyledItemDelegate_new2(QObject* parent, QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject) { - MiqtVirtualQStyledItemDelegate* ret = new MiqtVirtualQStyledItemDelegate(parent); - *outptr_QStyledItemDelegate = ret; - *outptr_QAbstractItemDelegate = static_cast(ret); - *outptr_QObject = static_cast(ret); +QStyledItemDelegate* QStyledItemDelegate_new2(QObject* parent) { + return new MiqtVirtualQStyledItemDelegate(parent); +} + +void QStyledItemDelegate_virtbase(QStyledItemDelegate* src, QAbstractItemDelegate** outptr_QAbstractItemDelegate) { + *outptr_QAbstractItemDelegate = static_cast(src); } QMetaObject* QStyledItemDelegate_MetaObject(const QStyledItemDelegate* self) { diff --git a/qt6/gen_qstyleditemdelegate.go b/qt6/gen_qstyleditemdelegate.go index 73dc70b9..772bee3d 100644 --- a/qt6/gen_qstyleditemdelegate.go +++ b/qt6/gen_qstyleditemdelegate.go @@ -35,44 +35,34 @@ func (this *QStyledItemDelegate) UnsafePointer() unsafe.Pointer { } // newQStyledItemDelegate constructs the type using only CGO pointers. -func newQStyledItemDelegate(h *C.QStyledItemDelegate, h_QAbstractItemDelegate *C.QAbstractItemDelegate, h_QObject *C.QObject) *QStyledItemDelegate { +func newQStyledItemDelegate(h *C.QStyledItemDelegate) *QStyledItemDelegate { if h == nil { return nil } + var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil + C.QStyledItemDelegate_virtbase(h, &outptr_QAbstractItemDelegate) + return &QStyledItemDelegate{h: h, - QAbstractItemDelegate: newQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} + QAbstractItemDelegate: newQAbstractItemDelegate(outptr_QAbstractItemDelegate)} } // UnsafeNewQStyledItemDelegate constructs the type using only unsafe pointers. -func UnsafeNewQStyledItemDelegate(h unsafe.Pointer, h_QAbstractItemDelegate unsafe.Pointer, h_QObject unsafe.Pointer) *QStyledItemDelegate { - if h == nil { - return nil - } - - return &QStyledItemDelegate{h: (*C.QStyledItemDelegate)(h), - QAbstractItemDelegate: UnsafeNewQAbstractItemDelegate(h_QAbstractItemDelegate, h_QObject)} +func UnsafeNewQStyledItemDelegate(h unsafe.Pointer) *QStyledItemDelegate { + return newQStyledItemDelegate((*C.QStyledItemDelegate)(h)) } // NewQStyledItemDelegate constructs a new QStyledItemDelegate object. func NewQStyledItemDelegate() *QStyledItemDelegate { - var outptr_QStyledItemDelegate *C.QStyledItemDelegate = nil - var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil - var outptr_QObject *C.QObject = nil - C.QStyledItemDelegate_new(&outptr_QStyledItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) - ret := newQStyledItemDelegate(outptr_QStyledItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret := newQStyledItemDelegate(C.QStyledItemDelegate_new()) ret.isSubclass = true return ret } // NewQStyledItemDelegate2 constructs a new QStyledItemDelegate object. func NewQStyledItemDelegate2(parent *QObject) *QStyledItemDelegate { - var outptr_QStyledItemDelegate *C.QStyledItemDelegate = nil - var outptr_QAbstractItemDelegate *C.QAbstractItemDelegate = nil - var outptr_QObject *C.QObject = nil - C.QStyledItemDelegate_new2(parent.cPointer(), &outptr_QStyledItemDelegate, &outptr_QAbstractItemDelegate, &outptr_QObject) - ret := newQStyledItemDelegate(outptr_QStyledItemDelegate, outptr_QAbstractItemDelegate, outptr_QObject) + ret := newQStyledItemDelegate(C.QStyledItemDelegate_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -107,7 +97,7 @@ func (this *QStyledItemDelegate) SizeHint(option *QStyleOptionViewItem, index *Q } func (this *QStyledItemDelegate) CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return newQWidget(C.QStyledItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer()), nil, nil) + return newQWidget(C.QStyledItemDelegate_CreateEditor(this.h, parent.cPointer(), option.cPointer(), index.cPointer())) } func (this *QStyledItemDelegate) SetEditorData(editor *QWidget, index *QModelIndex) { @@ -181,7 +171,7 @@ func miqt_exec_callback_QStyledItemDelegate_Paint(self *C.QStyledItemDelegate, c // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -211,7 +201,7 @@ func miqt_exec_callback_QStyledItemDelegate_SizeHint(self *C.QStyledItemDelegate } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) slotval2 := newQModelIndex(index) @@ -223,7 +213,7 @@ func miqt_exec_callback_QStyledItemDelegate_SizeHint(self *C.QStyledItemDelegate func (this *QStyledItemDelegate) callVirtualBase_CreateEditor(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget { - return newQWidget(C.QStyledItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer()), nil, nil) + return newQWidget(C.QStyledItemDelegate_virtualbase_CreateEditor(unsafe.Pointer(this.h), parent.cPointer(), option.cPointer(), index.cPointer())) } func (this *QStyledItemDelegate) OnCreateEditor(slot func(super func(parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget, parent *QWidget, option *QStyleOptionViewItem, index *QModelIndex) *QWidget) { @@ -241,9 +231,9 @@ func miqt_exec_callback_QStyledItemDelegate_CreateEditor(self *C.QStyledItemDele } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(parent, nil, nil) + slotval1 := newQWidget(parent) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -273,7 +263,7 @@ func miqt_exec_callback_QStyledItemDelegate_SetEditorData(self *C.QStyledItemDel } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := newQModelIndex(index) @@ -301,9 +291,9 @@ func miqt_exec_callback_QStyledItemDelegate_SetModelData(self *C.QStyledItemDele } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) - slotval2 := newQAbstractItemModel(model, nil) + slotval2 := newQAbstractItemModel(model) slotval3 := newQModelIndex(index) @@ -331,9 +321,9 @@ func miqt_exec_callback_QStyledItemDelegate_UpdateEditorGeometry(self *C.QStyled } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) - slotval2 := newQStyleOptionViewItem(option, nil) + slotval2 := newQStyleOptionViewItem(option) slotval3 := newQModelIndex(index) @@ -397,7 +387,7 @@ func miqt_exec_callback_QStyledItemDelegate_InitStyleOption(self *C.QStyledItemD } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) slotval2 := newQModelIndex(index) @@ -457,9 +447,9 @@ func miqt_exec_callback_QStyledItemDelegate_EditorEvent(self *C.QStyledItemDeleg // Convert all CABI parameters to Go parameters slotval1 := newQEvent(event) - slotval2 := newQAbstractItemModel(model, nil) + slotval2 := newQAbstractItemModel(model) - slotval3 := newQStyleOptionViewItem(option, nil) + slotval3 := newQStyleOptionViewItem(option) slotval4 := newQModelIndex(index) @@ -489,7 +479,7 @@ func miqt_exec_callback_QStyledItemDelegate_DestroyEditor(self *C.QStyledItemDel } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := newQModelIndex(index) @@ -517,11 +507,11 @@ func miqt_exec_callback_QStyledItemDelegate_HelpEvent(self *C.QStyledItemDelegat } // Convert all CABI parameters to Go parameters - slotval1 := newQHelpEvent(event, nil) + slotval1 := newQHelpEvent(event) - slotval2 := newQAbstractItemView(view, nil, nil, nil, nil, nil) + slotval2 := newQAbstractItemView(view) - slotval3 := newQStyleOptionViewItem(option, nil) + slotval3 := newQStyleOptionViewItem(option) slotval4 := newQModelIndex(index) diff --git a/qt6/gen_qstyleditemdelegate.h b/qt6/gen_qstyleditemdelegate.h index e1f7ec79..53c144c2 100644 --- a/qt6/gen_qstyleditemdelegate.h +++ b/qt6/gen_qstyleditemdelegate.h @@ -50,8 +50,9 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QStyledItemDelegate_new(QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); -void QStyledItemDelegate_new2(QObject* parent, QStyledItemDelegate** outptr_QStyledItemDelegate, QAbstractItemDelegate** outptr_QAbstractItemDelegate, QObject** outptr_QObject); +QStyledItemDelegate* QStyledItemDelegate_new(); +QStyledItemDelegate* QStyledItemDelegate_new2(QObject* parent); +void QStyledItemDelegate_virtbase(QStyledItemDelegate* src, QAbstractItemDelegate** outptr_QAbstractItemDelegate); QMetaObject* QStyledItemDelegate_MetaObject(const QStyledItemDelegate* self); void* QStyledItemDelegate_Metacast(QStyledItemDelegate* self, const char* param1); struct miqt_string QStyledItemDelegate_Tr(const char* s); diff --git a/qt6/gen_qstylefactory.go b/qt6/gen_qstylefactory.go index a621234f..3a6ee0d8 100644 --- a/qt6/gen_qstylefactory.go +++ b/qt6/gen_qstylefactory.go @@ -37,16 +37,13 @@ func newQStyleFactory(h *C.QStyleFactory) *QStyleFactory { if h == nil { return nil } + return &QStyleFactory{h: h} } // UnsafeNewQStyleFactory constructs the type using only unsafe pointers. func UnsafeNewQStyleFactory(h unsafe.Pointer) *QStyleFactory { - if h == nil { - return nil - } - - return &QStyleFactory{h: (*C.QStyleFactory)(h)} + return newQStyleFactory((*C.QStyleFactory)(h)) } func QStyleFactory_Keys() []string { @@ -67,7 +64,7 @@ func QStyleFactory_Create(param1 string) *QStyle { param1_ms.data = C.CString(param1) param1_ms.len = C.size_t(len(param1)) defer C.free(unsafe.Pointer(param1_ms.data)) - return newQStyle(C.QStyleFactory_Create(param1_ms), nil) + return newQStyle(C.QStyleFactory_Create(param1_ms)) } // Delete this object from C++ memory. diff --git a/qt6/gen_qstylehints.cpp b/qt6/gen_qstylehints.cpp index 0e54a09b..10037c28 100644 --- a/qt6/gen_qstylehints.cpp +++ b/qt6/gen_qstylehints.cpp @@ -9,6 +9,10 @@ #include "gen_qstylehints.h" #include "_cgo_export.h" +void QStyleHints_virtbase(QStyleHints* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QStyleHints_MetaObject(const QStyleHints* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/gen_qstylehints.go b/qt6/gen_qstylehints.go index 78f622e4..b7e0ede4 100644 --- a/qt6/gen_qstylehints.go +++ b/qt6/gen_qstylehints.go @@ -35,22 +35,20 @@ func (this *QStyleHints) UnsafePointer() unsafe.Pointer { } // newQStyleHints constructs the type using only CGO pointers. -func newQStyleHints(h *C.QStyleHints, h_QObject *C.QObject) *QStyleHints { +func newQStyleHints(h *C.QStyleHints) *QStyleHints { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QStyleHints_virtbase(h, &outptr_QObject) + return &QStyleHints{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQStyleHints constructs the type using only unsafe pointers. -func UnsafeNewQStyleHints(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStyleHints { - if h == nil { - return nil - } - - return &QStyleHints{h: (*C.QStyleHints)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQStyleHints(h unsafe.Pointer) *QStyleHints { + return newQStyleHints((*C.QStyleHints)(h)) } func (this *QStyleHints) MetaObject() *QMetaObject { diff --git a/qt6/gen_qstylehints.h b/qt6/gen_qstylehints.h index 8f3b9241..f38ef1d1 100644 --- a/qt6/gen_qstylehints.h +++ b/qt6/gen_qstylehints.h @@ -26,6 +26,7 @@ typedef struct QObject QObject; typedef struct QStyleHints QStyleHints; #endif +void QStyleHints_virtbase(QStyleHints* src, QObject** outptr_QObject); QMetaObject* QStyleHints_MetaObject(const QStyleHints* self); void* QStyleHints_Metacast(QStyleHints* self, const char* param1); struct miqt_string QStyleHints_Tr(const char* s); diff --git a/qt6/gen_qstyleoption.cpp b/qt6/gen_qstyleoption.cpp index 6694f525..49d8dc0f 100644 --- a/qt6/gen_qstyleoption.cpp +++ b/qt6/gen_qstyleoption.cpp @@ -32,24 +32,20 @@ #include "gen_qstyleoption.h" #include "_cgo_export.h" -void QStyleOption_new(QStyleOption** outptr_QStyleOption) { - QStyleOption* ret = new QStyleOption(); - *outptr_QStyleOption = ret; +QStyleOption* QStyleOption_new() { + return new QStyleOption(); } -void QStyleOption_new2(QStyleOption* other, QStyleOption** outptr_QStyleOption) { - QStyleOption* ret = new QStyleOption(*other); - *outptr_QStyleOption = ret; +QStyleOption* QStyleOption_new2(QStyleOption* other) { + return new QStyleOption(*other); } -void QStyleOption_new3(int version, QStyleOption** outptr_QStyleOption) { - QStyleOption* ret = new QStyleOption(static_cast(version)); - *outptr_QStyleOption = ret; +QStyleOption* QStyleOption_new3(int version) { + return new QStyleOption(static_cast(version)); } -void QStyleOption_new4(int version, int typeVal, QStyleOption** outptr_QStyleOption) { - QStyleOption* ret = new QStyleOption(static_cast(version), static_cast(typeVal)); - *outptr_QStyleOption = ret; +QStyleOption* QStyleOption_new4(int version, int typeVal) { + return new QStyleOption(static_cast(version), static_cast(typeVal)); } void QStyleOption_InitFrom(QStyleOption* self, QWidget* w) { @@ -68,16 +64,16 @@ void QStyleOption_Delete(QStyleOption* self, bool isSubclass) { } } -void QStyleOptionFocusRect_new(QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption) { - QStyleOptionFocusRect* ret = new QStyleOptionFocusRect(); - *outptr_QStyleOptionFocusRect = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionFocusRect* QStyleOptionFocusRect_new() { + return new QStyleOptionFocusRect(); } -void QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other, QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption) { - QStyleOptionFocusRect* ret = new QStyleOptionFocusRect(*other); - *outptr_QStyleOptionFocusRect = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionFocusRect* QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other) { + return new QStyleOptionFocusRect(*other); +} + +void QStyleOptionFocusRect_virtbase(QStyleOptionFocusRect* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionFocusRect_Delete(QStyleOptionFocusRect* self, bool isSubclass) { @@ -88,16 +84,16 @@ void QStyleOptionFocusRect_Delete(QStyleOptionFocusRect* self, bool isSubclass) } } -void QStyleOptionFrame_new(QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption) { - QStyleOptionFrame* ret = new QStyleOptionFrame(); - *outptr_QStyleOptionFrame = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionFrame* QStyleOptionFrame_new() { + return new QStyleOptionFrame(); } -void QStyleOptionFrame_new2(QStyleOptionFrame* other, QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption) { - QStyleOptionFrame* ret = new QStyleOptionFrame(*other); - *outptr_QStyleOptionFrame = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionFrame* QStyleOptionFrame_new2(QStyleOptionFrame* other) { + return new QStyleOptionFrame(*other); +} + +void QStyleOptionFrame_virtbase(QStyleOptionFrame* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionFrame_Delete(QStyleOptionFrame* self, bool isSubclass) { @@ -108,16 +104,16 @@ void QStyleOptionFrame_Delete(QStyleOptionFrame* self, bool isSubclass) { } } -void QStyleOptionTabWidgetFrame_new(QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption) { - QStyleOptionTabWidgetFrame* ret = new QStyleOptionTabWidgetFrame(); - *outptr_QStyleOptionTabWidgetFrame = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new() { + return new QStyleOptionTabWidgetFrame(); } -void QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other, QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption) { - QStyleOptionTabWidgetFrame* ret = new QStyleOptionTabWidgetFrame(*other); - *outptr_QStyleOptionTabWidgetFrame = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other) { + return new QStyleOptionTabWidgetFrame(*other); +} + +void QStyleOptionTabWidgetFrame_virtbase(QStyleOptionTabWidgetFrame* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionTabWidgetFrame_Delete(QStyleOptionTabWidgetFrame* self, bool isSubclass) { @@ -128,16 +124,16 @@ void QStyleOptionTabWidgetFrame_Delete(QStyleOptionTabWidgetFrame* self, bool is } } -void QStyleOptionTabBarBase_new(QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption) { - QStyleOptionTabBarBase* ret = new QStyleOptionTabBarBase(); - *outptr_QStyleOptionTabBarBase = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTabBarBase* QStyleOptionTabBarBase_new() { + return new QStyleOptionTabBarBase(); } -void QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other, QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption) { - QStyleOptionTabBarBase* ret = new QStyleOptionTabBarBase(*other); - *outptr_QStyleOptionTabBarBase = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTabBarBase* QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other) { + return new QStyleOptionTabBarBase(*other); +} + +void QStyleOptionTabBarBase_virtbase(QStyleOptionTabBarBase* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionTabBarBase_Delete(QStyleOptionTabBarBase* self, bool isSubclass) { @@ -148,16 +144,16 @@ void QStyleOptionTabBarBase_Delete(QStyleOptionTabBarBase* self, bool isSubclass } } -void QStyleOptionHeader_new(QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption) { - QStyleOptionHeader* ret = new QStyleOptionHeader(); - *outptr_QStyleOptionHeader = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionHeader* QStyleOptionHeader_new() { + return new QStyleOptionHeader(); } -void QStyleOptionHeader_new2(QStyleOptionHeader* other, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption) { - QStyleOptionHeader* ret = new QStyleOptionHeader(*other); - *outptr_QStyleOptionHeader = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionHeader* QStyleOptionHeader_new2(QStyleOptionHeader* other) { + return new QStyleOptionHeader(*other); +} + +void QStyleOptionHeader_virtbase(QStyleOptionHeader* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionHeader_Delete(QStyleOptionHeader* self, bool isSubclass) { @@ -168,18 +164,16 @@ void QStyleOptionHeader_Delete(QStyleOptionHeader* self, bool isSubclass) { } } -void QStyleOptionHeaderV2_new(QStyleOptionHeaderV2** outptr_QStyleOptionHeaderV2, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption) { - QStyleOptionHeaderV2* ret = new QStyleOptionHeaderV2(); - *outptr_QStyleOptionHeaderV2 = ret; - *outptr_QStyleOptionHeader = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionHeaderV2* QStyleOptionHeaderV2_new() { + return new QStyleOptionHeaderV2(); } -void QStyleOptionHeaderV2_new2(QStyleOptionHeaderV2* other, QStyleOptionHeaderV2** outptr_QStyleOptionHeaderV2, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption) { - QStyleOptionHeaderV2* ret = new QStyleOptionHeaderV2(*other); - *outptr_QStyleOptionHeaderV2 = ret; - *outptr_QStyleOptionHeader = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionHeaderV2* QStyleOptionHeaderV2_new2(QStyleOptionHeaderV2* other) { + return new QStyleOptionHeaderV2(*other); +} + +void QStyleOptionHeaderV2_virtbase(QStyleOptionHeaderV2* src, QStyleOptionHeader** outptr_QStyleOptionHeader) { + *outptr_QStyleOptionHeader = static_cast(src); } void QStyleOptionHeaderV2_Delete(QStyleOptionHeaderV2* self, bool isSubclass) { @@ -190,16 +184,16 @@ void QStyleOptionHeaderV2_Delete(QStyleOptionHeaderV2* self, bool isSubclass) { } } -void QStyleOptionButton_new(QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption) { - QStyleOptionButton* ret = new QStyleOptionButton(); - *outptr_QStyleOptionButton = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionButton* QStyleOptionButton_new() { + return new QStyleOptionButton(); } -void QStyleOptionButton_new2(QStyleOptionButton* other, QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption) { - QStyleOptionButton* ret = new QStyleOptionButton(*other); - *outptr_QStyleOptionButton = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionButton* QStyleOptionButton_new2(QStyleOptionButton* other) { + return new QStyleOptionButton(*other); +} + +void QStyleOptionButton_virtbase(QStyleOptionButton* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionButton_Delete(QStyleOptionButton* self, bool isSubclass) { @@ -210,16 +204,16 @@ void QStyleOptionButton_Delete(QStyleOptionButton* self, bool isSubclass) { } } -void QStyleOptionTab_new(QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption) { - QStyleOptionTab* ret = new QStyleOptionTab(); - *outptr_QStyleOptionTab = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTab* QStyleOptionTab_new() { + return new QStyleOptionTab(); } -void QStyleOptionTab_new2(QStyleOptionTab* other, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption) { - QStyleOptionTab* ret = new QStyleOptionTab(*other); - *outptr_QStyleOptionTab = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTab* QStyleOptionTab_new2(QStyleOptionTab* other) { + return new QStyleOptionTab(*other); +} + +void QStyleOptionTab_virtbase(QStyleOptionTab* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionTab_Delete(QStyleOptionTab* self, bool isSubclass) { @@ -230,16 +224,16 @@ void QStyleOptionTab_Delete(QStyleOptionTab* self, bool isSubclass) { } } -void QStyleOptionToolBar_new(QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption) { - QStyleOptionToolBar* ret = new QStyleOptionToolBar(); - *outptr_QStyleOptionToolBar = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionToolBar* QStyleOptionToolBar_new() { + return new QStyleOptionToolBar(); } -void QStyleOptionToolBar_new2(QStyleOptionToolBar* other, QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption) { - QStyleOptionToolBar* ret = new QStyleOptionToolBar(*other); - *outptr_QStyleOptionToolBar = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionToolBar* QStyleOptionToolBar_new2(QStyleOptionToolBar* other) { + return new QStyleOptionToolBar(*other); +} + +void QStyleOptionToolBar_virtbase(QStyleOptionToolBar* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionToolBar_Delete(QStyleOptionToolBar* self, bool isSubclass) { @@ -250,16 +244,16 @@ void QStyleOptionToolBar_Delete(QStyleOptionToolBar* self, bool isSubclass) { } } -void QStyleOptionProgressBar_new(QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption) { - QStyleOptionProgressBar* ret = new QStyleOptionProgressBar(); - *outptr_QStyleOptionProgressBar = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionProgressBar* QStyleOptionProgressBar_new() { + return new QStyleOptionProgressBar(); } -void QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other, QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption) { - QStyleOptionProgressBar* ret = new QStyleOptionProgressBar(*other); - *outptr_QStyleOptionProgressBar = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionProgressBar* QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other) { + return new QStyleOptionProgressBar(*other); +} + +void QStyleOptionProgressBar_virtbase(QStyleOptionProgressBar* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionProgressBar_Delete(QStyleOptionProgressBar* self, bool isSubclass) { @@ -270,16 +264,16 @@ void QStyleOptionProgressBar_Delete(QStyleOptionProgressBar* self, bool isSubcla } } -void QStyleOptionMenuItem_new(QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption) { - QStyleOptionMenuItem* ret = new QStyleOptionMenuItem(); - *outptr_QStyleOptionMenuItem = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionMenuItem* QStyleOptionMenuItem_new() { + return new QStyleOptionMenuItem(); } -void QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other, QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption) { - QStyleOptionMenuItem* ret = new QStyleOptionMenuItem(*other); - *outptr_QStyleOptionMenuItem = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionMenuItem* QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other) { + return new QStyleOptionMenuItem(*other); +} + +void QStyleOptionMenuItem_virtbase(QStyleOptionMenuItem* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionMenuItem_Delete(QStyleOptionMenuItem* self, bool isSubclass) { @@ -290,16 +284,16 @@ void QStyleOptionMenuItem_Delete(QStyleOptionMenuItem* self, bool isSubclass) { } } -void QStyleOptionDockWidget_new(QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption) { - QStyleOptionDockWidget* ret = new QStyleOptionDockWidget(); - *outptr_QStyleOptionDockWidget = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionDockWidget* QStyleOptionDockWidget_new() { + return new QStyleOptionDockWidget(); } -void QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other, QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption) { - QStyleOptionDockWidget* ret = new QStyleOptionDockWidget(*other); - *outptr_QStyleOptionDockWidget = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionDockWidget* QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other) { + return new QStyleOptionDockWidget(*other); +} + +void QStyleOptionDockWidget_virtbase(QStyleOptionDockWidget* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionDockWidget_Delete(QStyleOptionDockWidget* self, bool isSubclass) { @@ -310,16 +304,16 @@ void QStyleOptionDockWidget_Delete(QStyleOptionDockWidget* self, bool isSubclass } } -void QStyleOptionViewItem_new(QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption) { - QStyleOptionViewItem* ret = new QStyleOptionViewItem(); - *outptr_QStyleOptionViewItem = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionViewItem* QStyleOptionViewItem_new() { + return new QStyleOptionViewItem(); } -void QStyleOptionViewItem_new2(QStyleOptionViewItem* other, QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption) { - QStyleOptionViewItem* ret = new QStyleOptionViewItem(*other); - *outptr_QStyleOptionViewItem = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionViewItem* QStyleOptionViewItem_new2(QStyleOptionViewItem* other) { + return new QStyleOptionViewItem(*other); +} + +void QStyleOptionViewItem_virtbase(QStyleOptionViewItem* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionViewItem_Delete(QStyleOptionViewItem* self, bool isSubclass) { @@ -330,16 +324,16 @@ void QStyleOptionViewItem_Delete(QStyleOptionViewItem* self, bool isSubclass) { } } -void QStyleOptionToolBox_new(QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption) { - QStyleOptionToolBox* ret = new QStyleOptionToolBox(); - *outptr_QStyleOptionToolBox = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionToolBox* QStyleOptionToolBox_new() { + return new QStyleOptionToolBox(); } -void QStyleOptionToolBox_new2(QStyleOptionToolBox* other, QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption) { - QStyleOptionToolBox* ret = new QStyleOptionToolBox(*other); - *outptr_QStyleOptionToolBox = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionToolBox* QStyleOptionToolBox_new2(QStyleOptionToolBox* other) { + return new QStyleOptionToolBox(*other); +} + +void QStyleOptionToolBox_virtbase(QStyleOptionToolBox* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionToolBox_Delete(QStyleOptionToolBox* self, bool isSubclass) { @@ -350,16 +344,16 @@ void QStyleOptionToolBox_Delete(QStyleOptionToolBox* self, bool isSubclass) { } } -void QStyleOptionRubberBand_new(QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption) { - QStyleOptionRubberBand* ret = new QStyleOptionRubberBand(); - *outptr_QStyleOptionRubberBand = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionRubberBand* QStyleOptionRubberBand_new() { + return new QStyleOptionRubberBand(); } -void QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other, QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption) { - QStyleOptionRubberBand* ret = new QStyleOptionRubberBand(*other); - *outptr_QStyleOptionRubberBand = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionRubberBand* QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other) { + return new QStyleOptionRubberBand(*other); +} + +void QStyleOptionRubberBand_virtbase(QStyleOptionRubberBand* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionRubberBand_Delete(QStyleOptionRubberBand* self, bool isSubclass) { @@ -370,28 +364,24 @@ void QStyleOptionRubberBand_Delete(QStyleOptionRubberBand* self, bool isSubclass } } -void QStyleOptionComplex_new(QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionComplex* ret = new QStyleOptionComplex(); - *outptr_QStyleOptionComplex = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionComplex* QStyleOptionComplex_new() { + return new QStyleOptionComplex(); } -void QStyleOptionComplex_new2(QStyleOptionComplex* other, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionComplex* ret = new QStyleOptionComplex(*other); - *outptr_QStyleOptionComplex = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionComplex* QStyleOptionComplex_new2(QStyleOptionComplex* other) { + return new QStyleOptionComplex(*other); } -void QStyleOptionComplex_new3(int version, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionComplex* ret = new QStyleOptionComplex(static_cast(version)); - *outptr_QStyleOptionComplex = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionComplex* QStyleOptionComplex_new3(int version) { + return new QStyleOptionComplex(static_cast(version)); } -void QStyleOptionComplex_new4(int version, int typeVal, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionComplex* ret = new QStyleOptionComplex(static_cast(version), static_cast(typeVal)); - *outptr_QStyleOptionComplex = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionComplex* QStyleOptionComplex_new4(int version, int typeVal) { + return new QStyleOptionComplex(static_cast(version), static_cast(typeVal)); +} + +void QStyleOptionComplex_virtbase(QStyleOptionComplex* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } void QStyleOptionComplex_Delete(QStyleOptionComplex* self, bool isSubclass) { @@ -402,18 +392,16 @@ void QStyleOptionComplex_Delete(QStyleOptionComplex* self, bool isSubclass) { } } -void QStyleOptionSlider_new(QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionSlider* ret = new QStyleOptionSlider(); - *outptr_QStyleOptionSlider = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionSlider* QStyleOptionSlider_new() { + return new QStyleOptionSlider(); } -void QStyleOptionSlider_new2(QStyleOptionSlider* other, QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionSlider* ret = new QStyleOptionSlider(*other); - *outptr_QStyleOptionSlider = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionSlider* QStyleOptionSlider_new2(QStyleOptionSlider* other) { + return new QStyleOptionSlider(*other); +} + +void QStyleOptionSlider_virtbase(QStyleOptionSlider* src, QStyleOptionComplex** outptr_QStyleOptionComplex) { + *outptr_QStyleOptionComplex = static_cast(src); } void QStyleOptionSlider_Delete(QStyleOptionSlider* self, bool isSubclass) { @@ -424,18 +412,16 @@ void QStyleOptionSlider_Delete(QStyleOptionSlider* self, bool isSubclass) { } } -void QStyleOptionSpinBox_new(QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionSpinBox* ret = new QStyleOptionSpinBox(); - *outptr_QStyleOptionSpinBox = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionSpinBox* QStyleOptionSpinBox_new() { + return new QStyleOptionSpinBox(); } -void QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other, QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionSpinBox* ret = new QStyleOptionSpinBox(*other); - *outptr_QStyleOptionSpinBox = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionSpinBox* QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other) { + return new QStyleOptionSpinBox(*other); +} + +void QStyleOptionSpinBox_virtbase(QStyleOptionSpinBox* src, QStyleOptionComplex** outptr_QStyleOptionComplex) { + *outptr_QStyleOptionComplex = static_cast(src); } void QStyleOptionSpinBox_Delete(QStyleOptionSpinBox* self, bool isSubclass) { @@ -446,18 +432,16 @@ void QStyleOptionSpinBox_Delete(QStyleOptionSpinBox* self, bool isSubclass) { } } -void QStyleOptionToolButton_new(QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionToolButton* ret = new QStyleOptionToolButton(); - *outptr_QStyleOptionToolButton = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionToolButton* QStyleOptionToolButton_new() { + return new QStyleOptionToolButton(); } -void QStyleOptionToolButton_new2(QStyleOptionToolButton* other, QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionToolButton* ret = new QStyleOptionToolButton(*other); - *outptr_QStyleOptionToolButton = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionToolButton* QStyleOptionToolButton_new2(QStyleOptionToolButton* other) { + return new QStyleOptionToolButton(*other); +} + +void QStyleOptionToolButton_virtbase(QStyleOptionToolButton* src, QStyleOptionComplex** outptr_QStyleOptionComplex) { + *outptr_QStyleOptionComplex = static_cast(src); } void QStyleOptionToolButton_Delete(QStyleOptionToolButton* self, bool isSubclass) { @@ -468,18 +452,16 @@ void QStyleOptionToolButton_Delete(QStyleOptionToolButton* self, bool isSubclass } } -void QStyleOptionComboBox_new(QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionComboBox* ret = new QStyleOptionComboBox(); - *outptr_QStyleOptionComboBox = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionComboBox* QStyleOptionComboBox_new() { + return new QStyleOptionComboBox(); } -void QStyleOptionComboBox_new2(QStyleOptionComboBox* other, QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionComboBox* ret = new QStyleOptionComboBox(*other); - *outptr_QStyleOptionComboBox = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionComboBox* QStyleOptionComboBox_new2(QStyleOptionComboBox* other) { + return new QStyleOptionComboBox(*other); +} + +void QStyleOptionComboBox_virtbase(QStyleOptionComboBox* src, QStyleOptionComplex** outptr_QStyleOptionComplex) { + *outptr_QStyleOptionComplex = static_cast(src); } void QStyleOptionComboBox_Delete(QStyleOptionComboBox* self, bool isSubclass) { @@ -490,18 +472,16 @@ void QStyleOptionComboBox_Delete(QStyleOptionComboBox* self, bool isSubclass) { } } -void QStyleOptionTitleBar_new(QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionTitleBar* ret = new QStyleOptionTitleBar(); - *outptr_QStyleOptionTitleBar = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTitleBar* QStyleOptionTitleBar_new() { + return new QStyleOptionTitleBar(); } -void QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other, QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionTitleBar* ret = new QStyleOptionTitleBar(*other); - *outptr_QStyleOptionTitleBar = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionTitleBar* QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other) { + return new QStyleOptionTitleBar(*other); +} + +void QStyleOptionTitleBar_virtbase(QStyleOptionTitleBar* src, QStyleOptionComplex** outptr_QStyleOptionComplex) { + *outptr_QStyleOptionComplex = static_cast(src); } void QStyleOptionTitleBar_Delete(QStyleOptionTitleBar* self, bool isSubclass) { @@ -512,18 +492,16 @@ void QStyleOptionTitleBar_Delete(QStyleOptionTitleBar* self, bool isSubclass) { } } -void QStyleOptionGroupBox_new(QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionGroupBox* ret = new QStyleOptionGroupBox(); - *outptr_QStyleOptionGroupBox = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionGroupBox* QStyleOptionGroupBox_new() { + return new QStyleOptionGroupBox(); } -void QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other, QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionGroupBox* ret = new QStyleOptionGroupBox(*other); - *outptr_QStyleOptionGroupBox = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionGroupBox* QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other) { + return new QStyleOptionGroupBox(*other); +} + +void QStyleOptionGroupBox_virtbase(QStyleOptionGroupBox* src, QStyleOptionComplex** outptr_QStyleOptionComplex) { + *outptr_QStyleOptionComplex = static_cast(src); } void QStyleOptionGroupBox_Delete(QStyleOptionGroupBox* self, bool isSubclass) { @@ -534,18 +512,16 @@ void QStyleOptionGroupBox_Delete(QStyleOptionGroupBox* self, bool isSubclass) { } } -void QStyleOptionSizeGrip_new(QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionSizeGrip* ret = new QStyleOptionSizeGrip(); - *outptr_QStyleOptionSizeGrip = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionSizeGrip* QStyleOptionSizeGrip_new() { + return new QStyleOptionSizeGrip(); } -void QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other, QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption) { - QStyleOptionSizeGrip* ret = new QStyleOptionSizeGrip(*other); - *outptr_QStyleOptionSizeGrip = ret; - *outptr_QStyleOptionComplex = static_cast(ret); - *outptr_QStyleOption = static_cast(ret); +QStyleOptionSizeGrip* QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other) { + return new QStyleOptionSizeGrip(*other); +} + +void QStyleOptionSizeGrip_virtbase(QStyleOptionSizeGrip* src, QStyleOptionComplex** outptr_QStyleOptionComplex) { + *outptr_QStyleOptionComplex = static_cast(src); } void QStyleOptionSizeGrip_Delete(QStyleOptionSizeGrip* self, bool isSubclass) { @@ -556,16 +532,16 @@ void QStyleOptionSizeGrip_Delete(QStyleOptionSizeGrip* self, bool isSubclass) { } } -void QStyleOptionGraphicsItem_new(QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption) { - QStyleOptionGraphicsItem* ret = new QStyleOptionGraphicsItem(); - *outptr_QStyleOptionGraphicsItem = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new() { + return new QStyleOptionGraphicsItem(); } -void QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other, QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption) { - QStyleOptionGraphicsItem* ret = new QStyleOptionGraphicsItem(*other); - *outptr_QStyleOptionGraphicsItem = ret; - *outptr_QStyleOption = static_cast(ret); +QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other) { + return new QStyleOptionGraphicsItem(*other); +} + +void QStyleOptionGraphicsItem_virtbase(QStyleOptionGraphicsItem* src, QStyleOption** outptr_QStyleOption) { + *outptr_QStyleOption = static_cast(src); } double QStyleOptionGraphicsItem_LevelOfDetailFromTransform(QTransform* worldTransform) { @@ -581,24 +557,20 @@ void QStyleOptionGraphicsItem_Delete(QStyleOptionGraphicsItem* self, bool isSubc } } -void QStyleHintReturn_new(QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturn* ret = new QStyleHintReturn(); - *outptr_QStyleHintReturn = ret; +QStyleHintReturn* QStyleHintReturn_new() { + return new QStyleHintReturn(); } -void QStyleHintReturn_new2(QStyleHintReturn* param1, QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturn* ret = new QStyleHintReturn(*param1); - *outptr_QStyleHintReturn = ret; +QStyleHintReturn* QStyleHintReturn_new2(QStyleHintReturn* param1) { + return new QStyleHintReturn(*param1); } -void QStyleHintReturn_new3(int version, QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturn* ret = new QStyleHintReturn(static_cast(version)); - *outptr_QStyleHintReturn = ret; +QStyleHintReturn* QStyleHintReturn_new3(int version) { + return new QStyleHintReturn(static_cast(version)); } -void QStyleHintReturn_new4(int version, int typeVal, QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturn* ret = new QStyleHintReturn(static_cast(version), static_cast(typeVal)); - *outptr_QStyleHintReturn = ret; +QStyleHintReturn* QStyleHintReturn_new4(int version, int typeVal) { + return new QStyleHintReturn(static_cast(version), static_cast(typeVal)); } void QStyleHintReturn_OperatorAssign(QStyleHintReturn* self, QStyleHintReturn* param1) { @@ -613,16 +585,16 @@ void QStyleHintReturn_Delete(QStyleHintReturn* self, bool isSubclass) { } } -void QStyleHintReturnMask_new(QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturnMask* ret = new QStyleHintReturnMask(); - *outptr_QStyleHintReturnMask = ret; - *outptr_QStyleHintReturn = static_cast(ret); +QStyleHintReturnMask* QStyleHintReturnMask_new() { + return new QStyleHintReturnMask(); } -void QStyleHintReturnMask_new2(QStyleHintReturnMask* param1, QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturnMask* ret = new QStyleHintReturnMask(*param1); - *outptr_QStyleHintReturnMask = ret; - *outptr_QStyleHintReturn = static_cast(ret); +QStyleHintReturnMask* QStyleHintReturnMask_new2(QStyleHintReturnMask* param1) { + return new QStyleHintReturnMask(*param1); +} + +void QStyleHintReturnMask_virtbase(QStyleHintReturnMask* src, QStyleHintReturn** outptr_QStyleHintReturn) { + *outptr_QStyleHintReturn = static_cast(src); } void QStyleHintReturnMask_OperatorAssign(QStyleHintReturnMask* self, QStyleHintReturnMask* param1) { @@ -637,16 +609,16 @@ void QStyleHintReturnMask_Delete(QStyleHintReturnMask* self, bool isSubclass) { } } -void QStyleHintReturnVariant_new(QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturnVariant* ret = new QStyleHintReturnVariant(); - *outptr_QStyleHintReturnVariant = ret; - *outptr_QStyleHintReturn = static_cast(ret); +QStyleHintReturnVariant* QStyleHintReturnVariant_new() { + return new QStyleHintReturnVariant(); } -void QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1, QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn) { - QStyleHintReturnVariant* ret = new QStyleHintReturnVariant(*param1); - *outptr_QStyleHintReturnVariant = ret; - *outptr_QStyleHintReturn = static_cast(ret); +QStyleHintReturnVariant* QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1) { + return new QStyleHintReturnVariant(*param1); +} + +void QStyleHintReturnVariant_virtbase(QStyleHintReturnVariant* src, QStyleHintReturn** outptr_QStyleHintReturn) { + *outptr_QStyleHintReturn = static_cast(src); } void QStyleHintReturnVariant_OperatorAssign(QStyleHintReturnVariant* self, QStyleHintReturnVariant* param1) { diff --git a/qt6/gen_qstyleoption.go b/qt6/gen_qstyleoption.go index fd10169a..e775f39b 100644 --- a/qt6/gen_qstyleoption.go +++ b/qt6/gen_qstyleoption.go @@ -584,54 +584,43 @@ func newQStyleOption(h *C.QStyleOption) *QStyleOption { if h == nil { return nil } + return &QStyleOption{h: h} } // UnsafeNewQStyleOption constructs the type using only unsafe pointers. func UnsafeNewQStyleOption(h unsafe.Pointer) *QStyleOption { - if h == nil { - return nil - } - - return &QStyleOption{h: (*C.QStyleOption)(h)} + return newQStyleOption((*C.QStyleOption)(h)) } // NewQStyleOption constructs a new QStyleOption object. func NewQStyleOption() *QStyleOption { - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOption_new(&outptr_QStyleOption) - ret := newQStyleOption(outptr_QStyleOption) + ret := newQStyleOption(C.QStyleOption_new()) ret.isSubclass = true return ret } // NewQStyleOption2 constructs a new QStyleOption object. func NewQStyleOption2(other *QStyleOption) *QStyleOption { - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOption_new2(other.cPointer(), &outptr_QStyleOption) - ret := newQStyleOption(outptr_QStyleOption) + ret := newQStyleOption(C.QStyleOption_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQStyleOption3 constructs a new QStyleOption object. func NewQStyleOption3(version int) *QStyleOption { - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOption_new3((C.int)(version), &outptr_QStyleOption) - ret := newQStyleOption(outptr_QStyleOption) + ret := newQStyleOption(C.QStyleOption_new3((C.int)(version))) ret.isSubclass = true return ret } // NewQStyleOption4 constructs a new QStyleOption object. func NewQStyleOption4(version int, typeVal int) *QStyleOption { - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOption_new4((C.int)(version), (C.int)(typeVal), &outptr_QStyleOption) - ret := newQStyleOption(outptr_QStyleOption) + ret := newQStyleOption(C.QStyleOption_new4((C.int)(version), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -679,42 +668,34 @@ func (this *QStyleOptionFocusRect) UnsafePointer() unsafe.Pointer { } // newQStyleOptionFocusRect constructs the type using only CGO pointers. -func newQStyleOptionFocusRect(h *C.QStyleOptionFocusRect, h_QStyleOption *C.QStyleOption) *QStyleOptionFocusRect { +func newQStyleOptionFocusRect(h *C.QStyleOptionFocusRect) *QStyleOptionFocusRect { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionFocusRect_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionFocusRect{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionFocusRect constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionFocusRect(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionFocusRect { - if h == nil { - return nil - } - - return &QStyleOptionFocusRect{h: (*C.QStyleOptionFocusRect)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionFocusRect(h unsafe.Pointer) *QStyleOptionFocusRect { + return newQStyleOptionFocusRect((*C.QStyleOptionFocusRect)(h)) } // NewQStyleOptionFocusRect constructs a new QStyleOptionFocusRect object. func NewQStyleOptionFocusRect() *QStyleOptionFocusRect { - var outptr_QStyleOptionFocusRect *C.QStyleOptionFocusRect = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionFocusRect_new(&outptr_QStyleOptionFocusRect, &outptr_QStyleOption) - ret := newQStyleOptionFocusRect(outptr_QStyleOptionFocusRect, outptr_QStyleOption) + ret := newQStyleOptionFocusRect(C.QStyleOptionFocusRect_new()) ret.isSubclass = true return ret } // NewQStyleOptionFocusRect2 constructs a new QStyleOptionFocusRect object. func NewQStyleOptionFocusRect2(other *QStyleOptionFocusRect) *QStyleOptionFocusRect { - var outptr_QStyleOptionFocusRect *C.QStyleOptionFocusRect = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionFocusRect_new2(other.cPointer(), &outptr_QStyleOptionFocusRect, &outptr_QStyleOption) - ret := newQStyleOptionFocusRect(outptr_QStyleOptionFocusRect, outptr_QStyleOption) + ret := newQStyleOptionFocusRect(C.QStyleOptionFocusRect_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -754,42 +735,34 @@ func (this *QStyleOptionFrame) UnsafePointer() unsafe.Pointer { } // newQStyleOptionFrame constructs the type using only CGO pointers. -func newQStyleOptionFrame(h *C.QStyleOptionFrame, h_QStyleOption *C.QStyleOption) *QStyleOptionFrame { +func newQStyleOptionFrame(h *C.QStyleOptionFrame) *QStyleOptionFrame { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionFrame_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionFrame{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionFrame constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionFrame(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionFrame { - if h == nil { - return nil - } - - return &QStyleOptionFrame{h: (*C.QStyleOptionFrame)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionFrame(h unsafe.Pointer) *QStyleOptionFrame { + return newQStyleOptionFrame((*C.QStyleOptionFrame)(h)) } // NewQStyleOptionFrame constructs a new QStyleOptionFrame object. func NewQStyleOptionFrame() *QStyleOptionFrame { - var outptr_QStyleOptionFrame *C.QStyleOptionFrame = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionFrame_new(&outptr_QStyleOptionFrame, &outptr_QStyleOption) - ret := newQStyleOptionFrame(outptr_QStyleOptionFrame, outptr_QStyleOption) + ret := newQStyleOptionFrame(C.QStyleOptionFrame_new()) ret.isSubclass = true return ret } // NewQStyleOptionFrame2 constructs a new QStyleOptionFrame object. func NewQStyleOptionFrame2(other *QStyleOptionFrame) *QStyleOptionFrame { - var outptr_QStyleOptionFrame *C.QStyleOptionFrame = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionFrame_new2(other.cPointer(), &outptr_QStyleOptionFrame, &outptr_QStyleOption) - ret := newQStyleOptionFrame(outptr_QStyleOptionFrame, outptr_QStyleOption) + ret := newQStyleOptionFrame(C.QStyleOptionFrame_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -829,42 +802,34 @@ func (this *QStyleOptionTabWidgetFrame) UnsafePointer() unsafe.Pointer { } // newQStyleOptionTabWidgetFrame constructs the type using only CGO pointers. -func newQStyleOptionTabWidgetFrame(h *C.QStyleOptionTabWidgetFrame, h_QStyleOption *C.QStyleOption) *QStyleOptionTabWidgetFrame { +func newQStyleOptionTabWidgetFrame(h *C.QStyleOptionTabWidgetFrame) *QStyleOptionTabWidgetFrame { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionTabWidgetFrame_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionTabWidgetFrame{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionTabWidgetFrame constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionTabWidgetFrame(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTabWidgetFrame { - if h == nil { - return nil - } - - return &QStyleOptionTabWidgetFrame{h: (*C.QStyleOptionTabWidgetFrame)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionTabWidgetFrame(h unsafe.Pointer) *QStyleOptionTabWidgetFrame { + return newQStyleOptionTabWidgetFrame((*C.QStyleOptionTabWidgetFrame)(h)) } // NewQStyleOptionTabWidgetFrame constructs a new QStyleOptionTabWidgetFrame object. func NewQStyleOptionTabWidgetFrame() *QStyleOptionTabWidgetFrame { - var outptr_QStyleOptionTabWidgetFrame *C.QStyleOptionTabWidgetFrame = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTabWidgetFrame_new(&outptr_QStyleOptionTabWidgetFrame, &outptr_QStyleOption) - ret := newQStyleOptionTabWidgetFrame(outptr_QStyleOptionTabWidgetFrame, outptr_QStyleOption) + ret := newQStyleOptionTabWidgetFrame(C.QStyleOptionTabWidgetFrame_new()) ret.isSubclass = true return ret } // NewQStyleOptionTabWidgetFrame2 constructs a new QStyleOptionTabWidgetFrame object. func NewQStyleOptionTabWidgetFrame2(other *QStyleOptionTabWidgetFrame) *QStyleOptionTabWidgetFrame { - var outptr_QStyleOptionTabWidgetFrame *C.QStyleOptionTabWidgetFrame = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTabWidgetFrame_new2(other.cPointer(), &outptr_QStyleOptionTabWidgetFrame, &outptr_QStyleOption) - ret := newQStyleOptionTabWidgetFrame(outptr_QStyleOptionTabWidgetFrame, outptr_QStyleOption) + ret := newQStyleOptionTabWidgetFrame(C.QStyleOptionTabWidgetFrame_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -904,42 +869,34 @@ func (this *QStyleOptionTabBarBase) UnsafePointer() unsafe.Pointer { } // newQStyleOptionTabBarBase constructs the type using only CGO pointers. -func newQStyleOptionTabBarBase(h *C.QStyleOptionTabBarBase, h_QStyleOption *C.QStyleOption) *QStyleOptionTabBarBase { +func newQStyleOptionTabBarBase(h *C.QStyleOptionTabBarBase) *QStyleOptionTabBarBase { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionTabBarBase_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionTabBarBase{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionTabBarBase constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionTabBarBase(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTabBarBase { - if h == nil { - return nil - } - - return &QStyleOptionTabBarBase{h: (*C.QStyleOptionTabBarBase)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionTabBarBase(h unsafe.Pointer) *QStyleOptionTabBarBase { + return newQStyleOptionTabBarBase((*C.QStyleOptionTabBarBase)(h)) } // NewQStyleOptionTabBarBase constructs a new QStyleOptionTabBarBase object. func NewQStyleOptionTabBarBase() *QStyleOptionTabBarBase { - var outptr_QStyleOptionTabBarBase *C.QStyleOptionTabBarBase = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTabBarBase_new(&outptr_QStyleOptionTabBarBase, &outptr_QStyleOption) - ret := newQStyleOptionTabBarBase(outptr_QStyleOptionTabBarBase, outptr_QStyleOption) + ret := newQStyleOptionTabBarBase(C.QStyleOptionTabBarBase_new()) ret.isSubclass = true return ret } // NewQStyleOptionTabBarBase2 constructs a new QStyleOptionTabBarBase object. func NewQStyleOptionTabBarBase2(other *QStyleOptionTabBarBase) *QStyleOptionTabBarBase { - var outptr_QStyleOptionTabBarBase *C.QStyleOptionTabBarBase = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTabBarBase_new2(other.cPointer(), &outptr_QStyleOptionTabBarBase, &outptr_QStyleOption) - ret := newQStyleOptionTabBarBase(outptr_QStyleOptionTabBarBase, outptr_QStyleOption) + ret := newQStyleOptionTabBarBase(C.QStyleOptionTabBarBase_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -979,42 +936,34 @@ func (this *QStyleOptionHeader) UnsafePointer() unsafe.Pointer { } // newQStyleOptionHeader constructs the type using only CGO pointers. -func newQStyleOptionHeader(h *C.QStyleOptionHeader, h_QStyleOption *C.QStyleOption) *QStyleOptionHeader { +func newQStyleOptionHeader(h *C.QStyleOptionHeader) *QStyleOptionHeader { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionHeader_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionHeader{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionHeader constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionHeader(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionHeader { - if h == nil { - return nil - } - - return &QStyleOptionHeader{h: (*C.QStyleOptionHeader)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionHeader(h unsafe.Pointer) *QStyleOptionHeader { + return newQStyleOptionHeader((*C.QStyleOptionHeader)(h)) } // NewQStyleOptionHeader constructs a new QStyleOptionHeader object. func NewQStyleOptionHeader() *QStyleOptionHeader { - var outptr_QStyleOptionHeader *C.QStyleOptionHeader = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionHeader_new(&outptr_QStyleOptionHeader, &outptr_QStyleOption) - ret := newQStyleOptionHeader(outptr_QStyleOptionHeader, outptr_QStyleOption) + ret := newQStyleOptionHeader(C.QStyleOptionHeader_new()) ret.isSubclass = true return ret } // NewQStyleOptionHeader2 constructs a new QStyleOptionHeader object. func NewQStyleOptionHeader2(other *QStyleOptionHeader) *QStyleOptionHeader { - var outptr_QStyleOptionHeader *C.QStyleOptionHeader = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionHeader_new2(other.cPointer(), &outptr_QStyleOptionHeader, &outptr_QStyleOption) - ret := newQStyleOptionHeader(outptr_QStyleOptionHeader, outptr_QStyleOption) + ret := newQStyleOptionHeader(C.QStyleOptionHeader_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1054,44 +1003,34 @@ func (this *QStyleOptionHeaderV2) UnsafePointer() unsafe.Pointer { } // newQStyleOptionHeaderV2 constructs the type using only CGO pointers. -func newQStyleOptionHeaderV2(h *C.QStyleOptionHeaderV2, h_QStyleOptionHeader *C.QStyleOptionHeader, h_QStyleOption *C.QStyleOption) *QStyleOptionHeaderV2 { +func newQStyleOptionHeaderV2(h *C.QStyleOptionHeaderV2) *QStyleOptionHeaderV2 { if h == nil { return nil } + var outptr_QStyleOptionHeader *C.QStyleOptionHeader = nil + C.QStyleOptionHeaderV2_virtbase(h, &outptr_QStyleOptionHeader) + return &QStyleOptionHeaderV2{h: h, - QStyleOptionHeader: newQStyleOptionHeader(h_QStyleOptionHeader, h_QStyleOption)} + QStyleOptionHeader: newQStyleOptionHeader(outptr_QStyleOptionHeader)} } // UnsafeNewQStyleOptionHeaderV2 constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionHeaderV2(h unsafe.Pointer, h_QStyleOptionHeader unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionHeaderV2 { - if h == nil { - return nil - } - - return &QStyleOptionHeaderV2{h: (*C.QStyleOptionHeaderV2)(h), - QStyleOptionHeader: UnsafeNewQStyleOptionHeader(h_QStyleOptionHeader, h_QStyleOption)} +func UnsafeNewQStyleOptionHeaderV2(h unsafe.Pointer) *QStyleOptionHeaderV2 { + return newQStyleOptionHeaderV2((*C.QStyleOptionHeaderV2)(h)) } // NewQStyleOptionHeaderV2 constructs a new QStyleOptionHeaderV2 object. func NewQStyleOptionHeaderV2() *QStyleOptionHeaderV2 { - var outptr_QStyleOptionHeaderV2 *C.QStyleOptionHeaderV2 = nil - var outptr_QStyleOptionHeader *C.QStyleOptionHeader = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionHeaderV2_new(&outptr_QStyleOptionHeaderV2, &outptr_QStyleOptionHeader, &outptr_QStyleOption) - ret := newQStyleOptionHeaderV2(outptr_QStyleOptionHeaderV2, outptr_QStyleOptionHeader, outptr_QStyleOption) + ret := newQStyleOptionHeaderV2(C.QStyleOptionHeaderV2_new()) ret.isSubclass = true return ret } // NewQStyleOptionHeaderV22 constructs a new QStyleOptionHeaderV2 object. func NewQStyleOptionHeaderV22(other *QStyleOptionHeaderV2) *QStyleOptionHeaderV2 { - var outptr_QStyleOptionHeaderV2 *C.QStyleOptionHeaderV2 = nil - var outptr_QStyleOptionHeader *C.QStyleOptionHeader = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionHeaderV2_new2(other.cPointer(), &outptr_QStyleOptionHeaderV2, &outptr_QStyleOptionHeader, &outptr_QStyleOption) - ret := newQStyleOptionHeaderV2(outptr_QStyleOptionHeaderV2, outptr_QStyleOptionHeader, outptr_QStyleOption) + ret := newQStyleOptionHeaderV2(C.QStyleOptionHeaderV2_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1131,42 +1070,34 @@ func (this *QStyleOptionButton) UnsafePointer() unsafe.Pointer { } // newQStyleOptionButton constructs the type using only CGO pointers. -func newQStyleOptionButton(h *C.QStyleOptionButton, h_QStyleOption *C.QStyleOption) *QStyleOptionButton { +func newQStyleOptionButton(h *C.QStyleOptionButton) *QStyleOptionButton { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionButton_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionButton{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionButton constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionButton(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionButton { - if h == nil { - return nil - } - - return &QStyleOptionButton{h: (*C.QStyleOptionButton)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionButton(h unsafe.Pointer) *QStyleOptionButton { + return newQStyleOptionButton((*C.QStyleOptionButton)(h)) } // NewQStyleOptionButton constructs a new QStyleOptionButton object. func NewQStyleOptionButton() *QStyleOptionButton { - var outptr_QStyleOptionButton *C.QStyleOptionButton = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionButton_new(&outptr_QStyleOptionButton, &outptr_QStyleOption) - ret := newQStyleOptionButton(outptr_QStyleOptionButton, outptr_QStyleOption) + ret := newQStyleOptionButton(C.QStyleOptionButton_new()) ret.isSubclass = true return ret } // NewQStyleOptionButton2 constructs a new QStyleOptionButton object. func NewQStyleOptionButton2(other *QStyleOptionButton) *QStyleOptionButton { - var outptr_QStyleOptionButton *C.QStyleOptionButton = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionButton_new2(other.cPointer(), &outptr_QStyleOptionButton, &outptr_QStyleOption) - ret := newQStyleOptionButton(outptr_QStyleOptionButton, outptr_QStyleOption) + ret := newQStyleOptionButton(C.QStyleOptionButton_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1206,42 +1137,34 @@ func (this *QStyleOptionTab) UnsafePointer() unsafe.Pointer { } // newQStyleOptionTab constructs the type using only CGO pointers. -func newQStyleOptionTab(h *C.QStyleOptionTab, h_QStyleOption *C.QStyleOption) *QStyleOptionTab { +func newQStyleOptionTab(h *C.QStyleOptionTab) *QStyleOptionTab { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionTab_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionTab{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionTab constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionTab(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTab { - if h == nil { - return nil - } - - return &QStyleOptionTab{h: (*C.QStyleOptionTab)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionTab(h unsafe.Pointer) *QStyleOptionTab { + return newQStyleOptionTab((*C.QStyleOptionTab)(h)) } // NewQStyleOptionTab constructs a new QStyleOptionTab object. func NewQStyleOptionTab() *QStyleOptionTab { - var outptr_QStyleOptionTab *C.QStyleOptionTab = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTab_new(&outptr_QStyleOptionTab, &outptr_QStyleOption) - ret := newQStyleOptionTab(outptr_QStyleOptionTab, outptr_QStyleOption) + ret := newQStyleOptionTab(C.QStyleOptionTab_new()) ret.isSubclass = true return ret } // NewQStyleOptionTab2 constructs a new QStyleOptionTab object. func NewQStyleOptionTab2(other *QStyleOptionTab) *QStyleOptionTab { - var outptr_QStyleOptionTab *C.QStyleOptionTab = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTab_new2(other.cPointer(), &outptr_QStyleOptionTab, &outptr_QStyleOption) - ret := newQStyleOptionTab(outptr_QStyleOptionTab, outptr_QStyleOption) + ret := newQStyleOptionTab(C.QStyleOptionTab_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1281,42 +1204,34 @@ func (this *QStyleOptionToolBar) UnsafePointer() unsafe.Pointer { } // newQStyleOptionToolBar constructs the type using only CGO pointers. -func newQStyleOptionToolBar(h *C.QStyleOptionToolBar, h_QStyleOption *C.QStyleOption) *QStyleOptionToolBar { +func newQStyleOptionToolBar(h *C.QStyleOptionToolBar) *QStyleOptionToolBar { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionToolBar_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionToolBar{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionToolBar constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionToolBar(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionToolBar { - if h == nil { - return nil - } - - return &QStyleOptionToolBar{h: (*C.QStyleOptionToolBar)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionToolBar(h unsafe.Pointer) *QStyleOptionToolBar { + return newQStyleOptionToolBar((*C.QStyleOptionToolBar)(h)) } // NewQStyleOptionToolBar constructs a new QStyleOptionToolBar object. func NewQStyleOptionToolBar() *QStyleOptionToolBar { - var outptr_QStyleOptionToolBar *C.QStyleOptionToolBar = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionToolBar_new(&outptr_QStyleOptionToolBar, &outptr_QStyleOption) - ret := newQStyleOptionToolBar(outptr_QStyleOptionToolBar, outptr_QStyleOption) + ret := newQStyleOptionToolBar(C.QStyleOptionToolBar_new()) ret.isSubclass = true return ret } // NewQStyleOptionToolBar2 constructs a new QStyleOptionToolBar object. func NewQStyleOptionToolBar2(other *QStyleOptionToolBar) *QStyleOptionToolBar { - var outptr_QStyleOptionToolBar *C.QStyleOptionToolBar = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionToolBar_new2(other.cPointer(), &outptr_QStyleOptionToolBar, &outptr_QStyleOption) - ret := newQStyleOptionToolBar(outptr_QStyleOptionToolBar, outptr_QStyleOption) + ret := newQStyleOptionToolBar(C.QStyleOptionToolBar_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1356,42 +1271,34 @@ func (this *QStyleOptionProgressBar) UnsafePointer() unsafe.Pointer { } // newQStyleOptionProgressBar constructs the type using only CGO pointers. -func newQStyleOptionProgressBar(h *C.QStyleOptionProgressBar, h_QStyleOption *C.QStyleOption) *QStyleOptionProgressBar { +func newQStyleOptionProgressBar(h *C.QStyleOptionProgressBar) *QStyleOptionProgressBar { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionProgressBar_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionProgressBar{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionProgressBar constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionProgressBar(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionProgressBar { - if h == nil { - return nil - } - - return &QStyleOptionProgressBar{h: (*C.QStyleOptionProgressBar)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionProgressBar(h unsafe.Pointer) *QStyleOptionProgressBar { + return newQStyleOptionProgressBar((*C.QStyleOptionProgressBar)(h)) } // NewQStyleOptionProgressBar constructs a new QStyleOptionProgressBar object. func NewQStyleOptionProgressBar() *QStyleOptionProgressBar { - var outptr_QStyleOptionProgressBar *C.QStyleOptionProgressBar = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionProgressBar_new(&outptr_QStyleOptionProgressBar, &outptr_QStyleOption) - ret := newQStyleOptionProgressBar(outptr_QStyleOptionProgressBar, outptr_QStyleOption) + ret := newQStyleOptionProgressBar(C.QStyleOptionProgressBar_new()) ret.isSubclass = true return ret } // NewQStyleOptionProgressBar2 constructs a new QStyleOptionProgressBar object. func NewQStyleOptionProgressBar2(other *QStyleOptionProgressBar) *QStyleOptionProgressBar { - var outptr_QStyleOptionProgressBar *C.QStyleOptionProgressBar = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionProgressBar_new2(other.cPointer(), &outptr_QStyleOptionProgressBar, &outptr_QStyleOption) - ret := newQStyleOptionProgressBar(outptr_QStyleOptionProgressBar, outptr_QStyleOption) + ret := newQStyleOptionProgressBar(C.QStyleOptionProgressBar_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1431,42 +1338,34 @@ func (this *QStyleOptionMenuItem) UnsafePointer() unsafe.Pointer { } // newQStyleOptionMenuItem constructs the type using only CGO pointers. -func newQStyleOptionMenuItem(h *C.QStyleOptionMenuItem, h_QStyleOption *C.QStyleOption) *QStyleOptionMenuItem { +func newQStyleOptionMenuItem(h *C.QStyleOptionMenuItem) *QStyleOptionMenuItem { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionMenuItem_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionMenuItem{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionMenuItem constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionMenuItem(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionMenuItem { - if h == nil { - return nil - } - - return &QStyleOptionMenuItem{h: (*C.QStyleOptionMenuItem)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionMenuItem(h unsafe.Pointer) *QStyleOptionMenuItem { + return newQStyleOptionMenuItem((*C.QStyleOptionMenuItem)(h)) } // NewQStyleOptionMenuItem constructs a new QStyleOptionMenuItem object. func NewQStyleOptionMenuItem() *QStyleOptionMenuItem { - var outptr_QStyleOptionMenuItem *C.QStyleOptionMenuItem = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionMenuItem_new(&outptr_QStyleOptionMenuItem, &outptr_QStyleOption) - ret := newQStyleOptionMenuItem(outptr_QStyleOptionMenuItem, outptr_QStyleOption) + ret := newQStyleOptionMenuItem(C.QStyleOptionMenuItem_new()) ret.isSubclass = true return ret } // NewQStyleOptionMenuItem2 constructs a new QStyleOptionMenuItem object. func NewQStyleOptionMenuItem2(other *QStyleOptionMenuItem) *QStyleOptionMenuItem { - var outptr_QStyleOptionMenuItem *C.QStyleOptionMenuItem = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionMenuItem_new2(other.cPointer(), &outptr_QStyleOptionMenuItem, &outptr_QStyleOption) - ret := newQStyleOptionMenuItem(outptr_QStyleOptionMenuItem, outptr_QStyleOption) + ret := newQStyleOptionMenuItem(C.QStyleOptionMenuItem_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1506,42 +1405,34 @@ func (this *QStyleOptionDockWidget) UnsafePointer() unsafe.Pointer { } // newQStyleOptionDockWidget constructs the type using only CGO pointers. -func newQStyleOptionDockWidget(h *C.QStyleOptionDockWidget, h_QStyleOption *C.QStyleOption) *QStyleOptionDockWidget { +func newQStyleOptionDockWidget(h *C.QStyleOptionDockWidget) *QStyleOptionDockWidget { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionDockWidget_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionDockWidget{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionDockWidget constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionDockWidget(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionDockWidget { - if h == nil { - return nil - } - - return &QStyleOptionDockWidget{h: (*C.QStyleOptionDockWidget)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionDockWidget(h unsafe.Pointer) *QStyleOptionDockWidget { + return newQStyleOptionDockWidget((*C.QStyleOptionDockWidget)(h)) } // NewQStyleOptionDockWidget constructs a new QStyleOptionDockWidget object. func NewQStyleOptionDockWidget() *QStyleOptionDockWidget { - var outptr_QStyleOptionDockWidget *C.QStyleOptionDockWidget = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionDockWidget_new(&outptr_QStyleOptionDockWidget, &outptr_QStyleOption) - ret := newQStyleOptionDockWidget(outptr_QStyleOptionDockWidget, outptr_QStyleOption) + ret := newQStyleOptionDockWidget(C.QStyleOptionDockWidget_new()) ret.isSubclass = true return ret } // NewQStyleOptionDockWidget2 constructs a new QStyleOptionDockWidget object. func NewQStyleOptionDockWidget2(other *QStyleOptionDockWidget) *QStyleOptionDockWidget { - var outptr_QStyleOptionDockWidget *C.QStyleOptionDockWidget = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionDockWidget_new2(other.cPointer(), &outptr_QStyleOptionDockWidget, &outptr_QStyleOption) - ret := newQStyleOptionDockWidget(outptr_QStyleOptionDockWidget, outptr_QStyleOption) + ret := newQStyleOptionDockWidget(C.QStyleOptionDockWidget_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1581,42 +1472,34 @@ func (this *QStyleOptionViewItem) UnsafePointer() unsafe.Pointer { } // newQStyleOptionViewItem constructs the type using only CGO pointers. -func newQStyleOptionViewItem(h *C.QStyleOptionViewItem, h_QStyleOption *C.QStyleOption) *QStyleOptionViewItem { +func newQStyleOptionViewItem(h *C.QStyleOptionViewItem) *QStyleOptionViewItem { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionViewItem_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionViewItem{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionViewItem constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionViewItem(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionViewItem { - if h == nil { - return nil - } - - return &QStyleOptionViewItem{h: (*C.QStyleOptionViewItem)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionViewItem(h unsafe.Pointer) *QStyleOptionViewItem { + return newQStyleOptionViewItem((*C.QStyleOptionViewItem)(h)) } // NewQStyleOptionViewItem constructs a new QStyleOptionViewItem object. func NewQStyleOptionViewItem() *QStyleOptionViewItem { - var outptr_QStyleOptionViewItem *C.QStyleOptionViewItem = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionViewItem_new(&outptr_QStyleOptionViewItem, &outptr_QStyleOption) - ret := newQStyleOptionViewItem(outptr_QStyleOptionViewItem, outptr_QStyleOption) + ret := newQStyleOptionViewItem(C.QStyleOptionViewItem_new()) ret.isSubclass = true return ret } // NewQStyleOptionViewItem2 constructs a new QStyleOptionViewItem object. func NewQStyleOptionViewItem2(other *QStyleOptionViewItem) *QStyleOptionViewItem { - var outptr_QStyleOptionViewItem *C.QStyleOptionViewItem = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionViewItem_new2(other.cPointer(), &outptr_QStyleOptionViewItem, &outptr_QStyleOption) - ret := newQStyleOptionViewItem(outptr_QStyleOptionViewItem, outptr_QStyleOption) + ret := newQStyleOptionViewItem(C.QStyleOptionViewItem_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1656,42 +1539,34 @@ func (this *QStyleOptionToolBox) UnsafePointer() unsafe.Pointer { } // newQStyleOptionToolBox constructs the type using only CGO pointers. -func newQStyleOptionToolBox(h *C.QStyleOptionToolBox, h_QStyleOption *C.QStyleOption) *QStyleOptionToolBox { +func newQStyleOptionToolBox(h *C.QStyleOptionToolBox) *QStyleOptionToolBox { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionToolBox_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionToolBox{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionToolBox constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionToolBox(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionToolBox { - if h == nil { - return nil - } - - return &QStyleOptionToolBox{h: (*C.QStyleOptionToolBox)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionToolBox(h unsafe.Pointer) *QStyleOptionToolBox { + return newQStyleOptionToolBox((*C.QStyleOptionToolBox)(h)) } // NewQStyleOptionToolBox constructs a new QStyleOptionToolBox object. func NewQStyleOptionToolBox() *QStyleOptionToolBox { - var outptr_QStyleOptionToolBox *C.QStyleOptionToolBox = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionToolBox_new(&outptr_QStyleOptionToolBox, &outptr_QStyleOption) - ret := newQStyleOptionToolBox(outptr_QStyleOptionToolBox, outptr_QStyleOption) + ret := newQStyleOptionToolBox(C.QStyleOptionToolBox_new()) ret.isSubclass = true return ret } // NewQStyleOptionToolBox2 constructs a new QStyleOptionToolBox object. func NewQStyleOptionToolBox2(other *QStyleOptionToolBox) *QStyleOptionToolBox { - var outptr_QStyleOptionToolBox *C.QStyleOptionToolBox = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionToolBox_new2(other.cPointer(), &outptr_QStyleOptionToolBox, &outptr_QStyleOption) - ret := newQStyleOptionToolBox(outptr_QStyleOptionToolBox, outptr_QStyleOption) + ret := newQStyleOptionToolBox(C.QStyleOptionToolBox_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1731,42 +1606,34 @@ func (this *QStyleOptionRubberBand) UnsafePointer() unsafe.Pointer { } // newQStyleOptionRubberBand constructs the type using only CGO pointers. -func newQStyleOptionRubberBand(h *C.QStyleOptionRubberBand, h_QStyleOption *C.QStyleOption) *QStyleOptionRubberBand { +func newQStyleOptionRubberBand(h *C.QStyleOptionRubberBand) *QStyleOptionRubberBand { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionRubberBand_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionRubberBand{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionRubberBand constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionRubberBand(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionRubberBand { - if h == nil { - return nil - } - - return &QStyleOptionRubberBand{h: (*C.QStyleOptionRubberBand)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionRubberBand(h unsafe.Pointer) *QStyleOptionRubberBand { + return newQStyleOptionRubberBand((*C.QStyleOptionRubberBand)(h)) } // NewQStyleOptionRubberBand constructs a new QStyleOptionRubberBand object. func NewQStyleOptionRubberBand() *QStyleOptionRubberBand { - var outptr_QStyleOptionRubberBand *C.QStyleOptionRubberBand = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionRubberBand_new(&outptr_QStyleOptionRubberBand, &outptr_QStyleOption) - ret := newQStyleOptionRubberBand(outptr_QStyleOptionRubberBand, outptr_QStyleOption) + ret := newQStyleOptionRubberBand(C.QStyleOptionRubberBand_new()) ret.isSubclass = true return ret } // NewQStyleOptionRubberBand2 constructs a new QStyleOptionRubberBand object. func NewQStyleOptionRubberBand2(other *QStyleOptionRubberBand) *QStyleOptionRubberBand { - var outptr_QStyleOptionRubberBand *C.QStyleOptionRubberBand = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionRubberBand_new2(other.cPointer(), &outptr_QStyleOptionRubberBand, &outptr_QStyleOption) - ret := newQStyleOptionRubberBand(outptr_QStyleOptionRubberBand, outptr_QStyleOption) + ret := newQStyleOptionRubberBand(C.QStyleOptionRubberBand_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1806,64 +1673,50 @@ func (this *QStyleOptionComplex) UnsafePointer() unsafe.Pointer { } // newQStyleOptionComplex constructs the type using only CGO pointers. -func newQStyleOptionComplex(h *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionComplex { +func newQStyleOptionComplex(h *C.QStyleOptionComplex) *QStyleOptionComplex { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionComplex_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionComplex{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionComplex constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionComplex(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionComplex { - if h == nil { - return nil - } - - return &QStyleOptionComplex{h: (*C.QStyleOptionComplex)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionComplex(h unsafe.Pointer) *QStyleOptionComplex { + return newQStyleOptionComplex((*C.QStyleOptionComplex)(h)) } // NewQStyleOptionComplex constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex() *QStyleOptionComplex { - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionComplex_new(&outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionComplex(C.QStyleOptionComplex_new()) ret.isSubclass = true return ret } // NewQStyleOptionComplex2 constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex2(other *QStyleOptionComplex) *QStyleOptionComplex { - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionComplex_new2(other.cPointer(), &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionComplex(C.QStyleOptionComplex_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQStyleOptionComplex3 constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex3(version int) *QStyleOptionComplex { - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionComplex_new3((C.int)(version), &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionComplex(C.QStyleOptionComplex_new3((C.int)(version))) ret.isSubclass = true return ret } // NewQStyleOptionComplex4 constructs a new QStyleOptionComplex object. func NewQStyleOptionComplex4(version int, typeVal int) *QStyleOptionComplex { - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionComplex_new4((C.int)(version), (C.int)(typeVal), &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionComplex(outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionComplex(C.QStyleOptionComplex_new4((C.int)(version), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -1903,44 +1756,34 @@ func (this *QStyleOptionSlider) UnsafePointer() unsafe.Pointer { } // newQStyleOptionSlider constructs the type using only CGO pointers. -func newQStyleOptionSlider(h *C.QStyleOptionSlider, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionSlider { +func newQStyleOptionSlider(h *C.QStyleOptionSlider) *QStyleOptionSlider { if h == nil { return nil } + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + C.QStyleOptionSlider_virtbase(h, &outptr_QStyleOptionComplex) + return &QStyleOptionSlider{h: h, - QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} + QStyleOptionComplex: newQStyleOptionComplex(outptr_QStyleOptionComplex)} } // UnsafeNewQStyleOptionSlider constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionSlider(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionSlider { - if h == nil { - return nil - } - - return &QStyleOptionSlider{h: (*C.QStyleOptionSlider)(h), - QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} +func UnsafeNewQStyleOptionSlider(h unsafe.Pointer) *QStyleOptionSlider { + return newQStyleOptionSlider((*C.QStyleOptionSlider)(h)) } // NewQStyleOptionSlider constructs a new QStyleOptionSlider object. func NewQStyleOptionSlider() *QStyleOptionSlider { - var outptr_QStyleOptionSlider *C.QStyleOptionSlider = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionSlider_new(&outptr_QStyleOptionSlider, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionSlider(outptr_QStyleOptionSlider, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionSlider(C.QStyleOptionSlider_new()) ret.isSubclass = true return ret } // NewQStyleOptionSlider2 constructs a new QStyleOptionSlider object. func NewQStyleOptionSlider2(other *QStyleOptionSlider) *QStyleOptionSlider { - var outptr_QStyleOptionSlider *C.QStyleOptionSlider = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionSlider_new2(other.cPointer(), &outptr_QStyleOptionSlider, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionSlider(outptr_QStyleOptionSlider, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionSlider(C.QStyleOptionSlider_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -1980,44 +1823,34 @@ func (this *QStyleOptionSpinBox) UnsafePointer() unsafe.Pointer { } // newQStyleOptionSpinBox constructs the type using only CGO pointers. -func newQStyleOptionSpinBox(h *C.QStyleOptionSpinBox, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionSpinBox { +func newQStyleOptionSpinBox(h *C.QStyleOptionSpinBox) *QStyleOptionSpinBox { if h == nil { return nil } + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + C.QStyleOptionSpinBox_virtbase(h, &outptr_QStyleOptionComplex) + return &QStyleOptionSpinBox{h: h, - QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} + QStyleOptionComplex: newQStyleOptionComplex(outptr_QStyleOptionComplex)} } // UnsafeNewQStyleOptionSpinBox constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionSpinBox(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionSpinBox { - if h == nil { - return nil - } - - return &QStyleOptionSpinBox{h: (*C.QStyleOptionSpinBox)(h), - QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} +func UnsafeNewQStyleOptionSpinBox(h unsafe.Pointer) *QStyleOptionSpinBox { + return newQStyleOptionSpinBox((*C.QStyleOptionSpinBox)(h)) } // NewQStyleOptionSpinBox constructs a new QStyleOptionSpinBox object. func NewQStyleOptionSpinBox() *QStyleOptionSpinBox { - var outptr_QStyleOptionSpinBox *C.QStyleOptionSpinBox = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionSpinBox_new(&outptr_QStyleOptionSpinBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionSpinBox(outptr_QStyleOptionSpinBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionSpinBox(C.QStyleOptionSpinBox_new()) ret.isSubclass = true return ret } // NewQStyleOptionSpinBox2 constructs a new QStyleOptionSpinBox object. func NewQStyleOptionSpinBox2(other *QStyleOptionSpinBox) *QStyleOptionSpinBox { - var outptr_QStyleOptionSpinBox *C.QStyleOptionSpinBox = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionSpinBox_new2(other.cPointer(), &outptr_QStyleOptionSpinBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionSpinBox(outptr_QStyleOptionSpinBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionSpinBox(C.QStyleOptionSpinBox_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -2057,44 +1890,34 @@ func (this *QStyleOptionToolButton) UnsafePointer() unsafe.Pointer { } // newQStyleOptionToolButton constructs the type using only CGO pointers. -func newQStyleOptionToolButton(h *C.QStyleOptionToolButton, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionToolButton { +func newQStyleOptionToolButton(h *C.QStyleOptionToolButton) *QStyleOptionToolButton { if h == nil { return nil } + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + C.QStyleOptionToolButton_virtbase(h, &outptr_QStyleOptionComplex) + return &QStyleOptionToolButton{h: h, - QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} + QStyleOptionComplex: newQStyleOptionComplex(outptr_QStyleOptionComplex)} } // UnsafeNewQStyleOptionToolButton constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionToolButton(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionToolButton { - if h == nil { - return nil - } - - return &QStyleOptionToolButton{h: (*C.QStyleOptionToolButton)(h), - QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} +func UnsafeNewQStyleOptionToolButton(h unsafe.Pointer) *QStyleOptionToolButton { + return newQStyleOptionToolButton((*C.QStyleOptionToolButton)(h)) } // NewQStyleOptionToolButton constructs a new QStyleOptionToolButton object. func NewQStyleOptionToolButton() *QStyleOptionToolButton { - var outptr_QStyleOptionToolButton *C.QStyleOptionToolButton = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionToolButton_new(&outptr_QStyleOptionToolButton, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionToolButton(outptr_QStyleOptionToolButton, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionToolButton(C.QStyleOptionToolButton_new()) ret.isSubclass = true return ret } // NewQStyleOptionToolButton2 constructs a new QStyleOptionToolButton object. func NewQStyleOptionToolButton2(other *QStyleOptionToolButton) *QStyleOptionToolButton { - var outptr_QStyleOptionToolButton *C.QStyleOptionToolButton = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionToolButton_new2(other.cPointer(), &outptr_QStyleOptionToolButton, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionToolButton(outptr_QStyleOptionToolButton, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionToolButton(C.QStyleOptionToolButton_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -2134,44 +1957,34 @@ func (this *QStyleOptionComboBox) UnsafePointer() unsafe.Pointer { } // newQStyleOptionComboBox constructs the type using only CGO pointers. -func newQStyleOptionComboBox(h *C.QStyleOptionComboBox, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionComboBox { +func newQStyleOptionComboBox(h *C.QStyleOptionComboBox) *QStyleOptionComboBox { if h == nil { return nil } + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + C.QStyleOptionComboBox_virtbase(h, &outptr_QStyleOptionComplex) + return &QStyleOptionComboBox{h: h, - QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} + QStyleOptionComplex: newQStyleOptionComplex(outptr_QStyleOptionComplex)} } // UnsafeNewQStyleOptionComboBox constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionComboBox(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionComboBox { - if h == nil { - return nil - } - - return &QStyleOptionComboBox{h: (*C.QStyleOptionComboBox)(h), - QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} +func UnsafeNewQStyleOptionComboBox(h unsafe.Pointer) *QStyleOptionComboBox { + return newQStyleOptionComboBox((*C.QStyleOptionComboBox)(h)) } // NewQStyleOptionComboBox constructs a new QStyleOptionComboBox object. func NewQStyleOptionComboBox() *QStyleOptionComboBox { - var outptr_QStyleOptionComboBox *C.QStyleOptionComboBox = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionComboBox_new(&outptr_QStyleOptionComboBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionComboBox(outptr_QStyleOptionComboBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionComboBox(C.QStyleOptionComboBox_new()) ret.isSubclass = true return ret } // NewQStyleOptionComboBox2 constructs a new QStyleOptionComboBox object. func NewQStyleOptionComboBox2(other *QStyleOptionComboBox) *QStyleOptionComboBox { - var outptr_QStyleOptionComboBox *C.QStyleOptionComboBox = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionComboBox_new2(other.cPointer(), &outptr_QStyleOptionComboBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionComboBox(outptr_QStyleOptionComboBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionComboBox(C.QStyleOptionComboBox_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -2211,44 +2024,34 @@ func (this *QStyleOptionTitleBar) UnsafePointer() unsafe.Pointer { } // newQStyleOptionTitleBar constructs the type using only CGO pointers. -func newQStyleOptionTitleBar(h *C.QStyleOptionTitleBar, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionTitleBar { +func newQStyleOptionTitleBar(h *C.QStyleOptionTitleBar) *QStyleOptionTitleBar { if h == nil { return nil } + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + C.QStyleOptionTitleBar_virtbase(h, &outptr_QStyleOptionComplex) + return &QStyleOptionTitleBar{h: h, - QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} + QStyleOptionComplex: newQStyleOptionComplex(outptr_QStyleOptionComplex)} } // UnsafeNewQStyleOptionTitleBar constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionTitleBar(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionTitleBar { - if h == nil { - return nil - } - - return &QStyleOptionTitleBar{h: (*C.QStyleOptionTitleBar)(h), - QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} +func UnsafeNewQStyleOptionTitleBar(h unsafe.Pointer) *QStyleOptionTitleBar { + return newQStyleOptionTitleBar((*C.QStyleOptionTitleBar)(h)) } // NewQStyleOptionTitleBar constructs a new QStyleOptionTitleBar object. func NewQStyleOptionTitleBar() *QStyleOptionTitleBar { - var outptr_QStyleOptionTitleBar *C.QStyleOptionTitleBar = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTitleBar_new(&outptr_QStyleOptionTitleBar, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionTitleBar(outptr_QStyleOptionTitleBar, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionTitleBar(C.QStyleOptionTitleBar_new()) ret.isSubclass = true return ret } // NewQStyleOptionTitleBar2 constructs a new QStyleOptionTitleBar object. func NewQStyleOptionTitleBar2(other *QStyleOptionTitleBar) *QStyleOptionTitleBar { - var outptr_QStyleOptionTitleBar *C.QStyleOptionTitleBar = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionTitleBar_new2(other.cPointer(), &outptr_QStyleOptionTitleBar, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionTitleBar(outptr_QStyleOptionTitleBar, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionTitleBar(C.QStyleOptionTitleBar_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -2288,44 +2091,34 @@ func (this *QStyleOptionGroupBox) UnsafePointer() unsafe.Pointer { } // newQStyleOptionGroupBox constructs the type using only CGO pointers. -func newQStyleOptionGroupBox(h *C.QStyleOptionGroupBox, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionGroupBox { +func newQStyleOptionGroupBox(h *C.QStyleOptionGroupBox) *QStyleOptionGroupBox { if h == nil { return nil } + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + C.QStyleOptionGroupBox_virtbase(h, &outptr_QStyleOptionComplex) + return &QStyleOptionGroupBox{h: h, - QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} + QStyleOptionComplex: newQStyleOptionComplex(outptr_QStyleOptionComplex)} } // UnsafeNewQStyleOptionGroupBox constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionGroupBox(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionGroupBox { - if h == nil { - return nil - } - - return &QStyleOptionGroupBox{h: (*C.QStyleOptionGroupBox)(h), - QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} +func UnsafeNewQStyleOptionGroupBox(h unsafe.Pointer) *QStyleOptionGroupBox { + return newQStyleOptionGroupBox((*C.QStyleOptionGroupBox)(h)) } // NewQStyleOptionGroupBox constructs a new QStyleOptionGroupBox object. func NewQStyleOptionGroupBox() *QStyleOptionGroupBox { - var outptr_QStyleOptionGroupBox *C.QStyleOptionGroupBox = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionGroupBox_new(&outptr_QStyleOptionGroupBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionGroupBox(outptr_QStyleOptionGroupBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionGroupBox(C.QStyleOptionGroupBox_new()) ret.isSubclass = true return ret } // NewQStyleOptionGroupBox2 constructs a new QStyleOptionGroupBox object. func NewQStyleOptionGroupBox2(other *QStyleOptionGroupBox) *QStyleOptionGroupBox { - var outptr_QStyleOptionGroupBox *C.QStyleOptionGroupBox = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionGroupBox_new2(other.cPointer(), &outptr_QStyleOptionGroupBox, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionGroupBox(outptr_QStyleOptionGroupBox, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionGroupBox(C.QStyleOptionGroupBox_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -2365,44 +2158,34 @@ func (this *QStyleOptionSizeGrip) UnsafePointer() unsafe.Pointer { } // newQStyleOptionSizeGrip constructs the type using only CGO pointers. -func newQStyleOptionSizeGrip(h *C.QStyleOptionSizeGrip, h_QStyleOptionComplex *C.QStyleOptionComplex, h_QStyleOption *C.QStyleOption) *QStyleOptionSizeGrip { +func newQStyleOptionSizeGrip(h *C.QStyleOptionSizeGrip) *QStyleOptionSizeGrip { if h == nil { return nil } + var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil + C.QStyleOptionSizeGrip_virtbase(h, &outptr_QStyleOptionComplex) + return &QStyleOptionSizeGrip{h: h, - QStyleOptionComplex: newQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} + QStyleOptionComplex: newQStyleOptionComplex(outptr_QStyleOptionComplex)} } // UnsafeNewQStyleOptionSizeGrip constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionSizeGrip(h unsafe.Pointer, h_QStyleOptionComplex unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionSizeGrip { - if h == nil { - return nil - } - - return &QStyleOptionSizeGrip{h: (*C.QStyleOptionSizeGrip)(h), - QStyleOptionComplex: UnsafeNewQStyleOptionComplex(h_QStyleOptionComplex, h_QStyleOption)} +func UnsafeNewQStyleOptionSizeGrip(h unsafe.Pointer) *QStyleOptionSizeGrip { + return newQStyleOptionSizeGrip((*C.QStyleOptionSizeGrip)(h)) } // NewQStyleOptionSizeGrip constructs a new QStyleOptionSizeGrip object. func NewQStyleOptionSizeGrip() *QStyleOptionSizeGrip { - var outptr_QStyleOptionSizeGrip *C.QStyleOptionSizeGrip = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionSizeGrip_new(&outptr_QStyleOptionSizeGrip, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionSizeGrip(outptr_QStyleOptionSizeGrip, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionSizeGrip(C.QStyleOptionSizeGrip_new()) ret.isSubclass = true return ret } // NewQStyleOptionSizeGrip2 constructs a new QStyleOptionSizeGrip object. func NewQStyleOptionSizeGrip2(other *QStyleOptionSizeGrip) *QStyleOptionSizeGrip { - var outptr_QStyleOptionSizeGrip *C.QStyleOptionSizeGrip = nil - var outptr_QStyleOptionComplex *C.QStyleOptionComplex = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionSizeGrip_new2(other.cPointer(), &outptr_QStyleOptionSizeGrip, &outptr_QStyleOptionComplex, &outptr_QStyleOption) - ret := newQStyleOptionSizeGrip(outptr_QStyleOptionSizeGrip, outptr_QStyleOptionComplex, outptr_QStyleOption) + ret := newQStyleOptionSizeGrip(C.QStyleOptionSizeGrip_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -2442,42 +2225,34 @@ func (this *QStyleOptionGraphicsItem) UnsafePointer() unsafe.Pointer { } // newQStyleOptionGraphicsItem constructs the type using only CGO pointers. -func newQStyleOptionGraphicsItem(h *C.QStyleOptionGraphicsItem, h_QStyleOption *C.QStyleOption) *QStyleOptionGraphicsItem { +func newQStyleOptionGraphicsItem(h *C.QStyleOptionGraphicsItem) *QStyleOptionGraphicsItem { if h == nil { return nil } + var outptr_QStyleOption *C.QStyleOption = nil + C.QStyleOptionGraphicsItem_virtbase(h, &outptr_QStyleOption) + return &QStyleOptionGraphicsItem{h: h, - QStyleOption: newQStyleOption(h_QStyleOption)} + QStyleOption: newQStyleOption(outptr_QStyleOption)} } // UnsafeNewQStyleOptionGraphicsItem constructs the type using only unsafe pointers. -func UnsafeNewQStyleOptionGraphicsItem(h unsafe.Pointer, h_QStyleOption unsafe.Pointer) *QStyleOptionGraphicsItem { - if h == nil { - return nil - } - - return &QStyleOptionGraphicsItem{h: (*C.QStyleOptionGraphicsItem)(h), - QStyleOption: UnsafeNewQStyleOption(h_QStyleOption)} +func UnsafeNewQStyleOptionGraphicsItem(h unsafe.Pointer) *QStyleOptionGraphicsItem { + return newQStyleOptionGraphicsItem((*C.QStyleOptionGraphicsItem)(h)) } // NewQStyleOptionGraphicsItem constructs a new QStyleOptionGraphicsItem object. func NewQStyleOptionGraphicsItem() *QStyleOptionGraphicsItem { - var outptr_QStyleOptionGraphicsItem *C.QStyleOptionGraphicsItem = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionGraphicsItem_new(&outptr_QStyleOptionGraphicsItem, &outptr_QStyleOption) - ret := newQStyleOptionGraphicsItem(outptr_QStyleOptionGraphicsItem, outptr_QStyleOption) + ret := newQStyleOptionGraphicsItem(C.QStyleOptionGraphicsItem_new()) ret.isSubclass = true return ret } // NewQStyleOptionGraphicsItem2 constructs a new QStyleOptionGraphicsItem object. func NewQStyleOptionGraphicsItem2(other *QStyleOptionGraphicsItem) *QStyleOptionGraphicsItem { - var outptr_QStyleOptionGraphicsItem *C.QStyleOptionGraphicsItem = nil - var outptr_QStyleOption *C.QStyleOption = nil - C.QStyleOptionGraphicsItem_new2(other.cPointer(), &outptr_QStyleOptionGraphicsItem, &outptr_QStyleOption) - ret := newQStyleOptionGraphicsItem(outptr_QStyleOptionGraphicsItem, outptr_QStyleOption) + ret := newQStyleOptionGraphicsItem(C.QStyleOptionGraphicsItem_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -2524,54 +2299,43 @@ func newQStyleHintReturn(h *C.QStyleHintReturn) *QStyleHintReturn { if h == nil { return nil } + return &QStyleHintReturn{h: h} } // UnsafeNewQStyleHintReturn constructs the type using only unsafe pointers. func UnsafeNewQStyleHintReturn(h unsafe.Pointer) *QStyleHintReturn { - if h == nil { - return nil - } - - return &QStyleHintReturn{h: (*C.QStyleHintReturn)(h)} + return newQStyleHintReturn((*C.QStyleHintReturn)(h)) } // NewQStyleHintReturn constructs a new QStyleHintReturn object. func NewQStyleHintReturn() *QStyleHintReturn { - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturn_new(&outptr_QStyleHintReturn) - ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret := newQStyleHintReturn(C.QStyleHintReturn_new()) ret.isSubclass = true return ret } // NewQStyleHintReturn2 constructs a new QStyleHintReturn object. func NewQStyleHintReturn2(param1 *QStyleHintReturn) *QStyleHintReturn { - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturn_new2(param1.cPointer(), &outptr_QStyleHintReturn) - ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret := newQStyleHintReturn(C.QStyleHintReturn_new2(param1.cPointer())) ret.isSubclass = true return ret } // NewQStyleHintReturn3 constructs a new QStyleHintReturn object. func NewQStyleHintReturn3(version int) *QStyleHintReturn { - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturn_new3((C.int)(version), &outptr_QStyleHintReturn) - ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret := newQStyleHintReturn(C.QStyleHintReturn_new3((C.int)(version))) ret.isSubclass = true return ret } // NewQStyleHintReturn4 constructs a new QStyleHintReturn object. func NewQStyleHintReturn4(version int, typeVal int) *QStyleHintReturn { - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturn_new4((C.int)(version), (C.int)(typeVal), &outptr_QStyleHintReturn) - ret := newQStyleHintReturn(outptr_QStyleHintReturn) + ret := newQStyleHintReturn(C.QStyleHintReturn_new4((C.int)(version), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -2615,42 +2379,34 @@ func (this *QStyleHintReturnMask) UnsafePointer() unsafe.Pointer { } // newQStyleHintReturnMask constructs the type using only CGO pointers. -func newQStyleHintReturnMask(h *C.QStyleHintReturnMask, h_QStyleHintReturn *C.QStyleHintReturn) *QStyleHintReturnMask { +func newQStyleHintReturnMask(h *C.QStyleHintReturnMask) *QStyleHintReturnMask { if h == nil { return nil } + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + C.QStyleHintReturnMask_virtbase(h, &outptr_QStyleHintReturn) + return &QStyleHintReturnMask{h: h, - QStyleHintReturn: newQStyleHintReturn(h_QStyleHintReturn)} + QStyleHintReturn: newQStyleHintReturn(outptr_QStyleHintReturn)} } // UnsafeNewQStyleHintReturnMask constructs the type using only unsafe pointers. -func UnsafeNewQStyleHintReturnMask(h unsafe.Pointer, h_QStyleHintReturn unsafe.Pointer) *QStyleHintReturnMask { - if h == nil { - return nil - } - - return &QStyleHintReturnMask{h: (*C.QStyleHintReturnMask)(h), - QStyleHintReturn: UnsafeNewQStyleHintReturn(h_QStyleHintReturn)} +func UnsafeNewQStyleHintReturnMask(h unsafe.Pointer) *QStyleHintReturnMask { + return newQStyleHintReturnMask((*C.QStyleHintReturnMask)(h)) } // NewQStyleHintReturnMask constructs a new QStyleHintReturnMask object. func NewQStyleHintReturnMask() *QStyleHintReturnMask { - var outptr_QStyleHintReturnMask *C.QStyleHintReturnMask = nil - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturnMask_new(&outptr_QStyleHintReturnMask, &outptr_QStyleHintReturn) - ret := newQStyleHintReturnMask(outptr_QStyleHintReturnMask, outptr_QStyleHintReturn) + ret := newQStyleHintReturnMask(C.QStyleHintReturnMask_new()) ret.isSubclass = true return ret } // NewQStyleHintReturnMask2 constructs a new QStyleHintReturnMask object. func NewQStyleHintReturnMask2(param1 *QStyleHintReturnMask) *QStyleHintReturnMask { - var outptr_QStyleHintReturnMask *C.QStyleHintReturnMask = nil - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturnMask_new2(param1.cPointer(), &outptr_QStyleHintReturnMask, &outptr_QStyleHintReturn) - ret := newQStyleHintReturnMask(outptr_QStyleHintReturnMask, outptr_QStyleHintReturn) + ret := newQStyleHintReturnMask(C.QStyleHintReturnMask_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -2694,42 +2450,34 @@ func (this *QStyleHintReturnVariant) UnsafePointer() unsafe.Pointer { } // newQStyleHintReturnVariant constructs the type using only CGO pointers. -func newQStyleHintReturnVariant(h *C.QStyleHintReturnVariant, h_QStyleHintReturn *C.QStyleHintReturn) *QStyleHintReturnVariant { +func newQStyleHintReturnVariant(h *C.QStyleHintReturnVariant) *QStyleHintReturnVariant { if h == nil { return nil } + var outptr_QStyleHintReturn *C.QStyleHintReturn = nil + C.QStyleHintReturnVariant_virtbase(h, &outptr_QStyleHintReturn) + return &QStyleHintReturnVariant{h: h, - QStyleHintReturn: newQStyleHintReturn(h_QStyleHintReturn)} + QStyleHintReturn: newQStyleHintReturn(outptr_QStyleHintReturn)} } // UnsafeNewQStyleHintReturnVariant constructs the type using only unsafe pointers. -func UnsafeNewQStyleHintReturnVariant(h unsafe.Pointer, h_QStyleHintReturn unsafe.Pointer) *QStyleHintReturnVariant { - if h == nil { - return nil - } - - return &QStyleHintReturnVariant{h: (*C.QStyleHintReturnVariant)(h), - QStyleHintReturn: UnsafeNewQStyleHintReturn(h_QStyleHintReturn)} +func UnsafeNewQStyleHintReturnVariant(h unsafe.Pointer) *QStyleHintReturnVariant { + return newQStyleHintReturnVariant((*C.QStyleHintReturnVariant)(h)) } // NewQStyleHintReturnVariant constructs a new QStyleHintReturnVariant object. func NewQStyleHintReturnVariant() *QStyleHintReturnVariant { - var outptr_QStyleHintReturnVariant *C.QStyleHintReturnVariant = nil - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturnVariant_new(&outptr_QStyleHintReturnVariant, &outptr_QStyleHintReturn) - ret := newQStyleHintReturnVariant(outptr_QStyleHintReturnVariant, outptr_QStyleHintReturn) + ret := newQStyleHintReturnVariant(C.QStyleHintReturnVariant_new()) ret.isSubclass = true return ret } // NewQStyleHintReturnVariant2 constructs a new QStyleHintReturnVariant object. func NewQStyleHintReturnVariant2(param1 *QStyleHintReturnVariant) *QStyleHintReturnVariant { - var outptr_QStyleHintReturnVariant *C.QStyleHintReturnVariant = nil - var outptr_QStyleHintReturn *C.QStyleHintReturn = nil - C.QStyleHintReturnVariant_new2(param1.cPointer(), &outptr_QStyleHintReturnVariant, &outptr_QStyleHintReturn) - ret := newQStyleHintReturnVariant(outptr_QStyleHintReturnVariant, outptr_QStyleHintReturn) + ret := newQStyleHintReturnVariant(C.QStyleHintReturnVariant_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qstyleoption.h b/qt6/gen_qstyleoption.h index ebbf59a7..f8da6ebc 100644 --- a/qt6/gen_qstyleoption.h +++ b/qt6/gen_qstyleoption.h @@ -78,127 +78,153 @@ typedef struct QTransform QTransform; typedef struct QWidget QWidget; #endif -void QStyleOption_new(QStyleOption** outptr_QStyleOption); -void QStyleOption_new2(QStyleOption* other, QStyleOption** outptr_QStyleOption); -void QStyleOption_new3(int version, QStyleOption** outptr_QStyleOption); -void QStyleOption_new4(int version, int typeVal, QStyleOption** outptr_QStyleOption); +QStyleOption* QStyleOption_new(); +QStyleOption* QStyleOption_new2(QStyleOption* other); +QStyleOption* QStyleOption_new3(int version); +QStyleOption* QStyleOption_new4(int version, int typeVal); void QStyleOption_InitFrom(QStyleOption* self, QWidget* w); void QStyleOption_OperatorAssign(QStyleOption* self, QStyleOption* other); void QStyleOption_Delete(QStyleOption* self, bool isSubclass); -void QStyleOptionFocusRect_new(QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption); -void QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other, QStyleOptionFocusRect** outptr_QStyleOptionFocusRect, QStyleOption** outptr_QStyleOption); +QStyleOptionFocusRect* QStyleOptionFocusRect_new(); +QStyleOptionFocusRect* QStyleOptionFocusRect_new2(QStyleOptionFocusRect* other); +void QStyleOptionFocusRect_virtbase(QStyleOptionFocusRect* src, QStyleOption** outptr_QStyleOption); void QStyleOptionFocusRect_Delete(QStyleOptionFocusRect* self, bool isSubclass); -void QStyleOptionFrame_new(QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption); -void QStyleOptionFrame_new2(QStyleOptionFrame* other, QStyleOptionFrame** outptr_QStyleOptionFrame, QStyleOption** outptr_QStyleOption); +QStyleOptionFrame* QStyleOptionFrame_new(); +QStyleOptionFrame* QStyleOptionFrame_new2(QStyleOptionFrame* other); +void QStyleOptionFrame_virtbase(QStyleOptionFrame* src, QStyleOption** outptr_QStyleOption); void QStyleOptionFrame_Delete(QStyleOptionFrame* self, bool isSubclass); -void QStyleOptionTabWidgetFrame_new(QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption); -void QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other, QStyleOptionTabWidgetFrame** outptr_QStyleOptionTabWidgetFrame, QStyleOption** outptr_QStyleOption); +QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new(); +QStyleOptionTabWidgetFrame* QStyleOptionTabWidgetFrame_new2(QStyleOptionTabWidgetFrame* other); +void QStyleOptionTabWidgetFrame_virtbase(QStyleOptionTabWidgetFrame* src, QStyleOption** outptr_QStyleOption); void QStyleOptionTabWidgetFrame_Delete(QStyleOptionTabWidgetFrame* self, bool isSubclass); -void QStyleOptionTabBarBase_new(QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption); -void QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other, QStyleOptionTabBarBase** outptr_QStyleOptionTabBarBase, QStyleOption** outptr_QStyleOption); +QStyleOptionTabBarBase* QStyleOptionTabBarBase_new(); +QStyleOptionTabBarBase* QStyleOptionTabBarBase_new2(QStyleOptionTabBarBase* other); +void QStyleOptionTabBarBase_virtbase(QStyleOptionTabBarBase* src, QStyleOption** outptr_QStyleOption); void QStyleOptionTabBarBase_Delete(QStyleOptionTabBarBase* self, bool isSubclass); -void QStyleOptionHeader_new(QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption); -void QStyleOptionHeader_new2(QStyleOptionHeader* other, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption); +QStyleOptionHeader* QStyleOptionHeader_new(); +QStyleOptionHeader* QStyleOptionHeader_new2(QStyleOptionHeader* other); +void QStyleOptionHeader_virtbase(QStyleOptionHeader* src, QStyleOption** outptr_QStyleOption); void QStyleOptionHeader_Delete(QStyleOptionHeader* self, bool isSubclass); -void QStyleOptionHeaderV2_new(QStyleOptionHeaderV2** outptr_QStyleOptionHeaderV2, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption); -void QStyleOptionHeaderV2_new2(QStyleOptionHeaderV2* other, QStyleOptionHeaderV2** outptr_QStyleOptionHeaderV2, QStyleOptionHeader** outptr_QStyleOptionHeader, QStyleOption** outptr_QStyleOption); +QStyleOptionHeaderV2* QStyleOptionHeaderV2_new(); +QStyleOptionHeaderV2* QStyleOptionHeaderV2_new2(QStyleOptionHeaderV2* other); +void QStyleOptionHeaderV2_virtbase(QStyleOptionHeaderV2* src, QStyleOptionHeader** outptr_QStyleOptionHeader); void QStyleOptionHeaderV2_Delete(QStyleOptionHeaderV2* self, bool isSubclass); -void QStyleOptionButton_new(QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption); -void QStyleOptionButton_new2(QStyleOptionButton* other, QStyleOptionButton** outptr_QStyleOptionButton, QStyleOption** outptr_QStyleOption); +QStyleOptionButton* QStyleOptionButton_new(); +QStyleOptionButton* QStyleOptionButton_new2(QStyleOptionButton* other); +void QStyleOptionButton_virtbase(QStyleOptionButton* src, QStyleOption** outptr_QStyleOption); void QStyleOptionButton_Delete(QStyleOptionButton* self, bool isSubclass); -void QStyleOptionTab_new(QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption); -void QStyleOptionTab_new2(QStyleOptionTab* other, QStyleOptionTab** outptr_QStyleOptionTab, QStyleOption** outptr_QStyleOption); +QStyleOptionTab* QStyleOptionTab_new(); +QStyleOptionTab* QStyleOptionTab_new2(QStyleOptionTab* other); +void QStyleOptionTab_virtbase(QStyleOptionTab* src, QStyleOption** outptr_QStyleOption); void QStyleOptionTab_Delete(QStyleOptionTab* self, bool isSubclass); -void QStyleOptionToolBar_new(QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption); -void QStyleOptionToolBar_new2(QStyleOptionToolBar* other, QStyleOptionToolBar** outptr_QStyleOptionToolBar, QStyleOption** outptr_QStyleOption); +QStyleOptionToolBar* QStyleOptionToolBar_new(); +QStyleOptionToolBar* QStyleOptionToolBar_new2(QStyleOptionToolBar* other); +void QStyleOptionToolBar_virtbase(QStyleOptionToolBar* src, QStyleOption** outptr_QStyleOption); void QStyleOptionToolBar_Delete(QStyleOptionToolBar* self, bool isSubclass); -void QStyleOptionProgressBar_new(QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption); -void QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other, QStyleOptionProgressBar** outptr_QStyleOptionProgressBar, QStyleOption** outptr_QStyleOption); +QStyleOptionProgressBar* QStyleOptionProgressBar_new(); +QStyleOptionProgressBar* QStyleOptionProgressBar_new2(QStyleOptionProgressBar* other); +void QStyleOptionProgressBar_virtbase(QStyleOptionProgressBar* src, QStyleOption** outptr_QStyleOption); void QStyleOptionProgressBar_Delete(QStyleOptionProgressBar* self, bool isSubclass); -void QStyleOptionMenuItem_new(QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption); -void QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other, QStyleOptionMenuItem** outptr_QStyleOptionMenuItem, QStyleOption** outptr_QStyleOption); +QStyleOptionMenuItem* QStyleOptionMenuItem_new(); +QStyleOptionMenuItem* QStyleOptionMenuItem_new2(QStyleOptionMenuItem* other); +void QStyleOptionMenuItem_virtbase(QStyleOptionMenuItem* src, QStyleOption** outptr_QStyleOption); void QStyleOptionMenuItem_Delete(QStyleOptionMenuItem* self, bool isSubclass); -void QStyleOptionDockWidget_new(QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption); -void QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other, QStyleOptionDockWidget** outptr_QStyleOptionDockWidget, QStyleOption** outptr_QStyleOption); +QStyleOptionDockWidget* QStyleOptionDockWidget_new(); +QStyleOptionDockWidget* QStyleOptionDockWidget_new2(QStyleOptionDockWidget* other); +void QStyleOptionDockWidget_virtbase(QStyleOptionDockWidget* src, QStyleOption** outptr_QStyleOption); void QStyleOptionDockWidget_Delete(QStyleOptionDockWidget* self, bool isSubclass); -void QStyleOptionViewItem_new(QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption); -void QStyleOptionViewItem_new2(QStyleOptionViewItem* other, QStyleOptionViewItem** outptr_QStyleOptionViewItem, QStyleOption** outptr_QStyleOption); +QStyleOptionViewItem* QStyleOptionViewItem_new(); +QStyleOptionViewItem* QStyleOptionViewItem_new2(QStyleOptionViewItem* other); +void QStyleOptionViewItem_virtbase(QStyleOptionViewItem* src, QStyleOption** outptr_QStyleOption); void QStyleOptionViewItem_Delete(QStyleOptionViewItem* self, bool isSubclass); -void QStyleOptionToolBox_new(QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption); -void QStyleOptionToolBox_new2(QStyleOptionToolBox* other, QStyleOptionToolBox** outptr_QStyleOptionToolBox, QStyleOption** outptr_QStyleOption); +QStyleOptionToolBox* QStyleOptionToolBox_new(); +QStyleOptionToolBox* QStyleOptionToolBox_new2(QStyleOptionToolBox* other); +void QStyleOptionToolBox_virtbase(QStyleOptionToolBox* src, QStyleOption** outptr_QStyleOption); void QStyleOptionToolBox_Delete(QStyleOptionToolBox* self, bool isSubclass); -void QStyleOptionRubberBand_new(QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption); -void QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other, QStyleOptionRubberBand** outptr_QStyleOptionRubberBand, QStyleOption** outptr_QStyleOption); +QStyleOptionRubberBand* QStyleOptionRubberBand_new(); +QStyleOptionRubberBand* QStyleOptionRubberBand_new2(QStyleOptionRubberBand* other); +void QStyleOptionRubberBand_virtbase(QStyleOptionRubberBand* src, QStyleOption** outptr_QStyleOption); void QStyleOptionRubberBand_Delete(QStyleOptionRubberBand* self, bool isSubclass); -void QStyleOptionComplex_new(QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionComplex_new2(QStyleOptionComplex* other, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionComplex_new3(int version, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionComplex_new4(int version, int typeVal, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionComplex* QStyleOptionComplex_new(); +QStyleOptionComplex* QStyleOptionComplex_new2(QStyleOptionComplex* other); +QStyleOptionComplex* QStyleOptionComplex_new3(int version); +QStyleOptionComplex* QStyleOptionComplex_new4(int version, int typeVal); +void QStyleOptionComplex_virtbase(QStyleOptionComplex* src, QStyleOption** outptr_QStyleOption); void QStyleOptionComplex_Delete(QStyleOptionComplex* self, bool isSubclass); -void QStyleOptionSlider_new(QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionSlider_new2(QStyleOptionSlider* other, QStyleOptionSlider** outptr_QStyleOptionSlider, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionSlider* QStyleOptionSlider_new(); +QStyleOptionSlider* QStyleOptionSlider_new2(QStyleOptionSlider* other); +void QStyleOptionSlider_virtbase(QStyleOptionSlider* src, QStyleOptionComplex** outptr_QStyleOptionComplex); void QStyleOptionSlider_Delete(QStyleOptionSlider* self, bool isSubclass); -void QStyleOptionSpinBox_new(QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other, QStyleOptionSpinBox** outptr_QStyleOptionSpinBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionSpinBox* QStyleOptionSpinBox_new(); +QStyleOptionSpinBox* QStyleOptionSpinBox_new2(QStyleOptionSpinBox* other); +void QStyleOptionSpinBox_virtbase(QStyleOptionSpinBox* src, QStyleOptionComplex** outptr_QStyleOptionComplex); void QStyleOptionSpinBox_Delete(QStyleOptionSpinBox* self, bool isSubclass); -void QStyleOptionToolButton_new(QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionToolButton_new2(QStyleOptionToolButton* other, QStyleOptionToolButton** outptr_QStyleOptionToolButton, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionToolButton* QStyleOptionToolButton_new(); +QStyleOptionToolButton* QStyleOptionToolButton_new2(QStyleOptionToolButton* other); +void QStyleOptionToolButton_virtbase(QStyleOptionToolButton* src, QStyleOptionComplex** outptr_QStyleOptionComplex); void QStyleOptionToolButton_Delete(QStyleOptionToolButton* self, bool isSubclass); -void QStyleOptionComboBox_new(QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionComboBox_new2(QStyleOptionComboBox* other, QStyleOptionComboBox** outptr_QStyleOptionComboBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionComboBox* QStyleOptionComboBox_new(); +QStyleOptionComboBox* QStyleOptionComboBox_new2(QStyleOptionComboBox* other); +void QStyleOptionComboBox_virtbase(QStyleOptionComboBox* src, QStyleOptionComplex** outptr_QStyleOptionComplex); void QStyleOptionComboBox_Delete(QStyleOptionComboBox* self, bool isSubclass); -void QStyleOptionTitleBar_new(QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other, QStyleOptionTitleBar** outptr_QStyleOptionTitleBar, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionTitleBar* QStyleOptionTitleBar_new(); +QStyleOptionTitleBar* QStyleOptionTitleBar_new2(QStyleOptionTitleBar* other); +void QStyleOptionTitleBar_virtbase(QStyleOptionTitleBar* src, QStyleOptionComplex** outptr_QStyleOptionComplex); void QStyleOptionTitleBar_Delete(QStyleOptionTitleBar* self, bool isSubclass); -void QStyleOptionGroupBox_new(QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other, QStyleOptionGroupBox** outptr_QStyleOptionGroupBox, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionGroupBox* QStyleOptionGroupBox_new(); +QStyleOptionGroupBox* QStyleOptionGroupBox_new2(QStyleOptionGroupBox* other); +void QStyleOptionGroupBox_virtbase(QStyleOptionGroupBox* src, QStyleOptionComplex** outptr_QStyleOptionComplex); void QStyleOptionGroupBox_Delete(QStyleOptionGroupBox* self, bool isSubclass); -void QStyleOptionSizeGrip_new(QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); -void QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other, QStyleOptionSizeGrip** outptr_QStyleOptionSizeGrip, QStyleOptionComplex** outptr_QStyleOptionComplex, QStyleOption** outptr_QStyleOption); +QStyleOptionSizeGrip* QStyleOptionSizeGrip_new(); +QStyleOptionSizeGrip* QStyleOptionSizeGrip_new2(QStyleOptionSizeGrip* other); +void QStyleOptionSizeGrip_virtbase(QStyleOptionSizeGrip* src, QStyleOptionComplex** outptr_QStyleOptionComplex); void QStyleOptionSizeGrip_Delete(QStyleOptionSizeGrip* self, bool isSubclass); -void QStyleOptionGraphicsItem_new(QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption); -void QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other, QStyleOptionGraphicsItem** outptr_QStyleOptionGraphicsItem, QStyleOption** outptr_QStyleOption); +QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new(); +QStyleOptionGraphicsItem* QStyleOptionGraphicsItem_new2(QStyleOptionGraphicsItem* other); +void QStyleOptionGraphicsItem_virtbase(QStyleOptionGraphicsItem* src, QStyleOption** outptr_QStyleOption); double QStyleOptionGraphicsItem_LevelOfDetailFromTransform(QTransform* worldTransform); void QStyleOptionGraphicsItem_Delete(QStyleOptionGraphicsItem* self, bool isSubclass); -void QStyleHintReturn_new(QStyleHintReturn** outptr_QStyleHintReturn); -void QStyleHintReturn_new2(QStyleHintReturn* param1, QStyleHintReturn** outptr_QStyleHintReturn); -void QStyleHintReturn_new3(int version, QStyleHintReturn** outptr_QStyleHintReturn); -void QStyleHintReturn_new4(int version, int typeVal, QStyleHintReturn** outptr_QStyleHintReturn); +QStyleHintReturn* QStyleHintReturn_new(); +QStyleHintReturn* QStyleHintReturn_new2(QStyleHintReturn* param1); +QStyleHintReturn* QStyleHintReturn_new3(int version); +QStyleHintReturn* QStyleHintReturn_new4(int version, int typeVal); void QStyleHintReturn_OperatorAssign(QStyleHintReturn* self, QStyleHintReturn* param1); void QStyleHintReturn_Delete(QStyleHintReturn* self, bool isSubclass); -void QStyleHintReturnMask_new(QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn); -void QStyleHintReturnMask_new2(QStyleHintReturnMask* param1, QStyleHintReturnMask** outptr_QStyleHintReturnMask, QStyleHintReturn** outptr_QStyleHintReturn); +QStyleHintReturnMask* QStyleHintReturnMask_new(); +QStyleHintReturnMask* QStyleHintReturnMask_new2(QStyleHintReturnMask* param1); +void QStyleHintReturnMask_virtbase(QStyleHintReturnMask* src, QStyleHintReturn** outptr_QStyleHintReturn); void QStyleHintReturnMask_OperatorAssign(QStyleHintReturnMask* self, QStyleHintReturnMask* param1); void QStyleHintReturnMask_Delete(QStyleHintReturnMask* self, bool isSubclass); -void QStyleHintReturnVariant_new(QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn); -void QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1, QStyleHintReturnVariant** outptr_QStyleHintReturnVariant, QStyleHintReturn** outptr_QStyleHintReturn); +QStyleHintReturnVariant* QStyleHintReturnVariant_new(); +QStyleHintReturnVariant* QStyleHintReturnVariant_new2(QStyleHintReturnVariant* param1); +void QStyleHintReturnVariant_virtbase(QStyleHintReturnVariant* src, QStyleHintReturn** outptr_QStyleHintReturn); void QStyleHintReturnVariant_OperatorAssign(QStyleHintReturnVariant* self, QStyleHintReturnVariant* param1); void QStyleHintReturnVariant_Delete(QStyleHintReturnVariant* self, bool isSubclass); diff --git a/qt6/gen_qstylepainter.cpp b/qt6/gen_qstylepainter.cpp index d0f15ade..b9ac7929 100644 --- a/qt6/gen_qstylepainter.cpp +++ b/qt6/gen_qstylepainter.cpp @@ -15,22 +15,20 @@ #include "gen_qstylepainter.h" #include "_cgo_export.h" -void QStylePainter_new(QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter) { - QStylePainter* ret = new QStylePainter(w); - *outptr_QStylePainter = ret; - *outptr_QPainter = static_cast(ret); +QStylePainter* QStylePainter_new(QWidget* w) { + return new QStylePainter(w); } -void QStylePainter_new2(QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter) { - QStylePainter* ret = new QStylePainter(); - *outptr_QStylePainter = ret; - *outptr_QPainter = static_cast(ret); +QStylePainter* QStylePainter_new2() { + return new QStylePainter(); } -void QStylePainter_new3(QPaintDevice* pd, QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter) { - QStylePainter* ret = new QStylePainter(pd, w); - *outptr_QStylePainter = ret; - *outptr_QPainter = static_cast(ret); +QStylePainter* QStylePainter_new3(QPaintDevice* pd, QWidget* w) { + return new QStylePainter(pd, w); +} + +void QStylePainter_virtbase(QStylePainter* src, QPainter** outptr_QPainter) { + *outptr_QPainter = static_cast(src); } bool QStylePainter_Begin(QStylePainter* self, QWidget* w) { diff --git a/qt6/gen_qstylepainter.go b/qt6/gen_qstylepainter.go index e98e7257..802c9242 100644 --- a/qt6/gen_qstylepainter.go +++ b/qt6/gen_qstylepainter.go @@ -34,53 +34,42 @@ func (this *QStylePainter) UnsafePointer() unsafe.Pointer { } // newQStylePainter constructs the type using only CGO pointers. -func newQStylePainter(h *C.QStylePainter, h_QPainter *C.QPainter) *QStylePainter { +func newQStylePainter(h *C.QStylePainter) *QStylePainter { if h == nil { return nil } + var outptr_QPainter *C.QPainter = nil + C.QStylePainter_virtbase(h, &outptr_QPainter) + return &QStylePainter{h: h, - QPainter: newQPainter(h_QPainter)} + QPainter: newQPainter(outptr_QPainter)} } // UnsafeNewQStylePainter constructs the type using only unsafe pointers. -func UnsafeNewQStylePainter(h unsafe.Pointer, h_QPainter unsafe.Pointer) *QStylePainter { - if h == nil { - return nil - } - - return &QStylePainter{h: (*C.QStylePainter)(h), - QPainter: UnsafeNewQPainter(h_QPainter)} +func UnsafeNewQStylePainter(h unsafe.Pointer) *QStylePainter { + return newQStylePainter((*C.QStylePainter)(h)) } // NewQStylePainter constructs a new QStylePainter object. func NewQStylePainter(w *QWidget) *QStylePainter { - var outptr_QStylePainter *C.QStylePainter = nil - var outptr_QPainter *C.QPainter = nil - C.QStylePainter_new(w.cPointer(), &outptr_QStylePainter, &outptr_QPainter) - ret := newQStylePainter(outptr_QStylePainter, outptr_QPainter) + ret := newQStylePainter(C.QStylePainter_new(w.cPointer())) ret.isSubclass = true return ret } // NewQStylePainter2 constructs a new QStylePainter object. func NewQStylePainter2() *QStylePainter { - var outptr_QStylePainter *C.QStylePainter = nil - var outptr_QPainter *C.QPainter = nil - C.QStylePainter_new2(&outptr_QStylePainter, &outptr_QPainter) - ret := newQStylePainter(outptr_QStylePainter, outptr_QPainter) + ret := newQStylePainter(C.QStylePainter_new2()) ret.isSubclass = true return ret } // NewQStylePainter3 constructs a new QStylePainter object. func NewQStylePainter3(pd *QPaintDevice, w *QWidget) *QStylePainter { - var outptr_QStylePainter *C.QStylePainter = nil - var outptr_QPainter *C.QPainter = nil - C.QStylePainter_new3(pd.cPointer(), w.cPointer(), &outptr_QStylePainter, &outptr_QPainter) - ret := newQStylePainter(outptr_QStylePainter, outptr_QPainter) + ret := newQStylePainter(C.QStylePainter_new3(pd.cPointer(), w.cPointer())) ret.isSubclass = true return ret } @@ -118,7 +107,7 @@ func (this *QStylePainter) DrawItemPixmap(r *QRect, flags int, pixmap *QPixmap) } func (this *QStylePainter) Style() *QStyle { - return newQStyle(C.QStylePainter_Style(this.h), nil) + return newQStyle(C.QStylePainter_Style(this.h)) } func (this *QStylePainter) DrawItemText6(r *QRect, flags int, pal *QPalette, enabled bool, text string, textRole QPalette__ColorRole) { diff --git a/qt6/gen_qstylepainter.h b/qt6/gen_qstylepainter.h index 01ca166e..c6e8d6b6 100644 --- a/qt6/gen_qstylepainter.h +++ b/qt6/gen_qstylepainter.h @@ -38,9 +38,10 @@ typedef struct QStylePainter QStylePainter; typedef struct QWidget QWidget; #endif -void QStylePainter_new(QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter); -void QStylePainter_new2(QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter); -void QStylePainter_new3(QPaintDevice* pd, QWidget* w, QStylePainter** outptr_QStylePainter, QPainter** outptr_QPainter); +QStylePainter* QStylePainter_new(QWidget* w); +QStylePainter* QStylePainter_new2(); +QStylePainter* QStylePainter_new3(QPaintDevice* pd, QWidget* w); +void QStylePainter_virtbase(QStylePainter* src, QPainter** outptr_QPainter); bool QStylePainter_Begin(QStylePainter* self, QWidget* w); bool QStylePainter_Begin2(QStylePainter* self, QPaintDevice* pd, QWidget* w); void QStylePainter_DrawPrimitive(QStylePainter* self, int pe, QStyleOption* opt); diff --git a/qt6/gen_qstyleplugin.cpp b/qt6/gen_qstyleplugin.cpp index f3ee5c18..cf372670 100644 --- a/qt6/gen_qstyleplugin.cpp +++ b/qt6/gen_qstyleplugin.cpp @@ -217,16 +217,16 @@ public: }; -void QStylePlugin_new(QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject) { - MiqtVirtualQStylePlugin* ret = new MiqtVirtualQStylePlugin(); - *outptr_QStylePlugin = ret; - *outptr_QObject = static_cast(ret); +QStylePlugin* QStylePlugin_new() { + return new MiqtVirtualQStylePlugin(); } -void QStylePlugin_new2(QObject* parent, QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject) { - MiqtVirtualQStylePlugin* ret = new MiqtVirtualQStylePlugin(parent); - *outptr_QStylePlugin = ret; - *outptr_QObject = static_cast(ret); +QStylePlugin* QStylePlugin_new2(QObject* parent) { + return new MiqtVirtualQStylePlugin(parent); +} + +void QStylePlugin_virtbase(QStylePlugin* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QStylePlugin_MetaObject(const QStylePlugin* self) { diff --git a/qt6/gen_qstyleplugin.go b/qt6/gen_qstyleplugin.go index a6ba7356..d2edd24d 100644 --- a/qt6/gen_qstyleplugin.go +++ b/qt6/gen_qstyleplugin.go @@ -35,42 +35,34 @@ func (this *QStylePlugin) UnsafePointer() unsafe.Pointer { } // newQStylePlugin constructs the type using only CGO pointers. -func newQStylePlugin(h *C.QStylePlugin, h_QObject *C.QObject) *QStylePlugin { +func newQStylePlugin(h *C.QStylePlugin) *QStylePlugin { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QStylePlugin_virtbase(h, &outptr_QObject) + return &QStylePlugin{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQStylePlugin constructs the type using only unsafe pointers. -func UnsafeNewQStylePlugin(h unsafe.Pointer, h_QObject unsafe.Pointer) *QStylePlugin { - if h == nil { - return nil - } - - return &QStylePlugin{h: (*C.QStylePlugin)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQStylePlugin(h unsafe.Pointer) *QStylePlugin { + return newQStylePlugin((*C.QStylePlugin)(h)) } // NewQStylePlugin constructs a new QStylePlugin object. func NewQStylePlugin() *QStylePlugin { - var outptr_QStylePlugin *C.QStylePlugin = nil - var outptr_QObject *C.QObject = nil - C.QStylePlugin_new(&outptr_QStylePlugin, &outptr_QObject) - ret := newQStylePlugin(outptr_QStylePlugin, outptr_QObject) + ret := newQStylePlugin(C.QStylePlugin_new()) ret.isSubclass = true return ret } // NewQStylePlugin2 constructs a new QStylePlugin object. func NewQStylePlugin2(parent *QObject) *QStylePlugin { - var outptr_QStylePlugin *C.QStylePlugin = nil - var outptr_QObject *C.QObject = nil - C.QStylePlugin_new2(parent.cPointer(), &outptr_QStylePlugin, &outptr_QObject) - ret := newQStylePlugin(outptr_QStylePlugin, outptr_QObject) + ret := newQStylePlugin(C.QStylePlugin_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -99,7 +91,7 @@ func (this *QStylePlugin) Create(key string) *QStyle { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - return newQStyle(C.QStylePlugin_Create(this.h, key_ms), nil) + return newQStyle(C.QStylePlugin_Create(this.h, key_ms)) } func QStylePlugin_Tr2(s string, c string) string { @@ -227,7 +219,7 @@ func miqt_exec_callback_QStylePlugin_TimerEvent(self *C.QStylePlugin, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QStylePlugin{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -253,7 +245,7 @@ func miqt_exec_callback_QStylePlugin_ChildEvent(self *C.QStylePlugin, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QStylePlugin{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qstyleplugin.h b/qt6/gen_qstyleplugin.h index 46282673..f8d6a09e 100644 --- a/qt6/gen_qstyleplugin.h +++ b/qt6/gen_qstyleplugin.h @@ -34,8 +34,9 @@ typedef struct QStylePlugin QStylePlugin; typedef struct QTimerEvent QTimerEvent; #endif -void QStylePlugin_new(QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject); -void QStylePlugin_new2(QObject* parent, QStylePlugin** outptr_QStylePlugin, QObject** outptr_QObject); +QStylePlugin* QStylePlugin_new(); +QStylePlugin* QStylePlugin_new2(QObject* parent); +void QStylePlugin_virtbase(QStylePlugin* src, QObject** outptr_QObject); QMetaObject* QStylePlugin_MetaObject(const QStylePlugin* self); void* QStylePlugin_Metacast(QStylePlugin* self, const char* param1); struct miqt_string QStylePlugin_Tr(const char* s); diff --git a/qt6/gen_qsurface.go b/qt6/gen_qsurface.go index c97930f6..a475c03b 100644 --- a/qt6/gen_qsurface.go +++ b/qt6/gen_qsurface.go @@ -56,16 +56,13 @@ func newQSurface(h *C.QSurface) *QSurface { if h == nil { return nil } + return &QSurface{h: h} } // UnsafeNewQSurface constructs the type using only unsafe pointers. func UnsafeNewQSurface(h unsafe.Pointer) *QSurface { - if h == nil { - return nil - } - - return &QSurface{h: (*C.QSurface)(h)} + return newQSurface((*C.QSurface)(h)) } func (this *QSurface) SurfaceClass() QSurface__SurfaceClass { diff --git a/qt6/gen_qsurfaceformat.cpp b/qt6/gen_qsurfaceformat.cpp index 1939a48e..f2458415 100644 --- a/qt6/gen_qsurfaceformat.cpp +++ b/qt6/gen_qsurfaceformat.cpp @@ -5,19 +5,16 @@ #include "gen_qsurfaceformat.h" #include "_cgo_export.h" -void QSurfaceFormat_new(QSurfaceFormat** outptr_QSurfaceFormat) { - QSurfaceFormat* ret = new QSurfaceFormat(); - *outptr_QSurfaceFormat = ret; +QSurfaceFormat* QSurfaceFormat_new() { + return new QSurfaceFormat(); } -void QSurfaceFormat_new2(int options, QSurfaceFormat** outptr_QSurfaceFormat) { - QSurfaceFormat* ret = new QSurfaceFormat(static_cast(options)); - *outptr_QSurfaceFormat = ret; +QSurfaceFormat* QSurfaceFormat_new2(int options) { + return new QSurfaceFormat(static_cast(options)); } -void QSurfaceFormat_new3(QSurfaceFormat* other, QSurfaceFormat** outptr_QSurfaceFormat) { - QSurfaceFormat* ret = new QSurfaceFormat(*other); - *outptr_QSurfaceFormat = ret; +QSurfaceFormat* QSurfaceFormat_new3(QSurfaceFormat* other) { + return new QSurfaceFormat(*other); } void QSurfaceFormat_OperatorAssign(QSurfaceFormat* self, QSurfaceFormat* other) { diff --git a/qt6/gen_qsurfaceformat.go b/qt6/gen_qsurfaceformat.go index 344d12a0..3919e1ed 100644 --- a/qt6/gen_qsurfaceformat.go +++ b/qt6/gen_qsurfaceformat.go @@ -80,44 +80,35 @@ func newQSurfaceFormat(h *C.QSurfaceFormat) *QSurfaceFormat { if h == nil { return nil } + return &QSurfaceFormat{h: h} } // UnsafeNewQSurfaceFormat constructs the type using only unsafe pointers. func UnsafeNewQSurfaceFormat(h unsafe.Pointer) *QSurfaceFormat { - if h == nil { - return nil - } - - return &QSurfaceFormat{h: (*C.QSurfaceFormat)(h)} + return newQSurfaceFormat((*C.QSurfaceFormat)(h)) } // NewQSurfaceFormat constructs a new QSurfaceFormat object. func NewQSurfaceFormat() *QSurfaceFormat { - var outptr_QSurfaceFormat *C.QSurfaceFormat = nil - C.QSurfaceFormat_new(&outptr_QSurfaceFormat) - ret := newQSurfaceFormat(outptr_QSurfaceFormat) + ret := newQSurfaceFormat(C.QSurfaceFormat_new()) ret.isSubclass = true return ret } // NewQSurfaceFormat2 constructs a new QSurfaceFormat object. func NewQSurfaceFormat2(options QSurfaceFormat__FormatOption) *QSurfaceFormat { - var outptr_QSurfaceFormat *C.QSurfaceFormat = nil - C.QSurfaceFormat_new2((C.int)(options), &outptr_QSurfaceFormat) - ret := newQSurfaceFormat(outptr_QSurfaceFormat) + ret := newQSurfaceFormat(C.QSurfaceFormat_new2((C.int)(options))) ret.isSubclass = true return ret } // NewQSurfaceFormat3 constructs a new QSurfaceFormat object. func NewQSurfaceFormat3(other *QSurfaceFormat) *QSurfaceFormat { - var outptr_QSurfaceFormat *C.QSurfaceFormat = nil - C.QSurfaceFormat_new3(other.cPointer(), &outptr_QSurfaceFormat) - ret := newQSurfaceFormat(outptr_QSurfaceFormat) + ret := newQSurfaceFormat(C.QSurfaceFormat_new3(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qsurfaceformat.h b/qt6/gen_qsurfaceformat.h index f2ced619..b7910a89 100644 --- a/qt6/gen_qsurfaceformat.h +++ b/qt6/gen_qsurfaceformat.h @@ -22,9 +22,9 @@ typedef struct QColorSpace QColorSpace; typedef struct QSurfaceFormat QSurfaceFormat; #endif -void QSurfaceFormat_new(QSurfaceFormat** outptr_QSurfaceFormat); -void QSurfaceFormat_new2(int options, QSurfaceFormat** outptr_QSurfaceFormat); -void QSurfaceFormat_new3(QSurfaceFormat* other, QSurfaceFormat** outptr_QSurfaceFormat); +QSurfaceFormat* QSurfaceFormat_new(); +QSurfaceFormat* QSurfaceFormat_new2(int options); +QSurfaceFormat* QSurfaceFormat_new3(QSurfaceFormat* other); void QSurfaceFormat_OperatorAssign(QSurfaceFormat* self, QSurfaceFormat* other); void QSurfaceFormat_SetDepthBufferSize(QSurfaceFormat* self, int size); int QSurfaceFormat_DepthBufferSize(const QSurfaceFormat* self); diff --git a/qt6/gen_qsyntaxhighlighter.cpp b/qt6/gen_qsyntaxhighlighter.cpp index 20e9a266..dbc352d8 100644 --- a/qt6/gen_qsyntaxhighlighter.cpp +++ b/qt6/gen_qsyntaxhighlighter.cpp @@ -218,16 +218,16 @@ public: }; -void QSyntaxHighlighter_new(QObject* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject) { - MiqtVirtualQSyntaxHighlighter* ret = new MiqtVirtualQSyntaxHighlighter(parent); - *outptr_QSyntaxHighlighter = ret; - *outptr_QObject = static_cast(ret); +QSyntaxHighlighter* QSyntaxHighlighter_new(QObject* parent) { + return new MiqtVirtualQSyntaxHighlighter(parent); } -void QSyntaxHighlighter_new2(QTextDocument* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject) { - MiqtVirtualQSyntaxHighlighter* ret = new MiqtVirtualQSyntaxHighlighter(parent); - *outptr_QSyntaxHighlighter = ret; - *outptr_QObject = static_cast(ret); +QSyntaxHighlighter* QSyntaxHighlighter_new2(QTextDocument* parent) { + return new MiqtVirtualQSyntaxHighlighter(parent); +} + +void QSyntaxHighlighter_virtbase(QSyntaxHighlighter* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSyntaxHighlighter_MetaObject(const QSyntaxHighlighter* self) { diff --git a/qt6/gen_qsyntaxhighlighter.go b/qt6/gen_qsyntaxhighlighter.go index b0cbebb0..78204d2d 100644 --- a/qt6/gen_qsyntaxhighlighter.go +++ b/qt6/gen_qsyntaxhighlighter.go @@ -35,42 +35,34 @@ func (this *QSyntaxHighlighter) UnsafePointer() unsafe.Pointer { } // newQSyntaxHighlighter constructs the type using only CGO pointers. -func newQSyntaxHighlighter(h *C.QSyntaxHighlighter, h_QObject *C.QObject) *QSyntaxHighlighter { +func newQSyntaxHighlighter(h *C.QSyntaxHighlighter) *QSyntaxHighlighter { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSyntaxHighlighter_virtbase(h, &outptr_QObject) + return &QSyntaxHighlighter{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQSyntaxHighlighter constructs the type using only unsafe pointers. -func UnsafeNewQSyntaxHighlighter(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSyntaxHighlighter { - if h == nil { - return nil - } - - return &QSyntaxHighlighter{h: (*C.QSyntaxHighlighter)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQSyntaxHighlighter(h unsafe.Pointer) *QSyntaxHighlighter { + return newQSyntaxHighlighter((*C.QSyntaxHighlighter)(h)) } // NewQSyntaxHighlighter constructs a new QSyntaxHighlighter object. func NewQSyntaxHighlighter(parent *QObject) *QSyntaxHighlighter { - var outptr_QSyntaxHighlighter *C.QSyntaxHighlighter = nil - var outptr_QObject *C.QObject = nil - C.QSyntaxHighlighter_new(parent.cPointer(), &outptr_QSyntaxHighlighter, &outptr_QObject) - ret := newQSyntaxHighlighter(outptr_QSyntaxHighlighter, outptr_QObject) + ret := newQSyntaxHighlighter(C.QSyntaxHighlighter_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQSyntaxHighlighter2 constructs a new QSyntaxHighlighter object. func NewQSyntaxHighlighter2(parent *QTextDocument) *QSyntaxHighlighter { - var outptr_QSyntaxHighlighter *C.QSyntaxHighlighter = nil - var outptr_QObject *C.QObject = nil - C.QSyntaxHighlighter_new2(parent.cPointer(), &outptr_QSyntaxHighlighter, &outptr_QObject) - ret := newQSyntaxHighlighter(outptr_QSyntaxHighlighter, outptr_QObject) + ret := newQSyntaxHighlighter(C.QSyntaxHighlighter_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -99,7 +91,7 @@ func (this *QSyntaxHighlighter) SetDocument(doc *QTextDocument) { } func (this *QSyntaxHighlighter) Document() *QTextDocument { - return newQTextDocument(C.QSyntaxHighlighter_Document(this.h), nil) + return newQTextDocument(C.QSyntaxHighlighter_Document(this.h)) } func (this *QSyntaxHighlighter) Rehighlight() { @@ -233,7 +225,7 @@ func miqt_exec_callback_QSyntaxHighlighter_TimerEvent(self *C.QSyntaxHighlighter } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QSyntaxHighlighter{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -259,7 +251,7 @@ func miqt_exec_callback_QSyntaxHighlighter_ChildEvent(self *C.QSyntaxHighlighter } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QSyntaxHighlighter{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qsyntaxhighlighter.h b/qt6/gen_qsyntaxhighlighter.h index 2a852976..8fc77a9f 100644 --- a/qt6/gen_qsyntaxhighlighter.h +++ b/qt6/gen_qsyntaxhighlighter.h @@ -36,8 +36,9 @@ typedef struct QTextDocument QTextDocument; typedef struct QTimerEvent QTimerEvent; #endif -void QSyntaxHighlighter_new(QObject* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject); -void QSyntaxHighlighter_new2(QTextDocument* parent, QSyntaxHighlighter** outptr_QSyntaxHighlighter, QObject** outptr_QObject); +QSyntaxHighlighter* QSyntaxHighlighter_new(QObject* parent); +QSyntaxHighlighter* QSyntaxHighlighter_new2(QTextDocument* parent); +void QSyntaxHighlighter_virtbase(QSyntaxHighlighter* src, QObject** outptr_QObject); QMetaObject* QSyntaxHighlighter_MetaObject(const QSyntaxHighlighter* self); void* QSyntaxHighlighter_Metacast(QSyntaxHighlighter* self, const char* param1); struct miqt_string QSyntaxHighlighter_Tr(const char* s); diff --git a/qt6/gen_qsystemsemaphore.cpp b/qt6/gen_qsystemsemaphore.cpp index f702ed93..10af469b 100644 --- a/qt6/gen_qsystemsemaphore.cpp +++ b/qt6/gen_qsystemsemaphore.cpp @@ -6,22 +6,19 @@ #include "gen_qsystemsemaphore.h" #include "_cgo_export.h" -void QSystemSemaphore_new(struct miqt_string key, QSystemSemaphore** outptr_QSystemSemaphore) { +QSystemSemaphore* QSystemSemaphore_new(struct miqt_string key) { QString key_QString = QString::fromUtf8(key.data, key.len); - QSystemSemaphore* ret = new QSystemSemaphore(key_QString); - *outptr_QSystemSemaphore = ret; + return new QSystemSemaphore(key_QString); } -void QSystemSemaphore_new2(struct miqt_string key, int initialValue, QSystemSemaphore** outptr_QSystemSemaphore) { +QSystemSemaphore* QSystemSemaphore_new2(struct miqt_string key, int initialValue) { QString key_QString = QString::fromUtf8(key.data, key.len); - QSystemSemaphore* ret = new QSystemSemaphore(key_QString, static_cast(initialValue)); - *outptr_QSystemSemaphore = ret; + return new QSystemSemaphore(key_QString, static_cast(initialValue)); } -void QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode, QSystemSemaphore** outptr_QSystemSemaphore) { +QSystemSemaphore* QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode) { QString key_QString = QString::fromUtf8(key.data, key.len); - QSystemSemaphore* ret = new QSystemSemaphore(key_QString, static_cast(initialValue), static_cast(mode)); - *outptr_QSystemSemaphore = ret; + return new QSystemSemaphore(key_QString, static_cast(initialValue), static_cast(mode)); } struct miqt_string QSystemSemaphore_Tr(const char* sourceText) { diff --git a/qt6/gen_qsystemsemaphore.go b/qt6/gen_qsystemsemaphore.go index b53dcf36..d67a714f 100644 --- a/qt6/gen_qsystemsemaphore.go +++ b/qt6/gen_qsystemsemaphore.go @@ -56,16 +56,13 @@ func newQSystemSemaphore(h *C.QSystemSemaphore) *QSystemSemaphore { if h == nil { return nil } + return &QSystemSemaphore{h: h} } // UnsafeNewQSystemSemaphore constructs the type using only unsafe pointers. func UnsafeNewQSystemSemaphore(h unsafe.Pointer) *QSystemSemaphore { - if h == nil { - return nil - } - - return &QSystemSemaphore{h: (*C.QSystemSemaphore)(h)} + return newQSystemSemaphore((*C.QSystemSemaphore)(h)) } // NewQSystemSemaphore constructs a new QSystemSemaphore object. @@ -74,10 +71,8 @@ func NewQSystemSemaphore(key string) *QSystemSemaphore { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QSystemSemaphore *C.QSystemSemaphore = nil - C.QSystemSemaphore_new(key_ms, &outptr_QSystemSemaphore) - ret := newQSystemSemaphore(outptr_QSystemSemaphore) + ret := newQSystemSemaphore(C.QSystemSemaphore_new(key_ms)) ret.isSubclass = true return ret } @@ -88,10 +83,8 @@ func NewQSystemSemaphore2(key string, initialValue int) *QSystemSemaphore { key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QSystemSemaphore *C.QSystemSemaphore = nil - C.QSystemSemaphore_new2(key_ms, (C.int)(initialValue), &outptr_QSystemSemaphore) - ret := newQSystemSemaphore(outptr_QSystemSemaphore) + ret := newQSystemSemaphore(C.QSystemSemaphore_new2(key_ms, (C.int)(initialValue))) ret.isSubclass = true return ret } @@ -102,10 +95,8 @@ func NewQSystemSemaphore3(key string, initialValue int, mode QSystemSemaphore__A key_ms.data = C.CString(key) key_ms.len = C.size_t(len(key)) defer C.free(unsafe.Pointer(key_ms.data)) - var outptr_QSystemSemaphore *C.QSystemSemaphore = nil - C.QSystemSemaphore_new3(key_ms, (C.int)(initialValue), (C.int)(mode), &outptr_QSystemSemaphore) - ret := newQSystemSemaphore(outptr_QSystemSemaphore) + ret := newQSystemSemaphore(C.QSystemSemaphore_new3(key_ms, (C.int)(initialValue), (C.int)(mode))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qsystemsemaphore.h b/qt6/gen_qsystemsemaphore.h index a57cb688..ad933ac5 100644 --- a/qt6/gen_qsystemsemaphore.h +++ b/qt6/gen_qsystemsemaphore.h @@ -20,9 +20,9 @@ class QSystemSemaphore; typedef struct QSystemSemaphore QSystemSemaphore; #endif -void QSystemSemaphore_new(struct miqt_string key, QSystemSemaphore** outptr_QSystemSemaphore); -void QSystemSemaphore_new2(struct miqt_string key, int initialValue, QSystemSemaphore** outptr_QSystemSemaphore); -void QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode, QSystemSemaphore** outptr_QSystemSemaphore); +QSystemSemaphore* QSystemSemaphore_new(struct miqt_string key); +QSystemSemaphore* QSystemSemaphore_new2(struct miqt_string key, int initialValue); +QSystemSemaphore* QSystemSemaphore_new3(struct miqt_string key, int initialValue, int mode); struct miqt_string QSystemSemaphore_Tr(const char* sourceText); void QSystemSemaphore_SetKey(QSystemSemaphore* self, struct miqt_string key); struct miqt_string QSystemSemaphore_Key(const QSystemSemaphore* self); diff --git a/qt6/gen_qsystemtrayicon.cpp b/qt6/gen_qsystemtrayicon.cpp index 4c8e5456..99029fcc 100644 --- a/qt6/gen_qsystemtrayicon.cpp +++ b/qt6/gen_qsystemtrayicon.cpp @@ -198,28 +198,24 @@ public: }; -void QSystemTrayIcon_new(QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { - MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(); - *outptr_QSystemTrayIcon = ret; - *outptr_QObject = static_cast(ret); +QSystemTrayIcon* QSystemTrayIcon_new() { + return new MiqtVirtualQSystemTrayIcon(); } -void QSystemTrayIcon_new2(QIcon* icon, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { - MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(*icon); - *outptr_QSystemTrayIcon = ret; - *outptr_QObject = static_cast(ret); +QSystemTrayIcon* QSystemTrayIcon_new2(QIcon* icon) { + return new MiqtVirtualQSystemTrayIcon(*icon); } -void QSystemTrayIcon_new3(QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { - MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(parent); - *outptr_QSystemTrayIcon = ret; - *outptr_QObject = static_cast(ret); +QSystemTrayIcon* QSystemTrayIcon_new3(QObject* parent) { + return new MiqtVirtualQSystemTrayIcon(parent); } -void QSystemTrayIcon_new4(QIcon* icon, QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject) { - MiqtVirtualQSystemTrayIcon* ret = new MiqtVirtualQSystemTrayIcon(*icon, parent); - *outptr_QSystemTrayIcon = ret; - *outptr_QObject = static_cast(ret); +QSystemTrayIcon* QSystemTrayIcon_new4(QIcon* icon, QObject* parent) { + return new MiqtVirtualQSystemTrayIcon(*icon, parent); +} + +void QSystemTrayIcon_virtbase(QSystemTrayIcon* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSystemTrayIcon_MetaObject(const QSystemTrayIcon* self) { diff --git a/qt6/gen_qsystemtrayicon.go b/qt6/gen_qsystemtrayicon.go index fb0d58f5..56d1b87e 100644 --- a/qt6/gen_qsystemtrayicon.go +++ b/qt6/gen_qsystemtrayicon.go @@ -54,64 +54,50 @@ func (this *QSystemTrayIcon) UnsafePointer() unsafe.Pointer { } // newQSystemTrayIcon constructs the type using only CGO pointers. -func newQSystemTrayIcon(h *C.QSystemTrayIcon, h_QObject *C.QObject) *QSystemTrayIcon { +func newQSystemTrayIcon(h *C.QSystemTrayIcon) *QSystemTrayIcon { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSystemTrayIcon_virtbase(h, &outptr_QObject) + return &QSystemTrayIcon{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQSystemTrayIcon constructs the type using only unsafe pointers. -func UnsafeNewQSystemTrayIcon(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSystemTrayIcon { - if h == nil { - return nil - } - - return &QSystemTrayIcon{h: (*C.QSystemTrayIcon)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQSystemTrayIcon(h unsafe.Pointer) *QSystemTrayIcon { + return newQSystemTrayIcon((*C.QSystemTrayIcon)(h)) } // NewQSystemTrayIcon constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon() *QSystemTrayIcon { - var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil - var outptr_QObject *C.QObject = nil - C.QSystemTrayIcon_new(&outptr_QSystemTrayIcon, &outptr_QObject) - ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret := newQSystemTrayIcon(C.QSystemTrayIcon_new()) ret.isSubclass = true return ret } // NewQSystemTrayIcon2 constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon2(icon *QIcon) *QSystemTrayIcon { - var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil - var outptr_QObject *C.QObject = nil - C.QSystemTrayIcon_new2(icon.cPointer(), &outptr_QSystemTrayIcon, &outptr_QObject) - ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret := newQSystemTrayIcon(C.QSystemTrayIcon_new2(icon.cPointer())) ret.isSubclass = true return ret } // NewQSystemTrayIcon3 constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon3(parent *QObject) *QSystemTrayIcon { - var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil - var outptr_QObject *C.QObject = nil - C.QSystemTrayIcon_new3(parent.cPointer(), &outptr_QSystemTrayIcon, &outptr_QObject) - ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret := newQSystemTrayIcon(C.QSystemTrayIcon_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQSystemTrayIcon4 constructs a new QSystemTrayIcon object. func NewQSystemTrayIcon4(icon *QIcon, parent *QObject) *QSystemTrayIcon { - var outptr_QSystemTrayIcon *C.QSystemTrayIcon = nil - var outptr_QObject *C.QObject = nil - C.QSystemTrayIcon_new4(icon.cPointer(), parent.cPointer(), &outptr_QSystemTrayIcon, &outptr_QObject) - ret := newQSystemTrayIcon(outptr_QSystemTrayIcon, outptr_QObject) + ret := newQSystemTrayIcon(C.QSystemTrayIcon_new4(icon.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -140,7 +126,7 @@ func (this *QSystemTrayIcon) SetContextMenu(menu *QMenu) { } func (this *QSystemTrayIcon) ContextMenu() *QMenu { - return newQMenu(C.QSystemTrayIcon_ContextMenu(this.h), nil, nil, nil) + return newQMenu(C.QSystemTrayIcon_ContextMenu(this.h)) } func (this *QSystemTrayIcon) Icon() *QIcon { @@ -395,7 +381,7 @@ func miqt_exec_callback_QSystemTrayIcon_TimerEvent(self *C.QSystemTrayIcon, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -421,7 +407,7 @@ func miqt_exec_callback_QSystemTrayIcon_ChildEvent(self *C.QSystemTrayIcon, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QSystemTrayIcon{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qsystemtrayicon.h b/qt6/gen_qsystemtrayicon.h index 96b7e966..161dcd83 100644 --- a/qt6/gen_qsystemtrayicon.h +++ b/qt6/gen_qsystemtrayicon.h @@ -38,10 +38,11 @@ typedef struct QSystemTrayIcon QSystemTrayIcon; typedef struct QTimerEvent QTimerEvent; #endif -void QSystemTrayIcon_new(QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); -void QSystemTrayIcon_new2(QIcon* icon, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); -void QSystemTrayIcon_new3(QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); -void QSystemTrayIcon_new4(QIcon* icon, QObject* parent, QSystemTrayIcon** outptr_QSystemTrayIcon, QObject** outptr_QObject); +QSystemTrayIcon* QSystemTrayIcon_new(); +QSystemTrayIcon* QSystemTrayIcon_new2(QIcon* icon); +QSystemTrayIcon* QSystemTrayIcon_new3(QObject* parent); +QSystemTrayIcon* QSystemTrayIcon_new4(QIcon* icon, QObject* parent); +void QSystemTrayIcon_virtbase(QSystemTrayIcon* src, QObject** outptr_QObject); QMetaObject* QSystemTrayIcon_MetaObject(const QSystemTrayIcon* self); void* QSystemTrayIcon_Metacast(QSystemTrayIcon* self, const char* param1); struct miqt_string QSystemTrayIcon_Tr(const char* s); diff --git a/qt6/gen_qtabbar.cpp b/qt6/gen_qtabbar.cpp index a813c42d..fbea3523 100644 --- a/qt6/gen_qtabbar.cpp +++ b/qt6/gen_qtabbar.cpp @@ -1193,20 +1193,16 @@ public: }; -void QTabBar_new(QWidget* parent, QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTabBar* ret = new MiqtVirtualQTabBar(parent); - *outptr_QTabBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTabBar* QTabBar_new(QWidget* parent) { + return new MiqtVirtualQTabBar(parent); } -void QTabBar_new2(QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTabBar* ret = new MiqtVirtualQTabBar(); - *outptr_QTabBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTabBar* QTabBar_new2() { + return new MiqtVirtualQTabBar(); +} + +void QTabBar_virtbase(QTabBar* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QTabBar_MetaObject(const QTabBar* self) { diff --git a/qt6/gen_qtabbar.go b/qt6/gen_qtabbar.go index 1cba56e2..4345d400 100644 --- a/qt6/gen_qtabbar.go +++ b/qt6/gen_qtabbar.go @@ -63,46 +63,34 @@ func (this *QTabBar) UnsafePointer() unsafe.Pointer { } // newQTabBar constructs the type using only CGO pointers. -func newQTabBar(h *C.QTabBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTabBar { +func newQTabBar(h *C.QTabBar) *QTabBar { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QTabBar_virtbase(h, &outptr_QWidget) + return &QTabBar{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQTabBar constructs the type using only unsafe pointers. -func UnsafeNewQTabBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTabBar { - if h == nil { - return nil - } - - return &QTabBar{h: (*C.QTabBar)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTabBar(h unsafe.Pointer) *QTabBar { + return newQTabBar((*C.QTabBar)(h)) } // NewQTabBar constructs a new QTabBar object. func NewQTabBar(parent *QWidget) *QTabBar { - var outptr_QTabBar *C.QTabBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTabBar_new(parent.cPointer(), &outptr_QTabBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTabBar(outptr_QTabBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTabBar(C.QTabBar_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTabBar2 constructs a new QTabBar object. func NewQTabBar2() *QTabBar { - var outptr_QTabBar *C.QTabBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTabBar_new2(&outptr_QTabBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTabBar(outptr_QTabBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTabBar(C.QTabBar_new2()) ret.isSubclass = true return ret } @@ -342,7 +330,7 @@ func (this *QTabBar) SetTabButton(index int, position QTabBar__ButtonPosition, w } func (this *QTabBar) TabButton(index int, position QTabBar__ButtonPosition) *QWidget { - return newQWidget(C.QTabBar_TabButton(this.h, (C.int)(index), (C.int)(position)), nil, nil) + return newQWidget(C.QTabBar_TabButton(this.h, (C.int)(index), (C.int)(position))) } func (this *QTabBar) SelectionBehaviorOnRemove() QTabBar__SelectionBehavior { @@ -773,7 +761,7 @@ func miqt_exec_callback_QTabBar_ResizeEvent(self *C.QTabBar, cb C.intptr_t, para } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -799,7 +787,7 @@ func miqt_exec_callback_QTabBar_ShowEvent(self *C.QTabBar, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -825,7 +813,7 @@ func miqt_exec_callback_QTabBar_HideEvent(self *C.QTabBar, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(param1, nil) + slotval1 := newQHideEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_HideEvent, slotval1) @@ -851,7 +839,7 @@ func miqt_exec_callback_QTabBar_PaintEvent(self *C.QTabBar, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -877,7 +865,7 @@ func miqt_exec_callback_QTabBar_MousePressEvent(self *C.QTabBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -903,7 +891,7 @@ func miqt_exec_callback_QTabBar_MouseMoveEvent(self *C.QTabBar, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -929,7 +917,7 @@ func miqt_exec_callback_QTabBar_MouseReleaseEvent(self *C.QTabBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -955,7 +943,7 @@ func miqt_exec_callback_QTabBar_MouseDoubleClickEvent(self *C.QTabBar, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -981,7 +969,7 @@ func miqt_exec_callback_QTabBar_WheelEvent(self *C.QTabBar, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1007,7 +995,7 @@ func miqt_exec_callback_QTabBar_KeyPressEvent(self *C.QTabBar, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1059,7 +1047,7 @@ func miqt_exec_callback_QTabBar_TimerEvent(self *C.QTabBar, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1085,7 +1073,7 @@ func miqt_exec_callback_QTabBar_InitStyleOption(self *C.QTabBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionTab(option, nil) + slotval1 := newQStyleOptionTab(option) slotval2 := (int)(tabIndex) @@ -1242,7 +1230,7 @@ func miqt_exec_callback_QTabBar_KeyReleaseEvent(self *C.QTabBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1268,7 +1256,7 @@ func miqt_exec_callback_QTabBar_FocusInEvent(self *C.QTabBar, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1294,7 +1282,7 @@ func miqt_exec_callback_QTabBar_FocusOutEvent(self *C.QTabBar, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1320,7 +1308,7 @@ func miqt_exec_callback_QTabBar_EnterEvent(self *C.QTabBar, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -1372,7 +1360,7 @@ func miqt_exec_callback_QTabBar_MoveEvent(self *C.QTabBar, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1398,7 +1386,7 @@ func miqt_exec_callback_QTabBar_CloseEvent(self *C.QTabBar, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1424,7 +1412,7 @@ func miqt_exec_callback_QTabBar_ContextMenuEvent(self *C.QTabBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1450,7 +1438,7 @@ func miqt_exec_callback_QTabBar_TabletEvent(self *C.QTabBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1476,7 +1464,7 @@ func miqt_exec_callback_QTabBar_ActionEvent(self *C.QTabBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1502,7 +1490,7 @@ func miqt_exec_callback_QTabBar_DragEnterEvent(self *C.QTabBar, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1528,7 +1516,7 @@ func miqt_exec_callback_QTabBar_DragMoveEvent(self *C.QTabBar, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1554,7 +1542,7 @@ func miqt_exec_callback_QTabBar_DragLeaveEvent(self *C.QTabBar, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1580,7 +1568,7 @@ func miqt_exec_callback_QTabBar_DropEvent(self *C.QTabBar, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QTabBar{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1750,7 +1738,7 @@ func miqt_exec_callback_QTabBar_InputMethodEvent(self *C.QTabBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QTabBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qtabbar.h b/qt6/gen_qtabbar.h index 6e33a8d2..8815f79a 100644 --- a/qt6/gen_qtabbar.h +++ b/qt6/gen_qtabbar.h @@ -88,8 +88,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QTabBar_new(QWidget* parent, QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTabBar_new2(QTabBar** outptr_QTabBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTabBar* QTabBar_new(QWidget* parent); +QTabBar* QTabBar_new2(); +void QTabBar_virtbase(QTabBar* src, QWidget** outptr_QWidget); QMetaObject* QTabBar_MetaObject(const QTabBar* self); void* QTabBar_Metacast(QTabBar* self, const char* param1); struct miqt_string QTabBar_Tr(const char* s); diff --git a/qt6/gen_qtableview.cpp b/qt6/gen_qtableview.cpp index ae14f464..41a5fb7d 100644 --- a/qt6/gen_qtableview.cpp +++ b/qt6/gen_qtableview.cpp @@ -1583,26 +1583,16 @@ public: }; -void QTableView_new(QWidget* parent, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTableView* ret = new MiqtVirtualQTableView(parent); - *outptr_QTableView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTableView* QTableView_new(QWidget* parent) { + return new MiqtVirtualQTableView(parent); } -void QTableView_new2(QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTableView* ret = new MiqtVirtualQTableView(); - *outptr_QTableView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTableView* QTableView_new2() { + return new MiqtVirtualQTableView(); +} + +void QTableView_virtbase(QTableView* src, QAbstractItemView** outptr_QAbstractItemView) { + *outptr_QAbstractItemView = static_cast(src); } QMetaObject* QTableView_MetaObject(const QTableView* self) { diff --git a/qt6/gen_qtableview.go b/qt6/gen_qtableview.go index 3027ee77..67576552 100644 --- a/qt6/gen_qtableview.go +++ b/qt6/gen_qtableview.go @@ -35,52 +35,34 @@ func (this *QTableView) UnsafePointer() unsafe.Pointer { } // newQTableView constructs the type using only CGO pointers. -func newQTableView(h *C.QTableView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTableView { +func newQTableView(h *C.QTableView) *QTableView { if h == nil { return nil } + var outptr_QAbstractItemView *C.QAbstractItemView = nil + C.QTableView_virtbase(h, &outptr_QAbstractItemView) + return &QTableView{h: h, - QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractItemView: newQAbstractItemView(outptr_QAbstractItemView)} } // UnsafeNewQTableView constructs the type using only unsafe pointers. -func UnsafeNewQTableView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTableView { - if h == nil { - return nil - } - - return &QTableView{h: (*C.QTableView)(h), - QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTableView(h unsafe.Pointer) *QTableView { + return newQTableView((*C.QTableView)(h)) } // NewQTableView constructs a new QTableView object. func NewQTableView(parent *QWidget) *QTableView { - var outptr_QTableView *C.QTableView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTableView_new(parent.cPointer(), &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTableView(outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTableView(C.QTableView_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTableView2 constructs a new QTableView object. func NewQTableView2() *QTableView { - var outptr_QTableView *C.QTableView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTableView_new2(&outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTableView(outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTableView(C.QTableView_new2()) ret.isSubclass = true return ret } @@ -121,11 +103,11 @@ func (this *QTableView) DoItemsLayout() { } func (this *QTableView) HorizontalHeader() *QHeaderView { - return newQHeaderView(C.QTableView_HorizontalHeader(this.h), nil, nil, nil, nil, nil, nil) + return newQHeaderView(C.QTableView_HorizontalHeader(this.h)) } func (this *QTableView) VerticalHeader() *QHeaderView { - return newQHeaderView(C.QTableView_VerticalHeader(this.h), nil, nil, nil, nil, nil, nil) + return newQHeaderView(C.QTableView_VerticalHeader(this.h)) } func (this *QTableView) SetHorizontalHeader(header *QHeaderView) { @@ -342,7 +324,7 @@ func miqt_exec_callback_QTableView_SetModel(self *C.QTableView, cb C.intptr_t, m } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc((&QTableView{h: self}).callVirtualBase_SetModel, slotval1) @@ -394,7 +376,7 @@ func miqt_exec_callback_QTableView_SetSelectionModel(self *C.QTableView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QTableView{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -559,7 +541,7 @@ func miqt_exec_callback_QTableView_InitViewItemOption(self *C.QTableView, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) gofunc((&QTableView{h: self}).callVirtualBase_InitViewItemOption, slotval1) @@ -585,7 +567,7 @@ func miqt_exec_callback_QTableView_PaintEvent(self *C.QTableView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QTableView{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -611,7 +593,7 @@ func miqt_exec_callback_QTableView_TimerEvent(self *C.QTableView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1073,7 +1055,7 @@ func miqt_exec_callback_QTableView_KeyboardSearch(self *C.QTableView, cb C.intpt func (this *QTableView) callVirtualBase_ItemDelegateForIndex(index *QModelIndex) *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QTableView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer()), nil) + return newQAbstractItemDelegate(C.QTableView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer())) } func (this *QTableView) OnItemDelegateForIndex(slot func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) { @@ -1395,7 +1377,7 @@ func miqt_exec_callback_QTableView_CloseEditor(self *C.QTableView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) @@ -1423,7 +1405,7 @@ func miqt_exec_callback_QTableView_CommitData(self *C.QTableView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc((&QTableView{h: self}).callVirtualBase_CommitData, slotval1) @@ -1647,7 +1629,7 @@ func miqt_exec_callback_QTableView_MousePressEvent(self *C.QTableView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1673,7 +1655,7 @@ func miqt_exec_callback_QTableView_MouseMoveEvent(self *C.QTableView, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1699,7 +1681,7 @@ func miqt_exec_callback_QTableView_MouseReleaseEvent(self *C.QTableView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1725,7 +1707,7 @@ func miqt_exec_callback_QTableView_MouseDoubleClickEvent(self *C.QTableView, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1751,7 +1733,7 @@ func miqt_exec_callback_QTableView_DragEnterEvent(self *C.QTableView, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1777,7 +1759,7 @@ func miqt_exec_callback_QTableView_DragMoveEvent(self *C.QTableView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1803,7 +1785,7 @@ func miqt_exec_callback_QTableView_DragLeaveEvent(self *C.QTableView, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1829,7 +1811,7 @@ func miqt_exec_callback_QTableView_DropEvent(self *C.QTableView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1855,7 +1837,7 @@ func miqt_exec_callback_QTableView_FocusInEvent(self *C.QTableView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1881,7 +1863,7 @@ func miqt_exec_callback_QTableView_FocusOutEvent(self *C.QTableView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1907,7 +1889,7 @@ func miqt_exec_callback_QTableView_KeyPressEvent(self *C.QTableView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1933,7 +1915,7 @@ func miqt_exec_callback_QTableView_ResizeEvent(self *C.QTableView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1959,7 +1941,7 @@ func miqt_exec_callback_QTableView_InputMethodEvent(self *C.QTableView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QTableView{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qtableview.h b/qt6/gen_qtableview.h index a6a4d05e..30e5a26f 100644 --- a/qt6/gen_qtableview.h +++ b/qt6/gen_qtableview.h @@ -82,8 +82,9 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QTableView_new(QWidget* parent, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTableView_new2(QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTableView* QTableView_new(QWidget* parent); +QTableView* QTableView_new2(); +void QTableView_virtbase(QTableView* src, QAbstractItemView** outptr_QAbstractItemView); QMetaObject* QTableView_MetaObject(const QTableView* self); void* QTableView_Metacast(QTableView* self, const char* param1); struct miqt_string QTableView_Tr(const char* s); diff --git a/qt6/gen_qtablewidget.cpp b/qt6/gen_qtablewidget.cpp index 32cf1c90..1edef03d 100644 --- a/qt6/gen_qtablewidget.cpp +++ b/qt6/gen_qtablewidget.cpp @@ -35,14 +35,12 @@ #include "gen_qtablewidget.h" #include "_cgo_export.h" -void QTableWidgetSelectionRange_new(QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange) { - QTableWidgetSelectionRange* ret = new QTableWidgetSelectionRange(); - *outptr_QTableWidgetSelectionRange = ret; +QTableWidgetSelectionRange* QTableWidgetSelectionRange_new() { + return new QTableWidgetSelectionRange(); } -void QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right, QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange) { - QTableWidgetSelectionRange* ret = new QTableWidgetSelectionRange(static_cast(top), static_cast(left), static_cast(bottom), static_cast(right)); - *outptr_QTableWidgetSelectionRange = ret; +QTableWidgetSelectionRange* QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right) { + return new QTableWidgetSelectionRange(static_cast(top), static_cast(left), static_cast(bottom), static_cast(right)); } int QTableWidgetSelectionRange_TopRow(const QTableWidgetSelectionRange* self) { @@ -241,43 +239,36 @@ public: }; -void QTableWidgetItem_new(QTableWidgetItem** outptr_QTableWidgetItem) { - MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(); - *outptr_QTableWidgetItem = ret; +QTableWidgetItem* QTableWidgetItem_new() { + return new MiqtVirtualQTableWidgetItem(); } -void QTableWidgetItem_new2(struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem) { +QTableWidgetItem* QTableWidgetItem_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(text_QString); - *outptr_QTableWidgetItem = ret; + return new MiqtVirtualQTableWidgetItem(text_QString); } -void QTableWidgetItem_new3(QIcon* icon, struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem) { +QTableWidgetItem* QTableWidgetItem_new3(QIcon* icon, struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(*icon, text_QString); - *outptr_QTableWidgetItem = ret; + return new MiqtVirtualQTableWidgetItem(*icon, text_QString); } -void QTableWidgetItem_new4(QTableWidgetItem* other, QTableWidgetItem** outptr_QTableWidgetItem) { - MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(*other); - *outptr_QTableWidgetItem = ret; +QTableWidgetItem* QTableWidgetItem_new4(QTableWidgetItem* other) { + return new MiqtVirtualQTableWidgetItem(*other); } -void QTableWidgetItem_new5(int typeVal, QTableWidgetItem** outptr_QTableWidgetItem) { - MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(static_cast(typeVal)); - *outptr_QTableWidgetItem = ret; +QTableWidgetItem* QTableWidgetItem_new5(int typeVal) { + return new MiqtVirtualQTableWidgetItem(static_cast(typeVal)); } -void QTableWidgetItem_new6(struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem) { +QTableWidgetItem* QTableWidgetItem_new6(struct miqt_string text, int typeVal) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(text_QString, static_cast(typeVal)); - *outptr_QTableWidgetItem = ret; + return new MiqtVirtualQTableWidgetItem(text_QString, static_cast(typeVal)); } -void QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem) { +QTableWidgetItem* QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTableWidgetItem* ret = new MiqtVirtualQTableWidgetItem(*icon, text_QString, static_cast(typeVal)); - *outptr_QTableWidgetItem = ret; + return new MiqtVirtualQTableWidgetItem(*icon, text_QString, static_cast(typeVal)); } QTableWidgetItem* QTableWidgetItem_Clone(const QTableWidgetItem* self) { @@ -1348,52 +1339,24 @@ public: }; -void QTableWidget_new(QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(parent); - *outptr_QTableWidget = ret; - *outptr_QTableView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTableWidget* QTableWidget_new(QWidget* parent) { + return new MiqtVirtualQTableWidget(parent); } -void QTableWidget_new2(QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(); - *outptr_QTableWidget = ret; - *outptr_QTableView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTableWidget* QTableWidget_new2() { + return new MiqtVirtualQTableWidget(); } -void QTableWidget_new3(int rows, int columns, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(static_cast(rows), static_cast(columns)); - *outptr_QTableWidget = ret; - *outptr_QTableView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTableWidget* QTableWidget_new3(int rows, int columns) { + return new MiqtVirtualQTableWidget(static_cast(rows), static_cast(columns)); } -void QTableWidget_new4(int rows, int columns, QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTableWidget* ret = new MiqtVirtualQTableWidget(static_cast(rows), static_cast(columns), parent); - *outptr_QTableWidget = ret; - *outptr_QTableView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTableWidget* QTableWidget_new4(int rows, int columns, QWidget* parent) { + return new MiqtVirtualQTableWidget(static_cast(rows), static_cast(columns), parent); +} + +void QTableWidget_virtbase(QTableWidget* src, QTableView** outptr_QTableView) { + *outptr_QTableView = static_cast(src); } QMetaObject* QTableWidget_MetaObject(const QTableWidget* self) { diff --git a/qt6/gen_qtablewidget.go b/qt6/gen_qtablewidget.go index 261d9b5d..0a86491b 100644 --- a/qt6/gen_qtablewidget.go +++ b/qt6/gen_qtablewidget.go @@ -45,34 +45,27 @@ func newQTableWidgetSelectionRange(h *C.QTableWidgetSelectionRange) *QTableWidge if h == nil { return nil } + return &QTableWidgetSelectionRange{h: h} } // UnsafeNewQTableWidgetSelectionRange constructs the type using only unsafe pointers. func UnsafeNewQTableWidgetSelectionRange(h unsafe.Pointer) *QTableWidgetSelectionRange { - if h == nil { - return nil - } - - return &QTableWidgetSelectionRange{h: (*C.QTableWidgetSelectionRange)(h)} + return newQTableWidgetSelectionRange((*C.QTableWidgetSelectionRange)(h)) } // NewQTableWidgetSelectionRange constructs a new QTableWidgetSelectionRange object. func NewQTableWidgetSelectionRange() *QTableWidgetSelectionRange { - var outptr_QTableWidgetSelectionRange *C.QTableWidgetSelectionRange = nil - C.QTableWidgetSelectionRange_new(&outptr_QTableWidgetSelectionRange) - ret := newQTableWidgetSelectionRange(outptr_QTableWidgetSelectionRange) + ret := newQTableWidgetSelectionRange(C.QTableWidgetSelectionRange_new()) ret.isSubclass = true return ret } // NewQTableWidgetSelectionRange2 constructs a new QTableWidgetSelectionRange object. func NewQTableWidgetSelectionRange2(top int, left int, bottom int, right int) *QTableWidgetSelectionRange { - var outptr_QTableWidgetSelectionRange *C.QTableWidgetSelectionRange = nil - C.QTableWidgetSelectionRange_new2((C.int)(top), (C.int)(left), (C.int)(bottom), (C.int)(right), &outptr_QTableWidgetSelectionRange) - ret := newQTableWidgetSelectionRange(outptr_QTableWidgetSelectionRange) + ret := newQTableWidgetSelectionRange(C.QTableWidgetSelectionRange_new2((C.int)(top), (C.int)(left), (C.int)(bottom), (C.int)(right))) ret.isSubclass = true return ret } @@ -139,24 +132,19 @@ func newQTableWidgetItem(h *C.QTableWidgetItem) *QTableWidgetItem { if h == nil { return nil } + return &QTableWidgetItem{h: h} } // UnsafeNewQTableWidgetItem constructs the type using only unsafe pointers. func UnsafeNewQTableWidgetItem(h unsafe.Pointer) *QTableWidgetItem { - if h == nil { - return nil - } - - return &QTableWidgetItem{h: (*C.QTableWidgetItem)(h)} + return newQTableWidgetItem((*C.QTableWidgetItem)(h)) } // NewQTableWidgetItem constructs a new QTableWidgetItem object. func NewQTableWidgetItem() *QTableWidgetItem { - var outptr_QTableWidgetItem *C.QTableWidgetItem = nil - C.QTableWidgetItem_new(&outptr_QTableWidgetItem) - ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret := newQTableWidgetItem(C.QTableWidgetItem_new()) ret.isSubclass = true return ret } @@ -167,10 +155,8 @@ func NewQTableWidgetItem2(text string) *QTableWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTableWidgetItem *C.QTableWidgetItem = nil - C.QTableWidgetItem_new2(text_ms, &outptr_QTableWidgetItem) - ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret := newQTableWidgetItem(C.QTableWidgetItem_new2(text_ms)) ret.isSubclass = true return ret } @@ -181,30 +167,24 @@ func NewQTableWidgetItem3(icon *QIcon, text string) *QTableWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTableWidgetItem *C.QTableWidgetItem = nil - C.QTableWidgetItem_new3(icon.cPointer(), text_ms, &outptr_QTableWidgetItem) - ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret := newQTableWidgetItem(C.QTableWidgetItem_new3(icon.cPointer(), text_ms)) ret.isSubclass = true return ret } // NewQTableWidgetItem4 constructs a new QTableWidgetItem object. func NewQTableWidgetItem4(other *QTableWidgetItem) *QTableWidgetItem { - var outptr_QTableWidgetItem *C.QTableWidgetItem = nil - C.QTableWidgetItem_new4(other.cPointer(), &outptr_QTableWidgetItem) - ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret := newQTableWidgetItem(C.QTableWidgetItem_new4(other.cPointer())) ret.isSubclass = true return ret } // NewQTableWidgetItem5 constructs a new QTableWidgetItem object. func NewQTableWidgetItem5(typeVal int) *QTableWidgetItem { - var outptr_QTableWidgetItem *C.QTableWidgetItem = nil - C.QTableWidgetItem_new5((C.int)(typeVal), &outptr_QTableWidgetItem) - ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret := newQTableWidgetItem(C.QTableWidgetItem_new5((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -215,10 +195,8 @@ func NewQTableWidgetItem6(text string, typeVal int) *QTableWidgetItem { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTableWidgetItem *C.QTableWidgetItem = nil - C.QTableWidgetItem_new6(text_ms, (C.int)(typeVal), &outptr_QTableWidgetItem) - ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret := newQTableWidgetItem(C.QTableWidgetItem_new6(text_ms, (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -229,10 +207,8 @@ func NewQTableWidgetItem7(icon *QIcon, text string, typeVal int) *QTableWidgetIt text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTableWidgetItem *C.QTableWidgetItem = nil - C.QTableWidgetItem_new7(icon.cPointer(), text_ms, (C.int)(typeVal), &outptr_QTableWidgetItem) - ret := newQTableWidgetItem(outptr_QTableWidgetItem) + ret := newQTableWidgetItem(C.QTableWidgetItem_new7(icon.cPointer(), text_ms, (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -242,7 +218,7 @@ func (this *QTableWidgetItem) Clone() *QTableWidgetItem { } func (this *QTableWidgetItem) TableWidget() *QTableWidget { - return newQTableWidget(C.QTableWidgetItem_TableWidget(this.h), nil, nil, nil, nil, nil, nil, nil) + return newQTableWidget(C.QTableWidgetItem_TableWidget(this.h)) } func (this *QTableWidgetItem) Row() int { @@ -564,7 +540,7 @@ func miqt_exec_callback_QTableWidgetItem_Read(self *C.QTableWidgetItem, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDataStream(in, nil) + slotval1 := newQDataStream(in) gofunc((&QTableWidgetItem{h: self}).callVirtualBase_Read, slotval1) @@ -590,7 +566,7 @@ func miqt_exec_callback_QTableWidgetItem_Write(self *C.QTableWidgetItem, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQDataStream(out, nil) + slotval1 := newQDataStream(out) gofunc((&QTableWidgetItem{h: self}).callVirtualBase_Write, slotval1) @@ -631,88 +607,50 @@ func (this *QTableWidget) UnsafePointer() unsafe.Pointer { } // newQTableWidget constructs the type using only CGO pointers. -func newQTableWidget(h *C.QTableWidget, h_QTableView *C.QTableView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTableWidget { +func newQTableWidget(h *C.QTableWidget) *QTableWidget { if h == nil { return nil } + var outptr_QTableView *C.QTableView = nil + C.QTableWidget_virtbase(h, &outptr_QTableView) + return &QTableWidget{h: h, - QTableView: newQTableView(h_QTableView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QTableView: newQTableView(outptr_QTableView)} } // UnsafeNewQTableWidget constructs the type using only unsafe pointers. -func UnsafeNewQTableWidget(h unsafe.Pointer, h_QTableView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTableWidget { - if h == nil { - return nil - } - - return &QTableWidget{h: (*C.QTableWidget)(h), - QTableView: UnsafeNewQTableView(h_QTableView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTableWidget(h unsafe.Pointer) *QTableWidget { + return newQTableWidget((*C.QTableWidget)(h)) } // NewQTableWidget constructs a new QTableWidget object. func NewQTableWidget(parent *QWidget) *QTableWidget { - var outptr_QTableWidget *C.QTableWidget = nil - var outptr_QTableView *C.QTableView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTableWidget_new(parent.cPointer(), &outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTableWidget(C.QTableWidget_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTableWidget2 constructs a new QTableWidget object. func NewQTableWidget2() *QTableWidget { - var outptr_QTableWidget *C.QTableWidget = nil - var outptr_QTableView *C.QTableView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTableWidget_new2(&outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTableWidget(C.QTableWidget_new2()) ret.isSubclass = true return ret } // NewQTableWidget3 constructs a new QTableWidget object. func NewQTableWidget3(rows int, columns int) *QTableWidget { - var outptr_QTableWidget *C.QTableWidget = nil - var outptr_QTableView *C.QTableView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTableWidget_new3((C.int)(rows), (C.int)(columns), &outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTableWidget(C.QTableWidget_new3((C.int)(rows), (C.int)(columns))) ret.isSubclass = true return ret } // NewQTableWidget4 constructs a new QTableWidget object. func NewQTableWidget4(rows int, columns int, parent *QWidget) *QTableWidget { - var outptr_QTableWidget *C.QTableWidget = nil - var outptr_QTableView *C.QTableView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTableWidget_new4((C.int)(rows), (C.int)(columns), parent.cPointer(), &outptr_QTableWidget, &outptr_QTableView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTableWidget(outptr_QTableWidget, outptr_QTableView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTableWidget(C.QTableWidget_new4((C.int)(rows), (C.int)(columns), parent.cPointer())) ret.isSubclass = true return ret } @@ -901,7 +839,7 @@ func (this *QTableWidget) IsPersistentEditorOpen(item *QTableWidgetItem) bool { } func (this *QTableWidget) CellWidget(row int, column int) *QWidget { - return newQWidget(C.QTableWidget_CellWidget(this.h, (C.int)(row), (C.int)(column)), nil, nil) + return newQWidget(C.QTableWidget_CellWidget(this.h, (C.int)(row), (C.int)(column))) } func (this *QTableWidget) SetCellWidget(row int, column int, widget *QWidget) { @@ -1437,7 +1375,7 @@ func (this *QTableWidget) callVirtualBase_MimeData(items []*QTableWidgetItem) *Q } items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} - return newQMimeData(C.QTableWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma), nil) + return newQMimeData(C.QTableWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma)) } func (this *QTableWidget) OnMimeData(slot func(super func(items []*QTableWidgetItem) *QMimeData, items []*QTableWidgetItem) *QMimeData) { @@ -1493,7 +1431,7 @@ func miqt_exec_callback_QTableWidget_DropMimeData(self *C.QTableWidget, cb C.int slotval2 := (int)(column) - slotval3 := newQMimeData(data, nil) + slotval3 := newQMimeData(data) slotval4 := (DropAction)(action) @@ -1548,7 +1486,7 @@ func miqt_exec_callback_QTableWidget_DropEvent(self *C.QTableWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QTableWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1600,7 +1538,7 @@ func miqt_exec_callback_QTableWidget_SetSelectionModel(self *C.QTableWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QTableWidget{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -1765,7 +1703,7 @@ func miqt_exec_callback_QTableWidget_InitViewItemOption(self *C.QTableWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) gofunc((&QTableWidget{h: self}).callVirtualBase_InitViewItemOption, slotval1) @@ -1791,7 +1729,7 @@ func miqt_exec_callback_QTableWidget_PaintEvent(self *C.QTableWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QTableWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1817,7 +1755,7 @@ func miqt_exec_callback_QTableWidget_TimerEvent(self *C.QTableWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTableWidget{h: self}).callVirtualBase_TimerEvent, slotval1) diff --git a/qt6/gen_qtablewidget.h b/qt6/gen_qtablewidget.h index f6b3ade5..d966672e 100644 --- a/qt6/gen_qtablewidget.h +++ b/qt6/gen_qtablewidget.h @@ -76,8 +76,8 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QTableWidgetSelectionRange_new(QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange); -void QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right, QTableWidgetSelectionRange** outptr_QTableWidgetSelectionRange); +QTableWidgetSelectionRange* QTableWidgetSelectionRange_new(); +QTableWidgetSelectionRange* QTableWidgetSelectionRange_new2(int top, int left, int bottom, int right); int QTableWidgetSelectionRange_TopRow(const QTableWidgetSelectionRange* self); int QTableWidgetSelectionRange_BottomRow(const QTableWidgetSelectionRange* self); int QTableWidgetSelectionRange_LeftColumn(const QTableWidgetSelectionRange* self); @@ -86,13 +86,13 @@ int QTableWidgetSelectionRange_RowCount(const QTableWidgetSelectionRange* self); int QTableWidgetSelectionRange_ColumnCount(const QTableWidgetSelectionRange* self); void QTableWidgetSelectionRange_Delete(QTableWidgetSelectionRange* self, bool isSubclass); -void QTableWidgetItem_new(QTableWidgetItem** outptr_QTableWidgetItem); -void QTableWidgetItem_new2(struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem); -void QTableWidgetItem_new3(QIcon* icon, struct miqt_string text, QTableWidgetItem** outptr_QTableWidgetItem); -void QTableWidgetItem_new4(QTableWidgetItem* other, QTableWidgetItem** outptr_QTableWidgetItem); -void QTableWidgetItem_new5(int typeVal, QTableWidgetItem** outptr_QTableWidgetItem); -void QTableWidgetItem_new6(struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem); -void QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal, QTableWidgetItem** outptr_QTableWidgetItem); +QTableWidgetItem* QTableWidgetItem_new(); +QTableWidgetItem* QTableWidgetItem_new2(struct miqt_string text); +QTableWidgetItem* QTableWidgetItem_new3(QIcon* icon, struct miqt_string text); +QTableWidgetItem* QTableWidgetItem_new4(QTableWidgetItem* other); +QTableWidgetItem* QTableWidgetItem_new5(int typeVal); +QTableWidgetItem* QTableWidgetItem_new6(struct miqt_string text, int typeVal); +QTableWidgetItem* QTableWidgetItem_new7(QIcon* icon, struct miqt_string text, int typeVal); QTableWidgetItem* QTableWidgetItem_Clone(const QTableWidgetItem* self); QTableWidget* QTableWidgetItem_TableWidget(const QTableWidgetItem* self); int QTableWidgetItem_Row(const QTableWidgetItem* self); @@ -146,10 +146,11 @@ void QTableWidgetItem_override_virtual_Write(void* self, intptr_t slot); void QTableWidgetItem_virtualbase_Write(const void* self, QDataStream* out); void QTableWidgetItem_Delete(QTableWidgetItem* self, bool isSubclass); -void QTableWidget_new(QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTableWidget_new2(QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTableWidget_new3(int rows, int columns, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTableWidget_new4(int rows, int columns, QWidget* parent, QTableWidget** outptr_QTableWidget, QTableView** outptr_QTableView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTableWidget* QTableWidget_new(QWidget* parent); +QTableWidget* QTableWidget_new2(); +QTableWidget* QTableWidget_new3(int rows, int columns); +QTableWidget* QTableWidget_new4(int rows, int columns, QWidget* parent); +void QTableWidget_virtbase(QTableWidget* src, QTableView** outptr_QTableView); QMetaObject* QTableWidget_MetaObject(const QTableWidget* self); void* QTableWidget_Metacast(QTableWidget* self, const char* param1); struct miqt_string QTableWidget_Tr(const char* s); diff --git a/qt6/gen_qtabwidget.cpp b/qt6/gen_qtabwidget.cpp index 70aff77b..e3292344 100644 --- a/qt6/gen_qtabwidget.cpp +++ b/qt6/gen_qtabwidget.cpp @@ -1097,20 +1097,16 @@ public: }; -void QTabWidget_new(QWidget* parent, QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTabWidget* ret = new MiqtVirtualQTabWidget(parent); - *outptr_QTabWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTabWidget* QTabWidget_new(QWidget* parent) { + return new MiqtVirtualQTabWidget(parent); } -void QTabWidget_new2(QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTabWidget* ret = new MiqtVirtualQTabWidget(); - *outptr_QTabWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTabWidget* QTabWidget_new2() { + return new MiqtVirtualQTabWidget(); +} + +void QTabWidget_virtbase(QTabWidget* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QTabWidget_MetaObject(const QTabWidget* self) { diff --git a/qt6/gen_qtabwidget.go b/qt6/gen_qtabwidget.go index 82f86289..6357e8ff 100644 --- a/qt6/gen_qtabwidget.go +++ b/qt6/gen_qtabwidget.go @@ -51,46 +51,34 @@ func (this *QTabWidget) UnsafePointer() unsafe.Pointer { } // newQTabWidget constructs the type using only CGO pointers. -func newQTabWidget(h *C.QTabWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTabWidget { +func newQTabWidget(h *C.QTabWidget) *QTabWidget { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QTabWidget_virtbase(h, &outptr_QWidget) + return &QTabWidget{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQTabWidget constructs the type using only unsafe pointers. -func UnsafeNewQTabWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTabWidget { - if h == nil { - return nil - } - - return &QTabWidget{h: (*C.QTabWidget)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTabWidget(h unsafe.Pointer) *QTabWidget { + return newQTabWidget((*C.QTabWidget)(h)) } // NewQTabWidget constructs a new QTabWidget object. func NewQTabWidget(parent *QWidget) *QTabWidget { - var outptr_QTabWidget *C.QTabWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTabWidget_new(parent.cPointer(), &outptr_QTabWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTabWidget(outptr_QTabWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTabWidget(C.QTabWidget_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTabWidget2 constructs a new QTabWidget object. func NewQTabWidget2() *QTabWidget { - var outptr_QTabWidget *C.QTabWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTabWidget_new2(&outptr_QTabWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTabWidget(outptr_QTabWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTabWidget(C.QTabWidget_new2()) ret.isSubclass = true return ret } @@ -226,11 +214,11 @@ func (this *QTabWidget) CurrentIndex() int { } func (this *QTabWidget) CurrentWidget() *QWidget { - return newQWidget(C.QTabWidget_CurrentWidget(this.h), nil, nil) + return newQWidget(C.QTabWidget_CurrentWidget(this.h)) } func (this *QTabWidget) Widget(index int) *QWidget { - return newQWidget(C.QTabWidget_Widget(this.h, (C.int)(index)), nil, nil) + return newQWidget(C.QTabWidget_Widget(this.h, (C.int)(index))) } func (this *QTabWidget) IndexOf(widget *QWidget) int { @@ -298,7 +286,7 @@ func (this *QTabWidget) SetCornerWidget(w *QWidget) { } func (this *QTabWidget) CornerWidget() *QWidget { - return newQWidget(C.QTabWidget_CornerWidget(this.h), nil, nil) + return newQWidget(C.QTabWidget_CornerWidget(this.h)) } func (this *QTabWidget) ElideMode() TextElideMode { @@ -348,7 +336,7 @@ func (this *QTabWidget) Clear() { } func (this *QTabWidget) TabBar() *QTabBar { - return newQTabBar(C.QTabWidget_TabBar(this.h), nil, nil, nil) + return newQTabBar(C.QTabWidget_TabBar(this.h)) } func (this *QTabWidget) SetCurrentIndex(index int) { @@ -466,7 +454,7 @@ func (this *QTabWidget) SetCornerWidget2(w *QWidget, corner Corner) { } func (this *QTabWidget) CornerWidget1(corner Corner) *QWidget { - return newQWidget(C.QTabWidget_CornerWidget1(this.h, (C.int)(corner)), nil, nil) + return newQWidget(C.QTabWidget_CornerWidget1(this.h, (C.int)(corner))) } func (this *QTabWidget) callVirtualBase_SizeHint() *QSize { @@ -648,7 +636,7 @@ func miqt_exec_callback_QTabWidget_ShowEvent(self *C.QTabWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QTabWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -674,7 +662,7 @@ func miqt_exec_callback_QTabWidget_ResizeEvent(self *C.QTabWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QTabWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -700,7 +688,7 @@ func miqt_exec_callback_QTabWidget_KeyPressEvent(self *C.QTabWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QTabWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -726,7 +714,7 @@ func miqt_exec_callback_QTabWidget_PaintEvent(self *C.QTabWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QTabWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -806,7 +794,7 @@ func miqt_exec_callback_QTabWidget_InitStyleOption(self *C.QTabWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionTabWidgetFrame(option, nil) + slotval1 := newQStyleOptionTabWidgetFrame(option) gofunc((&QTabWidget{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -908,7 +896,7 @@ func miqt_exec_callback_QTabWidget_MousePressEvent(self *C.QTabWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -934,7 +922,7 @@ func miqt_exec_callback_QTabWidget_MouseReleaseEvent(self *C.QTabWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -960,7 +948,7 @@ func miqt_exec_callback_QTabWidget_MouseDoubleClickEvent(self *C.QTabWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -986,7 +974,7 @@ func miqt_exec_callback_QTabWidget_MouseMoveEvent(self *C.QTabWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1012,7 +1000,7 @@ func miqt_exec_callback_QTabWidget_WheelEvent(self *C.QTabWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1038,7 +1026,7 @@ func miqt_exec_callback_QTabWidget_KeyReleaseEvent(self *C.QTabWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1064,7 +1052,7 @@ func miqt_exec_callback_QTabWidget_FocusInEvent(self *C.QTabWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1090,7 +1078,7 @@ func miqt_exec_callback_QTabWidget_FocusOutEvent(self *C.QTabWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1116,7 +1104,7 @@ func miqt_exec_callback_QTabWidget_EnterEvent(self *C.QTabWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -1168,7 +1156,7 @@ func miqt_exec_callback_QTabWidget_MoveEvent(self *C.QTabWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1194,7 +1182,7 @@ func miqt_exec_callback_QTabWidget_CloseEvent(self *C.QTabWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1220,7 +1208,7 @@ func miqt_exec_callback_QTabWidget_ContextMenuEvent(self *C.QTabWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1246,7 +1234,7 @@ func miqt_exec_callback_QTabWidget_TabletEvent(self *C.QTabWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1272,7 +1260,7 @@ func miqt_exec_callback_QTabWidget_ActionEvent(self *C.QTabWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1298,7 +1286,7 @@ func miqt_exec_callback_QTabWidget_DragEnterEvent(self *C.QTabWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1324,7 +1312,7 @@ func miqt_exec_callback_QTabWidget_DragMoveEvent(self *C.QTabWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1350,7 +1338,7 @@ func miqt_exec_callback_QTabWidget_DragLeaveEvent(self *C.QTabWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1376,7 +1364,7 @@ func miqt_exec_callback_QTabWidget_DropEvent(self *C.QTabWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1402,7 +1390,7 @@ func miqt_exec_callback_QTabWidget_HideEvent(self *C.QTabWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QTabWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1572,7 +1560,7 @@ func miqt_exec_callback_QTabWidget_InputMethodEvent(self *C.QTabWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QTabWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qtabwidget.h b/qt6/gen_qtabwidget.h index 7197cf09..b04973ae 100644 --- a/qt6/gen_qtabwidget.h +++ b/qt6/gen_qtabwidget.h @@ -84,8 +84,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QTabWidget_new(QWidget* parent, QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTabWidget_new2(QTabWidget** outptr_QTabWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTabWidget* QTabWidget_new(QWidget* parent); +QTabWidget* QTabWidget_new2(); +void QTabWidget_virtbase(QTabWidget* src, QWidget** outptr_QWidget); QMetaObject* QTabWidget_MetaObject(const QTabWidget* self); void* QTabWidget_Metacast(QTabWidget* self, const char* param1); struct miqt_string QTabWidget_Tr(const char* s); diff --git a/qt6/gen_qtemporarydir.cpp b/qt6/gen_qtemporarydir.cpp index 92f9a596..b9677466 100644 --- a/qt6/gen_qtemporarydir.cpp +++ b/qt6/gen_qtemporarydir.cpp @@ -6,15 +6,13 @@ #include "gen_qtemporarydir.h" #include "_cgo_export.h" -void QTemporaryDir_new(QTemporaryDir** outptr_QTemporaryDir) { - QTemporaryDir* ret = new QTemporaryDir(); - *outptr_QTemporaryDir = ret; +QTemporaryDir* QTemporaryDir_new() { + return new QTemporaryDir(); } -void QTemporaryDir_new2(struct miqt_string templateName, QTemporaryDir** outptr_QTemporaryDir) { +QTemporaryDir* QTemporaryDir_new2(struct miqt_string templateName) { QString templateName_QString = QString::fromUtf8(templateName.data, templateName.len); - QTemporaryDir* ret = new QTemporaryDir(templateName_QString); - *outptr_QTemporaryDir = ret; + return new QTemporaryDir(templateName_QString); } void QTemporaryDir_Swap(QTemporaryDir* self, QTemporaryDir* other) { diff --git a/qt6/gen_qtemporarydir.go b/qt6/gen_qtemporarydir.go index 8a48bbbf..3bf8a489 100644 --- a/qt6/gen_qtemporarydir.go +++ b/qt6/gen_qtemporarydir.go @@ -37,24 +37,19 @@ func newQTemporaryDir(h *C.QTemporaryDir) *QTemporaryDir { if h == nil { return nil } + return &QTemporaryDir{h: h} } // UnsafeNewQTemporaryDir constructs the type using only unsafe pointers. func UnsafeNewQTemporaryDir(h unsafe.Pointer) *QTemporaryDir { - if h == nil { - return nil - } - - return &QTemporaryDir{h: (*C.QTemporaryDir)(h)} + return newQTemporaryDir((*C.QTemporaryDir)(h)) } // NewQTemporaryDir constructs a new QTemporaryDir object. func NewQTemporaryDir() *QTemporaryDir { - var outptr_QTemporaryDir *C.QTemporaryDir = nil - C.QTemporaryDir_new(&outptr_QTemporaryDir) - ret := newQTemporaryDir(outptr_QTemporaryDir) + ret := newQTemporaryDir(C.QTemporaryDir_new()) ret.isSubclass = true return ret } @@ -65,10 +60,8 @@ func NewQTemporaryDir2(templateName string) *QTemporaryDir { templateName_ms.data = C.CString(templateName) templateName_ms.len = C.size_t(len(templateName)) defer C.free(unsafe.Pointer(templateName_ms.data)) - var outptr_QTemporaryDir *C.QTemporaryDir = nil - C.QTemporaryDir_new2(templateName_ms, &outptr_QTemporaryDir) - ret := newQTemporaryDir(outptr_QTemporaryDir) + ret := newQTemporaryDir(C.QTemporaryDir_new2(templateName_ms)) ret.isSubclass = true return ret } diff --git a/qt6/gen_qtemporarydir.h b/qt6/gen_qtemporarydir.h index 2962ae16..ae581acf 100644 --- a/qt6/gen_qtemporarydir.h +++ b/qt6/gen_qtemporarydir.h @@ -20,8 +20,8 @@ class QTemporaryDir; typedef struct QTemporaryDir QTemporaryDir; #endif -void QTemporaryDir_new(QTemporaryDir** outptr_QTemporaryDir); -void QTemporaryDir_new2(struct miqt_string templateName, QTemporaryDir** outptr_QTemporaryDir); +QTemporaryDir* QTemporaryDir_new(); +QTemporaryDir* QTemporaryDir_new2(struct miqt_string templateName); void QTemporaryDir_Swap(QTemporaryDir* self, QTemporaryDir* other); bool QTemporaryDir_IsValid(const QTemporaryDir* self); struct miqt_string QTemporaryDir_ErrorString(const QTemporaryDir* self); diff --git a/qt6/gen_qtemporaryfile.cpp b/qt6/gen_qtemporaryfile.cpp index e1224bf5..31ff624b 100644 --- a/qt6/gen_qtemporaryfile.cpp +++ b/qt6/gen_qtemporaryfile.cpp @@ -172,46 +172,26 @@ public: }; -void QTemporaryFile_new(QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(); - *outptr_QTemporaryFile = ret; - *outptr_QFile = static_cast(ret); - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QTemporaryFile* QTemporaryFile_new() { + return new MiqtVirtualQTemporaryFile(); } -void QTemporaryFile_new2(struct miqt_string templateName, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { +QTemporaryFile* QTemporaryFile_new2(struct miqt_string templateName) { QString templateName_QString = QString::fromUtf8(templateName.data, templateName.len); - MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(templateName_QString); - *outptr_QTemporaryFile = ret; - *outptr_QFile = static_cast(ret); - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); + return new MiqtVirtualQTemporaryFile(templateName_QString); } -void QTemporaryFile_new3(QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(parent); - *outptr_QTemporaryFile = ret; - *outptr_QFile = static_cast(ret); - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QTemporaryFile* QTemporaryFile_new3(QObject* parent) { + return new MiqtVirtualQTemporaryFile(parent); } -void QTemporaryFile_new4(struct miqt_string templateName, QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { +QTemporaryFile* QTemporaryFile_new4(struct miqt_string templateName, QObject* parent) { QString templateName_QString = QString::fromUtf8(templateName.data, templateName.len); - MiqtVirtualQTemporaryFile* ret = new MiqtVirtualQTemporaryFile(templateName_QString, parent); - *outptr_QTemporaryFile = ret; - *outptr_QFile = static_cast(ret); - *outptr_QFileDevice = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); + return new MiqtVirtualQTemporaryFile(templateName_QString, parent); +} + +void QTemporaryFile_virtbase(QTemporaryFile* src, QFile** outptr_QFile) { + *outptr_QFile = static_cast(src); } QMetaObject* QTemporaryFile_MetaObject(const QTemporaryFile* self) { diff --git a/qt6/gen_qtemporaryfile.go b/qt6/gen_qtemporaryfile.go index 1ad57d58..4f47839b 100644 --- a/qt6/gen_qtemporaryfile.go +++ b/qt6/gen_qtemporaryfile.go @@ -35,35 +35,26 @@ func (this *QTemporaryFile) UnsafePointer() unsafe.Pointer { } // newQTemporaryFile constructs the type using only CGO pointers. -func newQTemporaryFile(h *C.QTemporaryFile, h_QFile *C.QFile, h_QFileDevice *C.QFileDevice, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QTemporaryFile { +func newQTemporaryFile(h *C.QTemporaryFile) *QTemporaryFile { if h == nil { return nil } + var outptr_QFile *C.QFile = nil + C.QTemporaryFile_virtbase(h, &outptr_QFile) + return &QTemporaryFile{h: h, - QFile: newQFile(h_QFile, h_QFileDevice, h_QIODevice, h_QObject, h_QIODeviceBase)} + QFile: newQFile(outptr_QFile)} } // UnsafeNewQTemporaryFile constructs the type using only unsafe pointers. -func UnsafeNewQTemporaryFile(h unsafe.Pointer, h_QFile unsafe.Pointer, h_QFileDevice unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QTemporaryFile { - if h == nil { - return nil - } - - return &QTemporaryFile{h: (*C.QTemporaryFile)(h), - QFile: UnsafeNewQFile(h_QFile, h_QFileDevice, h_QIODevice, h_QObject, h_QIODeviceBase)} +func UnsafeNewQTemporaryFile(h unsafe.Pointer) *QTemporaryFile { + return newQTemporaryFile((*C.QTemporaryFile)(h)) } // NewQTemporaryFile constructs a new QTemporaryFile object. func NewQTemporaryFile() *QTemporaryFile { - var outptr_QTemporaryFile *C.QTemporaryFile = nil - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QTemporaryFile_new(&outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQTemporaryFile(C.QTemporaryFile_new()) ret.isSubclass = true return ret } @@ -74,30 +65,16 @@ func NewQTemporaryFile2(templateName string) *QTemporaryFile { templateName_ms.data = C.CString(templateName) templateName_ms.len = C.size_t(len(templateName)) defer C.free(unsafe.Pointer(templateName_ms.data)) - var outptr_QTemporaryFile *C.QTemporaryFile = nil - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QTemporaryFile_new2(templateName_ms, &outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQTemporaryFile(C.QTemporaryFile_new2(templateName_ms)) ret.isSubclass = true return ret } // NewQTemporaryFile3 constructs a new QTemporaryFile object. func NewQTemporaryFile3(parent *QObject) *QTemporaryFile { - var outptr_QTemporaryFile *C.QTemporaryFile = nil - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QTemporaryFile_new3(parent.cPointer(), &outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQTemporaryFile(C.QTemporaryFile_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -108,15 +85,8 @@ func NewQTemporaryFile4(templateName string, parent *QObject) *QTemporaryFile { templateName_ms.data = C.CString(templateName) templateName_ms.len = C.size_t(len(templateName)) defer C.free(unsafe.Pointer(templateName_ms.data)) - var outptr_QTemporaryFile *C.QTemporaryFile = nil - var outptr_QFile *C.QFile = nil - var outptr_QFileDevice *C.QFileDevice = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QTemporaryFile_new4(templateName_ms, parent.cPointer(), &outptr_QTemporaryFile, &outptr_QFile, &outptr_QFileDevice, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQTemporaryFile(outptr_QTemporaryFile, outptr_QFile, outptr_QFileDevice, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQTemporaryFile(C.QTemporaryFile_new4(templateName_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -187,11 +157,11 @@ func QTemporaryFile_CreateNativeFile(fileName string) *QTemporaryFile { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - return newQTemporaryFile(C.QTemporaryFile_CreateNativeFile(fileName_ms), nil, nil, nil, nil, nil) + return newQTemporaryFile(C.QTemporaryFile_CreateNativeFile(fileName_ms)) } func QTemporaryFile_CreateNativeFileWithFile(file *QFile) *QTemporaryFile { - return newQTemporaryFile(C.QTemporaryFile_CreateNativeFileWithFile(file.cPointer()), nil, nil, nil, nil, nil) + return newQTemporaryFile(C.QTemporaryFile_CreateNativeFileWithFile(file.cPointer())) } func QTemporaryFile_Tr2(s string, c string) string { diff --git a/qt6/gen_qtemporaryfile.h b/qt6/gen_qtemporaryfile.h index a834c836..45d5a5dc 100644 --- a/qt6/gen_qtemporaryfile.h +++ b/qt6/gen_qtemporaryfile.h @@ -32,10 +32,11 @@ typedef struct QObject QObject; typedef struct QTemporaryFile QTemporaryFile; #endif -void QTemporaryFile_new(QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QTemporaryFile_new2(struct miqt_string templateName, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QTemporaryFile_new3(QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QTemporaryFile_new4(struct miqt_string templateName, QObject* parent, QTemporaryFile** outptr_QTemporaryFile, QFile** outptr_QFile, QFileDevice** outptr_QFileDevice, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +QTemporaryFile* QTemporaryFile_new(); +QTemporaryFile* QTemporaryFile_new2(struct miqt_string templateName); +QTemporaryFile* QTemporaryFile_new3(QObject* parent); +QTemporaryFile* QTemporaryFile_new4(struct miqt_string templateName, QObject* parent); +void QTemporaryFile_virtbase(QTemporaryFile* src, QFile** outptr_QFile); QMetaObject* QTemporaryFile_MetaObject(const QTemporaryFile* self); void* QTemporaryFile_Metacast(QTemporaryFile* self, const char* param1); struct miqt_string QTemporaryFile_Tr(const char* s); diff --git a/qt6/gen_qtestsupport_gui.go b/qt6/gen_qtestsupport_gui.go index 31b5509b..d69b7f54 100644 --- a/qt6/gen_qtestsupport_gui.go +++ b/qt6/gen_qtestsupport_gui.go @@ -37,16 +37,13 @@ func newQTest__QTouchEventSequence(h *C.QTest__QTouchEventSequence) *QTest__QTou if h == nil { return nil } + return &QTest__QTouchEventSequence{h: h} } // UnsafeNewQTest__QTouchEventSequence constructs the type using only unsafe pointers. func UnsafeNewQTest__QTouchEventSequence(h unsafe.Pointer) *QTest__QTouchEventSequence { - if h == nil { - return nil - } - - return &QTest__QTouchEventSequence{h: (*C.QTest__QTouchEventSequence)(h)} + return newQTest__QTouchEventSequence((*C.QTest__QTouchEventSequence)(h)) } func (this *QTest__QTouchEventSequence) Press(touchId int, pt *QPoint) *QTest__QTouchEventSequence { diff --git a/qt6/gen_qtestsupport_widgets.cpp b/qt6/gen_qtestsupport_widgets.cpp index a5e73dc6..22272428 100644 --- a/qt6/gen_qtestsupport_widgets.cpp +++ b/qt6/gen_qtestsupport_widgets.cpp @@ -63,10 +63,12 @@ public: }; -void QTest__QTouchEventWidgetSequence_new(QTest__QTouchEventWidgetSequence* param1, QTest__QTouchEventWidgetSequence** outptr_QTest__QTouchEventWidgetSequence, QTest__QTouchEventSequence** outptr_QTest__QTouchEventSequence) { - MiqtVirtualQTestQTouchEventWidgetSequence* ret = new MiqtVirtualQTestQTouchEventWidgetSequence(*param1); - *outptr_QTest__QTouchEventWidgetSequence = ret; - *outptr_QTest__QTouchEventSequence = static_cast(ret); +QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_new(QTest__QTouchEventWidgetSequence* param1) { + return new MiqtVirtualQTestQTouchEventWidgetSequence(*param1); +} + +void QTest__QTouchEventWidgetSequence_virtbase(QTest__QTouchEventWidgetSequence* src, QTest::QTouchEventSequence** outptr_QTest__QTouchEventSequence) { + *outptr_QTest__QTouchEventSequence = static_cast(src); } QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Press(QTest__QTouchEventWidgetSequence* self, int touchId, QPoint* pt) { diff --git a/qt6/gen_qtestsupport_widgets.go b/qt6/gen_qtestsupport_widgets.go index 1827ad7a..3ad71533 100644 --- a/qt6/gen_qtestsupport_widgets.go +++ b/qt6/gen_qtestsupport_widgets.go @@ -35,49 +35,44 @@ func (this *QTest__QTouchEventWidgetSequence) UnsafePointer() unsafe.Pointer { } // newQTest__QTouchEventWidgetSequence constructs the type using only CGO pointers. -func newQTest__QTouchEventWidgetSequence(h *C.QTest__QTouchEventWidgetSequence, h_QTest__QTouchEventSequence *C.QTest__QTouchEventSequence) *QTest__QTouchEventWidgetSequence { +func newQTest__QTouchEventWidgetSequence(h *C.QTest__QTouchEventWidgetSequence) *QTest__QTouchEventWidgetSequence { if h == nil { return nil } + var outptr_QTest__QTouchEventSequence *C.QTest__QTouchEventSequence = nil + C.QTest__QTouchEventWidgetSequence_virtbase(h, &outptr_QTest__QTouchEventSequence) + return &QTest__QTouchEventWidgetSequence{h: h, - QTest__QTouchEventSequence: newQTest__QTouchEventSequence(h_QTest__QTouchEventSequence)} + QTest__QTouchEventSequence: newQTest__QTouchEventSequence(outptr_QTest__QTouchEventSequence)} } // UnsafeNewQTest__QTouchEventWidgetSequence constructs the type using only unsafe pointers. -func UnsafeNewQTest__QTouchEventWidgetSequence(h unsafe.Pointer, h_QTest__QTouchEventSequence unsafe.Pointer) *QTest__QTouchEventWidgetSequence { - if h == nil { - return nil - } - - return &QTest__QTouchEventWidgetSequence{h: (*C.QTest__QTouchEventWidgetSequence)(h), - QTest__QTouchEventSequence: UnsafeNewQTest__QTouchEventSequence(h_QTest__QTouchEventSequence)} +func UnsafeNewQTest__QTouchEventWidgetSequence(h unsafe.Pointer) *QTest__QTouchEventWidgetSequence { + return newQTest__QTouchEventWidgetSequence((*C.QTest__QTouchEventWidgetSequence)(h)) } // NewQTest__QTouchEventWidgetSequence constructs a new QTest::QTouchEventWidgetSequence object. func NewQTest__QTouchEventWidgetSequence(param1 *QTest__QTouchEventWidgetSequence) *QTest__QTouchEventWidgetSequence { - var outptr_QTest__QTouchEventWidgetSequence *C.QTest__QTouchEventWidgetSequence = nil - var outptr_QTest__QTouchEventSequence *C.QTest__QTouchEventSequence = nil - C.QTest__QTouchEventWidgetSequence_new(param1.cPointer(), &outptr_QTest__QTouchEventWidgetSequence, &outptr_QTest__QTouchEventSequence) - ret := newQTest__QTouchEventWidgetSequence(outptr_QTest__QTouchEventWidgetSequence, outptr_QTest__QTouchEventSequence) + ret := newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_new(param1.cPointer())) ret.isSubclass = true return ret } func (this *QTest__QTouchEventWidgetSequence) Press(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence { - return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Press(this.h, (C.int)(touchId), pt.cPointer()), nil) + return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Press(this.h, (C.int)(touchId), pt.cPointer())) } func (this *QTest__QTouchEventWidgetSequence) Move(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence { - return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Move(this.h, (C.int)(touchId), pt.cPointer()), nil) + return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Move(this.h, (C.int)(touchId), pt.cPointer())) } func (this *QTest__QTouchEventWidgetSequence) Release(touchId int, pt *QPoint) *QTest__QTouchEventWidgetSequence { - return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Release(this.h, (C.int)(touchId), pt.cPointer()), nil) + return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Release(this.h, (C.int)(touchId), pt.cPointer())) } func (this *QTest__QTouchEventWidgetSequence) Stationary(touchId int) *QTest__QTouchEventWidgetSequence { - return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Stationary(this.h, (C.int)(touchId)), nil) + return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Stationary(this.h, (C.int)(touchId))) } func (this *QTest__QTouchEventWidgetSequence) Commit(processEvents bool) bool { @@ -85,20 +80,20 @@ func (this *QTest__QTouchEventWidgetSequence) Commit(processEvents bool) bool { } func (this *QTest__QTouchEventWidgetSequence) Press3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence { - return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Press3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer()), nil) + return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Press3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer())) } func (this *QTest__QTouchEventWidgetSequence) Move3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence { - return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Move3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer()), nil) + return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Move3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer())) } func (this *QTest__QTouchEventWidgetSequence) Release3(touchId int, pt *QPoint, widget *QWidget) *QTest__QTouchEventWidgetSequence { - return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Release3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer()), nil) + return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_Release3(this.h, (C.int)(touchId), pt.cPointer(), widget.cPointer())) } func (this *QTest__QTouchEventWidgetSequence) callVirtualBase_Stationary(touchId int) *QTest__QTouchEventWidgetSequence { - return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_virtualbase_Stationary(unsafe.Pointer(this.h), (C.int)(touchId)), nil) + return newQTest__QTouchEventWidgetSequence(C.QTest__QTouchEventWidgetSequence_virtualbase_Stationary(unsafe.Pointer(this.h), (C.int)(touchId))) } func (this *QTest__QTouchEventWidgetSequence) OnStationary(slot func(super func(touchId int) *QTest__QTouchEventWidgetSequence, touchId int) *QTest__QTouchEventWidgetSequence) { diff --git a/qt6/gen_qtestsupport_widgets.h b/qt6/gen_qtestsupport_widgets.h index 1e138eb4..aa52173a 100644 --- a/qt6/gen_qtestsupport_widgets.h +++ b/qt6/gen_qtestsupport_widgets.h @@ -34,7 +34,8 @@ typedef struct QTest__QTouchEventWidgetSequence QTest__QTouchEventWidgetSequence typedef struct QWidget QWidget; #endif -void QTest__QTouchEventWidgetSequence_new(QTest__QTouchEventWidgetSequence* param1, QTest__QTouchEventWidgetSequence** outptr_QTest__QTouchEventWidgetSequence, QTest__QTouchEventSequence** outptr_QTest__QTouchEventSequence); +QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_new(QTest__QTouchEventWidgetSequence* param1); +void QTest__QTouchEventWidgetSequence_virtbase(QTest__QTouchEventWidgetSequence* src, QTest__QTouchEventSequence** outptr_QTest__QTouchEventSequence); QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Press(QTest__QTouchEventWidgetSequence* self, int touchId, QPoint* pt); QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Move(QTest__QTouchEventWidgetSequence* self, int touchId, QPoint* pt); QTest__QTouchEventWidgetSequence* QTest__QTouchEventWidgetSequence_Release(QTest__QTouchEventWidgetSequence* self, int touchId, QPoint* pt); diff --git a/qt6/gen_qtextboundaryfinder.cpp b/qt6/gen_qtextboundaryfinder.cpp index 2b558e37..9ae004dd 100644 --- a/qt6/gen_qtextboundaryfinder.cpp +++ b/qt6/gen_qtextboundaryfinder.cpp @@ -7,35 +7,29 @@ #include "gen_qtextboundaryfinder.h" #include "_cgo_export.h" -void QTextBoundaryFinder_new(QTextBoundaryFinder** outptr_QTextBoundaryFinder) { - QTextBoundaryFinder* ret = new QTextBoundaryFinder(); - *outptr_QTextBoundaryFinder = ret; +QTextBoundaryFinder* QTextBoundaryFinder_new() { + return new QTextBoundaryFinder(); } -void QTextBoundaryFinder_new2(QTextBoundaryFinder* other, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { - QTextBoundaryFinder* ret = new QTextBoundaryFinder(*other); - *outptr_QTextBoundaryFinder = ret; +QTextBoundaryFinder* QTextBoundaryFinder_new2(QTextBoundaryFinder* other) { + return new QTextBoundaryFinder(*other); } -void QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { +QTextBoundaryFinder* QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal) { QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len); - QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), stringVal_QString); - *outptr_QTextBoundaryFinder = ret; + return new QTextBoundaryFinder(static_cast(typeVal), stringVal_QString); } -void QTextBoundaryFinder_new4(int typeVal, QChar* chars, ptrdiff_t length, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { - QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), chars, (qsizetype)(length)); - *outptr_QTextBoundaryFinder = ret; +QTextBoundaryFinder* QTextBoundaryFinder_new4(int typeVal, QChar* chars, ptrdiff_t length) { + return new QTextBoundaryFinder(static_cast(typeVal), chars, (qsizetype)(length)); } -void QTextBoundaryFinder_new5(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { - QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), chars, (qsizetype)(length), static_cast(buffer)); - *outptr_QTextBoundaryFinder = ret; +QTextBoundaryFinder* QTextBoundaryFinder_new5(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer) { + return new QTextBoundaryFinder(static_cast(typeVal), chars, (qsizetype)(length), static_cast(buffer)); } -void QTextBoundaryFinder_new6(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer, ptrdiff_t bufferSize, QTextBoundaryFinder** outptr_QTextBoundaryFinder) { - QTextBoundaryFinder* ret = new QTextBoundaryFinder(static_cast(typeVal), chars, (qsizetype)(length), static_cast(buffer), (qsizetype)(bufferSize)); - *outptr_QTextBoundaryFinder = ret; +QTextBoundaryFinder* QTextBoundaryFinder_new6(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer, ptrdiff_t bufferSize) { + return new QTextBoundaryFinder(static_cast(typeVal), chars, (qsizetype)(length), static_cast(buffer), (qsizetype)(bufferSize)); } void QTextBoundaryFinder_OperatorAssign(QTextBoundaryFinder* self, QTextBoundaryFinder* other) { diff --git a/qt6/gen_qtextboundaryfinder.go b/qt6/gen_qtextboundaryfinder.go index e10640bb..b1df3590 100644 --- a/qt6/gen_qtextboundaryfinder.go +++ b/qt6/gen_qtextboundaryfinder.go @@ -57,34 +57,27 @@ func newQTextBoundaryFinder(h *C.QTextBoundaryFinder) *QTextBoundaryFinder { if h == nil { return nil } + return &QTextBoundaryFinder{h: h} } // UnsafeNewQTextBoundaryFinder constructs the type using only unsafe pointers. func UnsafeNewQTextBoundaryFinder(h unsafe.Pointer) *QTextBoundaryFinder { - if h == nil { - return nil - } - - return &QTextBoundaryFinder{h: (*C.QTextBoundaryFinder)(h)} + return newQTextBoundaryFinder((*C.QTextBoundaryFinder)(h)) } // NewQTextBoundaryFinder constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder() *QTextBoundaryFinder { - var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil - C.QTextBoundaryFinder_new(&outptr_QTextBoundaryFinder) - ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(C.QTextBoundaryFinder_new()) ret.isSubclass = true return ret } // NewQTextBoundaryFinder2 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder2(other *QTextBoundaryFinder) *QTextBoundaryFinder { - var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil - C.QTextBoundaryFinder_new2(other.cPointer(), &outptr_QTextBoundaryFinder) - ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(C.QTextBoundaryFinder_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -95,40 +88,32 @@ func NewQTextBoundaryFinder3(typeVal QTextBoundaryFinder__BoundaryType, stringVa stringVal_ms.data = C.CString(stringVal) stringVal_ms.len = C.size_t(len(stringVal)) defer C.free(unsafe.Pointer(stringVal_ms.data)) - var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil - C.QTextBoundaryFinder_new3((C.int)(typeVal), stringVal_ms, &outptr_QTextBoundaryFinder) - ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(C.QTextBoundaryFinder_new3((C.int)(typeVal), stringVal_ms)) ret.isSubclass = true return ret } // NewQTextBoundaryFinder4 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder4(typeVal QTextBoundaryFinder__BoundaryType, chars *QChar, length int64) *QTextBoundaryFinder { - var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil - C.QTextBoundaryFinder_new4((C.int)(typeVal), chars.cPointer(), (C.ptrdiff_t)(length), &outptr_QTextBoundaryFinder) - ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(C.QTextBoundaryFinder_new4((C.int)(typeVal), chars.cPointer(), (C.ptrdiff_t)(length))) ret.isSubclass = true return ret } // NewQTextBoundaryFinder5 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder5(typeVal QTextBoundaryFinder__BoundaryType, chars *QChar, length int64, buffer *byte) *QTextBoundaryFinder { - var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil - C.QTextBoundaryFinder_new5((C.int)(typeVal), chars.cPointer(), (C.ptrdiff_t)(length), (*C.uchar)(unsafe.Pointer(buffer)), &outptr_QTextBoundaryFinder) - ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(C.QTextBoundaryFinder_new5((C.int)(typeVal), chars.cPointer(), (C.ptrdiff_t)(length), (*C.uchar)(unsafe.Pointer(buffer)))) ret.isSubclass = true return ret } // NewQTextBoundaryFinder6 constructs a new QTextBoundaryFinder object. func NewQTextBoundaryFinder6(typeVal QTextBoundaryFinder__BoundaryType, chars *QChar, length int64, buffer *byte, bufferSize int64) *QTextBoundaryFinder { - var outptr_QTextBoundaryFinder *C.QTextBoundaryFinder = nil - C.QTextBoundaryFinder_new6((C.int)(typeVal), chars.cPointer(), (C.ptrdiff_t)(length), (*C.uchar)(unsafe.Pointer(buffer)), (C.ptrdiff_t)(bufferSize), &outptr_QTextBoundaryFinder) - ret := newQTextBoundaryFinder(outptr_QTextBoundaryFinder) + ret := newQTextBoundaryFinder(C.QTextBoundaryFinder_new6((C.int)(typeVal), chars.cPointer(), (C.ptrdiff_t)(length), (*C.uchar)(unsafe.Pointer(buffer)), (C.ptrdiff_t)(bufferSize))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qtextboundaryfinder.h b/qt6/gen_qtextboundaryfinder.h index 7f02c37c..448899c6 100644 --- a/qt6/gen_qtextboundaryfinder.h +++ b/qt6/gen_qtextboundaryfinder.h @@ -22,12 +22,12 @@ typedef struct QChar QChar; typedef struct QTextBoundaryFinder QTextBoundaryFinder; #endif -void QTextBoundaryFinder_new(QTextBoundaryFinder** outptr_QTextBoundaryFinder); -void QTextBoundaryFinder_new2(QTextBoundaryFinder* other, QTextBoundaryFinder** outptr_QTextBoundaryFinder); -void QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal, QTextBoundaryFinder** outptr_QTextBoundaryFinder); -void QTextBoundaryFinder_new4(int typeVal, QChar* chars, ptrdiff_t length, QTextBoundaryFinder** outptr_QTextBoundaryFinder); -void QTextBoundaryFinder_new5(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer, QTextBoundaryFinder** outptr_QTextBoundaryFinder); -void QTextBoundaryFinder_new6(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer, ptrdiff_t bufferSize, QTextBoundaryFinder** outptr_QTextBoundaryFinder); +QTextBoundaryFinder* QTextBoundaryFinder_new(); +QTextBoundaryFinder* QTextBoundaryFinder_new2(QTextBoundaryFinder* other); +QTextBoundaryFinder* QTextBoundaryFinder_new3(int typeVal, struct miqt_string stringVal); +QTextBoundaryFinder* QTextBoundaryFinder_new4(int typeVal, QChar* chars, ptrdiff_t length); +QTextBoundaryFinder* QTextBoundaryFinder_new5(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer); +QTextBoundaryFinder* QTextBoundaryFinder_new6(int typeVal, QChar* chars, ptrdiff_t length, unsigned char* buffer, ptrdiff_t bufferSize); void QTextBoundaryFinder_OperatorAssign(QTextBoundaryFinder* self, QTextBoundaryFinder* other); bool QTextBoundaryFinder_IsValid(const QTextBoundaryFinder* self); int QTextBoundaryFinder_Type(const QTextBoundaryFinder* self); diff --git a/qt6/gen_qtextbrowser.cpp b/qt6/gen_qtextbrowser.cpp index 58e0e941..5ea425f4 100644 --- a/qt6/gen_qtextbrowser.cpp +++ b/qt6/gen_qtextbrowser.cpp @@ -859,26 +859,16 @@ public: }; -void QTextBrowser_new(QWidget* parent, QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTextBrowser* ret = new MiqtVirtualQTextBrowser(parent); - *outptr_QTextBrowser = ret; - *outptr_QTextEdit = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTextBrowser* QTextBrowser_new(QWidget* parent) { + return new MiqtVirtualQTextBrowser(parent); } -void QTextBrowser_new2(QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTextBrowser* ret = new MiqtVirtualQTextBrowser(); - *outptr_QTextBrowser = ret; - *outptr_QTextEdit = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTextBrowser* QTextBrowser_new2() { + return new MiqtVirtualQTextBrowser(); +} + +void QTextBrowser_virtbase(QTextBrowser* src, QTextEdit** outptr_QTextEdit) { + *outptr_QTextEdit = static_cast(src); } QMetaObject* QTextBrowser_MetaObject(const QTextBrowser* self) { diff --git a/qt6/gen_qtextbrowser.go b/qt6/gen_qtextbrowser.go index d89a85a5..7e9829ed 100644 --- a/qt6/gen_qtextbrowser.go +++ b/qt6/gen_qtextbrowser.go @@ -35,52 +35,34 @@ func (this *QTextBrowser) UnsafePointer() unsafe.Pointer { } // newQTextBrowser constructs the type using only CGO pointers. -func newQTextBrowser(h *C.QTextBrowser, h_QTextEdit *C.QTextEdit, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTextBrowser { +func newQTextBrowser(h *C.QTextBrowser) *QTextBrowser { if h == nil { return nil } + var outptr_QTextEdit *C.QTextEdit = nil + C.QTextBrowser_virtbase(h, &outptr_QTextEdit) + return &QTextBrowser{h: h, - QTextEdit: newQTextEdit(h_QTextEdit, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QTextEdit: newQTextEdit(outptr_QTextEdit)} } // UnsafeNewQTextBrowser constructs the type using only unsafe pointers. -func UnsafeNewQTextBrowser(h unsafe.Pointer, h_QTextEdit unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTextBrowser { - if h == nil { - return nil - } - - return &QTextBrowser{h: (*C.QTextBrowser)(h), - QTextEdit: UnsafeNewQTextEdit(h_QTextEdit, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTextBrowser(h unsafe.Pointer) *QTextBrowser { + return newQTextBrowser((*C.QTextBrowser)(h)) } // NewQTextBrowser constructs a new QTextBrowser object. func NewQTextBrowser(parent *QWidget) *QTextBrowser { - var outptr_QTextBrowser *C.QTextBrowser = nil - var outptr_QTextEdit *C.QTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTextBrowser_new(parent.cPointer(), &outptr_QTextBrowser, &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTextBrowser(outptr_QTextBrowser, outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTextBrowser(C.QTextBrowser_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTextBrowser2 constructs a new QTextBrowser object. func NewQTextBrowser2() *QTextBrowser { - var outptr_QTextBrowser *C.QTextBrowser = nil - var outptr_QTextEdit *C.QTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTextBrowser_new2(&outptr_QTextBrowser, &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTextBrowser(outptr_QTextBrowser, outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTextBrowser(C.QTextBrowser_new2()) ret.isSubclass = true return ret } @@ -531,7 +513,7 @@ func miqt_exec_callback_QTextBrowser_KeyPressEvent(self *C.QTextBrowser, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(ev, nil, nil) + slotval1 := newQKeyEvent(ev) gofunc((&QTextBrowser{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -557,7 +539,7 @@ func miqt_exec_callback_QTextBrowser_MouseMoveEvent(self *C.QTextBrowser, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QTextBrowser{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -583,7 +565,7 @@ func miqt_exec_callback_QTextBrowser_MousePressEvent(self *C.QTextBrowser, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QTextBrowser{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -609,7 +591,7 @@ func miqt_exec_callback_QTextBrowser_MouseReleaseEvent(self *C.QTextBrowser, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(ev, nil, nil, nil, nil) + slotval1 := newQMouseEvent(ev) gofunc((&QTextBrowser{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -635,7 +617,7 @@ func miqt_exec_callback_QTextBrowser_FocusOutEvent(self *C.QTextBrowser, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(ev, nil) + slotval1 := newQFocusEvent(ev) gofunc((&QTextBrowser{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -689,7 +671,7 @@ func miqt_exec_callback_QTextBrowser_PaintEvent(self *C.QTextBrowser, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -773,7 +755,7 @@ func miqt_exec_callback_QTextBrowser_TimerEvent(self *C.QTextBrowser, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -799,7 +781,7 @@ func miqt_exec_callback_QTextBrowser_KeyReleaseEvent(self *C.QTextBrowser, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -825,7 +807,7 @@ func miqt_exec_callback_QTextBrowser_ResizeEvent(self *C.QTextBrowser, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -851,7 +833,7 @@ func miqt_exec_callback_QTextBrowser_MouseDoubleClickEvent(self *C.QTextBrowser, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -877,7 +859,7 @@ func miqt_exec_callback_QTextBrowser_ContextMenuEvent(self *C.QTextBrowser, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(e, nil, nil) + slotval1 := newQContextMenuEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -903,7 +885,7 @@ func miqt_exec_callback_QTextBrowser_DragEnterEvent(self *C.QTextBrowser, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(e, nil, nil, nil) + slotval1 := newQDragEnterEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -929,7 +911,7 @@ func miqt_exec_callback_QTextBrowser_DragLeaveEvent(self *C.QTextBrowser, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(e, nil) + slotval1 := newQDragLeaveEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -955,7 +937,7 @@ func miqt_exec_callback_QTextBrowser_DragMoveEvent(self *C.QTextBrowser, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(e, nil, nil) + slotval1 := newQDragMoveEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -981,7 +963,7 @@ func miqt_exec_callback_QTextBrowser_DropEvent(self *C.QTextBrowser, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(e, nil) + slotval1 := newQDropEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1007,7 +989,7 @@ func miqt_exec_callback_QTextBrowser_FocusInEvent(self *C.QTextBrowser, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1033,7 +1015,7 @@ func miqt_exec_callback_QTextBrowser_ShowEvent(self *C.QTextBrowser, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QTextBrowser{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1085,7 +1067,7 @@ func miqt_exec_callback_QTextBrowser_WheelEvent(self *C.QTextBrowser, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QTextBrowser{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1093,7 +1075,7 @@ func miqt_exec_callback_QTextBrowser_WheelEvent(self *C.QTextBrowser, cb C.intpt func (this *QTextBrowser) callVirtualBase_CreateMimeDataFromSelection() *QMimeData { - return newQMimeData(C.QTextBrowser_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h)), nil) + return newQMimeData(C.QTextBrowser_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h))) } func (this *QTextBrowser) OnCreateMimeDataFromSelection(slot func(super func() *QMimeData) *QMimeData) { @@ -1136,7 +1118,7 @@ func miqt_exec_callback_QTextBrowser_CanInsertFromMimeData(self *C.QTextBrowser, } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(source, nil) + slotval1 := newQMimeData(source) virtualReturn := gofunc((&QTextBrowser{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) @@ -1164,7 +1146,7 @@ func miqt_exec_callback_QTextBrowser_InsertFromMimeData(self *C.QTextBrowser, cb } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(source, nil) + slotval1 := newQMimeData(source) gofunc((&QTextBrowser{h: self}).callVirtualBase_InsertFromMimeData, slotval1) @@ -1190,7 +1172,7 @@ func miqt_exec_callback_QTextBrowser_InputMethodEvent(self *C.QTextBrowser, cb C } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QTextBrowser{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qtextbrowser.h b/qt6/gen_qtextbrowser.h index a8981da3..6c029828 100644 --- a/qt6/gen_qtextbrowser.h +++ b/qt6/gen_qtextbrowser.h @@ -72,8 +72,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QTextBrowser_new(QWidget* parent, QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTextBrowser_new2(QTextBrowser** outptr_QTextBrowser, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTextBrowser* QTextBrowser_new(QWidget* parent); +QTextBrowser* QTextBrowser_new2(); +void QTextBrowser_virtbase(QTextBrowser* src, QTextEdit** outptr_QTextEdit); QMetaObject* QTextBrowser_MetaObject(const QTextBrowser* self); void* QTextBrowser_Metacast(QTextBrowser* self, const char* param1); struct miqt_string QTextBrowser_Tr(const char* s); diff --git a/qt6/gen_qtextcursor.cpp b/qt6/gen_qtextcursor.cpp index c80f1f51..8b16d90e 100644 --- a/qt6/gen_qtextcursor.cpp +++ b/qt6/gen_qtextcursor.cpp @@ -19,29 +19,24 @@ #include "gen_qtextcursor.h" #include "_cgo_export.h" -void QTextCursor_new(QTextCursor** outptr_QTextCursor) { - QTextCursor* ret = new QTextCursor(); - *outptr_QTextCursor = ret; +QTextCursor* QTextCursor_new() { + return new QTextCursor(); } -void QTextCursor_new2(QTextDocument* document, QTextCursor** outptr_QTextCursor) { - QTextCursor* ret = new QTextCursor(document); - *outptr_QTextCursor = ret; +QTextCursor* QTextCursor_new2(QTextDocument* document) { + return new QTextCursor(document); } -void QTextCursor_new3(QTextFrame* frame, QTextCursor** outptr_QTextCursor) { - QTextCursor* ret = new QTextCursor(frame); - *outptr_QTextCursor = ret; +QTextCursor* QTextCursor_new3(QTextFrame* frame) { + return new QTextCursor(frame); } -void QTextCursor_new4(QTextBlock* block, QTextCursor** outptr_QTextCursor) { - QTextCursor* ret = new QTextCursor(*block); - *outptr_QTextCursor = ret; +QTextCursor* QTextCursor_new4(QTextBlock* block) { + return new QTextCursor(*block); } -void QTextCursor_new5(QTextCursor* cursor, QTextCursor** outptr_QTextCursor) { - QTextCursor* ret = new QTextCursor(*cursor); - *outptr_QTextCursor = ret; +QTextCursor* QTextCursor_new5(QTextCursor* cursor) { + return new QTextCursor(*cursor); } void QTextCursor_OperatorAssign(QTextCursor* self, QTextCursor* other) { diff --git a/qt6/gen_qtextcursor.go b/qt6/gen_qtextcursor.go index f3c5b3f3..eafbd2e5 100644 --- a/qt6/gen_qtextcursor.go +++ b/qt6/gen_qtextcursor.go @@ -83,64 +83,51 @@ func newQTextCursor(h *C.QTextCursor) *QTextCursor { if h == nil { return nil } + return &QTextCursor{h: h} } // UnsafeNewQTextCursor constructs the type using only unsafe pointers. func UnsafeNewQTextCursor(h unsafe.Pointer) *QTextCursor { - if h == nil { - return nil - } - - return &QTextCursor{h: (*C.QTextCursor)(h)} + return newQTextCursor((*C.QTextCursor)(h)) } // NewQTextCursor constructs a new QTextCursor object. func NewQTextCursor() *QTextCursor { - var outptr_QTextCursor *C.QTextCursor = nil - C.QTextCursor_new(&outptr_QTextCursor) - ret := newQTextCursor(outptr_QTextCursor) + ret := newQTextCursor(C.QTextCursor_new()) ret.isSubclass = true return ret } // NewQTextCursor2 constructs a new QTextCursor object. func NewQTextCursor2(document *QTextDocument) *QTextCursor { - var outptr_QTextCursor *C.QTextCursor = nil - C.QTextCursor_new2(document.cPointer(), &outptr_QTextCursor) - ret := newQTextCursor(outptr_QTextCursor) + ret := newQTextCursor(C.QTextCursor_new2(document.cPointer())) ret.isSubclass = true return ret } // NewQTextCursor3 constructs a new QTextCursor object. func NewQTextCursor3(frame *QTextFrame) *QTextCursor { - var outptr_QTextCursor *C.QTextCursor = nil - C.QTextCursor_new3(frame.cPointer(), &outptr_QTextCursor) - ret := newQTextCursor(outptr_QTextCursor) + ret := newQTextCursor(C.QTextCursor_new3(frame.cPointer())) ret.isSubclass = true return ret } // NewQTextCursor4 constructs a new QTextCursor object. func NewQTextCursor4(block *QTextBlock) *QTextCursor { - var outptr_QTextCursor *C.QTextCursor = nil - C.QTextCursor_new4(block.cPointer(), &outptr_QTextCursor) - ret := newQTextCursor(outptr_QTextCursor) + ret := newQTextCursor(C.QTextCursor_new4(block.cPointer())) ret.isSubclass = true return ret } // NewQTextCursor5 constructs a new QTextCursor object. func NewQTextCursor5(cursor *QTextCursor) *QTextCursor { - var outptr_QTextCursor *C.QTextCursor = nil - C.QTextCursor_new5(cursor.cPointer(), &outptr_QTextCursor) - ret := newQTextCursor(outptr_QTextCursor) + ret := newQTextCursor(C.QTextCursor_new5(cursor.cPointer())) ret.isSubclass = true return ret } @@ -277,7 +264,7 @@ func (this *QTextCursor) Block() *QTextBlock { } func (this *QTextCursor) CharFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QTextCursor_CharFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QTextCursor_CharFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -291,7 +278,7 @@ func (this *QTextCursor) MergeCharFormat(modifier *QTextCharFormat) { } func (this *QTextCursor) BlockFormat() *QTextBlockFormat { - _goptr := newQTextBlockFormat(C.QTextCursor_BlockFormat(this.h), nil) + _goptr := newQTextBlockFormat(C.QTextCursor_BlockFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -305,7 +292,7 @@ func (this *QTextCursor) MergeBlockFormat(modifier *QTextBlockFormat) { } func (this *QTextCursor) BlockCharFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QTextCursor_BlockCharFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QTextCursor_BlockCharFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -347,43 +334,43 @@ func (this *QTextCursor) InsertBlock2(format *QTextBlockFormat, charFormat *QTex } func (this *QTextCursor) InsertList(format *QTextListFormat) *QTextList { - return newQTextList(C.QTextCursor_InsertList(this.h, format.cPointer()), nil, nil, nil) + return newQTextList(C.QTextCursor_InsertList(this.h, format.cPointer())) } func (this *QTextCursor) InsertListWithStyle(style QTextListFormat__Style) *QTextList { - return newQTextList(C.QTextCursor_InsertListWithStyle(this.h, (C.int)(style)), nil, nil, nil) + return newQTextList(C.QTextCursor_InsertListWithStyle(this.h, (C.int)(style))) } func (this *QTextCursor) CreateList(format *QTextListFormat) *QTextList { - return newQTextList(C.QTextCursor_CreateList(this.h, format.cPointer()), nil, nil, nil) + return newQTextList(C.QTextCursor_CreateList(this.h, format.cPointer())) } func (this *QTextCursor) CreateListWithStyle(style QTextListFormat__Style) *QTextList { - return newQTextList(C.QTextCursor_CreateListWithStyle(this.h, (C.int)(style)), nil, nil, nil) + return newQTextList(C.QTextCursor_CreateListWithStyle(this.h, (C.int)(style))) } func (this *QTextCursor) CurrentList() *QTextList { - return newQTextList(C.QTextCursor_CurrentList(this.h), nil, nil, nil) + return newQTextList(C.QTextCursor_CurrentList(this.h)) } func (this *QTextCursor) InsertTable(rows int, cols int, format *QTextTableFormat) *QTextTable { - return newQTextTable(C.QTextCursor_InsertTable(this.h, (C.int)(rows), (C.int)(cols), format.cPointer()), nil, nil, nil) + return newQTextTable(C.QTextCursor_InsertTable(this.h, (C.int)(rows), (C.int)(cols), format.cPointer())) } func (this *QTextCursor) InsertTable2(rows int, cols int) *QTextTable { - return newQTextTable(C.QTextCursor_InsertTable2(this.h, (C.int)(rows), (C.int)(cols)), nil, nil, nil) + return newQTextTable(C.QTextCursor_InsertTable2(this.h, (C.int)(rows), (C.int)(cols))) } func (this *QTextCursor) CurrentTable() *QTextTable { - return newQTextTable(C.QTextCursor_CurrentTable(this.h), nil, nil, nil) + return newQTextTable(C.QTextCursor_CurrentTable(this.h)) } func (this *QTextCursor) InsertFrame(format *QTextFrameFormat) *QTextFrame { - return newQTextFrame(C.QTextCursor_InsertFrame(this.h, format.cPointer()), nil, nil) + return newQTextFrame(C.QTextCursor_InsertFrame(this.h, format.cPointer())) } func (this *QTextCursor) CurrentFrame() *QTextFrame { - return newQTextFrame(C.QTextCursor_CurrentFrame(this.h), nil, nil) + return newQTextFrame(C.QTextCursor_CurrentFrame(this.h)) } func (this *QTextCursor) InsertFragment(fragment *QTextDocumentFragment) { @@ -475,7 +462,7 @@ func (this *QTextCursor) ColumnNumber() int { } func (this *QTextCursor) Document() *QTextDocument { - return newQTextDocument(C.QTextCursor_Document(this.h), nil) + return newQTextDocument(C.QTextCursor_Document(this.h)) } func (this *QTextCursor) SetPosition2(pos int, mode QTextCursor__MoveMode) { diff --git a/qt6/gen_qtextcursor.h b/qt6/gen_qtextcursor.h index f30115ab..bafd8c51 100644 --- a/qt6/gen_qtextcursor.h +++ b/qt6/gen_qtextcursor.h @@ -46,11 +46,11 @@ typedef struct QTextTable QTextTable; typedef struct QTextTableFormat QTextTableFormat; #endif -void QTextCursor_new(QTextCursor** outptr_QTextCursor); -void QTextCursor_new2(QTextDocument* document, QTextCursor** outptr_QTextCursor); -void QTextCursor_new3(QTextFrame* frame, QTextCursor** outptr_QTextCursor); -void QTextCursor_new4(QTextBlock* block, QTextCursor** outptr_QTextCursor); -void QTextCursor_new5(QTextCursor* cursor, QTextCursor** outptr_QTextCursor); +QTextCursor* QTextCursor_new(); +QTextCursor* QTextCursor_new2(QTextDocument* document); +QTextCursor* QTextCursor_new3(QTextFrame* frame); +QTextCursor* QTextCursor_new4(QTextBlock* block); +QTextCursor* QTextCursor_new5(QTextCursor* cursor); void QTextCursor_OperatorAssign(QTextCursor* self, QTextCursor* other); void QTextCursor_Swap(QTextCursor* self, QTextCursor* other); bool QTextCursor_IsNull(const QTextCursor* self); diff --git a/qt6/gen_qtextdocument.cpp b/qt6/gen_qtextdocument.cpp index 6cb6fd87..7803733d 100644 --- a/qt6/gen_qtextdocument.cpp +++ b/qt6/gen_qtextdocument.cpp @@ -307,30 +307,26 @@ public: }; -void QTextDocument_new(QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { - MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(); - *outptr_QTextDocument = ret; - *outptr_QObject = static_cast(ret); +QTextDocument* QTextDocument_new() { + return new MiqtVirtualQTextDocument(); } -void QTextDocument_new2(struct miqt_string text, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { +QTextDocument* QTextDocument_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(text_QString); - *outptr_QTextDocument = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQTextDocument(text_QString); } -void QTextDocument_new3(QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { - MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(parent); - *outptr_QTextDocument = ret; - *outptr_QObject = static_cast(ret); +QTextDocument* QTextDocument_new3(QObject* parent) { + return new MiqtVirtualQTextDocument(parent); } -void QTextDocument_new4(struct miqt_string text, QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject) { +QTextDocument* QTextDocument_new4(struct miqt_string text, QObject* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTextDocument* ret = new MiqtVirtualQTextDocument(text_QString, parent); - *outptr_QTextDocument = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQTextDocument(text_QString, parent); +} + +void QTextDocument_virtbase(QTextDocument* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QTextDocument_MetaObject(const QTextDocument* self) { diff --git a/qt6/gen_qtextdocument.go b/qt6/gen_qtextdocument.go index b67403da..8411cc10 100644 --- a/qt6/gen_qtextdocument.go +++ b/qt6/gen_qtextdocument.go @@ -81,16 +81,13 @@ func newQAbstractUndoItem(h *C.QAbstractUndoItem) *QAbstractUndoItem { if h == nil { return nil } + return &QAbstractUndoItem{h: h} } // UnsafeNewQAbstractUndoItem constructs the type using only unsafe pointers. func UnsafeNewQAbstractUndoItem(h unsafe.Pointer) *QAbstractUndoItem { - if h == nil { - return nil - } - - return &QAbstractUndoItem{h: (*C.QAbstractUndoItem)(h)} + return newQAbstractUndoItem((*C.QAbstractUndoItem)(h)) } func (this *QAbstractUndoItem) Undo() { @@ -140,31 +137,26 @@ func (this *QTextDocument) UnsafePointer() unsafe.Pointer { } // newQTextDocument constructs the type using only CGO pointers. -func newQTextDocument(h *C.QTextDocument, h_QObject *C.QObject) *QTextDocument { +func newQTextDocument(h *C.QTextDocument) *QTextDocument { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QTextDocument_virtbase(h, &outptr_QObject) + return &QTextDocument{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQTextDocument constructs the type using only unsafe pointers. -func UnsafeNewQTextDocument(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTextDocument { - if h == nil { - return nil - } - - return &QTextDocument{h: (*C.QTextDocument)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQTextDocument(h unsafe.Pointer) *QTextDocument { + return newQTextDocument((*C.QTextDocument)(h)) } // NewQTextDocument constructs a new QTextDocument object. func NewQTextDocument() *QTextDocument { - var outptr_QTextDocument *C.QTextDocument = nil - var outptr_QObject *C.QObject = nil - C.QTextDocument_new(&outptr_QTextDocument, &outptr_QObject) - ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret := newQTextDocument(C.QTextDocument_new()) ret.isSubclass = true return ret } @@ -175,22 +167,16 @@ func NewQTextDocument2(text string) *QTextDocument { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTextDocument *C.QTextDocument = nil - var outptr_QObject *C.QObject = nil - C.QTextDocument_new2(text_ms, &outptr_QTextDocument, &outptr_QObject) - ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret := newQTextDocument(C.QTextDocument_new2(text_ms)) ret.isSubclass = true return ret } // NewQTextDocument3 constructs a new QTextDocument object. func NewQTextDocument3(parent *QObject) *QTextDocument { - var outptr_QTextDocument *C.QTextDocument = nil - var outptr_QObject *C.QObject = nil - C.QTextDocument_new3(parent.cPointer(), &outptr_QTextDocument, &outptr_QObject) - ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret := newQTextDocument(C.QTextDocument_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -201,11 +187,8 @@ func NewQTextDocument4(text string, parent *QObject) *QTextDocument { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTextDocument *C.QTextDocument = nil - var outptr_QObject *C.QObject = nil - C.QTextDocument_new4(text_ms, parent.cPointer(), &outptr_QTextDocument, &outptr_QObject) - ret := newQTextDocument(outptr_QTextDocument, outptr_QObject) + ret := newQTextDocument(C.QTextDocument_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -230,7 +213,7 @@ func QTextDocument_Tr(s string) string { } func (this *QTextDocument) Clone() *QTextDocument { - return newQTextDocument(C.QTextDocument_Clone(this.h), nil) + return newQTextDocument(C.QTextDocument_Clone(this.h)) } func (this *QTextDocument) IsEmpty() bool { @@ -274,7 +257,7 @@ func (this *QTextDocument) SetDocumentLayout(layout *QAbstractTextDocumentLayout } func (this *QTextDocument) DocumentLayout() *QAbstractTextDocumentLayout { - return newQAbstractTextDocumentLayout(C.QTextDocument_DocumentLayout(this.h), nil) + return newQAbstractTextDocumentLayout(C.QTextDocument_DocumentLayout(this.h)) } func (this *QTextDocument) SetMetaInformation(info QTextDocument__MetaInformation, param2 string) { @@ -383,19 +366,19 @@ func (this *QTextDocument) Find3(expr *QRegularExpression, cursor *QTextCursor) } func (this *QTextDocument) FrameAt(pos int) *QTextFrame { - return newQTextFrame(C.QTextDocument_FrameAt(this.h, (C.int)(pos)), nil, nil) + return newQTextFrame(C.QTextDocument_FrameAt(this.h, (C.int)(pos))) } func (this *QTextDocument) RootFrame() *QTextFrame { - return newQTextFrame(C.QTextDocument_RootFrame(this.h), nil, nil) + return newQTextFrame(C.QTextDocument_RootFrame(this.h)) } func (this *QTextDocument) Object(objectIndex int) *QTextObject { - return newQTextObject(C.QTextDocument_Object(this.h, (C.int)(objectIndex)), nil) + return newQTextObject(C.QTextDocument_Object(this.h, (C.int)(objectIndex))) } func (this *QTextDocument) ObjectForFormat(param1 *QTextFormat) *QTextObject { - return newQTextObject(C.QTextDocument_ObjectForFormat(this.h, param1.cPointer()), nil) + return newQTextObject(C.QTextDocument_ObjectForFormat(this.h, param1.cPointer())) } func (this *QTextDocument) FindBlock(pos int) *QTextBlock { @@ -889,7 +872,7 @@ func QTextDocument_Tr3(s string, c string, n int) string { } func (this *QTextDocument) Clone1(parent *QObject) *QTextDocument { - return newQTextDocument(C.QTextDocument_Clone1(this.h, parent.cPointer()), nil) + return newQTextDocument(C.QTextDocument_Clone1(this.h, parent.cPointer())) } func (this *QTextDocument) ToMarkdown1(features QTextDocument__MarkdownFeature) string { @@ -992,7 +975,7 @@ func miqt_exec_callback_QTextDocument_Clear(self *C.QTextDocument, cb C.intptr_t func (this *QTextDocument) callVirtualBase_CreateObject(f *QTextFormat) *QTextObject { - return newQTextObject(C.QTextDocument_virtualbase_CreateObject(unsafe.Pointer(this.h), f.cPointer()), nil) + return newQTextObject(C.QTextDocument_virtualbase_CreateObject(unsafe.Pointer(this.h), f.cPointer())) } func (this *QTextDocument) OnCreateObject(slot func(super func(f *QTextFormat) *QTextObject, f *QTextFormat) *QTextObject) { @@ -1128,7 +1111,7 @@ func miqt_exec_callback_QTextDocument_TimerEvent(self *C.QTextDocument, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTextDocument{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1154,7 +1137,7 @@ func miqt_exec_callback_QTextDocument_ChildEvent(self *C.QTextDocument, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QTextDocument{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qtextdocument.h b/qt6/gen_qtextdocument.h index 6f2215f7..3a84b07a 100644 --- a/qt6/gen_qtextdocument.h +++ b/qt6/gen_qtextdocument.h @@ -71,10 +71,11 @@ void QAbstractUndoItem_Redo(QAbstractUndoItem* self); void QAbstractUndoItem_OperatorAssign(QAbstractUndoItem* self, QAbstractUndoItem* param1); void QAbstractUndoItem_Delete(QAbstractUndoItem* self, bool isSubclass); -void QTextDocument_new(QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); -void QTextDocument_new2(struct miqt_string text, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); -void QTextDocument_new3(QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); -void QTextDocument_new4(struct miqt_string text, QObject* parent, QTextDocument** outptr_QTextDocument, QObject** outptr_QObject); +QTextDocument* QTextDocument_new(); +QTextDocument* QTextDocument_new2(struct miqt_string text); +QTextDocument* QTextDocument_new3(QObject* parent); +QTextDocument* QTextDocument_new4(struct miqt_string text, QObject* parent); +void QTextDocument_virtbase(QTextDocument* src, QObject** outptr_QObject); QMetaObject* QTextDocument_MetaObject(const QTextDocument* self); void* QTextDocument_Metacast(QTextDocument* self, const char* param1); struct miqt_string QTextDocument_Tr(const char* s); diff --git a/qt6/gen_qtextdocumentfragment.cpp b/qt6/gen_qtextdocumentfragment.cpp index cd103ef9..93ab898d 100644 --- a/qt6/gen_qtextdocumentfragment.cpp +++ b/qt6/gen_qtextdocumentfragment.cpp @@ -8,24 +8,20 @@ #include "gen_qtextdocumentfragment.h" #include "_cgo_export.h" -void QTextDocumentFragment_new(QTextDocumentFragment** outptr_QTextDocumentFragment) { - QTextDocumentFragment* ret = new QTextDocumentFragment(); - *outptr_QTextDocumentFragment = ret; +QTextDocumentFragment* QTextDocumentFragment_new() { + return new QTextDocumentFragment(); } -void QTextDocumentFragment_new2(QTextDocument* document, QTextDocumentFragment** outptr_QTextDocumentFragment) { - QTextDocumentFragment* ret = new QTextDocumentFragment(document); - *outptr_QTextDocumentFragment = ret; +QTextDocumentFragment* QTextDocumentFragment_new2(QTextDocument* document) { + return new QTextDocumentFragment(document); } -void QTextDocumentFragment_new3(QTextCursor* rangeVal, QTextDocumentFragment** outptr_QTextDocumentFragment) { - QTextDocumentFragment* ret = new QTextDocumentFragment(*rangeVal); - *outptr_QTextDocumentFragment = ret; +QTextDocumentFragment* QTextDocumentFragment_new3(QTextCursor* rangeVal) { + return new QTextDocumentFragment(*rangeVal); } -void QTextDocumentFragment_new4(QTextDocumentFragment* rhs, QTextDocumentFragment** outptr_QTextDocumentFragment) { - QTextDocumentFragment* ret = new QTextDocumentFragment(*rhs); - *outptr_QTextDocumentFragment = ret; +QTextDocumentFragment* QTextDocumentFragment_new4(QTextDocumentFragment* rhs) { + return new QTextDocumentFragment(*rhs); } void QTextDocumentFragment_OperatorAssign(QTextDocumentFragment* self, QTextDocumentFragment* rhs) { diff --git a/qt6/gen_qtextdocumentfragment.go b/qt6/gen_qtextdocumentfragment.go index 842e80dc..6a66c875 100644 --- a/qt6/gen_qtextdocumentfragment.go +++ b/qt6/gen_qtextdocumentfragment.go @@ -37,54 +37,43 @@ func newQTextDocumentFragment(h *C.QTextDocumentFragment) *QTextDocumentFragment if h == nil { return nil } + return &QTextDocumentFragment{h: h} } // UnsafeNewQTextDocumentFragment constructs the type using only unsafe pointers. func UnsafeNewQTextDocumentFragment(h unsafe.Pointer) *QTextDocumentFragment { - if h == nil { - return nil - } - - return &QTextDocumentFragment{h: (*C.QTextDocumentFragment)(h)} + return newQTextDocumentFragment((*C.QTextDocumentFragment)(h)) } // NewQTextDocumentFragment constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment() *QTextDocumentFragment { - var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil - C.QTextDocumentFragment_new(&outptr_QTextDocumentFragment) - ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(C.QTextDocumentFragment_new()) ret.isSubclass = true return ret } // NewQTextDocumentFragment2 constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment2(document *QTextDocument) *QTextDocumentFragment { - var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil - C.QTextDocumentFragment_new2(document.cPointer(), &outptr_QTextDocumentFragment) - ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(C.QTextDocumentFragment_new2(document.cPointer())) ret.isSubclass = true return ret } // NewQTextDocumentFragment3 constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment3(rangeVal *QTextCursor) *QTextDocumentFragment { - var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil - C.QTextDocumentFragment_new3(rangeVal.cPointer(), &outptr_QTextDocumentFragment) - ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(C.QTextDocumentFragment_new3(rangeVal.cPointer())) ret.isSubclass = true return ret } // NewQTextDocumentFragment4 constructs a new QTextDocumentFragment object. func NewQTextDocumentFragment4(rhs *QTextDocumentFragment) *QTextDocumentFragment { - var outptr_QTextDocumentFragment *C.QTextDocumentFragment = nil - C.QTextDocumentFragment_new4(rhs.cPointer(), &outptr_QTextDocumentFragment) - ret := newQTextDocumentFragment(outptr_QTextDocumentFragment) + ret := newQTextDocumentFragment(C.QTextDocumentFragment_new4(rhs.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qtextdocumentfragment.h b/qt6/gen_qtextdocumentfragment.h index de32d868..51faf9ee 100644 --- a/qt6/gen_qtextdocumentfragment.h +++ b/qt6/gen_qtextdocumentfragment.h @@ -24,10 +24,10 @@ typedef struct QTextDocument QTextDocument; typedef struct QTextDocumentFragment QTextDocumentFragment; #endif -void QTextDocumentFragment_new(QTextDocumentFragment** outptr_QTextDocumentFragment); -void QTextDocumentFragment_new2(QTextDocument* document, QTextDocumentFragment** outptr_QTextDocumentFragment); -void QTextDocumentFragment_new3(QTextCursor* rangeVal, QTextDocumentFragment** outptr_QTextDocumentFragment); -void QTextDocumentFragment_new4(QTextDocumentFragment* rhs, QTextDocumentFragment** outptr_QTextDocumentFragment); +QTextDocumentFragment* QTextDocumentFragment_new(); +QTextDocumentFragment* QTextDocumentFragment_new2(QTextDocument* document); +QTextDocumentFragment* QTextDocumentFragment_new3(QTextCursor* rangeVal); +QTextDocumentFragment* QTextDocumentFragment_new4(QTextDocumentFragment* rhs); void QTextDocumentFragment_OperatorAssign(QTextDocumentFragment* self, QTextDocumentFragment* rhs); bool QTextDocumentFragment_IsEmpty(const QTextDocumentFragment* self); struct miqt_string QTextDocumentFragment_ToPlainText(const QTextDocumentFragment* self); diff --git a/qt6/gen_qtextdocumentwriter.cpp b/qt6/gen_qtextdocumentwriter.cpp index 39266931..828fc951 100644 --- a/qt6/gen_qtextdocumentwriter.cpp +++ b/qt6/gen_qtextdocumentwriter.cpp @@ -11,28 +11,24 @@ #include "gen_qtextdocumentwriter.h" #include "_cgo_export.h" -void QTextDocumentWriter_new(QTextDocumentWriter** outptr_QTextDocumentWriter) { - QTextDocumentWriter* ret = new QTextDocumentWriter(); - *outptr_QTextDocumentWriter = ret; +QTextDocumentWriter* QTextDocumentWriter_new() { + return new QTextDocumentWriter(); } -void QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter) { +QTextDocumentWriter* QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format) { QByteArray format_QByteArray(format.data, format.len); - QTextDocumentWriter* ret = new QTextDocumentWriter(device, format_QByteArray); - *outptr_QTextDocumentWriter = ret; + return new QTextDocumentWriter(device, format_QByteArray); } -void QTextDocumentWriter_new3(struct miqt_string fileName, QTextDocumentWriter** outptr_QTextDocumentWriter) { +QTextDocumentWriter* QTextDocumentWriter_new3(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - QTextDocumentWriter* ret = new QTextDocumentWriter(fileName_QString); - *outptr_QTextDocumentWriter = ret; + return new QTextDocumentWriter(fileName_QString); } -void QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter) { +QTextDocumentWriter* QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); QByteArray format_QByteArray(format.data, format.len); - QTextDocumentWriter* ret = new QTextDocumentWriter(fileName_QString, format_QByteArray); - *outptr_QTextDocumentWriter = ret; + return new QTextDocumentWriter(fileName_QString, format_QByteArray); } void QTextDocumentWriter_SetFormat(QTextDocumentWriter* self, struct miqt_string format) { diff --git a/qt6/gen_qtextdocumentwriter.go b/qt6/gen_qtextdocumentwriter.go index b645ad42..1eb22903 100644 --- a/qt6/gen_qtextdocumentwriter.go +++ b/qt6/gen_qtextdocumentwriter.go @@ -37,24 +37,19 @@ func newQTextDocumentWriter(h *C.QTextDocumentWriter) *QTextDocumentWriter { if h == nil { return nil } + return &QTextDocumentWriter{h: h} } // UnsafeNewQTextDocumentWriter constructs the type using only unsafe pointers. func UnsafeNewQTextDocumentWriter(h unsafe.Pointer) *QTextDocumentWriter { - if h == nil { - return nil - } - - return &QTextDocumentWriter{h: (*C.QTextDocumentWriter)(h)} + return newQTextDocumentWriter((*C.QTextDocumentWriter)(h)) } // NewQTextDocumentWriter constructs a new QTextDocumentWriter object. func NewQTextDocumentWriter() *QTextDocumentWriter { - var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil - C.QTextDocumentWriter_new(&outptr_QTextDocumentWriter) - ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(C.QTextDocumentWriter_new()) ret.isSubclass = true return ret } @@ -64,10 +59,8 @@ func NewQTextDocumentWriter2(device *QIODevice, format []byte) *QTextDocumentWri format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil - C.QTextDocumentWriter_new2(device.cPointer(), format_alias, &outptr_QTextDocumentWriter) - ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(C.QTextDocumentWriter_new2(device.cPointer(), format_alias)) ret.isSubclass = true return ret } @@ -78,10 +71,8 @@ func NewQTextDocumentWriter3(fileName string) *QTextDocumentWriter { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil - C.QTextDocumentWriter_new3(fileName_ms, &outptr_QTextDocumentWriter) - ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(C.QTextDocumentWriter_new3(fileName_ms)) ret.isSubclass = true return ret } @@ -95,10 +86,8 @@ func NewQTextDocumentWriter4(fileName string, format []byte) *QTextDocumentWrite format_alias := C.struct_miqt_string{} format_alias.data = (*C.char)(unsafe.Pointer(&format[0])) format_alias.len = C.size_t(len(format)) - var outptr_QTextDocumentWriter *C.QTextDocumentWriter = nil - C.QTextDocumentWriter_new4(fileName_ms, format_alias, &outptr_QTextDocumentWriter) - ret := newQTextDocumentWriter(outptr_QTextDocumentWriter) + ret := newQTextDocumentWriter(C.QTextDocumentWriter_new4(fileName_ms, format_alias)) ret.isSubclass = true return ret } @@ -122,7 +111,7 @@ func (this *QTextDocumentWriter) SetDevice(device *QIODevice) { } func (this *QTextDocumentWriter) Device() *QIODevice { - return newQIODevice(C.QTextDocumentWriter_Device(this.h), nil, nil) + return newQIODevice(C.QTextDocumentWriter_Device(this.h)) } func (this *QTextDocumentWriter) SetFileName(fileName string) { diff --git a/qt6/gen_qtextdocumentwriter.h b/qt6/gen_qtextdocumentwriter.h index 193a4af9..4dda0123 100644 --- a/qt6/gen_qtextdocumentwriter.h +++ b/qt6/gen_qtextdocumentwriter.h @@ -26,10 +26,10 @@ typedef struct QTextDocumentFragment QTextDocumentFragment; typedef struct QTextDocumentWriter QTextDocumentWriter; #endif -void QTextDocumentWriter_new(QTextDocumentWriter** outptr_QTextDocumentWriter); -void QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter); -void QTextDocumentWriter_new3(struct miqt_string fileName, QTextDocumentWriter** outptr_QTextDocumentWriter); -void QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format, QTextDocumentWriter** outptr_QTextDocumentWriter); +QTextDocumentWriter* QTextDocumentWriter_new(); +QTextDocumentWriter* QTextDocumentWriter_new2(QIODevice* device, struct miqt_string format); +QTextDocumentWriter* QTextDocumentWriter_new3(struct miqt_string fileName); +QTextDocumentWriter* QTextDocumentWriter_new4(struct miqt_string fileName, struct miqt_string format); void QTextDocumentWriter_SetFormat(QTextDocumentWriter* self, struct miqt_string format); struct miqt_string QTextDocumentWriter_Format(const QTextDocumentWriter* self); void QTextDocumentWriter_SetDevice(QTextDocumentWriter* self, QIODevice* device); diff --git a/qt6/gen_qtextedit.cpp b/qt6/gen_qtextedit.cpp index 39a2e244..765da8f5 100644 --- a/qt6/gen_qtextedit.cpp +++ b/qt6/gen_qtextedit.cpp @@ -888,46 +888,26 @@ public: }; -void QTextEdit_new(QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(parent); - *outptr_QTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTextEdit* QTextEdit_new(QWidget* parent) { + return new MiqtVirtualQTextEdit(parent); } -void QTextEdit_new2(QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(); - *outptr_QTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTextEdit* QTextEdit_new2() { + return new MiqtVirtualQTextEdit(); } -void QTextEdit_new3(struct miqt_string text, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QTextEdit* QTextEdit_new3(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(text_QString); - *outptr_QTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQTextEdit(text_QString); } -void QTextEdit_new4(struct miqt_string text, QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QTextEdit* QTextEdit_new4(struct miqt_string text, QWidget* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQTextEdit* ret = new MiqtVirtualQTextEdit(text_QString, parent); - *outptr_QTextEdit = ret; - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQTextEdit(text_QString, parent); +} + +void QTextEdit_virtbase(QTextEdit* src, QAbstractScrollArea** outptr_QAbstractScrollArea) { + *outptr_QAbstractScrollArea = static_cast(src); } QMetaObject* QTextEdit_MetaObject(const QTextEdit* self) { @@ -1810,9 +1790,8 @@ void QTextEdit_Delete(QTextEdit* self, bool isSubclass) { } } -void QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1, QTextEdit__ExtraSelection** outptr_QTextEdit__ExtraSelection) { - QTextEdit::ExtraSelection* ret = new QTextEdit::ExtraSelection(*param1); - *outptr_QTextEdit__ExtraSelection = ret; +QTextEdit__ExtraSelection* QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1) { + return new QTextEdit::ExtraSelection(*param1); } void QTextEdit__ExtraSelection_OperatorAssign(QTextEdit__ExtraSelection* self, QTextEdit__ExtraSelection* param1) { diff --git a/qt6/gen_qtextedit.go b/qt6/gen_qtextedit.go index 57aa1450..90c46732 100644 --- a/qt6/gen_qtextedit.go +++ b/qt6/gen_qtextedit.go @@ -52,50 +52,34 @@ func (this *QTextEdit) UnsafePointer() unsafe.Pointer { } // newQTextEdit constructs the type using only CGO pointers. -func newQTextEdit(h *C.QTextEdit, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTextEdit { +func newQTextEdit(h *C.QTextEdit) *QTextEdit { if h == nil { return nil } + var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil + C.QTextEdit_virtbase(h, &outptr_QAbstractScrollArea) + return &QTextEdit{h: h, - QAbstractScrollArea: newQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractScrollArea: newQAbstractScrollArea(outptr_QAbstractScrollArea)} } // UnsafeNewQTextEdit constructs the type using only unsafe pointers. -func UnsafeNewQTextEdit(h unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTextEdit { - if h == nil { - return nil - } - - return &QTextEdit{h: (*C.QTextEdit)(h), - QAbstractScrollArea: UnsafeNewQAbstractScrollArea(h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTextEdit(h unsafe.Pointer) *QTextEdit { + return newQTextEdit((*C.QTextEdit)(h)) } // NewQTextEdit constructs a new QTextEdit object. func NewQTextEdit(parent *QWidget) *QTextEdit { - var outptr_QTextEdit *C.QTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTextEdit_new(parent.cPointer(), &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTextEdit(C.QTextEdit_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTextEdit2 constructs a new QTextEdit object. func NewQTextEdit2() *QTextEdit { - var outptr_QTextEdit *C.QTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTextEdit_new2(&outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTextEdit(C.QTextEdit_new2()) ret.isSubclass = true return ret } @@ -106,15 +90,8 @@ func NewQTextEdit3(text string) *QTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTextEdit *C.QTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTextEdit_new3(text_ms, &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTextEdit(C.QTextEdit_new3(text_ms)) ret.isSubclass = true return ret } @@ -125,15 +102,8 @@ func NewQTextEdit4(text string, parent *QWidget) *QTextEdit { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTextEdit *C.QTextEdit = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTextEdit_new4(text_ms, parent.cPointer(), &outptr_QTextEdit, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTextEdit(outptr_QTextEdit, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTextEdit(C.QTextEdit_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -162,7 +132,7 @@ func (this *QTextEdit) SetDocument(document *QTextDocument) { } func (this *QTextEdit) Document() *QTextDocument { - return newQTextDocument(C.QTextEdit_Document(this.h), nil) + return newQTextDocument(C.QTextEdit_Document(this.h)) } func (this *QTextEdit) SetPlaceholderText(placeholderText string) { @@ -260,7 +230,7 @@ func (this *QTextEdit) SetCurrentCharFormat(format *QTextCharFormat) { } func (this *QTextEdit) CurrentCharFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QTextEdit_CurrentCharFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QTextEdit_CurrentCharFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -372,11 +342,11 @@ func (this *QTextEdit) LoadResource(typeVal int, name *QUrl) *QVariant { } func (this *QTextEdit) CreateStandardContextMenu() *QMenu { - return newQMenu(C.QTextEdit_CreateStandardContextMenu(this.h), nil, nil, nil) + return newQMenu(C.QTextEdit_CreateStandardContextMenu(this.h)) } func (this *QTextEdit) CreateStandardContextMenuWithPosition(position *QPoint) *QMenu { - return newQMenu(C.QTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer()), nil, nil, nil) + return newQMenu(C.QTextEdit_CreateStandardContextMenuWithPosition(this.h, position.cPointer())) } func (this *QTextEdit) CursorForPosition(pos *QPoint) *QTextCursor { @@ -694,7 +664,7 @@ func miqt_exec_callback_QTextEdit_CurrentCharFormatChanged(cb C.intptr_t, format } // Convert all CABI parameters to Go parameters - slotval1 := newQTextCharFormat(format, nil) + slotval1 := newQTextCharFormat(format) gofunc(slotval1) } @@ -916,7 +886,7 @@ func miqt_exec_callback_QTextEdit_TimerEvent(self *C.QTextEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -942,7 +912,7 @@ func miqt_exec_callback_QTextEdit_KeyPressEvent(self *C.QTextEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -968,7 +938,7 @@ func miqt_exec_callback_QTextEdit_KeyReleaseEvent(self *C.QTextEdit, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -994,7 +964,7 @@ func miqt_exec_callback_QTextEdit_ResizeEvent(self *C.QTextEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1020,7 +990,7 @@ func miqt_exec_callback_QTextEdit_PaintEvent(self *C.QTextEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1046,7 +1016,7 @@ func miqt_exec_callback_QTextEdit_MousePressEvent(self *C.QTextEdit, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1072,7 +1042,7 @@ func miqt_exec_callback_QTextEdit_MouseMoveEvent(self *C.QTextEdit, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1098,7 +1068,7 @@ func miqt_exec_callback_QTextEdit_MouseReleaseEvent(self *C.QTextEdit, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1124,7 +1094,7 @@ func miqt_exec_callback_QTextEdit_MouseDoubleClickEvent(self *C.QTextEdit, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1178,7 +1148,7 @@ func miqt_exec_callback_QTextEdit_ContextMenuEvent(self *C.QTextEdit, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(e, nil, nil) + slotval1 := newQContextMenuEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1204,7 +1174,7 @@ func miqt_exec_callback_QTextEdit_DragEnterEvent(self *C.QTextEdit, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(e, nil, nil, nil) + slotval1 := newQDragEnterEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1230,7 +1200,7 @@ func miqt_exec_callback_QTextEdit_DragLeaveEvent(self *C.QTextEdit, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(e, nil) + slotval1 := newQDragLeaveEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1256,7 +1226,7 @@ func miqt_exec_callback_QTextEdit_DragMoveEvent(self *C.QTextEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(e, nil, nil) + slotval1 := newQDragMoveEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1282,7 +1252,7 @@ func miqt_exec_callback_QTextEdit_DropEvent(self *C.QTextEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(e, nil) + slotval1 := newQDropEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1308,7 +1278,7 @@ func miqt_exec_callback_QTextEdit_FocusInEvent(self *C.QTextEdit, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1334,7 +1304,7 @@ func miqt_exec_callback_QTextEdit_FocusOutEvent(self *C.QTextEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1360,7 +1330,7 @@ func miqt_exec_callback_QTextEdit_ShowEvent(self *C.QTextEdit, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QTextEdit{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1412,7 +1382,7 @@ func miqt_exec_callback_QTextEdit_WheelEvent(self *C.QTextEdit, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QTextEdit{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1420,7 +1390,7 @@ func miqt_exec_callback_QTextEdit_WheelEvent(self *C.QTextEdit, cb C.intptr_t, e func (this *QTextEdit) callVirtualBase_CreateMimeDataFromSelection() *QMimeData { - return newQMimeData(C.QTextEdit_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h)), nil) + return newQMimeData(C.QTextEdit_virtualbase_CreateMimeDataFromSelection(unsafe.Pointer(this.h))) } func (this *QTextEdit) OnCreateMimeDataFromSelection(slot func(super func() *QMimeData) *QMimeData) { @@ -1463,7 +1433,7 @@ func miqt_exec_callback_QTextEdit_CanInsertFromMimeData(self *C.QTextEdit, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(source, nil) + slotval1 := newQMimeData(source) virtualReturn := gofunc((&QTextEdit{h: self}).callVirtualBase_CanInsertFromMimeData, slotval1) @@ -1491,7 +1461,7 @@ func miqt_exec_callback_QTextEdit_InsertFromMimeData(self *C.QTextEdit, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(source, nil) + slotval1 := newQMimeData(source) gofunc((&QTextEdit{h: self}).callVirtualBase_InsertFromMimeData, slotval1) @@ -1517,7 +1487,7 @@ func miqt_exec_callback_QTextEdit_InputMethodEvent(self *C.QTextEdit, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QTextEdit{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -1651,7 +1621,7 @@ func miqt_exec_callback_QTextEdit_SetupViewport(self *C.QTextEdit, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(viewport, nil, nil) + slotval1 := newQWidget(viewport) gofunc((&QTextEdit{h: self}).callVirtualBase_SetupViewport, slotval1) @@ -1780,24 +1750,19 @@ func newQTextEdit__ExtraSelection(h *C.QTextEdit__ExtraSelection) *QTextEdit__Ex if h == nil { return nil } + return &QTextEdit__ExtraSelection{h: h} } // UnsafeNewQTextEdit__ExtraSelection constructs the type using only unsafe pointers. func UnsafeNewQTextEdit__ExtraSelection(h unsafe.Pointer) *QTextEdit__ExtraSelection { - if h == nil { - return nil - } - - return &QTextEdit__ExtraSelection{h: (*C.QTextEdit__ExtraSelection)(h)} + return newQTextEdit__ExtraSelection((*C.QTextEdit__ExtraSelection)(h)) } // NewQTextEdit__ExtraSelection constructs a new QTextEdit::ExtraSelection object. func NewQTextEdit__ExtraSelection(param1 *QTextEdit__ExtraSelection) *QTextEdit__ExtraSelection { - var outptr_QTextEdit__ExtraSelection *C.QTextEdit__ExtraSelection = nil - C.QTextEdit__ExtraSelection_new(param1.cPointer(), &outptr_QTextEdit__ExtraSelection) - ret := newQTextEdit__ExtraSelection(outptr_QTextEdit__ExtraSelection) + ret := newQTextEdit__ExtraSelection(C.QTextEdit__ExtraSelection_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qtextedit.h b/qt6/gen_qtextedit.h index 7b5f8f70..96793679 100644 --- a/qt6/gen_qtextedit.h +++ b/qt6/gen_qtextedit.h @@ -96,10 +96,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QTextEdit_new(QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTextEdit_new2(QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTextEdit_new3(struct miqt_string text, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTextEdit_new4(struct miqt_string text, QWidget* parent, QTextEdit** outptr_QTextEdit, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTextEdit* QTextEdit_new(QWidget* parent); +QTextEdit* QTextEdit_new2(); +QTextEdit* QTextEdit_new3(struct miqt_string text); +QTextEdit* QTextEdit_new4(struct miqt_string text, QWidget* parent); +void QTextEdit_virtbase(QTextEdit* src, QAbstractScrollArea** outptr_QAbstractScrollArea); QMetaObject* QTextEdit_MetaObject(const QTextEdit* self); void* QTextEdit_Metacast(QTextEdit* self, const char* param1); struct miqt_string QTextEdit_Tr(const char* s); @@ -314,7 +315,7 @@ void QTextEdit_override_virtual_ViewportSizeHint(void* self, intptr_t slot); QSize* QTextEdit_virtualbase_ViewportSizeHint(const void* self); void QTextEdit_Delete(QTextEdit* self, bool isSubclass); -void QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1, QTextEdit__ExtraSelection** outptr_QTextEdit__ExtraSelection); +QTextEdit__ExtraSelection* QTextEdit__ExtraSelection_new(QTextEdit__ExtraSelection* param1); void QTextEdit__ExtraSelection_OperatorAssign(QTextEdit__ExtraSelection* self, QTextEdit__ExtraSelection* param1); void QTextEdit__ExtraSelection_Delete(QTextEdit__ExtraSelection* self, bool isSubclass); diff --git a/qt6/gen_qtextformat.cpp b/qt6/gen_qtextformat.cpp index 7d682652..6fd82db9 100644 --- a/qt6/gen_qtextformat.cpp +++ b/qt6/gen_qtextformat.cpp @@ -22,19 +22,16 @@ #include "gen_qtextformat.h" #include "_cgo_export.h" -void QTextLength_new(QTextLength** outptr_QTextLength) { - QTextLength* ret = new QTextLength(); - *outptr_QTextLength = ret; +QTextLength* QTextLength_new() { + return new QTextLength(); } -void QTextLength_new2(int typeVal, double value, QTextLength** outptr_QTextLength) { - QTextLength* ret = new QTextLength(static_cast(typeVal), static_cast(value)); - *outptr_QTextLength = ret; +QTextLength* QTextLength_new2(int typeVal, double value) { + return new QTextLength(static_cast(typeVal), static_cast(value)); } -void QTextLength_new3(QTextLength* param1, QTextLength** outptr_QTextLength) { - QTextLength* ret = new QTextLength(*param1); - *outptr_QTextLength = ret; +QTextLength* QTextLength_new3(QTextLength* param1) { + return new QTextLength(*param1); } int QTextLength_Type(const QTextLength* self) { @@ -68,19 +65,16 @@ void QTextLength_Delete(QTextLength* self, bool isSubclass) { } } -void QTextFormat_new(QTextFormat** outptr_QTextFormat) { - QTextFormat* ret = new QTextFormat(); - *outptr_QTextFormat = ret; +QTextFormat* QTextFormat_new() { + return new QTextFormat(); } -void QTextFormat_new2(int typeVal, QTextFormat** outptr_QTextFormat) { - QTextFormat* ret = new QTextFormat(static_cast(typeVal)); - *outptr_QTextFormat = ret; +QTextFormat* QTextFormat_new2(int typeVal) { + return new QTextFormat(static_cast(typeVal)); } -void QTextFormat_new3(QTextFormat* rhs, QTextFormat** outptr_QTextFormat) { - QTextFormat* ret = new QTextFormat(*rhs); - *outptr_QTextFormat = ret; +QTextFormat* QTextFormat_new3(QTextFormat* rhs) { + return new QTextFormat(*rhs); } void QTextFormat_OperatorAssign(QTextFormat* self, QTextFormat* rhs) { @@ -329,16 +323,16 @@ void QTextFormat_Delete(QTextFormat* self, bool isSubclass) { } } -void QTextCharFormat_new(QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { - QTextCharFormat* ret = new QTextCharFormat(); - *outptr_QTextCharFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextCharFormat* QTextCharFormat_new() { + return new QTextCharFormat(); } -void QTextCharFormat_new2(QTextCharFormat* param1, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { - QTextCharFormat* ret = new QTextCharFormat(*param1); - *outptr_QTextCharFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextCharFormat* QTextCharFormat_new2(QTextCharFormat* param1) { + return new QTextCharFormat(*param1); +} + +void QTextCharFormat_virtbase(QTextCharFormat* src, QTextFormat** outptr_QTextFormat) { + *outptr_QTextFormat = static_cast(src); } bool QTextCharFormat_IsValid(const QTextCharFormat* self) { @@ -693,16 +687,16 @@ void QTextCharFormat_Delete(QTextCharFormat* self, bool isSubclass) { } } -void QTextBlockFormat_new(QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat) { - QTextBlockFormat* ret = new QTextBlockFormat(); - *outptr_QTextBlockFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextBlockFormat* QTextBlockFormat_new() { + return new QTextBlockFormat(); } -void QTextBlockFormat_new2(QTextBlockFormat* param1, QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat) { - QTextBlockFormat* ret = new QTextBlockFormat(*param1); - *outptr_QTextBlockFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextBlockFormat* QTextBlockFormat_new2(QTextBlockFormat* param1) { + return new QTextBlockFormat(*param1); +} + +void QTextBlockFormat_virtbase(QTextBlockFormat* src, QTextFormat** outptr_QTextFormat) { + *outptr_QTextFormat = static_cast(src); } bool QTextBlockFormat_IsValid(const QTextBlockFormat* self) { @@ -854,16 +848,16 @@ void QTextBlockFormat_Delete(QTextBlockFormat* self, bool isSubclass) { } } -void QTextListFormat_new(QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat) { - QTextListFormat* ret = new QTextListFormat(); - *outptr_QTextListFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextListFormat* QTextListFormat_new() { + return new QTextListFormat(); } -void QTextListFormat_new2(QTextListFormat* param1, QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat) { - QTextListFormat* ret = new QTextListFormat(*param1); - *outptr_QTextListFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextListFormat* QTextListFormat_new2(QTextListFormat* param1) { + return new QTextListFormat(*param1); +} + +void QTextListFormat_virtbase(QTextListFormat* src, QTextFormat** outptr_QTextFormat) { + *outptr_QTextFormat = static_cast(src); } bool QTextListFormat_IsValid(const QTextListFormat* self) { @@ -927,11 +921,12 @@ void QTextListFormat_Delete(QTextListFormat* self, bool isSubclass) { } } -void QTextImageFormat_new(QTextImageFormat** outptr_QTextImageFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { - QTextImageFormat* ret = new QTextImageFormat(); - *outptr_QTextImageFormat = ret; - *outptr_QTextCharFormat = static_cast(ret); - *outptr_QTextFormat = static_cast(ret); +QTextImageFormat* QTextImageFormat_new() { + return new QTextImageFormat(); +} + +void QTextImageFormat_virtbase(QTextImageFormat* src, QTextCharFormat** outptr_QTextCharFormat) { + *outptr_QTextCharFormat = static_cast(src); } bool QTextImageFormat_IsValid(const QTextImageFormat* self) { @@ -992,16 +987,16 @@ void QTextImageFormat_Delete(QTextImageFormat* self, bool isSubclass) { } } -void QTextFrameFormat_new(QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat) { - QTextFrameFormat* ret = new QTextFrameFormat(); - *outptr_QTextFrameFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextFrameFormat* QTextFrameFormat_new() { + return new QTextFrameFormat(); } -void QTextFrameFormat_new2(QTextFrameFormat* param1, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat) { - QTextFrameFormat* ret = new QTextFrameFormat(*param1); - *outptr_QTextFrameFormat = ret; - *outptr_QTextFormat = static_cast(ret); +QTextFrameFormat* QTextFrameFormat_new2(QTextFrameFormat* param1) { + return new QTextFrameFormat(*param1); +} + +void QTextFrameFormat_virtbase(QTextFrameFormat* src, QTextFormat** outptr_QTextFormat) { + *outptr_QTextFormat = static_cast(src); } bool QTextFrameFormat_IsValid(const QTextFrameFormat* self) { @@ -1138,11 +1133,12 @@ void QTextFrameFormat_Delete(QTextFrameFormat* self, bool isSubclass) { } } -void QTextTableFormat_new(QTextTableFormat** outptr_QTextTableFormat, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat) { - QTextTableFormat* ret = new QTextTableFormat(); - *outptr_QTextTableFormat = ret; - *outptr_QTextFrameFormat = static_cast(ret); - *outptr_QTextFormat = static_cast(ret); +QTextTableFormat* QTextTableFormat_new() { + return new QTextTableFormat(); +} + +void QTextTableFormat_virtbase(QTextTableFormat* src, QTextFrameFormat** outptr_QTextFrameFormat) { + *outptr_QTextFrameFormat = static_cast(src); } bool QTextTableFormat_IsValid(const QTextTableFormat* self) { @@ -1235,11 +1231,12 @@ void QTextTableFormat_Delete(QTextTableFormat* self, bool isSubclass) { } } -void QTextTableCellFormat_new(QTextTableCellFormat** outptr_QTextTableCellFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat) { - QTextTableCellFormat* ret = new QTextTableCellFormat(); - *outptr_QTextTableCellFormat = ret; - *outptr_QTextCharFormat = static_cast(ret); - *outptr_QTextFormat = static_cast(ret); +QTextTableCellFormat* QTextTableCellFormat_new() { + return new QTextTableCellFormat(); +} + +void QTextTableCellFormat_virtbase(QTextTableCellFormat* src, QTextCharFormat** outptr_QTextCharFormat) { + *outptr_QTextCharFormat = static_cast(src); } bool QTextTableCellFormat_IsValid(const QTextTableCellFormat* self) { diff --git a/qt6/gen_qtextformat.go b/qt6/gen_qtextformat.go index 6794db3a..99bd88f6 100644 --- a/qt6/gen_qtextformat.go +++ b/qt6/gen_qtextformat.go @@ -279,44 +279,35 @@ func newQTextLength(h *C.QTextLength) *QTextLength { if h == nil { return nil } + return &QTextLength{h: h} } // UnsafeNewQTextLength constructs the type using only unsafe pointers. func UnsafeNewQTextLength(h unsafe.Pointer) *QTextLength { - if h == nil { - return nil - } - - return &QTextLength{h: (*C.QTextLength)(h)} + return newQTextLength((*C.QTextLength)(h)) } // NewQTextLength constructs a new QTextLength object. func NewQTextLength() *QTextLength { - var outptr_QTextLength *C.QTextLength = nil - C.QTextLength_new(&outptr_QTextLength) - ret := newQTextLength(outptr_QTextLength) + ret := newQTextLength(C.QTextLength_new()) ret.isSubclass = true return ret } // NewQTextLength2 constructs a new QTextLength object. func NewQTextLength2(typeVal QTextLength__Type, value float64) *QTextLength { - var outptr_QTextLength *C.QTextLength = nil - C.QTextLength_new2((C.int)(typeVal), (C.double)(value), &outptr_QTextLength) - ret := newQTextLength(outptr_QTextLength) + ret := newQTextLength(C.QTextLength_new2((C.int)(typeVal), (C.double)(value))) ret.isSubclass = true return ret } // NewQTextLength3 constructs a new QTextLength object. func NewQTextLength3(param1 *QTextLength) *QTextLength { - var outptr_QTextLength *C.QTextLength = nil - C.QTextLength_new3(param1.cPointer(), &outptr_QTextLength) - ret := newQTextLength(outptr_QTextLength) + ret := newQTextLength(C.QTextLength_new3(param1.cPointer())) ret.isSubclass = true return ret } @@ -379,44 +370,35 @@ func newQTextFormat(h *C.QTextFormat) *QTextFormat { if h == nil { return nil } + return &QTextFormat{h: h} } // UnsafeNewQTextFormat constructs the type using only unsafe pointers. func UnsafeNewQTextFormat(h unsafe.Pointer) *QTextFormat { - if h == nil { - return nil - } - - return &QTextFormat{h: (*C.QTextFormat)(h)} + return newQTextFormat((*C.QTextFormat)(h)) } // NewQTextFormat constructs a new QTextFormat object. func NewQTextFormat() *QTextFormat { - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextFormat_new(&outptr_QTextFormat) - ret := newQTextFormat(outptr_QTextFormat) + ret := newQTextFormat(C.QTextFormat_new()) ret.isSubclass = true return ret } // NewQTextFormat2 constructs a new QTextFormat object. func NewQTextFormat2(typeVal int) *QTextFormat { - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextFormat_new2((C.int)(typeVal), &outptr_QTextFormat) - ret := newQTextFormat(outptr_QTextFormat) + ret := newQTextFormat(C.QTextFormat_new2((C.int)(typeVal))) ret.isSubclass = true return ret } // NewQTextFormat3 constructs a new QTextFormat object. func NewQTextFormat3(rhs *QTextFormat) *QTextFormat { - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextFormat_new3(rhs.cPointer(), &outptr_QTextFormat) - ret := newQTextFormat(outptr_QTextFormat) + ret := newQTextFormat(C.QTextFormat_new3(rhs.cPointer())) ret.isSubclass = true return ret } @@ -594,43 +576,43 @@ func (this *QTextFormat) IsTableCellFormat() bool { } func (this *QTextFormat) ToBlockFormat() *QTextBlockFormat { - _goptr := newQTextBlockFormat(C.QTextFormat_ToBlockFormat(this.h), nil) + _goptr := newQTextBlockFormat(C.QTextFormat_ToBlockFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToCharFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QTextFormat_ToCharFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QTextFormat_ToCharFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToListFormat() *QTextListFormat { - _goptr := newQTextListFormat(C.QTextFormat_ToListFormat(this.h), nil) + _goptr := newQTextListFormat(C.QTextFormat_ToListFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToTableFormat() *QTextTableFormat { - _goptr := newQTextTableFormat(C.QTextFormat_ToTableFormat(this.h), nil, nil) + _goptr := newQTextTableFormat(C.QTextFormat_ToTableFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToFrameFormat() *QTextFrameFormat { - _goptr := newQTextFrameFormat(C.QTextFormat_ToFrameFormat(this.h), nil) + _goptr := newQTextFrameFormat(C.QTextFormat_ToFrameFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToImageFormat() *QTextImageFormat { - _goptr := newQTextImageFormat(C.QTextFormat_ToImageFormat(this.h), nil, nil) + _goptr := newQTextImageFormat(C.QTextFormat_ToImageFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QTextFormat) ToTableCellFormat() *QTextTableCellFormat { - _goptr := newQTextTableCellFormat(C.QTextFormat_ToTableCellFormat(this.h), nil, nil) + _goptr := newQTextTableCellFormat(C.QTextFormat_ToTableCellFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -714,42 +696,34 @@ func (this *QTextCharFormat) UnsafePointer() unsafe.Pointer { } // newQTextCharFormat constructs the type using only CGO pointers. -func newQTextCharFormat(h *C.QTextCharFormat, h_QTextFormat *C.QTextFormat) *QTextCharFormat { +func newQTextCharFormat(h *C.QTextCharFormat) *QTextCharFormat { if h == nil { return nil } + var outptr_QTextFormat *C.QTextFormat = nil + C.QTextCharFormat_virtbase(h, &outptr_QTextFormat) + return &QTextCharFormat{h: h, - QTextFormat: newQTextFormat(h_QTextFormat)} + QTextFormat: newQTextFormat(outptr_QTextFormat)} } // UnsafeNewQTextCharFormat constructs the type using only unsafe pointers. -func UnsafeNewQTextCharFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextCharFormat { - if h == nil { - return nil - } - - return &QTextCharFormat{h: (*C.QTextCharFormat)(h), - QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} +func UnsafeNewQTextCharFormat(h unsafe.Pointer) *QTextCharFormat { + return newQTextCharFormat((*C.QTextCharFormat)(h)) } // NewQTextCharFormat constructs a new QTextCharFormat object. func NewQTextCharFormat() *QTextCharFormat { - var outptr_QTextCharFormat *C.QTextCharFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextCharFormat_new(&outptr_QTextCharFormat, &outptr_QTextFormat) - ret := newQTextCharFormat(outptr_QTextCharFormat, outptr_QTextFormat) + ret := newQTextCharFormat(C.QTextCharFormat_new()) ret.isSubclass = true return ret } // NewQTextCharFormat2 constructs a new QTextCharFormat object. func NewQTextCharFormat2(param1 *QTextCharFormat) *QTextCharFormat { - var outptr_QTextCharFormat *C.QTextCharFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextCharFormat_new2(param1.cPointer(), &outptr_QTextCharFormat, &outptr_QTextFormat) - ret := newQTextCharFormat(outptr_QTextCharFormat, outptr_QTextFormat) + ret := newQTextCharFormat(C.QTextCharFormat_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1129,42 +1103,34 @@ func (this *QTextBlockFormat) UnsafePointer() unsafe.Pointer { } // newQTextBlockFormat constructs the type using only CGO pointers. -func newQTextBlockFormat(h *C.QTextBlockFormat, h_QTextFormat *C.QTextFormat) *QTextBlockFormat { +func newQTextBlockFormat(h *C.QTextBlockFormat) *QTextBlockFormat { if h == nil { return nil } + var outptr_QTextFormat *C.QTextFormat = nil + C.QTextBlockFormat_virtbase(h, &outptr_QTextFormat) + return &QTextBlockFormat{h: h, - QTextFormat: newQTextFormat(h_QTextFormat)} + QTextFormat: newQTextFormat(outptr_QTextFormat)} } // UnsafeNewQTextBlockFormat constructs the type using only unsafe pointers. -func UnsafeNewQTextBlockFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextBlockFormat { - if h == nil { - return nil - } - - return &QTextBlockFormat{h: (*C.QTextBlockFormat)(h), - QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} +func UnsafeNewQTextBlockFormat(h unsafe.Pointer) *QTextBlockFormat { + return newQTextBlockFormat((*C.QTextBlockFormat)(h)) } // NewQTextBlockFormat constructs a new QTextBlockFormat object. func NewQTextBlockFormat() *QTextBlockFormat { - var outptr_QTextBlockFormat *C.QTextBlockFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextBlockFormat_new(&outptr_QTextBlockFormat, &outptr_QTextFormat) - ret := newQTextBlockFormat(outptr_QTextBlockFormat, outptr_QTextFormat) + ret := newQTextBlockFormat(C.QTextBlockFormat_new()) ret.isSubclass = true return ret } // NewQTextBlockFormat2 constructs a new QTextBlockFormat object. func NewQTextBlockFormat2(param1 *QTextBlockFormat) *QTextBlockFormat { - var outptr_QTextBlockFormat *C.QTextBlockFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextBlockFormat_new2(param1.cPointer(), &outptr_QTextBlockFormat, &outptr_QTextFormat) - ret := newQTextBlockFormat(outptr_QTextBlockFormat, outptr_QTextFormat) + ret := newQTextBlockFormat(C.QTextBlockFormat_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1334,42 +1300,34 @@ func (this *QTextListFormat) UnsafePointer() unsafe.Pointer { } // newQTextListFormat constructs the type using only CGO pointers. -func newQTextListFormat(h *C.QTextListFormat, h_QTextFormat *C.QTextFormat) *QTextListFormat { +func newQTextListFormat(h *C.QTextListFormat) *QTextListFormat { if h == nil { return nil } + var outptr_QTextFormat *C.QTextFormat = nil + C.QTextListFormat_virtbase(h, &outptr_QTextFormat) + return &QTextListFormat{h: h, - QTextFormat: newQTextFormat(h_QTextFormat)} + QTextFormat: newQTextFormat(outptr_QTextFormat)} } // UnsafeNewQTextListFormat constructs the type using only unsafe pointers. -func UnsafeNewQTextListFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextListFormat { - if h == nil { - return nil - } - - return &QTextListFormat{h: (*C.QTextListFormat)(h), - QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} +func UnsafeNewQTextListFormat(h unsafe.Pointer) *QTextListFormat { + return newQTextListFormat((*C.QTextListFormat)(h)) } // NewQTextListFormat constructs a new QTextListFormat object. func NewQTextListFormat() *QTextListFormat { - var outptr_QTextListFormat *C.QTextListFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextListFormat_new(&outptr_QTextListFormat, &outptr_QTextFormat) - ret := newQTextListFormat(outptr_QTextListFormat, outptr_QTextFormat) + ret := newQTextListFormat(C.QTextListFormat_new()) ret.isSubclass = true return ret } // NewQTextListFormat2 constructs a new QTextListFormat object. func NewQTextListFormat2(param1 *QTextListFormat) *QTextListFormat { - var outptr_QTextListFormat *C.QTextListFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextListFormat_new2(param1.cPointer(), &outptr_QTextListFormat, &outptr_QTextFormat) - ret := newQTextListFormat(outptr_QTextListFormat, outptr_QTextFormat) + ret := newQTextListFormat(C.QTextListFormat_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1459,32 +1417,26 @@ func (this *QTextImageFormat) UnsafePointer() unsafe.Pointer { } // newQTextImageFormat constructs the type using only CGO pointers. -func newQTextImageFormat(h *C.QTextImageFormat, h_QTextCharFormat *C.QTextCharFormat, h_QTextFormat *C.QTextFormat) *QTextImageFormat { +func newQTextImageFormat(h *C.QTextImageFormat) *QTextImageFormat { if h == nil { return nil } + var outptr_QTextCharFormat *C.QTextCharFormat = nil + C.QTextImageFormat_virtbase(h, &outptr_QTextCharFormat) + return &QTextImageFormat{h: h, - QTextCharFormat: newQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} + QTextCharFormat: newQTextCharFormat(outptr_QTextCharFormat)} } // UnsafeNewQTextImageFormat constructs the type using only unsafe pointers. -func UnsafeNewQTextImageFormat(h unsafe.Pointer, h_QTextCharFormat unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextImageFormat { - if h == nil { - return nil - } - - return &QTextImageFormat{h: (*C.QTextImageFormat)(h), - QTextCharFormat: UnsafeNewQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} +func UnsafeNewQTextImageFormat(h unsafe.Pointer) *QTextImageFormat { + return newQTextImageFormat((*C.QTextImageFormat)(h)) } // NewQTextImageFormat constructs a new QTextImageFormat object. func NewQTextImageFormat() *QTextImageFormat { - var outptr_QTextImageFormat *C.QTextImageFormat = nil - var outptr_QTextCharFormat *C.QTextCharFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextImageFormat_new(&outptr_QTextImageFormat, &outptr_QTextCharFormat, &outptr_QTextFormat) - ret := newQTextImageFormat(outptr_QTextImageFormat, outptr_QTextCharFormat, outptr_QTextFormat) + ret := newQTextImageFormat(C.QTextImageFormat_new()) ret.isSubclass = true return ret } @@ -1571,42 +1523,34 @@ func (this *QTextFrameFormat) UnsafePointer() unsafe.Pointer { } // newQTextFrameFormat constructs the type using only CGO pointers. -func newQTextFrameFormat(h *C.QTextFrameFormat, h_QTextFormat *C.QTextFormat) *QTextFrameFormat { +func newQTextFrameFormat(h *C.QTextFrameFormat) *QTextFrameFormat { if h == nil { return nil } + var outptr_QTextFormat *C.QTextFormat = nil + C.QTextFrameFormat_virtbase(h, &outptr_QTextFormat) + return &QTextFrameFormat{h: h, - QTextFormat: newQTextFormat(h_QTextFormat)} + QTextFormat: newQTextFormat(outptr_QTextFormat)} } // UnsafeNewQTextFrameFormat constructs the type using only unsafe pointers. -func UnsafeNewQTextFrameFormat(h unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextFrameFormat { - if h == nil { - return nil - } - - return &QTextFrameFormat{h: (*C.QTextFrameFormat)(h), - QTextFormat: UnsafeNewQTextFormat(h_QTextFormat)} +func UnsafeNewQTextFrameFormat(h unsafe.Pointer) *QTextFrameFormat { + return newQTextFrameFormat((*C.QTextFrameFormat)(h)) } // NewQTextFrameFormat constructs a new QTextFrameFormat object. func NewQTextFrameFormat() *QTextFrameFormat { - var outptr_QTextFrameFormat *C.QTextFrameFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextFrameFormat_new(&outptr_QTextFrameFormat, &outptr_QTextFormat) - ret := newQTextFrameFormat(outptr_QTextFrameFormat, outptr_QTextFormat) + ret := newQTextFrameFormat(C.QTextFrameFormat_new()) ret.isSubclass = true return ret } // NewQTextFrameFormat2 constructs a new QTextFrameFormat object. func NewQTextFrameFormat2(param1 *QTextFrameFormat) *QTextFrameFormat { - var outptr_QTextFrameFormat *C.QTextFrameFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextFrameFormat_new2(param1.cPointer(), &outptr_QTextFrameFormat, &outptr_QTextFormat) - ret := newQTextFrameFormat(outptr_QTextFrameFormat, outptr_QTextFormat) + ret := newQTextFrameFormat(C.QTextFrameFormat_new2(param1.cPointer())) ret.isSubclass = true return ret } @@ -1768,32 +1712,26 @@ func (this *QTextTableFormat) UnsafePointer() unsafe.Pointer { } // newQTextTableFormat constructs the type using only CGO pointers. -func newQTextTableFormat(h *C.QTextTableFormat, h_QTextFrameFormat *C.QTextFrameFormat, h_QTextFormat *C.QTextFormat) *QTextTableFormat { +func newQTextTableFormat(h *C.QTextTableFormat) *QTextTableFormat { if h == nil { return nil } + var outptr_QTextFrameFormat *C.QTextFrameFormat = nil + C.QTextTableFormat_virtbase(h, &outptr_QTextFrameFormat) + return &QTextTableFormat{h: h, - QTextFrameFormat: newQTextFrameFormat(h_QTextFrameFormat, h_QTextFormat)} + QTextFrameFormat: newQTextFrameFormat(outptr_QTextFrameFormat)} } // UnsafeNewQTextTableFormat constructs the type using only unsafe pointers. -func UnsafeNewQTextTableFormat(h unsafe.Pointer, h_QTextFrameFormat unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextTableFormat { - if h == nil { - return nil - } - - return &QTextTableFormat{h: (*C.QTextTableFormat)(h), - QTextFrameFormat: UnsafeNewQTextFrameFormat(h_QTextFrameFormat, h_QTextFormat)} +func UnsafeNewQTextTableFormat(h unsafe.Pointer) *QTextTableFormat { + return newQTextTableFormat((*C.QTextTableFormat)(h)) } // NewQTextTableFormat constructs a new QTextTableFormat object. func NewQTextTableFormat() *QTextTableFormat { - var outptr_QTextTableFormat *C.QTextTableFormat = nil - var outptr_QTextFrameFormat *C.QTextFrameFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextTableFormat_new(&outptr_QTextTableFormat, &outptr_QTextFrameFormat, &outptr_QTextFormat) - ret := newQTextTableFormat(outptr_QTextTableFormat, outptr_QTextFrameFormat, outptr_QTextFormat) + ret := newQTextTableFormat(C.QTextTableFormat_new()) ret.isSubclass = true return ret } @@ -1911,32 +1849,26 @@ func (this *QTextTableCellFormat) UnsafePointer() unsafe.Pointer { } // newQTextTableCellFormat constructs the type using only CGO pointers. -func newQTextTableCellFormat(h *C.QTextTableCellFormat, h_QTextCharFormat *C.QTextCharFormat, h_QTextFormat *C.QTextFormat) *QTextTableCellFormat { +func newQTextTableCellFormat(h *C.QTextTableCellFormat) *QTextTableCellFormat { if h == nil { return nil } + var outptr_QTextCharFormat *C.QTextCharFormat = nil + C.QTextTableCellFormat_virtbase(h, &outptr_QTextCharFormat) + return &QTextTableCellFormat{h: h, - QTextCharFormat: newQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} + QTextCharFormat: newQTextCharFormat(outptr_QTextCharFormat)} } // UnsafeNewQTextTableCellFormat constructs the type using only unsafe pointers. -func UnsafeNewQTextTableCellFormat(h unsafe.Pointer, h_QTextCharFormat unsafe.Pointer, h_QTextFormat unsafe.Pointer) *QTextTableCellFormat { - if h == nil { - return nil - } - - return &QTextTableCellFormat{h: (*C.QTextTableCellFormat)(h), - QTextCharFormat: UnsafeNewQTextCharFormat(h_QTextCharFormat, h_QTextFormat)} +func UnsafeNewQTextTableCellFormat(h unsafe.Pointer) *QTextTableCellFormat { + return newQTextTableCellFormat((*C.QTextTableCellFormat)(h)) } // NewQTextTableCellFormat constructs a new QTextTableCellFormat object. func NewQTextTableCellFormat() *QTextTableCellFormat { - var outptr_QTextTableCellFormat *C.QTextTableCellFormat = nil - var outptr_QTextCharFormat *C.QTextCharFormat = nil - var outptr_QTextFormat *C.QTextFormat = nil - C.QTextTableCellFormat_new(&outptr_QTextTableCellFormat, &outptr_QTextCharFormat, &outptr_QTextFormat) - ret := newQTextTableCellFormat(outptr_QTextTableCellFormat, outptr_QTextCharFormat, outptr_QTextFormat) + ret := newQTextTableCellFormat(C.QTextTableCellFormat_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qtextformat.h b/qt6/gen_qtextformat.h index eae6c9ff..0ac7909d 100644 --- a/qt6/gen_qtextformat.h +++ b/qt6/gen_qtextformat.h @@ -52,9 +52,9 @@ typedef struct QTextTableFormat QTextTableFormat; typedef struct QVariant QVariant; #endif -void QTextLength_new(QTextLength** outptr_QTextLength); -void QTextLength_new2(int typeVal, double value, QTextLength** outptr_QTextLength); -void QTextLength_new3(QTextLength* param1, QTextLength** outptr_QTextLength); +QTextLength* QTextLength_new(); +QTextLength* QTextLength_new2(int typeVal, double value); +QTextLength* QTextLength_new3(QTextLength* param1); int QTextLength_Type(const QTextLength* self); double QTextLength_Value(const QTextLength* self, double maximumLength); double QTextLength_RawValue(const QTextLength* self); @@ -62,9 +62,9 @@ bool QTextLength_OperatorEqual(const QTextLength* self, QTextLength* other); bool QTextLength_OperatorNotEqual(const QTextLength* self, QTextLength* other); void QTextLength_Delete(QTextLength* self, bool isSubclass); -void QTextFormat_new(QTextFormat** outptr_QTextFormat); -void QTextFormat_new2(int typeVal, QTextFormat** outptr_QTextFormat); -void QTextFormat_new3(QTextFormat* rhs, QTextFormat** outptr_QTextFormat); +QTextFormat* QTextFormat_new(); +QTextFormat* QTextFormat_new2(int typeVal); +QTextFormat* QTextFormat_new3(QTextFormat* rhs); void QTextFormat_OperatorAssign(QTextFormat* self, QTextFormat* rhs); void QTextFormat_Swap(QTextFormat* self, QTextFormat* other); void QTextFormat_Merge(QTextFormat* self, QTextFormat* other); @@ -117,8 +117,9 @@ QBrush* QTextFormat_Foreground(const QTextFormat* self); void QTextFormat_ClearForeground(QTextFormat* self); void QTextFormat_Delete(QTextFormat* self, bool isSubclass); -void QTextCharFormat_new(QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); -void QTextCharFormat_new2(QTextCharFormat* param1, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); +QTextCharFormat* QTextCharFormat_new(); +QTextCharFormat* QTextCharFormat_new2(QTextCharFormat* param1); +void QTextCharFormat_virtbase(QTextCharFormat* src, QTextFormat** outptr_QTextFormat); bool QTextCharFormat_IsValid(const QTextCharFormat* self); void QTextCharFormat_SetFont(QTextCharFormat* self, QFont* font); QFont* QTextCharFormat_Font(const QTextCharFormat* self); @@ -190,8 +191,9 @@ void QTextCharFormat_SetFont2(QTextCharFormat* self, QFont* font, int behavior); void QTextCharFormat_SetFontStyleHint2(QTextCharFormat* self, int hint, int strategy); void QTextCharFormat_Delete(QTextCharFormat* self, bool isSubclass); -void QTextBlockFormat_new(QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat); -void QTextBlockFormat_new2(QTextBlockFormat* param1, QTextBlockFormat** outptr_QTextBlockFormat, QTextFormat** outptr_QTextFormat); +QTextBlockFormat* QTextBlockFormat_new(); +QTextBlockFormat* QTextBlockFormat_new2(QTextBlockFormat* param1); +void QTextBlockFormat_virtbase(QTextBlockFormat* src, QTextFormat** outptr_QTextFormat); bool QTextBlockFormat_IsValid(const QTextBlockFormat* self); void QTextBlockFormat_SetAlignment(QTextBlockFormat* self, int alignment); int QTextBlockFormat_Alignment(const QTextBlockFormat* self); @@ -223,8 +225,9 @@ void QTextBlockFormat_SetMarker(QTextBlockFormat* self, int marker); int QTextBlockFormat_Marker(const QTextBlockFormat* self); void QTextBlockFormat_Delete(QTextBlockFormat* self, bool isSubclass); -void QTextListFormat_new(QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat); -void QTextListFormat_new2(QTextListFormat* param1, QTextListFormat** outptr_QTextListFormat, QTextFormat** outptr_QTextFormat); +QTextListFormat* QTextListFormat_new(); +QTextListFormat* QTextListFormat_new2(QTextListFormat* param1); +void QTextListFormat_virtbase(QTextListFormat* src, QTextFormat** outptr_QTextFormat); bool QTextListFormat_IsValid(const QTextListFormat* self); void QTextListFormat_SetStyle(QTextListFormat* self, int style); int QTextListFormat_Style(const QTextListFormat* self); @@ -236,7 +239,8 @@ void QTextListFormat_SetNumberSuffix(QTextListFormat* self, struct miqt_string n struct miqt_string QTextListFormat_NumberSuffix(const QTextListFormat* self); void QTextListFormat_Delete(QTextListFormat* self, bool isSubclass); -void QTextImageFormat_new(QTextImageFormat** outptr_QTextImageFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); +QTextImageFormat* QTextImageFormat_new(); +void QTextImageFormat_virtbase(QTextImageFormat* src, QTextCharFormat** outptr_QTextCharFormat); bool QTextImageFormat_IsValid(const QTextImageFormat* self); void QTextImageFormat_SetName(QTextImageFormat* self, struct miqt_string name); struct miqt_string QTextImageFormat_Name(const QTextImageFormat* self); @@ -249,8 +253,9 @@ void QTextImageFormat_SetQuality2(QTextImageFormat* self); int QTextImageFormat_Quality(const QTextImageFormat* self); void QTextImageFormat_Delete(QTextImageFormat* self, bool isSubclass); -void QTextFrameFormat_new(QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat); -void QTextFrameFormat_new2(QTextFrameFormat* param1, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat); +QTextFrameFormat* QTextFrameFormat_new(); +QTextFrameFormat* QTextFrameFormat_new2(QTextFrameFormat* param1); +void QTextFrameFormat_virtbase(QTextFrameFormat* src, QTextFormat** outptr_QTextFormat); bool QTextFrameFormat_IsValid(const QTextFrameFormat* self); void QTextFrameFormat_SetPosition(QTextFrameFormat* self, int f); int QTextFrameFormat_Position(const QTextFrameFormat* self); @@ -282,7 +287,8 @@ void QTextFrameFormat_SetPageBreakPolicy(QTextFrameFormat* self, int flags); int QTextFrameFormat_PageBreakPolicy(const QTextFrameFormat* self); void QTextFrameFormat_Delete(QTextFrameFormat* self, bool isSubclass); -void QTextTableFormat_new(QTextTableFormat** outptr_QTextTableFormat, QTextFrameFormat** outptr_QTextFrameFormat, QTextFormat** outptr_QTextFormat); +QTextTableFormat* QTextTableFormat_new(); +void QTextTableFormat_virtbase(QTextTableFormat* src, QTextFrameFormat** outptr_QTextFrameFormat); bool QTextTableFormat_IsValid(const QTextTableFormat* self); int QTextTableFormat_Columns(const QTextTableFormat* self); void QTextTableFormat_SetColumns(QTextTableFormat* self, int columns); @@ -301,7 +307,8 @@ void QTextTableFormat_SetBorderCollapse(QTextTableFormat* self, bool borderColla bool QTextTableFormat_BorderCollapse(const QTextTableFormat* self); void QTextTableFormat_Delete(QTextTableFormat* self, bool isSubclass); -void QTextTableCellFormat_new(QTextTableCellFormat** outptr_QTextTableCellFormat, QTextCharFormat** outptr_QTextCharFormat, QTextFormat** outptr_QTextFormat); +QTextTableCellFormat* QTextTableCellFormat_new(); +void QTextTableCellFormat_virtbase(QTextTableCellFormat* src, QTextCharFormat** outptr_QTextCharFormat); bool QTextTableCellFormat_IsValid(const QTextTableCellFormat* self); void QTextTableCellFormat_SetTopPadding(QTextTableCellFormat* self, double padding); double QTextTableCellFormat_TopPadding(const QTextTableCellFormat* self); diff --git a/qt6/gen_qtextlayout.cpp b/qt6/gen_qtextlayout.cpp index cca03156..7fe585d4 100644 --- a/qt6/gen_qtextlayout.cpp +++ b/qt6/gen_qtextlayout.cpp @@ -20,9 +20,8 @@ #include "gen_qtextlayout.h" #include "_cgo_export.h" -void QTextInlineObject_new(QTextInlineObject** outptr_QTextInlineObject) { - QTextInlineObject* ret = new QTextInlineObject(); - *outptr_QTextInlineObject = ret; +QTextInlineObject* QTextInlineObject_new() { + return new QTextInlineObject(); } bool QTextInlineObject_IsValid(const QTextInlineObject* self) { @@ -90,32 +89,27 @@ void QTextInlineObject_Delete(QTextInlineObject* self, bool isSubclass) { } } -void QTextLayout_new(QTextLayout** outptr_QTextLayout) { - QTextLayout* ret = new QTextLayout(); - *outptr_QTextLayout = ret; +QTextLayout* QTextLayout_new() { + return new QTextLayout(); } -void QTextLayout_new2(struct miqt_string text, QTextLayout** outptr_QTextLayout) { +QTextLayout* QTextLayout_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - QTextLayout* ret = new QTextLayout(text_QString); - *outptr_QTextLayout = ret; + return new QTextLayout(text_QString); } -void QTextLayout_new3(struct miqt_string text, QFont* font, QTextLayout** outptr_QTextLayout) { +QTextLayout* QTextLayout_new3(struct miqt_string text, QFont* font) { QString text_QString = QString::fromUtf8(text.data, text.len); - QTextLayout* ret = new QTextLayout(text_QString, *font); - *outptr_QTextLayout = ret; + return new QTextLayout(text_QString, *font); } -void QTextLayout_new4(QTextBlock* b, QTextLayout** outptr_QTextLayout) { - QTextLayout* ret = new QTextLayout(*b); - *outptr_QTextLayout = ret; +QTextLayout* QTextLayout_new4(QTextBlock* b) { + return new QTextLayout(*b); } -void QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice, QTextLayout** outptr_QTextLayout) { +QTextLayout* QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice) { QString text_QString = QString::fromUtf8(text.data, text.len); - QTextLayout* ret = new QTextLayout(text_QString, *font, paintdevice); - *outptr_QTextLayout = ret; + return new QTextLayout(text_QString, *font, paintdevice); } void QTextLayout_SetFont(QTextLayout* self, QFont* f) { @@ -381,9 +375,8 @@ void QTextLayout_Delete(QTextLayout* self, bool isSubclass) { } } -void QTextLine_new(QTextLine** outptr_QTextLine) { - QTextLine* ret = new QTextLine(); - *outptr_QTextLine = ret; +QTextLine* QTextLine_new() { + return new QTextLine(); } bool QTextLine_IsValid(const QTextLine* self) { @@ -562,9 +555,8 @@ void QTextLine_Delete(QTextLine* self, bool isSubclass) { } } -void QTextLayout__FormatRange_new(QTextLayout__FormatRange* param1, QTextLayout__FormatRange** outptr_QTextLayout__FormatRange) { - QTextLayout::FormatRange* ret = new QTextLayout::FormatRange(*param1); - *outptr_QTextLayout__FormatRange = ret; +QTextLayout__FormatRange* QTextLayout__FormatRange_new(QTextLayout__FormatRange* param1) { + return new QTextLayout::FormatRange(*param1); } void QTextLayout__FormatRange_OperatorAssign(QTextLayout__FormatRange* self, QTextLayout__FormatRange* param1) { diff --git a/qt6/gen_qtextlayout.go b/qt6/gen_qtextlayout.go index 08b34fcf..e86625ee 100644 --- a/qt6/gen_qtextlayout.go +++ b/qt6/gen_qtextlayout.go @@ -58,24 +58,19 @@ func newQTextInlineObject(h *C.QTextInlineObject) *QTextInlineObject { if h == nil { return nil } + return &QTextInlineObject{h: h} } // UnsafeNewQTextInlineObject constructs the type using only unsafe pointers. func UnsafeNewQTextInlineObject(h unsafe.Pointer) *QTextInlineObject { - if h == nil { - return nil - } - - return &QTextInlineObject{h: (*C.QTextInlineObject)(h)} + return newQTextInlineObject((*C.QTextInlineObject)(h)) } // NewQTextInlineObject constructs a new QTextInlineObject object. func NewQTextInlineObject() *QTextInlineObject { - var outptr_QTextInlineObject *C.QTextInlineObject = nil - C.QTextInlineObject_new(&outptr_QTextInlineObject) - ret := newQTextInlineObject(outptr_QTextInlineObject) + ret := newQTextInlineObject(C.QTextInlineObject_new()) ret.isSubclass = true return ret } @@ -174,24 +169,19 @@ func newQTextLayout(h *C.QTextLayout) *QTextLayout { if h == nil { return nil } + return &QTextLayout{h: h} } // UnsafeNewQTextLayout constructs the type using only unsafe pointers. func UnsafeNewQTextLayout(h unsafe.Pointer) *QTextLayout { - if h == nil { - return nil - } - - return &QTextLayout{h: (*C.QTextLayout)(h)} + return newQTextLayout((*C.QTextLayout)(h)) } // NewQTextLayout constructs a new QTextLayout object. func NewQTextLayout() *QTextLayout { - var outptr_QTextLayout *C.QTextLayout = nil - C.QTextLayout_new(&outptr_QTextLayout) - ret := newQTextLayout(outptr_QTextLayout) + ret := newQTextLayout(C.QTextLayout_new()) ret.isSubclass = true return ret } @@ -202,10 +192,8 @@ func NewQTextLayout2(text string) *QTextLayout { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTextLayout *C.QTextLayout = nil - C.QTextLayout_new2(text_ms, &outptr_QTextLayout) - ret := newQTextLayout(outptr_QTextLayout) + ret := newQTextLayout(C.QTextLayout_new2(text_ms)) ret.isSubclass = true return ret } @@ -216,20 +204,16 @@ func NewQTextLayout3(text string, font *QFont) *QTextLayout { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTextLayout *C.QTextLayout = nil - C.QTextLayout_new3(text_ms, font.cPointer(), &outptr_QTextLayout) - ret := newQTextLayout(outptr_QTextLayout) + ret := newQTextLayout(C.QTextLayout_new3(text_ms, font.cPointer())) ret.isSubclass = true return ret } // NewQTextLayout4 constructs a new QTextLayout object. func NewQTextLayout4(b *QTextBlock) *QTextLayout { - var outptr_QTextLayout *C.QTextLayout = nil - C.QTextLayout_new4(b.cPointer(), &outptr_QTextLayout) - ret := newQTextLayout(outptr_QTextLayout) + ret := newQTextLayout(C.QTextLayout_new4(b.cPointer())) ret.isSubclass = true return ret } @@ -240,10 +224,8 @@ func NewQTextLayout5(text string, font *QFont, paintdevice *QPaintDevice) *QText text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QTextLayout *C.QTextLayout = nil - C.QTextLayout_new5(text_ms, font.cPointer(), paintdevice.cPointer(), &outptr_QTextLayout) - ret := newQTextLayout(outptr_QTextLayout) + ret := newQTextLayout(C.QTextLayout_new5(text_ms, font.cPointer(), paintdevice.cPointer())) ret.isSubclass = true return ret } @@ -542,24 +524,19 @@ func newQTextLine(h *C.QTextLine) *QTextLine { if h == nil { return nil } + return &QTextLine{h: h} } // UnsafeNewQTextLine constructs the type using only unsafe pointers. func UnsafeNewQTextLine(h unsafe.Pointer) *QTextLine { - if h == nil { - return nil - } - - return &QTextLine{h: (*C.QTextLine)(h)} + return newQTextLine((*C.QTextLine)(h)) } // NewQTextLine constructs a new QTextLine object. func NewQTextLine() *QTextLine { - var outptr_QTextLine *C.QTextLine = nil - C.QTextLine_new(&outptr_QTextLine) - ret := newQTextLine(outptr_QTextLine) + ret := newQTextLine(C.QTextLine_new()) ret.isSubclass = true return ret } @@ -760,24 +737,19 @@ func newQTextLayout__FormatRange(h *C.QTextLayout__FormatRange) *QTextLayout__Fo if h == nil { return nil } + return &QTextLayout__FormatRange{h: h} } // UnsafeNewQTextLayout__FormatRange constructs the type using only unsafe pointers. func UnsafeNewQTextLayout__FormatRange(h unsafe.Pointer) *QTextLayout__FormatRange { - if h == nil { - return nil - } - - return &QTextLayout__FormatRange{h: (*C.QTextLayout__FormatRange)(h)} + return newQTextLayout__FormatRange((*C.QTextLayout__FormatRange)(h)) } // NewQTextLayout__FormatRange constructs a new QTextLayout::FormatRange object. func NewQTextLayout__FormatRange(param1 *QTextLayout__FormatRange) *QTextLayout__FormatRange { - var outptr_QTextLayout__FormatRange *C.QTextLayout__FormatRange = nil - C.QTextLayout__FormatRange_new(param1.cPointer(), &outptr_QTextLayout__FormatRange) - ret := newQTextLayout__FormatRange(outptr_QTextLayout__FormatRange) + ret := newQTextLayout__FormatRange(C.QTextLayout__FormatRange_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qtextlayout.h b/qt6/gen_qtextlayout.h index dd006eac..92c11e81 100644 --- a/qt6/gen_qtextlayout.h +++ b/qt6/gen_qtextlayout.h @@ -50,7 +50,7 @@ typedef struct QTextLine QTextLine; typedef struct QTextOption QTextOption; #endif -void QTextInlineObject_new(QTextInlineObject** outptr_QTextInlineObject); +QTextInlineObject* QTextInlineObject_new(); bool QTextInlineObject_IsValid(const QTextInlineObject* self); QRectF* QTextInlineObject_Rect(const QTextInlineObject* self); double QTextInlineObject_Width(const QTextInlineObject* self); @@ -66,11 +66,11 @@ int QTextInlineObject_FormatIndex(const QTextInlineObject* self); QTextFormat* QTextInlineObject_Format(const QTextInlineObject* self); void QTextInlineObject_Delete(QTextInlineObject* self, bool isSubclass); -void QTextLayout_new(QTextLayout** outptr_QTextLayout); -void QTextLayout_new2(struct miqt_string text, QTextLayout** outptr_QTextLayout); -void QTextLayout_new3(struct miqt_string text, QFont* font, QTextLayout** outptr_QTextLayout); -void QTextLayout_new4(QTextBlock* b, QTextLayout** outptr_QTextLayout); -void QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice, QTextLayout** outptr_QTextLayout); +QTextLayout* QTextLayout_new(); +QTextLayout* QTextLayout_new2(struct miqt_string text); +QTextLayout* QTextLayout_new3(struct miqt_string text, QFont* font); +QTextLayout* QTextLayout_new4(QTextBlock* b); +QTextLayout* QTextLayout_new5(struct miqt_string text, QFont* font, QPaintDevice* paintdevice); void QTextLayout_SetFont(QTextLayout* self, QFont* f); QFont* QTextLayout_Font(const QTextLayout* self); void QTextLayout_SetRawFont(QTextLayout* self, QRawFont* rawFont); @@ -118,7 +118,7 @@ struct miqt_array /* of QGlyphRun* */ QTextLayout_GlyphRuns1(const QTextLayout* struct miqt_array /* of QGlyphRun* */ QTextLayout_GlyphRuns2(const QTextLayout* self, int from, int length); void QTextLayout_Delete(QTextLayout* self, bool isSubclass); -void QTextLine_new(QTextLine** outptr_QTextLine); +QTextLine* QTextLine_new(); bool QTextLine_IsValid(const QTextLine* self); QRectF* QTextLine_Rect(const QTextLine* self); double QTextLine_X(const QTextLine* self); @@ -153,7 +153,7 @@ struct miqt_array /* of QGlyphRun* */ QTextLine_GlyphRuns1(const QTextLine* sel struct miqt_array /* of QGlyphRun* */ QTextLine_GlyphRuns2(const QTextLine* self, int from, int length); void QTextLine_Delete(QTextLine* self, bool isSubclass); -void QTextLayout__FormatRange_new(QTextLayout__FormatRange* param1, QTextLayout__FormatRange** outptr_QTextLayout__FormatRange); +QTextLayout__FormatRange* QTextLayout__FormatRange_new(QTextLayout__FormatRange* param1); void QTextLayout__FormatRange_OperatorAssign(QTextLayout__FormatRange* self, QTextLayout__FormatRange* param1); void QTextLayout__FormatRange_Delete(QTextLayout__FormatRange* self, bool isSubclass); diff --git a/qt6/gen_qtextlist.cpp b/qt6/gen_qtextlist.cpp index 096c1832..ada7f1b5 100644 --- a/qt6/gen_qtextlist.cpp +++ b/qt6/gen_qtextlist.cpp @@ -100,12 +100,12 @@ public: }; -void QTextList_new(QTextDocument* doc, QTextList** outptr_QTextList, QTextBlockGroup** outptr_QTextBlockGroup, QTextObject** outptr_QTextObject, QObject** outptr_QObject) { - MiqtVirtualQTextList* ret = new MiqtVirtualQTextList(doc); - *outptr_QTextList = ret; - *outptr_QTextBlockGroup = static_cast(ret); - *outptr_QTextObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTextList* QTextList_new(QTextDocument* doc) { + return new MiqtVirtualQTextList(doc); +} + +void QTextList_virtbase(QTextList* src, QTextBlockGroup** outptr_QTextBlockGroup) { + *outptr_QTextBlockGroup = static_cast(src); } QMetaObject* QTextList_MetaObject(const QTextList* self) { diff --git a/qt6/gen_qtextlist.go b/qt6/gen_qtextlist.go index ba14b24c..66fd02ec 100644 --- a/qt6/gen_qtextlist.go +++ b/qt6/gen_qtextlist.go @@ -35,33 +35,26 @@ func (this *QTextList) UnsafePointer() unsafe.Pointer { } // newQTextList constructs the type using only CGO pointers. -func newQTextList(h *C.QTextList, h_QTextBlockGroup *C.QTextBlockGroup, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextList { +func newQTextList(h *C.QTextList) *QTextList { if h == nil { return nil } + var outptr_QTextBlockGroup *C.QTextBlockGroup = nil + C.QTextList_virtbase(h, &outptr_QTextBlockGroup) + return &QTextList{h: h, - QTextBlockGroup: newQTextBlockGroup(h_QTextBlockGroup, h_QTextObject, h_QObject)} + QTextBlockGroup: newQTextBlockGroup(outptr_QTextBlockGroup)} } // UnsafeNewQTextList constructs the type using only unsafe pointers. -func UnsafeNewQTextList(h unsafe.Pointer, h_QTextBlockGroup unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextList { - if h == nil { - return nil - } - - return &QTextList{h: (*C.QTextList)(h), - QTextBlockGroup: UnsafeNewQTextBlockGroup(h_QTextBlockGroup, h_QTextObject, h_QObject)} +func UnsafeNewQTextList(h unsafe.Pointer) *QTextList { + return newQTextList((*C.QTextList)(h)) } // NewQTextList constructs a new QTextList object. func NewQTextList(doc *QTextDocument) *QTextList { - var outptr_QTextList *C.QTextList = nil - var outptr_QTextBlockGroup *C.QTextBlockGroup = nil - var outptr_QTextObject *C.QTextObject = nil - var outptr_QObject *C.QObject = nil - C.QTextList_new(doc.cPointer(), &outptr_QTextList, &outptr_QTextBlockGroup, &outptr_QTextObject, &outptr_QObject) - ret := newQTextList(outptr_QTextList, outptr_QTextBlockGroup, outptr_QTextObject, outptr_QObject) + ret := newQTextList(C.QTextList_new(doc.cPointer())) ret.isSubclass = true return ret } @@ -123,7 +116,7 @@ func (this *QTextList) SetFormat(format *QTextListFormat) { } func (this *QTextList) Format() *QTextListFormat { - _goptr := newQTextListFormat(C.QTextList_Format(this.h), nil) + _goptr := newQTextListFormat(C.QTextList_Format(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/gen_qtextlist.h b/qt6/gen_qtextlist.h index 51569f37..54093e57 100644 --- a/qt6/gen_qtextlist.h +++ b/qt6/gen_qtextlist.h @@ -34,7 +34,8 @@ typedef struct QTextListFormat QTextListFormat; typedef struct QTextObject QTextObject; #endif -void QTextList_new(QTextDocument* doc, QTextList** outptr_QTextList, QTextBlockGroup** outptr_QTextBlockGroup, QTextObject** outptr_QTextObject, QObject** outptr_QObject); +QTextList* QTextList_new(QTextDocument* doc); +void QTextList_virtbase(QTextList* src, QTextBlockGroup** outptr_QTextBlockGroup); QMetaObject* QTextList_MetaObject(const QTextList* self); void* QTextList_Metacast(QTextList* self, const char* param1); struct miqt_string QTextList_Tr(const char* s); diff --git a/qt6/gen_qtextobject.cpp b/qt6/gen_qtextobject.cpp index 2de63613..32b00690 100644 --- a/qt6/gen_qtextobject.cpp +++ b/qt6/gen_qtextobject.cpp @@ -27,6 +27,10 @@ #include "gen_qtextobject.h" #include "_cgo_export.h" +void QTextObject_virtbase(QTextObject* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QTextObject_MetaObject(const QTextObject* self) { return (QMetaObject*) self->metaObject(); } @@ -84,6 +88,10 @@ struct miqt_string QTextObject_Tr3(const char* s, const char* c, int n) { return _ms; } +void QTextBlockGroup_virtbase(QTextBlockGroup* src, QTextObject** outptr_QTextObject) { + *outptr_QTextObject = static_cast(src); +} + QMetaObject* QTextBlockGroup_MetaObject(const QTextBlockGroup* self) { return (QMetaObject*) self->metaObject(); } @@ -137,11 +145,12 @@ void QTextFrameLayoutData_Delete(QTextFrameLayoutData* self, bool isSubclass) { } } -void QTextFrame_new(QTextDocument* doc, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject) { - QTextFrame* ret = new QTextFrame(doc); - *outptr_QTextFrame = ret; - *outptr_QTextObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTextFrame* QTextFrame_new(QTextDocument* doc) { + return new QTextFrame(doc); +} + +void QTextFrame_virtbase(QTextFrame* src, QTextObject** outptr_QTextObject) { + *outptr_QTextObject = static_cast(src); } QMetaObject* QTextFrame_MetaObject(const QTextFrame* self) { @@ -262,14 +271,12 @@ void QTextBlockUserData_Delete(QTextBlockUserData* self, bool isSubclass) { } } -void QTextBlock_new(QTextBlock** outptr_QTextBlock) { - QTextBlock* ret = new QTextBlock(); - *outptr_QTextBlock = ret; +QTextBlock* QTextBlock_new() { + return new QTextBlock(); } -void QTextBlock_new2(QTextBlock* o, QTextBlock** outptr_QTextBlock) { - QTextBlock* ret = new QTextBlock(*o); - *outptr_QTextBlock = ret; +QTextBlock* QTextBlock_new2(QTextBlock* o) { + return new QTextBlock(*o); } void QTextBlock_OperatorAssign(QTextBlock* self, QTextBlock* o) { @@ -441,14 +448,12 @@ void QTextBlock_Delete(QTextBlock* self, bool isSubclass) { } } -void QTextFragment_new(QTextFragment** outptr_QTextFragment) { - QTextFragment* ret = new QTextFragment(); - *outptr_QTextFragment = ret; +QTextFragment* QTextFragment_new() { + return new QTextFragment(); } -void QTextFragment_new2(QTextFragment* o, QTextFragment** outptr_QTextFragment) { - QTextFragment* ret = new QTextFragment(*o); - *outptr_QTextFragment = ret; +QTextFragment* QTextFragment_new2(QTextFragment* o) { + return new QTextFragment(*o); } void QTextFragment_OperatorAssign(QTextFragment* self, QTextFragment* o) { @@ -549,14 +554,12 @@ void QTextFragment_Delete(QTextFragment* self, bool isSubclass) { } } -void QTextFrame__iterator_new(QTextFrame__iterator** outptr_QTextFrame__iterator) { - QTextFrame::iterator* ret = new QTextFrame::iterator(); - *outptr_QTextFrame__iterator = ret; +QTextFrame__iterator* QTextFrame__iterator_new() { + return new QTextFrame::iterator(); } -void QTextFrame__iterator_new2(QTextFrame__iterator* param1, QTextFrame__iterator** outptr_QTextFrame__iterator) { - QTextFrame::iterator* ret = new QTextFrame::iterator(*param1); - *outptr_QTextFrame__iterator = ret; +QTextFrame__iterator* QTextFrame__iterator_new2(QTextFrame__iterator* param1) { + return new QTextFrame::iterator(*param1); } QTextFrame* QTextFrame__iterator_ParentFrame(const QTextFrame__iterator* self) { @@ -611,14 +614,12 @@ void QTextFrame__iterator_Delete(QTextFrame__iterator* self, bool isSubclass) { } } -void QTextBlock__iterator_new(QTextBlock__iterator** outptr_QTextBlock__iterator) { - QTextBlock::iterator* ret = new QTextBlock::iterator(); - *outptr_QTextBlock__iterator = ret; +QTextBlock__iterator* QTextBlock__iterator_new() { + return new QTextBlock::iterator(); } -void QTextBlock__iterator_new2(QTextBlock__iterator* param1, QTextBlock__iterator** outptr_QTextBlock__iterator) { - QTextBlock::iterator* ret = new QTextBlock::iterator(*param1); - *outptr_QTextBlock__iterator = ret; +QTextBlock__iterator* QTextBlock__iterator_new2(QTextBlock__iterator* param1) { + return new QTextBlock::iterator(*param1); } QTextFragment* QTextBlock__iterator_Fragment(const QTextBlock__iterator* self) { diff --git a/qt6/gen_qtextobject.go b/qt6/gen_qtextobject.go index 91b1bc2f..7890b27d 100644 --- a/qt6/gen_qtextobject.go +++ b/qt6/gen_qtextobject.go @@ -34,22 +34,20 @@ func (this *QTextObject) UnsafePointer() unsafe.Pointer { } // newQTextObject constructs the type using only CGO pointers. -func newQTextObject(h *C.QTextObject, h_QObject *C.QObject) *QTextObject { +func newQTextObject(h *C.QTextObject) *QTextObject { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QTextObject_virtbase(h, &outptr_QObject) + return &QTextObject{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQTextObject constructs the type using only unsafe pointers. -func UnsafeNewQTextObject(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTextObject { - if h == nil { - return nil - } - - return &QTextObject{h: (*C.QTextObject)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQTextObject(h unsafe.Pointer) *QTextObject { + return newQTextObject((*C.QTextObject)(h)) } func (this *QTextObject) MetaObject() *QMetaObject { @@ -82,7 +80,7 @@ func (this *QTextObject) FormatIndex() int { } func (this *QTextObject) Document() *QTextDocument { - return newQTextDocument(C.QTextObject_Document(this.h), nil) + return newQTextDocument(C.QTextObject_Document(this.h)) } func (this *QTextObject) ObjectIndex() int { @@ -132,22 +130,20 @@ func (this *QTextBlockGroup) UnsafePointer() unsafe.Pointer { } // newQTextBlockGroup constructs the type using only CGO pointers. -func newQTextBlockGroup(h *C.QTextBlockGroup, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextBlockGroup { +func newQTextBlockGroup(h *C.QTextBlockGroup) *QTextBlockGroup { if h == nil { return nil } + var outptr_QTextObject *C.QTextObject = nil + C.QTextBlockGroup_virtbase(h, &outptr_QTextObject) + return &QTextBlockGroup{h: h, - QTextObject: newQTextObject(h_QTextObject, h_QObject)} + QTextObject: newQTextObject(outptr_QTextObject)} } // UnsafeNewQTextBlockGroup constructs the type using only unsafe pointers. -func UnsafeNewQTextBlockGroup(h unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextBlockGroup { - if h == nil { - return nil - } - - return &QTextBlockGroup{h: (*C.QTextBlockGroup)(h), - QTextObject: UnsafeNewQTextObject(h_QTextObject, h_QObject)} +func UnsafeNewQTextBlockGroup(h unsafe.Pointer) *QTextBlockGroup { + return newQTextBlockGroup((*C.QTextBlockGroup)(h)) } func (this *QTextBlockGroup) MetaObject() *QMetaObject { @@ -215,16 +211,13 @@ func newQTextFrameLayoutData(h *C.QTextFrameLayoutData) *QTextFrameLayoutData { if h == nil { return nil } + return &QTextFrameLayoutData{h: h} } // UnsafeNewQTextFrameLayoutData constructs the type using only unsafe pointers. func UnsafeNewQTextFrameLayoutData(h unsafe.Pointer) *QTextFrameLayoutData { - if h == nil { - return nil - } - - return &QTextFrameLayoutData{h: (*C.QTextFrameLayoutData)(h)} + return newQTextFrameLayoutData((*C.QTextFrameLayoutData)(h)) } func (this *QTextFrameLayoutData) OperatorAssign(param1 *QTextFrameLayoutData) { @@ -266,32 +259,26 @@ func (this *QTextFrame) UnsafePointer() unsafe.Pointer { } // newQTextFrame constructs the type using only CGO pointers. -func newQTextFrame(h *C.QTextFrame, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextFrame { +func newQTextFrame(h *C.QTextFrame) *QTextFrame { if h == nil { return nil } + var outptr_QTextObject *C.QTextObject = nil + C.QTextFrame_virtbase(h, &outptr_QTextObject) + return &QTextFrame{h: h, - QTextObject: newQTextObject(h_QTextObject, h_QObject)} + QTextObject: newQTextObject(outptr_QTextObject)} } // UnsafeNewQTextFrame constructs the type using only unsafe pointers. -func UnsafeNewQTextFrame(h unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextFrame { - if h == nil { - return nil - } - - return &QTextFrame{h: (*C.QTextFrame)(h), - QTextObject: UnsafeNewQTextObject(h_QTextObject, h_QObject)} +func UnsafeNewQTextFrame(h unsafe.Pointer) *QTextFrame { + return newQTextFrame((*C.QTextFrame)(h)) } // NewQTextFrame constructs a new QTextFrame object. func NewQTextFrame(doc *QTextDocument) *QTextFrame { - var outptr_QTextFrame *C.QTextFrame = nil - var outptr_QTextObject *C.QTextObject = nil - var outptr_QObject *C.QObject = nil - C.QTextFrame_new(doc.cPointer(), &outptr_QTextFrame, &outptr_QTextObject, &outptr_QObject) - ret := newQTextFrame(outptr_QTextFrame, outptr_QTextObject, outptr_QObject) + ret := newQTextFrame(C.QTextFrame_new(doc.cPointer())) ret.isSubclass = true return ret } @@ -320,7 +307,7 @@ func (this *QTextFrame) SetFrameFormat(format *QTextFrameFormat) { } func (this *QTextFrame) FrameFormat() *QTextFrameFormat { - _goptr := newQTextFrameFormat(C.QTextFrame_FrameFormat(this.h), nil) + _goptr := newQTextFrameFormat(C.QTextFrame_FrameFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -358,13 +345,13 @@ func (this *QTextFrame) ChildFrames() []*QTextFrame { _ret := make([]*QTextFrame, int(_ma.len)) _outCast := (*[0xffff]*C.QTextFrame)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQTextFrame(_outCast[i], nil, nil) + _ret[i] = newQTextFrame(_outCast[i]) } return _ret } func (this *QTextFrame) ParentFrame() *QTextFrame { - return newQTextFrame(C.QTextFrame_ParentFrame(this.h), nil, nil) + return newQTextFrame(C.QTextFrame_ParentFrame(this.h)) } func (this *QTextFrame) Begin() *QTextFrame__iterator { @@ -439,16 +426,13 @@ func newQTextBlockUserData(h *C.QTextBlockUserData) *QTextBlockUserData { if h == nil { return nil } + return &QTextBlockUserData{h: h} } // UnsafeNewQTextBlockUserData constructs the type using only unsafe pointers. func UnsafeNewQTextBlockUserData(h unsafe.Pointer) *QTextBlockUserData { - if h == nil { - return nil - } - - return &QTextBlockUserData{h: (*C.QTextBlockUserData)(h)} + return newQTextBlockUserData((*C.QTextBlockUserData)(h)) } func (this *QTextBlockUserData) OperatorAssign(param1 *QTextBlockUserData) { @@ -493,34 +477,27 @@ func newQTextBlock(h *C.QTextBlock) *QTextBlock { if h == nil { return nil } + return &QTextBlock{h: h} } // UnsafeNewQTextBlock constructs the type using only unsafe pointers. func UnsafeNewQTextBlock(h unsafe.Pointer) *QTextBlock { - if h == nil { - return nil - } - - return &QTextBlock{h: (*C.QTextBlock)(h)} + return newQTextBlock((*C.QTextBlock)(h)) } // NewQTextBlock constructs a new QTextBlock object. func NewQTextBlock() *QTextBlock { - var outptr_QTextBlock *C.QTextBlock = nil - C.QTextBlock_new(&outptr_QTextBlock) - ret := newQTextBlock(outptr_QTextBlock) + ret := newQTextBlock(C.QTextBlock_new()) ret.isSubclass = true return ret } // NewQTextBlock2 constructs a new QTextBlock object. func NewQTextBlock2(o *QTextBlock) *QTextBlock { - var outptr_QTextBlock *C.QTextBlock = nil - C.QTextBlock_new2(o.cPointer(), &outptr_QTextBlock) - ret := newQTextBlock(outptr_QTextBlock) + ret := newQTextBlock(C.QTextBlock_new2(o.cPointer())) ret.isSubclass = true return ret } @@ -566,7 +543,7 @@ func (this *QTextBlock) ClearLayout() { } func (this *QTextBlock) BlockFormat() *QTextBlockFormat { - _goptr := newQTextBlockFormat(C.QTextBlock_BlockFormat(this.h), nil) + _goptr := newQTextBlockFormat(C.QTextBlock_BlockFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -576,7 +553,7 @@ func (this *QTextBlock) BlockFormatIndex() int { } func (this *QTextBlock) CharFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QTextBlock_CharFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QTextBlock_CharFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -609,11 +586,11 @@ func (this *QTextBlock) TextFormats() []QTextLayout__FormatRange { } func (this *QTextBlock) Document() *QTextDocument { - return newQTextDocument(C.QTextBlock_Document(this.h), nil) + return newQTextDocument(C.QTextBlock_Document(this.h)) } func (this *QTextBlock) TextList() *QTextList { - return newQTextList(C.QTextBlock_TextList(this.h), nil, nil, nil) + return newQTextList(C.QTextBlock_TextList(this.h)) } func (this *QTextBlock) UserData() *QTextBlockUserData { @@ -730,34 +707,27 @@ func newQTextFragment(h *C.QTextFragment) *QTextFragment { if h == nil { return nil } + return &QTextFragment{h: h} } // UnsafeNewQTextFragment constructs the type using only unsafe pointers. func UnsafeNewQTextFragment(h unsafe.Pointer) *QTextFragment { - if h == nil { - return nil - } - - return &QTextFragment{h: (*C.QTextFragment)(h)} + return newQTextFragment((*C.QTextFragment)(h)) } // NewQTextFragment constructs a new QTextFragment object. func NewQTextFragment() *QTextFragment { - var outptr_QTextFragment *C.QTextFragment = nil - C.QTextFragment_new(&outptr_QTextFragment) - ret := newQTextFragment(outptr_QTextFragment) + ret := newQTextFragment(C.QTextFragment_new()) ret.isSubclass = true return ret } // NewQTextFragment2 constructs a new QTextFragment object. func NewQTextFragment2(o *QTextFragment) *QTextFragment { - var outptr_QTextFragment *C.QTextFragment = nil - C.QTextFragment_new2(o.cPointer(), &outptr_QTextFragment) - ret := newQTextFragment(outptr_QTextFragment) + ret := newQTextFragment(C.QTextFragment_new2(o.cPointer())) ret.isSubclass = true return ret } @@ -795,7 +765,7 @@ func (this *QTextFragment) Contains(position int) bool { } func (this *QTextFragment) CharFormat() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QTextFragment_CharFormat(this.h), nil) + _goptr := newQTextCharFormat(C.QTextFragment_CharFormat(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -885,44 +855,37 @@ func newQTextFrame__iterator(h *C.QTextFrame__iterator) *QTextFrame__iterator { if h == nil { return nil } + return &QTextFrame__iterator{h: h} } // UnsafeNewQTextFrame__iterator constructs the type using only unsafe pointers. func UnsafeNewQTextFrame__iterator(h unsafe.Pointer) *QTextFrame__iterator { - if h == nil { - return nil - } - - return &QTextFrame__iterator{h: (*C.QTextFrame__iterator)(h)} + return newQTextFrame__iterator((*C.QTextFrame__iterator)(h)) } // NewQTextFrame__iterator constructs a new QTextFrame::iterator object. func NewQTextFrame__iterator() *QTextFrame__iterator { - var outptr_QTextFrame__iterator *C.QTextFrame__iterator = nil - C.QTextFrame__iterator_new(&outptr_QTextFrame__iterator) - ret := newQTextFrame__iterator(outptr_QTextFrame__iterator) + ret := newQTextFrame__iterator(C.QTextFrame__iterator_new()) ret.isSubclass = true return ret } // NewQTextFrame__iterator2 constructs a new QTextFrame::iterator object. func NewQTextFrame__iterator2(param1 *QTextFrame__iterator) *QTextFrame__iterator { - var outptr_QTextFrame__iterator *C.QTextFrame__iterator = nil - C.QTextFrame__iterator_new2(param1.cPointer(), &outptr_QTextFrame__iterator) - ret := newQTextFrame__iterator(outptr_QTextFrame__iterator) + ret := newQTextFrame__iterator(C.QTextFrame__iterator_new2(param1.cPointer())) ret.isSubclass = true return ret } func (this *QTextFrame__iterator) ParentFrame() *QTextFrame { - return newQTextFrame(C.QTextFrame__iterator_ParentFrame(this.h), nil, nil) + return newQTextFrame(C.QTextFrame__iterator_ParentFrame(this.h)) } func (this *QTextFrame__iterator) CurrentFrame() *QTextFrame { - return newQTextFrame(C.QTextFrame__iterator_CurrentFrame(this.h), nil, nil) + return newQTextFrame(C.QTextFrame__iterator_CurrentFrame(this.h)) } func (this *QTextFrame__iterator) CurrentBlock() *QTextBlock { @@ -1001,34 +964,27 @@ func newQTextBlock__iterator(h *C.QTextBlock__iterator) *QTextBlock__iterator { if h == nil { return nil } + return &QTextBlock__iterator{h: h} } // UnsafeNewQTextBlock__iterator constructs the type using only unsafe pointers. func UnsafeNewQTextBlock__iterator(h unsafe.Pointer) *QTextBlock__iterator { - if h == nil { - return nil - } - - return &QTextBlock__iterator{h: (*C.QTextBlock__iterator)(h)} + return newQTextBlock__iterator((*C.QTextBlock__iterator)(h)) } // NewQTextBlock__iterator constructs a new QTextBlock::iterator object. func NewQTextBlock__iterator() *QTextBlock__iterator { - var outptr_QTextBlock__iterator *C.QTextBlock__iterator = nil - C.QTextBlock__iterator_new(&outptr_QTextBlock__iterator) - ret := newQTextBlock__iterator(outptr_QTextBlock__iterator) + ret := newQTextBlock__iterator(C.QTextBlock__iterator_new()) ret.isSubclass = true return ret } // NewQTextBlock__iterator2 constructs a new QTextBlock::iterator object. func NewQTextBlock__iterator2(param1 *QTextBlock__iterator) *QTextBlock__iterator { - var outptr_QTextBlock__iterator *C.QTextBlock__iterator = nil - C.QTextBlock__iterator_new2(param1.cPointer(), &outptr_QTextBlock__iterator) - ret := newQTextBlock__iterator(outptr_QTextBlock__iterator) + ret := newQTextBlock__iterator(C.QTextBlock__iterator_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qtextobject.h b/qt6/gen_qtextobject.h index 33a793c1..87f27c40 100644 --- a/qt6/gen_qtextobject.h +++ b/qt6/gen_qtextobject.h @@ -72,6 +72,7 @@ typedef struct QTextList QTextList; typedef struct QTextObject QTextObject; #endif +void QTextObject_virtbase(QTextObject* src, QObject** outptr_QObject); QMetaObject* QTextObject_MetaObject(const QTextObject* self); void* QTextObject_Metacast(QTextObject* self, const char* param1); struct miqt_string QTextObject_Tr(const char* s); @@ -82,6 +83,7 @@ int QTextObject_ObjectIndex(const QTextObject* self); struct miqt_string QTextObject_Tr2(const char* s, const char* c); struct miqt_string QTextObject_Tr3(const char* s, const char* c, int n); +void QTextBlockGroup_virtbase(QTextBlockGroup* src, QTextObject** outptr_QTextObject); QMetaObject* QTextBlockGroup_MetaObject(const QTextBlockGroup* self); void* QTextBlockGroup_Metacast(QTextBlockGroup* self, const char* param1); struct miqt_string QTextBlockGroup_Tr(const char* s); @@ -94,7 +96,8 @@ struct miqt_string QTextBlockGroup_Tr3(const char* s, const char* c, int n); void QTextFrameLayoutData_OperatorAssign(QTextFrameLayoutData* self, QTextFrameLayoutData* param1); void QTextFrameLayoutData_Delete(QTextFrameLayoutData* self, bool isSubclass); -void QTextFrame_new(QTextDocument* doc, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject); +QTextFrame* QTextFrame_new(QTextDocument* doc); +void QTextFrame_virtbase(QTextFrame* src, QTextObject** outptr_QTextObject); QMetaObject* QTextFrame_MetaObject(const QTextFrame* self); void* QTextFrame_Metacast(QTextFrame* self, const char* param1); struct miqt_string QTextFrame_Tr(const char* s); @@ -117,8 +120,8 @@ void QTextFrame_Delete(QTextFrame* self, bool isSubclass); void QTextBlockUserData_OperatorAssign(QTextBlockUserData* self, QTextBlockUserData* param1); void QTextBlockUserData_Delete(QTextBlockUserData* self, bool isSubclass); -void QTextBlock_new(QTextBlock** outptr_QTextBlock); -void QTextBlock_new2(QTextBlock* o, QTextBlock** outptr_QTextBlock); +QTextBlock* QTextBlock_new(); +QTextBlock* QTextBlock_new2(QTextBlock* o); void QTextBlock_OperatorAssign(QTextBlock* self, QTextBlock* o); bool QTextBlock_IsValid(const QTextBlock* self); bool QTextBlock_OperatorEqual(const QTextBlock* self, QTextBlock* o); @@ -157,8 +160,8 @@ QTextBlock* QTextBlock_Previous(const QTextBlock* self); int QTextBlock_FragmentIndex(const QTextBlock* self); void QTextBlock_Delete(QTextBlock* self, bool isSubclass); -void QTextFragment_new(QTextFragment** outptr_QTextFragment); -void QTextFragment_new2(QTextFragment* o, QTextFragment** outptr_QTextFragment); +QTextFragment* QTextFragment_new(); +QTextFragment* QTextFragment_new2(QTextFragment* o); void QTextFragment_OperatorAssign(QTextFragment* self, QTextFragment* o); bool QTextFragment_IsValid(const QTextFragment* self); bool QTextFragment_OperatorEqual(const QTextFragment* self, QTextFragment* o); @@ -175,8 +178,8 @@ struct miqt_array /* of QGlyphRun* */ QTextFragment_GlyphRuns1(const QTextFragm struct miqt_array /* of QGlyphRun* */ QTextFragment_GlyphRuns2(const QTextFragment* self, int from, int length); void QTextFragment_Delete(QTextFragment* self, bool isSubclass); -void QTextFrame__iterator_new(QTextFrame__iterator** outptr_QTextFrame__iterator); -void QTextFrame__iterator_new2(QTextFrame__iterator* param1, QTextFrame__iterator** outptr_QTextFrame__iterator); +QTextFrame__iterator* QTextFrame__iterator_new(); +QTextFrame__iterator* QTextFrame__iterator_new2(QTextFrame__iterator* param1); QTextFrame* QTextFrame__iterator_ParentFrame(const QTextFrame__iterator* self); QTextFrame* QTextFrame__iterator_CurrentFrame(const QTextFrame__iterator* self); QTextBlock* QTextFrame__iterator_CurrentBlock(const QTextFrame__iterator* self); @@ -189,8 +192,8 @@ QTextFrame__iterator* QTextFrame__iterator_OperatorMinusMinus(QTextFrame__iterat QTextFrame__iterator* QTextFrame__iterator_OperatorMinusMinusWithInt(QTextFrame__iterator* self, int param1); void QTextFrame__iterator_Delete(QTextFrame__iterator* self, bool isSubclass); -void QTextBlock__iterator_new(QTextBlock__iterator** outptr_QTextBlock__iterator); -void QTextBlock__iterator_new2(QTextBlock__iterator* param1, QTextBlock__iterator** outptr_QTextBlock__iterator); +QTextBlock__iterator* QTextBlock__iterator_new(); +QTextBlock__iterator* QTextBlock__iterator_new2(QTextBlock__iterator* param1); QTextFragment* QTextBlock__iterator_Fragment(const QTextBlock__iterator* self); bool QTextBlock__iterator_AtEnd(const QTextBlock__iterator* self); bool QTextBlock__iterator_OperatorEqual(const QTextBlock__iterator* self, QTextBlock__iterator* o); diff --git a/qt6/gen_qtextoption.cpp b/qt6/gen_qtextoption.cpp index 1a2e87ea..c5d95921 100644 --- a/qt6/gen_qtextoption.cpp +++ b/qt6/gen_qtextoption.cpp @@ -6,19 +6,16 @@ #include "gen_qtextoption.h" #include "_cgo_export.h" -void QTextOption_new(QTextOption** outptr_QTextOption) { - QTextOption* ret = new QTextOption(); - *outptr_QTextOption = ret; +QTextOption* QTextOption_new() { + return new QTextOption(); } -void QTextOption_new2(int alignment, QTextOption** outptr_QTextOption) { - QTextOption* ret = new QTextOption(static_cast(alignment)); - *outptr_QTextOption = ret; +QTextOption* QTextOption_new2(int alignment) { + return new QTextOption(static_cast(alignment)); } -void QTextOption_new3(QTextOption* o, QTextOption** outptr_QTextOption) { - QTextOption* ret = new QTextOption(*o); - *outptr_QTextOption = ret; +QTextOption* QTextOption_new3(QTextOption* o) { + return new QTextOption(*o); } void QTextOption_OperatorAssign(QTextOption* self, QTextOption* o) { @@ -132,19 +129,16 @@ void QTextOption_Delete(QTextOption* self, bool isSubclass) { } } -void QTextOption__Tab_new(QTextOption__Tab** outptr_QTextOption__Tab) { - QTextOption::Tab* ret = new QTextOption::Tab(); - *outptr_QTextOption__Tab = ret; +QTextOption__Tab* QTextOption__Tab_new() { + return new QTextOption::Tab(); } -void QTextOption__Tab_new2(double pos, int tabType, QTextOption__Tab** outptr_QTextOption__Tab) { - QTextOption::Tab* ret = new QTextOption::Tab(static_cast(pos), static_cast(tabType)); - *outptr_QTextOption__Tab = ret; +QTextOption__Tab* QTextOption__Tab_new2(double pos, int tabType) { + return new QTextOption::Tab(static_cast(pos), static_cast(tabType)); } -void QTextOption__Tab_new3(double pos, int tabType, QChar* delim, QTextOption__Tab** outptr_QTextOption__Tab) { - QTextOption::Tab* ret = new QTextOption::Tab(static_cast(pos), static_cast(tabType), *delim); - *outptr_QTextOption__Tab = ret; +QTextOption__Tab* QTextOption__Tab_new3(double pos, int tabType, QChar* delim) { + return new QTextOption::Tab(static_cast(pos), static_cast(tabType), *delim); } bool QTextOption__Tab_OperatorEqual(const QTextOption__Tab* self, QTextOption__Tab* other) { diff --git a/qt6/gen_qtextoption.go b/qt6/gen_qtextoption.go index c0622417..e64f9210 100644 --- a/qt6/gen_qtextoption.go +++ b/qt6/gen_qtextoption.go @@ -67,44 +67,35 @@ func newQTextOption(h *C.QTextOption) *QTextOption { if h == nil { return nil } + return &QTextOption{h: h} } // UnsafeNewQTextOption constructs the type using only unsafe pointers. func UnsafeNewQTextOption(h unsafe.Pointer) *QTextOption { - if h == nil { - return nil - } - - return &QTextOption{h: (*C.QTextOption)(h)} + return newQTextOption((*C.QTextOption)(h)) } // NewQTextOption constructs a new QTextOption object. func NewQTextOption() *QTextOption { - var outptr_QTextOption *C.QTextOption = nil - C.QTextOption_new(&outptr_QTextOption) - ret := newQTextOption(outptr_QTextOption) + ret := newQTextOption(C.QTextOption_new()) ret.isSubclass = true return ret } // NewQTextOption2 constructs a new QTextOption object. func NewQTextOption2(alignment AlignmentFlag) *QTextOption { - var outptr_QTextOption *C.QTextOption = nil - C.QTextOption_new2((C.int)(alignment), &outptr_QTextOption) - ret := newQTextOption(outptr_QTextOption) + ret := newQTextOption(C.QTextOption_new2((C.int)(alignment))) ret.isSubclass = true return ret } // NewQTextOption3 constructs a new QTextOption object. func NewQTextOption3(o *QTextOption) *QTextOption { - var outptr_QTextOption *C.QTextOption = nil - C.QTextOption_new3(o.cPointer(), &outptr_QTextOption) - ret := newQTextOption(outptr_QTextOption) + ret := newQTextOption(C.QTextOption_new3(o.cPointer())) ret.isSubclass = true return ret } @@ -241,44 +232,35 @@ func newQTextOption__Tab(h *C.QTextOption__Tab) *QTextOption__Tab { if h == nil { return nil } + return &QTextOption__Tab{h: h} } // UnsafeNewQTextOption__Tab constructs the type using only unsafe pointers. func UnsafeNewQTextOption__Tab(h unsafe.Pointer) *QTextOption__Tab { - if h == nil { - return nil - } - - return &QTextOption__Tab{h: (*C.QTextOption__Tab)(h)} + return newQTextOption__Tab((*C.QTextOption__Tab)(h)) } // NewQTextOption__Tab constructs a new QTextOption::Tab object. func NewQTextOption__Tab() *QTextOption__Tab { - var outptr_QTextOption__Tab *C.QTextOption__Tab = nil - C.QTextOption__Tab_new(&outptr_QTextOption__Tab) - ret := newQTextOption__Tab(outptr_QTextOption__Tab) + ret := newQTextOption__Tab(C.QTextOption__Tab_new()) ret.isSubclass = true return ret } // NewQTextOption__Tab2 constructs a new QTextOption::Tab object. func NewQTextOption__Tab2(pos float64, tabType QTextOption__TabType) *QTextOption__Tab { - var outptr_QTextOption__Tab *C.QTextOption__Tab = nil - C.QTextOption__Tab_new2((C.double)(pos), (C.int)(tabType), &outptr_QTextOption__Tab) - ret := newQTextOption__Tab(outptr_QTextOption__Tab) + ret := newQTextOption__Tab(C.QTextOption__Tab_new2((C.double)(pos), (C.int)(tabType))) ret.isSubclass = true return ret } // NewQTextOption__Tab3 constructs a new QTextOption::Tab object. func NewQTextOption__Tab3(pos float64, tabType QTextOption__TabType, delim QChar) *QTextOption__Tab { - var outptr_QTextOption__Tab *C.QTextOption__Tab = nil - C.QTextOption__Tab_new3((C.double)(pos), (C.int)(tabType), delim.cPointer(), &outptr_QTextOption__Tab) - ret := newQTextOption__Tab(outptr_QTextOption__Tab) + ret := newQTextOption__Tab(C.QTextOption__Tab_new3((C.double)(pos), (C.int)(tabType), delim.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qtextoption.h b/qt6/gen_qtextoption.h index 35da5585..8675d933 100644 --- a/qt6/gen_qtextoption.h +++ b/qt6/gen_qtextoption.h @@ -28,9 +28,9 @@ typedef struct QTextOption QTextOption; typedef struct QTextOption__Tab QTextOption__Tab; #endif -void QTextOption_new(QTextOption** outptr_QTextOption); -void QTextOption_new2(int alignment, QTextOption** outptr_QTextOption); -void QTextOption_new3(QTextOption* o, QTextOption** outptr_QTextOption); +QTextOption* QTextOption_new(); +QTextOption* QTextOption_new2(int alignment); +QTextOption* QTextOption_new3(QTextOption* o); void QTextOption_OperatorAssign(QTextOption* self, QTextOption* o); void QTextOption_SetAlignment(QTextOption* self, int alignment); int QTextOption_Alignment(const QTextOption* self); @@ -50,9 +50,9 @@ void QTextOption_SetUseDesignMetrics(QTextOption* self, bool b); bool QTextOption_UseDesignMetrics(const QTextOption* self); void QTextOption_Delete(QTextOption* self, bool isSubclass); -void QTextOption__Tab_new(QTextOption__Tab** outptr_QTextOption__Tab); -void QTextOption__Tab_new2(double pos, int tabType, QTextOption__Tab** outptr_QTextOption__Tab); -void QTextOption__Tab_new3(double pos, int tabType, QChar* delim, QTextOption__Tab** outptr_QTextOption__Tab); +QTextOption__Tab* QTextOption__Tab_new(); +QTextOption__Tab* QTextOption__Tab_new2(double pos, int tabType); +QTextOption__Tab* QTextOption__Tab_new3(double pos, int tabType, QChar* delim); bool QTextOption__Tab_OperatorEqual(const QTextOption__Tab* self, QTextOption__Tab* other); bool QTextOption__Tab_OperatorNotEqual(const QTextOption__Tab* self, QTextOption__Tab* other); void QTextOption__Tab_Delete(QTextOption__Tab* self, bool isSubclass); diff --git a/qt6/gen_qtextstream.cpp b/qt6/gen_qtextstream.cpp index bf9bcfcf..9d06f41e 100644 --- a/qt6/gen_qtextstream.cpp +++ b/qt6/gen_qtextstream.cpp @@ -11,30 +11,26 @@ #include "gen_qtextstream.h" #include "_cgo_export.h" -void QTextStream_new(QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase) { - QTextStream* ret = new QTextStream(); - *outptr_QTextStream = ret; - *outptr_QIODeviceBase = static_cast(ret); +QTextStream* QTextStream_new() { + return new QTextStream(); } -void QTextStream_new2(QIODevice* device, QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase) { - QTextStream* ret = new QTextStream(device); - *outptr_QTextStream = ret; - *outptr_QIODeviceBase = static_cast(ret); +QTextStream* QTextStream_new2(QIODevice* device) { + return new QTextStream(device); } -void QTextStream_new3(struct miqt_string array, QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase) { +QTextStream* QTextStream_new3(struct miqt_string array) { QByteArray array_QByteArray(array.data, array.len); - QTextStream* ret = new QTextStream(array_QByteArray); - *outptr_QTextStream = ret; - *outptr_QIODeviceBase = static_cast(ret); + return new QTextStream(array_QByteArray); } -void QTextStream_new4(struct miqt_string array, int openMode, QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase) { +QTextStream* QTextStream_new4(struct miqt_string array, int openMode) { QByteArray array_QByteArray(array.data, array.len); - QTextStream* ret = new QTextStream(array_QByteArray, static_cast(openMode)); - *outptr_QTextStream = ret; - *outptr_QIODeviceBase = static_cast(ret); + return new QTextStream(array_QByteArray, static_cast(openMode)); +} + +void QTextStream_virtbase(QTextStream* src, QIODeviceBase** outptr_QIODeviceBase) { + *outptr_QIODeviceBase = static_cast(src); } void QTextStream_SetEncoding(QTextStream* self, int encoding) { diff --git a/qt6/gen_qtextstream.go b/qt6/gen_qtextstream.go index 23569e49..60d9f493 100644 --- a/qt6/gen_qtextstream.go +++ b/qt6/gen_qtextstream.go @@ -70,42 +70,34 @@ func (this *QTextStream) UnsafePointer() unsafe.Pointer { } // newQTextStream constructs the type using only CGO pointers. -func newQTextStream(h *C.QTextStream, h_QIODeviceBase *C.QIODeviceBase) *QTextStream { +func newQTextStream(h *C.QTextStream) *QTextStream { if h == nil { return nil } + var outptr_QIODeviceBase *C.QIODeviceBase = nil + C.QTextStream_virtbase(h, &outptr_QIODeviceBase) + return &QTextStream{h: h, - QIODeviceBase: newQIODeviceBase(h_QIODeviceBase)} + QIODeviceBase: newQIODeviceBase(outptr_QIODeviceBase)} } // UnsafeNewQTextStream constructs the type using only unsafe pointers. -func UnsafeNewQTextStream(h unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QTextStream { - if h == nil { - return nil - } - - return &QTextStream{h: (*C.QTextStream)(h), - QIODeviceBase: UnsafeNewQIODeviceBase(h_QIODeviceBase)} +func UnsafeNewQTextStream(h unsafe.Pointer) *QTextStream { + return newQTextStream((*C.QTextStream)(h)) } // NewQTextStream constructs a new QTextStream object. func NewQTextStream() *QTextStream { - var outptr_QTextStream *C.QTextStream = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QTextStream_new(&outptr_QTextStream, &outptr_QIODeviceBase) - ret := newQTextStream(outptr_QTextStream, outptr_QIODeviceBase) + ret := newQTextStream(C.QTextStream_new()) ret.isSubclass = true return ret } // NewQTextStream2 constructs a new QTextStream object. func NewQTextStream2(device *QIODevice) *QTextStream { - var outptr_QTextStream *C.QTextStream = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QTextStream_new2(device.cPointer(), &outptr_QTextStream, &outptr_QIODeviceBase) - ret := newQTextStream(outptr_QTextStream, outptr_QIODeviceBase) + ret := newQTextStream(C.QTextStream_new2(device.cPointer())) ret.isSubclass = true return ret } @@ -115,11 +107,8 @@ func NewQTextStream3(array []byte) *QTextStream { array_alias := C.struct_miqt_string{} array_alias.data = (*C.char)(unsafe.Pointer(&array[0])) array_alias.len = C.size_t(len(array)) - var outptr_QTextStream *C.QTextStream = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QTextStream_new3(array_alias, &outptr_QTextStream, &outptr_QIODeviceBase) - ret := newQTextStream(outptr_QTextStream, outptr_QIODeviceBase) + ret := newQTextStream(C.QTextStream_new3(array_alias)) ret.isSubclass = true return ret } @@ -129,11 +118,8 @@ func NewQTextStream4(array []byte, openMode QIODeviceBase__OpenModeFlag) *QTextS array_alias := C.struct_miqt_string{} array_alias.data = (*C.char)(unsafe.Pointer(&array[0])) array_alias.len = C.size_t(len(array)) - var outptr_QTextStream *C.QTextStream = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QTextStream_new4(array_alias, (C.int)(openMode), &outptr_QTextStream, &outptr_QIODeviceBase) - ret := newQTextStream(outptr_QTextStream, outptr_QIODeviceBase) + ret := newQTextStream(C.QTextStream_new4(array_alias, (C.int)(openMode))) ret.isSubclass = true return ret } @@ -177,7 +163,7 @@ func (this *QTextStream) SetDevice(device *QIODevice) { } func (this *QTextStream) Device() *QIODevice { - return newQIODevice(C.QTextStream_Device(this.h), nil, nil) + return newQIODevice(C.QTextStream_Device(this.h)) } func (this *QTextStream) String() string { @@ -303,51 +289,51 @@ func (this *QTextStream) RealNumberPrecision() int { } func (this *QTextStream) OperatorShiftRight(ch *QChar) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftRight(this.h, ch.cPointer()), nil) + return newQTextStream(C.QTextStream_OperatorShiftRight(this.h, ch.cPointer())) } func (this *QTextStream) OperatorShiftRightWithCh(ch *int8) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftRightWithCh(this.h, (*C.char)(unsafe.Pointer(ch))), nil) + return newQTextStream(C.QTextStream_OperatorShiftRightWithCh(this.h, (*C.char)(unsafe.Pointer(ch)))) } func (this *QTextStream) OperatorShiftRightWithShort(i *int16) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftRightWithShort(this.h, (*C.int16_t)(unsafe.Pointer(i))), nil) + return newQTextStream(C.QTextStream_OperatorShiftRightWithShort(this.h, (*C.int16_t)(unsafe.Pointer(i)))) } func (this *QTextStream) OperatorShiftRightWithUnsignedshort(i *uint16) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftRightWithUnsignedshort(this.h, (*C.uint16_t)(unsafe.Pointer(i))), nil) + return newQTextStream(C.QTextStream_OperatorShiftRightWithUnsignedshort(this.h, (*C.uint16_t)(unsafe.Pointer(i)))) } func (this *QTextStream) OperatorShiftRightWithInt(i *int) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftRightWithInt(this.h, (*C.int)(unsafe.Pointer(i))), nil) + return newQTextStream(C.QTextStream_OperatorShiftRightWithInt(this.h, (*C.int)(unsafe.Pointer(i)))) } func (this *QTextStream) OperatorShiftRightWithUnsignedint(i *uint) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftRightWithUnsignedint(this.h, (*C.uint)(unsafe.Pointer(i))), nil) + return newQTextStream(C.QTextStream_OperatorShiftRightWithUnsignedint(this.h, (*C.uint)(unsafe.Pointer(i)))) } func (this *QTextStream) OperatorShiftRightWithLong(i *int64) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftRightWithLong(this.h, (*C.long)(unsafe.Pointer(i))), nil) + return newQTextStream(C.QTextStream_OperatorShiftRightWithLong(this.h, (*C.long)(unsafe.Pointer(i)))) } func (this *QTextStream) OperatorShiftRightWithUnsignedlong(i *uint64) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftRightWithUnsignedlong(this.h, (*C.ulong)(unsafe.Pointer(i))), nil) + return newQTextStream(C.QTextStream_OperatorShiftRightWithUnsignedlong(this.h, (*C.ulong)(unsafe.Pointer(i)))) } func (this *QTextStream) OperatorShiftRightWithQlonglong(i *int64) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftRightWithQlonglong(this.h, (*C.longlong)(unsafe.Pointer(i))), nil) + return newQTextStream(C.QTextStream_OperatorShiftRightWithQlonglong(this.h, (*C.longlong)(unsafe.Pointer(i)))) } func (this *QTextStream) OperatorShiftRightWithQulonglong(i *uint64) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftRightWithQulonglong(this.h, (*C.ulonglong)(unsafe.Pointer(i))), nil) + return newQTextStream(C.QTextStream_OperatorShiftRightWithQulonglong(this.h, (*C.ulonglong)(unsafe.Pointer(i)))) } func (this *QTextStream) OperatorShiftRightWithFloat(f *float32) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftRightWithFloat(this.h, (*C.float)(unsafe.Pointer(f))), nil) + return newQTextStream(C.QTextStream_OperatorShiftRightWithFloat(this.h, (*C.float)(unsafe.Pointer(f)))) } func (this *QTextStream) OperatorShiftRightWithDouble(f *float64) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftRightWithDouble(this.h, (*C.double)(unsafe.Pointer(f))), nil) + return newQTextStream(C.QTextStream_OperatorShiftRightWithDouble(this.h, (*C.double)(unsafe.Pointer(f)))) } func (this *QTextStream) OperatorShiftRightWithQString(s string) *QTextStream { @@ -355,68 +341,68 @@ func (this *QTextStream) OperatorShiftRightWithQString(s string) *QTextStream { s_ms.data = C.CString(s) s_ms.len = C.size_t(len(s)) defer C.free(unsafe.Pointer(s_ms.data)) - return newQTextStream(C.QTextStream_OperatorShiftRightWithQString(this.h, s_ms), nil) + return newQTextStream(C.QTextStream_OperatorShiftRightWithQString(this.h, s_ms)) } func (this *QTextStream) OperatorShiftRightWithArray(array []byte) *QTextStream { array_alias := C.struct_miqt_string{} array_alias.data = (*C.char)(unsafe.Pointer(&array[0])) array_alias.len = C.size_t(len(array)) - return newQTextStream(C.QTextStream_OperatorShiftRightWithArray(this.h, array_alias), nil) + return newQTextStream(C.QTextStream_OperatorShiftRightWithArray(this.h, array_alias)) } func (this *QTextStream) OperatorShiftRightWithChar(c string) *QTextStream { c_Cstring := C.CString(c) defer C.free(unsafe.Pointer(c_Cstring)) - return newQTextStream(C.QTextStream_OperatorShiftRightWithChar(this.h, c_Cstring), nil) + return newQTextStream(C.QTextStream_OperatorShiftRightWithChar(this.h, c_Cstring)) } func (this *QTextStream) OperatorShiftLeft(ch QChar) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftLeft(this.h, ch.cPointer()), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeft(this.h, ch.cPointer())) } func (this *QTextStream) OperatorShiftLeftWithCh(ch int8) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftLeftWithCh(this.h, (C.char)(ch)), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeftWithCh(this.h, (C.char)(ch))) } func (this *QTextStream) OperatorShiftLeftWithShort(i int16) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftLeftWithShort(this.h, (C.int16_t)(i)), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeftWithShort(this.h, (C.int16_t)(i))) } func (this *QTextStream) OperatorShiftLeftWithUnsignedshort(i uint16) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftLeftWithUnsignedshort(this.h, (C.uint16_t)(i)), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeftWithUnsignedshort(this.h, (C.uint16_t)(i))) } func (this *QTextStream) OperatorShiftLeftWithInt(i int) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftLeftWithInt(this.h, (C.int)(i)), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeftWithInt(this.h, (C.int)(i))) } func (this *QTextStream) OperatorShiftLeftWithUnsignedint(i uint) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftLeftWithUnsignedint(this.h, (C.uint)(i)), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeftWithUnsignedint(this.h, (C.uint)(i))) } func (this *QTextStream) OperatorShiftLeftWithLong(i int64) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftLeftWithLong(this.h, (C.long)(i)), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeftWithLong(this.h, (C.long)(i))) } func (this *QTextStream) OperatorShiftLeftWithUnsignedlong(i uint64) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftLeftWithUnsignedlong(this.h, (C.ulong)(i)), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeftWithUnsignedlong(this.h, (C.ulong)(i))) } func (this *QTextStream) OperatorShiftLeftWithQlonglong(i int64) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftLeftWithQlonglong(this.h, (C.longlong)(i)), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeftWithQlonglong(this.h, (C.longlong)(i))) } func (this *QTextStream) OperatorShiftLeftWithQulonglong(i uint64) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftLeftWithQulonglong(this.h, (C.ulonglong)(i)), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeftWithQulonglong(this.h, (C.ulonglong)(i))) } func (this *QTextStream) OperatorShiftLeftWithFloat(f float32) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftLeftWithFloat(this.h, (C.float)(f)), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeftWithFloat(this.h, (C.float)(f))) } func (this *QTextStream) OperatorShiftLeftWithDouble(f float64) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftLeftWithDouble(this.h, (C.double)(f)), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeftWithDouble(this.h, (C.double)(f))) } func (this *QTextStream) OperatorShiftLeftWithQString(s string) *QTextStream { @@ -424,24 +410,24 @@ func (this *QTextStream) OperatorShiftLeftWithQString(s string) *QTextStream { s_ms.data = C.CString(s) s_ms.len = C.size_t(len(s)) defer C.free(unsafe.Pointer(s_ms.data)) - return newQTextStream(C.QTextStream_OperatorShiftLeftWithQString(this.h, s_ms), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeftWithQString(this.h, s_ms)) } func (this *QTextStream) OperatorShiftLeftWithArray(array []byte) *QTextStream { array_alias := C.struct_miqt_string{} array_alias.data = (*C.char)(unsafe.Pointer(&array[0])) array_alias.len = C.size_t(len(array)) - return newQTextStream(C.QTextStream_OperatorShiftLeftWithArray(this.h, array_alias), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeftWithArray(this.h, array_alias)) } func (this *QTextStream) OperatorShiftLeftWithChar(c string) *QTextStream { c_Cstring := C.CString(c) defer C.free(unsafe.Pointer(c_Cstring)) - return newQTextStream(C.QTextStream_OperatorShiftLeftWithChar(this.h, c_Cstring), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeftWithChar(this.h, c_Cstring)) } func (this *QTextStream) OperatorShiftLeftWithPtr(ptr unsafe.Pointer) *QTextStream { - return newQTextStream(C.QTextStream_OperatorShiftLeftWithPtr(this.h, ptr), nil) + return newQTextStream(C.QTextStream_OperatorShiftLeftWithPtr(this.h, ptr)) } func (this *QTextStream) ReadLine1(maxlen int64) string { diff --git a/qt6/gen_qtextstream.h b/qt6/gen_qtextstream.h index 4f1063ab..f8d053bc 100644 --- a/qt6/gen_qtextstream.h +++ b/qt6/gen_qtextstream.h @@ -28,10 +28,11 @@ typedef struct QLocale QLocale; typedef struct QTextStream QTextStream; #endif -void QTextStream_new(QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase); -void QTextStream_new2(QIODevice* device, QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase); -void QTextStream_new3(struct miqt_string array, QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase); -void QTextStream_new4(struct miqt_string array, int openMode, QTextStream** outptr_QTextStream, QIODeviceBase** outptr_QIODeviceBase); +QTextStream* QTextStream_new(); +QTextStream* QTextStream_new2(QIODevice* device); +QTextStream* QTextStream_new3(struct miqt_string array); +QTextStream* QTextStream_new4(struct miqt_string array, int openMode); +void QTextStream_virtbase(QTextStream* src, QIODeviceBase** outptr_QIODeviceBase); void QTextStream_SetEncoding(QTextStream* self, int encoding); int QTextStream_Encoding(const QTextStream* self); void QTextStream_SetAutoDetectUnicode(QTextStream* self, bool enabled); diff --git a/qt6/gen_qtexttable.cpp b/qt6/gen_qtexttable.cpp index f1794b36..326bbe7d 100644 --- a/qt6/gen_qtexttable.cpp +++ b/qt6/gen_qtexttable.cpp @@ -16,14 +16,12 @@ #include "gen_qtexttable.h" #include "_cgo_export.h" -void QTextTableCell_new(QTextTableCell** outptr_QTextTableCell) { - QTextTableCell* ret = new QTextTableCell(); - *outptr_QTextTableCell = ret; +QTextTableCell* QTextTableCell_new() { + return new QTextTableCell(); } -void QTextTableCell_new2(QTextTableCell* o, QTextTableCell** outptr_QTextTableCell) { - QTextTableCell* ret = new QTextTableCell(*o); - *outptr_QTextTableCell = ret; +QTextTableCell* QTextTableCell_new2(QTextTableCell* o) { + return new QTextTableCell(*o); } void QTextTableCell_OperatorAssign(QTextTableCell* self, QTextTableCell* o) { @@ -102,12 +100,12 @@ void QTextTableCell_Delete(QTextTableCell* self, bool isSubclass) { } } -void QTextTable_new(QTextDocument* doc, QTextTable** outptr_QTextTable, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject) { - QTextTable* ret = new QTextTable(doc); - *outptr_QTextTable = ret; - *outptr_QTextFrame = static_cast(ret); - *outptr_QTextObject = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTextTable* QTextTable_new(QTextDocument* doc) { + return new QTextTable(doc); +} + +void QTextTable_virtbase(QTextTable* src, QTextFrame** outptr_QTextFrame) { + *outptr_QTextFrame = static_cast(src); } QMetaObject* QTextTable_MetaObject(const QTextTable* self) { diff --git a/qt6/gen_qtexttable.go b/qt6/gen_qtexttable.go index 2fb6c315..6786185c 100644 --- a/qt6/gen_qtexttable.go +++ b/qt6/gen_qtexttable.go @@ -37,34 +37,27 @@ func newQTextTableCell(h *C.QTextTableCell) *QTextTableCell { if h == nil { return nil } + return &QTextTableCell{h: h} } // UnsafeNewQTextTableCell constructs the type using only unsafe pointers. func UnsafeNewQTextTableCell(h unsafe.Pointer) *QTextTableCell { - if h == nil { - return nil - } - - return &QTextTableCell{h: (*C.QTextTableCell)(h)} + return newQTextTableCell((*C.QTextTableCell)(h)) } // NewQTextTableCell constructs a new QTextTableCell object. func NewQTextTableCell() *QTextTableCell { - var outptr_QTextTableCell *C.QTextTableCell = nil - C.QTextTableCell_new(&outptr_QTextTableCell) - ret := newQTextTableCell(outptr_QTextTableCell) + ret := newQTextTableCell(C.QTextTableCell_new()) ret.isSubclass = true return ret } // NewQTextTableCell2 constructs a new QTextTableCell object. func NewQTextTableCell2(o *QTextTableCell) *QTextTableCell { - var outptr_QTextTableCell *C.QTextTableCell = nil - C.QTextTableCell_new2(o.cPointer(), &outptr_QTextTableCell) - ret := newQTextTableCell(outptr_QTextTableCell) + ret := newQTextTableCell(C.QTextTableCell_new2(o.cPointer())) ret.isSubclass = true return ret } @@ -78,7 +71,7 @@ func (this *QTextTableCell) SetFormat(format *QTextCharFormat) { } func (this *QTextTableCell) Format() *QTextCharFormat { - _goptr := newQTextCharFormat(C.QTextTableCell_Format(this.h), nil) + _goptr := newQTextCharFormat(C.QTextTableCell_Format(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -182,33 +175,26 @@ func (this *QTextTable) UnsafePointer() unsafe.Pointer { } // newQTextTable constructs the type using only CGO pointers. -func newQTextTable(h *C.QTextTable, h_QTextFrame *C.QTextFrame, h_QTextObject *C.QTextObject, h_QObject *C.QObject) *QTextTable { +func newQTextTable(h *C.QTextTable) *QTextTable { if h == nil { return nil } + var outptr_QTextFrame *C.QTextFrame = nil + C.QTextTable_virtbase(h, &outptr_QTextFrame) + return &QTextTable{h: h, - QTextFrame: newQTextFrame(h_QTextFrame, h_QTextObject, h_QObject)} + QTextFrame: newQTextFrame(outptr_QTextFrame)} } // UnsafeNewQTextTable constructs the type using only unsafe pointers. -func UnsafeNewQTextTable(h unsafe.Pointer, h_QTextFrame unsafe.Pointer, h_QTextObject unsafe.Pointer, h_QObject unsafe.Pointer) *QTextTable { - if h == nil { - return nil - } - - return &QTextTable{h: (*C.QTextTable)(h), - QTextFrame: UnsafeNewQTextFrame(h_QTextFrame, h_QTextObject, h_QObject)} +func UnsafeNewQTextTable(h unsafe.Pointer) *QTextTable { + return newQTextTable((*C.QTextTable)(h)) } // NewQTextTable constructs a new QTextTable object. func NewQTextTable(doc *QTextDocument) *QTextTable { - var outptr_QTextTable *C.QTextTable = nil - var outptr_QTextFrame *C.QTextFrame = nil - var outptr_QTextObject *C.QTextObject = nil - var outptr_QObject *C.QObject = nil - C.QTextTable_new(doc.cPointer(), &outptr_QTextTable, &outptr_QTextFrame, &outptr_QTextObject, &outptr_QObject) - ret := newQTextTable(outptr_QTextTable, outptr_QTextFrame, outptr_QTextObject, outptr_QObject) + ret := newQTextTable(C.QTextTable_new(doc.cPointer())) ret.isSubclass = true return ret } @@ -315,7 +301,7 @@ func (this *QTextTable) SetFormat(format *QTextTableFormat) { } func (this *QTextTable) Format() *QTextTableFormat { - _goptr := newQTextTableFormat(C.QTextTable_Format(this.h), nil, nil) + _goptr := newQTextTableFormat(C.QTextTable_Format(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/gen_qtexttable.h b/qt6/gen_qtexttable.h index 4b4e4181..b0c9ac13 100644 --- a/qt6/gen_qtexttable.h +++ b/qt6/gen_qtexttable.h @@ -44,8 +44,8 @@ typedef struct QTextTableCell QTextTableCell; typedef struct QTextTableFormat QTextTableFormat; #endif -void QTextTableCell_new(QTextTableCell** outptr_QTextTableCell); -void QTextTableCell_new2(QTextTableCell* o, QTextTableCell** outptr_QTextTableCell); +QTextTableCell* QTextTableCell_new(); +QTextTableCell* QTextTableCell_new2(QTextTableCell* o); void QTextTableCell_OperatorAssign(QTextTableCell* self, QTextTableCell* o); void QTextTableCell_SetFormat(QTextTableCell* self, QTextCharFormat* format); QTextCharFormat* QTextTableCell_Format(const QTextTableCell* self); @@ -65,7 +65,8 @@ QTextFrame__iterator* QTextTableCell_End(const QTextTableCell* self); int QTextTableCell_TableCellFormatIndex(const QTextTableCell* self); void QTextTableCell_Delete(QTextTableCell* self, bool isSubclass); -void QTextTable_new(QTextDocument* doc, QTextTable** outptr_QTextTable, QTextFrame** outptr_QTextFrame, QTextObject** outptr_QTextObject, QObject** outptr_QObject); +QTextTable* QTextTable_new(QTextDocument* doc); +void QTextTable_virtbase(QTextTable* src, QTextFrame** outptr_QTextFrame); QMetaObject* QTextTable_MetaObject(const QTextTable* self); void* QTextTable_Metacast(QTextTable* self, const char* param1); struct miqt_string QTextTable_Tr(const char* s); diff --git a/qt6/gen_qthread.cpp b/qt6/gen_qthread.cpp index 6a1c6f9c..9bd76380 100644 --- a/qt6/gen_qthread.cpp +++ b/qt6/gen_qthread.cpp @@ -218,16 +218,16 @@ public: }; -void QThread_new(QThread** outptr_QThread, QObject** outptr_QObject) { - MiqtVirtualQThread* ret = new MiqtVirtualQThread(); - *outptr_QThread = ret; - *outptr_QObject = static_cast(ret); +QThread* QThread_new() { + return new MiqtVirtualQThread(); } -void QThread_new2(QObject* parent, QThread** outptr_QThread, QObject** outptr_QObject) { - MiqtVirtualQThread* ret = new MiqtVirtualQThread(parent); - *outptr_QThread = ret; - *outptr_QObject = static_cast(ret); +QThread* QThread_new2(QObject* parent) { + return new MiqtVirtualQThread(parent); +} + +void QThread_virtbase(QThread* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QThread_MetaObject(const QThread* self) { diff --git a/qt6/gen_qthread.go b/qt6/gen_qthread.go index ab0604d6..2e957611 100644 --- a/qt6/gen_qthread.go +++ b/qt6/gen_qthread.go @@ -48,42 +48,34 @@ func (this *QThread) UnsafePointer() unsafe.Pointer { } // newQThread constructs the type using only CGO pointers. -func newQThread(h *C.QThread, h_QObject *C.QObject) *QThread { +func newQThread(h *C.QThread) *QThread { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QThread_virtbase(h, &outptr_QObject) + return &QThread{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQThread constructs the type using only unsafe pointers. -func UnsafeNewQThread(h unsafe.Pointer, h_QObject unsafe.Pointer) *QThread { - if h == nil { - return nil - } - - return &QThread{h: (*C.QThread)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQThread(h unsafe.Pointer) *QThread { + return newQThread((*C.QThread)(h)) } // NewQThread constructs a new QThread object. func NewQThread() *QThread { - var outptr_QThread *C.QThread = nil - var outptr_QObject *C.QObject = nil - C.QThread_new(&outptr_QThread, &outptr_QObject) - ret := newQThread(outptr_QThread, outptr_QObject) + ret := newQThread(C.QThread_new()) ret.isSubclass = true return ret } // NewQThread2 constructs a new QThread object. func NewQThread2(parent *QObject) *QThread { - var outptr_QThread *C.QThread = nil - var outptr_QObject *C.QObject = nil - C.QThread_new2(parent.cPointer(), &outptr_QThread, &outptr_QObject) - ret := newQThread(outptr_QThread, outptr_QObject) + ret := newQThread(C.QThread_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -112,7 +104,7 @@ func QThread_CurrentThreadId() unsafe.Pointer { } func QThread_CurrentThread() *QThread { - return newQThread(C.QThread_CurrentThread(), nil) + return newQThread(C.QThread_CurrentThread()) } func QThread_IdealThreadCount() int { @@ -156,7 +148,7 @@ func (this *QThread) StackSize() uint { } func (this *QThread) EventDispatcher() *QAbstractEventDispatcher { - return newQAbstractEventDispatcher(C.QThread_EventDispatcher(this.h), nil) + return newQAbstractEventDispatcher(C.QThread_EventDispatcher(this.h)) } func (this *QThread) SetEventDispatcher(eventDispatcher *QAbstractEventDispatcher) { @@ -342,7 +334,7 @@ func miqt_exec_callback_QThread_TimerEvent(self *C.QThread, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QThread{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -368,7 +360,7 @@ func miqt_exec_callback_QThread_ChildEvent(self *C.QThread, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QThread{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qthread.h b/qt6/gen_qthread.h index f1d01333..a8297977 100644 --- a/qt6/gen_qthread.h +++ b/qt6/gen_qthread.h @@ -36,8 +36,9 @@ typedef struct QThread QThread; typedef struct QTimerEvent QTimerEvent; #endif -void QThread_new(QThread** outptr_QThread, QObject** outptr_QObject); -void QThread_new2(QObject* parent, QThread** outptr_QThread, QObject** outptr_QObject); +QThread* QThread_new(); +QThread* QThread_new2(QObject* parent); +void QThread_virtbase(QThread* src, QObject** outptr_QObject); QMetaObject* QThread_MetaObject(const QThread* self); void* QThread_Metacast(QThread* self, const char* param1); struct miqt_string QThread_Tr(const char* s); diff --git a/qt6/gen_qthreadpool.cpp b/qt6/gen_qthreadpool.cpp index d9682b41..f4c504c6 100644 --- a/qt6/gen_qthreadpool.cpp +++ b/qt6/gen_qthreadpool.cpp @@ -195,16 +195,16 @@ public: }; -void QThreadPool_new(QThreadPool** outptr_QThreadPool, QObject** outptr_QObject) { - MiqtVirtualQThreadPool* ret = new MiqtVirtualQThreadPool(); - *outptr_QThreadPool = ret; - *outptr_QObject = static_cast(ret); +QThreadPool* QThreadPool_new() { + return new MiqtVirtualQThreadPool(); } -void QThreadPool_new2(QObject* parent, QThreadPool** outptr_QThreadPool, QObject** outptr_QObject) { - MiqtVirtualQThreadPool* ret = new MiqtVirtualQThreadPool(parent); - *outptr_QThreadPool = ret; - *outptr_QObject = static_cast(ret); +QThreadPool* QThreadPool_new2(QObject* parent) { + return new MiqtVirtualQThreadPool(parent); +} + +void QThreadPool_virtbase(QThreadPool* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QThreadPool_MetaObject(const QThreadPool* self) { diff --git a/qt6/gen_qthreadpool.go b/qt6/gen_qthreadpool.go index 86692179..08250699 100644 --- a/qt6/gen_qthreadpool.go +++ b/qt6/gen_qthreadpool.go @@ -35,42 +35,34 @@ func (this *QThreadPool) UnsafePointer() unsafe.Pointer { } // newQThreadPool constructs the type using only CGO pointers. -func newQThreadPool(h *C.QThreadPool, h_QObject *C.QObject) *QThreadPool { +func newQThreadPool(h *C.QThreadPool) *QThreadPool { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QThreadPool_virtbase(h, &outptr_QObject) + return &QThreadPool{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQThreadPool constructs the type using only unsafe pointers. -func UnsafeNewQThreadPool(h unsafe.Pointer, h_QObject unsafe.Pointer) *QThreadPool { - if h == nil { - return nil - } - - return &QThreadPool{h: (*C.QThreadPool)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQThreadPool(h unsafe.Pointer) *QThreadPool { + return newQThreadPool((*C.QThreadPool)(h)) } // NewQThreadPool constructs a new QThreadPool object. func NewQThreadPool() *QThreadPool { - var outptr_QThreadPool *C.QThreadPool = nil - var outptr_QObject *C.QObject = nil - C.QThreadPool_new(&outptr_QThreadPool, &outptr_QObject) - ret := newQThreadPool(outptr_QThreadPool, outptr_QObject) + ret := newQThreadPool(C.QThreadPool_new()) ret.isSubclass = true return ret } // NewQThreadPool2 constructs a new QThreadPool object. func NewQThreadPool2(parent *QObject) *QThreadPool { - var outptr_QThreadPool *C.QThreadPool = nil - var outptr_QObject *C.QObject = nil - C.QThreadPool_new2(parent.cPointer(), &outptr_QThreadPool, &outptr_QObject) - ret := newQThreadPool(outptr_QThreadPool, outptr_QObject) + ret := newQThreadPool(C.QThreadPool_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -95,7 +87,7 @@ func QThreadPool_Tr(s string) string { } func QThreadPool_GlobalInstance() *QThreadPool { - return newQThreadPool(C.QThreadPool_GlobalInstance(), nil) + return newQThreadPool(C.QThreadPool_GlobalInstance()) } func (this *QThreadPool) Start(runnable *QRunnable) { @@ -278,7 +270,7 @@ func miqt_exec_callback_QThreadPool_TimerEvent(self *C.QThreadPool, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QThreadPool{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -304,7 +296,7 @@ func miqt_exec_callback_QThreadPool_ChildEvent(self *C.QThreadPool, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QThreadPool{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qthreadpool.h b/qt6/gen_qthreadpool.h index 64e19f41..6554d069 100644 --- a/qt6/gen_qthreadpool.h +++ b/qt6/gen_qthreadpool.h @@ -36,8 +36,9 @@ typedef struct QThreadPool QThreadPool; typedef struct QTimerEvent QTimerEvent; #endif -void QThreadPool_new(QThreadPool** outptr_QThreadPool, QObject** outptr_QObject); -void QThreadPool_new2(QObject* parent, QThreadPool** outptr_QThreadPool, QObject** outptr_QObject); +QThreadPool* QThreadPool_new(); +QThreadPool* QThreadPool_new2(QObject* parent); +void QThreadPool_virtbase(QThreadPool* src, QObject** outptr_QObject); QMetaObject* QThreadPool_MetaObject(const QThreadPool* self); void* QThreadPool_Metacast(QThreadPool* self, const char* param1); struct miqt_string QThreadPool_Tr(const char* s); diff --git a/qt6/gen_qthreadstorage.cpp b/qt6/gen_qthreadstorage.cpp index e694cada..f9f9ef4d 100644 --- a/qt6/gen_qthreadstorage.cpp +++ b/qt6/gen_qthreadstorage.cpp @@ -3,9 +3,8 @@ #include "gen_qthreadstorage.h" #include "_cgo_export.h" -void QThreadStorageData_new(QThreadStorageData* param1, QThreadStorageData** outptr_QThreadStorageData) { - QThreadStorageData* ret = new QThreadStorageData(*param1); - *outptr_QThreadStorageData = ret; +QThreadStorageData* QThreadStorageData_new(QThreadStorageData* param1) { + return new QThreadStorageData(*param1); } void QThreadStorageData_Delete(QThreadStorageData* self, bool isSubclass) { diff --git a/qt6/gen_qthreadstorage.go b/qt6/gen_qthreadstorage.go index 1c1a789b..23df61a4 100644 --- a/qt6/gen_qthreadstorage.go +++ b/qt6/gen_qthreadstorage.go @@ -37,24 +37,19 @@ func newQThreadStorageData(h *C.QThreadStorageData) *QThreadStorageData { if h == nil { return nil } + return &QThreadStorageData{h: h} } // UnsafeNewQThreadStorageData constructs the type using only unsafe pointers. func UnsafeNewQThreadStorageData(h unsafe.Pointer) *QThreadStorageData { - if h == nil { - return nil - } - - return &QThreadStorageData{h: (*C.QThreadStorageData)(h)} + return newQThreadStorageData((*C.QThreadStorageData)(h)) } // NewQThreadStorageData constructs a new QThreadStorageData object. func NewQThreadStorageData(param1 *QThreadStorageData) *QThreadStorageData { - var outptr_QThreadStorageData *C.QThreadStorageData = nil - C.QThreadStorageData_new(param1.cPointer(), &outptr_QThreadStorageData) - ret := newQThreadStorageData(outptr_QThreadStorageData) + ret := newQThreadStorageData(C.QThreadStorageData_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qthreadstorage.h b/qt6/gen_qthreadstorage.h index 6a5c6ccf..3bb7d908 100644 --- a/qt6/gen_qthreadstorage.h +++ b/qt6/gen_qthreadstorage.h @@ -20,7 +20,7 @@ class QThreadStorageData; typedef struct QThreadStorageData QThreadStorageData; #endif -void QThreadStorageData_new(QThreadStorageData* param1, QThreadStorageData** outptr_QThreadStorageData); +QThreadStorageData* QThreadStorageData_new(QThreadStorageData* param1); void QThreadStorageData_Delete(QThreadStorageData* self, bool isSubclass); #ifdef __cplusplus diff --git a/qt6/gen_qtimeline.cpp b/qt6/gen_qtimeline.cpp index a926dfa9..ecf40833 100644 --- a/qt6/gen_qtimeline.cpp +++ b/qt6/gen_qtimeline.cpp @@ -219,22 +219,20 @@ public: }; -void QTimeLine_new(QTimeLine** outptr_QTimeLine, QObject** outptr_QObject) { - MiqtVirtualQTimeLine* ret = new MiqtVirtualQTimeLine(); - *outptr_QTimeLine = ret; - *outptr_QObject = static_cast(ret); +QTimeLine* QTimeLine_new() { + return new MiqtVirtualQTimeLine(); } -void QTimeLine_new2(int duration, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject) { - MiqtVirtualQTimeLine* ret = new MiqtVirtualQTimeLine(static_cast(duration)); - *outptr_QTimeLine = ret; - *outptr_QObject = static_cast(ret); +QTimeLine* QTimeLine_new2(int duration) { + return new MiqtVirtualQTimeLine(static_cast(duration)); } -void QTimeLine_new3(int duration, QObject* parent, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject) { - MiqtVirtualQTimeLine* ret = new MiqtVirtualQTimeLine(static_cast(duration), parent); - *outptr_QTimeLine = ret; - *outptr_QObject = static_cast(ret); +QTimeLine* QTimeLine_new3(int duration, QObject* parent) { + return new MiqtVirtualQTimeLine(static_cast(duration), parent); +} + +void QTimeLine_virtbase(QTimeLine* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QTimeLine_MetaObject(const QTimeLine* self) { diff --git a/qt6/gen_qtimeline.go b/qt6/gen_qtimeline.go index acd9928f..18064b3b 100644 --- a/qt6/gen_qtimeline.go +++ b/qt6/gen_qtimeline.go @@ -50,53 +50,42 @@ func (this *QTimeLine) UnsafePointer() unsafe.Pointer { } // newQTimeLine constructs the type using only CGO pointers. -func newQTimeLine(h *C.QTimeLine, h_QObject *C.QObject) *QTimeLine { +func newQTimeLine(h *C.QTimeLine) *QTimeLine { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QTimeLine_virtbase(h, &outptr_QObject) + return &QTimeLine{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQTimeLine constructs the type using only unsafe pointers. -func UnsafeNewQTimeLine(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTimeLine { - if h == nil { - return nil - } - - return &QTimeLine{h: (*C.QTimeLine)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQTimeLine(h unsafe.Pointer) *QTimeLine { + return newQTimeLine((*C.QTimeLine)(h)) } // NewQTimeLine constructs a new QTimeLine object. func NewQTimeLine() *QTimeLine { - var outptr_QTimeLine *C.QTimeLine = nil - var outptr_QObject *C.QObject = nil - C.QTimeLine_new(&outptr_QTimeLine, &outptr_QObject) - ret := newQTimeLine(outptr_QTimeLine, outptr_QObject) + ret := newQTimeLine(C.QTimeLine_new()) ret.isSubclass = true return ret } // NewQTimeLine2 constructs a new QTimeLine object. func NewQTimeLine2(duration int) *QTimeLine { - var outptr_QTimeLine *C.QTimeLine = nil - var outptr_QObject *C.QObject = nil - C.QTimeLine_new2((C.int)(duration), &outptr_QTimeLine, &outptr_QObject) - ret := newQTimeLine(outptr_QTimeLine, outptr_QObject) + ret := newQTimeLine(C.QTimeLine_new2((C.int)(duration))) ret.isSubclass = true return ret } // NewQTimeLine3 constructs a new QTimeLine object. func NewQTimeLine3(duration int, parent *QObject) *QTimeLine { - var outptr_QTimeLine *C.QTimeLine = nil - var outptr_QObject *C.QObject = nil - C.QTimeLine_new3((C.int)(duration), parent.cPointer(), &outptr_QTimeLine, &outptr_QObject) - ret := newQTimeLine(outptr_QTimeLine, outptr_QObject) + ret := newQTimeLine(C.QTimeLine_new3((C.int)(duration), parent.cPointer())) ret.isSubclass = true return ret } @@ -300,7 +289,7 @@ func miqt_exec_callback_QTimeLine_TimerEvent(self *C.QTimeLine, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTimeLine{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -384,7 +373,7 @@ func miqt_exec_callback_QTimeLine_ChildEvent(self *C.QTimeLine, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QTimeLine{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qtimeline.h b/qt6/gen_qtimeline.h index 0413bbf9..d130c229 100644 --- a/qt6/gen_qtimeline.h +++ b/qt6/gen_qtimeline.h @@ -34,9 +34,10 @@ typedef struct QTimeLine QTimeLine; typedef struct QTimerEvent QTimerEvent; #endif -void QTimeLine_new(QTimeLine** outptr_QTimeLine, QObject** outptr_QObject); -void QTimeLine_new2(int duration, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject); -void QTimeLine_new3(int duration, QObject* parent, QTimeLine** outptr_QTimeLine, QObject** outptr_QObject); +QTimeLine* QTimeLine_new(); +QTimeLine* QTimeLine_new2(int duration); +QTimeLine* QTimeLine_new3(int duration, QObject* parent); +void QTimeLine_virtbase(QTimeLine* src, QObject** outptr_QObject); QMetaObject* QTimeLine_MetaObject(const QTimeLine* self); void* QTimeLine_Metacast(QTimeLine* self, const char* param1); struct miqt_string QTimeLine_Tr(const char* s); diff --git a/qt6/gen_qtimer.cpp b/qt6/gen_qtimer.cpp index ed5f3309..9b2b2c1e 100644 --- a/qt6/gen_qtimer.cpp +++ b/qt6/gen_qtimer.cpp @@ -193,16 +193,16 @@ public: }; -void QTimer_new(QTimer** outptr_QTimer, QObject** outptr_QObject) { - MiqtVirtualQTimer* ret = new MiqtVirtualQTimer(); - *outptr_QTimer = ret; - *outptr_QObject = static_cast(ret); +QTimer* QTimer_new() { + return new MiqtVirtualQTimer(); } -void QTimer_new2(QObject* parent, QTimer** outptr_QTimer, QObject** outptr_QObject) { - MiqtVirtualQTimer* ret = new MiqtVirtualQTimer(parent); - *outptr_QTimer = ret; - *outptr_QObject = static_cast(ret); +QTimer* QTimer_new2(QObject* parent) { + return new MiqtVirtualQTimer(parent); +} + +void QTimer_virtbase(QTimer* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QTimer_MetaObject(const QTimer* self) { diff --git a/qt6/gen_qtimer.go b/qt6/gen_qtimer.go index eab3ed99..ffcaa013 100644 --- a/qt6/gen_qtimer.go +++ b/qt6/gen_qtimer.go @@ -35,42 +35,34 @@ func (this *QTimer) UnsafePointer() unsafe.Pointer { } // newQTimer constructs the type using only CGO pointers. -func newQTimer(h *C.QTimer, h_QObject *C.QObject) *QTimer { +func newQTimer(h *C.QTimer) *QTimer { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QTimer_virtbase(h, &outptr_QObject) + return &QTimer{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQTimer constructs the type using only unsafe pointers. -func UnsafeNewQTimer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTimer { - if h == nil { - return nil - } - - return &QTimer{h: (*C.QTimer)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQTimer(h unsafe.Pointer) *QTimer { + return newQTimer((*C.QTimer)(h)) } // NewQTimer constructs a new QTimer object. func NewQTimer() *QTimer { - var outptr_QTimer *C.QTimer = nil - var outptr_QObject *C.QObject = nil - C.QTimer_new(&outptr_QTimer, &outptr_QObject) - ret := newQTimer(outptr_QTimer, outptr_QObject) + ret := newQTimer(C.QTimer_new()) ret.isSubclass = true return ret } // NewQTimer2 constructs a new QTimer object. func NewQTimer2(parent *QObject) *QTimer { - var outptr_QTimer *C.QTimer = nil - var outptr_QObject *C.QObject = nil - C.QTimer_new2(parent.cPointer(), &outptr_QTimer, &outptr_QObject) - ret := newQTimer(outptr_QTimer, outptr_QObject) + ret := newQTimer(C.QTimer_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -184,7 +176,7 @@ func miqt_exec_callback_QTimer_TimerEvent(self *C.QTimer, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QTimer{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -268,7 +260,7 @@ func miqt_exec_callback_QTimer_ChildEvent(self *C.QTimer, cb C.intptr_t, event * } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QTimer{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qtimer.h b/qt6/gen_qtimer.h index 9e955746..f9ee4100 100644 --- a/qt6/gen_qtimer.h +++ b/qt6/gen_qtimer.h @@ -32,8 +32,9 @@ typedef struct QTimer QTimer; typedef struct QTimerEvent QTimerEvent; #endif -void QTimer_new(QTimer** outptr_QTimer, QObject** outptr_QObject); -void QTimer_new2(QObject* parent, QTimer** outptr_QTimer, QObject** outptr_QObject); +QTimer* QTimer_new(); +QTimer* QTimer_new2(QObject* parent); +void QTimer_virtbase(QTimer* src, QObject** outptr_QObject); QMetaObject* QTimer_MetaObject(const QTimer* self); void* QTimer_Metacast(QTimer* self, const char* param1); struct miqt_string QTimer_Tr(const char* s); diff --git a/qt6/gen_qtimezone.cpp b/qt6/gen_qtimezone.cpp index 8ba32249..23cd9a52 100644 --- a/qt6/gen_qtimezone.cpp +++ b/qt6/gen_qtimezone.cpp @@ -11,50 +11,43 @@ #include "gen_qtimezone.h" #include "_cgo_export.h" -void QTimeZone_new(QTimeZone** outptr_QTimeZone) { - QTimeZone* ret = new QTimeZone(); - *outptr_QTimeZone = ret; +QTimeZone* QTimeZone_new() { + return new QTimeZone(); } -void QTimeZone_new2(struct miqt_string ianaId, QTimeZone** outptr_QTimeZone) { +QTimeZone* QTimeZone_new2(struct miqt_string ianaId) { QByteArray ianaId_QByteArray(ianaId.data, ianaId.len); - QTimeZone* ret = new QTimeZone(ianaId_QByteArray); - *outptr_QTimeZone = ret; + return new QTimeZone(ianaId_QByteArray); } -void QTimeZone_new3(int offsetSeconds, QTimeZone** outptr_QTimeZone) { - QTimeZone* ret = new QTimeZone(static_cast(offsetSeconds)); - *outptr_QTimeZone = ret; +QTimeZone* QTimeZone_new3(int offsetSeconds) { + return new QTimeZone(static_cast(offsetSeconds)); } -void QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, QTimeZone** outptr_QTimeZone) { +QTimeZone* QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation) { QByteArray zoneId_QByteArray(zoneId.data, zoneId.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString abbreviation_QString = QString::fromUtf8(abbreviation.data, abbreviation.len); - QTimeZone* ret = new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString); - *outptr_QTimeZone = ret; + return new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString); } -void QTimeZone_new5(QTimeZone* other, QTimeZone** outptr_QTimeZone) { - QTimeZone* ret = new QTimeZone(*other); - *outptr_QTimeZone = ret; +QTimeZone* QTimeZone_new5(QTimeZone* other) { + return new QTimeZone(*other); } -void QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory, QTimeZone** outptr_QTimeZone) { +QTimeZone* QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory) { QByteArray zoneId_QByteArray(zoneId.data, zoneId.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString abbreviation_QString = QString::fromUtf8(abbreviation.data, abbreviation.len); - QTimeZone* ret = new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(territory)); - *outptr_QTimeZone = ret; + return new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(territory)); } -void QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory, struct miqt_string comment, QTimeZone** outptr_QTimeZone) { +QTimeZone* QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory, struct miqt_string comment) { QByteArray zoneId_QByteArray(zoneId.data, zoneId.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString abbreviation_QString = QString::fromUtf8(abbreviation.data, abbreviation.len); QString comment_QString = QString::fromUtf8(comment.data, comment.len); - QTimeZone* ret = new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(territory), comment_QString); - *outptr_QTimeZone = ret; + return new QTimeZone(zoneId_QByteArray, static_cast(offsetSeconds), name_QString, abbreviation_QString, static_cast(territory), comment_QString); } void QTimeZone_OperatorAssign(QTimeZone* self, QTimeZone* other) { @@ -377,9 +370,8 @@ void QTimeZone_Delete(QTimeZone* self, bool isSubclass) { } } -void QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1, QTimeZone__OffsetData** outptr_QTimeZone__OffsetData) { - QTimeZone::OffsetData* ret = new QTimeZone::OffsetData(*param1); - *outptr_QTimeZone__OffsetData = ret; +QTimeZone__OffsetData* QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1) { + return new QTimeZone::OffsetData(*param1); } void QTimeZone__OffsetData_OperatorAssign(QTimeZone__OffsetData* self, QTimeZone__OffsetData* param1) { diff --git a/qt6/gen_qtimezone.go b/qt6/gen_qtimezone.go index 11e8636f..41eca7db 100644 --- a/qt6/gen_qtimezone.go +++ b/qt6/gen_qtimezone.go @@ -61,24 +61,19 @@ func newQTimeZone(h *C.QTimeZone) *QTimeZone { if h == nil { return nil } + return &QTimeZone{h: h} } // UnsafeNewQTimeZone constructs the type using only unsafe pointers. func UnsafeNewQTimeZone(h unsafe.Pointer) *QTimeZone { - if h == nil { - return nil - } - - return &QTimeZone{h: (*C.QTimeZone)(h)} + return newQTimeZone((*C.QTimeZone)(h)) } // NewQTimeZone constructs a new QTimeZone object. func NewQTimeZone() *QTimeZone { - var outptr_QTimeZone *C.QTimeZone = nil - C.QTimeZone_new(&outptr_QTimeZone) - ret := newQTimeZone(outptr_QTimeZone) + ret := newQTimeZone(C.QTimeZone_new()) ret.isSubclass = true return ret } @@ -88,20 +83,16 @@ func NewQTimeZone2(ianaId []byte) *QTimeZone { ianaId_alias := C.struct_miqt_string{} ianaId_alias.data = (*C.char)(unsafe.Pointer(&ianaId[0])) ianaId_alias.len = C.size_t(len(ianaId)) - var outptr_QTimeZone *C.QTimeZone = nil - C.QTimeZone_new2(ianaId_alias, &outptr_QTimeZone) - ret := newQTimeZone(outptr_QTimeZone) + ret := newQTimeZone(C.QTimeZone_new2(ianaId_alias)) ret.isSubclass = true return ret } // NewQTimeZone3 constructs a new QTimeZone object. func NewQTimeZone3(offsetSeconds int) *QTimeZone { - var outptr_QTimeZone *C.QTimeZone = nil - C.QTimeZone_new3((C.int)(offsetSeconds), &outptr_QTimeZone) - ret := newQTimeZone(outptr_QTimeZone) + ret := newQTimeZone(C.QTimeZone_new3((C.int)(offsetSeconds))) ret.isSubclass = true return ret } @@ -119,20 +110,16 @@ func NewQTimeZone4(zoneId []byte, offsetSeconds int, name string, abbreviation s abbreviation_ms.data = C.CString(abbreviation) abbreviation_ms.len = C.size_t(len(abbreviation)) defer C.free(unsafe.Pointer(abbreviation_ms.data)) - var outptr_QTimeZone *C.QTimeZone = nil - C.QTimeZone_new4(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, &outptr_QTimeZone) - ret := newQTimeZone(outptr_QTimeZone) + ret := newQTimeZone(C.QTimeZone_new4(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms)) ret.isSubclass = true return ret } // NewQTimeZone5 constructs a new QTimeZone object. func NewQTimeZone5(other *QTimeZone) *QTimeZone { - var outptr_QTimeZone *C.QTimeZone = nil - C.QTimeZone_new5(other.cPointer(), &outptr_QTimeZone) - ret := newQTimeZone(outptr_QTimeZone) + ret := newQTimeZone(C.QTimeZone_new5(other.cPointer())) ret.isSubclass = true return ret } @@ -150,10 +137,8 @@ func NewQTimeZone6(zoneId []byte, offsetSeconds int, name string, abbreviation s abbreviation_ms.data = C.CString(abbreviation) abbreviation_ms.len = C.size_t(len(abbreviation)) defer C.free(unsafe.Pointer(abbreviation_ms.data)) - var outptr_QTimeZone *C.QTimeZone = nil - C.QTimeZone_new6(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.uint16_t)(territory), &outptr_QTimeZone) - ret := newQTimeZone(outptr_QTimeZone) + ret := newQTimeZone(C.QTimeZone_new6(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.uint16_t)(territory))) ret.isSubclass = true return ret } @@ -175,10 +160,8 @@ func NewQTimeZone7(zoneId []byte, offsetSeconds int, name string, abbreviation s comment_ms.data = C.CString(comment) comment_ms.len = C.size_t(len(comment)) defer C.free(unsafe.Pointer(comment_ms.data)) - var outptr_QTimeZone *C.QTimeZone = nil - C.QTimeZone_new7(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.uint16_t)(territory), comment_ms, &outptr_QTimeZone) - ret := newQTimeZone(outptr_QTimeZone) + ret := newQTimeZone(C.QTimeZone_new7(zoneId_alias, (C.int)(offsetSeconds), name_ms, abbreviation_ms, (C.uint16_t)(territory), comment_ms)) ret.isSubclass = true return ret } @@ -485,24 +468,19 @@ func newQTimeZone__OffsetData(h *C.QTimeZone__OffsetData) *QTimeZone__OffsetData if h == nil { return nil } + return &QTimeZone__OffsetData{h: h} } // UnsafeNewQTimeZone__OffsetData constructs the type using only unsafe pointers. func UnsafeNewQTimeZone__OffsetData(h unsafe.Pointer) *QTimeZone__OffsetData { - if h == nil { - return nil - } - - return &QTimeZone__OffsetData{h: (*C.QTimeZone__OffsetData)(h)} + return newQTimeZone__OffsetData((*C.QTimeZone__OffsetData)(h)) } // NewQTimeZone__OffsetData constructs a new QTimeZone::OffsetData object. func NewQTimeZone__OffsetData(param1 *QTimeZone__OffsetData) *QTimeZone__OffsetData { - var outptr_QTimeZone__OffsetData *C.QTimeZone__OffsetData = nil - C.QTimeZone__OffsetData_new(param1.cPointer(), &outptr_QTimeZone__OffsetData) - ret := newQTimeZone__OffsetData(outptr_QTimeZone__OffsetData) + ret := newQTimeZone__OffsetData(C.QTimeZone__OffsetData_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qtimezone.h b/qt6/gen_qtimezone.h index 0373c977..ee541791 100644 --- a/qt6/gen_qtimezone.h +++ b/qt6/gen_qtimezone.h @@ -30,13 +30,13 @@ typedef struct QTimeZone QTimeZone; typedef struct QTimeZone__OffsetData QTimeZone__OffsetData; #endif -void QTimeZone_new(QTimeZone** outptr_QTimeZone); -void QTimeZone_new2(struct miqt_string ianaId, QTimeZone** outptr_QTimeZone); -void QTimeZone_new3(int offsetSeconds, QTimeZone** outptr_QTimeZone); -void QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, QTimeZone** outptr_QTimeZone); -void QTimeZone_new5(QTimeZone* other, QTimeZone** outptr_QTimeZone); -void QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory, QTimeZone** outptr_QTimeZone); -void QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory, struct miqt_string comment, QTimeZone** outptr_QTimeZone); +QTimeZone* QTimeZone_new(); +QTimeZone* QTimeZone_new2(struct miqt_string ianaId); +QTimeZone* QTimeZone_new3(int offsetSeconds); +QTimeZone* QTimeZone_new4(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation); +QTimeZone* QTimeZone_new5(QTimeZone* other); +QTimeZone* QTimeZone_new6(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory); +QTimeZone* QTimeZone_new7(struct miqt_string zoneId, int offsetSeconds, struct miqt_string name, struct miqt_string abbreviation, uint16_t territory, struct miqt_string comment); void QTimeZone_OperatorAssign(QTimeZone* self, QTimeZone* other); void QTimeZone_Swap(QTimeZone* self, QTimeZone* other); bool QTimeZone_IsValid(const QTimeZone* self); @@ -75,7 +75,7 @@ struct miqt_string QTimeZone_DisplayName22(const QTimeZone* self, int timeType, struct miqt_string QTimeZone_DisplayName32(const QTimeZone* self, int timeType, int nameType, QLocale* locale); void QTimeZone_Delete(QTimeZone* self, bool isSubclass); -void QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1, QTimeZone__OffsetData** outptr_QTimeZone__OffsetData); +QTimeZone__OffsetData* QTimeZone__OffsetData_new(QTimeZone__OffsetData* param1); void QTimeZone__OffsetData_OperatorAssign(QTimeZone__OffsetData* self, QTimeZone__OffsetData* param1); void QTimeZone__OffsetData_Delete(QTimeZone__OffsetData* self, bool isSubclass); diff --git a/qt6/gen_qtoolbar.cpp b/qt6/gen_qtoolbar.cpp index 8d3a2a76..5ea65fc2 100644 --- a/qt6/gen_qtoolbar.cpp +++ b/qt6/gen_qtoolbar.cpp @@ -1051,38 +1051,26 @@ public: }; -void QToolBar_new(QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(parent); - *outptr_QToolBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QToolBar* QToolBar_new(QWidget* parent) { + return new MiqtVirtualQToolBar(parent); } -void QToolBar_new2(struct miqt_string title, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QToolBar* QToolBar_new2(struct miqt_string title) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(title_QString); - *outptr_QToolBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQToolBar(title_QString); } -void QToolBar_new3(QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(); - *outptr_QToolBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QToolBar* QToolBar_new3() { + return new MiqtVirtualQToolBar(); } -void QToolBar_new4(struct miqt_string title, QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QToolBar* QToolBar_new4(struct miqt_string title, QWidget* parent) { QString title_QString = QString::fromUtf8(title.data, title.len); - MiqtVirtualQToolBar* ret = new MiqtVirtualQToolBar(title_QString, parent); - *outptr_QToolBar = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQToolBar(title_QString, parent); +} + +void QToolBar_virtbase(QToolBar* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QToolBar_MetaObject(const QToolBar* self) { diff --git a/qt6/gen_qtoolbar.go b/qt6/gen_qtoolbar.go index 70d3858c..a1edcac1 100644 --- a/qt6/gen_qtoolbar.go +++ b/qt6/gen_qtoolbar.go @@ -35,33 +35,26 @@ func (this *QToolBar) UnsafePointer() unsafe.Pointer { } // newQToolBar constructs the type using only CGO pointers. -func newQToolBar(h *C.QToolBar, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QToolBar { +func newQToolBar(h *C.QToolBar) *QToolBar { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QToolBar_virtbase(h, &outptr_QWidget) + return &QToolBar{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQToolBar constructs the type using only unsafe pointers. -func UnsafeNewQToolBar(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QToolBar { - if h == nil { - return nil - } - - return &QToolBar{h: (*C.QToolBar)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQToolBar(h unsafe.Pointer) *QToolBar { + return newQToolBar((*C.QToolBar)(h)) } // NewQToolBar constructs a new QToolBar object. func NewQToolBar(parent *QWidget) *QToolBar { - var outptr_QToolBar *C.QToolBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolBar_new(parent.cPointer(), &outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolBar(C.QToolBar_new(parent.cPointer())) ret.isSubclass = true return ret } @@ -72,26 +65,16 @@ func NewQToolBar2(title string) *QToolBar { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QToolBar *C.QToolBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolBar_new2(title_ms, &outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolBar(C.QToolBar_new2(title_ms)) ret.isSubclass = true return ret } // NewQToolBar3 constructs a new QToolBar object. func NewQToolBar3() *QToolBar { - var outptr_QToolBar *C.QToolBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolBar_new3(&outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolBar(C.QToolBar_new3()) ret.isSubclass = true return ret } @@ -102,13 +85,8 @@ func NewQToolBar4(title string, parent *QWidget) *QToolBar { title_ms.data = C.CString(title) title_ms.len = C.size_t(len(title)) defer C.free(unsafe.Pointer(title_ms.data)) - var outptr_QToolBar *C.QToolBar = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolBar_new4(title_ms, parent.cPointer(), &outptr_QToolBar, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolBar(outptr_QToolBar, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolBar(C.QToolBar_new4(title_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -165,19 +143,19 @@ func (this *QToolBar) Clear() { } func (this *QToolBar) AddSeparator() *QAction { - return newQAction(C.QToolBar_AddSeparator(this.h), nil) + return newQAction(C.QToolBar_AddSeparator(this.h)) } func (this *QToolBar) InsertSeparator(before *QAction) *QAction { - return newQAction(C.QToolBar_InsertSeparator(this.h, before.cPointer()), nil) + return newQAction(C.QToolBar_InsertSeparator(this.h, before.cPointer())) } func (this *QToolBar) AddWidget(widget *QWidget) *QAction { - return newQAction(C.QToolBar_AddWidget(this.h, widget.cPointer()), nil) + return newQAction(C.QToolBar_AddWidget(this.h, widget.cPointer())) } func (this *QToolBar) InsertWidget(before *QAction, widget *QWidget) *QAction { - return newQAction(C.QToolBar_InsertWidget(this.h, before.cPointer(), widget.cPointer()), nil) + return newQAction(C.QToolBar_InsertWidget(this.h, before.cPointer(), widget.cPointer())) } func (this *QToolBar) ActionGeometry(action *QAction) *QRect { @@ -187,15 +165,15 @@ func (this *QToolBar) ActionGeometry(action *QAction) *QRect { } func (this *QToolBar) ActionAt(p *QPoint) *QAction { - return newQAction(C.QToolBar_ActionAt(this.h, p.cPointer()), nil) + return newQAction(C.QToolBar_ActionAt(this.h, p.cPointer())) } func (this *QToolBar) ActionAt2(x int, y int) *QAction { - return newQAction(C.QToolBar_ActionAt2(this.h, (C.int)(x), (C.int)(y)), nil) + return newQAction(C.QToolBar_ActionAt2(this.h, (C.int)(x), (C.int)(y))) } func (this *QToolBar) ToggleViewAction() *QAction { - return newQAction(C.QToolBar_ToggleViewAction(this.h), nil) + return newQAction(C.QToolBar_ToggleViewAction(this.h)) } func (this *QToolBar) IconSize() *QSize { @@ -209,7 +187,7 @@ func (this *QToolBar) ToolButtonStyle() ToolButtonStyle { } func (this *QToolBar) WidgetForAction(action *QAction) *QWidget { - return newQWidget(C.QToolBar_WidgetForAction(this.h, action.cPointer()), nil, nil) + return newQWidget(C.QToolBar_WidgetForAction(this.h, action.cPointer())) } func (this *QToolBar) IsFloatable() bool { @@ -247,7 +225,7 @@ func miqt_exec_callback_QToolBar_ActionTriggered(cb C.intptr_t, action *C.QActio } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(action, nil) + slotval1 := newQAction(action) gofunc(slotval1) } @@ -434,7 +412,7 @@ func miqt_exec_callback_QToolBar_ActionEvent(self *C.QToolBar, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -486,7 +464,7 @@ func miqt_exec_callback_QToolBar_PaintEvent(self *C.QToolBar, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -540,7 +518,7 @@ func miqt_exec_callback_QToolBar_InitStyleOption(self *C.QToolBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionToolBar(option, nil) + slotval1 := newQStyleOptionToolBar(option) gofunc((&QToolBar{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -749,7 +727,7 @@ func miqt_exec_callback_QToolBar_MousePressEvent(self *C.QToolBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -775,7 +753,7 @@ func miqt_exec_callback_QToolBar_MouseReleaseEvent(self *C.QToolBar, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -801,7 +779,7 @@ func miqt_exec_callback_QToolBar_MouseDoubleClickEvent(self *C.QToolBar, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -827,7 +805,7 @@ func miqt_exec_callback_QToolBar_MouseMoveEvent(self *C.QToolBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -853,7 +831,7 @@ func miqt_exec_callback_QToolBar_WheelEvent(self *C.QToolBar, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -879,7 +857,7 @@ func miqt_exec_callback_QToolBar_KeyPressEvent(self *C.QToolBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -905,7 +883,7 @@ func miqt_exec_callback_QToolBar_KeyReleaseEvent(self *C.QToolBar, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -931,7 +909,7 @@ func miqt_exec_callback_QToolBar_FocusInEvent(self *C.QToolBar, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -957,7 +935,7 @@ func miqt_exec_callback_QToolBar_FocusOutEvent(self *C.QToolBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -983,7 +961,7 @@ func miqt_exec_callback_QToolBar_EnterEvent(self *C.QToolBar, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -1035,7 +1013,7 @@ func miqt_exec_callback_QToolBar_MoveEvent(self *C.QToolBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1061,7 +1039,7 @@ func miqt_exec_callback_QToolBar_ResizeEvent(self *C.QToolBar, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1087,7 +1065,7 @@ func miqt_exec_callback_QToolBar_CloseEvent(self *C.QToolBar, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1113,7 +1091,7 @@ func miqt_exec_callback_QToolBar_ContextMenuEvent(self *C.QToolBar, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1139,7 +1117,7 @@ func miqt_exec_callback_QToolBar_TabletEvent(self *C.QToolBar, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1165,7 +1143,7 @@ func miqt_exec_callback_QToolBar_DragEnterEvent(self *C.QToolBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1191,7 +1169,7 @@ func miqt_exec_callback_QToolBar_DragMoveEvent(self *C.QToolBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1217,7 +1195,7 @@ func miqt_exec_callback_QToolBar_DragLeaveEvent(self *C.QToolBar, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1243,7 +1221,7 @@ func miqt_exec_callback_QToolBar_DropEvent(self *C.QToolBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1269,7 +1247,7 @@ func miqt_exec_callback_QToolBar_ShowEvent(self *C.QToolBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1295,7 +1273,7 @@ func miqt_exec_callback_QToolBar_HideEvent(self *C.QToolBar, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QToolBar{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1465,7 +1443,7 @@ func miqt_exec_callback_QToolBar_InputMethodEvent(self *C.QToolBar, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QToolBar{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qtoolbar.h b/qt6/gen_qtoolbar.h index 17f967f3..bd1a4f2e 100644 --- a/qt6/gen_qtoolbar.h +++ b/qt6/gen_qtoolbar.h @@ -84,10 +84,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QToolBar_new(QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QToolBar_new2(struct miqt_string title, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QToolBar_new3(QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QToolBar_new4(struct miqt_string title, QWidget* parent, QToolBar** outptr_QToolBar, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QToolBar* QToolBar_new(QWidget* parent); +QToolBar* QToolBar_new2(struct miqt_string title); +QToolBar* QToolBar_new3(); +QToolBar* QToolBar_new4(struct miqt_string title, QWidget* parent); +void QToolBar_virtbase(QToolBar* src, QWidget** outptr_QWidget); QMetaObject* QToolBar_MetaObject(const QToolBar* self); void* QToolBar_Metacast(QToolBar* self, const char* param1); struct miqt_string QToolBar_Tr(const char* s); diff --git a/qt6/gen_qtoolbox.cpp b/qt6/gen_qtoolbox.cpp index 8bc043c7..e7b68be4 100644 --- a/qt6/gen_qtoolbox.cpp +++ b/qt6/gen_qtoolbox.cpp @@ -217,31 +217,20 @@ public: }; -void QToolBox_new(QWidget* parent, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQToolBox* ret = new MiqtVirtualQToolBox(parent); - *outptr_QToolBox = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QToolBox* QToolBox_new(QWidget* parent) { + return new MiqtVirtualQToolBox(parent); } -void QToolBox_new2(QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQToolBox* ret = new MiqtVirtualQToolBox(); - *outptr_QToolBox = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QToolBox* QToolBox_new2() { + return new MiqtVirtualQToolBox(); } -void QToolBox_new3(QWidget* parent, int f, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQToolBox* ret = new MiqtVirtualQToolBox(parent, static_cast(f)); - *outptr_QToolBox = ret; - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QToolBox* QToolBox_new3(QWidget* parent, int f) { + return new MiqtVirtualQToolBox(parent, static_cast(f)); +} + +void QToolBox_virtbase(QToolBox* src, QFrame** outptr_QFrame) { + *outptr_QFrame = static_cast(src); } QMetaObject* QToolBox_MetaObject(const QToolBox* self) { diff --git a/qt6/gen_qtoolbox.go b/qt6/gen_qtoolbox.go index 26157055..f3e47941 100644 --- a/qt6/gen_qtoolbox.go +++ b/qt6/gen_qtoolbox.go @@ -35,62 +35,42 @@ func (this *QToolBox) UnsafePointer() unsafe.Pointer { } // newQToolBox constructs the type using only CGO pointers. -func newQToolBox(h *C.QToolBox, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QToolBox { +func newQToolBox(h *C.QToolBox) *QToolBox { if h == nil { return nil } + var outptr_QFrame *C.QFrame = nil + C.QToolBox_virtbase(h, &outptr_QFrame) + return &QToolBox{h: h, - QFrame: newQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QFrame: newQFrame(outptr_QFrame)} } // UnsafeNewQToolBox constructs the type using only unsafe pointers. -func UnsafeNewQToolBox(h unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QToolBox { - if h == nil { - return nil - } - - return &QToolBox{h: (*C.QToolBox)(h), - QFrame: UnsafeNewQFrame(h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQToolBox(h unsafe.Pointer) *QToolBox { + return newQToolBox((*C.QToolBox)(h)) } // NewQToolBox constructs a new QToolBox object. func NewQToolBox(parent *QWidget) *QToolBox { - var outptr_QToolBox *C.QToolBox = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolBox_new(parent.cPointer(), &outptr_QToolBox, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolBox(outptr_QToolBox, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolBox(C.QToolBox_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQToolBox2 constructs a new QToolBox object. func NewQToolBox2() *QToolBox { - var outptr_QToolBox *C.QToolBox = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolBox_new2(&outptr_QToolBox, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolBox(outptr_QToolBox, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolBox(C.QToolBox_new2()) ret.isSubclass = true return ret } // NewQToolBox3 constructs a new QToolBox object. func NewQToolBox3(parent *QWidget, f WindowType) *QToolBox { - var outptr_QToolBox *C.QToolBox = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolBox_new3(parent.cPointer(), (C.int)(f), &outptr_QToolBox, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolBox(outptr_QToolBox, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolBox(C.QToolBox_new3(parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -203,11 +183,11 @@ func (this *QToolBox) CurrentIndex() int { } func (this *QToolBox) CurrentWidget() *QWidget { - return newQWidget(C.QToolBox_CurrentWidget(this.h), nil, nil) + return newQWidget(C.QToolBox_CurrentWidget(this.h)) } func (this *QToolBox) Widget(index int) *QWidget { - return newQWidget(C.QToolBox_Widget(this.h, (C.int)(index)), nil, nil) + return newQWidget(C.QToolBox_Widget(this.h, (C.int)(index))) } func (this *QToolBox) IndexOf(widget *QWidget) int { @@ -368,7 +348,7 @@ func miqt_exec_callback_QToolBox_ShowEvent(self *C.QToolBox, cb C.intptr_t, e *C } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(e, nil) + slotval1 := newQShowEvent(e) gofunc((&QToolBox{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -447,7 +427,7 @@ func miqt_exec_callback_QToolBox_PaintEvent(self *C.QToolBox, cb C.intptr_t, par } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QToolBox{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -473,7 +453,7 @@ func miqt_exec_callback_QToolBox_InitStyleOption(self *C.QToolBox, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionFrame(option, nil) + slotval1 := newQStyleOptionFrame(option) gofunc((&QToolBox{h: self}).callVirtualBase_InitStyleOption, slotval1) diff --git a/qt6/gen_qtoolbox.h b/qt6/gen_qtoolbox.h index 5524b55c..f276ee53 100644 --- a/qt6/gen_qtoolbox.h +++ b/qt6/gen_qtoolbox.h @@ -42,9 +42,10 @@ typedef struct QToolBox QToolBox; typedef struct QWidget QWidget; #endif -void QToolBox_new(QWidget* parent, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QToolBox_new2(QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QToolBox_new3(QWidget* parent, int f, QToolBox** outptr_QToolBox, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QToolBox* QToolBox_new(QWidget* parent); +QToolBox* QToolBox_new2(); +QToolBox* QToolBox_new3(QWidget* parent, int f); +void QToolBox_virtbase(QToolBox* src, QFrame** outptr_QFrame); QMetaObject* QToolBox_MetaObject(const QToolBox* self); void* QToolBox_Metacast(QToolBox* self, const char* param1); struct miqt_string QToolBox_Tr(const char* s); diff --git a/qt6/gen_qtoolbutton.cpp b/qt6/gen_qtoolbutton.cpp index 50710b2e..328ae14e 100644 --- a/qt6/gen_qtoolbutton.cpp +++ b/qt6/gen_qtoolbutton.cpp @@ -508,22 +508,16 @@ public: }; -void QToolButton_new(QWidget* parent, QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQToolButton* ret = new MiqtVirtualQToolButton(parent); - *outptr_QToolButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QToolButton* QToolButton_new(QWidget* parent) { + return new MiqtVirtualQToolButton(parent); } -void QToolButton_new2(QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQToolButton* ret = new MiqtVirtualQToolButton(); - *outptr_QToolButton = ret; - *outptr_QAbstractButton = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QToolButton* QToolButton_new2() { + return new MiqtVirtualQToolButton(); +} + +void QToolButton_virtbase(QToolButton* src, QAbstractButton** outptr_QAbstractButton) { + *outptr_QAbstractButton = static_cast(src); } QMetaObject* QToolButton_MetaObject(const QToolButton* self) { diff --git a/qt6/gen_qtoolbutton.go b/qt6/gen_qtoolbutton.go index c35c8664..70c44d1f 100644 --- a/qt6/gen_qtoolbutton.go +++ b/qt6/gen_qtoolbutton.go @@ -43,48 +43,34 @@ func (this *QToolButton) UnsafePointer() unsafe.Pointer { } // newQToolButton constructs the type using only CGO pointers. -func newQToolButton(h *C.QToolButton, h_QAbstractButton *C.QAbstractButton, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QToolButton { +func newQToolButton(h *C.QToolButton) *QToolButton { if h == nil { return nil } + var outptr_QAbstractButton *C.QAbstractButton = nil + C.QToolButton_virtbase(h, &outptr_QAbstractButton) + return &QToolButton{h: h, - QAbstractButton: newQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractButton: newQAbstractButton(outptr_QAbstractButton)} } // UnsafeNewQToolButton constructs the type using only unsafe pointers. -func UnsafeNewQToolButton(h unsafe.Pointer, h_QAbstractButton unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QToolButton { - if h == nil { - return nil - } - - return &QToolButton{h: (*C.QToolButton)(h), - QAbstractButton: UnsafeNewQAbstractButton(h_QAbstractButton, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQToolButton(h unsafe.Pointer) *QToolButton { + return newQToolButton((*C.QToolButton)(h)) } // NewQToolButton constructs a new QToolButton object. func NewQToolButton(parent *QWidget) *QToolButton { - var outptr_QToolButton *C.QToolButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolButton_new(parent.cPointer(), &outptr_QToolButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolButton(outptr_QToolButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolButton(C.QToolButton_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQToolButton2 constructs a new QToolButton object. func NewQToolButton2() *QToolButton { - var outptr_QToolButton *C.QToolButton = nil - var outptr_QAbstractButton *C.QAbstractButton = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QToolButton_new2(&outptr_QToolButton, &outptr_QAbstractButton, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQToolButton(outptr_QToolButton, outptr_QAbstractButton, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQToolButton(C.QToolButton_new2()) ret.isSubclass = true return ret } @@ -137,7 +123,7 @@ func (this *QToolButton) SetMenu(menu *QMenu) { } func (this *QToolButton) Menu() *QMenu { - return newQMenu(C.QToolButton_Menu(this.h), nil, nil, nil) + return newQMenu(C.QToolButton_Menu(this.h)) } func (this *QToolButton) SetPopupMode(mode QToolButton__ToolButtonPopupMode) { @@ -149,7 +135,7 @@ func (this *QToolButton) PopupMode() QToolButton__ToolButtonPopupMode { } func (this *QToolButton) DefaultAction() *QAction { - return newQAction(C.QToolButton_DefaultAction(this.h), nil) + return newQAction(C.QToolButton_DefaultAction(this.h)) } func (this *QToolButton) SetAutoRaise(enable bool) { @@ -187,7 +173,7 @@ func miqt_exec_callback_QToolButton_Triggered(cb C.intptr_t, param1 *C.QAction) } // Convert all CABI parameters to Go parameters - slotval1 := newQAction(param1, nil) + slotval1 := newQAction(param1) gofunc(slotval1) } @@ -316,7 +302,7 @@ func miqt_exec_callback_QToolButton_MousePressEvent(self *C.QToolButton, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QToolButton{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -342,7 +328,7 @@ func miqt_exec_callback_QToolButton_MouseReleaseEvent(self *C.QToolButton, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QToolButton{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -368,7 +354,7 @@ func miqt_exec_callback_QToolButton_PaintEvent(self *C.QToolButton, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QToolButton{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -394,7 +380,7 @@ func miqt_exec_callback_QToolButton_ActionEvent(self *C.QToolButton, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(param1, nil) + slotval1 := newQActionEvent(param1) gofunc((&QToolButton{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -420,7 +406,7 @@ func miqt_exec_callback_QToolButton_EnterEvent(self *C.QToolButton, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(param1, nil, nil, nil, nil) + slotval1 := newQEnterEvent(param1) gofunc((&QToolButton{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -472,7 +458,7 @@ func miqt_exec_callback_QToolButton_TimerEvent(self *C.QToolButton, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(param1, nil) + slotval1 := newQTimerEvent(param1) gofunc((&QToolButton{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -598,7 +584,7 @@ func miqt_exec_callback_QToolButton_InitStyleOption(self *C.QToolButton, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionToolButton(option, nil, nil) + slotval1 := newQStyleOptionToolButton(option) gofunc((&QToolButton{h: self}).callVirtualBase_InitStyleOption, slotval1) @@ -624,7 +610,7 @@ func miqt_exec_callback_QToolButton_KeyPressEvent(self *C.QToolButton, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QToolButton{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -650,7 +636,7 @@ func miqt_exec_callback_QToolButton_KeyReleaseEvent(self *C.QToolButton, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(e, nil, nil) + slotval1 := newQKeyEvent(e) gofunc((&QToolButton{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -676,7 +662,7 @@ func miqt_exec_callback_QToolButton_MouseMoveEvent(self *C.QToolButton, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QToolButton{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -702,7 +688,7 @@ func miqt_exec_callback_QToolButton_FocusInEvent(self *C.QToolButton, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QToolButton{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -728,7 +714,7 @@ func miqt_exec_callback_QToolButton_FocusOutEvent(self *C.QToolButton, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(e, nil) + slotval1 := newQFocusEvent(e) gofunc((&QToolButton{h: self}).callVirtualBase_FocusOutEvent, slotval1) diff --git a/qt6/gen_qtoolbutton.h b/qt6/gen_qtoolbutton.h index b895a162..c0a62612 100644 --- a/qt6/gen_qtoolbutton.h +++ b/qt6/gen_qtoolbutton.h @@ -56,8 +56,9 @@ typedef struct QToolButton QToolButton; typedef struct QWidget QWidget; #endif -void QToolButton_new(QWidget* parent, QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QToolButton_new2(QToolButton** outptr_QToolButton, QAbstractButton** outptr_QAbstractButton, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QToolButton* QToolButton_new(QWidget* parent); +QToolButton* QToolButton_new2(); +void QToolButton_virtbase(QToolButton* src, QAbstractButton** outptr_QAbstractButton); QMetaObject* QToolButton_MetaObject(const QToolButton* self); void* QToolButton_Metacast(QToolButton* self, const char* param1); struct miqt_string QToolButton_Tr(const char* s); diff --git a/qt6/gen_qtooltip.go b/qt6/gen_qtooltip.go index d460b653..ecd07f44 100644 --- a/qt6/gen_qtooltip.go +++ b/qt6/gen_qtooltip.go @@ -37,16 +37,13 @@ func newQToolTip(h *C.QToolTip) *QToolTip { if h == nil { return nil } + return &QToolTip{h: h} } // UnsafeNewQToolTip constructs the type using only unsafe pointers. func UnsafeNewQToolTip(h unsafe.Pointer) *QToolTip { - if h == nil { - return nil - } - - return &QToolTip{h: (*C.QToolTip)(h)} + return newQToolTip((*C.QToolTip)(h)) } func QToolTip_ShowText(pos *QPoint, text string) { diff --git a/qt6/gen_qtransform.cpp b/qt6/gen_qtransform.cpp index 460f9e6d..8c56042e 100644 --- a/qt6/gen_qtransform.cpp +++ b/qt6/gen_qtransform.cpp @@ -11,29 +11,24 @@ #include "gen_qtransform.h" #include "_cgo_export.h" -void QTransform_new(int param1, QTransform** outptr_QTransform) { - QTransform* ret = new QTransform(static_cast(param1)); - *outptr_QTransform = ret; +QTransform* QTransform_new(int param1) { + return new QTransform(static_cast(param1)); } -void QTransform_new2(QTransform** outptr_QTransform) { - QTransform* ret = new QTransform(); - *outptr_QTransform = ret; +QTransform* QTransform_new2() { + return new QTransform(); } -void QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33, QTransform** outptr_QTransform) { - QTransform* ret = new QTransform(static_cast(h11), static_cast(h12), static_cast(h13), static_cast(h21), static_cast(h22), static_cast(h23), static_cast(h31), static_cast(h32), static_cast(h33)); - *outptr_QTransform = ret; +QTransform* QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33) { + return new QTransform(static_cast(h11), static_cast(h12), static_cast(h13), static_cast(h21), static_cast(h22), static_cast(h23), static_cast(h31), static_cast(h32), static_cast(h33)); } -void QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy, QTransform** outptr_QTransform) { - QTransform* ret = new QTransform(static_cast(h11), static_cast(h12), static_cast(h21), static_cast(h22), static_cast(dx), static_cast(dy)); - *outptr_QTransform = ret; +QTransform* QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy) { + return new QTransform(static_cast(h11), static_cast(h12), static_cast(h21), static_cast(h22), static_cast(dx), static_cast(dy)); } -void QTransform_new5(QTransform* other, QTransform** outptr_QTransform) { - QTransform* ret = new QTransform(*other); - *outptr_QTransform = ret; +QTransform* QTransform_new5(QTransform* other) { + return new QTransform(*other); } void QTransform_OperatorAssign(QTransform* self, QTransform* param1) { diff --git a/qt6/gen_qtransform.go b/qt6/gen_qtransform.go index 8ffd24dd..8f162110 100644 --- a/qt6/gen_qtransform.go +++ b/qt6/gen_qtransform.go @@ -48,64 +48,51 @@ func newQTransform(h *C.QTransform) *QTransform { if h == nil { return nil } + return &QTransform{h: h} } // UnsafeNewQTransform constructs the type using only unsafe pointers. func UnsafeNewQTransform(h unsafe.Pointer) *QTransform { - if h == nil { - return nil - } - - return &QTransform{h: (*C.QTransform)(h)} + return newQTransform((*C.QTransform)(h)) } // NewQTransform constructs a new QTransform object. func NewQTransform(param1 Initialization) *QTransform { - var outptr_QTransform *C.QTransform = nil - C.QTransform_new((C.int)(param1), &outptr_QTransform) - ret := newQTransform(outptr_QTransform) + ret := newQTransform(C.QTransform_new((C.int)(param1))) ret.isSubclass = true return ret } // NewQTransform2 constructs a new QTransform object. func NewQTransform2() *QTransform { - var outptr_QTransform *C.QTransform = nil - C.QTransform_new2(&outptr_QTransform) - ret := newQTransform(outptr_QTransform) + ret := newQTransform(C.QTransform_new2()) ret.isSubclass = true return ret } // NewQTransform3 constructs a new QTransform object. func NewQTransform3(h11 float64, h12 float64, h13 float64, h21 float64, h22 float64, h23 float64, h31 float64, h32 float64, h33 float64) *QTransform { - var outptr_QTransform *C.QTransform = nil - C.QTransform_new3((C.double)(h11), (C.double)(h12), (C.double)(h13), (C.double)(h21), (C.double)(h22), (C.double)(h23), (C.double)(h31), (C.double)(h32), (C.double)(h33), &outptr_QTransform) - ret := newQTransform(outptr_QTransform) + ret := newQTransform(C.QTransform_new3((C.double)(h11), (C.double)(h12), (C.double)(h13), (C.double)(h21), (C.double)(h22), (C.double)(h23), (C.double)(h31), (C.double)(h32), (C.double)(h33))) ret.isSubclass = true return ret } // NewQTransform4 constructs a new QTransform object. func NewQTransform4(h11 float64, h12 float64, h21 float64, h22 float64, dx float64, dy float64) *QTransform { - var outptr_QTransform *C.QTransform = nil - C.QTransform_new4((C.double)(h11), (C.double)(h12), (C.double)(h21), (C.double)(h22), (C.double)(dx), (C.double)(dy), &outptr_QTransform) - ret := newQTransform(outptr_QTransform) + ret := newQTransform(C.QTransform_new4((C.double)(h11), (C.double)(h12), (C.double)(h21), (C.double)(h22), (C.double)(dx), (C.double)(dy))) ret.isSubclass = true return ret } // NewQTransform5 constructs a new QTransform object. func NewQTransform5(other *QTransform) *QTransform { - var outptr_QTransform *C.QTransform = nil - C.QTransform_new5(other.cPointer(), &outptr_QTransform) - ret := newQTransform(outptr_QTransform) + ret := newQTransform(C.QTransform_new5(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qtransform.h b/qt6/gen_qtransform.h index a8e18690..5e6e5a5e 100644 --- a/qt6/gen_qtransform.h +++ b/qt6/gen_qtransform.h @@ -36,11 +36,11 @@ typedef struct QRegion QRegion; typedef struct QTransform QTransform; #endif -void QTransform_new(int param1, QTransform** outptr_QTransform); -void QTransform_new2(QTransform** outptr_QTransform); -void QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33, QTransform** outptr_QTransform); -void QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy, QTransform** outptr_QTransform); -void QTransform_new5(QTransform* other, QTransform** outptr_QTransform); +QTransform* QTransform_new(int param1); +QTransform* QTransform_new2(); +QTransform* QTransform_new3(double h11, double h12, double h13, double h21, double h22, double h23, double h31, double h32, double h33); +QTransform* QTransform_new4(double h11, double h12, double h21, double h22, double dx, double dy); +QTransform* QTransform_new5(QTransform* other); void QTransform_OperatorAssign(QTransform* self, QTransform* param1); bool QTransform_IsAffine(const QTransform* self); bool QTransform_IsIdentity(const QTransform* self); diff --git a/qt6/gen_qtranslator.cpp b/qt6/gen_qtranslator.cpp index 59dd9c8d..cd7df0bd 100644 --- a/qt6/gen_qtranslator.cpp +++ b/qt6/gen_qtranslator.cpp @@ -250,16 +250,16 @@ public: }; -void QTranslator_new(QTranslator** outptr_QTranslator, QObject** outptr_QObject) { - MiqtVirtualQTranslator* ret = new MiqtVirtualQTranslator(); - *outptr_QTranslator = ret; - *outptr_QObject = static_cast(ret); +QTranslator* QTranslator_new() { + return new MiqtVirtualQTranslator(); } -void QTranslator_new2(QObject* parent, QTranslator** outptr_QTranslator, QObject** outptr_QObject) { - MiqtVirtualQTranslator* ret = new MiqtVirtualQTranslator(parent); - *outptr_QTranslator = ret; - *outptr_QObject = static_cast(ret); +QTranslator* QTranslator_new2(QObject* parent) { + return new MiqtVirtualQTranslator(parent); +} + +void QTranslator_virtbase(QTranslator* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QTranslator_MetaObject(const QTranslator* self) { diff --git a/qt6/gen_qtranslator.go b/qt6/gen_qtranslator.go index 552e8ed8..d7f49768 100644 --- a/qt6/gen_qtranslator.go +++ b/qt6/gen_qtranslator.go @@ -35,42 +35,34 @@ func (this *QTranslator) UnsafePointer() unsafe.Pointer { } // newQTranslator constructs the type using only CGO pointers. -func newQTranslator(h *C.QTranslator, h_QObject *C.QObject) *QTranslator { +func newQTranslator(h *C.QTranslator) *QTranslator { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QTranslator_virtbase(h, &outptr_QObject) + return &QTranslator{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQTranslator constructs the type using only unsafe pointers. -func UnsafeNewQTranslator(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTranslator { - if h == nil { - return nil - } - - return &QTranslator{h: (*C.QTranslator)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQTranslator(h unsafe.Pointer) *QTranslator { + return newQTranslator((*C.QTranslator)(h)) } // NewQTranslator constructs a new QTranslator object. func NewQTranslator() *QTranslator { - var outptr_QTranslator *C.QTranslator = nil - var outptr_QObject *C.QObject = nil - C.QTranslator_new(&outptr_QTranslator, &outptr_QObject) - ret := newQTranslator(outptr_QTranslator, outptr_QObject) + ret := newQTranslator(C.QTranslator_new()) ret.isSubclass = true return ret } // NewQTranslator2 constructs a new QTranslator object. func NewQTranslator2(parent *QObject) *QTranslator { - var outptr_QTranslator *C.QTranslator = nil - var outptr_QObject *C.QObject = nil - C.QTranslator_new2(parent.cPointer(), &outptr_QTranslator, &outptr_QObject) - ret := newQTranslator(outptr_QTranslator, outptr_QObject) + ret := newQTranslator(C.QTranslator_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -423,7 +415,7 @@ func miqt_exec_callback_QTranslator_TimerEvent(self *C.QTranslator, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTranslator{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -449,7 +441,7 @@ func miqt_exec_callback_QTranslator_ChildEvent(self *C.QTranslator, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QTranslator{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qtranslator.h b/qt6/gen_qtranslator.h index a7ed5fb0..22a66d2b 100644 --- a/qt6/gen_qtranslator.h +++ b/qt6/gen_qtranslator.h @@ -34,8 +34,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QTranslator QTranslator; #endif -void QTranslator_new(QTranslator** outptr_QTranslator, QObject** outptr_QObject); -void QTranslator_new2(QObject* parent, QTranslator** outptr_QTranslator, QObject** outptr_QObject); +QTranslator* QTranslator_new(); +QTranslator* QTranslator_new2(QObject* parent); +void QTranslator_virtbase(QTranslator* src, QObject** outptr_QObject); QMetaObject* QTranslator_MetaObject(const QTranslator* self); void* QTranslator_Metacast(QTranslator* self, const char* param1); struct miqt_string QTranslator_Tr(const char* s); diff --git a/qt6/gen_qtransposeproxymodel.cpp b/qt6/gen_qtransposeproxymodel.cpp index c188d510..34506baa 100644 --- a/qt6/gen_qtransposeproxymodel.cpp +++ b/qt6/gen_qtransposeproxymodel.cpp @@ -1138,20 +1138,16 @@ public: }; -void QTransposeProxyModel_new(QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQTransposeProxyModel* ret = new MiqtVirtualQTransposeProxyModel(); - *outptr_QTransposeProxyModel = ret; - *outptr_QAbstractProxyModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTransposeProxyModel* QTransposeProxyModel_new() { + return new MiqtVirtualQTransposeProxyModel(); } -void QTransposeProxyModel_new2(QObject* parent, QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject) { - MiqtVirtualQTransposeProxyModel* ret = new MiqtVirtualQTransposeProxyModel(parent); - *outptr_QTransposeProxyModel = ret; - *outptr_QAbstractProxyModel = static_cast(ret); - *outptr_QAbstractItemModel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QTransposeProxyModel* QTransposeProxyModel_new2(QObject* parent) { + return new MiqtVirtualQTransposeProxyModel(parent); +} + +void QTransposeProxyModel_virtbase(QTransposeProxyModel* src, QAbstractProxyModel** outptr_QAbstractProxyModel) { + *outptr_QAbstractProxyModel = static_cast(src); } QMetaObject* QTransposeProxyModel_MetaObject(const QTransposeProxyModel* self) { diff --git a/qt6/gen_qtransposeproxymodel.go b/qt6/gen_qtransposeproxymodel.go index 4808b963..ab8e6fcf 100644 --- a/qt6/gen_qtransposeproxymodel.go +++ b/qt6/gen_qtransposeproxymodel.go @@ -35,46 +35,34 @@ func (this *QTransposeProxyModel) UnsafePointer() unsafe.Pointer { } // newQTransposeProxyModel constructs the type using only CGO pointers. -func newQTransposeProxyModel(h *C.QTransposeProxyModel, h_QAbstractProxyModel *C.QAbstractProxyModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QTransposeProxyModel { +func newQTransposeProxyModel(h *C.QTransposeProxyModel) *QTransposeProxyModel { if h == nil { return nil } + var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil + C.QTransposeProxyModel_virtbase(h, &outptr_QAbstractProxyModel) + return &QTransposeProxyModel{h: h, - QAbstractProxyModel: newQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} + QAbstractProxyModel: newQAbstractProxyModel(outptr_QAbstractProxyModel)} } // UnsafeNewQTransposeProxyModel constructs the type using only unsafe pointers. -func UnsafeNewQTransposeProxyModel(h unsafe.Pointer, h_QAbstractProxyModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QTransposeProxyModel { - if h == nil { - return nil - } - - return &QTransposeProxyModel{h: (*C.QTransposeProxyModel)(h), - QAbstractProxyModel: UnsafeNewQAbstractProxyModel(h_QAbstractProxyModel, h_QAbstractItemModel, h_QObject)} +func UnsafeNewQTransposeProxyModel(h unsafe.Pointer) *QTransposeProxyModel { + return newQTransposeProxyModel((*C.QTransposeProxyModel)(h)) } // NewQTransposeProxyModel constructs a new QTransposeProxyModel object. func NewQTransposeProxyModel() *QTransposeProxyModel { - var outptr_QTransposeProxyModel *C.QTransposeProxyModel = nil - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QTransposeProxyModel_new(&outptr_QTransposeProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQTransposeProxyModel(outptr_QTransposeProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQTransposeProxyModel(C.QTransposeProxyModel_new()) ret.isSubclass = true return ret } // NewQTransposeProxyModel2 constructs a new QTransposeProxyModel object. func NewQTransposeProxyModel2(parent *QObject) *QTransposeProxyModel { - var outptr_QTransposeProxyModel *C.QTransposeProxyModel = nil - var outptr_QAbstractProxyModel *C.QAbstractProxyModel = nil - var outptr_QAbstractItemModel *C.QAbstractItemModel = nil - var outptr_QObject *C.QObject = nil - C.QTransposeProxyModel_new2(parent.cPointer(), &outptr_QTransposeProxyModel, &outptr_QAbstractProxyModel, &outptr_QAbstractItemModel, &outptr_QObject) - ret := newQTransposeProxyModel(outptr_QTransposeProxyModel, outptr_QAbstractProxyModel, outptr_QAbstractItemModel, outptr_QObject) + ret := newQTransposeProxyModel(C.QTransposeProxyModel_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -256,7 +244,7 @@ func miqt_exec_callback_QTransposeProxyModel_SetSourceModel(self *C.QTransposePr } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(newSourceModel, nil) + slotval1 := newQAbstractItemModel(newSourceModel) gofunc((&QTransposeProxyModel{h: self}).callVirtualBase_SetSourceModel, slotval1) @@ -1264,7 +1252,7 @@ func (this *QTransposeProxyModel) callVirtualBase_MimeData(indexes []QModelIndex } indexes_ma := C.struct_miqt_array{len: C.size_t(len(indexes)), data: unsafe.Pointer(indexes_CArray)} - return newQMimeData(C.QTransposeProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma), nil) + return newQMimeData(C.QTransposeProxyModel_virtualbase_MimeData(unsafe.Pointer(this.h), indexes_ma)) } func (this *QTransposeProxyModel) OnMimeData(slot func(super func(indexes []QModelIndex) *QMimeData, indexes []QModelIndex) *QMimeData) { @@ -1318,7 +1306,7 @@ func miqt_exec_callback_QTransposeProxyModel_CanDropMimeData(self *C.QTransposeP } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) @@ -1354,7 +1342,7 @@ func miqt_exec_callback_QTransposeProxyModel_DropMimeData(self *C.QTransposeProx } // Convert all CABI parameters to Go parameters - slotval1 := newQMimeData(data, nil) + slotval1 := newQMimeData(data) slotval2 := (DropAction)(action) diff --git a/qt6/gen_qtransposeproxymodel.h b/qt6/gen_qtransposeproxymodel.h index 83b84ce6..0322b50f 100644 --- a/qt6/gen_qtransposeproxymodel.h +++ b/qt6/gen_qtransposeproxymodel.h @@ -38,8 +38,9 @@ typedef struct QTransposeProxyModel QTransposeProxyModel; typedef struct QVariant QVariant; #endif -void QTransposeProxyModel_new(QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); -void QTransposeProxyModel_new2(QObject* parent, QTransposeProxyModel** outptr_QTransposeProxyModel, QAbstractProxyModel** outptr_QAbstractProxyModel, QAbstractItemModel** outptr_QAbstractItemModel, QObject** outptr_QObject); +QTransposeProxyModel* QTransposeProxyModel_new(); +QTransposeProxyModel* QTransposeProxyModel_new2(QObject* parent); +void QTransposeProxyModel_virtbase(QTransposeProxyModel* src, QAbstractProxyModel** outptr_QAbstractProxyModel); QMetaObject* QTransposeProxyModel_MetaObject(const QTransposeProxyModel* self); void* QTransposeProxyModel_Metacast(QTransposeProxyModel* self, const char* param1); struct miqt_string QTransposeProxyModel_Tr(const char* s); diff --git a/qt6/gen_qtreeview.cpp b/qt6/gen_qtreeview.cpp index d36e0289..63c20774 100644 --- a/qt6/gen_qtreeview.cpp +++ b/qt6/gen_qtreeview.cpp @@ -1668,26 +1668,16 @@ public: }; -void QTreeView_new(QWidget* parent, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTreeView* ret = new MiqtVirtualQTreeView(parent); - *outptr_QTreeView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTreeView* QTreeView_new(QWidget* parent) { + return new MiqtVirtualQTreeView(parent); } -void QTreeView_new2(QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTreeView* ret = new MiqtVirtualQTreeView(); - *outptr_QTreeView = ret; - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTreeView* QTreeView_new2() { + return new MiqtVirtualQTreeView(); +} + +void QTreeView_virtbase(QTreeView* src, QAbstractItemView** outptr_QAbstractItemView) { + *outptr_QAbstractItemView = static_cast(src); } QMetaObject* QTreeView_MetaObject(const QTreeView* self) { diff --git a/qt6/gen_qtreeview.go b/qt6/gen_qtreeview.go index d72f297d..e21a9697 100644 --- a/qt6/gen_qtreeview.go +++ b/qt6/gen_qtreeview.go @@ -35,52 +35,34 @@ func (this *QTreeView) UnsafePointer() unsafe.Pointer { } // newQTreeView constructs the type using only CGO pointers. -func newQTreeView(h *C.QTreeView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTreeView { +func newQTreeView(h *C.QTreeView) *QTreeView { if h == nil { return nil } + var outptr_QAbstractItemView *C.QAbstractItemView = nil + C.QTreeView_virtbase(h, &outptr_QAbstractItemView) + return &QTreeView{h: h, - QAbstractItemView: newQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractItemView: newQAbstractItemView(outptr_QAbstractItemView)} } // UnsafeNewQTreeView constructs the type using only unsafe pointers. -func UnsafeNewQTreeView(h unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTreeView { - if h == nil { - return nil - } - - return &QTreeView{h: (*C.QTreeView)(h), - QAbstractItemView: UnsafeNewQAbstractItemView(h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTreeView(h unsafe.Pointer) *QTreeView { + return newQTreeView((*C.QTreeView)(h)) } // NewQTreeView constructs a new QTreeView object. func NewQTreeView(parent *QWidget) *QTreeView { - var outptr_QTreeView *C.QTreeView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTreeView_new(parent.cPointer(), &outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTreeView(outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTreeView(C.QTreeView_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTreeView2 constructs a new QTreeView object. func NewQTreeView2() *QTreeView { - var outptr_QTreeView *C.QTreeView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTreeView_new2(&outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTreeView(outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTreeView(C.QTreeView_new2()) ret.isSubclass = true return ret } @@ -117,7 +99,7 @@ func (this *QTreeView) SetSelectionModel(selectionModel *QItemSelectionModel) { } func (this *QTreeView) Header() *QHeaderView { - return newQHeaderView(C.QTreeView_Header(this.h), nil, nil, nil, nil, nil, nil) + return newQHeaderView(C.QTreeView_Header(this.h)) } func (this *QTreeView) SetHeader(header *QHeaderView) { @@ -456,7 +438,7 @@ func miqt_exec_callback_QTreeView_SetModel(self *C.QTreeView, cb C.intptr_t, mod } // Convert all CABI parameters to Go parameters - slotval1 := newQAbstractItemModel(model, nil) + slotval1 := newQAbstractItemModel(model) gofunc((&QTreeView{h: self}).callVirtualBase_SetModel, slotval1) @@ -508,7 +490,7 @@ func miqt_exec_callback_QTreeView_SetSelectionModel(self *C.QTreeView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QTreeView{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -1085,7 +1067,7 @@ func miqt_exec_callback_QTreeView_TimerEvent(self *C.QTreeView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1111,7 +1093,7 @@ func miqt_exec_callback_QTreeView_PaintEvent(self *C.QTreeView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1139,7 +1121,7 @@ func miqt_exec_callback_QTreeView_DrawRow(self *C.QTreeView, cb C.intptr_t, pain // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(options, nil) + slotval2 := newQStyleOptionViewItem(options) slotval3 := newQModelIndex(index) @@ -1197,7 +1179,7 @@ func miqt_exec_callback_QTreeView_MousePressEvent(self *C.QTreeView, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1223,7 +1205,7 @@ func miqt_exec_callback_QTreeView_MouseReleaseEvent(self *C.QTreeView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1249,7 +1231,7 @@ func miqt_exec_callback_QTreeView_MouseDoubleClickEvent(self *C.QTreeView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1275,7 +1257,7 @@ func miqt_exec_callback_QTreeView_MouseMoveEvent(self *C.QTreeView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1301,7 +1283,7 @@ func miqt_exec_callback_QTreeView_KeyPressEvent(self *C.QTreeView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1327,7 +1309,7 @@ func miqt_exec_callback_QTreeView_DragMoveEvent(self *C.QTreeView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1579,7 +1561,7 @@ func miqt_exec_callback_QTreeView_SizeHintForRow(self *C.QTreeView, cb C.intptr_ func (this *QTreeView) callVirtualBase_ItemDelegateForIndex(index *QModelIndex) *QAbstractItemDelegate { - return newQAbstractItemDelegate(C.QTreeView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer()), nil) + return newQAbstractItemDelegate(C.QTreeView_virtualbase_ItemDelegateForIndex(unsafe.Pointer(this.h), index.cPointer())) } func (this *QTreeView) OnItemDelegateForIndex(slot func(super func(index *QModelIndex) *QAbstractItemDelegate, index *QModelIndex) *QAbstractItemDelegate) { @@ -1753,7 +1735,7 @@ func miqt_exec_callback_QTreeView_CloseEditor(self *C.QTreeView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) slotval2 := (QAbstractItemDelegate__EndEditHint)(hint) @@ -1781,7 +1763,7 @@ func miqt_exec_callback_QTreeView_CommitData(self *C.QTreeView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(editor, nil, nil) + slotval1 := newQWidget(editor) gofunc((&QTreeView{h: self}).callVirtualBase_CommitData, slotval1) @@ -1921,7 +1903,7 @@ func miqt_exec_callback_QTreeView_InitViewItemOption(self *C.QTreeView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) gofunc((&QTreeView{h: self}).callVirtualBase_InitViewItemOption, slotval1) @@ -2003,7 +1985,7 @@ func miqt_exec_callback_QTreeView_DragEnterEvent(self *C.QTreeView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -2029,7 +2011,7 @@ func miqt_exec_callback_QTreeView_DragLeaveEvent(self *C.QTreeView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -2055,7 +2037,7 @@ func miqt_exec_callback_QTreeView_DropEvent(self *C.QTreeView, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -2081,7 +2063,7 @@ func miqt_exec_callback_QTreeView_FocusInEvent(self *C.QTreeView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -2107,7 +2089,7 @@ func miqt_exec_callback_QTreeView_FocusOutEvent(self *C.QTreeView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -2133,7 +2115,7 @@ func miqt_exec_callback_QTreeView_ResizeEvent(self *C.QTreeView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -2159,7 +2141,7 @@ func miqt_exec_callback_QTreeView_InputMethodEvent(self *C.QTreeView, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(event, nil) + slotval1 := newQInputMethodEvent(event) gofunc((&QTreeView{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qtreeview.h b/qt6/gen_qtreeview.h index 98bfa7c9..f3942529 100644 --- a/qt6/gen_qtreeview.h +++ b/qt6/gen_qtreeview.h @@ -84,8 +84,9 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QTreeView_new(QWidget* parent, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTreeView_new2(QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTreeView* QTreeView_new(QWidget* parent); +QTreeView* QTreeView_new2(); +void QTreeView_virtbase(QTreeView* src, QAbstractItemView** outptr_QAbstractItemView); QMetaObject* QTreeView_MetaObject(const QTreeView* self); void* QTreeView_Metacast(QTreeView* self, const char* param1); struct miqt_string QTreeView_Tr(const char* s); diff --git a/qt6/gen_qtreewidget.cpp b/qt6/gen_qtreewidget.cpp index 45d7ff7a..e5c0e12f 100644 --- a/qt6/gen_qtreewidget.cpp +++ b/qt6/gen_qtreewidget.cpp @@ -214,12 +214,11 @@ public: }; -void QTreeWidgetItem_new(QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new() { + return new MiqtVirtualQTreeWidgetItem(); } -void QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem) { +QTreeWidgetItem* QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -227,16 +226,14 @@ void QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(strings_QList); - *outptr_QTreeWidgetItem = ret; + return new MiqtVirtualQTreeWidgetItem(strings_QList); } -void QTreeWidgetItem_new3(QTreeWidget* treeview, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new3(QTreeWidget* treeview) { + return new MiqtVirtualQTreeWidgetItem(treeview); } -void QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem) { +QTreeWidgetItem* QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -244,21 +241,18 @@ void QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, strings_QList); - *outptr_QTreeWidgetItem = ret; + return new MiqtVirtualQTreeWidgetItem(treeview, strings_QList); } -void QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, after); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after) { + return new MiqtVirtualQTreeWidgetItem(treeview, after); } -void QTreeWidgetItem_new6(QTreeWidgetItem* parent, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new6(QTreeWidgetItem* parent) { + return new MiqtVirtualQTreeWidgetItem(parent); } -void QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem) { +QTreeWidgetItem* QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -266,26 +260,22 @@ void QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struc QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, strings_QList); - *outptr_QTreeWidgetItem = ret; + return new MiqtVirtualQTreeWidgetItem(parent, strings_QList); } -void QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, after); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after) { + return new MiqtVirtualQTreeWidgetItem(parent, after); } -void QTreeWidgetItem_new9(QTreeWidgetItem* other, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(*other); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new9(QTreeWidgetItem* other) { + return new MiqtVirtualQTreeWidgetItem(*other); } -void QTreeWidgetItem_new10(int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new10(int typeVal) { + return new MiqtVirtualQTreeWidgetItem(static_cast(typeVal)); } -void QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { +QTreeWidgetItem* QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -293,16 +283,14 @@ void QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ string QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(strings_QList, static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; + return new MiqtVirtualQTreeWidgetItem(strings_QList, static_cast(typeVal)); } -void QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal) { + return new MiqtVirtualQTreeWidgetItem(treeview, static_cast(typeVal)); } -void QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { +QTreeWidgetItem* QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -310,21 +298,18 @@ void QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, strings_QList, static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; + return new MiqtVirtualQTreeWidgetItem(treeview, strings_QList, static_cast(typeVal)); } -void QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(treeview, after, static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal) { + return new MiqtVirtualQTreeWidgetItem(treeview, after, static_cast(typeVal)); } -void QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal) { + return new MiqtVirtualQTreeWidgetItem(parent, static_cast(typeVal)); } -void QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { +QTreeWidgetItem* QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal) { QStringList strings_QList; strings_QList.reserve(strings.len); struct miqt_string* strings_arr = static_cast(strings.data); @@ -332,13 +317,11 @@ void QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of stru QString strings_arr_i_QString = QString::fromUtf8(strings_arr[i].data, strings_arr[i].len); strings_QList.push_back(strings_arr_i_QString); } - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, strings_QList, static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; + return new MiqtVirtualQTreeWidgetItem(parent, strings_QList, static_cast(typeVal)); } -void QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem) { - MiqtVirtualQTreeWidgetItem* ret = new MiqtVirtualQTreeWidgetItem(parent, after, static_cast(typeVal)); - *outptr_QTreeWidgetItem = ret; +QTreeWidgetItem* QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal) { + return new MiqtVirtualQTreeWidgetItem(parent, after, static_cast(typeVal)); } QTreeWidgetItem* QTreeWidgetItem_Clone(const QTreeWidgetItem* self) { @@ -1896,28 +1879,16 @@ public: }; -void QTreeWidget_new(QWidget* parent, QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTreeWidget* ret = new MiqtVirtualQTreeWidget(parent); - *outptr_QTreeWidget = ret; - *outptr_QTreeView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTreeWidget* QTreeWidget_new(QWidget* parent) { + return new MiqtVirtualQTreeWidget(parent); } -void QTreeWidget_new2(QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQTreeWidget* ret = new MiqtVirtualQTreeWidget(); - *outptr_QTreeWidget = ret; - *outptr_QTreeView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QTreeWidget* QTreeWidget_new2() { + return new MiqtVirtualQTreeWidget(); +} + +void QTreeWidget_virtbase(QTreeWidget* src, QTreeView** outptr_QTreeView) { + *outptr_QTreeView = static_cast(src); } QMetaObject* QTreeWidget_MetaObject(const QTreeWidget* self) { diff --git a/qt6/gen_qtreewidget.go b/qt6/gen_qtreewidget.go index c5ecf466..8f5902d6 100644 --- a/qt6/gen_qtreewidget.go +++ b/qt6/gen_qtreewidget.go @@ -53,24 +53,19 @@ func newQTreeWidgetItem(h *C.QTreeWidgetItem) *QTreeWidgetItem { if h == nil { return nil } + return &QTreeWidgetItem{h: h} } // UnsafeNewQTreeWidgetItem constructs the type using only unsafe pointers. func UnsafeNewQTreeWidgetItem(h unsafe.Pointer) *QTreeWidgetItem { - if h == nil { - return nil - } - - return &QTreeWidgetItem{h: (*C.QTreeWidgetItem)(h)} + return newQTreeWidgetItem((*C.QTreeWidgetItem)(h)) } // NewQTreeWidgetItem constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem() *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new(&outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new()) ret.isSubclass = true return ret } @@ -87,20 +82,16 @@ func NewQTreeWidgetItem2(strings []string) *QTreeWidgetItem { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new2(strings_ma, &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new2(strings_ma)) ret.isSubclass = true return ret } // NewQTreeWidgetItem3 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem3(treeview *QTreeWidget) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new3(treeview.cPointer(), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new3(treeview.cPointer())) ret.isSubclass = true return ret } @@ -117,30 +108,24 @@ func NewQTreeWidgetItem4(treeview *QTreeWidget, strings []string) *QTreeWidgetIt strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new4(treeview.cPointer(), strings_ma, &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new4(treeview.cPointer(), strings_ma)) ret.isSubclass = true return ret } // NewQTreeWidgetItem5 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem5(treeview *QTreeWidget, after *QTreeWidgetItem) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new5(treeview.cPointer(), after.cPointer(), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new5(treeview.cPointer(), after.cPointer())) ret.isSubclass = true return ret } // NewQTreeWidgetItem6 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem6(parent *QTreeWidgetItem) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new6(parent.cPointer(), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new6(parent.cPointer())) ret.isSubclass = true return ret } @@ -157,40 +142,32 @@ func NewQTreeWidgetItem7(parent *QTreeWidgetItem, strings []string) *QTreeWidget strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new7(parent.cPointer(), strings_ma, &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new7(parent.cPointer(), strings_ma)) ret.isSubclass = true return ret } // NewQTreeWidgetItem8 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem8(parent *QTreeWidgetItem, after *QTreeWidgetItem) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new8(parent.cPointer(), after.cPointer(), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new8(parent.cPointer(), after.cPointer())) ret.isSubclass = true return ret } // NewQTreeWidgetItem9 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem9(other *QTreeWidgetItem) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new9(other.cPointer(), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new9(other.cPointer())) ret.isSubclass = true return ret } // NewQTreeWidgetItem10 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem10(typeVal int) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new10((C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new10((C.int)(typeVal))) ret.isSubclass = true return ret } @@ -207,20 +184,16 @@ func NewQTreeWidgetItem11(strings []string, typeVal int) *QTreeWidgetItem { strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new11(strings_ma, (C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new11(strings_ma, (C.int)(typeVal))) ret.isSubclass = true return ret } // NewQTreeWidgetItem12 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem12(treeview *QTreeWidget, typeVal int) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new12(treeview.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new12(treeview.cPointer(), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -237,30 +210,24 @@ func NewQTreeWidgetItem13(treeview *QTreeWidget, strings []string, typeVal int) strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new13(treeview.cPointer(), strings_ma, (C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new13(treeview.cPointer(), strings_ma, (C.int)(typeVal))) ret.isSubclass = true return ret } // NewQTreeWidgetItem14 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem14(treeview *QTreeWidget, after *QTreeWidgetItem, typeVal int) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new14(treeview.cPointer(), after.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new14(treeview.cPointer(), after.cPointer(), (C.int)(typeVal))) ret.isSubclass = true return ret } // NewQTreeWidgetItem15 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem15(parent *QTreeWidgetItem, typeVal int) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new15(parent.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new15(parent.cPointer(), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -277,20 +244,16 @@ func NewQTreeWidgetItem16(parent *QTreeWidgetItem, strings []string, typeVal int strings_CArray[i] = strings_i_ms } strings_ma := C.struct_miqt_array{len: C.size_t(len(strings)), data: unsafe.Pointer(strings_CArray)} - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new16(parent.cPointer(), strings_ma, (C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new16(parent.cPointer(), strings_ma, (C.int)(typeVal))) ret.isSubclass = true return ret } // NewQTreeWidgetItem17 constructs a new QTreeWidgetItem object. func NewQTreeWidgetItem17(parent *QTreeWidgetItem, after *QTreeWidgetItem, typeVal int) *QTreeWidgetItem { - var outptr_QTreeWidgetItem *C.QTreeWidgetItem = nil - C.QTreeWidgetItem_new17(parent.cPointer(), after.cPointer(), (C.int)(typeVal), &outptr_QTreeWidgetItem) - ret := newQTreeWidgetItem(outptr_QTreeWidgetItem) + ret := newQTreeWidgetItem(C.QTreeWidgetItem_new17(parent.cPointer(), after.cPointer(), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -300,7 +263,7 @@ func (this *QTreeWidgetItem) Clone() *QTreeWidgetItem { } func (this *QTreeWidgetItem) TreeWidget() *QTreeWidget { - return newQTreeWidget(C.QTreeWidgetItem_TreeWidget(this.h), nil, nil, nil, nil, nil, nil, nil) + return newQTreeWidget(C.QTreeWidgetItem_TreeWidget(this.h)) } func (this *QTreeWidgetItem) SetSelected(selectVal bool) { @@ -728,7 +691,7 @@ func miqt_exec_callback_QTreeWidgetItem_Read(self *C.QTreeWidgetItem, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQDataStream(in, nil) + slotval1 := newQDataStream(in) gofunc((&QTreeWidgetItem{h: self}).callVirtualBase_Read, slotval1) @@ -754,7 +717,7 @@ func miqt_exec_callback_QTreeWidgetItem_Write(self *C.QTreeWidgetItem, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDataStream(out, nil) + slotval1 := newQDataStream(out) gofunc((&QTreeWidgetItem{h: self}).callVirtualBase_Write, slotval1) @@ -795,54 +758,34 @@ func (this *QTreeWidget) UnsafePointer() unsafe.Pointer { } // newQTreeWidget constructs the type using only CGO pointers. -func newQTreeWidget(h *C.QTreeWidget, h_QTreeView *C.QTreeView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QTreeWidget { +func newQTreeWidget(h *C.QTreeWidget) *QTreeWidget { if h == nil { return nil } + var outptr_QTreeView *C.QTreeView = nil + C.QTreeWidget_virtbase(h, &outptr_QTreeView) + return &QTreeWidget{h: h, - QTreeView: newQTreeView(h_QTreeView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QTreeView: newQTreeView(outptr_QTreeView)} } // UnsafeNewQTreeWidget constructs the type using only unsafe pointers. -func UnsafeNewQTreeWidget(h unsafe.Pointer, h_QTreeView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QTreeWidget { - if h == nil { - return nil - } - - return &QTreeWidget{h: (*C.QTreeWidget)(h), - QTreeView: UnsafeNewQTreeView(h_QTreeView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQTreeWidget(h unsafe.Pointer) *QTreeWidget { + return newQTreeWidget((*C.QTreeWidget)(h)) } // NewQTreeWidget constructs a new QTreeWidget object. func NewQTreeWidget(parent *QWidget) *QTreeWidget { - var outptr_QTreeWidget *C.QTreeWidget = nil - var outptr_QTreeView *C.QTreeView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTreeWidget_new(parent.cPointer(), &outptr_QTreeWidget, &outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTreeWidget(outptr_QTreeWidget, outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTreeWidget(C.QTreeWidget_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQTreeWidget2 constructs a new QTreeWidget object. func NewQTreeWidget2() *QTreeWidget { - var outptr_QTreeWidget *C.QTreeWidget = nil - var outptr_QTreeView *C.QTreeView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QTreeWidget_new2(&outptr_QTreeWidget, &outptr_QTreeView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQTreeWidget(outptr_QTreeWidget, outptr_QTreeView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQTreeWidget(C.QTreeWidget_new2()) ret.isSubclass = true return ret } @@ -1011,7 +954,7 @@ func (this *QTreeWidget) IsPersistentEditorOpen(item *QTreeWidgetItem) bool { } func (this *QTreeWidget) ItemWidget(item *QTreeWidgetItem, column int) *QWidget { - return newQWidget(C.QTreeWidget_ItemWidget(this.h, item.cPointer(), (C.int)(column)), nil, nil) + return newQWidget(C.QTreeWidget_ItemWidget(this.h, item.cPointer(), (C.int)(column))) } func (this *QTreeWidget) SetItemWidget(item *QTreeWidgetItem, column int, widget *QWidget) { @@ -1377,7 +1320,7 @@ func miqt_exec_callback_QTreeWidget_SetSelectionModel(self *C.QTreeWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQItemSelectionModel(selectionModel, nil) + slotval1 := newQItemSelectionModel(selectionModel) gofunc((&QTreeWidget{h: self}).callVirtualBase_SetSelectionModel, slotval1) @@ -1463,7 +1406,7 @@ func (this *QTreeWidget) callVirtualBase_MimeData(items []*QTreeWidgetItem) *QMi } items_ma := C.struct_miqt_array{len: C.size_t(len(items)), data: unsafe.Pointer(items_CArray)} - return newQMimeData(C.QTreeWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma), nil) + return newQMimeData(C.QTreeWidget_virtualbase_MimeData(unsafe.Pointer(this.h), items_ma)) } func (this *QTreeWidget) OnMimeData(slot func(super func(items []*QTreeWidgetItem) *QMimeData, items []*QTreeWidgetItem) *QMimeData) { @@ -1519,7 +1462,7 @@ func miqt_exec_callback_QTreeWidget_DropMimeData(self *C.QTreeWidget, cb C.intpt slotval2 := (int)(index) - slotval3 := newQMimeData(data, nil) + slotval3 := newQMimeData(data) slotval4 := (DropAction)(action) @@ -1574,7 +1517,7 @@ func miqt_exec_callback_QTreeWidget_DropEvent(self *C.QTreeWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -2177,7 +2120,7 @@ func miqt_exec_callback_QTreeWidget_TimerEvent(self *C.QTreeWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -2203,7 +2146,7 @@ func miqt_exec_callback_QTreeWidget_PaintEvent(self *C.QTreeWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -2231,7 +2174,7 @@ func miqt_exec_callback_QTreeWidget_DrawRow(self *C.QTreeWidget, cb C.intptr_t, // Convert all CABI parameters to Go parameters slotval1 := newQPainter(painter) - slotval2 := newQStyleOptionViewItem(options, nil) + slotval2 := newQStyleOptionViewItem(options) slotval3 := newQModelIndex(index) @@ -2289,7 +2232,7 @@ func miqt_exec_callback_QTreeWidget_MousePressEvent(self *C.QTreeWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -2315,7 +2258,7 @@ func miqt_exec_callback_QTreeWidget_MouseReleaseEvent(self *C.QTreeWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -2341,7 +2284,7 @@ func miqt_exec_callback_QTreeWidget_MouseDoubleClickEvent(self *C.QTreeWidget, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -2367,7 +2310,7 @@ func miqt_exec_callback_QTreeWidget_MouseMoveEvent(self *C.QTreeWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -2393,7 +2336,7 @@ func miqt_exec_callback_QTreeWidget_KeyPressEvent(self *C.QTreeWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -2419,7 +2362,7 @@ func miqt_exec_callback_QTreeWidget_DragMoveEvent(self *C.QTreeWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QTreeWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) diff --git a/qt6/gen_qtreewidget.h b/qt6/gen_qtreewidget.h index d8a85d91..3e7d9225 100644 --- a/qt6/gen_qtreewidget.h +++ b/qt6/gen_qtreewidget.h @@ -82,23 +82,23 @@ typedef struct QVariant QVariant; typedef struct QWidget QWidget; #endif -void QTreeWidgetItem_new(QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new3(QTreeWidget* treeview, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new6(QTreeWidgetItem* parent, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new9(QTreeWidgetItem* other, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new10(int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); -void QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal, QTreeWidgetItem** outptr_QTreeWidgetItem); +QTreeWidgetItem* QTreeWidgetItem_new(); +QTreeWidgetItem* QTreeWidgetItem_new2(struct miqt_array /* of struct miqt_string */ strings); +QTreeWidgetItem* QTreeWidgetItem_new3(QTreeWidget* treeview); +QTreeWidgetItem* QTreeWidgetItem_new4(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings); +QTreeWidgetItem* QTreeWidgetItem_new5(QTreeWidget* treeview, QTreeWidgetItem* after); +QTreeWidgetItem* QTreeWidgetItem_new6(QTreeWidgetItem* parent); +QTreeWidgetItem* QTreeWidgetItem_new7(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings); +QTreeWidgetItem* QTreeWidgetItem_new8(QTreeWidgetItem* parent, QTreeWidgetItem* after); +QTreeWidgetItem* QTreeWidgetItem_new9(QTreeWidgetItem* other); +QTreeWidgetItem* QTreeWidgetItem_new10(int typeVal); +QTreeWidgetItem* QTreeWidgetItem_new11(struct miqt_array /* of struct miqt_string */ strings, int typeVal); +QTreeWidgetItem* QTreeWidgetItem_new12(QTreeWidget* treeview, int typeVal); +QTreeWidgetItem* QTreeWidgetItem_new13(QTreeWidget* treeview, struct miqt_array /* of struct miqt_string */ strings, int typeVal); +QTreeWidgetItem* QTreeWidgetItem_new14(QTreeWidget* treeview, QTreeWidgetItem* after, int typeVal); +QTreeWidgetItem* QTreeWidgetItem_new15(QTreeWidgetItem* parent, int typeVal); +QTreeWidgetItem* QTreeWidgetItem_new16(QTreeWidgetItem* parent, struct miqt_array /* of struct miqt_string */ strings, int typeVal); +QTreeWidgetItem* QTreeWidgetItem_new17(QTreeWidgetItem* parent, QTreeWidgetItem* after, int typeVal); QTreeWidgetItem* QTreeWidgetItem_Clone(const QTreeWidgetItem* self); QTreeWidget* QTreeWidgetItem_TreeWidget(const QTreeWidgetItem* self); void QTreeWidgetItem_SetSelected(QTreeWidgetItem* self, bool selectVal); @@ -173,8 +173,9 @@ void QTreeWidgetItem_override_virtual_Write(void* self, intptr_t slot); void QTreeWidgetItem_virtualbase_Write(const void* self, QDataStream* out); void QTreeWidgetItem_Delete(QTreeWidgetItem* self, bool isSubclass); -void QTreeWidget_new(QWidget* parent, QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QTreeWidget_new2(QTreeWidget** outptr_QTreeWidget, QTreeView** outptr_QTreeView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QTreeWidget* QTreeWidget_new(QWidget* parent); +QTreeWidget* QTreeWidget_new2(); +void QTreeWidget_virtbase(QTreeWidget* src, QTreeView** outptr_QTreeView); QMetaObject* QTreeWidget_MetaObject(const QTreeWidget* self); void* QTreeWidget_Metacast(QTreeWidget* self, const char* param1); struct miqt_string QTreeWidget_Tr(const char* s); diff --git a/qt6/gen_qtreewidgetitemiterator.cpp b/qt6/gen_qtreewidgetitemiterator.cpp index e0f1499c..a0262248 100644 --- a/qt6/gen_qtreewidgetitemiterator.cpp +++ b/qt6/gen_qtreewidgetitemiterator.cpp @@ -5,29 +5,24 @@ #include "gen_qtreewidgetitemiterator.h" #include "_cgo_export.h" -void QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { - QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(*it); - *outptr_QTreeWidgetItemIterator = ret; +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it) { + return new QTreeWidgetItemIterator(*it); } -void QTreeWidgetItemIterator_new2(QTreeWidget* widget, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { - QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(widget); - *outptr_QTreeWidgetItemIterator = ret; +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new2(QTreeWidget* widget) { + return new QTreeWidgetItemIterator(widget); } -void QTreeWidgetItemIterator_new3(QTreeWidgetItem* item, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { - QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(item); - *outptr_QTreeWidgetItemIterator = ret; +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new3(QTreeWidgetItem* item) { + return new QTreeWidgetItemIterator(item); } -void QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { - QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(widget, static_cast(flags)); - *outptr_QTreeWidgetItemIterator = ret; +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags) { + return new QTreeWidgetItemIterator(widget, static_cast(flags)); } -void QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator) { - QTreeWidgetItemIterator* ret = new QTreeWidgetItemIterator(item, static_cast(flags)); - *outptr_QTreeWidgetItemIterator = ret; +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags) { + return new QTreeWidgetItemIterator(item, static_cast(flags)); } void QTreeWidgetItemIterator_OperatorAssign(QTreeWidgetItemIterator* self, QTreeWidgetItemIterator* it) { diff --git a/qt6/gen_qtreewidgetitemiterator.go b/qt6/gen_qtreewidgetitemiterator.go index 3405f5ae..61859271 100644 --- a/qt6/gen_qtreewidgetitemiterator.go +++ b/qt6/gen_qtreewidgetitemiterator.go @@ -62,64 +62,51 @@ func newQTreeWidgetItemIterator(h *C.QTreeWidgetItemIterator) *QTreeWidgetItemIt if h == nil { return nil } + return &QTreeWidgetItemIterator{h: h} } // UnsafeNewQTreeWidgetItemIterator constructs the type using only unsafe pointers. func UnsafeNewQTreeWidgetItemIterator(h unsafe.Pointer) *QTreeWidgetItemIterator { - if h == nil { - return nil - } - - return &QTreeWidgetItemIterator{h: (*C.QTreeWidgetItemIterator)(h)} + return newQTreeWidgetItemIterator((*C.QTreeWidgetItemIterator)(h)) } // NewQTreeWidgetItemIterator constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator(it *QTreeWidgetItemIterator) *QTreeWidgetItemIterator { - var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil - C.QTreeWidgetItemIterator_new(it.cPointer(), &outptr_QTreeWidgetItemIterator) - ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(C.QTreeWidgetItemIterator_new(it.cPointer())) ret.isSubclass = true return ret } // NewQTreeWidgetItemIterator2 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator2(widget *QTreeWidget) *QTreeWidgetItemIterator { - var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil - C.QTreeWidgetItemIterator_new2(widget.cPointer(), &outptr_QTreeWidgetItemIterator) - ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(C.QTreeWidgetItemIterator_new2(widget.cPointer())) ret.isSubclass = true return ret } // NewQTreeWidgetItemIterator3 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator3(item *QTreeWidgetItem) *QTreeWidgetItemIterator { - var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil - C.QTreeWidgetItemIterator_new3(item.cPointer(), &outptr_QTreeWidgetItemIterator) - ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(C.QTreeWidgetItemIterator_new3(item.cPointer())) ret.isSubclass = true return ret } // NewQTreeWidgetItemIterator4 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator4(widget *QTreeWidget, flags QTreeWidgetItemIterator__IteratorFlag) *QTreeWidgetItemIterator { - var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil - C.QTreeWidgetItemIterator_new4(widget.cPointer(), (C.int)(flags), &outptr_QTreeWidgetItemIterator) - ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(C.QTreeWidgetItemIterator_new4(widget.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } // NewQTreeWidgetItemIterator5 constructs a new QTreeWidgetItemIterator object. func NewQTreeWidgetItemIterator5(item *QTreeWidgetItem, flags QTreeWidgetItemIterator__IteratorFlag) *QTreeWidgetItemIterator { - var outptr_QTreeWidgetItemIterator *C.QTreeWidgetItemIterator = nil - C.QTreeWidgetItemIterator_new5(item.cPointer(), (C.int)(flags), &outptr_QTreeWidgetItemIterator) - ret := newQTreeWidgetItemIterator(outptr_QTreeWidgetItemIterator) + ret := newQTreeWidgetItemIterator(C.QTreeWidgetItemIterator_new5(item.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qtreewidgetitemiterator.h b/qt6/gen_qtreewidgetitemiterator.h index 7eb33d94..acdd3ade 100644 --- a/qt6/gen_qtreewidgetitemiterator.h +++ b/qt6/gen_qtreewidgetitemiterator.h @@ -24,11 +24,11 @@ typedef struct QTreeWidgetItem QTreeWidgetItem; typedef struct QTreeWidgetItemIterator QTreeWidgetItemIterator; #endif -void QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); -void QTreeWidgetItemIterator_new2(QTreeWidget* widget, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); -void QTreeWidgetItemIterator_new3(QTreeWidgetItem* item, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); -void QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); -void QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags, QTreeWidgetItemIterator** outptr_QTreeWidgetItemIterator); +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new(QTreeWidgetItemIterator* it); +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new2(QTreeWidget* widget); +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new3(QTreeWidgetItem* item); +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new4(QTreeWidget* widget, int flags); +QTreeWidgetItemIterator* QTreeWidgetItemIterator_new5(QTreeWidgetItem* item, int flags); void QTreeWidgetItemIterator_OperatorAssign(QTreeWidgetItemIterator* self, QTreeWidgetItemIterator* it); QTreeWidgetItemIterator* QTreeWidgetItemIterator_OperatorPlusPlus(QTreeWidgetItemIterator* self); QTreeWidgetItemIterator* QTreeWidgetItemIterator_OperatorPlusPlusWithInt(QTreeWidgetItemIterator* self, int param1); diff --git a/qt6/gen_qundogroup.cpp b/qt6/gen_qundogroup.cpp index 3d31e5e0..31468ccf 100644 --- a/qt6/gen_qundogroup.cpp +++ b/qt6/gen_qundogroup.cpp @@ -196,16 +196,16 @@ public: }; -void QUndoGroup_new(QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject) { - MiqtVirtualQUndoGroup* ret = new MiqtVirtualQUndoGroup(); - *outptr_QUndoGroup = ret; - *outptr_QObject = static_cast(ret); +QUndoGroup* QUndoGroup_new() { + return new MiqtVirtualQUndoGroup(); } -void QUndoGroup_new2(QObject* parent, QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject) { - MiqtVirtualQUndoGroup* ret = new MiqtVirtualQUndoGroup(parent); - *outptr_QUndoGroup = ret; - *outptr_QObject = static_cast(ret); +QUndoGroup* QUndoGroup_new2(QObject* parent) { + return new MiqtVirtualQUndoGroup(parent); +} + +void QUndoGroup_virtbase(QUndoGroup* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QUndoGroup_MetaObject(const QUndoGroup* self) { diff --git a/qt6/gen_qundogroup.go b/qt6/gen_qundogroup.go index ffb3ed81..9d17fc72 100644 --- a/qt6/gen_qundogroup.go +++ b/qt6/gen_qundogroup.go @@ -35,42 +35,34 @@ func (this *QUndoGroup) UnsafePointer() unsafe.Pointer { } // newQUndoGroup constructs the type using only CGO pointers. -func newQUndoGroup(h *C.QUndoGroup, h_QObject *C.QObject) *QUndoGroup { +func newQUndoGroup(h *C.QUndoGroup) *QUndoGroup { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QUndoGroup_virtbase(h, &outptr_QObject) + return &QUndoGroup{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQUndoGroup constructs the type using only unsafe pointers. -func UnsafeNewQUndoGroup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QUndoGroup { - if h == nil { - return nil - } - - return &QUndoGroup{h: (*C.QUndoGroup)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQUndoGroup(h unsafe.Pointer) *QUndoGroup { + return newQUndoGroup((*C.QUndoGroup)(h)) } // NewQUndoGroup constructs a new QUndoGroup object. func NewQUndoGroup() *QUndoGroup { - var outptr_QUndoGroup *C.QUndoGroup = nil - var outptr_QObject *C.QObject = nil - C.QUndoGroup_new(&outptr_QUndoGroup, &outptr_QObject) - ret := newQUndoGroup(outptr_QUndoGroup, outptr_QObject) + ret := newQUndoGroup(C.QUndoGroup_new()) ret.isSubclass = true return ret } // NewQUndoGroup2 constructs a new QUndoGroup object. func NewQUndoGroup2(parent *QObject) *QUndoGroup { - var outptr_QUndoGroup *C.QUndoGroup = nil - var outptr_QObject *C.QObject = nil - C.QUndoGroup_new2(parent.cPointer(), &outptr_QUndoGroup, &outptr_QObject) - ret := newQUndoGroup(outptr_QUndoGroup, outptr_QObject) + ret := newQUndoGroup(C.QUndoGroup_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -107,21 +99,21 @@ func (this *QUndoGroup) Stacks() []*QUndoStack { _ret := make([]*QUndoStack, int(_ma.len)) _outCast := (*[0xffff]*C.QUndoStack)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQUndoStack(_outCast[i], nil) + _ret[i] = newQUndoStack(_outCast[i]) } return _ret } func (this *QUndoGroup) ActiveStack() *QUndoStack { - return newQUndoStack(C.QUndoGroup_ActiveStack(this.h), nil) + return newQUndoStack(C.QUndoGroup_ActiveStack(this.h)) } func (this *QUndoGroup) CreateUndoAction(parent *QObject) *QAction { - return newQAction(C.QUndoGroup_CreateUndoAction(this.h, parent.cPointer()), nil) + return newQAction(C.QUndoGroup_CreateUndoAction(this.h, parent.cPointer())) } func (this *QUndoGroup) CreateRedoAction(parent *QObject) *QAction { - return newQAction(C.QUndoGroup_CreateRedoAction(this.h, parent.cPointer()), nil) + return newQAction(C.QUndoGroup_CreateRedoAction(this.h, parent.cPointer())) } func (this *QUndoGroup) CanUndo() bool { @@ -177,7 +169,7 @@ func miqt_exec_callback_QUndoGroup_ActiveStackChanged(cb C.intptr_t, stack *C.QU } // Convert all CABI parameters to Go parameters - slotval1 := newQUndoStack(stack, nil) + slotval1 := newQUndoStack(stack) gofunc(slotval1) } @@ -343,7 +335,7 @@ func (this *QUndoGroup) CreateUndoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return newQAction(C.QUndoGroup_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms), nil) + return newQAction(C.QUndoGroup_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms)) } func (this *QUndoGroup) CreateRedoAction2(parent *QObject, prefix string) *QAction { @@ -351,7 +343,7 @@ func (this *QUndoGroup) CreateRedoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return newQAction(C.QUndoGroup_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms), nil) + return newQAction(C.QUndoGroup_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms)) } func (this *QUndoGroup) callVirtualBase_Event(event *QEvent) bool { @@ -432,7 +424,7 @@ func miqt_exec_callback_QUndoGroup_TimerEvent(self *C.QUndoGroup, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QUndoGroup{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -458,7 +450,7 @@ func miqt_exec_callback_QUndoGroup_ChildEvent(self *C.QUndoGroup, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QUndoGroup{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qundogroup.h b/qt6/gen_qundogroup.h index 9a54f650..46ee027e 100644 --- a/qt6/gen_qundogroup.h +++ b/qt6/gen_qundogroup.h @@ -36,8 +36,9 @@ typedef struct QUndoGroup QUndoGroup; typedef struct QUndoStack QUndoStack; #endif -void QUndoGroup_new(QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject); -void QUndoGroup_new2(QObject* parent, QUndoGroup** outptr_QUndoGroup, QObject** outptr_QObject); +QUndoGroup* QUndoGroup_new(); +QUndoGroup* QUndoGroup_new2(QObject* parent); +void QUndoGroup_virtbase(QUndoGroup* src, QObject** outptr_QObject); QMetaObject* QUndoGroup_MetaObject(const QUndoGroup* self); void* QUndoGroup_Metacast(QUndoGroup* self, const char* param1); struct miqt_string QUndoGroup_Tr(const char* s); diff --git a/qt6/gen_qundostack.cpp b/qt6/gen_qundostack.cpp index d3a1018b..b5c99c2f 100644 --- a/qt6/gen_qundostack.cpp +++ b/qt6/gen_qundostack.cpp @@ -117,26 +117,22 @@ public: }; -void QUndoCommand_new(QUndoCommand** outptr_QUndoCommand) { - MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(); - *outptr_QUndoCommand = ret; +QUndoCommand* QUndoCommand_new() { + return new MiqtVirtualQUndoCommand(); } -void QUndoCommand_new2(struct miqt_string text, QUndoCommand** outptr_QUndoCommand) { +QUndoCommand* QUndoCommand_new2(struct miqt_string text) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(text_QString); - *outptr_QUndoCommand = ret; + return new MiqtVirtualQUndoCommand(text_QString); } -void QUndoCommand_new3(QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand) { - MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(parent); - *outptr_QUndoCommand = ret; +QUndoCommand* QUndoCommand_new3(QUndoCommand* parent) { + return new MiqtVirtualQUndoCommand(parent); } -void QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand) { +QUndoCommand* QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent) { QString text_QString = QString::fromUtf8(text.data, text.len); - MiqtVirtualQUndoCommand* ret = new MiqtVirtualQUndoCommand(text_QString, parent); - *outptr_QUndoCommand = ret; + return new MiqtVirtualQUndoCommand(text_QString, parent); } void QUndoCommand_Undo(QUndoCommand* self) { @@ -419,16 +415,16 @@ public: }; -void QUndoStack_new(QUndoStack** outptr_QUndoStack, QObject** outptr_QObject) { - MiqtVirtualQUndoStack* ret = new MiqtVirtualQUndoStack(); - *outptr_QUndoStack = ret; - *outptr_QObject = static_cast(ret); +QUndoStack* QUndoStack_new() { + return new MiqtVirtualQUndoStack(); } -void QUndoStack_new2(QObject* parent, QUndoStack** outptr_QUndoStack, QObject** outptr_QObject) { - MiqtVirtualQUndoStack* ret = new MiqtVirtualQUndoStack(parent); - *outptr_QUndoStack = ret; - *outptr_QObject = static_cast(ret); +QUndoStack* QUndoStack_new2(QObject* parent) { + return new MiqtVirtualQUndoStack(parent); +} + +void QUndoStack_virtbase(QUndoStack* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QUndoStack_MetaObject(const QUndoStack* self) { diff --git a/qt6/gen_qundostack.go b/qt6/gen_qundostack.go index bde6a168..e7aaf9d0 100644 --- a/qt6/gen_qundostack.go +++ b/qt6/gen_qundostack.go @@ -38,24 +38,19 @@ func newQUndoCommand(h *C.QUndoCommand) *QUndoCommand { if h == nil { return nil } + return &QUndoCommand{h: h} } // UnsafeNewQUndoCommand constructs the type using only unsafe pointers. func UnsafeNewQUndoCommand(h unsafe.Pointer) *QUndoCommand { - if h == nil { - return nil - } - - return &QUndoCommand{h: (*C.QUndoCommand)(h)} + return newQUndoCommand((*C.QUndoCommand)(h)) } // NewQUndoCommand constructs a new QUndoCommand object. func NewQUndoCommand() *QUndoCommand { - var outptr_QUndoCommand *C.QUndoCommand = nil - C.QUndoCommand_new(&outptr_QUndoCommand) - ret := newQUndoCommand(outptr_QUndoCommand) + ret := newQUndoCommand(C.QUndoCommand_new()) ret.isSubclass = true return ret } @@ -66,20 +61,16 @@ func NewQUndoCommand2(text string) *QUndoCommand { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QUndoCommand *C.QUndoCommand = nil - C.QUndoCommand_new2(text_ms, &outptr_QUndoCommand) - ret := newQUndoCommand(outptr_QUndoCommand) + ret := newQUndoCommand(C.QUndoCommand_new2(text_ms)) ret.isSubclass = true return ret } // NewQUndoCommand3 constructs a new QUndoCommand object. func NewQUndoCommand3(parent *QUndoCommand) *QUndoCommand { - var outptr_QUndoCommand *C.QUndoCommand = nil - C.QUndoCommand_new3(parent.cPointer(), &outptr_QUndoCommand) - ret := newQUndoCommand(outptr_QUndoCommand) + ret := newQUndoCommand(C.QUndoCommand_new3(parent.cPointer())) ret.isSubclass = true return ret } @@ -90,10 +81,8 @@ func NewQUndoCommand4(text string, parent *QUndoCommand) *QUndoCommand { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - var outptr_QUndoCommand *C.QUndoCommand = nil - C.QUndoCommand_new4(text_ms, parent.cPointer(), &outptr_QUndoCommand) - ret := newQUndoCommand(outptr_QUndoCommand) + ret := newQUndoCommand(C.QUndoCommand_new4(text_ms, parent.cPointer())) ret.isSubclass = true return ret } @@ -286,42 +275,34 @@ func (this *QUndoStack) UnsafePointer() unsafe.Pointer { } // newQUndoStack constructs the type using only CGO pointers. -func newQUndoStack(h *C.QUndoStack, h_QObject *C.QObject) *QUndoStack { +func newQUndoStack(h *C.QUndoStack) *QUndoStack { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QUndoStack_virtbase(h, &outptr_QObject) + return &QUndoStack{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQUndoStack constructs the type using only unsafe pointers. -func UnsafeNewQUndoStack(h unsafe.Pointer, h_QObject unsafe.Pointer) *QUndoStack { - if h == nil { - return nil - } - - return &QUndoStack{h: (*C.QUndoStack)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQUndoStack(h unsafe.Pointer) *QUndoStack { + return newQUndoStack((*C.QUndoStack)(h)) } // NewQUndoStack constructs a new QUndoStack object. func NewQUndoStack() *QUndoStack { - var outptr_QUndoStack *C.QUndoStack = nil - var outptr_QObject *C.QObject = nil - C.QUndoStack_new(&outptr_QUndoStack, &outptr_QObject) - ret := newQUndoStack(outptr_QUndoStack, outptr_QObject) + ret := newQUndoStack(C.QUndoStack_new()) ret.isSubclass = true return ret } // NewQUndoStack2 constructs a new QUndoStack object. func NewQUndoStack2(parent *QObject) *QUndoStack { - var outptr_QUndoStack *C.QUndoStack = nil - var outptr_QObject *C.QObject = nil - C.QUndoStack_new2(parent.cPointer(), &outptr_QUndoStack, &outptr_QObject) - ret := newQUndoStack(outptr_QUndoStack, outptr_QObject) + ret := newQUndoStack(C.QUndoStack_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -391,11 +372,11 @@ func (this *QUndoStack) Text(idx int) string { } func (this *QUndoStack) CreateUndoAction(parent *QObject) *QAction { - return newQAction(C.QUndoStack_CreateUndoAction(this.h, parent.cPointer()), nil) + return newQAction(C.QUndoStack_CreateUndoAction(this.h, parent.cPointer())) } func (this *QUndoStack) CreateRedoAction(parent *QObject) *QAction { - return newQAction(C.QUndoStack_CreateRedoAction(this.h, parent.cPointer()), nil) + return newQAction(C.QUndoStack_CreateRedoAction(this.h, parent.cPointer())) } func (this *QUndoStack) IsActive() bool { @@ -619,7 +600,7 @@ func (this *QUndoStack) CreateUndoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return newQAction(C.QUndoStack_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms), nil) + return newQAction(C.QUndoStack_CreateUndoAction2(this.h, parent.cPointer(), prefix_ms)) } func (this *QUndoStack) CreateRedoAction2(parent *QObject, prefix string) *QAction { @@ -627,7 +608,7 @@ func (this *QUndoStack) CreateRedoAction2(parent *QObject, prefix string) *QActi prefix_ms.data = C.CString(prefix) prefix_ms.len = C.size_t(len(prefix)) defer C.free(unsafe.Pointer(prefix_ms.data)) - return newQAction(C.QUndoStack_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms), nil) + return newQAction(C.QUndoStack_CreateRedoAction2(this.h, parent.cPointer(), prefix_ms)) } func (this *QUndoStack) SetActive1(active bool) { @@ -712,7 +693,7 @@ func miqt_exec_callback_QUndoStack_TimerEvent(self *C.QUndoStack, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QUndoStack{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -738,7 +719,7 @@ func miqt_exec_callback_QUndoStack_ChildEvent(self *C.QUndoStack, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QUndoStack{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qundostack.h b/qt6/gen_qundostack.h index 89626505..ba69db77 100644 --- a/qt6/gen_qundostack.h +++ b/qt6/gen_qundostack.h @@ -36,10 +36,10 @@ typedef struct QUndoCommand QUndoCommand; typedef struct QUndoStack QUndoStack; #endif -void QUndoCommand_new(QUndoCommand** outptr_QUndoCommand); -void QUndoCommand_new2(struct miqt_string text, QUndoCommand** outptr_QUndoCommand); -void QUndoCommand_new3(QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand); -void QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent, QUndoCommand** outptr_QUndoCommand); +QUndoCommand* QUndoCommand_new(); +QUndoCommand* QUndoCommand_new2(struct miqt_string text); +QUndoCommand* QUndoCommand_new3(QUndoCommand* parent); +QUndoCommand* QUndoCommand_new4(struct miqt_string text, QUndoCommand* parent); void QUndoCommand_Undo(QUndoCommand* self); void QUndoCommand_Redo(QUndoCommand* self); struct miqt_string QUndoCommand_Text(const QUndoCommand* self); @@ -61,8 +61,9 @@ void QUndoCommand_override_virtual_MergeWith(void* self, intptr_t slot); bool QUndoCommand_virtualbase_MergeWith(void* self, QUndoCommand* other); void QUndoCommand_Delete(QUndoCommand* self, bool isSubclass); -void QUndoStack_new(QUndoStack** outptr_QUndoStack, QObject** outptr_QObject); -void QUndoStack_new2(QObject* parent, QUndoStack** outptr_QUndoStack, QObject** outptr_QObject); +QUndoStack* QUndoStack_new(); +QUndoStack* QUndoStack_new2(QObject* parent); +void QUndoStack_virtbase(QUndoStack* src, QObject** outptr_QObject); QMetaObject* QUndoStack_MetaObject(const QUndoStack* self); void* QUndoStack_Metacast(QUndoStack* self, const char* param1); struct miqt_string QUndoStack_Tr(const char* s); diff --git a/qt6/gen_qundoview.cpp b/qt6/gen_qundoview.cpp index 59e10181..213dced5 100644 --- a/qt6/gen_qundoview.cpp +++ b/qt6/gen_qundoview.cpp @@ -900,76 +900,32 @@ public: }; -void QUndoView_new(QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(parent); - *outptr_QUndoView = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QUndoView* QUndoView_new(QWidget* parent) { + return new MiqtVirtualQUndoView(parent); } -void QUndoView_new2(QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(); - *outptr_QUndoView = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QUndoView* QUndoView_new2() { + return new MiqtVirtualQUndoView(); } -void QUndoView_new3(QUndoStack* stack, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(stack); - *outptr_QUndoView = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QUndoView* QUndoView_new3(QUndoStack* stack) { + return new MiqtVirtualQUndoView(stack); } -void QUndoView_new4(QUndoGroup* group, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(group); - *outptr_QUndoView = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QUndoView* QUndoView_new4(QUndoGroup* group) { + return new MiqtVirtualQUndoView(group); } -void QUndoView_new5(QUndoStack* stack, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(stack, parent); - *outptr_QUndoView = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QUndoView* QUndoView_new5(QUndoStack* stack, QWidget* parent) { + return new MiqtVirtualQUndoView(stack, parent); } -void QUndoView_new6(QUndoGroup* group, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQUndoView* ret = new MiqtVirtualQUndoView(group, parent); - *outptr_QUndoView = ret; - *outptr_QListView = static_cast(ret); - *outptr_QAbstractItemView = static_cast(ret); - *outptr_QAbstractScrollArea = static_cast(ret); - *outptr_QFrame = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QUndoView* QUndoView_new6(QUndoGroup* group, QWidget* parent) { + return new MiqtVirtualQUndoView(group, parent); +} + +void QUndoView_virtbase(QUndoView* src, QListView** outptr_QListView) { + *outptr_QListView = static_cast(src); } QMetaObject* QUndoView_MetaObject(const QUndoView* self) { diff --git a/qt6/gen_qundoview.go b/qt6/gen_qundoview.go index 37e6e666..54e9a882 100644 --- a/qt6/gen_qundoview.go +++ b/qt6/gen_qundoview.go @@ -35,122 +35,66 @@ func (this *QUndoView) UnsafePointer() unsafe.Pointer { } // newQUndoView constructs the type using only CGO pointers. -func newQUndoView(h *C.QUndoView, h_QListView *C.QListView, h_QAbstractItemView *C.QAbstractItemView, h_QAbstractScrollArea *C.QAbstractScrollArea, h_QFrame *C.QFrame, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QUndoView { +func newQUndoView(h *C.QUndoView) *QUndoView { if h == nil { return nil } + var outptr_QListView *C.QListView = nil + C.QUndoView_virtbase(h, &outptr_QListView) + return &QUndoView{h: h, - QListView: newQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} + QListView: newQListView(outptr_QListView)} } // UnsafeNewQUndoView constructs the type using only unsafe pointers. -func UnsafeNewQUndoView(h unsafe.Pointer, h_QListView unsafe.Pointer, h_QAbstractItemView unsafe.Pointer, h_QAbstractScrollArea unsafe.Pointer, h_QFrame unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QUndoView { - if h == nil { - return nil - } - - return &QUndoView{h: (*C.QUndoView)(h), - QListView: UnsafeNewQListView(h_QListView, h_QAbstractItemView, h_QAbstractScrollArea, h_QFrame, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQUndoView(h unsafe.Pointer) *QUndoView { + return newQUndoView((*C.QUndoView)(h)) } // NewQUndoView constructs a new QUndoView object. func NewQUndoView(parent *QWidget) *QUndoView { - var outptr_QUndoView *C.QUndoView = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QUndoView_new(parent.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQUndoView(C.QUndoView_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQUndoView2 constructs a new QUndoView object. func NewQUndoView2() *QUndoView { - var outptr_QUndoView *C.QUndoView = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QUndoView_new2(&outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQUndoView(C.QUndoView_new2()) ret.isSubclass = true return ret } // NewQUndoView3 constructs a new QUndoView object. func NewQUndoView3(stack *QUndoStack) *QUndoView { - var outptr_QUndoView *C.QUndoView = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QUndoView_new3(stack.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQUndoView(C.QUndoView_new3(stack.cPointer())) ret.isSubclass = true return ret } // NewQUndoView4 constructs a new QUndoView object. func NewQUndoView4(group *QUndoGroup) *QUndoView { - var outptr_QUndoView *C.QUndoView = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QUndoView_new4(group.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQUndoView(C.QUndoView_new4(group.cPointer())) ret.isSubclass = true return ret } // NewQUndoView5 constructs a new QUndoView object. func NewQUndoView5(stack *QUndoStack, parent *QWidget) *QUndoView { - var outptr_QUndoView *C.QUndoView = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QUndoView_new5(stack.cPointer(), parent.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQUndoView(C.QUndoView_new5(stack.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } // NewQUndoView6 constructs a new QUndoView object. func NewQUndoView6(group *QUndoGroup, parent *QWidget) *QUndoView { - var outptr_QUndoView *C.QUndoView = nil - var outptr_QListView *C.QListView = nil - var outptr_QAbstractItemView *C.QAbstractItemView = nil - var outptr_QAbstractScrollArea *C.QAbstractScrollArea = nil - var outptr_QFrame *C.QFrame = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QUndoView_new6(group.cPointer(), parent.cPointer(), &outptr_QUndoView, &outptr_QListView, &outptr_QAbstractItemView, &outptr_QAbstractScrollArea, &outptr_QFrame, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQUndoView(outptr_QUndoView, outptr_QListView, outptr_QAbstractItemView, outptr_QAbstractScrollArea, outptr_QFrame, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQUndoView(C.QUndoView_new6(group.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } @@ -175,11 +119,11 @@ func QUndoView_Tr(s string) string { } func (this *QUndoView) Stack() *QUndoStack { - return newQUndoStack(C.QUndoView_Stack(this.h), nil) + return newQUndoStack(C.QUndoView_Stack(this.h)) } func (this *QUndoView) Group() *QUndoGroup { - return newQUndoGroup(C.QUndoView_Group(this.h), nil) + return newQUndoGroup(C.QUndoView_Group(this.h)) } func (this *QUndoView) SetEmptyLabel(label string) { @@ -575,7 +519,7 @@ func miqt_exec_callback_QUndoView_MouseMoveEvent(self *C.QUndoView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -601,7 +545,7 @@ func miqt_exec_callback_QUndoView_MouseReleaseEvent(self *C.QUndoView, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(e, nil, nil, nil, nil) + slotval1 := newQMouseEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -627,7 +571,7 @@ func miqt_exec_callback_QUndoView_WheelEvent(self *C.QUndoView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(e, nil, nil, nil, nil) + slotval1 := newQWheelEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -653,7 +597,7 @@ func miqt_exec_callback_QUndoView_TimerEvent(self *C.QUndoView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(e, nil) + slotval1 := newQTimerEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -679,7 +623,7 @@ func miqt_exec_callback_QUndoView_ResizeEvent(self *C.QUndoView, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(e, nil) + slotval1 := newQResizeEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -705,7 +649,7 @@ func miqt_exec_callback_QUndoView_DragMoveEvent(self *C.QUndoView, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(e, nil, nil) + slotval1 := newQDragMoveEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -731,7 +675,7 @@ func miqt_exec_callback_QUndoView_DragLeaveEvent(self *C.QUndoView, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(e, nil) + slotval1 := newQDragLeaveEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -757,7 +701,7 @@ func miqt_exec_callback_QUndoView_DropEvent(self *C.QUndoView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(e, nil) + slotval1 := newQDropEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -809,7 +753,7 @@ func miqt_exec_callback_QUndoView_InitViewItemOption(self *C.QUndoView, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQStyleOptionViewItem(option, nil) + slotval1 := newQStyleOptionViewItem(option) gofunc((&QUndoView{h: self}).callVirtualBase_InitViewItemOption, slotval1) @@ -835,7 +779,7 @@ func miqt_exec_callback_QUndoView_PaintEvent(self *C.QUndoView, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(e, nil) + slotval1 := newQPaintEvent(e) gofunc((&QUndoView{h: self}).callVirtualBase_PaintEvent, slotval1) diff --git a/qt6/gen_qundoview.h b/qt6/gen_qundoview.h index 8759d5cd..22dfb66c 100644 --- a/qt6/gen_qundoview.h +++ b/qt6/gen_qundoview.h @@ -74,12 +74,13 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QUndoView_new(QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QUndoView_new2(QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QUndoView_new3(QUndoStack* stack, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QUndoView_new4(QUndoGroup* group, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QUndoView_new5(QUndoStack* stack, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QUndoView_new6(QUndoGroup* group, QWidget* parent, QUndoView** outptr_QUndoView, QListView** outptr_QListView, QAbstractItemView** outptr_QAbstractItemView, QAbstractScrollArea** outptr_QAbstractScrollArea, QFrame** outptr_QFrame, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QUndoView* QUndoView_new(QWidget* parent); +QUndoView* QUndoView_new2(); +QUndoView* QUndoView_new3(QUndoStack* stack); +QUndoView* QUndoView_new4(QUndoGroup* group); +QUndoView* QUndoView_new5(QUndoStack* stack, QWidget* parent); +QUndoView* QUndoView_new6(QUndoGroup* group, QWidget* parent); +void QUndoView_virtbase(QUndoView* src, QListView** outptr_QListView); QMetaObject* QUndoView_MetaObject(const QUndoView* self); void* QUndoView_Metacast(QUndoView* self, const char* param1); struct miqt_string QUndoView_Tr(const char* s); diff --git a/qt6/gen_qurl.cpp b/qt6/gen_qurl.cpp index 05153957..a77ef969 100644 --- a/qt6/gen_qurl.cpp +++ b/qt6/gen_qurl.cpp @@ -9,26 +9,22 @@ #include "gen_qurl.h" #include "_cgo_export.h" -void QUrl_new(QUrl** outptr_QUrl) { - QUrl* ret = new QUrl(); - *outptr_QUrl = ret; +QUrl* QUrl_new() { + return new QUrl(); } -void QUrl_new2(QUrl* copyVal, QUrl** outptr_QUrl) { - QUrl* ret = new QUrl(*copyVal); - *outptr_QUrl = ret; +QUrl* QUrl_new2(QUrl* copyVal) { + return new QUrl(*copyVal); } -void QUrl_new3(struct miqt_string url, QUrl** outptr_QUrl) { +QUrl* QUrl_new3(struct miqt_string url) { QString url_QString = QString::fromUtf8(url.data, url.len); - QUrl* ret = new QUrl(url_QString); - *outptr_QUrl = ret; + return new QUrl(url_QString); } -void QUrl_new4(struct miqt_string url, int mode, QUrl** outptr_QUrl) { +QUrl* QUrl_new4(struct miqt_string url, int mode) { QString url_QString = QString::fromUtf8(url.data, url.len); - QUrl* ret = new QUrl(url_QString, static_cast(mode)); - *outptr_QUrl = ret; + return new QUrl(url_QString, static_cast(mode)); } void QUrl_OperatorAssign(QUrl* self, QUrl* copyVal) { diff --git a/qt6/gen_qurl.go b/qt6/gen_qurl.go index a97a1b4e..dd5de292 100644 --- a/qt6/gen_qurl.go +++ b/qt6/gen_qurl.go @@ -90,34 +90,27 @@ func newQUrl(h *C.QUrl) *QUrl { if h == nil { return nil } + return &QUrl{h: h} } // UnsafeNewQUrl constructs the type using only unsafe pointers. func UnsafeNewQUrl(h unsafe.Pointer) *QUrl { - if h == nil { - return nil - } - - return &QUrl{h: (*C.QUrl)(h)} + return newQUrl((*C.QUrl)(h)) } // NewQUrl constructs a new QUrl object. func NewQUrl() *QUrl { - var outptr_QUrl *C.QUrl = nil - C.QUrl_new(&outptr_QUrl) - ret := newQUrl(outptr_QUrl) + ret := newQUrl(C.QUrl_new()) ret.isSubclass = true return ret } // NewQUrl2 constructs a new QUrl object. func NewQUrl2(copyVal *QUrl) *QUrl { - var outptr_QUrl *C.QUrl = nil - C.QUrl_new2(copyVal.cPointer(), &outptr_QUrl) - ret := newQUrl(outptr_QUrl) + ret := newQUrl(C.QUrl_new2(copyVal.cPointer())) ret.isSubclass = true return ret } @@ -128,10 +121,8 @@ func NewQUrl3(url string) *QUrl { url_ms.data = C.CString(url) url_ms.len = C.size_t(len(url)) defer C.free(unsafe.Pointer(url_ms.data)) - var outptr_QUrl *C.QUrl = nil - C.QUrl_new3(url_ms, &outptr_QUrl) - ret := newQUrl(outptr_QUrl) + ret := newQUrl(C.QUrl_new3(url_ms)) ret.isSubclass = true return ret } @@ -142,10 +133,8 @@ func NewQUrl4(url string, mode QUrl__ParsingMode) *QUrl { url_ms.data = C.CString(url) url_ms.len = C.size_t(len(url)) defer C.free(unsafe.Pointer(url_ms.data)) - var outptr_QUrl *C.QUrl = nil - C.QUrl_new4(url_ms, (C.int)(mode), &outptr_QUrl) - ret := newQUrl(outptr_QUrl) + ret := newQUrl(C.QUrl_new4(url_ms, (C.int)(mode))) ret.isSubclass = true return ret } diff --git a/qt6/gen_qurl.h b/qt6/gen_qurl.h index cda14117..b4df7425 100644 --- a/qt6/gen_qurl.h +++ b/qt6/gen_qurl.h @@ -22,10 +22,10 @@ typedef struct QUrl QUrl; typedef struct QUrlQuery QUrlQuery; #endif -void QUrl_new(QUrl** outptr_QUrl); -void QUrl_new2(QUrl* copyVal, QUrl** outptr_QUrl); -void QUrl_new3(struct miqt_string url, QUrl** outptr_QUrl); -void QUrl_new4(struct miqt_string url, int mode, QUrl** outptr_QUrl); +QUrl* QUrl_new(); +QUrl* QUrl_new2(QUrl* copyVal); +QUrl* QUrl_new3(struct miqt_string url); +QUrl* QUrl_new4(struct miqt_string url, int mode); void QUrl_OperatorAssign(QUrl* self, QUrl* copyVal); void QUrl_OperatorAssignWithUrl(QUrl* self, struct miqt_string url); void QUrl_Swap(QUrl* self, QUrl* other); diff --git a/qt6/gen_qurlquery.cpp b/qt6/gen_qurlquery.cpp index 9c55d81e..957ae014 100644 --- a/qt6/gen_qurlquery.cpp +++ b/qt6/gen_qurlquery.cpp @@ -10,25 +10,21 @@ #include "gen_qurlquery.h" #include "_cgo_export.h" -void QUrlQuery_new(QUrlQuery** outptr_QUrlQuery) { - QUrlQuery* ret = new QUrlQuery(); - *outptr_QUrlQuery = ret; +QUrlQuery* QUrlQuery_new() { + return new QUrlQuery(); } -void QUrlQuery_new2(QUrl* url, QUrlQuery** outptr_QUrlQuery) { - QUrlQuery* ret = new QUrlQuery(*url); - *outptr_QUrlQuery = ret; +QUrlQuery* QUrlQuery_new2(QUrl* url) { + return new QUrlQuery(*url); } -void QUrlQuery_new3(struct miqt_string queryString, QUrlQuery** outptr_QUrlQuery) { +QUrlQuery* QUrlQuery_new3(struct miqt_string queryString) { QString queryString_QString = QString::fromUtf8(queryString.data, queryString.len); - QUrlQuery* ret = new QUrlQuery(queryString_QString); - *outptr_QUrlQuery = ret; + return new QUrlQuery(queryString_QString); } -void QUrlQuery_new4(QUrlQuery* other, QUrlQuery** outptr_QUrlQuery) { - QUrlQuery* ret = new QUrlQuery(*other); - *outptr_QUrlQuery = ret; +QUrlQuery* QUrlQuery_new4(QUrlQuery* other) { + return new QUrlQuery(*other); } void QUrlQuery_OperatorAssign(QUrlQuery* self, QUrlQuery* other) { diff --git a/qt6/gen_qurlquery.go b/qt6/gen_qurlquery.go index f88d2cb8..916c7376 100644 --- a/qt6/gen_qurlquery.go +++ b/qt6/gen_qurlquery.go @@ -37,34 +37,27 @@ func newQUrlQuery(h *C.QUrlQuery) *QUrlQuery { if h == nil { return nil } + return &QUrlQuery{h: h} } // UnsafeNewQUrlQuery constructs the type using only unsafe pointers. func UnsafeNewQUrlQuery(h unsafe.Pointer) *QUrlQuery { - if h == nil { - return nil - } - - return &QUrlQuery{h: (*C.QUrlQuery)(h)} + return newQUrlQuery((*C.QUrlQuery)(h)) } // NewQUrlQuery constructs a new QUrlQuery object. func NewQUrlQuery() *QUrlQuery { - var outptr_QUrlQuery *C.QUrlQuery = nil - C.QUrlQuery_new(&outptr_QUrlQuery) - ret := newQUrlQuery(outptr_QUrlQuery) + ret := newQUrlQuery(C.QUrlQuery_new()) ret.isSubclass = true return ret } // NewQUrlQuery2 constructs a new QUrlQuery object. func NewQUrlQuery2(url *QUrl) *QUrlQuery { - var outptr_QUrlQuery *C.QUrlQuery = nil - C.QUrlQuery_new2(url.cPointer(), &outptr_QUrlQuery) - ret := newQUrlQuery(outptr_QUrlQuery) + ret := newQUrlQuery(C.QUrlQuery_new2(url.cPointer())) ret.isSubclass = true return ret } @@ -75,20 +68,16 @@ func NewQUrlQuery3(queryString string) *QUrlQuery { queryString_ms.data = C.CString(queryString) queryString_ms.len = C.size_t(len(queryString)) defer C.free(unsafe.Pointer(queryString_ms.data)) - var outptr_QUrlQuery *C.QUrlQuery = nil - C.QUrlQuery_new3(queryString_ms, &outptr_QUrlQuery) - ret := newQUrlQuery(outptr_QUrlQuery) + ret := newQUrlQuery(C.QUrlQuery_new3(queryString_ms)) ret.isSubclass = true return ret } // NewQUrlQuery4 constructs a new QUrlQuery object. func NewQUrlQuery4(other *QUrlQuery) *QUrlQuery { - var outptr_QUrlQuery *C.QUrlQuery = nil - C.QUrlQuery_new4(other.cPointer(), &outptr_QUrlQuery) - ret := newQUrlQuery(outptr_QUrlQuery) + ret := newQUrlQuery(C.QUrlQuery_new4(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qurlquery.h b/qt6/gen_qurlquery.h index 3ffedf3d..5dba7963 100644 --- a/qt6/gen_qurlquery.h +++ b/qt6/gen_qurlquery.h @@ -24,10 +24,10 @@ typedef struct QUrl QUrl; typedef struct QUrlQuery QUrlQuery; #endif -void QUrlQuery_new(QUrlQuery** outptr_QUrlQuery); -void QUrlQuery_new2(QUrl* url, QUrlQuery** outptr_QUrlQuery); -void QUrlQuery_new3(struct miqt_string queryString, QUrlQuery** outptr_QUrlQuery); -void QUrlQuery_new4(QUrlQuery* other, QUrlQuery** outptr_QUrlQuery); +QUrlQuery* QUrlQuery_new(); +QUrlQuery* QUrlQuery_new2(QUrl* url); +QUrlQuery* QUrlQuery_new3(struct miqt_string queryString); +QUrlQuery* QUrlQuery_new4(QUrlQuery* other); void QUrlQuery_OperatorAssign(QUrlQuery* self, QUrlQuery* other); bool QUrlQuery_OperatorEqual(const QUrlQuery* self, QUrlQuery* other); bool QUrlQuery_OperatorNotEqual(const QUrlQuery* self, QUrlQuery* other); diff --git a/qt6/gen_quuid.cpp b/qt6/gen_quuid.cpp index 6cf63b28..295c0b91 100644 --- a/qt6/gen_quuid.cpp +++ b/qt6/gen_quuid.cpp @@ -9,24 +9,20 @@ #include "gen_quuid.h" #include "_cgo_export.h" -void QUuid_new(QUuid** outptr_QUuid) { - QUuid* ret = new QUuid(); - *outptr_QUuid = ret; +QUuid* QUuid_new() { + return new QUuid(); } -void QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8, QUuid** outptr_QUuid) { - QUuid* ret = new QUuid(static_cast(l), static_cast(w1), static_cast(w2), static_cast(b1), static_cast(b2), static_cast(b3), static_cast(b4), static_cast(b5), static_cast(b6), static_cast(b7), static_cast(b8)); - *outptr_QUuid = ret; +QUuid* QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8) { + return new QUuid(static_cast(l), static_cast(w1), static_cast(w2), static_cast(b1), static_cast(b2), static_cast(b3), static_cast(b4), static_cast(b5), static_cast(b6), static_cast(b7), static_cast(b8)); } -void QUuid_new3(QAnyStringView* stringVal, QUuid** outptr_QUuid) { - QUuid* ret = new QUuid(*stringVal); - *outptr_QUuid = ret; +QUuid* QUuid_new3(QAnyStringView* stringVal) { + return new QUuid(*stringVal); } -void QUuid_new4(QUuid* param1, QUuid** outptr_QUuid) { - QUuid* ret = new QUuid(*param1); - *outptr_QUuid = ret; +QUuid* QUuid_new4(QUuid* param1) { + return new QUuid(*param1); } QUuid* QUuid_FromString(QAnyStringView* stringVal) { diff --git a/qt6/gen_quuid.go b/qt6/gen_quuid.go index ebcdd653..d6269847 100644 --- a/qt6/gen_quuid.go +++ b/qt6/gen_quuid.go @@ -67,54 +67,43 @@ func newQUuid(h *C.QUuid) *QUuid { if h == nil { return nil } + return &QUuid{h: h} } // UnsafeNewQUuid constructs the type using only unsafe pointers. func UnsafeNewQUuid(h unsafe.Pointer) *QUuid { - if h == nil { - return nil - } - - return &QUuid{h: (*C.QUuid)(h)} + return newQUuid((*C.QUuid)(h)) } // NewQUuid constructs a new QUuid object. func NewQUuid() *QUuid { - var outptr_QUuid *C.QUuid = nil - C.QUuid_new(&outptr_QUuid) - ret := newQUuid(outptr_QUuid) + ret := newQUuid(C.QUuid_new()) ret.isSubclass = true return ret } // NewQUuid2 constructs a new QUuid object. func NewQUuid2(l uint, w1 uint16, w2 uint16, b1 byte, b2 byte, b3 byte, b4 byte, b5 byte, b6 byte, b7 byte, b8 byte) *QUuid { - var outptr_QUuid *C.QUuid = nil - C.QUuid_new2((C.uint)(l), (C.uint16_t)(w1), (C.uint16_t)(w2), (C.uchar)(b1), (C.uchar)(b2), (C.uchar)(b3), (C.uchar)(b4), (C.uchar)(b5), (C.uchar)(b6), (C.uchar)(b7), (C.uchar)(b8), &outptr_QUuid) - ret := newQUuid(outptr_QUuid) + ret := newQUuid(C.QUuid_new2((C.uint)(l), (C.uint16_t)(w1), (C.uint16_t)(w2), (C.uchar)(b1), (C.uchar)(b2), (C.uchar)(b3), (C.uchar)(b4), (C.uchar)(b5), (C.uchar)(b6), (C.uchar)(b7), (C.uchar)(b8))) ret.isSubclass = true return ret } // NewQUuid3 constructs a new QUuid object. func NewQUuid3(stringVal QAnyStringView) *QUuid { - var outptr_QUuid *C.QUuid = nil - C.QUuid_new3(stringVal.cPointer(), &outptr_QUuid) - ret := newQUuid(outptr_QUuid) + ret := newQUuid(C.QUuid_new3(stringVal.cPointer())) ret.isSubclass = true return ret } // NewQUuid4 constructs a new QUuid object. func NewQUuid4(param1 *QUuid) *QUuid { - var outptr_QUuid *C.QUuid = nil - C.QUuid_new4(param1.cPointer(), &outptr_QUuid) - ret := newQUuid(outptr_QUuid) + ret := newQUuid(C.QUuid_new4(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_quuid.h b/qt6/gen_quuid.h index 875656e8..61a128cc 100644 --- a/qt6/gen_quuid.h +++ b/qt6/gen_quuid.h @@ -24,10 +24,10 @@ typedef struct QByteArrayView QByteArrayView; typedef struct QUuid QUuid; #endif -void QUuid_new(QUuid** outptr_QUuid); -void QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8, QUuid** outptr_QUuid); -void QUuid_new3(QAnyStringView* stringVal, QUuid** outptr_QUuid); -void QUuid_new4(QUuid* param1, QUuid** outptr_QUuid); +QUuid* QUuid_new(); +QUuid* QUuid_new2(unsigned int l, uint16_t w1, uint16_t w2, unsigned char b1, unsigned char b2, unsigned char b3, unsigned char b4, unsigned char b5, unsigned char b6, unsigned char b7, unsigned char b8); +QUuid* QUuid_new3(QAnyStringView* stringVal); +QUuid* QUuid_new4(QUuid* param1); QUuid* QUuid_FromString(QAnyStringView* stringVal); struct miqt_string QUuid_ToString(const QUuid* self); struct miqt_string QUuid_ToByteArray(const QUuid* self); diff --git a/qt6/gen_qvalidator.cpp b/qt6/gen_qvalidator.cpp index 2a448567..c2b7818a 100644 --- a/qt6/gen_qvalidator.cpp +++ b/qt6/gen_qvalidator.cpp @@ -254,16 +254,16 @@ public: }; -void QValidator_new(QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQValidator* ret = new MiqtVirtualQValidator(); - *outptr_QValidator = ret; - *outptr_QObject = static_cast(ret); +QValidator* QValidator_new() { + return new MiqtVirtualQValidator(); } -void QValidator_new2(QObject* parent, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQValidator* ret = new MiqtVirtualQValidator(parent); - *outptr_QValidator = ret; - *outptr_QObject = static_cast(ret); +QValidator* QValidator_new2(QObject* parent) { + return new MiqtVirtualQValidator(parent); +} + +void QValidator_virtbase(QValidator* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QValidator_MetaObject(const QValidator* self) { @@ -489,32 +489,24 @@ public: }; -void QIntValidator_new(QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(); - *outptr_QIntValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QIntValidator* QIntValidator_new() { + return new MiqtVirtualQIntValidator(); } -void QIntValidator_new2(int bottom, int top, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(static_cast(bottom), static_cast(top)); - *outptr_QIntValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QIntValidator* QIntValidator_new2(int bottom, int top) { + return new MiqtVirtualQIntValidator(static_cast(bottom), static_cast(top)); } -void QIntValidator_new3(QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(parent); - *outptr_QIntValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QIntValidator* QIntValidator_new3(QObject* parent) { + return new MiqtVirtualQIntValidator(parent); } -void QIntValidator_new4(int bottom, int top, QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQIntValidator* ret = new MiqtVirtualQIntValidator(static_cast(bottom), static_cast(top), parent); - *outptr_QIntValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QIntValidator* QIntValidator_new4(int bottom, int top, QObject* parent) { + return new MiqtVirtualQIntValidator(static_cast(bottom), static_cast(top), parent); +} + +void QIntValidator_virtbase(QIntValidator* src, QValidator** outptr_QValidator) { + *outptr_QValidator = static_cast(src); } QMetaObject* QIntValidator_MetaObject(const QIntValidator* self) { @@ -712,32 +704,24 @@ public: }; -void QDoubleValidator_new(QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(); - *outptr_QDoubleValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QDoubleValidator* QDoubleValidator_new() { + return new MiqtVirtualQDoubleValidator(); } -void QDoubleValidator_new2(double bottom, double top, int decimals, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals)); - *outptr_QDoubleValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QDoubleValidator* QDoubleValidator_new2(double bottom, double top, int decimals) { + return new MiqtVirtualQDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals)); } -void QDoubleValidator_new3(QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(parent); - *outptr_QDoubleValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QDoubleValidator* QDoubleValidator_new3(QObject* parent) { + return new MiqtVirtualQDoubleValidator(parent); } -void QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQDoubleValidator* ret = new MiqtVirtualQDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals), parent); - *outptr_QDoubleValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QDoubleValidator* QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent) { + return new MiqtVirtualQDoubleValidator(static_cast(bottom), static_cast(top), static_cast(decimals), parent); +} + +void QDoubleValidator_virtbase(QDoubleValidator* src, QValidator** outptr_QValidator) { + *outptr_QValidator = static_cast(src); } QMetaObject* QDoubleValidator_MetaObject(const QDoubleValidator* self) { @@ -979,32 +963,24 @@ public: }; -void QRegularExpressionValidator_new(QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(); - *outptr_QRegularExpressionValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QRegularExpressionValidator* QRegularExpressionValidator_new() { + return new MiqtVirtualQRegularExpressionValidator(); } -void QRegularExpressionValidator_new2(QRegularExpression* re, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(*re); - *outptr_QRegularExpressionValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QRegularExpressionValidator* QRegularExpressionValidator_new2(QRegularExpression* re) { + return new MiqtVirtualQRegularExpressionValidator(*re); } -void QRegularExpressionValidator_new3(QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(parent); - *outptr_QRegularExpressionValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QRegularExpressionValidator* QRegularExpressionValidator_new3(QObject* parent) { + return new MiqtVirtualQRegularExpressionValidator(parent); } -void QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject) { - MiqtVirtualQRegularExpressionValidator* ret = new MiqtVirtualQRegularExpressionValidator(*re, parent); - *outptr_QRegularExpressionValidator = ret; - *outptr_QValidator = static_cast(ret); - *outptr_QObject = static_cast(ret); +QRegularExpressionValidator* QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent) { + return new MiqtVirtualQRegularExpressionValidator(*re, parent); +} + +void QRegularExpressionValidator_virtbase(QRegularExpressionValidator* src, QValidator** outptr_QValidator) { + *outptr_QValidator = static_cast(src); } QMetaObject* QRegularExpressionValidator_MetaObject(const QRegularExpressionValidator* self) { diff --git a/qt6/gen_qvalidator.go b/qt6/gen_qvalidator.go index 29f0ba01..8b4f1c35 100644 --- a/qt6/gen_qvalidator.go +++ b/qt6/gen_qvalidator.go @@ -50,42 +50,34 @@ func (this *QValidator) UnsafePointer() unsafe.Pointer { } // newQValidator constructs the type using only CGO pointers. -func newQValidator(h *C.QValidator, h_QObject *C.QObject) *QValidator { +func newQValidator(h *C.QValidator) *QValidator { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QValidator_virtbase(h, &outptr_QObject) + return &QValidator{h: h, - QObject: newQObject(h_QObject)} + QObject: newQObject(outptr_QObject)} } // UnsafeNewQValidator constructs the type using only unsafe pointers. -func UnsafeNewQValidator(h unsafe.Pointer, h_QObject unsafe.Pointer) *QValidator { - if h == nil { - return nil - } - - return &QValidator{h: (*C.QValidator)(h), - QObject: UnsafeNewQObject(h_QObject)} +func UnsafeNewQValidator(h unsafe.Pointer) *QValidator { + return newQValidator((*C.QValidator)(h)) } // NewQValidator constructs a new QValidator object. func NewQValidator() *QValidator { - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QValidator_new(&outptr_QValidator, &outptr_QObject) - ret := newQValidator(outptr_QValidator, outptr_QObject) + ret := newQValidator(C.QValidator_new()) ret.isSubclass = true return ret } // NewQValidator2 constructs a new QValidator object. func NewQValidator2(parent *QObject) *QValidator { - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QValidator_new2(parent.cPointer(), &outptr_QValidator, &outptr_QObject) - ret := newQValidator(outptr_QValidator, outptr_QObject) + ret := newQValidator(C.QValidator_new2(parent.cPointer())) ret.isSubclass = true return ret } @@ -311,7 +303,7 @@ func miqt_exec_callback_QValidator_TimerEvent(self *C.QValidator, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QValidator{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -337,7 +329,7 @@ func miqt_exec_callback_QValidator_ChildEvent(self *C.QValidator, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QValidator{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -456,68 +448,50 @@ func (this *QIntValidator) UnsafePointer() unsafe.Pointer { } // newQIntValidator constructs the type using only CGO pointers. -func newQIntValidator(h *C.QIntValidator, h_QValidator *C.QValidator, h_QObject *C.QObject) *QIntValidator { +func newQIntValidator(h *C.QIntValidator) *QIntValidator { if h == nil { return nil } + var outptr_QValidator *C.QValidator = nil + C.QIntValidator_virtbase(h, &outptr_QValidator) + return &QIntValidator{h: h, - QValidator: newQValidator(h_QValidator, h_QObject)} + QValidator: newQValidator(outptr_QValidator)} } // UnsafeNewQIntValidator constructs the type using only unsafe pointers. -func UnsafeNewQIntValidator(h unsafe.Pointer, h_QValidator unsafe.Pointer, h_QObject unsafe.Pointer) *QIntValidator { - if h == nil { - return nil - } - - return &QIntValidator{h: (*C.QIntValidator)(h), - QValidator: UnsafeNewQValidator(h_QValidator, h_QObject)} +func UnsafeNewQIntValidator(h unsafe.Pointer) *QIntValidator { + return newQIntValidator((*C.QIntValidator)(h)) } // NewQIntValidator constructs a new QIntValidator object. func NewQIntValidator() *QIntValidator { - var outptr_QIntValidator *C.QIntValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QIntValidator_new(&outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) - ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret := newQIntValidator(C.QIntValidator_new()) ret.isSubclass = true return ret } // NewQIntValidator2 constructs a new QIntValidator object. func NewQIntValidator2(bottom int, top int) *QIntValidator { - var outptr_QIntValidator *C.QIntValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QIntValidator_new2((C.int)(bottom), (C.int)(top), &outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) - ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret := newQIntValidator(C.QIntValidator_new2((C.int)(bottom), (C.int)(top))) ret.isSubclass = true return ret } // NewQIntValidator3 constructs a new QIntValidator object. func NewQIntValidator3(parent *QObject) *QIntValidator { - var outptr_QIntValidator *C.QIntValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QIntValidator_new3(parent.cPointer(), &outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) - ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret := newQIntValidator(C.QIntValidator_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQIntValidator4 constructs a new QIntValidator object. func NewQIntValidator4(bottom int, top int, parent *QObject) *QIntValidator { - var outptr_QIntValidator *C.QIntValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QIntValidator_new4((C.int)(bottom), (C.int)(top), parent.cPointer(), &outptr_QIntValidator, &outptr_QValidator, &outptr_QObject) - ret := newQIntValidator(outptr_QIntValidator, outptr_QValidator, outptr_QObject) + ret := newQIntValidator(C.QIntValidator_new4((C.int)(bottom), (C.int)(top), parent.cPointer())) ret.isSubclass = true return ret } @@ -743,68 +717,50 @@ func (this *QDoubleValidator) UnsafePointer() unsafe.Pointer { } // newQDoubleValidator constructs the type using only CGO pointers. -func newQDoubleValidator(h *C.QDoubleValidator, h_QValidator *C.QValidator, h_QObject *C.QObject) *QDoubleValidator { +func newQDoubleValidator(h *C.QDoubleValidator) *QDoubleValidator { if h == nil { return nil } + var outptr_QValidator *C.QValidator = nil + C.QDoubleValidator_virtbase(h, &outptr_QValidator) + return &QDoubleValidator{h: h, - QValidator: newQValidator(h_QValidator, h_QObject)} + QValidator: newQValidator(outptr_QValidator)} } // UnsafeNewQDoubleValidator constructs the type using only unsafe pointers. -func UnsafeNewQDoubleValidator(h unsafe.Pointer, h_QValidator unsafe.Pointer, h_QObject unsafe.Pointer) *QDoubleValidator { - if h == nil { - return nil - } - - return &QDoubleValidator{h: (*C.QDoubleValidator)(h), - QValidator: UnsafeNewQValidator(h_QValidator, h_QObject)} +func UnsafeNewQDoubleValidator(h unsafe.Pointer) *QDoubleValidator { + return newQDoubleValidator((*C.QDoubleValidator)(h)) } // NewQDoubleValidator constructs a new QDoubleValidator object. func NewQDoubleValidator() *QDoubleValidator { - var outptr_QDoubleValidator *C.QDoubleValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QDoubleValidator_new(&outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) - ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret := newQDoubleValidator(C.QDoubleValidator_new()) ret.isSubclass = true return ret } // NewQDoubleValidator2 constructs a new QDoubleValidator object. func NewQDoubleValidator2(bottom float64, top float64, decimals int) *QDoubleValidator { - var outptr_QDoubleValidator *C.QDoubleValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QDoubleValidator_new2((C.double)(bottom), (C.double)(top), (C.int)(decimals), &outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) - ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret := newQDoubleValidator(C.QDoubleValidator_new2((C.double)(bottom), (C.double)(top), (C.int)(decimals))) ret.isSubclass = true return ret } // NewQDoubleValidator3 constructs a new QDoubleValidator object. func NewQDoubleValidator3(parent *QObject) *QDoubleValidator { - var outptr_QDoubleValidator *C.QDoubleValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QDoubleValidator_new3(parent.cPointer(), &outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) - ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret := newQDoubleValidator(C.QDoubleValidator_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQDoubleValidator4 constructs a new QDoubleValidator object. func NewQDoubleValidator4(bottom float64, top float64, decimals int, parent *QObject) *QDoubleValidator { - var outptr_QDoubleValidator *C.QDoubleValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QDoubleValidator_new4((C.double)(bottom), (C.double)(top), (C.int)(decimals), parent.cPointer(), &outptr_QDoubleValidator, &outptr_QValidator, &outptr_QObject) - ret := newQDoubleValidator(outptr_QDoubleValidator, outptr_QValidator, outptr_QObject) + ret := newQDoubleValidator(C.QDoubleValidator_new4((C.double)(bottom), (C.double)(top), (C.int)(decimals), parent.cPointer())) ret.isSubclass = true return ret } @@ -1090,68 +1046,50 @@ func (this *QRegularExpressionValidator) UnsafePointer() unsafe.Pointer { } // newQRegularExpressionValidator constructs the type using only CGO pointers. -func newQRegularExpressionValidator(h *C.QRegularExpressionValidator, h_QValidator *C.QValidator, h_QObject *C.QObject) *QRegularExpressionValidator { +func newQRegularExpressionValidator(h *C.QRegularExpressionValidator) *QRegularExpressionValidator { if h == nil { return nil } + var outptr_QValidator *C.QValidator = nil + C.QRegularExpressionValidator_virtbase(h, &outptr_QValidator) + return &QRegularExpressionValidator{h: h, - QValidator: newQValidator(h_QValidator, h_QObject)} + QValidator: newQValidator(outptr_QValidator)} } // UnsafeNewQRegularExpressionValidator constructs the type using only unsafe pointers. -func UnsafeNewQRegularExpressionValidator(h unsafe.Pointer, h_QValidator unsafe.Pointer, h_QObject unsafe.Pointer) *QRegularExpressionValidator { - if h == nil { - return nil - } - - return &QRegularExpressionValidator{h: (*C.QRegularExpressionValidator)(h), - QValidator: UnsafeNewQValidator(h_QValidator, h_QObject)} +func UnsafeNewQRegularExpressionValidator(h unsafe.Pointer) *QRegularExpressionValidator { + return newQRegularExpressionValidator((*C.QRegularExpressionValidator)(h)) } // NewQRegularExpressionValidator constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator() *QRegularExpressionValidator { - var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QRegularExpressionValidator_new(&outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) - ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret := newQRegularExpressionValidator(C.QRegularExpressionValidator_new()) ret.isSubclass = true return ret } // NewQRegularExpressionValidator2 constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator2(re *QRegularExpression) *QRegularExpressionValidator { - var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QRegularExpressionValidator_new2(re.cPointer(), &outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) - ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret := newQRegularExpressionValidator(C.QRegularExpressionValidator_new2(re.cPointer())) ret.isSubclass = true return ret } // NewQRegularExpressionValidator3 constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator3(parent *QObject) *QRegularExpressionValidator { - var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QRegularExpressionValidator_new3(parent.cPointer(), &outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) - ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret := newQRegularExpressionValidator(C.QRegularExpressionValidator_new3(parent.cPointer())) ret.isSubclass = true return ret } // NewQRegularExpressionValidator4 constructs a new QRegularExpressionValidator object. func NewQRegularExpressionValidator4(re *QRegularExpression, parent *QObject) *QRegularExpressionValidator { - var outptr_QRegularExpressionValidator *C.QRegularExpressionValidator = nil - var outptr_QValidator *C.QValidator = nil - var outptr_QObject *C.QObject = nil - C.QRegularExpressionValidator_new4(re.cPointer(), parent.cPointer(), &outptr_QRegularExpressionValidator, &outptr_QValidator, &outptr_QObject) - ret := newQRegularExpressionValidator(outptr_QRegularExpressionValidator, outptr_QValidator, outptr_QObject) + ret := newQRegularExpressionValidator(C.QRegularExpressionValidator_new4(re.cPointer(), parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qvalidator.h b/qt6/gen_qvalidator.h index 3e5ef638..6c71ec87 100644 --- a/qt6/gen_qvalidator.h +++ b/qt6/gen_qvalidator.h @@ -42,8 +42,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QValidator QValidator; #endif -void QValidator_new(QValidator** outptr_QValidator, QObject** outptr_QObject); -void QValidator_new2(QObject* parent, QValidator** outptr_QValidator, QObject** outptr_QObject); +QValidator* QValidator_new(); +QValidator* QValidator_new2(QObject* parent); +void QValidator_virtbase(QValidator* src, QObject** outptr_QObject); QMetaObject* QValidator_MetaObject(const QValidator* self); void* QValidator_Metacast(QValidator* self, const char* param1); struct miqt_string QValidator_Tr(const char* s); @@ -75,10 +76,11 @@ void QValidator_override_virtual_DisconnectNotify(void* self, intptr_t slot); void QValidator_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QValidator_Delete(QValidator* self, bool isSubclass); -void QIntValidator_new(QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QIntValidator_new2(int bottom, int top, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QIntValidator_new3(QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QIntValidator_new4(int bottom, int top, QObject* parent, QIntValidator** outptr_QIntValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +QIntValidator* QIntValidator_new(); +QIntValidator* QIntValidator_new2(int bottom, int top); +QIntValidator* QIntValidator_new3(QObject* parent); +QIntValidator* QIntValidator_new4(int bottom, int top, QObject* parent); +void QIntValidator_virtbase(QIntValidator* src, QValidator** outptr_QValidator); QMetaObject* QIntValidator_MetaObject(const QIntValidator* self); void* QIntValidator_Metacast(QIntValidator* self, const char* param1); struct miqt_string QIntValidator_Tr(const char* s); @@ -101,10 +103,11 @@ void QIntValidator_override_virtual_Fixup(void* self, intptr_t slot); void QIntValidator_virtualbase_Fixup(const void* self, struct miqt_string input); void QIntValidator_Delete(QIntValidator* self, bool isSubclass); -void QDoubleValidator_new(QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QDoubleValidator_new2(double bottom, double top, int decimals, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QDoubleValidator_new3(QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent, QDoubleValidator** outptr_QDoubleValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +QDoubleValidator* QDoubleValidator_new(); +QDoubleValidator* QDoubleValidator_new2(double bottom, double top, int decimals); +QDoubleValidator* QDoubleValidator_new3(QObject* parent); +QDoubleValidator* QDoubleValidator_new4(double bottom, double top, int decimals, QObject* parent); +void QDoubleValidator_virtbase(QDoubleValidator* src, QValidator** outptr_QValidator); QMetaObject* QDoubleValidator_MetaObject(const QDoubleValidator* self); void* QDoubleValidator_Metacast(QDoubleValidator* self, const char* param1); struct miqt_string QDoubleValidator_Tr(const char* s); @@ -136,10 +139,11 @@ void QDoubleValidator_override_virtual_Fixup(void* self, intptr_t slot); void QDoubleValidator_virtualbase_Fixup(const void* self, struct miqt_string input); void QDoubleValidator_Delete(QDoubleValidator* self, bool isSubclass); -void QRegularExpressionValidator_new(QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QRegularExpressionValidator_new2(QRegularExpression* re, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QRegularExpressionValidator_new3(QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); -void QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent, QRegularExpressionValidator** outptr_QRegularExpressionValidator, QValidator** outptr_QValidator, QObject** outptr_QObject); +QRegularExpressionValidator* QRegularExpressionValidator_new(); +QRegularExpressionValidator* QRegularExpressionValidator_new2(QRegularExpression* re); +QRegularExpressionValidator* QRegularExpressionValidator_new3(QObject* parent); +QRegularExpressionValidator* QRegularExpressionValidator_new4(QRegularExpression* re, QObject* parent); +void QRegularExpressionValidator_virtbase(QRegularExpressionValidator* src, QValidator** outptr_QValidator); QMetaObject* QRegularExpressionValidator_MetaObject(const QRegularExpressionValidator* self); void* QRegularExpressionValidator_Metacast(QRegularExpressionValidator* self, const char* param1); struct miqt_string QRegularExpressionValidator_Tr(const char* s); diff --git a/qt6/gen_qvariant.cpp b/qt6/gen_qvariant.cpp index 4b9f02fb..25e186b8 100644 --- a/qt6/gen_qvariant.cpp +++ b/qt6/gen_qvariant.cpp @@ -37,79 +37,65 @@ #include "gen_qvariant.h" #include "_cgo_export.h" -void QVariant_new(QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(); - *outptr_QVariant = ret; +QVariant* QVariant_new() { + return new QVariant(); } -void QVariant_new2(QMetaType* typeVal, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*typeVal); - *outptr_QVariant = ret; +QVariant* QVariant_new2(QMetaType* typeVal) { + return new QVariant(*typeVal); } -void QVariant_new3(QVariant* other, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*other); - *outptr_QVariant = ret; +QVariant* QVariant_new3(QVariant* other) { + return new QVariant(*other); } -void QVariant_new4(int i, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(i)); - *outptr_QVariant = ret; +QVariant* QVariant_new4(int i) { + return new QVariant(static_cast(i)); } -void QVariant_new5(unsigned int ui, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(ui)); - *outptr_QVariant = ret; +QVariant* QVariant_new5(unsigned int ui) { + return new QVariant(static_cast(ui)); } -void QVariant_new6(long long ll, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(ll)); - *outptr_QVariant = ret; +QVariant* QVariant_new6(long long ll) { + return new QVariant(static_cast(ll)); } -void QVariant_new7(unsigned long long ull, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(ull)); - *outptr_QVariant = ret; +QVariant* QVariant_new7(unsigned long long ull) { + return new QVariant(static_cast(ull)); } -void QVariant_new8(bool b, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(b); - *outptr_QVariant = ret; +QVariant* QVariant_new8(bool b) { + return new QVariant(b); } -void QVariant_new9(double d, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(d)); - *outptr_QVariant = ret; +QVariant* QVariant_new9(double d) { + return new QVariant(static_cast(d)); } -void QVariant_new10(float f, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(f)); - *outptr_QVariant = ret; +QVariant* QVariant_new10(float f) { + return new QVariant(static_cast(f)); } -void QVariant_new11(const char* str, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(str); - *outptr_QVariant = ret; +QVariant* QVariant_new11(const char* str) { + return new QVariant(str); } -void QVariant_new12(struct miqt_string bytearray, QVariant** outptr_QVariant) { +QVariant* QVariant_new12(struct miqt_string bytearray) { QByteArray bytearray_QByteArray(bytearray.data, bytearray.len); - QVariant* ret = new QVariant(bytearray_QByteArray); - *outptr_QVariant = ret; + return new QVariant(bytearray_QByteArray); } -void QVariant_new13(QBitArray* bitarray, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*bitarray); - *outptr_QVariant = ret; +QVariant* QVariant_new13(QBitArray* bitarray) { + return new QVariant(*bitarray); } -void QVariant_new14(struct miqt_string stringVal, QVariant** outptr_QVariant) { +QVariant* QVariant_new14(struct miqt_string stringVal) { QString stringVal_QString = QString::fromUtf8(stringVal.data, stringVal.len); - QVariant* ret = new QVariant(stringVal_QString); - *outptr_QVariant = ret; + return new QVariant(stringVal_QString); } -void QVariant_new15(struct miqt_array /* of struct miqt_string */ stringlist, QVariant** outptr_QVariant) { +QVariant* QVariant_new15(struct miqt_array /* of struct miqt_string */ stringlist) { QStringList stringlist_QList; stringlist_QList.reserve(stringlist.len); struct miqt_string* stringlist_arr = static_cast(stringlist.data); @@ -117,31 +103,26 @@ void QVariant_new15(struct miqt_array /* of struct miqt_string */ stringlist, Q QString stringlist_arr_i_QString = QString::fromUtf8(stringlist_arr[i].data, stringlist_arr[i].len); stringlist_QList.push_back(stringlist_arr_i_QString); } - QVariant* ret = new QVariant(stringlist_QList); - *outptr_QVariant = ret; + return new QVariant(stringlist_QList); } -void QVariant_new16(QChar* qchar, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*qchar); - *outptr_QVariant = ret; +QVariant* QVariant_new16(QChar* qchar) { + return new QVariant(*qchar); } -void QVariant_new17(QDate* date, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*date); - *outptr_QVariant = ret; +QVariant* QVariant_new17(QDate* date) { + return new QVariant(*date); } -void QVariant_new18(QTime* time, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*time); - *outptr_QVariant = ret; +QVariant* QVariant_new18(QTime* time) { + return new QVariant(*time); } -void QVariant_new19(QDateTime* datetime, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*datetime); - *outptr_QVariant = ret; +QVariant* QVariant_new19(QDateTime* datetime) { + return new QVariant(*datetime); } -void QVariant_new20(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal, QVariant** outptr_QVariant) { +QVariant* QVariant_new20(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal) { QMap mapVal_QMap; struct miqt_string* mapVal_karr = static_cast(mapVal.keys); QVariant** mapVal_varr = static_cast(mapVal.values); @@ -149,11 +130,10 @@ void QVariant_new20(struct miqt_map /* of struct miqt_string to QVariant* */ ma QString mapVal_karr_i_QString = QString::fromUtf8(mapVal_karr[i].data, mapVal_karr[i].len); mapVal_QMap[mapVal_karr_i_QString] = *(mapVal_varr[i]); } - QVariant* ret = new QVariant(mapVal_QMap); - *outptr_QVariant = ret; + return new QVariant(mapVal_QMap); } -void QVariant_new21(struct miqt_map /* of struct miqt_string to QVariant* */ hash, QVariant** outptr_QVariant) { +QVariant* QVariant_new21(struct miqt_map /* of struct miqt_string to QVariant* */ hash) { QHash hash_QMap; hash_QMap.reserve(hash.len); struct miqt_string* hash_karr = static_cast(hash.keys); @@ -162,113 +142,91 @@ void QVariant_new21(struct miqt_map /* of struct miqt_string to QVariant* */ ha QString hash_karr_i_QString = QString::fromUtf8(hash_karr[i].data, hash_karr[i].len); hash_QMap[hash_karr_i_QString] = *(hash_varr[i]); } - QVariant* ret = new QVariant(hash_QMap); - *outptr_QVariant = ret; + return new QVariant(hash_QMap); } -void QVariant_new22(QSize* size, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*size); - *outptr_QVariant = ret; +QVariant* QVariant_new22(QSize* size) { + return new QVariant(*size); } -void QVariant_new23(QSizeF* size, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*size); - *outptr_QVariant = ret; +QVariant* QVariant_new23(QSizeF* size) { + return new QVariant(*size); } -void QVariant_new24(QPoint* pt, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*pt); - *outptr_QVariant = ret; +QVariant* QVariant_new24(QPoint* pt) { + return new QVariant(*pt); } -void QVariant_new25(QPointF* pt, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*pt); - *outptr_QVariant = ret; +QVariant* QVariant_new25(QPointF* pt) { + return new QVariant(*pt); } -void QVariant_new26(QLine* line, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*line); - *outptr_QVariant = ret; +QVariant* QVariant_new26(QLine* line) { + return new QVariant(*line); } -void QVariant_new27(QLineF* line, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*line); - *outptr_QVariant = ret; +QVariant* QVariant_new27(QLineF* line) { + return new QVariant(*line); } -void QVariant_new28(QRect* rect, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*rect); - *outptr_QVariant = ret; +QVariant* QVariant_new28(QRect* rect) { + return new QVariant(*rect); } -void QVariant_new29(QRectF* rect, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*rect); - *outptr_QVariant = ret; +QVariant* QVariant_new29(QRectF* rect) { + return new QVariant(*rect); } -void QVariant_new30(QLocale* locale, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*locale); - *outptr_QVariant = ret; +QVariant* QVariant_new30(QLocale* locale) { + return new QVariant(*locale); } -void QVariant_new31(QRegularExpression* re, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*re); - *outptr_QVariant = ret; +QVariant* QVariant_new31(QRegularExpression* re) { + return new QVariant(*re); } -void QVariant_new32(QEasingCurve* easing, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*easing); - *outptr_QVariant = ret; +QVariant* QVariant_new32(QEasingCurve* easing) { + return new QVariant(*easing); } -void QVariant_new33(QUuid* uuid, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*uuid); - *outptr_QVariant = ret; +QVariant* QVariant_new33(QUuid* uuid) { + return new QVariant(*uuid); } -void QVariant_new34(QUrl* url, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*url); - *outptr_QVariant = ret; +QVariant* QVariant_new34(QUrl* url) { + return new QVariant(*url); } -void QVariant_new35(QJsonValue* jsonValue, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*jsonValue); - *outptr_QVariant = ret; +QVariant* QVariant_new35(QJsonValue* jsonValue) { + return new QVariant(*jsonValue); } -void QVariant_new36(QJsonObject* jsonObject, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*jsonObject); - *outptr_QVariant = ret; +QVariant* QVariant_new36(QJsonObject* jsonObject) { + return new QVariant(*jsonObject); } -void QVariant_new37(QJsonArray* jsonArray, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*jsonArray); - *outptr_QVariant = ret; +QVariant* QVariant_new37(QJsonArray* jsonArray) { + return new QVariant(*jsonArray); } -void QVariant_new38(QJsonDocument* jsonDocument, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*jsonDocument); - *outptr_QVariant = ret; +QVariant* QVariant_new38(QJsonDocument* jsonDocument) { + return new QVariant(*jsonDocument); } -void QVariant_new39(QModelIndex* modelIndex, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*modelIndex); - *outptr_QVariant = ret; +QVariant* QVariant_new39(QModelIndex* modelIndex) { + return new QVariant(*modelIndex); } -void QVariant_new40(QPersistentModelIndex* modelIndex, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*modelIndex); - *outptr_QVariant = ret; +QVariant* QVariant_new40(QPersistentModelIndex* modelIndex) { + return new QVariant(*modelIndex); } -void QVariant_new41(int typeVal, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(static_cast(typeVal)); - *outptr_QVariant = ret; +QVariant* QVariant_new41(int typeVal) { + return new QVariant(static_cast(typeVal)); } -void QVariant_new42(QMetaType* typeVal, const void* copyVal, QVariant** outptr_QVariant) { - QVariant* ret = new QVariant(*typeVal, copyVal); - *outptr_QVariant = ret; +QVariant* QVariant_new42(QMetaType* typeVal, const void* copyVal) { + return new QVariant(*typeVal, copyVal); } void QVariant_OperatorAssign(QVariant* self, QVariant* other) { @@ -639,14 +597,12 @@ void QVariant_Delete(QVariant* self, bool isSubclass) { } } -void QVariantConstPointer_new(QVariant* variant, QVariantConstPointer** outptr_QVariantConstPointer) { - QVariantConstPointer* ret = new QVariantConstPointer(*variant); - *outptr_QVariantConstPointer = ret; +QVariantConstPointer* QVariantConstPointer_new(QVariant* variant) { + return new QVariantConstPointer(*variant); } -void QVariantConstPointer_new2(QVariantConstPointer* param1, QVariantConstPointer** outptr_QVariantConstPointer) { - QVariantConstPointer* ret = new QVariantConstPointer(*param1); - *outptr_QVariantConstPointer = ret; +QVariantConstPointer* QVariantConstPointer_new2(QVariantConstPointer* param1) { + return new QVariantConstPointer(*param1); } QVariant* QVariantConstPointer_OperatorMultiply(const QVariantConstPointer* self) { diff --git a/qt6/gen_qvariant.go b/qt6/gen_qvariant.go index 48c79c54..6bec3e92 100644 --- a/qt6/gen_qvariant.go +++ b/qt6/gen_qvariant.go @@ -102,114 +102,91 @@ func newQVariant(h *C.QVariant) *QVariant { if h == nil { return nil } + return &QVariant{h: h} } // UnsafeNewQVariant constructs the type using only unsafe pointers. func UnsafeNewQVariant(h unsafe.Pointer) *QVariant { - if h == nil { - return nil - } - - return &QVariant{h: (*C.QVariant)(h)} + return newQVariant((*C.QVariant)(h)) } // NewQVariant constructs a new QVariant object. func NewQVariant() *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new(&outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new()) ret.isSubclass = true return ret } // NewQVariant2 constructs a new QVariant object. func NewQVariant2(typeVal QMetaType) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new2(typeVal.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new2(typeVal.cPointer())) ret.isSubclass = true return ret } // NewQVariant3 constructs a new QVariant object. func NewQVariant3(other *QVariant) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new3(other.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new3(other.cPointer())) ret.isSubclass = true return ret } // NewQVariant4 constructs a new QVariant object. func NewQVariant4(i int) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new4((C.int)(i), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new4((C.int)(i))) ret.isSubclass = true return ret } // NewQVariant5 constructs a new QVariant object. func NewQVariant5(ui uint) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new5((C.uint)(ui), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new5((C.uint)(ui))) ret.isSubclass = true return ret } // NewQVariant6 constructs a new QVariant object. func NewQVariant6(ll int64) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new6((C.longlong)(ll), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new6((C.longlong)(ll))) ret.isSubclass = true return ret } // NewQVariant7 constructs a new QVariant object. func NewQVariant7(ull uint64) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new7((C.ulonglong)(ull), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new7((C.ulonglong)(ull))) ret.isSubclass = true return ret } // NewQVariant8 constructs a new QVariant object. func NewQVariant8(b bool) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new8((C.bool)(b), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new8((C.bool)(b))) ret.isSubclass = true return ret } // NewQVariant9 constructs a new QVariant object. func NewQVariant9(d float64) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new9((C.double)(d), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new9((C.double)(d))) ret.isSubclass = true return ret } // NewQVariant10 constructs a new QVariant object. func NewQVariant10(f float32) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new10((C.float)(f), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new10((C.float)(f))) ret.isSubclass = true return ret } @@ -218,10 +195,8 @@ func NewQVariant10(f float32) *QVariant { func NewQVariant11(str string) *QVariant { str_Cstring := C.CString(str) defer C.free(unsafe.Pointer(str_Cstring)) - var outptr_QVariant *C.QVariant = nil - C.QVariant_new11(str_Cstring, &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new11(str_Cstring)) ret.isSubclass = true return ret } @@ -231,20 +206,16 @@ func NewQVariant12(bytearray []byte) *QVariant { bytearray_alias := C.struct_miqt_string{} bytearray_alias.data = (*C.char)(unsafe.Pointer(&bytearray[0])) bytearray_alias.len = C.size_t(len(bytearray)) - var outptr_QVariant *C.QVariant = nil - C.QVariant_new12(bytearray_alias, &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new12(bytearray_alias)) ret.isSubclass = true return ret } // NewQVariant13 constructs a new QVariant object. func NewQVariant13(bitarray *QBitArray) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new13(bitarray.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new13(bitarray.cPointer())) ret.isSubclass = true return ret } @@ -255,10 +226,8 @@ func NewQVariant14(stringVal string) *QVariant { stringVal_ms.data = C.CString(stringVal) stringVal_ms.len = C.size_t(len(stringVal)) defer C.free(unsafe.Pointer(stringVal_ms.data)) - var outptr_QVariant *C.QVariant = nil - C.QVariant_new14(stringVal_ms, &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new14(stringVal_ms)) ret.isSubclass = true return ret } @@ -275,50 +244,40 @@ func NewQVariant15(stringlist []string) *QVariant { stringlist_CArray[i] = stringlist_i_ms } stringlist_ma := C.struct_miqt_array{len: C.size_t(len(stringlist)), data: unsafe.Pointer(stringlist_CArray)} - var outptr_QVariant *C.QVariant = nil - C.QVariant_new15(stringlist_ma, &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new15(stringlist_ma)) ret.isSubclass = true return ret } // NewQVariant16 constructs a new QVariant object. func NewQVariant16(qchar QChar) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new16(qchar.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new16(qchar.cPointer())) ret.isSubclass = true return ret } // NewQVariant17 constructs a new QVariant object. func NewQVariant17(date QDate) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new17(date.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new17(date.cPointer())) ret.isSubclass = true return ret } // NewQVariant18 constructs a new QVariant object. func NewQVariant18(time QTime) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new18(time.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new18(time.cPointer())) ret.isSubclass = true return ret } // NewQVariant19 constructs a new QVariant object. func NewQVariant19(datetime *QDateTime) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new19(datetime.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new19(datetime.cPointer())) ret.isSubclass = true return ret } @@ -344,10 +303,8 @@ func NewQVariant20(mapVal map[string]QVariant) *QVariant { keys: unsafe.Pointer(mapVal_Keys_CArray), values: unsafe.Pointer(mapVal_Values_CArray), } - var outptr_QVariant *C.QVariant = nil - C.QVariant_new20(mapVal_mm, &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new20(mapVal_mm)) ret.isSubclass = true return ret } @@ -373,220 +330,176 @@ func NewQVariant21(hash map[string]QVariant) *QVariant { keys: unsafe.Pointer(hash_Keys_CArray), values: unsafe.Pointer(hash_Values_CArray), } - var outptr_QVariant *C.QVariant = nil - C.QVariant_new21(hash_mm, &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new21(hash_mm)) ret.isSubclass = true return ret } // NewQVariant22 constructs a new QVariant object. func NewQVariant22(size *QSize) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new22(size.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new22(size.cPointer())) ret.isSubclass = true return ret } // NewQVariant23 constructs a new QVariant object. func NewQVariant23(size *QSizeF) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new23(size.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new23(size.cPointer())) ret.isSubclass = true return ret } // NewQVariant24 constructs a new QVariant object. func NewQVariant24(pt *QPoint) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new24(pt.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new24(pt.cPointer())) ret.isSubclass = true return ret } // NewQVariant25 constructs a new QVariant object. func NewQVariant25(pt *QPointF) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new25(pt.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new25(pt.cPointer())) ret.isSubclass = true return ret } // NewQVariant26 constructs a new QVariant object. func NewQVariant26(line *QLine) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new26(line.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new26(line.cPointer())) ret.isSubclass = true return ret } // NewQVariant27 constructs a new QVariant object. func NewQVariant27(line *QLineF) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new27(line.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new27(line.cPointer())) ret.isSubclass = true return ret } // NewQVariant28 constructs a new QVariant object. func NewQVariant28(rect *QRect) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new28(rect.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new28(rect.cPointer())) ret.isSubclass = true return ret } // NewQVariant29 constructs a new QVariant object. func NewQVariant29(rect *QRectF) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new29(rect.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new29(rect.cPointer())) ret.isSubclass = true return ret } // NewQVariant30 constructs a new QVariant object. func NewQVariant30(locale *QLocale) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new30(locale.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new30(locale.cPointer())) ret.isSubclass = true return ret } // NewQVariant31 constructs a new QVariant object. func NewQVariant31(re *QRegularExpression) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new31(re.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new31(re.cPointer())) ret.isSubclass = true return ret } // NewQVariant32 constructs a new QVariant object. func NewQVariant32(easing *QEasingCurve) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new32(easing.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new32(easing.cPointer())) ret.isSubclass = true return ret } // NewQVariant33 constructs a new QVariant object. func NewQVariant33(uuid *QUuid) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new33(uuid.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new33(uuid.cPointer())) ret.isSubclass = true return ret } // NewQVariant34 constructs a new QVariant object. func NewQVariant34(url *QUrl) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new34(url.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new34(url.cPointer())) ret.isSubclass = true return ret } // NewQVariant35 constructs a new QVariant object. func NewQVariant35(jsonValue *QJsonValue) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new35(jsonValue.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new35(jsonValue.cPointer())) ret.isSubclass = true return ret } // NewQVariant36 constructs a new QVariant object. func NewQVariant36(jsonObject *QJsonObject) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new36(jsonObject.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new36(jsonObject.cPointer())) ret.isSubclass = true return ret } // NewQVariant37 constructs a new QVariant object. func NewQVariant37(jsonArray *QJsonArray) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new37(jsonArray.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new37(jsonArray.cPointer())) ret.isSubclass = true return ret } // NewQVariant38 constructs a new QVariant object. func NewQVariant38(jsonDocument *QJsonDocument) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new38(jsonDocument.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new38(jsonDocument.cPointer())) ret.isSubclass = true return ret } // NewQVariant39 constructs a new QVariant object. func NewQVariant39(modelIndex *QModelIndex) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new39(modelIndex.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new39(modelIndex.cPointer())) ret.isSubclass = true return ret } // NewQVariant40 constructs a new QVariant object. func NewQVariant40(modelIndex *QPersistentModelIndex) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new40(modelIndex.cPointer(), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new40(modelIndex.cPointer())) ret.isSubclass = true return ret } // NewQVariant41 constructs a new QVariant object. func NewQVariant41(typeVal QVariant__Type) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new41((C.int)(typeVal), &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new41((C.int)(typeVal))) ret.isSubclass = true return ret } // NewQVariant42 constructs a new QVariant object. func NewQVariant42(typeVal QMetaType, copyVal unsafe.Pointer) *QVariant { - var outptr_QVariant *C.QVariant = nil - C.QVariant_new42(typeVal.cPointer(), copyVal, &outptr_QVariant) - ret := newQVariant(outptr_QVariant) + ret := newQVariant(C.QVariant_new42(typeVal.cPointer(), copyVal)) ret.isSubclass = true return ret } @@ -1010,34 +923,27 @@ func newQVariantConstPointer(h *C.QVariantConstPointer) *QVariantConstPointer { if h == nil { return nil } + return &QVariantConstPointer{h: h} } // UnsafeNewQVariantConstPointer constructs the type using only unsafe pointers. func UnsafeNewQVariantConstPointer(h unsafe.Pointer) *QVariantConstPointer { - if h == nil { - return nil - } - - return &QVariantConstPointer{h: (*C.QVariantConstPointer)(h)} + return newQVariantConstPointer((*C.QVariantConstPointer)(h)) } // NewQVariantConstPointer constructs a new QVariantConstPointer object. func NewQVariantConstPointer(variant QVariant) *QVariantConstPointer { - var outptr_QVariantConstPointer *C.QVariantConstPointer = nil - C.QVariantConstPointer_new(variant.cPointer(), &outptr_QVariantConstPointer) - ret := newQVariantConstPointer(outptr_QVariantConstPointer) + ret := newQVariantConstPointer(C.QVariantConstPointer_new(variant.cPointer())) ret.isSubclass = true return ret } // NewQVariantConstPointer2 constructs a new QVariantConstPointer object. func NewQVariantConstPointer2(param1 *QVariantConstPointer) *QVariantConstPointer { - var outptr_QVariantConstPointer *C.QVariantConstPointer = nil - C.QVariantConstPointer_new2(param1.cPointer(), &outptr_QVariantConstPointer) - ret := newQVariantConstPointer(outptr_QVariantConstPointer) + ret := newQVariantConstPointer(C.QVariantConstPointer_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qvariant.h b/qt6/gen_qvariant.h index 2c7aa58e..78678823 100644 --- a/qt6/gen_qvariant.h +++ b/qt6/gen_qvariant.h @@ -76,48 +76,48 @@ typedef struct QVariant QVariant; typedef struct QVariantConstPointer QVariantConstPointer; #endif -void QVariant_new(QVariant** outptr_QVariant); -void QVariant_new2(QMetaType* typeVal, QVariant** outptr_QVariant); -void QVariant_new3(QVariant* other, QVariant** outptr_QVariant); -void QVariant_new4(int i, QVariant** outptr_QVariant); -void QVariant_new5(unsigned int ui, QVariant** outptr_QVariant); -void QVariant_new6(long long ll, QVariant** outptr_QVariant); -void QVariant_new7(unsigned long long ull, QVariant** outptr_QVariant); -void QVariant_new8(bool b, QVariant** outptr_QVariant); -void QVariant_new9(double d, QVariant** outptr_QVariant); -void QVariant_new10(float f, QVariant** outptr_QVariant); -void QVariant_new11(const char* str, QVariant** outptr_QVariant); -void QVariant_new12(struct miqt_string bytearray, QVariant** outptr_QVariant); -void QVariant_new13(QBitArray* bitarray, QVariant** outptr_QVariant); -void QVariant_new14(struct miqt_string stringVal, QVariant** outptr_QVariant); -void QVariant_new15(struct miqt_array /* of struct miqt_string */ stringlist, QVariant** outptr_QVariant); -void QVariant_new16(QChar* qchar, QVariant** outptr_QVariant); -void QVariant_new17(QDate* date, QVariant** outptr_QVariant); -void QVariant_new18(QTime* time, QVariant** outptr_QVariant); -void QVariant_new19(QDateTime* datetime, QVariant** outptr_QVariant); -void QVariant_new20(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal, QVariant** outptr_QVariant); -void QVariant_new21(struct miqt_map /* of struct miqt_string to QVariant* */ hash, QVariant** outptr_QVariant); -void QVariant_new22(QSize* size, QVariant** outptr_QVariant); -void QVariant_new23(QSizeF* size, QVariant** outptr_QVariant); -void QVariant_new24(QPoint* pt, QVariant** outptr_QVariant); -void QVariant_new25(QPointF* pt, QVariant** outptr_QVariant); -void QVariant_new26(QLine* line, QVariant** outptr_QVariant); -void QVariant_new27(QLineF* line, QVariant** outptr_QVariant); -void QVariant_new28(QRect* rect, QVariant** outptr_QVariant); -void QVariant_new29(QRectF* rect, QVariant** outptr_QVariant); -void QVariant_new30(QLocale* locale, QVariant** outptr_QVariant); -void QVariant_new31(QRegularExpression* re, QVariant** outptr_QVariant); -void QVariant_new32(QEasingCurve* easing, QVariant** outptr_QVariant); -void QVariant_new33(QUuid* uuid, QVariant** outptr_QVariant); -void QVariant_new34(QUrl* url, QVariant** outptr_QVariant); -void QVariant_new35(QJsonValue* jsonValue, QVariant** outptr_QVariant); -void QVariant_new36(QJsonObject* jsonObject, QVariant** outptr_QVariant); -void QVariant_new37(QJsonArray* jsonArray, QVariant** outptr_QVariant); -void QVariant_new38(QJsonDocument* jsonDocument, QVariant** outptr_QVariant); -void QVariant_new39(QModelIndex* modelIndex, QVariant** outptr_QVariant); -void QVariant_new40(QPersistentModelIndex* modelIndex, QVariant** outptr_QVariant); -void QVariant_new41(int typeVal, QVariant** outptr_QVariant); -void QVariant_new42(QMetaType* typeVal, const void* copyVal, QVariant** outptr_QVariant); +QVariant* QVariant_new(); +QVariant* QVariant_new2(QMetaType* typeVal); +QVariant* QVariant_new3(QVariant* other); +QVariant* QVariant_new4(int i); +QVariant* QVariant_new5(unsigned int ui); +QVariant* QVariant_new6(long long ll); +QVariant* QVariant_new7(unsigned long long ull); +QVariant* QVariant_new8(bool b); +QVariant* QVariant_new9(double d); +QVariant* QVariant_new10(float f); +QVariant* QVariant_new11(const char* str); +QVariant* QVariant_new12(struct miqt_string bytearray); +QVariant* QVariant_new13(QBitArray* bitarray); +QVariant* QVariant_new14(struct miqt_string stringVal); +QVariant* QVariant_new15(struct miqt_array /* of struct miqt_string */ stringlist); +QVariant* QVariant_new16(QChar* qchar); +QVariant* QVariant_new17(QDate* date); +QVariant* QVariant_new18(QTime* time); +QVariant* QVariant_new19(QDateTime* datetime); +QVariant* QVariant_new20(struct miqt_map /* of struct miqt_string to QVariant* */ mapVal); +QVariant* QVariant_new21(struct miqt_map /* of struct miqt_string to QVariant* */ hash); +QVariant* QVariant_new22(QSize* size); +QVariant* QVariant_new23(QSizeF* size); +QVariant* QVariant_new24(QPoint* pt); +QVariant* QVariant_new25(QPointF* pt); +QVariant* QVariant_new26(QLine* line); +QVariant* QVariant_new27(QLineF* line); +QVariant* QVariant_new28(QRect* rect); +QVariant* QVariant_new29(QRectF* rect); +QVariant* QVariant_new30(QLocale* locale); +QVariant* QVariant_new31(QRegularExpression* re); +QVariant* QVariant_new32(QEasingCurve* easing); +QVariant* QVariant_new33(QUuid* uuid); +QVariant* QVariant_new34(QUrl* url); +QVariant* QVariant_new35(QJsonValue* jsonValue); +QVariant* QVariant_new36(QJsonObject* jsonObject); +QVariant* QVariant_new37(QJsonArray* jsonArray); +QVariant* QVariant_new38(QJsonDocument* jsonDocument); +QVariant* QVariant_new39(QModelIndex* modelIndex); +QVariant* QVariant_new40(QPersistentModelIndex* modelIndex); +QVariant* QVariant_new41(int typeVal); +QVariant* QVariant_new42(QMetaType* typeVal, const void* copyVal); void QVariant_OperatorAssign(QVariant* self, QVariant* other); void QVariant_Swap(QVariant* self, QVariant* other); int QVariant_UserType(const QVariant* self); @@ -190,8 +190,8 @@ float QVariant_ToFloat1(const QVariant* self, bool* ok); double QVariant_ToReal1(const QVariant* self, bool* ok); void QVariant_Delete(QVariant* self, bool isSubclass); -void QVariantConstPointer_new(QVariant* variant, QVariantConstPointer** outptr_QVariantConstPointer); -void QVariantConstPointer_new2(QVariantConstPointer* param1, QVariantConstPointer** outptr_QVariantConstPointer); +QVariantConstPointer* QVariantConstPointer_new(QVariant* variant); +QVariantConstPointer* QVariantConstPointer_new2(QVariantConstPointer* param1); QVariant* QVariantConstPointer_OperatorMultiply(const QVariantConstPointer* self); QVariant* QVariantConstPointer_OperatorMinusGreater(const QVariantConstPointer* self); void QVariantConstPointer_OperatorAssign(QVariantConstPointer* self, QVariantConstPointer* param1); diff --git a/qt6/gen_qvariantanimation.cpp b/qt6/gen_qvariantanimation.cpp index 13820daf..cbde663e 100644 --- a/qt6/gen_qvariantanimation.cpp +++ b/qt6/gen_qvariantanimation.cpp @@ -201,18 +201,16 @@ public: }; -void QVariantAnimation_new(QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQVariantAnimation* ret = new MiqtVirtualQVariantAnimation(); - *outptr_QVariantAnimation = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QVariantAnimation* QVariantAnimation_new() { + return new MiqtVirtualQVariantAnimation(); } -void QVariantAnimation_new2(QObject* parent, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject) { - MiqtVirtualQVariantAnimation* ret = new MiqtVirtualQVariantAnimation(parent); - *outptr_QVariantAnimation = ret; - *outptr_QAbstractAnimation = static_cast(ret); - *outptr_QObject = static_cast(ret); +QVariantAnimation* QVariantAnimation_new2(QObject* parent) { + return new MiqtVirtualQVariantAnimation(parent); +} + +void QVariantAnimation_virtbase(QVariantAnimation* src, QAbstractAnimation** outptr_QAbstractAnimation) { + *outptr_QAbstractAnimation = static_cast(src); } QMetaObject* QVariantAnimation_MetaObject(const QVariantAnimation* self) { diff --git a/qt6/gen_qvariantanimation.go b/qt6/gen_qvariantanimation.go index 77d06486..0253ec67 100644 --- a/qt6/gen_qvariantanimation.go +++ b/qt6/gen_qvariantanimation.go @@ -35,44 +35,34 @@ func (this *QVariantAnimation) UnsafePointer() unsafe.Pointer { } // newQVariantAnimation constructs the type using only CGO pointers. -func newQVariantAnimation(h *C.QVariantAnimation, h_QAbstractAnimation *C.QAbstractAnimation, h_QObject *C.QObject) *QVariantAnimation { +func newQVariantAnimation(h *C.QVariantAnimation) *QVariantAnimation { if h == nil { return nil } + var outptr_QAbstractAnimation *C.QAbstractAnimation = nil + C.QVariantAnimation_virtbase(h, &outptr_QAbstractAnimation) + return &QVariantAnimation{h: h, - QAbstractAnimation: newQAbstractAnimation(h_QAbstractAnimation, h_QObject)} + QAbstractAnimation: newQAbstractAnimation(outptr_QAbstractAnimation)} } // UnsafeNewQVariantAnimation constructs the type using only unsafe pointers. -func UnsafeNewQVariantAnimation(h unsafe.Pointer, h_QAbstractAnimation unsafe.Pointer, h_QObject unsafe.Pointer) *QVariantAnimation { - if h == nil { - return nil - } - - return &QVariantAnimation{h: (*C.QVariantAnimation)(h), - QAbstractAnimation: UnsafeNewQAbstractAnimation(h_QAbstractAnimation, h_QObject)} +func UnsafeNewQVariantAnimation(h unsafe.Pointer) *QVariantAnimation { + return newQVariantAnimation((*C.QVariantAnimation)(h)) } // NewQVariantAnimation constructs a new QVariantAnimation object. func NewQVariantAnimation() *QVariantAnimation { - var outptr_QVariantAnimation *C.QVariantAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QVariantAnimation_new(&outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQVariantAnimation(outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQVariantAnimation(C.QVariantAnimation_new()) ret.isSubclass = true return ret } // NewQVariantAnimation2 constructs a new QVariantAnimation object. func NewQVariantAnimation2(parent *QObject) *QVariantAnimation { - var outptr_QVariantAnimation *C.QVariantAnimation = nil - var outptr_QAbstractAnimation *C.QAbstractAnimation = nil - var outptr_QObject *C.QObject = nil - C.QVariantAnimation_new2(parent.cPointer(), &outptr_QVariantAnimation, &outptr_QAbstractAnimation, &outptr_QObject) - ret := newQVariantAnimation(outptr_QVariantAnimation, outptr_QAbstractAnimation, outptr_QObject) + ret := newQVariantAnimation(C.QVariantAnimation_new2(parent.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qvariantanimation.h b/qt6/gen_qvariantanimation.h index a5b46712..f09a99e9 100644 --- a/qt6/gen_qvariantanimation.h +++ b/qt6/gen_qvariantanimation.h @@ -32,8 +32,9 @@ typedef struct QVariant QVariant; typedef struct QVariantAnimation QVariantAnimation; #endif -void QVariantAnimation_new(QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); -void QVariantAnimation_new2(QObject* parent, QVariantAnimation** outptr_QVariantAnimation, QAbstractAnimation** outptr_QAbstractAnimation, QObject** outptr_QObject); +QVariantAnimation* QVariantAnimation_new(); +QVariantAnimation* QVariantAnimation_new2(QObject* parent); +void QVariantAnimation_virtbase(QVariantAnimation* src, QAbstractAnimation** outptr_QAbstractAnimation); QMetaObject* QVariantAnimation_MetaObject(const QVariantAnimation* self); void* QVariantAnimation_Metacast(QVariantAnimation* self, const char* param1); struct miqt_string QVariantAnimation_Tr(const char* s); diff --git a/qt6/gen_qvarlengtharray.go b/qt6/gen_qvarlengtharray.go index 9be2e0b6..e67bfc43 100644 --- a/qt6/gen_qvarlengtharray.go +++ b/qt6/gen_qvarlengtharray.go @@ -36,16 +36,13 @@ func newQVLABaseBase(h *C.QVLABaseBase) *QVLABaseBase { if h == nil { return nil } + return &QVLABaseBase{h: h} } // UnsafeNewQVLABaseBase constructs the type using only unsafe pointers. func UnsafeNewQVLABaseBase(h unsafe.Pointer) *QVLABaseBase { - if h == nil { - return nil - } - - return &QVLABaseBase{h: (*C.QVLABaseBase)(h)} + return newQVLABaseBase((*C.QVLABaseBase)(h)) } func (this *QVLABaseBase) Capacity() int64 { diff --git a/qt6/gen_qvectornd.cpp b/qt6/gen_qvectornd.cpp index c61312a3..63ea63b3 100644 --- a/qt6/gen_qvectornd.cpp +++ b/qt6/gen_qvectornd.cpp @@ -9,44 +9,36 @@ #include "gen_qvectornd.h" #include "_cgo_export.h" -void QVector2D_new(QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new() { + return new QVector2D(); } -void QVector2D_new2(int param1, QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(static_cast(param1)); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new2(int param1) { + return new QVector2D(static_cast(param1)); } -void QVector2D_new3(float xpos, float ypos, QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(static_cast(xpos), static_cast(ypos)); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new3(float xpos, float ypos) { + return new QVector2D(static_cast(xpos), static_cast(ypos)); } -void QVector2D_new4(QPoint* point, QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(*point); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new4(QPoint* point) { + return new QVector2D(*point); } -void QVector2D_new5(QPointF* point, QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(*point); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new5(QPointF* point) { + return new QVector2D(*point); } -void QVector2D_new6(QVector3D* vector, QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(*vector); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new6(QVector3D* vector) { + return new QVector2D(*vector); } -void QVector2D_new7(QVector4D* vector, QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(*vector); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new7(QVector4D* vector) { + return new QVector2D(*vector); } -void QVector2D_new8(QVector2D* param1, QVector2D** outptr_QVector2D) { - QVector2D* ret = new QVector2D(*param1); - *outptr_QVector2D = ret; +QVector2D* QVector2D_new8(QVector2D* param1) { + return new QVector2D(*param1); } bool QVector2D_IsNull(const QVector2D* self) { @@ -161,49 +153,40 @@ void QVector2D_Delete(QVector2D* self, bool isSubclass) { } } -void QVector3D_new(QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new() { + return new QVector3D(); } -void QVector3D_new2(int param1, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(static_cast(param1)); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new2(int param1) { + return new QVector3D(static_cast(param1)); } -void QVector3D_new3(float xpos, float ypos, float zpos, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(static_cast(xpos), static_cast(ypos), static_cast(zpos)); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new3(float xpos, float ypos, float zpos) { + return new QVector3D(static_cast(xpos), static_cast(ypos), static_cast(zpos)); } -void QVector3D_new4(QPoint* point, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(*point); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new4(QPoint* point) { + return new QVector3D(*point); } -void QVector3D_new5(QPointF* point, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(*point); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new5(QPointF* point) { + return new QVector3D(*point); } -void QVector3D_new6(QVector2D* vector, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(*vector); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new6(QVector2D* vector) { + return new QVector3D(*vector); } -void QVector3D_new7(QVector2D* vector, float zpos, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(*vector, static_cast(zpos)); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new7(QVector2D* vector, float zpos) { + return new QVector3D(*vector, static_cast(zpos)); } -void QVector3D_new8(QVector4D* vector, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(*vector); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new8(QVector4D* vector) { + return new QVector3D(*vector); } -void QVector3D_new9(QVector3D* param1, QVector3D** outptr_QVector3D) { - QVector3D* ret = new QVector3D(*param1); - *outptr_QVector3D = ret; +QVector3D* QVector3D_new9(QVector3D* param1) { + return new QVector3D(*param1); } bool QVector3D_IsNull(const QVector3D* self) { @@ -354,54 +337,44 @@ void QVector3D_Delete(QVector3D* self, bool isSubclass) { } } -void QVector4D_new(QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new() { + return new QVector4D(); } -void QVector4D_new2(int param1, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(static_cast(param1)); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new2(int param1) { + return new QVector4D(static_cast(param1)); } -void QVector4D_new3(float xpos, float ypos, float zpos, float wpos, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(static_cast(xpos), static_cast(ypos), static_cast(zpos), static_cast(wpos)); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new3(float xpos, float ypos, float zpos, float wpos) { + return new QVector4D(static_cast(xpos), static_cast(ypos), static_cast(zpos), static_cast(wpos)); } -void QVector4D_new4(QPoint* point, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(*point); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new4(QPoint* point) { + return new QVector4D(*point); } -void QVector4D_new5(QPointF* point, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(*point); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new5(QPointF* point) { + return new QVector4D(*point); } -void QVector4D_new6(QVector2D* vector, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(*vector); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new6(QVector2D* vector) { + return new QVector4D(*vector); } -void QVector4D_new7(QVector2D* vector, float zpos, float wpos, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(*vector, static_cast(zpos), static_cast(wpos)); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new7(QVector2D* vector, float zpos, float wpos) { + return new QVector4D(*vector, static_cast(zpos), static_cast(wpos)); } -void QVector4D_new8(QVector3D* vector, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(*vector); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new8(QVector3D* vector) { + return new QVector4D(*vector); } -void QVector4D_new9(QVector3D* vector, float wpos, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(*vector, static_cast(wpos)); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new9(QVector3D* vector, float wpos) { + return new QVector4D(*vector, static_cast(wpos)); } -void QVector4D_new10(QVector4D* param1, QVector4D** outptr_QVector4D) { - QVector4D* ret = new QVector4D(*param1); - *outptr_QVector4D = ret; +QVector4D* QVector4D_new10(QVector4D* param1) { + return new QVector4D(*param1); } bool QVector4D_IsNull(const QVector4D* self) { diff --git a/qt6/gen_qvectornd.go b/qt6/gen_qvectornd.go index 62f9feec..0ef6cb7f 100644 --- a/qt6/gen_qvectornd.go +++ b/qt6/gen_qvectornd.go @@ -37,94 +37,75 @@ func newQVector2D(h *C.QVector2D) *QVector2D { if h == nil { return nil } + return &QVector2D{h: h} } // UnsafeNewQVector2D constructs the type using only unsafe pointers. func UnsafeNewQVector2D(h unsafe.Pointer) *QVector2D { - if h == nil { - return nil - } - - return &QVector2D{h: (*C.QVector2D)(h)} + return newQVector2D((*C.QVector2D)(h)) } // NewQVector2D constructs a new QVector2D object. func NewQVector2D() *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new(&outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new()) ret.isSubclass = true return ret } // NewQVector2D2 constructs a new QVector2D object. func NewQVector2D2(param1 Initialization) *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new2((C.int)(param1), &outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQVector2D3 constructs a new QVector2D object. func NewQVector2D3(xpos float32, ypos float32) *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new3((C.float)(xpos), (C.float)(ypos), &outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new3((C.float)(xpos), (C.float)(ypos))) ret.isSubclass = true return ret } // NewQVector2D4 constructs a new QVector2D object. func NewQVector2D4(point QPoint) *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new4(point.cPointer(), &outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new4(point.cPointer())) ret.isSubclass = true return ret } // NewQVector2D5 constructs a new QVector2D object. func NewQVector2D5(point QPointF) *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new5(point.cPointer(), &outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new5(point.cPointer())) ret.isSubclass = true return ret } // NewQVector2D6 constructs a new QVector2D object. func NewQVector2D6(vector QVector3D) *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new6(vector.cPointer(), &outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new6(vector.cPointer())) ret.isSubclass = true return ret } // NewQVector2D7 constructs a new QVector2D object. func NewQVector2D7(vector QVector4D) *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new7(vector.cPointer(), &outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new7(vector.cPointer())) ret.isSubclass = true return ret } // NewQVector2D8 constructs a new QVector2D object. func NewQVector2D8(param1 *QVector2D) *QVector2D { - var outptr_QVector2D *C.QVector2D = nil - C.QVector2D_new8(param1.cPointer(), &outptr_QVector2D) - ret := newQVector2D(outptr_QVector2D) + ret := newQVector2D(C.QVector2D_new8(param1.cPointer())) ret.isSubclass = true return ret } @@ -269,104 +250,83 @@ func newQVector3D(h *C.QVector3D) *QVector3D { if h == nil { return nil } + return &QVector3D{h: h} } // UnsafeNewQVector3D constructs the type using only unsafe pointers. func UnsafeNewQVector3D(h unsafe.Pointer) *QVector3D { - if h == nil { - return nil - } - - return &QVector3D{h: (*C.QVector3D)(h)} + return newQVector3D((*C.QVector3D)(h)) } // NewQVector3D constructs a new QVector3D object. func NewQVector3D() *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new(&outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new()) ret.isSubclass = true return ret } // NewQVector3D2 constructs a new QVector3D object. func NewQVector3D2(param1 Initialization) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new2((C.int)(param1), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQVector3D3 constructs a new QVector3D object. func NewQVector3D3(xpos float32, ypos float32, zpos float32) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos))) ret.isSubclass = true return ret } // NewQVector3D4 constructs a new QVector3D object. func NewQVector3D4(point QPoint) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new4(point.cPointer(), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new4(point.cPointer())) ret.isSubclass = true return ret } // NewQVector3D5 constructs a new QVector3D object. func NewQVector3D5(point QPointF) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new5(point.cPointer(), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new5(point.cPointer())) ret.isSubclass = true return ret } // NewQVector3D6 constructs a new QVector3D object. func NewQVector3D6(vector QVector2D) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new6(vector.cPointer(), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new6(vector.cPointer())) ret.isSubclass = true return ret } // NewQVector3D7 constructs a new QVector3D object. func NewQVector3D7(vector QVector2D, zpos float32) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new7(vector.cPointer(), (C.float)(zpos), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new7(vector.cPointer(), (C.float)(zpos))) ret.isSubclass = true return ret } // NewQVector3D8 constructs a new QVector3D object. func NewQVector3D8(vector QVector4D) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new8(vector.cPointer(), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new8(vector.cPointer())) ret.isSubclass = true return ret } // NewQVector3D9 constructs a new QVector3D object. func NewQVector3D9(param1 *QVector3D) *QVector3D { - var outptr_QVector3D *C.QVector3D = nil - C.QVector3D_new9(param1.cPointer(), &outptr_QVector3D) - ret := newQVector3D(outptr_QVector3D) + ret := newQVector3D(C.QVector3D_new9(param1.cPointer())) ret.isSubclass = true return ret } @@ -557,114 +517,91 @@ func newQVector4D(h *C.QVector4D) *QVector4D { if h == nil { return nil } + return &QVector4D{h: h} } // UnsafeNewQVector4D constructs the type using only unsafe pointers. func UnsafeNewQVector4D(h unsafe.Pointer) *QVector4D { - if h == nil { - return nil - } - - return &QVector4D{h: (*C.QVector4D)(h)} + return newQVector4D((*C.QVector4D)(h)) } // NewQVector4D constructs a new QVector4D object. func NewQVector4D() *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new(&outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new()) ret.isSubclass = true return ret } // NewQVector4D2 constructs a new QVector4D object. func NewQVector4D2(param1 Initialization) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new2((C.int)(param1), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new2((C.int)(param1))) ret.isSubclass = true return ret } // NewQVector4D3 constructs a new QVector4D object. func NewQVector4D3(xpos float32, ypos float32, zpos float32, wpos float32) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos), (C.float)(wpos), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new3((C.float)(xpos), (C.float)(ypos), (C.float)(zpos), (C.float)(wpos))) ret.isSubclass = true return ret } // NewQVector4D4 constructs a new QVector4D object. func NewQVector4D4(point QPoint) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new4(point.cPointer(), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new4(point.cPointer())) ret.isSubclass = true return ret } // NewQVector4D5 constructs a new QVector4D object. func NewQVector4D5(point QPointF) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new5(point.cPointer(), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new5(point.cPointer())) ret.isSubclass = true return ret } // NewQVector4D6 constructs a new QVector4D object. func NewQVector4D6(vector QVector2D) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new6(vector.cPointer(), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new6(vector.cPointer())) ret.isSubclass = true return ret } // NewQVector4D7 constructs a new QVector4D object. func NewQVector4D7(vector QVector2D, zpos float32, wpos float32) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new7(vector.cPointer(), (C.float)(zpos), (C.float)(wpos), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new7(vector.cPointer(), (C.float)(zpos), (C.float)(wpos))) ret.isSubclass = true return ret } // NewQVector4D8 constructs a new QVector4D object. func NewQVector4D8(vector QVector3D) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new8(vector.cPointer(), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new8(vector.cPointer())) ret.isSubclass = true return ret } // NewQVector4D9 constructs a new QVector4D object. func NewQVector4D9(vector QVector3D, wpos float32) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new9(vector.cPointer(), (C.float)(wpos), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new9(vector.cPointer(), (C.float)(wpos))) ret.isSubclass = true return ret } // NewQVector4D10 constructs a new QVector4D object. func NewQVector4D10(param1 *QVector4D) *QVector4D { - var outptr_QVector4D *C.QVector4D = nil - C.QVector4D_new10(param1.cPointer(), &outptr_QVector4D) - ret := newQVector4D(outptr_QVector4D) + ret := newQVector4D(C.QVector4D_new10(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qvectornd.h b/qt6/gen_qvectornd.h index d7d31e53..5117e97f 100644 --- a/qt6/gen_qvectornd.h +++ b/qt6/gen_qvectornd.h @@ -32,14 +32,14 @@ typedef struct QVector3D QVector3D; typedef struct QVector4D QVector4D; #endif -void QVector2D_new(QVector2D** outptr_QVector2D); -void QVector2D_new2(int param1, QVector2D** outptr_QVector2D); -void QVector2D_new3(float xpos, float ypos, QVector2D** outptr_QVector2D); -void QVector2D_new4(QPoint* point, QVector2D** outptr_QVector2D); -void QVector2D_new5(QPointF* point, QVector2D** outptr_QVector2D); -void QVector2D_new6(QVector3D* vector, QVector2D** outptr_QVector2D); -void QVector2D_new7(QVector4D* vector, QVector2D** outptr_QVector2D); -void QVector2D_new8(QVector2D* param1, QVector2D** outptr_QVector2D); +QVector2D* QVector2D_new(); +QVector2D* QVector2D_new2(int param1); +QVector2D* QVector2D_new3(float xpos, float ypos); +QVector2D* QVector2D_new4(QPoint* point); +QVector2D* QVector2D_new5(QPointF* point); +QVector2D* QVector2D_new6(QVector3D* vector); +QVector2D* QVector2D_new7(QVector4D* vector); +QVector2D* QVector2D_new8(QVector2D* param1); bool QVector2D_IsNull(const QVector2D* self); float QVector2D_X(const QVector2D* self); float QVector2D_Y(const QVector2D* self); @@ -65,15 +65,15 @@ QPoint* QVector2D_ToPoint(const QVector2D* self); QPointF* QVector2D_ToPointF(const QVector2D* self); void QVector2D_Delete(QVector2D* self, bool isSubclass); -void QVector3D_new(QVector3D** outptr_QVector3D); -void QVector3D_new2(int param1, QVector3D** outptr_QVector3D); -void QVector3D_new3(float xpos, float ypos, float zpos, QVector3D** outptr_QVector3D); -void QVector3D_new4(QPoint* point, QVector3D** outptr_QVector3D); -void QVector3D_new5(QPointF* point, QVector3D** outptr_QVector3D); -void QVector3D_new6(QVector2D* vector, QVector3D** outptr_QVector3D); -void QVector3D_new7(QVector2D* vector, float zpos, QVector3D** outptr_QVector3D); -void QVector3D_new8(QVector4D* vector, QVector3D** outptr_QVector3D); -void QVector3D_new9(QVector3D* param1, QVector3D** outptr_QVector3D); +QVector3D* QVector3D_new(); +QVector3D* QVector3D_new2(int param1); +QVector3D* QVector3D_new3(float xpos, float ypos, float zpos); +QVector3D* QVector3D_new4(QPoint* point); +QVector3D* QVector3D_new5(QPointF* point); +QVector3D* QVector3D_new6(QVector2D* vector); +QVector3D* QVector3D_new7(QVector2D* vector, float zpos); +QVector3D* QVector3D_new8(QVector4D* vector); +QVector3D* QVector3D_new9(QVector3D* param1); bool QVector3D_IsNull(const QVector3D* self); float QVector3D_X(const QVector3D* self); float QVector3D_Y(const QVector3D* self); @@ -108,16 +108,16 @@ QPoint* QVector3D_ToPoint(const QVector3D* self); QPointF* QVector3D_ToPointF(const QVector3D* self); void QVector3D_Delete(QVector3D* self, bool isSubclass); -void QVector4D_new(QVector4D** outptr_QVector4D); -void QVector4D_new2(int param1, QVector4D** outptr_QVector4D); -void QVector4D_new3(float xpos, float ypos, float zpos, float wpos, QVector4D** outptr_QVector4D); -void QVector4D_new4(QPoint* point, QVector4D** outptr_QVector4D); -void QVector4D_new5(QPointF* point, QVector4D** outptr_QVector4D); -void QVector4D_new6(QVector2D* vector, QVector4D** outptr_QVector4D); -void QVector4D_new7(QVector2D* vector, float zpos, float wpos, QVector4D** outptr_QVector4D); -void QVector4D_new8(QVector3D* vector, QVector4D** outptr_QVector4D); -void QVector4D_new9(QVector3D* vector, float wpos, QVector4D** outptr_QVector4D); -void QVector4D_new10(QVector4D* param1, QVector4D** outptr_QVector4D); +QVector4D* QVector4D_new(); +QVector4D* QVector4D_new2(int param1); +QVector4D* QVector4D_new3(float xpos, float ypos, float zpos, float wpos); +QVector4D* QVector4D_new4(QPoint* point); +QVector4D* QVector4D_new5(QPointF* point); +QVector4D* QVector4D_new6(QVector2D* vector); +QVector4D* QVector4D_new7(QVector2D* vector, float zpos, float wpos); +QVector4D* QVector4D_new8(QVector3D* vector); +QVector4D* QVector4D_new9(QVector3D* vector, float wpos); +QVector4D* QVector4D_new10(QVector4D* param1); bool QVector4D_IsNull(const QVector4D* self); float QVector4D_X(const QVector4D* self); float QVector4D_Y(const QVector4D* self); diff --git a/qt6/gen_qversionnumber.cpp b/qt6/gen_qversionnumber.cpp index 754eba57..42777ffa 100644 --- a/qt6/gen_qversionnumber.cpp +++ b/qt6/gen_qversionnumber.cpp @@ -9,40 +9,34 @@ #include "gen_qversionnumber.h" #include "_cgo_export.h" -void QVersionNumber_new(QVersionNumber** outptr_QVersionNumber) { - QVersionNumber* ret = new QVersionNumber(); - *outptr_QVersionNumber = ret; +QVersionNumber* QVersionNumber_new() { + return new QVersionNumber(); } -void QVersionNumber_new2(struct miqt_array /* of int */ seg, QVersionNumber** outptr_QVersionNumber) { +QVersionNumber* QVersionNumber_new2(struct miqt_array /* of int */ seg) { QList seg_QList; seg_QList.reserve(seg.len); int* seg_arr = static_cast(seg.data); for(size_t i = 0; i < seg.len; ++i) { seg_QList.push_back(static_cast(seg_arr[i])); } - QVersionNumber* ret = new QVersionNumber(seg_QList); - *outptr_QVersionNumber = ret; + return new QVersionNumber(seg_QList); } -void QVersionNumber_new3(int maj, QVersionNumber** outptr_QVersionNumber) { - QVersionNumber* ret = new QVersionNumber(static_cast(maj)); - *outptr_QVersionNumber = ret; +QVersionNumber* QVersionNumber_new3(int maj) { + return new QVersionNumber(static_cast(maj)); } -void QVersionNumber_new4(int maj, int min, QVersionNumber** outptr_QVersionNumber) { - QVersionNumber* ret = new QVersionNumber(static_cast(maj), static_cast(min)); - *outptr_QVersionNumber = ret; +QVersionNumber* QVersionNumber_new4(int maj, int min) { + return new QVersionNumber(static_cast(maj), static_cast(min)); } -void QVersionNumber_new5(int maj, int min, int mic, QVersionNumber** outptr_QVersionNumber) { - QVersionNumber* ret = new QVersionNumber(static_cast(maj), static_cast(min), static_cast(mic)); - *outptr_QVersionNumber = ret; +QVersionNumber* QVersionNumber_new5(int maj, int min, int mic) { + return new QVersionNumber(static_cast(maj), static_cast(min), static_cast(mic)); } -void QVersionNumber_new6(QVersionNumber* param1, QVersionNumber** outptr_QVersionNumber) { - QVersionNumber* ret = new QVersionNumber(*param1); - *outptr_QVersionNumber = ret; +QVersionNumber* QVersionNumber_new6(QVersionNumber* param1) { + return new QVersionNumber(*param1); } bool QVersionNumber_IsNull(const QVersionNumber* self) { @@ -130,14 +124,12 @@ void QVersionNumber_Delete(QVersionNumber* self, bool isSubclass) { } } -void QTypeRevision_new(QTypeRevision** outptr_QTypeRevision) { - QTypeRevision* ret = new QTypeRevision(); - *outptr_QTypeRevision = ret; +QTypeRevision* QTypeRevision_new() { + return new QTypeRevision(); } -void QTypeRevision_new2(QTypeRevision* param1, QTypeRevision** outptr_QTypeRevision) { - QTypeRevision* ret = new QTypeRevision(*param1); - *outptr_QTypeRevision = ret; +QTypeRevision* QTypeRevision_new2(QTypeRevision* param1) { + return new QTypeRevision(*param1); } QTypeRevision* QTypeRevision_Zero() { diff --git a/qt6/gen_qversionnumber.go b/qt6/gen_qversionnumber.go index 6f7cfa09..ff6c03f7 100644 --- a/qt6/gen_qversionnumber.go +++ b/qt6/gen_qversionnumber.go @@ -37,24 +37,19 @@ func newQVersionNumber(h *C.QVersionNumber) *QVersionNumber { if h == nil { return nil } + return &QVersionNumber{h: h} } // UnsafeNewQVersionNumber constructs the type using only unsafe pointers. func UnsafeNewQVersionNumber(h unsafe.Pointer) *QVersionNumber { - if h == nil { - return nil - } - - return &QVersionNumber{h: (*C.QVersionNumber)(h)} + return newQVersionNumber((*C.QVersionNumber)(h)) } // NewQVersionNumber constructs a new QVersionNumber object. func NewQVersionNumber() *QVersionNumber { - var outptr_QVersionNumber *C.QVersionNumber = nil - C.QVersionNumber_new(&outptr_QVersionNumber) - ret := newQVersionNumber(outptr_QVersionNumber) + ret := newQVersionNumber(C.QVersionNumber_new()) ret.isSubclass = true return ret } @@ -67,50 +62,40 @@ func NewQVersionNumber2(seg []int) *QVersionNumber { seg_CArray[i] = (C.int)(seg[i]) } seg_ma := C.struct_miqt_array{len: C.size_t(len(seg)), data: unsafe.Pointer(seg_CArray)} - var outptr_QVersionNumber *C.QVersionNumber = nil - C.QVersionNumber_new2(seg_ma, &outptr_QVersionNumber) - ret := newQVersionNumber(outptr_QVersionNumber) + ret := newQVersionNumber(C.QVersionNumber_new2(seg_ma)) ret.isSubclass = true return ret } // NewQVersionNumber3 constructs a new QVersionNumber object. func NewQVersionNumber3(maj int) *QVersionNumber { - var outptr_QVersionNumber *C.QVersionNumber = nil - C.QVersionNumber_new3((C.int)(maj), &outptr_QVersionNumber) - ret := newQVersionNumber(outptr_QVersionNumber) + ret := newQVersionNumber(C.QVersionNumber_new3((C.int)(maj))) ret.isSubclass = true return ret } // NewQVersionNumber4 constructs a new QVersionNumber object. func NewQVersionNumber4(maj int, min int) *QVersionNumber { - var outptr_QVersionNumber *C.QVersionNumber = nil - C.QVersionNumber_new4((C.int)(maj), (C.int)(min), &outptr_QVersionNumber) - ret := newQVersionNumber(outptr_QVersionNumber) + ret := newQVersionNumber(C.QVersionNumber_new4((C.int)(maj), (C.int)(min))) ret.isSubclass = true return ret } // NewQVersionNumber5 constructs a new QVersionNumber object. func NewQVersionNumber5(maj int, min int, mic int) *QVersionNumber { - var outptr_QVersionNumber *C.QVersionNumber = nil - C.QVersionNumber_new5((C.int)(maj), (C.int)(min), (C.int)(mic), &outptr_QVersionNumber) - ret := newQVersionNumber(outptr_QVersionNumber) + ret := newQVersionNumber(C.QVersionNumber_new5((C.int)(maj), (C.int)(min), (C.int)(mic))) ret.isSubclass = true return ret } // NewQVersionNumber6 constructs a new QVersionNumber object. func NewQVersionNumber6(param1 *QVersionNumber) *QVersionNumber { - var outptr_QVersionNumber *C.QVersionNumber = nil - C.QVersionNumber_new6(param1.cPointer(), &outptr_QVersionNumber) - ret := newQVersionNumber(outptr_QVersionNumber) + ret := newQVersionNumber(C.QVersionNumber_new6(param1.cPointer())) ret.isSubclass = true return ret } @@ -230,34 +215,27 @@ func newQTypeRevision(h *C.QTypeRevision) *QTypeRevision { if h == nil { return nil } + return &QTypeRevision{h: h} } // UnsafeNewQTypeRevision constructs the type using only unsafe pointers. func UnsafeNewQTypeRevision(h unsafe.Pointer) *QTypeRevision { - if h == nil { - return nil - } - - return &QTypeRevision{h: (*C.QTypeRevision)(h)} + return newQTypeRevision((*C.QTypeRevision)(h)) } // NewQTypeRevision constructs a new QTypeRevision object. func NewQTypeRevision() *QTypeRevision { - var outptr_QTypeRevision *C.QTypeRevision = nil - C.QTypeRevision_new(&outptr_QTypeRevision) - ret := newQTypeRevision(outptr_QTypeRevision) + ret := newQTypeRevision(C.QTypeRevision_new()) ret.isSubclass = true return ret } // NewQTypeRevision2 constructs a new QTypeRevision object. func NewQTypeRevision2(param1 *QTypeRevision) *QTypeRevision { - var outptr_QTypeRevision *C.QTypeRevision = nil - C.QTypeRevision_new2(param1.cPointer(), &outptr_QTypeRevision) - ret := newQTypeRevision(outptr_QTypeRevision) + ret := newQTypeRevision(C.QTypeRevision_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/gen_qversionnumber.h b/qt6/gen_qversionnumber.h index da56e0e3..09f309d1 100644 --- a/qt6/gen_qversionnumber.h +++ b/qt6/gen_qversionnumber.h @@ -24,12 +24,12 @@ typedef struct QTypeRevision QTypeRevision; typedef struct QVersionNumber QVersionNumber; #endif -void QVersionNumber_new(QVersionNumber** outptr_QVersionNumber); -void QVersionNumber_new2(struct miqt_array /* of int */ seg, QVersionNumber** outptr_QVersionNumber); -void QVersionNumber_new3(int maj, QVersionNumber** outptr_QVersionNumber); -void QVersionNumber_new4(int maj, int min, QVersionNumber** outptr_QVersionNumber); -void QVersionNumber_new5(int maj, int min, int mic, QVersionNumber** outptr_QVersionNumber); -void QVersionNumber_new6(QVersionNumber* param1, QVersionNumber** outptr_QVersionNumber); +QVersionNumber* QVersionNumber_new(); +QVersionNumber* QVersionNumber_new2(struct miqt_array /* of int */ seg); +QVersionNumber* QVersionNumber_new3(int maj); +QVersionNumber* QVersionNumber_new4(int maj, int min); +QVersionNumber* QVersionNumber_new5(int maj, int min, int mic); +QVersionNumber* QVersionNumber_new6(QVersionNumber* param1); bool QVersionNumber_IsNull(const QVersionNumber* self); bool QVersionNumber_IsNormalized(const QVersionNumber* self); int QVersionNumber_MajorVersion(const QVersionNumber* self); @@ -47,8 +47,8 @@ QVersionNumber* QVersionNumber_FromString(QAnyStringView* stringVal); QVersionNumber* QVersionNumber_FromString2(QAnyStringView* stringVal, ptrdiff_t* suffixIndex); void QVersionNumber_Delete(QVersionNumber* self, bool isSubclass); -void QTypeRevision_new(QTypeRevision** outptr_QTypeRevision); -void QTypeRevision_new2(QTypeRevision* param1, QTypeRevision** outptr_QTypeRevision); +QTypeRevision* QTypeRevision_new(); +QTypeRevision* QTypeRevision_new2(QTypeRevision* param1); QTypeRevision* QTypeRevision_Zero(); bool QTypeRevision_HasMajorVersion(const QTypeRevision* self); unsigned char QTypeRevision_MajorVersion(const QTypeRevision* self); diff --git a/qt6/gen_qwaitcondition.cpp b/qt6/gen_qwaitcondition.cpp index 180ef11e..d625dceb 100644 --- a/qt6/gen_qwaitcondition.cpp +++ b/qt6/gen_qwaitcondition.cpp @@ -6,9 +6,8 @@ #include "gen_qwaitcondition.h" #include "_cgo_export.h" -void QWaitCondition_new(QWaitCondition** outptr_QWaitCondition) { - QWaitCondition* ret = new QWaitCondition(); - *outptr_QWaitCondition = ret; +QWaitCondition* QWaitCondition_new() { + return new QWaitCondition(); } bool QWaitCondition_Wait(QWaitCondition* self, QMutex* lockedMutex) { diff --git a/qt6/gen_qwaitcondition.go b/qt6/gen_qwaitcondition.go index e9c8833d..18ea107f 100644 --- a/qt6/gen_qwaitcondition.go +++ b/qt6/gen_qwaitcondition.go @@ -37,24 +37,19 @@ func newQWaitCondition(h *C.QWaitCondition) *QWaitCondition { if h == nil { return nil } + return &QWaitCondition{h: h} } // UnsafeNewQWaitCondition constructs the type using only unsafe pointers. func UnsafeNewQWaitCondition(h unsafe.Pointer) *QWaitCondition { - if h == nil { - return nil - } - - return &QWaitCondition{h: (*C.QWaitCondition)(h)} + return newQWaitCondition((*C.QWaitCondition)(h)) } // NewQWaitCondition constructs a new QWaitCondition object. func NewQWaitCondition() *QWaitCondition { - var outptr_QWaitCondition *C.QWaitCondition = nil - C.QWaitCondition_new(&outptr_QWaitCondition) - ret := newQWaitCondition(outptr_QWaitCondition) + ret := newQWaitCondition(C.QWaitCondition_new()) ret.isSubclass = true return ret } diff --git a/qt6/gen_qwaitcondition.h b/qt6/gen_qwaitcondition.h index 177b0fb0..86ee96d6 100644 --- a/qt6/gen_qwaitcondition.h +++ b/qt6/gen_qwaitcondition.h @@ -26,7 +26,7 @@ typedef struct QReadWriteLock QReadWriteLock; typedef struct QWaitCondition QWaitCondition; #endif -void QWaitCondition_new(QWaitCondition** outptr_QWaitCondition); +QWaitCondition* QWaitCondition_new(); bool QWaitCondition_Wait(QWaitCondition* self, QMutex* lockedMutex); bool QWaitCondition_Wait2(QWaitCondition* self, QMutex* lockedMutex, unsigned long time); bool QWaitCondition_WaitWithLockedReadWriteLock(QWaitCondition* self, QReadWriteLock* lockedReadWriteLock); diff --git a/qt6/gen_qwhatsthis.go b/qt6/gen_qwhatsthis.go index f38927e7..0c491c93 100644 --- a/qt6/gen_qwhatsthis.go +++ b/qt6/gen_qwhatsthis.go @@ -37,16 +37,13 @@ func newQWhatsThis(h *C.QWhatsThis) *QWhatsThis { if h == nil { return nil } + return &QWhatsThis{h: h} } // UnsafeNewQWhatsThis constructs the type using only unsafe pointers. func UnsafeNewQWhatsThis(h unsafe.Pointer) *QWhatsThis { - if h == nil { - return nil - } - - return &QWhatsThis{h: (*C.QWhatsThis)(h)} + return newQWhatsThis((*C.QWhatsThis)(h)) } func QWhatsThis_EnterWhatsThisMode() { @@ -74,7 +71,7 @@ func QWhatsThis_HideText() { } func QWhatsThis_CreateAction() *QAction { - return newQAction(C.QWhatsThis_CreateAction(), nil) + return newQAction(C.QWhatsThis_CreateAction()) } func QWhatsThis_ShowText3(pos *QPoint, text string, w *QWidget) { @@ -86,7 +83,7 @@ func QWhatsThis_ShowText3(pos *QPoint, text string, w *QWidget) { } func QWhatsThis_CreateAction1(parent *QObject) *QAction { - return newQAction(C.QWhatsThis_CreateAction1(parent.cPointer()), nil) + return newQAction(C.QWhatsThis_CreateAction1(parent.cPointer())) } // Delete this object from C++ memory. diff --git a/qt6/gen_qwidget.cpp b/qt6/gen_qwidget.cpp index 4995d1b2..d34a1f52 100644 --- a/qt6/gen_qwidget.cpp +++ b/qt6/gen_qwidget.cpp @@ -63,9 +63,8 @@ #include "gen_qwidget.h" #include "_cgo_export.h" -void QWidgetData_new(QWidgetData* param1, QWidgetData** outptr_QWidgetData) { - QWidgetData* ret = new QWidgetData(*param1); - *outptr_QWidgetData = ret; +QWidgetData* QWidgetData_new(QWidgetData* param1) { + return new QWidgetData(*param1); } void QWidgetData_OperatorAssign(QWidgetData* self, QWidgetData* param1) { @@ -1215,25 +1214,21 @@ public: }; -void QWidget_new(QWidget* parent, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWidget* ret = new MiqtVirtualQWidget(parent); - *outptr_QWidget = ret; - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWidget* QWidget_new(QWidget* parent) { + return new MiqtVirtualQWidget(parent); } -void QWidget_new2(QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWidget* ret = new MiqtVirtualQWidget(); - *outptr_QWidget = ret; - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWidget* QWidget_new2() { + return new MiqtVirtualQWidget(); } -void QWidget_new3(QWidget* parent, int f, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWidget* ret = new MiqtVirtualQWidget(parent, static_cast(f)); - *outptr_QWidget = ret; - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWidget* QWidget_new3(QWidget* parent, int f) { + return new MiqtVirtualQWidget(parent, static_cast(f)); +} + +void QWidget_virtbase(QWidget* src, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { + *outptr_QObject = static_cast(src); + *outptr_QPaintDevice = static_cast(src); } QMetaObject* QWidget_MetaObject(const QWidget* self) { diff --git a/qt6/gen_qwidget.go b/qt6/gen_qwidget.go index 2facde59..30fb2d35 100644 --- a/qt6/gen_qwidget.go +++ b/qt6/gen_qwidget.go @@ -46,24 +46,19 @@ func newQWidgetData(h *C.QWidgetData) *QWidgetData { if h == nil { return nil } + return &QWidgetData{h: h} } // UnsafeNewQWidgetData constructs the type using only unsafe pointers. func UnsafeNewQWidgetData(h unsafe.Pointer) *QWidgetData { - if h == nil { - return nil - } - - return &QWidgetData{h: (*C.QWidgetData)(h)} + return newQWidgetData((*C.QWidgetData)(h)) } // NewQWidgetData constructs a new QWidgetData object. func NewQWidgetData(param1 *QWidgetData) *QWidgetData { - var outptr_QWidgetData *C.QWidgetData = nil - C.QWidgetData_new(param1.cPointer(), &outptr_QWidgetData) - ret := newQWidgetData(outptr_QWidgetData) + ret := newQWidgetData(C.QWidgetData_new(param1.cPointer())) ret.isSubclass = true return ret } @@ -108,58 +103,44 @@ func (this *QWidget) UnsafePointer() unsafe.Pointer { } // newQWidget constructs the type using only CGO pointers. -func newQWidget(h *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWidget { +func newQWidget(h *C.QWidget) *QWidget { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QPaintDevice *C.QPaintDevice = nil + C.QWidget_virtbase(h, &outptr_QObject, &outptr_QPaintDevice) + return &QWidget{h: h, - QObject: newQObject(h_QObject), - QPaintDevice: newQPaintDevice(h_QPaintDevice)} + QObject: newQObject(outptr_QObject), + QPaintDevice: newQPaintDevice(outptr_QPaintDevice)} } // UnsafeNewQWidget constructs the type using only unsafe pointers. -func UnsafeNewQWidget(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWidget { - if h == nil { - return nil - } - - return &QWidget{h: (*C.QWidget)(h), - QObject: UnsafeNewQObject(h_QObject), - QPaintDevice: UnsafeNewQPaintDevice(h_QPaintDevice)} +func UnsafeNewQWidget(h unsafe.Pointer) *QWidget { + return newQWidget((*C.QWidget)(h)) } // NewQWidget constructs a new QWidget object. func NewQWidget(parent *QWidget) *QWidget { - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWidget_new(parent.cPointer(), &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWidget(outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWidget(C.QWidget_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQWidget2 constructs a new QWidget object. func NewQWidget2() *QWidget { - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWidget_new2(&outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWidget(outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWidget(C.QWidget_new2()) ret.isSubclass = true return ret } // NewQWidget3 constructs a new QWidget object. func NewQWidget3(parent *QWidget, f WindowType) *QWidget { - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWidget_new3(parent.cPointer(), (C.int)(f), &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWidget(outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWidget(C.QWidget_new3(parent.cPointer(), (C.int)(f))) ret.isSubclass = true return ret } @@ -204,7 +185,7 @@ func (this *QWidget) EffectiveWinId() uintptr { } func (this *QWidget) Style() *QStyle { - return newQStyle(C.QWidget_Style(this.h), nil) + return newQStyle(C.QWidget_Style(this.h)) } func (this *QWidget) SetStyle(style *QStyle) { @@ -496,15 +477,15 @@ func (this *QWidget) MapFrom2(param1 *QWidget, param2 *QPoint) *QPoint { } func (this *QWidget) Window() *QWidget { - return newQWidget(C.QWidget_Window(this.h), nil, nil) + return newQWidget(C.QWidget_Window(this.h)) } func (this *QWidget) NativeParentWidget() *QWidget { - return newQWidget(C.QWidget_NativeParentWidget(this.h), nil, nil) + return newQWidget(C.QWidget_NativeParentWidget(this.h)) } func (this *QWidget) TopLevelWidget() *QWidget { - return newQWidget(C.QWidget_TopLevelWidget(this.h), nil, nil) + return newQWidget(C.QWidget_TopLevelWidget(this.h)) } func (this *QWidget) Palette() *QPalette { @@ -612,13 +593,13 @@ func (this *QWidget) RenderWithPainter(painter *QPainter) { } func (this *QWidget) Grab() *QPixmap { - _goptr := newQPixmap(C.QWidget_Grab(this.h), nil) + _goptr := newQPixmap(C.QWidget_Grab(this.h)) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QWidget) GraphicsEffect() *QGraphicsEffect { - return newQGraphicsEffect(C.QWidget_GraphicsEffect(this.h), nil) + return newQGraphicsEffect(C.QWidget_GraphicsEffect(this.h)) } func (this *QWidget) SetGraphicsEffect(effect *QGraphicsEffect) { @@ -888,7 +869,7 @@ func (this *QWidget) SetFocusProxy(focusProxy *QWidget) { } func (this *QWidget) FocusProxy() *QWidget { - return newQWidget(C.QWidget_FocusProxy(this.h), nil, nil) + return newQWidget(C.QWidget_FocusProxy(this.h)) } func (this *QWidget) ContextMenuPolicy() ContextMenuPolicy { @@ -936,11 +917,11 @@ func (this *QWidget) SetShortcutAutoRepeat(id int) { } func QWidget_MouseGrabber() *QWidget { - return newQWidget(C.QWidget_MouseGrabber(), nil, nil) + return newQWidget(C.QWidget_MouseGrabber()) } func QWidget_KeyboardGrabber() *QWidget { - return newQWidget(C.QWidget_KeyboardGrabber(), nil, nil) + return newQWidget(C.QWidget_KeyboardGrabber()) } func (this *QWidget) UpdatesEnabled() bool { @@ -952,7 +933,7 @@ func (this *QWidget) SetUpdatesEnabled(enable bool) { } func (this *QWidget) GraphicsProxyWidget() *QGraphicsProxyWidget { - return newQGraphicsProxyWidget(C.QWidget_GraphicsProxyWidget(this.h), nil, nil, nil, nil, nil) + return newQGraphicsProxyWidget(C.QWidget_GraphicsProxyWidget(this.h)) } func (this *QWidget) Update() { @@ -1174,7 +1155,7 @@ func (this *QWidget) ContentsRect() *QRect { } func (this *QWidget) Layout() *QLayout { - return newQLayout(C.QWidget_Layout(this.h), nil, nil) + return newQLayout(C.QWidget_Layout(this.h)) } func (this *QWidget) SetLayout(layout *QLayout) { @@ -1202,15 +1183,15 @@ func (this *QWidget) Scroll2(dx int, dy int, param3 *QRect) { } func (this *QWidget) FocusWidget() *QWidget { - return newQWidget(C.QWidget_FocusWidget(this.h), nil, nil) + return newQWidget(C.QWidget_FocusWidget(this.h)) } func (this *QWidget) NextInFocusChain() *QWidget { - return newQWidget(C.QWidget_NextInFocusChain(this.h), nil, nil) + return newQWidget(C.QWidget_NextInFocusChain(this.h)) } func (this *QWidget) PreviousInFocusChain() *QWidget { - return newQWidget(C.QWidget_PreviousInFocusChain(this.h), nil, nil) + return newQWidget(C.QWidget_PreviousInFocusChain(this.h)) } func (this *QWidget) AcceptDrops() bool { @@ -1258,7 +1239,7 @@ func (this *QWidget) Actions() []*QAction { _ret := make([]*QAction, int(_ma.len)) _outCast := (*[0xffff]*C.QAction)(unsafe.Pointer(_ma.data)) // hey ya for i := 0; i < int(_ma.len); i++ { - _ret[i] = newQAction(_outCast[i], nil) + _ret[i] = newQAction(_outCast[i]) } return _ret } @@ -1268,7 +1249,7 @@ func (this *QWidget) AddActionWithText(text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QWidget_AddActionWithText(this.h, text_ms), nil) + return newQAction(C.QWidget_AddActionWithText(this.h, text_ms)) } func (this *QWidget) AddAction2(icon *QIcon, text string) *QAction { @@ -1276,7 +1257,7 @@ func (this *QWidget) AddAction2(icon *QIcon, text string) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QWidget_AddAction2(this.h, icon.cPointer(), text_ms), nil) + return newQAction(C.QWidget_AddAction2(this.h, icon.cPointer(), text_ms)) } func (this *QWidget) AddAction3(text string, shortcut *QKeySequence) *QAction { @@ -1284,7 +1265,7 @@ func (this *QWidget) AddAction3(text string, shortcut *QKeySequence) *QAction { text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QWidget_AddAction3(this.h, text_ms, shortcut.cPointer()), nil) + return newQAction(C.QWidget_AddAction3(this.h, text_ms, shortcut.cPointer())) } func (this *QWidget) AddAction4(icon *QIcon, text string, shortcut *QKeySequence) *QAction { @@ -1292,11 +1273,11 @@ func (this *QWidget) AddAction4(icon *QIcon, text string, shortcut *QKeySequence text_ms.data = C.CString(text) text_ms.len = C.size_t(len(text)) defer C.free(unsafe.Pointer(text_ms.data)) - return newQAction(C.QWidget_AddAction4(this.h, icon.cPointer(), text_ms, shortcut.cPointer()), nil) + return newQAction(C.QWidget_AddAction4(this.h, icon.cPointer(), text_ms, shortcut.cPointer())) } func (this *QWidget) ParentWidget() *QWidget { - return newQWidget(C.QWidget_ParentWidget(this.h), nil, nil) + return newQWidget(C.QWidget_ParentWidget(this.h)) } func (this *QWidget) SetWindowFlags(typeVal WindowType) { @@ -1320,15 +1301,15 @@ func (this *QWidget) WindowType() WindowType { } func QWidget_Find(param1 uintptr) *QWidget { - return newQWidget(C.QWidget_Find((C.uintptr_t)(param1)), nil, nil) + return newQWidget(C.QWidget_Find((C.uintptr_t)(param1))) } func (this *QWidget) ChildAt(x int, y int) *QWidget { - return newQWidget(C.QWidget_ChildAt(this.h, (C.int)(x), (C.int)(y)), nil, nil) + return newQWidget(C.QWidget_ChildAt(this.h, (C.int)(x), (C.int)(y))) } func (this *QWidget) ChildAtWithQPoint(p *QPoint) *QWidget { - return newQWidget(C.QWidget_ChildAtWithQPoint(this.h, p.cPointer()), nil, nil) + return newQWidget(C.QWidget_ChildAtWithQPoint(this.h, p.cPointer())) } func (this *QWidget) SetAttribute(param1 WidgetAttribute) { @@ -1364,11 +1345,11 @@ func (this *QWidget) BackingStore() *QBackingStore { } func (this *QWidget) WindowHandle() *QWindow { - return newQWindow(C.QWidget_WindowHandle(this.h), nil, nil) + return newQWindow(C.QWidget_WindowHandle(this.h)) } func (this *QWidget) Screen() *QScreen { - return newQScreen(C.QWidget_Screen(this.h), nil) + return newQScreen(C.QWidget_Screen(this.h)) } func (this *QWidget) SetScreen(screen *QScreen) { @@ -1376,7 +1357,7 @@ func (this *QWidget) SetScreen(screen *QScreen) { } func QWidget_CreateWindowContainer(window *QWindow) *QWidget { - return newQWidget(C.QWidget_CreateWindowContainer(window.cPointer()), nil, nil) + return newQWidget(C.QWidget_CreateWindowContainer(window.cPointer())) } func (this *QWidget) WindowTitleChanged(title string) { @@ -1534,7 +1515,7 @@ func (this *QWidget) Render42(painter *QPainter, targetOffset *QPoint, sourceReg } func (this *QWidget) Grab1(rectangle *QRect) *QPixmap { - _goptr := newQPixmap(C.QWidget_Grab1(this.h, rectangle.cPointer()), nil) + _goptr := newQPixmap(C.QWidget_Grab1(this.h, rectangle.cPointer())) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -1564,11 +1545,11 @@ func (this *QWidget) SetAttribute2(param1 WidgetAttribute, on bool) { } func QWidget_CreateWindowContainer2(window *QWindow, parent *QWidget) *QWidget { - return newQWidget(C.QWidget_CreateWindowContainer2(window.cPointer(), parent.cPointer()), nil, nil) + return newQWidget(C.QWidget_CreateWindowContainer2(window.cPointer(), parent.cPointer())) } func QWidget_CreateWindowContainer3(window *QWindow, parent *QWidget, flags WindowType) *QWidget { - return newQWidget(C.QWidget_CreateWindowContainer3(window.cPointer(), parent.cPointer(), (C.int)(flags)), nil, nil) + return newQWidget(C.QWidget_CreateWindowContainer3(window.cPointer(), parent.cPointer(), (C.int)(flags))) } func (this *QWidget) callVirtualBase_DevType() int { @@ -1802,7 +1783,7 @@ func miqt_exec_callback_QWidget_MousePressEvent(self *C.QWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1828,7 +1809,7 @@ func miqt_exec_callback_QWidget_MouseReleaseEvent(self *C.QWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1854,7 +1835,7 @@ func miqt_exec_callback_QWidget_MouseDoubleClickEvent(self *C.QWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1880,7 +1861,7 @@ func miqt_exec_callback_QWidget_MouseMoveEvent(self *C.QWidget, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1906,7 +1887,7 @@ func miqt_exec_callback_QWidget_WheelEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1932,7 +1913,7 @@ func miqt_exec_callback_QWidget_KeyPressEvent(self *C.QWidget, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1958,7 +1939,7 @@ func miqt_exec_callback_QWidget_KeyReleaseEvent(self *C.QWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1984,7 +1965,7 @@ func miqt_exec_callback_QWidget_FocusInEvent(self *C.QWidget, cb C.intptr_t, eve } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -2010,7 +1991,7 @@ func miqt_exec_callback_QWidget_FocusOutEvent(self *C.QWidget, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -2036,7 +2017,7 @@ func miqt_exec_callback_QWidget_EnterEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -2088,7 +2069,7 @@ func miqt_exec_callback_QWidget_PaintEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -2114,7 +2095,7 @@ func miqt_exec_callback_QWidget_MoveEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -2140,7 +2121,7 @@ func miqt_exec_callback_QWidget_ResizeEvent(self *C.QWidget, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -2166,7 +2147,7 @@ func miqt_exec_callback_QWidget_CloseEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -2192,7 +2173,7 @@ func miqt_exec_callback_QWidget_ContextMenuEvent(self *C.QWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -2218,7 +2199,7 @@ func miqt_exec_callback_QWidget_TabletEvent(self *C.QWidget, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -2244,7 +2225,7 @@ func miqt_exec_callback_QWidget_ActionEvent(self *C.QWidget, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -2270,7 +2251,7 @@ func miqt_exec_callback_QWidget_DragEnterEvent(self *C.QWidget, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -2296,7 +2277,7 @@ func miqt_exec_callback_QWidget_DragMoveEvent(self *C.QWidget, cb C.intptr_t, ev } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -2322,7 +2303,7 @@ func miqt_exec_callback_QWidget_DragLeaveEvent(self *C.QWidget, cb C.intptr_t, e } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -2348,7 +2329,7 @@ func miqt_exec_callback_QWidget_DropEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -2374,7 +2355,7 @@ func miqt_exec_callback_QWidget_ShowEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -2400,7 +2381,7 @@ func miqt_exec_callback_QWidget_HideEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -2596,7 +2577,7 @@ func miqt_exec_callback_QWidget_InputMethodEvent(self *C.QWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) @@ -2710,7 +2691,7 @@ func miqt_exec_callback_QWidget_TimerEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -2736,7 +2717,7 @@ func miqt_exec_callback_QWidget_ChildEvent(self *C.QWidget, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QWidget{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qwidget.h b/qt6/gen_qwidget.h index c9fd4dae..e771742c 100644 --- a/qt6/gen_qwidget.h +++ b/qt6/gen_qwidget.h @@ -130,13 +130,14 @@ typedef struct QWidgetData QWidgetData; typedef struct QWindow QWindow; #endif -void QWidgetData_new(QWidgetData* param1, QWidgetData** outptr_QWidgetData); +QWidgetData* QWidgetData_new(QWidgetData* param1); void QWidgetData_OperatorAssign(QWidgetData* self, QWidgetData* param1); void QWidgetData_Delete(QWidgetData* self, bool isSubclass); -void QWidget_new(QWidget* parent, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWidget_new2(QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWidget_new3(QWidget* parent, int f, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QWidget* QWidget_new(QWidget* parent); +QWidget* QWidget_new2(); +QWidget* QWidget_new3(QWidget* parent, int f); +void QWidget_virtbase(QWidget* src, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); QMetaObject* QWidget_MetaObject(const QWidget* self); void* QWidget_Metacast(QWidget* self, const char* param1); struct miqt_string QWidget_Tr(const char* s); diff --git a/qt6/gen_qwidgetaction.cpp b/qt6/gen_qwidgetaction.cpp index 5a4b7f68..8474ac06 100644 --- a/qt6/gen_qwidgetaction.cpp +++ b/qt6/gen_qwidgetaction.cpp @@ -114,11 +114,12 @@ public: }; -void QWidgetAction_new(QObject* parent, QWidgetAction** outptr_QWidgetAction, QAction** outptr_QAction, QObject** outptr_QObject) { - MiqtVirtualQWidgetAction* ret = new MiqtVirtualQWidgetAction(parent); - *outptr_QWidgetAction = ret; - *outptr_QAction = static_cast(ret); - *outptr_QObject = static_cast(ret); +QWidgetAction* QWidgetAction_new(QObject* parent) { + return new MiqtVirtualQWidgetAction(parent); +} + +void QWidgetAction_virtbase(QWidgetAction* src, QAction** outptr_QAction) { + *outptr_QAction = static_cast(src); } QMetaObject* QWidgetAction_MetaObject(const QWidgetAction* self) { diff --git a/qt6/gen_qwidgetaction.go b/qt6/gen_qwidgetaction.go index 5d9f9c31..09c3e80e 100644 --- a/qt6/gen_qwidgetaction.go +++ b/qt6/gen_qwidgetaction.go @@ -35,32 +35,26 @@ func (this *QWidgetAction) UnsafePointer() unsafe.Pointer { } // newQWidgetAction constructs the type using only CGO pointers. -func newQWidgetAction(h *C.QWidgetAction, h_QAction *C.QAction, h_QObject *C.QObject) *QWidgetAction { +func newQWidgetAction(h *C.QWidgetAction) *QWidgetAction { if h == nil { return nil } + var outptr_QAction *C.QAction = nil + C.QWidgetAction_virtbase(h, &outptr_QAction) + return &QWidgetAction{h: h, - QAction: newQAction(h_QAction, h_QObject)} + QAction: newQAction(outptr_QAction)} } // UnsafeNewQWidgetAction constructs the type using only unsafe pointers. -func UnsafeNewQWidgetAction(h unsafe.Pointer, h_QAction unsafe.Pointer, h_QObject unsafe.Pointer) *QWidgetAction { - if h == nil { - return nil - } - - return &QWidgetAction{h: (*C.QWidgetAction)(h), - QAction: UnsafeNewQAction(h_QAction, h_QObject)} +func UnsafeNewQWidgetAction(h unsafe.Pointer) *QWidgetAction { + return newQWidgetAction((*C.QWidgetAction)(h)) } // NewQWidgetAction constructs a new QWidgetAction object. func NewQWidgetAction(parent *QObject) *QWidgetAction { - var outptr_QWidgetAction *C.QWidgetAction = nil - var outptr_QAction *C.QAction = nil - var outptr_QObject *C.QObject = nil - C.QWidgetAction_new(parent.cPointer(), &outptr_QWidgetAction, &outptr_QAction, &outptr_QObject) - ret := newQWidgetAction(outptr_QWidgetAction, outptr_QAction, outptr_QObject) + ret := newQWidgetAction(C.QWidgetAction_new(parent.cPointer())) ret.isSubclass = true return ret } @@ -89,11 +83,11 @@ func (this *QWidgetAction) SetDefaultWidget(w *QWidget) { } func (this *QWidgetAction) DefaultWidget() *QWidget { - return newQWidget(C.QWidgetAction_DefaultWidget(this.h), nil, nil) + return newQWidget(C.QWidgetAction_DefaultWidget(this.h)) } func (this *QWidgetAction) RequestWidget(parent *QWidget) *QWidget { - return newQWidget(C.QWidgetAction_RequestWidget(this.h, parent.cPointer()), nil, nil) + return newQWidget(C.QWidgetAction_RequestWidget(this.h, parent.cPointer())) } func (this *QWidgetAction) ReleaseWidget(widget *QWidget) { @@ -182,7 +176,7 @@ func miqt_exec_callback_QWidgetAction_EventFilter(self *C.QWidgetAction, cb C.in func (this *QWidgetAction) callVirtualBase_CreateWidget(parent *QWidget) *QWidget { - return newQWidget(C.QWidgetAction_virtualbase_CreateWidget(unsafe.Pointer(this.h), parent.cPointer()), nil, nil) + return newQWidget(C.QWidgetAction_virtualbase_CreateWidget(unsafe.Pointer(this.h), parent.cPointer())) } func (this *QWidgetAction) OnCreateWidget(slot func(super func(parent *QWidget) *QWidget, parent *QWidget) *QWidget) { @@ -200,7 +194,7 @@ func miqt_exec_callback_QWidgetAction_CreateWidget(self *C.QWidgetAction, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(parent, nil, nil) + slotval1 := newQWidget(parent) virtualReturn := gofunc((&QWidgetAction{h: self}).callVirtualBase_CreateWidget, slotval1) @@ -228,7 +222,7 @@ func miqt_exec_callback_QWidgetAction_DeleteWidget(self *C.QWidgetAction, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQWidget(widget, nil, nil) + slotval1 := newQWidget(widget) gofunc((&QWidgetAction{h: self}).callVirtualBase_DeleteWidget, slotval1) diff --git a/qt6/gen_qwidgetaction.h b/qt6/gen_qwidgetaction.h index 6a117c1c..f4b9c9d4 100644 --- a/qt6/gen_qwidgetaction.h +++ b/qt6/gen_qwidgetaction.h @@ -30,7 +30,8 @@ typedef struct QWidget QWidget; typedef struct QWidgetAction QWidgetAction; #endif -void QWidgetAction_new(QObject* parent, QWidgetAction** outptr_QWidgetAction, QAction** outptr_QAction, QObject** outptr_QObject); +QWidgetAction* QWidgetAction_new(QObject* parent); +void QWidgetAction_virtbase(QWidgetAction* src, QAction** outptr_QAction); QMetaObject* QWidgetAction_MetaObject(const QWidgetAction* self); void* QWidgetAction_Metacast(QWidgetAction* self, const char* param1); struct miqt_string QWidgetAction_Tr(const char* s); diff --git a/qt6/gen_qwindow.cpp b/qt6/gen_qwindow.cpp index 63754737..2c728544 100644 --- a/qt6/gen_qwindow.cpp +++ b/qt6/gen_qwindow.cpp @@ -795,25 +795,21 @@ public: }; -void QWindow_new(QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface) { - MiqtVirtualQWindow* ret = new MiqtVirtualQWindow(); - *outptr_QWindow = ret; - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); +QWindow* QWindow_new() { + return new MiqtVirtualQWindow(); } -void QWindow_new2(QWindow* parent, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface) { - MiqtVirtualQWindow* ret = new MiqtVirtualQWindow(parent); - *outptr_QWindow = ret; - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); +QWindow* QWindow_new2(QWindow* parent) { + return new MiqtVirtualQWindow(parent); } -void QWindow_new3(QScreen* screen, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface) { - MiqtVirtualQWindow* ret = new MiqtVirtualQWindow(screen); - *outptr_QWindow = ret; - *outptr_QObject = static_cast(ret); - *outptr_QSurface = static_cast(ret); +QWindow* QWindow_new3(QScreen* screen) { + return new MiqtVirtualQWindow(screen); +} + +void QWindow_virtbase(QWindow* src, QObject** outptr_QObject, QSurface** outptr_QSurface) { + *outptr_QObject = static_cast(src); + *outptr_QSurface = static_cast(src); } QMetaObject* QWindow_MetaObject(const QWindow* self) { diff --git a/qt6/gen_qwindow.go b/qt6/gen_qwindow.go index 0fdc83a0..b2edbad1 100644 --- a/qt6/gen_qwindow.go +++ b/qt6/gen_qwindow.go @@ -54,58 +54,44 @@ func (this *QWindow) UnsafePointer() unsafe.Pointer { } // newQWindow constructs the type using only CGO pointers. -func newQWindow(h *C.QWindow, h_QObject *C.QObject, h_QSurface *C.QSurface) *QWindow { +func newQWindow(h *C.QWindow) *QWindow { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + var outptr_QSurface *C.QSurface = nil + C.QWindow_virtbase(h, &outptr_QObject, &outptr_QSurface) + return &QWindow{h: h, - QObject: newQObject(h_QObject), - QSurface: newQSurface(h_QSurface)} + QObject: newQObject(outptr_QObject), + QSurface: newQSurface(outptr_QSurface)} } // UnsafeNewQWindow constructs the type using only unsafe pointers. -func UnsafeNewQWindow(h unsafe.Pointer, h_QObject unsafe.Pointer, h_QSurface unsafe.Pointer) *QWindow { - if h == nil { - return nil - } - - return &QWindow{h: (*C.QWindow)(h), - QObject: UnsafeNewQObject(h_QObject), - QSurface: UnsafeNewQSurface(h_QSurface)} +func UnsafeNewQWindow(h unsafe.Pointer) *QWindow { + return newQWindow((*C.QWindow)(h)) } // NewQWindow constructs a new QWindow object. func NewQWindow() *QWindow { - var outptr_QWindow *C.QWindow = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - C.QWindow_new(&outptr_QWindow, &outptr_QObject, &outptr_QSurface) - ret := newQWindow(outptr_QWindow, outptr_QObject, outptr_QSurface) + ret := newQWindow(C.QWindow_new()) ret.isSubclass = true return ret } // NewQWindow2 constructs a new QWindow object. func NewQWindow2(parent *QWindow) *QWindow { - var outptr_QWindow *C.QWindow = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - C.QWindow_new2(parent.cPointer(), &outptr_QWindow, &outptr_QObject, &outptr_QSurface) - ret := newQWindow(outptr_QWindow, outptr_QObject, outptr_QSurface) + ret := newQWindow(C.QWindow_new2(parent.cPointer())) ret.isSubclass = true return ret } // NewQWindow3 constructs a new QWindow object. func NewQWindow3(screen *QScreen) *QWindow { - var outptr_QWindow *C.QWindow = nil - var outptr_QObject *C.QObject = nil - var outptr_QSurface *C.QSurface = nil - C.QWindow_new3(screen.cPointer(), &outptr_QWindow, &outptr_QObject, &outptr_QSurface) - ret := newQWindow(outptr_QWindow, outptr_QObject, outptr_QSurface) + ret := newQWindow(C.QWindow_new3(screen.cPointer())) ret.isSubclass = true return ret } @@ -158,7 +144,7 @@ func (this *QWindow) WinId() uintptr { } func (this *QWindow) Parent() *QWindow { - return newQWindow(C.QWindow_Parent(this.h), nil, nil) + return newQWindow(C.QWindow_Parent(this.h)) } func (this *QWindow) SetParent(parent *QWindow) { @@ -275,7 +261,7 @@ func (this *QWindow) SetTransientParent(parent *QWindow) { } func (this *QWindow) TransientParent() *QWindow { - return newQWindow(C.QWindow_TransientParent(this.h), nil, nil) + return newQWindow(C.QWindow_TransientParent(this.h)) } func (this *QWindow) IsAncestorOf(child *QWindow) bool { @@ -452,7 +438,7 @@ func (this *QWindow) SetMouseGrabEnabled(grab bool) bool { } func (this *QWindow) Screen() *QScreen { - return newQScreen(C.QWindow_Screen(this.h), nil) + return newQScreen(C.QWindow_Screen(this.h)) } func (this *QWindow) SetScreen(screen *QScreen) { @@ -506,7 +492,7 @@ func (this *QWindow) UnsetCursor() { } func QWindow_FromWinId(id uintptr) *QWindow { - return newQWindow(C.QWindow_FromWinId((C.uintptr_t)(id)), nil, nil) + return newQWindow(C.QWindow_FromWinId((C.uintptr_t)(id))) } func (this *QWindow) RequestActivate() { @@ -632,7 +618,7 @@ func miqt_exec_callback_QWindow_ScreenChanged(cb C.intptr_t, screen *C.QScreen) } // Convert all CABI parameters to Go parameters - slotval1 := newQScreen(screen, nil) + slotval1 := newQScreen(screen) gofunc(slotval1) } @@ -996,7 +982,7 @@ func miqt_exec_callback_QWindow_TransientParentChanged(cb C.intptr_t, transientP } // Convert all CABI parameters to Go parameters - slotval1 := newQWindow(transientParent, nil, nil) + slotval1 := newQWindow(transientParent) gofunc(slotval1) } @@ -1024,7 +1010,7 @@ func QWindow_Tr3(s string, c string, n int) string { } func (this *QWindow) Parent1(mode QWindow__AncestorMode) *QWindow { - return newQWindow(C.QWindow_Parent1(this.h, (C.int)(mode)), nil, nil) + return newQWindow(C.QWindow_Parent1(this.h, (C.int)(mode))) } func (this *QWindow) SetFlag2(param1 WindowType, on bool) { @@ -1184,7 +1170,7 @@ func miqt_exec_callback_QWindow_ExposeEvent(self *C.QWindow, cb C.intptr_t, para } // Convert all CABI parameters to Go parameters - slotval1 := newQExposeEvent(param1, nil) + slotval1 := newQExposeEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_ExposeEvent, slotval1) @@ -1210,7 +1196,7 @@ func miqt_exec_callback_QWindow_ResizeEvent(self *C.QWindow, cb C.intptr_t, para } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(param1, nil) + slotval1 := newQResizeEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1236,7 +1222,7 @@ func miqt_exec_callback_QWindow_PaintEvent(self *C.QWindow, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(param1, nil) + slotval1 := newQPaintEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1262,7 +1248,7 @@ func miqt_exec_callback_QWindow_MoveEvent(self *C.QWindow, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(param1, nil) + slotval1 := newQMoveEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1288,7 +1274,7 @@ func miqt_exec_callback_QWindow_FocusInEvent(self *C.QWindow, cb C.intptr_t, par } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1314,7 +1300,7 @@ func miqt_exec_callback_QWindow_FocusOutEvent(self *C.QWindow, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(param1, nil) + slotval1 := newQFocusEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1340,7 +1326,7 @@ func miqt_exec_callback_QWindow_ShowEvent(self *C.QWindow, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1366,7 +1352,7 @@ func miqt_exec_callback_QWindow_HideEvent(self *C.QWindow, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(param1, nil) + slotval1 := newQHideEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1392,7 +1378,7 @@ func miqt_exec_callback_QWindow_CloseEvent(self *C.QWindow, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(param1, nil) + slotval1 := newQCloseEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1446,7 +1432,7 @@ func miqt_exec_callback_QWindow_KeyPressEvent(self *C.QWindow, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1472,7 +1458,7 @@ func miqt_exec_callback_QWindow_KeyReleaseEvent(self *C.QWindow, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1498,7 +1484,7 @@ func miqt_exec_callback_QWindow_MousePressEvent(self *C.QWindow, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1524,7 +1510,7 @@ func miqt_exec_callback_QWindow_MouseReleaseEvent(self *C.QWindow, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1550,7 +1536,7 @@ func miqt_exec_callback_QWindow_MouseDoubleClickEvent(self *C.QWindow, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1576,7 +1562,7 @@ func miqt_exec_callback_QWindow_MouseMoveEvent(self *C.QWindow, cb C.intptr_t, p } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(param1, nil, nil, nil, nil) + slotval1 := newQMouseEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1602,7 +1588,7 @@ func miqt_exec_callback_QWindow_WheelEvent(self *C.QWindow, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(param1, nil, nil, nil, nil) + slotval1 := newQWheelEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1628,7 +1614,7 @@ func miqt_exec_callback_QWindow_TouchEvent(self *C.QWindow, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQTouchEvent(param1, nil, nil, nil) + slotval1 := newQTouchEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_TouchEvent, slotval1) @@ -1654,7 +1640,7 @@ func miqt_exec_callback_QWindow_TabletEvent(self *C.QWindow, cb C.intptr_t, para } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(param1, nil, nil, nil, nil) + slotval1 := newQTabletEvent(param1) gofunc((&QWindow{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1747,7 +1733,7 @@ func miqt_exec_callback_QWindow_TimerEvent(self *C.QWindow, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQTimerEvent(event, nil) + slotval1 := newQTimerEvent(event) gofunc((&QWindow{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1773,7 +1759,7 @@ func miqt_exec_callback_QWindow_ChildEvent(self *C.QWindow, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQChildEvent(event, nil) + slotval1 := newQChildEvent(event) gofunc((&QWindow{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/gen_qwindow.h b/qt6/gen_qwindow.h index d1915c7c..ebb97082 100644 --- a/qt6/gen_qwindow.h +++ b/qt6/gen_qwindow.h @@ -82,9 +82,10 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWindow QWindow; #endif -void QWindow_new(QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface); -void QWindow_new2(QWindow* parent, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface); -void QWindow_new3(QScreen* screen, QWindow** outptr_QWindow, QObject** outptr_QObject, QSurface** outptr_QSurface); +QWindow* QWindow_new(); +QWindow* QWindow_new2(QWindow* parent); +QWindow* QWindow_new3(QScreen* screen); +void QWindow_virtbase(QWindow* src, QObject** outptr_QObject, QSurface** outptr_QSurface); QMetaObject* QWindow_MetaObject(const QWindow* self); void* QWindow_Metacast(QWindow* self, const char* param1); struct miqt_string QWindow_Tr(const char* s); diff --git a/qt6/gen_qwizard.cpp b/qt6/gen_qwizard.cpp index 342ed9e2..03ef21b4 100644 --- a/qt6/gen_qwizard.cpp +++ b/qt6/gen_qwizard.cpp @@ -518,31 +518,20 @@ public: }; -void QWizard_new(QWidget* parent, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWizard* ret = new MiqtVirtualQWizard(parent); - *outptr_QWizard = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWizard* QWizard_new(QWidget* parent) { + return new MiqtVirtualQWizard(parent); } -void QWizard_new2(QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWizard* ret = new MiqtVirtualQWizard(); - *outptr_QWizard = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWizard* QWizard_new2() { + return new MiqtVirtualQWizard(); } -void QWizard_new3(QWidget* parent, int flags, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWizard* ret = new MiqtVirtualQWizard(parent, static_cast(flags)); - *outptr_QWizard = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWizard* QWizard_new3(QWidget* parent, int flags) { + return new MiqtVirtualQWizard(parent, static_cast(flags)); +} + +void QWizard_virtbase(QWizard* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QWizard_MetaObject(const QWizard* self) { @@ -2112,20 +2101,16 @@ public: }; -void QWizardPage_new(QWidget* parent, QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWizardPage* ret = new MiqtVirtualQWizardPage(parent); - *outptr_QWizardPage = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWizardPage* QWizardPage_new(QWidget* parent) { + return new MiqtVirtualQWizardPage(parent); } -void QWizardPage_new2(QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWizardPage* ret = new MiqtVirtualQWizardPage(); - *outptr_QWizardPage = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWizardPage* QWizardPage_new2() { + return new MiqtVirtualQWizardPage(); +} + +void QWizardPage_virtbase(QWizardPage* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QWizardPage_MetaObject(const QWizardPage* self) { diff --git a/qt6/gen_qwizard.go b/qt6/gen_qwizard.go index 6bbd5d8c..ed85b2b8 100644 --- a/qt6/gen_qwizard.go +++ b/qt6/gen_qwizard.go @@ -95,62 +95,42 @@ func (this *QWizard) UnsafePointer() unsafe.Pointer { } // newQWizard constructs the type using only CGO pointers. -func newQWizard(h *C.QWizard, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWizard { +func newQWizard(h *C.QWizard) *QWizard { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QWizard_virtbase(h, &outptr_QDialog) + return &QWizard{h: h, - QDialog: newQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QDialog: newQDialog(outptr_QDialog)} } // UnsafeNewQWizard constructs the type using only unsafe pointers. -func UnsafeNewQWizard(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWizard { - if h == nil { - return nil - } - - return &QWizard{h: (*C.QWizard)(h), - QDialog: UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQWizard(h unsafe.Pointer) *QWizard { + return newQWizard((*C.QWizard)(h)) } // NewQWizard constructs a new QWizard object. func NewQWizard(parent *QWidget) *QWizard { - var outptr_QWizard *C.QWizard = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWizard_new(parent.cPointer(), &outptr_QWizard, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWizard(outptr_QWizard, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWizard(C.QWizard_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQWizard2 constructs a new QWizard object. func NewQWizard2() *QWizard { - var outptr_QWizard *C.QWizard = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWizard_new2(&outptr_QWizard, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWizard(outptr_QWizard, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWizard(C.QWizard_new2()) ret.isSubclass = true return ret } // NewQWizard3 constructs a new QWizard object. func NewQWizard3(parent *QWidget, flags WindowType) *QWizard { - var outptr_QWizard *C.QWizard = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWizard_new3(parent.cPointer(), (C.int)(flags), &outptr_QWizard, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWizard(outptr_QWizard, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWizard(C.QWizard_new3(parent.cPointer(), (C.int)(flags))) ret.isSubclass = true return ret } @@ -187,7 +167,7 @@ func (this *QWizard) RemovePage(id int) { } func (this *QWizard) Page(id int) *QWizardPage { - return newQWizardPage(C.QWizard_Page(this.h, (C.int)(id)), nil, nil, nil) + return newQWizardPage(C.QWizard_Page(this.h, (C.int)(id))) } func (this *QWizard) HasVisitedPage(id int) bool { @@ -223,7 +203,7 @@ func (this *QWizard) StartId() int { } func (this *QWizard) CurrentPage() *QWizardPage { - return newQWizardPage(C.QWizard_CurrentPage(this.h), nil, nil, nil) + return newQWizardPage(C.QWizard_CurrentPage(this.h)) } func (this *QWizard) CurrentId() int { @@ -310,7 +290,7 @@ func (this *QWizard) SetButton(which QWizard__WizardButton, button *QAbstractBut } func (this *QWizard) Button(which QWizard__WizardButton) *QAbstractButton { - return newQAbstractButton(C.QWizard_Button(this.h, (C.int)(which)), nil, nil, nil) + return newQAbstractButton(C.QWizard_Button(this.h, (C.int)(which))) } func (this *QWizard) SetTitleFormat(format TextFormat) { @@ -334,7 +314,7 @@ func (this *QWizard) SetPixmap(which QWizard__WizardPixmap, pixmap *QPixmap) { } func (this *QWizard) Pixmap(which QWizard__WizardPixmap) *QPixmap { - _goptr := newQPixmap(C.QWizard_Pixmap(this.h, (C.int)(which)), nil) + _goptr := newQPixmap(C.QWizard_Pixmap(this.h, (C.int)(which))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -344,7 +324,7 @@ func (this *QWizard) SetSideWidget(widget *QWidget) { } func (this *QWizard) SideWidget() *QWidget { - return newQWidget(C.QWizard_SideWidget(this.h), nil, nil) + return newQWidget(C.QWizard_SideWidget(this.h)) } func (this *QWizard) SetDefaultProperty(className string, property string, changedSignal string) { @@ -657,7 +637,7 @@ func miqt_exec_callback_QWizard_ResizeEvent(self *C.QWizard, cb C.intptr_t, even } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QWizard{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -683,7 +663,7 @@ func miqt_exec_callback_QWizard_PaintEvent(self *C.QWizard, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QWizard{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -908,7 +888,7 @@ func miqt_exec_callback_QWizard_KeyPressEvent(self *C.QWizard, cb C.intptr_t, pa } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(param1, nil, nil) + slotval1 := newQKeyEvent(param1) gofunc((&QWizard{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -934,7 +914,7 @@ func miqt_exec_callback_QWizard_CloseEvent(self *C.QWizard, cb C.intptr_t, param } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(param1, nil) + slotval1 := newQCloseEvent(param1) gofunc((&QWizard{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -960,7 +940,7 @@ func miqt_exec_callback_QWizard_ShowEvent(self *C.QWizard, cb C.intptr_t, param1 } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(param1, nil) + slotval1 := newQShowEvent(param1) gofunc((&QWizard{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -986,7 +966,7 @@ func miqt_exec_callback_QWizard_ContextMenuEvent(self *C.QWizard, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(param1, nil, nil) + slotval1 := newQContextMenuEvent(param1) gofunc((&QWizard{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -1057,46 +1037,34 @@ func (this *QWizardPage) UnsafePointer() unsafe.Pointer { } // newQWizardPage constructs the type using only CGO pointers. -func newQWizardPage(h *C.QWizardPage, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWizardPage { +func newQWizardPage(h *C.QWizardPage) *QWizardPage { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QWizardPage_virtbase(h, &outptr_QWidget) + return &QWizardPage{h: h, - QWidget: newQWidget(h_QWidget, h_QObject, h_QPaintDevice)} + QWidget: newQWidget(outptr_QWidget)} } // UnsafeNewQWizardPage constructs the type using only unsafe pointers. -func UnsafeNewQWizardPage(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWizardPage { - if h == nil { - return nil - } - - return &QWizardPage{h: (*C.QWizardPage)(h), - QWidget: UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQWizardPage(h unsafe.Pointer) *QWizardPage { + return newQWizardPage((*C.QWizardPage)(h)) } // NewQWizardPage constructs a new QWizardPage object. func NewQWizardPage(parent *QWidget) *QWizardPage { - var outptr_QWizardPage *C.QWizardPage = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWizardPage_new(parent.cPointer(), &outptr_QWizardPage, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWizardPage(outptr_QWizardPage, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWizardPage(C.QWizardPage_new(parent.cPointer())) ret.isSubclass = true return ret } // NewQWizardPage2 constructs a new QWizardPage object. func NewQWizardPage2() *QWizardPage { - var outptr_QWizardPage *C.QWizardPage = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWizardPage_new2(&outptr_QWizardPage, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWizardPage(outptr_QWizardPage, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWizardPage(C.QWizardPage_new2()) ret.isSubclass = true return ret } @@ -1155,7 +1123,7 @@ func (this *QWizardPage) SetPixmap(which QWizard__WizardPixmap, pixmap *QPixmap) } func (this *QWizardPage) Pixmap(which QWizard__WizardPixmap) *QPixmap { - _goptr := newQPixmap(C.QWizardPage_Pixmap(this.h, (C.int)(which)), nil) + _goptr := newQPixmap(C.QWizardPage_Pixmap(this.h, (C.int)(which))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -1602,7 +1570,7 @@ func miqt_exec_callback_QWizardPage_MousePressEvent(self *C.QWizardPage, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1628,7 +1596,7 @@ func miqt_exec_callback_QWizardPage_MouseReleaseEvent(self *C.QWizardPage, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1654,7 +1622,7 @@ func miqt_exec_callback_QWizardPage_MouseDoubleClickEvent(self *C.QWizardPage, c } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1680,7 +1648,7 @@ func miqt_exec_callback_QWizardPage_MouseMoveEvent(self *C.QWizardPage, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQMouseEvent(event, nil, nil, nil, nil) + slotval1 := newQMouseEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1706,7 +1674,7 @@ func miqt_exec_callback_QWizardPage_WheelEvent(self *C.QWizardPage, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQWheelEvent(event, nil, nil, nil, nil) + slotval1 := newQWheelEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1732,7 +1700,7 @@ func miqt_exec_callback_QWizardPage_KeyPressEvent(self *C.QWizardPage, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1758,7 +1726,7 @@ func miqt_exec_callback_QWizardPage_KeyReleaseEvent(self *C.QWizardPage, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := newQKeyEvent(event, nil, nil) + slotval1 := newQKeyEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1784,7 +1752,7 @@ func miqt_exec_callback_QWizardPage_FocusInEvent(self *C.QWizardPage, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1810,7 +1778,7 @@ func miqt_exec_callback_QWizardPage_FocusOutEvent(self *C.QWizardPage, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQFocusEvent(event, nil) + slotval1 := newQFocusEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1836,7 +1804,7 @@ func miqt_exec_callback_QWizardPage_EnterEvent(self *C.QWizardPage, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQEnterEvent(event, nil, nil, nil, nil) + slotval1 := newQEnterEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -1888,7 +1856,7 @@ func miqt_exec_callback_QWizardPage_PaintEvent(self *C.QWizardPage, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQPaintEvent(event, nil) + slotval1 := newQPaintEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1914,7 +1882,7 @@ func miqt_exec_callback_QWizardPage_MoveEvent(self *C.QWizardPage, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQMoveEvent(event, nil) + slotval1 := newQMoveEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1940,7 +1908,7 @@ func miqt_exec_callback_QWizardPage_ResizeEvent(self *C.QWizardPage, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQResizeEvent(event, nil) + slotval1 := newQResizeEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1966,7 +1934,7 @@ func miqt_exec_callback_QWizardPage_CloseEvent(self *C.QWizardPage, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := newQCloseEvent(event, nil) + slotval1 := newQCloseEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -1992,7 +1960,7 @@ func miqt_exec_callback_QWizardPage_ContextMenuEvent(self *C.QWizardPage, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQContextMenuEvent(event, nil, nil) + slotval1 := newQContextMenuEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -2018,7 +1986,7 @@ func miqt_exec_callback_QWizardPage_TabletEvent(self *C.QWizardPage, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQTabletEvent(event, nil, nil, nil, nil) + slotval1 := newQTabletEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -2044,7 +2012,7 @@ func miqt_exec_callback_QWizardPage_ActionEvent(self *C.QWizardPage, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQActionEvent(event, nil) + slotval1 := newQActionEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -2070,7 +2038,7 @@ func miqt_exec_callback_QWizardPage_DragEnterEvent(self *C.QWizardPage, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragEnterEvent(event, nil, nil, nil) + slotval1 := newQDragEnterEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -2096,7 +2064,7 @@ func miqt_exec_callback_QWizardPage_DragMoveEvent(self *C.QWizardPage, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := newQDragMoveEvent(event, nil, nil) + slotval1 := newQDragMoveEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -2122,7 +2090,7 @@ func miqt_exec_callback_QWizardPage_DragLeaveEvent(self *C.QWizardPage, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := newQDragLeaveEvent(event, nil) + slotval1 := newQDragLeaveEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -2148,7 +2116,7 @@ func miqt_exec_callback_QWizardPage_DropEvent(self *C.QWizardPage, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQDropEvent(event, nil) + slotval1 := newQDropEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_DropEvent, slotval1) @@ -2174,7 +2142,7 @@ func miqt_exec_callback_QWizardPage_ShowEvent(self *C.QWizardPage, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQShowEvent(event, nil) + slotval1 := newQShowEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -2200,7 +2168,7 @@ func miqt_exec_callback_QWizardPage_HideEvent(self *C.QWizardPage, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := newQHideEvent(event, nil) + slotval1 := newQHideEvent(event) gofunc((&QWizardPage{h: self}).callVirtualBase_HideEvent, slotval1) @@ -2396,7 +2364,7 @@ func miqt_exec_callback_QWizardPage_InputMethodEvent(self *C.QWizardPage, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := newQInputMethodEvent(param1, nil) + slotval1 := newQInputMethodEvent(param1) gofunc((&QWizardPage{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/gen_qwizard.h b/qt6/gen_qwizard.h index 0e0c9850..0712321d 100644 --- a/qt6/gen_qwizard.h +++ b/qt6/gen_qwizard.h @@ -86,9 +86,10 @@ typedef struct QWizard QWizard; typedef struct QWizardPage QWizardPage; #endif -void QWizard_new(QWidget* parent, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWizard_new2(QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWizard_new3(QWidget* parent, int flags, QWizard** outptr_QWizard, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QWizard* QWizard_new(QWidget* parent); +QWizard* QWizard_new2(); +QWizard* QWizard_new3(QWidget* parent, int flags); +void QWizard_virtbase(QWizard* src, QDialog** outptr_QDialog); QMetaObject* QWizard_MetaObject(const QWizard* self); void* QWizard_Metacast(QWizard* self, const char* param1); struct miqt_string QWizard_Tr(const char* s); @@ -194,8 +195,9 @@ void QWizard_override_virtual_EventFilter(void* self, intptr_t slot); bool QWizard_virtualbase_EventFilter(void* self, QObject* param1, QEvent* param2); void QWizard_Delete(QWizard* self, bool isSubclass); -void QWizardPage_new(QWidget* parent, QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWizardPage_new2(QWizardPage** outptr_QWizardPage, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QWizardPage* QWizardPage_new(QWidget* parent); +QWizardPage* QWizardPage_new2(); +void QWizardPage_virtbase(QWizardPage* src, QWidget** outptr_QWidget); QMetaObject* QWizardPage_MetaObject(const QWizardPage* self); void* QWizardPage_Metacast(QWizardPage* self, const char* param1); struct miqt_string QWizardPage_Tr(const char* s); diff --git a/qt6/gen_qxmlstream.cpp b/qt6/gen_qxmlstream.cpp index 9a2406fe..0392e388 100644 --- a/qt6/gen_qxmlstream.cpp +++ b/qt6/gen_qxmlstream.cpp @@ -15,29 +15,25 @@ #include "gen_qxmlstream.h" #include "_cgo_export.h" -void QXmlStreamAttribute_new(QXmlStreamAttribute** outptr_QXmlStreamAttribute) { - QXmlStreamAttribute* ret = new QXmlStreamAttribute(); - *outptr_QXmlStreamAttribute = ret; +QXmlStreamAttribute* QXmlStreamAttribute_new() { + return new QXmlStreamAttribute(); } -void QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute) { +QXmlStreamAttribute* QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value) { QString qualifiedName_QString = QString::fromUtf8(qualifiedName.data, qualifiedName.len); QString value_QString = QString::fromUtf8(value.data, value.len); - QXmlStreamAttribute* ret = new QXmlStreamAttribute(qualifiedName_QString, value_QString); - *outptr_QXmlStreamAttribute = ret; + return new QXmlStreamAttribute(qualifiedName_QString, value_QString); } -void QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute) { +QXmlStreamAttribute* QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value) { QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len); QString name_QString = QString::fromUtf8(name.data, name.len); QString value_QString = QString::fromUtf8(value.data, value.len); - QXmlStreamAttribute* ret = new QXmlStreamAttribute(namespaceUri_QString, name_QString, value_QString); - *outptr_QXmlStreamAttribute = ret; + return new QXmlStreamAttribute(namespaceUri_QString, name_QString, value_QString); } -void QXmlStreamAttribute_new4(QXmlStreamAttribute* param1, QXmlStreamAttribute** outptr_QXmlStreamAttribute) { - QXmlStreamAttribute* ret = new QXmlStreamAttribute(*param1); - *outptr_QXmlStreamAttribute = ret; +QXmlStreamAttribute* QXmlStreamAttribute_new4(QXmlStreamAttribute* param1) { + return new QXmlStreamAttribute(*param1); } bool QXmlStreamAttribute_IsDefault(const QXmlStreamAttribute* self) { @@ -64,16 +60,14 @@ void QXmlStreamAttribute_Delete(QXmlStreamAttribute* self, bool isSubclass) { } } -void QXmlStreamNamespaceDeclaration_new(QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration) { - QXmlStreamNamespaceDeclaration* ret = new QXmlStreamNamespaceDeclaration(); - *outptr_QXmlStreamNamespaceDeclaration = ret; +QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new() { + return new QXmlStreamNamespaceDeclaration(); } -void QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri, QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration) { +QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri) { QString prefix_QString = QString::fromUtf8(prefix.data, prefix.len); QString namespaceUri_QString = QString::fromUtf8(namespaceUri.data, namespaceUri.len); - QXmlStreamNamespaceDeclaration* ret = new QXmlStreamNamespaceDeclaration(prefix_QString, namespaceUri_QString); - *outptr_QXmlStreamNamespaceDeclaration = ret; + return new QXmlStreamNamespaceDeclaration(prefix_QString, namespaceUri_QString); } bool QXmlStreamNamespaceDeclaration_OperatorEqual(const QXmlStreamNamespaceDeclaration* self, QXmlStreamNamespaceDeclaration* other) { @@ -92,9 +86,8 @@ void QXmlStreamNamespaceDeclaration_Delete(QXmlStreamNamespaceDeclaration* self, } } -void QXmlStreamNotationDeclaration_new(QXmlStreamNotationDeclaration** outptr_QXmlStreamNotationDeclaration) { - QXmlStreamNotationDeclaration* ret = new QXmlStreamNotationDeclaration(); - *outptr_QXmlStreamNotationDeclaration = ret; +QXmlStreamNotationDeclaration* QXmlStreamNotationDeclaration_new() { + return new QXmlStreamNotationDeclaration(); } bool QXmlStreamNotationDeclaration_OperatorEqual(const QXmlStreamNotationDeclaration* self, QXmlStreamNotationDeclaration* other) { @@ -113,9 +106,8 @@ void QXmlStreamNotationDeclaration_Delete(QXmlStreamNotationDeclaration* self, b } } -void QXmlStreamEntityDeclaration_new(QXmlStreamEntityDeclaration** outptr_QXmlStreamEntityDeclaration) { - QXmlStreamEntityDeclaration* ret = new QXmlStreamEntityDeclaration(); - *outptr_QXmlStreamEntityDeclaration = ret; +QXmlStreamEntityDeclaration* QXmlStreamEntityDeclaration_new() { + return new QXmlStreamEntityDeclaration(); } bool QXmlStreamEntityDeclaration_OperatorEqual(const QXmlStreamEntityDeclaration* self, QXmlStreamEntityDeclaration* other) { @@ -167,31 +159,26 @@ void QXmlStreamEntityResolver_Delete(QXmlStreamEntityResolver* self, bool isSubc } } -void QXmlStreamReader_new(QXmlStreamReader** outptr_QXmlStreamReader) { - QXmlStreamReader* ret = new QXmlStreamReader(); - *outptr_QXmlStreamReader = ret; +QXmlStreamReader* QXmlStreamReader_new() { + return new QXmlStreamReader(); } -void QXmlStreamReader_new2(QIODevice* device, QXmlStreamReader** outptr_QXmlStreamReader) { - QXmlStreamReader* ret = new QXmlStreamReader(device); - *outptr_QXmlStreamReader = ret; +QXmlStreamReader* QXmlStreamReader_new2(QIODevice* device) { + return new QXmlStreamReader(device); } -void QXmlStreamReader_new3(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader) { +QXmlStreamReader* QXmlStreamReader_new3(struct miqt_string data) { QByteArray data_QByteArray(data.data, data.len); - QXmlStreamReader* ret = new QXmlStreamReader(data_QByteArray); - *outptr_QXmlStreamReader = ret; + return new QXmlStreamReader(data_QByteArray); } -void QXmlStreamReader_new4(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader) { +QXmlStreamReader* QXmlStreamReader_new4(struct miqt_string data) { QString data_QString = QString::fromUtf8(data.data, data.len); - QXmlStreamReader* ret = new QXmlStreamReader(data_QString); - *outptr_QXmlStreamReader = ret; + return new QXmlStreamReader(data_QString); } -void QXmlStreamReader_new5(const char* data, QXmlStreamReader** outptr_QXmlStreamReader) { - QXmlStreamReader* ret = new QXmlStreamReader(data); - *outptr_QXmlStreamReader = ret; +QXmlStreamReader* QXmlStreamReader_new5(const char* data) { + return new QXmlStreamReader(data); } void QXmlStreamReader_SetDevice(QXmlStreamReader* self, QIODevice* device) { @@ -452,14 +439,12 @@ void QXmlStreamReader_Delete(QXmlStreamReader* self, bool isSubclass) { } } -void QXmlStreamWriter_new(QXmlStreamWriter** outptr_QXmlStreamWriter) { - QXmlStreamWriter* ret = new QXmlStreamWriter(); - *outptr_QXmlStreamWriter = ret; +QXmlStreamWriter* QXmlStreamWriter_new() { + return new QXmlStreamWriter(); } -void QXmlStreamWriter_new2(QIODevice* device, QXmlStreamWriter** outptr_QXmlStreamWriter) { - QXmlStreamWriter* ret = new QXmlStreamWriter(device); - *outptr_QXmlStreamWriter = ret; +QXmlStreamWriter* QXmlStreamWriter_new2(QIODevice* device) { + return new QXmlStreamWriter(device); } void QXmlStreamWriter_SetDevice(QXmlStreamWriter* self, QIODevice* device) { diff --git a/qt6/gen_qxmlstream.go b/qt6/gen_qxmlstream.go index 4596069b..b3678748 100644 --- a/qt6/gen_qxmlstream.go +++ b/qt6/gen_qxmlstream.go @@ -71,24 +71,19 @@ func newQXmlStreamAttribute(h *C.QXmlStreamAttribute) *QXmlStreamAttribute { if h == nil { return nil } + return &QXmlStreamAttribute{h: h} } // UnsafeNewQXmlStreamAttribute constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamAttribute(h unsafe.Pointer) *QXmlStreamAttribute { - if h == nil { - return nil - } - - return &QXmlStreamAttribute{h: (*C.QXmlStreamAttribute)(h)} + return newQXmlStreamAttribute((*C.QXmlStreamAttribute)(h)) } // NewQXmlStreamAttribute constructs a new QXmlStreamAttribute object. func NewQXmlStreamAttribute() *QXmlStreamAttribute { - var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil - C.QXmlStreamAttribute_new(&outptr_QXmlStreamAttribute) - ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(C.QXmlStreamAttribute_new()) ret.isSubclass = true return ret } @@ -103,10 +98,8 @@ func NewQXmlStreamAttribute2(qualifiedName string, value string) *QXmlStreamAttr value_ms.data = C.CString(value) value_ms.len = C.size_t(len(value)) defer C.free(unsafe.Pointer(value_ms.data)) - var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil - C.QXmlStreamAttribute_new2(qualifiedName_ms, value_ms, &outptr_QXmlStreamAttribute) - ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(C.QXmlStreamAttribute_new2(qualifiedName_ms, value_ms)) ret.isSubclass = true return ret } @@ -125,20 +118,16 @@ func NewQXmlStreamAttribute3(namespaceUri string, name string, value string) *QX value_ms.data = C.CString(value) value_ms.len = C.size_t(len(value)) defer C.free(unsafe.Pointer(value_ms.data)) - var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil - C.QXmlStreamAttribute_new3(namespaceUri_ms, name_ms, value_ms, &outptr_QXmlStreamAttribute) - ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(C.QXmlStreamAttribute_new3(namespaceUri_ms, name_ms, value_ms)) ret.isSubclass = true return ret } // NewQXmlStreamAttribute4 constructs a new QXmlStreamAttribute object. func NewQXmlStreamAttribute4(param1 *QXmlStreamAttribute) *QXmlStreamAttribute { - var outptr_QXmlStreamAttribute *C.QXmlStreamAttribute = nil - C.QXmlStreamAttribute_new4(param1.cPointer(), &outptr_QXmlStreamAttribute) - ret := newQXmlStreamAttribute(outptr_QXmlStreamAttribute) + ret := newQXmlStreamAttribute(C.QXmlStreamAttribute_new4(param1.cPointer())) ret.isSubclass = true return ret } @@ -197,24 +186,19 @@ func newQXmlStreamNamespaceDeclaration(h *C.QXmlStreamNamespaceDeclaration) *QXm if h == nil { return nil } + return &QXmlStreamNamespaceDeclaration{h: h} } // UnsafeNewQXmlStreamNamespaceDeclaration constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamNamespaceDeclaration(h unsafe.Pointer) *QXmlStreamNamespaceDeclaration { - if h == nil { - return nil - } - - return &QXmlStreamNamespaceDeclaration{h: (*C.QXmlStreamNamespaceDeclaration)(h)} + return newQXmlStreamNamespaceDeclaration((*C.QXmlStreamNamespaceDeclaration)(h)) } // NewQXmlStreamNamespaceDeclaration constructs a new QXmlStreamNamespaceDeclaration object. func NewQXmlStreamNamespaceDeclaration() *QXmlStreamNamespaceDeclaration { - var outptr_QXmlStreamNamespaceDeclaration *C.QXmlStreamNamespaceDeclaration = nil - C.QXmlStreamNamespaceDeclaration_new(&outptr_QXmlStreamNamespaceDeclaration) - ret := newQXmlStreamNamespaceDeclaration(outptr_QXmlStreamNamespaceDeclaration) + ret := newQXmlStreamNamespaceDeclaration(C.QXmlStreamNamespaceDeclaration_new()) ret.isSubclass = true return ret } @@ -229,10 +213,8 @@ func NewQXmlStreamNamespaceDeclaration2(prefix string, namespaceUri string) *QXm namespaceUri_ms.data = C.CString(namespaceUri) namespaceUri_ms.len = C.size_t(len(namespaceUri)) defer C.free(unsafe.Pointer(namespaceUri_ms.data)) - var outptr_QXmlStreamNamespaceDeclaration *C.QXmlStreamNamespaceDeclaration = nil - C.QXmlStreamNamespaceDeclaration_new2(prefix_ms, namespaceUri_ms, &outptr_QXmlStreamNamespaceDeclaration) - ret := newQXmlStreamNamespaceDeclaration(outptr_QXmlStreamNamespaceDeclaration) + ret := newQXmlStreamNamespaceDeclaration(C.QXmlStreamNamespaceDeclaration_new2(prefix_ms, namespaceUri_ms)) ret.isSubclass = true return ret } @@ -283,24 +265,19 @@ func newQXmlStreamNotationDeclaration(h *C.QXmlStreamNotationDeclaration) *QXmlS if h == nil { return nil } + return &QXmlStreamNotationDeclaration{h: h} } // UnsafeNewQXmlStreamNotationDeclaration constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamNotationDeclaration(h unsafe.Pointer) *QXmlStreamNotationDeclaration { - if h == nil { - return nil - } - - return &QXmlStreamNotationDeclaration{h: (*C.QXmlStreamNotationDeclaration)(h)} + return newQXmlStreamNotationDeclaration((*C.QXmlStreamNotationDeclaration)(h)) } // NewQXmlStreamNotationDeclaration constructs a new QXmlStreamNotationDeclaration object. func NewQXmlStreamNotationDeclaration() *QXmlStreamNotationDeclaration { - var outptr_QXmlStreamNotationDeclaration *C.QXmlStreamNotationDeclaration = nil - C.QXmlStreamNotationDeclaration_new(&outptr_QXmlStreamNotationDeclaration) - ret := newQXmlStreamNotationDeclaration(outptr_QXmlStreamNotationDeclaration) + ret := newQXmlStreamNotationDeclaration(C.QXmlStreamNotationDeclaration_new()) ret.isSubclass = true return ret } @@ -351,24 +328,19 @@ func newQXmlStreamEntityDeclaration(h *C.QXmlStreamEntityDeclaration) *QXmlStrea if h == nil { return nil } + return &QXmlStreamEntityDeclaration{h: h} } // UnsafeNewQXmlStreamEntityDeclaration constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamEntityDeclaration(h unsafe.Pointer) *QXmlStreamEntityDeclaration { - if h == nil { - return nil - } - - return &QXmlStreamEntityDeclaration{h: (*C.QXmlStreamEntityDeclaration)(h)} + return newQXmlStreamEntityDeclaration((*C.QXmlStreamEntityDeclaration)(h)) } // NewQXmlStreamEntityDeclaration constructs a new QXmlStreamEntityDeclaration object. func NewQXmlStreamEntityDeclaration() *QXmlStreamEntityDeclaration { - var outptr_QXmlStreamEntityDeclaration *C.QXmlStreamEntityDeclaration = nil - C.QXmlStreamEntityDeclaration_new(&outptr_QXmlStreamEntityDeclaration) - ret := newQXmlStreamEntityDeclaration(outptr_QXmlStreamEntityDeclaration) + ret := newQXmlStreamEntityDeclaration(C.QXmlStreamEntityDeclaration_new()) ret.isSubclass = true return ret } @@ -419,16 +391,13 @@ func newQXmlStreamEntityResolver(h *C.QXmlStreamEntityResolver) *QXmlStreamEntit if h == nil { return nil } + return &QXmlStreamEntityResolver{h: h} } // UnsafeNewQXmlStreamEntityResolver constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamEntityResolver(h unsafe.Pointer) *QXmlStreamEntityResolver { - if h == nil { - return nil - } - - return &QXmlStreamEntityResolver{h: (*C.QXmlStreamEntityResolver)(h)} + return newQXmlStreamEntityResolver((*C.QXmlStreamEntityResolver)(h)) } func (this *QXmlStreamEntityResolver) ResolveEntity(publicId string, systemId string) string { @@ -495,34 +464,27 @@ func newQXmlStreamReader(h *C.QXmlStreamReader) *QXmlStreamReader { if h == nil { return nil } + return &QXmlStreamReader{h: h} } // UnsafeNewQXmlStreamReader constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamReader(h unsafe.Pointer) *QXmlStreamReader { - if h == nil { - return nil - } - - return &QXmlStreamReader{h: (*C.QXmlStreamReader)(h)} + return newQXmlStreamReader((*C.QXmlStreamReader)(h)) } // NewQXmlStreamReader constructs a new QXmlStreamReader object. func NewQXmlStreamReader() *QXmlStreamReader { - var outptr_QXmlStreamReader *C.QXmlStreamReader = nil - C.QXmlStreamReader_new(&outptr_QXmlStreamReader) - ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret := newQXmlStreamReader(C.QXmlStreamReader_new()) ret.isSubclass = true return ret } // NewQXmlStreamReader2 constructs a new QXmlStreamReader object. func NewQXmlStreamReader2(device *QIODevice) *QXmlStreamReader { - var outptr_QXmlStreamReader *C.QXmlStreamReader = nil - C.QXmlStreamReader_new2(device.cPointer(), &outptr_QXmlStreamReader) - ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret := newQXmlStreamReader(C.QXmlStreamReader_new2(device.cPointer())) ret.isSubclass = true return ret } @@ -532,10 +494,8 @@ func NewQXmlStreamReader3(data []byte) *QXmlStreamReader { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QXmlStreamReader *C.QXmlStreamReader = nil - C.QXmlStreamReader_new3(data_alias, &outptr_QXmlStreamReader) - ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret := newQXmlStreamReader(C.QXmlStreamReader_new3(data_alias)) ret.isSubclass = true return ret } @@ -546,10 +506,8 @@ func NewQXmlStreamReader4(data string) *QXmlStreamReader { data_ms.data = C.CString(data) data_ms.len = C.size_t(len(data)) defer C.free(unsafe.Pointer(data_ms.data)) - var outptr_QXmlStreamReader *C.QXmlStreamReader = nil - C.QXmlStreamReader_new4(data_ms, &outptr_QXmlStreamReader) - ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret := newQXmlStreamReader(C.QXmlStreamReader_new4(data_ms)) ret.isSubclass = true return ret } @@ -558,10 +516,8 @@ func NewQXmlStreamReader4(data string) *QXmlStreamReader { func NewQXmlStreamReader5(data string) *QXmlStreamReader { data_Cstring := C.CString(data) defer C.free(unsafe.Pointer(data_Cstring)) - var outptr_QXmlStreamReader *C.QXmlStreamReader = nil - C.QXmlStreamReader_new5(data_Cstring, &outptr_QXmlStreamReader) - ret := newQXmlStreamReader(outptr_QXmlStreamReader) + ret := newQXmlStreamReader(C.QXmlStreamReader_new5(data_Cstring)) ret.isSubclass = true return ret } @@ -571,7 +527,7 @@ func (this *QXmlStreamReader) SetDevice(device *QIODevice) { } func (this *QXmlStreamReader) Device() *QIODevice { - return newQIODevice(C.QXmlStreamReader_Device(this.h), nil, nil) + return newQIODevice(C.QXmlStreamReader_Device(this.h)) } func (this *QXmlStreamReader) AddData(data []byte) { @@ -839,34 +795,27 @@ func newQXmlStreamWriter(h *C.QXmlStreamWriter) *QXmlStreamWriter { if h == nil { return nil } + return &QXmlStreamWriter{h: h} } // UnsafeNewQXmlStreamWriter constructs the type using only unsafe pointers. func UnsafeNewQXmlStreamWriter(h unsafe.Pointer) *QXmlStreamWriter { - if h == nil { - return nil - } - - return &QXmlStreamWriter{h: (*C.QXmlStreamWriter)(h)} + return newQXmlStreamWriter((*C.QXmlStreamWriter)(h)) } // NewQXmlStreamWriter constructs a new QXmlStreamWriter object. func NewQXmlStreamWriter() *QXmlStreamWriter { - var outptr_QXmlStreamWriter *C.QXmlStreamWriter = nil - C.QXmlStreamWriter_new(&outptr_QXmlStreamWriter) - ret := newQXmlStreamWriter(outptr_QXmlStreamWriter) + ret := newQXmlStreamWriter(C.QXmlStreamWriter_new()) ret.isSubclass = true return ret } // NewQXmlStreamWriter2 constructs a new QXmlStreamWriter object. func NewQXmlStreamWriter2(device *QIODevice) *QXmlStreamWriter { - var outptr_QXmlStreamWriter *C.QXmlStreamWriter = nil - C.QXmlStreamWriter_new2(device.cPointer(), &outptr_QXmlStreamWriter) - ret := newQXmlStreamWriter(outptr_QXmlStreamWriter) + ret := newQXmlStreamWriter(C.QXmlStreamWriter_new2(device.cPointer())) ret.isSubclass = true return ret } @@ -876,7 +825,7 @@ func (this *QXmlStreamWriter) SetDevice(device *QIODevice) { } func (this *QXmlStreamWriter) Device() *QIODevice { - return newQIODevice(C.QXmlStreamWriter_Device(this.h), nil, nil) + return newQIODevice(C.QXmlStreamWriter_Device(this.h)) } func (this *QXmlStreamWriter) SetAutoFormatting(autoFormatting bool) { diff --git a/qt6/gen_qxmlstream.h b/qt6/gen_qxmlstream.h index efbedca9..e18a9667 100644 --- a/qt6/gen_qxmlstream.h +++ b/qt6/gen_qxmlstream.h @@ -34,28 +34,28 @@ typedef struct QXmlStreamReader QXmlStreamReader; typedef struct QXmlStreamWriter QXmlStreamWriter; #endif -void QXmlStreamAttribute_new(QXmlStreamAttribute** outptr_QXmlStreamAttribute); -void QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute); -void QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value, QXmlStreamAttribute** outptr_QXmlStreamAttribute); -void QXmlStreamAttribute_new4(QXmlStreamAttribute* param1, QXmlStreamAttribute** outptr_QXmlStreamAttribute); +QXmlStreamAttribute* QXmlStreamAttribute_new(); +QXmlStreamAttribute* QXmlStreamAttribute_new2(struct miqt_string qualifiedName, struct miqt_string value); +QXmlStreamAttribute* QXmlStreamAttribute_new3(struct miqt_string namespaceUri, struct miqt_string name, struct miqt_string value); +QXmlStreamAttribute* QXmlStreamAttribute_new4(QXmlStreamAttribute* param1); bool QXmlStreamAttribute_IsDefault(const QXmlStreamAttribute* self); bool QXmlStreamAttribute_OperatorEqual(const QXmlStreamAttribute* self, QXmlStreamAttribute* other); bool QXmlStreamAttribute_OperatorNotEqual(const QXmlStreamAttribute* self, QXmlStreamAttribute* other); void QXmlStreamAttribute_OperatorAssign(QXmlStreamAttribute* self, QXmlStreamAttribute* param1); void QXmlStreamAttribute_Delete(QXmlStreamAttribute* self, bool isSubclass); -void QXmlStreamNamespaceDeclaration_new(QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration); -void QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri, QXmlStreamNamespaceDeclaration** outptr_QXmlStreamNamespaceDeclaration); +QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new(); +QXmlStreamNamespaceDeclaration* QXmlStreamNamespaceDeclaration_new2(struct miqt_string prefix, struct miqt_string namespaceUri); bool QXmlStreamNamespaceDeclaration_OperatorEqual(const QXmlStreamNamespaceDeclaration* self, QXmlStreamNamespaceDeclaration* other); bool QXmlStreamNamespaceDeclaration_OperatorNotEqual(const QXmlStreamNamespaceDeclaration* self, QXmlStreamNamespaceDeclaration* other); void QXmlStreamNamespaceDeclaration_Delete(QXmlStreamNamespaceDeclaration* self, bool isSubclass); -void QXmlStreamNotationDeclaration_new(QXmlStreamNotationDeclaration** outptr_QXmlStreamNotationDeclaration); +QXmlStreamNotationDeclaration* QXmlStreamNotationDeclaration_new(); bool QXmlStreamNotationDeclaration_OperatorEqual(const QXmlStreamNotationDeclaration* self, QXmlStreamNotationDeclaration* other); bool QXmlStreamNotationDeclaration_OperatorNotEqual(const QXmlStreamNotationDeclaration* self, QXmlStreamNotationDeclaration* other); void QXmlStreamNotationDeclaration_Delete(QXmlStreamNotationDeclaration* self, bool isSubclass); -void QXmlStreamEntityDeclaration_new(QXmlStreamEntityDeclaration** outptr_QXmlStreamEntityDeclaration); +QXmlStreamEntityDeclaration* QXmlStreamEntityDeclaration_new(); bool QXmlStreamEntityDeclaration_OperatorEqual(const QXmlStreamEntityDeclaration* self, QXmlStreamEntityDeclaration* other); bool QXmlStreamEntityDeclaration_OperatorNotEqual(const QXmlStreamEntityDeclaration* self, QXmlStreamEntityDeclaration* other); void QXmlStreamEntityDeclaration_Delete(QXmlStreamEntityDeclaration* self, bool isSubclass); @@ -64,11 +64,11 @@ struct miqt_string QXmlStreamEntityResolver_ResolveEntity(QXmlStreamEntityResolv struct miqt_string QXmlStreamEntityResolver_ResolveUndeclaredEntity(QXmlStreamEntityResolver* self, struct miqt_string name); void QXmlStreamEntityResolver_Delete(QXmlStreamEntityResolver* self, bool isSubclass); -void QXmlStreamReader_new(QXmlStreamReader** outptr_QXmlStreamReader); -void QXmlStreamReader_new2(QIODevice* device, QXmlStreamReader** outptr_QXmlStreamReader); -void QXmlStreamReader_new3(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader); -void QXmlStreamReader_new4(struct miqt_string data, QXmlStreamReader** outptr_QXmlStreamReader); -void QXmlStreamReader_new5(const char* data, QXmlStreamReader** outptr_QXmlStreamReader); +QXmlStreamReader* QXmlStreamReader_new(); +QXmlStreamReader* QXmlStreamReader_new2(QIODevice* device); +QXmlStreamReader* QXmlStreamReader_new3(struct miqt_string data); +QXmlStreamReader* QXmlStreamReader_new4(struct miqt_string data); +QXmlStreamReader* QXmlStreamReader_new5(const char* data); void QXmlStreamReader_SetDevice(QXmlStreamReader* self, QIODevice* device); QIODevice* QXmlStreamReader_Device(const QXmlStreamReader* self); void QXmlStreamReader_AddData(QXmlStreamReader* self, struct miqt_string data); @@ -116,8 +116,8 @@ struct miqt_string QXmlStreamReader_ReadElementText1(QXmlStreamReader* self, int void QXmlStreamReader_RaiseError1(QXmlStreamReader* self, struct miqt_string message); void QXmlStreamReader_Delete(QXmlStreamReader* self, bool isSubclass); -void QXmlStreamWriter_new(QXmlStreamWriter** outptr_QXmlStreamWriter); -void QXmlStreamWriter_new2(QIODevice* device, QXmlStreamWriter** outptr_QXmlStreamWriter); +QXmlStreamWriter* QXmlStreamWriter_new(); +QXmlStreamWriter* QXmlStreamWriter_new2(QIODevice* device); void QXmlStreamWriter_SetDevice(QXmlStreamWriter* self, QIODevice* device); QIODevice* QXmlStreamWriter_Device(const QXmlStreamWriter* self); void QXmlStreamWriter_SetAutoFormatting(QXmlStreamWriter* self, bool autoFormatting); diff --git a/qt6/multimedia/gen_qaudiobuffer.cpp b/qt6/multimedia/gen_qaudiobuffer.cpp index 93b578ab..3c2ab24e 100644 --- a/qt6/multimedia/gen_qaudiobuffer.cpp +++ b/qt6/multimedia/gen_qaudiobuffer.cpp @@ -5,36 +5,30 @@ #include "gen_qaudiobuffer.h" #include "_cgo_export.h" -void QAudioBuffer_new(QAudioBuffer** outptr_QAudioBuffer) { - QAudioBuffer* ret = new QAudioBuffer(); - *outptr_QAudioBuffer = ret; +QAudioBuffer* QAudioBuffer_new() { + return new QAudioBuffer(); } -void QAudioBuffer_new2(QAudioBuffer* other, QAudioBuffer** outptr_QAudioBuffer) { - QAudioBuffer* ret = new QAudioBuffer(*other); - *outptr_QAudioBuffer = ret; +QAudioBuffer* QAudioBuffer_new2(QAudioBuffer* other) { + return new QAudioBuffer(*other); } -void QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer) { +QAudioBuffer* QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format) { QByteArray data_QByteArray(data.data, data.len); - QAudioBuffer* ret = new QAudioBuffer(data_QByteArray, *format); - *outptr_QAudioBuffer = ret; + return new QAudioBuffer(data_QByteArray, *format); } -void QAudioBuffer_new4(int numFrames, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer) { - QAudioBuffer* ret = new QAudioBuffer(static_cast(numFrames), *format); - *outptr_QAudioBuffer = ret; +QAudioBuffer* QAudioBuffer_new4(int numFrames, QAudioFormat* format) { + return new QAudioBuffer(static_cast(numFrames), *format); } -void QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer) { +QAudioBuffer* QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime) { QByteArray data_QByteArray(data.data, data.len); - QAudioBuffer* ret = new QAudioBuffer(data_QByteArray, *format, static_cast(startTime)); - *outptr_QAudioBuffer = ret; + return new QAudioBuffer(data_QByteArray, *format, static_cast(startTime)); } -void QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer) { - QAudioBuffer* ret = new QAudioBuffer(static_cast(numFrames), *format, static_cast(startTime)); - *outptr_QAudioBuffer = ret; +QAudioBuffer* QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime) { + return new QAudioBuffer(static_cast(numFrames), *format, static_cast(startTime)); } void QAudioBuffer_OperatorAssign(QAudioBuffer* self, QAudioBuffer* other) { diff --git a/qt6/multimedia/gen_qaudiobuffer.go b/qt6/multimedia/gen_qaudiobuffer.go index f78071c0..d93a69fe 100644 --- a/qt6/multimedia/gen_qaudiobuffer.go +++ b/qt6/multimedia/gen_qaudiobuffer.go @@ -37,34 +37,27 @@ func newQAudioBuffer(h *C.QAudioBuffer) *QAudioBuffer { if h == nil { return nil } + return &QAudioBuffer{h: h} } // UnsafeNewQAudioBuffer constructs the type using only unsafe pointers. func UnsafeNewQAudioBuffer(h unsafe.Pointer) *QAudioBuffer { - if h == nil { - return nil - } - - return &QAudioBuffer{h: (*C.QAudioBuffer)(h)} + return newQAudioBuffer((*C.QAudioBuffer)(h)) } // NewQAudioBuffer constructs a new QAudioBuffer object. func NewQAudioBuffer() *QAudioBuffer { - var outptr_QAudioBuffer *C.QAudioBuffer = nil - C.QAudioBuffer_new(&outptr_QAudioBuffer) - ret := newQAudioBuffer(outptr_QAudioBuffer) + ret := newQAudioBuffer(C.QAudioBuffer_new()) ret.isSubclass = true return ret } // NewQAudioBuffer2 constructs a new QAudioBuffer object. func NewQAudioBuffer2(other *QAudioBuffer) *QAudioBuffer { - var outptr_QAudioBuffer *C.QAudioBuffer = nil - C.QAudioBuffer_new2(other.cPointer(), &outptr_QAudioBuffer) - ret := newQAudioBuffer(outptr_QAudioBuffer) + ret := newQAudioBuffer(C.QAudioBuffer_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -74,20 +67,16 @@ func NewQAudioBuffer3(data []byte, format *QAudioFormat) *QAudioBuffer { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QAudioBuffer *C.QAudioBuffer = nil - C.QAudioBuffer_new3(data_alias, format.cPointer(), &outptr_QAudioBuffer) - ret := newQAudioBuffer(outptr_QAudioBuffer) + ret := newQAudioBuffer(C.QAudioBuffer_new3(data_alias, format.cPointer())) ret.isSubclass = true return ret } // NewQAudioBuffer4 constructs a new QAudioBuffer object. func NewQAudioBuffer4(numFrames int, format *QAudioFormat) *QAudioBuffer { - var outptr_QAudioBuffer *C.QAudioBuffer = nil - C.QAudioBuffer_new4((C.int)(numFrames), format.cPointer(), &outptr_QAudioBuffer) - ret := newQAudioBuffer(outptr_QAudioBuffer) + ret := newQAudioBuffer(C.QAudioBuffer_new4((C.int)(numFrames), format.cPointer())) ret.isSubclass = true return ret } @@ -97,20 +86,16 @@ func NewQAudioBuffer5(data []byte, format *QAudioFormat, startTime int64) *QAudi data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QAudioBuffer *C.QAudioBuffer = nil - C.QAudioBuffer_new5(data_alias, format.cPointer(), (C.longlong)(startTime), &outptr_QAudioBuffer) - ret := newQAudioBuffer(outptr_QAudioBuffer) + ret := newQAudioBuffer(C.QAudioBuffer_new5(data_alias, format.cPointer(), (C.longlong)(startTime))) ret.isSubclass = true return ret } // NewQAudioBuffer6 constructs a new QAudioBuffer object. func NewQAudioBuffer6(numFrames int, format *QAudioFormat, startTime int64) *QAudioBuffer { - var outptr_QAudioBuffer *C.QAudioBuffer = nil - C.QAudioBuffer_new6((C.int)(numFrames), format.cPointer(), (C.longlong)(startTime), &outptr_QAudioBuffer) - ret := newQAudioBuffer(outptr_QAudioBuffer) + ret := newQAudioBuffer(C.QAudioBuffer_new6((C.int)(numFrames), format.cPointer(), (C.longlong)(startTime))) ret.isSubclass = true return ret } diff --git a/qt6/multimedia/gen_qaudiobuffer.h b/qt6/multimedia/gen_qaudiobuffer.h index 4c03782e..7e7b6cd4 100644 --- a/qt6/multimedia/gen_qaudiobuffer.h +++ b/qt6/multimedia/gen_qaudiobuffer.h @@ -22,12 +22,12 @@ typedef struct QAudioBuffer QAudioBuffer; typedef struct QAudioFormat QAudioFormat; #endif -void QAudioBuffer_new(QAudioBuffer** outptr_QAudioBuffer); -void QAudioBuffer_new2(QAudioBuffer* other, QAudioBuffer** outptr_QAudioBuffer); -void QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer); -void QAudioBuffer_new4(int numFrames, QAudioFormat* format, QAudioBuffer** outptr_QAudioBuffer); -void QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer); -void QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime, QAudioBuffer** outptr_QAudioBuffer); +QAudioBuffer* QAudioBuffer_new(); +QAudioBuffer* QAudioBuffer_new2(QAudioBuffer* other); +QAudioBuffer* QAudioBuffer_new3(struct miqt_string data, QAudioFormat* format); +QAudioBuffer* QAudioBuffer_new4(int numFrames, QAudioFormat* format); +QAudioBuffer* QAudioBuffer_new5(struct miqt_string data, QAudioFormat* format, long long startTime); +QAudioBuffer* QAudioBuffer_new6(int numFrames, QAudioFormat* format, long long startTime); void QAudioBuffer_OperatorAssign(QAudioBuffer* self, QAudioBuffer* other); void QAudioBuffer_Swap(QAudioBuffer* self, QAudioBuffer* other); bool QAudioBuffer_IsValid(const QAudioBuffer* self); diff --git a/qt6/multimedia/gen_qaudiodecoder.cpp b/qt6/multimedia/gen_qaudiodecoder.cpp index 56799cdb..87bac7be 100644 --- a/qt6/multimedia/gen_qaudiodecoder.cpp +++ b/qt6/multimedia/gen_qaudiodecoder.cpp @@ -197,16 +197,16 @@ public: }; -void QAudioDecoder_new(QAudioDecoder** outptr_QAudioDecoder, QObject** outptr_QObject) { - MiqtVirtualQAudioDecoder* ret = new MiqtVirtualQAudioDecoder(); - *outptr_QAudioDecoder = ret; - *outptr_QObject = static_cast(ret); +QAudioDecoder* QAudioDecoder_new() { + return new MiqtVirtualQAudioDecoder(); } -void QAudioDecoder_new2(QObject* parent, QAudioDecoder** outptr_QAudioDecoder, QObject** outptr_QObject) { - MiqtVirtualQAudioDecoder* ret = new MiqtVirtualQAudioDecoder(parent); - *outptr_QAudioDecoder = ret; - *outptr_QObject = static_cast(ret); +QAudioDecoder* QAudioDecoder_new2(QObject* parent) { + return new MiqtVirtualQAudioDecoder(parent); +} + +void QAudioDecoder_virtbase(QAudioDecoder* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAudioDecoder_MetaObject(const QAudioDecoder* self) { diff --git a/qt6/multimedia/gen_qaudiodecoder.go b/qt6/multimedia/gen_qaudiodecoder.go index 2b5b44f5..cc19a8b1 100644 --- a/qt6/multimedia/gen_qaudiodecoder.go +++ b/qt6/multimedia/gen_qaudiodecoder.go @@ -46,42 +46,34 @@ func (this *QAudioDecoder) UnsafePointer() unsafe.Pointer { } // newQAudioDecoder constructs the type using only CGO pointers. -func newQAudioDecoder(h *C.QAudioDecoder, h_QObject *C.QObject) *QAudioDecoder { +func newQAudioDecoder(h *C.QAudioDecoder) *QAudioDecoder { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAudioDecoder_virtbase(h, &outptr_QObject) + return &QAudioDecoder{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAudioDecoder constructs the type using only unsafe pointers. -func UnsafeNewQAudioDecoder(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioDecoder { - if h == nil { - return nil - } - - return &QAudioDecoder{h: (*C.QAudioDecoder)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAudioDecoder(h unsafe.Pointer) *QAudioDecoder { + return newQAudioDecoder((*C.QAudioDecoder)(h)) } // NewQAudioDecoder constructs a new QAudioDecoder object. func NewQAudioDecoder() *QAudioDecoder { - var outptr_QAudioDecoder *C.QAudioDecoder = nil - var outptr_QObject *C.QObject = nil - C.QAudioDecoder_new(&outptr_QAudioDecoder, &outptr_QObject) - ret := newQAudioDecoder(outptr_QAudioDecoder, outptr_QObject) + ret := newQAudioDecoder(C.QAudioDecoder_new()) ret.isSubclass = true return ret } // NewQAudioDecoder2 constructs a new QAudioDecoder object. func NewQAudioDecoder2(parent *qt6.QObject) *QAudioDecoder { - var outptr_QAudioDecoder *C.QAudioDecoder = nil - var outptr_QObject *C.QObject = nil - C.QAudioDecoder_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioDecoder, &outptr_QObject) - ret := newQAudioDecoder(outptr_QAudioDecoder, outptr_QObject) + ret := newQAudioDecoder(C.QAudioDecoder_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -124,7 +116,7 @@ func (this *QAudioDecoder) SetSource(fileName *qt6.QUrl) { } func (this *QAudioDecoder) SourceDevice() *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioDecoder_SourceDevice(this.h)), nil, nil) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioDecoder_SourceDevice(this.h))) } func (this *QAudioDecoder) SetSourceDevice(device *qt6.QIODevice) { @@ -449,7 +441,7 @@ func miqt_exec_callback_QAudioDecoder_TimerEvent(self *C.QAudioDecoder, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QAudioDecoder{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -475,7 +467,7 @@ func miqt_exec_callback_QAudioDecoder_ChildEvent(self *C.QAudioDecoder, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QAudioDecoder{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/multimedia/gen_qaudiodecoder.h b/qt6/multimedia/gen_qaudiodecoder.h index 18734af1..3df9c977 100644 --- a/qt6/multimedia/gen_qaudiodecoder.h +++ b/qt6/multimedia/gen_qaudiodecoder.h @@ -40,8 +40,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -void QAudioDecoder_new(QAudioDecoder** outptr_QAudioDecoder, QObject** outptr_QObject); -void QAudioDecoder_new2(QObject* parent, QAudioDecoder** outptr_QAudioDecoder, QObject** outptr_QObject); +QAudioDecoder* QAudioDecoder_new(); +QAudioDecoder* QAudioDecoder_new2(QObject* parent); +void QAudioDecoder_virtbase(QAudioDecoder* src, QObject** outptr_QObject); QMetaObject* QAudioDecoder_MetaObject(const QAudioDecoder* self); void* QAudioDecoder_Metacast(QAudioDecoder* self, const char* param1); struct miqt_string QAudioDecoder_Tr(const char* s); diff --git a/qt6/multimedia/gen_qaudiodevice.cpp b/qt6/multimedia/gen_qaudiodevice.cpp index 427c83b9..97d753cd 100644 --- a/qt6/multimedia/gen_qaudiodevice.cpp +++ b/qt6/multimedia/gen_qaudiodevice.cpp @@ -9,14 +9,12 @@ #include "gen_qaudiodevice.h" #include "_cgo_export.h" -void QAudioDevice_new(QAudioDevice** outptr_QAudioDevice) { - QAudioDevice* ret = new QAudioDevice(); - *outptr_QAudioDevice = ret; +QAudioDevice* QAudioDevice_new() { + return new QAudioDevice(); } -void QAudioDevice_new2(QAudioDevice* other, QAudioDevice** outptr_QAudioDevice) { - QAudioDevice* ret = new QAudioDevice(*other); - *outptr_QAudioDevice = ret; +QAudioDevice* QAudioDevice_new2(QAudioDevice* other) { + return new QAudioDevice(*other); } void QAudioDevice_Swap(QAudioDevice* self, QAudioDevice* other) { diff --git a/qt6/multimedia/gen_qaudiodevice.go b/qt6/multimedia/gen_qaudiodevice.go index 168b9125..3118dbfd 100644 --- a/qt6/multimedia/gen_qaudiodevice.go +++ b/qt6/multimedia/gen_qaudiodevice.go @@ -45,34 +45,27 @@ func newQAudioDevice(h *C.QAudioDevice) *QAudioDevice { if h == nil { return nil } + return &QAudioDevice{h: h} } // UnsafeNewQAudioDevice constructs the type using only unsafe pointers. func UnsafeNewQAudioDevice(h unsafe.Pointer) *QAudioDevice { - if h == nil { - return nil - } - - return &QAudioDevice{h: (*C.QAudioDevice)(h)} + return newQAudioDevice((*C.QAudioDevice)(h)) } // NewQAudioDevice constructs a new QAudioDevice object. func NewQAudioDevice() *QAudioDevice { - var outptr_QAudioDevice *C.QAudioDevice = nil - C.QAudioDevice_new(&outptr_QAudioDevice) - ret := newQAudioDevice(outptr_QAudioDevice) + ret := newQAudioDevice(C.QAudioDevice_new()) ret.isSubclass = true return ret } // NewQAudioDevice2 constructs a new QAudioDevice object. func NewQAudioDevice2(other *QAudioDevice) *QAudioDevice { - var outptr_QAudioDevice *C.QAudioDevice = nil - C.QAudioDevice_new2(other.cPointer(), &outptr_QAudioDevice) - ret := newQAudioDevice(outptr_QAudioDevice) + ret := newQAudioDevice(C.QAudioDevice_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/multimedia/gen_qaudiodevice.h b/qt6/multimedia/gen_qaudiodevice.h index 9a189a38..b880f1c2 100644 --- a/qt6/multimedia/gen_qaudiodevice.h +++ b/qt6/multimedia/gen_qaudiodevice.h @@ -22,8 +22,8 @@ typedef struct QAudioDevice QAudioDevice; typedef struct QAudioFormat QAudioFormat; #endif -void QAudioDevice_new(QAudioDevice** outptr_QAudioDevice); -void QAudioDevice_new2(QAudioDevice* other, QAudioDevice** outptr_QAudioDevice); +QAudioDevice* QAudioDevice_new(); +QAudioDevice* QAudioDevice_new2(QAudioDevice* other); void QAudioDevice_Swap(QAudioDevice* self, QAudioDevice* other); void QAudioDevice_OperatorAssign(QAudioDevice* self, QAudioDevice* other); bool QAudioDevice_OperatorEqual(const QAudioDevice* self, QAudioDevice* other); diff --git a/qt6/multimedia/gen_qaudioformat.cpp b/qt6/multimedia/gen_qaudioformat.cpp index 81271c36..6cc8ee41 100644 --- a/qt6/multimedia/gen_qaudioformat.cpp +++ b/qt6/multimedia/gen_qaudioformat.cpp @@ -3,14 +3,12 @@ #include "gen_qaudioformat.h" #include "_cgo_export.h" -void QAudioFormat_new(QAudioFormat** outptr_QAudioFormat) { - QAudioFormat* ret = new QAudioFormat(); - *outptr_QAudioFormat = ret; +QAudioFormat* QAudioFormat_new() { + return new QAudioFormat(); } -void QAudioFormat_new2(QAudioFormat* param1, QAudioFormat** outptr_QAudioFormat) { - QAudioFormat* ret = new QAudioFormat(*param1); - *outptr_QAudioFormat = ret; +QAudioFormat* QAudioFormat_new2(QAudioFormat* param1) { + return new QAudioFormat(*param1); } bool QAudioFormat_IsValid(const QAudioFormat* self) { diff --git a/qt6/multimedia/gen_qaudioformat.go b/qt6/multimedia/gen_qaudioformat.go index faccdee7..4c680364 100644 --- a/qt6/multimedia/gen_qaudioformat.go +++ b/qt6/multimedia/gen_qaudioformat.go @@ -93,34 +93,27 @@ func newQAudioFormat(h *C.QAudioFormat) *QAudioFormat { if h == nil { return nil } + return &QAudioFormat{h: h} } // UnsafeNewQAudioFormat constructs the type using only unsafe pointers. func UnsafeNewQAudioFormat(h unsafe.Pointer) *QAudioFormat { - if h == nil { - return nil - } - - return &QAudioFormat{h: (*C.QAudioFormat)(h)} + return newQAudioFormat((*C.QAudioFormat)(h)) } // NewQAudioFormat constructs a new QAudioFormat object. func NewQAudioFormat() *QAudioFormat { - var outptr_QAudioFormat *C.QAudioFormat = nil - C.QAudioFormat_new(&outptr_QAudioFormat) - ret := newQAudioFormat(outptr_QAudioFormat) + ret := newQAudioFormat(C.QAudioFormat_new()) ret.isSubclass = true return ret } // NewQAudioFormat2 constructs a new QAudioFormat object. func NewQAudioFormat2(param1 *QAudioFormat) *QAudioFormat { - var outptr_QAudioFormat *C.QAudioFormat = nil - C.QAudioFormat_new2(param1.cPointer(), &outptr_QAudioFormat) - ret := newQAudioFormat(outptr_QAudioFormat) + ret := newQAudioFormat(C.QAudioFormat_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/multimedia/gen_qaudioformat.h b/qt6/multimedia/gen_qaudioformat.h index b4f679a0..133da322 100644 --- a/qt6/multimedia/gen_qaudioformat.h +++ b/qt6/multimedia/gen_qaudioformat.h @@ -20,8 +20,8 @@ class QAudioFormat; typedef struct QAudioFormat QAudioFormat; #endif -void QAudioFormat_new(QAudioFormat** outptr_QAudioFormat); -void QAudioFormat_new2(QAudioFormat* param1, QAudioFormat** outptr_QAudioFormat); +QAudioFormat* QAudioFormat_new(); +QAudioFormat* QAudioFormat_new2(QAudioFormat* param1); bool QAudioFormat_IsValid(const QAudioFormat* self); void QAudioFormat_SetSampleRate(QAudioFormat* self, int sampleRate); int QAudioFormat_SampleRate(const QAudioFormat* self); diff --git a/qt6/multimedia/gen_qaudioinput.cpp b/qt6/multimedia/gen_qaudioinput.cpp index 7a52ac0b..bce61e2f 100644 --- a/qt6/multimedia/gen_qaudioinput.cpp +++ b/qt6/multimedia/gen_qaudioinput.cpp @@ -196,28 +196,24 @@ public: }; -void QAudioInput_new(QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { - MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(); - *outptr_QAudioInput = ret; - *outptr_QObject = static_cast(ret); +QAudioInput* QAudioInput_new() { + return new MiqtVirtualQAudioInput(); } -void QAudioInput_new2(QAudioDevice* deviceInfo, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { - MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(*deviceInfo); - *outptr_QAudioInput = ret; - *outptr_QObject = static_cast(ret); +QAudioInput* QAudioInput_new2(QAudioDevice* deviceInfo) { + return new MiqtVirtualQAudioInput(*deviceInfo); } -void QAudioInput_new3(QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { - MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(parent); - *outptr_QAudioInput = ret; - *outptr_QObject = static_cast(ret); +QAudioInput* QAudioInput_new3(QObject* parent) { + return new MiqtVirtualQAudioInput(parent); } -void QAudioInput_new4(QAudioDevice* deviceInfo, QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject) { - MiqtVirtualQAudioInput* ret = new MiqtVirtualQAudioInput(*deviceInfo, parent); - *outptr_QAudioInput = ret; - *outptr_QObject = static_cast(ret); +QAudioInput* QAudioInput_new4(QAudioDevice* deviceInfo, QObject* parent) { + return new MiqtVirtualQAudioInput(*deviceInfo, parent); +} + +void QAudioInput_virtbase(QAudioInput* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAudioInput_MetaObject(const QAudioInput* self) { diff --git a/qt6/multimedia/gen_qaudioinput.go b/qt6/multimedia/gen_qaudioinput.go index bcfd480c..e4799622 100644 --- a/qt6/multimedia/gen_qaudioinput.go +++ b/qt6/multimedia/gen_qaudioinput.go @@ -36,64 +36,50 @@ func (this *QAudioInput) UnsafePointer() unsafe.Pointer { } // newQAudioInput constructs the type using only CGO pointers. -func newQAudioInput(h *C.QAudioInput, h_QObject *C.QObject) *QAudioInput { +func newQAudioInput(h *C.QAudioInput) *QAudioInput { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAudioInput_virtbase(h, &outptr_QObject) + return &QAudioInput{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAudioInput constructs the type using only unsafe pointers. -func UnsafeNewQAudioInput(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioInput { - if h == nil { - return nil - } - - return &QAudioInput{h: (*C.QAudioInput)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAudioInput(h unsafe.Pointer) *QAudioInput { + return newQAudioInput((*C.QAudioInput)(h)) } // NewQAudioInput constructs a new QAudioInput object. func NewQAudioInput() *QAudioInput { - var outptr_QAudioInput *C.QAudioInput = nil - var outptr_QObject *C.QObject = nil - C.QAudioInput_new(&outptr_QAudioInput, &outptr_QObject) - ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret := newQAudioInput(C.QAudioInput_new()) ret.isSubclass = true return ret } // NewQAudioInput2 constructs a new QAudioInput object. func NewQAudioInput2(deviceInfo *QAudioDevice) *QAudioInput { - var outptr_QAudioInput *C.QAudioInput = nil - var outptr_QObject *C.QObject = nil - C.QAudioInput_new2(deviceInfo.cPointer(), &outptr_QAudioInput, &outptr_QObject) - ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret := newQAudioInput(C.QAudioInput_new2(deviceInfo.cPointer())) ret.isSubclass = true return ret } // NewQAudioInput3 constructs a new QAudioInput object. func NewQAudioInput3(parent *qt6.QObject) *QAudioInput { - var outptr_QAudioInput *C.QAudioInput = nil - var outptr_QObject *C.QObject = nil - C.QAudioInput_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioInput, &outptr_QObject) - ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret := newQAudioInput(C.QAudioInput_new3((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQAudioInput4 constructs a new QAudioInput object. func NewQAudioInput4(deviceInfo *QAudioDevice, parent *qt6.QObject) *QAudioInput { - var outptr_QAudioInput *C.QAudioInput = nil - var outptr_QObject *C.QObject = nil - C.QAudioInput_new4(deviceInfo.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioInput, &outptr_QObject) - ret := newQAudioInput(outptr_QAudioInput, outptr_QObject) + ret := newQAudioInput(C.QAudioInput_new4(deviceInfo.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -300,7 +286,7 @@ func miqt_exec_callback_QAudioInput_TimerEvent(self *C.QAudioInput, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QAudioInput{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -326,7 +312,7 @@ func miqt_exec_callback_QAudioInput_ChildEvent(self *C.QAudioInput, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QAudioInput{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/multimedia/gen_qaudioinput.h b/qt6/multimedia/gen_qaudioinput.h index e21471c4..3de10029 100644 --- a/qt6/multimedia/gen_qaudioinput.h +++ b/qt6/multimedia/gen_qaudioinput.h @@ -34,10 +34,11 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QAudioInput_new(QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); -void QAudioInput_new2(QAudioDevice* deviceInfo, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); -void QAudioInput_new3(QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); -void QAudioInput_new4(QAudioDevice* deviceInfo, QObject* parent, QAudioInput** outptr_QAudioInput, QObject** outptr_QObject); +QAudioInput* QAudioInput_new(); +QAudioInput* QAudioInput_new2(QAudioDevice* deviceInfo); +QAudioInput* QAudioInput_new3(QObject* parent); +QAudioInput* QAudioInput_new4(QAudioDevice* deviceInfo, QObject* parent); +void QAudioInput_virtbase(QAudioInput* src, QObject** outptr_QObject); QMetaObject* QAudioInput_MetaObject(const QAudioInput* self); void* QAudioInput_Metacast(QAudioInput* self, const char* param1); struct miqt_string QAudioInput_Tr(const char* s); diff --git a/qt6/multimedia/gen_qaudiooutput.cpp b/qt6/multimedia/gen_qaudiooutput.cpp index 02b6a919..bb5c7fb8 100644 --- a/qt6/multimedia/gen_qaudiooutput.cpp +++ b/qt6/multimedia/gen_qaudiooutput.cpp @@ -196,28 +196,24 @@ public: }; -void QAudioOutput_new(QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { - MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(); - *outptr_QAudioOutput = ret; - *outptr_QObject = static_cast(ret); +QAudioOutput* QAudioOutput_new() { + return new MiqtVirtualQAudioOutput(); } -void QAudioOutput_new2(QAudioDevice* device, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { - MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(*device); - *outptr_QAudioOutput = ret; - *outptr_QObject = static_cast(ret); +QAudioOutput* QAudioOutput_new2(QAudioDevice* device) { + return new MiqtVirtualQAudioOutput(*device); } -void QAudioOutput_new3(QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { - MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(parent); - *outptr_QAudioOutput = ret; - *outptr_QObject = static_cast(ret); +QAudioOutput* QAudioOutput_new3(QObject* parent) { + return new MiqtVirtualQAudioOutput(parent); } -void QAudioOutput_new4(QAudioDevice* device, QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject) { - MiqtVirtualQAudioOutput* ret = new MiqtVirtualQAudioOutput(*device, parent); - *outptr_QAudioOutput = ret; - *outptr_QObject = static_cast(ret); +QAudioOutput* QAudioOutput_new4(QAudioDevice* device, QObject* parent) { + return new MiqtVirtualQAudioOutput(*device, parent); +} + +void QAudioOutput_virtbase(QAudioOutput* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAudioOutput_MetaObject(const QAudioOutput* self) { diff --git a/qt6/multimedia/gen_qaudiooutput.go b/qt6/multimedia/gen_qaudiooutput.go index 7525cc26..1cf6f8be 100644 --- a/qt6/multimedia/gen_qaudiooutput.go +++ b/qt6/multimedia/gen_qaudiooutput.go @@ -36,64 +36,50 @@ func (this *QAudioOutput) UnsafePointer() unsafe.Pointer { } // newQAudioOutput constructs the type using only CGO pointers. -func newQAudioOutput(h *C.QAudioOutput, h_QObject *C.QObject) *QAudioOutput { +func newQAudioOutput(h *C.QAudioOutput) *QAudioOutput { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAudioOutput_virtbase(h, &outptr_QObject) + return &QAudioOutput{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAudioOutput constructs the type using only unsafe pointers. -func UnsafeNewQAudioOutput(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioOutput { - if h == nil { - return nil - } - - return &QAudioOutput{h: (*C.QAudioOutput)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAudioOutput(h unsafe.Pointer) *QAudioOutput { + return newQAudioOutput((*C.QAudioOutput)(h)) } // NewQAudioOutput constructs a new QAudioOutput object. func NewQAudioOutput() *QAudioOutput { - var outptr_QAudioOutput *C.QAudioOutput = nil - var outptr_QObject *C.QObject = nil - C.QAudioOutput_new(&outptr_QAudioOutput, &outptr_QObject) - ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret := newQAudioOutput(C.QAudioOutput_new()) ret.isSubclass = true return ret } // NewQAudioOutput2 constructs a new QAudioOutput object. func NewQAudioOutput2(device *QAudioDevice) *QAudioOutput { - var outptr_QAudioOutput *C.QAudioOutput = nil - var outptr_QObject *C.QObject = nil - C.QAudioOutput_new2(device.cPointer(), &outptr_QAudioOutput, &outptr_QObject) - ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret := newQAudioOutput(C.QAudioOutput_new2(device.cPointer())) ret.isSubclass = true return ret } // NewQAudioOutput3 constructs a new QAudioOutput object. func NewQAudioOutput3(parent *qt6.QObject) *QAudioOutput { - var outptr_QAudioOutput *C.QAudioOutput = nil - var outptr_QObject *C.QObject = nil - C.QAudioOutput_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioOutput, &outptr_QObject) - ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret := newQAudioOutput(C.QAudioOutput_new3((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQAudioOutput4 constructs a new QAudioOutput object. func NewQAudioOutput4(device *QAudioDevice, parent *qt6.QObject) *QAudioOutput { - var outptr_QAudioOutput *C.QAudioOutput = nil - var outptr_QObject *C.QObject = nil - C.QAudioOutput_new4(device.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioOutput, &outptr_QObject) - ret := newQAudioOutput(outptr_QAudioOutput, outptr_QObject) + ret := newQAudioOutput(C.QAudioOutput_new4(device.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -300,7 +286,7 @@ func miqt_exec_callback_QAudioOutput_TimerEvent(self *C.QAudioOutput, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QAudioOutput{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -326,7 +312,7 @@ func miqt_exec_callback_QAudioOutput_ChildEvent(self *C.QAudioOutput, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QAudioOutput{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/multimedia/gen_qaudiooutput.h b/qt6/multimedia/gen_qaudiooutput.h index a81c6adc..e514902f 100644 --- a/qt6/multimedia/gen_qaudiooutput.h +++ b/qt6/multimedia/gen_qaudiooutput.h @@ -34,10 +34,11 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QAudioOutput_new(QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); -void QAudioOutput_new2(QAudioDevice* device, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); -void QAudioOutput_new3(QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); -void QAudioOutput_new4(QAudioDevice* device, QObject* parent, QAudioOutput** outptr_QAudioOutput, QObject** outptr_QObject); +QAudioOutput* QAudioOutput_new(); +QAudioOutput* QAudioOutput_new2(QAudioDevice* device); +QAudioOutput* QAudioOutput_new3(QObject* parent); +QAudioOutput* QAudioOutput_new4(QAudioDevice* device, QObject* parent); +void QAudioOutput_virtbase(QAudioOutput* src, QObject** outptr_QObject); QMetaObject* QAudioOutput_MetaObject(const QAudioOutput* self); void* QAudioOutput_Metacast(QAudioOutput* self, const char* param1); struct miqt_string QAudioOutput_Tr(const char* s); diff --git a/qt6/multimedia/gen_qaudiosink.cpp b/qt6/multimedia/gen_qaudiosink.cpp index 07ea337d..36de8358 100644 --- a/qt6/multimedia/gen_qaudiosink.cpp +++ b/qt6/multimedia/gen_qaudiosink.cpp @@ -200,40 +200,32 @@ public: }; -void QAudioSink_new(QAudioSink** outptr_QAudioSink, QObject** outptr_QObject) { - MiqtVirtualQAudioSink* ret = new MiqtVirtualQAudioSink(); - *outptr_QAudioSink = ret; - *outptr_QObject = static_cast(ret); +QAudioSink* QAudioSink_new() { + return new MiqtVirtualQAudioSink(); } -void QAudioSink_new2(QAudioDevice* audioDeviceInfo, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject) { - MiqtVirtualQAudioSink* ret = new MiqtVirtualQAudioSink(*audioDeviceInfo); - *outptr_QAudioSink = ret; - *outptr_QObject = static_cast(ret); +QAudioSink* QAudioSink_new2(QAudioDevice* audioDeviceInfo) { + return new MiqtVirtualQAudioSink(*audioDeviceInfo); } -void QAudioSink_new3(QAudioFormat* format, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject) { - MiqtVirtualQAudioSink* ret = new MiqtVirtualQAudioSink(*format); - *outptr_QAudioSink = ret; - *outptr_QObject = static_cast(ret); +QAudioSink* QAudioSink_new3(QAudioFormat* format) { + return new MiqtVirtualQAudioSink(*format); } -void QAudioSink_new4(QAudioFormat* format, QObject* parent, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject) { - MiqtVirtualQAudioSink* ret = new MiqtVirtualQAudioSink(*format, parent); - *outptr_QAudioSink = ret; - *outptr_QObject = static_cast(ret); +QAudioSink* QAudioSink_new4(QAudioFormat* format, QObject* parent) { + return new MiqtVirtualQAudioSink(*format, parent); } -void QAudioSink_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject) { - MiqtVirtualQAudioSink* ret = new MiqtVirtualQAudioSink(*audioDeviceInfo, *format); - *outptr_QAudioSink = ret; - *outptr_QObject = static_cast(ret); +QAudioSink* QAudioSink_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format) { + return new MiqtVirtualQAudioSink(*audioDeviceInfo, *format); } -void QAudioSink_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject) { - MiqtVirtualQAudioSink* ret = new MiqtVirtualQAudioSink(*audioDeviceInfo, *format, parent); - *outptr_QAudioSink = ret; - *outptr_QObject = static_cast(ret); +QAudioSink* QAudioSink_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent) { + return new MiqtVirtualQAudioSink(*audioDeviceInfo, *format, parent); +} + +void QAudioSink_virtbase(QAudioSink* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAudioSink_MetaObject(const QAudioSink* self) { diff --git a/qt6/multimedia/gen_qaudiosink.go b/qt6/multimedia/gen_qaudiosink.go index b56f4c8b..6116da1c 100644 --- a/qt6/multimedia/gen_qaudiosink.go +++ b/qt6/multimedia/gen_qaudiosink.go @@ -36,86 +36,66 @@ func (this *QAudioSink) UnsafePointer() unsafe.Pointer { } // newQAudioSink constructs the type using only CGO pointers. -func newQAudioSink(h *C.QAudioSink, h_QObject *C.QObject) *QAudioSink { +func newQAudioSink(h *C.QAudioSink) *QAudioSink { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAudioSink_virtbase(h, &outptr_QObject) + return &QAudioSink{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAudioSink constructs the type using only unsafe pointers. -func UnsafeNewQAudioSink(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioSink { - if h == nil { - return nil - } - - return &QAudioSink{h: (*C.QAudioSink)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAudioSink(h unsafe.Pointer) *QAudioSink { + return newQAudioSink((*C.QAudioSink)(h)) } // NewQAudioSink constructs a new QAudioSink object. func NewQAudioSink() *QAudioSink { - var outptr_QAudioSink *C.QAudioSink = nil - var outptr_QObject *C.QObject = nil - C.QAudioSink_new(&outptr_QAudioSink, &outptr_QObject) - ret := newQAudioSink(outptr_QAudioSink, outptr_QObject) + ret := newQAudioSink(C.QAudioSink_new()) ret.isSubclass = true return ret } // NewQAudioSink2 constructs a new QAudioSink object. func NewQAudioSink2(audioDeviceInfo *QAudioDevice) *QAudioSink { - var outptr_QAudioSink *C.QAudioSink = nil - var outptr_QObject *C.QObject = nil - C.QAudioSink_new2(audioDeviceInfo.cPointer(), &outptr_QAudioSink, &outptr_QObject) - ret := newQAudioSink(outptr_QAudioSink, outptr_QObject) + ret := newQAudioSink(C.QAudioSink_new2(audioDeviceInfo.cPointer())) ret.isSubclass = true return ret } // NewQAudioSink3 constructs a new QAudioSink object. func NewQAudioSink3(format *QAudioFormat) *QAudioSink { - var outptr_QAudioSink *C.QAudioSink = nil - var outptr_QObject *C.QObject = nil - C.QAudioSink_new3(format.cPointer(), &outptr_QAudioSink, &outptr_QObject) - ret := newQAudioSink(outptr_QAudioSink, outptr_QObject) + ret := newQAudioSink(C.QAudioSink_new3(format.cPointer())) ret.isSubclass = true return ret } // NewQAudioSink4 constructs a new QAudioSink object. func NewQAudioSink4(format *QAudioFormat, parent *qt6.QObject) *QAudioSink { - var outptr_QAudioSink *C.QAudioSink = nil - var outptr_QObject *C.QObject = nil - C.QAudioSink_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioSink, &outptr_QObject) - ret := newQAudioSink(outptr_QAudioSink, outptr_QObject) + ret := newQAudioSink(C.QAudioSink_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQAudioSink5 constructs a new QAudioSink object. func NewQAudioSink5(audioDeviceInfo *QAudioDevice, format *QAudioFormat) *QAudioSink { - var outptr_QAudioSink *C.QAudioSink = nil - var outptr_QObject *C.QObject = nil - C.QAudioSink_new5(audioDeviceInfo.cPointer(), format.cPointer(), &outptr_QAudioSink, &outptr_QObject) - ret := newQAudioSink(outptr_QAudioSink, outptr_QObject) + ret := newQAudioSink(C.QAudioSink_new5(audioDeviceInfo.cPointer(), format.cPointer())) ret.isSubclass = true return ret } // NewQAudioSink6 constructs a new QAudioSink object. func NewQAudioSink6(audioDeviceInfo *QAudioDevice, format *QAudioFormat, parent *qt6.QObject) *QAudioSink { - var outptr_QAudioSink *C.QAudioSink = nil - var outptr_QObject *C.QObject = nil - C.QAudioSink_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioSink, &outptr_QObject) - ret := newQAudioSink(outptr_QAudioSink, outptr_QObject) + ret := newQAudioSink(C.QAudioSink_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -154,7 +134,7 @@ func (this *QAudioSink) Start(device *qt6.QIODevice) { } func (this *QAudioSink) Start2() *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioSink_Start2(this.h)), nil, nil) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioSink_Start2(this.h))) } func (this *QAudioSink) Stop() { @@ -329,7 +309,7 @@ func miqt_exec_callback_QAudioSink_TimerEvent(self *C.QAudioSink, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QAudioSink{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -355,7 +335,7 @@ func miqt_exec_callback_QAudioSink_ChildEvent(self *C.QAudioSink, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QAudioSink{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/multimedia/gen_qaudiosink.h b/qt6/multimedia/gen_qaudiosink.h index 76222d77..a0029638 100644 --- a/qt6/multimedia/gen_qaudiosink.h +++ b/qt6/multimedia/gen_qaudiosink.h @@ -38,12 +38,13 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QAudioSink_new(QAudioSink** outptr_QAudioSink, QObject** outptr_QObject); -void QAudioSink_new2(QAudioDevice* audioDeviceInfo, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject); -void QAudioSink_new3(QAudioFormat* format, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject); -void QAudioSink_new4(QAudioFormat* format, QObject* parent, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject); -void QAudioSink_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject); -void QAudioSink_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioSink** outptr_QAudioSink, QObject** outptr_QObject); +QAudioSink* QAudioSink_new(); +QAudioSink* QAudioSink_new2(QAudioDevice* audioDeviceInfo); +QAudioSink* QAudioSink_new3(QAudioFormat* format); +QAudioSink* QAudioSink_new4(QAudioFormat* format, QObject* parent); +QAudioSink* QAudioSink_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format); +QAudioSink* QAudioSink_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent); +void QAudioSink_virtbase(QAudioSink* src, QObject** outptr_QObject); QMetaObject* QAudioSink_MetaObject(const QAudioSink* self); void* QAudioSink_Metacast(QAudioSink* self, const char* param1); struct miqt_string QAudioSink_Tr(const char* s); diff --git a/qt6/multimedia/gen_qaudiosource.cpp b/qt6/multimedia/gen_qaudiosource.cpp index 1794fba1..7169e007 100644 --- a/qt6/multimedia/gen_qaudiosource.cpp +++ b/qt6/multimedia/gen_qaudiosource.cpp @@ -200,40 +200,32 @@ public: }; -void QAudioSource_new(QAudioSource** outptr_QAudioSource, QObject** outptr_QObject) { - MiqtVirtualQAudioSource* ret = new MiqtVirtualQAudioSource(); - *outptr_QAudioSource = ret; - *outptr_QObject = static_cast(ret); +QAudioSource* QAudioSource_new() { + return new MiqtVirtualQAudioSource(); } -void QAudioSource_new2(QAudioDevice* audioDeviceInfo, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject) { - MiqtVirtualQAudioSource* ret = new MiqtVirtualQAudioSource(*audioDeviceInfo); - *outptr_QAudioSource = ret; - *outptr_QObject = static_cast(ret); +QAudioSource* QAudioSource_new2(QAudioDevice* audioDeviceInfo) { + return new MiqtVirtualQAudioSource(*audioDeviceInfo); } -void QAudioSource_new3(QAudioFormat* format, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject) { - MiqtVirtualQAudioSource* ret = new MiqtVirtualQAudioSource(*format); - *outptr_QAudioSource = ret; - *outptr_QObject = static_cast(ret); +QAudioSource* QAudioSource_new3(QAudioFormat* format) { + return new MiqtVirtualQAudioSource(*format); } -void QAudioSource_new4(QAudioFormat* format, QObject* parent, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject) { - MiqtVirtualQAudioSource* ret = new MiqtVirtualQAudioSource(*format, parent); - *outptr_QAudioSource = ret; - *outptr_QObject = static_cast(ret); +QAudioSource* QAudioSource_new4(QAudioFormat* format, QObject* parent) { + return new MiqtVirtualQAudioSource(*format, parent); } -void QAudioSource_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject) { - MiqtVirtualQAudioSource* ret = new MiqtVirtualQAudioSource(*audioDeviceInfo, *format); - *outptr_QAudioSource = ret; - *outptr_QObject = static_cast(ret); +QAudioSource* QAudioSource_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format) { + return new MiqtVirtualQAudioSource(*audioDeviceInfo, *format); } -void QAudioSource_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject) { - MiqtVirtualQAudioSource* ret = new MiqtVirtualQAudioSource(*audioDeviceInfo, *format, parent); - *outptr_QAudioSource = ret; - *outptr_QObject = static_cast(ret); +QAudioSource* QAudioSource_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent) { + return new MiqtVirtualQAudioSource(*audioDeviceInfo, *format, parent); +} + +void QAudioSource_virtbase(QAudioSource* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAudioSource_MetaObject(const QAudioSource* self) { diff --git a/qt6/multimedia/gen_qaudiosource.go b/qt6/multimedia/gen_qaudiosource.go index 7ea103c0..1fefae31 100644 --- a/qt6/multimedia/gen_qaudiosource.go +++ b/qt6/multimedia/gen_qaudiosource.go @@ -36,86 +36,66 @@ func (this *QAudioSource) UnsafePointer() unsafe.Pointer { } // newQAudioSource constructs the type using only CGO pointers. -func newQAudioSource(h *C.QAudioSource, h_QObject *C.QObject) *QAudioSource { +func newQAudioSource(h *C.QAudioSource) *QAudioSource { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAudioSource_virtbase(h, &outptr_QObject) + return &QAudioSource{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAudioSource constructs the type using only unsafe pointers. -func UnsafeNewQAudioSource(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioSource { - if h == nil { - return nil - } - - return &QAudioSource{h: (*C.QAudioSource)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAudioSource(h unsafe.Pointer) *QAudioSource { + return newQAudioSource((*C.QAudioSource)(h)) } // NewQAudioSource constructs a new QAudioSource object. func NewQAudioSource() *QAudioSource { - var outptr_QAudioSource *C.QAudioSource = nil - var outptr_QObject *C.QObject = nil - C.QAudioSource_new(&outptr_QAudioSource, &outptr_QObject) - ret := newQAudioSource(outptr_QAudioSource, outptr_QObject) + ret := newQAudioSource(C.QAudioSource_new()) ret.isSubclass = true return ret } // NewQAudioSource2 constructs a new QAudioSource object. func NewQAudioSource2(audioDeviceInfo *QAudioDevice) *QAudioSource { - var outptr_QAudioSource *C.QAudioSource = nil - var outptr_QObject *C.QObject = nil - C.QAudioSource_new2(audioDeviceInfo.cPointer(), &outptr_QAudioSource, &outptr_QObject) - ret := newQAudioSource(outptr_QAudioSource, outptr_QObject) + ret := newQAudioSource(C.QAudioSource_new2(audioDeviceInfo.cPointer())) ret.isSubclass = true return ret } // NewQAudioSource3 constructs a new QAudioSource object. func NewQAudioSource3(format *QAudioFormat) *QAudioSource { - var outptr_QAudioSource *C.QAudioSource = nil - var outptr_QObject *C.QObject = nil - C.QAudioSource_new3(format.cPointer(), &outptr_QAudioSource, &outptr_QObject) - ret := newQAudioSource(outptr_QAudioSource, outptr_QObject) + ret := newQAudioSource(C.QAudioSource_new3(format.cPointer())) ret.isSubclass = true return ret } // NewQAudioSource4 constructs a new QAudioSource object. func NewQAudioSource4(format *QAudioFormat, parent *qt6.QObject) *QAudioSource { - var outptr_QAudioSource *C.QAudioSource = nil - var outptr_QObject *C.QObject = nil - C.QAudioSource_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioSource, &outptr_QObject) - ret := newQAudioSource(outptr_QAudioSource, outptr_QObject) + ret := newQAudioSource(C.QAudioSource_new4(format.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQAudioSource5 constructs a new QAudioSource object. func NewQAudioSource5(audioDeviceInfo *QAudioDevice, format *QAudioFormat) *QAudioSource { - var outptr_QAudioSource *C.QAudioSource = nil - var outptr_QObject *C.QObject = nil - C.QAudioSource_new5(audioDeviceInfo.cPointer(), format.cPointer(), &outptr_QAudioSource, &outptr_QObject) - ret := newQAudioSource(outptr_QAudioSource, outptr_QObject) + ret := newQAudioSource(C.QAudioSource_new5(audioDeviceInfo.cPointer(), format.cPointer())) ret.isSubclass = true return ret } // NewQAudioSource6 constructs a new QAudioSource object. func NewQAudioSource6(audioDeviceInfo *QAudioDevice, format *QAudioFormat, parent *qt6.QObject) *QAudioSource { - var outptr_QAudioSource *C.QAudioSource = nil - var outptr_QObject *C.QObject = nil - C.QAudioSource_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioSource, &outptr_QObject) - ret := newQAudioSource(outptr_QAudioSource, outptr_QObject) + ret := newQAudioSource(C.QAudioSource_new6(audioDeviceInfo.cPointer(), format.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -154,7 +134,7 @@ func (this *QAudioSource) Start(device *qt6.QIODevice) { } func (this *QAudioSource) Start2() *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioSource_Start2(this.h)), nil, nil) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAudioSource_Start2(this.h))) } func (this *QAudioSource) Stop() { @@ -329,7 +309,7 @@ func miqt_exec_callback_QAudioSource_TimerEvent(self *C.QAudioSource, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QAudioSource{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -355,7 +335,7 @@ func miqt_exec_callback_QAudioSource_ChildEvent(self *C.QAudioSource, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QAudioSource{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/multimedia/gen_qaudiosource.h b/qt6/multimedia/gen_qaudiosource.h index e90884b6..e8a8d767 100644 --- a/qt6/multimedia/gen_qaudiosource.h +++ b/qt6/multimedia/gen_qaudiosource.h @@ -38,12 +38,13 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QAudioSource_new(QAudioSource** outptr_QAudioSource, QObject** outptr_QObject); -void QAudioSource_new2(QAudioDevice* audioDeviceInfo, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject); -void QAudioSource_new3(QAudioFormat* format, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject); -void QAudioSource_new4(QAudioFormat* format, QObject* parent, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject); -void QAudioSource_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject); -void QAudioSource_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent, QAudioSource** outptr_QAudioSource, QObject** outptr_QObject); +QAudioSource* QAudioSource_new(); +QAudioSource* QAudioSource_new2(QAudioDevice* audioDeviceInfo); +QAudioSource* QAudioSource_new3(QAudioFormat* format); +QAudioSource* QAudioSource_new4(QAudioFormat* format, QObject* parent); +QAudioSource* QAudioSource_new5(QAudioDevice* audioDeviceInfo, QAudioFormat* format); +QAudioSource* QAudioSource_new6(QAudioDevice* audioDeviceInfo, QAudioFormat* format, QObject* parent); +void QAudioSource_virtbase(QAudioSource* src, QObject** outptr_QObject); QMetaObject* QAudioSource_MetaObject(const QAudioSource* self); void* QAudioSource_Metacast(QAudioSource* self, const char* param1); struct miqt_string QAudioSource_Tr(const char* s); diff --git a/qt6/multimedia/gen_qcamera.cpp b/qt6/multimedia/gen_qcamera.cpp index 78e00353..91062228 100644 --- a/qt6/multimedia/gen_qcamera.cpp +++ b/qt6/multimedia/gen_qcamera.cpp @@ -201,40 +201,32 @@ public: }; -void QCamera_new(QCamera** outptr_QCamera, QObject** outptr_QObject) { - MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(); - *outptr_QCamera = ret; - *outptr_QObject = static_cast(ret); +QCamera* QCamera_new() { + return new MiqtVirtualQCamera(); } -void QCamera_new2(QCameraDevice* cameraDevice, QCamera** outptr_QCamera, QObject** outptr_QObject) { - MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(*cameraDevice); - *outptr_QCamera = ret; - *outptr_QObject = static_cast(ret); +QCamera* QCamera_new2(QCameraDevice* cameraDevice) { + return new MiqtVirtualQCamera(*cameraDevice); } -void QCamera_new3(int position, QCamera** outptr_QCamera, QObject** outptr_QObject) { - MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(static_cast(position)); - *outptr_QCamera = ret; - *outptr_QObject = static_cast(ret); +QCamera* QCamera_new3(int position) { + return new MiqtVirtualQCamera(static_cast(position)); } -void QCamera_new4(QObject* parent, QCamera** outptr_QCamera, QObject** outptr_QObject) { - MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(parent); - *outptr_QCamera = ret; - *outptr_QObject = static_cast(ret); +QCamera* QCamera_new4(QObject* parent) { + return new MiqtVirtualQCamera(parent); } -void QCamera_new5(QCameraDevice* cameraDevice, QObject* parent, QCamera** outptr_QCamera, QObject** outptr_QObject) { - MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(*cameraDevice, parent); - *outptr_QCamera = ret; - *outptr_QObject = static_cast(ret); +QCamera* QCamera_new5(QCameraDevice* cameraDevice, QObject* parent) { + return new MiqtVirtualQCamera(*cameraDevice, parent); } -void QCamera_new6(int position, QObject* parent, QCamera** outptr_QCamera, QObject** outptr_QObject) { - MiqtVirtualQCamera* ret = new MiqtVirtualQCamera(static_cast(position), parent); - *outptr_QCamera = ret; - *outptr_QObject = static_cast(ret); +QCamera* QCamera_new6(int position, QObject* parent) { + return new MiqtVirtualQCamera(static_cast(position), parent); +} + +void QCamera_virtbase(QCamera* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QCamera_MetaObject(const QCamera* self) { diff --git a/qt6/multimedia/gen_qcamera.go b/qt6/multimedia/gen_qcamera.go index 1263299e..72f60cf9 100644 --- a/qt6/multimedia/gen_qcamera.go +++ b/qt6/multimedia/gen_qcamera.go @@ -117,86 +117,66 @@ func (this *QCamera) UnsafePointer() unsafe.Pointer { } // newQCamera constructs the type using only CGO pointers. -func newQCamera(h *C.QCamera, h_QObject *C.QObject) *QCamera { +func newQCamera(h *C.QCamera) *QCamera { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QCamera_virtbase(h, &outptr_QObject) + return &QCamera{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQCamera constructs the type using only unsafe pointers. -func UnsafeNewQCamera(h unsafe.Pointer, h_QObject unsafe.Pointer) *QCamera { - if h == nil { - return nil - } - - return &QCamera{h: (*C.QCamera)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQCamera(h unsafe.Pointer) *QCamera { + return newQCamera((*C.QCamera)(h)) } // NewQCamera constructs a new QCamera object. func NewQCamera() *QCamera { - var outptr_QCamera *C.QCamera = nil - var outptr_QObject *C.QObject = nil - C.QCamera_new(&outptr_QCamera, &outptr_QObject) - ret := newQCamera(outptr_QCamera, outptr_QObject) + ret := newQCamera(C.QCamera_new()) ret.isSubclass = true return ret } // NewQCamera2 constructs a new QCamera object. func NewQCamera2(cameraDevice *QCameraDevice) *QCamera { - var outptr_QCamera *C.QCamera = nil - var outptr_QObject *C.QObject = nil - C.QCamera_new2(cameraDevice.cPointer(), &outptr_QCamera, &outptr_QObject) - ret := newQCamera(outptr_QCamera, outptr_QObject) + ret := newQCamera(C.QCamera_new2(cameraDevice.cPointer())) ret.isSubclass = true return ret } // NewQCamera3 constructs a new QCamera object. func NewQCamera3(position QCameraDevice__Position) *QCamera { - var outptr_QCamera *C.QCamera = nil - var outptr_QObject *C.QObject = nil - C.QCamera_new3((C.int)(position), &outptr_QCamera, &outptr_QObject) - ret := newQCamera(outptr_QCamera, outptr_QObject) + ret := newQCamera(C.QCamera_new3((C.int)(position))) ret.isSubclass = true return ret } // NewQCamera4 constructs a new QCamera object. func NewQCamera4(parent *qt6.QObject) *QCamera { - var outptr_QCamera *C.QCamera = nil - var outptr_QObject *C.QObject = nil - C.QCamera_new4((*C.QObject)(parent.UnsafePointer()), &outptr_QCamera, &outptr_QObject) - ret := newQCamera(outptr_QCamera, outptr_QObject) + ret := newQCamera(C.QCamera_new4((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQCamera5 constructs a new QCamera object. func NewQCamera5(cameraDevice *QCameraDevice, parent *qt6.QObject) *QCamera { - var outptr_QCamera *C.QCamera = nil - var outptr_QObject *C.QObject = nil - C.QCamera_new5(cameraDevice.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QCamera, &outptr_QObject) - ret := newQCamera(outptr_QCamera, outptr_QObject) + ret := newQCamera(C.QCamera_new5(cameraDevice.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQCamera6 constructs a new QCamera object. func NewQCamera6(position QCameraDevice__Position, parent *qt6.QObject) *QCamera { - var outptr_QCamera *C.QCamera = nil - var outptr_QObject *C.QObject = nil - C.QCamera_new6((C.int)(position), (*C.QObject)(parent.UnsafePointer()), &outptr_QCamera, &outptr_QObject) - ret := newQCamera(outptr_QCamera, outptr_QObject) + ret := newQCamera(C.QCamera_new6((C.int)(position), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -229,7 +209,7 @@ func (this *QCamera) IsActive() bool { } func (this *QCamera) CaptureSession() *QMediaCaptureSession { - return newQMediaCaptureSession(C.QCamera_CaptureSession(this.h), nil) + return newQMediaCaptureSession(C.QCamera_CaptureSession(this.h)) } func (this *QCamera) CameraDevice() *QCameraDevice { @@ -1072,7 +1052,7 @@ func miqt_exec_callback_QCamera_TimerEvent(self *C.QCamera, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QCamera{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1098,7 +1078,7 @@ func miqt_exec_callback_QCamera_ChildEvent(self *C.QCamera, cb C.intptr_t, event } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QCamera{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/multimedia/gen_qcamera.h b/qt6/multimedia/gen_qcamera.h index 2f6f51d7..f4d5a8e2 100644 --- a/qt6/multimedia/gen_qcamera.h +++ b/qt6/multimedia/gen_qcamera.h @@ -40,12 +40,13 @@ typedef struct QPointF QPointF; typedef struct QTimerEvent QTimerEvent; #endif -void QCamera_new(QCamera** outptr_QCamera, QObject** outptr_QObject); -void QCamera_new2(QCameraDevice* cameraDevice, QCamera** outptr_QCamera, QObject** outptr_QObject); -void QCamera_new3(int position, QCamera** outptr_QCamera, QObject** outptr_QObject); -void QCamera_new4(QObject* parent, QCamera** outptr_QCamera, QObject** outptr_QObject); -void QCamera_new5(QCameraDevice* cameraDevice, QObject* parent, QCamera** outptr_QCamera, QObject** outptr_QObject); -void QCamera_new6(int position, QObject* parent, QCamera** outptr_QCamera, QObject** outptr_QObject); +QCamera* QCamera_new(); +QCamera* QCamera_new2(QCameraDevice* cameraDevice); +QCamera* QCamera_new3(int position); +QCamera* QCamera_new4(QObject* parent); +QCamera* QCamera_new5(QCameraDevice* cameraDevice, QObject* parent); +QCamera* QCamera_new6(int position, QObject* parent); +void QCamera_virtbase(QCamera* src, QObject** outptr_QObject); QMetaObject* QCamera_MetaObject(const QCamera* self); void* QCamera_Metacast(QCamera* self, const char* param1); struct miqt_string QCamera_Tr(const char* s); diff --git a/qt6/multimedia/gen_qcameradevice.cpp b/qt6/multimedia/gen_qcameradevice.cpp index c30f10dc..b6a8bd50 100644 --- a/qt6/multimedia/gen_qcameradevice.cpp +++ b/qt6/multimedia/gen_qcameradevice.cpp @@ -10,14 +10,12 @@ #include "gen_qcameradevice.h" #include "_cgo_export.h" -void QCameraFormat_new(QCameraFormat** outptr_QCameraFormat) { - QCameraFormat* ret = new QCameraFormat(); - *outptr_QCameraFormat = ret; +QCameraFormat* QCameraFormat_new() { + return new QCameraFormat(); } -void QCameraFormat_new2(QCameraFormat* other, QCameraFormat** outptr_QCameraFormat) { - QCameraFormat* ret = new QCameraFormat(*other); - *outptr_QCameraFormat = ret; +QCameraFormat* QCameraFormat_new2(QCameraFormat* other) { + return new QCameraFormat(*other); } void QCameraFormat_OperatorAssign(QCameraFormat* self, QCameraFormat* other) { @@ -61,14 +59,12 @@ void QCameraFormat_Delete(QCameraFormat* self, bool isSubclass) { } } -void QCameraDevice_new(QCameraDevice** outptr_QCameraDevice) { - QCameraDevice* ret = new QCameraDevice(); - *outptr_QCameraDevice = ret; +QCameraDevice* QCameraDevice_new() { + return new QCameraDevice(); } -void QCameraDevice_new2(QCameraDevice* other, QCameraDevice** outptr_QCameraDevice) { - QCameraDevice* ret = new QCameraDevice(*other); - *outptr_QCameraDevice = ret; +QCameraDevice* QCameraDevice_new2(QCameraDevice* other) { + return new QCameraDevice(*other); } void QCameraDevice_OperatorAssign(QCameraDevice* self, QCameraDevice* other) { diff --git a/qt6/multimedia/gen_qcameradevice.go b/qt6/multimedia/gen_qcameradevice.go index 735f8414..ee816ff5 100644 --- a/qt6/multimedia/gen_qcameradevice.go +++ b/qt6/multimedia/gen_qcameradevice.go @@ -46,34 +46,27 @@ func newQCameraFormat(h *C.QCameraFormat) *QCameraFormat { if h == nil { return nil } + return &QCameraFormat{h: h} } // UnsafeNewQCameraFormat constructs the type using only unsafe pointers. func UnsafeNewQCameraFormat(h unsafe.Pointer) *QCameraFormat { - if h == nil { - return nil - } - - return &QCameraFormat{h: (*C.QCameraFormat)(h)} + return newQCameraFormat((*C.QCameraFormat)(h)) } // NewQCameraFormat constructs a new QCameraFormat object. func NewQCameraFormat() *QCameraFormat { - var outptr_QCameraFormat *C.QCameraFormat = nil - C.QCameraFormat_new(&outptr_QCameraFormat) - ret := newQCameraFormat(outptr_QCameraFormat) + ret := newQCameraFormat(C.QCameraFormat_new()) ret.isSubclass = true return ret } // NewQCameraFormat2 constructs a new QCameraFormat object. func NewQCameraFormat2(other *QCameraFormat) *QCameraFormat { - var outptr_QCameraFormat *C.QCameraFormat = nil - C.QCameraFormat_new2(other.cPointer(), &outptr_QCameraFormat) - ret := newQCameraFormat(outptr_QCameraFormat) + ret := newQCameraFormat(C.QCameraFormat_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -150,34 +143,27 @@ func newQCameraDevice(h *C.QCameraDevice) *QCameraDevice { if h == nil { return nil } + return &QCameraDevice{h: h} } // UnsafeNewQCameraDevice constructs the type using only unsafe pointers. func UnsafeNewQCameraDevice(h unsafe.Pointer) *QCameraDevice { - if h == nil { - return nil - } - - return &QCameraDevice{h: (*C.QCameraDevice)(h)} + return newQCameraDevice((*C.QCameraDevice)(h)) } // NewQCameraDevice constructs a new QCameraDevice object. func NewQCameraDevice() *QCameraDevice { - var outptr_QCameraDevice *C.QCameraDevice = nil - C.QCameraDevice_new(&outptr_QCameraDevice) - ret := newQCameraDevice(outptr_QCameraDevice) + ret := newQCameraDevice(C.QCameraDevice_new()) ret.isSubclass = true return ret } // NewQCameraDevice2 constructs a new QCameraDevice object. func NewQCameraDevice2(other *QCameraDevice) *QCameraDevice { - var outptr_QCameraDevice *C.QCameraDevice = nil - C.QCameraDevice_new2(other.cPointer(), &outptr_QCameraDevice) - ret := newQCameraDevice(outptr_QCameraDevice) + ret := newQCameraDevice(C.QCameraDevice_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/multimedia/gen_qcameradevice.h b/qt6/multimedia/gen_qcameradevice.h index ef87ef5d..5342822a 100644 --- a/qt6/multimedia/gen_qcameradevice.h +++ b/qt6/multimedia/gen_qcameradevice.h @@ -24,8 +24,8 @@ typedef struct QCameraFormat QCameraFormat; typedef struct QSize QSize; #endif -void QCameraFormat_new(QCameraFormat** outptr_QCameraFormat); -void QCameraFormat_new2(QCameraFormat* other, QCameraFormat** outptr_QCameraFormat); +QCameraFormat* QCameraFormat_new(); +QCameraFormat* QCameraFormat_new2(QCameraFormat* other); void QCameraFormat_OperatorAssign(QCameraFormat* self, QCameraFormat* other); int QCameraFormat_PixelFormat(const QCameraFormat* self); QSize* QCameraFormat_Resolution(const QCameraFormat* self); @@ -36,8 +36,8 @@ bool QCameraFormat_OperatorEqual(const QCameraFormat* self, QCameraFormat* other bool QCameraFormat_OperatorNotEqual(const QCameraFormat* self, QCameraFormat* other); void QCameraFormat_Delete(QCameraFormat* self, bool isSubclass); -void QCameraDevice_new(QCameraDevice** outptr_QCameraDevice); -void QCameraDevice_new2(QCameraDevice* other, QCameraDevice** outptr_QCameraDevice); +QCameraDevice* QCameraDevice_new(); +QCameraDevice* QCameraDevice_new2(QCameraDevice* other); void QCameraDevice_OperatorAssign(QCameraDevice* self, QCameraDevice* other); bool QCameraDevice_OperatorEqual(const QCameraDevice* self, QCameraDevice* other); bool QCameraDevice_OperatorNotEqual(const QCameraDevice* self, QCameraDevice* other); diff --git a/qt6/multimedia/gen_qgraphicsvideoitem.cpp b/qt6/multimedia/gen_qgraphicsvideoitem.cpp index 40855152..6d5d8981 100644 --- a/qt6/multimedia/gen_qgraphicsvideoitem.cpp +++ b/qt6/multimedia/gen_qgraphicsvideoitem.cpp @@ -174,20 +174,16 @@ public: }; -void QGraphicsVideoItem_new(QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsVideoItem* ret = new MiqtVirtualQGraphicsVideoItem(); - *outptr_QGraphicsVideoItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsVideoItem* QGraphicsVideoItem_new() { + return new MiqtVirtualQGraphicsVideoItem(); } -void QGraphicsVideoItem_new2(QGraphicsItem* parent, QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsVideoItem* ret = new MiqtVirtualQGraphicsVideoItem(parent); - *outptr_QGraphicsVideoItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsVideoItem* QGraphicsVideoItem_new2(QGraphicsItem* parent) { + return new MiqtVirtualQGraphicsVideoItem(parent); +} + +void QGraphicsVideoItem_virtbase(QGraphicsVideoItem* src, QGraphicsObject** outptr_QGraphicsObject) { + *outptr_QGraphicsObject = static_cast(src); } QMetaObject* QGraphicsVideoItem_MetaObject(const QGraphicsVideoItem* self) { diff --git a/qt6/multimedia/gen_qgraphicsvideoitem.go b/qt6/multimedia/gen_qgraphicsvideoitem.go index 30ba4a2f..90091248 100644 --- a/qt6/multimedia/gen_qgraphicsvideoitem.go +++ b/qt6/multimedia/gen_qgraphicsvideoitem.go @@ -42,46 +42,34 @@ func (this *QGraphicsVideoItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsVideoItem constructs the type using only CGO pointers. -func newQGraphicsVideoItem(h *C.QGraphicsVideoItem, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsVideoItem { +func newQGraphicsVideoItem(h *C.QGraphicsVideoItem) *QGraphicsVideoItem { if h == nil { return nil } + var outptr_QGraphicsObject *C.QGraphicsObject = nil + C.QGraphicsVideoItem_virtbase(h, &outptr_QGraphicsObject) + return &QGraphicsVideoItem{h: h, - QGraphicsObject: qt6.UnsafeNewQGraphicsObject(unsafe.Pointer(h_QGraphicsObject), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QGraphicsItem))} + QGraphicsObject: qt6.UnsafeNewQGraphicsObject(unsafe.Pointer(outptr_QGraphicsObject))} } // UnsafeNewQGraphicsVideoItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsVideoItem(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsVideoItem { - if h == nil { - return nil - } - - return &QGraphicsVideoItem{h: (*C.QGraphicsVideoItem)(h), - QGraphicsObject: qt6.UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem)} +func UnsafeNewQGraphicsVideoItem(h unsafe.Pointer) *QGraphicsVideoItem { + return newQGraphicsVideoItem((*C.QGraphicsVideoItem)(h)) } // NewQGraphicsVideoItem constructs a new QGraphicsVideoItem object. func NewQGraphicsVideoItem() *QGraphicsVideoItem { - var outptr_QGraphicsVideoItem *C.QGraphicsVideoItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsVideoItem_new(&outptr_QGraphicsVideoItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsVideoItem(outptr_QGraphicsVideoItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsVideoItem(C.QGraphicsVideoItem_new()) ret.isSubclass = true return ret } // NewQGraphicsVideoItem2 constructs a new QGraphicsVideoItem object. func NewQGraphicsVideoItem2(parent *qt6.QGraphicsItem) *QGraphicsVideoItem { - var outptr_QGraphicsVideoItem *C.QGraphicsVideoItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsVideoItem_new2((*C.QGraphicsItem)(parent.UnsafePointer()), &outptr_QGraphicsVideoItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsVideoItem(outptr_QGraphicsVideoItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsVideoItem(C.QGraphicsVideoItem_new2((*C.QGraphicsItem)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -106,7 +94,7 @@ func QGraphicsVideoItem_Tr(s string) string { } func (this *QGraphicsVideoItem) VideoSink() *QVideoSink { - return newQVideoSink(C.QGraphicsVideoItem_VideoSink(this.h), nil) + return newQVideoSink(C.QGraphicsVideoItem_VideoSink(this.h)) } func (this *QGraphicsVideoItem) AspectRatioMode() qt6.AspectRatioMode { @@ -248,9 +236,9 @@ func miqt_exec_callback_QGraphicsVideoItem_Paint(self *C.QGraphicsVideoItem, cb // Convert all CABI parameters to Go parameters slotval1 := qt6.UnsafeNewQPainter(unsafe.Pointer(painter)) - slotval2 := qt6.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval2 := qt6.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option)) - slotval3 := qt6.UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + slotval3 := qt6.UnsafeNewQWidget(unsafe.Pointer(widget)) gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) @@ -301,7 +289,7 @@ func miqt_exec_callback_QGraphicsVideoItem_TimerEvent(self *C.QGraphicsVideoItem } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QGraphicsVideoItem{h: self}).callVirtualBase_TimerEvent, slotval1) diff --git a/qt6/multimedia/gen_qgraphicsvideoitem.h b/qt6/multimedia/gen_qgraphicsvideoitem.h index c1a64bdf..7bb0432f 100644 --- a/qt6/multimedia/gen_qgraphicsvideoitem.h +++ b/qt6/multimedia/gen_qgraphicsvideoitem.h @@ -48,8 +48,9 @@ typedef struct QVideoSink QVideoSink; typedef struct QWidget QWidget; #endif -void QGraphicsVideoItem_new(QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsVideoItem_new2(QGraphicsItem* parent, QGraphicsVideoItem** outptr_QGraphicsVideoItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsVideoItem* QGraphicsVideoItem_new(); +QGraphicsVideoItem* QGraphicsVideoItem_new2(QGraphicsItem* parent); +void QGraphicsVideoItem_virtbase(QGraphicsVideoItem* src, QGraphicsObject** outptr_QGraphicsObject); QMetaObject* QGraphicsVideoItem_MetaObject(const QGraphicsVideoItem* self); void* QGraphicsVideoItem_Metacast(QGraphicsVideoItem* self, const char* param1); struct miqt_string QGraphicsVideoItem_Tr(const char* s); diff --git a/qt6/multimedia/gen_qimagecapture.cpp b/qt6/multimedia/gen_qimagecapture.cpp index ce6be4eb..7159de80 100644 --- a/qt6/multimedia/gen_qimagecapture.cpp +++ b/qt6/multimedia/gen_qimagecapture.cpp @@ -199,16 +199,16 @@ public: }; -void QImageCapture_new(QImageCapture** outptr_QImageCapture, QObject** outptr_QObject) { - MiqtVirtualQImageCapture* ret = new MiqtVirtualQImageCapture(); - *outptr_QImageCapture = ret; - *outptr_QObject = static_cast(ret); +QImageCapture* QImageCapture_new() { + return new MiqtVirtualQImageCapture(); } -void QImageCapture_new2(QObject* parent, QImageCapture** outptr_QImageCapture, QObject** outptr_QObject) { - MiqtVirtualQImageCapture* ret = new MiqtVirtualQImageCapture(parent); - *outptr_QImageCapture = ret; - *outptr_QObject = static_cast(ret); +QImageCapture* QImageCapture_new2(QObject* parent) { + return new MiqtVirtualQImageCapture(parent); +} + +void QImageCapture_virtbase(QImageCapture* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QImageCapture_MetaObject(const QImageCapture* self) { diff --git a/qt6/multimedia/gen_qimagecapture.go b/qt6/multimedia/gen_qimagecapture.go index ea07964e..ff5ce6db 100644 --- a/qt6/multimedia/gen_qimagecapture.go +++ b/qt6/multimedia/gen_qimagecapture.go @@ -68,42 +68,34 @@ func (this *QImageCapture) UnsafePointer() unsafe.Pointer { } // newQImageCapture constructs the type using only CGO pointers. -func newQImageCapture(h *C.QImageCapture, h_QObject *C.QObject) *QImageCapture { +func newQImageCapture(h *C.QImageCapture) *QImageCapture { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QImageCapture_virtbase(h, &outptr_QObject) + return &QImageCapture{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQImageCapture constructs the type using only unsafe pointers. -func UnsafeNewQImageCapture(h unsafe.Pointer, h_QObject unsafe.Pointer) *QImageCapture { - if h == nil { - return nil - } - - return &QImageCapture{h: (*C.QImageCapture)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQImageCapture(h unsafe.Pointer) *QImageCapture { + return newQImageCapture((*C.QImageCapture)(h)) } // NewQImageCapture constructs a new QImageCapture object. func NewQImageCapture() *QImageCapture { - var outptr_QImageCapture *C.QImageCapture = nil - var outptr_QObject *C.QObject = nil - C.QImageCapture_new(&outptr_QImageCapture, &outptr_QObject) - ret := newQImageCapture(outptr_QImageCapture, outptr_QObject) + ret := newQImageCapture(C.QImageCapture_new()) ret.isSubclass = true return ret } // NewQImageCapture2 constructs a new QImageCapture object. func NewQImageCapture2(parent *qt6.QObject) *QImageCapture { - var outptr_QImageCapture *C.QImageCapture = nil - var outptr_QObject *C.QObject = nil - C.QImageCapture_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QImageCapture, &outptr_QObject) - ret := newQImageCapture(outptr_QImageCapture, outptr_QObject) + ret := newQImageCapture(C.QImageCapture_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -132,7 +124,7 @@ func (this *QImageCapture) IsAvailable() bool { } func (this *QImageCapture) CaptureSession() *QMediaCaptureSession { - return newQMediaCaptureSession(C.QImageCapture_CaptureSession(this.h), nil) + return newQMediaCaptureSession(C.QImageCapture_CaptureSession(this.h)) } func (this *QImageCapture) Error() QImageCapture__Error { @@ -399,7 +391,7 @@ func miqt_exec_callback_QImageCapture_ImageCaptured(cb C.intptr_t, id C.int, pre // Convert all CABI parameters to Go parameters slotval1 := (int)(id) - slotval2 := qt6.UnsafeNewQImage(unsafe.Pointer(preview), nil) + slotval2 := qt6.UnsafeNewQImage(unsafe.Pointer(preview)) gofunc(slotval1, slotval2) } @@ -585,7 +577,7 @@ func miqt_exec_callback_QImageCapture_TimerEvent(self *C.QImageCapture, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QImageCapture{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -611,7 +603,7 @@ func miqt_exec_callback_QImageCapture_ChildEvent(self *C.QImageCapture, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QImageCapture{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/multimedia/gen_qimagecapture.h b/qt6/multimedia/gen_qimagecapture.h index cd0768a3..9a371200 100644 --- a/qt6/multimedia/gen_qimagecapture.h +++ b/qt6/multimedia/gen_qimagecapture.h @@ -42,8 +42,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVideoFrame QVideoFrame; #endif -void QImageCapture_new(QImageCapture** outptr_QImageCapture, QObject** outptr_QObject); -void QImageCapture_new2(QObject* parent, QImageCapture** outptr_QImageCapture, QObject** outptr_QObject); +QImageCapture* QImageCapture_new(); +QImageCapture* QImageCapture_new2(QObject* parent); +void QImageCapture_virtbase(QImageCapture* src, QObject** outptr_QObject); QMetaObject* QImageCapture_MetaObject(const QImageCapture* self); void* QImageCapture_Metacast(QImageCapture* self, const char* param1); struct miqt_string QImageCapture_Tr(const char* s); diff --git a/qt6/multimedia/gen_qmediacapturesession.cpp b/qt6/multimedia/gen_qmediacapturesession.cpp index efdb98d1..b8b81436 100644 --- a/qt6/multimedia/gen_qmediacapturesession.cpp +++ b/qt6/multimedia/gen_qmediacapturesession.cpp @@ -199,16 +199,16 @@ public: }; -void QMediaCaptureSession_new(QMediaCaptureSession** outptr_QMediaCaptureSession, QObject** outptr_QObject) { - MiqtVirtualQMediaCaptureSession* ret = new MiqtVirtualQMediaCaptureSession(); - *outptr_QMediaCaptureSession = ret; - *outptr_QObject = static_cast(ret); +QMediaCaptureSession* QMediaCaptureSession_new() { + return new MiqtVirtualQMediaCaptureSession(); } -void QMediaCaptureSession_new2(QObject* parent, QMediaCaptureSession** outptr_QMediaCaptureSession, QObject** outptr_QObject) { - MiqtVirtualQMediaCaptureSession* ret = new MiqtVirtualQMediaCaptureSession(parent); - *outptr_QMediaCaptureSession = ret; - *outptr_QObject = static_cast(ret); +QMediaCaptureSession* QMediaCaptureSession_new2(QObject* parent) { + return new MiqtVirtualQMediaCaptureSession(parent); +} + +void QMediaCaptureSession_virtbase(QMediaCaptureSession* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QMediaCaptureSession_MetaObject(const QMediaCaptureSession* self) { diff --git a/qt6/multimedia/gen_qmediacapturesession.go b/qt6/multimedia/gen_qmediacapturesession.go index ba09e673..f9878588 100644 --- a/qt6/multimedia/gen_qmediacapturesession.go +++ b/qt6/multimedia/gen_qmediacapturesession.go @@ -36,42 +36,34 @@ func (this *QMediaCaptureSession) UnsafePointer() unsafe.Pointer { } // newQMediaCaptureSession constructs the type using only CGO pointers. -func newQMediaCaptureSession(h *C.QMediaCaptureSession, h_QObject *C.QObject) *QMediaCaptureSession { +func newQMediaCaptureSession(h *C.QMediaCaptureSession) *QMediaCaptureSession { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QMediaCaptureSession_virtbase(h, &outptr_QObject) + return &QMediaCaptureSession{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQMediaCaptureSession constructs the type using only unsafe pointers. -func UnsafeNewQMediaCaptureSession(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaCaptureSession { - if h == nil { - return nil - } - - return &QMediaCaptureSession{h: (*C.QMediaCaptureSession)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQMediaCaptureSession(h unsafe.Pointer) *QMediaCaptureSession { + return newQMediaCaptureSession((*C.QMediaCaptureSession)(h)) } // NewQMediaCaptureSession constructs a new QMediaCaptureSession object. func NewQMediaCaptureSession() *QMediaCaptureSession { - var outptr_QMediaCaptureSession *C.QMediaCaptureSession = nil - var outptr_QObject *C.QObject = nil - C.QMediaCaptureSession_new(&outptr_QMediaCaptureSession, &outptr_QObject) - ret := newQMediaCaptureSession(outptr_QMediaCaptureSession, outptr_QObject) + ret := newQMediaCaptureSession(C.QMediaCaptureSession_new()) ret.isSubclass = true return ret } // NewQMediaCaptureSession2 constructs a new QMediaCaptureSession object. func NewQMediaCaptureSession2(parent *qt6.QObject) *QMediaCaptureSession { - var outptr_QMediaCaptureSession *C.QMediaCaptureSession = nil - var outptr_QObject *C.QObject = nil - C.QMediaCaptureSession_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QMediaCaptureSession, &outptr_QObject) - ret := newQMediaCaptureSession(outptr_QMediaCaptureSession, outptr_QObject) + ret := newQMediaCaptureSession(C.QMediaCaptureSession_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -96,7 +88,7 @@ func QMediaCaptureSession_Tr(s string) string { } func (this *QMediaCaptureSession) AudioInput() *QAudioInput { - return newQAudioInput(C.QMediaCaptureSession_AudioInput(this.h), nil) + return newQAudioInput(C.QMediaCaptureSession_AudioInput(this.h)) } func (this *QMediaCaptureSession) SetAudioInput(input *QAudioInput) { @@ -104,7 +96,7 @@ func (this *QMediaCaptureSession) SetAudioInput(input *QAudioInput) { } func (this *QMediaCaptureSession) Camera() *QCamera { - return newQCamera(C.QMediaCaptureSession_Camera(this.h), nil) + return newQCamera(C.QMediaCaptureSession_Camera(this.h)) } func (this *QMediaCaptureSession) SetCamera(camera *QCamera) { @@ -112,7 +104,7 @@ func (this *QMediaCaptureSession) SetCamera(camera *QCamera) { } func (this *QMediaCaptureSession) ImageCapture() *QImageCapture { - return newQImageCapture(C.QMediaCaptureSession_ImageCapture(this.h), nil) + return newQImageCapture(C.QMediaCaptureSession_ImageCapture(this.h)) } func (this *QMediaCaptureSession) SetImageCapture(imageCapture *QImageCapture) { @@ -120,7 +112,7 @@ func (this *QMediaCaptureSession) SetImageCapture(imageCapture *QImageCapture) { } func (this *QMediaCaptureSession) Recorder() *QMediaRecorder { - return newQMediaRecorder(C.QMediaCaptureSession_Recorder(this.h), nil) + return newQMediaRecorder(C.QMediaCaptureSession_Recorder(this.h)) } func (this *QMediaCaptureSession) SetRecorder(recorder *QMediaRecorder) { @@ -140,7 +132,7 @@ func (this *QMediaCaptureSession) SetVideoSink(sink *QVideoSink) { } func (this *QMediaCaptureSession) VideoSink() *QVideoSink { - return newQVideoSink(C.QMediaCaptureSession_VideoSink(this.h), nil) + return newQVideoSink(C.QMediaCaptureSession_VideoSink(this.h)) } func (this *QMediaCaptureSession) SetAudioOutput(output *QAudioOutput) { @@ -148,7 +140,7 @@ func (this *QMediaCaptureSession) SetAudioOutput(output *QAudioOutput) { } func (this *QMediaCaptureSession) AudioOutput() *QAudioOutput { - return newQAudioOutput(C.QMediaCaptureSession_AudioOutput(this.h), nil) + return newQAudioOutput(C.QMediaCaptureSession_AudioOutput(this.h)) } func (this *QMediaCaptureSession) AudioInputChanged() { @@ -353,7 +345,7 @@ func miqt_exec_callback_QMediaCaptureSession_TimerEvent(self *C.QMediaCaptureSes } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QMediaCaptureSession{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -379,7 +371,7 @@ func miqt_exec_callback_QMediaCaptureSession_ChildEvent(self *C.QMediaCaptureSes } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QMediaCaptureSession{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/multimedia/gen_qmediacapturesession.h b/qt6/multimedia/gen_qmediacapturesession.h index 0b4c6361..8fedf466 100644 --- a/qt6/multimedia/gen_qmediacapturesession.h +++ b/qt6/multimedia/gen_qmediacapturesession.h @@ -44,8 +44,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVideoSink QVideoSink; #endif -void QMediaCaptureSession_new(QMediaCaptureSession** outptr_QMediaCaptureSession, QObject** outptr_QObject); -void QMediaCaptureSession_new2(QObject* parent, QMediaCaptureSession** outptr_QMediaCaptureSession, QObject** outptr_QObject); +QMediaCaptureSession* QMediaCaptureSession_new(); +QMediaCaptureSession* QMediaCaptureSession_new2(QObject* parent); +void QMediaCaptureSession_virtbase(QMediaCaptureSession* src, QObject** outptr_QObject); QMetaObject* QMediaCaptureSession_MetaObject(const QMediaCaptureSession* self); void* QMediaCaptureSession_Metacast(QMediaCaptureSession* self, const char* param1); struct miqt_string QMediaCaptureSession_Tr(const char* s); diff --git a/qt6/multimedia/gen_qmediadevices.cpp b/qt6/multimedia/gen_qmediadevices.cpp index 3230fbf1..333ed862 100644 --- a/qt6/multimedia/gen_qmediadevices.cpp +++ b/qt6/multimedia/gen_qmediadevices.cpp @@ -196,16 +196,16 @@ public: }; -void QMediaDevices_new(QMediaDevices** outptr_QMediaDevices, QObject** outptr_QObject) { - MiqtVirtualQMediaDevices* ret = new MiqtVirtualQMediaDevices(); - *outptr_QMediaDevices = ret; - *outptr_QObject = static_cast(ret); +QMediaDevices* QMediaDevices_new() { + return new MiqtVirtualQMediaDevices(); } -void QMediaDevices_new2(QObject* parent, QMediaDevices** outptr_QMediaDevices, QObject** outptr_QObject) { - MiqtVirtualQMediaDevices* ret = new MiqtVirtualQMediaDevices(parent); - *outptr_QMediaDevices = ret; - *outptr_QObject = static_cast(ret); +QMediaDevices* QMediaDevices_new2(QObject* parent) { + return new MiqtVirtualQMediaDevices(parent); +} + +void QMediaDevices_virtbase(QMediaDevices* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QMediaDevices_MetaObject(const QMediaDevices* self) { diff --git a/qt6/multimedia/gen_qmediadevices.go b/qt6/multimedia/gen_qmediadevices.go index 8764435f..bd8edfd2 100644 --- a/qt6/multimedia/gen_qmediadevices.go +++ b/qt6/multimedia/gen_qmediadevices.go @@ -36,42 +36,34 @@ func (this *QMediaDevices) UnsafePointer() unsafe.Pointer { } // newQMediaDevices constructs the type using only CGO pointers. -func newQMediaDevices(h *C.QMediaDevices, h_QObject *C.QObject) *QMediaDevices { +func newQMediaDevices(h *C.QMediaDevices) *QMediaDevices { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QMediaDevices_virtbase(h, &outptr_QObject) + return &QMediaDevices{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQMediaDevices constructs the type using only unsafe pointers. -func UnsafeNewQMediaDevices(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaDevices { - if h == nil { - return nil - } - - return &QMediaDevices{h: (*C.QMediaDevices)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQMediaDevices(h unsafe.Pointer) *QMediaDevices { + return newQMediaDevices((*C.QMediaDevices)(h)) } // NewQMediaDevices constructs a new QMediaDevices object. func NewQMediaDevices() *QMediaDevices { - var outptr_QMediaDevices *C.QMediaDevices = nil - var outptr_QObject *C.QObject = nil - C.QMediaDevices_new(&outptr_QMediaDevices, &outptr_QObject) - ret := newQMediaDevices(outptr_QMediaDevices, outptr_QObject) + ret := newQMediaDevices(C.QMediaDevices_new()) ret.isSubclass = true return ret } // NewQMediaDevices2 constructs a new QMediaDevices object. func NewQMediaDevices2(parent *qt6.QObject) *QMediaDevices { - var outptr_QMediaDevices *C.QMediaDevices = nil - var outptr_QObject *C.QObject = nil - C.QMediaDevices_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QMediaDevices, &outptr_QObject) - ret := newQMediaDevices(outptr_QMediaDevices, outptr_QObject) + ret := newQMediaDevices(C.QMediaDevices_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -300,7 +292,7 @@ func miqt_exec_callback_QMediaDevices_TimerEvent(self *C.QMediaDevices, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QMediaDevices{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -326,7 +318,7 @@ func miqt_exec_callback_QMediaDevices_ChildEvent(self *C.QMediaDevices, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QMediaDevices{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/multimedia/gen_qmediadevices.h b/qt6/multimedia/gen_qmediadevices.h index 964b4741..6e303870 100644 --- a/qt6/multimedia/gen_qmediadevices.h +++ b/qt6/multimedia/gen_qmediadevices.h @@ -36,8 +36,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QMediaDevices_new(QMediaDevices** outptr_QMediaDevices, QObject** outptr_QObject); -void QMediaDevices_new2(QObject* parent, QMediaDevices** outptr_QMediaDevices, QObject** outptr_QObject); +QMediaDevices* QMediaDevices_new(); +QMediaDevices* QMediaDevices_new2(QObject* parent); +void QMediaDevices_virtbase(QMediaDevices* src, QObject** outptr_QObject); QMetaObject* QMediaDevices_MetaObject(const QMediaDevices* self); void* QMediaDevices_Metacast(QMediaDevices* self, const char* param1); struct miqt_string QMediaDevices_Tr(const char* s); diff --git a/qt6/multimedia/gen_qmediaformat.cpp b/qt6/multimedia/gen_qmediaformat.cpp index a3b77d0f..e89da932 100644 --- a/qt6/multimedia/gen_qmediaformat.cpp +++ b/qt6/multimedia/gen_qmediaformat.cpp @@ -8,19 +8,16 @@ #include "gen_qmediaformat.h" #include "_cgo_export.h" -void QMediaFormat_new(QMediaFormat** outptr_QMediaFormat) { - QMediaFormat* ret = new QMediaFormat(); - *outptr_QMediaFormat = ret; +QMediaFormat* QMediaFormat_new() { + return new QMediaFormat(); } -void QMediaFormat_new2(QMediaFormat* other, QMediaFormat** outptr_QMediaFormat) { - QMediaFormat* ret = new QMediaFormat(*other); - *outptr_QMediaFormat = ret; +QMediaFormat* QMediaFormat_new2(QMediaFormat* other) { + return new QMediaFormat(*other); } -void QMediaFormat_new3(int format, QMediaFormat** outptr_QMediaFormat) { - QMediaFormat* ret = new QMediaFormat(static_cast(format)); - *outptr_QMediaFormat = ret; +QMediaFormat* QMediaFormat_new3(int format) { + return new QMediaFormat(static_cast(format)); } void QMediaFormat_OperatorAssign(QMediaFormat* self, QMediaFormat* other) { diff --git a/qt6/multimedia/gen_qmediaformat.go b/qt6/multimedia/gen_qmediaformat.go index 9651c5c5..750f4d80 100644 --- a/qt6/multimedia/gen_qmediaformat.go +++ b/qt6/multimedia/gen_qmediaformat.go @@ -108,44 +108,35 @@ func newQMediaFormat(h *C.QMediaFormat) *QMediaFormat { if h == nil { return nil } + return &QMediaFormat{h: h} } // UnsafeNewQMediaFormat constructs the type using only unsafe pointers. func UnsafeNewQMediaFormat(h unsafe.Pointer) *QMediaFormat { - if h == nil { - return nil - } - - return &QMediaFormat{h: (*C.QMediaFormat)(h)} + return newQMediaFormat((*C.QMediaFormat)(h)) } // NewQMediaFormat constructs a new QMediaFormat object. func NewQMediaFormat() *QMediaFormat { - var outptr_QMediaFormat *C.QMediaFormat = nil - C.QMediaFormat_new(&outptr_QMediaFormat) - ret := newQMediaFormat(outptr_QMediaFormat) + ret := newQMediaFormat(C.QMediaFormat_new()) ret.isSubclass = true return ret } // NewQMediaFormat2 constructs a new QMediaFormat object. func NewQMediaFormat2(other *QMediaFormat) *QMediaFormat { - var outptr_QMediaFormat *C.QMediaFormat = nil - C.QMediaFormat_new2(other.cPointer(), &outptr_QMediaFormat) - ret := newQMediaFormat(outptr_QMediaFormat) + ret := newQMediaFormat(C.QMediaFormat_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQMediaFormat3 constructs a new QMediaFormat object. func NewQMediaFormat3(format QMediaFormat__FileFormat) *QMediaFormat { - var outptr_QMediaFormat *C.QMediaFormat = nil - C.QMediaFormat_new3((C.int)(format), &outptr_QMediaFormat) - ret := newQMediaFormat(outptr_QMediaFormat) + ret := newQMediaFormat(C.QMediaFormat_new3((C.int)(format))) ret.isSubclass = true return ret } diff --git a/qt6/multimedia/gen_qmediaformat.h b/qt6/multimedia/gen_qmediaformat.h index 83b069a4..a18897be 100644 --- a/qt6/multimedia/gen_qmediaformat.h +++ b/qt6/multimedia/gen_qmediaformat.h @@ -22,9 +22,9 @@ typedef struct QMediaFormat QMediaFormat; typedef struct QMimeType QMimeType; #endif -void QMediaFormat_new(QMediaFormat** outptr_QMediaFormat); -void QMediaFormat_new2(QMediaFormat* other, QMediaFormat** outptr_QMediaFormat); -void QMediaFormat_new3(int format, QMediaFormat** outptr_QMediaFormat); +QMediaFormat* QMediaFormat_new(); +QMediaFormat* QMediaFormat_new2(QMediaFormat* other); +QMediaFormat* QMediaFormat_new3(int format); void QMediaFormat_OperatorAssign(QMediaFormat* self, QMediaFormat* other); void QMediaFormat_Swap(QMediaFormat* self, QMediaFormat* other); int QMediaFormat_FileFormat(const QMediaFormat* self); diff --git a/qt6/multimedia/gen_qmediametadata.cpp b/qt6/multimedia/gen_qmediametadata.cpp index 6f44befa..c8e5f429 100644 --- a/qt6/multimedia/gen_qmediametadata.cpp +++ b/qt6/multimedia/gen_qmediametadata.cpp @@ -8,14 +8,12 @@ #include "gen_qmediametadata.h" #include "_cgo_export.h" -void QMediaMetaData_new(QMediaMetaData* param1, QMediaMetaData** outptr_QMediaMetaData) { - QMediaMetaData* ret = new QMediaMetaData(*param1); - *outptr_QMediaMetaData = ret; +QMediaMetaData* QMediaMetaData_new(QMediaMetaData* param1) { + return new QMediaMetaData(*param1); } -void QMediaMetaData_new2(QMediaMetaData** outptr_QMediaMetaData) { - QMediaMetaData* ret = new QMediaMetaData(); - *outptr_QMediaMetaData = ret; +QMediaMetaData* QMediaMetaData_new2() { + return new QMediaMetaData(); } QVariant* QMediaMetaData_Value(const QMediaMetaData* self, int k) { diff --git a/qt6/multimedia/gen_qmediametadata.go b/qt6/multimedia/gen_qmediametadata.go index aae4aa62..0758912c 100644 --- a/qt6/multimedia/gen_qmediametadata.go +++ b/qt6/multimedia/gen_qmediametadata.go @@ -71,34 +71,27 @@ func newQMediaMetaData(h *C.QMediaMetaData) *QMediaMetaData { if h == nil { return nil } + return &QMediaMetaData{h: h} } // UnsafeNewQMediaMetaData constructs the type using only unsafe pointers. func UnsafeNewQMediaMetaData(h unsafe.Pointer) *QMediaMetaData { - if h == nil { - return nil - } - - return &QMediaMetaData{h: (*C.QMediaMetaData)(h)} + return newQMediaMetaData((*C.QMediaMetaData)(h)) } // NewQMediaMetaData constructs a new QMediaMetaData object. func NewQMediaMetaData(param1 *QMediaMetaData) *QMediaMetaData { - var outptr_QMediaMetaData *C.QMediaMetaData = nil - C.QMediaMetaData_new(param1.cPointer(), &outptr_QMediaMetaData) - ret := newQMediaMetaData(outptr_QMediaMetaData) + ret := newQMediaMetaData(C.QMediaMetaData_new(param1.cPointer())) ret.isSubclass = true return ret } // NewQMediaMetaData2 constructs a new QMediaMetaData object. func NewQMediaMetaData2() *QMediaMetaData { - var outptr_QMediaMetaData *C.QMediaMetaData = nil - C.QMediaMetaData_new2(&outptr_QMediaMetaData) - ret := newQMediaMetaData(outptr_QMediaMetaData) + ret := newQMediaMetaData(C.QMediaMetaData_new2()) ret.isSubclass = true return ret } diff --git a/qt6/multimedia/gen_qmediametadata.h b/qt6/multimedia/gen_qmediametadata.h index 7e1f85be..ef2b8217 100644 --- a/qt6/multimedia/gen_qmediametadata.h +++ b/qt6/multimedia/gen_qmediametadata.h @@ -22,8 +22,8 @@ typedef struct QMediaMetaData QMediaMetaData; typedef struct QVariant QVariant; #endif -void QMediaMetaData_new(QMediaMetaData* param1, QMediaMetaData** outptr_QMediaMetaData); -void QMediaMetaData_new2(QMediaMetaData** outptr_QMediaMetaData); +QMediaMetaData* QMediaMetaData_new(QMediaMetaData* param1); +QMediaMetaData* QMediaMetaData_new2(); QVariant* QMediaMetaData_Value(const QMediaMetaData* self, int k); void QMediaMetaData_Insert(QMediaMetaData* self, int k, QVariant* value); void QMediaMetaData_Remove(QMediaMetaData* self, int k); diff --git a/qt6/multimedia/gen_qmediaplayer.cpp b/qt6/multimedia/gen_qmediaplayer.cpp index ee57e527..67211ce9 100644 --- a/qt6/multimedia/gen_qmediaplayer.cpp +++ b/qt6/multimedia/gen_qmediaplayer.cpp @@ -200,16 +200,16 @@ public: }; -void QMediaPlayer_new(QMediaPlayer** outptr_QMediaPlayer, QObject** outptr_QObject) { - MiqtVirtualQMediaPlayer* ret = new MiqtVirtualQMediaPlayer(); - *outptr_QMediaPlayer = ret; - *outptr_QObject = static_cast(ret); +QMediaPlayer* QMediaPlayer_new() { + return new MiqtVirtualQMediaPlayer(); } -void QMediaPlayer_new2(QObject* parent, QMediaPlayer** outptr_QMediaPlayer, QObject** outptr_QObject) { - MiqtVirtualQMediaPlayer* ret = new MiqtVirtualQMediaPlayer(parent); - *outptr_QMediaPlayer = ret; - *outptr_QObject = static_cast(ret); +QMediaPlayer* QMediaPlayer_new2(QObject* parent) { + return new MiqtVirtualQMediaPlayer(parent); +} + +void QMediaPlayer_virtbase(QMediaPlayer* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QMediaPlayer_MetaObject(const QMediaPlayer* self) { diff --git a/qt6/multimedia/gen_qmediaplayer.go b/qt6/multimedia/gen_qmediaplayer.go index 13a56993..9dc18005 100644 --- a/qt6/multimedia/gen_qmediaplayer.go +++ b/qt6/multimedia/gen_qmediaplayer.go @@ -74,42 +74,34 @@ func (this *QMediaPlayer) UnsafePointer() unsafe.Pointer { } // newQMediaPlayer constructs the type using only CGO pointers. -func newQMediaPlayer(h *C.QMediaPlayer, h_QObject *C.QObject) *QMediaPlayer { +func newQMediaPlayer(h *C.QMediaPlayer) *QMediaPlayer { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QMediaPlayer_virtbase(h, &outptr_QObject) + return &QMediaPlayer{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQMediaPlayer constructs the type using only unsafe pointers. -func UnsafeNewQMediaPlayer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaPlayer { - if h == nil { - return nil - } - - return &QMediaPlayer{h: (*C.QMediaPlayer)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQMediaPlayer(h unsafe.Pointer) *QMediaPlayer { + return newQMediaPlayer((*C.QMediaPlayer)(h)) } // NewQMediaPlayer constructs a new QMediaPlayer object. func NewQMediaPlayer() *QMediaPlayer { - var outptr_QMediaPlayer *C.QMediaPlayer = nil - var outptr_QObject *C.QObject = nil - C.QMediaPlayer_new(&outptr_QMediaPlayer, &outptr_QObject) - ret := newQMediaPlayer(outptr_QMediaPlayer, outptr_QObject) + ret := newQMediaPlayer(C.QMediaPlayer_new()) ret.isSubclass = true return ret } // NewQMediaPlayer2 constructs a new QMediaPlayer object. func NewQMediaPlayer2(parent *qt6.QObject) *QMediaPlayer { - var outptr_QMediaPlayer *C.QMediaPlayer = nil - var outptr_QObject *C.QObject = nil - C.QMediaPlayer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QMediaPlayer, &outptr_QObject) - ret := newQMediaPlayer(outptr_QMediaPlayer, outptr_QObject) + ret := newQMediaPlayer(C.QMediaPlayer_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -198,7 +190,7 @@ func (this *QMediaPlayer) SetAudioOutput(output *QAudioOutput) { } func (this *QMediaPlayer) AudioOutput() *QAudioOutput { - return newQAudioOutput(C.QMediaPlayer_AudioOutput(this.h), nil) + return newQAudioOutput(C.QMediaPlayer_AudioOutput(this.h)) } func (this *QMediaPlayer) SetVideoOutput(videoOutput *qt6.QObject) { @@ -214,7 +206,7 @@ func (this *QMediaPlayer) SetVideoSink(sink *QVideoSink) { } func (this *QMediaPlayer) VideoSink() *QVideoSink { - return newQVideoSink(C.QMediaPlayer_VideoSink(this.h), nil) + return newQVideoSink(C.QMediaPlayer_VideoSink(this.h)) } func (this *QMediaPlayer) Source() *qt6.QUrl { @@ -224,7 +216,7 @@ func (this *QMediaPlayer) Source() *qt6.QUrl { } func (this *QMediaPlayer) SourceDevice() *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QMediaPlayer_SourceDevice(this.h)), nil, nil) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QMediaPlayer_SourceDevice(this.h))) } func (this *QMediaPlayer) PlaybackState() QMediaPlayer__PlaybackState { @@ -778,7 +770,7 @@ func miqt_exec_callback_QMediaPlayer_TimerEvent(self *C.QMediaPlayer, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QMediaPlayer{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -804,7 +796,7 @@ func miqt_exec_callback_QMediaPlayer_ChildEvent(self *C.QMediaPlayer, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QMediaPlayer{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/multimedia/gen_qmediaplayer.h b/qt6/multimedia/gen_qmediaplayer.h index 83864116..e93af88b 100644 --- a/qt6/multimedia/gen_qmediaplayer.h +++ b/qt6/multimedia/gen_qmediaplayer.h @@ -44,8 +44,9 @@ typedef struct QUrl QUrl; typedef struct QVideoSink QVideoSink; #endif -void QMediaPlayer_new(QMediaPlayer** outptr_QMediaPlayer, QObject** outptr_QObject); -void QMediaPlayer_new2(QObject* parent, QMediaPlayer** outptr_QMediaPlayer, QObject** outptr_QObject); +QMediaPlayer* QMediaPlayer_new(); +QMediaPlayer* QMediaPlayer_new2(QObject* parent); +void QMediaPlayer_virtbase(QMediaPlayer* src, QObject** outptr_QObject); QMetaObject* QMediaPlayer_MetaObject(const QMediaPlayer* self); void* QMediaPlayer_Metacast(QMediaPlayer* self, const char* param1); struct miqt_string QMediaPlayer_Tr(const char* s); diff --git a/qt6/multimedia/gen_qmediarecorder.cpp b/qt6/multimedia/gen_qmediarecorder.cpp index 38c6ee95..4509ed53 100644 --- a/qt6/multimedia/gen_qmediarecorder.cpp +++ b/qt6/multimedia/gen_qmediarecorder.cpp @@ -198,16 +198,16 @@ public: }; -void QMediaRecorder_new(QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject) { - MiqtVirtualQMediaRecorder* ret = new MiqtVirtualQMediaRecorder(); - *outptr_QMediaRecorder = ret; - *outptr_QObject = static_cast(ret); +QMediaRecorder* QMediaRecorder_new() { + return new MiqtVirtualQMediaRecorder(); } -void QMediaRecorder_new2(QObject* parent, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject) { - MiqtVirtualQMediaRecorder* ret = new MiqtVirtualQMediaRecorder(parent); - *outptr_QMediaRecorder = ret; - *outptr_QObject = static_cast(ret); +QMediaRecorder* QMediaRecorder_new2(QObject* parent) { + return new MiqtVirtualQMediaRecorder(parent); +} + +void QMediaRecorder_virtbase(QMediaRecorder* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QMediaRecorder_MetaObject(const QMediaRecorder* self) { diff --git a/qt6/multimedia/gen_qmediarecorder.go b/qt6/multimedia/gen_qmediarecorder.go index 9c94a2fb..c7c3317c 100644 --- a/qt6/multimedia/gen_qmediarecorder.go +++ b/qt6/multimedia/gen_qmediarecorder.go @@ -73,42 +73,34 @@ func (this *QMediaRecorder) UnsafePointer() unsafe.Pointer { } // newQMediaRecorder constructs the type using only CGO pointers. -func newQMediaRecorder(h *C.QMediaRecorder, h_QObject *C.QObject) *QMediaRecorder { +func newQMediaRecorder(h *C.QMediaRecorder) *QMediaRecorder { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QMediaRecorder_virtbase(h, &outptr_QObject) + return &QMediaRecorder{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQMediaRecorder constructs the type using only unsafe pointers. -func UnsafeNewQMediaRecorder(h unsafe.Pointer, h_QObject unsafe.Pointer) *QMediaRecorder { - if h == nil { - return nil - } - - return &QMediaRecorder{h: (*C.QMediaRecorder)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQMediaRecorder(h unsafe.Pointer) *QMediaRecorder { + return newQMediaRecorder((*C.QMediaRecorder)(h)) } // NewQMediaRecorder constructs a new QMediaRecorder object. func NewQMediaRecorder() *QMediaRecorder { - var outptr_QMediaRecorder *C.QMediaRecorder = nil - var outptr_QObject *C.QObject = nil - C.QMediaRecorder_new(&outptr_QMediaRecorder, &outptr_QObject) - ret := newQMediaRecorder(outptr_QMediaRecorder, outptr_QObject) + ret := newQMediaRecorder(C.QMediaRecorder_new()) ret.isSubclass = true return ret } // NewQMediaRecorder2 constructs a new QMediaRecorder object. func NewQMediaRecorder2(parent *qt6.QObject) *QMediaRecorder { - var outptr_QMediaRecorder *C.QMediaRecorder = nil - var outptr_QObject *C.QObject = nil - C.QMediaRecorder_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QMediaRecorder, &outptr_QObject) - ret := newQMediaRecorder(outptr_QMediaRecorder, outptr_QObject) + ret := newQMediaRecorder(C.QMediaRecorder_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -266,7 +258,7 @@ func (this *QMediaRecorder) AddMetaData(metaData *QMediaMetaData) { } func (this *QMediaRecorder) CaptureSession() *QMediaCaptureSession { - return newQMediaCaptureSession(C.QMediaRecorder_CaptureSession(this.h), nil) + return newQMediaCaptureSession(C.QMediaRecorder_CaptureSession(this.h)) } func (this *QMediaRecorder) Record() { @@ -674,7 +666,7 @@ func miqt_exec_callback_QMediaRecorder_TimerEvent(self *C.QMediaRecorder, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QMediaRecorder{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -700,7 +692,7 @@ func miqt_exec_callback_QMediaRecorder_ChildEvent(self *C.QMediaRecorder, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QMediaRecorder{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/multimedia/gen_qmediarecorder.h b/qt6/multimedia/gen_qmediarecorder.h index 58613972..6d2cc6a7 100644 --- a/qt6/multimedia/gen_qmediarecorder.h +++ b/qt6/multimedia/gen_qmediarecorder.h @@ -42,8 +42,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -void QMediaRecorder_new(QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject); -void QMediaRecorder_new2(QObject* parent, QMediaRecorder** outptr_QMediaRecorder, QObject** outptr_QObject); +QMediaRecorder* QMediaRecorder_new(); +QMediaRecorder* QMediaRecorder_new2(QObject* parent); +void QMediaRecorder_virtbase(QMediaRecorder* src, QObject** outptr_QObject); QMetaObject* QMediaRecorder_MetaObject(const QMediaRecorder* self); void* QMediaRecorder_Metacast(QMediaRecorder* self, const char* param1); struct miqt_string QMediaRecorder_Tr(const char* s); diff --git a/qt6/multimedia/gen_qmediatimerange.cpp b/qt6/multimedia/gen_qmediatimerange.cpp index 01b92650..02c922ba 100644 --- a/qt6/multimedia/gen_qmediatimerange.cpp +++ b/qt6/multimedia/gen_qmediatimerange.cpp @@ -5,24 +5,20 @@ #include "gen_qmediatimerange.h" #include "_cgo_export.h" -void QMediaTimeRange_new(QMediaTimeRange** outptr_QMediaTimeRange) { - QMediaTimeRange* ret = new QMediaTimeRange(); - *outptr_QMediaTimeRange = ret; +QMediaTimeRange* QMediaTimeRange_new() { + return new QMediaTimeRange(); } -void QMediaTimeRange_new2(long long start, long long end, QMediaTimeRange** outptr_QMediaTimeRange) { - QMediaTimeRange* ret = new QMediaTimeRange(static_cast(start), static_cast(end)); - *outptr_QMediaTimeRange = ret; +QMediaTimeRange* QMediaTimeRange_new2(long long start, long long end) { + return new QMediaTimeRange(static_cast(start), static_cast(end)); } -void QMediaTimeRange_new3(QMediaTimeRange__Interval* param1, QMediaTimeRange** outptr_QMediaTimeRange) { - QMediaTimeRange* ret = new QMediaTimeRange(*param1); - *outptr_QMediaTimeRange = ret; +QMediaTimeRange* QMediaTimeRange_new3(QMediaTimeRange__Interval* param1) { + return new QMediaTimeRange(*param1); } -void QMediaTimeRange_new4(QMediaTimeRange* rangeVal, QMediaTimeRange** outptr_QMediaTimeRange) { - QMediaTimeRange* ret = new QMediaTimeRange(*rangeVal); - *outptr_QMediaTimeRange = ret; +QMediaTimeRange* QMediaTimeRange_new4(QMediaTimeRange* rangeVal) { + return new QMediaTimeRange(*rangeVal); } void QMediaTimeRange_OperatorAssign(QMediaTimeRange* self, QMediaTimeRange* param1) { @@ -136,19 +132,16 @@ void QMediaTimeRange_Delete(QMediaTimeRange* self, bool isSubclass) { } } -void QMediaTimeRange__Interval_new(QMediaTimeRange__Interval** outptr_QMediaTimeRange__Interval) { - QMediaTimeRange::Interval* ret = new QMediaTimeRange::Interval(); - *outptr_QMediaTimeRange__Interval = ret; +QMediaTimeRange__Interval* QMediaTimeRange__Interval_new() { + return new QMediaTimeRange::Interval(); } -void QMediaTimeRange__Interval_new2(long long start, long long end, QMediaTimeRange__Interval** outptr_QMediaTimeRange__Interval) { - QMediaTimeRange::Interval* ret = new QMediaTimeRange::Interval(static_cast(start), static_cast(end)); - *outptr_QMediaTimeRange__Interval = ret; +QMediaTimeRange__Interval* QMediaTimeRange__Interval_new2(long long start, long long end) { + return new QMediaTimeRange::Interval(static_cast(start), static_cast(end)); } -void QMediaTimeRange__Interval_new3(QMediaTimeRange__Interval* param1, QMediaTimeRange__Interval** outptr_QMediaTimeRange__Interval) { - QMediaTimeRange::Interval* ret = new QMediaTimeRange::Interval(*param1); - *outptr_QMediaTimeRange__Interval = ret; +QMediaTimeRange__Interval* QMediaTimeRange__Interval_new3(QMediaTimeRange__Interval* param1) { + return new QMediaTimeRange::Interval(*param1); } long long QMediaTimeRange__Interval_Start(const QMediaTimeRange__Interval* self) { diff --git a/qt6/multimedia/gen_qmediatimerange.go b/qt6/multimedia/gen_qmediatimerange.go index 210934d2..58708386 100644 --- a/qt6/multimedia/gen_qmediatimerange.go +++ b/qt6/multimedia/gen_qmediatimerange.go @@ -37,54 +37,43 @@ func newQMediaTimeRange(h *C.QMediaTimeRange) *QMediaTimeRange { if h == nil { return nil } + return &QMediaTimeRange{h: h} } // UnsafeNewQMediaTimeRange constructs the type using only unsafe pointers. func UnsafeNewQMediaTimeRange(h unsafe.Pointer) *QMediaTimeRange { - if h == nil { - return nil - } - - return &QMediaTimeRange{h: (*C.QMediaTimeRange)(h)} + return newQMediaTimeRange((*C.QMediaTimeRange)(h)) } // NewQMediaTimeRange constructs a new QMediaTimeRange object. func NewQMediaTimeRange() *QMediaTimeRange { - var outptr_QMediaTimeRange *C.QMediaTimeRange = nil - C.QMediaTimeRange_new(&outptr_QMediaTimeRange) - ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret := newQMediaTimeRange(C.QMediaTimeRange_new()) ret.isSubclass = true return ret } // NewQMediaTimeRange2 constructs a new QMediaTimeRange object. func NewQMediaTimeRange2(start int64, end int64) *QMediaTimeRange { - var outptr_QMediaTimeRange *C.QMediaTimeRange = nil - C.QMediaTimeRange_new2((C.longlong)(start), (C.longlong)(end), &outptr_QMediaTimeRange) - ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret := newQMediaTimeRange(C.QMediaTimeRange_new2((C.longlong)(start), (C.longlong)(end))) ret.isSubclass = true return ret } // NewQMediaTimeRange3 constructs a new QMediaTimeRange object. func NewQMediaTimeRange3(param1 *QMediaTimeRange__Interval) *QMediaTimeRange { - var outptr_QMediaTimeRange *C.QMediaTimeRange = nil - C.QMediaTimeRange_new3(param1.cPointer(), &outptr_QMediaTimeRange) - ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret := newQMediaTimeRange(C.QMediaTimeRange_new3(param1.cPointer())) ret.isSubclass = true return ret } // NewQMediaTimeRange4 constructs a new QMediaTimeRange object. func NewQMediaTimeRange4(rangeVal *QMediaTimeRange) *QMediaTimeRange { - var outptr_QMediaTimeRange *C.QMediaTimeRange = nil - C.QMediaTimeRange_new4(rangeVal.cPointer(), &outptr_QMediaTimeRange) - ret := newQMediaTimeRange(outptr_QMediaTimeRange) + ret := newQMediaTimeRange(C.QMediaTimeRange_new4(rangeVal.cPointer())) ret.isSubclass = true return ret } @@ -219,44 +208,35 @@ func newQMediaTimeRange__Interval(h *C.QMediaTimeRange__Interval) *QMediaTimeRan if h == nil { return nil } + return &QMediaTimeRange__Interval{h: h} } // UnsafeNewQMediaTimeRange__Interval constructs the type using only unsafe pointers. func UnsafeNewQMediaTimeRange__Interval(h unsafe.Pointer) *QMediaTimeRange__Interval { - if h == nil { - return nil - } - - return &QMediaTimeRange__Interval{h: (*C.QMediaTimeRange__Interval)(h)} + return newQMediaTimeRange__Interval((*C.QMediaTimeRange__Interval)(h)) } // NewQMediaTimeRange__Interval constructs a new QMediaTimeRange::Interval object. func NewQMediaTimeRange__Interval() *QMediaTimeRange__Interval { - var outptr_QMediaTimeRange__Interval *C.QMediaTimeRange__Interval = nil - C.QMediaTimeRange__Interval_new(&outptr_QMediaTimeRange__Interval) - ret := newQMediaTimeRange__Interval(outptr_QMediaTimeRange__Interval) + ret := newQMediaTimeRange__Interval(C.QMediaTimeRange__Interval_new()) ret.isSubclass = true return ret } // NewQMediaTimeRange__Interval2 constructs a new QMediaTimeRange::Interval object. func NewQMediaTimeRange__Interval2(start int64, end int64) *QMediaTimeRange__Interval { - var outptr_QMediaTimeRange__Interval *C.QMediaTimeRange__Interval = nil - C.QMediaTimeRange__Interval_new2((C.longlong)(start), (C.longlong)(end), &outptr_QMediaTimeRange__Interval) - ret := newQMediaTimeRange__Interval(outptr_QMediaTimeRange__Interval) + ret := newQMediaTimeRange__Interval(C.QMediaTimeRange__Interval_new2((C.longlong)(start), (C.longlong)(end))) ret.isSubclass = true return ret } // NewQMediaTimeRange__Interval3 constructs a new QMediaTimeRange::Interval object. func NewQMediaTimeRange__Interval3(param1 *QMediaTimeRange__Interval) *QMediaTimeRange__Interval { - var outptr_QMediaTimeRange__Interval *C.QMediaTimeRange__Interval = nil - C.QMediaTimeRange__Interval_new3(param1.cPointer(), &outptr_QMediaTimeRange__Interval) - ret := newQMediaTimeRange__Interval(outptr_QMediaTimeRange__Interval) + ret := newQMediaTimeRange__Interval(C.QMediaTimeRange__Interval_new3(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/multimedia/gen_qmediatimerange.h b/qt6/multimedia/gen_qmediatimerange.h index 1e027ce3..49ef0b3b 100644 --- a/qt6/multimedia/gen_qmediatimerange.h +++ b/qt6/multimedia/gen_qmediatimerange.h @@ -26,10 +26,10 @@ typedef struct QMediaTimeRange QMediaTimeRange; typedef struct QMediaTimeRange__Interval QMediaTimeRange__Interval; #endif -void QMediaTimeRange_new(QMediaTimeRange** outptr_QMediaTimeRange); -void QMediaTimeRange_new2(long long start, long long end, QMediaTimeRange** outptr_QMediaTimeRange); -void QMediaTimeRange_new3(QMediaTimeRange__Interval* param1, QMediaTimeRange** outptr_QMediaTimeRange); -void QMediaTimeRange_new4(QMediaTimeRange* rangeVal, QMediaTimeRange** outptr_QMediaTimeRange); +QMediaTimeRange* QMediaTimeRange_new(); +QMediaTimeRange* QMediaTimeRange_new2(long long start, long long end); +QMediaTimeRange* QMediaTimeRange_new3(QMediaTimeRange__Interval* param1); +QMediaTimeRange* QMediaTimeRange_new4(QMediaTimeRange* rangeVal); void QMediaTimeRange_OperatorAssign(QMediaTimeRange* self, QMediaTimeRange* param1); void QMediaTimeRange_Swap(QMediaTimeRange* self, QMediaTimeRange* other); void QMediaTimeRange_Detach(QMediaTimeRange* self); @@ -53,9 +53,9 @@ QMediaTimeRange* QMediaTimeRange_OperatorMinusAssignWithQMediaTimeRangeInterval( void QMediaTimeRange_Clear(QMediaTimeRange* self); void QMediaTimeRange_Delete(QMediaTimeRange* self, bool isSubclass); -void QMediaTimeRange__Interval_new(QMediaTimeRange__Interval** outptr_QMediaTimeRange__Interval); -void QMediaTimeRange__Interval_new2(long long start, long long end, QMediaTimeRange__Interval** outptr_QMediaTimeRange__Interval); -void QMediaTimeRange__Interval_new3(QMediaTimeRange__Interval* param1, QMediaTimeRange__Interval** outptr_QMediaTimeRange__Interval); +QMediaTimeRange__Interval* QMediaTimeRange__Interval_new(); +QMediaTimeRange__Interval* QMediaTimeRange__Interval_new2(long long start, long long end); +QMediaTimeRange__Interval* QMediaTimeRange__Interval_new3(QMediaTimeRange__Interval* param1); long long QMediaTimeRange__Interval_Start(const QMediaTimeRange__Interval* self); long long QMediaTimeRange__Interval_End(const QMediaTimeRange__Interval* self); bool QMediaTimeRange__Interval_Contains(const QMediaTimeRange__Interval* self, long long time); diff --git a/qt6/multimedia/gen_qsoundeffect.cpp b/qt6/multimedia/gen_qsoundeffect.cpp index b13903fe..7bb9908a 100644 --- a/qt6/multimedia/gen_qsoundeffect.cpp +++ b/qt6/multimedia/gen_qsoundeffect.cpp @@ -198,28 +198,24 @@ public: }; -void QSoundEffect_new(QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { - MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(); - *outptr_QSoundEffect = ret; - *outptr_QObject = static_cast(ret); +QSoundEffect* QSoundEffect_new() { + return new MiqtVirtualQSoundEffect(); } -void QSoundEffect_new2(QAudioDevice* audioDevice, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { - MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(*audioDevice); - *outptr_QSoundEffect = ret; - *outptr_QObject = static_cast(ret); +QSoundEffect* QSoundEffect_new2(QAudioDevice* audioDevice) { + return new MiqtVirtualQSoundEffect(*audioDevice); } -void QSoundEffect_new3(QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { - MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(parent); - *outptr_QSoundEffect = ret; - *outptr_QObject = static_cast(ret); +QSoundEffect* QSoundEffect_new3(QObject* parent) { + return new MiqtVirtualQSoundEffect(parent); } -void QSoundEffect_new4(QAudioDevice* audioDevice, QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject) { - MiqtVirtualQSoundEffect* ret = new MiqtVirtualQSoundEffect(*audioDevice, parent); - *outptr_QSoundEffect = ret; - *outptr_QObject = static_cast(ret); +QSoundEffect* QSoundEffect_new4(QAudioDevice* audioDevice, QObject* parent) { + return new MiqtVirtualQSoundEffect(*audioDevice, parent); +} + +void QSoundEffect_virtbase(QSoundEffect* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSoundEffect_MetaObject(const QSoundEffect* self) { diff --git a/qt6/multimedia/gen_qsoundeffect.go b/qt6/multimedia/gen_qsoundeffect.go index 81888abe..7aeb0fc3 100644 --- a/qt6/multimedia/gen_qsoundeffect.go +++ b/qt6/multimedia/gen_qsoundeffect.go @@ -51,64 +51,50 @@ func (this *QSoundEffect) UnsafePointer() unsafe.Pointer { } // newQSoundEffect constructs the type using only CGO pointers. -func newQSoundEffect(h *C.QSoundEffect, h_QObject *C.QObject) *QSoundEffect { +func newQSoundEffect(h *C.QSoundEffect) *QSoundEffect { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSoundEffect_virtbase(h, &outptr_QObject) + return &QSoundEffect{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQSoundEffect constructs the type using only unsafe pointers. -func UnsafeNewQSoundEffect(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSoundEffect { - if h == nil { - return nil - } - - return &QSoundEffect{h: (*C.QSoundEffect)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQSoundEffect(h unsafe.Pointer) *QSoundEffect { + return newQSoundEffect((*C.QSoundEffect)(h)) } // NewQSoundEffect constructs a new QSoundEffect object. func NewQSoundEffect() *QSoundEffect { - var outptr_QSoundEffect *C.QSoundEffect = nil - var outptr_QObject *C.QObject = nil - C.QSoundEffect_new(&outptr_QSoundEffect, &outptr_QObject) - ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret := newQSoundEffect(C.QSoundEffect_new()) ret.isSubclass = true return ret } // NewQSoundEffect2 constructs a new QSoundEffect object. func NewQSoundEffect2(audioDevice *QAudioDevice) *QSoundEffect { - var outptr_QSoundEffect *C.QSoundEffect = nil - var outptr_QObject *C.QObject = nil - C.QSoundEffect_new2(audioDevice.cPointer(), &outptr_QSoundEffect, &outptr_QObject) - ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret := newQSoundEffect(C.QSoundEffect_new2(audioDevice.cPointer())) ret.isSubclass = true return ret } // NewQSoundEffect3 constructs a new QSoundEffect object. func NewQSoundEffect3(parent *qt6.QObject) *QSoundEffect { - var outptr_QSoundEffect *C.QSoundEffect = nil - var outptr_QObject *C.QObject = nil - C.QSoundEffect_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QSoundEffect, &outptr_QObject) - ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret := newQSoundEffect(C.QSoundEffect_new3((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQSoundEffect4 constructs a new QSoundEffect object. func NewQSoundEffect4(audioDevice *QAudioDevice, parent *qt6.QObject) *QSoundEffect { - var outptr_QSoundEffect *C.QSoundEffect = nil - var outptr_QObject *C.QObject = nil - C.QSoundEffect_new4(audioDevice.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QSoundEffect, &outptr_QObject) - ret := newQSoundEffect(outptr_QSoundEffect, outptr_QObject) + ret := newQSoundEffect(C.QSoundEffect_new4(audioDevice.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -466,7 +452,7 @@ func miqt_exec_callback_QSoundEffect_TimerEvent(self *C.QSoundEffect, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QSoundEffect{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -492,7 +478,7 @@ func miqt_exec_callback_QSoundEffect_ChildEvent(self *C.QSoundEffect, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QSoundEffect{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/multimedia/gen_qsoundeffect.h b/qt6/multimedia/gen_qsoundeffect.h index 43f54a9d..d3671e86 100644 --- a/qt6/multimedia/gen_qsoundeffect.h +++ b/qt6/multimedia/gen_qsoundeffect.h @@ -36,10 +36,11 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -void QSoundEffect_new(QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); -void QSoundEffect_new2(QAudioDevice* audioDevice, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); -void QSoundEffect_new3(QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); -void QSoundEffect_new4(QAudioDevice* audioDevice, QObject* parent, QSoundEffect** outptr_QSoundEffect, QObject** outptr_QObject); +QSoundEffect* QSoundEffect_new(); +QSoundEffect* QSoundEffect_new2(QAudioDevice* audioDevice); +QSoundEffect* QSoundEffect_new3(QObject* parent); +QSoundEffect* QSoundEffect_new4(QAudioDevice* audioDevice, QObject* parent); +void QSoundEffect_virtbase(QSoundEffect* src, QObject** outptr_QObject); QMetaObject* QSoundEffect_MetaObject(const QSoundEffect* self); void* QSoundEffect_Metacast(QSoundEffect* self, const char* param1); struct miqt_string QSoundEffect_Tr(const char* s); diff --git a/qt6/multimedia/gen_qvideoframe.cpp b/qt6/multimedia/gen_qvideoframe.cpp index f238e8d3..f2c4ccd6 100644 --- a/qt6/multimedia/gen_qvideoframe.cpp +++ b/qt6/multimedia/gen_qvideoframe.cpp @@ -12,19 +12,16 @@ #include "gen_qvideoframe.h" #include "_cgo_export.h" -void QVideoFrame_new(QVideoFrame** outptr_QVideoFrame) { - QVideoFrame* ret = new QVideoFrame(); - *outptr_QVideoFrame = ret; +QVideoFrame* QVideoFrame_new() { + return new QVideoFrame(); } -void QVideoFrame_new2(QVideoFrameFormat* format, QVideoFrame** outptr_QVideoFrame) { - QVideoFrame* ret = new QVideoFrame(*format); - *outptr_QVideoFrame = ret; +QVideoFrame* QVideoFrame_new2(QVideoFrameFormat* format) { + return new QVideoFrame(*format); } -void QVideoFrame_new3(QVideoFrame* other, QVideoFrame** outptr_QVideoFrame) { - QVideoFrame* ret = new QVideoFrame(*other); - *outptr_QVideoFrame = ret; +QVideoFrame* QVideoFrame_new3(QVideoFrame* other) { + return new QVideoFrame(*other); } void QVideoFrame_Swap(QVideoFrame* self, QVideoFrame* other) { diff --git a/qt6/multimedia/gen_qvideoframe.go b/qt6/multimedia/gen_qvideoframe.go index 1907fc01..5405ceb2 100644 --- a/qt6/multimedia/gen_qvideoframe.go +++ b/qt6/multimedia/gen_qvideoframe.go @@ -69,44 +69,35 @@ func newQVideoFrame(h *C.QVideoFrame) *QVideoFrame { if h == nil { return nil } + return &QVideoFrame{h: h} } // UnsafeNewQVideoFrame constructs the type using only unsafe pointers. func UnsafeNewQVideoFrame(h unsafe.Pointer) *QVideoFrame { - if h == nil { - return nil - } - - return &QVideoFrame{h: (*C.QVideoFrame)(h)} + return newQVideoFrame((*C.QVideoFrame)(h)) } // NewQVideoFrame constructs a new QVideoFrame object. func NewQVideoFrame() *QVideoFrame { - var outptr_QVideoFrame *C.QVideoFrame = nil - C.QVideoFrame_new(&outptr_QVideoFrame) - ret := newQVideoFrame(outptr_QVideoFrame) + ret := newQVideoFrame(C.QVideoFrame_new()) ret.isSubclass = true return ret } // NewQVideoFrame2 constructs a new QVideoFrame object. func NewQVideoFrame2(format *QVideoFrameFormat) *QVideoFrame { - var outptr_QVideoFrame *C.QVideoFrame = nil - C.QVideoFrame_new2(format.cPointer(), &outptr_QVideoFrame) - ret := newQVideoFrame(outptr_QVideoFrame) + ret := newQVideoFrame(C.QVideoFrame_new2(format.cPointer())) ret.isSubclass = true return ret } // NewQVideoFrame3 constructs a new QVideoFrame object. func NewQVideoFrame3(other *QVideoFrame) *QVideoFrame { - var outptr_QVideoFrame *C.QVideoFrame = nil - C.QVideoFrame_new3(other.cPointer(), &outptr_QVideoFrame) - ret := newQVideoFrame(outptr_QVideoFrame) + ret := newQVideoFrame(C.QVideoFrame_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -236,7 +227,7 @@ func (this *QVideoFrame) Mirrored() bool { } func (this *QVideoFrame) ToImage() *qt6.QImage { - _goptr := qt6.UnsafeNewQImage(unsafe.Pointer(C.QVideoFrame_ToImage(this.h)), nil) + _goptr := qt6.UnsafeNewQImage(unsafe.Pointer(C.QVideoFrame_ToImage(this.h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } @@ -298,16 +289,13 @@ func newQVideoFrame__PaintOptions(h *C.QVideoFrame__PaintOptions) *QVideoFrame__ if h == nil { return nil } + return &QVideoFrame__PaintOptions{h: h} } // UnsafeNewQVideoFrame__PaintOptions constructs the type using only unsafe pointers. func UnsafeNewQVideoFrame__PaintOptions(h unsafe.Pointer) *QVideoFrame__PaintOptions { - if h == nil { - return nil - } - - return &QVideoFrame__PaintOptions{h: (*C.QVideoFrame__PaintOptions)(h)} + return newQVideoFrame__PaintOptions((*C.QVideoFrame__PaintOptions)(h)) } // Delete this object from C++ memory. diff --git a/qt6/multimedia/gen_qvideoframe.h b/qt6/multimedia/gen_qvideoframe.h index bc4091c2..4baee27a 100644 --- a/qt6/multimedia/gen_qvideoframe.h +++ b/qt6/multimedia/gen_qvideoframe.h @@ -36,9 +36,9 @@ typedef struct QVideoFrame__PaintOptions QVideoFrame__PaintOptions; typedef struct QVideoFrameFormat QVideoFrameFormat; #endif -void QVideoFrame_new(QVideoFrame** outptr_QVideoFrame); -void QVideoFrame_new2(QVideoFrameFormat* format, QVideoFrame** outptr_QVideoFrame); -void QVideoFrame_new3(QVideoFrame* other, QVideoFrame** outptr_QVideoFrame); +QVideoFrame* QVideoFrame_new(); +QVideoFrame* QVideoFrame_new2(QVideoFrameFormat* format); +QVideoFrame* QVideoFrame_new3(QVideoFrame* other); void QVideoFrame_Swap(QVideoFrame* self, QVideoFrame* other); void QVideoFrame_OperatorAssign(QVideoFrame* self, QVideoFrame* other); bool QVideoFrame_OperatorEqual(const QVideoFrame* self, QVideoFrame* other); diff --git a/qt6/multimedia/gen_qvideoframeformat.cpp b/qt6/multimedia/gen_qvideoframeformat.cpp index 8c6da317..8451f9c9 100644 --- a/qt6/multimedia/gen_qvideoframeformat.cpp +++ b/qt6/multimedia/gen_qvideoframeformat.cpp @@ -8,19 +8,16 @@ #include "gen_qvideoframeformat.h" #include "_cgo_export.h" -void QVideoFrameFormat_new(QVideoFrameFormat** outptr_QVideoFrameFormat) { - QVideoFrameFormat* ret = new QVideoFrameFormat(); - *outptr_QVideoFrameFormat = ret; +QVideoFrameFormat* QVideoFrameFormat_new() { + return new QVideoFrameFormat(); } -void QVideoFrameFormat_new2(QSize* size, int pixelFormat, QVideoFrameFormat** outptr_QVideoFrameFormat) { - QVideoFrameFormat* ret = new QVideoFrameFormat(*size, static_cast(pixelFormat)); - *outptr_QVideoFrameFormat = ret; +QVideoFrameFormat* QVideoFrameFormat_new2(QSize* size, int pixelFormat) { + return new QVideoFrameFormat(*size, static_cast(pixelFormat)); } -void QVideoFrameFormat_new3(QVideoFrameFormat* format, QVideoFrameFormat** outptr_QVideoFrameFormat) { - QVideoFrameFormat* ret = new QVideoFrameFormat(*format); - *outptr_QVideoFrameFormat = ret; +QVideoFrameFormat* QVideoFrameFormat_new3(QVideoFrameFormat* format) { + return new QVideoFrameFormat(*format); } void QVideoFrameFormat_Swap(QVideoFrameFormat* self, QVideoFrameFormat* other) { diff --git a/qt6/multimedia/gen_qvideoframeformat.go b/qt6/multimedia/gen_qvideoframeformat.go index 8ac64374..6b44d45c 100644 --- a/qt6/multimedia/gen_qvideoframeformat.go +++ b/qt6/multimedia/gen_qvideoframeformat.go @@ -125,44 +125,35 @@ func newQVideoFrameFormat(h *C.QVideoFrameFormat) *QVideoFrameFormat { if h == nil { return nil } + return &QVideoFrameFormat{h: h} } // UnsafeNewQVideoFrameFormat constructs the type using only unsafe pointers. func UnsafeNewQVideoFrameFormat(h unsafe.Pointer) *QVideoFrameFormat { - if h == nil { - return nil - } - - return &QVideoFrameFormat{h: (*C.QVideoFrameFormat)(h)} + return newQVideoFrameFormat((*C.QVideoFrameFormat)(h)) } // NewQVideoFrameFormat constructs a new QVideoFrameFormat object. func NewQVideoFrameFormat() *QVideoFrameFormat { - var outptr_QVideoFrameFormat *C.QVideoFrameFormat = nil - C.QVideoFrameFormat_new(&outptr_QVideoFrameFormat) - ret := newQVideoFrameFormat(outptr_QVideoFrameFormat) + ret := newQVideoFrameFormat(C.QVideoFrameFormat_new()) ret.isSubclass = true return ret } // NewQVideoFrameFormat2 constructs a new QVideoFrameFormat object. func NewQVideoFrameFormat2(size *qt6.QSize, pixelFormat QVideoFrameFormat__PixelFormat) *QVideoFrameFormat { - var outptr_QVideoFrameFormat *C.QVideoFrameFormat = nil - C.QVideoFrameFormat_new2((*C.QSize)(size.UnsafePointer()), (C.int)(pixelFormat), &outptr_QVideoFrameFormat) - ret := newQVideoFrameFormat(outptr_QVideoFrameFormat) + ret := newQVideoFrameFormat(C.QVideoFrameFormat_new2((*C.QSize)(size.UnsafePointer()), (C.int)(pixelFormat))) ret.isSubclass = true return ret } // NewQVideoFrameFormat3 constructs a new QVideoFrameFormat object. func NewQVideoFrameFormat3(format *QVideoFrameFormat) *QVideoFrameFormat { - var outptr_QVideoFrameFormat *C.QVideoFrameFormat = nil - C.QVideoFrameFormat_new3(format.cPointer(), &outptr_QVideoFrameFormat) - ret := newQVideoFrameFormat(outptr_QVideoFrameFormat) + ret := newQVideoFrameFormat(C.QVideoFrameFormat_new3(format.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/multimedia/gen_qvideoframeformat.h b/qt6/multimedia/gen_qvideoframeformat.h index 60aeb44e..1a0d6a47 100644 --- a/qt6/multimedia/gen_qvideoframeformat.h +++ b/qt6/multimedia/gen_qvideoframeformat.h @@ -24,9 +24,9 @@ typedef struct QSize QSize; typedef struct QVideoFrameFormat QVideoFrameFormat; #endif -void QVideoFrameFormat_new(QVideoFrameFormat** outptr_QVideoFrameFormat); -void QVideoFrameFormat_new2(QSize* size, int pixelFormat, QVideoFrameFormat** outptr_QVideoFrameFormat); -void QVideoFrameFormat_new3(QVideoFrameFormat* format, QVideoFrameFormat** outptr_QVideoFrameFormat); +QVideoFrameFormat* QVideoFrameFormat_new(); +QVideoFrameFormat* QVideoFrameFormat_new2(QSize* size, int pixelFormat); +QVideoFrameFormat* QVideoFrameFormat_new3(QVideoFrameFormat* format); void QVideoFrameFormat_Swap(QVideoFrameFormat* self, QVideoFrameFormat* other); void QVideoFrameFormat_Detach(QVideoFrameFormat* self); void QVideoFrameFormat_OperatorAssign(QVideoFrameFormat* self, QVideoFrameFormat* format); diff --git a/qt6/multimedia/gen_qvideosink.cpp b/qt6/multimedia/gen_qvideosink.cpp index 6c0422db..dbd0b17f 100644 --- a/qt6/multimedia/gen_qvideosink.cpp +++ b/qt6/multimedia/gen_qvideosink.cpp @@ -195,16 +195,16 @@ public: }; -void QVideoSink_new(QVideoSink** outptr_QVideoSink, QObject** outptr_QObject) { - MiqtVirtualQVideoSink* ret = new MiqtVirtualQVideoSink(); - *outptr_QVideoSink = ret; - *outptr_QObject = static_cast(ret); +QVideoSink* QVideoSink_new() { + return new MiqtVirtualQVideoSink(); } -void QVideoSink_new2(QObject* parent, QVideoSink** outptr_QVideoSink, QObject** outptr_QObject) { - MiqtVirtualQVideoSink* ret = new MiqtVirtualQVideoSink(parent); - *outptr_QVideoSink = ret; - *outptr_QObject = static_cast(ret); +QVideoSink* QVideoSink_new2(QObject* parent) { + return new MiqtVirtualQVideoSink(parent); +} + +void QVideoSink_virtbase(QVideoSink* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QVideoSink_MetaObject(const QVideoSink* self) { diff --git a/qt6/multimedia/gen_qvideosink.go b/qt6/multimedia/gen_qvideosink.go index f3988cb8..86c5b07c 100644 --- a/qt6/multimedia/gen_qvideosink.go +++ b/qt6/multimedia/gen_qvideosink.go @@ -36,42 +36,34 @@ func (this *QVideoSink) UnsafePointer() unsafe.Pointer { } // newQVideoSink constructs the type using only CGO pointers. -func newQVideoSink(h *C.QVideoSink, h_QObject *C.QObject) *QVideoSink { +func newQVideoSink(h *C.QVideoSink) *QVideoSink { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QVideoSink_virtbase(h, &outptr_QObject) + return &QVideoSink{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQVideoSink constructs the type using only unsafe pointers. -func UnsafeNewQVideoSink(h unsafe.Pointer, h_QObject unsafe.Pointer) *QVideoSink { - if h == nil { - return nil - } - - return &QVideoSink{h: (*C.QVideoSink)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQVideoSink(h unsafe.Pointer) *QVideoSink { + return newQVideoSink((*C.QVideoSink)(h)) } // NewQVideoSink constructs a new QVideoSink object. func NewQVideoSink() *QVideoSink { - var outptr_QVideoSink *C.QVideoSink = nil - var outptr_QObject *C.QObject = nil - C.QVideoSink_new(&outptr_QVideoSink, &outptr_QObject) - ret := newQVideoSink(outptr_QVideoSink, outptr_QObject) + ret := newQVideoSink(C.QVideoSink_new()) ret.isSubclass = true return ret } // NewQVideoSink2 constructs a new QVideoSink object. func NewQVideoSink2(parent *qt6.QObject) *QVideoSink { - var outptr_QVideoSink *C.QVideoSink = nil - var outptr_QObject *C.QObject = nil - C.QVideoSink_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QVideoSink, &outptr_QObject) - ret := newQVideoSink(outptr_QVideoSink, outptr_QObject) + ret := newQVideoSink(C.QVideoSink_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -290,7 +282,7 @@ func miqt_exec_callback_QVideoSink_TimerEvent(self *C.QVideoSink, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QVideoSink{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -316,7 +308,7 @@ func miqt_exec_callback_QVideoSink_ChildEvent(self *C.QVideoSink, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QVideoSink{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/multimedia/gen_qvideosink.h b/qt6/multimedia/gen_qvideosink.h index f808dbc8..f6577dd7 100644 --- a/qt6/multimedia/gen_qvideosink.h +++ b/qt6/multimedia/gen_qvideosink.h @@ -36,8 +36,9 @@ typedef struct QVideoFrame QVideoFrame; typedef struct QVideoSink QVideoSink; #endif -void QVideoSink_new(QVideoSink** outptr_QVideoSink, QObject** outptr_QObject); -void QVideoSink_new2(QObject* parent, QVideoSink** outptr_QVideoSink, QObject** outptr_QObject); +QVideoSink* QVideoSink_new(); +QVideoSink* QVideoSink_new2(QObject* parent); +void QVideoSink_virtbase(QVideoSink* src, QObject** outptr_QObject); QMetaObject* QVideoSink_MetaObject(const QVideoSink* self); void* QVideoSink_Metacast(QVideoSink* self, const char* param1); struct miqt_string QVideoSink_Tr(const char* s); diff --git a/qt6/multimedia/gen_qvideowidget.cpp b/qt6/multimedia/gen_qvideowidget.cpp index f43b3990..d1ffa033 100644 --- a/qt6/multimedia/gen_qvideowidget.cpp +++ b/qt6/multimedia/gen_qvideowidget.cpp @@ -1023,20 +1023,16 @@ public: }; -void QVideoWidget_new(QWidget* parent, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQVideoWidget* ret = new MiqtVirtualQVideoWidget(parent); - *outptr_QVideoWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QVideoWidget* QVideoWidget_new(QWidget* parent) { + return new MiqtVirtualQVideoWidget(parent); } -void QVideoWidget_new2(QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQVideoWidget* ret = new MiqtVirtualQVideoWidget(); - *outptr_QVideoWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QVideoWidget* QVideoWidget_new2() { + return new MiqtVirtualQVideoWidget(); +} + +void QVideoWidget_virtbase(QVideoWidget* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QVideoWidget_MetaObject(const QVideoWidget* self) { diff --git a/qt6/multimedia/gen_qvideowidget.go b/qt6/multimedia/gen_qvideowidget.go index cdccf79f..7790d891 100644 --- a/qt6/multimedia/gen_qvideowidget.go +++ b/qt6/multimedia/gen_qvideowidget.go @@ -36,46 +36,34 @@ func (this *QVideoWidget) UnsafePointer() unsafe.Pointer { } // newQVideoWidget constructs the type using only CGO pointers. -func newQVideoWidget(h *C.QVideoWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QVideoWidget { +func newQVideoWidget(h *C.QVideoWidget) *QVideoWidget { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QVideoWidget_virtbase(h, &outptr_QWidget) + return &QVideoWidget{h: h, - QWidget: qt6.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QWidget: qt6.UnsafeNewQWidget(unsafe.Pointer(outptr_QWidget))} } // UnsafeNewQVideoWidget constructs the type using only unsafe pointers. -func UnsafeNewQVideoWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QVideoWidget { - if h == nil { - return nil - } - - return &QVideoWidget{h: (*C.QVideoWidget)(h), - QWidget: qt6.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQVideoWidget(h unsafe.Pointer) *QVideoWidget { + return newQVideoWidget((*C.QVideoWidget)(h)) } // NewQVideoWidget constructs a new QVideoWidget object. func NewQVideoWidget(parent *qt6.QWidget) *QVideoWidget { - var outptr_QVideoWidget *C.QVideoWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QVideoWidget_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QVideoWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQVideoWidget(outptr_QVideoWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQVideoWidget(C.QVideoWidget_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQVideoWidget2 constructs a new QVideoWidget object. func NewQVideoWidget2() *QVideoWidget { - var outptr_QVideoWidget *C.QVideoWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QVideoWidget_new2(&outptr_QVideoWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQVideoWidget(outptr_QVideoWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQVideoWidget(C.QVideoWidget_new2()) ret.isSubclass = true return ret } @@ -100,7 +88,7 @@ func QVideoWidget_Tr(s string) string { } func (this *QVideoWidget) VideoSink() *QVideoSink { - return newQVideoSink(C.QVideoWidget_VideoSink(this.h), nil) + return newQVideoSink(C.QVideoWidget_VideoSink(this.h)) } func (this *QVideoWidget) AspectRatioMode() qt6.AspectRatioMode { @@ -258,7 +246,7 @@ func miqt_exec_callback_QVideoWidget_ShowEvent(self *C.QVideoWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -284,7 +272,7 @@ func miqt_exec_callback_QVideoWidget_HideEvent(self *C.QVideoWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQHideEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -310,7 +298,7 @@ func miqt_exec_callback_QVideoWidget_ResizeEvent(self *C.QVideoWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -336,7 +324,7 @@ func miqt_exec_callback_QVideoWidget_MoveEvent(self *C.QVideoWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQMoveEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -518,7 +506,7 @@ func miqt_exec_callback_QVideoWidget_MousePressEvent(self *C.QVideoWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -544,7 +532,7 @@ func miqt_exec_callback_QVideoWidget_MouseReleaseEvent(self *C.QVideoWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -570,7 +558,7 @@ func miqt_exec_callback_QVideoWidget_MouseDoubleClickEvent(self *C.QVideoWidget, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -596,7 +584,7 @@ func miqt_exec_callback_QVideoWidget_MouseMoveEvent(self *C.QVideoWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -622,7 +610,7 @@ func miqt_exec_callback_QVideoWidget_WheelEvent(self *C.QVideoWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -648,7 +636,7 @@ func miqt_exec_callback_QVideoWidget_KeyPressEvent(self *C.QVideoWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -674,7 +662,7 @@ func miqt_exec_callback_QVideoWidget_KeyReleaseEvent(self *C.QVideoWidget, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -700,7 +688,7 @@ func miqt_exec_callback_QVideoWidget_FocusInEvent(self *C.QVideoWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -726,7 +714,7 @@ func miqt_exec_callback_QVideoWidget_FocusOutEvent(self *C.QVideoWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -752,7 +740,7 @@ func miqt_exec_callback_QVideoWidget_EnterEvent(self *C.QVideoWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQEnterEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -804,7 +792,7 @@ func miqt_exec_callback_QVideoWidget_PaintEvent(self *C.QVideoWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -830,7 +818,7 @@ func miqt_exec_callback_QVideoWidget_CloseEvent(self *C.QVideoWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -856,7 +844,7 @@ func miqt_exec_callback_QVideoWidget_ContextMenuEvent(self *C.QVideoWidget, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -882,7 +870,7 @@ func miqt_exec_callback_QVideoWidget_TabletEvent(self *C.QVideoWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQTabletEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -908,7 +896,7 @@ func miqt_exec_callback_QVideoWidget_ActionEvent(self *C.QVideoWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQActionEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -934,7 +922,7 @@ func miqt_exec_callback_QVideoWidget_DragEnterEvent(self *C.QVideoWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -960,7 +948,7 @@ func miqt_exec_callback_QVideoWidget_DragMoveEvent(self *C.QVideoWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -986,7 +974,7 @@ func miqt_exec_callback_QVideoWidget_DragLeaveEvent(self *C.QVideoWidget, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1012,7 +1000,7 @@ func miqt_exec_callback_QVideoWidget_DropEvent(self *C.QVideoWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(event)) gofunc((&QVideoWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1208,7 +1196,7 @@ func miqt_exec_callback_QVideoWidget_InputMethodEvent(self *C.QVideoWidget, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1)) gofunc((&QVideoWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/multimedia/gen_qvideowidget.h b/qt6/multimedia/gen_qvideowidget.h index 488633e0..3b9f09d4 100644 --- a/qt6/multimedia/gen_qvideowidget.h +++ b/qt6/multimedia/gen_qvideowidget.h @@ -80,8 +80,9 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QVideoWidget_new(QWidget* parent, QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QVideoWidget_new2(QVideoWidget** outptr_QVideoWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QVideoWidget* QVideoWidget_new(QWidget* parent); +QVideoWidget* QVideoWidget_new2(); +void QVideoWidget_virtbase(QVideoWidget* src, QWidget** outptr_QWidget); QMetaObject* QVideoWidget_MetaObject(const QVideoWidget* self); void* QVideoWidget_Metacast(QVideoWidget* self, const char* param1); struct miqt_string QVideoWidget_Tr(const char* s); diff --git a/qt6/multimedia/gen_qwavedecoder.cpp b/qt6/multimedia/gen_qwavedecoder.cpp index 1de8b2b4..417a192f 100644 --- a/qt6/multimedia/gen_qwavedecoder.cpp +++ b/qt6/multimedia/gen_qwavedecoder.cpp @@ -371,36 +371,24 @@ public: }; -void QWaveDecoder_new(QIODevice* device, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQWaveDecoder* ret = new MiqtVirtualQWaveDecoder(device); - *outptr_QWaveDecoder = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QWaveDecoder* QWaveDecoder_new(QIODevice* device) { + return new MiqtVirtualQWaveDecoder(device); } -void QWaveDecoder_new2(QIODevice* device, QAudioFormat* format, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQWaveDecoder* ret = new MiqtVirtualQWaveDecoder(device, *format); - *outptr_QWaveDecoder = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QWaveDecoder* QWaveDecoder_new2(QIODevice* device, QAudioFormat* format) { + return new MiqtVirtualQWaveDecoder(device, *format); } -void QWaveDecoder_new3(QIODevice* device, QObject* parent, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQWaveDecoder* ret = new MiqtVirtualQWaveDecoder(device, parent); - *outptr_QWaveDecoder = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QWaveDecoder* QWaveDecoder_new3(QIODevice* device, QObject* parent) { + return new MiqtVirtualQWaveDecoder(device, parent); } -void QWaveDecoder_new4(QIODevice* device, QAudioFormat* format, QObject* parent, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQWaveDecoder* ret = new MiqtVirtualQWaveDecoder(device, *format, parent); - *outptr_QWaveDecoder = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QWaveDecoder* QWaveDecoder_new4(QIODevice* device, QAudioFormat* format, QObject* parent) { + return new MiqtVirtualQWaveDecoder(device, *format, parent); +} + +void QWaveDecoder_virtbase(QWaveDecoder* src, QIODevice** outptr_QIODevice) { + *outptr_QIODevice = static_cast(src); } QMetaObject* QWaveDecoder_MetaObject(const QWaveDecoder* self) { diff --git a/qt6/multimedia/gen_qwavedecoder.go b/qt6/multimedia/gen_qwavedecoder.go index a3b58fa1..dfa9f4d8 100644 --- a/qt6/multimedia/gen_qwavedecoder.go +++ b/qt6/multimedia/gen_qwavedecoder.go @@ -36,72 +36,50 @@ func (this *QWaveDecoder) UnsafePointer() unsafe.Pointer { } // newQWaveDecoder constructs the type using only CGO pointers. -func newQWaveDecoder(h *C.QWaveDecoder, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QWaveDecoder { +func newQWaveDecoder(h *C.QWaveDecoder) *QWaveDecoder { if h == nil { return nil } + var outptr_QIODevice *C.QIODevice = nil + C.QWaveDecoder_virtbase(h, &outptr_QIODevice) + return &QWaveDecoder{h: h, - QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(h_QIODevice), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QIODeviceBase))} + QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(outptr_QIODevice))} } // UnsafeNewQWaveDecoder constructs the type using only unsafe pointers. -func UnsafeNewQWaveDecoder(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QWaveDecoder { - if h == nil { - return nil - } - - return &QWaveDecoder{h: (*C.QWaveDecoder)(h), - QIODevice: qt6.UnsafeNewQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} +func UnsafeNewQWaveDecoder(h unsafe.Pointer) *QWaveDecoder { + return newQWaveDecoder((*C.QWaveDecoder)(h)) } // NewQWaveDecoder constructs a new QWaveDecoder object. func NewQWaveDecoder(device *qt6.QIODevice) *QWaveDecoder { - var outptr_QWaveDecoder *C.QWaveDecoder = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QWaveDecoder_new((*C.QIODevice)(device.UnsafePointer()), &outptr_QWaveDecoder, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQWaveDecoder(outptr_QWaveDecoder, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQWaveDecoder(C.QWaveDecoder_new((*C.QIODevice)(device.UnsafePointer()))) ret.isSubclass = true return ret } // NewQWaveDecoder2 constructs a new QWaveDecoder object. func NewQWaveDecoder2(device *qt6.QIODevice, format *QAudioFormat) *QWaveDecoder { - var outptr_QWaveDecoder *C.QWaveDecoder = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QWaveDecoder_new2((*C.QIODevice)(device.UnsafePointer()), format.cPointer(), &outptr_QWaveDecoder, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQWaveDecoder(outptr_QWaveDecoder, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQWaveDecoder(C.QWaveDecoder_new2((*C.QIODevice)(device.UnsafePointer()), format.cPointer())) ret.isSubclass = true return ret } // NewQWaveDecoder3 constructs a new QWaveDecoder object. func NewQWaveDecoder3(device *qt6.QIODevice, parent *qt6.QObject) *QWaveDecoder { - var outptr_QWaveDecoder *C.QWaveDecoder = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QWaveDecoder_new3((*C.QIODevice)(device.UnsafePointer()), (*C.QObject)(parent.UnsafePointer()), &outptr_QWaveDecoder, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQWaveDecoder(outptr_QWaveDecoder, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQWaveDecoder(C.QWaveDecoder_new3((*C.QIODevice)(device.UnsafePointer()), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQWaveDecoder4 constructs a new QWaveDecoder object. func NewQWaveDecoder4(device *qt6.QIODevice, format *QAudioFormat, parent *qt6.QObject) *QWaveDecoder { - var outptr_QWaveDecoder *C.QWaveDecoder = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QWaveDecoder_new4((*C.QIODevice)(device.UnsafePointer()), format.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QWaveDecoder, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQWaveDecoder(outptr_QWaveDecoder, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQWaveDecoder(C.QWaveDecoder_new4((*C.QIODevice)(device.UnsafePointer()), format.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -132,7 +110,7 @@ func (this *QWaveDecoder) AudioFormat() *QAudioFormat { } func (this *QWaveDecoder) GetDevice() *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QWaveDecoder_GetDevice(this.h)), nil, nil) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QWaveDecoder_GetDevice(this.h))) } func (this *QWaveDecoder) Duration() int { diff --git a/qt6/multimedia/gen_qwavedecoder.h b/qt6/multimedia/gen_qwavedecoder.h index 6784db0c..77a56927 100644 --- a/qt6/multimedia/gen_qwavedecoder.h +++ b/qt6/multimedia/gen_qwavedecoder.h @@ -30,10 +30,11 @@ typedef struct QObject QObject; typedef struct QWaveDecoder QWaveDecoder; #endif -void QWaveDecoder_new(QIODevice* device, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QWaveDecoder_new2(QIODevice* device, QAudioFormat* format, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QWaveDecoder_new3(QIODevice* device, QObject* parent, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QWaveDecoder_new4(QIODevice* device, QAudioFormat* format, QObject* parent, QWaveDecoder** outptr_QWaveDecoder, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +QWaveDecoder* QWaveDecoder_new(QIODevice* device); +QWaveDecoder* QWaveDecoder_new2(QIODevice* device, QAudioFormat* format); +QWaveDecoder* QWaveDecoder_new3(QIODevice* device, QObject* parent); +QWaveDecoder* QWaveDecoder_new4(QIODevice* device, QAudioFormat* format, QObject* parent); +void QWaveDecoder_virtbase(QWaveDecoder* src, QIODevice** outptr_QIODevice); QMetaObject* QWaveDecoder_MetaObject(const QWaveDecoder* self); void* QWaveDecoder_Metacast(QWaveDecoder* self, const char* param1); struct miqt_string QWaveDecoder_Tr(const char* s); diff --git a/qt6/network/gen_qabstractnetworkcache.cpp b/qt6/network/gen_qabstractnetworkcache.cpp index 0720ee8d..14574723 100644 --- a/qt6/network/gen_qabstractnetworkcache.cpp +++ b/qt6/network/gen_qabstractnetworkcache.cpp @@ -17,14 +17,12 @@ #include "gen_qabstractnetworkcache.h" #include "_cgo_export.h" -void QNetworkCacheMetaData_new(QNetworkCacheMetaData** outptr_QNetworkCacheMetaData) { - QNetworkCacheMetaData* ret = new QNetworkCacheMetaData(); - *outptr_QNetworkCacheMetaData = ret; +QNetworkCacheMetaData* QNetworkCacheMetaData_new() { + return new QNetworkCacheMetaData(); } -void QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other, QNetworkCacheMetaData** outptr_QNetworkCacheMetaData) { - QNetworkCacheMetaData* ret = new QNetworkCacheMetaData(*other); - *outptr_QNetworkCacheMetaData = ret; +QNetworkCacheMetaData* QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other) { + return new QNetworkCacheMetaData(*other); } void QNetworkCacheMetaData_OperatorAssign(QNetworkCacheMetaData* self, QNetworkCacheMetaData* other) { @@ -167,6 +165,10 @@ void QNetworkCacheMetaData_Delete(QNetworkCacheMetaData* self, bool isSubclass) } } +void QAbstractNetworkCache_virtbase(QAbstractNetworkCache* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QAbstractNetworkCache_MetaObject(const QAbstractNetworkCache* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/network/gen_qabstractnetworkcache.go b/qt6/network/gen_qabstractnetworkcache.go index f9705370..e764701e 100644 --- a/qt6/network/gen_qabstractnetworkcache.go +++ b/qt6/network/gen_qabstractnetworkcache.go @@ -38,34 +38,27 @@ func newQNetworkCacheMetaData(h *C.QNetworkCacheMetaData) *QNetworkCacheMetaData if h == nil { return nil } + return &QNetworkCacheMetaData{h: h} } // UnsafeNewQNetworkCacheMetaData constructs the type using only unsafe pointers. func UnsafeNewQNetworkCacheMetaData(h unsafe.Pointer) *QNetworkCacheMetaData { - if h == nil { - return nil - } - - return &QNetworkCacheMetaData{h: (*C.QNetworkCacheMetaData)(h)} + return newQNetworkCacheMetaData((*C.QNetworkCacheMetaData)(h)) } // NewQNetworkCacheMetaData constructs a new QNetworkCacheMetaData object. func NewQNetworkCacheMetaData() *QNetworkCacheMetaData { - var outptr_QNetworkCacheMetaData *C.QNetworkCacheMetaData = nil - C.QNetworkCacheMetaData_new(&outptr_QNetworkCacheMetaData) - ret := newQNetworkCacheMetaData(outptr_QNetworkCacheMetaData) + ret := newQNetworkCacheMetaData(C.QNetworkCacheMetaData_new()) ret.isSubclass = true return ret } // NewQNetworkCacheMetaData2 constructs a new QNetworkCacheMetaData object. func NewQNetworkCacheMetaData2(other *QNetworkCacheMetaData) *QNetworkCacheMetaData { - var outptr_QNetworkCacheMetaData *C.QNetworkCacheMetaData = nil - C.QNetworkCacheMetaData_new2(other.cPointer(), &outptr_QNetworkCacheMetaData) - ret := newQNetworkCacheMetaData(outptr_QNetworkCacheMetaData) + ret := newQNetworkCacheMetaData(C.QNetworkCacheMetaData_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -259,22 +252,20 @@ func (this *QAbstractNetworkCache) UnsafePointer() unsafe.Pointer { } // newQAbstractNetworkCache constructs the type using only CGO pointers. -func newQAbstractNetworkCache(h *C.QAbstractNetworkCache, h_QObject *C.QObject) *QAbstractNetworkCache { +func newQAbstractNetworkCache(h *C.QAbstractNetworkCache) *QAbstractNetworkCache { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAbstractNetworkCache_virtbase(h, &outptr_QObject) + return &QAbstractNetworkCache{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAbstractNetworkCache constructs the type using only unsafe pointers. -func UnsafeNewQAbstractNetworkCache(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAbstractNetworkCache { - if h == nil { - return nil - } - - return &QAbstractNetworkCache{h: (*C.QAbstractNetworkCache)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAbstractNetworkCache(h unsafe.Pointer) *QAbstractNetworkCache { + return newQAbstractNetworkCache((*C.QAbstractNetworkCache)(h)) } func (this *QAbstractNetworkCache) MetaObject() *qt6.QMetaObject { @@ -307,7 +298,7 @@ func (this *QAbstractNetworkCache) UpdateMetaData(metaData *QNetworkCacheMetaDat } func (this *QAbstractNetworkCache) Data(url *qt6.QUrl) *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Data(this.h, (*C.QUrl)(url.UnsafePointer()))), nil, nil) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Data(this.h, (*C.QUrl)(url.UnsafePointer())))) } func (this *QAbstractNetworkCache) Remove(url *qt6.QUrl) bool { @@ -319,7 +310,7 @@ func (this *QAbstractNetworkCache) CacheSize() int64 { } func (this *QAbstractNetworkCache) Prepare(metaData *QNetworkCacheMetaData) *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Prepare(this.h, metaData.cPointer())), nil, nil) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QAbstractNetworkCache_Prepare(this.h, metaData.cPointer()))) } func (this *QAbstractNetworkCache) Insert(device *qt6.QIODevice) { diff --git a/qt6/network/gen_qabstractnetworkcache.h b/qt6/network/gen_qabstractnetworkcache.h index ce6fdca3..072a8dd7 100644 --- a/qt6/network/gen_qabstractnetworkcache.h +++ b/qt6/network/gen_qabstractnetworkcache.h @@ -34,8 +34,8 @@ typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -void QNetworkCacheMetaData_new(QNetworkCacheMetaData** outptr_QNetworkCacheMetaData); -void QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other, QNetworkCacheMetaData** outptr_QNetworkCacheMetaData); +QNetworkCacheMetaData* QNetworkCacheMetaData_new(); +QNetworkCacheMetaData* QNetworkCacheMetaData_new2(QNetworkCacheMetaData* other); void QNetworkCacheMetaData_OperatorAssign(QNetworkCacheMetaData* self, QNetworkCacheMetaData* other); void QNetworkCacheMetaData_Swap(QNetworkCacheMetaData* self, QNetworkCacheMetaData* other); bool QNetworkCacheMetaData_OperatorEqual(const QNetworkCacheMetaData* self, QNetworkCacheMetaData* other); @@ -55,6 +55,7 @@ struct miqt_map /* of int to QVariant* */ QNetworkCacheMetaData_Attributes(cons void QNetworkCacheMetaData_SetAttributes(QNetworkCacheMetaData* self, struct miqt_map /* of int to QVariant* */ attributes); void QNetworkCacheMetaData_Delete(QNetworkCacheMetaData* self, bool isSubclass); +void QAbstractNetworkCache_virtbase(QAbstractNetworkCache* src, QObject** outptr_QObject); QMetaObject* QAbstractNetworkCache_MetaObject(const QAbstractNetworkCache* self); void* QAbstractNetworkCache_Metacast(QAbstractNetworkCache* self, const char* param1); struct miqt_string QAbstractNetworkCache_Tr(const char* s); diff --git a/qt6/network/gen_qabstractsocket.cpp b/qt6/network/gen_qabstractsocket.cpp index 946c5812..d7704ffa 100644 --- a/qt6/network/gen_qabstractsocket.cpp +++ b/qt6/network/gen_qabstractsocket.cpp @@ -710,12 +710,12 @@ public: }; -void QAbstractSocket_new(int socketType, QObject* parent, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQAbstractSocket* ret = new MiqtVirtualQAbstractSocket(static_cast(socketType), parent); - *outptr_QAbstractSocket = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QAbstractSocket* QAbstractSocket_new(int socketType, QObject* parent) { + return new MiqtVirtualQAbstractSocket(static_cast(socketType), parent); +} + +void QAbstractSocket_virtbase(QAbstractSocket* src, QIODevice** outptr_QIODevice) { + *outptr_QIODevice = static_cast(src); } QMetaObject* QAbstractSocket_MetaObject(const QAbstractSocket* self) { diff --git a/qt6/network/gen_qabstractsocket.go b/qt6/network/gen_qabstractsocket.go index 276fd907..85949376 100644 --- a/qt6/network/gen_qabstractsocket.go +++ b/qt6/network/gen_qabstractsocket.go @@ -124,33 +124,26 @@ func (this *QAbstractSocket) UnsafePointer() unsafe.Pointer { } // newQAbstractSocket constructs the type using only CGO pointers. -func newQAbstractSocket(h *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QAbstractSocket { +func newQAbstractSocket(h *C.QAbstractSocket) *QAbstractSocket { if h == nil { return nil } + var outptr_QIODevice *C.QIODevice = nil + C.QAbstractSocket_virtbase(h, &outptr_QIODevice) + return &QAbstractSocket{h: h, - QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(h_QIODevice), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QIODeviceBase))} + QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(outptr_QIODevice))} } // UnsafeNewQAbstractSocket constructs the type using only unsafe pointers. -func UnsafeNewQAbstractSocket(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QAbstractSocket { - if h == nil { - return nil - } - - return &QAbstractSocket{h: (*C.QAbstractSocket)(h), - QIODevice: qt6.UnsafeNewQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} +func UnsafeNewQAbstractSocket(h unsafe.Pointer) *QAbstractSocket { + return newQAbstractSocket((*C.QAbstractSocket)(h)) } // NewQAbstractSocket constructs a new QAbstractSocket object. func NewQAbstractSocket(socketType QAbstractSocket__SocketType, parent *qt6.QObject) *QAbstractSocket { - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QAbstractSocket_new((C.int)(socketType), (*C.QObject)(parent.UnsafePointer()), &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQAbstractSocket(outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQAbstractSocket(C.QAbstractSocket_new((C.int)(socketType), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qabstractsocket.h b/qt6/network/gen_qabstractsocket.h index 4a1e2765..5ea89c91 100644 --- a/qt6/network/gen_qabstractsocket.h +++ b/qt6/network/gen_qabstractsocket.h @@ -36,7 +36,8 @@ typedef struct QObject QObject; typedef struct QVariant QVariant; #endif -void QAbstractSocket_new(int socketType, QObject* parent, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +QAbstractSocket* QAbstractSocket_new(int socketType, QObject* parent); +void QAbstractSocket_virtbase(QAbstractSocket* src, QIODevice** outptr_QIODevice); QMetaObject* QAbstractSocket_MetaObject(const QAbstractSocket* self); void* QAbstractSocket_Metacast(QAbstractSocket* self, const char* param1); struct miqt_string QAbstractSocket_Tr(const char* s); diff --git a/qt6/network/gen_qauthenticator.cpp b/qt6/network/gen_qauthenticator.cpp index 268629bc..c6e7c47a 100644 --- a/qt6/network/gen_qauthenticator.cpp +++ b/qt6/network/gen_qauthenticator.cpp @@ -8,14 +8,12 @@ #include "gen_qauthenticator.h" #include "_cgo_export.h" -void QAuthenticator_new(QAuthenticator** outptr_QAuthenticator) { - QAuthenticator* ret = new QAuthenticator(); - *outptr_QAuthenticator = ret; +QAuthenticator* QAuthenticator_new() { + return new QAuthenticator(); } -void QAuthenticator_new2(QAuthenticator* other, QAuthenticator** outptr_QAuthenticator) { - QAuthenticator* ret = new QAuthenticator(*other); - *outptr_QAuthenticator = ret; +QAuthenticator* QAuthenticator_new2(QAuthenticator* other) { + return new QAuthenticator(*other); } void QAuthenticator_OperatorAssign(QAuthenticator* self, QAuthenticator* other) { diff --git a/qt6/network/gen_qauthenticator.go b/qt6/network/gen_qauthenticator.go index a3bcde9f..103e1d2f 100644 --- a/qt6/network/gen_qauthenticator.go +++ b/qt6/network/gen_qauthenticator.go @@ -38,34 +38,27 @@ func newQAuthenticator(h *C.QAuthenticator) *QAuthenticator { if h == nil { return nil } + return &QAuthenticator{h: h} } // UnsafeNewQAuthenticator constructs the type using only unsafe pointers. func UnsafeNewQAuthenticator(h unsafe.Pointer) *QAuthenticator { - if h == nil { - return nil - } - - return &QAuthenticator{h: (*C.QAuthenticator)(h)} + return newQAuthenticator((*C.QAuthenticator)(h)) } // NewQAuthenticator constructs a new QAuthenticator object. func NewQAuthenticator() *QAuthenticator { - var outptr_QAuthenticator *C.QAuthenticator = nil - C.QAuthenticator_new(&outptr_QAuthenticator) - ret := newQAuthenticator(outptr_QAuthenticator) + ret := newQAuthenticator(C.QAuthenticator_new()) ret.isSubclass = true return ret } // NewQAuthenticator2 constructs a new QAuthenticator object. func NewQAuthenticator2(other *QAuthenticator) *QAuthenticator { - var outptr_QAuthenticator *C.QAuthenticator = nil - C.QAuthenticator_new2(other.cPointer(), &outptr_QAuthenticator) - ret := newQAuthenticator(outptr_QAuthenticator) + ret := newQAuthenticator(C.QAuthenticator_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qauthenticator.h b/qt6/network/gen_qauthenticator.h index 3176aafb..8d3a46c0 100644 --- a/qt6/network/gen_qauthenticator.h +++ b/qt6/network/gen_qauthenticator.h @@ -22,8 +22,8 @@ typedef struct QAuthenticator QAuthenticator; typedef struct QVariant QVariant; #endif -void QAuthenticator_new(QAuthenticator** outptr_QAuthenticator); -void QAuthenticator_new2(QAuthenticator* other, QAuthenticator** outptr_QAuthenticator); +QAuthenticator* QAuthenticator_new(); +QAuthenticator* QAuthenticator_new2(QAuthenticator* other); void QAuthenticator_OperatorAssign(QAuthenticator* self, QAuthenticator* other); bool QAuthenticator_OperatorEqual(const QAuthenticator* self, QAuthenticator* other); bool QAuthenticator_OperatorNotEqual(const QAuthenticator* self, QAuthenticator* other); diff --git a/qt6/network/gen_qdnslookup.cpp b/qt6/network/gen_qdnslookup.cpp index 71c5af6d..1a9dea1b 100644 --- a/qt6/network/gen_qdnslookup.cpp +++ b/qt6/network/gen_qdnslookup.cpp @@ -20,14 +20,12 @@ #include "gen_qdnslookup.h" #include "_cgo_export.h" -void QDnsDomainNameRecord_new(QDnsDomainNameRecord** outptr_QDnsDomainNameRecord) { - QDnsDomainNameRecord* ret = new QDnsDomainNameRecord(); - *outptr_QDnsDomainNameRecord = ret; +QDnsDomainNameRecord* QDnsDomainNameRecord_new() { + return new QDnsDomainNameRecord(); } -void QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other, QDnsDomainNameRecord** outptr_QDnsDomainNameRecord) { - QDnsDomainNameRecord* ret = new QDnsDomainNameRecord(*other); - *outptr_QDnsDomainNameRecord = ret; +QDnsDomainNameRecord* QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other) { + return new QDnsDomainNameRecord(*other); } void QDnsDomainNameRecord_OperatorAssign(QDnsDomainNameRecord* self, QDnsDomainNameRecord* other) { @@ -73,14 +71,12 @@ void QDnsDomainNameRecord_Delete(QDnsDomainNameRecord* self, bool isSubclass) { } } -void QDnsHostAddressRecord_new(QDnsHostAddressRecord** outptr_QDnsHostAddressRecord) { - QDnsHostAddressRecord* ret = new QDnsHostAddressRecord(); - *outptr_QDnsHostAddressRecord = ret; +QDnsHostAddressRecord* QDnsHostAddressRecord_new() { + return new QDnsHostAddressRecord(); } -void QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other, QDnsHostAddressRecord** outptr_QDnsHostAddressRecord) { - QDnsHostAddressRecord* ret = new QDnsHostAddressRecord(*other); - *outptr_QDnsHostAddressRecord = ret; +QDnsHostAddressRecord* QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other) { + return new QDnsHostAddressRecord(*other); } void QDnsHostAddressRecord_OperatorAssign(QDnsHostAddressRecord* self, QDnsHostAddressRecord* other) { @@ -119,14 +115,12 @@ void QDnsHostAddressRecord_Delete(QDnsHostAddressRecord* self, bool isSubclass) } } -void QDnsMailExchangeRecord_new(QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord) { - QDnsMailExchangeRecord* ret = new QDnsMailExchangeRecord(); - *outptr_QDnsMailExchangeRecord = ret; +QDnsMailExchangeRecord* QDnsMailExchangeRecord_new() { + return new QDnsMailExchangeRecord(); } -void QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other, QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord) { - QDnsMailExchangeRecord* ret = new QDnsMailExchangeRecord(*other); - *outptr_QDnsMailExchangeRecord = ret; +QDnsMailExchangeRecord* QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other) { + return new QDnsMailExchangeRecord(*other); } void QDnsMailExchangeRecord_OperatorAssign(QDnsMailExchangeRecord* self, QDnsMailExchangeRecord* other) { @@ -177,14 +171,12 @@ void QDnsMailExchangeRecord_Delete(QDnsMailExchangeRecord* self, bool isSubclass } } -void QDnsServiceRecord_new(QDnsServiceRecord** outptr_QDnsServiceRecord) { - QDnsServiceRecord* ret = new QDnsServiceRecord(); - *outptr_QDnsServiceRecord = ret; +QDnsServiceRecord* QDnsServiceRecord_new() { + return new QDnsServiceRecord(); } -void QDnsServiceRecord_new2(QDnsServiceRecord* other, QDnsServiceRecord** outptr_QDnsServiceRecord) { - QDnsServiceRecord* ret = new QDnsServiceRecord(*other); - *outptr_QDnsServiceRecord = ret; +QDnsServiceRecord* QDnsServiceRecord_new2(QDnsServiceRecord* other) { + return new QDnsServiceRecord(*other); } void QDnsServiceRecord_OperatorAssign(QDnsServiceRecord* self, QDnsServiceRecord* other) { @@ -245,14 +237,12 @@ void QDnsServiceRecord_Delete(QDnsServiceRecord* self, bool isSubclass) { } } -void QDnsTextRecord_new(QDnsTextRecord** outptr_QDnsTextRecord) { - QDnsTextRecord* ret = new QDnsTextRecord(); - *outptr_QDnsTextRecord = ret; +QDnsTextRecord* QDnsTextRecord_new() { + return new QDnsTextRecord(); } -void QDnsTextRecord_new2(QDnsTextRecord* other, QDnsTextRecord** outptr_QDnsTextRecord) { - QDnsTextRecord* ret = new QDnsTextRecord(*other); - *outptr_QDnsTextRecord = ret; +QDnsTextRecord* QDnsTextRecord_new2(QDnsTextRecord* other) { + return new QDnsTextRecord(*other); } void QDnsTextRecord_OperatorAssign(QDnsTextRecord* self, QDnsTextRecord* other) { @@ -490,44 +480,36 @@ public: }; -void QDnsLookup_new(QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { - MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(); - *outptr_QDnsLookup = ret; - *outptr_QObject = static_cast(ret); +QDnsLookup* QDnsLookup_new() { + return new MiqtVirtualQDnsLookup(); } -void QDnsLookup_new2(int typeVal, struct miqt_string name, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { +QDnsLookup* QDnsLookup_new2(int typeVal, struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString); - *outptr_QDnsLookup = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString); } -void QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { +QDnsLookup* QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, *nameserver); - *outptr_QDnsLookup = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, *nameserver); } -void QDnsLookup_new4(QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { - MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(parent); - *outptr_QDnsLookup = ret; - *outptr_QObject = static_cast(ret); +QDnsLookup* QDnsLookup_new4(QObject* parent) { + return new MiqtVirtualQDnsLookup(parent); } -void QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { +QDnsLookup* QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, parent); - *outptr_QDnsLookup = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, parent); } -void QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject) { +QDnsLookup* QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQDnsLookup* ret = new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, *nameserver, parent); - *outptr_QDnsLookup = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQDnsLookup(static_cast(typeVal), name_QString, *nameserver, parent); +} + +void QDnsLookup_virtbase(QDnsLookup* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QDnsLookup_MetaObject(const QDnsLookup* self) { diff --git a/qt6/network/gen_qdnslookup.go b/qt6/network/gen_qdnslookup.go index dd090455..2d6ff613 100644 --- a/qt6/network/gen_qdnslookup.go +++ b/qt6/network/gen_qdnslookup.go @@ -66,34 +66,27 @@ func newQDnsDomainNameRecord(h *C.QDnsDomainNameRecord) *QDnsDomainNameRecord { if h == nil { return nil } + return &QDnsDomainNameRecord{h: h} } // UnsafeNewQDnsDomainNameRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsDomainNameRecord(h unsafe.Pointer) *QDnsDomainNameRecord { - if h == nil { - return nil - } - - return &QDnsDomainNameRecord{h: (*C.QDnsDomainNameRecord)(h)} + return newQDnsDomainNameRecord((*C.QDnsDomainNameRecord)(h)) } // NewQDnsDomainNameRecord constructs a new QDnsDomainNameRecord object. func NewQDnsDomainNameRecord() *QDnsDomainNameRecord { - var outptr_QDnsDomainNameRecord *C.QDnsDomainNameRecord = nil - C.QDnsDomainNameRecord_new(&outptr_QDnsDomainNameRecord) - ret := newQDnsDomainNameRecord(outptr_QDnsDomainNameRecord) + ret := newQDnsDomainNameRecord(C.QDnsDomainNameRecord_new()) ret.isSubclass = true return ret } // NewQDnsDomainNameRecord2 constructs a new QDnsDomainNameRecord object. func NewQDnsDomainNameRecord2(other *QDnsDomainNameRecord) *QDnsDomainNameRecord { - var outptr_QDnsDomainNameRecord *C.QDnsDomainNameRecord = nil - C.QDnsDomainNameRecord_new2(other.cPointer(), &outptr_QDnsDomainNameRecord) - ret := newQDnsDomainNameRecord(outptr_QDnsDomainNameRecord) + ret := newQDnsDomainNameRecord(C.QDnsDomainNameRecord_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -162,34 +155,27 @@ func newQDnsHostAddressRecord(h *C.QDnsHostAddressRecord) *QDnsHostAddressRecord if h == nil { return nil } + return &QDnsHostAddressRecord{h: h} } // UnsafeNewQDnsHostAddressRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsHostAddressRecord(h unsafe.Pointer) *QDnsHostAddressRecord { - if h == nil { - return nil - } - - return &QDnsHostAddressRecord{h: (*C.QDnsHostAddressRecord)(h)} + return newQDnsHostAddressRecord((*C.QDnsHostAddressRecord)(h)) } // NewQDnsHostAddressRecord constructs a new QDnsHostAddressRecord object. func NewQDnsHostAddressRecord() *QDnsHostAddressRecord { - var outptr_QDnsHostAddressRecord *C.QDnsHostAddressRecord = nil - C.QDnsHostAddressRecord_new(&outptr_QDnsHostAddressRecord) - ret := newQDnsHostAddressRecord(outptr_QDnsHostAddressRecord) + ret := newQDnsHostAddressRecord(C.QDnsHostAddressRecord_new()) ret.isSubclass = true return ret } // NewQDnsHostAddressRecord2 constructs a new QDnsHostAddressRecord object. func NewQDnsHostAddressRecord2(other *QDnsHostAddressRecord) *QDnsHostAddressRecord { - var outptr_QDnsHostAddressRecord *C.QDnsHostAddressRecord = nil - C.QDnsHostAddressRecord_new2(other.cPointer(), &outptr_QDnsHostAddressRecord) - ret := newQDnsHostAddressRecord(outptr_QDnsHostAddressRecord) + ret := newQDnsHostAddressRecord(C.QDnsHostAddressRecord_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -257,34 +243,27 @@ func newQDnsMailExchangeRecord(h *C.QDnsMailExchangeRecord) *QDnsMailExchangeRec if h == nil { return nil } + return &QDnsMailExchangeRecord{h: h} } // UnsafeNewQDnsMailExchangeRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsMailExchangeRecord(h unsafe.Pointer) *QDnsMailExchangeRecord { - if h == nil { - return nil - } - - return &QDnsMailExchangeRecord{h: (*C.QDnsMailExchangeRecord)(h)} + return newQDnsMailExchangeRecord((*C.QDnsMailExchangeRecord)(h)) } // NewQDnsMailExchangeRecord constructs a new QDnsMailExchangeRecord object. func NewQDnsMailExchangeRecord() *QDnsMailExchangeRecord { - var outptr_QDnsMailExchangeRecord *C.QDnsMailExchangeRecord = nil - C.QDnsMailExchangeRecord_new(&outptr_QDnsMailExchangeRecord) - ret := newQDnsMailExchangeRecord(outptr_QDnsMailExchangeRecord) + ret := newQDnsMailExchangeRecord(C.QDnsMailExchangeRecord_new()) ret.isSubclass = true return ret } // NewQDnsMailExchangeRecord2 constructs a new QDnsMailExchangeRecord object. func NewQDnsMailExchangeRecord2(other *QDnsMailExchangeRecord) *QDnsMailExchangeRecord { - var outptr_QDnsMailExchangeRecord *C.QDnsMailExchangeRecord = nil - C.QDnsMailExchangeRecord_new2(other.cPointer(), &outptr_QDnsMailExchangeRecord) - ret := newQDnsMailExchangeRecord(outptr_QDnsMailExchangeRecord) + ret := newQDnsMailExchangeRecord(C.QDnsMailExchangeRecord_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -357,34 +336,27 @@ func newQDnsServiceRecord(h *C.QDnsServiceRecord) *QDnsServiceRecord { if h == nil { return nil } + return &QDnsServiceRecord{h: h} } // UnsafeNewQDnsServiceRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsServiceRecord(h unsafe.Pointer) *QDnsServiceRecord { - if h == nil { - return nil - } - - return &QDnsServiceRecord{h: (*C.QDnsServiceRecord)(h)} + return newQDnsServiceRecord((*C.QDnsServiceRecord)(h)) } // NewQDnsServiceRecord constructs a new QDnsServiceRecord object. func NewQDnsServiceRecord() *QDnsServiceRecord { - var outptr_QDnsServiceRecord *C.QDnsServiceRecord = nil - C.QDnsServiceRecord_new(&outptr_QDnsServiceRecord) - ret := newQDnsServiceRecord(outptr_QDnsServiceRecord) + ret := newQDnsServiceRecord(C.QDnsServiceRecord_new()) ret.isSubclass = true return ret } // NewQDnsServiceRecord2 constructs a new QDnsServiceRecord object. func NewQDnsServiceRecord2(other *QDnsServiceRecord) *QDnsServiceRecord { - var outptr_QDnsServiceRecord *C.QDnsServiceRecord = nil - C.QDnsServiceRecord_new2(other.cPointer(), &outptr_QDnsServiceRecord) - ret := newQDnsServiceRecord(outptr_QDnsServiceRecord) + ret := newQDnsServiceRecord(C.QDnsServiceRecord_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -465,34 +437,27 @@ func newQDnsTextRecord(h *C.QDnsTextRecord) *QDnsTextRecord { if h == nil { return nil } + return &QDnsTextRecord{h: h} } // UnsafeNewQDnsTextRecord constructs the type using only unsafe pointers. func UnsafeNewQDnsTextRecord(h unsafe.Pointer) *QDnsTextRecord { - if h == nil { - return nil - } - - return &QDnsTextRecord{h: (*C.QDnsTextRecord)(h)} + return newQDnsTextRecord((*C.QDnsTextRecord)(h)) } // NewQDnsTextRecord constructs a new QDnsTextRecord object. func NewQDnsTextRecord() *QDnsTextRecord { - var outptr_QDnsTextRecord *C.QDnsTextRecord = nil - C.QDnsTextRecord_new(&outptr_QDnsTextRecord) - ret := newQDnsTextRecord(outptr_QDnsTextRecord) + ret := newQDnsTextRecord(C.QDnsTextRecord_new()) ret.isSubclass = true return ret } // NewQDnsTextRecord2 constructs a new QDnsTextRecord object. func NewQDnsTextRecord2(other *QDnsTextRecord) *QDnsTextRecord { - var outptr_QDnsTextRecord *C.QDnsTextRecord = nil - C.QDnsTextRecord_new2(other.cPointer(), &outptr_QDnsTextRecord) - ret := newQDnsTextRecord(outptr_QDnsTextRecord) + ret := newQDnsTextRecord(C.QDnsTextRecord_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -564,31 +529,26 @@ func (this *QDnsLookup) UnsafePointer() unsafe.Pointer { } // newQDnsLookup constructs the type using only CGO pointers. -func newQDnsLookup(h *C.QDnsLookup, h_QObject *C.QObject) *QDnsLookup { +func newQDnsLookup(h *C.QDnsLookup) *QDnsLookup { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QDnsLookup_virtbase(h, &outptr_QObject) + return &QDnsLookup{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQDnsLookup constructs the type using only unsafe pointers. -func UnsafeNewQDnsLookup(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDnsLookup { - if h == nil { - return nil - } - - return &QDnsLookup{h: (*C.QDnsLookup)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQDnsLookup(h unsafe.Pointer) *QDnsLookup { + return newQDnsLookup((*C.QDnsLookup)(h)) } // NewQDnsLookup constructs a new QDnsLookup object. func NewQDnsLookup() *QDnsLookup { - var outptr_QDnsLookup *C.QDnsLookup = nil - var outptr_QObject *C.QObject = nil - C.QDnsLookup_new(&outptr_QDnsLookup, &outptr_QObject) - ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret := newQDnsLookup(C.QDnsLookup_new()) ret.isSubclass = true return ret } @@ -599,11 +559,8 @@ func NewQDnsLookup2(typeVal QDnsLookup__Type, name string) *QDnsLookup { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QDnsLookup *C.QDnsLookup = nil - var outptr_QObject *C.QObject = nil - C.QDnsLookup_new2((C.int)(typeVal), name_ms, &outptr_QDnsLookup, &outptr_QObject) - ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret := newQDnsLookup(C.QDnsLookup_new2((C.int)(typeVal), name_ms)) ret.isSubclass = true return ret } @@ -614,22 +571,16 @@ func NewQDnsLookup3(typeVal QDnsLookup__Type, name string, nameserver *QHostAddr name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QDnsLookup *C.QDnsLookup = nil - var outptr_QObject *C.QObject = nil - C.QDnsLookup_new3((C.int)(typeVal), name_ms, nameserver.cPointer(), &outptr_QDnsLookup, &outptr_QObject) - ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret := newQDnsLookup(C.QDnsLookup_new3((C.int)(typeVal), name_ms, nameserver.cPointer())) ret.isSubclass = true return ret } // NewQDnsLookup4 constructs a new QDnsLookup object. func NewQDnsLookup4(parent *qt6.QObject) *QDnsLookup { - var outptr_QDnsLookup *C.QDnsLookup = nil - var outptr_QObject *C.QObject = nil - C.QDnsLookup_new4((*C.QObject)(parent.UnsafePointer()), &outptr_QDnsLookup, &outptr_QObject) - ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret := newQDnsLookup(C.QDnsLookup_new4((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -640,11 +591,8 @@ func NewQDnsLookup5(typeVal QDnsLookup__Type, name string, parent *qt6.QObject) name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QDnsLookup *C.QDnsLookup = nil - var outptr_QObject *C.QObject = nil - C.QDnsLookup_new5((C.int)(typeVal), name_ms, (*C.QObject)(parent.UnsafePointer()), &outptr_QDnsLookup, &outptr_QObject) - ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret := newQDnsLookup(C.QDnsLookup_new5((C.int)(typeVal), name_ms, (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -655,11 +603,8 @@ func NewQDnsLookup6(typeVal QDnsLookup__Type, name string, nameserver *QHostAddr name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QDnsLookup *C.QDnsLookup = nil - var outptr_QObject *C.QObject = nil - C.QDnsLookup_new6((C.int)(typeVal), name_ms, nameserver.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QDnsLookup, &outptr_QObject) - ret := newQDnsLookup(outptr_QDnsLookup, outptr_QObject) + ret := newQDnsLookup(C.QDnsLookup_new6((C.int)(typeVal), name_ms, nameserver.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -1007,7 +952,7 @@ func miqt_exec_callback_QDnsLookup_TimerEvent(self *C.QDnsLookup, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QDnsLookup{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1033,7 +978,7 @@ func miqt_exec_callback_QDnsLookup_ChildEvent(self *C.QDnsLookup, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QDnsLookup{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/network/gen_qdnslookup.h b/qt6/network/gen_qdnslookup.h index 3236e076..6c3cc5c5 100644 --- a/qt6/network/gen_qdnslookup.h +++ b/qt6/network/gen_qdnslookup.h @@ -44,8 +44,8 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QDnsDomainNameRecord_new(QDnsDomainNameRecord** outptr_QDnsDomainNameRecord); -void QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other, QDnsDomainNameRecord** outptr_QDnsDomainNameRecord); +QDnsDomainNameRecord* QDnsDomainNameRecord_new(); +QDnsDomainNameRecord* QDnsDomainNameRecord_new2(QDnsDomainNameRecord* other); void QDnsDomainNameRecord_OperatorAssign(QDnsDomainNameRecord* self, QDnsDomainNameRecord* other); void QDnsDomainNameRecord_Swap(QDnsDomainNameRecord* self, QDnsDomainNameRecord* other); struct miqt_string QDnsDomainNameRecord_Name(const QDnsDomainNameRecord* self); @@ -53,8 +53,8 @@ unsigned int QDnsDomainNameRecord_TimeToLive(const QDnsDomainNameRecord* self); struct miqt_string QDnsDomainNameRecord_Value(const QDnsDomainNameRecord* self); void QDnsDomainNameRecord_Delete(QDnsDomainNameRecord* self, bool isSubclass); -void QDnsHostAddressRecord_new(QDnsHostAddressRecord** outptr_QDnsHostAddressRecord); -void QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other, QDnsHostAddressRecord** outptr_QDnsHostAddressRecord); +QDnsHostAddressRecord* QDnsHostAddressRecord_new(); +QDnsHostAddressRecord* QDnsHostAddressRecord_new2(QDnsHostAddressRecord* other); void QDnsHostAddressRecord_OperatorAssign(QDnsHostAddressRecord* self, QDnsHostAddressRecord* other); void QDnsHostAddressRecord_Swap(QDnsHostAddressRecord* self, QDnsHostAddressRecord* other); struct miqt_string QDnsHostAddressRecord_Name(const QDnsHostAddressRecord* self); @@ -62,8 +62,8 @@ unsigned int QDnsHostAddressRecord_TimeToLive(const QDnsHostAddressRecord* self) QHostAddress* QDnsHostAddressRecord_Value(const QDnsHostAddressRecord* self); void QDnsHostAddressRecord_Delete(QDnsHostAddressRecord* self, bool isSubclass); -void QDnsMailExchangeRecord_new(QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord); -void QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other, QDnsMailExchangeRecord** outptr_QDnsMailExchangeRecord); +QDnsMailExchangeRecord* QDnsMailExchangeRecord_new(); +QDnsMailExchangeRecord* QDnsMailExchangeRecord_new2(QDnsMailExchangeRecord* other); void QDnsMailExchangeRecord_OperatorAssign(QDnsMailExchangeRecord* self, QDnsMailExchangeRecord* other); void QDnsMailExchangeRecord_Swap(QDnsMailExchangeRecord* self, QDnsMailExchangeRecord* other); struct miqt_string QDnsMailExchangeRecord_Exchange(const QDnsMailExchangeRecord* self); @@ -72,8 +72,8 @@ uint16_t QDnsMailExchangeRecord_Preference(const QDnsMailExchangeRecord* self); unsigned int QDnsMailExchangeRecord_TimeToLive(const QDnsMailExchangeRecord* self); void QDnsMailExchangeRecord_Delete(QDnsMailExchangeRecord* self, bool isSubclass); -void QDnsServiceRecord_new(QDnsServiceRecord** outptr_QDnsServiceRecord); -void QDnsServiceRecord_new2(QDnsServiceRecord* other, QDnsServiceRecord** outptr_QDnsServiceRecord); +QDnsServiceRecord* QDnsServiceRecord_new(); +QDnsServiceRecord* QDnsServiceRecord_new2(QDnsServiceRecord* other); void QDnsServiceRecord_OperatorAssign(QDnsServiceRecord* self, QDnsServiceRecord* other); void QDnsServiceRecord_Swap(QDnsServiceRecord* self, QDnsServiceRecord* other); struct miqt_string QDnsServiceRecord_Name(const QDnsServiceRecord* self); @@ -84,8 +84,8 @@ unsigned int QDnsServiceRecord_TimeToLive(const QDnsServiceRecord* self); uint16_t QDnsServiceRecord_Weight(const QDnsServiceRecord* self); void QDnsServiceRecord_Delete(QDnsServiceRecord* self, bool isSubclass); -void QDnsTextRecord_new(QDnsTextRecord** outptr_QDnsTextRecord); -void QDnsTextRecord_new2(QDnsTextRecord* other, QDnsTextRecord** outptr_QDnsTextRecord); +QDnsTextRecord* QDnsTextRecord_new(); +QDnsTextRecord* QDnsTextRecord_new2(QDnsTextRecord* other); void QDnsTextRecord_OperatorAssign(QDnsTextRecord* self, QDnsTextRecord* other); void QDnsTextRecord_Swap(QDnsTextRecord* self, QDnsTextRecord* other); struct miqt_string QDnsTextRecord_Name(const QDnsTextRecord* self); @@ -93,12 +93,13 @@ unsigned int QDnsTextRecord_TimeToLive(const QDnsTextRecord* self); struct miqt_array /* of struct miqt_string */ QDnsTextRecord_Values(const QDnsTextRecord* self); void QDnsTextRecord_Delete(QDnsTextRecord* self, bool isSubclass); -void QDnsLookup_new(QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); -void QDnsLookup_new2(int typeVal, struct miqt_string name, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); -void QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); -void QDnsLookup_new4(QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); -void QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); -void QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent, QDnsLookup** outptr_QDnsLookup, QObject** outptr_QObject); +QDnsLookup* QDnsLookup_new(); +QDnsLookup* QDnsLookup_new2(int typeVal, struct miqt_string name); +QDnsLookup* QDnsLookup_new3(int typeVal, struct miqt_string name, QHostAddress* nameserver); +QDnsLookup* QDnsLookup_new4(QObject* parent); +QDnsLookup* QDnsLookup_new5(int typeVal, struct miqt_string name, QObject* parent); +QDnsLookup* QDnsLookup_new6(int typeVal, struct miqt_string name, QHostAddress* nameserver, QObject* parent); +void QDnsLookup_virtbase(QDnsLookup* src, QObject** outptr_QObject); QMetaObject* QDnsLookup_MetaObject(const QDnsLookup* self); void* QDnsLookup_Metacast(QDnsLookup* self, const char* param1); struct miqt_string QDnsLookup_Tr(const char* s); diff --git a/qt6/network/gen_qdtls.cpp b/qt6/network/gen_qdtls.cpp index 45356f06..75405323 100644 --- a/qt6/network/gen_qdtls.cpp +++ b/qt6/network/gen_qdtls.cpp @@ -203,16 +203,16 @@ public: }; -void QDtlsClientVerifier_new(QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject) { - MiqtVirtualQDtlsClientVerifier* ret = new MiqtVirtualQDtlsClientVerifier(); - *outptr_QDtlsClientVerifier = ret; - *outptr_QObject = static_cast(ret); +QDtlsClientVerifier* QDtlsClientVerifier_new() { + return new MiqtVirtualQDtlsClientVerifier(); } -void QDtlsClientVerifier_new2(QObject* parent, QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject) { - MiqtVirtualQDtlsClientVerifier* ret = new MiqtVirtualQDtlsClientVerifier(parent); - *outptr_QDtlsClientVerifier = ret; - *outptr_QObject = static_cast(ret); +QDtlsClientVerifier* QDtlsClientVerifier_new2(QObject* parent) { + return new MiqtVirtualQDtlsClientVerifier(parent); +} + +void QDtlsClientVerifier_virtbase(QDtlsClientVerifier* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QDtlsClientVerifier_MetaObject(const QDtlsClientVerifier* self) { @@ -539,16 +539,16 @@ public: }; -void QDtls_new(int mode, QDtls** outptr_QDtls, QObject** outptr_QObject) { - MiqtVirtualQDtls* ret = new MiqtVirtualQDtls(static_cast(mode)); - *outptr_QDtls = ret; - *outptr_QObject = static_cast(ret); +QDtls* QDtls_new(int mode) { + return new MiqtVirtualQDtls(static_cast(mode)); } -void QDtls_new2(int mode, QObject* parent, QDtls** outptr_QDtls, QObject** outptr_QObject) { - MiqtVirtualQDtls* ret = new MiqtVirtualQDtls(static_cast(mode), parent); - *outptr_QDtls = ret; - *outptr_QObject = static_cast(ret); +QDtls* QDtls_new2(int mode, QObject* parent) { + return new MiqtVirtualQDtls(static_cast(mode), parent); +} + +void QDtls_virtbase(QDtls* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QDtls_MetaObject(const QDtls* self) { @@ -839,20 +839,17 @@ void QDtls_Delete(QDtls* self, bool isSubclass) { } } -void QDtlsClientVerifier__GeneratorParameters_new(QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters) { - QDtlsClientVerifier::GeneratorParameters* ret = new QDtlsClientVerifier::GeneratorParameters(); - *outptr_QDtlsClientVerifier__GeneratorParameters = ret; +QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new() { + return new QDtlsClientVerifier::GeneratorParameters(); } -void QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters) { +QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s) { QByteArray s_QByteArray(s.data, s.len); - QDtlsClientVerifier::GeneratorParameters* ret = new QDtlsClientVerifier::GeneratorParameters(static_cast(a), s_QByteArray); - *outptr_QDtlsClientVerifier__GeneratorParameters = ret; + return new QDtlsClientVerifier::GeneratorParameters(static_cast(a), s_QByteArray); } -void QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters) { - QDtlsClientVerifier::GeneratorParameters* ret = new QDtlsClientVerifier::GeneratorParameters(*param1); - *outptr_QDtlsClientVerifier__GeneratorParameters = ret; +QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1) { + return new QDtlsClientVerifier::GeneratorParameters(*param1); } void QDtlsClientVerifier__GeneratorParameters_OperatorAssign(QDtlsClientVerifier__GeneratorParameters* self, QDtlsClientVerifier__GeneratorParameters* param1) { diff --git a/qt6/network/gen_qdtls.go b/qt6/network/gen_qdtls.go index 8dbbbee7..c7a591fe 100644 --- a/qt6/network/gen_qdtls.go +++ b/qt6/network/gen_qdtls.go @@ -59,42 +59,34 @@ func (this *QDtlsClientVerifier) UnsafePointer() unsafe.Pointer { } // newQDtlsClientVerifier constructs the type using only CGO pointers. -func newQDtlsClientVerifier(h *C.QDtlsClientVerifier, h_QObject *C.QObject) *QDtlsClientVerifier { +func newQDtlsClientVerifier(h *C.QDtlsClientVerifier) *QDtlsClientVerifier { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QDtlsClientVerifier_virtbase(h, &outptr_QObject) + return &QDtlsClientVerifier{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQDtlsClientVerifier constructs the type using only unsafe pointers. -func UnsafeNewQDtlsClientVerifier(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDtlsClientVerifier { - if h == nil { - return nil - } - - return &QDtlsClientVerifier{h: (*C.QDtlsClientVerifier)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQDtlsClientVerifier(h unsafe.Pointer) *QDtlsClientVerifier { + return newQDtlsClientVerifier((*C.QDtlsClientVerifier)(h)) } // NewQDtlsClientVerifier constructs a new QDtlsClientVerifier object. func NewQDtlsClientVerifier() *QDtlsClientVerifier { - var outptr_QDtlsClientVerifier *C.QDtlsClientVerifier = nil - var outptr_QObject *C.QObject = nil - C.QDtlsClientVerifier_new(&outptr_QDtlsClientVerifier, &outptr_QObject) - ret := newQDtlsClientVerifier(outptr_QDtlsClientVerifier, outptr_QObject) + ret := newQDtlsClientVerifier(C.QDtlsClientVerifier_new()) ret.isSubclass = true return ret } // NewQDtlsClientVerifier2 constructs a new QDtlsClientVerifier object. func NewQDtlsClientVerifier2(parent *qt6.QObject) *QDtlsClientVerifier { - var outptr_QDtlsClientVerifier *C.QDtlsClientVerifier = nil - var outptr_QObject *C.QObject = nil - C.QDtlsClientVerifier_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QDtlsClientVerifier, &outptr_QObject) - ret := newQDtlsClientVerifier(outptr_QDtlsClientVerifier, outptr_QObject) + ret := newQDtlsClientVerifier(C.QDtlsClientVerifier_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -253,7 +245,7 @@ func miqt_exec_callback_QDtlsClientVerifier_TimerEvent(self *C.QDtlsClientVerifi } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -279,7 +271,7 @@ func miqt_exec_callback_QDtlsClientVerifier_ChildEvent(self *C.QDtlsClientVerifi } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QDtlsClientVerifier{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -398,42 +390,34 @@ func (this *QDtls) UnsafePointer() unsafe.Pointer { } // newQDtls constructs the type using only CGO pointers. -func newQDtls(h *C.QDtls, h_QObject *C.QObject) *QDtls { +func newQDtls(h *C.QDtls) *QDtls { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QDtls_virtbase(h, &outptr_QObject) + return &QDtls{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQDtls constructs the type using only unsafe pointers. -func UnsafeNewQDtls(h unsafe.Pointer, h_QObject unsafe.Pointer) *QDtls { - if h == nil { - return nil - } - - return &QDtls{h: (*C.QDtls)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQDtls(h unsafe.Pointer) *QDtls { + return newQDtls((*C.QDtls)(h)) } // NewQDtls constructs a new QDtls object. func NewQDtls(mode QSslSocket__SslMode) *QDtls { - var outptr_QDtls *C.QDtls = nil - var outptr_QObject *C.QObject = nil - C.QDtls_new((C.int)(mode), &outptr_QDtls, &outptr_QObject) - ret := newQDtls(outptr_QDtls, outptr_QObject) + ret := newQDtls(C.QDtls_new((C.int)(mode))) ret.isSubclass = true return ret } // NewQDtls2 constructs a new QDtls object. func NewQDtls2(mode QSslSocket__SslMode, parent *qt6.QObject) *QDtls { - var outptr_QDtls *C.QDtls = nil - var outptr_QObject *C.QObject = nil - C.QDtls_new2((C.int)(mode), (*C.QObject)(parent.UnsafePointer()), &outptr_QDtls, &outptr_QObject) - ret := newQDtls(outptr_QDtls, outptr_QObject) + ret := newQDtls(C.QDtls_new2((C.int)(mode), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -758,7 +742,7 @@ func miqt_exec_callback_QDtls_TimerEvent(self *C.QDtls, cb C.intptr_t, event *C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QDtls{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -784,7 +768,7 @@ func miqt_exec_callback_QDtls_ChildEvent(self *C.QDtls, cb C.intptr_t, event *C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QDtls{h: self}).callVirtualBase_ChildEvent, slotval1) @@ -906,24 +890,19 @@ func newQDtlsClientVerifier__GeneratorParameters(h *C.QDtlsClientVerifier__Gener if h == nil { return nil } + return &QDtlsClientVerifier__GeneratorParameters{h: h} } // UnsafeNewQDtlsClientVerifier__GeneratorParameters constructs the type using only unsafe pointers. func UnsafeNewQDtlsClientVerifier__GeneratorParameters(h unsafe.Pointer) *QDtlsClientVerifier__GeneratorParameters { - if h == nil { - return nil - } - - return &QDtlsClientVerifier__GeneratorParameters{h: (*C.QDtlsClientVerifier__GeneratorParameters)(h)} + return newQDtlsClientVerifier__GeneratorParameters((*C.QDtlsClientVerifier__GeneratorParameters)(h)) } // NewQDtlsClientVerifier__GeneratorParameters constructs a new QDtlsClientVerifier::GeneratorParameters object. func NewQDtlsClientVerifier__GeneratorParameters() *QDtlsClientVerifier__GeneratorParameters { - var outptr_QDtlsClientVerifier__GeneratorParameters *C.QDtlsClientVerifier__GeneratorParameters = nil - C.QDtlsClientVerifier__GeneratorParameters_new(&outptr_QDtlsClientVerifier__GeneratorParameters) - ret := newQDtlsClientVerifier__GeneratorParameters(outptr_QDtlsClientVerifier__GeneratorParameters) + ret := newQDtlsClientVerifier__GeneratorParameters(C.QDtlsClientVerifier__GeneratorParameters_new()) ret.isSubclass = true return ret } @@ -933,20 +912,16 @@ func NewQDtlsClientVerifier__GeneratorParameters2(a qt6.QCryptographicHash__Algo s_alias := C.struct_miqt_string{} s_alias.data = (*C.char)(unsafe.Pointer(&s[0])) s_alias.len = C.size_t(len(s)) - var outptr_QDtlsClientVerifier__GeneratorParameters *C.QDtlsClientVerifier__GeneratorParameters = nil - C.QDtlsClientVerifier__GeneratorParameters_new2((C.int)(a), s_alias, &outptr_QDtlsClientVerifier__GeneratorParameters) - ret := newQDtlsClientVerifier__GeneratorParameters(outptr_QDtlsClientVerifier__GeneratorParameters) + ret := newQDtlsClientVerifier__GeneratorParameters(C.QDtlsClientVerifier__GeneratorParameters_new2((C.int)(a), s_alias)) ret.isSubclass = true return ret } // NewQDtlsClientVerifier__GeneratorParameters3 constructs a new QDtlsClientVerifier::GeneratorParameters object. func NewQDtlsClientVerifier__GeneratorParameters3(param1 *QDtlsClientVerifier__GeneratorParameters) *QDtlsClientVerifier__GeneratorParameters { - var outptr_QDtlsClientVerifier__GeneratorParameters *C.QDtlsClientVerifier__GeneratorParameters = nil - C.QDtlsClientVerifier__GeneratorParameters_new3(param1.cPointer(), &outptr_QDtlsClientVerifier__GeneratorParameters) - ret := newQDtlsClientVerifier__GeneratorParameters(outptr_QDtlsClientVerifier__GeneratorParameters) + ret := newQDtlsClientVerifier__GeneratorParameters(C.QDtlsClientVerifier__GeneratorParameters_new3(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qdtls.h b/qt6/network/gen_qdtls.h index e6449df7..458ba3ce 100644 --- a/qt6/network/gen_qdtls.h +++ b/qt6/network/gen_qdtls.h @@ -52,8 +52,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QUdpSocket QUdpSocket; #endif -void QDtlsClientVerifier_new(QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject); -void QDtlsClientVerifier_new2(QObject* parent, QDtlsClientVerifier** outptr_QDtlsClientVerifier, QObject** outptr_QObject); +QDtlsClientVerifier* QDtlsClientVerifier_new(); +QDtlsClientVerifier* QDtlsClientVerifier_new2(QObject* parent); +void QDtlsClientVerifier_virtbase(QDtlsClientVerifier* src, QObject** outptr_QObject); QMetaObject* QDtlsClientVerifier_MetaObject(const QDtlsClientVerifier* self); void* QDtlsClientVerifier_Metacast(QDtlsClientVerifier* self, const char* param1); struct miqt_string QDtlsClientVerifier_Tr(const char* s); @@ -81,8 +82,9 @@ void QDtlsClientVerifier_override_virtual_DisconnectNotify(void* self, intptr_t void QDtlsClientVerifier_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QDtlsClientVerifier_Delete(QDtlsClientVerifier* self, bool isSubclass); -void QDtls_new(int mode, QDtls** outptr_QDtls, QObject** outptr_QObject); -void QDtls_new2(int mode, QObject* parent, QDtls** outptr_QDtls, QObject** outptr_QObject); +QDtls* QDtls_new(int mode); +QDtls* QDtls_new2(int mode, QObject* parent); +void QDtls_virtbase(QDtls* src, QObject** outptr_QObject); QMetaObject* QDtls_MetaObject(const QDtls* self); void* QDtls_Metacast(QDtls* self, const char* param1); struct miqt_string QDtls_Tr(const char* s); @@ -137,9 +139,9 @@ void QDtls_override_virtual_DisconnectNotify(void* self, intptr_t slot); void QDtls_virtualbase_DisconnectNotify(void* self, QMetaMethod* signal); void QDtls_Delete(QDtls* self, bool isSubclass); -void QDtlsClientVerifier__GeneratorParameters_new(QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters); -void QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters); -void QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1, QDtlsClientVerifier__GeneratorParameters** outptr_QDtlsClientVerifier__GeneratorParameters); +QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new(); +QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new2(int a, struct miqt_string s); +QDtlsClientVerifier__GeneratorParameters* QDtlsClientVerifier__GeneratorParameters_new3(QDtlsClientVerifier__GeneratorParameters* param1); void QDtlsClientVerifier__GeneratorParameters_OperatorAssign(QDtlsClientVerifier__GeneratorParameters* self, QDtlsClientVerifier__GeneratorParameters* param1); void QDtlsClientVerifier__GeneratorParameters_Delete(QDtlsClientVerifier__GeneratorParameters* self, bool isSubclass); diff --git a/qt6/network/gen_qhostaddress.cpp b/qt6/network/gen_qhostaddress.cpp index 35f4c79c..d98ef7c8 100644 --- a/qt6/network/gen_qhostaddress.cpp +++ b/qt6/network/gen_qhostaddress.cpp @@ -21,40 +21,33 @@ void QIPv6Address_Delete(QIPv6Address* self, bool isSubclass) { } } -void QHostAddress_new(QHostAddress** outptr_QHostAddress) { - QHostAddress* ret = new QHostAddress(); - *outptr_QHostAddress = ret; +QHostAddress* QHostAddress_new() { + return new QHostAddress(); } -void QHostAddress_new2(unsigned int ip4Addr, QHostAddress** outptr_QHostAddress) { - QHostAddress* ret = new QHostAddress(static_cast(ip4Addr)); - *outptr_QHostAddress = ret; +QHostAddress* QHostAddress_new2(unsigned int ip4Addr) { + return new QHostAddress(static_cast(ip4Addr)); } -void QHostAddress_new3(const unsigned char* ip6Addr, QHostAddress** outptr_QHostAddress) { - QHostAddress* ret = new QHostAddress(static_cast(ip6Addr)); - *outptr_QHostAddress = ret; +QHostAddress* QHostAddress_new3(const unsigned char* ip6Addr) { + return new QHostAddress(static_cast(ip6Addr)); } -void QHostAddress_new4(QIPv6Address* ip6Addr, QHostAddress** outptr_QHostAddress) { - QHostAddress* ret = new QHostAddress(*ip6Addr); - *outptr_QHostAddress = ret; +QHostAddress* QHostAddress_new4(QIPv6Address* ip6Addr) { + return new QHostAddress(*ip6Addr); } -void QHostAddress_new5(struct miqt_string address, QHostAddress** outptr_QHostAddress) { +QHostAddress* QHostAddress_new5(struct miqt_string address) { QString address_QString = QString::fromUtf8(address.data, address.len); - QHostAddress* ret = new QHostAddress(address_QString); - *outptr_QHostAddress = ret; + return new QHostAddress(address_QString); } -void QHostAddress_new6(QHostAddress* copyVal, QHostAddress** outptr_QHostAddress) { - QHostAddress* ret = new QHostAddress(*copyVal); - *outptr_QHostAddress = ret; +QHostAddress* QHostAddress_new6(QHostAddress* copyVal) { + return new QHostAddress(*copyVal); } -void QHostAddress_new7(int address, QHostAddress** outptr_QHostAddress) { - QHostAddress* ret = new QHostAddress(static_cast(address)); - *outptr_QHostAddress = ret; +QHostAddress* QHostAddress_new7(int address) { + return new QHostAddress(static_cast(address)); } void QHostAddress_OperatorAssign(QHostAddress* self, QHostAddress* other) { diff --git a/qt6/network/gen_qhostaddress.go b/qt6/network/gen_qhostaddress.go index 81fa48b9..1e2982d1 100644 --- a/qt6/network/gen_qhostaddress.go +++ b/qt6/network/gen_qhostaddress.go @@ -60,16 +60,13 @@ func newQIPv6Address(h *C.QIPv6Address) *QIPv6Address { if h == nil { return nil } + return &QIPv6Address{h: h} } // UnsafeNewQIPv6Address constructs the type using only unsafe pointers. func UnsafeNewQIPv6Address(h unsafe.Pointer) *QIPv6Address { - if h == nil { - return nil - } - - return &QIPv6Address{h: (*C.QIPv6Address)(h)} + return newQIPv6Address((*C.QIPv6Address)(h)) } func (this *QIPv6Address) OperatorSubscript(index int) byte { @@ -114,54 +111,43 @@ func newQHostAddress(h *C.QHostAddress) *QHostAddress { if h == nil { return nil } + return &QHostAddress{h: h} } // UnsafeNewQHostAddress constructs the type using only unsafe pointers. func UnsafeNewQHostAddress(h unsafe.Pointer) *QHostAddress { - if h == nil { - return nil - } - - return &QHostAddress{h: (*C.QHostAddress)(h)} + return newQHostAddress((*C.QHostAddress)(h)) } // NewQHostAddress constructs a new QHostAddress object. func NewQHostAddress() *QHostAddress { - var outptr_QHostAddress *C.QHostAddress = nil - C.QHostAddress_new(&outptr_QHostAddress) - ret := newQHostAddress(outptr_QHostAddress) + ret := newQHostAddress(C.QHostAddress_new()) ret.isSubclass = true return ret } // NewQHostAddress2 constructs a new QHostAddress object. func NewQHostAddress2(ip4Addr uint) *QHostAddress { - var outptr_QHostAddress *C.QHostAddress = nil - C.QHostAddress_new2((C.uint)(ip4Addr), &outptr_QHostAddress) - ret := newQHostAddress(outptr_QHostAddress) + ret := newQHostAddress(C.QHostAddress_new2((C.uint)(ip4Addr))) ret.isSubclass = true return ret } // NewQHostAddress3 constructs a new QHostAddress object. func NewQHostAddress3(ip6Addr *byte) *QHostAddress { - var outptr_QHostAddress *C.QHostAddress = nil - C.QHostAddress_new3((*C.uchar)(unsafe.Pointer(ip6Addr)), &outptr_QHostAddress) - ret := newQHostAddress(outptr_QHostAddress) + ret := newQHostAddress(C.QHostAddress_new3((*C.uchar)(unsafe.Pointer(ip6Addr)))) ret.isSubclass = true return ret } // NewQHostAddress4 constructs a new QHostAddress object. func NewQHostAddress4(ip6Addr *QIPv6Address) *QHostAddress { - var outptr_QHostAddress *C.QHostAddress = nil - C.QHostAddress_new4(ip6Addr.cPointer(), &outptr_QHostAddress) - ret := newQHostAddress(outptr_QHostAddress) + ret := newQHostAddress(C.QHostAddress_new4(ip6Addr.cPointer())) ret.isSubclass = true return ret } @@ -172,30 +158,24 @@ func NewQHostAddress5(address string) *QHostAddress { address_ms.data = C.CString(address) address_ms.len = C.size_t(len(address)) defer C.free(unsafe.Pointer(address_ms.data)) - var outptr_QHostAddress *C.QHostAddress = nil - C.QHostAddress_new5(address_ms, &outptr_QHostAddress) - ret := newQHostAddress(outptr_QHostAddress) + ret := newQHostAddress(C.QHostAddress_new5(address_ms)) ret.isSubclass = true return ret } // NewQHostAddress6 constructs a new QHostAddress object. func NewQHostAddress6(copyVal *QHostAddress) *QHostAddress { - var outptr_QHostAddress *C.QHostAddress = nil - C.QHostAddress_new6(copyVal.cPointer(), &outptr_QHostAddress) - ret := newQHostAddress(outptr_QHostAddress) + ret := newQHostAddress(C.QHostAddress_new6(copyVal.cPointer())) ret.isSubclass = true return ret } // NewQHostAddress7 constructs a new QHostAddress object. func NewQHostAddress7(address QHostAddress__SpecialAddress) *QHostAddress { - var outptr_QHostAddress *C.QHostAddress = nil - C.QHostAddress_new7((C.int)(address), &outptr_QHostAddress) - ret := newQHostAddress(outptr_QHostAddress) + ret := newQHostAddress(C.QHostAddress_new7((C.int)(address))) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qhostaddress.h b/qt6/network/gen_qhostaddress.h index 6b7ca130..733f3423 100644 --- a/qt6/network/gen_qhostaddress.h +++ b/qt6/network/gen_qhostaddress.h @@ -25,13 +25,13 @@ typedef struct QIPv6Address QIPv6Address; unsigned char QIPv6Address_OperatorSubscript(const QIPv6Address* self, int index); void QIPv6Address_Delete(QIPv6Address* self, bool isSubclass); -void QHostAddress_new(QHostAddress** outptr_QHostAddress); -void QHostAddress_new2(unsigned int ip4Addr, QHostAddress** outptr_QHostAddress); -void QHostAddress_new3(const unsigned char* ip6Addr, QHostAddress** outptr_QHostAddress); -void QHostAddress_new4(QIPv6Address* ip6Addr, QHostAddress** outptr_QHostAddress); -void QHostAddress_new5(struct miqt_string address, QHostAddress** outptr_QHostAddress); -void QHostAddress_new6(QHostAddress* copyVal, QHostAddress** outptr_QHostAddress); -void QHostAddress_new7(int address, QHostAddress** outptr_QHostAddress); +QHostAddress* QHostAddress_new(); +QHostAddress* QHostAddress_new2(unsigned int ip4Addr); +QHostAddress* QHostAddress_new3(const unsigned char* ip6Addr); +QHostAddress* QHostAddress_new4(QIPv6Address* ip6Addr); +QHostAddress* QHostAddress_new5(struct miqt_string address); +QHostAddress* QHostAddress_new6(QHostAddress* copyVal); +QHostAddress* QHostAddress_new7(int address); void QHostAddress_OperatorAssign(QHostAddress* self, QHostAddress* other); void QHostAddress_OperatorAssignWithAddress(QHostAddress* self, int address); void QHostAddress_Swap(QHostAddress* self, QHostAddress* other); diff --git a/qt6/network/gen_qhostinfo.cpp b/qt6/network/gen_qhostinfo.cpp index b614b348..51ec99bc 100644 --- a/qt6/network/gen_qhostinfo.cpp +++ b/qt6/network/gen_qhostinfo.cpp @@ -8,19 +8,16 @@ #include "gen_qhostinfo.h" #include "_cgo_export.h" -void QHostInfo_new(QHostInfo** outptr_QHostInfo) { - QHostInfo* ret = new QHostInfo(); - *outptr_QHostInfo = ret; +QHostInfo* QHostInfo_new() { + return new QHostInfo(); } -void QHostInfo_new2(QHostInfo* d, QHostInfo** outptr_QHostInfo) { - QHostInfo* ret = new QHostInfo(*d); - *outptr_QHostInfo = ret; +QHostInfo* QHostInfo_new2(QHostInfo* d) { + return new QHostInfo(*d); } -void QHostInfo_new3(int lookupId, QHostInfo** outptr_QHostInfo) { - QHostInfo* ret = new QHostInfo(static_cast(lookupId)); - *outptr_QHostInfo = ret; +QHostInfo* QHostInfo_new3(int lookupId) { + return new QHostInfo(static_cast(lookupId)); } void QHostInfo_OperatorAssign(QHostInfo* self, QHostInfo* d) { diff --git a/qt6/network/gen_qhostinfo.go b/qt6/network/gen_qhostinfo.go index 9d45d119..bc2392e1 100644 --- a/qt6/network/gen_qhostinfo.go +++ b/qt6/network/gen_qhostinfo.go @@ -45,44 +45,35 @@ func newQHostInfo(h *C.QHostInfo) *QHostInfo { if h == nil { return nil } + return &QHostInfo{h: h} } // UnsafeNewQHostInfo constructs the type using only unsafe pointers. func UnsafeNewQHostInfo(h unsafe.Pointer) *QHostInfo { - if h == nil { - return nil - } - - return &QHostInfo{h: (*C.QHostInfo)(h)} + return newQHostInfo((*C.QHostInfo)(h)) } // NewQHostInfo constructs a new QHostInfo object. func NewQHostInfo() *QHostInfo { - var outptr_QHostInfo *C.QHostInfo = nil - C.QHostInfo_new(&outptr_QHostInfo) - ret := newQHostInfo(outptr_QHostInfo) + ret := newQHostInfo(C.QHostInfo_new()) ret.isSubclass = true return ret } // NewQHostInfo2 constructs a new QHostInfo object. func NewQHostInfo2(d *QHostInfo) *QHostInfo { - var outptr_QHostInfo *C.QHostInfo = nil - C.QHostInfo_new2(d.cPointer(), &outptr_QHostInfo) - ret := newQHostInfo(outptr_QHostInfo) + ret := newQHostInfo(C.QHostInfo_new2(d.cPointer())) ret.isSubclass = true return ret } // NewQHostInfo3 constructs a new QHostInfo object. func NewQHostInfo3(lookupId int) *QHostInfo { - var outptr_QHostInfo *C.QHostInfo = nil - C.QHostInfo_new3((C.int)(lookupId), &outptr_QHostInfo) - ret := newQHostInfo(outptr_QHostInfo) + ret := newQHostInfo(C.QHostInfo_new3((C.int)(lookupId))) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qhostinfo.h b/qt6/network/gen_qhostinfo.h index 409c71ec..2606431a 100644 --- a/qt6/network/gen_qhostinfo.h +++ b/qt6/network/gen_qhostinfo.h @@ -22,9 +22,9 @@ typedef struct QHostAddress QHostAddress; typedef struct QHostInfo QHostInfo; #endif -void QHostInfo_new(QHostInfo** outptr_QHostInfo); -void QHostInfo_new2(QHostInfo* d, QHostInfo** outptr_QHostInfo); -void QHostInfo_new3(int lookupId, QHostInfo** outptr_QHostInfo); +QHostInfo* QHostInfo_new(); +QHostInfo* QHostInfo_new2(QHostInfo* d); +QHostInfo* QHostInfo_new3(int lookupId); void QHostInfo_OperatorAssign(QHostInfo* self, QHostInfo* d); void QHostInfo_Swap(QHostInfo* self, QHostInfo* other); struct miqt_string QHostInfo_HostName(const QHostInfo* self); diff --git a/qt6/network/gen_qhstspolicy.cpp b/qt6/network/gen_qhstspolicy.cpp index f82b93ea..032554b8 100644 --- a/qt6/network/gen_qhstspolicy.cpp +++ b/qt6/network/gen_qhstspolicy.cpp @@ -7,26 +7,22 @@ #include "gen_qhstspolicy.h" #include "_cgo_export.h" -void QHstsPolicy_new(QHstsPolicy** outptr_QHstsPolicy) { - QHstsPolicy* ret = new QHstsPolicy(); - *outptr_QHstsPolicy = ret; +QHstsPolicy* QHstsPolicy_new() { + return new QHstsPolicy(); } -void QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host, QHstsPolicy** outptr_QHstsPolicy) { +QHstsPolicy* QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host) { QString host_QString = QString::fromUtf8(host.data, host.len); - QHstsPolicy* ret = new QHstsPolicy(*expiry, static_cast(flags), host_QString); - *outptr_QHstsPolicy = ret; + return new QHstsPolicy(*expiry, static_cast(flags), host_QString); } -void QHstsPolicy_new3(QHstsPolicy* rhs, QHstsPolicy** outptr_QHstsPolicy) { - QHstsPolicy* ret = new QHstsPolicy(*rhs); - *outptr_QHstsPolicy = ret; +QHstsPolicy* QHstsPolicy_new3(QHstsPolicy* rhs) { + return new QHstsPolicy(*rhs); } -void QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode, QHstsPolicy** outptr_QHstsPolicy) { +QHstsPolicy* QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode) { QString host_QString = QString::fromUtf8(host.data, host.len); - QHstsPolicy* ret = new QHstsPolicy(*expiry, static_cast(flags), host_QString, static_cast(mode)); - *outptr_QHstsPolicy = ret; + return new QHstsPolicy(*expiry, static_cast(flags), host_QString, static_cast(mode)); } void QHstsPolicy_OperatorAssign(QHstsPolicy* self, QHstsPolicy* rhs) { diff --git a/qt6/network/gen_qhstspolicy.go b/qt6/network/gen_qhstspolicy.go index 341457a7..57f26c36 100644 --- a/qt6/network/gen_qhstspolicy.go +++ b/qt6/network/gen_qhstspolicy.go @@ -44,24 +44,19 @@ func newQHstsPolicy(h *C.QHstsPolicy) *QHstsPolicy { if h == nil { return nil } + return &QHstsPolicy{h: h} } // UnsafeNewQHstsPolicy constructs the type using only unsafe pointers. func UnsafeNewQHstsPolicy(h unsafe.Pointer) *QHstsPolicy { - if h == nil { - return nil - } - - return &QHstsPolicy{h: (*C.QHstsPolicy)(h)} + return newQHstsPolicy((*C.QHstsPolicy)(h)) } // NewQHstsPolicy constructs a new QHstsPolicy object. func NewQHstsPolicy() *QHstsPolicy { - var outptr_QHstsPolicy *C.QHstsPolicy = nil - C.QHstsPolicy_new(&outptr_QHstsPolicy) - ret := newQHstsPolicy(outptr_QHstsPolicy) + ret := newQHstsPolicy(C.QHstsPolicy_new()) ret.isSubclass = true return ret } @@ -72,20 +67,16 @@ func NewQHstsPolicy2(expiry *qt6.QDateTime, flags QHstsPolicy__PolicyFlag, host host_ms.data = C.CString(host) host_ms.len = C.size_t(len(host)) defer C.free(unsafe.Pointer(host_ms.data)) - var outptr_QHstsPolicy *C.QHstsPolicy = nil - C.QHstsPolicy_new2((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms, &outptr_QHstsPolicy) - ret := newQHstsPolicy(outptr_QHstsPolicy) + ret := newQHstsPolicy(C.QHstsPolicy_new2((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms)) ret.isSubclass = true return ret } // NewQHstsPolicy3 constructs a new QHstsPolicy object. func NewQHstsPolicy3(rhs *QHstsPolicy) *QHstsPolicy { - var outptr_QHstsPolicy *C.QHstsPolicy = nil - C.QHstsPolicy_new3(rhs.cPointer(), &outptr_QHstsPolicy) - ret := newQHstsPolicy(outptr_QHstsPolicy) + ret := newQHstsPolicy(C.QHstsPolicy_new3(rhs.cPointer())) ret.isSubclass = true return ret } @@ -96,10 +87,8 @@ func NewQHstsPolicy4(expiry *qt6.QDateTime, flags QHstsPolicy__PolicyFlag, host host_ms.data = C.CString(host) host_ms.len = C.size_t(len(host)) defer C.free(unsafe.Pointer(host_ms.data)) - var outptr_QHstsPolicy *C.QHstsPolicy = nil - C.QHstsPolicy_new4((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms, (C.int)(mode), &outptr_QHstsPolicy) - ret := newQHstsPolicy(outptr_QHstsPolicy) + ret := newQHstsPolicy(C.QHstsPolicy_new4((*C.QDateTime)(expiry.UnsafePointer()), (C.int)(flags), host_ms, (C.int)(mode))) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qhstspolicy.h b/qt6/network/gen_qhstspolicy.h index 5752315e..f07be602 100644 --- a/qt6/network/gen_qhstspolicy.h +++ b/qt6/network/gen_qhstspolicy.h @@ -22,10 +22,10 @@ typedef struct QDateTime QDateTime; typedef struct QHstsPolicy QHstsPolicy; #endif -void QHstsPolicy_new(QHstsPolicy** outptr_QHstsPolicy); -void QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host, QHstsPolicy** outptr_QHstsPolicy); -void QHstsPolicy_new3(QHstsPolicy* rhs, QHstsPolicy** outptr_QHstsPolicy); -void QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode, QHstsPolicy** outptr_QHstsPolicy); +QHstsPolicy* QHstsPolicy_new(); +QHstsPolicy* QHstsPolicy_new2(QDateTime* expiry, int flags, struct miqt_string host); +QHstsPolicy* QHstsPolicy_new3(QHstsPolicy* rhs); +QHstsPolicy* QHstsPolicy_new4(QDateTime* expiry, int flags, struct miqt_string host, int mode); void QHstsPolicy_OperatorAssign(QHstsPolicy* self, QHstsPolicy* rhs); void QHstsPolicy_Swap(QHstsPolicy* self, QHstsPolicy* other); void QHstsPolicy_SetHost(QHstsPolicy* self, struct miqt_string host); diff --git a/qt6/network/gen_qhttp2configuration.cpp b/qt6/network/gen_qhttp2configuration.cpp index f5f34f85..bced8792 100644 --- a/qt6/network/gen_qhttp2configuration.cpp +++ b/qt6/network/gen_qhttp2configuration.cpp @@ -3,14 +3,12 @@ #include "gen_qhttp2configuration.h" #include "_cgo_export.h" -void QHttp2Configuration_new(QHttp2Configuration** outptr_QHttp2Configuration) { - QHttp2Configuration* ret = new QHttp2Configuration(); - *outptr_QHttp2Configuration = ret; +QHttp2Configuration* QHttp2Configuration_new() { + return new QHttp2Configuration(); } -void QHttp2Configuration_new2(QHttp2Configuration* other, QHttp2Configuration** outptr_QHttp2Configuration) { - QHttp2Configuration* ret = new QHttp2Configuration(*other); - *outptr_QHttp2Configuration = ret; +QHttp2Configuration* QHttp2Configuration_new2(QHttp2Configuration* other) { + return new QHttp2Configuration(*other); } void QHttp2Configuration_OperatorAssign(QHttp2Configuration* self, QHttp2Configuration* other) { diff --git a/qt6/network/gen_qhttp2configuration.go b/qt6/network/gen_qhttp2configuration.go index 6610f15d..7bda510f 100644 --- a/qt6/network/gen_qhttp2configuration.go +++ b/qt6/network/gen_qhttp2configuration.go @@ -37,34 +37,27 @@ func newQHttp2Configuration(h *C.QHttp2Configuration) *QHttp2Configuration { if h == nil { return nil } + return &QHttp2Configuration{h: h} } // UnsafeNewQHttp2Configuration constructs the type using only unsafe pointers. func UnsafeNewQHttp2Configuration(h unsafe.Pointer) *QHttp2Configuration { - if h == nil { - return nil - } - - return &QHttp2Configuration{h: (*C.QHttp2Configuration)(h)} + return newQHttp2Configuration((*C.QHttp2Configuration)(h)) } // NewQHttp2Configuration constructs a new QHttp2Configuration object. func NewQHttp2Configuration() *QHttp2Configuration { - var outptr_QHttp2Configuration *C.QHttp2Configuration = nil - C.QHttp2Configuration_new(&outptr_QHttp2Configuration) - ret := newQHttp2Configuration(outptr_QHttp2Configuration) + ret := newQHttp2Configuration(C.QHttp2Configuration_new()) ret.isSubclass = true return ret } // NewQHttp2Configuration2 constructs a new QHttp2Configuration object. func NewQHttp2Configuration2(other *QHttp2Configuration) *QHttp2Configuration { - var outptr_QHttp2Configuration *C.QHttp2Configuration = nil - C.QHttp2Configuration_new2(other.cPointer(), &outptr_QHttp2Configuration) - ret := newQHttp2Configuration(outptr_QHttp2Configuration) + ret := newQHttp2Configuration(C.QHttp2Configuration_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qhttp2configuration.h b/qt6/network/gen_qhttp2configuration.h index 4dc031ce..f4690761 100644 --- a/qt6/network/gen_qhttp2configuration.h +++ b/qt6/network/gen_qhttp2configuration.h @@ -20,8 +20,8 @@ class QHttp2Configuration; typedef struct QHttp2Configuration QHttp2Configuration; #endif -void QHttp2Configuration_new(QHttp2Configuration** outptr_QHttp2Configuration); -void QHttp2Configuration_new2(QHttp2Configuration* other, QHttp2Configuration** outptr_QHttp2Configuration); +QHttp2Configuration* QHttp2Configuration_new(); +QHttp2Configuration* QHttp2Configuration_new2(QHttp2Configuration* other); void QHttp2Configuration_OperatorAssign(QHttp2Configuration* self, QHttp2Configuration* other); void QHttp2Configuration_SetServerPushEnabled(QHttp2Configuration* self, bool enable); bool QHttp2Configuration_ServerPushEnabled(const QHttp2Configuration* self); diff --git a/qt6/network/gen_qhttpmultipart.cpp b/qt6/network/gen_qhttpmultipart.cpp index 4eb4a68b..4b03052f 100644 --- a/qt6/network/gen_qhttpmultipart.cpp +++ b/qt6/network/gen_qhttpmultipart.cpp @@ -16,14 +16,12 @@ #include "gen_qhttpmultipart.h" #include "_cgo_export.h" -void QHttpPart_new(QHttpPart** outptr_QHttpPart) { - QHttpPart* ret = new QHttpPart(); - *outptr_QHttpPart = ret; +QHttpPart* QHttpPart_new() { + return new QHttpPart(); } -void QHttpPart_new2(QHttpPart* other, QHttpPart** outptr_QHttpPart) { - QHttpPart* ret = new QHttpPart(*other); - *outptr_QHttpPart = ret; +QHttpPart* QHttpPart_new2(QHttpPart* other) { + return new QHttpPart(*other); } void QHttpPart_OperatorAssign(QHttpPart* self, QHttpPart* other) { @@ -252,28 +250,24 @@ public: }; -void QHttpMultiPart_new(QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { - MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(); - *outptr_QHttpMultiPart = ret; - *outptr_QObject = static_cast(ret); +QHttpMultiPart* QHttpMultiPart_new() { + return new MiqtVirtualQHttpMultiPart(); } -void QHttpMultiPart_new2(int contentType, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { - MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(static_cast(contentType)); - *outptr_QHttpMultiPart = ret; - *outptr_QObject = static_cast(ret); +QHttpMultiPart* QHttpMultiPart_new2(int contentType) { + return new MiqtVirtualQHttpMultiPart(static_cast(contentType)); } -void QHttpMultiPart_new3(QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { - MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(parent); - *outptr_QHttpMultiPart = ret; - *outptr_QObject = static_cast(ret); +QHttpMultiPart* QHttpMultiPart_new3(QObject* parent) { + return new MiqtVirtualQHttpMultiPart(parent); } -void QHttpMultiPart_new4(int contentType, QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject) { - MiqtVirtualQHttpMultiPart* ret = new MiqtVirtualQHttpMultiPart(static_cast(contentType), parent); - *outptr_QHttpMultiPart = ret; - *outptr_QObject = static_cast(ret); +QHttpMultiPart* QHttpMultiPart_new4(int contentType, QObject* parent) { + return new MiqtVirtualQHttpMultiPart(static_cast(contentType), parent); +} + +void QHttpMultiPart_virtbase(QHttpMultiPart* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QHttpMultiPart_MetaObject(const QHttpMultiPart* self) { diff --git a/qt6/network/gen_qhttpmultipart.go b/qt6/network/gen_qhttpmultipart.go index 78000581..cabbd764 100644 --- a/qt6/network/gen_qhttpmultipart.go +++ b/qt6/network/gen_qhttpmultipart.go @@ -48,34 +48,27 @@ func newQHttpPart(h *C.QHttpPart) *QHttpPart { if h == nil { return nil } + return &QHttpPart{h: h} } // UnsafeNewQHttpPart constructs the type using only unsafe pointers. func UnsafeNewQHttpPart(h unsafe.Pointer) *QHttpPart { - if h == nil { - return nil - } - - return &QHttpPart{h: (*C.QHttpPart)(h)} + return newQHttpPart((*C.QHttpPart)(h)) } // NewQHttpPart constructs a new QHttpPart object. func NewQHttpPart() *QHttpPart { - var outptr_QHttpPart *C.QHttpPart = nil - C.QHttpPart_new(&outptr_QHttpPart) - ret := newQHttpPart(outptr_QHttpPart) + ret := newQHttpPart(C.QHttpPart_new()) ret.isSubclass = true return ret } // NewQHttpPart2 constructs a new QHttpPart object. func NewQHttpPart2(other *QHttpPart) *QHttpPart { - var outptr_QHttpPart *C.QHttpPart = nil - C.QHttpPart_new2(other.cPointer(), &outptr_QHttpPart) - ret := newQHttpPart(outptr_QHttpPart) + ret := newQHttpPart(C.QHttpPart_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -156,64 +149,50 @@ func (this *QHttpMultiPart) UnsafePointer() unsafe.Pointer { } // newQHttpMultiPart constructs the type using only CGO pointers. -func newQHttpMultiPart(h *C.QHttpMultiPart, h_QObject *C.QObject) *QHttpMultiPart { +func newQHttpMultiPart(h *C.QHttpMultiPart) *QHttpMultiPart { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QHttpMultiPart_virtbase(h, &outptr_QObject) + return &QHttpMultiPart{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQHttpMultiPart constructs the type using only unsafe pointers. -func UnsafeNewQHttpMultiPart(h unsafe.Pointer, h_QObject unsafe.Pointer) *QHttpMultiPart { - if h == nil { - return nil - } - - return &QHttpMultiPart{h: (*C.QHttpMultiPart)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQHttpMultiPart(h unsafe.Pointer) *QHttpMultiPart { + return newQHttpMultiPart((*C.QHttpMultiPart)(h)) } // NewQHttpMultiPart constructs a new QHttpMultiPart object. func NewQHttpMultiPart() *QHttpMultiPart { - var outptr_QHttpMultiPart *C.QHttpMultiPart = nil - var outptr_QObject *C.QObject = nil - C.QHttpMultiPart_new(&outptr_QHttpMultiPart, &outptr_QObject) - ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret := newQHttpMultiPart(C.QHttpMultiPart_new()) ret.isSubclass = true return ret } // NewQHttpMultiPart2 constructs a new QHttpMultiPart object. func NewQHttpMultiPart2(contentType QHttpMultiPart__ContentType) *QHttpMultiPart { - var outptr_QHttpMultiPart *C.QHttpMultiPart = nil - var outptr_QObject *C.QObject = nil - C.QHttpMultiPart_new2((C.int)(contentType), &outptr_QHttpMultiPart, &outptr_QObject) - ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret := newQHttpMultiPart(C.QHttpMultiPart_new2((C.int)(contentType))) ret.isSubclass = true return ret } // NewQHttpMultiPart3 constructs a new QHttpMultiPart object. func NewQHttpMultiPart3(parent *qt6.QObject) *QHttpMultiPart { - var outptr_QHttpMultiPart *C.QHttpMultiPart = nil - var outptr_QObject *C.QObject = nil - C.QHttpMultiPart_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QHttpMultiPart, &outptr_QObject) - ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret := newQHttpMultiPart(C.QHttpMultiPart_new3((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQHttpMultiPart4 constructs a new QHttpMultiPart object. func NewQHttpMultiPart4(contentType QHttpMultiPart__ContentType, parent *qt6.QObject) *QHttpMultiPart { - var outptr_QHttpMultiPart *C.QHttpMultiPart = nil - var outptr_QObject *C.QObject = nil - C.QHttpMultiPart_new4((C.int)(contentType), (*C.QObject)(parent.UnsafePointer()), &outptr_QHttpMultiPart, &outptr_QObject) - ret := newQHttpMultiPart(outptr_QHttpMultiPart, outptr_QObject) + ret := newQHttpMultiPart(C.QHttpMultiPart_new4((C.int)(contentType), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -359,7 +338,7 @@ func miqt_exec_callback_QHttpMultiPart_TimerEvent(self *C.QHttpMultiPart, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QHttpMultiPart{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -385,7 +364,7 @@ func miqt_exec_callback_QHttpMultiPart_ChildEvent(self *C.QHttpMultiPart, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QHttpMultiPart{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/network/gen_qhttpmultipart.h b/qt6/network/gen_qhttpmultipart.h index 64166847..9edbde9e 100644 --- a/qt6/network/gen_qhttpmultipart.h +++ b/qt6/network/gen_qhttpmultipart.h @@ -38,8 +38,8 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVariant QVariant; #endif -void QHttpPart_new(QHttpPart** outptr_QHttpPart); -void QHttpPart_new2(QHttpPart* other, QHttpPart** outptr_QHttpPart); +QHttpPart* QHttpPart_new(); +QHttpPart* QHttpPart_new2(QHttpPart* other); void QHttpPart_OperatorAssign(QHttpPart* self, QHttpPart* other); void QHttpPart_Swap(QHttpPart* self, QHttpPart* other); bool QHttpPart_OperatorEqual(const QHttpPart* self, QHttpPart* other); @@ -50,10 +50,11 @@ void QHttpPart_SetBody(QHttpPart* self, struct miqt_string body); void QHttpPart_SetBodyDevice(QHttpPart* self, QIODevice* device); void QHttpPart_Delete(QHttpPart* self, bool isSubclass); -void QHttpMultiPart_new(QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); -void QHttpMultiPart_new2(int contentType, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); -void QHttpMultiPart_new3(QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); -void QHttpMultiPart_new4(int contentType, QObject* parent, QHttpMultiPart** outptr_QHttpMultiPart, QObject** outptr_QObject); +QHttpMultiPart* QHttpMultiPart_new(); +QHttpMultiPart* QHttpMultiPart_new2(int contentType); +QHttpMultiPart* QHttpMultiPart_new3(QObject* parent); +QHttpMultiPart* QHttpMultiPart_new4(int contentType, QObject* parent); +void QHttpMultiPart_virtbase(QHttpMultiPart* src, QObject** outptr_QObject); QMetaObject* QHttpMultiPart_MetaObject(const QHttpMultiPart* self); void* QHttpMultiPart_Metacast(QHttpMultiPart* self, const char* param1); struct miqt_string QHttpMultiPart_Tr(const char* s); diff --git a/qt6/network/gen_qlocalserver.cpp b/qt6/network/gen_qlocalserver.cpp index 00d75586..769d9488 100644 --- a/qt6/network/gen_qlocalserver.cpp +++ b/qt6/network/gen_qlocalserver.cpp @@ -263,16 +263,16 @@ public: }; -void QLocalServer_new(QLocalServer** outptr_QLocalServer, QObject** outptr_QObject) { - MiqtVirtualQLocalServer* ret = new MiqtVirtualQLocalServer(); - *outptr_QLocalServer = ret; - *outptr_QObject = static_cast(ret); +QLocalServer* QLocalServer_new() { + return new MiqtVirtualQLocalServer(); } -void QLocalServer_new2(QObject* parent, QLocalServer** outptr_QLocalServer, QObject** outptr_QObject) { - MiqtVirtualQLocalServer* ret = new MiqtVirtualQLocalServer(parent); - *outptr_QLocalServer = ret; - *outptr_QObject = static_cast(ret); +QLocalServer* QLocalServer_new2(QObject* parent) { + return new MiqtVirtualQLocalServer(parent); +} + +void QLocalServer_virtbase(QLocalServer* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QLocalServer_MetaObject(const QLocalServer* self) { diff --git a/qt6/network/gen_qlocalserver.go b/qt6/network/gen_qlocalserver.go index 7222bf6a..78264f9e 100644 --- a/qt6/network/gen_qlocalserver.go +++ b/qt6/network/gen_qlocalserver.go @@ -47,42 +47,34 @@ func (this *QLocalServer) UnsafePointer() unsafe.Pointer { } // newQLocalServer constructs the type using only CGO pointers. -func newQLocalServer(h *C.QLocalServer, h_QObject *C.QObject) *QLocalServer { +func newQLocalServer(h *C.QLocalServer) *QLocalServer { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QLocalServer_virtbase(h, &outptr_QObject) + return &QLocalServer{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQLocalServer constructs the type using only unsafe pointers. -func UnsafeNewQLocalServer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QLocalServer { - if h == nil { - return nil - } - - return &QLocalServer{h: (*C.QLocalServer)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQLocalServer(h unsafe.Pointer) *QLocalServer { + return newQLocalServer((*C.QLocalServer)(h)) } // NewQLocalServer constructs a new QLocalServer object. func NewQLocalServer() *QLocalServer { - var outptr_QLocalServer *C.QLocalServer = nil - var outptr_QObject *C.QObject = nil - C.QLocalServer_new(&outptr_QLocalServer, &outptr_QObject) - ret := newQLocalServer(outptr_QLocalServer, outptr_QObject) + ret := newQLocalServer(C.QLocalServer_new()) ret.isSubclass = true return ret } // NewQLocalServer2 constructs a new QLocalServer object. func NewQLocalServer2(parent *qt6.QObject) *QLocalServer { - var outptr_QLocalServer *C.QLocalServer = nil - var outptr_QObject *C.QObject = nil - C.QLocalServer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QLocalServer, &outptr_QObject) - ret := newQLocalServer(outptr_QLocalServer, outptr_QObject) + ret := newQLocalServer(C.QLocalServer_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -159,7 +151,7 @@ func (this *QLocalServer) MaxPendingConnections() int { } func (this *QLocalServer) NextPendingConnection() *QLocalSocket { - return newQLocalSocket(C.QLocalServer_NextPendingConnection(this.h), nil, nil, nil) + return newQLocalSocket(C.QLocalServer_NextPendingConnection(this.h)) } func (this *QLocalServer) ServerName() string { @@ -273,7 +265,7 @@ func miqt_exec_callback_QLocalServer_HasPendingConnections(self *C.QLocalServer, func (this *QLocalServer) callVirtualBase_NextPendingConnection() *QLocalSocket { - return newQLocalSocket(C.QLocalServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h)), nil, nil, nil) + return newQLocalSocket(C.QLocalServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h))) } func (this *QLocalServer) OnNextPendingConnection(slot func(super func() *QLocalSocket) *QLocalSocket) { @@ -400,7 +392,7 @@ func miqt_exec_callback_QLocalServer_TimerEvent(self *C.QLocalServer, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QLocalServer{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -426,7 +418,7 @@ func miqt_exec_callback_QLocalServer_ChildEvent(self *C.QLocalServer, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QLocalServer{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/network/gen_qlocalserver.h b/qt6/network/gen_qlocalserver.h index 11ecb2a0..dc25bda1 100644 --- a/qt6/network/gen_qlocalserver.h +++ b/qt6/network/gen_qlocalserver.h @@ -34,8 +34,9 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QLocalServer_new(QLocalServer** outptr_QLocalServer, QObject** outptr_QObject); -void QLocalServer_new2(QObject* parent, QLocalServer** outptr_QLocalServer, QObject** outptr_QObject); +QLocalServer* QLocalServer_new(); +QLocalServer* QLocalServer_new2(QObject* parent); +void QLocalServer_virtbase(QLocalServer* src, QObject** outptr_QObject); QMetaObject* QLocalServer_MetaObject(const QLocalServer* self); void* QLocalServer_Metacast(QLocalServer* self, const char* param1); struct miqt_string QLocalServer_Tr(const char* s); diff --git a/qt6/network/gen_qlocalsocket.cpp b/qt6/network/gen_qlocalsocket.cpp index 53aa5cd0..bbe855a9 100644 --- a/qt6/network/gen_qlocalsocket.cpp +++ b/qt6/network/gen_qlocalsocket.cpp @@ -420,20 +420,16 @@ public: }; -void QLocalSocket_new(QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQLocalSocket* ret = new MiqtVirtualQLocalSocket(); - *outptr_QLocalSocket = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QLocalSocket* QLocalSocket_new() { + return new MiqtVirtualQLocalSocket(); } -void QLocalSocket_new2(QObject* parent, QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQLocalSocket* ret = new MiqtVirtualQLocalSocket(parent); - *outptr_QLocalSocket = ret; - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QLocalSocket* QLocalSocket_new2(QObject* parent) { + return new MiqtVirtualQLocalSocket(parent); +} + +void QLocalSocket_virtbase(QLocalSocket* src, QIODevice** outptr_QIODevice) { + *outptr_QIODevice = static_cast(src); } QMetaObject* QLocalSocket_MetaObject(const QLocalSocket* self) { diff --git a/qt6/network/gen_qlocalsocket.go b/qt6/network/gen_qlocalsocket.go index eadc814e..b3f6a588 100644 --- a/qt6/network/gen_qlocalsocket.go +++ b/qt6/network/gen_qlocalsocket.go @@ -68,46 +68,34 @@ func (this *QLocalSocket) UnsafePointer() unsafe.Pointer { } // newQLocalSocket constructs the type using only CGO pointers. -func newQLocalSocket(h *C.QLocalSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QLocalSocket { +func newQLocalSocket(h *C.QLocalSocket) *QLocalSocket { if h == nil { return nil } + var outptr_QIODevice *C.QIODevice = nil + C.QLocalSocket_virtbase(h, &outptr_QIODevice) + return &QLocalSocket{h: h, - QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(h_QIODevice), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QIODeviceBase))} + QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(outptr_QIODevice))} } // UnsafeNewQLocalSocket constructs the type using only unsafe pointers. -func UnsafeNewQLocalSocket(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QLocalSocket { - if h == nil { - return nil - } - - return &QLocalSocket{h: (*C.QLocalSocket)(h), - QIODevice: qt6.UnsafeNewQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} +func UnsafeNewQLocalSocket(h unsafe.Pointer) *QLocalSocket { + return newQLocalSocket((*C.QLocalSocket)(h)) } // NewQLocalSocket constructs a new QLocalSocket object. func NewQLocalSocket() *QLocalSocket { - var outptr_QLocalSocket *C.QLocalSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QLocalSocket_new(&outptr_QLocalSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQLocalSocket(outptr_QLocalSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQLocalSocket(C.QLocalSocket_new()) ret.isSubclass = true return ret } // NewQLocalSocket2 constructs a new QLocalSocket object. func NewQLocalSocket2(parent *qt6.QObject) *QLocalSocket { - var outptr_QLocalSocket *C.QLocalSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QLocalSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QLocalSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQLocalSocket(outptr_QLocalSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQLocalSocket(C.QLocalSocket_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qlocalsocket.h b/qt6/network/gen_qlocalsocket.h index 8e90d7d0..4a34a6bc 100644 --- a/qt6/network/gen_qlocalsocket.h +++ b/qt6/network/gen_qlocalsocket.h @@ -28,8 +28,9 @@ typedef struct QMetaObject QMetaObject; typedef struct QObject QObject; #endif -void QLocalSocket_new(QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QLocalSocket_new2(QObject* parent, QLocalSocket** outptr_QLocalSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +QLocalSocket* QLocalSocket_new(); +QLocalSocket* QLocalSocket_new2(QObject* parent); +void QLocalSocket_virtbase(QLocalSocket* src, QIODevice** outptr_QIODevice); QMetaObject* QLocalSocket_MetaObject(const QLocalSocket* self); void* QLocalSocket_Metacast(QLocalSocket* self, const char* param1); struct miqt_string QLocalSocket_Tr(const char* s); diff --git a/qt6/network/gen_qnetworkaccessmanager.cpp b/qt6/network/gen_qnetworkaccessmanager.cpp index 8aff3ad9..6d7a46c3 100644 --- a/qt6/network/gen_qnetworkaccessmanager.cpp +++ b/qt6/network/gen_qnetworkaccessmanager.cpp @@ -281,16 +281,16 @@ public: }; -void QNetworkAccessManager_new(QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject) { - MiqtVirtualQNetworkAccessManager* ret = new MiqtVirtualQNetworkAccessManager(); - *outptr_QNetworkAccessManager = ret; - *outptr_QObject = static_cast(ret); +QNetworkAccessManager* QNetworkAccessManager_new() { + return new MiqtVirtualQNetworkAccessManager(); } -void QNetworkAccessManager_new2(QObject* parent, QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject) { - MiqtVirtualQNetworkAccessManager* ret = new MiqtVirtualQNetworkAccessManager(parent); - *outptr_QNetworkAccessManager = ret; - *outptr_QObject = static_cast(ret); +QNetworkAccessManager* QNetworkAccessManager_new2(QObject* parent) { + return new MiqtVirtualQNetworkAccessManager(parent); +} + +void QNetworkAccessManager_virtbase(QNetworkAccessManager* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QNetworkAccessManager_MetaObject(const QNetworkAccessManager* self) { diff --git a/qt6/network/gen_qnetworkaccessmanager.go b/qt6/network/gen_qnetworkaccessmanager.go index a019221c..9117a437 100644 --- a/qt6/network/gen_qnetworkaccessmanager.go +++ b/qt6/network/gen_qnetworkaccessmanager.go @@ -48,42 +48,34 @@ func (this *QNetworkAccessManager) UnsafePointer() unsafe.Pointer { } // newQNetworkAccessManager constructs the type using only CGO pointers. -func newQNetworkAccessManager(h *C.QNetworkAccessManager, h_QObject *C.QObject) *QNetworkAccessManager { +func newQNetworkAccessManager(h *C.QNetworkAccessManager) *QNetworkAccessManager { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QNetworkAccessManager_virtbase(h, &outptr_QObject) + return &QNetworkAccessManager{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQNetworkAccessManager constructs the type using only unsafe pointers. -func UnsafeNewQNetworkAccessManager(h unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkAccessManager { - if h == nil { - return nil - } - - return &QNetworkAccessManager{h: (*C.QNetworkAccessManager)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQNetworkAccessManager(h unsafe.Pointer) *QNetworkAccessManager { + return newQNetworkAccessManager((*C.QNetworkAccessManager)(h)) } // NewQNetworkAccessManager constructs a new QNetworkAccessManager object. func NewQNetworkAccessManager() *QNetworkAccessManager { - var outptr_QNetworkAccessManager *C.QNetworkAccessManager = nil - var outptr_QObject *C.QObject = nil - C.QNetworkAccessManager_new(&outptr_QNetworkAccessManager, &outptr_QObject) - ret := newQNetworkAccessManager(outptr_QNetworkAccessManager, outptr_QObject) + ret := newQNetworkAccessManager(C.QNetworkAccessManager_new()) ret.isSubclass = true return ret } // NewQNetworkAccessManager2 constructs a new QNetworkAccessManager object. func NewQNetworkAccessManager2(parent *qt6.QObject) *QNetworkAccessManager { - var outptr_QNetworkAccessManager *C.QNetworkAccessManager = nil - var outptr_QObject *C.QObject = nil - C.QNetworkAccessManager_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkAccessManager, &outptr_QObject) - ret := newQNetworkAccessManager(outptr_QNetworkAccessManager, outptr_QObject) + ret := newQNetworkAccessManager(C.QNetworkAccessManager_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -147,7 +139,7 @@ func (this *QNetworkAccessManager) SetProxyFactory(factory *QNetworkProxyFactory } func (this *QNetworkAccessManager) Cache() *QAbstractNetworkCache { - return newQAbstractNetworkCache(C.QNetworkAccessManager_Cache(this.h), nil) + return newQAbstractNetworkCache(C.QNetworkAccessManager_Cache(this.h)) } func (this *QNetworkAccessManager) SetCache(cache *QAbstractNetworkCache) { @@ -155,7 +147,7 @@ func (this *QNetworkAccessManager) SetCache(cache *QAbstractNetworkCache) { } func (this *QNetworkAccessManager) CookieJar() *QNetworkCookieJar { - return newQNetworkCookieJar(C.QNetworkAccessManager_CookieJar(this.h), nil) + return newQNetworkCookieJar(C.QNetworkAccessManager_CookieJar(this.h)) } func (this *QNetworkAccessManager) SetCookieJar(cookieJar *QNetworkCookieJar) { @@ -201,44 +193,44 @@ func (this *QNetworkAccessManager) StrictTransportSecurityHosts() []QHstsPolicy } func (this *QNetworkAccessManager) Head(request *QNetworkRequest) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_Head(this.h, request.cPointer()), nil, nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Head(this.h, request.cPointer())) } func (this *QNetworkAccessManager) Get(request *QNetworkRequest) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_Get(this.h, request.cPointer()), nil, nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Get(this.h, request.cPointer())) } func (this *QNetworkAccessManager) Post(request *QNetworkRequest, data *qt6.QIODevice) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_Post(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer())), nil, nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Post(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer()))) } func (this *QNetworkAccessManager) Post2(request *QNetworkRequest, data []byte) *QNetworkReply { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - return newQNetworkReply(C.QNetworkAccessManager_Post2(this.h, request.cPointer(), data_alias), nil, nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Post2(this.h, request.cPointer(), data_alias)) } func (this *QNetworkAccessManager) Put(request *QNetworkRequest, data *qt6.QIODevice) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_Put(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer())), nil, nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Put(this.h, request.cPointer(), (*C.QIODevice)(data.UnsafePointer()))) } func (this *QNetworkAccessManager) Put2(request *QNetworkRequest, data []byte) *QNetworkReply { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - return newQNetworkReply(C.QNetworkAccessManager_Put2(this.h, request.cPointer(), data_alias), nil, nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Put2(this.h, request.cPointer(), data_alias)) } func (this *QNetworkAccessManager) DeleteResource(request *QNetworkRequest) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_DeleteResource(this.h, request.cPointer()), nil, nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_DeleteResource(this.h, request.cPointer())) } func (this *QNetworkAccessManager) SendCustomRequest(request *QNetworkRequest, verb []byte) *QNetworkReply { verb_alias := C.struct_miqt_string{} verb_alias.data = (*C.char)(unsafe.Pointer(&verb[0])) verb_alias.len = C.size_t(len(verb)) - return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest(this.h, request.cPointer(), verb_alias), nil, nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest(this.h, request.cPointer(), verb_alias)) } func (this *QNetworkAccessManager) SendCustomRequest2(request *QNetworkRequest, verb []byte, data []byte) *QNetworkReply { @@ -248,22 +240,22 @@ func (this *QNetworkAccessManager) SendCustomRequest2(request *QNetworkRequest, data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest2(this.h, request.cPointer(), verb_alias, data_alias), nil, nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest2(this.h, request.cPointer(), verb_alias, data_alias)) } func (this *QNetworkAccessManager) Post3(request *QNetworkRequest, multiPart *QHttpMultiPart) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_Post3(this.h, request.cPointer(), multiPart.cPointer()), nil, nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Post3(this.h, request.cPointer(), multiPart.cPointer())) } func (this *QNetworkAccessManager) Put3(request *QNetworkRequest, multiPart *QHttpMultiPart) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_Put3(this.h, request.cPointer(), multiPart.cPointer()), nil, nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_Put3(this.h, request.cPointer(), multiPart.cPointer())) } func (this *QNetworkAccessManager) SendCustomRequest3(request *QNetworkRequest, verb []byte, multiPart *QHttpMultiPart) *QNetworkReply { verb_alias := C.struct_miqt_string{} verb_alias.data = (*C.char)(unsafe.Pointer(&verb[0])) verb_alias.len = C.size_t(len(verb)) - return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest3(this.h, request.cPointer(), verb_alias, multiPart.cPointer()), nil, nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest3(this.h, request.cPointer(), verb_alias, multiPart.cPointer())) } func (this *QNetworkAccessManager) ConnectToHostEncrypted(hostName string) { @@ -355,7 +347,7 @@ func miqt_exec_callback_QNetworkAccessManager_AuthenticationRequired(cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := newQNetworkReply(reply, nil, nil, nil) + slotval1 := newQNetworkReply(reply) slotval2 := newQAuthenticator(authenticator) @@ -377,7 +369,7 @@ func miqt_exec_callback_QNetworkAccessManager_Finished(cb C.intptr_t, reply *C.Q } // Convert all CABI parameters to Go parameters - slotval1 := newQNetworkReply(reply, nil, nil, nil) + slotval1 := newQNetworkReply(reply) gofunc(slotval1) } @@ -397,7 +389,7 @@ func miqt_exec_callback_QNetworkAccessManager_Encrypted(cb C.intptr_t, reply *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQNetworkReply(reply, nil, nil, nil) + slotval1 := newQNetworkReply(reply) gofunc(slotval1) } @@ -423,7 +415,7 @@ func miqt_exec_callback_QNetworkAccessManager_SslErrors(cb C.intptr_t, reply *C. } // Convert all CABI parameters to Go parameters - slotval1 := newQNetworkReply(reply, nil, nil, nil) + slotval1 := newQNetworkReply(reply) var errors_ma C.struct_miqt_array = errors errors_ret := make([]QSslError, int(errors_ma.len)) @@ -453,7 +445,7 @@ func miqt_exec_callback_QNetworkAccessManager_PreSharedKeyAuthenticationRequired } // Convert all CABI parameters to Go parameters - slotval1 := newQNetworkReply(reply, nil, nil, nil) + slotval1 := newQNetworkReply(reply) slotval2 := newQSslPreSharedKeyAuthenticator(authenticator) @@ -494,7 +486,7 @@ func (this *QNetworkAccessManager) SendCustomRequest32(request *QNetworkRequest, verb_alias := C.struct_miqt_string{} verb_alias.data = (*C.char)(unsafe.Pointer(&verb[0])) verb_alias.len = C.size_t(len(verb)) - return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest32(this.h, request.cPointer(), verb_alias, (*C.QIODevice)(data.UnsafePointer())), nil, nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_SendCustomRequest32(this.h, request.cPointer(), verb_alias, (*C.QIODevice)(data.UnsafePointer()))) } func (this *QNetworkAccessManager) ConnectToHostEncrypted22(hostName string, port uint16) { @@ -571,7 +563,7 @@ func miqt_exec_callback_QNetworkAccessManager_SupportedSchemes(self *C.QNetworkA func (this *QNetworkAccessManager) callVirtualBase_CreateRequest(op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt6.QIODevice) *QNetworkReply { - return newQNetworkReply(C.QNetworkAccessManager_virtualbase_CreateRequest(unsafe.Pointer(this.h), (C.int)(op), request.cPointer(), (*C.QIODevice)(outgoingData.UnsafePointer())), nil, nil, nil) + return newQNetworkReply(C.QNetworkAccessManager_virtualbase_CreateRequest(unsafe.Pointer(this.h), (C.int)(op), request.cPointer(), (*C.QIODevice)(outgoingData.UnsafePointer()))) } func (this *QNetworkAccessManager) OnCreateRequest(slot func(super func(op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt6.QIODevice) *QNetworkReply, op QNetworkAccessManager__Operation, request *QNetworkRequest, outgoingData *qt6.QIODevice) *QNetworkReply) { @@ -593,7 +585,7 @@ func miqt_exec_callback_QNetworkAccessManager_CreateRequest(self *C.QNetworkAcce slotval2 := newQNetworkRequest(request) - slotval3 := qt6.UnsafeNewQIODevice(unsafe.Pointer(outgoingData), nil, nil) + slotval3 := qt6.UnsafeNewQIODevice(unsafe.Pointer(outgoingData)) virtualReturn := gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_CreateRequest, slotval1, slotval2, slotval3) @@ -679,7 +671,7 @@ func miqt_exec_callback_QNetworkAccessManager_TimerEvent(self *C.QNetworkAccessM } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -705,7 +697,7 @@ func miqt_exec_callback_QNetworkAccessManager_ChildEvent(self *C.QNetworkAccessM } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QNetworkAccessManager{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/network/gen_qnetworkaccessmanager.h b/qt6/network/gen_qnetworkaccessmanager.h index f8e014de..b853f623 100644 --- a/qt6/network/gen_qnetworkaccessmanager.h +++ b/qt6/network/gen_qnetworkaccessmanager.h @@ -58,8 +58,9 @@ typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; typedef struct QTimerEvent QTimerEvent; #endif -void QNetworkAccessManager_new(QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject); -void QNetworkAccessManager_new2(QObject* parent, QNetworkAccessManager** outptr_QNetworkAccessManager, QObject** outptr_QObject); +QNetworkAccessManager* QNetworkAccessManager_new(); +QNetworkAccessManager* QNetworkAccessManager_new2(QObject* parent); +void QNetworkAccessManager_virtbase(QNetworkAccessManager* src, QObject** outptr_QObject); QMetaObject* QNetworkAccessManager_MetaObject(const QNetworkAccessManager* self); void* QNetworkAccessManager_Metacast(QNetworkAccessManager* self, const char* param1); struct miqt_string QNetworkAccessManager_Tr(const char* s); diff --git a/qt6/network/gen_qnetworkcookie.cpp b/qt6/network/gen_qnetworkcookie.cpp index 61c6dcbf..50a1b136 100644 --- a/qt6/network/gen_qnetworkcookie.cpp +++ b/qt6/network/gen_qnetworkcookie.cpp @@ -10,27 +10,23 @@ #include "gen_qnetworkcookie.h" #include "_cgo_export.h" -void QNetworkCookie_new(QNetworkCookie** outptr_QNetworkCookie) { - QNetworkCookie* ret = new QNetworkCookie(); - *outptr_QNetworkCookie = ret; +QNetworkCookie* QNetworkCookie_new() { + return new QNetworkCookie(); } -void QNetworkCookie_new2(QNetworkCookie* other, QNetworkCookie** outptr_QNetworkCookie) { - QNetworkCookie* ret = new QNetworkCookie(*other); - *outptr_QNetworkCookie = ret; +QNetworkCookie* QNetworkCookie_new2(QNetworkCookie* other) { + return new QNetworkCookie(*other); } -void QNetworkCookie_new3(struct miqt_string name, QNetworkCookie** outptr_QNetworkCookie) { +QNetworkCookie* QNetworkCookie_new3(struct miqt_string name) { QByteArray name_QByteArray(name.data, name.len); - QNetworkCookie* ret = new QNetworkCookie(name_QByteArray); - *outptr_QNetworkCookie = ret; + return new QNetworkCookie(name_QByteArray); } -void QNetworkCookie_new4(struct miqt_string name, struct miqt_string value, QNetworkCookie** outptr_QNetworkCookie) { +QNetworkCookie* QNetworkCookie_new4(struct miqt_string name, struct miqt_string value) { QByteArray name_QByteArray(name.data, name.len); QByteArray value_QByteArray(value.data, value.len); - QNetworkCookie* ret = new QNetworkCookie(name_QByteArray, value_QByteArray); - *outptr_QNetworkCookie = ret; + return new QNetworkCookie(name_QByteArray, value_QByteArray); } void QNetworkCookie_OperatorAssign(QNetworkCookie* self, QNetworkCookie* other) { diff --git a/qt6/network/gen_qnetworkcookie.go b/qt6/network/gen_qnetworkcookie.go index 957503cc..32838888 100644 --- a/qt6/network/gen_qnetworkcookie.go +++ b/qt6/network/gen_qnetworkcookie.go @@ -54,34 +54,27 @@ func newQNetworkCookie(h *C.QNetworkCookie) *QNetworkCookie { if h == nil { return nil } + return &QNetworkCookie{h: h} } // UnsafeNewQNetworkCookie constructs the type using only unsafe pointers. func UnsafeNewQNetworkCookie(h unsafe.Pointer) *QNetworkCookie { - if h == nil { - return nil - } - - return &QNetworkCookie{h: (*C.QNetworkCookie)(h)} + return newQNetworkCookie((*C.QNetworkCookie)(h)) } // NewQNetworkCookie constructs a new QNetworkCookie object. func NewQNetworkCookie() *QNetworkCookie { - var outptr_QNetworkCookie *C.QNetworkCookie = nil - C.QNetworkCookie_new(&outptr_QNetworkCookie) - ret := newQNetworkCookie(outptr_QNetworkCookie) + ret := newQNetworkCookie(C.QNetworkCookie_new()) ret.isSubclass = true return ret } // NewQNetworkCookie2 constructs a new QNetworkCookie object. func NewQNetworkCookie2(other *QNetworkCookie) *QNetworkCookie { - var outptr_QNetworkCookie *C.QNetworkCookie = nil - C.QNetworkCookie_new2(other.cPointer(), &outptr_QNetworkCookie) - ret := newQNetworkCookie(outptr_QNetworkCookie) + ret := newQNetworkCookie(C.QNetworkCookie_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -91,10 +84,8 @@ func NewQNetworkCookie3(name []byte) *QNetworkCookie { name_alias := C.struct_miqt_string{} name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) name_alias.len = C.size_t(len(name)) - var outptr_QNetworkCookie *C.QNetworkCookie = nil - C.QNetworkCookie_new3(name_alias, &outptr_QNetworkCookie) - ret := newQNetworkCookie(outptr_QNetworkCookie) + ret := newQNetworkCookie(C.QNetworkCookie_new3(name_alias)) ret.isSubclass = true return ret } @@ -107,10 +98,8 @@ func NewQNetworkCookie4(name []byte, value []byte) *QNetworkCookie { value_alias := C.struct_miqt_string{} value_alias.data = (*C.char)(unsafe.Pointer(&value[0])) value_alias.len = C.size_t(len(value)) - var outptr_QNetworkCookie *C.QNetworkCookie = nil - C.QNetworkCookie_new4(name_alias, value_alias, &outptr_QNetworkCookie) - ret := newQNetworkCookie(outptr_QNetworkCookie) + ret := newQNetworkCookie(C.QNetworkCookie_new4(name_alias, value_alias)) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qnetworkcookie.h b/qt6/network/gen_qnetworkcookie.h index 43acbfe6..634c57d8 100644 --- a/qt6/network/gen_qnetworkcookie.h +++ b/qt6/network/gen_qnetworkcookie.h @@ -24,10 +24,10 @@ typedef struct QNetworkCookie QNetworkCookie; typedef struct QUrl QUrl; #endif -void QNetworkCookie_new(QNetworkCookie** outptr_QNetworkCookie); -void QNetworkCookie_new2(QNetworkCookie* other, QNetworkCookie** outptr_QNetworkCookie); -void QNetworkCookie_new3(struct miqt_string name, QNetworkCookie** outptr_QNetworkCookie); -void QNetworkCookie_new4(struct miqt_string name, struct miqt_string value, QNetworkCookie** outptr_QNetworkCookie); +QNetworkCookie* QNetworkCookie_new(); +QNetworkCookie* QNetworkCookie_new2(QNetworkCookie* other); +QNetworkCookie* QNetworkCookie_new3(struct miqt_string name); +QNetworkCookie* QNetworkCookie_new4(struct miqt_string name, struct miqt_string value); void QNetworkCookie_OperatorAssign(QNetworkCookie* self, QNetworkCookie* other); void QNetworkCookie_Swap(QNetworkCookie* self, QNetworkCookie* other); bool QNetworkCookie_OperatorEqual(const QNetworkCookie* self, QNetworkCookie* other); diff --git a/qt6/network/gen_qnetworkcookiejar.cpp b/qt6/network/gen_qnetworkcookiejar.cpp index d3b91b8a..fca35546 100644 --- a/qt6/network/gen_qnetworkcookiejar.cpp +++ b/qt6/network/gen_qnetworkcookiejar.cpp @@ -380,16 +380,16 @@ public: }; -void QNetworkCookieJar_new(QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject) { - MiqtVirtualQNetworkCookieJar* ret = new MiqtVirtualQNetworkCookieJar(); - *outptr_QNetworkCookieJar = ret; - *outptr_QObject = static_cast(ret); +QNetworkCookieJar* QNetworkCookieJar_new() { + return new MiqtVirtualQNetworkCookieJar(); } -void QNetworkCookieJar_new2(QObject* parent, QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject) { - MiqtVirtualQNetworkCookieJar* ret = new MiqtVirtualQNetworkCookieJar(parent); - *outptr_QNetworkCookieJar = ret; - *outptr_QObject = static_cast(ret); +QNetworkCookieJar* QNetworkCookieJar_new2(QObject* parent) { + return new MiqtVirtualQNetworkCookieJar(parent); +} + +void QNetworkCookieJar_virtbase(QNetworkCookieJar* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QNetworkCookieJar_MetaObject(const QNetworkCookieJar* self) { diff --git a/qt6/network/gen_qnetworkcookiejar.go b/qt6/network/gen_qnetworkcookiejar.go index c5953f24..3a8db948 100644 --- a/qt6/network/gen_qnetworkcookiejar.go +++ b/qt6/network/gen_qnetworkcookiejar.go @@ -36,42 +36,34 @@ func (this *QNetworkCookieJar) UnsafePointer() unsafe.Pointer { } // newQNetworkCookieJar constructs the type using only CGO pointers. -func newQNetworkCookieJar(h *C.QNetworkCookieJar, h_QObject *C.QObject) *QNetworkCookieJar { +func newQNetworkCookieJar(h *C.QNetworkCookieJar) *QNetworkCookieJar { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QNetworkCookieJar_virtbase(h, &outptr_QObject) + return &QNetworkCookieJar{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQNetworkCookieJar constructs the type using only unsafe pointers. -func UnsafeNewQNetworkCookieJar(h unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkCookieJar { - if h == nil { - return nil - } - - return &QNetworkCookieJar{h: (*C.QNetworkCookieJar)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQNetworkCookieJar(h unsafe.Pointer) *QNetworkCookieJar { + return newQNetworkCookieJar((*C.QNetworkCookieJar)(h)) } // NewQNetworkCookieJar constructs a new QNetworkCookieJar object. func NewQNetworkCookieJar() *QNetworkCookieJar { - var outptr_QNetworkCookieJar *C.QNetworkCookieJar = nil - var outptr_QObject *C.QObject = nil - C.QNetworkCookieJar_new(&outptr_QNetworkCookieJar, &outptr_QObject) - ret := newQNetworkCookieJar(outptr_QNetworkCookieJar, outptr_QObject) + ret := newQNetworkCookieJar(C.QNetworkCookieJar_new()) ret.isSubclass = true return ret } // NewQNetworkCookieJar2 constructs a new QNetworkCookieJar object. func NewQNetworkCookieJar2(parent *qt6.QObject) *QNetworkCookieJar { - var outptr_QNetworkCookieJar *C.QNetworkCookieJar = nil - var outptr_QObject *C.QObject = nil - C.QNetworkCookieJar_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkCookieJar, &outptr_QObject) - ret := newQNetworkCookieJar(outptr_QNetworkCookieJar, outptr_QObject) + ret := newQNetworkCookieJar(C.QNetworkCookieJar_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -429,7 +421,7 @@ func miqt_exec_callback_QNetworkCookieJar_TimerEvent(self *C.QNetworkCookieJar, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -455,7 +447,7 @@ func miqt_exec_callback_QNetworkCookieJar_ChildEvent(self *C.QNetworkCookieJar, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QNetworkCookieJar{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/network/gen_qnetworkcookiejar.h b/qt6/network/gen_qnetworkcookiejar.h index 5c810821..0e2436f6 100644 --- a/qt6/network/gen_qnetworkcookiejar.h +++ b/qt6/network/gen_qnetworkcookiejar.h @@ -36,8 +36,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -void QNetworkCookieJar_new(QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject); -void QNetworkCookieJar_new2(QObject* parent, QNetworkCookieJar** outptr_QNetworkCookieJar, QObject** outptr_QObject); +QNetworkCookieJar* QNetworkCookieJar_new(); +QNetworkCookieJar* QNetworkCookieJar_new2(QObject* parent); +void QNetworkCookieJar_virtbase(QNetworkCookieJar* src, QObject** outptr_QObject); QMetaObject* QNetworkCookieJar_MetaObject(const QNetworkCookieJar* self); void* QNetworkCookieJar_Metacast(QNetworkCookieJar* self, const char* param1); struct miqt_string QNetworkCookieJar_Tr(const char* s); diff --git a/qt6/network/gen_qnetworkdatagram.cpp b/qt6/network/gen_qnetworkdatagram.cpp index 76678bbc..585f47e6 100644 --- a/qt6/network/gen_qnetworkdatagram.cpp +++ b/qt6/network/gen_qnetworkdatagram.cpp @@ -5,32 +5,27 @@ #include "gen_qnetworkdatagram.h" #include "_cgo_export.h" -void QNetworkDatagram_new(QNetworkDatagram** outptr_QNetworkDatagram) { - QNetworkDatagram* ret = new QNetworkDatagram(); - *outptr_QNetworkDatagram = ret; +QNetworkDatagram* QNetworkDatagram_new() { + return new QNetworkDatagram(); } -void QNetworkDatagram_new2(struct miqt_string data, QNetworkDatagram** outptr_QNetworkDatagram) { +QNetworkDatagram* QNetworkDatagram_new2(struct miqt_string data) { QByteArray data_QByteArray(data.data, data.len); - QNetworkDatagram* ret = new QNetworkDatagram(data_QByteArray); - *outptr_QNetworkDatagram = ret; + return new QNetworkDatagram(data_QByteArray); } -void QNetworkDatagram_new3(QNetworkDatagram* other, QNetworkDatagram** outptr_QNetworkDatagram) { - QNetworkDatagram* ret = new QNetworkDatagram(*other); - *outptr_QNetworkDatagram = ret; +QNetworkDatagram* QNetworkDatagram_new3(QNetworkDatagram* other) { + return new QNetworkDatagram(*other); } -void QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress, QNetworkDatagram** outptr_QNetworkDatagram) { +QNetworkDatagram* QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress) { QByteArray data_QByteArray(data.data, data.len); - QNetworkDatagram* ret = new QNetworkDatagram(data_QByteArray, *destinationAddress); - *outptr_QNetworkDatagram = ret; + return new QNetworkDatagram(data_QByteArray, *destinationAddress); } -void QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port, QNetworkDatagram** outptr_QNetworkDatagram) { +QNetworkDatagram* QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port) { QByteArray data_QByteArray(data.data, data.len); - QNetworkDatagram* ret = new QNetworkDatagram(data_QByteArray, *destinationAddress, static_cast(port)); - *outptr_QNetworkDatagram = ret; + return new QNetworkDatagram(data_QByteArray, *destinationAddress, static_cast(port)); } void QNetworkDatagram_OperatorAssign(QNetworkDatagram* self, QNetworkDatagram* other) { diff --git a/qt6/network/gen_qnetworkdatagram.go b/qt6/network/gen_qnetworkdatagram.go index e1b4daaa..05caa0d3 100644 --- a/qt6/network/gen_qnetworkdatagram.go +++ b/qt6/network/gen_qnetworkdatagram.go @@ -37,24 +37,19 @@ func newQNetworkDatagram(h *C.QNetworkDatagram) *QNetworkDatagram { if h == nil { return nil } + return &QNetworkDatagram{h: h} } // UnsafeNewQNetworkDatagram constructs the type using only unsafe pointers. func UnsafeNewQNetworkDatagram(h unsafe.Pointer) *QNetworkDatagram { - if h == nil { - return nil - } - - return &QNetworkDatagram{h: (*C.QNetworkDatagram)(h)} + return newQNetworkDatagram((*C.QNetworkDatagram)(h)) } // NewQNetworkDatagram constructs a new QNetworkDatagram object. func NewQNetworkDatagram() *QNetworkDatagram { - var outptr_QNetworkDatagram *C.QNetworkDatagram = nil - C.QNetworkDatagram_new(&outptr_QNetworkDatagram) - ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret := newQNetworkDatagram(C.QNetworkDatagram_new()) ret.isSubclass = true return ret } @@ -64,20 +59,16 @@ func NewQNetworkDatagram2(data []byte) *QNetworkDatagram { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QNetworkDatagram *C.QNetworkDatagram = nil - C.QNetworkDatagram_new2(data_alias, &outptr_QNetworkDatagram) - ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret := newQNetworkDatagram(C.QNetworkDatagram_new2(data_alias)) ret.isSubclass = true return ret } // NewQNetworkDatagram3 constructs a new QNetworkDatagram object. func NewQNetworkDatagram3(other *QNetworkDatagram) *QNetworkDatagram { - var outptr_QNetworkDatagram *C.QNetworkDatagram = nil - C.QNetworkDatagram_new3(other.cPointer(), &outptr_QNetworkDatagram) - ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret := newQNetworkDatagram(C.QNetworkDatagram_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -87,10 +78,8 @@ func NewQNetworkDatagram4(data []byte, destinationAddress *QHostAddress) *QNetwo data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QNetworkDatagram *C.QNetworkDatagram = nil - C.QNetworkDatagram_new4(data_alias, destinationAddress.cPointer(), &outptr_QNetworkDatagram) - ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret := newQNetworkDatagram(C.QNetworkDatagram_new4(data_alias, destinationAddress.cPointer())) ret.isSubclass = true return ret } @@ -100,10 +89,8 @@ func NewQNetworkDatagram5(data []byte, destinationAddress *QHostAddress, port ui data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QNetworkDatagram *C.QNetworkDatagram = nil - C.QNetworkDatagram_new5(data_alias, destinationAddress.cPointer(), (C.uint16_t)(port), &outptr_QNetworkDatagram) - ret := newQNetworkDatagram(outptr_QNetworkDatagram) + ret := newQNetworkDatagram(C.QNetworkDatagram_new5(data_alias, destinationAddress.cPointer(), (C.uint16_t)(port))) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qnetworkdatagram.h b/qt6/network/gen_qnetworkdatagram.h index df07eaad..4da939e1 100644 --- a/qt6/network/gen_qnetworkdatagram.h +++ b/qt6/network/gen_qnetworkdatagram.h @@ -22,11 +22,11 @@ typedef struct QHostAddress QHostAddress; typedef struct QNetworkDatagram QNetworkDatagram; #endif -void QNetworkDatagram_new(QNetworkDatagram** outptr_QNetworkDatagram); -void QNetworkDatagram_new2(struct miqt_string data, QNetworkDatagram** outptr_QNetworkDatagram); -void QNetworkDatagram_new3(QNetworkDatagram* other, QNetworkDatagram** outptr_QNetworkDatagram); -void QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress, QNetworkDatagram** outptr_QNetworkDatagram); -void QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port, QNetworkDatagram** outptr_QNetworkDatagram); +QNetworkDatagram* QNetworkDatagram_new(); +QNetworkDatagram* QNetworkDatagram_new2(struct miqt_string data); +QNetworkDatagram* QNetworkDatagram_new3(QNetworkDatagram* other); +QNetworkDatagram* QNetworkDatagram_new4(struct miqt_string data, QHostAddress* destinationAddress); +QNetworkDatagram* QNetworkDatagram_new5(struct miqt_string data, QHostAddress* destinationAddress, uint16_t port); void QNetworkDatagram_OperatorAssign(QNetworkDatagram* self, QNetworkDatagram* other); void QNetworkDatagram_Swap(QNetworkDatagram* self, QNetworkDatagram* other); void QNetworkDatagram_Clear(QNetworkDatagram* self); diff --git a/qt6/network/gen_qnetworkdiskcache.cpp b/qt6/network/gen_qnetworkdiskcache.cpp index 92c167b3..0faad254 100644 --- a/qt6/network/gen_qnetworkdiskcache.cpp +++ b/qt6/network/gen_qnetworkdiskcache.cpp @@ -241,18 +241,16 @@ public: }; -void QNetworkDiskCache_new(QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject) { - MiqtVirtualQNetworkDiskCache* ret = new MiqtVirtualQNetworkDiskCache(); - *outptr_QNetworkDiskCache = ret; - *outptr_QAbstractNetworkCache = static_cast(ret); - *outptr_QObject = static_cast(ret); +QNetworkDiskCache* QNetworkDiskCache_new() { + return new MiqtVirtualQNetworkDiskCache(); } -void QNetworkDiskCache_new2(QObject* parent, QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject) { - MiqtVirtualQNetworkDiskCache* ret = new MiqtVirtualQNetworkDiskCache(parent); - *outptr_QNetworkDiskCache = ret; - *outptr_QAbstractNetworkCache = static_cast(ret); - *outptr_QObject = static_cast(ret); +QNetworkDiskCache* QNetworkDiskCache_new2(QObject* parent) { + return new MiqtVirtualQNetworkDiskCache(parent); +} + +void QNetworkDiskCache_virtbase(QNetworkDiskCache* src, QAbstractNetworkCache** outptr_QAbstractNetworkCache) { + *outptr_QAbstractNetworkCache = static_cast(src); } QMetaObject* QNetworkDiskCache_MetaObject(const QNetworkDiskCache* self) { diff --git a/qt6/network/gen_qnetworkdiskcache.go b/qt6/network/gen_qnetworkdiskcache.go index e098407f..ac57b5e8 100644 --- a/qt6/network/gen_qnetworkdiskcache.go +++ b/qt6/network/gen_qnetworkdiskcache.go @@ -36,44 +36,34 @@ func (this *QNetworkDiskCache) UnsafePointer() unsafe.Pointer { } // newQNetworkDiskCache constructs the type using only CGO pointers. -func newQNetworkDiskCache(h *C.QNetworkDiskCache, h_QAbstractNetworkCache *C.QAbstractNetworkCache, h_QObject *C.QObject) *QNetworkDiskCache { +func newQNetworkDiskCache(h *C.QNetworkDiskCache) *QNetworkDiskCache { if h == nil { return nil } + var outptr_QAbstractNetworkCache *C.QAbstractNetworkCache = nil + C.QNetworkDiskCache_virtbase(h, &outptr_QAbstractNetworkCache) + return &QNetworkDiskCache{h: h, - QAbstractNetworkCache: newQAbstractNetworkCache(h_QAbstractNetworkCache, h_QObject)} + QAbstractNetworkCache: newQAbstractNetworkCache(outptr_QAbstractNetworkCache)} } // UnsafeNewQNetworkDiskCache constructs the type using only unsafe pointers. -func UnsafeNewQNetworkDiskCache(h unsafe.Pointer, h_QAbstractNetworkCache unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkDiskCache { - if h == nil { - return nil - } - - return &QNetworkDiskCache{h: (*C.QNetworkDiskCache)(h), - QAbstractNetworkCache: UnsafeNewQAbstractNetworkCache(h_QAbstractNetworkCache, h_QObject)} +func UnsafeNewQNetworkDiskCache(h unsafe.Pointer) *QNetworkDiskCache { + return newQNetworkDiskCache((*C.QNetworkDiskCache)(h)) } // NewQNetworkDiskCache constructs a new QNetworkDiskCache object. func NewQNetworkDiskCache() *QNetworkDiskCache { - var outptr_QNetworkDiskCache *C.QNetworkDiskCache = nil - var outptr_QAbstractNetworkCache *C.QAbstractNetworkCache = nil - var outptr_QObject *C.QObject = nil - C.QNetworkDiskCache_new(&outptr_QNetworkDiskCache, &outptr_QAbstractNetworkCache, &outptr_QObject) - ret := newQNetworkDiskCache(outptr_QNetworkDiskCache, outptr_QAbstractNetworkCache, outptr_QObject) + ret := newQNetworkDiskCache(C.QNetworkDiskCache_new()) ret.isSubclass = true return ret } // NewQNetworkDiskCache2 constructs a new QNetworkDiskCache object. func NewQNetworkDiskCache2(parent *qt6.QObject) *QNetworkDiskCache { - var outptr_QNetworkDiskCache *C.QNetworkDiskCache = nil - var outptr_QAbstractNetworkCache *C.QAbstractNetworkCache = nil - var outptr_QObject *C.QObject = nil - C.QNetworkDiskCache_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QNetworkDiskCache, &outptr_QAbstractNetworkCache, &outptr_QObject) - ret := newQNetworkDiskCache(outptr_QNetworkDiskCache, outptr_QAbstractNetworkCache, outptr_QObject) + ret := newQNetworkDiskCache(C.QNetworkDiskCache_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -135,7 +125,7 @@ func (this *QNetworkDiskCache) UpdateMetaData(metaData *QNetworkCacheMetaData) { } func (this *QNetworkDiskCache) Data(url *qt6.QUrl) *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Data(this.h, (*C.QUrl)(url.UnsafePointer()))), nil, nil) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Data(this.h, (*C.QUrl)(url.UnsafePointer())))) } func (this *QNetworkDiskCache) Remove(url *qt6.QUrl) bool { @@ -143,7 +133,7 @@ func (this *QNetworkDiskCache) Remove(url *qt6.QUrl) bool { } func (this *QNetworkDiskCache) Prepare(metaData *QNetworkCacheMetaData) *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Prepare(this.h, metaData.cPointer())), nil, nil) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_Prepare(this.h, metaData.cPointer()))) } func (this *QNetworkDiskCache) Insert(device *qt6.QIODevice) { @@ -269,7 +259,7 @@ func miqt_exec_callback_QNetworkDiskCache_UpdateMetaData(self *C.QNetworkDiskCac func (this *QNetworkDiskCache) callVirtualBase_Data(url *qt6.QUrl) *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_virtualbase_Data(unsafe.Pointer(this.h), (*C.QUrl)(url.UnsafePointer()))), nil, nil) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_virtualbase_Data(unsafe.Pointer(this.h), (*C.QUrl)(url.UnsafePointer())))) } func (this *QNetworkDiskCache) OnData(slot func(super func(url *qt6.QUrl) *qt6.QIODevice, url *qt6.QUrl) *qt6.QIODevice) { @@ -325,7 +315,7 @@ func miqt_exec_callback_QNetworkDiskCache_Remove(self *C.QNetworkDiskCache, cb C func (this *QNetworkDiskCache) callVirtualBase_Prepare(metaData *QNetworkCacheMetaData) *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_virtualbase_Prepare(unsafe.Pointer(this.h), metaData.cPointer())), nil, nil) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QNetworkDiskCache_virtualbase_Prepare(unsafe.Pointer(this.h), metaData.cPointer()))) } func (this *QNetworkDiskCache) OnPrepare(slot func(super func(metaData *QNetworkCacheMetaData) *qt6.QIODevice, metaData *QNetworkCacheMetaData) *qt6.QIODevice) { @@ -371,7 +361,7 @@ func miqt_exec_callback_QNetworkDiskCache_Insert(self *C.QNetworkDiskCache, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQIODevice(unsafe.Pointer(device), nil, nil) + slotval1 := qt6.UnsafeNewQIODevice(unsafe.Pointer(device)) gofunc((&QNetworkDiskCache{h: self}).callVirtualBase_Insert, slotval1) diff --git a/qt6/network/gen_qnetworkdiskcache.h b/qt6/network/gen_qnetworkdiskcache.h index 91a3e414..fd2494fb 100644 --- a/qt6/network/gen_qnetworkdiskcache.h +++ b/qt6/network/gen_qnetworkdiskcache.h @@ -32,8 +32,9 @@ typedef struct QObject QObject; typedef struct QUrl QUrl; #endif -void QNetworkDiskCache_new(QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject); -void QNetworkDiskCache_new2(QObject* parent, QNetworkDiskCache** outptr_QNetworkDiskCache, QAbstractNetworkCache** outptr_QAbstractNetworkCache, QObject** outptr_QObject); +QNetworkDiskCache* QNetworkDiskCache_new(); +QNetworkDiskCache* QNetworkDiskCache_new2(QObject* parent); +void QNetworkDiskCache_virtbase(QNetworkDiskCache* src, QAbstractNetworkCache** outptr_QAbstractNetworkCache); QMetaObject* QNetworkDiskCache_MetaObject(const QNetworkDiskCache* self); void* QNetworkDiskCache_Metacast(QNetworkDiskCache* self, const char* param1); struct miqt_string QNetworkDiskCache_Tr(const char* s); diff --git a/qt6/network/gen_qnetworkinformation.cpp b/qt6/network/gen_qnetworkinformation.cpp index 99b6b0d5..4cfdfb98 100644 --- a/qt6/network/gen_qnetworkinformation.cpp +++ b/qt6/network/gen_qnetworkinformation.cpp @@ -9,6 +9,10 @@ #include "gen_qnetworkinformation.h" #include "_cgo_export.h" +void QNetworkInformation_virtbase(QNetworkInformation* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QNetworkInformation_MetaObject(const QNetworkInformation* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/network/gen_qnetworkinformation.go b/qt6/network/gen_qnetworkinformation.go index 7de556bf..dfd6a5a7 100644 --- a/qt6/network/gen_qnetworkinformation.go +++ b/qt6/network/gen_qnetworkinformation.go @@ -64,22 +64,20 @@ func (this *QNetworkInformation) UnsafePointer() unsafe.Pointer { } // newQNetworkInformation constructs the type using only CGO pointers. -func newQNetworkInformation(h *C.QNetworkInformation, h_QObject *C.QObject) *QNetworkInformation { +func newQNetworkInformation(h *C.QNetworkInformation) *QNetworkInformation { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QNetworkInformation_virtbase(h, &outptr_QObject) + return &QNetworkInformation{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQNetworkInformation constructs the type using only unsafe pointers. -func UnsafeNewQNetworkInformation(h unsafe.Pointer, h_QObject unsafe.Pointer) *QNetworkInformation { - if h == nil { - return nil - } - - return &QNetworkInformation{h: (*C.QNetworkInformation)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQNetworkInformation(h unsafe.Pointer) *QNetworkInformation { + return newQNetworkInformation((*C.QNetworkInformation)(h)) } func (this *QNetworkInformation) MetaObject() *qt6.QMetaObject { @@ -158,7 +156,7 @@ func QNetworkInformation_AvailableBackends() []string { } func QNetworkInformation_Instance() *QNetworkInformation { - return newQNetworkInformation(C.QNetworkInformation_Instance(), nil) + return newQNetworkInformation(C.QNetworkInformation_Instance()) } func (this *QNetworkInformation) ReachabilityChanged(newReachability QNetworkInformation__Reachability) { diff --git a/qt6/network/gen_qnetworkinformation.h b/qt6/network/gen_qnetworkinformation.h index b084c672..a8f5fb54 100644 --- a/qt6/network/gen_qnetworkinformation.h +++ b/qt6/network/gen_qnetworkinformation.h @@ -24,6 +24,7 @@ typedef struct QNetworkInformation QNetworkInformation; typedef struct QObject QObject; #endif +void QNetworkInformation_virtbase(QNetworkInformation* src, QObject** outptr_QObject); QMetaObject* QNetworkInformation_MetaObject(const QNetworkInformation* self); void* QNetworkInformation_Metacast(QNetworkInformation* self, const char* param1); struct miqt_string QNetworkInformation_Tr(const char* s); diff --git a/qt6/network/gen_qnetworkinterface.cpp b/qt6/network/gen_qnetworkinterface.cpp index cc9e0b8d..bfa7c383 100644 --- a/qt6/network/gen_qnetworkinterface.cpp +++ b/qt6/network/gen_qnetworkinterface.cpp @@ -10,14 +10,12 @@ #include "gen_qnetworkinterface.h" #include "_cgo_export.h" -void QNetworkAddressEntry_new(QNetworkAddressEntry** outptr_QNetworkAddressEntry) { - QNetworkAddressEntry* ret = new QNetworkAddressEntry(); - *outptr_QNetworkAddressEntry = ret; +QNetworkAddressEntry* QNetworkAddressEntry_new() { + return new QNetworkAddressEntry(); } -void QNetworkAddressEntry_new2(QNetworkAddressEntry* other, QNetworkAddressEntry** outptr_QNetworkAddressEntry) { - QNetworkAddressEntry* ret = new QNetworkAddressEntry(*other); - *outptr_QNetworkAddressEntry = ret; +QNetworkAddressEntry* QNetworkAddressEntry_new2(QNetworkAddressEntry* other) { + return new QNetworkAddressEntry(*other); } void QNetworkAddressEntry_OperatorAssign(QNetworkAddressEntry* self, QNetworkAddressEntry* other) { @@ -113,14 +111,12 @@ void QNetworkAddressEntry_Delete(QNetworkAddressEntry* self, bool isSubclass) { } } -void QNetworkInterface_new(QNetworkInterface** outptr_QNetworkInterface) { - QNetworkInterface* ret = new QNetworkInterface(); - *outptr_QNetworkInterface = ret; +QNetworkInterface* QNetworkInterface_new() { + return new QNetworkInterface(); } -void QNetworkInterface_new2(QNetworkInterface* other, QNetworkInterface** outptr_QNetworkInterface) { - QNetworkInterface* ret = new QNetworkInterface(*other); - *outptr_QNetworkInterface = ret; +QNetworkInterface* QNetworkInterface_new2(QNetworkInterface* other) { + return new QNetworkInterface(*other); } void QNetworkInterface_OperatorAssign(QNetworkInterface* self, QNetworkInterface* other) { diff --git a/qt6/network/gen_qnetworkinterface.go b/qt6/network/gen_qnetworkinterface.go index c1c00848..f6e65d60 100644 --- a/qt6/network/gen_qnetworkinterface.go +++ b/qt6/network/gen_qnetworkinterface.go @@ -77,34 +77,27 @@ func newQNetworkAddressEntry(h *C.QNetworkAddressEntry) *QNetworkAddressEntry { if h == nil { return nil } + return &QNetworkAddressEntry{h: h} } // UnsafeNewQNetworkAddressEntry constructs the type using only unsafe pointers. func UnsafeNewQNetworkAddressEntry(h unsafe.Pointer) *QNetworkAddressEntry { - if h == nil { - return nil - } - - return &QNetworkAddressEntry{h: (*C.QNetworkAddressEntry)(h)} + return newQNetworkAddressEntry((*C.QNetworkAddressEntry)(h)) } // NewQNetworkAddressEntry constructs a new QNetworkAddressEntry object. func NewQNetworkAddressEntry() *QNetworkAddressEntry { - var outptr_QNetworkAddressEntry *C.QNetworkAddressEntry = nil - C.QNetworkAddressEntry_new(&outptr_QNetworkAddressEntry) - ret := newQNetworkAddressEntry(outptr_QNetworkAddressEntry) + ret := newQNetworkAddressEntry(C.QNetworkAddressEntry_new()) ret.isSubclass = true return ret } // NewQNetworkAddressEntry2 constructs a new QNetworkAddressEntry object. func NewQNetworkAddressEntry2(other *QNetworkAddressEntry) *QNetworkAddressEntry { - var outptr_QNetworkAddressEntry *C.QNetworkAddressEntry = nil - C.QNetworkAddressEntry_new2(other.cPointer(), &outptr_QNetworkAddressEntry) - ret := newQNetworkAddressEntry(outptr_QNetworkAddressEntry) + ret := newQNetworkAddressEntry(C.QNetworkAddressEntry_new2(other.cPointer())) ret.isSubclass = true return ret } @@ -241,34 +234,27 @@ func newQNetworkInterface(h *C.QNetworkInterface) *QNetworkInterface { if h == nil { return nil } + return &QNetworkInterface{h: h} } // UnsafeNewQNetworkInterface constructs the type using only unsafe pointers. func UnsafeNewQNetworkInterface(h unsafe.Pointer) *QNetworkInterface { - if h == nil { - return nil - } - - return &QNetworkInterface{h: (*C.QNetworkInterface)(h)} + return newQNetworkInterface((*C.QNetworkInterface)(h)) } // NewQNetworkInterface constructs a new QNetworkInterface object. func NewQNetworkInterface() *QNetworkInterface { - var outptr_QNetworkInterface *C.QNetworkInterface = nil - C.QNetworkInterface_new(&outptr_QNetworkInterface) - ret := newQNetworkInterface(outptr_QNetworkInterface) + ret := newQNetworkInterface(C.QNetworkInterface_new()) ret.isSubclass = true return ret } // NewQNetworkInterface2 constructs a new QNetworkInterface object. func NewQNetworkInterface2(other *QNetworkInterface) *QNetworkInterface { - var outptr_QNetworkInterface *C.QNetworkInterface = nil - C.QNetworkInterface_new2(other.cPointer(), &outptr_QNetworkInterface) - ret := newQNetworkInterface(outptr_QNetworkInterface) + ret := newQNetworkInterface(C.QNetworkInterface_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qnetworkinterface.h b/qt6/network/gen_qnetworkinterface.h index 57dbfbbd..ddd6bac0 100644 --- a/qt6/network/gen_qnetworkinterface.h +++ b/qt6/network/gen_qnetworkinterface.h @@ -26,8 +26,8 @@ typedef struct QNetworkAddressEntry QNetworkAddressEntry; typedef struct QNetworkInterface QNetworkInterface; #endif -void QNetworkAddressEntry_new(QNetworkAddressEntry** outptr_QNetworkAddressEntry); -void QNetworkAddressEntry_new2(QNetworkAddressEntry* other, QNetworkAddressEntry** outptr_QNetworkAddressEntry); +QNetworkAddressEntry* QNetworkAddressEntry_new(); +QNetworkAddressEntry* QNetworkAddressEntry_new2(QNetworkAddressEntry* other); void QNetworkAddressEntry_OperatorAssign(QNetworkAddressEntry* self, QNetworkAddressEntry* other); void QNetworkAddressEntry_Swap(QNetworkAddressEntry* self, QNetworkAddressEntry* other); bool QNetworkAddressEntry_OperatorEqual(const QNetworkAddressEntry* self, QNetworkAddressEntry* other); @@ -51,8 +51,8 @@ bool QNetworkAddressEntry_IsPermanent(const QNetworkAddressEntry* self); bool QNetworkAddressEntry_IsTemporary(const QNetworkAddressEntry* self); void QNetworkAddressEntry_Delete(QNetworkAddressEntry* self, bool isSubclass); -void QNetworkInterface_new(QNetworkInterface** outptr_QNetworkInterface); -void QNetworkInterface_new2(QNetworkInterface* other, QNetworkInterface** outptr_QNetworkInterface); +QNetworkInterface* QNetworkInterface_new(); +QNetworkInterface* QNetworkInterface_new2(QNetworkInterface* other); void QNetworkInterface_OperatorAssign(QNetworkInterface* self, QNetworkInterface* other); void QNetworkInterface_Swap(QNetworkInterface* self, QNetworkInterface* other); bool QNetworkInterface_IsValid(const QNetworkInterface* self); diff --git a/qt6/network/gen_qnetworkproxy.cpp b/qt6/network/gen_qnetworkproxy.cpp index cce9fde3..dddda3e7 100644 --- a/qt6/network/gen_qnetworkproxy.cpp +++ b/qt6/network/gen_qnetworkproxy.cpp @@ -12,61 +12,51 @@ #include "gen_qnetworkproxy.h" #include "_cgo_export.h" -void QNetworkProxyQuery_new(QNetworkProxyQuery** outptr_QNetworkProxyQuery) { - QNetworkProxyQuery* ret = new QNetworkProxyQuery(); - *outptr_QNetworkProxyQuery = ret; +QNetworkProxyQuery* QNetworkProxyQuery_new() { + return new QNetworkProxyQuery(); } -void QNetworkProxyQuery_new2(QUrl* requestUrl, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { - QNetworkProxyQuery* ret = new QNetworkProxyQuery(*requestUrl); - *outptr_QNetworkProxyQuery = ret; +QNetworkProxyQuery* QNetworkProxyQuery_new2(QUrl* requestUrl) { + return new QNetworkProxyQuery(*requestUrl); } -void QNetworkProxyQuery_new3(struct miqt_string hostname, int port, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { +QNetworkProxyQuery* QNetworkProxyQuery_new3(struct miqt_string hostname, int port) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); - QNetworkProxyQuery* ret = new QNetworkProxyQuery(hostname_QString, static_cast(port)); - *outptr_QNetworkProxyQuery = ret; + return new QNetworkProxyQuery(hostname_QString, static_cast(port)); } -void QNetworkProxyQuery_new4(uint16_t bindPort, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { - QNetworkProxyQuery* ret = new QNetworkProxyQuery(static_cast(bindPort)); - *outptr_QNetworkProxyQuery = ret; +QNetworkProxyQuery* QNetworkProxyQuery_new4(uint16_t bindPort) { + return new QNetworkProxyQuery(static_cast(bindPort)); } -void QNetworkProxyQuery_new5(QNetworkProxyQuery* other, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { - QNetworkProxyQuery* ret = new QNetworkProxyQuery(*other); - *outptr_QNetworkProxyQuery = ret; +QNetworkProxyQuery* QNetworkProxyQuery_new5(QNetworkProxyQuery* other) { + return new QNetworkProxyQuery(*other); } -void QNetworkProxyQuery_new6(QUrl* requestUrl, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { - QNetworkProxyQuery* ret = new QNetworkProxyQuery(*requestUrl, static_cast(queryType)); - *outptr_QNetworkProxyQuery = ret; +QNetworkProxyQuery* QNetworkProxyQuery_new6(QUrl* requestUrl, int queryType) { + return new QNetworkProxyQuery(*requestUrl, static_cast(queryType)); } -void QNetworkProxyQuery_new7(struct miqt_string hostname, int port, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { +QNetworkProxyQuery* QNetworkProxyQuery_new7(struct miqt_string hostname, int port, struct miqt_string protocolTag) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - QNetworkProxyQuery* ret = new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString); - *outptr_QNetworkProxyQuery = ret; + return new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString); } -void QNetworkProxyQuery_new8(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { +QNetworkProxyQuery* QNetworkProxyQuery_new8(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType) { QString hostname_QString = QString::fromUtf8(hostname.data, hostname.len); QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - QNetworkProxyQuery* ret = new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString, static_cast(queryType)); - *outptr_QNetworkProxyQuery = ret; + return new QNetworkProxyQuery(hostname_QString, static_cast(port), protocolTag_QString, static_cast(queryType)); } -void QNetworkProxyQuery_new9(uint16_t bindPort, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { +QNetworkProxyQuery* QNetworkProxyQuery_new9(uint16_t bindPort, struct miqt_string protocolTag) { QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - QNetworkProxyQuery* ret = new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString); - *outptr_QNetworkProxyQuery = ret; + return new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString); } -void QNetworkProxyQuery_new10(uint16_t bindPort, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery) { +QNetworkProxyQuery* QNetworkProxyQuery_new10(uint16_t bindPort, struct miqt_string protocolTag, int queryType) { QString protocolTag_QString = QString::fromUtf8(protocolTag.data, protocolTag.len); - QNetworkProxyQuery* ret = new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString, static_cast(queryType)); - *outptr_QNetworkProxyQuery = ret; + return new QNetworkProxyQuery(static_cast(bindPort), protocolTag_QString, static_cast(queryType)); } void QNetworkProxyQuery_OperatorAssign(QNetworkProxyQuery* self, QNetworkProxyQuery* other) { @@ -158,46 +148,39 @@ void QNetworkProxyQuery_Delete(QNetworkProxyQuery* self, bool isSubclass) { } } -void QNetworkProxy_new(QNetworkProxy** outptr_QNetworkProxy) { - QNetworkProxy* ret = new QNetworkProxy(); - *outptr_QNetworkProxy = ret; +QNetworkProxy* QNetworkProxy_new() { + return new QNetworkProxy(); } -void QNetworkProxy_new2(int typeVal, QNetworkProxy** outptr_QNetworkProxy) { - QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal)); - *outptr_QNetworkProxy = ret; +QNetworkProxy* QNetworkProxy_new2(int typeVal) { + return new QNetworkProxy(static_cast(typeVal)); } -void QNetworkProxy_new3(QNetworkProxy* other, QNetworkProxy** outptr_QNetworkProxy) { - QNetworkProxy* ret = new QNetworkProxy(*other); - *outptr_QNetworkProxy = ret; +QNetworkProxy* QNetworkProxy_new3(QNetworkProxy* other) { + return new QNetworkProxy(*other); } -void QNetworkProxy_new4(int typeVal, struct miqt_string hostName, QNetworkProxy** outptr_QNetworkProxy) { +QNetworkProxy* QNetworkProxy_new4(int typeVal, struct miqt_string hostName) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString); - *outptr_QNetworkProxy = ret; + return new QNetworkProxy(static_cast(typeVal), hostName_QString); } -void QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port, QNetworkProxy** outptr_QNetworkProxy) { +QNetworkProxy* QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); - QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port)); - *outptr_QNetworkProxy = ret; + return new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port)); } -void QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, QNetworkProxy** outptr_QNetworkProxy) { +QNetworkProxy* QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); QString user_QString = QString::fromUtf8(user.data, user.len); - QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString); - *outptr_QNetworkProxy = ret; + return new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString); } -void QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password, QNetworkProxy** outptr_QNetworkProxy) { +QNetworkProxy* QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password) { QString hostName_QString = QString::fromUtf8(hostName.data, hostName.len); QString user_QString = QString::fromUtf8(user.data, user.len); QString password_QString = QString::fromUtf8(password.data, password.len); - QNetworkProxy* ret = new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString, password_QString); - *outptr_QNetworkProxy = ret; + return new QNetworkProxy(static_cast(typeVal), hostName_QString, static_cast(port), user_QString, password_QString); } void QNetworkProxy_OperatorAssign(QNetworkProxy* self, QNetworkProxy* other) { @@ -395,9 +378,8 @@ public: }; -void QNetworkProxyFactory_new(QNetworkProxyFactory** outptr_QNetworkProxyFactory) { - MiqtVirtualQNetworkProxyFactory* ret = new MiqtVirtualQNetworkProxyFactory(); - *outptr_QNetworkProxyFactory = ret; +QNetworkProxyFactory* QNetworkProxyFactory_new() { + return new MiqtVirtualQNetworkProxyFactory(); } struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy(QNetworkProxyFactory* self, QNetworkProxyQuery* query) { diff --git a/qt6/network/gen_qnetworkproxy.go b/qt6/network/gen_qnetworkproxy.go index 27ee412c..86d0a84c 100644 --- a/qt6/network/gen_qnetworkproxy.go +++ b/qt6/network/gen_qnetworkproxy.go @@ -73,34 +73,27 @@ func newQNetworkProxyQuery(h *C.QNetworkProxyQuery) *QNetworkProxyQuery { if h == nil { return nil } + return &QNetworkProxyQuery{h: h} } // UnsafeNewQNetworkProxyQuery constructs the type using only unsafe pointers. func UnsafeNewQNetworkProxyQuery(h unsafe.Pointer) *QNetworkProxyQuery { - if h == nil { - return nil - } - - return &QNetworkProxyQuery{h: (*C.QNetworkProxyQuery)(h)} + return newQNetworkProxyQuery((*C.QNetworkProxyQuery)(h)) } // NewQNetworkProxyQuery constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery() *QNetworkProxyQuery { - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new(&outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new()) ret.isSubclass = true return ret } // NewQNetworkProxyQuery2 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery2(requestUrl *qt6.QUrl) *QNetworkProxyQuery { - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new2((*C.QUrl)(requestUrl.UnsafePointer()), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new2((*C.QUrl)(requestUrl.UnsafePointer()))) ret.isSubclass = true return ret } @@ -111,40 +104,32 @@ func NewQNetworkProxyQuery3(hostname string, port int) *QNetworkProxyQuery { hostname_ms.data = C.CString(hostname) hostname_ms.len = C.size_t(len(hostname)) defer C.free(unsafe.Pointer(hostname_ms.data)) - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new3(hostname_ms, (C.int)(port), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new3(hostname_ms, (C.int)(port))) ret.isSubclass = true return ret } // NewQNetworkProxyQuery4 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery4(bindPort uint16) *QNetworkProxyQuery { - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new4((C.uint16_t)(bindPort), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new4((C.uint16_t)(bindPort))) ret.isSubclass = true return ret } // NewQNetworkProxyQuery5 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery5(other *QNetworkProxyQuery) *QNetworkProxyQuery { - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new5(other.cPointer(), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new5(other.cPointer())) ret.isSubclass = true return ret } // NewQNetworkProxyQuery6 constructs a new QNetworkProxyQuery object. func NewQNetworkProxyQuery6(requestUrl *qt6.QUrl, queryType QNetworkProxyQuery__QueryType) *QNetworkProxyQuery { - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new6((*C.QUrl)(requestUrl.UnsafePointer()), (C.int)(queryType), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new6((*C.QUrl)(requestUrl.UnsafePointer()), (C.int)(queryType))) ret.isSubclass = true return ret } @@ -159,10 +144,8 @@ func NewQNetworkProxyQuery7(hostname string, port int, protocolTag string) *QNet protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new7(hostname_ms, (C.int)(port), protocolTag_ms, &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new7(hostname_ms, (C.int)(port), protocolTag_ms)) ret.isSubclass = true return ret } @@ -177,10 +160,8 @@ func NewQNetworkProxyQuery8(hostname string, port int, protocolTag string, query protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new8(hostname_ms, (C.int)(port), protocolTag_ms, (C.int)(queryType), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new8(hostname_ms, (C.int)(port), protocolTag_ms, (C.int)(queryType))) ret.isSubclass = true return ret } @@ -191,10 +172,8 @@ func NewQNetworkProxyQuery9(bindPort uint16, protocolTag string) *QNetworkProxyQ protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new9((C.uint16_t)(bindPort), protocolTag_ms, &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new9((C.uint16_t)(bindPort), protocolTag_ms)) ret.isSubclass = true return ret } @@ -205,10 +184,8 @@ func NewQNetworkProxyQuery10(bindPort uint16, protocolTag string, queryType QNet protocolTag_ms.data = C.CString(protocolTag) protocolTag_ms.len = C.size_t(len(protocolTag)) defer C.free(unsafe.Pointer(protocolTag_ms.data)) - var outptr_QNetworkProxyQuery *C.QNetworkProxyQuery = nil - C.QNetworkProxyQuery_new10((C.uint16_t)(bindPort), protocolTag_ms, (C.int)(queryType), &outptr_QNetworkProxyQuery) - ret := newQNetworkProxyQuery(outptr_QNetworkProxyQuery) + ret := newQNetworkProxyQuery(C.QNetworkProxyQuery_new10((C.uint16_t)(bindPort), protocolTag_ms, (C.int)(queryType))) ret.isSubclass = true return ret } @@ -331,44 +308,35 @@ func newQNetworkProxy(h *C.QNetworkProxy) *QNetworkProxy { if h == nil { return nil } + return &QNetworkProxy{h: h} } // UnsafeNewQNetworkProxy constructs the type using only unsafe pointers. func UnsafeNewQNetworkProxy(h unsafe.Pointer) *QNetworkProxy { - if h == nil { - return nil - } - - return &QNetworkProxy{h: (*C.QNetworkProxy)(h)} + return newQNetworkProxy((*C.QNetworkProxy)(h)) } // NewQNetworkProxy constructs a new QNetworkProxy object. func NewQNetworkProxy() *QNetworkProxy { - var outptr_QNetworkProxy *C.QNetworkProxy = nil - C.QNetworkProxy_new(&outptr_QNetworkProxy) - ret := newQNetworkProxy(outptr_QNetworkProxy) + ret := newQNetworkProxy(C.QNetworkProxy_new()) ret.isSubclass = true return ret } // NewQNetworkProxy2 constructs a new QNetworkProxy object. func NewQNetworkProxy2(typeVal QNetworkProxy__ProxyType) *QNetworkProxy { - var outptr_QNetworkProxy *C.QNetworkProxy = nil - C.QNetworkProxy_new2((C.int)(typeVal), &outptr_QNetworkProxy) - ret := newQNetworkProxy(outptr_QNetworkProxy) + ret := newQNetworkProxy(C.QNetworkProxy_new2((C.int)(typeVal))) ret.isSubclass = true return ret } // NewQNetworkProxy3 constructs a new QNetworkProxy object. func NewQNetworkProxy3(other *QNetworkProxy) *QNetworkProxy { - var outptr_QNetworkProxy *C.QNetworkProxy = nil - C.QNetworkProxy_new3(other.cPointer(), &outptr_QNetworkProxy) - ret := newQNetworkProxy(outptr_QNetworkProxy) + ret := newQNetworkProxy(C.QNetworkProxy_new3(other.cPointer())) ret.isSubclass = true return ret } @@ -379,10 +347,8 @@ func NewQNetworkProxy4(typeVal QNetworkProxy__ProxyType, hostName string) *QNetw hostName_ms.data = C.CString(hostName) hostName_ms.len = C.size_t(len(hostName)) defer C.free(unsafe.Pointer(hostName_ms.data)) - var outptr_QNetworkProxy *C.QNetworkProxy = nil - C.QNetworkProxy_new4((C.int)(typeVal), hostName_ms, &outptr_QNetworkProxy) - ret := newQNetworkProxy(outptr_QNetworkProxy) + ret := newQNetworkProxy(C.QNetworkProxy_new4((C.int)(typeVal), hostName_ms)) ret.isSubclass = true return ret } @@ -393,10 +359,8 @@ func NewQNetworkProxy5(typeVal QNetworkProxy__ProxyType, hostName string, port u hostName_ms.data = C.CString(hostName) hostName_ms.len = C.size_t(len(hostName)) defer C.free(unsafe.Pointer(hostName_ms.data)) - var outptr_QNetworkProxy *C.QNetworkProxy = nil - C.QNetworkProxy_new5((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), &outptr_QNetworkProxy) - ret := newQNetworkProxy(outptr_QNetworkProxy) + ret := newQNetworkProxy(C.QNetworkProxy_new5((C.int)(typeVal), hostName_ms, (C.uint16_t)(port))) ret.isSubclass = true return ret } @@ -411,10 +375,8 @@ func NewQNetworkProxy6(typeVal QNetworkProxy__ProxyType, hostName string, port u user_ms.data = C.CString(user) user_ms.len = C.size_t(len(user)) defer C.free(unsafe.Pointer(user_ms.data)) - var outptr_QNetworkProxy *C.QNetworkProxy = nil - C.QNetworkProxy_new6((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms, &outptr_QNetworkProxy) - ret := newQNetworkProxy(outptr_QNetworkProxy) + ret := newQNetworkProxy(C.QNetworkProxy_new6((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms)) ret.isSubclass = true return ret } @@ -433,10 +395,8 @@ func NewQNetworkProxy7(typeVal QNetworkProxy__ProxyType, hostName string, port u password_ms.data = C.CString(password) password_ms.len = C.size_t(len(password)) defer C.free(unsafe.Pointer(password_ms.data)) - var outptr_QNetworkProxy *C.QNetworkProxy = nil - C.QNetworkProxy_new7((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms, password_ms, &outptr_QNetworkProxy) - ret := newQNetworkProxy(outptr_QNetworkProxy) + ret := newQNetworkProxy(C.QNetworkProxy_new7((C.int)(typeVal), hostName_ms, (C.uint16_t)(port), user_ms, password_ms)) ret.isSubclass = true return ret } @@ -632,24 +592,19 @@ func newQNetworkProxyFactory(h *C.QNetworkProxyFactory) *QNetworkProxyFactory { if h == nil { return nil } + return &QNetworkProxyFactory{h: h} } // UnsafeNewQNetworkProxyFactory constructs the type using only unsafe pointers. func UnsafeNewQNetworkProxyFactory(h unsafe.Pointer) *QNetworkProxyFactory { - if h == nil { - return nil - } - - return &QNetworkProxyFactory{h: (*C.QNetworkProxyFactory)(h)} + return newQNetworkProxyFactory((*C.QNetworkProxyFactory)(h)) } // NewQNetworkProxyFactory constructs a new QNetworkProxyFactory object. func NewQNetworkProxyFactory() *QNetworkProxyFactory { - var outptr_QNetworkProxyFactory *C.QNetworkProxyFactory = nil - C.QNetworkProxyFactory_new(&outptr_QNetworkProxyFactory) - ret := newQNetworkProxyFactory(outptr_QNetworkProxyFactory) + ret := newQNetworkProxyFactory(C.QNetworkProxyFactory_new()) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qnetworkproxy.h b/qt6/network/gen_qnetworkproxy.h index 86ad1900..7a3709f9 100644 --- a/qt6/network/gen_qnetworkproxy.h +++ b/qt6/network/gen_qnetworkproxy.h @@ -28,16 +28,16 @@ typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -void QNetworkProxyQuery_new(QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new2(QUrl* requestUrl, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new3(struct miqt_string hostname, int port, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new4(uint16_t bindPort, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new5(QNetworkProxyQuery* other, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new6(QUrl* requestUrl, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new7(struct miqt_string hostname, int port, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new8(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new9(uint16_t bindPort, struct miqt_string protocolTag, QNetworkProxyQuery** outptr_QNetworkProxyQuery); -void QNetworkProxyQuery_new10(uint16_t bindPort, struct miqt_string protocolTag, int queryType, QNetworkProxyQuery** outptr_QNetworkProxyQuery); +QNetworkProxyQuery* QNetworkProxyQuery_new(); +QNetworkProxyQuery* QNetworkProxyQuery_new2(QUrl* requestUrl); +QNetworkProxyQuery* QNetworkProxyQuery_new3(struct miqt_string hostname, int port); +QNetworkProxyQuery* QNetworkProxyQuery_new4(uint16_t bindPort); +QNetworkProxyQuery* QNetworkProxyQuery_new5(QNetworkProxyQuery* other); +QNetworkProxyQuery* QNetworkProxyQuery_new6(QUrl* requestUrl, int queryType); +QNetworkProxyQuery* QNetworkProxyQuery_new7(struct miqt_string hostname, int port, struct miqt_string protocolTag); +QNetworkProxyQuery* QNetworkProxyQuery_new8(struct miqt_string hostname, int port, struct miqt_string protocolTag, int queryType); +QNetworkProxyQuery* QNetworkProxyQuery_new9(uint16_t bindPort, struct miqt_string protocolTag); +QNetworkProxyQuery* QNetworkProxyQuery_new10(uint16_t bindPort, struct miqt_string protocolTag, int queryType); void QNetworkProxyQuery_OperatorAssign(QNetworkProxyQuery* self, QNetworkProxyQuery* other); void QNetworkProxyQuery_Swap(QNetworkProxyQuery* self, QNetworkProxyQuery* other); bool QNetworkProxyQuery_OperatorEqual(const QNetworkProxyQuery* self, QNetworkProxyQuery* other); @@ -56,13 +56,13 @@ QUrl* QNetworkProxyQuery_Url(const QNetworkProxyQuery* self); void QNetworkProxyQuery_SetUrl(QNetworkProxyQuery* self, QUrl* url); void QNetworkProxyQuery_Delete(QNetworkProxyQuery* self, bool isSubclass); -void QNetworkProxy_new(QNetworkProxy** outptr_QNetworkProxy); -void QNetworkProxy_new2(int typeVal, QNetworkProxy** outptr_QNetworkProxy); -void QNetworkProxy_new3(QNetworkProxy* other, QNetworkProxy** outptr_QNetworkProxy); -void QNetworkProxy_new4(int typeVal, struct miqt_string hostName, QNetworkProxy** outptr_QNetworkProxy); -void QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port, QNetworkProxy** outptr_QNetworkProxy); -void QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, QNetworkProxy** outptr_QNetworkProxy); -void QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password, QNetworkProxy** outptr_QNetworkProxy); +QNetworkProxy* QNetworkProxy_new(); +QNetworkProxy* QNetworkProxy_new2(int typeVal); +QNetworkProxy* QNetworkProxy_new3(QNetworkProxy* other); +QNetworkProxy* QNetworkProxy_new4(int typeVal, struct miqt_string hostName); +QNetworkProxy* QNetworkProxy_new5(int typeVal, struct miqt_string hostName, uint16_t port); +QNetworkProxy* QNetworkProxy_new6(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user); +QNetworkProxy* QNetworkProxy_new7(int typeVal, struct miqt_string hostName, uint16_t port, struct miqt_string user, struct miqt_string password); void QNetworkProxy_OperatorAssign(QNetworkProxy* self, QNetworkProxy* other); void QNetworkProxy_Swap(QNetworkProxy* self, QNetworkProxy* other); bool QNetworkProxy_OperatorEqual(const QNetworkProxy* self, QNetworkProxy* other); @@ -91,7 +91,7 @@ struct miqt_string QNetworkProxy_RawHeader(const QNetworkProxy* self, struct miq void QNetworkProxy_SetRawHeader(QNetworkProxy* self, struct miqt_string headerName, struct miqt_string value); void QNetworkProxy_Delete(QNetworkProxy* self, bool isSubclass); -void QNetworkProxyFactory_new(QNetworkProxyFactory** outptr_QNetworkProxyFactory); +QNetworkProxyFactory* QNetworkProxyFactory_new(); struct miqt_array /* of QNetworkProxy* */ QNetworkProxyFactory_QueryProxy(QNetworkProxyFactory* self, QNetworkProxyQuery* query); bool QNetworkProxyFactory_UsesSystemConfiguration(); void QNetworkProxyFactory_SetUseSystemConfiguration(bool enable); diff --git a/qt6/network/gen_qnetworkreply.cpp b/qt6/network/gen_qnetworkreply.cpp index d7e81024..7feab6a6 100644 --- a/qt6/network/gen_qnetworkreply.cpp +++ b/qt6/network/gen_qnetworkreply.cpp @@ -20,6 +20,10 @@ #include "gen_qnetworkreply.h" #include "_cgo_export.h" +void QNetworkReply_virtbase(QNetworkReply* src, QIODevice** outptr_QIODevice) { + *outptr_QIODevice = static_cast(src); +} + QMetaObject* QNetworkReply_MetaObject(const QNetworkReply* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/network/gen_qnetworkreply.go b/qt6/network/gen_qnetworkreply.go index 07142b8e..1392f19d 100644 --- a/qt6/network/gen_qnetworkreply.go +++ b/qt6/network/gen_qnetworkreply.go @@ -75,22 +75,20 @@ func (this *QNetworkReply) UnsafePointer() unsafe.Pointer { } // newQNetworkReply constructs the type using only CGO pointers. -func newQNetworkReply(h *C.QNetworkReply, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QNetworkReply { +func newQNetworkReply(h *C.QNetworkReply) *QNetworkReply { if h == nil { return nil } + var outptr_QIODevice *C.QIODevice = nil + C.QNetworkReply_virtbase(h, &outptr_QIODevice) + return &QNetworkReply{h: h, - QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(h_QIODevice), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QIODeviceBase))} + QIODevice: qt6.UnsafeNewQIODevice(unsafe.Pointer(outptr_QIODevice))} } // UnsafeNewQNetworkReply constructs the type using only unsafe pointers. -func UnsafeNewQNetworkReply(h unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QNetworkReply { - if h == nil { - return nil - } - - return &QNetworkReply{h: (*C.QNetworkReply)(h), - QIODevice: qt6.UnsafeNewQIODevice(h_QIODevice, h_QObject, h_QIODeviceBase)} +func UnsafeNewQNetworkReply(h unsafe.Pointer) *QNetworkReply { + return newQNetworkReply((*C.QNetworkReply)(h)) } func (this *QNetworkReply) MetaObject() *qt6.QMetaObject { @@ -129,7 +127,7 @@ func (this *QNetworkReply) SetReadBufferSize(size int64) { } func (this *QNetworkReply) Manager() *QNetworkAccessManager { - return newQNetworkAccessManager(C.QNetworkReply_Manager(this.h), nil) + return newQNetworkAccessManager(C.QNetworkReply_Manager(this.h)) } func (this *QNetworkReply) Operation() QNetworkAccessManager__Operation { diff --git a/qt6/network/gen_qnetworkreply.h b/qt6/network/gen_qnetworkreply.h index fdf8a543..2a094783 100644 --- a/qt6/network/gen_qnetworkreply.h +++ b/qt6/network/gen_qnetworkreply.h @@ -42,6 +42,7 @@ typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif +void QNetworkReply_virtbase(QNetworkReply* src, QIODevice** outptr_QIODevice); QMetaObject* QNetworkReply_MetaObject(const QNetworkReply* self); void* QNetworkReply_Metacast(QNetworkReply* self, const char* param1); struct miqt_string QNetworkReply_Tr(const char* s); diff --git a/qt6/network/gen_qnetworkrequest.cpp b/qt6/network/gen_qnetworkrequest.cpp index 078f3098..7d9ada0b 100644 --- a/qt6/network/gen_qnetworkrequest.cpp +++ b/qt6/network/gen_qnetworkrequest.cpp @@ -13,19 +13,16 @@ #include "gen_qnetworkrequest.h" #include "_cgo_export.h" -void QNetworkRequest_new(QNetworkRequest** outptr_QNetworkRequest) { - QNetworkRequest* ret = new QNetworkRequest(); - *outptr_QNetworkRequest = ret; +QNetworkRequest* QNetworkRequest_new() { + return new QNetworkRequest(); } -void QNetworkRequest_new2(QUrl* url, QNetworkRequest** outptr_QNetworkRequest) { - QNetworkRequest* ret = new QNetworkRequest(*url); - *outptr_QNetworkRequest = ret; +QNetworkRequest* QNetworkRequest_new2(QUrl* url) { + return new QNetworkRequest(*url); } -void QNetworkRequest_new3(QNetworkRequest* other, QNetworkRequest** outptr_QNetworkRequest) { - QNetworkRequest* ret = new QNetworkRequest(*other); - *outptr_QNetworkRequest = ret; +QNetworkRequest* QNetworkRequest_new3(QNetworkRequest* other) { + return new QNetworkRequest(*other); } void QNetworkRequest_OperatorAssign(QNetworkRequest* self, QNetworkRequest* other) { diff --git a/qt6/network/gen_qnetworkrequest.go b/qt6/network/gen_qnetworkrequest.go index 0cdfee46..e67e56f2 100644 --- a/qt6/network/gen_qnetworkrequest.go +++ b/qt6/network/gen_qnetworkrequest.go @@ -130,44 +130,35 @@ func newQNetworkRequest(h *C.QNetworkRequest) *QNetworkRequest { if h == nil { return nil } + return &QNetworkRequest{h: h} } // UnsafeNewQNetworkRequest constructs the type using only unsafe pointers. func UnsafeNewQNetworkRequest(h unsafe.Pointer) *QNetworkRequest { - if h == nil { - return nil - } - - return &QNetworkRequest{h: (*C.QNetworkRequest)(h)} + return newQNetworkRequest((*C.QNetworkRequest)(h)) } // NewQNetworkRequest constructs a new QNetworkRequest object. func NewQNetworkRequest() *QNetworkRequest { - var outptr_QNetworkRequest *C.QNetworkRequest = nil - C.QNetworkRequest_new(&outptr_QNetworkRequest) - ret := newQNetworkRequest(outptr_QNetworkRequest) + ret := newQNetworkRequest(C.QNetworkRequest_new()) ret.isSubclass = true return ret } // NewQNetworkRequest2 constructs a new QNetworkRequest object. func NewQNetworkRequest2(url *qt6.QUrl) *QNetworkRequest { - var outptr_QNetworkRequest *C.QNetworkRequest = nil - C.QNetworkRequest_new2((*C.QUrl)(url.UnsafePointer()), &outptr_QNetworkRequest) - ret := newQNetworkRequest(outptr_QNetworkRequest) + ret := newQNetworkRequest(C.QNetworkRequest_new2((*C.QUrl)(url.UnsafePointer()))) ret.isSubclass = true return ret } // NewQNetworkRequest3 constructs a new QNetworkRequest object. func NewQNetworkRequest3(other *QNetworkRequest) *QNetworkRequest { - var outptr_QNetworkRequest *C.QNetworkRequest = nil - C.QNetworkRequest_new3(other.cPointer(), &outptr_QNetworkRequest) - ret := newQNetworkRequest(outptr_QNetworkRequest) + ret := newQNetworkRequest(C.QNetworkRequest_new3(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qnetworkrequest.h b/qt6/network/gen_qnetworkrequest.h index f1f4733a..d9559df2 100644 --- a/qt6/network/gen_qnetworkrequest.h +++ b/qt6/network/gen_qnetworkrequest.h @@ -30,9 +30,9 @@ typedef struct QUrl QUrl; typedef struct QVariant QVariant; #endif -void QNetworkRequest_new(QNetworkRequest** outptr_QNetworkRequest); -void QNetworkRequest_new2(QUrl* url, QNetworkRequest** outptr_QNetworkRequest); -void QNetworkRequest_new3(QNetworkRequest* other, QNetworkRequest** outptr_QNetworkRequest); +QNetworkRequest* QNetworkRequest_new(); +QNetworkRequest* QNetworkRequest_new2(QUrl* url); +QNetworkRequest* QNetworkRequest_new3(QNetworkRequest* other); void QNetworkRequest_OperatorAssign(QNetworkRequest* self, QNetworkRequest* other); void QNetworkRequest_Swap(QNetworkRequest* self, QNetworkRequest* other); bool QNetworkRequest_OperatorEqual(const QNetworkRequest* self, QNetworkRequest* other); diff --git a/qt6/network/gen_qocspresponse.cpp b/qt6/network/gen_qocspresponse.cpp index c6133b28..ae848c5c 100644 --- a/qt6/network/gen_qocspresponse.cpp +++ b/qt6/network/gen_qocspresponse.cpp @@ -4,14 +4,12 @@ #include "gen_qocspresponse.h" #include "_cgo_export.h" -void QOcspResponse_new(QOcspResponse** outptr_QOcspResponse) { - QOcspResponse* ret = new QOcspResponse(); - *outptr_QOcspResponse = ret; +QOcspResponse* QOcspResponse_new() { + return new QOcspResponse(); } -void QOcspResponse_new2(QOcspResponse* other, QOcspResponse** outptr_QOcspResponse) { - QOcspResponse* ret = new QOcspResponse(*other); - *outptr_QOcspResponse = ret; +QOcspResponse* QOcspResponse_new2(QOcspResponse* other) { + return new QOcspResponse(*other); } void QOcspResponse_OperatorAssign(QOcspResponse* self, QOcspResponse* other) { diff --git a/qt6/network/gen_qocspresponse.go b/qt6/network/gen_qocspresponse.go index d6d57880..c862e9a4 100644 --- a/qt6/network/gen_qocspresponse.go +++ b/qt6/network/gen_qocspresponse.go @@ -59,34 +59,27 @@ func newQOcspResponse(h *C.QOcspResponse) *QOcspResponse { if h == nil { return nil } + return &QOcspResponse{h: h} } // UnsafeNewQOcspResponse constructs the type using only unsafe pointers. func UnsafeNewQOcspResponse(h unsafe.Pointer) *QOcspResponse { - if h == nil { - return nil - } - - return &QOcspResponse{h: (*C.QOcspResponse)(h)} + return newQOcspResponse((*C.QOcspResponse)(h)) } // NewQOcspResponse constructs a new QOcspResponse object. func NewQOcspResponse() *QOcspResponse { - var outptr_QOcspResponse *C.QOcspResponse = nil - C.QOcspResponse_new(&outptr_QOcspResponse) - ret := newQOcspResponse(outptr_QOcspResponse) + ret := newQOcspResponse(C.QOcspResponse_new()) ret.isSubclass = true return ret } // NewQOcspResponse2 constructs a new QOcspResponse object. func NewQOcspResponse2(other *QOcspResponse) *QOcspResponse { - var outptr_QOcspResponse *C.QOcspResponse = nil - C.QOcspResponse_new2(other.cPointer(), &outptr_QOcspResponse) - ret := newQOcspResponse(outptr_QOcspResponse) + ret := newQOcspResponse(C.QOcspResponse_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qocspresponse.h b/qt6/network/gen_qocspresponse.h index 73f98a56..184c9cb9 100644 --- a/qt6/network/gen_qocspresponse.h +++ b/qt6/network/gen_qocspresponse.h @@ -22,8 +22,8 @@ typedef struct QOcspResponse QOcspResponse; typedef struct QSslCertificate QSslCertificate; #endif -void QOcspResponse_new(QOcspResponse** outptr_QOcspResponse); -void QOcspResponse_new2(QOcspResponse* other, QOcspResponse** outptr_QOcspResponse); +QOcspResponse* QOcspResponse_new(); +QOcspResponse* QOcspResponse_new2(QOcspResponse* other); void QOcspResponse_OperatorAssign(QOcspResponse* self, QOcspResponse* other); int QOcspResponse_CertificateStatus(const QOcspResponse* self); int QOcspResponse_RevocationReason(const QOcspResponse* self); diff --git a/qt6/network/gen_qsctpserver.cpp b/qt6/network/gen_qsctpserver.cpp index 605f4ed4..9e0b0d28 100644 --- a/qt6/network/gen_qsctpserver.cpp +++ b/qt6/network/gen_qsctpserver.cpp @@ -90,18 +90,16 @@ public: }; -void QSctpServer_new(QSctpServer** outptr_QSctpServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { - MiqtVirtualQSctpServer* ret = new MiqtVirtualQSctpServer(); - *outptr_QSctpServer = ret; - *outptr_QTcpServer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSctpServer* QSctpServer_new() { + return new MiqtVirtualQSctpServer(); } -void QSctpServer_new2(QObject* parent, QSctpServer** outptr_QSctpServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { - MiqtVirtualQSctpServer* ret = new MiqtVirtualQSctpServer(parent); - *outptr_QSctpServer = ret; - *outptr_QTcpServer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSctpServer* QSctpServer_new2(QObject* parent) { + return new MiqtVirtualQSctpServer(parent); +} + +void QSctpServer_virtbase(QSctpServer* src, QTcpServer** outptr_QTcpServer) { + *outptr_QTcpServer = static_cast(src); } QMetaObject* QSctpServer_MetaObject(const QSctpServer* self) { diff --git a/qt6/network/gen_qsctpserver.go b/qt6/network/gen_qsctpserver.go index 70759f82..c593cb91 100644 --- a/qt6/network/gen_qsctpserver.go +++ b/qt6/network/gen_qsctpserver.go @@ -36,44 +36,34 @@ func (this *QSctpServer) UnsafePointer() unsafe.Pointer { } // newQSctpServer constructs the type using only CGO pointers. -func newQSctpServer(h *C.QSctpServer, h_QTcpServer *C.QTcpServer, h_QObject *C.QObject) *QSctpServer { +func newQSctpServer(h *C.QSctpServer) *QSctpServer { if h == nil { return nil } + var outptr_QTcpServer *C.QTcpServer = nil + C.QSctpServer_virtbase(h, &outptr_QTcpServer) + return &QSctpServer{h: h, - QTcpServer: newQTcpServer(h_QTcpServer, h_QObject)} + QTcpServer: newQTcpServer(outptr_QTcpServer)} } // UnsafeNewQSctpServer constructs the type using only unsafe pointers. -func UnsafeNewQSctpServer(h unsafe.Pointer, h_QTcpServer unsafe.Pointer, h_QObject unsafe.Pointer) *QSctpServer { - if h == nil { - return nil - } - - return &QSctpServer{h: (*C.QSctpServer)(h), - QTcpServer: UnsafeNewQTcpServer(h_QTcpServer, h_QObject)} +func UnsafeNewQSctpServer(h unsafe.Pointer) *QSctpServer { + return newQSctpServer((*C.QSctpServer)(h)) } // NewQSctpServer constructs a new QSctpServer object. func NewQSctpServer() *QSctpServer { - var outptr_QSctpServer *C.QSctpServer = nil - var outptr_QTcpServer *C.QTcpServer = nil - var outptr_QObject *C.QObject = nil - C.QSctpServer_new(&outptr_QSctpServer, &outptr_QTcpServer, &outptr_QObject) - ret := newQSctpServer(outptr_QSctpServer, outptr_QTcpServer, outptr_QObject) + ret := newQSctpServer(C.QSctpServer_new()) ret.isSubclass = true return ret } // NewQSctpServer2 constructs a new QSctpServer object. func NewQSctpServer2(parent *qt6.QObject) *QSctpServer { - var outptr_QSctpServer *C.QSctpServer = nil - var outptr_QTcpServer *C.QTcpServer = nil - var outptr_QObject *C.QObject = nil - C.QSctpServer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QSctpServer, &outptr_QTcpServer, &outptr_QObject) - ret := newQSctpServer(outptr_QSctpServer, outptr_QTcpServer, outptr_QObject) + ret := newQSctpServer(C.QSctpServer_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -106,7 +96,7 @@ func (this *QSctpServer) MaximumChannelCount() int { } func (this *QSctpServer) NextPendingDatagramConnection() *QSctpSocket { - return newQSctpSocket(C.QSctpServer_NextPendingDatagramConnection(this.h), nil, nil, nil, nil, nil) + return newQSctpSocket(C.QSctpServer_NextPendingDatagramConnection(this.h)) } func QSctpServer_Tr2(s string, c string) string { @@ -184,7 +174,7 @@ func miqt_exec_callback_QSctpServer_HasPendingConnections(self *C.QSctpServer, c func (this *QSctpServer) callVirtualBase_NextPendingConnection() *QTcpSocket { - return newQTcpSocket(C.QSctpServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h)), nil, nil, nil, nil) + return newQTcpSocket(C.QSctpServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h))) } func (this *QSctpServer) OnNextPendingConnection(slot func(super func() *QTcpSocket) *QTcpSocket) { diff --git a/qt6/network/gen_qsctpserver.h b/qt6/network/gen_qsctpserver.h index c0a29dba..5558cdc7 100644 --- a/qt6/network/gen_qsctpserver.h +++ b/qt6/network/gen_qsctpserver.h @@ -30,8 +30,9 @@ typedef struct QTcpServer QTcpServer; typedef struct QTcpSocket QTcpSocket; #endif -void QSctpServer_new(QSctpServer** outptr_QSctpServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); -void QSctpServer_new2(QObject* parent, QSctpServer** outptr_QSctpServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); +QSctpServer* QSctpServer_new(); +QSctpServer* QSctpServer_new2(QObject* parent); +void QSctpServer_virtbase(QSctpServer* src, QTcpServer** outptr_QTcpServer); QMetaObject* QSctpServer_MetaObject(const QSctpServer* self); void* QSctpServer_Metacast(QSctpServer* self, const char* param1); struct miqt_string QSctpServer_Tr(const char* s); diff --git a/qt6/network/gen_qsctpsocket.cpp b/qt6/network/gen_qsctpsocket.cpp index a0c3d863..8ed58cef 100644 --- a/qt6/network/gen_qsctpsocket.cpp +++ b/qt6/network/gen_qsctpsocket.cpp @@ -121,24 +121,16 @@ public: }; -void QSctpSocket_new(QSctpSocket** outptr_QSctpSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQSctpSocket* ret = new MiqtVirtualQSctpSocket(); - *outptr_QSctpSocket = ret; - *outptr_QTcpSocket = static_cast(ret); - *outptr_QAbstractSocket = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QSctpSocket* QSctpSocket_new() { + return new MiqtVirtualQSctpSocket(); } -void QSctpSocket_new2(QObject* parent, QSctpSocket** outptr_QSctpSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQSctpSocket* ret = new MiqtVirtualQSctpSocket(parent); - *outptr_QSctpSocket = ret; - *outptr_QTcpSocket = static_cast(ret); - *outptr_QAbstractSocket = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QSctpSocket* QSctpSocket_new2(QObject* parent) { + return new MiqtVirtualQSctpSocket(parent); +} + +void QSctpSocket_virtbase(QSctpSocket* src, QTcpSocket** outptr_QTcpSocket) { + *outptr_QTcpSocket = static_cast(src); } QMetaObject* QSctpSocket_MetaObject(const QSctpSocket* self) { diff --git a/qt6/network/gen_qsctpsocket.go b/qt6/network/gen_qsctpsocket.go index 633a240b..bad6df12 100644 --- a/qt6/network/gen_qsctpsocket.go +++ b/qt6/network/gen_qsctpsocket.go @@ -36,50 +36,34 @@ func (this *QSctpSocket) UnsafePointer() unsafe.Pointer { } // newQSctpSocket constructs the type using only CGO pointers. -func newQSctpSocket(h *C.QSctpSocket, h_QTcpSocket *C.QTcpSocket, h_QAbstractSocket *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QSctpSocket { +func newQSctpSocket(h *C.QSctpSocket) *QSctpSocket { if h == nil { return nil } + var outptr_QTcpSocket *C.QTcpSocket = nil + C.QSctpSocket_virtbase(h, &outptr_QTcpSocket) + return &QSctpSocket{h: h, - QTcpSocket: newQTcpSocket(h_QTcpSocket, h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} + QTcpSocket: newQTcpSocket(outptr_QTcpSocket)} } // UnsafeNewQSctpSocket constructs the type using only unsafe pointers. -func UnsafeNewQSctpSocket(h unsafe.Pointer, h_QTcpSocket unsafe.Pointer, h_QAbstractSocket unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QSctpSocket { - if h == nil { - return nil - } - - return &QSctpSocket{h: (*C.QSctpSocket)(h), - QTcpSocket: UnsafeNewQTcpSocket(h_QTcpSocket, h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} +func UnsafeNewQSctpSocket(h unsafe.Pointer) *QSctpSocket { + return newQSctpSocket((*C.QSctpSocket)(h)) } // NewQSctpSocket constructs a new QSctpSocket object. func NewQSctpSocket() *QSctpSocket { - var outptr_QSctpSocket *C.QSctpSocket = nil - var outptr_QTcpSocket *C.QTcpSocket = nil - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QSctpSocket_new(&outptr_QSctpSocket, &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQSctpSocket(outptr_QSctpSocket, outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQSctpSocket(C.QSctpSocket_new()) ret.isSubclass = true return ret } // NewQSctpSocket2 constructs a new QSctpSocket object. func NewQSctpSocket2(parent *qt6.QObject) *QSctpSocket { - var outptr_QSctpSocket *C.QSctpSocket = nil - var outptr_QTcpSocket *C.QTcpSocket = nil - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QSctpSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QSctpSocket, &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQSctpSocket(outptr_QSctpSocket, outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQSctpSocket(C.QSctpSocket_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qsctpsocket.h b/qt6/network/gen_qsctpsocket.h index 15f55500..89519a06 100644 --- a/qt6/network/gen_qsctpsocket.h +++ b/qt6/network/gen_qsctpsocket.h @@ -34,8 +34,9 @@ typedef struct QSctpSocket QSctpSocket; typedef struct QTcpSocket QTcpSocket; #endif -void QSctpSocket_new(QSctpSocket** outptr_QSctpSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QSctpSocket_new2(QObject* parent, QSctpSocket** outptr_QSctpSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +QSctpSocket* QSctpSocket_new(); +QSctpSocket* QSctpSocket_new2(QObject* parent); +void QSctpSocket_virtbase(QSctpSocket* src, QTcpSocket** outptr_QTcpSocket); QMetaObject* QSctpSocket_MetaObject(const QSctpSocket* self); void* QSctpSocket_Metacast(QSctpSocket* self, const char* param1); struct miqt_string QSctpSocket_Tr(const char* s); diff --git a/qt6/network/gen_qsslcertificate.cpp b/qt6/network/gen_qsslcertificate.cpp index c82d24bf..6bdf7cce 100644 --- a/qt6/network/gen_qsslcertificate.cpp +++ b/qt6/network/gen_qsslcertificate.cpp @@ -13,36 +13,30 @@ #include "gen_qsslcertificate.h" #include "_cgo_export.h" -void QSslCertificate_new(QIODevice* device, QSslCertificate** outptr_QSslCertificate) { - QSslCertificate* ret = new QSslCertificate(device); - *outptr_QSslCertificate = ret; +QSslCertificate* QSslCertificate_new(QIODevice* device) { + return new QSslCertificate(device); } -void QSslCertificate_new2(QSslCertificate** outptr_QSslCertificate) { - QSslCertificate* ret = new QSslCertificate(); - *outptr_QSslCertificate = ret; +QSslCertificate* QSslCertificate_new2() { + return new QSslCertificate(); } -void QSslCertificate_new3(QSslCertificate* other, QSslCertificate** outptr_QSslCertificate) { - QSslCertificate* ret = new QSslCertificate(*other); - *outptr_QSslCertificate = ret; +QSslCertificate* QSslCertificate_new3(QSslCertificate* other) { + return new QSslCertificate(*other); } -void QSslCertificate_new4(QIODevice* device, int format, QSslCertificate** outptr_QSslCertificate) { - QSslCertificate* ret = new QSslCertificate(device, static_cast(format)); - *outptr_QSslCertificate = ret; +QSslCertificate* QSslCertificate_new4(QIODevice* device, int format) { + return new QSslCertificate(device, static_cast(format)); } -void QSslCertificate_new5(struct miqt_string data, QSslCertificate** outptr_QSslCertificate) { +QSslCertificate* QSslCertificate_new5(struct miqt_string data) { QByteArray data_QByteArray(data.data, data.len); - QSslCertificate* ret = new QSslCertificate(data_QByteArray); - *outptr_QSslCertificate = ret; + return new QSslCertificate(data_QByteArray); } -void QSslCertificate_new6(struct miqt_string data, int format, QSslCertificate** outptr_QSslCertificate) { +QSslCertificate* QSslCertificate_new6(struct miqt_string data, int format) { QByteArray data_QByteArray(data.data, data.len); - QSslCertificate* ret = new QSslCertificate(data_QByteArray, static_cast(format)); - *outptr_QSslCertificate = ret; + return new QSslCertificate(data_QByteArray, static_cast(format)); } void QSslCertificate_OperatorAssign(QSslCertificate* self, QSslCertificate* other) { diff --git a/qt6/network/gen_qsslcertificate.go b/qt6/network/gen_qsslcertificate.go index 3e14756b..2123fa83 100644 --- a/qt6/network/gen_qsslcertificate.go +++ b/qt6/network/gen_qsslcertificate.go @@ -60,54 +60,43 @@ func newQSslCertificate(h *C.QSslCertificate) *QSslCertificate { if h == nil { return nil } + return &QSslCertificate{h: h} } // UnsafeNewQSslCertificate constructs the type using only unsafe pointers. func UnsafeNewQSslCertificate(h unsafe.Pointer) *QSslCertificate { - if h == nil { - return nil - } - - return &QSslCertificate{h: (*C.QSslCertificate)(h)} + return newQSslCertificate((*C.QSslCertificate)(h)) } // NewQSslCertificate constructs a new QSslCertificate object. func NewQSslCertificate(device *qt6.QIODevice) *QSslCertificate { - var outptr_QSslCertificate *C.QSslCertificate = nil - C.QSslCertificate_new((*C.QIODevice)(device.UnsafePointer()), &outptr_QSslCertificate) - ret := newQSslCertificate(outptr_QSslCertificate) + ret := newQSslCertificate(C.QSslCertificate_new((*C.QIODevice)(device.UnsafePointer()))) ret.isSubclass = true return ret } // NewQSslCertificate2 constructs a new QSslCertificate object. func NewQSslCertificate2() *QSslCertificate { - var outptr_QSslCertificate *C.QSslCertificate = nil - C.QSslCertificate_new2(&outptr_QSslCertificate) - ret := newQSslCertificate(outptr_QSslCertificate) + ret := newQSslCertificate(C.QSslCertificate_new2()) ret.isSubclass = true return ret } // NewQSslCertificate3 constructs a new QSslCertificate object. func NewQSslCertificate3(other *QSslCertificate) *QSslCertificate { - var outptr_QSslCertificate *C.QSslCertificate = nil - C.QSslCertificate_new3(other.cPointer(), &outptr_QSslCertificate) - ret := newQSslCertificate(outptr_QSslCertificate) + ret := newQSslCertificate(C.QSslCertificate_new3(other.cPointer())) ret.isSubclass = true return ret } // NewQSslCertificate4 constructs a new QSslCertificate object. func NewQSslCertificate4(device *qt6.QIODevice, format QSsl__EncodingFormat) *QSslCertificate { - var outptr_QSslCertificate *C.QSslCertificate = nil - C.QSslCertificate_new4((*C.QIODevice)(device.UnsafePointer()), (C.int)(format), &outptr_QSslCertificate) - ret := newQSslCertificate(outptr_QSslCertificate) + ret := newQSslCertificate(C.QSslCertificate_new4((*C.QIODevice)(device.UnsafePointer()), (C.int)(format))) ret.isSubclass = true return ret } @@ -117,10 +106,8 @@ func NewQSslCertificate5(data []byte) *QSslCertificate { data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QSslCertificate *C.QSslCertificate = nil - C.QSslCertificate_new5(data_alias, &outptr_QSslCertificate) - ret := newQSslCertificate(outptr_QSslCertificate) + ret := newQSslCertificate(C.QSslCertificate_new5(data_alias)) ret.isSubclass = true return ret } @@ -130,10 +117,8 @@ func NewQSslCertificate6(data []byte, format QSsl__EncodingFormat) *QSslCertific data_alias := C.struct_miqt_string{} data_alias.data = (*C.char)(unsafe.Pointer(&data[0])) data_alias.len = C.size_t(len(data)) - var outptr_QSslCertificate *C.QSslCertificate = nil - C.QSslCertificate_new6(data_alias, (C.int)(format), &outptr_QSslCertificate) - ret := newQSslCertificate(outptr_QSslCertificate) + ret := newQSslCertificate(C.QSslCertificate_new6(data_alias, (C.int)(format))) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qsslcertificate.h b/qt6/network/gen_qsslcertificate.h index 516e65fe..bc7ba4f7 100644 --- a/qt6/network/gen_qsslcertificate.h +++ b/qt6/network/gen_qsslcertificate.h @@ -30,12 +30,12 @@ typedef struct QSslError QSslError; typedef struct QSslKey QSslKey; #endif -void QSslCertificate_new(QIODevice* device, QSslCertificate** outptr_QSslCertificate); -void QSslCertificate_new2(QSslCertificate** outptr_QSslCertificate); -void QSslCertificate_new3(QSslCertificate* other, QSslCertificate** outptr_QSslCertificate); -void QSslCertificate_new4(QIODevice* device, int format, QSslCertificate** outptr_QSslCertificate); -void QSslCertificate_new5(struct miqt_string data, QSslCertificate** outptr_QSslCertificate); -void QSslCertificate_new6(struct miqt_string data, int format, QSslCertificate** outptr_QSslCertificate); +QSslCertificate* QSslCertificate_new(QIODevice* device); +QSslCertificate* QSslCertificate_new2(); +QSslCertificate* QSslCertificate_new3(QSslCertificate* other); +QSslCertificate* QSslCertificate_new4(QIODevice* device, int format); +QSslCertificate* QSslCertificate_new5(struct miqt_string data); +QSslCertificate* QSslCertificate_new6(struct miqt_string data, int format); void QSslCertificate_OperatorAssign(QSslCertificate* self, QSslCertificate* other); void QSslCertificate_Swap(QSslCertificate* self, QSslCertificate* other); bool QSslCertificate_OperatorEqual(const QSslCertificate* self, QSslCertificate* other); diff --git a/qt6/network/gen_qsslcertificateextension.cpp b/qt6/network/gen_qsslcertificateextension.cpp index 7c04db42..19d49764 100644 --- a/qt6/network/gen_qsslcertificateextension.cpp +++ b/qt6/network/gen_qsslcertificateextension.cpp @@ -7,14 +7,12 @@ #include "gen_qsslcertificateextension.h" #include "_cgo_export.h" -void QSslCertificateExtension_new(QSslCertificateExtension** outptr_QSslCertificateExtension) { - QSslCertificateExtension* ret = new QSslCertificateExtension(); - *outptr_QSslCertificateExtension = ret; +QSslCertificateExtension* QSslCertificateExtension_new() { + return new QSslCertificateExtension(); } -void QSslCertificateExtension_new2(QSslCertificateExtension* other, QSslCertificateExtension** outptr_QSslCertificateExtension) { - QSslCertificateExtension* ret = new QSslCertificateExtension(*other); - *outptr_QSslCertificateExtension = ret; +QSslCertificateExtension* QSslCertificateExtension_new2(QSslCertificateExtension* other) { + return new QSslCertificateExtension(*other); } void QSslCertificateExtension_OperatorAssign(QSslCertificateExtension* self, QSslCertificateExtension* other) { diff --git a/qt6/network/gen_qsslcertificateextension.go b/qt6/network/gen_qsslcertificateextension.go index e3b5f976..7ed8e634 100644 --- a/qt6/network/gen_qsslcertificateextension.go +++ b/qt6/network/gen_qsslcertificateextension.go @@ -38,34 +38,27 @@ func newQSslCertificateExtension(h *C.QSslCertificateExtension) *QSslCertificate if h == nil { return nil } + return &QSslCertificateExtension{h: h} } // UnsafeNewQSslCertificateExtension constructs the type using only unsafe pointers. func UnsafeNewQSslCertificateExtension(h unsafe.Pointer) *QSslCertificateExtension { - if h == nil { - return nil - } - - return &QSslCertificateExtension{h: (*C.QSslCertificateExtension)(h)} + return newQSslCertificateExtension((*C.QSslCertificateExtension)(h)) } // NewQSslCertificateExtension constructs a new QSslCertificateExtension object. func NewQSslCertificateExtension() *QSslCertificateExtension { - var outptr_QSslCertificateExtension *C.QSslCertificateExtension = nil - C.QSslCertificateExtension_new(&outptr_QSslCertificateExtension) - ret := newQSslCertificateExtension(outptr_QSslCertificateExtension) + ret := newQSslCertificateExtension(C.QSslCertificateExtension_new()) ret.isSubclass = true return ret } // NewQSslCertificateExtension2 constructs a new QSslCertificateExtension object. func NewQSslCertificateExtension2(other *QSslCertificateExtension) *QSslCertificateExtension { - var outptr_QSslCertificateExtension *C.QSslCertificateExtension = nil - C.QSslCertificateExtension_new2(other.cPointer(), &outptr_QSslCertificateExtension) - ret := newQSslCertificateExtension(outptr_QSslCertificateExtension) + ret := newQSslCertificateExtension(C.QSslCertificateExtension_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qsslcertificateextension.h b/qt6/network/gen_qsslcertificateextension.h index d30b51ce..f8de3e84 100644 --- a/qt6/network/gen_qsslcertificateextension.h +++ b/qt6/network/gen_qsslcertificateextension.h @@ -22,8 +22,8 @@ typedef struct QSslCertificateExtension QSslCertificateExtension; typedef struct QVariant QVariant; #endif -void QSslCertificateExtension_new(QSslCertificateExtension** outptr_QSslCertificateExtension); -void QSslCertificateExtension_new2(QSslCertificateExtension* other, QSslCertificateExtension** outptr_QSslCertificateExtension); +QSslCertificateExtension* QSslCertificateExtension_new(); +QSslCertificateExtension* QSslCertificateExtension_new2(QSslCertificateExtension* other); void QSslCertificateExtension_OperatorAssign(QSslCertificateExtension* self, QSslCertificateExtension* other); void QSslCertificateExtension_Swap(QSslCertificateExtension* self, QSslCertificateExtension* other); struct miqt_string QSslCertificateExtension_Oid(const QSslCertificateExtension* self); diff --git a/qt6/network/gen_qsslcipher.cpp b/qt6/network/gen_qsslcipher.cpp index 4bdaab38..bcfa30b4 100644 --- a/qt6/network/gen_qsslcipher.cpp +++ b/qt6/network/gen_qsslcipher.cpp @@ -6,26 +6,22 @@ #include "gen_qsslcipher.h" #include "_cgo_export.h" -void QSslCipher_new(QSslCipher** outptr_QSslCipher) { - QSslCipher* ret = new QSslCipher(); - *outptr_QSslCipher = ret; +QSslCipher* QSslCipher_new() { + return new QSslCipher(); } -void QSslCipher_new2(struct miqt_string name, QSslCipher** outptr_QSslCipher) { +QSslCipher* QSslCipher_new2(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - QSslCipher* ret = new QSslCipher(name_QString); - *outptr_QSslCipher = ret; + return new QSslCipher(name_QString); } -void QSslCipher_new3(struct miqt_string name, int protocol, QSslCipher** outptr_QSslCipher) { +QSslCipher* QSslCipher_new3(struct miqt_string name, int protocol) { QString name_QString = QString::fromUtf8(name.data, name.len); - QSslCipher* ret = new QSslCipher(name_QString, static_cast(protocol)); - *outptr_QSslCipher = ret; + return new QSslCipher(name_QString, static_cast(protocol)); } -void QSslCipher_new4(QSslCipher* other, QSslCipher** outptr_QSslCipher) { - QSslCipher* ret = new QSslCipher(*other); - *outptr_QSslCipher = ret; +QSslCipher* QSslCipher_new4(QSslCipher* other) { + return new QSslCipher(*other); } void QSslCipher_OperatorAssign(QSslCipher* self, QSslCipher* other) { diff --git a/qt6/network/gen_qsslcipher.go b/qt6/network/gen_qsslcipher.go index 433b60dc..402a8dfe 100644 --- a/qt6/network/gen_qsslcipher.go +++ b/qt6/network/gen_qsslcipher.go @@ -37,24 +37,19 @@ func newQSslCipher(h *C.QSslCipher) *QSslCipher { if h == nil { return nil } + return &QSslCipher{h: h} } // UnsafeNewQSslCipher constructs the type using only unsafe pointers. func UnsafeNewQSslCipher(h unsafe.Pointer) *QSslCipher { - if h == nil { - return nil - } - - return &QSslCipher{h: (*C.QSslCipher)(h)} + return newQSslCipher((*C.QSslCipher)(h)) } // NewQSslCipher constructs a new QSslCipher object. func NewQSslCipher() *QSslCipher { - var outptr_QSslCipher *C.QSslCipher = nil - C.QSslCipher_new(&outptr_QSslCipher) - ret := newQSslCipher(outptr_QSslCipher) + ret := newQSslCipher(C.QSslCipher_new()) ret.isSubclass = true return ret } @@ -65,10 +60,8 @@ func NewQSslCipher2(name string) *QSslCipher { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QSslCipher *C.QSslCipher = nil - C.QSslCipher_new2(name_ms, &outptr_QSslCipher) - ret := newQSslCipher(outptr_QSslCipher) + ret := newQSslCipher(C.QSslCipher_new2(name_ms)) ret.isSubclass = true return ret } @@ -79,20 +72,16 @@ func NewQSslCipher3(name string, protocol QSsl__SslProtocol) *QSslCipher { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QSslCipher *C.QSslCipher = nil - C.QSslCipher_new3(name_ms, (C.int)(protocol), &outptr_QSslCipher) - ret := newQSslCipher(outptr_QSslCipher) + ret := newQSslCipher(C.QSslCipher_new3(name_ms, (C.int)(protocol))) ret.isSubclass = true return ret } // NewQSslCipher4 constructs a new QSslCipher object. func NewQSslCipher4(other *QSslCipher) *QSslCipher { - var outptr_QSslCipher *C.QSslCipher = nil - C.QSslCipher_new4(other.cPointer(), &outptr_QSslCipher) - ret := newQSslCipher(outptr_QSslCipher) + ret := newQSslCipher(C.QSslCipher_new4(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qsslcipher.h b/qt6/network/gen_qsslcipher.h index 7ca04acc..fa5290fa 100644 --- a/qt6/network/gen_qsslcipher.h +++ b/qt6/network/gen_qsslcipher.h @@ -20,10 +20,10 @@ class QSslCipher; typedef struct QSslCipher QSslCipher; #endif -void QSslCipher_new(QSslCipher** outptr_QSslCipher); -void QSslCipher_new2(struct miqt_string name, QSslCipher** outptr_QSslCipher); -void QSslCipher_new3(struct miqt_string name, int protocol, QSslCipher** outptr_QSslCipher); -void QSslCipher_new4(QSslCipher* other, QSslCipher** outptr_QSslCipher); +QSslCipher* QSslCipher_new(); +QSslCipher* QSslCipher_new2(struct miqt_string name); +QSslCipher* QSslCipher_new3(struct miqt_string name, int protocol); +QSslCipher* QSslCipher_new4(QSslCipher* other); void QSslCipher_OperatorAssign(QSslCipher* self, QSslCipher* other); void QSslCipher_Swap(QSslCipher* self, QSslCipher* other); bool QSslCipher_OperatorEqual(const QSslCipher* self, QSslCipher* other); diff --git a/qt6/network/gen_qsslconfiguration.cpp b/qt6/network/gen_qsslconfiguration.cpp index 0a7057aa..faf21584 100644 --- a/qt6/network/gen_qsslconfiguration.cpp +++ b/qt6/network/gen_qsslconfiguration.cpp @@ -14,14 +14,12 @@ #include "gen_qsslconfiguration.h" #include "_cgo_export.h" -void QSslConfiguration_new(QSslConfiguration** outptr_QSslConfiguration) { - QSslConfiguration* ret = new QSslConfiguration(); - *outptr_QSslConfiguration = ret; +QSslConfiguration* QSslConfiguration_new() { + return new QSslConfiguration(); } -void QSslConfiguration_new2(QSslConfiguration* other, QSslConfiguration** outptr_QSslConfiguration) { - QSslConfiguration* ret = new QSslConfiguration(*other); - *outptr_QSslConfiguration = ret; +QSslConfiguration* QSslConfiguration_new2(QSslConfiguration* other) { + return new QSslConfiguration(*other); } void QSslConfiguration_OperatorAssign(QSslConfiguration* self, QSslConfiguration* other) { diff --git a/qt6/network/gen_qsslconfiguration.go b/qt6/network/gen_qsslconfiguration.go index 4627067d..a378552d 100644 --- a/qt6/network/gen_qsslconfiguration.go +++ b/qt6/network/gen_qsslconfiguration.go @@ -46,34 +46,27 @@ func newQSslConfiguration(h *C.QSslConfiguration) *QSslConfiguration { if h == nil { return nil } + return &QSslConfiguration{h: h} } // UnsafeNewQSslConfiguration constructs the type using only unsafe pointers. func UnsafeNewQSslConfiguration(h unsafe.Pointer) *QSslConfiguration { - if h == nil { - return nil - } - - return &QSslConfiguration{h: (*C.QSslConfiguration)(h)} + return newQSslConfiguration((*C.QSslConfiguration)(h)) } // NewQSslConfiguration constructs a new QSslConfiguration object. func NewQSslConfiguration() *QSslConfiguration { - var outptr_QSslConfiguration *C.QSslConfiguration = nil - C.QSslConfiguration_new(&outptr_QSslConfiguration) - ret := newQSslConfiguration(outptr_QSslConfiguration) + ret := newQSslConfiguration(C.QSslConfiguration_new()) ret.isSubclass = true return ret } // NewQSslConfiguration2 constructs a new QSslConfiguration object. func NewQSslConfiguration2(other *QSslConfiguration) *QSslConfiguration { - var outptr_QSslConfiguration *C.QSslConfiguration = nil - C.QSslConfiguration_new2(other.cPointer(), &outptr_QSslConfiguration) - ret := newQSslConfiguration(outptr_QSslConfiguration) + ret := newQSslConfiguration(C.QSslConfiguration_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qsslconfiguration.h b/qt6/network/gen_qsslconfiguration.h index 275cad21..f3eb99d3 100644 --- a/qt6/network/gen_qsslconfiguration.h +++ b/qt6/network/gen_qsslconfiguration.h @@ -32,8 +32,8 @@ typedef struct QSslKey QSslKey; typedef struct QVariant QVariant; #endif -void QSslConfiguration_new(QSslConfiguration** outptr_QSslConfiguration); -void QSslConfiguration_new2(QSslConfiguration* other, QSslConfiguration** outptr_QSslConfiguration); +QSslConfiguration* QSslConfiguration_new(); +QSslConfiguration* QSslConfiguration_new2(QSslConfiguration* other); void QSslConfiguration_OperatorAssign(QSslConfiguration* self, QSslConfiguration* other); void QSslConfiguration_Swap(QSslConfiguration* self, QSslConfiguration* other); bool QSslConfiguration_OperatorEqual(const QSslConfiguration* self, QSslConfiguration* other); diff --git a/qt6/network/gen_qssldiffiehellmanparameters.cpp b/qt6/network/gen_qssldiffiehellmanparameters.cpp index a6e3761f..fb8bdd87 100644 --- a/qt6/network/gen_qssldiffiehellmanparameters.cpp +++ b/qt6/network/gen_qssldiffiehellmanparameters.cpp @@ -8,14 +8,12 @@ #include "gen_qssldiffiehellmanparameters.h" #include "_cgo_export.h" -void QSslDiffieHellmanParameters_new(QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters) { - QSslDiffieHellmanParameters* ret = new QSslDiffieHellmanParameters(); - *outptr_QSslDiffieHellmanParameters = ret; +QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new() { + return new QSslDiffieHellmanParameters(); } -void QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other, QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters) { - QSslDiffieHellmanParameters* ret = new QSslDiffieHellmanParameters(*other); - *outptr_QSslDiffieHellmanParameters = ret; +QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other) { + return new QSslDiffieHellmanParameters(*other); } QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_DefaultParameters() { diff --git a/qt6/network/gen_qssldiffiehellmanparameters.go b/qt6/network/gen_qssldiffiehellmanparameters.go index 02fc4b22..5cec9c26 100644 --- a/qt6/network/gen_qssldiffiehellmanparameters.go +++ b/qt6/network/gen_qssldiffiehellmanparameters.go @@ -46,34 +46,27 @@ func newQSslDiffieHellmanParameters(h *C.QSslDiffieHellmanParameters) *QSslDiffi if h == nil { return nil } + return &QSslDiffieHellmanParameters{h: h} } // UnsafeNewQSslDiffieHellmanParameters constructs the type using only unsafe pointers. func UnsafeNewQSslDiffieHellmanParameters(h unsafe.Pointer) *QSslDiffieHellmanParameters { - if h == nil { - return nil - } - - return &QSslDiffieHellmanParameters{h: (*C.QSslDiffieHellmanParameters)(h)} + return newQSslDiffieHellmanParameters((*C.QSslDiffieHellmanParameters)(h)) } // NewQSslDiffieHellmanParameters constructs a new QSslDiffieHellmanParameters object. func NewQSslDiffieHellmanParameters() *QSslDiffieHellmanParameters { - var outptr_QSslDiffieHellmanParameters *C.QSslDiffieHellmanParameters = nil - C.QSslDiffieHellmanParameters_new(&outptr_QSslDiffieHellmanParameters) - ret := newQSslDiffieHellmanParameters(outptr_QSslDiffieHellmanParameters) + ret := newQSslDiffieHellmanParameters(C.QSslDiffieHellmanParameters_new()) ret.isSubclass = true return ret } // NewQSslDiffieHellmanParameters2 constructs a new QSslDiffieHellmanParameters object. func NewQSslDiffieHellmanParameters2(other *QSslDiffieHellmanParameters) *QSslDiffieHellmanParameters { - var outptr_QSslDiffieHellmanParameters *C.QSslDiffieHellmanParameters = nil - C.QSslDiffieHellmanParameters_new2(other.cPointer(), &outptr_QSslDiffieHellmanParameters) - ret := newQSslDiffieHellmanParameters(outptr_QSslDiffieHellmanParameters) + ret := newQSslDiffieHellmanParameters(C.QSslDiffieHellmanParameters_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qssldiffiehellmanparameters.h b/qt6/network/gen_qssldiffiehellmanparameters.h index a991cc9f..e9f9d033 100644 --- a/qt6/network/gen_qssldiffiehellmanparameters.h +++ b/qt6/network/gen_qssldiffiehellmanparameters.h @@ -22,8 +22,8 @@ typedef struct QIODevice QIODevice; typedef struct QSslDiffieHellmanParameters QSslDiffieHellmanParameters; #endif -void QSslDiffieHellmanParameters_new(QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters); -void QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other, QSslDiffieHellmanParameters** outptr_QSslDiffieHellmanParameters); +QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new(); +QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_new2(QSslDiffieHellmanParameters* other); QSslDiffieHellmanParameters* QSslDiffieHellmanParameters_DefaultParameters(); void QSslDiffieHellmanParameters_OperatorAssign(QSslDiffieHellmanParameters* self, QSslDiffieHellmanParameters* other); void QSslDiffieHellmanParameters_Swap(QSslDiffieHellmanParameters* self, QSslDiffieHellmanParameters* other); diff --git a/qt6/network/gen_qsslellipticcurve.cpp b/qt6/network/gen_qsslellipticcurve.cpp index ba03eb46..0542b7f9 100644 --- a/qt6/network/gen_qsslellipticcurve.cpp +++ b/qt6/network/gen_qsslellipticcurve.cpp @@ -6,14 +6,12 @@ #include "gen_qsslellipticcurve.h" #include "_cgo_export.h" -void QSslEllipticCurve_new(QSslEllipticCurve** outptr_QSslEllipticCurve) { - QSslEllipticCurve* ret = new QSslEllipticCurve(); - *outptr_QSslEllipticCurve = ret; +QSslEllipticCurve* QSslEllipticCurve_new() { + return new QSslEllipticCurve(); } -void QSslEllipticCurve_new2(QSslEllipticCurve* param1, QSslEllipticCurve** outptr_QSslEllipticCurve) { - QSslEllipticCurve* ret = new QSslEllipticCurve(*param1); - *outptr_QSslEllipticCurve = ret; +QSslEllipticCurve* QSslEllipticCurve_new2(QSslEllipticCurve* param1) { + return new QSslEllipticCurve(*param1); } QSslEllipticCurve* QSslEllipticCurve_FromShortName(struct miqt_string name) { diff --git a/qt6/network/gen_qsslellipticcurve.go b/qt6/network/gen_qsslellipticcurve.go index adca219a..3a737154 100644 --- a/qt6/network/gen_qsslellipticcurve.go +++ b/qt6/network/gen_qsslellipticcurve.go @@ -37,34 +37,27 @@ func newQSslEllipticCurve(h *C.QSslEllipticCurve) *QSslEllipticCurve { if h == nil { return nil } + return &QSslEllipticCurve{h: h} } // UnsafeNewQSslEllipticCurve constructs the type using only unsafe pointers. func UnsafeNewQSslEllipticCurve(h unsafe.Pointer) *QSslEllipticCurve { - if h == nil { - return nil - } - - return &QSslEllipticCurve{h: (*C.QSslEllipticCurve)(h)} + return newQSslEllipticCurve((*C.QSslEllipticCurve)(h)) } // NewQSslEllipticCurve constructs a new QSslEllipticCurve object. func NewQSslEllipticCurve() *QSslEllipticCurve { - var outptr_QSslEllipticCurve *C.QSslEllipticCurve = nil - C.QSslEllipticCurve_new(&outptr_QSslEllipticCurve) - ret := newQSslEllipticCurve(outptr_QSslEllipticCurve) + ret := newQSslEllipticCurve(C.QSslEllipticCurve_new()) ret.isSubclass = true return ret } // NewQSslEllipticCurve2 constructs a new QSslEllipticCurve object. func NewQSslEllipticCurve2(param1 *QSslEllipticCurve) *QSslEllipticCurve { - var outptr_QSslEllipticCurve *C.QSslEllipticCurve = nil - C.QSslEllipticCurve_new2(param1.cPointer(), &outptr_QSslEllipticCurve) - ret := newQSslEllipticCurve(outptr_QSslEllipticCurve) + ret := newQSslEllipticCurve(C.QSslEllipticCurve_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qsslellipticcurve.h b/qt6/network/gen_qsslellipticcurve.h index 242295c4..80a78217 100644 --- a/qt6/network/gen_qsslellipticcurve.h +++ b/qt6/network/gen_qsslellipticcurve.h @@ -20,8 +20,8 @@ class QSslEllipticCurve; typedef struct QSslEllipticCurve QSslEllipticCurve; #endif -void QSslEllipticCurve_new(QSslEllipticCurve** outptr_QSslEllipticCurve); -void QSslEllipticCurve_new2(QSslEllipticCurve* param1, QSslEllipticCurve** outptr_QSslEllipticCurve); +QSslEllipticCurve* QSslEllipticCurve_new(); +QSslEllipticCurve* QSslEllipticCurve_new2(QSslEllipticCurve* param1); QSslEllipticCurve* QSslEllipticCurve_FromShortName(struct miqt_string name); QSslEllipticCurve* QSslEllipticCurve_FromLongName(struct miqt_string name); struct miqt_string QSslEllipticCurve_ShortName(const QSslEllipticCurve* self); diff --git a/qt6/network/gen_qsslerror.cpp b/qt6/network/gen_qsslerror.cpp index 8ae3a553..13dc29e2 100644 --- a/qt6/network/gen_qsslerror.cpp +++ b/qt6/network/gen_qsslerror.cpp @@ -7,24 +7,20 @@ #include "gen_qsslerror.h" #include "_cgo_export.h" -void QSslError_new(QSslError** outptr_QSslError) { - QSslError* ret = new QSslError(); - *outptr_QSslError = ret; +QSslError* QSslError_new() { + return new QSslError(); } -void QSslError_new2(int error, QSslError** outptr_QSslError) { - QSslError* ret = new QSslError(static_cast(error)); - *outptr_QSslError = ret; +QSslError* QSslError_new2(int error) { + return new QSslError(static_cast(error)); } -void QSslError_new3(int error, QSslCertificate* certificate, QSslError** outptr_QSslError) { - QSslError* ret = new QSslError(static_cast(error), *certificate); - *outptr_QSslError = ret; +QSslError* QSslError_new3(int error, QSslCertificate* certificate) { + return new QSslError(static_cast(error), *certificate); } -void QSslError_new4(QSslError* other, QSslError** outptr_QSslError) { - QSslError* ret = new QSslError(*other); - *outptr_QSslError = ret; +QSslError* QSslError_new4(QSslError* other) { + return new QSslError(*other); } void QSslError_Swap(QSslError* self, QSslError* other) { diff --git a/qt6/network/gen_qsslerror.go b/qt6/network/gen_qsslerror.go index 095d9de9..8b51802c 100644 --- a/qt6/network/gen_qsslerror.go +++ b/qt6/network/gen_qsslerror.go @@ -80,54 +80,43 @@ func newQSslError(h *C.QSslError) *QSslError { if h == nil { return nil } + return &QSslError{h: h} } // UnsafeNewQSslError constructs the type using only unsafe pointers. func UnsafeNewQSslError(h unsafe.Pointer) *QSslError { - if h == nil { - return nil - } - - return &QSslError{h: (*C.QSslError)(h)} + return newQSslError((*C.QSslError)(h)) } // NewQSslError constructs a new QSslError object. func NewQSslError() *QSslError { - var outptr_QSslError *C.QSslError = nil - C.QSslError_new(&outptr_QSslError) - ret := newQSslError(outptr_QSslError) + ret := newQSslError(C.QSslError_new()) ret.isSubclass = true return ret } // NewQSslError2 constructs a new QSslError object. func NewQSslError2(error QSslError__SslError) *QSslError { - var outptr_QSslError *C.QSslError = nil - C.QSslError_new2((C.int)(error), &outptr_QSslError) - ret := newQSslError(outptr_QSslError) + ret := newQSslError(C.QSslError_new2((C.int)(error))) ret.isSubclass = true return ret } // NewQSslError3 constructs a new QSslError object. func NewQSslError3(error QSslError__SslError, certificate *QSslCertificate) *QSslError { - var outptr_QSslError *C.QSslError = nil - C.QSslError_new3((C.int)(error), certificate.cPointer(), &outptr_QSslError) - ret := newQSslError(outptr_QSslError) + ret := newQSslError(C.QSslError_new3((C.int)(error), certificate.cPointer())) ret.isSubclass = true return ret } // NewQSslError4 constructs a new QSslError object. func NewQSslError4(other *QSslError) *QSslError { - var outptr_QSslError *C.QSslError = nil - C.QSslError_new4(other.cPointer(), &outptr_QSslError) - ret := newQSslError(outptr_QSslError) + ret := newQSslError(C.QSslError_new4(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qsslerror.h b/qt6/network/gen_qsslerror.h index 0effd4f1..b229e1b6 100644 --- a/qt6/network/gen_qsslerror.h +++ b/qt6/network/gen_qsslerror.h @@ -22,10 +22,10 @@ typedef struct QSslCertificate QSslCertificate; typedef struct QSslError QSslError; #endif -void QSslError_new(QSslError** outptr_QSslError); -void QSslError_new2(int error, QSslError** outptr_QSslError); -void QSslError_new3(int error, QSslCertificate* certificate, QSslError** outptr_QSslError); -void QSslError_new4(QSslError* other, QSslError** outptr_QSslError); +QSslError* QSslError_new(); +QSslError* QSslError_new2(int error); +QSslError* QSslError_new3(int error, QSslCertificate* certificate); +QSslError* QSslError_new4(QSslError* other); void QSslError_Swap(QSslError* self, QSslError* other); void QSslError_OperatorAssign(QSslError* self, QSslError* other); bool QSslError_OperatorEqual(const QSslError* self, QSslError* other); diff --git a/qt6/network/gen_qsslkey.cpp b/qt6/network/gen_qsslkey.cpp index 69623d4c..7b56eeef 100644 --- a/qt6/network/gen_qsslkey.cpp +++ b/qt6/network/gen_qsslkey.cpp @@ -5,70 +5,58 @@ #include "gen_qsslkey.h" #include "_cgo_export.h" -void QSslKey_new(QSslKey** outptr_QSslKey) { - QSslKey* ret = new QSslKey(); - *outptr_QSslKey = ret; +QSslKey* QSslKey_new() { + return new QSslKey(); } -void QSslKey_new2(struct miqt_string encoded, int algorithm, QSslKey** outptr_QSslKey) { +QSslKey* QSslKey_new2(struct miqt_string encoded, int algorithm) { QByteArray encoded_QByteArray(encoded.data, encoded.len); - QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm)); - *outptr_QSslKey = ret; + return new QSslKey(encoded_QByteArray, static_cast(algorithm)); } -void QSslKey_new3(QIODevice* device, int algorithm, QSslKey** outptr_QSslKey) { - QSslKey* ret = new QSslKey(device, static_cast(algorithm)); - *outptr_QSslKey = ret; +QSslKey* QSslKey_new3(QIODevice* device, int algorithm) { + return new QSslKey(device, static_cast(algorithm)); } -void QSslKey_new4(void* handle, QSslKey** outptr_QSslKey) { - QSslKey* ret = new QSslKey(handle); - *outptr_QSslKey = ret; +QSslKey* QSslKey_new4(void* handle) { + return new QSslKey(handle); } -void QSslKey_new5(QSslKey* other, QSslKey** outptr_QSslKey) { - QSslKey* ret = new QSslKey(*other); - *outptr_QSslKey = ret; +QSslKey* QSslKey_new5(QSslKey* other) { + return new QSslKey(*other); } -void QSslKey_new6(struct miqt_string encoded, int algorithm, int format, QSslKey** outptr_QSslKey) { +QSslKey* QSslKey_new6(struct miqt_string encoded, int algorithm, int format) { QByteArray encoded_QByteArray(encoded.data, encoded.len); - QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format)); - *outptr_QSslKey = ret; + return new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format)); } -void QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey) { +QSslKey* QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal) { QByteArray encoded_QByteArray(encoded.data, encoded.len); - QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal)); - *outptr_QSslKey = ret; + return new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal)); } -void QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey) { +QSslKey* QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase) { QByteArray encoded_QByteArray(encoded.data, encoded.len); QByteArray passPhrase_QByteArray(passPhrase.data, passPhrase.len); - QSslKey* ret = new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); - *outptr_QSslKey = ret; + return new QSslKey(encoded_QByteArray, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); } -void QSslKey_new9(QIODevice* device, int algorithm, int format, QSslKey** outptr_QSslKey) { - QSslKey* ret = new QSslKey(device, static_cast(algorithm), static_cast(format)); - *outptr_QSslKey = ret; +QSslKey* QSslKey_new9(QIODevice* device, int algorithm, int format) { + return new QSslKey(device, static_cast(algorithm), static_cast(format)); } -void QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey) { - QSslKey* ret = new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal)); - *outptr_QSslKey = ret; +QSslKey* QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal) { + return new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal)); } -void QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey) { +QSslKey* QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase) { QByteArray passPhrase_QByteArray(passPhrase.data, passPhrase.len); - QSslKey* ret = new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); - *outptr_QSslKey = ret; + return new QSslKey(device, static_cast(algorithm), static_cast(format), static_cast(typeVal), passPhrase_QByteArray); } -void QSslKey_new12(void* handle, int typeVal, QSslKey** outptr_QSslKey) { - QSslKey* ret = new QSslKey(handle, static_cast(typeVal)); - *outptr_QSslKey = ret; +QSslKey* QSslKey_new12(void* handle, int typeVal) { + return new QSslKey(handle, static_cast(typeVal)); } void QSslKey_OperatorAssign(QSslKey* self, QSslKey* other) { diff --git a/qt6/network/gen_qsslkey.go b/qt6/network/gen_qsslkey.go index 7039034d..5c81df2a 100644 --- a/qt6/network/gen_qsslkey.go +++ b/qt6/network/gen_qsslkey.go @@ -38,24 +38,19 @@ func newQSslKey(h *C.QSslKey) *QSslKey { if h == nil { return nil } + return &QSslKey{h: h} } // UnsafeNewQSslKey constructs the type using only unsafe pointers. func UnsafeNewQSslKey(h unsafe.Pointer) *QSslKey { - if h == nil { - return nil - } - - return &QSslKey{h: (*C.QSslKey)(h)} + return newQSslKey((*C.QSslKey)(h)) } // NewQSslKey constructs a new QSslKey object. func NewQSslKey() *QSslKey { - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new(&outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new()) ret.isSubclass = true return ret } @@ -65,40 +60,32 @@ func NewQSslKey2(encoded []byte, algorithm QSsl__KeyAlgorithm) *QSslKey { encoded_alias := C.struct_miqt_string{} encoded_alias.data = (*C.char)(unsafe.Pointer(&encoded[0])) encoded_alias.len = C.size_t(len(encoded)) - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new2(encoded_alias, (C.int)(algorithm), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new2(encoded_alias, (C.int)(algorithm))) ret.isSubclass = true return ret } // NewQSslKey3 constructs a new QSslKey object. func NewQSslKey3(device *qt6.QIODevice, algorithm QSsl__KeyAlgorithm) *QSslKey { - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new3((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new3((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm))) ret.isSubclass = true return ret } // NewQSslKey4 constructs a new QSslKey object. func NewQSslKey4(handle unsafe.Pointer) *QSslKey { - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new4(handle, &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new4(handle)) ret.isSubclass = true return ret } // NewQSslKey5 constructs a new QSslKey object. func NewQSslKey5(other *QSslKey) *QSslKey { - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new5(other.cPointer(), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new5(other.cPointer())) ret.isSubclass = true return ret } @@ -108,10 +95,8 @@ func NewQSslKey6(encoded []byte, algorithm QSsl__KeyAlgorithm, format QSsl__Enco encoded_alias := C.struct_miqt_string{} encoded_alias.data = (*C.char)(unsafe.Pointer(&encoded[0])) encoded_alias.len = C.size_t(len(encoded)) - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new6(encoded_alias, (C.int)(algorithm), (C.int)(format), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new6(encoded_alias, (C.int)(algorithm), (C.int)(format))) ret.isSubclass = true return ret } @@ -121,10 +106,8 @@ func NewQSslKey7(encoded []byte, algorithm QSsl__KeyAlgorithm, format QSsl__Enco encoded_alias := C.struct_miqt_string{} encoded_alias.data = (*C.char)(unsafe.Pointer(&encoded[0])) encoded_alias.len = C.size_t(len(encoded)) - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new7(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new7(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -137,30 +120,24 @@ func NewQSslKey8(encoded []byte, algorithm QSsl__KeyAlgorithm, format QSsl__Enco passPhrase_alias := C.struct_miqt_string{} passPhrase_alias.data = (*C.char)(unsafe.Pointer(&passPhrase[0])) passPhrase_alias.len = C.size_t(len(passPhrase)) - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new8(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias, &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new8(encoded_alias, (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias)) ret.isSubclass = true return ret } // NewQSslKey9 constructs a new QSslKey object. func NewQSslKey9(device *qt6.QIODevice, algorithm QSsl__KeyAlgorithm, format QSsl__EncodingFormat) *QSslKey { - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new9((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new9((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format))) ret.isSubclass = true return ret } // NewQSslKey10 constructs a new QSslKey object. func NewQSslKey10(device *qt6.QIODevice, algorithm QSsl__KeyAlgorithm, format QSsl__EncodingFormat, typeVal QSsl__KeyType) *QSslKey { - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new10((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new10((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal))) ret.isSubclass = true return ret } @@ -170,20 +147,16 @@ func NewQSslKey11(device *qt6.QIODevice, algorithm QSsl__KeyAlgorithm, format QS passPhrase_alias := C.struct_miqt_string{} passPhrase_alias.data = (*C.char)(unsafe.Pointer(&passPhrase[0])) passPhrase_alias.len = C.size_t(len(passPhrase)) - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new11((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias, &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new11((*C.QIODevice)(device.UnsafePointer()), (C.int)(algorithm), (C.int)(format), (C.int)(typeVal), passPhrase_alias)) ret.isSubclass = true return ret } // NewQSslKey12 constructs a new QSslKey object. func NewQSslKey12(handle unsafe.Pointer, typeVal QSsl__KeyType) *QSslKey { - var outptr_QSslKey *C.QSslKey = nil - C.QSslKey_new12(handle, (C.int)(typeVal), &outptr_QSslKey) - ret := newQSslKey(outptr_QSslKey) + ret := newQSslKey(C.QSslKey_new12(handle, (C.int)(typeVal))) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qsslkey.h b/qt6/network/gen_qsslkey.h index 827f7f35..9eab6442 100644 --- a/qt6/network/gen_qsslkey.h +++ b/qt6/network/gen_qsslkey.h @@ -22,18 +22,18 @@ typedef struct QIODevice QIODevice; typedef struct QSslKey QSslKey; #endif -void QSslKey_new(QSslKey** outptr_QSslKey); -void QSslKey_new2(struct miqt_string encoded, int algorithm, QSslKey** outptr_QSslKey); -void QSslKey_new3(QIODevice* device, int algorithm, QSslKey** outptr_QSslKey); -void QSslKey_new4(void* handle, QSslKey** outptr_QSslKey); -void QSslKey_new5(QSslKey* other, QSslKey** outptr_QSslKey); -void QSslKey_new6(struct miqt_string encoded, int algorithm, int format, QSslKey** outptr_QSslKey); -void QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey); -void QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey); -void QSslKey_new9(QIODevice* device, int algorithm, int format, QSslKey** outptr_QSslKey); -void QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal, QSslKey** outptr_QSslKey); -void QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase, QSslKey** outptr_QSslKey); -void QSslKey_new12(void* handle, int typeVal, QSslKey** outptr_QSslKey); +QSslKey* QSslKey_new(); +QSslKey* QSslKey_new2(struct miqt_string encoded, int algorithm); +QSslKey* QSslKey_new3(QIODevice* device, int algorithm); +QSslKey* QSslKey_new4(void* handle); +QSslKey* QSslKey_new5(QSslKey* other); +QSslKey* QSslKey_new6(struct miqt_string encoded, int algorithm, int format); +QSslKey* QSslKey_new7(struct miqt_string encoded, int algorithm, int format, int typeVal); +QSslKey* QSslKey_new8(struct miqt_string encoded, int algorithm, int format, int typeVal, struct miqt_string passPhrase); +QSslKey* QSslKey_new9(QIODevice* device, int algorithm, int format); +QSslKey* QSslKey_new10(QIODevice* device, int algorithm, int format, int typeVal); +QSslKey* QSslKey_new11(QIODevice* device, int algorithm, int format, int typeVal, struct miqt_string passPhrase); +QSslKey* QSslKey_new12(void* handle, int typeVal); void QSslKey_OperatorAssign(QSslKey* self, QSslKey* other); void QSslKey_Swap(QSslKey* self, QSslKey* other); bool QSslKey_IsNull(const QSslKey* self); diff --git a/qt6/network/gen_qsslpresharedkeyauthenticator.cpp b/qt6/network/gen_qsslpresharedkeyauthenticator.cpp index b54b3773..9bf87597 100644 --- a/qt6/network/gen_qsslpresharedkeyauthenticator.cpp +++ b/qt6/network/gen_qsslpresharedkeyauthenticator.cpp @@ -4,14 +4,12 @@ #include "gen_qsslpresharedkeyauthenticator.h" #include "_cgo_export.h" -void QSslPreSharedKeyAuthenticator_new(QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator) { - QSslPreSharedKeyAuthenticator* ret = new QSslPreSharedKeyAuthenticator(); - *outptr_QSslPreSharedKeyAuthenticator = ret; +QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new() { + return new QSslPreSharedKeyAuthenticator(); } -void QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator, QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator) { - QSslPreSharedKeyAuthenticator* ret = new QSslPreSharedKeyAuthenticator(*authenticator); - *outptr_QSslPreSharedKeyAuthenticator = ret; +QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator) { + return new QSslPreSharedKeyAuthenticator(*authenticator); } void QSslPreSharedKeyAuthenticator_OperatorAssign(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* authenticator) { diff --git a/qt6/network/gen_qsslpresharedkeyauthenticator.go b/qt6/network/gen_qsslpresharedkeyauthenticator.go index 1f542514..c1aa8d01 100644 --- a/qt6/network/gen_qsslpresharedkeyauthenticator.go +++ b/qt6/network/gen_qsslpresharedkeyauthenticator.go @@ -37,34 +37,27 @@ func newQSslPreSharedKeyAuthenticator(h *C.QSslPreSharedKeyAuthenticator) *QSslP if h == nil { return nil } + return &QSslPreSharedKeyAuthenticator{h: h} } // UnsafeNewQSslPreSharedKeyAuthenticator constructs the type using only unsafe pointers. func UnsafeNewQSslPreSharedKeyAuthenticator(h unsafe.Pointer) *QSslPreSharedKeyAuthenticator { - if h == nil { - return nil - } - - return &QSslPreSharedKeyAuthenticator{h: (*C.QSslPreSharedKeyAuthenticator)(h)} + return newQSslPreSharedKeyAuthenticator((*C.QSslPreSharedKeyAuthenticator)(h)) } // NewQSslPreSharedKeyAuthenticator constructs a new QSslPreSharedKeyAuthenticator object. func NewQSslPreSharedKeyAuthenticator() *QSslPreSharedKeyAuthenticator { - var outptr_QSslPreSharedKeyAuthenticator *C.QSslPreSharedKeyAuthenticator = nil - C.QSslPreSharedKeyAuthenticator_new(&outptr_QSslPreSharedKeyAuthenticator) - ret := newQSslPreSharedKeyAuthenticator(outptr_QSslPreSharedKeyAuthenticator) + ret := newQSslPreSharedKeyAuthenticator(C.QSslPreSharedKeyAuthenticator_new()) ret.isSubclass = true return ret } // NewQSslPreSharedKeyAuthenticator2 constructs a new QSslPreSharedKeyAuthenticator object. func NewQSslPreSharedKeyAuthenticator2(authenticator *QSslPreSharedKeyAuthenticator) *QSslPreSharedKeyAuthenticator { - var outptr_QSslPreSharedKeyAuthenticator *C.QSslPreSharedKeyAuthenticator = nil - C.QSslPreSharedKeyAuthenticator_new2(authenticator.cPointer(), &outptr_QSslPreSharedKeyAuthenticator) - ret := newQSslPreSharedKeyAuthenticator(outptr_QSslPreSharedKeyAuthenticator) + ret := newQSslPreSharedKeyAuthenticator(C.QSslPreSharedKeyAuthenticator_new2(authenticator.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qsslpresharedkeyauthenticator.h b/qt6/network/gen_qsslpresharedkeyauthenticator.h index 4df336f1..4a3390cf 100644 --- a/qt6/network/gen_qsslpresharedkeyauthenticator.h +++ b/qt6/network/gen_qsslpresharedkeyauthenticator.h @@ -20,8 +20,8 @@ class QSslPreSharedKeyAuthenticator; typedef struct QSslPreSharedKeyAuthenticator QSslPreSharedKeyAuthenticator; #endif -void QSslPreSharedKeyAuthenticator_new(QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator); -void QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator, QSslPreSharedKeyAuthenticator** outptr_QSslPreSharedKeyAuthenticator); +QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new(); +QSslPreSharedKeyAuthenticator* QSslPreSharedKeyAuthenticator_new2(QSslPreSharedKeyAuthenticator* authenticator); void QSslPreSharedKeyAuthenticator_OperatorAssign(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* authenticator); void QSslPreSharedKeyAuthenticator_Swap(QSslPreSharedKeyAuthenticator* self, QSslPreSharedKeyAuthenticator* other); struct miqt_string QSslPreSharedKeyAuthenticator_IdentityHint(const QSslPreSharedKeyAuthenticator* self); diff --git a/qt6/network/gen_qsslserver.cpp b/qt6/network/gen_qsslserver.cpp index 313083dd..c2a837db 100644 --- a/qt6/network/gen_qsslserver.cpp +++ b/qt6/network/gen_qsslserver.cpp @@ -94,18 +94,16 @@ public: }; -void QSslServer_new(QSslServer** outptr_QSslServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { - MiqtVirtualQSslServer* ret = new MiqtVirtualQSslServer(); - *outptr_QSslServer = ret; - *outptr_QTcpServer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSslServer* QSslServer_new() { + return new MiqtVirtualQSslServer(); } -void QSslServer_new2(QObject* parent, QSslServer** outptr_QSslServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { - MiqtVirtualQSslServer* ret = new MiqtVirtualQSslServer(parent); - *outptr_QSslServer = ret; - *outptr_QTcpServer = static_cast(ret); - *outptr_QObject = static_cast(ret); +QSslServer* QSslServer_new2(QObject* parent) { + return new MiqtVirtualQSslServer(parent); +} + +void QSslServer_virtbase(QSslServer* src, QTcpServer** outptr_QTcpServer) { + *outptr_QTcpServer = static_cast(src); } QMetaObject* QSslServer_MetaObject(const QSslServer* self) { diff --git a/qt6/network/gen_qsslserver.go b/qt6/network/gen_qsslserver.go index f3fc7328..0cbef2b1 100644 --- a/qt6/network/gen_qsslserver.go +++ b/qt6/network/gen_qsslserver.go @@ -36,44 +36,34 @@ func (this *QSslServer) UnsafePointer() unsafe.Pointer { } // newQSslServer constructs the type using only CGO pointers. -func newQSslServer(h *C.QSslServer, h_QTcpServer *C.QTcpServer, h_QObject *C.QObject) *QSslServer { +func newQSslServer(h *C.QSslServer) *QSslServer { if h == nil { return nil } + var outptr_QTcpServer *C.QTcpServer = nil + C.QSslServer_virtbase(h, &outptr_QTcpServer) + return &QSslServer{h: h, - QTcpServer: newQTcpServer(h_QTcpServer, h_QObject)} + QTcpServer: newQTcpServer(outptr_QTcpServer)} } // UnsafeNewQSslServer constructs the type using only unsafe pointers. -func UnsafeNewQSslServer(h unsafe.Pointer, h_QTcpServer unsafe.Pointer, h_QObject unsafe.Pointer) *QSslServer { - if h == nil { - return nil - } - - return &QSslServer{h: (*C.QSslServer)(h), - QTcpServer: UnsafeNewQTcpServer(h_QTcpServer, h_QObject)} +func UnsafeNewQSslServer(h unsafe.Pointer) *QSslServer { + return newQSslServer((*C.QSslServer)(h)) } // NewQSslServer constructs a new QSslServer object. func NewQSslServer() *QSslServer { - var outptr_QSslServer *C.QSslServer = nil - var outptr_QTcpServer *C.QTcpServer = nil - var outptr_QObject *C.QObject = nil - C.QSslServer_new(&outptr_QSslServer, &outptr_QTcpServer, &outptr_QObject) - ret := newQSslServer(outptr_QSslServer, outptr_QTcpServer, outptr_QObject) + ret := newQSslServer(C.QSslServer_new()) ret.isSubclass = true return ret } // NewQSslServer2 constructs a new QSslServer object. func NewQSslServer2(parent *qt6.QObject) *QSslServer { - var outptr_QSslServer *C.QSslServer = nil - var outptr_QTcpServer *C.QTcpServer = nil - var outptr_QObject *C.QObject = nil - C.QSslServer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QSslServer, &outptr_QTcpServer, &outptr_QObject) - ret := newQSslServer(outptr_QSslServer, outptr_QTcpServer, outptr_QObject) + ret := newQSslServer(C.QSslServer_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -136,7 +126,7 @@ func miqt_exec_callback_QSslServer_SslErrors(cb C.intptr_t, socket *C.QSslSocket } // Convert all CABI parameters to Go parameters - slotval1 := newQSslSocket(socket, nil, nil, nil, nil, nil) + slotval1 := newQSslSocket(socket) var errors_ma C.struct_miqt_array = errors errors_ret := make([]QSslError, int(errors_ma.len)) @@ -166,7 +156,7 @@ func miqt_exec_callback_QSslServer_PeerVerifyError(cb C.intptr_t, socket *C.QSsl } // Convert all CABI parameters to Go parameters - slotval1 := newQSslSocket(socket, nil, nil, nil, nil, nil) + slotval1 := newQSslSocket(socket) slotval2 := newQSslError(error) @@ -188,7 +178,7 @@ func miqt_exec_callback_QSslServer_ErrorOccurred(cb C.intptr_t, socket *C.QSslSo } // Convert all CABI parameters to Go parameters - slotval1 := newQSslSocket(socket, nil, nil, nil, nil, nil) + slotval1 := newQSslSocket(socket) slotval2 := (QAbstractSocket__SocketError)(error) @@ -210,7 +200,7 @@ func miqt_exec_callback_QSslServer_PreSharedKeyAuthenticationRequired(cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := newQSslSocket(socket, nil, nil, nil, nil, nil) + slotval1 := newQSslSocket(socket) slotval2 := newQSslPreSharedKeyAuthenticator(authenticator) @@ -236,7 +226,7 @@ func miqt_exec_callback_QSslServer_AlertSent(cb C.intptr_t, socket *C.QSslSocket } // Convert all CABI parameters to Go parameters - slotval1 := newQSslSocket(socket, nil, nil, nil, nil, nil) + slotval1 := newQSslSocket(socket) slotval2 := (QSsl__AlertLevel)(level) @@ -269,7 +259,7 @@ func miqt_exec_callback_QSslServer_AlertReceived(cb C.intptr_t, socket *C.QSslSo } // Convert all CABI parameters to Go parameters - slotval1 := newQSslSocket(socket, nil, nil, nil, nil, nil) + slotval1 := newQSslSocket(socket) slotval2 := (QSsl__AlertLevel)(level) @@ -298,7 +288,7 @@ func miqt_exec_callback_QSslServer_HandshakeInterruptedOnError(cb C.intptr_t, so } // Convert all CABI parameters to Go parameters - slotval1 := newQSslSocket(socket, nil, nil, nil, nil, nil) + slotval1 := newQSslSocket(socket) slotval2 := newQSslError(error) @@ -320,7 +310,7 @@ func miqt_exec_callback_QSslServer_StartedEncryptionHandshake(cb C.intptr_t, soc } // Convert all CABI parameters to Go parameters - slotval1 := newQSslSocket(socket, nil, nil, nil, nil, nil) + slotval1 := newQSslSocket(socket) gofunc(slotval1) } @@ -400,7 +390,7 @@ func miqt_exec_callback_QSslServer_HasPendingConnections(self *C.QSslServer, cb func (this *QSslServer) callVirtualBase_NextPendingConnection() *QTcpSocket { - return newQTcpSocket(C.QSslServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h)), nil, nil, nil, nil) + return newQTcpSocket(C.QSslServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h))) } func (this *QSslServer) OnNextPendingConnection(slot func(super func() *QTcpSocket) *QTcpSocket) { diff --git a/qt6/network/gen_qsslserver.h b/qt6/network/gen_qsslserver.h index 2c35a60b..ff273d6f 100644 --- a/qt6/network/gen_qsslserver.h +++ b/qt6/network/gen_qsslserver.h @@ -36,8 +36,9 @@ typedef struct QTcpServer QTcpServer; typedef struct QTcpSocket QTcpSocket; #endif -void QSslServer_new(QSslServer** outptr_QSslServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); -void QSslServer_new2(QObject* parent, QSslServer** outptr_QSslServer, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); +QSslServer* QSslServer_new(); +QSslServer* QSslServer_new2(QObject* parent); +void QSslServer_virtbase(QSslServer* src, QTcpServer** outptr_QTcpServer); QMetaObject* QSslServer_MetaObject(const QSslServer* self); void* QSslServer_Metacast(QSslServer* self, const char* param1); struct miqt_string QSslServer_Tr(const char* s); diff --git a/qt6/network/gen_qsslsocket.cpp b/qt6/network/gen_qsslsocket.cpp index 69aefa6a..8240f6d6 100644 --- a/qt6/network/gen_qsslsocket.cpp +++ b/qt6/network/gen_qsslsocket.cpp @@ -503,24 +503,16 @@ public: }; -void QSslSocket_new(QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQSslSocket* ret = new MiqtVirtualQSslSocket(); - *outptr_QSslSocket = ret; - *outptr_QTcpSocket = static_cast(ret); - *outptr_QAbstractSocket = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QSslSocket* QSslSocket_new() { + return new MiqtVirtualQSslSocket(); } -void QSslSocket_new2(QObject* parent, QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQSslSocket* ret = new MiqtVirtualQSslSocket(parent); - *outptr_QSslSocket = ret; - *outptr_QTcpSocket = static_cast(ret); - *outptr_QAbstractSocket = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QSslSocket* QSslSocket_new2(QObject* parent) { + return new MiqtVirtualQSslSocket(parent); +} + +void QSslSocket_virtbase(QSslSocket* src, QTcpSocket** outptr_QTcpSocket) { + *outptr_QTcpSocket = static_cast(src); } QMetaObject* QSslSocket_MetaObject(const QSslSocket* self) { diff --git a/qt6/network/gen_qsslsocket.go b/qt6/network/gen_qsslsocket.go index f902fb6d..885cd41f 100644 --- a/qt6/network/gen_qsslsocket.go +++ b/qt6/network/gen_qsslsocket.go @@ -53,50 +53,34 @@ func (this *QSslSocket) UnsafePointer() unsafe.Pointer { } // newQSslSocket constructs the type using only CGO pointers. -func newQSslSocket(h *C.QSslSocket, h_QTcpSocket *C.QTcpSocket, h_QAbstractSocket *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QSslSocket { +func newQSslSocket(h *C.QSslSocket) *QSslSocket { if h == nil { return nil } + var outptr_QTcpSocket *C.QTcpSocket = nil + C.QSslSocket_virtbase(h, &outptr_QTcpSocket) + return &QSslSocket{h: h, - QTcpSocket: newQTcpSocket(h_QTcpSocket, h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} + QTcpSocket: newQTcpSocket(outptr_QTcpSocket)} } // UnsafeNewQSslSocket constructs the type using only unsafe pointers. -func UnsafeNewQSslSocket(h unsafe.Pointer, h_QTcpSocket unsafe.Pointer, h_QAbstractSocket unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QSslSocket { - if h == nil { - return nil - } - - return &QSslSocket{h: (*C.QSslSocket)(h), - QTcpSocket: UnsafeNewQTcpSocket(h_QTcpSocket, h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} +func UnsafeNewQSslSocket(h unsafe.Pointer) *QSslSocket { + return newQSslSocket((*C.QSslSocket)(h)) } // NewQSslSocket constructs a new QSslSocket object. func NewQSslSocket() *QSslSocket { - var outptr_QSslSocket *C.QSslSocket = nil - var outptr_QTcpSocket *C.QTcpSocket = nil - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QSslSocket_new(&outptr_QSslSocket, &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQSslSocket(outptr_QSslSocket, outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQSslSocket(C.QSslSocket_new()) ret.isSubclass = true return ret } // NewQSslSocket2 constructs a new QSslSocket object. func NewQSslSocket2(parent *qt6.QObject) *QSslSocket { - var outptr_QSslSocket *C.QSslSocket = nil - var outptr_QTcpSocket *C.QTcpSocket = nil - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QSslSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QSslSocket, &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQSslSocket(outptr_QSslSocket, outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQSslSocket(C.QSslSocket_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qsslsocket.h b/qt6/network/gen_qsslsocket.h index 65e68824..f2ab6aa2 100644 --- a/qt6/network/gen_qsslsocket.h +++ b/qt6/network/gen_qsslsocket.h @@ -48,8 +48,9 @@ typedef struct QTcpSocket QTcpSocket; typedef struct QVariant QVariant; #endif -void QSslSocket_new(QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QSslSocket_new2(QObject* parent, QSslSocket** outptr_QSslSocket, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +QSslSocket* QSslSocket_new(); +QSslSocket* QSslSocket_new2(QObject* parent); +void QSslSocket_virtbase(QSslSocket* src, QTcpSocket** outptr_QTcpSocket); QMetaObject* QSslSocket_MetaObject(const QSslSocket* self); void* QSslSocket_Metacast(QSslSocket* self, const char* param1); struct miqt_string QSslSocket_Tr(const char* s); diff --git a/qt6/network/gen_qtcpserver.cpp b/qt6/network/gen_qtcpserver.cpp index 86bf8dfb..dbff3a80 100644 --- a/qt6/network/gen_qtcpserver.cpp +++ b/qt6/network/gen_qtcpserver.cpp @@ -265,16 +265,16 @@ public: }; -void QTcpServer_new(QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { - MiqtVirtualQTcpServer* ret = new MiqtVirtualQTcpServer(); - *outptr_QTcpServer = ret; - *outptr_QObject = static_cast(ret); +QTcpServer* QTcpServer_new() { + return new MiqtVirtualQTcpServer(); } -void QTcpServer_new2(QObject* parent, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject) { - MiqtVirtualQTcpServer* ret = new MiqtVirtualQTcpServer(parent); - *outptr_QTcpServer = ret; - *outptr_QObject = static_cast(ret); +QTcpServer* QTcpServer_new2(QObject* parent) { + return new MiqtVirtualQTcpServer(parent); +} + +void QTcpServer_virtbase(QTcpServer* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QTcpServer_MetaObject(const QTcpServer* self) { diff --git a/qt6/network/gen_qtcpserver.go b/qt6/network/gen_qtcpserver.go index d1c28ad2..dfaa6083 100644 --- a/qt6/network/gen_qtcpserver.go +++ b/qt6/network/gen_qtcpserver.go @@ -36,42 +36,34 @@ func (this *QTcpServer) UnsafePointer() unsafe.Pointer { } // newQTcpServer constructs the type using only CGO pointers. -func newQTcpServer(h *C.QTcpServer, h_QObject *C.QObject) *QTcpServer { +func newQTcpServer(h *C.QTcpServer) *QTcpServer { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QTcpServer_virtbase(h, &outptr_QObject) + return &QTcpServer{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQTcpServer constructs the type using only unsafe pointers. -func UnsafeNewQTcpServer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QTcpServer { - if h == nil { - return nil - } - - return &QTcpServer{h: (*C.QTcpServer)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQTcpServer(h unsafe.Pointer) *QTcpServer { + return newQTcpServer((*C.QTcpServer)(h)) } // NewQTcpServer constructs a new QTcpServer object. func NewQTcpServer() *QTcpServer { - var outptr_QTcpServer *C.QTcpServer = nil - var outptr_QObject *C.QObject = nil - C.QTcpServer_new(&outptr_QTcpServer, &outptr_QObject) - ret := newQTcpServer(outptr_QTcpServer, outptr_QObject) + ret := newQTcpServer(C.QTcpServer_new()) ret.isSubclass = true return ret } // NewQTcpServer2 constructs a new QTcpServer object. func NewQTcpServer2(parent *qt6.QObject) *QTcpServer { - var outptr_QTcpServer *C.QTcpServer = nil - var outptr_QObject *C.QObject = nil - C.QTcpServer_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QTcpServer, &outptr_QObject) - ret := newQTcpServer(outptr_QTcpServer, outptr_QObject) + ret := newQTcpServer(C.QTcpServer_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -150,7 +142,7 @@ func (this *QTcpServer) HasPendingConnections() bool { } func (this *QTcpServer) NextPendingConnection() *QTcpSocket { - return newQTcpSocket(C.QTcpServer_NextPendingConnection(this.h), nil, nil, nil, nil) + return newQTcpSocket(C.QTcpServer_NextPendingConnection(this.h)) } func (this *QTcpServer) ServerError() QAbstractSocket__SocketError { @@ -284,7 +276,7 @@ func miqt_exec_callback_QTcpServer_HasPendingConnections(self *C.QTcpServer, cb func (this *QTcpServer) callVirtualBase_NextPendingConnection() *QTcpSocket { - return newQTcpSocket(C.QTcpServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h)), nil, nil, nil, nil) + return newQTcpSocket(C.QTcpServer_virtualbase_NextPendingConnection(unsafe.Pointer(this.h))) } func (this *QTcpServer) OnNextPendingConnection(slot func(super func() *QTcpSocket) *QTcpSocket) { @@ -411,7 +403,7 @@ func miqt_exec_callback_QTcpServer_TimerEvent(self *C.QTcpServer, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QTcpServer{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -437,7 +429,7 @@ func miqt_exec_callback_QTcpServer_ChildEvent(self *C.QTcpServer, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QTcpServer{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/network/gen_qtcpserver.h b/qt6/network/gen_qtcpserver.h index 40f19602..c28d9898 100644 --- a/qt6/network/gen_qtcpserver.h +++ b/qt6/network/gen_qtcpserver.h @@ -38,8 +38,9 @@ typedef struct QTcpSocket QTcpSocket; typedef struct QTimerEvent QTimerEvent; #endif -void QTcpServer_new(QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); -void QTcpServer_new2(QObject* parent, QTcpServer** outptr_QTcpServer, QObject** outptr_QObject); +QTcpServer* QTcpServer_new(); +QTcpServer* QTcpServer_new2(QObject* parent); +void QTcpServer_virtbase(QTcpServer* src, QObject** outptr_QObject); QMetaObject* QTcpServer_MetaObject(const QTcpServer* self); void* QTcpServer_Metacast(QTcpServer* self, const char* param1); struct miqt_string QTcpServer_Tr(const char* s); diff --git a/qt6/network/gen_qtcpsocket.cpp b/qt6/network/gen_qtcpsocket.cpp index c5af076a..af4d48cb 100644 --- a/qt6/network/gen_qtcpsocket.cpp +++ b/qt6/network/gen_qtcpsocket.cpp @@ -550,22 +550,16 @@ public: }; -void QTcpSocket_new(QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQTcpSocket* ret = new MiqtVirtualQTcpSocket(); - *outptr_QTcpSocket = ret; - *outptr_QAbstractSocket = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QTcpSocket* QTcpSocket_new() { + return new MiqtVirtualQTcpSocket(); } -void QTcpSocket_new2(QObject* parent, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQTcpSocket* ret = new MiqtVirtualQTcpSocket(parent); - *outptr_QTcpSocket = ret; - *outptr_QAbstractSocket = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QTcpSocket* QTcpSocket_new2(QObject* parent) { + return new MiqtVirtualQTcpSocket(parent); +} + +void QTcpSocket_virtbase(QTcpSocket* src, QAbstractSocket** outptr_QAbstractSocket) { + *outptr_QAbstractSocket = static_cast(src); } QMetaObject* QTcpSocket_MetaObject(const QTcpSocket* self) { diff --git a/qt6/network/gen_qtcpsocket.go b/qt6/network/gen_qtcpsocket.go index d422212f..902d69eb 100644 --- a/qt6/network/gen_qtcpsocket.go +++ b/qt6/network/gen_qtcpsocket.go @@ -36,48 +36,34 @@ func (this *QTcpSocket) UnsafePointer() unsafe.Pointer { } // newQTcpSocket constructs the type using only CGO pointers. -func newQTcpSocket(h *C.QTcpSocket, h_QAbstractSocket *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QTcpSocket { +func newQTcpSocket(h *C.QTcpSocket) *QTcpSocket { if h == nil { return nil } + var outptr_QAbstractSocket *C.QAbstractSocket = nil + C.QTcpSocket_virtbase(h, &outptr_QAbstractSocket) + return &QTcpSocket{h: h, - QAbstractSocket: newQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} + QAbstractSocket: newQAbstractSocket(outptr_QAbstractSocket)} } // UnsafeNewQTcpSocket constructs the type using only unsafe pointers. -func UnsafeNewQTcpSocket(h unsafe.Pointer, h_QAbstractSocket unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QTcpSocket { - if h == nil { - return nil - } - - return &QTcpSocket{h: (*C.QTcpSocket)(h), - QAbstractSocket: UnsafeNewQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} +func UnsafeNewQTcpSocket(h unsafe.Pointer) *QTcpSocket { + return newQTcpSocket((*C.QTcpSocket)(h)) } // NewQTcpSocket constructs a new QTcpSocket object. func NewQTcpSocket() *QTcpSocket { - var outptr_QTcpSocket *C.QTcpSocket = nil - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QTcpSocket_new(&outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQTcpSocket(outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQTcpSocket(C.QTcpSocket_new()) ret.isSubclass = true return ret } // NewQTcpSocket2 constructs a new QTcpSocket object. func NewQTcpSocket2(parent *qt6.QObject) *QTcpSocket { - var outptr_QTcpSocket *C.QTcpSocket = nil - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QTcpSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QTcpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQTcpSocket(outptr_QTcpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQTcpSocket(C.QTcpSocket_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qtcpsocket.h b/qt6/network/gen_qtcpsocket.h index 535ab9c4..b4a1e3f6 100644 --- a/qt6/network/gen_qtcpsocket.h +++ b/qt6/network/gen_qtcpsocket.h @@ -34,8 +34,9 @@ typedef struct QTcpSocket QTcpSocket; typedef struct QVariant QVariant; #endif -void QTcpSocket_new(QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QTcpSocket_new2(QObject* parent, QTcpSocket** outptr_QTcpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +QTcpSocket* QTcpSocket_new(); +QTcpSocket* QTcpSocket_new2(QObject* parent); +void QTcpSocket_virtbase(QTcpSocket* src, QAbstractSocket** outptr_QAbstractSocket); QMetaObject* QTcpSocket_MetaObject(const QTcpSocket* self); void* QTcpSocket_Metacast(QTcpSocket* self, const char* param1); struct miqt_string QTcpSocket_Tr(const char* s); diff --git a/qt6/network/gen_qudpsocket.cpp b/qt6/network/gen_qudpsocket.cpp index 93193bfa..f9682798 100644 --- a/qt6/network/gen_qudpsocket.cpp +++ b/qt6/network/gen_qudpsocket.cpp @@ -553,22 +553,16 @@ public: }; -void QUdpSocket_new(QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQUdpSocket* ret = new MiqtVirtualQUdpSocket(); - *outptr_QUdpSocket = ret; - *outptr_QAbstractSocket = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QUdpSocket* QUdpSocket_new() { + return new MiqtVirtualQUdpSocket(); } -void QUdpSocket_new2(QObject* parent, QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase) { - MiqtVirtualQUdpSocket* ret = new MiqtVirtualQUdpSocket(parent); - *outptr_QUdpSocket = ret; - *outptr_QAbstractSocket = static_cast(ret); - *outptr_QIODevice = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QIODeviceBase = static_cast(ret); +QUdpSocket* QUdpSocket_new2(QObject* parent) { + return new MiqtVirtualQUdpSocket(parent); +} + +void QUdpSocket_virtbase(QUdpSocket* src, QAbstractSocket** outptr_QAbstractSocket) { + *outptr_QAbstractSocket = static_cast(src); } QMetaObject* QUdpSocket_MetaObject(const QUdpSocket* self) { diff --git a/qt6/network/gen_qudpsocket.go b/qt6/network/gen_qudpsocket.go index 72d6b3b1..c3cd37b7 100644 --- a/qt6/network/gen_qudpsocket.go +++ b/qt6/network/gen_qudpsocket.go @@ -36,48 +36,34 @@ func (this *QUdpSocket) UnsafePointer() unsafe.Pointer { } // newQUdpSocket constructs the type using only CGO pointers. -func newQUdpSocket(h *C.QUdpSocket, h_QAbstractSocket *C.QAbstractSocket, h_QIODevice *C.QIODevice, h_QObject *C.QObject, h_QIODeviceBase *C.QIODeviceBase) *QUdpSocket { +func newQUdpSocket(h *C.QUdpSocket) *QUdpSocket { if h == nil { return nil } + var outptr_QAbstractSocket *C.QAbstractSocket = nil + C.QUdpSocket_virtbase(h, &outptr_QAbstractSocket) + return &QUdpSocket{h: h, - QAbstractSocket: newQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} + QAbstractSocket: newQAbstractSocket(outptr_QAbstractSocket)} } // UnsafeNewQUdpSocket constructs the type using only unsafe pointers. -func UnsafeNewQUdpSocket(h unsafe.Pointer, h_QAbstractSocket unsafe.Pointer, h_QIODevice unsafe.Pointer, h_QObject unsafe.Pointer, h_QIODeviceBase unsafe.Pointer) *QUdpSocket { - if h == nil { - return nil - } - - return &QUdpSocket{h: (*C.QUdpSocket)(h), - QAbstractSocket: UnsafeNewQAbstractSocket(h_QAbstractSocket, h_QIODevice, h_QObject, h_QIODeviceBase)} +func UnsafeNewQUdpSocket(h unsafe.Pointer) *QUdpSocket { + return newQUdpSocket((*C.QUdpSocket)(h)) } // NewQUdpSocket constructs a new QUdpSocket object. func NewQUdpSocket() *QUdpSocket { - var outptr_QUdpSocket *C.QUdpSocket = nil - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QUdpSocket_new(&outptr_QUdpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQUdpSocket(outptr_QUdpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQUdpSocket(C.QUdpSocket_new()) ret.isSubclass = true return ret } // NewQUdpSocket2 constructs a new QUdpSocket object. func NewQUdpSocket2(parent *qt6.QObject) *QUdpSocket { - var outptr_QUdpSocket *C.QUdpSocket = nil - var outptr_QAbstractSocket *C.QAbstractSocket = nil - var outptr_QIODevice *C.QIODevice = nil - var outptr_QObject *C.QObject = nil - var outptr_QIODeviceBase *C.QIODeviceBase = nil - C.QUdpSocket_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QUdpSocket, &outptr_QAbstractSocket, &outptr_QIODevice, &outptr_QObject, &outptr_QIODeviceBase) - ret := newQUdpSocket(outptr_QUdpSocket, outptr_QAbstractSocket, outptr_QIODevice, outptr_QObject, outptr_QIODeviceBase) + ret := newQUdpSocket(C.QUdpSocket_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt6/network/gen_qudpsocket.h b/qt6/network/gen_qudpsocket.h index d155dcc2..e8e9bd0b 100644 --- a/qt6/network/gen_qudpsocket.h +++ b/qt6/network/gen_qudpsocket.h @@ -38,8 +38,9 @@ typedef struct QUdpSocket QUdpSocket; typedef struct QVariant QVariant; #endif -void QUdpSocket_new(QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); -void QUdpSocket_new2(QObject* parent, QUdpSocket** outptr_QUdpSocket, QAbstractSocket** outptr_QAbstractSocket, QIODevice** outptr_QIODevice, QObject** outptr_QObject, QIODeviceBase** outptr_QIODeviceBase); +QUdpSocket* QUdpSocket_new(); +QUdpSocket* QUdpSocket_new2(QObject* parent); +void QUdpSocket_virtbase(QUdpSocket* src, QAbstractSocket** outptr_QAbstractSocket); QMetaObject* QUdpSocket_MetaObject(const QUdpSocket* self); void* QUdpSocket_Metacast(QUdpSocket* self, const char* param1); struct miqt_string QUdpSocket_Tr(const char* s); diff --git a/qt6/printsupport/gen_qabstractprintdialog.cpp b/qt6/printsupport/gen_qabstractprintdialog.cpp index b8283ec1..6aec0cce 100644 --- a/qt6/printsupport/gen_qabstractprintdialog.cpp +++ b/qt6/printsupport/gen_qabstractprintdialog.cpp @@ -357,22 +357,16 @@ public: }; -void QAbstractPrintDialog_new(QPrinter* printer, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractPrintDialog* ret = new MiqtVirtualQAbstractPrintDialog(printer); - *outptr_QAbstractPrintDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractPrintDialog* QAbstractPrintDialog_new(QPrinter* printer) { + return new MiqtVirtualQAbstractPrintDialog(printer); } -void QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQAbstractPrintDialog* ret = new MiqtVirtualQAbstractPrintDialog(printer, parent); - *outptr_QAbstractPrintDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QAbstractPrintDialog* QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent) { + return new MiqtVirtualQAbstractPrintDialog(printer, parent); +} + +void QAbstractPrintDialog_virtbase(QAbstractPrintDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QAbstractPrintDialog_MetaObject(const QAbstractPrintDialog* self) { diff --git a/qt6/printsupport/gen_qabstractprintdialog.go b/qt6/printsupport/gen_qabstractprintdialog.go index a1640e81..0f521ade 100644 --- a/qt6/printsupport/gen_qabstractprintdialog.go +++ b/qt6/printsupport/gen_qabstractprintdialog.go @@ -56,48 +56,34 @@ func (this *QAbstractPrintDialog) UnsafePointer() unsafe.Pointer { } // newQAbstractPrintDialog constructs the type using only CGO pointers. -func newQAbstractPrintDialog(h *C.QAbstractPrintDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QAbstractPrintDialog { +func newQAbstractPrintDialog(h *C.QAbstractPrintDialog) *QAbstractPrintDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QAbstractPrintDialog_virtbase(h, &outptr_QDialog) + return &QAbstractPrintDialog{h: h, - QDialog: qt6.UnsafeNewQDialog(unsafe.Pointer(h_QDialog), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QDialog: qt6.UnsafeNewQDialog(unsafe.Pointer(outptr_QDialog))} } // UnsafeNewQAbstractPrintDialog constructs the type using only unsafe pointers. -func UnsafeNewQAbstractPrintDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QAbstractPrintDialog { - if h == nil { - return nil - } - - return &QAbstractPrintDialog{h: (*C.QAbstractPrintDialog)(h), - QDialog: qt6.UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQAbstractPrintDialog(h unsafe.Pointer) *QAbstractPrintDialog { + return newQAbstractPrintDialog((*C.QAbstractPrintDialog)(h)) } // NewQAbstractPrintDialog constructs a new QAbstractPrintDialog object. func NewQAbstractPrintDialog(printer *QPrinter) *QAbstractPrintDialog { - var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractPrintDialog_new(printer.cPointer(), &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractPrintDialog(outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractPrintDialog(C.QAbstractPrintDialog_new(printer.cPointer())) ret.isSubclass = true return ret } // NewQAbstractPrintDialog2 constructs a new QAbstractPrintDialog object. func NewQAbstractPrintDialog2(printer *QPrinter, parent *qt6.QWidget) *QAbstractPrintDialog { - var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QAbstractPrintDialog_new2(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQAbstractPrintDialog(outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQAbstractPrintDialog(C.QAbstractPrintDialog_new2(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -164,7 +150,7 @@ func (this *QAbstractPrintDialog) ToPage() int { } func (this *QAbstractPrintDialog) Printer() *QPrinter { - return newQPrinter(C.QAbstractPrintDialog_Printer(this.h), nil, nil) + return newQPrinter(C.QAbstractPrintDialog_Printer(this.h)) } func QAbstractPrintDialog_Tr2(s string, c string) string { @@ -409,7 +395,7 @@ func miqt_exec_callback_QAbstractPrintDialog_KeyPressEvent(self *C.QAbstractPrin } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(param1)) gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -435,7 +421,7 @@ func miqt_exec_callback_QAbstractPrintDialog_CloseEvent(self *C.QAbstractPrintDi } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(param1)) gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -461,7 +447,7 @@ func miqt_exec_callback_QAbstractPrintDialog_ShowEvent(self *C.QAbstractPrintDia } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(param1)) gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -487,7 +473,7 @@ func miqt_exec_callback_QAbstractPrintDialog_ResizeEvent(self *C.QAbstractPrintD } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(param1)) gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -513,7 +499,7 @@ func miqt_exec_callback_QAbstractPrintDialog_ContextMenuEvent(self *C.QAbstractP } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1)) gofunc((&QAbstractPrintDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt6/printsupport/gen_qabstractprintdialog.h b/qt6/printsupport/gen_qabstractprintdialog.h index 7dd9d45d..1b0dc3dc 100644 --- a/qt6/printsupport/gen_qabstractprintdialog.h +++ b/qt6/printsupport/gen_qabstractprintdialog.h @@ -46,8 +46,9 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QAbstractPrintDialog_new(QPrinter* printer, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QAbstractPrintDialog* QAbstractPrintDialog_new(QPrinter* printer); +QAbstractPrintDialog* QAbstractPrintDialog_new2(QPrinter* printer, QWidget* parent); +void QAbstractPrintDialog_virtbase(QAbstractPrintDialog* src, QDialog** outptr_QDialog); QMetaObject* QAbstractPrintDialog_MetaObject(const QAbstractPrintDialog* self); void* QAbstractPrintDialog_Metacast(QAbstractPrintDialog* self, const char* param1); struct miqt_string QAbstractPrintDialog_Tr(const char* s); diff --git a/qt6/printsupport/gen_qpagesetupdialog.cpp b/qt6/printsupport/gen_qpagesetupdialog.cpp index 9e620ea8..e6dc2be4 100644 --- a/qt6/printsupport/gen_qpagesetupdialog.cpp +++ b/qt6/printsupport/gen_qpagesetupdialog.cpp @@ -358,40 +358,24 @@ public: }; -void QPageSetupDialog_new(QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(parent); - *outptr_QPageSetupDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPageSetupDialog* QPageSetupDialog_new(QWidget* parent) { + return new MiqtVirtualQPageSetupDialog(parent); } -void QPageSetupDialog_new2(QPrinter* printer, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(printer); - *outptr_QPageSetupDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPageSetupDialog* QPageSetupDialog_new2(QPrinter* printer) { + return new MiqtVirtualQPageSetupDialog(printer); } -void QPageSetupDialog_new3(QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(); - *outptr_QPageSetupDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPageSetupDialog* QPageSetupDialog_new3() { + return new MiqtVirtualQPageSetupDialog(); } -void QPageSetupDialog_new4(QPrinter* printer, QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPageSetupDialog* ret = new MiqtVirtualQPageSetupDialog(printer, parent); - *outptr_QPageSetupDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPageSetupDialog* QPageSetupDialog_new4(QPrinter* printer, QWidget* parent) { + return new MiqtVirtualQPageSetupDialog(printer, parent); +} + +void QPageSetupDialog_virtbase(QPageSetupDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QPageSetupDialog_MetaObject(const QPageSetupDialog* self) { diff --git a/qt6/printsupport/gen_qpagesetupdialog.go b/qt6/printsupport/gen_qpagesetupdialog.go index f350d1be..c9e1c9da 100644 --- a/qt6/printsupport/gen_qpagesetupdialog.go +++ b/qt6/printsupport/gen_qpagesetupdialog.go @@ -36,76 +36,50 @@ func (this *QPageSetupDialog) UnsafePointer() unsafe.Pointer { } // newQPageSetupDialog constructs the type using only CGO pointers. -func newQPageSetupDialog(h *C.QPageSetupDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPageSetupDialog { +func newQPageSetupDialog(h *C.QPageSetupDialog) *QPageSetupDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QPageSetupDialog_virtbase(h, &outptr_QDialog) + return &QPageSetupDialog{h: h, - QDialog: qt6.UnsafeNewQDialog(unsafe.Pointer(h_QDialog), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QDialog: qt6.UnsafeNewQDialog(unsafe.Pointer(outptr_QDialog))} } // UnsafeNewQPageSetupDialog constructs the type using only unsafe pointers. -func UnsafeNewQPageSetupDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPageSetupDialog { - if h == nil { - return nil - } - - return &QPageSetupDialog{h: (*C.QPageSetupDialog)(h), - QDialog: qt6.UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQPageSetupDialog(h unsafe.Pointer) *QPageSetupDialog { + return newQPageSetupDialog((*C.QPageSetupDialog)(h)) } // NewQPageSetupDialog constructs a new QPageSetupDialog object. func NewQPageSetupDialog(parent *qt6.QWidget) *QPageSetupDialog { - var outptr_QPageSetupDialog *C.QPageSetupDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPageSetupDialog_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPageSetupDialog(C.QPageSetupDialog_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQPageSetupDialog2 constructs a new QPageSetupDialog object. func NewQPageSetupDialog2(printer *QPrinter) *QPageSetupDialog { - var outptr_QPageSetupDialog *C.QPageSetupDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPageSetupDialog_new2(printer.cPointer(), &outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPageSetupDialog(C.QPageSetupDialog_new2(printer.cPointer())) ret.isSubclass = true return ret } // NewQPageSetupDialog3 constructs a new QPageSetupDialog object. func NewQPageSetupDialog3() *QPageSetupDialog { - var outptr_QPageSetupDialog *C.QPageSetupDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPageSetupDialog_new3(&outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPageSetupDialog(C.QPageSetupDialog_new3()) ret.isSubclass = true return ret } // NewQPageSetupDialog4 constructs a new QPageSetupDialog object. func NewQPageSetupDialog4(printer *QPrinter, parent *qt6.QWidget) *QPageSetupDialog { - var outptr_QPageSetupDialog *C.QPageSetupDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPageSetupDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPageSetupDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPageSetupDialog(outptr_QPageSetupDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPageSetupDialog(C.QPageSetupDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -138,7 +112,7 @@ func (this *QPageSetupDialog) Done(result int) { } func (this *QPageSetupDialog) Printer() *QPrinter { - return newQPrinter(C.QPageSetupDialog_Printer(this.h), nil, nil) + return newQPrinter(C.QPageSetupDialog_Printer(this.h)) } func QPageSetupDialog_Tr2(s string, c string) string { @@ -383,7 +357,7 @@ func miqt_exec_callback_QPageSetupDialog_KeyPressEvent(self *C.QPageSetupDialog, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(param1)) gofunc((&QPageSetupDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -409,7 +383,7 @@ func miqt_exec_callback_QPageSetupDialog_CloseEvent(self *C.QPageSetupDialog, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(param1)) gofunc((&QPageSetupDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -435,7 +409,7 @@ func miqt_exec_callback_QPageSetupDialog_ShowEvent(self *C.QPageSetupDialog, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(param1)) gofunc((&QPageSetupDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -461,7 +435,7 @@ func miqt_exec_callback_QPageSetupDialog_ResizeEvent(self *C.QPageSetupDialog, c } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(param1)) gofunc((&QPageSetupDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -487,7 +461,7 @@ func miqt_exec_callback_QPageSetupDialog_ContextMenuEvent(self *C.QPageSetupDial } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1)) gofunc((&QPageSetupDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt6/printsupport/gen_qpagesetupdialog.h b/qt6/printsupport/gen_qpagesetupdialog.h index 57ca377c..2f30292a 100644 --- a/qt6/printsupport/gen_qpagesetupdialog.h +++ b/qt6/printsupport/gen_qpagesetupdialog.h @@ -46,10 +46,11 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QPageSetupDialog_new(QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPageSetupDialog_new2(QPrinter* printer, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPageSetupDialog_new3(QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPageSetupDialog_new4(QPrinter* printer, QWidget* parent, QPageSetupDialog** outptr_QPageSetupDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QPageSetupDialog* QPageSetupDialog_new(QWidget* parent); +QPageSetupDialog* QPageSetupDialog_new2(QPrinter* printer); +QPageSetupDialog* QPageSetupDialog_new3(); +QPageSetupDialog* QPageSetupDialog_new4(QPrinter* printer, QWidget* parent); +void QPageSetupDialog_virtbase(QPageSetupDialog* src, QDialog** outptr_QDialog); QMetaObject* QPageSetupDialog_MetaObject(const QPageSetupDialog* self); void* QPageSetupDialog_Metacast(QPageSetupDialog* self, const char* param1); struct miqt_string QPageSetupDialog_Tr(const char* s); diff --git a/qt6/printsupport/gen_qprintdialog.cpp b/qt6/printsupport/gen_qprintdialog.cpp index 59624de4..65434b26 100644 --- a/qt6/printsupport/gen_qprintdialog.cpp +++ b/qt6/printsupport/gen_qprintdialog.cpp @@ -118,44 +118,24 @@ public: }; -void QPrintDialog_new(QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(parent); - *outptr_QPrintDialog = ret; - *outptr_QAbstractPrintDialog = static_cast(ret); - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintDialog* QPrintDialog_new(QWidget* parent) { + return new MiqtVirtualQPrintDialog(parent); } -void QPrintDialog_new2(QPrinter* printer, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(printer); - *outptr_QPrintDialog = ret; - *outptr_QAbstractPrintDialog = static_cast(ret); - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintDialog* QPrintDialog_new2(QPrinter* printer) { + return new MiqtVirtualQPrintDialog(printer); } -void QPrintDialog_new3(QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(); - *outptr_QPrintDialog = ret; - *outptr_QAbstractPrintDialog = static_cast(ret); - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintDialog* QPrintDialog_new3() { + return new MiqtVirtualQPrintDialog(); } -void QPrintDialog_new4(QPrinter* printer, QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintDialog* ret = new MiqtVirtualQPrintDialog(printer, parent); - *outptr_QPrintDialog = ret; - *outptr_QAbstractPrintDialog = static_cast(ret); - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintDialog* QPrintDialog_new4(QPrinter* printer, QWidget* parent) { + return new MiqtVirtualQPrintDialog(printer, parent); +} + +void QPrintDialog_virtbase(QPrintDialog* src, QAbstractPrintDialog** outptr_QAbstractPrintDialog) { + *outptr_QAbstractPrintDialog = static_cast(src); } QMetaObject* QPrintDialog_MetaObject(const QPrintDialog* self) { diff --git a/qt6/printsupport/gen_qprintdialog.go b/qt6/printsupport/gen_qprintdialog.go index 124bf439..c0bf463e 100644 --- a/qt6/printsupport/gen_qprintdialog.go +++ b/qt6/printsupport/gen_qprintdialog.go @@ -36,80 +36,50 @@ func (this *QPrintDialog) UnsafePointer() unsafe.Pointer { } // newQPrintDialog constructs the type using only CGO pointers. -func newQPrintDialog(h *C.QPrintDialog, h_QAbstractPrintDialog *C.QAbstractPrintDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPrintDialog { +func newQPrintDialog(h *C.QPrintDialog) *QPrintDialog { if h == nil { return nil } + var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil + C.QPrintDialog_virtbase(h, &outptr_QAbstractPrintDialog) + return &QPrintDialog{h: h, - QAbstractPrintDialog: newQAbstractPrintDialog(h_QAbstractPrintDialog, h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} + QAbstractPrintDialog: newQAbstractPrintDialog(outptr_QAbstractPrintDialog)} } // UnsafeNewQPrintDialog constructs the type using only unsafe pointers. -func UnsafeNewQPrintDialog(h unsafe.Pointer, h_QAbstractPrintDialog unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrintDialog { - if h == nil { - return nil - } - - return &QPrintDialog{h: (*C.QPrintDialog)(h), - QAbstractPrintDialog: UnsafeNewQAbstractPrintDialog(h_QAbstractPrintDialog, h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQPrintDialog(h unsafe.Pointer) *QPrintDialog { + return newQPrintDialog((*C.QPrintDialog)(h)) } // NewQPrintDialog constructs a new QPrintDialog object. func NewQPrintDialog(parent *qt6.QWidget) *QPrintDialog { - var outptr_QPrintDialog *C.QPrintDialog = nil - var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintDialog_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintDialog(C.QPrintDialog_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQPrintDialog2 constructs a new QPrintDialog object. func NewQPrintDialog2(printer *QPrinter) *QPrintDialog { - var outptr_QPrintDialog *C.QPrintDialog = nil - var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintDialog_new2(printer.cPointer(), &outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintDialog(C.QPrintDialog_new2(printer.cPointer())) ret.isSubclass = true return ret } // NewQPrintDialog3 constructs a new QPrintDialog object. func NewQPrintDialog3() *QPrintDialog { - var outptr_QPrintDialog *C.QPrintDialog = nil - var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintDialog_new3(&outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintDialog(C.QPrintDialog_new3()) ret.isSubclass = true return ret } // NewQPrintDialog4 constructs a new QPrintDialog object. func NewQPrintDialog4(printer *QPrinter, parent *qt6.QWidget) *QPrintDialog { - var outptr_QPrintDialog *C.QPrintDialog = nil - var outptr_QAbstractPrintDialog *C.QAbstractPrintDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintDialog, &outptr_QAbstractPrintDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintDialog(outptr_QPrintDialog, outptr_QAbstractPrintDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintDialog(C.QPrintDialog_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -180,7 +150,7 @@ func miqt_exec_callback_QPrintDialog_Accepted(cb C.intptr_t, printer *C.QPrinter } // Convert all CABI parameters to Go parameters - slotval1 := newQPrinter(printer, nil, nil) + slotval1 := newQPrinter(printer) gofunc(slotval1) } diff --git a/qt6/printsupport/gen_qprintdialog.h b/qt6/printsupport/gen_qprintdialog.h index ad776ec7..3d4be7ab 100644 --- a/qt6/printsupport/gen_qprintdialog.h +++ b/qt6/printsupport/gen_qprintdialog.h @@ -34,10 +34,11 @@ typedef struct QPrinter QPrinter; typedef struct QWidget QWidget; #endif -void QPrintDialog_new(QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintDialog_new2(QPrinter* printer, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintDialog_new3(QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintDialog_new4(QPrinter* printer, QWidget* parent, QPrintDialog** outptr_QPrintDialog, QAbstractPrintDialog** outptr_QAbstractPrintDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QPrintDialog* QPrintDialog_new(QWidget* parent); +QPrintDialog* QPrintDialog_new2(QPrinter* printer); +QPrintDialog* QPrintDialog_new3(); +QPrintDialog* QPrintDialog_new4(QPrinter* printer, QWidget* parent); +void QPrintDialog_virtbase(QPrintDialog* src, QAbstractPrintDialog** outptr_QAbstractPrintDialog); QMetaObject* QPrintDialog_MetaObject(const QPrintDialog* self); void* QPrintDialog_Metacast(QPrintDialog* self, const char* param1); struct miqt_string QPrintDialog_Tr(const char* s); diff --git a/qt6/printsupport/gen_qprintengine.go b/qt6/printsupport/gen_qprintengine.go index 9cc70d73..7b3c2135 100644 --- a/qt6/printsupport/gen_qprintengine.go +++ b/qt6/printsupport/gen_qprintengine.go @@ -75,16 +75,13 @@ func newQPrintEngine(h *C.QPrintEngine) *QPrintEngine { if h == nil { return nil } + return &QPrintEngine{h: h} } // UnsafeNewQPrintEngine constructs the type using only unsafe pointers. func UnsafeNewQPrintEngine(h unsafe.Pointer) *QPrintEngine { - if h == nil { - return nil - } - - return &QPrintEngine{h: (*C.QPrintEngine)(h)} + return newQPrintEngine((*C.QPrintEngine)(h)) } func (this *QPrintEngine) SetProperty(key QPrintEngine__PrintEnginePropertyKey, value *qt6.QVariant) { diff --git a/qt6/printsupport/gen_qprinter.cpp b/qt6/printsupport/gen_qprinter.cpp index bd2f86fd..6b6d03a1 100644 --- a/qt6/printsupport/gen_qprinter.cpp +++ b/qt6/printsupport/gen_qprinter.cpp @@ -246,32 +246,24 @@ public: }; -void QPrinter_new(QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(); - *outptr_QPrinter = ret; - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrinter* QPrinter_new() { + return new MiqtVirtualQPrinter(); } -void QPrinter_new2(QPrinterInfo* printer, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(*printer); - *outptr_QPrinter = ret; - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrinter* QPrinter_new2(QPrinterInfo* printer) { + return new MiqtVirtualQPrinter(*printer); } -void QPrinter_new3(int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(static_cast(mode)); - *outptr_QPrinter = ret; - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrinter* QPrinter_new3(int mode) { + return new MiqtVirtualQPrinter(static_cast(mode)); } -void QPrinter_new4(QPrinterInfo* printer, int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrinter* ret = new MiqtVirtualQPrinter(*printer, static_cast(mode)); - *outptr_QPrinter = ret; - *outptr_QPagedPaintDevice = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrinter* QPrinter_new4(QPrinterInfo* printer, int mode) { + return new MiqtVirtualQPrinter(*printer, static_cast(mode)); +} + +void QPrinter_virtbase(QPrinter* src, QPagedPaintDevice** outptr_QPagedPaintDevice) { + *outptr_QPagedPaintDevice = static_cast(src); } int QPrinter_DevType(const QPrinter* self) { diff --git a/qt6/printsupport/gen_qprinter.go b/qt6/printsupport/gen_qprinter.go index f102db98..bce69fca 100644 --- a/qt6/printsupport/gen_qprinter.go +++ b/qt6/printsupport/gen_qprinter.go @@ -126,68 +126,50 @@ func (this *QPrinter) UnsafePointer() unsafe.Pointer { } // newQPrinter constructs the type using only CGO pointers. -func newQPrinter(h *C.QPrinter, h_QPagedPaintDevice *C.QPagedPaintDevice, h_QPaintDevice *C.QPaintDevice) *QPrinter { +func newQPrinter(h *C.QPrinter) *QPrinter { if h == nil { return nil } + var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil + C.QPrinter_virtbase(h, &outptr_QPagedPaintDevice) + return &QPrinter{h: h, - QPagedPaintDevice: qt6.UnsafeNewQPagedPaintDevice(unsafe.Pointer(h_QPagedPaintDevice), unsafe.Pointer(h_QPaintDevice))} + QPagedPaintDevice: qt6.UnsafeNewQPagedPaintDevice(unsafe.Pointer(outptr_QPagedPaintDevice))} } // UnsafeNewQPrinter constructs the type using only unsafe pointers. -func UnsafeNewQPrinter(h unsafe.Pointer, h_QPagedPaintDevice unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrinter { - if h == nil { - return nil - } - - return &QPrinter{h: (*C.QPrinter)(h), - QPagedPaintDevice: qt6.UnsafeNewQPagedPaintDevice(h_QPagedPaintDevice, h_QPaintDevice)} +func UnsafeNewQPrinter(h unsafe.Pointer) *QPrinter { + return newQPrinter((*C.QPrinter)(h)) } // NewQPrinter constructs a new QPrinter object. func NewQPrinter() *QPrinter { - var outptr_QPrinter *C.QPrinter = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrinter_new(&outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQPrinter(C.QPrinter_new()) ret.isSubclass = true return ret } // NewQPrinter2 constructs a new QPrinter object. func NewQPrinter2(printer *QPrinterInfo) *QPrinter { - var outptr_QPrinter *C.QPrinter = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrinter_new2(printer.cPointer(), &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQPrinter(C.QPrinter_new2(printer.cPointer())) ret.isSubclass = true return ret } // NewQPrinter3 constructs a new QPrinter object. func NewQPrinter3(mode QPrinter__PrinterMode) *QPrinter { - var outptr_QPrinter *C.QPrinter = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrinter_new3((C.int)(mode), &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQPrinter(C.QPrinter_new3((C.int)(mode))) ret.isSubclass = true return ret } // NewQPrinter4 constructs a new QPrinter object. func NewQPrinter4(printer *QPrinterInfo, mode QPrinter__PrinterMode) *QPrinter { - var outptr_QPrinter *C.QPrinter = nil - var outptr_QPagedPaintDevice *C.QPagedPaintDevice = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrinter_new4(printer.cPointer(), (C.int)(mode), &outptr_QPrinter, &outptr_QPagedPaintDevice, &outptr_QPaintDevice) - ret := newQPrinter(outptr_QPrinter, outptr_QPagedPaintDevice, outptr_QPaintDevice) + ret := newQPrinter(C.QPrinter_new4(printer.cPointer(), (C.int)(mode))) ret.isSubclass = true return ret } diff --git a/qt6/printsupport/gen_qprinter.h b/qt6/printsupport/gen_qprinter.h index 77ef96e6..672b9069 100644 --- a/qt6/printsupport/gen_qprinter.h +++ b/qt6/printsupport/gen_qprinter.h @@ -40,10 +40,11 @@ typedef struct QPrinterInfo QPrinterInfo; typedef struct QRectF QRectF; #endif -void QPrinter_new(QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); -void QPrinter_new2(QPrinterInfo* printer, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); -void QPrinter_new3(int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); -void QPrinter_new4(QPrinterInfo* printer, int mode, QPrinter** outptr_QPrinter, QPagedPaintDevice** outptr_QPagedPaintDevice, QPaintDevice** outptr_QPaintDevice); +QPrinter* QPrinter_new(); +QPrinter* QPrinter_new2(QPrinterInfo* printer); +QPrinter* QPrinter_new3(int mode); +QPrinter* QPrinter_new4(QPrinterInfo* printer, int mode); +void QPrinter_virtbase(QPrinter* src, QPagedPaintDevice** outptr_QPagedPaintDevice); int QPrinter_DevType(const QPrinter* self); void QPrinter_SetOutputFormat(QPrinter* self, int format); int QPrinter_OutputFormat(const QPrinter* self); diff --git a/qt6/printsupport/gen_qprinterinfo.cpp b/qt6/printsupport/gen_qprinterinfo.cpp index ce9912a5..663a5c19 100644 --- a/qt6/printsupport/gen_qprinterinfo.cpp +++ b/qt6/printsupport/gen_qprinterinfo.cpp @@ -9,19 +9,16 @@ #include "gen_qprinterinfo.h" #include "_cgo_export.h" -void QPrinterInfo_new(QPrinterInfo** outptr_QPrinterInfo) { - QPrinterInfo* ret = new QPrinterInfo(); - *outptr_QPrinterInfo = ret; +QPrinterInfo* QPrinterInfo_new() { + return new QPrinterInfo(); } -void QPrinterInfo_new2(QPrinterInfo* other, QPrinterInfo** outptr_QPrinterInfo) { - QPrinterInfo* ret = new QPrinterInfo(*other); - *outptr_QPrinterInfo = ret; +QPrinterInfo* QPrinterInfo_new2(QPrinterInfo* other) { + return new QPrinterInfo(*other); } -void QPrinterInfo_new3(QPrinter* printer, QPrinterInfo** outptr_QPrinterInfo) { - QPrinterInfo* ret = new QPrinterInfo(*printer); - *outptr_QPrinterInfo = ret; +QPrinterInfo* QPrinterInfo_new3(QPrinter* printer) { + return new QPrinterInfo(*printer); } void QPrinterInfo_OperatorAssign(QPrinterInfo* self, QPrinterInfo* other) { diff --git a/qt6/printsupport/gen_qprinterinfo.go b/qt6/printsupport/gen_qprinterinfo.go index 6bf49749..3b2a148c 100644 --- a/qt6/printsupport/gen_qprinterinfo.go +++ b/qt6/printsupport/gen_qprinterinfo.go @@ -38,44 +38,35 @@ func newQPrinterInfo(h *C.QPrinterInfo) *QPrinterInfo { if h == nil { return nil } + return &QPrinterInfo{h: h} } // UnsafeNewQPrinterInfo constructs the type using only unsafe pointers. func UnsafeNewQPrinterInfo(h unsafe.Pointer) *QPrinterInfo { - if h == nil { - return nil - } - - return &QPrinterInfo{h: (*C.QPrinterInfo)(h)} + return newQPrinterInfo((*C.QPrinterInfo)(h)) } // NewQPrinterInfo constructs a new QPrinterInfo object. func NewQPrinterInfo() *QPrinterInfo { - var outptr_QPrinterInfo *C.QPrinterInfo = nil - C.QPrinterInfo_new(&outptr_QPrinterInfo) - ret := newQPrinterInfo(outptr_QPrinterInfo) + ret := newQPrinterInfo(C.QPrinterInfo_new()) ret.isSubclass = true return ret } // NewQPrinterInfo2 constructs a new QPrinterInfo object. func NewQPrinterInfo2(other *QPrinterInfo) *QPrinterInfo { - var outptr_QPrinterInfo *C.QPrinterInfo = nil - C.QPrinterInfo_new2(other.cPointer(), &outptr_QPrinterInfo) - ret := newQPrinterInfo(outptr_QPrinterInfo) + ret := newQPrinterInfo(C.QPrinterInfo_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQPrinterInfo3 constructs a new QPrinterInfo object. func NewQPrinterInfo3(printer *QPrinter) *QPrinterInfo { - var outptr_QPrinterInfo *C.QPrinterInfo = nil - C.QPrinterInfo_new3(printer.cPointer(), &outptr_QPrinterInfo) - ret := newQPrinterInfo(outptr_QPrinterInfo) + ret := newQPrinterInfo(C.QPrinterInfo_new3(printer.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/printsupport/gen_qprinterinfo.h b/qt6/printsupport/gen_qprinterinfo.h index dbf7d624..e93fc5c6 100644 --- a/qt6/printsupport/gen_qprinterinfo.h +++ b/qt6/printsupport/gen_qprinterinfo.h @@ -24,9 +24,9 @@ typedef struct QPrinter QPrinter; typedef struct QPrinterInfo QPrinterInfo; #endif -void QPrinterInfo_new(QPrinterInfo** outptr_QPrinterInfo); -void QPrinterInfo_new2(QPrinterInfo* other, QPrinterInfo** outptr_QPrinterInfo); -void QPrinterInfo_new3(QPrinter* printer, QPrinterInfo** outptr_QPrinterInfo); +QPrinterInfo* QPrinterInfo_new(); +QPrinterInfo* QPrinterInfo_new2(QPrinterInfo* other); +QPrinterInfo* QPrinterInfo_new3(QPrinter* printer); void QPrinterInfo_OperatorAssign(QPrinterInfo* self, QPrinterInfo* other); struct miqt_string QPrinterInfo_PrinterName(const QPrinterInfo* self); struct miqt_string QPrinterInfo_Description(const QPrinterInfo* self); diff --git a/qt6/printsupport/gen_qprintpreviewdialog.cpp b/qt6/printsupport/gen_qprintpreviewdialog.cpp index a4ac94c1..79b6fdd4 100644 --- a/qt6/printsupport/gen_qprintpreviewdialog.cpp +++ b/qt6/printsupport/gen_qprintpreviewdialog.cpp @@ -360,58 +360,32 @@ public: }; -void QPrintPreviewDialog_new(QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(parent); - *outptr_QPrintPreviewDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewDialog* QPrintPreviewDialog_new(QWidget* parent) { + return new MiqtVirtualQPrintPreviewDialog(parent); } -void QPrintPreviewDialog_new2(QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(); - *outptr_QPrintPreviewDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewDialog* QPrintPreviewDialog_new2() { + return new MiqtVirtualQPrintPreviewDialog(); } -void QPrintPreviewDialog_new3(QPrinter* printer, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(printer); - *outptr_QPrintPreviewDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewDialog* QPrintPreviewDialog_new3(QPrinter* printer) { + return new MiqtVirtualQPrintPreviewDialog(printer); } -void QPrintPreviewDialog_new4(QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(parent, static_cast(flags)); - *outptr_QPrintPreviewDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewDialog* QPrintPreviewDialog_new4(QWidget* parent, int flags) { + return new MiqtVirtualQPrintPreviewDialog(parent, static_cast(flags)); } -void QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(printer, parent); - *outptr_QPrintPreviewDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewDialog* QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent) { + return new MiqtVirtualQPrintPreviewDialog(printer, parent); } -void QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewDialog* ret = new MiqtVirtualQPrintPreviewDialog(printer, parent, static_cast(flags)); - *outptr_QPrintPreviewDialog = ret; - *outptr_QDialog = static_cast(ret); - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewDialog* QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags) { + return new MiqtVirtualQPrintPreviewDialog(printer, parent, static_cast(flags)); +} + +void QPrintPreviewDialog_virtbase(QPrintPreviewDialog* src, QDialog** outptr_QDialog) { + *outptr_QDialog = static_cast(src); } QMetaObject* QPrintPreviewDialog_MetaObject(const QPrintPreviewDialog* self) { diff --git a/qt6/printsupport/gen_qprintpreviewdialog.go b/qt6/printsupport/gen_qprintpreviewdialog.go index a0261eba..80cb52fe 100644 --- a/qt6/printsupport/gen_qprintpreviewdialog.go +++ b/qt6/printsupport/gen_qprintpreviewdialog.go @@ -36,104 +36,66 @@ func (this *QPrintPreviewDialog) UnsafePointer() unsafe.Pointer { } // newQPrintPreviewDialog constructs the type using only CGO pointers. -func newQPrintPreviewDialog(h *C.QPrintPreviewDialog, h_QDialog *C.QDialog, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPrintPreviewDialog { +func newQPrintPreviewDialog(h *C.QPrintPreviewDialog) *QPrintPreviewDialog { if h == nil { return nil } + var outptr_QDialog *C.QDialog = nil + C.QPrintPreviewDialog_virtbase(h, &outptr_QDialog) + return &QPrintPreviewDialog{h: h, - QDialog: qt6.UnsafeNewQDialog(unsafe.Pointer(h_QDialog), unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QDialog: qt6.UnsafeNewQDialog(unsafe.Pointer(outptr_QDialog))} } // UnsafeNewQPrintPreviewDialog constructs the type using only unsafe pointers. -func UnsafeNewQPrintPreviewDialog(h unsafe.Pointer, h_QDialog unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrintPreviewDialog { - if h == nil { - return nil - } - - return &QPrintPreviewDialog{h: (*C.QPrintPreviewDialog)(h), - QDialog: qt6.UnsafeNewQDialog(h_QDialog, h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQPrintPreviewDialog(h unsafe.Pointer) *QPrintPreviewDialog { + return newQPrintPreviewDialog((*C.QPrintPreviewDialog)(h)) } // NewQPrintPreviewDialog constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog(parent *qt6.QWidget) *QPrintPreviewDialog { - var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewDialog_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewDialog(C.QPrintPreviewDialog_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQPrintPreviewDialog2 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog2() *QPrintPreviewDialog { - var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewDialog_new2(&outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewDialog(C.QPrintPreviewDialog_new2()) ret.isSubclass = true return ret } // NewQPrintPreviewDialog3 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog3(printer *QPrinter) *QPrintPreviewDialog { - var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewDialog_new3(printer.cPointer(), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewDialog(C.QPrintPreviewDialog_new3(printer.cPointer())) ret.isSubclass = true return ret } // NewQPrintPreviewDialog4 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog4(parent *qt6.QWidget, flags qt6.WindowType) *QPrintPreviewDialog { - var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewDialog_new4((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewDialog(C.QPrintPreviewDialog_new4((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags))) ret.isSubclass = true return ret } // NewQPrintPreviewDialog5 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog5(printer *QPrinter, parent *qt6.QWidget) *QPrintPreviewDialog { - var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewDialog_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewDialog(C.QPrintPreviewDialog_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQPrintPreviewDialog6 constructs a new QPrintPreviewDialog object. func NewQPrintPreviewDialog6(printer *QPrinter, parent *qt6.QWidget, flags qt6.WindowType) *QPrintPreviewDialog { - var outptr_QPrintPreviewDialog *C.QPrintPreviewDialog = nil - var outptr_QDialog *C.QDialog = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewDialog_new6(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewDialog, &outptr_QDialog, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewDialog(outptr_QPrintPreviewDialog, outptr_QDialog, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewDialog(C.QPrintPreviewDialog_new6(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags))) ret.isSubclass = true return ret } @@ -158,7 +120,7 @@ func QPrintPreviewDialog_Tr(s string) string { } func (this *QPrintPreviewDialog) Printer() *QPrinter { - return newQPrinter(C.QPrintPreviewDialog_Printer(this.h), nil, nil) + return newQPrinter(C.QPrintPreviewDialog_Printer(this.h)) } func (this *QPrintPreviewDialog) SetVisible(visible bool) { @@ -184,7 +146,7 @@ func miqt_exec_callback_QPrintPreviewDialog_PaintRequested(cb C.intptr_t, printe } // Convert all CABI parameters to Go parameters - slotval1 := newQPrinter(printer, nil, nil) + slotval1 := newQPrinter(printer) gofunc(slotval1) } @@ -431,7 +393,7 @@ func miqt_exec_callback_QPrintPreviewDialog_KeyPressEvent(self *C.QPrintPreviewD } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(param1)) gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -457,7 +419,7 @@ func miqt_exec_callback_QPrintPreviewDialog_CloseEvent(self *C.QPrintPreviewDial } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(param1)) gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -483,7 +445,7 @@ func miqt_exec_callback_QPrintPreviewDialog_ShowEvent(self *C.QPrintPreviewDialo } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(param1)) gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -509,7 +471,7 @@ func miqt_exec_callback_QPrintPreviewDialog_ResizeEvent(self *C.QPrintPreviewDia } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(param1)) gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -535,7 +497,7 @@ func miqt_exec_callback_QPrintPreviewDialog_ContextMenuEvent(self *C.QPrintPrevi } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1)) gofunc((&QPrintPreviewDialog{h: self}).callVirtualBase_ContextMenuEvent, slotval1) diff --git a/qt6/printsupport/gen_qprintpreviewdialog.h b/qt6/printsupport/gen_qprintpreviewdialog.h index adab8620..747eae50 100644 --- a/qt6/printsupport/gen_qprintpreviewdialog.h +++ b/qt6/printsupport/gen_qprintpreviewdialog.h @@ -46,12 +46,13 @@ typedef struct QSize QSize; typedef struct QWidget QWidget; #endif -void QPrintPreviewDialog_new(QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewDialog_new2(QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewDialog_new3(QPrinter* printer, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewDialog_new4(QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewDialog** outptr_QPrintPreviewDialog, QDialog** outptr_QDialog, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QPrintPreviewDialog* QPrintPreviewDialog_new(QWidget* parent); +QPrintPreviewDialog* QPrintPreviewDialog_new2(); +QPrintPreviewDialog* QPrintPreviewDialog_new3(QPrinter* printer); +QPrintPreviewDialog* QPrintPreviewDialog_new4(QWidget* parent, int flags); +QPrintPreviewDialog* QPrintPreviewDialog_new5(QPrinter* printer, QWidget* parent); +QPrintPreviewDialog* QPrintPreviewDialog_new6(QPrinter* printer, QWidget* parent, int flags); +void QPrintPreviewDialog_virtbase(QPrintPreviewDialog* src, QDialog** outptr_QDialog); QMetaObject* QPrintPreviewDialog_MetaObject(const QPrintPreviewDialog* self); void* QPrintPreviewDialog_Metacast(QPrintPreviewDialog* self, const char* param1); struct miqt_string QPrintPreviewDialog_Tr(const char* s); diff --git a/qt6/printsupport/gen_qprintpreviewwidget.cpp b/qt6/printsupport/gen_qprintpreviewwidget.cpp index ecd681a9..48082239 100644 --- a/qt6/printsupport/gen_qprintpreviewwidget.cpp +++ b/qt6/printsupport/gen_qprintpreviewwidget.cpp @@ -1027,52 +1027,32 @@ public: }; -void QPrintPreviewWidget_new(QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(parent); - *outptr_QPrintPreviewWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewWidget* QPrintPreviewWidget_new(QWidget* parent) { + return new MiqtVirtualQPrintPreviewWidget(parent); } -void QPrintPreviewWidget_new2(QPrinter* printer, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(printer); - *outptr_QPrintPreviewWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewWidget* QPrintPreviewWidget_new2(QPrinter* printer) { + return new MiqtVirtualQPrintPreviewWidget(printer); } -void QPrintPreviewWidget_new3(QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(); - *outptr_QPrintPreviewWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewWidget* QPrintPreviewWidget_new3() { + return new MiqtVirtualQPrintPreviewWidget(); } -void QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(printer, parent); - *outptr_QPrintPreviewWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewWidget* QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent) { + return new MiqtVirtualQPrintPreviewWidget(printer, parent); } -void QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(printer, parent, static_cast(flags)); - *outptr_QPrintPreviewWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewWidget* QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags) { + return new MiqtVirtualQPrintPreviewWidget(printer, parent, static_cast(flags)); } -void QPrintPreviewWidget_new6(QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQPrintPreviewWidget* ret = new MiqtVirtualQPrintPreviewWidget(parent, static_cast(flags)); - *outptr_QPrintPreviewWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QPrintPreviewWidget* QPrintPreviewWidget_new6(QWidget* parent, int flags) { + return new MiqtVirtualQPrintPreviewWidget(parent, static_cast(flags)); +} + +void QPrintPreviewWidget_virtbase(QPrintPreviewWidget* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QPrintPreviewWidget_MetaObject(const QPrintPreviewWidget* self) { diff --git a/qt6/printsupport/gen_qprintpreviewwidget.go b/qt6/printsupport/gen_qprintpreviewwidget.go index d57554c7..c1baa639 100644 --- a/qt6/printsupport/gen_qprintpreviewwidget.go +++ b/qt6/printsupport/gen_qprintpreviewwidget.go @@ -52,98 +52,66 @@ func (this *QPrintPreviewWidget) UnsafePointer() unsafe.Pointer { } // newQPrintPreviewWidget constructs the type using only CGO pointers. -func newQPrintPreviewWidget(h *C.QPrintPreviewWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QPrintPreviewWidget { +func newQPrintPreviewWidget(h *C.QPrintPreviewWidget) *QPrintPreviewWidget { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QPrintPreviewWidget_virtbase(h, &outptr_QWidget) + return &QPrintPreviewWidget{h: h, - QWidget: qt6.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QWidget: qt6.UnsafeNewQWidget(unsafe.Pointer(outptr_QWidget))} } // UnsafeNewQPrintPreviewWidget constructs the type using only unsafe pointers. -func UnsafeNewQPrintPreviewWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QPrintPreviewWidget { - if h == nil { - return nil - } - - return &QPrintPreviewWidget{h: (*C.QPrintPreviewWidget)(h), - QWidget: qt6.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQPrintPreviewWidget(h unsafe.Pointer) *QPrintPreviewWidget { + return newQPrintPreviewWidget((*C.QPrintPreviewWidget)(h)) } // NewQPrintPreviewWidget constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget(parent *qt6.QWidget) *QPrintPreviewWidget { - var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewWidget_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewWidget(C.QPrintPreviewWidget_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQPrintPreviewWidget2 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget2(printer *QPrinter) *QPrintPreviewWidget { - var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewWidget_new2(printer.cPointer(), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewWidget(C.QPrintPreviewWidget_new2(printer.cPointer())) ret.isSubclass = true return ret } // NewQPrintPreviewWidget3 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget3() *QPrintPreviewWidget { - var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewWidget_new3(&outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewWidget(C.QPrintPreviewWidget_new3()) ret.isSubclass = true return ret } // NewQPrintPreviewWidget4 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget4(printer *QPrinter, parent *qt6.QWidget) *QPrintPreviewWidget { - var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewWidget_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewWidget(C.QPrintPreviewWidget_new4(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQPrintPreviewWidget5 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget5(printer *QPrinter, parent *qt6.QWidget, flags qt6.WindowType) *QPrintPreviewWidget { - var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewWidget_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewWidget(C.QPrintPreviewWidget_new5(printer.cPointer(), (*C.QWidget)(parent.UnsafePointer()), (C.int)(flags))) ret.isSubclass = true return ret } // NewQPrintPreviewWidget6 constructs a new QPrintPreviewWidget object. func NewQPrintPreviewWidget6(parent *qt6.QWidget, flags qt6.WindowType) *QPrintPreviewWidget { - var outptr_QPrintPreviewWidget *C.QPrintPreviewWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QPrintPreviewWidget_new6((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags), &outptr_QPrintPreviewWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQPrintPreviewWidget(outptr_QPrintPreviewWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQPrintPreviewWidget(C.QPrintPreviewWidget_new6((*C.QWidget)(parent.UnsafePointer()), (C.int)(flags))) ret.isSubclass = true return ret } @@ -274,7 +242,7 @@ func miqt_exec_callback_QPrintPreviewWidget_PaintRequested(cb C.intptr_t, printe } // Convert all CABI parameters to Go parameters - slotval1 := newQPrinter(printer, nil, nil) + slotval1 := newQPrinter(printer) gofunc(slotval1) } @@ -557,7 +525,7 @@ func miqt_exec_callback_QPrintPreviewWidget_MousePressEvent(self *C.QPrintPrevie } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -583,7 +551,7 @@ func miqt_exec_callback_QPrintPreviewWidget_MouseReleaseEvent(self *C.QPrintPrev } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -609,7 +577,7 @@ func miqt_exec_callback_QPrintPreviewWidget_MouseDoubleClickEvent(self *C.QPrint } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -635,7 +603,7 @@ func miqt_exec_callback_QPrintPreviewWidget_MouseMoveEvent(self *C.QPrintPreview } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -661,7 +629,7 @@ func miqt_exec_callback_QPrintPreviewWidget_WheelEvent(self *C.QPrintPreviewWidg } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -687,7 +655,7 @@ func miqt_exec_callback_QPrintPreviewWidget_KeyPressEvent(self *C.QPrintPreviewW } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -713,7 +681,7 @@ func miqt_exec_callback_QPrintPreviewWidget_KeyReleaseEvent(self *C.QPrintPrevie } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -739,7 +707,7 @@ func miqt_exec_callback_QPrintPreviewWidget_FocusInEvent(self *C.QPrintPreviewWi } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -765,7 +733,7 @@ func miqt_exec_callback_QPrintPreviewWidget_FocusOutEvent(self *C.QPrintPreviewW } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -791,7 +759,7 @@ func miqt_exec_callback_QPrintPreviewWidget_EnterEvent(self *C.QPrintPreviewWidg } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQEnterEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -843,7 +811,7 @@ func miqt_exec_callback_QPrintPreviewWidget_PaintEvent(self *C.QPrintPreviewWidg } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -869,7 +837,7 @@ func miqt_exec_callback_QPrintPreviewWidget_MoveEvent(self *C.QPrintPreviewWidge } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQMoveEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -895,7 +863,7 @@ func miqt_exec_callback_QPrintPreviewWidget_ResizeEvent(self *C.QPrintPreviewWid } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -921,7 +889,7 @@ func miqt_exec_callback_QPrintPreviewWidget_CloseEvent(self *C.QPrintPreviewWidg } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -947,7 +915,7 @@ func miqt_exec_callback_QPrintPreviewWidget_ContextMenuEvent(self *C.QPrintPrevi } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -973,7 +941,7 @@ func miqt_exec_callback_QPrintPreviewWidget_TabletEvent(self *C.QPrintPreviewWid } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQTabletEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -999,7 +967,7 @@ func miqt_exec_callback_QPrintPreviewWidget_ActionEvent(self *C.QPrintPreviewWid } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQActionEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1025,7 +993,7 @@ func miqt_exec_callback_QPrintPreviewWidget_DragEnterEvent(self *C.QPrintPreview } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -1051,7 +1019,7 @@ func miqt_exec_callback_QPrintPreviewWidget_DragMoveEvent(self *C.QPrintPreviewW } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -1077,7 +1045,7 @@ func miqt_exec_callback_QPrintPreviewWidget_DragLeaveEvent(self *C.QPrintPreview } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -1103,7 +1071,7 @@ func miqt_exec_callback_QPrintPreviewWidget_DropEvent(self *C.QPrintPreviewWidge } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1129,7 +1097,7 @@ func miqt_exec_callback_QPrintPreviewWidget_ShowEvent(self *C.QPrintPreviewWidge } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1155,7 +1123,7 @@ func miqt_exec_callback_QPrintPreviewWidget_HideEvent(self *C.QPrintPreviewWidge } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQHideEvent(unsafe.Pointer(event)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1351,7 +1319,7 @@ func miqt_exec_callback_QPrintPreviewWidget_InputMethodEvent(self *C.QPrintPrevi } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1)) gofunc((&QPrintPreviewWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/printsupport/gen_qprintpreviewwidget.h b/qt6/printsupport/gen_qprintpreviewwidget.h index e4ee1e6d..0c8585ce 100644 --- a/qt6/printsupport/gen_qprintpreviewwidget.h +++ b/qt6/printsupport/gen_qprintpreviewwidget.h @@ -80,12 +80,13 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QPrintPreviewWidget_new(QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewWidget_new2(QPrinter* printer, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewWidget_new3(QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QPrintPreviewWidget_new6(QWidget* parent, int flags, QPrintPreviewWidget** outptr_QPrintPreviewWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QPrintPreviewWidget* QPrintPreviewWidget_new(QWidget* parent); +QPrintPreviewWidget* QPrintPreviewWidget_new2(QPrinter* printer); +QPrintPreviewWidget* QPrintPreviewWidget_new3(); +QPrintPreviewWidget* QPrintPreviewWidget_new4(QPrinter* printer, QWidget* parent); +QPrintPreviewWidget* QPrintPreviewWidget_new5(QPrinter* printer, QWidget* parent, int flags); +QPrintPreviewWidget* QPrintPreviewWidget_new6(QWidget* parent, int flags); +void QPrintPreviewWidget_virtbase(QPrintPreviewWidget* src, QWidget** outptr_QWidget); QMetaObject* QPrintPreviewWidget_MetaObject(const QPrintPreviewWidget* self); void* QPrintPreviewWidget_Metacast(QPrintPreviewWidget* self, const char* param1); struct miqt_string QPrintPreviewWidget_Tr(const char* s); diff --git a/qt6/spatialaudio/gen_qambientsound.cpp b/qt6/spatialaudio/gen_qambientsound.cpp index 97092e93..5c26d005 100644 --- a/qt6/spatialaudio/gen_qambientsound.cpp +++ b/qt6/spatialaudio/gen_qambientsound.cpp @@ -194,10 +194,12 @@ public: }; -void QAmbientSound_new(QAudioEngine* engine, QAmbientSound** outptr_QAmbientSound, QObject** outptr_QObject) { - MiqtVirtualQAmbientSound* ret = new MiqtVirtualQAmbientSound(engine); - *outptr_QAmbientSound = ret; - *outptr_QObject = static_cast(ret); +QAmbientSound* QAmbientSound_new(QAudioEngine* engine) { + return new MiqtVirtualQAmbientSound(engine); +} + +void QAmbientSound_virtbase(QAmbientSound* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAmbientSound_MetaObject(const QAmbientSound* self) { diff --git a/qt6/spatialaudio/gen_qambientsound.go b/qt6/spatialaudio/gen_qambientsound.go index bcf82fdc..5af2cb4e 100644 --- a/qt6/spatialaudio/gen_qambientsound.go +++ b/qt6/spatialaudio/gen_qambientsound.go @@ -43,31 +43,26 @@ func (this *QAmbientSound) UnsafePointer() unsafe.Pointer { } // newQAmbientSound constructs the type using only CGO pointers. -func newQAmbientSound(h *C.QAmbientSound, h_QObject *C.QObject) *QAmbientSound { +func newQAmbientSound(h *C.QAmbientSound) *QAmbientSound { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAmbientSound_virtbase(h, &outptr_QObject) + return &QAmbientSound{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAmbientSound constructs the type using only unsafe pointers. -func UnsafeNewQAmbientSound(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAmbientSound { - if h == nil { - return nil - } - - return &QAmbientSound{h: (*C.QAmbientSound)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAmbientSound(h unsafe.Pointer) *QAmbientSound { + return newQAmbientSound((*C.QAmbientSound)(h)) } // NewQAmbientSound constructs a new QAmbientSound object. func NewQAmbientSound(engine *QAudioEngine) *QAmbientSound { - var outptr_QAmbientSound *C.QAmbientSound = nil - var outptr_QObject *C.QObject = nil - C.QAmbientSound_new(engine.cPointer(), &outptr_QAmbientSound, &outptr_QObject) - ret := newQAmbientSound(outptr_QAmbientSound, outptr_QObject) + ret := newQAmbientSound(C.QAmbientSound_new(engine.cPointer())) ret.isSubclass = true return ret } @@ -126,7 +121,7 @@ func (this *QAmbientSound) Volume() float32 { } func (this *QAmbientSound) Engine() *QAudioEngine { - return newQAudioEngine(C.QAmbientSound_Engine(this.h), nil) + return newQAudioEngine(C.QAmbientSound_Engine(this.h)) } func (this *QAmbientSound) SourceChanged() { @@ -309,7 +304,7 @@ func miqt_exec_callback_QAmbientSound_TimerEvent(self *C.QAmbientSound, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QAmbientSound{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -335,7 +330,7 @@ func miqt_exec_callback_QAmbientSound_ChildEvent(self *C.QAmbientSound, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QAmbientSound{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/spatialaudio/gen_qambientsound.h b/qt6/spatialaudio/gen_qambientsound.h index 857ecdb9..f2f46a4b 100644 --- a/qt6/spatialaudio/gen_qambientsound.h +++ b/qt6/spatialaudio/gen_qambientsound.h @@ -36,7 +36,8 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QUrl QUrl; #endif -void QAmbientSound_new(QAudioEngine* engine, QAmbientSound** outptr_QAmbientSound, QObject** outptr_QObject); +QAmbientSound* QAmbientSound_new(QAudioEngine* engine); +void QAmbientSound_virtbase(QAmbientSound* src, QObject** outptr_QObject); QMetaObject* QAmbientSound_MetaObject(const QAmbientSound* self); void* QAmbientSound_Metacast(QAmbientSound* self, const char* param1); struct miqt_string QAmbientSound_Tr(const char* s); diff --git a/qt6/spatialaudio/gen_qaudioengine.cpp b/qt6/spatialaudio/gen_qaudioengine.cpp index 3b060074..a9ba58ee 100644 --- a/qt6/spatialaudio/gen_qaudioengine.cpp +++ b/qt6/spatialaudio/gen_qaudioengine.cpp @@ -196,28 +196,24 @@ public: }; -void QAudioEngine_new(QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject) { - MiqtVirtualQAudioEngine* ret = new MiqtVirtualQAudioEngine(); - *outptr_QAudioEngine = ret; - *outptr_QObject = static_cast(ret); +QAudioEngine* QAudioEngine_new() { + return new MiqtVirtualQAudioEngine(); } -void QAudioEngine_new2(QObject* parent, QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject) { - MiqtVirtualQAudioEngine* ret = new MiqtVirtualQAudioEngine(parent); - *outptr_QAudioEngine = ret; - *outptr_QObject = static_cast(ret); +QAudioEngine* QAudioEngine_new2(QObject* parent) { + return new MiqtVirtualQAudioEngine(parent); } -void QAudioEngine_new3(int sampleRate, QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject) { - MiqtVirtualQAudioEngine* ret = new MiqtVirtualQAudioEngine(static_cast(sampleRate)); - *outptr_QAudioEngine = ret; - *outptr_QObject = static_cast(ret); +QAudioEngine* QAudioEngine_new3(int sampleRate) { + return new MiqtVirtualQAudioEngine(static_cast(sampleRate)); } -void QAudioEngine_new4(int sampleRate, QObject* parent, QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject) { - MiqtVirtualQAudioEngine* ret = new MiqtVirtualQAudioEngine(static_cast(sampleRate), parent); - *outptr_QAudioEngine = ret; - *outptr_QObject = static_cast(ret); +QAudioEngine* QAudioEngine_new4(int sampleRate, QObject* parent) { + return new MiqtVirtualQAudioEngine(static_cast(sampleRate), parent); +} + +void QAudioEngine_virtbase(QAudioEngine* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAudioEngine_MetaObject(const QAudioEngine* self) { diff --git a/qt6/spatialaudio/gen_qaudioengine.go b/qt6/spatialaudio/gen_qaudioengine.go index 4037828b..80e360ce 100644 --- a/qt6/spatialaudio/gen_qaudioengine.go +++ b/qt6/spatialaudio/gen_qaudioengine.go @@ -45,64 +45,50 @@ func (this *QAudioEngine) UnsafePointer() unsafe.Pointer { } // newQAudioEngine constructs the type using only CGO pointers. -func newQAudioEngine(h *C.QAudioEngine, h_QObject *C.QObject) *QAudioEngine { +func newQAudioEngine(h *C.QAudioEngine) *QAudioEngine { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAudioEngine_virtbase(h, &outptr_QObject) + return &QAudioEngine{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAudioEngine constructs the type using only unsafe pointers. -func UnsafeNewQAudioEngine(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioEngine { - if h == nil { - return nil - } - - return &QAudioEngine{h: (*C.QAudioEngine)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAudioEngine(h unsafe.Pointer) *QAudioEngine { + return newQAudioEngine((*C.QAudioEngine)(h)) } // NewQAudioEngine constructs a new QAudioEngine object. func NewQAudioEngine() *QAudioEngine { - var outptr_QAudioEngine *C.QAudioEngine = nil - var outptr_QObject *C.QObject = nil - C.QAudioEngine_new(&outptr_QAudioEngine, &outptr_QObject) - ret := newQAudioEngine(outptr_QAudioEngine, outptr_QObject) + ret := newQAudioEngine(C.QAudioEngine_new()) ret.isSubclass = true return ret } // NewQAudioEngine2 constructs a new QAudioEngine object. func NewQAudioEngine2(parent *qt6.QObject) *QAudioEngine { - var outptr_QAudioEngine *C.QAudioEngine = nil - var outptr_QObject *C.QObject = nil - C.QAudioEngine_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QAudioEngine, &outptr_QObject) - ret := newQAudioEngine(outptr_QAudioEngine, outptr_QObject) + ret := newQAudioEngine(C.QAudioEngine_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQAudioEngine3 constructs a new QAudioEngine object. func NewQAudioEngine3(sampleRate int) *QAudioEngine { - var outptr_QAudioEngine *C.QAudioEngine = nil - var outptr_QObject *C.QObject = nil - C.QAudioEngine_new3((C.int)(sampleRate), &outptr_QAudioEngine, &outptr_QObject) - ret := newQAudioEngine(outptr_QAudioEngine, outptr_QObject) + ret := newQAudioEngine(C.QAudioEngine_new3((C.int)(sampleRate))) ret.isSubclass = true return ret } // NewQAudioEngine4 constructs a new QAudioEngine object. func NewQAudioEngine4(sampleRate int, parent *qt6.QObject) *QAudioEngine { - var outptr_QAudioEngine *C.QAudioEngine = nil - var outptr_QObject *C.QObject = nil - C.QAudioEngine_new4((C.int)(sampleRate), (*C.QObject)(parent.UnsafePointer()), &outptr_QAudioEngine, &outptr_QObject) - ret := newQAudioEngine(outptr_QAudioEngine, outptr_QObject) + ret := newQAudioEngine(C.QAudioEngine_new4((C.int)(sampleRate), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -381,7 +367,7 @@ func miqt_exec_callback_QAudioEngine_TimerEvent(self *C.QAudioEngine, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QAudioEngine{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -407,7 +393,7 @@ func miqt_exec_callback_QAudioEngine_ChildEvent(self *C.QAudioEngine, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QAudioEngine{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/spatialaudio/gen_qaudioengine.h b/qt6/spatialaudio/gen_qaudioengine.h index 46bc354f..860dd83f 100644 --- a/qt6/spatialaudio/gen_qaudioengine.h +++ b/qt6/spatialaudio/gen_qaudioengine.h @@ -34,10 +34,11 @@ typedef struct QObject QObject; typedef struct QTimerEvent QTimerEvent; #endif -void QAudioEngine_new(QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject); -void QAudioEngine_new2(QObject* parent, QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject); -void QAudioEngine_new3(int sampleRate, QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject); -void QAudioEngine_new4(int sampleRate, QObject* parent, QAudioEngine** outptr_QAudioEngine, QObject** outptr_QObject); +QAudioEngine* QAudioEngine_new(); +QAudioEngine* QAudioEngine_new2(QObject* parent); +QAudioEngine* QAudioEngine_new3(int sampleRate); +QAudioEngine* QAudioEngine_new4(int sampleRate, QObject* parent); +void QAudioEngine_virtbase(QAudioEngine* src, QObject** outptr_QObject); QMetaObject* QAudioEngine_MetaObject(const QAudioEngine* self); void* QAudioEngine_Metacast(QAudioEngine* self, const char* param1); struct miqt_string QAudioEngine_Tr(const char* s); diff --git a/qt6/spatialaudio/gen_qaudiolistener.cpp b/qt6/spatialaudio/gen_qaudiolistener.cpp index 3df4e6b1..c0ec6b0c 100644 --- a/qt6/spatialaudio/gen_qaudiolistener.cpp +++ b/qt6/spatialaudio/gen_qaudiolistener.cpp @@ -191,10 +191,12 @@ public: }; -void QAudioListener_new(QAudioEngine* engine, QAudioListener** outptr_QAudioListener, QObject** outptr_QObject) { - MiqtVirtualQAudioListener* ret = new MiqtVirtualQAudioListener(engine); - *outptr_QAudioListener = ret; - *outptr_QObject = static_cast(ret); +QAudioListener* QAudioListener_new(QAudioEngine* engine) { + return new MiqtVirtualQAudioListener(engine); +} + +void QAudioListener_virtbase(QAudioListener* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } void QAudioListener_SetPosition(QAudioListener* self, QVector3D* pos) { diff --git a/qt6/spatialaudio/gen_qaudiolistener.go b/qt6/spatialaudio/gen_qaudiolistener.go index 5f369c95..fa28f1ba 100644 --- a/qt6/spatialaudio/gen_qaudiolistener.go +++ b/qt6/spatialaudio/gen_qaudiolistener.go @@ -36,31 +36,26 @@ func (this *QAudioListener) UnsafePointer() unsafe.Pointer { } // newQAudioListener constructs the type using only CGO pointers. -func newQAudioListener(h *C.QAudioListener, h_QObject *C.QObject) *QAudioListener { +func newQAudioListener(h *C.QAudioListener) *QAudioListener { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAudioListener_virtbase(h, &outptr_QObject) + return &QAudioListener{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAudioListener constructs the type using only unsafe pointers. -func UnsafeNewQAudioListener(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioListener { - if h == nil { - return nil - } - - return &QAudioListener{h: (*C.QAudioListener)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAudioListener(h unsafe.Pointer) *QAudioListener { + return newQAudioListener((*C.QAudioListener)(h)) } // NewQAudioListener constructs a new QAudioListener object. func NewQAudioListener(engine *QAudioEngine) *QAudioListener { - var outptr_QAudioListener *C.QAudioListener = nil - var outptr_QObject *C.QObject = nil - C.QAudioListener_new(engine.cPointer(), &outptr_QAudioListener, &outptr_QObject) - ret := newQAudioListener(outptr_QAudioListener, outptr_QObject) + ret := newQAudioListener(C.QAudioListener_new(engine.cPointer())) ret.isSubclass = true return ret } @@ -86,7 +81,7 @@ func (this *QAudioListener) Rotation() *qt6.QQuaternion { } func (this *QAudioListener) Engine() *QAudioEngine { - return newQAudioEngine(C.QAudioListener_Engine(this.h), nil) + return newQAudioEngine(C.QAudioListener_Engine(this.h)) } func (this *QAudioListener) callVirtualBase_Event(event *qt6.QEvent) bool { @@ -167,7 +162,7 @@ func miqt_exec_callback_QAudioListener_TimerEvent(self *C.QAudioListener, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QAudioListener{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -193,7 +188,7 @@ func miqt_exec_callback_QAudioListener_ChildEvent(self *C.QAudioListener, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QAudioListener{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/spatialaudio/gen_qaudiolistener.h b/qt6/spatialaudio/gen_qaudiolistener.h index d788be13..efa40a8e 100644 --- a/qt6/spatialaudio/gen_qaudiolistener.h +++ b/qt6/spatialaudio/gen_qaudiolistener.h @@ -36,7 +36,8 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVector3D QVector3D; #endif -void QAudioListener_new(QAudioEngine* engine, QAudioListener** outptr_QAudioListener, QObject** outptr_QObject); +QAudioListener* QAudioListener_new(QAudioEngine* engine); +void QAudioListener_virtbase(QAudioListener* src, QObject** outptr_QObject); void QAudioListener_SetPosition(QAudioListener* self, QVector3D* pos); QVector3D* QAudioListener_Position(const QAudioListener* self); void QAudioListener_SetRotation(QAudioListener* self, QQuaternion* q); diff --git a/qt6/spatialaudio/gen_qaudioroom.cpp b/qt6/spatialaudio/gen_qaudioroom.cpp index 30cd8eaf..a45f9979 100644 --- a/qt6/spatialaudio/gen_qaudioroom.cpp +++ b/qt6/spatialaudio/gen_qaudioroom.cpp @@ -195,10 +195,12 @@ public: }; -void QAudioRoom_new(QAudioEngine* engine, QAudioRoom** outptr_QAudioRoom, QObject** outptr_QObject) { - MiqtVirtualQAudioRoom* ret = new MiqtVirtualQAudioRoom(engine); - *outptr_QAudioRoom = ret; - *outptr_QObject = static_cast(ret); +QAudioRoom* QAudioRoom_new(QAudioEngine* engine) { + return new MiqtVirtualQAudioRoom(engine); +} + +void QAudioRoom_virtbase(QAudioRoom* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QAudioRoom_MetaObject(const QAudioRoom* self) { diff --git a/qt6/spatialaudio/gen_qaudioroom.go b/qt6/spatialaudio/gen_qaudioroom.go index c552570f..4937b576 100644 --- a/qt6/spatialaudio/gen_qaudioroom.go +++ b/qt6/spatialaudio/gen_qaudioroom.go @@ -76,31 +76,26 @@ func (this *QAudioRoom) UnsafePointer() unsafe.Pointer { } // newQAudioRoom constructs the type using only CGO pointers. -func newQAudioRoom(h *C.QAudioRoom, h_QObject *C.QObject) *QAudioRoom { +func newQAudioRoom(h *C.QAudioRoom) *QAudioRoom { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QAudioRoom_virtbase(h, &outptr_QObject) + return &QAudioRoom{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQAudioRoom constructs the type using only unsafe pointers. -func UnsafeNewQAudioRoom(h unsafe.Pointer, h_QObject unsafe.Pointer) *QAudioRoom { - if h == nil { - return nil - } - - return &QAudioRoom{h: (*C.QAudioRoom)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQAudioRoom(h unsafe.Pointer) *QAudioRoom { + return newQAudioRoom((*C.QAudioRoom)(h)) } // NewQAudioRoom constructs a new QAudioRoom object. func NewQAudioRoom(engine *QAudioEngine) *QAudioRoom { - var outptr_QAudioRoom *C.QAudioRoom = nil - var outptr_QObject *C.QObject = nil - C.QAudioRoom_new(engine.cPointer(), &outptr_QAudioRoom, &outptr_QObject) - ret := newQAudioRoom(outptr_QAudioRoom, outptr_QObject) + ret := newQAudioRoom(C.QAudioRoom_new(engine.cPointer())) ret.isSubclass = true return ret } @@ -430,7 +425,7 @@ func miqt_exec_callback_QAudioRoom_TimerEvent(self *C.QAudioRoom, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QAudioRoom{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -456,7 +451,7 @@ func miqt_exec_callback_QAudioRoom_ChildEvent(self *C.QAudioRoom, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QAudioRoom{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/spatialaudio/gen_qaudioroom.h b/qt6/spatialaudio/gen_qaudioroom.h index 975dd8df..aa791884 100644 --- a/qt6/spatialaudio/gen_qaudioroom.h +++ b/qt6/spatialaudio/gen_qaudioroom.h @@ -38,7 +38,8 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QVector3D QVector3D; #endif -void QAudioRoom_new(QAudioEngine* engine, QAudioRoom** outptr_QAudioRoom, QObject** outptr_QObject); +QAudioRoom* QAudioRoom_new(QAudioEngine* engine); +void QAudioRoom_virtbase(QAudioRoom* src, QObject** outptr_QObject); QMetaObject* QAudioRoom_MetaObject(const QAudioRoom* self); void* QAudioRoom_Metacast(QAudioRoom* self, const char* param1); struct miqt_string QAudioRoom_Tr(const char* s); diff --git a/qt6/spatialaudio/gen_qspatialsound.cpp b/qt6/spatialaudio/gen_qspatialsound.cpp index be55aafd..fb788740 100644 --- a/qt6/spatialaudio/gen_qspatialsound.cpp +++ b/qt6/spatialaudio/gen_qspatialsound.cpp @@ -196,10 +196,12 @@ public: }; -void QSpatialSound_new(QAudioEngine* engine, QSpatialSound** outptr_QSpatialSound, QObject** outptr_QObject) { - MiqtVirtualQSpatialSound* ret = new MiqtVirtualQSpatialSound(engine); - *outptr_QSpatialSound = ret; - *outptr_QObject = static_cast(ret); +QSpatialSound* QSpatialSound_new(QAudioEngine* engine) { + return new MiqtVirtualQSpatialSound(engine); +} + +void QSpatialSound_virtbase(QSpatialSound* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSpatialSound_MetaObject(const QSpatialSound* self) { diff --git a/qt6/spatialaudio/gen_qspatialsound.go b/qt6/spatialaudio/gen_qspatialsound.go index c21b707f..131f1a4a 100644 --- a/qt6/spatialaudio/gen_qspatialsound.go +++ b/qt6/spatialaudio/gen_qspatialsound.go @@ -51,31 +51,26 @@ func (this *QSpatialSound) UnsafePointer() unsafe.Pointer { } // newQSpatialSound constructs the type using only CGO pointers. -func newQSpatialSound(h *C.QSpatialSound, h_QObject *C.QObject) *QSpatialSound { +func newQSpatialSound(h *C.QSpatialSound) *QSpatialSound { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSpatialSound_virtbase(h, &outptr_QObject) + return &QSpatialSound{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQSpatialSound constructs the type using only unsafe pointers. -func UnsafeNewQSpatialSound(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSpatialSound { - if h == nil { - return nil - } - - return &QSpatialSound{h: (*C.QSpatialSound)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQSpatialSound(h unsafe.Pointer) *QSpatialSound { + return newQSpatialSound((*C.QSpatialSound)(h)) } // NewQSpatialSound constructs a new QSpatialSound object. func NewQSpatialSound(engine *QAudioEngine) *QSpatialSound { - var outptr_QSpatialSound *C.QSpatialSound = nil - var outptr_QObject *C.QObject = nil - C.QSpatialSound_new(engine.cPointer(), &outptr_QSpatialSound, &outptr_QObject) - ret := newQSpatialSound(outptr_QSpatialSound, outptr_QObject) + ret := newQSpatialSound(C.QSpatialSound_new(engine.cPointer())) ret.isSubclass = true return ret } @@ -218,7 +213,7 @@ func (this *QSpatialSound) NearFieldGain() float32 { } func (this *QSpatialSound) Engine() *QAudioEngine { - return newQAudioEngine(C.QSpatialSound_Engine(this.h), nil) + return newQAudioEngine(C.QSpatialSound_Engine(this.h)) } func (this *QSpatialSound) SourceChanged() { @@ -571,7 +566,7 @@ func miqt_exec_callback_QSpatialSound_TimerEvent(self *C.QSpatialSound, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QSpatialSound{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -597,7 +592,7 @@ func miqt_exec_callback_QSpatialSound_ChildEvent(self *C.QSpatialSound, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QSpatialSound{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/spatialaudio/gen_qspatialsound.h b/qt6/spatialaudio/gen_qspatialsound.h index fef9a565..83a05b26 100644 --- a/qt6/spatialaudio/gen_qspatialsound.h +++ b/qt6/spatialaudio/gen_qspatialsound.h @@ -40,7 +40,8 @@ typedef struct QUrl QUrl; typedef struct QVector3D QVector3D; #endif -void QSpatialSound_new(QAudioEngine* engine, QSpatialSound** outptr_QSpatialSound, QObject** outptr_QObject); +QSpatialSound* QSpatialSound_new(QAudioEngine* engine); +void QSpatialSound_virtbase(QSpatialSound* src, QObject** outptr_QObject); QMetaObject* QSpatialSound_MetaObject(const QSpatialSound* self); void* QSpatialSound_Metacast(QSpatialSound* self, const char* param1); struct miqt_string QSpatialSound_Tr(const char* s); diff --git a/qt6/svg/gen_qgraphicssvgitem.cpp b/qt6/svg/gen_qgraphicssvgitem.cpp index a163cf9c..1f65c779 100644 --- a/qt6/svg/gen_qgraphicssvgitem.cpp +++ b/qt6/svg/gen_qgraphicssvgitem.cpp @@ -122,38 +122,26 @@ public: }; -void QGraphicsSvgItem_new(QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(); - *outptr_QGraphicsSvgItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsSvgItem* QGraphicsSvgItem_new() { + return new MiqtVirtualQGraphicsSvgItem(); } -void QGraphicsSvgItem_new2(struct miqt_string fileName, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { +QGraphicsSvgItem* QGraphicsSvgItem_new2(struct miqt_string fileName) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(fileName_QString); - *outptr_QGraphicsSvgItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); + return new MiqtVirtualQGraphicsSvgItem(fileName_QString); } -void QGraphicsSvgItem_new3(QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { - MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(parentItem); - *outptr_QGraphicsSvgItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); +QGraphicsSvgItem* QGraphicsSvgItem_new3(QGraphicsItem* parentItem) { + return new MiqtVirtualQGraphicsSvgItem(parentItem); } -void QGraphicsSvgItem_new4(struct miqt_string fileName, QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem) { +QGraphicsSvgItem* QGraphicsSvgItem_new4(struct miqt_string fileName, QGraphicsItem* parentItem) { QString fileName_QString = QString::fromUtf8(fileName.data, fileName.len); - MiqtVirtualQGraphicsSvgItem* ret = new MiqtVirtualQGraphicsSvgItem(fileName_QString, parentItem); - *outptr_QGraphicsSvgItem = ret; - *outptr_QGraphicsObject = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QGraphicsItem = static_cast(ret); + return new MiqtVirtualQGraphicsSvgItem(fileName_QString, parentItem); +} + +void QGraphicsSvgItem_virtbase(QGraphicsSvgItem* src, QGraphicsObject** outptr_QGraphicsObject) { + *outptr_QGraphicsObject = static_cast(src); } QMetaObject* QGraphicsSvgItem_MetaObject(const QGraphicsSvgItem* self) { diff --git a/qt6/svg/gen_qgraphicssvgitem.go b/qt6/svg/gen_qgraphicssvgitem.go index 12fd6f6b..6a635859 100644 --- a/qt6/svg/gen_qgraphicssvgitem.go +++ b/qt6/svg/gen_qgraphicssvgitem.go @@ -42,33 +42,26 @@ func (this *QGraphicsSvgItem) UnsafePointer() unsafe.Pointer { } // newQGraphicsSvgItem constructs the type using only CGO pointers. -func newQGraphicsSvgItem(h *C.QGraphicsSvgItem, h_QGraphicsObject *C.QGraphicsObject, h_QObject *C.QObject, h_QGraphicsItem *C.QGraphicsItem) *QGraphicsSvgItem { +func newQGraphicsSvgItem(h *C.QGraphicsSvgItem) *QGraphicsSvgItem { if h == nil { return nil } + var outptr_QGraphicsObject *C.QGraphicsObject = nil + C.QGraphicsSvgItem_virtbase(h, &outptr_QGraphicsObject) + return &QGraphicsSvgItem{h: h, - QGraphicsObject: qt6.UnsafeNewQGraphicsObject(unsafe.Pointer(h_QGraphicsObject), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QGraphicsItem))} + QGraphicsObject: qt6.UnsafeNewQGraphicsObject(unsafe.Pointer(outptr_QGraphicsObject))} } // UnsafeNewQGraphicsSvgItem constructs the type using only unsafe pointers. -func UnsafeNewQGraphicsSvgItem(h unsafe.Pointer, h_QGraphicsObject unsafe.Pointer, h_QObject unsafe.Pointer, h_QGraphicsItem unsafe.Pointer) *QGraphicsSvgItem { - if h == nil { - return nil - } - - return &QGraphicsSvgItem{h: (*C.QGraphicsSvgItem)(h), - QGraphicsObject: qt6.UnsafeNewQGraphicsObject(h_QGraphicsObject, h_QObject, h_QGraphicsItem)} +func UnsafeNewQGraphicsSvgItem(h unsafe.Pointer) *QGraphicsSvgItem { + return newQGraphicsSvgItem((*C.QGraphicsSvgItem)(h)) } // NewQGraphicsSvgItem constructs a new QGraphicsSvgItem object. func NewQGraphicsSvgItem() *QGraphicsSvgItem { - var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSvgItem_new(&outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(C.QGraphicsSvgItem_new()) ret.isSubclass = true return ret } @@ -79,26 +72,16 @@ func NewQGraphicsSvgItem2(fileName string) *QGraphicsSvgItem { fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSvgItem_new2(fileName_ms, &outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(C.QGraphicsSvgItem_new2(fileName_ms)) ret.isSubclass = true return ret } // NewQGraphicsSvgItem3 constructs a new QGraphicsSvgItem object. func NewQGraphicsSvgItem3(parentItem *qt6.QGraphicsItem) *QGraphicsSvgItem { - var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSvgItem_new3((*C.QGraphicsItem)(parentItem.UnsafePointer()), &outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(C.QGraphicsSvgItem_new3((*C.QGraphicsItem)(parentItem.UnsafePointer()))) ret.isSubclass = true return ret } @@ -109,13 +92,8 @@ func NewQGraphicsSvgItem4(fileName string, parentItem *qt6.QGraphicsItem) *QGrap fileName_ms.data = C.CString(fileName) fileName_ms.len = C.size_t(len(fileName)) defer C.free(unsafe.Pointer(fileName_ms.data)) - var outptr_QGraphicsSvgItem *C.QGraphicsSvgItem = nil - var outptr_QGraphicsObject *C.QGraphicsObject = nil - var outptr_QObject *C.QObject = nil - var outptr_QGraphicsItem *C.QGraphicsItem = nil - C.QGraphicsSvgItem_new4(fileName_ms, (*C.QGraphicsItem)(parentItem.UnsafePointer()), &outptr_QGraphicsSvgItem, &outptr_QGraphicsObject, &outptr_QObject, &outptr_QGraphicsItem) - ret := newQGraphicsSvgItem(outptr_QGraphicsSvgItem, outptr_QGraphicsObject, outptr_QObject, outptr_QGraphicsItem) + ret := newQGraphicsSvgItem(C.QGraphicsSvgItem_new4(fileName_ms, (*C.QGraphicsItem)(parentItem.UnsafePointer()))) ret.isSubclass = true return ret } @@ -144,7 +122,7 @@ func (this *QGraphicsSvgItem) SetSharedRenderer(renderer *QSvgRenderer) { } func (this *QGraphicsSvgItem) Renderer() *QSvgRenderer { - return newQSvgRenderer(C.QGraphicsSvgItem_Renderer(this.h), nil) + return newQSvgRenderer(C.QGraphicsSvgItem_Renderer(this.h)) } func (this *QGraphicsSvgItem) SetElementId(id string) { @@ -265,9 +243,9 @@ func miqt_exec_callback_QGraphicsSvgItem_Paint(self *C.QGraphicsSvgItem, cb C.in // Convert all CABI parameters to Go parameters slotval1 := qt6.UnsafeNewQPainter(unsafe.Pointer(painter)) - slotval2 := qt6.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option), nil) + slotval2 := qt6.UnsafeNewQStyleOptionGraphicsItem(unsafe.Pointer(option)) - slotval3 := qt6.UnsafeNewQWidget(unsafe.Pointer(widget), nil, nil) + slotval3 := qt6.UnsafeNewQWidget(unsafe.Pointer(widget)) gofunc((&QGraphicsSvgItem{h: self}).callVirtualBase_Paint, slotval1, slotval2, slotval3) diff --git a/qt6/svg/gen_qgraphicssvgitem.h b/qt6/svg/gen_qgraphicssvgitem.h index 14aefa4f..0a025532 100644 --- a/qt6/svg/gen_qgraphicssvgitem.h +++ b/qt6/svg/gen_qgraphicssvgitem.h @@ -42,10 +42,11 @@ typedef struct QSvgRenderer QSvgRenderer; typedef struct QWidget QWidget; #endif -void QGraphicsSvgItem_new(QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsSvgItem_new2(struct miqt_string fileName, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsSvgItem_new3(QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); -void QGraphicsSvgItem_new4(struct miqt_string fileName, QGraphicsItem* parentItem, QGraphicsSvgItem** outptr_QGraphicsSvgItem, QGraphicsObject** outptr_QGraphicsObject, QObject** outptr_QObject, QGraphicsItem** outptr_QGraphicsItem); +QGraphicsSvgItem* QGraphicsSvgItem_new(); +QGraphicsSvgItem* QGraphicsSvgItem_new2(struct miqt_string fileName); +QGraphicsSvgItem* QGraphicsSvgItem_new3(QGraphicsItem* parentItem); +QGraphicsSvgItem* QGraphicsSvgItem_new4(struct miqt_string fileName, QGraphicsItem* parentItem); +void QGraphicsSvgItem_virtbase(QGraphicsSvgItem* src, QGraphicsObject** outptr_QGraphicsObject); QMetaObject* QGraphicsSvgItem_MetaObject(const QGraphicsSvgItem* self); void* QGraphicsSvgItem_Metacast(QGraphicsSvgItem* self, const char* param1); struct miqt_string QGraphicsSvgItem_Tr(const char* s); diff --git a/qt6/svg/gen_qsvggenerator.cpp b/qt6/svg/gen_qsvggenerator.cpp index 24e0877c..583eee3b 100644 --- a/qt6/svg/gen_qsvggenerator.cpp +++ b/qt6/svg/gen_qsvggenerator.cpp @@ -160,10 +160,12 @@ public: }; -void QSvgGenerator_new(QSvgGenerator** outptr_QSvgGenerator, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSvgGenerator* ret = new MiqtVirtualQSvgGenerator(); - *outptr_QSvgGenerator = ret; - *outptr_QPaintDevice = static_cast(ret); +QSvgGenerator* QSvgGenerator_new() { + return new MiqtVirtualQSvgGenerator(); +} + +void QSvgGenerator_virtbase(QSvgGenerator* src, QPaintDevice** outptr_QPaintDevice) { + *outptr_QPaintDevice = static_cast(src); } struct miqt_string QSvgGenerator_Title(const QSvgGenerator* self) { diff --git a/qt6/svg/gen_qsvggenerator.go b/qt6/svg/gen_qsvggenerator.go index d7553510..6dbe452d 100644 --- a/qt6/svg/gen_qsvggenerator.go +++ b/qt6/svg/gen_qsvggenerator.go @@ -36,31 +36,26 @@ func (this *QSvgGenerator) UnsafePointer() unsafe.Pointer { } // newQSvgGenerator constructs the type using only CGO pointers. -func newQSvgGenerator(h *C.QSvgGenerator, h_QPaintDevice *C.QPaintDevice) *QSvgGenerator { +func newQSvgGenerator(h *C.QSvgGenerator) *QSvgGenerator { if h == nil { return nil } + var outptr_QPaintDevice *C.QPaintDevice = nil + C.QSvgGenerator_virtbase(h, &outptr_QPaintDevice) + return &QSvgGenerator{h: h, - QPaintDevice: qt6.UnsafeNewQPaintDevice(unsafe.Pointer(h_QPaintDevice))} + QPaintDevice: qt6.UnsafeNewQPaintDevice(unsafe.Pointer(outptr_QPaintDevice))} } // UnsafeNewQSvgGenerator constructs the type using only unsafe pointers. -func UnsafeNewQSvgGenerator(h unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSvgGenerator { - if h == nil { - return nil - } - - return &QSvgGenerator{h: (*C.QSvgGenerator)(h), - QPaintDevice: qt6.UnsafeNewQPaintDevice(h_QPaintDevice)} +func UnsafeNewQSvgGenerator(h unsafe.Pointer) *QSvgGenerator { + return newQSvgGenerator((*C.QSvgGenerator)(h)) } // NewQSvgGenerator constructs a new QSvgGenerator object. func NewQSvgGenerator() *QSvgGenerator { - var outptr_QSvgGenerator *C.QSvgGenerator = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSvgGenerator_new(&outptr_QSvgGenerator, &outptr_QPaintDevice) - ret := newQSvgGenerator(outptr_QSvgGenerator, outptr_QPaintDevice) + ret := newQSvgGenerator(C.QSvgGenerator_new()) ret.isSubclass = true return ret } @@ -141,7 +136,7 @@ func (this *QSvgGenerator) SetFileName(fileName string) { } func (this *QSvgGenerator) OutputDevice() *qt6.QIODevice { - return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QSvgGenerator_OutputDevice(this.h)), nil, nil) + return qt6.UnsafeNewQIODevice(unsafe.Pointer(C.QSvgGenerator_OutputDevice(this.h))) } func (this *QSvgGenerator) SetOutputDevice(outputDevice *qt6.QIODevice) { diff --git a/qt6/svg/gen_qsvggenerator.h b/qt6/svg/gen_qsvggenerator.h index 96fd393d..f2f2e87a 100644 --- a/qt6/svg/gen_qsvggenerator.h +++ b/qt6/svg/gen_qsvggenerator.h @@ -36,7 +36,8 @@ typedef struct QSize QSize; typedef struct QSvgGenerator QSvgGenerator; #endif -void QSvgGenerator_new(QSvgGenerator** outptr_QSvgGenerator, QPaintDevice** outptr_QPaintDevice); +QSvgGenerator* QSvgGenerator_new(); +void QSvgGenerator_virtbase(QSvgGenerator* src, QPaintDevice** outptr_QPaintDevice); struct miqt_string QSvgGenerator_Title(const QSvgGenerator* self); void QSvgGenerator_SetTitle(QSvgGenerator* self, struct miqt_string title); struct miqt_string QSvgGenerator_Description(const QSvgGenerator* self); diff --git a/qt6/svg/gen_qsvgrenderer.cpp b/qt6/svg/gen_qsvgrenderer.cpp index 956492ce..cb6a821b 100644 --- a/qt6/svg/gen_qsvgrenderer.cpp +++ b/qt6/svg/gen_qsvgrenderer.cpp @@ -206,56 +206,44 @@ public: }; -void QSvgRenderer_new(QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); +QSvgRenderer* QSvgRenderer_new() { + return new MiqtVirtualQSvgRenderer(); } -void QSvgRenderer_new2(struct miqt_string filename, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { +QSvgRenderer* QSvgRenderer_new2(struct miqt_string filename) { QString filename_QString = QString::fromUtf8(filename.data, filename.len); - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(filename_QString); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSvgRenderer(filename_QString); } -void QSvgRenderer_new3(struct miqt_string contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { +QSvgRenderer* QSvgRenderer_new3(struct miqt_string contents) { QByteArray contents_QByteArray(contents.data, contents.len); - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents_QByteArray); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSvgRenderer(contents_QByteArray); } -void QSvgRenderer_new4(QXmlStreamReader* contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); +QSvgRenderer* QSvgRenderer_new4(QXmlStreamReader* contents) { + return new MiqtVirtualQSvgRenderer(contents); } -void QSvgRenderer_new5(QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(parent); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); +QSvgRenderer* QSvgRenderer_new5(QObject* parent) { + return new MiqtVirtualQSvgRenderer(parent); } -void QSvgRenderer_new6(struct miqt_string filename, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { +QSvgRenderer* QSvgRenderer_new6(struct miqt_string filename, QObject* parent) { QString filename_QString = QString::fromUtf8(filename.data, filename.len); - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(filename_QString, parent); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSvgRenderer(filename_QString, parent); } -void QSvgRenderer_new7(struct miqt_string contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { +QSvgRenderer* QSvgRenderer_new7(struct miqt_string contents, QObject* parent) { QByteArray contents_QByteArray(contents.data, contents.len); - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents_QByteArray, parent); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQSvgRenderer(contents_QByteArray, parent); } -void QSvgRenderer_new8(QXmlStreamReader* contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject) { - MiqtVirtualQSvgRenderer* ret = new MiqtVirtualQSvgRenderer(contents, parent); - *outptr_QSvgRenderer = ret; - *outptr_QObject = static_cast(ret); +QSvgRenderer* QSvgRenderer_new8(QXmlStreamReader* contents, QObject* parent) { + return new MiqtVirtualQSvgRenderer(contents, parent); +} + +void QSvgRenderer_virtbase(QSvgRenderer* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QSvgRenderer_MetaObject(const QSvgRenderer* self) { diff --git a/qt6/svg/gen_qsvgrenderer.go b/qt6/svg/gen_qsvgrenderer.go index 8f76056a..9b071b78 100644 --- a/qt6/svg/gen_qsvgrenderer.go +++ b/qt6/svg/gen_qsvgrenderer.go @@ -36,31 +36,26 @@ func (this *QSvgRenderer) UnsafePointer() unsafe.Pointer { } // newQSvgRenderer constructs the type using only CGO pointers. -func newQSvgRenderer(h *C.QSvgRenderer, h_QObject *C.QObject) *QSvgRenderer { +func newQSvgRenderer(h *C.QSvgRenderer) *QSvgRenderer { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QSvgRenderer_virtbase(h, &outptr_QObject) + return &QSvgRenderer{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQSvgRenderer constructs the type using only unsafe pointers. -func UnsafeNewQSvgRenderer(h unsafe.Pointer, h_QObject unsafe.Pointer) *QSvgRenderer { - if h == nil { - return nil - } - - return &QSvgRenderer{h: (*C.QSvgRenderer)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQSvgRenderer(h unsafe.Pointer) *QSvgRenderer { + return newQSvgRenderer((*C.QSvgRenderer)(h)) } // NewQSvgRenderer constructs a new QSvgRenderer object. func NewQSvgRenderer() *QSvgRenderer { - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new(&outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new()) ret.isSubclass = true return ret } @@ -71,11 +66,8 @@ func NewQSvgRenderer2(filename string) *QSvgRenderer { filename_ms.data = C.CString(filename) filename_ms.len = C.size_t(len(filename)) defer C.free(unsafe.Pointer(filename_ms.data)) - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new2(filename_ms, &outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new2(filename_ms)) ret.isSubclass = true return ret } @@ -85,33 +77,24 @@ func NewQSvgRenderer3(contents []byte) *QSvgRenderer { contents_alias := C.struct_miqt_string{} contents_alias.data = (*C.char)(unsafe.Pointer(&contents[0])) contents_alias.len = C.size_t(len(contents)) - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new3(contents_alias, &outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new3(contents_alias)) ret.isSubclass = true return ret } // NewQSvgRenderer4 constructs a new QSvgRenderer object. func NewQSvgRenderer4(contents *qt6.QXmlStreamReader) *QSvgRenderer { - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new4((*C.QXmlStreamReader)(contents.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new4((*C.QXmlStreamReader)(contents.UnsafePointer()))) ret.isSubclass = true return ret } // NewQSvgRenderer5 constructs a new QSvgRenderer object. func NewQSvgRenderer5(parent *qt6.QObject) *QSvgRenderer { - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new5((*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new5((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -122,11 +105,8 @@ func NewQSvgRenderer6(filename string, parent *qt6.QObject) *QSvgRenderer { filename_ms.data = C.CString(filename) filename_ms.len = C.size_t(len(filename)) defer C.free(unsafe.Pointer(filename_ms.data)) - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new6(filename_ms, (*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new6(filename_ms, (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -136,22 +116,16 @@ func NewQSvgRenderer7(contents []byte, parent *qt6.QObject) *QSvgRenderer { contents_alias := C.struct_miqt_string{} contents_alias.data = (*C.char)(unsafe.Pointer(&contents[0])) contents_alias.len = C.size_t(len(contents)) - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new7(contents_alias, (*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new7(contents_alias, (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQSvgRenderer8 constructs a new QSvgRenderer object. func NewQSvgRenderer8(contents *qt6.QXmlStreamReader, parent *qt6.QObject) *QSvgRenderer { - var outptr_QSvgRenderer *C.QSvgRenderer = nil - var outptr_QObject *C.QObject = nil - C.QSvgRenderer_new8((*C.QXmlStreamReader)(contents.UnsafePointer()), (*C.QObject)(parent.UnsafePointer()), &outptr_QSvgRenderer, &outptr_QObject) - ret := newQSvgRenderer(outptr_QSvgRenderer, outptr_QObject) + ret := newQSvgRenderer(C.QSvgRenderer_new8((*C.QXmlStreamReader)(contents.UnsafePointer()), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -425,7 +399,7 @@ func miqt_exec_callback_QSvgRenderer_TimerEvent(self *C.QSvgRenderer, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QSvgRenderer{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -451,7 +425,7 @@ func miqt_exec_callback_QSvgRenderer_ChildEvent(self *C.QSvgRenderer, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QSvgRenderer{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/svg/gen_qsvgrenderer.h b/qt6/svg/gen_qsvgrenderer.h index dd4e3680..f801cccc 100644 --- a/qt6/svg/gen_qsvgrenderer.h +++ b/qt6/svg/gen_qsvgrenderer.h @@ -44,14 +44,15 @@ typedef struct QTransform QTransform; typedef struct QXmlStreamReader QXmlStreamReader; #endif -void QSvgRenderer_new(QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); -void QSvgRenderer_new2(struct miqt_string filename, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); -void QSvgRenderer_new3(struct miqt_string contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); -void QSvgRenderer_new4(QXmlStreamReader* contents, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); -void QSvgRenderer_new5(QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); -void QSvgRenderer_new6(struct miqt_string filename, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); -void QSvgRenderer_new7(struct miqt_string contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); -void QSvgRenderer_new8(QXmlStreamReader* contents, QObject* parent, QSvgRenderer** outptr_QSvgRenderer, QObject** outptr_QObject); +QSvgRenderer* QSvgRenderer_new(); +QSvgRenderer* QSvgRenderer_new2(struct miqt_string filename); +QSvgRenderer* QSvgRenderer_new3(struct miqt_string contents); +QSvgRenderer* QSvgRenderer_new4(QXmlStreamReader* contents); +QSvgRenderer* QSvgRenderer_new5(QObject* parent); +QSvgRenderer* QSvgRenderer_new6(struct miqt_string filename, QObject* parent); +QSvgRenderer* QSvgRenderer_new7(struct miqt_string contents, QObject* parent); +QSvgRenderer* QSvgRenderer_new8(QXmlStreamReader* contents, QObject* parent); +void QSvgRenderer_virtbase(QSvgRenderer* src, QObject** outptr_QObject); QMetaObject* QSvgRenderer_MetaObject(const QSvgRenderer* self); void* QSvgRenderer_Metacast(QSvgRenderer* self, const char* param1); struct miqt_string QSvgRenderer_Tr(const char* s); diff --git a/qt6/svg/gen_qsvgwidget.cpp b/qt6/svg/gen_qsvgwidget.cpp index fc990cf6..4dc5e2ad 100644 --- a/qt6/svg/gen_qsvgwidget.cpp +++ b/qt6/svg/gen_qsvgwidget.cpp @@ -1025,38 +1025,26 @@ public: }; -void QSvgWidget_new(QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(parent); - *outptr_QSvgWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSvgWidget* QSvgWidget_new(QWidget* parent) { + return new MiqtVirtualQSvgWidget(parent); } -void QSvgWidget_new2(QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(); - *outptr_QSvgWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QSvgWidget* QSvgWidget_new2() { + return new MiqtVirtualQSvgWidget(); } -void QSvgWidget_new3(struct miqt_string file, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QSvgWidget* QSvgWidget_new3(struct miqt_string file) { QString file_QString = QString::fromUtf8(file.data, file.len); - MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(file_QString); - *outptr_QSvgWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQSvgWidget(file_QString); } -void QSvgWidget_new4(struct miqt_string file, QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { +QSvgWidget* QSvgWidget_new4(struct miqt_string file, QWidget* parent) { QString file_QString = QString::fromUtf8(file.data, file.len); - MiqtVirtualQSvgWidget* ret = new MiqtVirtualQSvgWidget(file_QString, parent); - *outptr_QSvgWidget = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); + return new MiqtVirtualQSvgWidget(file_QString, parent); +} + +void QSvgWidget_virtbase(QSvgWidget* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QSvgWidget_MetaObject(const QSvgWidget* self) { diff --git a/qt6/svg/gen_qsvgwidget.go b/qt6/svg/gen_qsvgwidget.go index 5169db79..83ff5eb1 100644 --- a/qt6/svg/gen_qsvgwidget.go +++ b/qt6/svg/gen_qsvgwidget.go @@ -36,46 +36,34 @@ func (this *QSvgWidget) UnsafePointer() unsafe.Pointer { } // newQSvgWidget constructs the type using only CGO pointers. -func newQSvgWidget(h *C.QSvgWidget, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QSvgWidget { +func newQSvgWidget(h *C.QSvgWidget) *QSvgWidget { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QSvgWidget_virtbase(h, &outptr_QWidget) + return &QSvgWidget{h: h, - QWidget: qt6.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QWidget: qt6.UnsafeNewQWidget(unsafe.Pointer(outptr_QWidget))} } // UnsafeNewQSvgWidget constructs the type using only unsafe pointers. -func UnsafeNewQSvgWidget(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QSvgWidget { - if h == nil { - return nil - } - - return &QSvgWidget{h: (*C.QSvgWidget)(h), - QWidget: qt6.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQSvgWidget(h unsafe.Pointer) *QSvgWidget { + return newQSvgWidget((*C.QSvgWidget)(h)) } // NewQSvgWidget constructs a new QSvgWidget object. func NewQSvgWidget(parent *qt6.QWidget) *QSvgWidget { - var outptr_QSvgWidget *C.QSvgWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSvgWidget_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSvgWidget(C.QSvgWidget_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQSvgWidget2 constructs a new QSvgWidget object. func NewQSvgWidget2() *QSvgWidget { - var outptr_QSvgWidget *C.QSvgWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSvgWidget_new2(&outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSvgWidget(C.QSvgWidget_new2()) ret.isSubclass = true return ret } @@ -86,13 +74,8 @@ func NewQSvgWidget3(file string) *QSvgWidget { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - var outptr_QSvgWidget *C.QSvgWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSvgWidget_new3(file_ms, &outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSvgWidget(C.QSvgWidget_new3(file_ms)) ret.isSubclass = true return ret } @@ -103,13 +86,8 @@ func NewQSvgWidget4(file string, parent *qt6.QWidget) *QSvgWidget { file_ms.data = C.CString(file) file_ms.len = C.size_t(len(file)) defer C.free(unsafe.Pointer(file_ms.data)) - var outptr_QSvgWidget *C.QSvgWidget = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QSvgWidget_new4(file_ms, (*C.QWidget)(parent.UnsafePointer()), &outptr_QSvgWidget, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQSvgWidget(outptr_QSvgWidget, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQSvgWidget(C.QSvgWidget_new4(file_ms, (*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -134,7 +112,7 @@ func QSvgWidget_Tr(s string) string { } func (this *QSvgWidget) Renderer() *QSvgRenderer { - return newQSvgRenderer(C.QSvgWidget_Renderer(this.h), nil) + return newQSvgRenderer(C.QSvgWidget_Renderer(this.h)) } func (this *QSvgWidget) SizeHint() *qt6.QSize { @@ -227,7 +205,7 @@ func miqt_exec_callback_QSvgWidget_PaintEvent(self *C.QSvgWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -437,7 +415,7 @@ func miqt_exec_callback_QSvgWidget_MousePressEvent(self *C.QSvgWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -463,7 +441,7 @@ func miqt_exec_callback_QSvgWidget_MouseReleaseEvent(self *C.QSvgWidget, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -489,7 +467,7 @@ func miqt_exec_callback_QSvgWidget_MouseDoubleClickEvent(self *C.QSvgWidget, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -515,7 +493,7 @@ func miqt_exec_callback_QSvgWidget_MouseMoveEvent(self *C.QSvgWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -541,7 +519,7 @@ func miqt_exec_callback_QSvgWidget_WheelEvent(self *C.QSvgWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -567,7 +545,7 @@ func miqt_exec_callback_QSvgWidget_KeyPressEvent(self *C.QSvgWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -593,7 +571,7 @@ func miqt_exec_callback_QSvgWidget_KeyReleaseEvent(self *C.QSvgWidget, cb C.intp } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -619,7 +597,7 @@ func miqt_exec_callback_QSvgWidget_FocusInEvent(self *C.QSvgWidget, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -645,7 +623,7 @@ func miqt_exec_callback_QSvgWidget_FocusOutEvent(self *C.QSvgWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -671,7 +649,7 @@ func miqt_exec_callback_QSvgWidget_EnterEvent(self *C.QSvgWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQEnterEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -723,7 +701,7 @@ func miqt_exec_callback_QSvgWidget_MoveEvent(self *C.QSvgWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQMoveEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -749,7 +727,7 @@ func miqt_exec_callback_QSvgWidget_ResizeEvent(self *C.QSvgWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -775,7 +753,7 @@ func miqt_exec_callback_QSvgWidget_CloseEvent(self *C.QSvgWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -801,7 +779,7 @@ func miqt_exec_callback_QSvgWidget_ContextMenuEvent(self *C.QSvgWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -827,7 +805,7 @@ func miqt_exec_callback_QSvgWidget_TabletEvent(self *C.QSvgWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQTabletEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -853,7 +831,7 @@ func miqt_exec_callback_QSvgWidget_ActionEvent(self *C.QSvgWidget, cb C.intptr_t } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQActionEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -879,7 +857,7 @@ func miqt_exec_callback_QSvgWidget_DragEnterEvent(self *C.QSvgWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(event), nil, nil, nil) + slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -905,7 +883,7 @@ func miqt_exec_callback_QSvgWidget_DragMoveEvent(self *C.QSvgWidget, cb C.intptr } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -931,7 +909,7 @@ func miqt_exec_callback_QSvgWidget_DragLeaveEvent(self *C.QSvgWidget, cb C.intpt } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -957,7 +935,7 @@ func miqt_exec_callback_QSvgWidget_DropEvent(self *C.QSvgWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_DropEvent, slotval1) @@ -983,7 +961,7 @@ func miqt_exec_callback_QSvgWidget_ShowEvent(self *C.QSvgWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -1009,7 +987,7 @@ func miqt_exec_callback_QSvgWidget_HideEvent(self *C.QSvgWidget, cb C.intptr_t, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQHideEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQHideEvent(unsafe.Pointer(event)) gofunc((&QSvgWidget{h: self}).callVirtualBase_HideEvent, slotval1) @@ -1205,7 +1183,7 @@ func miqt_exec_callback_QSvgWidget_InputMethodEvent(self *C.QSvgWidget, cb C.int } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1)) gofunc((&QSvgWidget{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/svg/gen_qsvgwidget.h b/qt6/svg/gen_qsvgwidget.h index 28c6f069..b7599a57 100644 --- a/qt6/svg/gen_qsvgwidget.h +++ b/qt6/svg/gen_qsvgwidget.h @@ -80,10 +80,11 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QSvgWidget_new(QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSvgWidget_new2(QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSvgWidget_new3(struct miqt_string file, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QSvgWidget_new4(struct miqt_string file, QWidget* parent, QSvgWidget** outptr_QSvgWidget, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QSvgWidget* QSvgWidget_new(QWidget* parent); +QSvgWidget* QSvgWidget_new2(); +QSvgWidget* QSvgWidget_new3(struct miqt_string file); +QSvgWidget* QSvgWidget_new4(struct miqt_string file, QWidget* parent); +void QSvgWidget_virtbase(QSvgWidget* src, QWidget** outptr_QWidget); QMetaObject* QSvgWidget_MetaObject(const QSvgWidget* self); void* QSvgWidget_Metacast(QSvgWidget* self, const char* param1); struct miqt_string QSvgWidget_Tr(const char* s); diff --git a/qt6/webchannel/gen_qqmlwebchannel.cpp b/qt6/webchannel/gen_qqmlwebchannel.cpp index 3691f859..9b3316d9 100644 --- a/qt6/webchannel/gen_qqmlwebchannel.cpp +++ b/qt6/webchannel/gen_qqmlwebchannel.cpp @@ -11,18 +11,16 @@ #include "gen_qqmlwebchannel.h" #include "_cgo_export.h" -void QQmlWebChannel_new(QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { - QQmlWebChannel* ret = new QQmlWebChannel(); - *outptr_QQmlWebChannel = ret; - *outptr_QWebChannel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QQmlWebChannel* QQmlWebChannel_new() { + return new QQmlWebChannel(); } -void QQmlWebChannel_new2(QObject* parent, QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { - QQmlWebChannel* ret = new QQmlWebChannel(parent); - *outptr_QQmlWebChannel = ret; - *outptr_QWebChannel = static_cast(ret); - *outptr_QObject = static_cast(ret); +QQmlWebChannel* QQmlWebChannel_new2(QObject* parent) { + return new QQmlWebChannel(parent); +} + +void QQmlWebChannel_virtbase(QQmlWebChannel* src, QWebChannel** outptr_QWebChannel) { + *outptr_QWebChannel = static_cast(src); } QMetaObject* QQmlWebChannel_MetaObject(const QQmlWebChannel* self) { diff --git a/qt6/webchannel/gen_qqmlwebchannel.go b/qt6/webchannel/gen_qqmlwebchannel.go index e87667fd..1e0fc03b 100644 --- a/qt6/webchannel/gen_qqmlwebchannel.go +++ b/qt6/webchannel/gen_qqmlwebchannel.go @@ -35,44 +35,34 @@ func (this *QQmlWebChannel) UnsafePointer() unsafe.Pointer { } // newQQmlWebChannel constructs the type using only CGO pointers. -func newQQmlWebChannel(h *C.QQmlWebChannel, h_QWebChannel *C.QWebChannel, h_QObject *C.QObject) *QQmlWebChannel { +func newQQmlWebChannel(h *C.QQmlWebChannel) *QQmlWebChannel { if h == nil { return nil } + var outptr_QWebChannel *C.QWebChannel = nil + C.QQmlWebChannel_virtbase(h, &outptr_QWebChannel) + return &QQmlWebChannel{h: h, - QWebChannel: newQWebChannel(h_QWebChannel, h_QObject)} + QWebChannel: newQWebChannel(outptr_QWebChannel)} } // UnsafeNewQQmlWebChannel constructs the type using only unsafe pointers. -func UnsafeNewQQmlWebChannel(h unsafe.Pointer, h_QWebChannel unsafe.Pointer, h_QObject unsafe.Pointer) *QQmlWebChannel { - if h == nil { - return nil - } - - return &QQmlWebChannel{h: (*C.QQmlWebChannel)(h), - QWebChannel: UnsafeNewQWebChannel(h_QWebChannel, h_QObject)} +func UnsafeNewQQmlWebChannel(h unsafe.Pointer) *QQmlWebChannel { + return newQQmlWebChannel((*C.QQmlWebChannel)(h)) } // NewQQmlWebChannel constructs a new QQmlWebChannel object. func NewQQmlWebChannel() *QQmlWebChannel { - var outptr_QQmlWebChannel *C.QQmlWebChannel = nil - var outptr_QWebChannel *C.QWebChannel = nil - var outptr_QObject *C.QObject = nil - C.QQmlWebChannel_new(&outptr_QQmlWebChannel, &outptr_QWebChannel, &outptr_QObject) - ret := newQQmlWebChannel(outptr_QQmlWebChannel, outptr_QWebChannel, outptr_QObject) + ret := newQQmlWebChannel(C.QQmlWebChannel_new()) ret.isSubclass = true return ret } // NewQQmlWebChannel2 constructs a new QQmlWebChannel object. func NewQQmlWebChannel2(parent *qt6.QObject) *QQmlWebChannel { - var outptr_QQmlWebChannel *C.QQmlWebChannel = nil - var outptr_QWebChannel *C.QWebChannel = nil - var outptr_QObject *C.QObject = nil - C.QQmlWebChannel_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QQmlWebChannel, &outptr_QWebChannel, &outptr_QObject) - ret := newQQmlWebChannel(outptr_QQmlWebChannel, outptr_QWebChannel, outptr_QObject) + ret := newQQmlWebChannel(C.QQmlWebChannel_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } diff --git a/qt6/webchannel/gen_qqmlwebchannel.h b/qt6/webchannel/gen_qqmlwebchannel.h index 87f238db..82c7cec0 100644 --- a/qt6/webchannel/gen_qqmlwebchannel.h +++ b/qt6/webchannel/gen_qqmlwebchannel.h @@ -28,8 +28,9 @@ typedef struct QVariant QVariant; typedef struct QWebChannel QWebChannel; #endif -void QQmlWebChannel_new(QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); -void QQmlWebChannel_new2(QObject* parent, QQmlWebChannel** outptr_QQmlWebChannel, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); +QQmlWebChannel* QQmlWebChannel_new(); +QQmlWebChannel* QQmlWebChannel_new2(QObject* parent); +void QQmlWebChannel_virtbase(QQmlWebChannel* src, QWebChannel** outptr_QWebChannel); QMetaObject* QQmlWebChannel_MetaObject(const QQmlWebChannel* self); void* QQmlWebChannel_Metacast(QQmlWebChannel* self, const char* param1); struct miqt_string QQmlWebChannel_Tr(const char* s); diff --git a/qt6/webchannel/gen_qwebchannel.cpp b/qt6/webchannel/gen_qwebchannel.cpp index 8b9d5cb6..0175b639 100644 --- a/qt6/webchannel/gen_qwebchannel.cpp +++ b/qt6/webchannel/gen_qwebchannel.cpp @@ -195,16 +195,16 @@ public: }; -void QWebChannel_new(QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { - MiqtVirtualQWebChannel* ret = new MiqtVirtualQWebChannel(); - *outptr_QWebChannel = ret; - *outptr_QObject = static_cast(ret); +QWebChannel* QWebChannel_new() { + return new MiqtVirtualQWebChannel(); } -void QWebChannel_new2(QObject* parent, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject) { - MiqtVirtualQWebChannel* ret = new MiqtVirtualQWebChannel(parent); - *outptr_QWebChannel = ret; - *outptr_QObject = static_cast(ret); +QWebChannel* QWebChannel_new2(QObject* parent) { + return new MiqtVirtualQWebChannel(parent); +} + +void QWebChannel_virtbase(QWebChannel* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QWebChannel_MetaObject(const QWebChannel* self) { diff --git a/qt6/webchannel/gen_qwebchannel.go b/qt6/webchannel/gen_qwebchannel.go index baf70b14..402febb0 100644 --- a/qt6/webchannel/gen_qwebchannel.go +++ b/qt6/webchannel/gen_qwebchannel.go @@ -36,42 +36,34 @@ func (this *QWebChannel) UnsafePointer() unsafe.Pointer { } // newQWebChannel constructs the type using only CGO pointers. -func newQWebChannel(h *C.QWebChannel, h_QObject *C.QObject) *QWebChannel { +func newQWebChannel(h *C.QWebChannel) *QWebChannel { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebChannel_virtbase(h, &outptr_QObject) + return &QWebChannel{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebChannel constructs the type using only unsafe pointers. -func UnsafeNewQWebChannel(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebChannel { - if h == nil { - return nil - } - - return &QWebChannel{h: (*C.QWebChannel)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebChannel(h unsafe.Pointer) *QWebChannel { + return newQWebChannel((*C.QWebChannel)(h)) } // NewQWebChannel constructs a new QWebChannel object. func NewQWebChannel() *QWebChannel { - var outptr_QWebChannel *C.QWebChannel = nil - var outptr_QObject *C.QObject = nil - C.QWebChannel_new(&outptr_QWebChannel, &outptr_QObject) - ret := newQWebChannel(outptr_QWebChannel, outptr_QObject) + ret := newQWebChannel(C.QWebChannel_new()) ret.isSubclass = true return ret } // NewQWebChannel2 constructs a new QWebChannel object. func NewQWebChannel2(parent *qt6.QObject) *QWebChannel { - var outptr_QWebChannel *C.QWebChannel = nil - var outptr_QObject *C.QObject = nil - C.QWebChannel_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebChannel, &outptr_QObject) - ret := newQWebChannel(outptr_QWebChannel, outptr_QObject) + ret := newQWebChannel(C.QWebChannel_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -291,7 +283,7 @@ func miqt_exec_callback_QWebChannel_TimerEvent(self *C.QWebChannel, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QWebChannel{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -317,7 +309,7 @@ func miqt_exec_callback_QWebChannel_ChildEvent(self *C.QWebChannel, cb C.intptr_ } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QWebChannel{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/webchannel/gen_qwebchannel.h b/qt6/webchannel/gen_qwebchannel.h index 6285a298..661f2e8d 100644 --- a/qt6/webchannel/gen_qwebchannel.h +++ b/qt6/webchannel/gen_qwebchannel.h @@ -34,8 +34,9 @@ typedef struct QWebChannel QWebChannel; typedef struct QWebChannelAbstractTransport QWebChannelAbstractTransport; #endif -void QWebChannel_new(QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); -void QWebChannel_new2(QObject* parent, QWebChannel** outptr_QWebChannel, QObject** outptr_QObject); +QWebChannel* QWebChannel_new(); +QWebChannel* QWebChannel_new2(QObject* parent); +void QWebChannel_virtbase(QWebChannel* src, QObject** outptr_QObject); QMetaObject* QWebChannel_MetaObject(const QWebChannel* self); void* QWebChannel_Metacast(QWebChannel* self, const char* param1); struct miqt_string QWebChannel_Tr(const char* s); diff --git a/qt6/webchannel/gen_qwebchannelabstracttransport.cpp b/qt6/webchannel/gen_qwebchannelabstracttransport.cpp index c8a9b92c..5c20bf5f 100644 --- a/qt6/webchannel/gen_qwebchannelabstracttransport.cpp +++ b/qt6/webchannel/gen_qwebchannelabstracttransport.cpp @@ -212,16 +212,16 @@ public: }; -void QWebChannelAbstractTransport_new(QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject) { - MiqtVirtualQWebChannelAbstractTransport* ret = new MiqtVirtualQWebChannelAbstractTransport(); - *outptr_QWebChannelAbstractTransport = ret; - *outptr_QObject = static_cast(ret); +QWebChannelAbstractTransport* QWebChannelAbstractTransport_new() { + return new MiqtVirtualQWebChannelAbstractTransport(); } -void QWebChannelAbstractTransport_new2(QObject* parent, QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject) { - MiqtVirtualQWebChannelAbstractTransport* ret = new MiqtVirtualQWebChannelAbstractTransport(parent); - *outptr_QWebChannelAbstractTransport = ret; - *outptr_QObject = static_cast(ret); +QWebChannelAbstractTransport* QWebChannelAbstractTransport_new2(QObject* parent) { + return new MiqtVirtualQWebChannelAbstractTransport(parent); +} + +void QWebChannelAbstractTransport_virtbase(QWebChannelAbstractTransport* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QWebChannelAbstractTransport_MetaObject(const QWebChannelAbstractTransport* self) { diff --git a/qt6/webchannel/gen_qwebchannelabstracttransport.go b/qt6/webchannel/gen_qwebchannelabstracttransport.go index f503984b..09012619 100644 --- a/qt6/webchannel/gen_qwebchannelabstracttransport.go +++ b/qt6/webchannel/gen_qwebchannelabstracttransport.go @@ -36,42 +36,34 @@ func (this *QWebChannelAbstractTransport) UnsafePointer() unsafe.Pointer { } // newQWebChannelAbstractTransport constructs the type using only CGO pointers. -func newQWebChannelAbstractTransport(h *C.QWebChannelAbstractTransport, h_QObject *C.QObject) *QWebChannelAbstractTransport { +func newQWebChannelAbstractTransport(h *C.QWebChannelAbstractTransport) *QWebChannelAbstractTransport { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebChannelAbstractTransport_virtbase(h, &outptr_QObject) + return &QWebChannelAbstractTransport{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebChannelAbstractTransport constructs the type using only unsafe pointers. -func UnsafeNewQWebChannelAbstractTransport(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebChannelAbstractTransport { - if h == nil { - return nil - } - - return &QWebChannelAbstractTransport{h: (*C.QWebChannelAbstractTransport)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebChannelAbstractTransport(h unsafe.Pointer) *QWebChannelAbstractTransport { + return newQWebChannelAbstractTransport((*C.QWebChannelAbstractTransport)(h)) } // NewQWebChannelAbstractTransport constructs a new QWebChannelAbstractTransport object. func NewQWebChannelAbstractTransport() *QWebChannelAbstractTransport { - var outptr_QWebChannelAbstractTransport *C.QWebChannelAbstractTransport = nil - var outptr_QObject *C.QObject = nil - C.QWebChannelAbstractTransport_new(&outptr_QWebChannelAbstractTransport, &outptr_QObject) - ret := newQWebChannelAbstractTransport(outptr_QWebChannelAbstractTransport, outptr_QObject) + ret := newQWebChannelAbstractTransport(C.QWebChannelAbstractTransport_new()) ret.isSubclass = true return ret } // NewQWebChannelAbstractTransport2 constructs a new QWebChannelAbstractTransport object. func NewQWebChannelAbstractTransport2(parent *qt6.QObject) *QWebChannelAbstractTransport { - var outptr_QWebChannelAbstractTransport *C.QWebChannelAbstractTransport = nil - var outptr_QObject *C.QObject = nil - C.QWebChannelAbstractTransport_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebChannelAbstractTransport, &outptr_QObject) - ret := newQWebChannelAbstractTransport(outptr_QWebChannelAbstractTransport, outptr_QObject) + ret := newQWebChannelAbstractTransport(C.QWebChannelAbstractTransport_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -116,7 +108,7 @@ func miqt_exec_callback_QWebChannelAbstractTransport_MessageReceived(cb C.intptr // Convert all CABI parameters to Go parameters slotval1 := qt6.UnsafeNewQJsonObject(unsafe.Pointer(message)) - slotval2 := newQWebChannelAbstractTransport(transport, nil) + slotval2 := newQWebChannelAbstractTransport(transport) gofunc(slotval1, slotval2) } @@ -241,7 +233,7 @@ func miqt_exec_callback_QWebChannelAbstractTransport_TimerEvent(self *C.QWebChan } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -267,7 +259,7 @@ func miqt_exec_callback_QWebChannelAbstractTransport_ChildEvent(self *C.QWebChan } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QWebChannelAbstractTransport{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/webchannel/gen_qwebchannelabstracttransport.h b/qt6/webchannel/gen_qwebchannelabstracttransport.h index ad7702ad..4f6126a2 100644 --- a/qt6/webchannel/gen_qwebchannelabstracttransport.h +++ b/qt6/webchannel/gen_qwebchannelabstracttransport.h @@ -34,8 +34,9 @@ typedef struct QTimerEvent QTimerEvent; typedef struct QWebChannelAbstractTransport QWebChannelAbstractTransport; #endif -void QWebChannelAbstractTransport_new(QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject); -void QWebChannelAbstractTransport_new2(QObject* parent, QWebChannelAbstractTransport** outptr_QWebChannelAbstractTransport, QObject** outptr_QObject); +QWebChannelAbstractTransport* QWebChannelAbstractTransport_new(); +QWebChannelAbstractTransport* QWebChannelAbstractTransport_new2(QObject* parent); +void QWebChannelAbstractTransport_virtbase(QWebChannelAbstractTransport* src, QObject** outptr_QObject); QMetaObject* QWebChannelAbstractTransport_MetaObject(const QWebChannelAbstractTransport* self); void* QWebChannelAbstractTransport_Metacast(QWebChannelAbstractTransport* self, const char* param1); struct miqt_string QWebChannelAbstractTransport_Tr(const char* s); diff --git a/qt6/webengine/gen_qwebenginecertificateerror.cpp b/qt6/webengine/gen_qwebenginecertificateerror.cpp index 445ee96b..49e133e6 100644 --- a/qt6/webengine/gen_qwebenginecertificateerror.cpp +++ b/qt6/webengine/gen_qwebenginecertificateerror.cpp @@ -9,9 +9,8 @@ #include "gen_qwebenginecertificateerror.h" #include "_cgo_export.h" -void QWebEngineCertificateError_new(QWebEngineCertificateError* other, QWebEngineCertificateError** outptr_QWebEngineCertificateError) { - QWebEngineCertificateError* ret = new QWebEngineCertificateError(*other); - *outptr_QWebEngineCertificateError = ret; +QWebEngineCertificateError* QWebEngineCertificateError_new(QWebEngineCertificateError* other) { + return new QWebEngineCertificateError(*other); } void QWebEngineCertificateError_OperatorAssign(QWebEngineCertificateError* self, QWebEngineCertificateError* other) { diff --git a/qt6/webengine/gen_qwebenginecertificateerror.go b/qt6/webengine/gen_qwebenginecertificateerror.go index 4e8eacc7..528fc880 100644 --- a/qt6/webengine/gen_qwebenginecertificateerror.go +++ b/qt6/webengine/gen_qwebenginecertificateerror.go @@ -62,24 +62,19 @@ func newQWebEngineCertificateError(h *C.QWebEngineCertificateError) *QWebEngineC if h == nil { return nil } + return &QWebEngineCertificateError{h: h} } // UnsafeNewQWebEngineCertificateError constructs the type using only unsafe pointers. func UnsafeNewQWebEngineCertificateError(h unsafe.Pointer) *QWebEngineCertificateError { - if h == nil { - return nil - } - - return &QWebEngineCertificateError{h: (*C.QWebEngineCertificateError)(h)} + return newQWebEngineCertificateError((*C.QWebEngineCertificateError)(h)) } // NewQWebEngineCertificateError constructs a new QWebEngineCertificateError object. func NewQWebEngineCertificateError(other *QWebEngineCertificateError) *QWebEngineCertificateError { - var outptr_QWebEngineCertificateError *C.QWebEngineCertificateError = nil - C.QWebEngineCertificateError_new(other.cPointer(), &outptr_QWebEngineCertificateError) - ret := newQWebEngineCertificateError(outptr_QWebEngineCertificateError) + ret := newQWebEngineCertificateError(C.QWebEngineCertificateError_new(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/webengine/gen_qwebenginecertificateerror.h b/qt6/webengine/gen_qwebenginecertificateerror.h index b1faf211..8bb78ad9 100644 --- a/qt6/webengine/gen_qwebenginecertificateerror.h +++ b/qt6/webengine/gen_qwebenginecertificateerror.h @@ -24,7 +24,7 @@ typedef struct QUrl QUrl; typedef struct QWebEngineCertificateError QWebEngineCertificateError; #endif -void QWebEngineCertificateError_new(QWebEngineCertificateError* other, QWebEngineCertificateError** outptr_QWebEngineCertificateError); +QWebEngineCertificateError* QWebEngineCertificateError_new(QWebEngineCertificateError* other); void QWebEngineCertificateError_OperatorAssign(QWebEngineCertificateError* self, QWebEngineCertificateError* other); int QWebEngineCertificateError_Type(const QWebEngineCertificateError* self); QUrl* QWebEngineCertificateError_Url(const QWebEngineCertificateError* self); diff --git a/qt6/webengine/gen_qwebengineclientcertificateselection.cpp b/qt6/webengine/gen_qwebengineclientcertificateselection.cpp index f2baceb0..e628ea9f 100644 --- a/qt6/webengine/gen_qwebengineclientcertificateselection.cpp +++ b/qt6/webengine/gen_qwebengineclientcertificateselection.cpp @@ -6,9 +6,8 @@ #include "gen_qwebengineclientcertificateselection.h" #include "_cgo_export.h" -void QWebEngineClientCertificateSelection_new(QWebEngineClientCertificateSelection* param1, QWebEngineClientCertificateSelection** outptr_QWebEngineClientCertificateSelection) { - QWebEngineClientCertificateSelection* ret = new QWebEngineClientCertificateSelection(*param1); - *outptr_QWebEngineClientCertificateSelection = ret; +QWebEngineClientCertificateSelection* QWebEngineClientCertificateSelection_new(QWebEngineClientCertificateSelection* param1) { + return new QWebEngineClientCertificateSelection(*param1); } void QWebEngineClientCertificateSelection_OperatorAssign(QWebEngineClientCertificateSelection* self, QWebEngineClientCertificateSelection* param1) { diff --git a/qt6/webengine/gen_qwebengineclientcertificateselection.go b/qt6/webengine/gen_qwebengineclientcertificateselection.go index a57cfbc7..d0e61671 100644 --- a/qt6/webengine/gen_qwebengineclientcertificateselection.go +++ b/qt6/webengine/gen_qwebengineclientcertificateselection.go @@ -39,24 +39,19 @@ func newQWebEngineClientCertificateSelection(h *C.QWebEngineClientCertificateSel if h == nil { return nil } + return &QWebEngineClientCertificateSelection{h: h} } // UnsafeNewQWebEngineClientCertificateSelection constructs the type using only unsafe pointers. func UnsafeNewQWebEngineClientCertificateSelection(h unsafe.Pointer) *QWebEngineClientCertificateSelection { - if h == nil { - return nil - } - - return &QWebEngineClientCertificateSelection{h: (*C.QWebEngineClientCertificateSelection)(h)} + return newQWebEngineClientCertificateSelection((*C.QWebEngineClientCertificateSelection)(h)) } // NewQWebEngineClientCertificateSelection constructs a new QWebEngineClientCertificateSelection object. func NewQWebEngineClientCertificateSelection(param1 *QWebEngineClientCertificateSelection) *QWebEngineClientCertificateSelection { - var outptr_QWebEngineClientCertificateSelection *C.QWebEngineClientCertificateSelection = nil - C.QWebEngineClientCertificateSelection_new(param1.cPointer(), &outptr_QWebEngineClientCertificateSelection) - ret := newQWebEngineClientCertificateSelection(outptr_QWebEngineClientCertificateSelection) + ret := newQWebEngineClientCertificateSelection(C.QWebEngineClientCertificateSelection_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/webengine/gen_qwebengineclientcertificateselection.h b/qt6/webengine/gen_qwebengineclientcertificateselection.h index 829cb937..f8ecc4f5 100644 --- a/qt6/webengine/gen_qwebengineclientcertificateselection.h +++ b/qt6/webengine/gen_qwebengineclientcertificateselection.h @@ -24,7 +24,7 @@ typedef struct QUrl QUrl; typedef struct QWebEngineClientCertificateSelection QWebEngineClientCertificateSelection; #endif -void QWebEngineClientCertificateSelection_new(QWebEngineClientCertificateSelection* param1, QWebEngineClientCertificateSelection** outptr_QWebEngineClientCertificateSelection); +QWebEngineClientCertificateSelection* QWebEngineClientCertificateSelection_new(QWebEngineClientCertificateSelection* param1); void QWebEngineClientCertificateSelection_OperatorAssign(QWebEngineClientCertificateSelection* self, QWebEngineClientCertificateSelection* param1); QUrl* QWebEngineClientCertificateSelection_Host(const QWebEngineClientCertificateSelection* self); void QWebEngineClientCertificateSelection_Select(QWebEngineClientCertificateSelection* self, QSslCertificate* certificate); diff --git a/qt6/webengine/gen_qwebengineclientcertificatestore.go b/qt6/webengine/gen_qwebengineclientcertificatestore.go index 3a73fca7..771d9012 100644 --- a/qt6/webengine/gen_qwebengineclientcertificatestore.go +++ b/qt6/webengine/gen_qwebengineclientcertificatestore.go @@ -37,16 +37,13 @@ func newQWebEngineClientCertificateStore(h *C.QWebEngineClientCertificateStore) if h == nil { return nil } + return &QWebEngineClientCertificateStore{h: h} } // UnsafeNewQWebEngineClientCertificateStore constructs the type using only unsafe pointers. func UnsafeNewQWebEngineClientCertificateStore(h unsafe.Pointer) *QWebEngineClientCertificateStore { - if h == nil { - return nil - } - - return &QWebEngineClientCertificateStore{h: (*C.QWebEngineClientCertificateStore)(h)} + return newQWebEngineClientCertificateStore((*C.QWebEngineClientCertificateStore)(h)) } func (this *QWebEngineClientCertificateStore) Add(certificate *network.QSslCertificate, privateKey *network.QSslKey) { diff --git a/qt6/webengine/gen_qwebenginecontextmenurequest.cpp b/qt6/webengine/gen_qwebenginecontextmenurequest.cpp index 707ab8fe..29cadb80 100644 --- a/qt6/webengine/gen_qwebenginecontextmenurequest.cpp +++ b/qt6/webengine/gen_qwebenginecontextmenurequest.cpp @@ -11,6 +11,10 @@ #include "gen_qwebenginecontextmenurequest.h" #include "_cgo_export.h" +void QWebEngineContextMenuRequest_virtbase(QWebEngineContextMenuRequest* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebEngineContextMenuRequest_MetaObject(const QWebEngineContextMenuRequest* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/webengine/gen_qwebenginecontextmenurequest.go b/qt6/webengine/gen_qwebenginecontextmenurequest.go index acf1d98f..c0f9bd49 100644 --- a/qt6/webengine/gen_qwebenginecontextmenurequest.go +++ b/qt6/webengine/gen_qwebenginecontextmenurequest.go @@ -91,22 +91,20 @@ func (this *QWebEngineContextMenuRequest) UnsafePointer() unsafe.Pointer { } // newQWebEngineContextMenuRequest constructs the type using only CGO pointers. -func newQWebEngineContextMenuRequest(h *C.QWebEngineContextMenuRequest, h_QObject *C.QObject) *QWebEngineContextMenuRequest { +func newQWebEngineContextMenuRequest(h *C.QWebEngineContextMenuRequest) *QWebEngineContextMenuRequest { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineContextMenuRequest_virtbase(h, &outptr_QObject) + return &QWebEngineContextMenuRequest{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineContextMenuRequest constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineContextMenuRequest(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineContextMenuRequest { - if h == nil { - return nil - } - - return &QWebEngineContextMenuRequest{h: (*C.QWebEngineContextMenuRequest)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineContextMenuRequest(h unsafe.Pointer) *QWebEngineContextMenuRequest { + return newQWebEngineContextMenuRequest((*C.QWebEngineContextMenuRequest)(h)) } func (this *QWebEngineContextMenuRequest) MetaObject() *qt6.QMetaObject { diff --git a/qt6/webengine/gen_qwebenginecontextmenurequest.h b/qt6/webengine/gen_qwebenginecontextmenurequest.h index c26f4967..17de2bff 100644 --- a/qt6/webengine/gen_qwebenginecontextmenurequest.h +++ b/qt6/webengine/gen_qwebenginecontextmenurequest.h @@ -28,6 +28,7 @@ typedef struct QUrl QUrl; typedef struct QWebEngineContextMenuRequest QWebEngineContextMenuRequest; #endif +void QWebEngineContextMenuRequest_virtbase(QWebEngineContextMenuRequest* src, QObject** outptr_QObject); QMetaObject* QWebEngineContextMenuRequest_MetaObject(const QWebEngineContextMenuRequest* self); void* QWebEngineContextMenuRequest_Metacast(QWebEngineContextMenuRequest* self, const char* param1); struct miqt_string QWebEngineContextMenuRequest_Tr(const char* s); diff --git a/qt6/webengine/gen_qwebenginecookiestore.cpp b/qt6/webengine/gen_qwebenginecookiestore.cpp index 4992732e..09100d3e 100644 --- a/qt6/webengine/gen_qwebenginecookiestore.cpp +++ b/qt6/webengine/gen_qwebenginecookiestore.cpp @@ -11,6 +11,10 @@ #include "gen_qwebenginecookiestore.h" #include "_cgo_export.h" +void QWebEngineCookieStore_virtbase(QWebEngineCookieStore* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebEngineCookieStore_MetaObject(const QWebEngineCookieStore* self) { return (QMetaObject*) self->metaObject(); } @@ -114,9 +118,8 @@ void QWebEngineCookieStore_Delete(QWebEngineCookieStore* self, bool isSubclass) } } -void QWebEngineCookieStore__FilterRequest_new(QWebEngineCookieStore__FilterRequest* param1, QWebEngineCookieStore__FilterRequest** outptr_QWebEngineCookieStore__FilterRequest) { - QWebEngineCookieStore::FilterRequest* ret = new QWebEngineCookieStore::FilterRequest(*param1); - *outptr_QWebEngineCookieStore__FilterRequest = ret; +QWebEngineCookieStore__FilterRequest* QWebEngineCookieStore__FilterRequest_new(QWebEngineCookieStore__FilterRequest* param1) { + return new QWebEngineCookieStore::FilterRequest(*param1); } void QWebEngineCookieStore__FilterRequest_OperatorAssign(QWebEngineCookieStore__FilterRequest* self, QWebEngineCookieStore__FilterRequest* param1) { diff --git a/qt6/webengine/gen_qwebenginecookiestore.go b/qt6/webengine/gen_qwebenginecookiestore.go index becca30e..82575bb0 100644 --- a/qt6/webengine/gen_qwebenginecookiestore.go +++ b/qt6/webengine/gen_qwebenginecookiestore.go @@ -37,22 +37,20 @@ func (this *QWebEngineCookieStore) UnsafePointer() unsafe.Pointer { } // newQWebEngineCookieStore constructs the type using only CGO pointers. -func newQWebEngineCookieStore(h *C.QWebEngineCookieStore, h_QObject *C.QObject) *QWebEngineCookieStore { +func newQWebEngineCookieStore(h *C.QWebEngineCookieStore) *QWebEngineCookieStore { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineCookieStore_virtbase(h, &outptr_QObject) + return &QWebEngineCookieStore{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineCookieStore constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineCookieStore(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineCookieStore { - if h == nil { - return nil - } - - return &QWebEngineCookieStore{h: (*C.QWebEngineCookieStore)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineCookieStore(h unsafe.Pointer) *QWebEngineCookieStore { + return newQWebEngineCookieStore((*C.QWebEngineCookieStore)(h)) } func (this *QWebEngineCookieStore) MetaObject() *qt6.QMetaObject { @@ -202,24 +200,19 @@ func newQWebEngineCookieStore__FilterRequest(h *C.QWebEngineCookieStore__FilterR if h == nil { return nil } + return &QWebEngineCookieStore__FilterRequest{h: h} } // UnsafeNewQWebEngineCookieStore__FilterRequest constructs the type using only unsafe pointers. func UnsafeNewQWebEngineCookieStore__FilterRequest(h unsafe.Pointer) *QWebEngineCookieStore__FilterRequest { - if h == nil { - return nil - } - - return &QWebEngineCookieStore__FilterRequest{h: (*C.QWebEngineCookieStore__FilterRequest)(h)} + return newQWebEngineCookieStore__FilterRequest((*C.QWebEngineCookieStore__FilterRequest)(h)) } // NewQWebEngineCookieStore__FilterRequest constructs a new QWebEngineCookieStore::FilterRequest object. func NewQWebEngineCookieStore__FilterRequest(param1 *QWebEngineCookieStore__FilterRequest) *QWebEngineCookieStore__FilterRequest { - var outptr_QWebEngineCookieStore__FilterRequest *C.QWebEngineCookieStore__FilterRequest = nil - C.QWebEngineCookieStore__FilterRequest_new(param1.cPointer(), &outptr_QWebEngineCookieStore__FilterRequest) - ret := newQWebEngineCookieStore__FilterRequest(outptr_QWebEngineCookieStore__FilterRequest) + ret := newQWebEngineCookieStore__FilterRequest(C.QWebEngineCookieStore__FilterRequest_new(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/webengine/gen_qwebenginecookiestore.h b/qt6/webengine/gen_qwebenginecookiestore.h index 911748b8..f68beb95 100644 --- a/qt6/webengine/gen_qwebenginecookiestore.h +++ b/qt6/webengine/gen_qwebenginecookiestore.h @@ -34,6 +34,7 @@ typedef struct QWebEngineCookieStore QWebEngineCookieStore; typedef struct QWebEngineCookieStore__FilterRequest QWebEngineCookieStore__FilterRequest; #endif +void QWebEngineCookieStore_virtbase(QWebEngineCookieStore* src, QObject** outptr_QObject); QMetaObject* QWebEngineCookieStore_MetaObject(const QWebEngineCookieStore* self); void* QWebEngineCookieStore_Metacast(QWebEngineCookieStore* self, const char* param1); struct miqt_string QWebEngineCookieStore_Tr(const char* s); @@ -52,7 +53,7 @@ void QWebEngineCookieStore_SetCookie2(QWebEngineCookieStore* self, QNetworkCooki void QWebEngineCookieStore_DeleteCookie2(QWebEngineCookieStore* self, QNetworkCookie* cookie, QUrl* origin); void QWebEngineCookieStore_Delete(QWebEngineCookieStore* self, bool isSubclass); -void QWebEngineCookieStore__FilterRequest_new(QWebEngineCookieStore__FilterRequest* param1, QWebEngineCookieStore__FilterRequest** outptr_QWebEngineCookieStore__FilterRequest); +QWebEngineCookieStore__FilterRequest* QWebEngineCookieStore__FilterRequest_new(QWebEngineCookieStore__FilterRequest* param1); void QWebEngineCookieStore__FilterRequest_OperatorAssign(QWebEngineCookieStore__FilterRequest* self, QWebEngineCookieStore__FilterRequest* param1); void QWebEngineCookieStore__FilterRequest_Delete(QWebEngineCookieStore__FilterRequest* self, bool isSubclass); diff --git a/qt6/webengine/gen_qwebenginedownloadrequest.cpp b/qt6/webengine/gen_qwebenginedownloadrequest.cpp index 9d0719ed..615b0982 100644 --- a/qt6/webengine/gen_qwebenginedownloadrequest.cpp +++ b/qt6/webengine/gen_qwebenginedownloadrequest.cpp @@ -10,6 +10,10 @@ #include "gen_qwebenginedownloadrequest.h" #include "_cgo_export.h" +void QWebEngineDownloadRequest_virtbase(QWebEngineDownloadRequest* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebEngineDownloadRequest_MetaObject(const QWebEngineDownloadRequest* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/webengine/gen_qwebenginedownloadrequest.go b/qt6/webengine/gen_qwebenginedownloadrequest.go index 82d3da80..897001e2 100644 --- a/qt6/webengine/gen_qwebenginedownloadrequest.go +++ b/qt6/webengine/gen_qwebenginedownloadrequest.go @@ -84,22 +84,20 @@ func (this *QWebEngineDownloadRequest) UnsafePointer() unsafe.Pointer { } // newQWebEngineDownloadRequest constructs the type using only CGO pointers. -func newQWebEngineDownloadRequest(h *C.QWebEngineDownloadRequest, h_QObject *C.QObject) *QWebEngineDownloadRequest { +func newQWebEngineDownloadRequest(h *C.QWebEngineDownloadRequest) *QWebEngineDownloadRequest { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineDownloadRequest_virtbase(h, &outptr_QObject) + return &QWebEngineDownloadRequest{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineDownloadRequest constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineDownloadRequest(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineDownloadRequest { - if h == nil { - return nil - } - - return &QWebEngineDownloadRequest{h: (*C.QWebEngineDownloadRequest)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineDownloadRequest(h unsafe.Pointer) *QWebEngineDownloadRequest { + return newQWebEngineDownloadRequest((*C.QWebEngineDownloadRequest)(h)) } func (this *QWebEngineDownloadRequest) MetaObject() *qt6.QMetaObject { @@ -219,7 +217,7 @@ func (this *QWebEngineDownloadRequest) SetDownloadFileName(fileName string) { } func (this *QWebEngineDownloadRequest) Page() *QWebEnginePage { - return newQWebEnginePage(C.QWebEngineDownloadRequest_Page(this.h), nil) + return newQWebEnginePage(C.QWebEngineDownloadRequest_Page(this.h)) } func (this *QWebEngineDownloadRequest) Accept() { diff --git a/qt6/webengine/gen_qwebenginedownloadrequest.h b/qt6/webengine/gen_qwebenginedownloadrequest.h index d6b2438f..8635e663 100644 --- a/qt6/webengine/gen_qwebenginedownloadrequest.h +++ b/qt6/webengine/gen_qwebenginedownloadrequest.h @@ -28,6 +28,7 @@ typedef struct QWebEngineDownloadRequest QWebEngineDownloadRequest; typedef struct QWebEnginePage QWebEnginePage; #endif +void QWebEngineDownloadRequest_virtbase(QWebEngineDownloadRequest* src, QObject** outptr_QObject); QMetaObject* QWebEngineDownloadRequest_MetaObject(const QWebEngineDownloadRequest* self); void* QWebEngineDownloadRequest_Metacast(QWebEngineDownloadRequest* self, const char* param1); struct miqt_string QWebEngineDownloadRequest_Tr(const char* s); diff --git a/qt6/webengine/gen_qwebenginefilesystemaccessrequest.cpp b/qt6/webengine/gen_qwebenginefilesystemaccessrequest.cpp index 39aaffd1..7d86f64b 100644 --- a/qt6/webengine/gen_qwebenginefilesystemaccessrequest.cpp +++ b/qt6/webengine/gen_qwebenginefilesystemaccessrequest.cpp @@ -4,9 +4,8 @@ #include "gen_qwebenginefilesystemaccessrequest.h" #include "_cgo_export.h" -void QWebEngineFileSystemAccessRequest_new(QWebEngineFileSystemAccessRequest* other, QWebEngineFileSystemAccessRequest** outptr_QWebEngineFileSystemAccessRequest) { - QWebEngineFileSystemAccessRequest* ret = new QWebEngineFileSystemAccessRequest(*other); - *outptr_QWebEngineFileSystemAccessRequest = ret; +QWebEngineFileSystemAccessRequest* QWebEngineFileSystemAccessRequest_new(QWebEngineFileSystemAccessRequest* other) { + return new QWebEngineFileSystemAccessRequest(*other); } void QWebEngineFileSystemAccessRequest_OperatorAssign(QWebEngineFileSystemAccessRequest* self, QWebEngineFileSystemAccessRequest* other) { diff --git a/qt6/webengine/gen_qwebenginefilesystemaccessrequest.go b/qt6/webengine/gen_qwebenginefilesystemaccessrequest.go index f76aed74..fae34db2 100644 --- a/qt6/webengine/gen_qwebenginefilesystemaccessrequest.go +++ b/qt6/webengine/gen_qwebenginefilesystemaccessrequest.go @@ -52,24 +52,19 @@ func newQWebEngineFileSystemAccessRequest(h *C.QWebEngineFileSystemAccessRequest if h == nil { return nil } + return &QWebEngineFileSystemAccessRequest{h: h} } // UnsafeNewQWebEngineFileSystemAccessRequest constructs the type using only unsafe pointers. func UnsafeNewQWebEngineFileSystemAccessRequest(h unsafe.Pointer) *QWebEngineFileSystemAccessRequest { - if h == nil { - return nil - } - - return &QWebEngineFileSystemAccessRequest{h: (*C.QWebEngineFileSystemAccessRequest)(h)} + return newQWebEngineFileSystemAccessRequest((*C.QWebEngineFileSystemAccessRequest)(h)) } // NewQWebEngineFileSystemAccessRequest constructs a new QWebEngineFileSystemAccessRequest object. func NewQWebEngineFileSystemAccessRequest(other *QWebEngineFileSystemAccessRequest) *QWebEngineFileSystemAccessRequest { - var outptr_QWebEngineFileSystemAccessRequest *C.QWebEngineFileSystemAccessRequest = nil - C.QWebEngineFileSystemAccessRequest_new(other.cPointer(), &outptr_QWebEngineFileSystemAccessRequest) - ret := newQWebEngineFileSystemAccessRequest(outptr_QWebEngineFileSystemAccessRequest) + ret := newQWebEngineFileSystemAccessRequest(C.QWebEngineFileSystemAccessRequest_new(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/webengine/gen_qwebenginefilesystemaccessrequest.h b/qt6/webengine/gen_qwebenginefilesystemaccessrequest.h index cede3862..873880c3 100644 --- a/qt6/webengine/gen_qwebenginefilesystemaccessrequest.h +++ b/qt6/webengine/gen_qwebenginefilesystemaccessrequest.h @@ -22,7 +22,7 @@ typedef struct QUrl QUrl; typedef struct QWebEngineFileSystemAccessRequest QWebEngineFileSystemAccessRequest; #endif -void QWebEngineFileSystemAccessRequest_new(QWebEngineFileSystemAccessRequest* other, QWebEngineFileSystemAccessRequest** outptr_QWebEngineFileSystemAccessRequest); +QWebEngineFileSystemAccessRequest* QWebEngineFileSystemAccessRequest_new(QWebEngineFileSystemAccessRequest* other); void QWebEngineFileSystemAccessRequest_OperatorAssign(QWebEngineFileSystemAccessRequest* self, QWebEngineFileSystemAccessRequest* other); void QWebEngineFileSystemAccessRequest_Swap(QWebEngineFileSystemAccessRequest* self, QWebEngineFileSystemAccessRequest* other); void QWebEngineFileSystemAccessRequest_Accept(QWebEngineFileSystemAccessRequest* self); diff --git a/qt6/webengine/gen_qwebenginefindtextresult.cpp b/qt6/webengine/gen_qwebenginefindtextresult.cpp index 855ab8f3..a05aae6a 100644 --- a/qt6/webengine/gen_qwebenginefindtextresult.cpp +++ b/qt6/webengine/gen_qwebenginefindtextresult.cpp @@ -3,14 +3,12 @@ #include "gen_qwebenginefindtextresult.h" #include "_cgo_export.h" -void QWebEngineFindTextResult_new(QWebEngineFindTextResult** outptr_QWebEngineFindTextResult) { - QWebEngineFindTextResult* ret = new QWebEngineFindTextResult(); - *outptr_QWebEngineFindTextResult = ret; +QWebEngineFindTextResult* QWebEngineFindTextResult_new() { + return new QWebEngineFindTextResult(); } -void QWebEngineFindTextResult_new2(QWebEngineFindTextResult* other, QWebEngineFindTextResult** outptr_QWebEngineFindTextResult) { - QWebEngineFindTextResult* ret = new QWebEngineFindTextResult(*other); - *outptr_QWebEngineFindTextResult = ret; +QWebEngineFindTextResult* QWebEngineFindTextResult_new2(QWebEngineFindTextResult* other) { + return new QWebEngineFindTextResult(*other); } int QWebEngineFindTextResult_NumberOfMatches(const QWebEngineFindTextResult* self) { diff --git a/qt6/webengine/gen_qwebenginefindtextresult.go b/qt6/webengine/gen_qwebenginefindtextresult.go index bff61d4a..df11a80d 100644 --- a/qt6/webengine/gen_qwebenginefindtextresult.go +++ b/qt6/webengine/gen_qwebenginefindtextresult.go @@ -37,34 +37,27 @@ func newQWebEngineFindTextResult(h *C.QWebEngineFindTextResult) *QWebEngineFindT if h == nil { return nil } + return &QWebEngineFindTextResult{h: h} } // UnsafeNewQWebEngineFindTextResult constructs the type using only unsafe pointers. func UnsafeNewQWebEngineFindTextResult(h unsafe.Pointer) *QWebEngineFindTextResult { - if h == nil { - return nil - } - - return &QWebEngineFindTextResult{h: (*C.QWebEngineFindTextResult)(h)} + return newQWebEngineFindTextResult((*C.QWebEngineFindTextResult)(h)) } // NewQWebEngineFindTextResult constructs a new QWebEngineFindTextResult object. func NewQWebEngineFindTextResult() *QWebEngineFindTextResult { - var outptr_QWebEngineFindTextResult *C.QWebEngineFindTextResult = nil - C.QWebEngineFindTextResult_new(&outptr_QWebEngineFindTextResult) - ret := newQWebEngineFindTextResult(outptr_QWebEngineFindTextResult) + ret := newQWebEngineFindTextResult(C.QWebEngineFindTextResult_new()) ret.isSubclass = true return ret } // NewQWebEngineFindTextResult2 constructs a new QWebEngineFindTextResult object. func NewQWebEngineFindTextResult2(other *QWebEngineFindTextResult) *QWebEngineFindTextResult { - var outptr_QWebEngineFindTextResult *C.QWebEngineFindTextResult = nil - C.QWebEngineFindTextResult_new2(other.cPointer(), &outptr_QWebEngineFindTextResult) - ret := newQWebEngineFindTextResult(outptr_QWebEngineFindTextResult) + ret := newQWebEngineFindTextResult(C.QWebEngineFindTextResult_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/webengine/gen_qwebenginefindtextresult.h b/qt6/webengine/gen_qwebenginefindtextresult.h index d7262e50..394ddae6 100644 --- a/qt6/webengine/gen_qwebenginefindtextresult.h +++ b/qt6/webengine/gen_qwebenginefindtextresult.h @@ -20,8 +20,8 @@ class QWebEngineFindTextResult; typedef struct QWebEngineFindTextResult QWebEngineFindTextResult; #endif -void QWebEngineFindTextResult_new(QWebEngineFindTextResult** outptr_QWebEngineFindTextResult); -void QWebEngineFindTextResult_new2(QWebEngineFindTextResult* other, QWebEngineFindTextResult** outptr_QWebEngineFindTextResult); +QWebEngineFindTextResult* QWebEngineFindTextResult_new(); +QWebEngineFindTextResult* QWebEngineFindTextResult_new2(QWebEngineFindTextResult* other); int QWebEngineFindTextResult_NumberOfMatches(const QWebEngineFindTextResult* self); int QWebEngineFindTextResult_ActiveMatch(const QWebEngineFindTextResult* self); void QWebEngineFindTextResult_OperatorAssign(QWebEngineFindTextResult* self, QWebEngineFindTextResult* other); diff --git a/qt6/webengine/gen_qwebenginefullscreenrequest.cpp b/qt6/webengine/gen_qwebenginefullscreenrequest.cpp index 3236bc05..bf41c88f 100644 --- a/qt6/webengine/gen_qwebenginefullscreenrequest.cpp +++ b/qt6/webengine/gen_qwebenginefullscreenrequest.cpp @@ -4,9 +4,8 @@ #include "gen_qwebenginefullscreenrequest.h" #include "_cgo_export.h" -void QWebEngineFullScreenRequest_new(QWebEngineFullScreenRequest* other, QWebEngineFullScreenRequest** outptr_QWebEngineFullScreenRequest) { - QWebEngineFullScreenRequest* ret = new QWebEngineFullScreenRequest(*other); - *outptr_QWebEngineFullScreenRequest = ret; +QWebEngineFullScreenRequest* QWebEngineFullScreenRequest_new(QWebEngineFullScreenRequest* other) { + return new QWebEngineFullScreenRequest(*other); } void QWebEngineFullScreenRequest_OperatorAssign(QWebEngineFullScreenRequest* self, QWebEngineFullScreenRequest* other) { diff --git a/qt6/webengine/gen_qwebenginefullscreenrequest.go b/qt6/webengine/gen_qwebenginefullscreenrequest.go index 308f50eb..f8d9f1cb 100644 --- a/qt6/webengine/gen_qwebenginefullscreenrequest.go +++ b/qt6/webengine/gen_qwebenginefullscreenrequest.go @@ -38,24 +38,19 @@ func newQWebEngineFullScreenRequest(h *C.QWebEngineFullScreenRequest) *QWebEngin if h == nil { return nil } + return &QWebEngineFullScreenRequest{h: h} } // UnsafeNewQWebEngineFullScreenRequest constructs the type using only unsafe pointers. func UnsafeNewQWebEngineFullScreenRequest(h unsafe.Pointer) *QWebEngineFullScreenRequest { - if h == nil { - return nil - } - - return &QWebEngineFullScreenRequest{h: (*C.QWebEngineFullScreenRequest)(h)} + return newQWebEngineFullScreenRequest((*C.QWebEngineFullScreenRequest)(h)) } // NewQWebEngineFullScreenRequest constructs a new QWebEngineFullScreenRequest object. func NewQWebEngineFullScreenRequest(other *QWebEngineFullScreenRequest) *QWebEngineFullScreenRequest { - var outptr_QWebEngineFullScreenRequest *C.QWebEngineFullScreenRequest = nil - C.QWebEngineFullScreenRequest_new(other.cPointer(), &outptr_QWebEngineFullScreenRequest) - ret := newQWebEngineFullScreenRequest(outptr_QWebEngineFullScreenRequest) + ret := newQWebEngineFullScreenRequest(C.QWebEngineFullScreenRequest_new(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/webengine/gen_qwebenginefullscreenrequest.h b/qt6/webengine/gen_qwebenginefullscreenrequest.h index d54e1c9b..d4fb7549 100644 --- a/qt6/webengine/gen_qwebenginefullscreenrequest.h +++ b/qt6/webengine/gen_qwebenginefullscreenrequest.h @@ -22,7 +22,7 @@ typedef struct QUrl QUrl; typedef struct QWebEngineFullScreenRequest QWebEngineFullScreenRequest; #endif -void QWebEngineFullScreenRequest_new(QWebEngineFullScreenRequest* other, QWebEngineFullScreenRequest** outptr_QWebEngineFullScreenRequest); +QWebEngineFullScreenRequest* QWebEngineFullScreenRequest_new(QWebEngineFullScreenRequest* other); void QWebEngineFullScreenRequest_OperatorAssign(QWebEngineFullScreenRequest* self, QWebEngineFullScreenRequest* other); void QWebEngineFullScreenRequest_Reject(QWebEngineFullScreenRequest* self); void QWebEngineFullScreenRequest_Accept(QWebEngineFullScreenRequest* self); diff --git a/qt6/webengine/gen_qwebenginehistory.cpp b/qt6/webengine/gen_qwebenginehistory.cpp index d2efb382..be15618e 100644 --- a/qt6/webengine/gen_qwebenginehistory.cpp +++ b/qt6/webengine/gen_qwebenginehistory.cpp @@ -19,9 +19,8 @@ #include "gen_qwebenginehistory.h" #include "_cgo_export.h" -void QWebEngineHistoryItem_new(QWebEngineHistoryItem* other, QWebEngineHistoryItem** outptr_QWebEngineHistoryItem) { - QWebEngineHistoryItem* ret = new QWebEngineHistoryItem(*other); - *outptr_QWebEngineHistoryItem = ret; +QWebEngineHistoryItem* QWebEngineHistoryItem_new(QWebEngineHistoryItem* other) { + return new QWebEngineHistoryItem(*other); } void QWebEngineHistoryItem_OperatorAssign(QWebEngineHistoryItem* self, QWebEngineHistoryItem* other) { @@ -71,6 +70,10 @@ void QWebEngineHistoryItem_Delete(QWebEngineHistoryItem* self, bool isSubclass) } } +void QWebEngineHistoryModel_virtbase(QWebEngineHistoryModel* src, QAbstractListModel** outptr_QAbstractListModel) { + *outptr_QAbstractListModel = static_cast(src); +} + QMetaObject* QWebEngineHistoryModel_MetaObject(const QWebEngineHistoryModel* self) { return (QMetaObject*) self->metaObject(); } @@ -147,6 +150,10 @@ struct miqt_string QWebEngineHistoryModel_Tr3(const char* s, const char* c, int return _ms; } +void QWebEngineHistory_virtbase(QWebEngineHistory* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebEngineHistory_MetaObject(const QWebEngineHistory* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/webengine/gen_qwebenginehistory.go b/qt6/webengine/gen_qwebenginehistory.go index 60725fa6..275bf2b7 100644 --- a/qt6/webengine/gen_qwebenginehistory.go +++ b/qt6/webengine/gen_qwebenginehistory.go @@ -47,24 +47,19 @@ func newQWebEngineHistoryItem(h *C.QWebEngineHistoryItem) *QWebEngineHistoryItem if h == nil { return nil } + return &QWebEngineHistoryItem{h: h} } // UnsafeNewQWebEngineHistoryItem constructs the type using only unsafe pointers. func UnsafeNewQWebEngineHistoryItem(h unsafe.Pointer) *QWebEngineHistoryItem { - if h == nil { - return nil - } - - return &QWebEngineHistoryItem{h: (*C.QWebEngineHistoryItem)(h)} + return newQWebEngineHistoryItem((*C.QWebEngineHistoryItem)(h)) } // NewQWebEngineHistoryItem constructs a new QWebEngineHistoryItem object. func NewQWebEngineHistoryItem(other *QWebEngineHistoryItem) *QWebEngineHistoryItem { - var outptr_QWebEngineHistoryItem *C.QWebEngineHistoryItem = nil - C.QWebEngineHistoryItem_new(other.cPointer(), &outptr_QWebEngineHistoryItem) - ret := newQWebEngineHistoryItem(outptr_QWebEngineHistoryItem) + ret := newQWebEngineHistoryItem(C.QWebEngineHistoryItem_new(other.cPointer())) ret.isSubclass = true return ret } @@ -147,22 +142,20 @@ func (this *QWebEngineHistoryModel) UnsafePointer() unsafe.Pointer { } // newQWebEngineHistoryModel constructs the type using only CGO pointers. -func newQWebEngineHistoryModel(h *C.QWebEngineHistoryModel, h_QAbstractListModel *C.QAbstractListModel, h_QAbstractItemModel *C.QAbstractItemModel, h_QObject *C.QObject) *QWebEngineHistoryModel { +func newQWebEngineHistoryModel(h *C.QWebEngineHistoryModel) *QWebEngineHistoryModel { if h == nil { return nil } + var outptr_QAbstractListModel *C.QAbstractListModel = nil + C.QWebEngineHistoryModel_virtbase(h, &outptr_QAbstractListModel) + return &QWebEngineHistoryModel{h: h, - QAbstractListModel: qt6.UnsafeNewQAbstractListModel(unsafe.Pointer(h_QAbstractListModel), unsafe.Pointer(h_QAbstractItemModel), unsafe.Pointer(h_QObject))} + QAbstractListModel: qt6.UnsafeNewQAbstractListModel(unsafe.Pointer(outptr_QAbstractListModel))} } // UnsafeNewQWebEngineHistoryModel constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineHistoryModel(h unsafe.Pointer, h_QAbstractListModel unsafe.Pointer, h_QAbstractItemModel unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineHistoryModel { - if h == nil { - return nil - } - - return &QWebEngineHistoryModel{h: (*C.QWebEngineHistoryModel)(h), - QAbstractListModel: qt6.UnsafeNewQAbstractListModel(h_QAbstractListModel, h_QAbstractItemModel, h_QObject)} +func UnsafeNewQWebEngineHistoryModel(h unsafe.Pointer) *QWebEngineHistoryModel { + return newQWebEngineHistoryModel((*C.QWebEngineHistoryModel)(h)) } func (this *QWebEngineHistoryModel) MetaObject() *qt6.QMetaObject { @@ -258,22 +251,20 @@ func (this *QWebEngineHistory) UnsafePointer() unsafe.Pointer { } // newQWebEngineHistory constructs the type using only CGO pointers. -func newQWebEngineHistory(h *C.QWebEngineHistory, h_QObject *C.QObject) *QWebEngineHistory { +func newQWebEngineHistory(h *C.QWebEngineHistory) *QWebEngineHistory { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineHistory_virtbase(h, &outptr_QObject) + return &QWebEngineHistory{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineHistory constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineHistory(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineHistory { - if h == nil { - return nil - } - - return &QWebEngineHistory{h: (*C.QWebEngineHistory)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineHistory(h unsafe.Pointer) *QWebEngineHistory { + return newQWebEngineHistory((*C.QWebEngineHistory)(h)) } func (this *QWebEngineHistory) MetaObject() *qt6.QMetaObject { @@ -388,15 +379,15 @@ func (this *QWebEngineHistory) Count() int { } func (this *QWebEngineHistory) ItemsModel() *QWebEngineHistoryModel { - return newQWebEngineHistoryModel(C.QWebEngineHistory_ItemsModel(this.h), nil, nil, nil) + return newQWebEngineHistoryModel(C.QWebEngineHistory_ItemsModel(this.h)) } func (this *QWebEngineHistory) BackItemsModel() *QWebEngineHistoryModel { - return newQWebEngineHistoryModel(C.QWebEngineHistory_BackItemsModel(this.h), nil, nil, nil) + return newQWebEngineHistoryModel(C.QWebEngineHistory_BackItemsModel(this.h)) } func (this *QWebEngineHistory) ForwardItemsModel() *QWebEngineHistoryModel { - return newQWebEngineHistoryModel(C.QWebEngineHistory_ForwardItemsModel(this.h), nil, nil, nil) + return newQWebEngineHistoryModel(C.QWebEngineHistory_ForwardItemsModel(this.h)) } func QWebEngineHistory_Tr2(s string, c string) string { diff --git a/qt6/webengine/gen_qwebenginehistory.h b/qt6/webengine/gen_qwebenginehistory.h index fd5d0e23..498af531 100644 --- a/qt6/webengine/gen_qwebenginehistory.h +++ b/qt6/webengine/gen_qwebenginehistory.h @@ -40,7 +40,7 @@ typedef struct QWebEngineHistoryItem QWebEngineHistoryItem; typedef struct QWebEngineHistoryModel QWebEngineHistoryModel; #endif -void QWebEngineHistoryItem_new(QWebEngineHistoryItem* other, QWebEngineHistoryItem** outptr_QWebEngineHistoryItem); +QWebEngineHistoryItem* QWebEngineHistoryItem_new(QWebEngineHistoryItem* other); void QWebEngineHistoryItem_OperatorAssign(QWebEngineHistoryItem* self, QWebEngineHistoryItem* other); QUrl* QWebEngineHistoryItem_OriginalUrl(const QWebEngineHistoryItem* self); QUrl* QWebEngineHistoryItem_Url(const QWebEngineHistoryItem* self); @@ -51,6 +51,7 @@ bool QWebEngineHistoryItem_IsValid(const QWebEngineHistoryItem* self); void QWebEngineHistoryItem_Swap(QWebEngineHistoryItem* self, QWebEngineHistoryItem* other); void QWebEngineHistoryItem_Delete(QWebEngineHistoryItem* self, bool isSubclass); +void QWebEngineHistoryModel_virtbase(QWebEngineHistoryModel* src, QAbstractListModel** outptr_QAbstractListModel); QMetaObject* QWebEngineHistoryModel_MetaObject(const QWebEngineHistoryModel* self); void* QWebEngineHistoryModel_Metacast(QWebEngineHistoryModel* self, const char* param1); struct miqt_string QWebEngineHistoryModel_Tr(const char* s); @@ -61,6 +62,7 @@ void QWebEngineHistoryModel_Reset(QWebEngineHistoryModel* self); struct miqt_string QWebEngineHistoryModel_Tr2(const char* s, const char* c); struct miqt_string QWebEngineHistoryModel_Tr3(const char* s, const char* c, int n); +void QWebEngineHistory_virtbase(QWebEngineHistory* src, QObject** outptr_QObject); QMetaObject* QWebEngineHistory_MetaObject(const QWebEngineHistory* self); void* QWebEngineHistory_Metacast(QWebEngineHistory* self, const char* param1); struct miqt_string QWebEngineHistory_Tr(const char* s); diff --git a/qt6/webengine/gen_qwebenginehttprequest.cpp b/qt6/webengine/gen_qwebenginehttprequest.cpp index edf277cf..75d0ced9 100644 --- a/qt6/webengine/gen_qwebenginehttprequest.cpp +++ b/qt6/webengine/gen_qwebenginehttprequest.cpp @@ -10,24 +10,20 @@ #include "gen_qwebenginehttprequest.h" #include "_cgo_export.h" -void QWebEngineHttpRequest_new(QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { - QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(); - *outptr_QWebEngineHttpRequest = ret; +QWebEngineHttpRequest* QWebEngineHttpRequest_new() { + return new QWebEngineHttpRequest(); } -void QWebEngineHttpRequest_new2(QWebEngineHttpRequest* other, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { - QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(*other); - *outptr_QWebEngineHttpRequest = ret; +QWebEngineHttpRequest* QWebEngineHttpRequest_new2(QWebEngineHttpRequest* other) { + return new QWebEngineHttpRequest(*other); } -void QWebEngineHttpRequest_new3(QUrl* url, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { - QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(*url); - *outptr_QWebEngineHttpRequest = ret; +QWebEngineHttpRequest* QWebEngineHttpRequest_new3(QUrl* url) { + return new QWebEngineHttpRequest(*url); } -void QWebEngineHttpRequest_new4(QUrl* url, int* method, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest) { - QWebEngineHttpRequest* ret = new QWebEngineHttpRequest(*url, (const QWebEngineHttpRequest::Method&)(*method)); - *outptr_QWebEngineHttpRequest = ret; +QWebEngineHttpRequest* QWebEngineHttpRequest_new4(QUrl* url, int* method) { + return new QWebEngineHttpRequest(*url, (const QWebEngineHttpRequest::Method&)(*method)); } void QWebEngineHttpRequest_OperatorAssign(QWebEngineHttpRequest* self, QWebEngineHttpRequest* other) { diff --git a/qt6/webengine/gen_qwebenginehttprequest.go b/qt6/webengine/gen_qwebenginehttprequest.go index cf9284ac..e9b03f0e 100644 --- a/qt6/webengine/gen_qwebenginehttprequest.go +++ b/qt6/webengine/gen_qwebenginehttprequest.go @@ -45,54 +45,43 @@ func newQWebEngineHttpRequest(h *C.QWebEngineHttpRequest) *QWebEngineHttpRequest if h == nil { return nil } + return &QWebEngineHttpRequest{h: h} } // UnsafeNewQWebEngineHttpRequest constructs the type using only unsafe pointers. func UnsafeNewQWebEngineHttpRequest(h unsafe.Pointer) *QWebEngineHttpRequest { - if h == nil { - return nil - } - - return &QWebEngineHttpRequest{h: (*C.QWebEngineHttpRequest)(h)} + return newQWebEngineHttpRequest((*C.QWebEngineHttpRequest)(h)) } // NewQWebEngineHttpRequest constructs a new QWebEngineHttpRequest object. func NewQWebEngineHttpRequest() *QWebEngineHttpRequest { - var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil - C.QWebEngineHttpRequest_new(&outptr_QWebEngineHttpRequest) - ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(C.QWebEngineHttpRequest_new()) ret.isSubclass = true return ret } // NewQWebEngineHttpRequest2 constructs a new QWebEngineHttpRequest object. func NewQWebEngineHttpRequest2(other *QWebEngineHttpRequest) *QWebEngineHttpRequest { - var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil - C.QWebEngineHttpRequest_new2(other.cPointer(), &outptr_QWebEngineHttpRequest) - ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(C.QWebEngineHttpRequest_new2(other.cPointer())) ret.isSubclass = true return ret } // NewQWebEngineHttpRequest3 constructs a new QWebEngineHttpRequest object. func NewQWebEngineHttpRequest3(url *qt6.QUrl) *QWebEngineHttpRequest { - var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil - C.QWebEngineHttpRequest_new3((*C.QUrl)(url.UnsafePointer()), &outptr_QWebEngineHttpRequest) - ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(C.QWebEngineHttpRequest_new3((*C.QUrl)(url.UnsafePointer()))) ret.isSubclass = true return ret } // NewQWebEngineHttpRequest4 constructs a new QWebEngineHttpRequest object. func NewQWebEngineHttpRequest4(url *qt6.QUrl, method *QWebEngineHttpRequest__Method) *QWebEngineHttpRequest { - var outptr_QWebEngineHttpRequest *C.QWebEngineHttpRequest = nil - C.QWebEngineHttpRequest_new4((*C.QUrl)(url.UnsafePointer()), (*C.int)(unsafe.Pointer(method)), &outptr_QWebEngineHttpRequest) - ret := newQWebEngineHttpRequest(outptr_QWebEngineHttpRequest) + ret := newQWebEngineHttpRequest(C.QWebEngineHttpRequest_new4((*C.QUrl)(url.UnsafePointer()), (*C.int)(unsafe.Pointer(method)))) ret.isSubclass = true return ret } diff --git a/qt6/webengine/gen_qwebenginehttprequest.h b/qt6/webengine/gen_qwebenginehttprequest.h index 99677c98..ee437c06 100644 --- a/qt6/webengine/gen_qwebenginehttprequest.h +++ b/qt6/webengine/gen_qwebenginehttprequest.h @@ -22,10 +22,10 @@ typedef struct QUrl QUrl; typedef struct QWebEngineHttpRequest QWebEngineHttpRequest; #endif -void QWebEngineHttpRequest_new(QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); -void QWebEngineHttpRequest_new2(QWebEngineHttpRequest* other, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); -void QWebEngineHttpRequest_new3(QUrl* url, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); -void QWebEngineHttpRequest_new4(QUrl* url, int* method, QWebEngineHttpRequest** outptr_QWebEngineHttpRequest); +QWebEngineHttpRequest* QWebEngineHttpRequest_new(); +QWebEngineHttpRequest* QWebEngineHttpRequest_new2(QWebEngineHttpRequest* other); +QWebEngineHttpRequest* QWebEngineHttpRequest_new3(QUrl* url); +QWebEngineHttpRequest* QWebEngineHttpRequest_new4(QUrl* url, int* method); void QWebEngineHttpRequest_OperatorAssign(QWebEngineHttpRequest* self, QWebEngineHttpRequest* other); QWebEngineHttpRequest* QWebEngineHttpRequest_PostRequest(QUrl* url, struct miqt_map /* of struct miqt_string to struct miqt_string */ postData); void QWebEngineHttpRequest_Swap(QWebEngineHttpRequest* self, QWebEngineHttpRequest* other); diff --git a/qt6/webengine/gen_qwebengineloadinginfo.cpp b/qt6/webengine/gen_qwebengineloadinginfo.cpp index 36a5d337..8348e3b2 100644 --- a/qt6/webengine/gen_qwebengineloadinginfo.cpp +++ b/qt6/webengine/gen_qwebengineloadinginfo.cpp @@ -7,9 +7,8 @@ #include "gen_qwebengineloadinginfo.h" #include "_cgo_export.h" -void QWebEngineLoadingInfo_new(QWebEngineLoadingInfo* other, QWebEngineLoadingInfo** outptr_QWebEngineLoadingInfo) { - QWebEngineLoadingInfo* ret = new QWebEngineLoadingInfo(*other); - *outptr_QWebEngineLoadingInfo = ret; +QWebEngineLoadingInfo* QWebEngineLoadingInfo_new(QWebEngineLoadingInfo* other) { + return new QWebEngineLoadingInfo(*other); } void QWebEngineLoadingInfo_OperatorAssign(QWebEngineLoadingInfo* self, QWebEngineLoadingInfo* other) { diff --git a/qt6/webengine/gen_qwebengineloadinginfo.go b/qt6/webengine/gen_qwebengineloadinginfo.go index 9e3a6a19..7b5927e0 100644 --- a/qt6/webengine/gen_qwebengineloadinginfo.go +++ b/qt6/webengine/gen_qwebengineloadinginfo.go @@ -60,24 +60,19 @@ func newQWebEngineLoadingInfo(h *C.QWebEngineLoadingInfo) *QWebEngineLoadingInfo if h == nil { return nil } + return &QWebEngineLoadingInfo{h: h} } // UnsafeNewQWebEngineLoadingInfo constructs the type using only unsafe pointers. func UnsafeNewQWebEngineLoadingInfo(h unsafe.Pointer) *QWebEngineLoadingInfo { - if h == nil { - return nil - } - - return &QWebEngineLoadingInfo{h: (*C.QWebEngineLoadingInfo)(h)} + return newQWebEngineLoadingInfo((*C.QWebEngineLoadingInfo)(h)) } // NewQWebEngineLoadingInfo constructs a new QWebEngineLoadingInfo object. func NewQWebEngineLoadingInfo(other *QWebEngineLoadingInfo) *QWebEngineLoadingInfo { - var outptr_QWebEngineLoadingInfo *C.QWebEngineLoadingInfo = nil - C.QWebEngineLoadingInfo_new(other.cPointer(), &outptr_QWebEngineLoadingInfo) - ret := newQWebEngineLoadingInfo(outptr_QWebEngineLoadingInfo) + ret := newQWebEngineLoadingInfo(C.QWebEngineLoadingInfo_new(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/webengine/gen_qwebengineloadinginfo.h b/qt6/webengine/gen_qwebengineloadinginfo.h index 7dd13fe2..03d27eea 100644 --- a/qt6/webengine/gen_qwebengineloadinginfo.h +++ b/qt6/webengine/gen_qwebengineloadinginfo.h @@ -22,7 +22,7 @@ typedef struct QUrl QUrl; typedef struct QWebEngineLoadingInfo QWebEngineLoadingInfo; #endif -void QWebEngineLoadingInfo_new(QWebEngineLoadingInfo* other, QWebEngineLoadingInfo** outptr_QWebEngineLoadingInfo); +QWebEngineLoadingInfo* QWebEngineLoadingInfo_new(QWebEngineLoadingInfo* other); void QWebEngineLoadingInfo_OperatorAssign(QWebEngineLoadingInfo* self, QWebEngineLoadingInfo* other); QUrl* QWebEngineLoadingInfo_Url(const QWebEngineLoadingInfo* self); bool QWebEngineLoadingInfo_IsErrorPage(const QWebEngineLoadingInfo* self); diff --git a/qt6/webengine/gen_qwebenginenavigationrequest.cpp b/qt6/webengine/gen_qwebenginenavigationrequest.cpp index ad558718..fe06932d 100644 --- a/qt6/webengine/gen_qwebenginenavigationrequest.cpp +++ b/qt6/webengine/gen_qwebenginenavigationrequest.cpp @@ -9,6 +9,10 @@ #include "gen_qwebenginenavigationrequest.h" #include "_cgo_export.h" +void QWebEngineNavigationRequest_virtbase(QWebEngineNavigationRequest* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebEngineNavigationRequest_MetaObject(const QWebEngineNavigationRequest* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/webengine/gen_qwebenginenavigationrequest.go b/qt6/webengine/gen_qwebenginenavigationrequest.go index e54c589a..e093369b 100644 --- a/qt6/webengine/gen_qwebenginenavigationrequest.go +++ b/qt6/webengine/gen_qwebenginenavigationrequest.go @@ -55,22 +55,20 @@ func (this *QWebEngineNavigationRequest) UnsafePointer() unsafe.Pointer { } // newQWebEngineNavigationRequest constructs the type using only CGO pointers. -func newQWebEngineNavigationRequest(h *C.QWebEngineNavigationRequest, h_QObject *C.QObject) *QWebEngineNavigationRequest { +func newQWebEngineNavigationRequest(h *C.QWebEngineNavigationRequest) *QWebEngineNavigationRequest { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineNavigationRequest_virtbase(h, &outptr_QObject) + return &QWebEngineNavigationRequest{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineNavigationRequest constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineNavigationRequest(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineNavigationRequest { - if h == nil { - return nil - } - - return &QWebEngineNavigationRequest{h: (*C.QWebEngineNavigationRequest)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineNavigationRequest(h unsafe.Pointer) *QWebEngineNavigationRequest { + return newQWebEngineNavigationRequest((*C.QWebEngineNavigationRequest)(h)) } func (this *QWebEngineNavigationRequest) MetaObject() *qt6.QMetaObject { diff --git a/qt6/webengine/gen_qwebenginenavigationrequest.h b/qt6/webengine/gen_qwebenginenavigationrequest.h index 282ff59c..a73abc3a 100644 --- a/qt6/webengine/gen_qwebenginenavigationrequest.h +++ b/qt6/webengine/gen_qwebenginenavigationrequest.h @@ -26,6 +26,7 @@ typedef struct QUrl QUrl; typedef struct QWebEngineNavigationRequest QWebEngineNavigationRequest; #endif +void QWebEngineNavigationRequest_virtbase(QWebEngineNavigationRequest* src, QObject** outptr_QObject); QMetaObject* QWebEngineNavigationRequest_MetaObject(const QWebEngineNavigationRequest* self); void* QWebEngineNavigationRequest_Metacast(QWebEngineNavigationRequest* self, const char* param1); struct miqt_string QWebEngineNavigationRequest_Tr(const char* s); diff --git a/qt6/webengine/gen_qwebenginenewwindowrequest.cpp b/qt6/webengine/gen_qwebenginenewwindowrequest.cpp index ee883077..8d6df815 100644 --- a/qt6/webengine/gen_qwebenginenewwindowrequest.cpp +++ b/qt6/webengine/gen_qwebenginenewwindowrequest.cpp @@ -11,6 +11,10 @@ #include "gen_qwebenginenewwindowrequest.h" #include "_cgo_export.h" +void QWebEngineNewWindowRequest_virtbase(QWebEngineNewWindowRequest* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebEngineNewWindowRequest_MetaObject(const QWebEngineNewWindowRequest* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/webengine/gen_qwebenginenewwindowrequest.go b/qt6/webengine/gen_qwebenginenewwindowrequest.go index cf358757..f224f749 100644 --- a/qt6/webengine/gen_qwebenginenewwindowrequest.go +++ b/qt6/webengine/gen_qwebenginenewwindowrequest.go @@ -44,22 +44,20 @@ func (this *QWebEngineNewWindowRequest) UnsafePointer() unsafe.Pointer { } // newQWebEngineNewWindowRequest constructs the type using only CGO pointers. -func newQWebEngineNewWindowRequest(h *C.QWebEngineNewWindowRequest, h_QObject *C.QObject) *QWebEngineNewWindowRequest { +func newQWebEngineNewWindowRequest(h *C.QWebEngineNewWindowRequest) *QWebEngineNewWindowRequest { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineNewWindowRequest_virtbase(h, &outptr_QObject) + return &QWebEngineNewWindowRequest{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineNewWindowRequest constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineNewWindowRequest(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineNewWindowRequest { - if h == nil { - return nil - } - - return &QWebEngineNewWindowRequest{h: (*C.QWebEngineNewWindowRequest)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineNewWindowRequest(h unsafe.Pointer) *QWebEngineNewWindowRequest { + return newQWebEngineNewWindowRequest((*C.QWebEngineNewWindowRequest)(h)) } func (this *QWebEngineNewWindowRequest) MetaObject() *qt6.QMetaObject { diff --git a/qt6/webengine/gen_qwebenginenewwindowrequest.h b/qt6/webengine/gen_qwebenginenewwindowrequest.h index 1c9c4ed7..35ef293d 100644 --- a/qt6/webengine/gen_qwebenginenewwindowrequest.h +++ b/qt6/webengine/gen_qwebenginenewwindowrequest.h @@ -30,6 +30,7 @@ typedef struct QWebEngineNewWindowRequest QWebEngineNewWindowRequest; typedef struct QWebEnginePage QWebEnginePage; #endif +void QWebEngineNewWindowRequest_virtbase(QWebEngineNewWindowRequest* src, QObject** outptr_QObject); QMetaObject* QWebEngineNewWindowRequest_MetaObject(const QWebEngineNewWindowRequest* self); void* QWebEngineNewWindowRequest_Metacast(QWebEngineNewWindowRequest* self, const char* param1); struct miqt_string QWebEngineNewWindowRequest_Tr(const char* s); diff --git a/qt6/webengine/gen_qwebenginenotification.cpp b/qt6/webengine/gen_qwebenginenotification.cpp index a9790c40..f2df9e46 100644 --- a/qt6/webengine/gen_qwebenginenotification.cpp +++ b/qt6/webengine/gen_qwebenginenotification.cpp @@ -10,6 +10,10 @@ #include "gen_qwebenginenotification.h" #include "_cgo_export.h" +void QWebEngineNotification_virtbase(QWebEngineNotification* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebEngineNotification_MetaObject(const QWebEngineNotification* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/webengine/gen_qwebenginenotification.go b/qt6/webengine/gen_qwebenginenotification.go index 8f23d5fa..3b0927d1 100644 --- a/qt6/webengine/gen_qwebenginenotification.go +++ b/qt6/webengine/gen_qwebenginenotification.go @@ -36,22 +36,20 @@ func (this *QWebEngineNotification) UnsafePointer() unsafe.Pointer { } // newQWebEngineNotification constructs the type using only CGO pointers. -func newQWebEngineNotification(h *C.QWebEngineNotification, h_QObject *C.QObject) *QWebEngineNotification { +func newQWebEngineNotification(h *C.QWebEngineNotification) *QWebEngineNotification { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineNotification_virtbase(h, &outptr_QObject) + return &QWebEngineNotification{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineNotification constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineNotification(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineNotification { - if h == nil { - return nil - } - - return &QWebEngineNotification{h: (*C.QWebEngineNotification)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineNotification(h unsafe.Pointer) *QWebEngineNotification { + return newQWebEngineNotification((*C.QWebEngineNotification)(h)) } func (this *QWebEngineNotification) MetaObject() *qt6.QMetaObject { @@ -84,7 +82,7 @@ func (this *QWebEngineNotification) Origin() *qt6.QUrl { } func (this *QWebEngineNotification) Icon() *qt6.QImage { - _goptr := qt6.UnsafeNewQImage(unsafe.Pointer(C.QWebEngineNotification_Icon(this.h)), nil) + _goptr := qt6.UnsafeNewQImage(unsafe.Pointer(C.QWebEngineNotification_Icon(this.h))) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } diff --git a/qt6/webengine/gen_qwebenginenotification.h b/qt6/webengine/gen_qwebenginenotification.h index b467aa51..2a5d1c15 100644 --- a/qt6/webengine/gen_qwebenginenotification.h +++ b/qt6/webengine/gen_qwebenginenotification.h @@ -28,6 +28,7 @@ typedef struct QUrl QUrl; typedef struct QWebEngineNotification QWebEngineNotification; #endif +void QWebEngineNotification_virtbase(QWebEngineNotification* src, QObject** outptr_QObject); QMetaObject* QWebEngineNotification_MetaObject(const QWebEngineNotification* self); void* QWebEngineNotification_Metacast(QWebEngineNotification* self, const char* param1); struct miqt_string QWebEngineNotification_Tr(const char* s); diff --git a/qt6/webengine/gen_qwebenginepage.cpp b/qt6/webengine/gen_qwebenginepage.cpp index 7c7371c7..13251247 100644 --- a/qt6/webengine/gen_qwebenginepage.cpp +++ b/qt6/webengine/gen_qwebenginepage.cpp @@ -510,28 +510,24 @@ public: }; -void QWebEnginePage_new(QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { - MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(); - *outptr_QWebEnginePage = ret; - *outptr_QObject = static_cast(ret); +QWebEnginePage* QWebEnginePage_new() { + return new MiqtVirtualQWebEnginePage(); } -void QWebEnginePage_new2(QWebEngineProfile* profile, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { - MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(profile); - *outptr_QWebEnginePage = ret; - *outptr_QObject = static_cast(ret); +QWebEnginePage* QWebEnginePage_new2(QWebEngineProfile* profile) { + return new MiqtVirtualQWebEnginePage(profile); } -void QWebEnginePage_new3(QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { - MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(parent); - *outptr_QWebEnginePage = ret; - *outptr_QObject = static_cast(ret); +QWebEnginePage* QWebEnginePage_new3(QObject* parent) { + return new MiqtVirtualQWebEnginePage(parent); } -void QWebEnginePage_new4(QWebEngineProfile* profile, QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject) { - MiqtVirtualQWebEnginePage* ret = new MiqtVirtualQWebEnginePage(profile, parent); - *outptr_QWebEnginePage = ret; - *outptr_QObject = static_cast(ret); +QWebEnginePage* QWebEnginePage_new4(QWebEngineProfile* profile, QObject* parent) { + return new MiqtVirtualQWebEnginePage(profile, parent); +} + +void QWebEnginePage_virtbase(QWebEnginePage* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QWebEnginePage_MetaObject(const QWebEnginePage* self) { diff --git a/qt6/webengine/gen_qwebenginepage.go b/qt6/webengine/gen_qwebenginepage.go index fea5ee18..3e5da838 100644 --- a/qt6/webengine/gen_qwebenginepage.go +++ b/qt6/webengine/gen_qwebenginepage.go @@ -173,64 +173,50 @@ func (this *QWebEnginePage) UnsafePointer() unsafe.Pointer { } // newQWebEnginePage constructs the type using only CGO pointers. -func newQWebEnginePage(h *C.QWebEnginePage, h_QObject *C.QObject) *QWebEnginePage { +func newQWebEnginePage(h *C.QWebEnginePage) *QWebEnginePage { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEnginePage_virtbase(h, &outptr_QObject) + return &QWebEnginePage{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEnginePage constructs the type using only unsafe pointers. -func UnsafeNewQWebEnginePage(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEnginePage { - if h == nil { - return nil - } - - return &QWebEnginePage{h: (*C.QWebEnginePage)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEnginePage(h unsafe.Pointer) *QWebEnginePage { + return newQWebEnginePage((*C.QWebEnginePage)(h)) } // NewQWebEnginePage constructs a new QWebEnginePage object. func NewQWebEnginePage() *QWebEnginePage { - var outptr_QWebEnginePage *C.QWebEnginePage = nil - var outptr_QObject *C.QObject = nil - C.QWebEnginePage_new(&outptr_QWebEnginePage, &outptr_QObject) - ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret := newQWebEnginePage(C.QWebEnginePage_new()) ret.isSubclass = true return ret } // NewQWebEnginePage2 constructs a new QWebEnginePage object. func NewQWebEnginePage2(profile *QWebEngineProfile) *QWebEnginePage { - var outptr_QWebEnginePage *C.QWebEnginePage = nil - var outptr_QObject *C.QObject = nil - C.QWebEnginePage_new2(profile.cPointer(), &outptr_QWebEnginePage, &outptr_QObject) - ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret := newQWebEnginePage(C.QWebEnginePage_new2(profile.cPointer())) ret.isSubclass = true return ret } // NewQWebEnginePage3 constructs a new QWebEnginePage object. func NewQWebEnginePage3(parent *qt6.QObject) *QWebEnginePage { - var outptr_QWebEnginePage *C.QWebEnginePage = nil - var outptr_QObject *C.QObject = nil - C.QWebEnginePage_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QWebEnginePage, &outptr_QObject) - ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret := newQWebEnginePage(C.QWebEnginePage_new3((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQWebEnginePage4 constructs a new QWebEnginePage object. func NewQWebEnginePage4(profile *QWebEngineProfile, parent *qt6.QObject) *QWebEnginePage { - var outptr_QWebEnginePage *C.QWebEnginePage = nil - var outptr_QObject *C.QObject = nil - C.QWebEnginePage_new4(profile.cPointer(), (*C.QObject)(parent.UnsafePointer()), &outptr_QWebEnginePage, &outptr_QObject) - ret := newQWebEnginePage(outptr_QWebEnginePage, outptr_QObject) + ret := newQWebEnginePage(C.QWebEnginePage_new4(profile.cPointer(), (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -255,7 +241,7 @@ func QWebEnginePage_Tr(s string) string { } func (this *QWebEnginePage) History() *QWebEngineHistory { - return newQWebEngineHistory(C.QWebEnginePage_History(this.h), nil) + return newQWebEngineHistory(C.QWebEnginePage_History(this.h)) } func (this *QWebEnginePage) HasSelection() bool { @@ -270,11 +256,11 @@ func (this *QWebEnginePage) SelectedText() string { } func (this *QWebEnginePage) Profile() *QWebEngineProfile { - return newQWebEngineProfile(C.QWebEnginePage_Profile(this.h), nil) + return newQWebEngineProfile(C.QWebEnginePage_Profile(this.h)) } func (this *QWebEnginePage) Action(action QWebEnginePage__WebAction) *qt6.QAction { - return qt6.UnsafeNewQAction(unsafe.Pointer(C.QWebEnginePage_Action(this.h, (C.int)(action))), nil) + return qt6.UnsafeNewQAction(unsafe.Pointer(C.QWebEnginePage_Action(this.h, (C.int)(action)))) } func (this *QWebEnginePage) TriggerAction(action QWebEnginePage__WebAction, checked bool) { @@ -392,7 +378,7 @@ func (this *QWebEnginePage) Settings() *QWebEngineSettings { } func (this *QWebEnginePage) WebChannel() *webchannel.QWebChannel { - return webchannel.UnsafeNewQWebChannel(unsafe.Pointer(C.QWebEnginePage_WebChannel(this.h)), nil) + return webchannel.UnsafeNewQWebChannel(unsafe.Pointer(C.QWebEnginePage_WebChannel(this.h))) } func (this *QWebEnginePage) SetWebChannel(param1 *webchannel.QWebChannel) { @@ -446,7 +432,7 @@ func (this *QWebEnginePage) SetInspectedPage(page *QWebEnginePage) { } func (this *QWebEnginePage) InspectedPage() *QWebEnginePage { - return newQWebEnginePage(C.QWebEnginePage_InspectedPage(this.h), nil) + return newQWebEnginePage(C.QWebEnginePage_InspectedPage(this.h)) } func (this *QWebEnginePage) SetDevToolsPage(page *QWebEnginePage) { @@ -454,7 +440,7 @@ func (this *QWebEnginePage) SetDevToolsPage(page *QWebEnginePage) { } func (this *QWebEnginePage) DevToolsPage() *QWebEnginePage { - return newQWebEnginePage(C.QWebEnginePage_DevToolsPage(this.h), nil) + return newQWebEnginePage(C.QWebEnginePage_DevToolsPage(this.h)) } func (this *QWebEnginePage) SetUrlRequestInterceptor(interceptor *QWebEngineUrlRequestInterceptor) { @@ -907,7 +893,7 @@ func miqt_exec_callback_QWebEnginePage_NavigationRequested(cb C.intptr_t, reques } // Convert all CABI parameters to Go parameters - slotval1 := newQWebEngineNavigationRequest(request, nil) + slotval1 := newQWebEngineNavigationRequest(request) gofunc(slotval1) } @@ -927,7 +913,7 @@ func miqt_exec_callback_QWebEnginePage_NewWindowRequested(cb C.intptr_t, request } // Convert all CABI parameters to Go parameters - slotval1 := newQWebEngineNewWindowRequest(request, nil) + slotval1 := newQWebEngineNewWindowRequest(request) gofunc(slotval1) } @@ -1407,7 +1393,7 @@ func miqt_exec_callback_QWebEnginePage_Event(self *C.QWebEnginePage, cb C.intptr func (this *QWebEnginePage) callVirtualBase_CreateWindow(typeVal QWebEnginePage__WebWindowType) *QWebEnginePage { - return newQWebEnginePage(C.QWebEnginePage_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal)), nil) + return newQWebEnginePage(C.QWebEnginePage_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal))) } func (this *QWebEnginePage) OnCreateWindow(slot func(super func(typeVal QWebEnginePage__WebWindowType) *QWebEnginePage, typeVal QWebEnginePage__WebWindowType) *QWebEnginePage) { @@ -1721,7 +1707,7 @@ func miqt_exec_callback_QWebEnginePage_TimerEvent(self *C.QWebEnginePage, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QWebEnginePage{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -1747,7 +1733,7 @@ func miqt_exec_callback_QWebEnginePage_ChildEvent(self *C.QWebEnginePage, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QWebEnginePage{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/webengine/gen_qwebenginepage.h b/qt6/webengine/gen_qwebenginepage.h index cc273e21..9a8aee77 100644 --- a/qt6/webengine/gen_qwebenginepage.h +++ b/qt6/webengine/gen_qwebenginepage.h @@ -86,10 +86,11 @@ typedef struct QWebEngineSettings QWebEngineSettings; typedef struct QWebEngineUrlRequestInterceptor QWebEngineUrlRequestInterceptor; #endif -void QWebEnginePage_new(QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); -void QWebEnginePage_new2(QWebEngineProfile* profile, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); -void QWebEnginePage_new3(QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); -void QWebEnginePage_new4(QWebEngineProfile* profile, QObject* parent, QWebEnginePage** outptr_QWebEnginePage, QObject** outptr_QObject); +QWebEnginePage* QWebEnginePage_new(); +QWebEnginePage* QWebEnginePage_new2(QWebEngineProfile* profile); +QWebEnginePage* QWebEnginePage_new3(QObject* parent); +QWebEnginePage* QWebEnginePage_new4(QWebEngineProfile* profile, QObject* parent); +void QWebEnginePage_virtbase(QWebEnginePage* src, QObject** outptr_QObject); QMetaObject* QWebEnginePage_MetaObject(const QWebEnginePage* self); void* QWebEnginePage_Metacast(QWebEnginePage* self, const char* param1); struct miqt_string QWebEnginePage_Tr(const char* s); diff --git a/qt6/webengine/gen_qwebengineprofile.cpp b/qt6/webengine/gen_qwebengineprofile.cpp index c59c4a59..be42f192 100644 --- a/qt6/webengine/gen_qwebengineprofile.cpp +++ b/qt6/webengine/gen_qwebengineprofile.cpp @@ -205,30 +205,26 @@ public: }; -void QWebEngineProfile_new(QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { - MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(); - *outptr_QWebEngineProfile = ret; - *outptr_QObject = static_cast(ret); +QWebEngineProfile* QWebEngineProfile_new() { + return new MiqtVirtualQWebEngineProfile(); } -void QWebEngineProfile_new2(struct miqt_string name, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { +QWebEngineProfile* QWebEngineProfile_new2(struct miqt_string name) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(name_QString); - *outptr_QWebEngineProfile = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQWebEngineProfile(name_QString); } -void QWebEngineProfile_new3(QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { - MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(parent); - *outptr_QWebEngineProfile = ret; - *outptr_QObject = static_cast(ret); +QWebEngineProfile* QWebEngineProfile_new3(QObject* parent) { + return new MiqtVirtualQWebEngineProfile(parent); } -void QWebEngineProfile_new4(struct miqt_string name, QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject) { +QWebEngineProfile* QWebEngineProfile_new4(struct miqt_string name, QObject* parent) { QString name_QString = QString::fromUtf8(name.data, name.len); - MiqtVirtualQWebEngineProfile* ret = new MiqtVirtualQWebEngineProfile(name_QString, parent); - *outptr_QWebEngineProfile = ret; - *outptr_QObject = static_cast(ret); + return new MiqtVirtualQWebEngineProfile(name_QString, parent); +} + +void QWebEngineProfile_virtbase(QWebEngineProfile* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QWebEngineProfile_MetaObject(const QWebEngineProfile* self) { diff --git a/qt6/webengine/gen_qwebengineprofile.go b/qt6/webengine/gen_qwebengineprofile.go index b8995d06..648652d9 100644 --- a/qt6/webengine/gen_qwebengineprofile.go +++ b/qt6/webengine/gen_qwebengineprofile.go @@ -52,31 +52,26 @@ func (this *QWebEngineProfile) UnsafePointer() unsafe.Pointer { } // newQWebEngineProfile constructs the type using only CGO pointers. -func newQWebEngineProfile(h *C.QWebEngineProfile, h_QObject *C.QObject) *QWebEngineProfile { +func newQWebEngineProfile(h *C.QWebEngineProfile) *QWebEngineProfile { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineProfile_virtbase(h, &outptr_QObject) + return &QWebEngineProfile{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineProfile constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineProfile(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineProfile { - if h == nil { - return nil - } - - return &QWebEngineProfile{h: (*C.QWebEngineProfile)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineProfile(h unsafe.Pointer) *QWebEngineProfile { + return newQWebEngineProfile((*C.QWebEngineProfile)(h)) } // NewQWebEngineProfile constructs a new QWebEngineProfile object. func NewQWebEngineProfile() *QWebEngineProfile { - var outptr_QWebEngineProfile *C.QWebEngineProfile = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineProfile_new(&outptr_QWebEngineProfile, &outptr_QObject) - ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret := newQWebEngineProfile(C.QWebEngineProfile_new()) ret.isSubclass = true return ret } @@ -87,22 +82,16 @@ func NewQWebEngineProfile2(name string) *QWebEngineProfile { name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QWebEngineProfile *C.QWebEngineProfile = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineProfile_new2(name_ms, &outptr_QWebEngineProfile, &outptr_QObject) - ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret := newQWebEngineProfile(C.QWebEngineProfile_new2(name_ms)) ret.isSubclass = true return ret } // NewQWebEngineProfile3 constructs a new QWebEngineProfile object. func NewQWebEngineProfile3(parent *qt6.QObject) *QWebEngineProfile { - var outptr_QWebEngineProfile *C.QWebEngineProfile = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineProfile_new3((*C.QObject)(parent.UnsafePointer()), &outptr_QWebEngineProfile, &outptr_QObject) - ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret := newQWebEngineProfile(C.QWebEngineProfile_new3((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -113,11 +102,8 @@ func NewQWebEngineProfile4(name string, parent *qt6.QObject) *QWebEngineProfile name_ms.data = C.CString(name) name_ms.len = C.size_t(len(name)) defer C.free(unsafe.Pointer(name_ms.data)) - var outptr_QWebEngineProfile *C.QWebEngineProfile = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineProfile_new4(name_ms, (*C.QObject)(parent.UnsafePointer()), &outptr_QWebEngineProfile, &outptr_QObject) - ret := newQWebEngineProfile(outptr_QWebEngineProfile, outptr_QObject) + ret := newQWebEngineProfile(C.QWebEngineProfile_new4(name_ms, (*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -237,7 +223,7 @@ func (this *QWebEngineProfile) SetHttpCacheMaximumSize(maxSize int) { } func (this *QWebEngineProfile) CookieStore() *QWebEngineCookieStore { - return newQWebEngineCookieStore(C.QWebEngineProfile_CookieStore(this.h), nil) + return newQWebEngineCookieStore(C.QWebEngineProfile_CookieStore(this.h)) } func (this *QWebEngineProfile) SetUrlRequestInterceptor(interceptor *QWebEngineUrlRequestInterceptor) { @@ -274,7 +260,7 @@ func (this *QWebEngineProfile) UrlSchemeHandler(param1 []byte) *QWebEngineUrlSch param1_alias := C.struct_miqt_string{} param1_alias.data = (*C.char)(unsafe.Pointer(¶m1[0])) param1_alias.len = C.size_t(len(param1)) - return newQWebEngineUrlSchemeHandler(C.QWebEngineProfile_UrlSchemeHandler(this.h, param1_alias), nil) + return newQWebEngineUrlSchemeHandler(C.QWebEngineProfile_UrlSchemeHandler(this.h, param1_alias)) } func (this *QWebEngineProfile) InstallUrlSchemeHandler(scheme []byte, param2 *QWebEngineUrlSchemeHandler) { @@ -358,7 +344,7 @@ func (this *QWebEngineProfile) ClientCertificateStore() *QWebEngineClientCertifi } func QWebEngineProfile_DefaultProfile() *QWebEngineProfile { - return newQWebEngineProfile(C.QWebEngineProfile_DefaultProfile(), nil) + return newQWebEngineProfile(C.QWebEngineProfile_DefaultProfile()) } func (this *QWebEngineProfile) DownloadRequested(download *QWebEngineDownloadRequest) { @@ -376,7 +362,7 @@ func miqt_exec_callback_QWebEngineProfile_DownloadRequested(cb C.intptr_t, downl } // Convert all CABI parameters to Go parameters - slotval1 := newQWebEngineDownloadRequest(download, nil) + slotval1 := newQWebEngineDownloadRequest(download) gofunc(slotval1) } @@ -481,7 +467,7 @@ func miqt_exec_callback_QWebEngineProfile_TimerEvent(self *C.QWebEngineProfile, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QWebEngineProfile{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -507,7 +493,7 @@ func miqt_exec_callback_QWebEngineProfile_ChildEvent(self *C.QWebEngineProfile, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QWebEngineProfile{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/webengine/gen_qwebengineprofile.h b/qt6/webengine/gen_qwebengineprofile.h index b90d00c0..63e3c730 100644 --- a/qt6/webengine/gen_qwebengineprofile.h +++ b/qt6/webengine/gen_qwebengineprofile.h @@ -48,10 +48,11 @@ typedef struct QWebEngineUrlRequestInterceptor QWebEngineUrlRequestInterceptor; typedef struct QWebEngineUrlSchemeHandler QWebEngineUrlSchemeHandler; #endif -void QWebEngineProfile_new(QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); -void QWebEngineProfile_new2(struct miqt_string name, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); -void QWebEngineProfile_new3(QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); -void QWebEngineProfile_new4(struct miqt_string name, QObject* parent, QWebEngineProfile** outptr_QWebEngineProfile, QObject** outptr_QObject); +QWebEngineProfile* QWebEngineProfile_new(); +QWebEngineProfile* QWebEngineProfile_new2(struct miqt_string name); +QWebEngineProfile* QWebEngineProfile_new3(QObject* parent); +QWebEngineProfile* QWebEngineProfile_new4(struct miqt_string name, QObject* parent); +void QWebEngineProfile_virtbase(QWebEngineProfile* src, QObject** outptr_QObject); QMetaObject* QWebEngineProfile_MetaObject(const QWebEngineProfile* self); void* QWebEngineProfile_Metacast(QWebEngineProfile* self, const char* param1); struct miqt_string QWebEngineProfile_Tr(const char* s); diff --git a/qt6/webengine/gen_qwebenginequotarequest.cpp b/qt6/webengine/gen_qwebenginequotarequest.cpp index 6f249c33..2e9e0e52 100644 --- a/qt6/webengine/gen_qwebenginequotarequest.cpp +++ b/qt6/webengine/gen_qwebenginequotarequest.cpp @@ -4,14 +4,12 @@ #include "gen_qwebenginequotarequest.h" #include "_cgo_export.h" -void QWebEngineQuotaRequest_new(QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest) { - QWebEngineQuotaRequest* ret = new QWebEngineQuotaRequest(); - *outptr_QWebEngineQuotaRequest = ret; +QWebEngineQuotaRequest* QWebEngineQuotaRequest_new() { + return new QWebEngineQuotaRequest(); } -void QWebEngineQuotaRequest_new2(QWebEngineQuotaRequest* param1, QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest) { - QWebEngineQuotaRequest* ret = new QWebEngineQuotaRequest(*param1); - *outptr_QWebEngineQuotaRequest = ret; +QWebEngineQuotaRequest* QWebEngineQuotaRequest_new2(QWebEngineQuotaRequest* param1) { + return new QWebEngineQuotaRequest(*param1); } void QWebEngineQuotaRequest_Accept(QWebEngineQuotaRequest* self) { diff --git a/qt6/webengine/gen_qwebenginequotarequest.go b/qt6/webengine/gen_qwebenginequotarequest.go index dfe08039..b24fe1ab 100644 --- a/qt6/webengine/gen_qwebenginequotarequest.go +++ b/qt6/webengine/gen_qwebenginequotarequest.go @@ -38,34 +38,27 @@ func newQWebEngineQuotaRequest(h *C.QWebEngineQuotaRequest) *QWebEngineQuotaRequ if h == nil { return nil } + return &QWebEngineQuotaRequest{h: h} } // UnsafeNewQWebEngineQuotaRequest constructs the type using only unsafe pointers. func UnsafeNewQWebEngineQuotaRequest(h unsafe.Pointer) *QWebEngineQuotaRequest { - if h == nil { - return nil - } - - return &QWebEngineQuotaRequest{h: (*C.QWebEngineQuotaRequest)(h)} + return newQWebEngineQuotaRequest((*C.QWebEngineQuotaRequest)(h)) } // NewQWebEngineQuotaRequest constructs a new QWebEngineQuotaRequest object. func NewQWebEngineQuotaRequest() *QWebEngineQuotaRequest { - var outptr_QWebEngineQuotaRequest *C.QWebEngineQuotaRequest = nil - C.QWebEngineQuotaRequest_new(&outptr_QWebEngineQuotaRequest) - ret := newQWebEngineQuotaRequest(outptr_QWebEngineQuotaRequest) + ret := newQWebEngineQuotaRequest(C.QWebEngineQuotaRequest_new()) ret.isSubclass = true return ret } // NewQWebEngineQuotaRequest2 constructs a new QWebEngineQuotaRequest object. func NewQWebEngineQuotaRequest2(param1 *QWebEngineQuotaRequest) *QWebEngineQuotaRequest { - var outptr_QWebEngineQuotaRequest *C.QWebEngineQuotaRequest = nil - C.QWebEngineQuotaRequest_new2(param1.cPointer(), &outptr_QWebEngineQuotaRequest) - ret := newQWebEngineQuotaRequest(outptr_QWebEngineQuotaRequest) + ret := newQWebEngineQuotaRequest(C.QWebEngineQuotaRequest_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/webengine/gen_qwebenginequotarequest.h b/qt6/webengine/gen_qwebenginequotarequest.h index 772e6abc..4ad20125 100644 --- a/qt6/webengine/gen_qwebenginequotarequest.h +++ b/qt6/webengine/gen_qwebenginequotarequest.h @@ -22,8 +22,8 @@ typedef struct QUrl QUrl; typedef struct QWebEngineQuotaRequest QWebEngineQuotaRequest; #endif -void QWebEngineQuotaRequest_new(QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest); -void QWebEngineQuotaRequest_new2(QWebEngineQuotaRequest* param1, QWebEngineQuotaRequest** outptr_QWebEngineQuotaRequest); +QWebEngineQuotaRequest* QWebEngineQuotaRequest_new(); +QWebEngineQuotaRequest* QWebEngineQuotaRequest_new2(QWebEngineQuotaRequest* param1); void QWebEngineQuotaRequest_Accept(QWebEngineQuotaRequest* self); void QWebEngineQuotaRequest_Reject(QWebEngineQuotaRequest* self); QUrl* QWebEngineQuotaRequest_Origin(const QWebEngineQuotaRequest* self); diff --git a/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.cpp b/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.cpp index b4fe6cd3..02df65a2 100644 --- a/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.cpp +++ b/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.cpp @@ -7,14 +7,12 @@ #include "gen_qwebengineregisterprotocolhandlerrequest.h" #include "_cgo_export.h" -void QWebEngineRegisterProtocolHandlerRequest_new(QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest) { - QWebEngineRegisterProtocolHandlerRequest* ret = new QWebEngineRegisterProtocolHandlerRequest(); - *outptr_QWebEngineRegisterProtocolHandlerRequest = ret; +QWebEngineRegisterProtocolHandlerRequest* QWebEngineRegisterProtocolHandlerRequest_new() { + return new QWebEngineRegisterProtocolHandlerRequest(); } -void QWebEngineRegisterProtocolHandlerRequest_new2(QWebEngineRegisterProtocolHandlerRequest* param1, QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest) { - QWebEngineRegisterProtocolHandlerRequest* ret = new QWebEngineRegisterProtocolHandlerRequest(*param1); - *outptr_QWebEngineRegisterProtocolHandlerRequest = ret; +QWebEngineRegisterProtocolHandlerRequest* QWebEngineRegisterProtocolHandlerRequest_new2(QWebEngineRegisterProtocolHandlerRequest* param1) { + return new QWebEngineRegisterProtocolHandlerRequest(*param1); } void QWebEngineRegisterProtocolHandlerRequest_Accept(QWebEngineRegisterProtocolHandlerRequest* self) { diff --git a/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.go b/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.go index d10d3b06..6b5bffc6 100644 --- a/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.go +++ b/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.go @@ -38,34 +38,27 @@ func newQWebEngineRegisterProtocolHandlerRequest(h *C.QWebEngineRegisterProtocol if h == nil { return nil } + return &QWebEngineRegisterProtocolHandlerRequest{h: h} } // UnsafeNewQWebEngineRegisterProtocolHandlerRequest constructs the type using only unsafe pointers. func UnsafeNewQWebEngineRegisterProtocolHandlerRequest(h unsafe.Pointer) *QWebEngineRegisterProtocolHandlerRequest { - if h == nil { - return nil - } - - return &QWebEngineRegisterProtocolHandlerRequest{h: (*C.QWebEngineRegisterProtocolHandlerRequest)(h)} + return newQWebEngineRegisterProtocolHandlerRequest((*C.QWebEngineRegisterProtocolHandlerRequest)(h)) } // NewQWebEngineRegisterProtocolHandlerRequest constructs a new QWebEngineRegisterProtocolHandlerRequest object. func NewQWebEngineRegisterProtocolHandlerRequest() *QWebEngineRegisterProtocolHandlerRequest { - var outptr_QWebEngineRegisterProtocolHandlerRequest *C.QWebEngineRegisterProtocolHandlerRequest = nil - C.QWebEngineRegisterProtocolHandlerRequest_new(&outptr_QWebEngineRegisterProtocolHandlerRequest) - ret := newQWebEngineRegisterProtocolHandlerRequest(outptr_QWebEngineRegisterProtocolHandlerRequest) + ret := newQWebEngineRegisterProtocolHandlerRequest(C.QWebEngineRegisterProtocolHandlerRequest_new()) ret.isSubclass = true return ret } // NewQWebEngineRegisterProtocolHandlerRequest2 constructs a new QWebEngineRegisterProtocolHandlerRequest object. func NewQWebEngineRegisterProtocolHandlerRequest2(param1 *QWebEngineRegisterProtocolHandlerRequest) *QWebEngineRegisterProtocolHandlerRequest { - var outptr_QWebEngineRegisterProtocolHandlerRequest *C.QWebEngineRegisterProtocolHandlerRequest = nil - C.QWebEngineRegisterProtocolHandlerRequest_new2(param1.cPointer(), &outptr_QWebEngineRegisterProtocolHandlerRequest) - ret := newQWebEngineRegisterProtocolHandlerRequest(outptr_QWebEngineRegisterProtocolHandlerRequest) + ret := newQWebEngineRegisterProtocolHandlerRequest(C.QWebEngineRegisterProtocolHandlerRequest_new2(param1.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.h b/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.h index 7fa8a2e3..b9f4d2b2 100644 --- a/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.h +++ b/qt6/webengine/gen_qwebengineregisterprotocolhandlerrequest.h @@ -22,8 +22,8 @@ typedef struct QUrl QUrl; typedef struct QWebEngineRegisterProtocolHandlerRequest QWebEngineRegisterProtocolHandlerRequest; #endif -void QWebEngineRegisterProtocolHandlerRequest_new(QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest); -void QWebEngineRegisterProtocolHandlerRequest_new2(QWebEngineRegisterProtocolHandlerRequest* param1, QWebEngineRegisterProtocolHandlerRequest** outptr_QWebEngineRegisterProtocolHandlerRequest); +QWebEngineRegisterProtocolHandlerRequest* QWebEngineRegisterProtocolHandlerRequest_new(); +QWebEngineRegisterProtocolHandlerRequest* QWebEngineRegisterProtocolHandlerRequest_new2(QWebEngineRegisterProtocolHandlerRequest* param1); void QWebEngineRegisterProtocolHandlerRequest_Accept(QWebEngineRegisterProtocolHandlerRequest* self); void QWebEngineRegisterProtocolHandlerRequest_Reject(QWebEngineRegisterProtocolHandlerRequest* self); QUrl* QWebEngineRegisterProtocolHandlerRequest_Origin(const QWebEngineRegisterProtocolHandlerRequest* self); diff --git a/qt6/webengine/gen_qwebenginescript.cpp b/qt6/webengine/gen_qwebenginescript.cpp index 012c0797..109d774f 100644 --- a/qt6/webengine/gen_qwebenginescript.cpp +++ b/qt6/webengine/gen_qwebenginescript.cpp @@ -7,14 +7,12 @@ #include "gen_qwebenginescript.h" #include "_cgo_export.h" -void QWebEngineScript_new(QWebEngineScript** outptr_QWebEngineScript) { - QWebEngineScript* ret = new QWebEngineScript(); - *outptr_QWebEngineScript = ret; +QWebEngineScript* QWebEngineScript_new() { + return new QWebEngineScript(); } -void QWebEngineScript_new2(QWebEngineScript* other, QWebEngineScript** outptr_QWebEngineScript) { - QWebEngineScript* ret = new QWebEngineScript(*other); - *outptr_QWebEngineScript = ret; +QWebEngineScript* QWebEngineScript_new2(QWebEngineScript* other) { + return new QWebEngineScript(*other); } void QWebEngineScript_OperatorAssign(QWebEngineScript* self, QWebEngineScript* other) { diff --git a/qt6/webengine/gen_qwebenginescript.go b/qt6/webengine/gen_qwebenginescript.go index e44bb0ec..28039267 100644 --- a/qt6/webengine/gen_qwebenginescript.go +++ b/qt6/webengine/gen_qwebenginescript.go @@ -54,34 +54,27 @@ func newQWebEngineScript(h *C.QWebEngineScript) *QWebEngineScript { if h == nil { return nil } + return &QWebEngineScript{h: h} } // UnsafeNewQWebEngineScript constructs the type using only unsafe pointers. func UnsafeNewQWebEngineScript(h unsafe.Pointer) *QWebEngineScript { - if h == nil { - return nil - } - - return &QWebEngineScript{h: (*C.QWebEngineScript)(h)} + return newQWebEngineScript((*C.QWebEngineScript)(h)) } // NewQWebEngineScript constructs a new QWebEngineScript object. func NewQWebEngineScript() *QWebEngineScript { - var outptr_QWebEngineScript *C.QWebEngineScript = nil - C.QWebEngineScript_new(&outptr_QWebEngineScript) - ret := newQWebEngineScript(outptr_QWebEngineScript) + ret := newQWebEngineScript(C.QWebEngineScript_new()) ret.isSubclass = true return ret } // NewQWebEngineScript2 constructs a new QWebEngineScript object. func NewQWebEngineScript2(other *QWebEngineScript) *QWebEngineScript { - var outptr_QWebEngineScript *C.QWebEngineScript = nil - C.QWebEngineScript_new2(other.cPointer(), &outptr_QWebEngineScript) - ret := newQWebEngineScript(outptr_QWebEngineScript) + ret := newQWebEngineScript(C.QWebEngineScript_new2(other.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/webengine/gen_qwebenginescript.h b/qt6/webengine/gen_qwebenginescript.h index 53cf3aea..e792b50f 100644 --- a/qt6/webengine/gen_qwebenginescript.h +++ b/qt6/webengine/gen_qwebenginescript.h @@ -22,8 +22,8 @@ typedef struct QUrl QUrl; typedef struct QWebEngineScript QWebEngineScript; #endif -void QWebEngineScript_new(QWebEngineScript** outptr_QWebEngineScript); -void QWebEngineScript_new2(QWebEngineScript* other, QWebEngineScript** outptr_QWebEngineScript); +QWebEngineScript* QWebEngineScript_new(); +QWebEngineScript* QWebEngineScript_new2(QWebEngineScript* other); void QWebEngineScript_OperatorAssign(QWebEngineScript* self, QWebEngineScript* other); struct miqt_string QWebEngineScript_Name(const QWebEngineScript* self); void QWebEngineScript_SetName(QWebEngineScript* self, struct miqt_string name); diff --git a/qt6/webengine/gen_qwebenginescriptcollection.go b/qt6/webengine/gen_qwebenginescriptcollection.go index 368295b2..8d03c493 100644 --- a/qt6/webengine/gen_qwebenginescriptcollection.go +++ b/qt6/webengine/gen_qwebenginescriptcollection.go @@ -37,16 +37,13 @@ func newQWebEngineScriptCollection(h *C.QWebEngineScriptCollection) *QWebEngineS if h == nil { return nil } + return &QWebEngineScriptCollection{h: h} } // UnsafeNewQWebEngineScriptCollection constructs the type using only unsafe pointers. func UnsafeNewQWebEngineScriptCollection(h unsafe.Pointer) *QWebEngineScriptCollection { - if h == nil { - return nil - } - - return &QWebEngineScriptCollection{h: (*C.QWebEngineScriptCollection)(h)} + return newQWebEngineScriptCollection((*C.QWebEngineScriptCollection)(h)) } func (this *QWebEngineScriptCollection) IsEmpty() bool { diff --git a/qt6/webengine/gen_qwebenginesettings.go b/qt6/webengine/gen_qwebenginesettings.go index e4428216..85e7f3c6 100644 --- a/qt6/webengine/gen_qwebenginesettings.go +++ b/qt6/webengine/gen_qwebenginesettings.go @@ -104,16 +104,13 @@ func newQWebEngineSettings(h *C.QWebEngineSettings) *QWebEngineSettings { if h == nil { return nil } + return &QWebEngineSettings{h: h} } // UnsafeNewQWebEngineSettings constructs the type using only unsafe pointers. func UnsafeNewQWebEngineSettings(h unsafe.Pointer) *QWebEngineSettings { - if h == nil { - return nil - } - - return &QWebEngineSettings{h: (*C.QWebEngineSettings)(h)} + return newQWebEngineSettings((*C.QWebEngineSettings)(h)) } func (this *QWebEngineSettings) SetFontFamily(which QWebEngineSettings__FontFamily, family string) { diff --git a/qt6/webengine/gen_qwebengineurlrequestinfo.go b/qt6/webengine/gen_qwebengineurlrequestinfo.go index 9c6b1f1e..9b683e88 100644 --- a/qt6/webengine/gen_qwebengineurlrequestinfo.go +++ b/qt6/webengine/gen_qwebengineurlrequestinfo.go @@ -77,16 +77,13 @@ func newQWebEngineUrlRequestInfo(h *C.QWebEngineUrlRequestInfo) *QWebEngineUrlRe if h == nil { return nil } + return &QWebEngineUrlRequestInfo{h: h} } // UnsafeNewQWebEngineUrlRequestInfo constructs the type using only unsafe pointers. func UnsafeNewQWebEngineUrlRequestInfo(h unsafe.Pointer) *QWebEngineUrlRequestInfo { - if h == nil { - return nil - } - - return &QWebEngineUrlRequestInfo{h: (*C.QWebEngineUrlRequestInfo)(h)} + return newQWebEngineUrlRequestInfo((*C.QWebEngineUrlRequestInfo)(h)) } func (this *QWebEngineUrlRequestInfo) ResourceType() QWebEngineUrlRequestInfo__ResourceType { diff --git a/qt6/webengine/gen_qwebengineurlrequestinterceptor.cpp b/qt6/webengine/gen_qwebengineurlrequestinterceptor.cpp index 53dc3048..138cbfb4 100644 --- a/qt6/webengine/gen_qwebengineurlrequestinterceptor.cpp +++ b/qt6/webengine/gen_qwebengineurlrequestinterceptor.cpp @@ -212,16 +212,16 @@ public: }; -void QWebEngineUrlRequestInterceptor_new(QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject) { - MiqtVirtualQWebEngineUrlRequestInterceptor* ret = new MiqtVirtualQWebEngineUrlRequestInterceptor(); - *outptr_QWebEngineUrlRequestInterceptor = ret; - *outptr_QObject = static_cast(ret); +QWebEngineUrlRequestInterceptor* QWebEngineUrlRequestInterceptor_new() { + return new MiqtVirtualQWebEngineUrlRequestInterceptor(); } -void QWebEngineUrlRequestInterceptor_new2(QObject* p, QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject) { - MiqtVirtualQWebEngineUrlRequestInterceptor* ret = new MiqtVirtualQWebEngineUrlRequestInterceptor(p); - *outptr_QWebEngineUrlRequestInterceptor = ret; - *outptr_QObject = static_cast(ret); +QWebEngineUrlRequestInterceptor* QWebEngineUrlRequestInterceptor_new2(QObject* p) { + return new MiqtVirtualQWebEngineUrlRequestInterceptor(p); +} + +void QWebEngineUrlRequestInterceptor_virtbase(QWebEngineUrlRequestInterceptor* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QWebEngineUrlRequestInterceptor_MetaObject(const QWebEngineUrlRequestInterceptor* self) { diff --git a/qt6/webengine/gen_qwebengineurlrequestinterceptor.go b/qt6/webengine/gen_qwebengineurlrequestinterceptor.go index 8947dd67..04166fce 100644 --- a/qt6/webengine/gen_qwebengineurlrequestinterceptor.go +++ b/qt6/webengine/gen_qwebengineurlrequestinterceptor.go @@ -36,42 +36,34 @@ func (this *QWebEngineUrlRequestInterceptor) UnsafePointer() unsafe.Pointer { } // newQWebEngineUrlRequestInterceptor constructs the type using only CGO pointers. -func newQWebEngineUrlRequestInterceptor(h *C.QWebEngineUrlRequestInterceptor, h_QObject *C.QObject) *QWebEngineUrlRequestInterceptor { +func newQWebEngineUrlRequestInterceptor(h *C.QWebEngineUrlRequestInterceptor) *QWebEngineUrlRequestInterceptor { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineUrlRequestInterceptor_virtbase(h, &outptr_QObject) + return &QWebEngineUrlRequestInterceptor{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineUrlRequestInterceptor constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineUrlRequestInterceptor(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineUrlRequestInterceptor { - if h == nil { - return nil - } - - return &QWebEngineUrlRequestInterceptor{h: (*C.QWebEngineUrlRequestInterceptor)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineUrlRequestInterceptor(h unsafe.Pointer) *QWebEngineUrlRequestInterceptor { + return newQWebEngineUrlRequestInterceptor((*C.QWebEngineUrlRequestInterceptor)(h)) } // NewQWebEngineUrlRequestInterceptor constructs a new QWebEngineUrlRequestInterceptor object. func NewQWebEngineUrlRequestInterceptor() *QWebEngineUrlRequestInterceptor { - var outptr_QWebEngineUrlRequestInterceptor *C.QWebEngineUrlRequestInterceptor = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineUrlRequestInterceptor_new(&outptr_QWebEngineUrlRequestInterceptor, &outptr_QObject) - ret := newQWebEngineUrlRequestInterceptor(outptr_QWebEngineUrlRequestInterceptor, outptr_QObject) + ret := newQWebEngineUrlRequestInterceptor(C.QWebEngineUrlRequestInterceptor_new()) ret.isSubclass = true return ret } // NewQWebEngineUrlRequestInterceptor2 constructs a new QWebEngineUrlRequestInterceptor object. func NewQWebEngineUrlRequestInterceptor2(p *qt6.QObject) *QWebEngineUrlRequestInterceptor { - var outptr_QWebEngineUrlRequestInterceptor *C.QWebEngineUrlRequestInterceptor = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineUrlRequestInterceptor_new2((*C.QObject)(p.UnsafePointer()), &outptr_QWebEngineUrlRequestInterceptor, &outptr_QObject) - ret := newQWebEngineUrlRequestInterceptor(outptr_QWebEngineUrlRequestInterceptor, outptr_QObject) + ret := newQWebEngineUrlRequestInterceptor(C.QWebEngineUrlRequestInterceptor_new2((*C.QObject)(p.UnsafePointer()))) ret.isSubclass = true return ret } @@ -219,7 +211,7 @@ func miqt_exec_callback_QWebEngineUrlRequestInterceptor_TimerEvent(self *C.QWebE } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -245,7 +237,7 @@ func miqt_exec_callback_QWebEngineUrlRequestInterceptor_ChildEvent(self *C.QWebE } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QWebEngineUrlRequestInterceptor{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/webengine/gen_qwebengineurlrequestinterceptor.h b/qt6/webengine/gen_qwebengineurlrequestinterceptor.h index 1a9cd6d0..49d95454 100644 --- a/qt6/webengine/gen_qwebengineurlrequestinterceptor.h +++ b/qt6/webengine/gen_qwebengineurlrequestinterceptor.h @@ -34,8 +34,9 @@ typedef struct QWebEngineUrlRequestInfo QWebEngineUrlRequestInfo; typedef struct QWebEngineUrlRequestInterceptor QWebEngineUrlRequestInterceptor; #endif -void QWebEngineUrlRequestInterceptor_new(QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject); -void QWebEngineUrlRequestInterceptor_new2(QObject* p, QWebEngineUrlRequestInterceptor** outptr_QWebEngineUrlRequestInterceptor, QObject** outptr_QObject); +QWebEngineUrlRequestInterceptor* QWebEngineUrlRequestInterceptor_new(); +QWebEngineUrlRequestInterceptor* QWebEngineUrlRequestInterceptor_new2(QObject* p); +void QWebEngineUrlRequestInterceptor_virtbase(QWebEngineUrlRequestInterceptor* src, QObject** outptr_QObject); QMetaObject* QWebEngineUrlRequestInterceptor_MetaObject(const QWebEngineUrlRequestInterceptor* self); void* QWebEngineUrlRequestInterceptor_Metacast(QWebEngineUrlRequestInterceptor* self, const char* param1); struct miqt_string QWebEngineUrlRequestInterceptor_Tr(const char* s); diff --git a/qt6/webengine/gen_qwebengineurlrequestjob.cpp b/qt6/webengine/gen_qwebengineurlrequestjob.cpp index 1b3d9650..e570c414 100644 --- a/qt6/webengine/gen_qwebengineurlrequestjob.cpp +++ b/qt6/webengine/gen_qwebengineurlrequestjob.cpp @@ -11,6 +11,10 @@ #include "gen_qwebengineurlrequestjob.h" #include "_cgo_export.h" +void QWebEngineUrlRequestJob_virtbase(QWebEngineUrlRequestJob* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); +} + QMetaObject* QWebEngineUrlRequestJob_MetaObject(const QWebEngineUrlRequestJob* self) { return (QMetaObject*) self->metaObject(); } diff --git a/qt6/webengine/gen_qwebengineurlrequestjob.go b/qt6/webengine/gen_qwebengineurlrequestjob.go index ffec1f7a..17658d74 100644 --- a/qt6/webengine/gen_qwebengineurlrequestjob.go +++ b/qt6/webengine/gen_qwebengineurlrequestjob.go @@ -46,22 +46,20 @@ func (this *QWebEngineUrlRequestJob) UnsafePointer() unsafe.Pointer { } // newQWebEngineUrlRequestJob constructs the type using only CGO pointers. -func newQWebEngineUrlRequestJob(h *C.QWebEngineUrlRequestJob, h_QObject *C.QObject) *QWebEngineUrlRequestJob { +func newQWebEngineUrlRequestJob(h *C.QWebEngineUrlRequestJob) *QWebEngineUrlRequestJob { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineUrlRequestJob_virtbase(h, &outptr_QObject) + return &QWebEngineUrlRequestJob{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineUrlRequestJob constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineUrlRequestJob(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineUrlRequestJob { - if h == nil { - return nil - } - - return &QWebEngineUrlRequestJob{h: (*C.QWebEngineUrlRequestJob)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineUrlRequestJob(h unsafe.Pointer) *QWebEngineUrlRequestJob { + return newQWebEngineUrlRequestJob((*C.QWebEngineUrlRequestJob)(h)) } func (this *QWebEngineUrlRequestJob) MetaObject() *qt6.QMetaObject { diff --git a/qt6/webengine/gen_qwebengineurlrequestjob.h b/qt6/webengine/gen_qwebengineurlrequestjob.h index f1b916de..09cf09a8 100644 --- a/qt6/webengine/gen_qwebengineurlrequestjob.h +++ b/qt6/webengine/gen_qwebengineurlrequestjob.h @@ -28,6 +28,7 @@ typedef struct QUrl QUrl; typedef struct QWebEngineUrlRequestJob QWebEngineUrlRequestJob; #endif +void QWebEngineUrlRequestJob_virtbase(QWebEngineUrlRequestJob* src, QObject** outptr_QObject); QMetaObject* QWebEngineUrlRequestJob_MetaObject(const QWebEngineUrlRequestJob* self); void* QWebEngineUrlRequestJob_Metacast(QWebEngineUrlRequestJob* self, const char* param1); struct miqt_string QWebEngineUrlRequestJob_Tr(const char* s); diff --git a/qt6/webengine/gen_qwebengineurlscheme.cpp b/qt6/webengine/gen_qwebengineurlscheme.cpp index 1d5852d8..77ffefe2 100644 --- a/qt6/webengine/gen_qwebengineurlscheme.cpp +++ b/qt6/webengine/gen_qwebengineurlscheme.cpp @@ -4,20 +4,17 @@ #include "gen_qwebengineurlscheme.h" #include "_cgo_export.h" -void QWebEngineUrlScheme_new(QWebEngineUrlScheme** outptr_QWebEngineUrlScheme) { - QWebEngineUrlScheme* ret = new QWebEngineUrlScheme(); - *outptr_QWebEngineUrlScheme = ret; +QWebEngineUrlScheme* QWebEngineUrlScheme_new() { + return new QWebEngineUrlScheme(); } -void QWebEngineUrlScheme_new2(struct miqt_string name, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme) { +QWebEngineUrlScheme* QWebEngineUrlScheme_new2(struct miqt_string name) { QByteArray name_QByteArray(name.data, name.len); - QWebEngineUrlScheme* ret = new QWebEngineUrlScheme(name_QByteArray); - *outptr_QWebEngineUrlScheme = ret; + return new QWebEngineUrlScheme(name_QByteArray); } -void QWebEngineUrlScheme_new3(QWebEngineUrlScheme* that, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme) { - QWebEngineUrlScheme* ret = new QWebEngineUrlScheme(*that); - *outptr_QWebEngineUrlScheme = ret; +QWebEngineUrlScheme* QWebEngineUrlScheme_new3(QWebEngineUrlScheme* that) { + return new QWebEngineUrlScheme(*that); } void QWebEngineUrlScheme_OperatorAssign(QWebEngineUrlScheme* self, QWebEngineUrlScheme* that) { diff --git a/qt6/webengine/gen_qwebengineurlscheme.go b/qt6/webengine/gen_qwebengineurlscheme.go index 9634a586..dd3330c6 100644 --- a/qt6/webengine/gen_qwebengineurlscheme.go +++ b/qt6/webengine/gen_qwebengineurlscheme.go @@ -65,24 +65,19 @@ func newQWebEngineUrlScheme(h *C.QWebEngineUrlScheme) *QWebEngineUrlScheme { if h == nil { return nil } + return &QWebEngineUrlScheme{h: h} } // UnsafeNewQWebEngineUrlScheme constructs the type using only unsafe pointers. func UnsafeNewQWebEngineUrlScheme(h unsafe.Pointer) *QWebEngineUrlScheme { - if h == nil { - return nil - } - - return &QWebEngineUrlScheme{h: (*C.QWebEngineUrlScheme)(h)} + return newQWebEngineUrlScheme((*C.QWebEngineUrlScheme)(h)) } // NewQWebEngineUrlScheme constructs a new QWebEngineUrlScheme object. func NewQWebEngineUrlScheme() *QWebEngineUrlScheme { - var outptr_QWebEngineUrlScheme *C.QWebEngineUrlScheme = nil - C.QWebEngineUrlScheme_new(&outptr_QWebEngineUrlScheme) - ret := newQWebEngineUrlScheme(outptr_QWebEngineUrlScheme) + ret := newQWebEngineUrlScheme(C.QWebEngineUrlScheme_new()) ret.isSubclass = true return ret } @@ -92,20 +87,16 @@ func NewQWebEngineUrlScheme2(name []byte) *QWebEngineUrlScheme { name_alias := C.struct_miqt_string{} name_alias.data = (*C.char)(unsafe.Pointer(&name[0])) name_alias.len = C.size_t(len(name)) - var outptr_QWebEngineUrlScheme *C.QWebEngineUrlScheme = nil - C.QWebEngineUrlScheme_new2(name_alias, &outptr_QWebEngineUrlScheme) - ret := newQWebEngineUrlScheme(outptr_QWebEngineUrlScheme) + ret := newQWebEngineUrlScheme(C.QWebEngineUrlScheme_new2(name_alias)) ret.isSubclass = true return ret } // NewQWebEngineUrlScheme3 constructs a new QWebEngineUrlScheme object. func NewQWebEngineUrlScheme3(that *QWebEngineUrlScheme) *QWebEngineUrlScheme { - var outptr_QWebEngineUrlScheme *C.QWebEngineUrlScheme = nil - C.QWebEngineUrlScheme_new3(that.cPointer(), &outptr_QWebEngineUrlScheme) - ret := newQWebEngineUrlScheme(outptr_QWebEngineUrlScheme) + ret := newQWebEngineUrlScheme(C.QWebEngineUrlScheme_new3(that.cPointer())) ret.isSubclass = true return ret } diff --git a/qt6/webengine/gen_qwebengineurlscheme.h b/qt6/webengine/gen_qwebengineurlscheme.h index e981e95f..e8231eca 100644 --- a/qt6/webengine/gen_qwebengineurlscheme.h +++ b/qt6/webengine/gen_qwebengineurlscheme.h @@ -20,9 +20,9 @@ class QWebEngineUrlScheme; typedef struct QWebEngineUrlScheme QWebEngineUrlScheme; #endif -void QWebEngineUrlScheme_new(QWebEngineUrlScheme** outptr_QWebEngineUrlScheme); -void QWebEngineUrlScheme_new2(struct miqt_string name, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme); -void QWebEngineUrlScheme_new3(QWebEngineUrlScheme* that, QWebEngineUrlScheme** outptr_QWebEngineUrlScheme); +QWebEngineUrlScheme* QWebEngineUrlScheme_new(); +QWebEngineUrlScheme* QWebEngineUrlScheme_new2(struct miqt_string name); +QWebEngineUrlScheme* QWebEngineUrlScheme_new3(QWebEngineUrlScheme* that); void QWebEngineUrlScheme_OperatorAssign(QWebEngineUrlScheme* self, QWebEngineUrlScheme* that); bool QWebEngineUrlScheme_OperatorEqual(const QWebEngineUrlScheme* self, QWebEngineUrlScheme* that); bool QWebEngineUrlScheme_OperatorNotEqual(const QWebEngineUrlScheme* self, QWebEngineUrlScheme* that); diff --git a/qt6/webengine/gen_qwebengineurlschemehandler.cpp b/qt6/webengine/gen_qwebengineurlschemehandler.cpp index 388cbd8f..5a2bd2ae 100644 --- a/qt6/webengine/gen_qwebengineurlschemehandler.cpp +++ b/qt6/webengine/gen_qwebengineurlschemehandler.cpp @@ -210,16 +210,16 @@ public: }; -void QWebEngineUrlSchemeHandler_new(QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject) { - MiqtVirtualQWebEngineUrlSchemeHandler* ret = new MiqtVirtualQWebEngineUrlSchemeHandler(); - *outptr_QWebEngineUrlSchemeHandler = ret; - *outptr_QObject = static_cast(ret); +QWebEngineUrlSchemeHandler* QWebEngineUrlSchemeHandler_new() { + return new MiqtVirtualQWebEngineUrlSchemeHandler(); } -void QWebEngineUrlSchemeHandler_new2(QObject* parent, QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject) { - MiqtVirtualQWebEngineUrlSchemeHandler* ret = new MiqtVirtualQWebEngineUrlSchemeHandler(parent); - *outptr_QWebEngineUrlSchemeHandler = ret; - *outptr_QObject = static_cast(ret); +QWebEngineUrlSchemeHandler* QWebEngineUrlSchemeHandler_new2(QObject* parent) { + return new MiqtVirtualQWebEngineUrlSchemeHandler(parent); +} + +void QWebEngineUrlSchemeHandler_virtbase(QWebEngineUrlSchemeHandler* src, QObject** outptr_QObject) { + *outptr_QObject = static_cast(src); } QMetaObject* QWebEngineUrlSchemeHandler_MetaObject(const QWebEngineUrlSchemeHandler* self) { diff --git a/qt6/webengine/gen_qwebengineurlschemehandler.go b/qt6/webengine/gen_qwebengineurlschemehandler.go index 0be18385..495d9009 100644 --- a/qt6/webengine/gen_qwebengineurlschemehandler.go +++ b/qt6/webengine/gen_qwebengineurlschemehandler.go @@ -36,42 +36,34 @@ func (this *QWebEngineUrlSchemeHandler) UnsafePointer() unsafe.Pointer { } // newQWebEngineUrlSchemeHandler constructs the type using only CGO pointers. -func newQWebEngineUrlSchemeHandler(h *C.QWebEngineUrlSchemeHandler, h_QObject *C.QObject) *QWebEngineUrlSchemeHandler { +func newQWebEngineUrlSchemeHandler(h *C.QWebEngineUrlSchemeHandler) *QWebEngineUrlSchemeHandler { if h == nil { return nil } + var outptr_QObject *C.QObject = nil + C.QWebEngineUrlSchemeHandler_virtbase(h, &outptr_QObject) + return &QWebEngineUrlSchemeHandler{h: h, - QObject: qt6.UnsafeNewQObject(unsafe.Pointer(h_QObject))} + QObject: qt6.UnsafeNewQObject(unsafe.Pointer(outptr_QObject))} } // UnsafeNewQWebEngineUrlSchemeHandler constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineUrlSchemeHandler(h unsafe.Pointer, h_QObject unsafe.Pointer) *QWebEngineUrlSchemeHandler { - if h == nil { - return nil - } - - return &QWebEngineUrlSchemeHandler{h: (*C.QWebEngineUrlSchemeHandler)(h), - QObject: qt6.UnsafeNewQObject(h_QObject)} +func UnsafeNewQWebEngineUrlSchemeHandler(h unsafe.Pointer) *QWebEngineUrlSchemeHandler { + return newQWebEngineUrlSchemeHandler((*C.QWebEngineUrlSchemeHandler)(h)) } // NewQWebEngineUrlSchemeHandler constructs a new QWebEngineUrlSchemeHandler object. func NewQWebEngineUrlSchemeHandler() *QWebEngineUrlSchemeHandler { - var outptr_QWebEngineUrlSchemeHandler *C.QWebEngineUrlSchemeHandler = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineUrlSchemeHandler_new(&outptr_QWebEngineUrlSchemeHandler, &outptr_QObject) - ret := newQWebEngineUrlSchemeHandler(outptr_QWebEngineUrlSchemeHandler, outptr_QObject) + ret := newQWebEngineUrlSchemeHandler(C.QWebEngineUrlSchemeHandler_new()) ret.isSubclass = true return ret } // NewQWebEngineUrlSchemeHandler2 constructs a new QWebEngineUrlSchemeHandler object. func NewQWebEngineUrlSchemeHandler2(parent *qt6.QObject) *QWebEngineUrlSchemeHandler { - var outptr_QWebEngineUrlSchemeHandler *C.QWebEngineUrlSchemeHandler = nil - var outptr_QObject *C.QObject = nil - C.QWebEngineUrlSchemeHandler_new2((*C.QObject)(parent.UnsafePointer()), &outptr_QWebEngineUrlSchemeHandler, &outptr_QObject) - ret := newQWebEngineUrlSchemeHandler(outptr_QWebEngineUrlSchemeHandler, outptr_QObject) + ret := newQWebEngineUrlSchemeHandler(C.QWebEngineUrlSchemeHandler_new2((*C.QObject)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -135,7 +127,7 @@ func miqt_exec_callback_QWebEngineUrlSchemeHandler_RequestStarted(self *C.QWebEn } // Convert all CABI parameters to Go parameters - slotval1 := newQWebEngineUrlRequestJob(param1, nil) + slotval1 := newQWebEngineUrlRequestJob(param1) gofunc(slotval1) @@ -219,7 +211,7 @@ func miqt_exec_callback_QWebEngineUrlSchemeHandler_TimerEvent(self *C.QWebEngine } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQTimerEvent(unsafe.Pointer(event)) gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_TimerEvent, slotval1) @@ -245,7 +237,7 @@ func miqt_exec_callback_QWebEngineUrlSchemeHandler_ChildEvent(self *C.QWebEngine } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQChildEvent(unsafe.Pointer(event)) gofunc((&QWebEngineUrlSchemeHandler{h: self}).callVirtualBase_ChildEvent, slotval1) diff --git a/qt6/webengine/gen_qwebengineurlschemehandler.h b/qt6/webengine/gen_qwebengineurlschemehandler.h index 05af19bf..966866fb 100644 --- a/qt6/webengine/gen_qwebengineurlschemehandler.h +++ b/qt6/webengine/gen_qwebengineurlschemehandler.h @@ -34,8 +34,9 @@ typedef struct QWebEngineUrlRequestJob QWebEngineUrlRequestJob; typedef struct QWebEngineUrlSchemeHandler QWebEngineUrlSchemeHandler; #endif -void QWebEngineUrlSchemeHandler_new(QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject); -void QWebEngineUrlSchemeHandler_new2(QObject* parent, QWebEngineUrlSchemeHandler** outptr_QWebEngineUrlSchemeHandler, QObject** outptr_QObject); +QWebEngineUrlSchemeHandler* QWebEngineUrlSchemeHandler_new(); +QWebEngineUrlSchemeHandler* QWebEngineUrlSchemeHandler_new2(QObject* parent); +void QWebEngineUrlSchemeHandler_virtbase(QWebEngineUrlSchemeHandler* src, QObject** outptr_QObject); QMetaObject* QWebEngineUrlSchemeHandler_MetaObject(const QWebEngineUrlSchemeHandler* self); void* QWebEngineUrlSchemeHandler_Metacast(QWebEngineUrlSchemeHandler* self, const char* param1); struct miqt_string QWebEngineUrlSchemeHandler_Tr(const char* s); diff --git a/qt6/webengine/gen_qwebengineview.cpp b/qt6/webengine/gen_qwebengineview.cpp index 77cd41cc..ab1a4e8c 100644 --- a/qt6/webengine/gen_qwebengineview.cpp +++ b/qt6/webengine/gen_qwebengineview.cpp @@ -1063,52 +1063,32 @@ public: }; -void QWebEngineView_new(QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(parent); - *outptr_QWebEngineView = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWebEngineView* QWebEngineView_new(QWidget* parent) { + return new MiqtVirtualQWebEngineView(parent); } -void QWebEngineView_new2(QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(); - *outptr_QWebEngineView = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWebEngineView* QWebEngineView_new2() { + return new MiqtVirtualQWebEngineView(); } -void QWebEngineView_new3(QWebEngineProfile* profile, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(profile); - *outptr_QWebEngineView = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWebEngineView* QWebEngineView_new3(QWebEngineProfile* profile) { + return new MiqtVirtualQWebEngineView(profile); } -void QWebEngineView_new4(QWebEnginePage* page, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(page); - *outptr_QWebEngineView = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWebEngineView* QWebEngineView_new4(QWebEnginePage* page) { + return new MiqtVirtualQWebEngineView(page); } -void QWebEngineView_new5(QWebEngineProfile* profile, QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(profile, parent); - *outptr_QWebEngineView = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWebEngineView* QWebEngineView_new5(QWebEngineProfile* profile, QWidget* parent) { + return new MiqtVirtualQWebEngineView(profile, parent); } -void QWebEngineView_new6(QWebEnginePage* page, QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice) { - MiqtVirtualQWebEngineView* ret = new MiqtVirtualQWebEngineView(page, parent); - *outptr_QWebEngineView = ret; - *outptr_QWidget = static_cast(ret); - *outptr_QObject = static_cast(ret); - *outptr_QPaintDevice = static_cast(ret); +QWebEngineView* QWebEngineView_new6(QWebEnginePage* page, QWidget* parent) { + return new MiqtVirtualQWebEngineView(page, parent); +} + +void QWebEngineView_virtbase(QWebEngineView* src, QWidget** outptr_QWidget) { + *outptr_QWidget = static_cast(src); } QMetaObject* QWebEngineView_MetaObject(const QWebEngineView* self) { diff --git a/qt6/webengine/gen_qwebengineview.go b/qt6/webengine/gen_qwebengineview.go index 703d33a5..e006f20f 100644 --- a/qt6/webengine/gen_qwebengineview.go +++ b/qt6/webengine/gen_qwebengineview.go @@ -37,98 +37,66 @@ func (this *QWebEngineView) UnsafePointer() unsafe.Pointer { } // newQWebEngineView constructs the type using only CGO pointers. -func newQWebEngineView(h *C.QWebEngineView, h_QWidget *C.QWidget, h_QObject *C.QObject, h_QPaintDevice *C.QPaintDevice) *QWebEngineView { +func newQWebEngineView(h *C.QWebEngineView) *QWebEngineView { if h == nil { return nil } + var outptr_QWidget *C.QWidget = nil + C.QWebEngineView_virtbase(h, &outptr_QWidget) + return &QWebEngineView{h: h, - QWidget: qt6.UnsafeNewQWidget(unsafe.Pointer(h_QWidget), unsafe.Pointer(h_QObject), unsafe.Pointer(h_QPaintDevice))} + QWidget: qt6.UnsafeNewQWidget(unsafe.Pointer(outptr_QWidget))} } // UnsafeNewQWebEngineView constructs the type using only unsafe pointers. -func UnsafeNewQWebEngineView(h unsafe.Pointer, h_QWidget unsafe.Pointer, h_QObject unsafe.Pointer, h_QPaintDevice unsafe.Pointer) *QWebEngineView { - if h == nil { - return nil - } - - return &QWebEngineView{h: (*C.QWebEngineView)(h), - QWidget: qt6.UnsafeNewQWidget(h_QWidget, h_QObject, h_QPaintDevice)} +func UnsafeNewQWebEngineView(h unsafe.Pointer) *QWebEngineView { + return newQWebEngineView((*C.QWebEngineView)(h)) } // NewQWebEngineView constructs a new QWebEngineView object. func NewQWebEngineView(parent *qt6.QWidget) *QWebEngineView { - var outptr_QWebEngineView *C.QWebEngineView = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWebEngineView_new((*C.QWidget)(parent.UnsafePointer()), &outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWebEngineView(C.QWebEngineView_new((*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQWebEngineView2 constructs a new QWebEngineView object. func NewQWebEngineView2() *QWebEngineView { - var outptr_QWebEngineView *C.QWebEngineView = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWebEngineView_new2(&outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWebEngineView(C.QWebEngineView_new2()) ret.isSubclass = true return ret } // NewQWebEngineView3 constructs a new QWebEngineView object. func NewQWebEngineView3(profile *QWebEngineProfile) *QWebEngineView { - var outptr_QWebEngineView *C.QWebEngineView = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWebEngineView_new3(profile.cPointer(), &outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWebEngineView(C.QWebEngineView_new3(profile.cPointer())) ret.isSubclass = true return ret } // NewQWebEngineView4 constructs a new QWebEngineView object. func NewQWebEngineView4(page *QWebEnginePage) *QWebEngineView { - var outptr_QWebEngineView *C.QWebEngineView = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWebEngineView_new4(page.cPointer(), &outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWebEngineView(C.QWebEngineView_new4(page.cPointer())) ret.isSubclass = true return ret } // NewQWebEngineView5 constructs a new QWebEngineView object. func NewQWebEngineView5(profile *QWebEngineProfile, parent *qt6.QWidget) *QWebEngineView { - var outptr_QWebEngineView *C.QWebEngineView = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWebEngineView_new5(profile.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWebEngineView(C.QWebEngineView_new5(profile.cPointer(), (*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } // NewQWebEngineView6 constructs a new QWebEngineView object. func NewQWebEngineView6(page *QWebEnginePage, parent *qt6.QWidget) *QWebEngineView { - var outptr_QWebEngineView *C.QWebEngineView = nil - var outptr_QWidget *C.QWidget = nil - var outptr_QObject *C.QObject = nil - var outptr_QPaintDevice *C.QPaintDevice = nil - C.QWebEngineView_new6(page.cPointer(), (*C.QWidget)(parent.UnsafePointer()), &outptr_QWebEngineView, &outptr_QWidget, &outptr_QObject, &outptr_QPaintDevice) - ret := newQWebEngineView(outptr_QWebEngineView, outptr_QWidget, outptr_QObject, outptr_QPaintDevice) + ret := newQWebEngineView(C.QWebEngineView_new6(page.cPointer(), (*C.QWidget)(parent.UnsafePointer()))) ret.isSubclass = true return ret } @@ -153,11 +121,11 @@ func QWebEngineView_Tr(s string) string { } func QWebEngineView_ForPage(page *QWebEnginePage) *QWebEngineView { - return newQWebEngineView(C.QWebEngineView_ForPage(page.cPointer()), nil, nil, nil) + return newQWebEngineView(C.QWebEngineView_ForPage(page.cPointer())) } func (this *QWebEngineView) Page() *QWebEnginePage { - return newQWebEnginePage(C.QWebEngineView_Page(this.h), nil) + return newQWebEnginePage(C.QWebEngineView_Page(this.h)) } func (this *QWebEngineView) SetPage(page *QWebEnginePage) { @@ -188,7 +156,7 @@ func (this *QWebEngineView) SetContent(data []byte) { } func (this *QWebEngineView) History() *QWebEngineHistory { - return newQWebEngineHistory(C.QWebEngineView_History(this.h), nil) + return newQWebEngineHistory(C.QWebEngineView_History(this.h)) } func (this *QWebEngineView) Title() string { @@ -232,7 +200,7 @@ func (this *QWebEngineView) SelectedText() string { } func (this *QWebEngineView) PageAction(action QWebEnginePage__WebAction) *qt6.QAction { - return qt6.UnsafeNewQAction(unsafe.Pointer(C.QWebEngineView_PageAction(this.h, (C.int)(action))), nil) + return qt6.UnsafeNewQAction(unsafe.Pointer(C.QWebEngineView_PageAction(this.h, (C.int)(action)))) } func (this *QWebEngineView) TriggerPageAction(action QWebEnginePage__WebAction) { @@ -258,11 +226,11 @@ func (this *QWebEngineView) Settings() *QWebEngineSettings { } func (this *QWebEngineView) CreateStandardContextMenu() *qt6.QMenu { - return qt6.UnsafeNewQMenu(unsafe.Pointer(C.QWebEngineView_CreateStandardContextMenu(this.h)), nil, nil, nil) + return qt6.UnsafeNewQMenu(unsafe.Pointer(C.QWebEngineView_CreateStandardContextMenu(this.h))) } func (this *QWebEngineView) LastContextMenuRequest() *QWebEngineContextMenuRequest { - return newQWebEngineContextMenuRequest(C.QWebEngineView_LastContextMenuRequest(this.h), nil) + return newQWebEngineContextMenuRequest(C.QWebEngineView_LastContextMenuRequest(this.h)) } func (this *QWebEngineView) PrintToPdf(filePath string) { @@ -642,7 +610,7 @@ func miqt_exec_callback_QWebEngineView_SizeHint(self *C.QWebEngineView, cb C.int func (this *QWebEngineView) callVirtualBase_CreateWindow(typeVal QWebEnginePage__WebWindowType) *QWebEngineView { - return newQWebEngineView(C.QWebEngineView_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal)), nil, nil, nil) + return newQWebEngineView(C.QWebEngineView_virtualbase_CreateWindow(unsafe.Pointer(this.h), (C.int)(typeVal))) } func (this *QWebEngineView) OnCreateWindow(slot func(super func(typeVal QWebEnginePage__WebWindowType) *QWebEngineView, typeVal QWebEnginePage__WebWindowType) *QWebEngineView) { @@ -688,7 +656,7 @@ func miqt_exec_callback_QWebEngineView_ContextMenuEvent(self *C.QWebEngineView, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1), nil, nil) + slotval1 := qt6.UnsafeNewQContextMenuEvent(unsafe.Pointer(param1)) gofunc((&QWebEngineView{h: self}).callVirtualBase_ContextMenuEvent, slotval1) @@ -742,7 +710,7 @@ func miqt_exec_callback_QWebEngineView_ShowEvent(self *C.QWebEngineView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQShowEvent(unsafe.Pointer(param1)) gofunc((&QWebEngineView{h: self}).callVirtualBase_ShowEvent, slotval1) @@ -768,7 +736,7 @@ func miqt_exec_callback_QWebEngineView_HideEvent(self *C.QWebEngineView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQHideEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQHideEvent(unsafe.Pointer(param1)) gofunc((&QWebEngineView{h: self}).callVirtualBase_HideEvent, slotval1) @@ -794,7 +762,7 @@ func miqt_exec_callback_QWebEngineView_CloseEvent(self *C.QWebEngineView, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQCloseEvent(unsafe.Pointer(param1)) gofunc((&QWebEngineView{h: self}).callVirtualBase_CloseEvent, slotval1) @@ -820,7 +788,7 @@ func miqt_exec_callback_QWebEngineView_DragEnterEvent(self *C.QWebEngineView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(e), nil, nil, nil) + slotval1 := qt6.UnsafeNewQDragEnterEvent(unsafe.Pointer(e)) gofunc((&QWebEngineView{h: self}).callVirtualBase_DragEnterEvent, slotval1) @@ -846,7 +814,7 @@ func miqt_exec_callback_QWebEngineView_DragLeaveEvent(self *C.QWebEngineView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e), nil) + slotval1 := qt6.UnsafeNewQDragLeaveEvent(unsafe.Pointer(e)) gofunc((&QWebEngineView{h: self}).callVirtualBase_DragLeaveEvent, slotval1) @@ -872,7 +840,7 @@ func miqt_exec_callback_QWebEngineView_DragMoveEvent(self *C.QWebEngineView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(e), nil, nil) + slotval1 := qt6.UnsafeNewQDragMoveEvent(unsafe.Pointer(e)) gofunc((&QWebEngineView{h: self}).callVirtualBase_DragMoveEvent, slotval1) @@ -898,7 +866,7 @@ func miqt_exec_callback_QWebEngineView_DropEvent(self *C.QWebEngineView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(e), nil) + slotval1 := qt6.UnsafeNewQDropEvent(unsafe.Pointer(e)) gofunc((&QWebEngineView{h: self}).callVirtualBase_DropEvent, slotval1) @@ -1080,7 +1048,7 @@ func miqt_exec_callback_QWebEngineView_MousePressEvent(self *C.QWebEngineView, c } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_MousePressEvent, slotval1) @@ -1106,7 +1074,7 @@ func miqt_exec_callback_QWebEngineView_MouseReleaseEvent(self *C.QWebEngineView, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_MouseReleaseEvent, slotval1) @@ -1132,7 +1100,7 @@ func miqt_exec_callback_QWebEngineView_MouseDoubleClickEvent(self *C.QWebEngineV } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_MouseDoubleClickEvent, slotval1) @@ -1158,7 +1126,7 @@ func miqt_exec_callback_QWebEngineView_MouseMoveEvent(self *C.QWebEngineView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQMouseEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_MouseMoveEvent, slotval1) @@ -1184,7 +1152,7 @@ func miqt_exec_callback_QWebEngineView_WheelEvent(self *C.QWebEngineView, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQWheelEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_WheelEvent, slotval1) @@ -1210,7 +1178,7 @@ func miqt_exec_callback_QWebEngineView_KeyPressEvent(self *C.QWebEngineView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_KeyPressEvent, slotval1) @@ -1236,7 +1204,7 @@ func miqt_exec_callback_QWebEngineView_KeyReleaseEvent(self *C.QWebEngineView, c } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event), nil, nil) + slotval1 := qt6.UnsafeNewQKeyEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_KeyReleaseEvent, slotval1) @@ -1262,7 +1230,7 @@ func miqt_exec_callback_QWebEngineView_FocusInEvent(self *C.QWebEngineView, cb C } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_FocusInEvent, slotval1) @@ -1288,7 +1256,7 @@ func miqt_exec_callback_QWebEngineView_FocusOutEvent(self *C.QWebEngineView, cb } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQFocusEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_FocusOutEvent, slotval1) @@ -1314,7 +1282,7 @@ func miqt_exec_callback_QWebEngineView_EnterEvent(self *C.QWebEngineView, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQEnterEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQEnterEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_EnterEvent, slotval1) @@ -1366,7 +1334,7 @@ func miqt_exec_callback_QWebEngineView_PaintEvent(self *C.QWebEngineView, cb C.i } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQPaintEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_PaintEvent, slotval1) @@ -1392,7 +1360,7 @@ func miqt_exec_callback_QWebEngineView_MoveEvent(self *C.QWebEngineView, cb C.in } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQMoveEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQMoveEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_MoveEvent, slotval1) @@ -1418,7 +1386,7 @@ func miqt_exec_callback_QWebEngineView_ResizeEvent(self *C.QWebEngineView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQResizeEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_ResizeEvent, slotval1) @@ -1444,7 +1412,7 @@ func miqt_exec_callback_QWebEngineView_TabletEvent(self *C.QWebEngineView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQTabletEvent(unsafe.Pointer(event), nil, nil, nil, nil) + slotval1 := qt6.UnsafeNewQTabletEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_TabletEvent, slotval1) @@ -1470,7 +1438,7 @@ func miqt_exec_callback_QWebEngineView_ActionEvent(self *C.QWebEngineView, cb C. } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQActionEvent(unsafe.Pointer(event), nil) + slotval1 := qt6.UnsafeNewQActionEvent(unsafe.Pointer(event)) gofunc((&QWebEngineView{h: self}).callVirtualBase_ActionEvent, slotval1) @@ -1666,7 +1634,7 @@ func miqt_exec_callback_QWebEngineView_InputMethodEvent(self *C.QWebEngineView, } // Convert all CABI parameters to Go parameters - slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1), nil) + slotval1 := qt6.UnsafeNewQInputMethodEvent(unsafe.Pointer(param1)) gofunc((&QWebEngineView{h: self}).callVirtualBase_InputMethodEvent, slotval1) diff --git a/qt6/webengine/gen_qwebengineview.h b/qt6/webengine/gen_qwebengineview.h index 68036381..d514b9cc 100644 --- a/qt6/webengine/gen_qwebengineview.h +++ b/qt6/webengine/gen_qwebengineview.h @@ -104,12 +104,13 @@ typedef struct QWheelEvent QWheelEvent; typedef struct QWidget QWidget; #endif -void QWebEngineView_new(QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWebEngineView_new2(QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWebEngineView_new3(QWebEngineProfile* profile, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWebEngineView_new4(QWebEnginePage* page, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWebEngineView_new5(QWebEngineProfile* profile, QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); -void QWebEngineView_new6(QWebEnginePage* page, QWidget* parent, QWebEngineView** outptr_QWebEngineView, QWidget** outptr_QWidget, QObject** outptr_QObject, QPaintDevice** outptr_QPaintDevice); +QWebEngineView* QWebEngineView_new(QWidget* parent); +QWebEngineView* QWebEngineView_new2(); +QWebEngineView* QWebEngineView_new3(QWebEngineProfile* profile); +QWebEngineView* QWebEngineView_new4(QWebEnginePage* page); +QWebEngineView* QWebEngineView_new5(QWebEngineProfile* profile, QWidget* parent); +QWebEngineView* QWebEngineView_new6(QWebEnginePage* page, QWidget* parent); +void QWebEngineView_virtbase(QWebEngineView* src, QWidget** outptr_QWidget); QMetaObject* QWebEngineView_MetaObject(const QWebEngineView* self); void* QWebEngineView_Metacast(QWebEngineView* self, const char* param1); struct miqt_string QWebEngineView_Tr(const char* s);